• Re: Re: remark related about package removal on bookworm providing a sy

    From Greg Wooledge@21:1/5 to Patrice Duroux on Tue Jan 28 20:00:01 2025
    On Tue, Jan 28, 2025 at 19:07:51 +0100, Patrice Duroux wrote:
    Of course, maybe I misspoke but my point wasn't about the configuration files remaining as expected just removing the package and not purging it. It is about
    the broken symlink to its service file which is for sure no more present whatever a removal or a purge. Or is such a symlink considered as part of configuration files? I don't think so, but I might be wrong.

    The question is about this dangling symlink:

    hobbit:/etc/systemd/system$ ls -l dbus-org.freedesktop.timesync1.service lrwxrwxrwx 1 root root 45 Feb 17 2024 dbus-org.freedesktop.timesync1.service -> /lib/systemd/system/systemd-timesyncd.service
    hobbit:/etc/systemd/system$ ls -lL dbus-org.freedesktop.timesync1.service
    ls: cannot access 'dbus-org.freedesktop.timesync1.service': No such file or directory

    This symlink is not part of the package's inventory:

    hobbit:~$ dpkg -l systemd-timesyncd | tail -n1
    rc systemd-timesyncd 252.22-1~deb12u1 amd64 minimalistic service to synchronize local time with NTP servers
    hobbit:~$ dpkg -L systemd-timesyncd
    /etc
    /etc/dhcp
    /etc/dhcp/dhclient-exit-hooks.d
    /etc/dhcp/dhclient-exit-hooks.d/timesyncd
    /etc/systemd
    /etc/systemd/timesyncd.conf

    I'm unclear on exactly how this symlink gets created. (If I still had
    the package installed, I would look at the postinst script and so on,
    but since I've removed the package, that's more difficult. Also, <http://packages.debian.org/systemd-timesyncd> is not responding at
    the moment.)

    As far as I can tell, the dangling symlink is not doing any harm.
    Therefore, I've never felt any need to investigate it.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Greg Wooledge@21:1/5 to Jeffrey Walton on Wed Jan 29 13:40:01 2025
    On Wed, Jan 29, 2025 at 02:18:23 -0500, Jeffrey Walton wrote:
    Some old programs use non-existent symlinks to store or persist state information rather than create a normal file. But I don't believe
    systemd uses the technique.

    Not on purpose, but systemd does use symbolic links to store state
    information, and if those links become dangling due to the removal of
    their target, then you get the same effect in the end.

    hobbit:~$ systemctl is-enabled dbus-org.freedesktop.timesync1.service
    Failed to get unit file state for dbus-org.freedesktop.timesync1.service: Link has been severed

    As was pointed out earlier in this thread, the dbus-org.freedesktop.timesync1.service symlink is a service name alias
    for systemd-timesyncd.service. I have no idea *why* this alias was
    desired, but that's apparently what it is.

    When the systemd-timesyncd package is removed, that alias symlink is
    left behind. It doesn't do anything, so it's probably safe to remove
    it. On the other hand, it doesn't do anything, so it's definitely
    safe to leave it alone.

    If the systemd-timesyncd package were to be reinstalled, then this alias
    would work again.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)