Bug#993444: libxml-sax-perl: Reproducible content for 'update-perl-sax-parsers'
Roland Clobus
rclobus at rclobus.nl
Wed Sep 1 14:27:54 BST 2021
Package: libxml-sax-perl
Version: 1.02+dfsg-1
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: randomness
X-Debbugs-Cc: reproducible-bugs at lists.alioth.debian.org
Hello maintainers for libxml-sax-perl,
While working on the “reproducible builds” effort [1], I have noticed
that the output of the script 'update-perl-sax-parsers' is not stable.
You can reproduce this with the following snippet:
mkdir test
PERL_HASH_SEED=0 update-perl-sax-parsers --directory test --file
test/ParserDetails.ini --add XML::SAX::Expat --priority 10
mv test/10-XML\:\:SAX\:\:Expat seed0
PERL_HASH_SEED=42 update-perl-sax-parsers --directory test --file
test/ParserDetails.ini --add XML::SAX::Expat --priority 10
mv test/10-XML\:\:SAX\:\:Expat seed42
md5sum seed*
After issuing the add command, the generated ini file has a random order for
its keys. See [2] for more information.
The attached patch sorts the keys prior to writing the file.
Once applied, it will be possible for the live-build live image with the
Cinnamon desktop to be built reproducibly.
With kind regards,
Roland Clobus
[1]: https://wiki.debian.org/ReproducibleBuilds
[2]: https://reproducible-builds.org/docs/stable-outputs/
-- System Information:
Debian Release: bookworm/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'testing-debug')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 5.10.0-8-amd64 (SMP w/8 CPU threads)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8),
LANGUAGE=en_GB:en
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages libxml-sax-perl depends on:
ii libxml-namespacesupport-perl 1.12-1.1
ii libxml-sax-base-perl 1.09-1.1
ii perl 5.32.1-5
ii ucf 3.0043
Versions of packages libxml-sax-perl recommends:
ii libwww-perl 6.53-1
ii libxml-sax-expat-perl 0.51-1
libxml-sax-perl suggests no packages.
-------------- next part --------------
diff --git a/debian/patches/series b/debian/patches/series
index 14b0514..006daf5 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@ charset-decoding
parserdetails-debian
pod-spelling
Fix-another-typo-in-POD.patch
+sort-ini-entries
diff --git a/debian/patches/sort-ini-entries b/debian/patches/sort-ini-entries
new file mode 100644
index 0000000..a3dc595
--- /dev/null
+++ b/debian/patches/sort-ini-entries
@@ -0,0 +1,14 @@
+From: Roland Clobus <rclobus at rclobus.nl>
+Date: Wed, 1 Sep 2021 15:10:00+0200
+Subject: Sort the entries in the .ini-files. This generates the files with a constant content
+--- a/lib/XML/SAX/Debian.pm
++++ b/lib/XML/SAX/Debian.pm
+@@ -31,7 +31,7 @@
+
+ foreach my $p (@{ $class->parsers }) {
+ print $fh "[$p->{Name}]\n";
+- foreach my $key (keys %{$p->{Features}}) {
++ foreach my $key (sort keys %{$p->{Features}}) {
+ print $fh "$key = $p->{Features}{$key}\n";
+ }
+ print $fh "\n";
More information about the Reproducible-bugs
mailing list