[Piuparts-devel] Bug#744398: why should debsums care about obsolete conffiles?

Axel Beckert abe at debian.org
Sat Apr 26 01:39:57 UTC 2014


Hi,

Holger Levsen wrote:
> I'd really like to see #744398, it's currently severly affecting
> piuparts.d.o testing of sid, testing2sid and some other suites.
> (Which I only can easily "workaround" by disabling debsums tests
> there..)
> 
> (Im also unsure whether to merge #689508 and #744398, currently I
> leave them seperated to keep some more clarity.)

I had a _short_ look at the code and I think I have an idea where I
could hook into debsums' workflow. Here's a prelimiary patch which may
mitigate these issues:

diff --git a/debsums b/debsums
index 9319f27..a1c7ef8 100755
--- a/debsums
+++ b/debsums
@@ -462,6 +462,13 @@ sub is_localepurge_file {
 	    return 0;
 	}
 
+	my $correct_package = `dpkg -S "$root/$path" | awk -F: '{print \$1}'`;
+	chomp($correct_package);
+	if ($pack ne $correct_package) {
+	    #print "$pack != $correct_package\n";
+	    return 0;
+	}
+
 	if ($changed)
 	{
 	    print $root, "/", $path, "\n";

It doesn't seem perfect (if it considers a file FAILED, it checks if
the assumed package is the correct one and ignores the case if not),
but it seems to do the trick at least with this example:

> This is on a freshly debootstrapped sid system, the .bak file is from directly after running deboostrap, the .sid file is from directly after running dist-upgrade for the first time...
> 
> # cp /etc/init/startpar-bridge.conf.bak /etc/init/startpar-bridge.conf
> # debsums -e  startpar
> /etc/init/startpar-bridge.conf                                            FAILED
> # debsums -e  sysvinit-utils
> /etc/init/startpar-bridge.conf                                                OK
> # cp /etc/init/startpar-bridge.conf.sid /etc/init/startpar-bridge.conf
> # debsums -e  startpar
> /etc/init/startpar-bridge.conf                                                OK
> # debsums -e  sysvinit-utils
> /etc/init/startpar-bridge.conf                                            FAILED

# /home/abe/debsums/debsums/debsums -e startpar
/etc/init/startpar-bridge.conf                                                OK
# /home/abe/debsums/debsums/debsums -e sysvinit-utils
# cp /etc/init/startpar-bridge.conf.wheezy /etc/init/startpar-bridge.conf
# /home/abe/debsums/debsums/debsums -e startpar
/etc/init/startpar-bridge.conf                                            FAILED
# /home/abe/debsums/debsums/debsums -e sysvinit-utils
/etc/init/startpar-bridge.conf                                                OK

While it's probably not perfect, especially in the latter case, I think, this may
fix enough of the issue to allow to downgrade the severity of it.

The main reason why I don't check this for files considered "OK" is
mainly the performance issue it would cause.

Instead of ignoring such cases we could also output something like
"FAILED-BUT-OBSOLETE" and return 0. Would that help piuparts? That
would be probably less invasive.

> Oh, and btw, should we formally orphan debsums?

Hrm. I don't want to see it orphaned, as I should not maintain more
packages than now, otherwise I get hunted by the MIA team at some
point, too. ;-)

Maybe a place where more eyes would be on it, would be the Debian Perl
Group -- it's written in Perl. Ryan is also a member, so he could
easily continue to contribute while it would benefit from team
maintenance.

		Regards, Axel
-- 
 ,''`.  |  Axel Beckert <abe at debian.org>, http://people.debian.org/~abe/
: :' :  |  Debian Developer, ftp.ch.debian.org Admin
`. `'   |  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE
  `-    |  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5



More information about the Piuparts-devel mailing list