[Pkg-systemd-maintainers] Bug#722521: Bug#722521: Fails to properly re-enable service on install-remove-install sequence

Michael Biebl biebl at debian.org
Fri Sep 27 23:06:51 BST 2013


Am 12.09.2013 00:41, schrieb Michael Biebl:
> Package: init-system-helpers
> Version: 1.8
> Severity: important
> 
> Hi Michael,
> 
> to reproduce the problem, do the following steps:
> 1/ apt-get install rsyslog
>    → symlinks are properly created
> # find systemd/ -name "*syslog*"
> systemd/system/multi-user.target.wants/rsyslog.service
> systemd/system/syslog.service
> 
> 2/ apt-get remove rsyslog
>    → symlinks are removed
> # apt-get remove rsyslog
> [..]
> rm '/etc/systemd/system/multi-user.target.wants/rsyslog.service'
> rm '/etc/systemd/system/syslog.service'
> 
> 3/ apt-get install rsyslog
>    → symlinks are not re-created
> 


So, I've tested this sequence today again, and this issue is not yet fully sorted. 
The latest i-s-h/dh-systemd release no longer runs disable on postrm/remove:

root at pluto:/etc# dpkg -r rsyslog
(Lese Datenbank ... 276158 Dateien und Verzeichnisse sind derzeit installiert.)
Entfernen von rsyslog ...
ln -s '/dev/null' '/etc/systemd/system/rsyslog.service'
root at pluto:/etc# ls -al /etc/systemd/system
system/      system.conf  
root at pluto:/etc# ls -al /etc/systemd/system/syslog.service /etc/systemd/system/multi-user.target.wants/rsyslog.service 
lrwxrwxrwx 1 root root 35 Sep 27 23:55 /etc/systemd/system/multi-user.target.wants/rsyslog.service -> /lib/systemd/system/rsyslog.service
lrwxrwxrwx 1 root root 35 Sep 27 23:55 /etc/systemd/system/syslog.service -> /lib/systemd/system/rsyslog.service


Those dangling symlinks are problematic, e.g. you can *not* install syslog-ng cleanly
and take over that symlink.

We currently only run "deb-systemd-helper disable" on purge, and no longer on
remove, I think this is how #722521 was "fixed".

Running "deb-systemd-helper disable" is problematic though, i.e. it
makes "deb-systemd-helper --quiet was-enabled" return "disabled".

# was-enabled defaults to true, so new installations run enable.
if deb-systemd-helper --quiet was-enabled rsyslog.service; then
        # Enables the unit on first installation, creates new
        # symlinks on upgrades if the unit file has changed.
        deb-systemd-helper enable rsyslog.service >/dev/null || true
else

As a consequence, we don't re-enable the service on 
dpkg -r && dpkg -i


I think we need to distinguish here between admin disabled (via systemctl disable) 
and disabled by d-s-h.

This needs further discussion, how we address this.

Should I re-open this bug report or file a new one?

Michael
-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 901 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20130928/f12095d4/attachment-0002.sig>


More information about the Pkg-systemd-maintainers mailing list