#935939 Make /etc/sv/{name}/supervise symlinks behave as conffiles

Package:
dh-runit
Source:
dh-runit
Submitter:
Michael Biebl
Date:
2022-07-04 10:09:06 UTC
Severity:
wishlist
Tags:
#935939#5
Date:
2019-08-28 07:42:31 UTC
From:
To:
Since I have no use for runit, I removed the /etc/sv directory.
Unfortunately, if the openssh-server package is upgraded (or
reinstalled), the local admin choice is not respected and the files in
/etc/sv are recreated.
I have no idea if this is a bug in openssh-server or runit, please
reassign as necessary. Filed against openssh-server, since it is the
package exposing this behaviour.

#935939#10
Date:
2019-08-28 09:52:44 UTC
From:
To:
Control: reassign -1 dh-runit
Control: affects -1 openssh-server

There's no maintainer script code (generated or otherwise) pertaining to
/etc/sv; most of the files in there are just dpkg-handled conffiles.
And it's not quite true that the files are recreated - the conffiles
aren't.

The exceptions are /etc/sv/ssh/supervise and /etc/sv/ssh/log/supervise,
which are symlinks to /var/lib/runit/supervise/ssh and
/var/lib/runit/log/supervise/ssh respectively, and those do get
reinstalled.  Symlinks can't really be conffiles, but perhaps this could
be done using generated maintainer script code or in runit-helper?
Reassigning to dh-runit, anyway, since there isn't much I can do about
this in openssh-server at present.

Empty directories also come back no matter what you do, so even after
fixing this, /etc/sv/ssh/.meta and /etc/sv/ssh/log would still come
back.  But that's something you'd need to bring up with the dpkg
maintainers; I don't know whether they'd consider it a bug.

#935939#21
Date:
2019-08-28 10:40:21 UTC
From:
To:
Am 28.08.19 um 11:52 schrieb Colin Watson:

Urgh, that's ugly. Please consider creating those directories
dynamically then and don't ship them in the package.

#935939#26
Date:
2019-08-28 12:27:26 UTC
From:
To:
This would have to be done by dh-runit; I'm not willing to put
significant effort into the packaging (essentially bypassing dh-runit
entirely and doing it myself), for an init system I don't use myself,
just in order to avoid a couple of cosmetic directory creations.

#935939#31
Date:
2019-08-28 19:36:18 UTC
From:
To:
Hi Michael,

This is the directory that contains runit services; openssh-server
is also shipping a /etc/init.d and a /lib/systemd/system directories.
Do you consider a bug the fact that, if I'm going to remove the
/etc/init.d directory because I don't use sysv,
it will be recreated on upgrade?

I suspect as long as Debian keep supporting more than one init we all
have to live with files we don't use.

It's not possible for /etc/sv/ssh/log as it's the directory of the
appendant log service

About /etc/sv/ssh/.meta, maybe you can have a look at

https://salsa.debian.org/debian/init-system-helpers/merge_requests/10

and help figuring out an alternative solution, if it exists.
Preserving local admin choices about enabled/disabled
services is also a job for `update-rc.d`.

Lorenzo

#935939#36
Date:
2019-08-29 15:22:50 UTC
From:
To:
control: severity -1 wishlist
control: tags -1 +confirmed
control: retitle -1 Make /etc/sv/{name}/supervise symlinks behave as conffiles

[2019-08-28 12:40] Michael Biebl <biebl@debian.org>

Wontfix. This is normal behaviour, as pointed by Colin. See:

	$ dpkg -L w3m | grep etc/
	/etc/w3m
	/etc/w3m/config
	/etc/w3m/mailcap
	$ find /etc | grep w3m
	/etc/w3m
	/etc/w3m/mailcap
	/etc/w3m/config
	$ sudo rm -r /etc/w3m
	$ find /etc | grep w3m
	$ sudo dpkg -i /tmp/w3m_0.5.3-37+b1_amd64.deb
	[...]
	$ find /etc|grep w3m
	/etc/w3m

Directory comes back. Maybe it should be addressed in dpkg.

By the way, init-system-helpers behave in same way -- I can `rm -fr
/etc/systemd', but after re-installation `/etc/systemd/system' comes
back.

I find this issue cosmetic, but if it is important to you, use
/etc/dpkg/dpkg.cfg.d/excludes.

Colin Watson <cjwatson@debian.org>

AFAIK, Policy does not forbid shipping non-conffiles into /etc. Some
other packages do so as well, e.g /etc/os-release and /etc/mysql/my.cf
just to name a few.

So, once we admit that `/etc/sv/openssh-server/supervise' is not
conffile, behaviour described by submitter is perfectly logical.

I agree that it would be great if it was conffile, so I do not wontfix
the bug for now. I will ask dpkg maintainers on possiblity of marking
symlinks as conffiles.

#935939#47
Date:
2021-10-09 10:12:24 UTC
From:
To:
Control: tags -1 moreinfo


Hi Michael,

I'm considering an option to ship runit services somewhere else
in the filesystem, likely under /usr/share/runit/sv/, and then copy the
whole service directory into /etc/ during install or upgrade of the
package, but only in systems where runit is installed.

Would you be satisfied with such solution?


Regards,
Lorenzo

#935939#52
Date:
2022-06-20 01:29:27 UTC
From:
To:
Hello,

Bug #935939 in dh-runit reported by you has been fixed in the
Git repository and is awaiting an upload. You can see the commit
message below and you can check the diff of the fix at:

https://salsa.debian.org/debian/dh-runit/-/commit/3daa0c34ececb070ee1ef51dc86fd63cb7dea772
------------------------------------------------------------------------
Create supervise links at runtime

Create supervise symlinks during postinstall with runit-helper:
 * links are created only when runit package is installed, by
   invoking /lib/runit/make_svlinks when it's available
 * make_svlinks does not override local admin choice: if a supervise
   directory already exists, it is left as is, preserving ownership
   and mode.

Closes: #935939
------------------------------------------------------------------------

(this message was generated automatically)
-- 
Greetings

https://bugs.debian.org/935939

#935939#59
Date:
2022-07-04 10:05:08 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
dh-runit, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 935939@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Lorenzo Puliti <plorenzo@disroot.org> (supplier of updated dh-runit package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Sat, 02 Jul 2022 12:09:54 +0200
Source: dh-runit
Architecture: source
Version: 2.14.0
Distribution: experimental
Urgency: medium
Maintainer: Lorenzo Puliti <plorenzo@disroot.org>
Changed-By: Lorenzo Puliti <plorenzo@disroot.org>
Closes: 935939 942053
Changes:
 dh-runit (2.14.0) experimental; urgency=medium
 .
   * Stop creating supervise links as part of
      the deb package (Closes: #942053)
   * Create supervise links at runtime with make_svlinks,
      but only when runit package is installed
      (Closes: #935939)
   * Use finish-exec instead of finish-default
   * Bump minimal required version of runit and runit-helper
   * Do not install the log service with usr option
   * Error when log service already exists and logscript
      option is given
   * Update testsuite
   * Temporary disable ghc testsuite, libghc-shake-dev
      is not installable in Sid
Checksums-Sha1:
 7bc4056dde70ac22c6bf6cfd91870cd98079641f 1731 dh-runit_2.14.0.dsc
 5dbb0c69393cded32b8292e7b8b86c33ea445537 16788 dh-runit_2.14.0.tar.xz
 eeeac587192065eaa621635bcbac5dd14707c841 5876 dh-runit_2.14.0_source.buildinfo
Checksums-Sha256:
 e49dd2f83153bd7413e718210f68e7d1dcc1d5128b73dc4559a5566d882f3c6f 1731 dh-runit_2.14.0.dsc
 f386e3a53c18f9be42f2561075eca7d5f5c12e91d5773bf63c1a0d3d4dae2662 16788 dh-runit_2.14.0.tar.xz
 ed601c1f8b218261a86afcaffbc649053527e65fed1c124ef6a89a52b1771e9c 5876 dh-runit_2.14.0_source.buildinfo
Files:
 ebc6624de3fe2601fb221642239b8811 1731 admin optional dh-runit_2.14.0.dsc
 f3be72f11982f6665fae55ee07c16cc5 16788 admin optional dh-runit_2.14.0.tar.xz
 d6b9d6fd70cbb49e23c0df32f79e7891 5876 admin optional dh-runit_2.14.0_source.buildinfo
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEkjZVexcMh/iCHArDweDZLphvfH4FAmLCuHkACgkQweDZLphv
fH7flw//VQnV74GQXAvg4U4bTHhuv8BLphtm4i1IugR5Ew6VTEC+NTUnzOr+aoRf
Oje/mlMcBPg3D13vHmi3jF8jl1G/V3sLUIJNLvk53kQGXGnv7prB+DAc2Ztlh0vZ
ByUFMT58s8LycW7kEt+gNcpyk21YlHji80JDPB/uLOjVFlEcwCAM2u70IP+I1i0B
0e1QLDvn6MXCJzjyhKSeIhQN1QSYTEjG7iTHs0hVSMdHBev+rSp7inqITnQKg5lm
j5tcMPvqLKY2GsYNl6K+yMca50ZlWjOnGfqNIxLkufr0K7V83OxCuDqF+Q5EFBHO
QkUArm7YCRZsRtW3NHg2YWMhXw9MRFwwTXif1enSB5atPBBxjLUJiA8JhYnZEj7q
aumbPJY0dJHK1DXJCC+t4/PgYWpQnYljxOYyINO42o0OQcFxNT1BmGzL6ZAMzuOW
3+vEyE1Np0GwEpp+9YdvITY+iAoDVhiRbyNcrMIYXh+RJ3dpovA+CTHlvBCPb0XR
WJhrk/OgyU8VHrNI50ZygxPGB2LJKtWyhPRDSIPUsvdTR7Mkj8hzcYGjir4JHgaJ
BwlFzJcZnCJAgcFsGatS7e7AokDbxVSYG9A4S4AVt1G9YQCgbFlwzuTqskj1iQVD
J7lGjKViBq3AOOcbZdmzwgdd1qyDVbsNTn1AAPp3plN0cffUGko=
=UBIY
-----END PGP SIGNATURE-----