Bug#1051085: dpkg: dpkg-db-backup.timer stopped after upgrades

2023-09-02 Thread Guillem Jover
Hi!

On Sat, 2023-09-02 at 16:43:57 +0200, Sven Joachim wrote:
> Package: dpkg
> Version: 1.22.0
> Severity: normal

> Upgrading dpkg stops the dpkg-db-backup.timer, which seems rather
> undesirable, as it the timer remains inactive until the next reboot or
> until it is started manually:
[…]

Ah! Nice catch.

> It seems to me that commit 64a648e7db91 ("debian: Do not start the
> dpkg-db-backup timer during installation") was wrong.  Surely, it
> avoids the "dpkg-db-backup.service is a disabled or a static unit
> not running, not starting it." notice during upgrades, but the timer
> (not the service!) should still be (re-)started.

I considered adding also --no-stop-on-upgrade, but due to #932360 that
seemed bad, and afterwards for some reason thought the stop case was
needed for purge, but rechecking now that's handled by the
«deb-systemd-helper purge» action.

So I've locally added the option, and manual daemon-reload, and will
also add a temporary fixup for the start of the timer for that
specific version.

Thanks,
Guillem



Bug#1051085: dpkg: dpkg-db-backup.timer stopped after upgrades

2023-09-02 Thread Sven Joachim
Package: dpkg
Version: 1.22.0
Severity: normal

Upgrading dpkg stops the dpkg-db-backup.timer, which seems rather
undesirable, as it the timer remains inactive until the next reboot or
until it is started manually:

,
| $ systemctl status dpkg-db-backup.timer 
| ● dpkg-db-backup.timer - Daily dpkg database backup timer
|  Loaded: loaded (/lib/systemd/system/dpkg-db-backup.timer; enabled; 
preset: enabled)
|  Active: active (waiting) since Sat 2023-09-02 13:42:29 CEST; 2h 39min ago
| Trigger: Sun 2023-09-03 00:00:00 CEST; 7h left
|Triggers: ● dpkg-db-backup.service
|Docs: man:dpkg(1)
| 
| Sep 02 13:42:29 turtle systemd[1]: Started dpkg-db-backup.timer - Daily dpkg 
database backup timer.
| $ sudo apt install --reinstall dpkg
| [...]
| $ systemctl status dpkg-db-backup.timer
| ○ dpkg-db-backup.timer - Daily dpkg database backup timer
|  Loaded: loaded (/lib/systemd/system/dpkg-db-backup.timer; enabled; 
preset: enabled)
|  Active: inactive (dead) since Sat 2023-09-02 16:22:46 CEST; 11s ago
|Duration: 2h 40min 16.665s
| Trigger: n/a
|Triggers: ● dpkg-db-backup.service
|Docs: man:dpkg(1)
|
| Sep 02 13:42:29 turtle systemd[1]: Started dpkg-db-backup.timer - Daily dpkg 
database backup timer.
| Sep 02 16:22:46 turtle systemd[1]: dpkg-db-backup.timer: Deactivated 
successfully.
| Sep 02 16:22:46 turtle systemd[1]: Stopped dpkg-db-backup.timer - Daily dpkg 
database backup timer.
`

It seems to me that commit 64a648e7db91 ("debian: Do not start the
dpkg-db-backup timer during installation") was wrong.  Surely, it
avoids the "dpkg-db-backup.service is a disabled or a static unit
not running, not starting it." notice during upgrades, but the timer
(not the service!) should still be (re-)started.


-- System Information:
Debian Release: trixie/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (101, 'experimental')
merged-usr: no
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.5.1-nouveau (SMP w/2 CPU threads; PREEMPT)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages dpkg depends on:
ii  libbz2-1.0   1.0.8-5+b1
ii  libc62.37-7
ii  liblzma5 5.4.4-0.1
ii  libmd0   1.1.0-1
ii  libselinux1  3.5-1
ii  libzstd1 1.5.5+dfsg2-1
ii  tar  1.34+dfsg-1.2
ii  zlib1g   1:1.2.13.dfsg-3

dpkg recommends no packages.

Versions of packages dpkg suggests:
ii  apt2.7.3
pn  debsig-verify  

-- no debconf information