Debian Bug report logs - #1022884
apt: apt.systemd.daily ignores Dir::State

version graph

Package: apt; Maintainer for apt is APT Development Team <[email protected]>; Source for apt is src:apt (PTS, buildd, popcon).

Reported by: Martin Schmitt <[email protected]>

Date: Thu, 27 Oct 2022 10:27:02 UTC

Severity: minor

Found in version apt/2.5.3

Reply or subscribe to this bug.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to [email protected], APT Development Team <[email protected]>:
Bug#1022884; Package apt. (Thu, 27 Oct 2022 10:27:04 GMT) (full text, mbox, link).


Acknowledgement sent to Martin Schmitt <[email protected]>:
New Bug report received and forwarded. Copy sent to APT Development Team <[email protected]>. (Thu, 27 Oct 2022 10:27:04 GMT) (full text, mbox, link).


Message #5 received at [email protected] (full text, mbox, reply):

From: Martin Schmitt <[email protected]>
To: [email protected]
Subject: apt: apt.systemd.daily ignores Dir::State
Date: Thu, 27 Oct 2022 12:17:50 +0200
Package: apt
Version: 2.5.3+b1
Severity: minor

We're maintaining an alternative unattended-upgrades cycle for a single
internal APT source and while implementing it, we discovered the 
following
in /usr/lib/apt/apt.systemd.daily:

Near the beginning of main(), the script finds the value of the APT
configuration option "Dir::State" to create its lock file:

eval $(apt-config shell StateDir Dir::State/d)

However, the default value for Dir::State, /var/lib/apt, is hardcoded
throughout the entire script:

$ grep var.lib.apt /usr/lib/apt/apt.systemd.daily
    BACKUP_ARCHIVE_STAMP=/var/lib/apt/periodic/backup-archive-stamp
if test -r /var/lib/apt/extended_states; then
	if ! cmp -s apt.extended_states.0 /var/lib/apt/extended_states; then
	    cp -p /var/lib/apt/extended_states apt.extended_states
    UPDATE_STAMP=/var/lib/apt/periodic/update-stamp
    
DOWNLOAD_UPGRADEABLE_STAMP=/var/lib/apt/periodic/download-upgradeable-stamp
    UPGRADE_STAMP=/var/lib/apt/periodic/upgrade-stamp
    CLEAN_STAMP=/var/lib/apt/periodic/clean-stamp
    AUTOCLEAN_STAMP=/var/lib/apt/periodic/autoclean-stamp

This is especially irritating because /usr/bin/unattended-upgrade, which 
is
executed from /usr/lib/apt/apt.systemd.daily does obey the configuration
from Dir::State and even creates its own "periodic" sub directory there.

We ultimately found that changing Dir::State was not required for what 
we
did, nevertheless I'm reporting this as a minor bug.



Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Mon Nov 11 13:30:19 2024; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.