[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#573088: Allow and recommend shasums control file



retitle 573088 Allow and recommend shasums control file
thanks

On Mon, 2010-03-08 at 21:10 +0100, Frank Lin PIAT wrote: 
> 
> Please find a patch attached that allow (and recommends) to provide
> sha256sums. (During a "transition period", we encourage people to
> provide both SHA and MD5, so existing setup don't get broken).

This patch is replace the previous one.

The control file is now named shasums, so it later it will possible to
provide even stronger SHA algorithm. At this time, we only accept
SHA-256 checksums.
(Some tools, like perl's shasums, autodetects the SHA, depending on the
input file, it would be easy to implement similar feature in debsums)

Regards,

Franklin
From 0a56b884402c0329213e846c05f51b9db3daa0a6 Mon Sep 17 00:00:00 2001
From: Frank Lin PIAT <fpiat@klabs.be>
Date: Wed, 10 Mar 2010 23:46:05 +0100
Subject: [PATCH] Allow and recommend shasums (SHA-256)

---
 checks/control-files                        |    1 +
 checks/shasums                              |  124 +++++++++++++++++++++++++++
 checks/shasums.desc                         |   63 ++++++++++++++
 collection/shasums                          |   59 +++++++++++++
 collection/shasums.desc                     |    7 ++
 data/debhelper/dh_commands                  |    1 +
 t/COVERAGE                                  |    6 ++
 t/debs/deb-format-ancient-file/Makefile     |    5 +-
 t/debs/deb-format-extra-member/Makefile     |    5 +-
 t/debs/deb-format-lzma/Makefile             |    5 +-
 t/debs/deb-format-record-size/Makefile      |    5 +-
 t/debs/deb-format-wrong-order/Makefile      |    5 +-
 t/debs/description-synopsis-spaces/Makefile |    5 +-
 t/debs/fields-malformed-source/Makefile     |    5 +-
 t/debs/fields-obsolete-relation/Makefile    |    5 +-
 testset/binary/debian/rules                 |    3 +-
 testset/etcfiles/debian/rules               |   17 ++++
 testset/tags.binary                         |    2 +
 testset/tags.etcfiles                       |    5 +
 testset/tags.filenames                      |    3 +
 testset/tags.foo++                          |    1 +
 testset/tags.libbaz                         |    5 +
 testset/tags.maintainer-scripts             |    1 +
 testset/tags.scripts                        |    1 +
 24 files changed, 322 insertions(+), 17 deletions(-)
 create mode 100644 checks/shasums
 create mode 100644 checks/shasums.desc
 create mode 100755 collection/shasums
 create mode 100644 collection/shasums.desc

diff --git a/checks/control-files b/checks/control-files
index 5a42c77..908c2d4 100644
--- a/checks/control-files
+++ b/checks/control-files
@@ -34,6 +34,7 @@ my %ctrl_deb =
      postrm    => 0755,
      prerm     => 0755,
      shlibs    => 0644,
+     shasums   => 0644,
      symbols   => 0644,
      templates => 0644,
      triggers  => 0644);
diff --git a/checks/shasums b/checks/shasums
new file mode 100644
index 0000000..17ab901
--- /dev/null
+++ b/checks/shasums
@@ -0,0 +1,124 @@
+# shasums -- lintian check script -*- perl -*-
+
+# Copyright (C) 1998 Christian Schwarz and Richard Braakman
+# Copyright (C) 2010 Frank Lin PIAT
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, you can find it on the World Wide
+# Web at http://www.gnu.org/copyleft/gpl.html, or write to the Free
+# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+# MA 02110-1301, USA.
+
+package Lintian::shasums;
+use strict;
+
+use Lintian::Tags qw(tag);
+use Util;
+
+sub run {
+
+my $pkg = shift;
+my $type = shift;
+
+my $control = "control/shasums";
+
+my %control_entry;
+my %info_entry;
+my %conffile;
+
+# read in shasums info file
+open(C, '<', "shasums") or fail("cannot open shasums info file: $!");
+while (<C>) {
+    chop;
+    next if m/^\s*$/;
+    m/^(\S+)\s*(\S.*)$/ or fail("syntax error in shasums info file: $_");
+    my $zzsum = $1;
+    my $zzfile = $2;
+    $zzfile =~ s,^(\./)?,,;
+    $info_entry{$zzfile} = $zzsum;
+}
+close(C);
+
+# read in conffiles
+if (-f "control/conffiles") {
+    open(C, '<', "control/conffiles")
+	or fail("cannot open control file conffiles: $!");
+    while (<C>) {
+	chop;
+	next if m/^\s*$/;
+	s,^/,,;
+	$conffile{$_} = 1;
+    }
+    close(C);
+}
+
+# Is there a shasums control file?
+unless (-f $control) {
+    # ignore if package contains no files
+    return 0 if -z "shasums";
+
+    # check if package contains non-conffiles
+    # debhelper doesn't create entries in shasums
+    # for conffiles since this information would
+    # be redundant
+    my $only_conffiles = 1;
+    foreach my $file (keys %info_entry) {
+	unless ($conffile{$file}) {
+	    $only_conffiles = 0;
+	    last;
+	}
+    }
+
+    tag "no-shasums-control-file", "" unless $only_conffiles;
+    return 0;
+}
+
+# Is it empty? Then skip it. Tag will be issued by control-files
+if (-z $control) {
+    return 0;
+}
+
+# read in shasums control file
+open(C, '<', $control)
+    or fail("cannot open shasums control file $control: $!");
+while (<C>) {
+    chop;
+    next if m/^\s*$/;
+    if (m{^([a-f0-9]+)\s*(?:\./)?(\S.*)$} && length($1) == 64) {
+	$control_entry{$2} = $1;
+    } else {
+	tag "malformed-shasums-control-file", "line $.";
+    }
+}
+close(C);
+
+for my $file (keys %control_entry) {
+
+    if (not exists $info_entry{$file}) {
+	tag "shasums-lists-nonexisting-file", "$file";
+    } elsif ($info_entry{$file} ne $control_entry{$file}) {
+	tag "shasum-mismatch", "$file";
+    }
+
+    delete $info_entry{$file};
+}
+for my $file (keys %info_entry) {
+    tag "file-missing-in-shasums", "$file"
+	unless ($conffile{$file} || $file =~ m%^var/lib/[ai]spell/.%);
+}
+
+}
+
+1;
+
+# vim: syntax=perl
diff --git a/checks/shasums.desc b/checks/shasums.desc
new file mode 100644
index 0000000..0a9bfbc
--- /dev/null
+++ b/checks/shasums.desc
@@ -0,0 +1,63 @@
+Check-Script: shasums
+Author: Christian Schwarz <schwarz@debian.org>, Frank Lin PIAT <fpiat@klabs.be>
+Abbrev: sha256
+Type: binary
+Needs-Info: shasums
+Info: This script checks if sha5sum control files are valid, if they are
+ provided by a binary package.
+
+Tag: no-shasums-control-file
+Severity: wishlist
+Certainty: certain
+Info: This package does not contain an shasums control file.  This control
+ file listing the SHA256 checksums of the contents of the package is not
+ required, but if present debsums can use it to verify that no files
+ shipped with your package have been modified.  Providing it is
+ recommended.
+ .
+ If you are using debhelper to create your package, just add a call to
+ <tt>dh_checksums</tt> at the end of your binary-indep or binary-arch
+ target, right before <tt>dh_builddeb</tt>.
+
+Tag: malformed-shasums-control-file
+Severity: important
+Certainty: certain
+Info: The indicated line of the shasums control file for this package was
+ malformed.  Each line of an shasums control file should contain a SHA256
+ checksum, some whitespace, and then the path to the file corresponding to
+ that checksum.
+
+Tag: shasum-mismatch
+Severity: important
+Certainty: certain
+Info: The shasum listed for the file does not match the actual file
+ contents.
+ .
+ Usually, this error occurs during the package build process, if the
+ <tt>debian/tmp/</tt> directory is touched after <tt>dh_checksums</tt> or
+ <tt>debstd</tt> is run.
+
+Tag: shasums-lists-nonexisting-file
+Severity: important
+Certainty: certain
+Info: The shasums control file lists a file which is not included in the
+ package.
+ .
+ Usually, this error occurs during the package build process, if the
+ <tt>debian/tmp/</tt> directory is touched after <tt>dh_checksums</tt> or
+ <tt>debstd</tt> is run.
+ .
+ If all the files in the <tt>DEBIAN/</tt> subdirectory are listed
+ above, the problem was probably caused by building the package using a
+ buggy debstd/debmake. In this case, rebuilding the package with an
+ updated debstd should fix the problem.
+
+Tag: file-missing-in-shasums
+Severity: normal
+Certainty: certain
+Info: The package contains a file which isn't listed in the shasums control
+ file.
+ .
+ Usually, this error occurs during the package build process, if the
+ <tt>debian/tmp/</tt> directory is touched after <tt>dh_checksums</tt> or
+ <tt>debstd</tt> is run.
diff --git a/collection/shasums b/collection/shasums
new file mode 100755
index 0000000..8ca6b1b
--- /dev/null
+++ b/collection/shasums
@@ -0,0 +1,59 @@
+#!/usr/bin/perl -w
+# shasums -- lintian collection script
+
+# Copyright (C) 1998 Richard Braakman
+# 
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, you can find it on the World Wide
+# Web at http://www.gnu.org/copyleft/gpl.html, or write to the Free
+# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+# MA 02110-1301, USA.
+
+use strict;
+
+use FileHandle;
+use lib "$ENV{'LINTIAN_ROOT'}/lib";
+use Lintian::Command qw(spawn reap);
+use Util;
+
+($#ARGV == 1) or fail("syntax: shasums <pkg> <type>");
+my $pkg = shift;
+my $type = shift;
+
+-f "fields/package" or fail("shasums invoked in wrong directory");
+
+unlink("shasums");
+chdir("unpacked")
+    or fail("cannot chdir to unpacked directory: $!");
+
+my %opts = ( pipe_in => FileHandle->new,
+	     out => '../shasums',
+	     fail => 'error' );
+spawn(\%opts, ['xargs', '-0r', 'sha256sum'] );
+$opts{pipe_in}->blocking(1);
+open(INDEX, '<', "../index")
+    or fail("cannot open index file: $!");
+while (<INDEX>) {
+    next unless m/^-/;
+    chop;
+    $_ = (split(" ", $_, 6))[5];
+    s/ link to .*//;
+    s/\\(\d+)/chr(oct($1))/eg;
+    s/\\\\/\\/g;
+    printf {$opts{pipe_in}} "%s\0", $_;
+}
+close(INDEX);
+
+close $opts{pipe_in};
+reap(\%opts);
+
diff --git a/collection/shasums.desc b/collection/shasums.desc
new file mode 100644
index 0000000..874afe4
--- /dev/null
+++ b/collection/shasums.desc
@@ -0,0 +1,7 @@
+Collector-Script: shasums
+Author: Richard Braakman <dark@xs4all.nl>, Frank Lin PIAT <fpiat@klabs.be>
+Info: This script runs the "shasums" over all files in a binary package.
+Type: binary, udeb
+Version: 1
+Order: 1
+Needs-Info: unpacked
diff --git a/data/debhelper/dh_commands b/data/debhelper/dh_commands
index 5659a5a..c376d8b 100644
--- a/data/debhelper/dh_commands
+++ b/data/debhelper/dh_commands
@@ -9,6 +9,7 @@ dh_bash-completion=bash-completion
 dh_bugfiles=debhelper
 dh_builddeb=debhelper
 dh_buildinfo=dh-buildinfo
+dh_checksums=debhelper
 dh_clean=debhelper
 dh_clideps=cli-common-dev
 dh_clifixperms=cli-common-dev
diff --git a/t/COVERAGE b/t/COVERAGE
index b8c4b08..8b13467 100644
--- a/t/COVERAGE
+++ b/t/COVERAGE
@@ -457,6 +457,12 @@ scripts shell-script-fails-syntax-check
 scripts suid-perl-script-but-no-perl-suid-dep
 scripts update-alternatives-remove-called-in-postrm
 
+shasums file-missing-in-shasums
+shasums malformed-shasums-control-file
+shasums shasum-mismatch
+shasums shasums-lists-nonexisting-file
+shasums no-shasums-control-file
+
 shared-libs duplicate-entry-in-shlibs-control-file
 shared-libs duplicate-entry-in-symbols-control-file
 shared-libs invalid-template-id-in-symbols-file
diff --git a/t/debs/deb-format-ancient-file/Makefile b/t/debs/deb-format-ancient-file/Makefile
index 89d2771..8af7adb 100644
--- a/t/debs/deb-format-ancient-file/Makefile
+++ b/t/debs/deb-format-ancient-file/Makefile
@@ -10,10 +10,11 @@ all:
 	chmod 644 control
 	env TZ=GMT touch -t 197001010000 control
 	md5sum usr/share/doc/deb-format-ancient-file/* > md5sums
-	tar -c -z -f control.tar.gz control md5sums
+	sha256sum usr/share/doc/deb-format-ancient-file/* > shasums
+	tar -c -z -f control.tar.gz control md5sums shasums
 	ar rc deb-format-ancient-file.deb \
 	    debian-binary control.tar.gz data.tar.gz
 
 clean:
-	rm -f *.tar.gz *.deb md5sums debian-binary
+	rm -f *.tar.gz *.deb md5sums debian-binary shasums
 	rm -rf usr
diff --git a/t/debs/deb-format-extra-member/Makefile b/t/debs/deb-format-extra-member/Makefile
index 9159288..08a4aa6 100644
--- a/t/debs/deb-format-extra-member/Makefile
+++ b/t/debs/deb-format-extra-member/Makefile
@@ -8,10 +8,11 @@ all:
 	chown 0:0 control
 	chmod 644 control
 	md5sum usr/share/doc/deb-format-extra-member/* > md5sums
-	tar cfz control.tar.gz control md5sums
+	sha256sum usr/share/doc/deb-format-extra-member/* > shasums
+	tar cfz control.tar.gz control md5sums shasums
 	ar rc deb-format-extra-member.deb \
 	    debian-binary control.tar.gz data.tar.gz extra-stuff
 
 clean:
-	rm -f *.tar.gz *.deb md5sums debian-binary extra-stuff
+	rm -f *.tar.gz *.deb md5sums debian-binary extra-stuff shasums
 	rm -rf usr
diff --git a/t/debs/deb-format-lzma/Makefile b/t/debs/deb-format-lzma/Makefile
index d03041b..a479357 100644
--- a/t/debs/deb-format-lzma/Makefile
+++ b/t/debs/deb-format-lzma/Makefile
@@ -8,10 +8,11 @@ all:
 	chown 0:0 control
 	chmod 644 control
 	md5sum usr/share/doc/deb-format-lzma/* > md5sums
-	tar cfz control.tar.gz control md5sums
+	sha256sum usr/share/doc/deb-format-lzma/* > shasums
+	tar cfz control.tar.gz control md5sums shasums
 	ar rc deb-format-lzma.deb \
 	    debian-binary control.tar.gz data.tar.lzma
 
 clean:
-	rm -f *.tar.gz *.tar.lzma *.deb md5sums debian-binary
+	rm -f *.tar.gz *.tar.lzma *.deb md5sums debian-binary shasums
 	rm -rf usr
diff --git a/t/debs/deb-format-record-size/Makefile b/t/debs/deb-format-record-size/Makefile
index 4f223f9..5d2327d 100644
--- a/t/debs/deb-format-record-size/Makefile
+++ b/t/debs/deb-format-record-size/Makefile
@@ -7,10 +7,11 @@ all:
 	chown 0:0 control
 	chmod 644 control
 	md5sum usr/share/doc/deb-format-record-size/* > md5sums
-	tar --record-size=4096 -c -z -f control.tar.gz control md5sums
+	sha256sum usr/share/doc/deb-format-record-size/* > shasums
+	tar --record-size=4096 -c -z -f control.tar.gz control md5sums shasums
 	ar rc deb-format-record-size.deb \
 	    debian-binary control.tar.gz data.tar.gz
 
 clean:
-	rm -f *.tar.gz *.deb md5sums debian-binary
+	rm -f *.tar.gz *.deb md5sums debian-binary shasums
 	rm -rf usr
diff --git a/t/debs/deb-format-wrong-order/Makefile b/t/debs/deb-format-wrong-order/Makefile
index fa0ccdd..55a0003 100644
--- a/t/debs/deb-format-wrong-order/Makefile
+++ b/t/debs/deb-format-wrong-order/Makefile
@@ -7,10 +7,11 @@ all:
 	chown 0:0 control
 	chmod 644 control
 	md5sum usr/share/doc/deb-format-wrong-order/* > md5sums
-	tar cfz control.tar.gz control md5sums
+	sha256sum usr/share/doc/deb-format-wrong-order/* > shasums
+	tar cfz control.tar.gz control md5sums shasums
 	ar rc deb-format-wrong-order.deb \
 	    debian-binary data.tar.gz control.tar.gz
 
 clean:
-	rm -f *.tar.gz *.deb md5sums debian-binary
+	rm -f *.tar.gz *.deb md5sums debian-binary shasums
 	rm -rf usr
diff --git a/t/debs/description-synopsis-spaces/Makefile b/t/debs/description-synopsis-spaces/Makefile
index d0152b2..577496f 100644
--- a/t/debs/description-synopsis-spaces/Makefile
+++ b/t/debs/description-synopsis-spaces/Makefile
@@ -9,10 +9,11 @@ all:
 	chown 0:0 control
 	chmod 644 control
 	md5sum usr/share/doc/$(name)/* > md5sums
-	tar cfz control.tar.gz control md5sums
+	sha256sum usr/share/doc/$(name)/* > shasums
+	tar cfz control.tar.gz control md5sums shasums
 	ar rc $(name).deb \
 	    debian-binary control.tar.gz data.tar.gz
 
 clean:
-	rm -f *.tar.gz *.tar.lzma *.deb md5sums debian-binary
+	rm -f *.tar.gz *.tar.lzma *.deb md5sums debian-binary shasums
 	rm -rf usr
diff --git a/t/debs/fields-malformed-source/Makefile b/t/debs/fields-malformed-source/Makefile
index dd9605a..d7029f0 100644
--- a/t/debs/fields-malformed-source/Makefile
+++ b/t/debs/fields-malformed-source/Makefile
@@ -9,10 +9,11 @@ all:
 	chown 0:0 control
 	chmod 644 control
 	md5sum usr/share/doc/$(name)/* > md5sums
-	tar cfz control.tar.gz control md5sums
+	sha256sum usr/share/doc/$(name)/* > shasums
+	tar cfz control.tar.gz control md5sums shasums
 	ar rc $(name).deb \
 	    debian-binary control.tar.gz data.tar.gz
 
 clean:
-	rm -f *.tar.gz *.tar.lzma *.deb md5sums debian-binary
+	rm -f *.tar.gz *.tar.lzma *.deb md5sums debian-binary shasums
 	rm -rf usr
diff --git a/t/debs/fields-obsolete-relation/Makefile b/t/debs/fields-obsolete-relation/Makefile
index 9fcd420..7671790 100644
--- a/t/debs/fields-obsolete-relation/Makefile
+++ b/t/debs/fields-obsolete-relation/Makefile
@@ -9,10 +9,11 @@ all:
 	chown 0:0 control
 	chmod 644 control
 	md5sum usr/share/doc/$(name)/* > md5sums
-	tar cfz control.tar.gz control md5sums
+	sha256sum usr/share/doc/$(name)/* > shasums
+	tar cfz control.tar.gz control md5sums shasums
 	ar rc $(name).deb \
 	    debian-binary control.tar.gz data.tar.gz
 
 clean:
-	rm -f *.tar.gz *.tar.lzma *.deb md5sums debian-binary
+	rm -f *.tar.gz *.tar.lzma *.deb md5sums debian-binary shasums
 	rm -rf usr
diff --git a/testset/binary/debian/rules b/testset/binary/debian/rules
index 9ed885d..934a2da 100755
--- a/testset/binary/debian/rules
+++ b/testset/binary/debian/rules
@@ -80,8 +80,9 @@ binary-arch: build
 	dpkg-gencontrol -pbinary -isp
 	dpkg-gencontrol -pbinary-data -Pdebian/binary-data -isp
 
-	# Test an md5sums check while we're here.
+	# Test md5sums and shasums check while we're here.
 	touch debian/binary-data/DEBIAN/md5sums
+	touch debian/binary-data/DEBIAN/shasums
 
 	dpkg --build debian/tmp ..
 	dpkg --build debian/binary-data ..
diff --git a/testset/etcfiles/debian/rules b/testset/etcfiles/debian/rules
index 1e58c81..32f2762 100755
--- a/testset/etcfiles/debian/rules
+++ b/testset/etcfiles/debian/rules
@@ -44,6 +44,23 @@ binary-indep:
 	echo '56fb27e455dd86d8801f1ecd3a4cee49  usr/share/doc/etcfiles/README.Debian' \
 	    >> debian/tmp/DEBIAN/md5sums
 
+	echo '5e913e218e1f3fcac8487d7fbb954bd9669f72a7ef6e9d9f519d94b6a8cc88b9  ./etc/cron.daily/cronfile-normal' \
+	    > debian/tmp/DEBIAN/shasums
+	echo '5e913e218e1f3fcac8487d7fbb954bd9669f72a7ef6e9d9f519d94b6a8cc88b9  ./etc/cron.daily/.cronfile-begins-with-fullstop' \
+	    > debian/tmp/DEBIAN/shasums
+	echo '5e913e218e1f3fcac8487d7fbb954bd9669f72a7ef6e9d9f519d94b6a8cc88b9  ./etc/cron.daily/cronfile-contains.fullstop' \
+	    > debian/tmp/DEBIAN/shasums
+	echo '4a66e953b00a3c22e34efc46457f78f988c58ee570e137095365a4d25f39289b  ./etc/proper' \
+	    > debian/tmp/DEBIAN/shasums
+	echo '4a66e953b00a3c22e34efc46457f78f988c58ee570e137095365a4d25f39289b  etc/improper' \
+	    >> debian/tmp/DEBIAN/shasums
+	echo '4a66e953b00a3c22e34efc46457f78f988c58ee570e137095365a4d25f39289b  usr/bin/foo' \
+	    >> debian/tmp/DEBIAN/shasums
+	echo 'this is a malformed line' \
+	    >> debian/tmp/DEBIAN/shasums
+	echo '5c1474dcde5ed448d408c2c5451b762a0a35dfb465be5281862af08c1df6b554  usr/share/doc/etcfiles/README.Debian' \
+	    >> debian/tmp/DEBIAN/shasums
+
 	install -d $(tmponly)/etc/etcfiles
 	touch $(tmponly)/etc/etcfiles/foo
 	touch $(tmponly)/etc/etcfiles/bar
diff --git a/testset/tags.binary b/testset/tags.binary
index 24a556c..42a3413 100644
--- a/testset/tags.binary
+++ b/testset/tags.binary
@@ -57,6 +57,7 @@ I: binary: capitalization-error-in-description debian Debian
 I: binary: desktop-entry-contains-encoding-key /usr/share/applications/goodbye.desktop:11 Encoding
 I: binary: desktop-entry-contains-encoding-key /usr/share/applications/hello.desktop:13 Encoding
 I: binary: no-md5sums-control-file
+I: binary: no-shasums-control-file
 W: binary source: ancient-standards-version 3.2.1 (current is 3.8.4)
 W: binary source: debian-rules-ignores-make-clean-error line 12
 W: binary source: debian-rules-uses-pwd line 9
@@ -65,6 +66,7 @@ W: binary source: native-package-with-dash-version
 W: binary source: substvar-source-version-is-deprecated binary
 W: binary source: substvar-source-version-is-deprecated binary-data
 W: binary-data: control-file-is-empty md5sums
+W: binary-data: control-file-is-empty shasums
 W: binary: binary-without-manpage usr/bin/hello
 W: binary: binary-without-manpage usr/bin/hello-static
 W: binary: binary-without-manpage usr/bin/hello.static
diff --git a/testset/tags.etcfiles b/testset/tags.etcfiles
index 99b3c25..ba3a274 100644
--- a/testset/tags.etcfiles
+++ b/testset/tags.etcfiles
@@ -4,15 +4,20 @@ E: etcfiles: changelog-file-not-compressed changelog
 E: etcfiles: file-in-etc-not-marked-as-conffile /etc/improper
 E: etcfiles: file-in-etc-not-marked-as-conffile /etc/improper-link
 E: etcfiles: malformed-md5sums-control-file line 4
+E: etcfiles: malformed-shasums-control-file line 4
 E: etcfiles: md5sum-mismatch etc/improper
 E: etcfiles: md5sum-mismatch etc/proper
 E: etcfiles: md5sums-lists-nonexisting-file usr/bin/foo
 E: etcfiles: no-copyright-file
 E: etcfiles: non-etc-file-marked-as-conffile /var/lib/foo
+E: etcfiles: shasum-mismatch etc/improper
+E: etcfiles: shasums-lists-nonexisting-file usr/bin/foo
 E: only-etcfiles: extended-description-is-empty
 W: etcfiles source: ancient-standards-version 3.5.0 (current is 3.8.4)
 W: etcfiles: file-missing-in-md5sums etc/improper-link
 W: etcfiles: file-missing-in-md5sums usr/share/doc/etcfiles/changelog
+W: etcfiles: file-missing-in-shasums etc/improper-link
+W: etcfiles: file-missing-in-shasums usr/share/doc/etcfiles/changelog
 W: etcfiles: package-contains-hardlink etc/improper -> etc/improper-link
 W: etcfiles: readme-debian-mentions-usr-doc line 2
 W: etcfiles: run-parts-cron-filename-contains-full-stop etc/cron.daily/cronfile-contains.fullstop
diff --git a/testset/tags.filenames b/testset/tags.filenames
index 58ce11c..2779865 100644
--- a/testset/tags.filenames
+++ b/testset/tags.filenames
@@ -33,9 +33,11 @@ E: filenames: wrong-file-owner-uid-or-gid usr/lib/filenames/wrong-owner-30001:65
 E: filenames: wrong-file-owner-uid-or-gid usr/lib/filenames/wrong-owner-65535:65001 65535/65001
 E: more-filename-games: no-copyright-file
 I: filename-games: no-md5sums-control-file
+I: filename-games: no-shasums-control-file
 I: filename-games: package-contains-empty-directory usr/games/
 I: filenames: duplicated-compressed-file usr/share/filenames/prototype.js.gz
 I: filenames: no-md5sums-control-file
+I: filenames: no-shasums-control-file
 I: filenames: package-contains-empty-directory usr/lib/perl5/.arch-ids/
 I: filenames: package-contains-empty-directory usr/lib/perl5/.be/
 I: filenames: package-contains-empty-directory usr/lib/perl5/.bzr/
@@ -45,6 +47,7 @@ I: filenames: package-contains-empty-directory usr/lib/perl5/CVS/
 I: filenames: package-contains-empty-directory usr/lib/perl5/{arch}/
 I: filenames: using-first-person-in-description line 1: I
 I: more-filename-games: no-md5sums-control-file
+I: more-filename-games: no-shasums-control-file
 W: filename-games: binary-without-manpage usr/bin/test-game
 W: filename-games: no-priority-field
 W: filenames source: ancient-standards-version 3.1.1 (current is 3.8.4)
diff --git a/testset/tags.foo++ b/testset/tags.foo++
index 6849f4a..08dfd1f 100644
--- a/testset/tags.foo++
+++ b/testset/tags.foo++
@@ -16,6 +16,7 @@ E: foo++: wrong-debian-qa-address-set-as-maintainer Lintian Maintainer <debian-q
 E: foo++_arch.changes: changed-by-address-malformed Marc 'HE' Brockschmidt <he@unknown>
 I: foo++ source: duplicate-short-description foo++ foo++-helper
 I: foo++: no-md5sums-control-file
+I: foo++: no-shasums-control-file
 W: foo++ source: ancient-standards-version 3.1.1 (current is 3.8.4)
 W: foo++ source: debian-watch-file-in-native-package
 W: foo++ source: debian-watch-file-unknown-version 0
diff --git a/testset/tags.libbaz b/testset/tags.libbaz
index e00c46d..6842a83 100644
--- a/testset/tags.libbaz
+++ b/testset/tags.libbaz
@@ -28,12 +28,17 @@ E: libbaz2: debian-changelog-file-missing-or-wrong-name
 I: ia32-libbaz2: no-symbols-control-file usr/lib/i486-linux-gnu/libbaz2.so.1.0.3b
 I: libbaz1-dev: binary-has-unneeded-section ./usr/lib/perl5/auto/Foo/Foo.so .comment
 I: libbaz1-dev: no-md5sums-control-file
+I: libbaz1-dev: no-shasums-control-file
 I: libbaz1-dev: package-contains-empty-directory usr/include/
 I: libbaz1: binary-has-unneeded-section ./usr/lib/perl5/auto/Foo/Foo.so .comment
 I: libbaz1: no-md5sums-control-file
+I: libbaz1: no-shasums-control-file
 I: libbaz2-dbg: no-md5sums-control-file
+I: libbaz2-dbg: no-shasums-control-file
 I: libbaz2-dev: no-md5sums-control-file
+I: libbaz2-dev: no-shasums-control-file
 I: libbaz2: no-md5sums-control-file
+I: libbaz2: no-shasums-control-file
 I: libbaz2: no-symbols-control-file usr/lib/libbaz2.so.1.0.3b
 N: 4 tags overridden (4 warnings)
 W: ia32-libbaz2: new-package-should-close-itp-bug
diff --git a/testset/tags.maintainer-scripts b/testset/tags.maintainer-scripts
index 0b9e284..a6e83cb 100644
--- a/testset/tags.maintainer-scripts
+++ b/testset/tags.maintainer-scripts
@@ -37,6 +37,7 @@ E: maintainer-scripts: read-in-maintainer-script prerm:65
 E: maintainer-scripts: read-in-maintainer-script prerm:66
 E: maintainer-scripts: wrong-debian-qa-group-name QA group <packages@qa.debian.org>
 I: maintainer-scripts: no-md5sums-control-file
+I: maintainer-scripts: no-shasums-control-file
 I: maintainer-scripts: output-of-updaterc.d-not-redirected-to-dev-null bar postrm
 W: maintainer-scripts source: ancient-standards-version 3.1.1 (current is 3.8.4)
 W: maintainer-scripts source: changelog-should-mention-qa
diff --git a/testset/tags.scripts b/testset/tags.scripts
index 38c10e6..6d399fe 100644
--- a/testset/tags.scripts
+++ b/testset/tags.scripts
@@ -26,6 +26,7 @@ I: scripts source: dpatch-missing-description 04_i_dont_have_a_description_eithe
 I: scripts: init.d-script-does-not-provide-itself /etc/init.d/lsb-broken
 I: scripts: init.d-script-missing-lsb-short-description /etc/init.d/lsb-other
 I: scripts: no-md5sums-control-file
+I: scripts: no-shasums-control-file
 I: scripts: script-in-usr-share-doc usr/share/doc/scripts/py2foo
 I: scripts: script-in-usr-share-doc usr/share/doc/scripts/rubyfoo
 W: scripts source: ancient-standards-version 3.2.1 (current is 3.8.4)
-- 
1.7.0

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: