control: tags -1 +patch
[2019-08-19 15:21] Lorenzo Puliti <[email protected]> > Package: dh-runit > Version: 2.8.13.2 > Followup-For: Bug #934500 > > The patch for 'update-service' is attached > > > From 200a8e68089a30177798e1e5f5e6c6def45fef64 Mon Sep 17 00:00:00 2001 > From: Lorenzo Puliti <[email protected]> > Date: Mon, 19 Aug 2019 14:58:38 +0200 > Subject: [PATCH] update-service: move supervise directories in tmpfs > > Move log and service's supervise directories under /run/ > tmpfs (they were in /var/ previously) > --- > debian/contrib/update-service | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/debian/contrib/update-service b/debian/contrib/update-service > index 7e72501..83f0ff8 100644 > --- a/debian/contrib/update-service > +++ b/debian/contrib/update-service > @@ -63,11 +63,11 @@ case "$opt" in > if test "${svdir#/etc/}" != "$svdir"; then > if test ! -h "$svdir"/supervise; then > rm -rf "$svdir"/supervise > - ln -s /var/lib/runit/supervise/"$sv" "$svdir"/supervise > + ln -s /run/runit/supervise/"$sv" "$svdir"/supervise Will it handle both /var/lib and /run/runit location? I expect this change of supervise location to propagate as packages are rebuilt with new dh-runit, so for some time there will be packages that use old location and packages that use new location. > [...] And here is my patch for dh_runit. Since libghc-shake-dev is still in transition, I think of temporary disabling testsuite and uploading next weekend. From 372f39c6d8bb05551a0910a7bf62f3d6cd6bc050 Mon Sep 17 00:00:00 2001 From: Dmitry Bogatov <[email protected]> Date: Tue, 20 Aug 2019 03:19:01 +0000 Subject: [PATCH] Move supervise directories of generated packages to tmpfs * dh_runit: make /etc/sv/<foo>/supervise link to /run/runit/supervise/<foo>. Link is dangling, runsv(8) will create its target at runtime. * t/checks/924903/check: remove test about permissions of generated supervise directory. Closes: #934500 --- dh_runit | 10 ++-------- t/checks/924903/check | 8 +------- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/dh_runit b/dh_runit index 9825a4d..03efc79 100755 --- a/dh_runit +++ b/dh_runit @@ -122,10 +122,7 @@ PKG: foreach my $pkg (@{$dh{DOPACKAGES}}) { # Unfortunately, dh_fixperms does not handle executable bit here. ensure_executable("$sv_dir/$name"); } - make_symlink("/etc/sv/$name/supervise", - "/var/lib/runit/supervise/$name", $tmp); - install_dir("$tmp/var/lib/runit/supervise/$name"); - chmod 0700, "$tmp/var/lib/runit/supervise/$name"; + make_symlink("/etc/sv/$name/supervise", "/run/runit/supervise/$name", $tmp); install_dir("$tmp/etc/runit/runsvdir/default"); my $substitutions = { @@ -146,10 +143,7 @@ PKG: foreach my $pkg (@{$dh{DOPACKAGES}}) { template_from_data_directory('logscript', "$sv_dir/$name/log/run", { logdir => $logdir }, 0755); - make_symlink("/etc/sv/$name/log/supervise", - "/var/lib/runit/log/supervise/$name", $tmp); - install_dir("$tmp/var/lib/runit/log/supervise/$name"); - chmod 0700, "$tmp/var/lib/runit/log/supervise/$name"; + make_symlink("/etc/sv/$name/log/supervise", "/run/runit/supervise/$name.log", $tmp); } } # runit=2.1.2-20 introduced 'runit-log' user diff --git a/t/checks/924903/check b/t/checks/924903/check index e2e9fa4..ec2aeff 100644 --- a/t/checks/924903/check +++ b/t/checks/924903/check @@ -1,14 +1,8 @@ #!/usr/bin/perl use strict; use warnings; -use Test::More tests => 3; +use Test::More tests => 1; use File::stat; -my $path = 'debian/dh-runit-test/var/lib/runit/supervise/test'; -ok(-d $path, 'supervise directory correctly created'); -my $info = stat($path); -my $mode = sprintf("%o", $info->mode & 0777); -is($mode, '700', 'supervise directory have conservative permissions'); - my $noreplace = 'debian/dh-runit-test/var/lib/runit/noreplace/test'; ok(!-f $noreplace, 'noreplace file is correctly absent'); -- Note, that I send and fetch email in batch, once in a few days. Please, mention in body of your reply when you add or remove recepients.

