Skip to content

Commit ec7ca6c

Browse files
vmcjeldering
andcommitted
Remove installation of service files
For FHS install the chosen option is most likely incorrect and in case someone uses a prefix the files would most of the time still need to be installed outside of that prefix. The same method as for the webserver files will be used, so present the option to copy them yourself as sysadmin on the machine both in the Makefile and in the documentation. Co-authored-by: Jaap Eldering <eldering@users.noreply.github.com>
1 parent 9c2bb99 commit ec7ca6c

File tree

4 files changed

+20
-28
lines changed

4 files changed

+20
-28
lines changed

Makefile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,17 @@ endif
151151
# Fix permissions and ownership for password files:
152152
-$(INSTALL_USER) -m 0600 -t $(DESTDIR)$(judgehost_etcdir) \
153153
etc/restapi.secret
154+
@echo ""
155+
@echo "========== Judgehost Install Completed =========="
156+
@echo ""
157+
@echo "Optionally:"
158+
@echo " - Install the create-cgroup service to setup the secure judging restrictions:"
159+
@echo " cp judge/create-cgroups.service /etc/systemd/system/"
160+
@echo " - Install the judgehost service:"
161+
@echo " cp judge/domjudge-judgedaemon@.service /etc/systemd/system/"
162+
@echo " - You can enable the judgehost on CPU core 1 with:"
163+
@echo " systemctl enable domjudge-judgedaemon@1"
164+
@echo ""
154165

155166
check-root:
156167
@if [ `id -u` -ne 0 -a -z "$(QUIET)" ]; then \

configure.ac

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -243,26 +243,6 @@ AX_WITH_COMMENT(7,[ ])
243243

244244
# }}}
245245

246-
# {{{ Directory for systemd unit files
247-
248-
PKG_PROG_PKG_CONFIG()
249-
AC_ARG_WITH([systemdsystemunitdir],
250-
[AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files])],,
251-
[with_systemdsystemunitdir=auto])
252-
AS_IF([test "x$with_systemdsystemunitdir" = "xyes" -o "x$with_systemdsystemunitdir" = "xauto"], [
253-
AS_IF([test "x$PKG_CONFIG" = "x"],AC_MSG_ERROR([systemd support requested but no pkg-config available to query systemd package]))
254-
def_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)
255-
256-
AS_IF([test "x$def_systemdsystemunitdir" = "x"],
257-
[AS_IF([test "x$with_systemdsystemunitdir" = "xyes"],
258-
[AC_MSG_ERROR([systemd support requested but pkg-config unable to query systemd package])])
259-
with_systemdsystemunitdir=no],
260-
[with_systemdsystemunitdir="$def_systemdsystemunitdir"])])
261-
AS_IF([test "x$with_systemdsystemunitdir" != "xno"],
262-
[AC_SUBST([systemd_unitdir], [$with_systemdsystemunitdir])])
263-
264-
# }}}
265-
266246
AC_MSG_CHECKING([baseurl])
267247
AC_ARG_WITH([baseurl], [AS_HELP_STRING([--with-baseurl=URL],
268248
[Base URL of the DOMjudge web interfaces. Example default:
@@ -401,9 +381,6 @@ echo " - tmp..............: AX_VAR_EXPAND($judgehost_tmpdir)"
401381
echo " - judge............: AX_VAR_EXPAND($judgehost_judgedir)"
402382
echo " - chroot...........: AX_VAR_EXPAND($judgehost_chrootdir)"
403383
fi
404-
echo ""
405-
echo " * systemd unit files..: AX_VAR_EXPAND($systemd_unitdir)"
406-
echo ""
407384
echo "Run 'make' without arguments to get a list of (build) targets."
408385
echo ""
409386
if test "x$BASEURL_UNCONFIGURED" = x1 ; then

doc/manual/install-judgehost.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,15 @@ example to install DOMjudge in the directory ``domjudge`` under `/opt`::
6868
make judgehost
6969
sudo make install-judgehost
7070

71+
Example service files for the judgehost and the judgedaemon are provided in
72+
``judge/create-cgroups.service`` and ``judge/domjudge-judgedaemon@.service``. The rest of the manual assumes you install those
73+
in a location which is picked up by ``systemd``, for example ``/etc/systemd/system``.
74+
75+
.. parsed-literal::
76+
77+
cp judge/domjudge-judgedaemon@.service /etc/systemd/system/
78+
cp judge/create-cgroups.service /etc/systemd/system/
79+
7180
The judgedaemon can be run on various hardware configurations;
7281

7382
- A virtual machine, typically these have 1 or 2 cores and no hyperthreading, because the kernel will schedule its own tasks on CPU 0, we advice CPU 1,

judge/Makefile

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,6 @@ install-judgehost:
3030
judgedaemon.main.php run-interactive.sh
3131
$(INSTALL_PROG) -t $(DESTDIR)$(judgehost_bindir) \
3232
judgedaemon runguard runpipe create_cgroups
33-
ifneq ($(systemd_unitdir),)
34-
$(INSTALL_DIR) $(DESTDIR)$(systemd_unitdir)
35-
$(INSTALL_DATA) -t $(DESTDIR)$(systemd_unitdir) \
36-
create-cgroups.service domjudge-judgehost.target domjudge-judgedaemon@.service
37-
endif
3833

3934
clean-l:
4035
-rm -f $(TARGETS) $(TARGETS:%=%$(OBJEXT))

0 commit comments

Comments
 (0)