Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.bugs.dist > #1107962
| From | Guilhem Moulin <guilhem@debian.org> |
|---|---|
| Newsgroups | linux.debian.bugs.dist |
| Subject | Bug#1013969: debhelper: dh_installtmpfiles(1) postinst snippets should run without /run/systemd/system |
| Date | 2022-06-28 11:30 +0200 |
| Message-ID | <EDfHH-7Ldo-5@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
Package: debhelper
Version: 13.7.1
Severity: wishlist
Dear Maintainer,
The roundcube packages ships a temporary directory which is cleaned via
cronjobs and which I'd like to define via tmpfiles.d(5) instead.
debhelper 13.7.1 adds the following snippet to the postinst script:
# Automatically added by dh_installtmpfiles/13.7.1
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
# In case this system is running systemd, we need to ensure that all
# necessary tmpfiles (if any) are created before starting.
if [ -z "${DPKG_ROOT:-}" ] && [ -d /run/systemd/system ] ; then
systemd-tmpfiles --create roundcube.conf >/dev/null || true
fi
fi
# End automatically added section
So this is a no-op unless PID1 is systemd, which is indeed documented in
dh_installtmpfiles(1):
debian/package.tmpfiles
[…] Note that the "tmpfiles.d" mechanism is currently only used by systemd.
I personally don't really mind the ‘Depends: systemd’, but this breaks
DEP-8 tests in shallow isolation levels.
It seems the snippet guard could be relaxed somewhat: systemd ≥249.3-2
provides systemd-standalone-tmpfiles which ships /bin/systemd-tmpfiles,
and with ‘Depends: systemd-standalone-tmpfiles | systemd’ I was able to
fix the autopkgtest by unconditionally calling `systemd-tmpfiles --create roundcube.conf >/dev/null || true`
in the postinst.
Wouldn't it make sense to replace the guard with `command -v systemd-tmpfiles`
so the command is run whenever systemd-tmpfiles(8) exists? This appears
to work regardless of whether it's shipped by systemd or systemd-standalone-tmpfiles,
even when /run/systemd/system doesn't exist (such as in a minimal chroot).
Thanks for maintaining debhelper!
--
Guilhem.
Back to linux.debian.bugs.dist | Previous | Next | Find similar | Unroll thread
Bug#1013969: debhelper: dh_installtmpfiles(1) postinst snippets should run without /run/systemd/system Guilhem Moulin <guilhem@debian.org> - 2022-06-28 11:30 +0200
csiph-web