Package: debhelper
Version: 13.9.1
Severity: normal
X-Debbugs-Cc: pkg-systemd-maintain...@lists.alioth.debian.org

dh_installsystemd currently creates a maintscript code to mask/unmask any
type of unit files (.service, .socket, .timer, etc) if a package is
removed/(re)installed.

The masking/unmasking is currently done as packages unfortunately still
ship SysV init scripts along side native unit files and as SysV init
scripts are typically conffiles, they are not removed on uninstall.
So unless the package is purged systemd-sysv-generator will now see a
SysV init script and generate a corresponding runtime unit for it.

Ideally, we would not have to manually create those masks.
At least we shouldn't do it for non-service units as this can lead to
failures e.g. when socket units that are used in a service are still
masked.

Example:
# apt install -y systemd-oomd; apt remove -y systemd-oomd; apt install -y 
systemd-oomd
...
Setting up systemd-oomd (251.4-3) ...
Failed to restart systemd-oomd.service: Unit systemd-oomd.socket is masked.
Could not execute systemctl:  at /usr/bin/deb-systemd-invoke line 145.


dh_installsystemd should probably create two lists:
#UNITFILES# and #SERVICEFILES#
and the autoscripts for systemd doing the mask/unmask should only
operate on #SERVICEFILES#

There's the problem of existing masks, so we will probably need to
create the unmask code in postinst for #UNITFILES# at least for a while
longer.

Michael




-- System Information:
Debian Release: bookworm/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (200, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.19.0-2-amd64 (SMP w/4 CPU threads; PREEMPT)
Kernel taint flags: TAINT_FIRMWARE_WORKAROUND
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages debhelper depends on:
ii  autotools-dev            20220109.1
ii  dh-autoreconf            20
ii  dh-strip-nondeterminism  1.13.0-1
ii  dpkg                     1.21.9
ii  dpkg-dev                 1.21.9
ii  dwz                      0.14+20220924-2
ii  file                     1:5.41-4
ii  libdebhelper-perl        13.9.1
ii  libdpkg-perl             1.21.9
ii  man-db                   2.10.2-3
ii  perl                     5.34.0-5
ii  po-debconf               1.0.21+nmu1

debhelper recommends no packages.

Versions of packages debhelper suggests:
ii  dh-make  2.202203

-- no debconf information

Reply via email to