#769895 init-system-helpers: deb-systemd-helper should remove timestamps on timer unit purge

Package:
init-system-helpers
Source:
init-system-helpers
Submitter:
Alexandre Detiste
Date:
2023-06-03 14:15:04 UTC
Severity:
minor
Tags:
#769895#5
Date:
2014-11-17 11:46:38 UTC
From:
To:
Dear Maintainer,

When a timer unit with flag "Persistant=true" is purged,
a loose time stamp (0 byte file) is left loose
in /var/lib/systemd/timers/stamp-<unit-name>.timer

This file could be safely removed by deb-systemd-helper during a purge.

I'm allready doing it manually in a postrm script:

http://anonscm.debian.org/cgit/collab-maint/systemd-cron.git/tree/debian/postrm

Alexandre Detiste

#769895#10
Date:
2016-12-20 12:46:38 UTC
From:
To:
Control: forwarded -1 https://github.com/systemd/systemd/issues/4930

I'd really rather not rely on implementation details. I have forwarded
the bug to systemd upstream so they provide an interface to clear the
stamp files. When that is done, we can add that invocation in
deb-systemd-helper.

Saludos

#769895#19
Date:
2020-07-04 18:06:49 UTC
From:
To:
Hi Felipe

On Tue, 20 Dec 2016 09:46:38 -0300 Felipe Sateler <fsateler@debian.org> wrote:
Should we simply run that unconditionally on deb-systemd-helper purge?
For all unit types or only timers?

I also note, that this apparently doesn't work in chroots:
# systemctl clean apt-daily.timer
Running in chroot, ignoring request: clean

Not sure if this is something we should be concerned about.

Regards,
Michael

#769895#24
Date:
2020-07-18 18:41:03 UTC
From:
To:
Hi Michael,

Sorry for the delay, I forgot to actually send :(

Maybe we could just have a trigger in systemd?


Bummer, but I don't think it is too important. After all, chroots wouldn't
have run systemd in the first place, and thus wouldn't have the file.


I don't think it is too important. After all, this is mostly a nice to have.

Saludos

#769895#29
Date:
2023-06-03 14:12:47 UTC
From:
To:
Hi,

Some functionality has since been implemented upstream in systemd
(namely "systemd clean") but I can't get to work.

https://github.com/systemd/systemd/issues/4930
https://github.com/systemd/systemd/commit/89f6fe7b303875307e201449d9d821cdbb9eacac

How to reproduce:

install for example "apt-show-versions", let it's .timer run, purge the package,
then a loose "/var/lib/systemd/timers/stamp-apt-show-versions.timer" remains.

Greetings,