Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter conffiles to exclude possible remove-on-upgrade flags before invoking tar #373

Open
farblos opened this issue Dec 17, 2024 · 1 comment

Comments

@farblos
Copy link

farblos commented Dec 17, 2024

I'm on Debian testing with

[~]$ aptitude show unattended-upgrades | grep Version
Version: 2.11+nmu1

Some while ago I filed Debian bug #1051992 against wpasupplicant. Today I hit the same symptom while upgrading pulseaudio. Due to its nature it is hard to reproduce plus it does not seem to leave any traces in any log files, but probably I can convince you to have look at this, anyway.

To restate the main symptom from above bug, I get the following message on (presumably) STDERR when invoking unattended-upgrades manually:

[~]$ sudo unattended-upgrade  
[sudo] password for farblos: 
tar: .remove-on-upgrade /etc/dbus-1/system.d/wpa_supplicant.conf: Not found in archive
tar: Exiting with failure status due to previous errors

The reason seems to be as follows:

  • Function get_md5sum_for_file_in_deb calls tar to extract a conf file from a Debian package.
  • However, that function (or its callers) do not seem to consider the case that a conffile entry from <package>.conffiles may be preceeded by a remove-on-upgrade (or any other flag, see deb-conffiles(5)) and, hence tar errors out with the described error.
@farblos
Copy link
Author

farblos commented Dec 18, 2024

Minor correction:

... it does not seem to leave any traces in any log files, ...

This is actually not true: At least on my system I can see past traces of this in the journal through apt-daily-upgrade.service:

[ 1216.334075] host01 systemd[1]: Starting apt-daily-upgrade.service - Daily apt upgrade and clean activities...
[ 1222.458546] host01 apt.systemd.daily[2564]: tar: .remove-on-upgrade /etc/dbus-1/system.d/pulseaudio-system.conf: Not found in archive
[ 1222.458546] host01 apt.systemd.daily[2564]: tar: Exiting with failure status due to previous errors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant