Package: debsums
Version: 2.0.52+nmu2
Severity: important
Tags: patch

Hi,

here are the steps to reproduce the problem:

1. Let some package to be installed for several architectures (eg. 
libssl1.0.0:amd64 and libssl1.0.0:i386)

2. Replace any file mentioned in *.md5sums (eg. replace 
/usr/lib/x86_64-linux-gnu/libssl.so.1.0.0)

3. Try to run 
$ debsums -c libssl1.0.0
nothing would be shown, although one file has been changed

Seems like the problem is in that debsums internally calls dpkg-query -S in 
order to test whether 
modified file actually belongs to the package being tested; dpkg-query results 
with two-column output,
using colon (':') as column separator, however in multilib configuration 
architecture constitutes full package name
via concatenation through exactly the same separator (eg. libssl1.0.0:amd64).
Consequently aforementioned test wrongfully fails, thus leading 
modification-notification not to be shown.

I've attached simple patch that appear to fix the problem.

Sincerely,
Vladimir.

-- System Information:
Debian Release: 8.0
  APT prefers experimental
  APT policy: (990, 'experimental'), (500, 'testing-proposed-updates'), (500, 
'stable-updates'), (500, 'unstable'), (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.18.0-rc6 (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages debsums depends on:
ii  dpkg                  1.17.22
ii  libdpkg-perl          1.17.22
ii  libfile-fnmatch-perl  0.02-2+b1
ii  perl                  5.20.1-3
ii  ucf                   3.0030

debsums recommends no packages.

debsums suggests no packages.

-- no debconf information

-- debsums errors found:
debsums: changed file /usr/bin/debsums (from debsums package)
--- /tmp/debsums.orig	2014-12-15 00:29:26.374937420 +0300
+++ /usr/bin/debsums	2014-12-15 00:29:32.316997362 +0300
@@ -462,7 +462,7 @@
 	    return 0;
 	}
 
-	my $correct_package = `dpkg-query "--admindir=$DPKG" -S "$path" | awk -F: '{print \$1}'`;
+	my $correct_package = `dpkg-query "--admindir=$DPKG" -S "$path" | awk -F': ' '{print \$1}'`;
 	chomp($correct_package);
 	if ($pack ne $correct_package) {
 	    #print "$pack != $correct_package\n";

Reply via email to