#690051 symlink-conffiles: dpkg stores md5sum of target file in its database and does not update it on upgrades

Package:
dpkg
Source:
dpkg
Description:
Debian package management system
Submitter:
Andreas Beckmann
Date:
2015-11-22 15:57:10 UTC
Severity:
normal
#690051#5
Date:
2012-10-09 14:12:16 UTC
From:
To:
Hi,

the syslog-ng-core is one of the few packages using symlink conffiles,
causing trouble for piuparts and debsums because dpkg does not properly
handle this. There are several other issues with symlink-conffiles, but
none seemed to match this.

The following files are shipped by the syslog-ng-core package in sid:
lrwxrwxrwx 1 root root  37 Oct  3 15:49 /etc/systemd/system/multi-user.target.wants/syslog-ng.service -> /lib/systemd/system/syslog-ng.service
lrwxrwxrwx 1 root root  37 Oct  3 15:49 /etc/systemd/system/syslog.service -> /lib/systemd/system/syslog-ng.service
-rw-r--r-- 1 root root 251 Oct  3 15:49 /lib/systemd/system/syslog-ng.service

The symlinks in /etc/ are conffiles.

And syslog-ng.service is having these md5sums:
3933398f3e6cf91d25e515977876208b  /lib/systemd/system/syslog-ng.service  <== 3.3.6-1, sid
41541800d349863ddd9f4279211ec4b3  /lib/systemd/system/syslog-ng.service  <== 3.3.5-2, wheezy

dpkg -s syslog-ng-core  (relevant parts extracted)

# fresh installation on wheezy:
Package: syslog-ng-core
Version: 3.3.5-2
Conffiles:
 /etc/systemd/system/multi-user.target.wants/syslog-ng.service 41541800d349863ddd9f4279211ec4b3
 /etc/systemd/system/syslog.service 41541800d349863ddd9f4279211ec4b3

# fresh installation on sid:
Package: syslog-ng-core
Version: 3.3.6-1
Conffiles:
 /etc/systemd/system/multi-user.target.wants/syslog-ng.service 3933398f3e6cf91d25e515977876208b
 /etc/systemd/system/syslog.service 3933398f3e6cf91d25e515977876208b

# fresh installation on wheezy and distupgrade to sid:
Package: syslog-ng-core
Version: 3.3.6-1
Conffiles:
 /etc/systemd/system/multi-user.target.wants/syslog-ng.service 41541800d349863ddd9f4279211ec4b3
 /etc/systemd/system/syslog.service 41541800d349863ddd9f4279211ec4b3

The md5sum for the symlink-conffiles does not get updated during package
upgrades - the link itself does not change, but the link target (that
was hashed and is not a conffile in this example) has been updated.
And of course debsums claims there are modified conffiles ...


Andreas

#690051#12
Date:
2012-10-09 15:10:00 UTC
From:
To:
Hi!

symlink conffiles have never been supported, packages using that are
buggy and should be fixed (see also 421344 and 312846).

I guess there's something to be said about symlinked configuration
shipped in /lib, but in any case the above is just wrong and goes
against the current system.

Well, once this is natively supported by dpkg, what would be stored
would be the target of the symlink not its hash. The conffile prompt
interface would need to be adapted to show the difference in symlink
targets, etc.

thanks,
guillem

#690051#27
Date:
2012-10-09 16:07:22 UTC
From:
To:
Control: clone -1 -2
Control: reassign -2 syslog-ng-core 3.3.5-2
Control: found -2 3.3.6-1
Control: severity -2 serious
Control: retitle -2 symlink conffiles are not supported, causing problems for dpkg on upgrade/removal and incorrect debsums reports

Thanks for this clarification. No need to patch debsums to just ignore
symlink-conffiles :-)
Cloning and reassigning to syslog-ng.

Andreas