Skip to content

Commit 63cde5b

Browse files
committed
Remove configure option for cgroup location
runguard.c has the default location hardcoded and no one complained. It would be easy to use the autoconf option (and would have taken less code changes).
1 parent 9974cec commit 63cde5b

File tree

5 files changed

+3
-15
lines changed

5 files changed

+3
-15
lines changed

.github/jobs/configure-checks/all.bats

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,6 @@ compile_assertions_finished () {
248248
assert_line " - tmp..............: /opt/domjudge/judgehost/tmp"
249249
assert_line " - judge............: /opt/domjudge/judgehost/judgings"
250250
assert_line " - chroot...........: /chroot/domjudge"
251-
assert_line " - cgroup...........: /sys/fs/cgroup"
252251
}
253252

254253
@test "Prefix configured" {
@@ -309,12 +308,11 @@ compile_assertions_finished () {
309308
assert_line " - tmp..............: /tmp"
310309
assert_line " - judge............: /usr/local/var/lib/domjudge/judgings"
311310
assert_line " - chroot...........: /chroot/domjudge"
312-
assert_line " - cgroup...........: /sys/fs/cgroup"
313311
}
314312

315313
@test "Alternative dirs together with FHS" {
316314
setup
317-
run run_configure --enable-fhs --with-domserver_webappdir=/run/webapp --with-domserver_tmpdir=/tmp/domserver --with-judgehost_tmpdir=/srv/tmp --with-judgehost_judgedir=/srv/judgings --with-judgehost_chrootdir=/srv/chroot/domjudge --with-judgehost_cgroupdir=/sys/fs/altcgroup
315+
run run_configure --enable-fhs --with-domserver_webappdir=/run/webapp --with-domserver_tmpdir=/tmp/domserver --with-judgehost_tmpdir=/srv/tmp --with-judgehost_judgedir=/srv/judgings --with-judgehost_chrootdir=/srv/chroot/domjudge
318316
assert_line " * prefix..............: /usr/local"
319317
assert_line " * documentation.......: /usr/local/share/doc/domjudge"
320318
assert_line " * domserver...........: "
@@ -343,13 +341,11 @@ compile_assertions_finished () {
343341
assert_line " - judge............: /srv/judgings"
344342
refute_line " - chroot...........: /chroot/domjudge"
345343
assert_line " - chroot...........: /srv/chroot/domjudge"
346-
refute_line " - cgroup...........: /sys/fs/cgroup"
347-
assert_line " - cgroup...........: /sys/fs/altcgroup"
348344
}
349345

350346
@test "Alternative dirs together with defaults" {
351347
setup
352-
run run_configure "--with-judgehost_tmpdir=/srv/tmp --with-judgehost_judgedir=/srv/judgings --with-judgehost_chrootdir=/srv/chroot --with-judgehost_cgroupdir=/sys/fs/altcgroup --with-domserver_logdir=/log"
348+
run run_configure "--with-judgehost_tmpdir=/srv/tmp --with-judgehost_judgedir=/srv/judgings --with-judgehost_chrootdir=/srv/chroot --with-domserver_logdir=/log"
353349
assert_line " * prefix..............: /opt/domjudge"
354350
assert_line " * documentation.......: /opt/domjudge/doc"
355351
assert_line " * domserver...........: /opt/domjudge/domserver"
@@ -362,8 +358,6 @@ compile_assertions_finished () {
362358
assert_line " - judge............: /srv/judgings"
363359
refute_line " - chroot...........: /chroot/domjudge"
364360
assert_line " - chroot...........: /srv/chroot"
365-
refute_line " - cgroup...........: /sys/fs/cgroup"
366-
assert_line " - cgroup...........: /sys/fs/altcgroup"
367361
}
368362

369363
@test "Default URL not set, docs mention" {

configure.ac

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,6 @@ if test "x$FHS_ENABLED" = xyes ; then
189189
AC_SUBST(judgehost_tmpdir, /tmp)
190190
AC_SUBST(judgehost_judgedir, $localstatedir/lib/${PACKAGE_TARNAME}/judgings)
191191
AC_SUBST(judgehost_chrootdir, /chroot/${PACKAGE_TARNAME})
192-
AC_SUBST(judgehost_cgroupdir, /sys/fs/cgroup)
193192
fi
194193

195194
AC_SUBST(domjudge_docdir, $docdir)
@@ -241,7 +240,6 @@ AX_PATH(judgehost_rundir, [$judgehost_root/run])
241240
AX_PATH(judgehost_tmpdir, [$judgehost_root/tmp])
242241
AX_PATH(judgehost_judgedir, [$judgehost_root/judgings])
243242
AX_PATH(judgehost_chrootdir, [/chroot/${PACKAGE_TARNAME}])
244-
AX_PATH(judgehost_cgroupdir, [/sys/fs/cgroup])
245243
fi
246244
AX_WITH_COMMENT(7,[ ])
247245

@@ -405,7 +403,6 @@ echo " - run..............: AX_VAR_EXPAND($judgehost_rundir)"
405403
echo " - tmp..............: AX_VAR_EXPAND($judgehost_tmpdir)"
406404
echo " - judge............: AX_VAR_EXPAND($judgehost_judgedir)"
407405
echo " - chroot...........: AX_VAR_EXPAND($judgehost_chrootdir)"
408-
echo " - cgroup...........: AX_VAR_EXPAND($judgehost_cgroupdir)"
409406
fi
410407
echo ""
411408
echo " * systemd unit files..: AX_VAR_EXPAND($systemd_unitdir)"

etc/judgehost-static.php.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ define('RUNDIR', '@judgehost_rundir@');
1616
define('TMPDIR', '@judgehost_tmpdir@');
1717
define('JUDGEDIR', '@judgehost_judgedir@');
1818
define('CHROOTDIR', '@judgehost_chrootdir@');
19-
define('CGROUPDIR', '@judgehost_cgroupdir@');
2019

2120
define('RUNUSER', '@RUNUSER@');
2221
define('RUNGROUP', '@RUNGROUP@');

judge/create_cgroups.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# (hence: not the 'domjudge-run' user!)
88

99
JUDGEHOSTUSER=@DOMJUDGE_USER@
10-
CGROUPBASE=@judgehost_cgroupdir@
10+
CGROUPBASE="/sys/fs/cgroup"
1111

1212
cgroup_error_and_usage () {
1313
echo "$1" >&2

paths.mk.in

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ judgehost_rundir = @judgehost_rundir@
103103
judgehost_tmpdir = @judgehost_tmpdir@
104104
judgehost_judgedir = @judgehost_judgedir@
105105
judgehost_chrootdir = @judgehost_chrootdir@
106-
judgehost_cgroupdir = @judgehost_cgroupdir@
107106

108107
domjudge_docdir = @domjudge_docdir@
109108

@@ -153,7 +152,6 @@ define substconfigvars
153152
-e 's,@judgehost_tmpdir[@],@judgehost_tmpdir@,g' \
154153
-e 's,@judgehost_judgedir[@],@judgehost_judgedir@,g' \
155154
-e 's,@judgehost_chrootdir[@],@judgehost_chrootdir@,g' \
156-
-e 's,@judgehost_cgroupdir[@],@judgehost_cgroupdir@,g' \
157155
-e 's,@domjudge_docdir[@],@domjudge_docdir@,g' \
158156
-e 's,@systemd_unitdir[@],@systemd_unitdir@,g' \
159157
-e 's,@DOMJUDGE_USER[@],@DOMJUDGE_USER@,g' \

0 commit comments

Comments
 (0)