Bug#775313: debsums -c don't report all changed files
Hi, Axel Beckert wrote: > Axel Beckert wrote: > > Axel Beckert wrote: > > > I've pushed a prelimiary NMU to the git branch "nmu": > > > https://anonscm.debian.org/cgit/collab-maint/debsums.git/log/?h=nmu > > > > > > I intend to upload that one as NMU to DELAYED/2 after some testing. > > > Will post a full debdiff here once I'm done with testing. > > > > I've just uploaded an NMU to DELAYED/2. Full debdiff attached. > > > > It's my first upload with the new GnuPG key, so let's hope it works > > fine. :-) > > Seems as if didn't work, not sure why as I didn't get any mail about > it. I plan to do a direct upload of the same files later today. Sorry for the additional delay. There are currently some keyring issues which made the uploads fail and which need to be resolved first. (For those who can and are curious, see #5655 on rt.debian.org.) In the meanwhile, I'm happy if anyone else could upload the current state of the "nmu" branch in Git (https://anonscm.debian.org/cgit/collab-maint/debsums.git/commit/?h=nmu&id=2cbb4941824f529b7242e1090b8c98bb7cc467c5) directly to unstable. Otherwise I'll do it as soon as the above mentioned keyring issues are resolved. Thanks to Paul Tagliamonte for checking why the uploads failed and thanks to Gunnar Wolf for looking at and caring about the keyring issues! Regards, Axel -- ,''`. | Axel Beckert , http://people.debian.org/~abe/ : :' : | Debian Developer, ftp.ch.debian.org Admin `. `' | 4096R: 2517 B724 C5F6 CA99 5329 6E61 2FF9 CD59 6126 16B5 `-| 1024D: F067 EA27 26B9 C3FC 1486 202E C09E 1D89 9593 0EDE signature.asc Description: Digital signature
Bug#775313: debsums -c don't report all changed files
Hi, Axel Beckert wrote: > Axel Beckert wrote: > > I've pushed a prelimiary NMU to the git branch "nmu": > > https://anonscm.debian.org/cgit/collab-maint/debsums.git/log/?h=nmu > > > > I intend to upload that one as NMU to DELAYED/2 after some testing. > > Will post a full debdiff here once I'm done with testing. > > I've just uploaded an NMU to DELAYED/2. Full debdiff attached. > > It's my first upload with the new GnuPG key, so let's hope it works > fine. :-) Seems as if didn't work, not sure why as I didn't get any mail about it. I plan to do a direct upload of the same files later today. Regards, Axel -- ,''`. | Axel Beckert , http://people.debian.org/~abe/ : :' : | Debian Developer, ftp.ch.debian.org Admin `. `' | 4096R: 2517 B724 C5F6 CA99 5329 6E61 2FF9 CD59 6126 16B5 `-| 1024D: F067 EA27 26B9 C3FC 1486 202E C09E 1D89 9593 0EDE -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#775313: debsums -c don't report all changed files
Control: tag -1 + pending Hi, Axel Beckert wrote: > I've pushed a prelimiary NMU to the git branch "nmu": > https://anonscm.debian.org/cgit/collab-maint/debsums.git/log/?h=nmu > > I intend to upload that one as NMU to DELAYED/2 after some testing. > Will post a full debdiff here once I'm done with testing. I've just uploaded an NMU to DELAYED/2. Full debdiff attached. It's my first upload with the new GnuPG key, so let's hope it works fine. :-) Regards, Axel -- ,''`. | Axel Beckert , http://people.debian.org/~abe/ : :' : | Debian Developer, ftp.ch.debian.org Admin `. `' | 4096R: 2517 B724 C5F6 CA99 5329 6E61 2FF9 CD59 6126 16B5 `-| 1024D: F067 EA27 26B9 C3FC 1486 202E C09E 1D89 9593 0EDE diff -Nru debsums-2.0.52+nmu2/debian/changelog debsums-2.0.52+nmu3/debian/changelog --- debsums-2.0.52+nmu2/debian/changelog2014-05-29 19:50:49.0 +0200 +++ debsums-2.0.52+nmu3/debian/changelog2015-01-14 23:13:26.0 +0100 @@ -1,3 +1,11 @@ +debsums (2.0.52+nmu3) unstable; urgency=medium + + * Non-maintainer upload + * Fix case where previous patch doesn't report all changed files. +(Closes: #775313) Thanks Marek Veber for report and patch! + + -- Axel Beckert Wed, 14 Jan 2015 22:55:45 +0100 + debsums (2.0.52+nmu2) unstable; urgency=medium * Non-maintainer upload diff -Nru debsums-2.0.52+nmu2/debsums debsums-2.0.52+nmu3/debsums --- debsums-2.0.52+nmu2/debsums 2014-05-29 17:23:58.0 +0200 +++ debsums-2.0.52+nmu3/debsums 2015-01-14 23:17:22.0 +0100 @@ -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"; signature.asc Description: Digital signature
Processed: Re: Bug#775313: debsums -c don't report all changed files
Processing control commands: > tag -1 + pending Bug #775313 [debsums] debsums -c don't report all changed files Added tag(s) pending. -- 775313: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=775313 Debian Bug Tracking System Contact ow...@bugs.debian.org with problems -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#775313: debsums -c don't report all changed files
Hi Marek, Marek Veber wrote: > Dne 15.1.2015 v 00:01 Axel Beckert napsal(a): > > Marek Veber wrote: > > > The starting slash of the '-S' argument can repare the main bug > > > > Indeed. I've filed https://bugs.debian.org/775379 against dpkg as the > > documentation of "dpkg-query -S" does not explain this special > > behaviour with a leading slash. > > Ok, you are right with "-S", it was good to report it. > > But I meen, so the description in https://bugs.debian.org/775379, > where is written: > > If the first character is any of "*[?/" then it will be considered a > pattern, and it will be surrounded by *, as in "*string*". > > Is not correct. Yeah, I've noticed that, too, and checked the actual code. In the meanwhile it has been confirmed by one of the dpkg maintainers that a "not" is missing in that sentence. I've pushed a prelimiary NMU to the git branch "nmu": https://anonscm.debian.org/cgit/collab-maint/debsums.git/log/?h=nmu I intend to upload that one as NMU to DELAYED/2 after some testing. Will post a full debdiff here once I'm done with testing. Regards, Axel -- ,''`. | Axel Beckert , http://people.debian.org/~abe/ : :' : | Debian Developer, ftp.ch.debian.org Admin `. `' | 4096R: 2517 B724 C5F6 CA99 5329 6E61 2FF9 CD59 6126 16B5 `-| 1024D: F067 EA27 26B9 C3FC 1486 202E C09E 1D89 9593 0EDE -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#775313: debsums -c don't report all changed files
Hi, Dne 15.1.2015 v 00:01 Axel Beckert napsal(a): Marek Veber wrote: The starting slash of the '-S' argument can repare the main bug Indeed. I've filed https://bugs.debian.org/775379 against dpkg as the documentation of "dpkg-query -S" does not explain this special behaviour with a leading slash. Ok, you are right with "-S", it was good to report it. But I meen, so the description in https://bugs.debian.org/775379, where is written: If the first character is any of "*[?/" then it will be considered a pattern, and it will be surrounded by *, as in "*string*". Is not correct. In our case when we take "/" as a first character (for example: dpkg-query -S /ls) so no surrounding by '*' and lookup by "*/ls*" is done. # dpkg-query -S /ls dpkg-query: no path found matching pattern /ls So it should IMHO be: If the first character is NOT any of "*[?/" then it will be will be surrounded by *, as in "*string*" and used as pattern. When you say "main bug", what do you consider the "remaining bug"? I did not find another bug, bad the code looks slow (to call awk from perl :D ... ) I intent to fix this with an NMU (as my last NMU was obviously buggy). Please fix it in wheeze, ... It should be fixed in Unstable first, before fixing it in Wheezy, too. Ok, nice, thanks. -- Marek Veber
Bug#775313: debsums -c don't report all changed files
Hi Marek, thanks for the report and patch! Marek Veber wrote: > The starting slash of the '-S' argument can repare the main bug Indeed. I've filed https://bugs.debian.org/775379 against dpkg as the documentation of "dpkg-query -S" does not explain this special behaviour with a leading slash. When you say "main bug", what do you consider the "remaining bug"? > For example, change of /bin/ls will report nothing in wheeze, ..., unstable > will not report anything: > # cp -a /bin/ls /tmp/ls ; echo "bad addon" >> /bin/ls; debsums -c coreutils; > cp -a /tmp/ls /bin/ls I was able to reproduce this in a pbuilder Sid chroot, so this issue is also present in Unstable. > Please aply this patch to fix this issue: > # diff -Nu /usr/bin/debsums /usr/bin/debsums.new > --- /usr/bin/debsums 2014-09-01 20:47:24.0 +0200 > +++ /usr/bin/debsums.new2015-01-13 08:20:17.0 +0100 > @@ -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"; I intent to fix this with an NMU (as my last NMU was obviously buggy). > Please fix it in wheeze, ... It should be fixed in Unstable first, before fixing it in Wheezy, too. Regards, Axel -- ,''`. | Axel Beckert , http://people.debian.org/~abe/ : :' : | Debian Developer, ftp.ch.debian.org Admin `. `' | 4096R: 2517 B724 C5F6 CA99 5329 6E61 2FF9 CD59 6126 16B5 `-| 1024D: F067 EA27 26B9 C3FC 1486 202E C09E 1D89 9593 0EDE -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#775313: debsums -c don't report all changed files
Package: debsums Version: 2.0.52+deb7u1 Severity: serious Tags: patch Justification: required Hi, I'd like to notice, than the patch [2.0.52+nmu2 from Axel Beckert, see: https://launchpadlibrarian.net/176696862/debsums_2.0.52%2Bnmu1_2.0.52%2Bnmu2.diff.gz] creates this issue: when there are two (or more) files (starting with the same string in the path), so the changes of the shorter files are not reported by debsums -c ... . In my case for example: # dpkg-query "--admindir=/var/lib/dpkg" -S "bin/ls" util-linux: /bin/lsblk syslinux-common: /usr/bin/lss16toppm kmod: /bin/lsmod e2fsprogs: /usr/bin/lsattr lsb-release: /usr/bin/lsb_release pciutils: /usr/bin/lspci lsof: /usr/bin/lsof usbutils: /usr/bin/lsusb gnupg: /usr/bin/lspgpot klibc-utils: /usr/lib/klibc/bin/ls coreutils: /bin/ls util-linux: /usr/bin/lscpu initramfs-tools: /usr/bin/lsinitramfs kmod: /sbin/lsmod # dpkg-query "--admindir=/var/lib/dpkg" -S "bin/ls"| awk -F: '{print $1}' util-linux syslinux-common kmod e2fsprogs lsb-release pciutils lsof usbutils gnupg klibc-utils coreutils util-linux initramfs-tools kmod So then $correct_package = "util-linux\nsyslinux-common\nkmod\ne2fsprogs\nlsb-release\npciutils\nlsof\nusbutils\ngnupg\nklibc-utils\ncoreutils\nutil-linux\ninitramfs-tools\nkmod" These files are silently skipped by the check: if ($pack ne $correct_package) { # print "$pack != $correct_package\n"; return 0; } The starting slash of the '-S' argument can repare the main bug (this will not use pattern *usr/sbin/inchange-reporting* is used): # dpkg-query "--admindir=/var/lib/dpkg" -S "/bin/ls"| awk -F: '{print $1}' coreutils For example, change of /bin/ls will report nothing in wheeze, ..., unstable will not report anything: # cp -a /bin/ls /tmp/ls ; echo "bad addon" >> /bin/ls; debsums -c coreutils; cp -a /tmp/ls /bin/ls Since patched version report it: # cp -a /bin/ls /tmp/ls ; echo "bad addon" >> /bin/ls; debsums.new -c coreutils; cp -a /tmp/ls /bin/ls /bin/ls Please aply this patch to fix this issue: # diff -Nu /usr/bin/debsums /usr/bin/debsums.new --- /usr/bin/debsums2014-09-01 20:47:24.0 +0200 +++ /usr/bin/debsums.new2015-01-13 08:20:17.0 +0100 @@ -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"; Please fix it in wheeze, ... With regards -- Marek Veber -- System Information: Debian Release: 7.8 APT prefers stable APT policy: (500, 'stable') Architecture: i386 (i686) Kernel: Linux 3.2.0-4-686-pae (SMP w/8 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages debsums depends on: ii dpkg 8:1.16.9+nmu1 ii libdpkg-perl 8:1.16.9+nmu1 ii libfile-fnmatch-perl 0.02-1+b2 ii perl 5.14.2-21+deb7u2 ii ucf 8:3.0025+nmu4.1 debsums recommends no packages. debsums suggests no packages. -- debconf information excluded --- /usr/bin/debsums 2015-01-13 15:26:23.0 +0100 +++ /usr/bin/debsums.new 2015-01-13 08:20:17.0 +0100 @@ -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";