--- Begin Message ---
Source: texinfo
Version: 5.9.96.dfsg.1-1
Severity: wishlist
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: toolchain
X-Debbugs-Cc: reproducible-builds@lists.alioth.debian.org
Hi,
While working on the "reproducible builds" effort [1], we have noticed
that texinfo generates indices in a non-deterministic order.
This appears to happen because the index sort is not stable with respect
to the line number, resulting in output non-determinstically changing
from:
* Entry (line 1)
* Entry (line 2)
and
* Entry (line 2)
* Entry (line 1)
.. when the entry is the same string.
The attached patch adds the line number to the sort comparator. Once
applied, (some) packages using texinfo can be built reproducibly in
our reproducible toolchain.
[1]: https://wiki.debian.org/ReproducibleBuilds
Regards,
--
,''`.
: :' : Chris Lamb
`. `'` lamby@debian.org / chris-lamb.co.uk
`-
diff --git a/tp/Texinfo/Structuring.pm b/tp/Texinfo/Structuring.pm
index 6ed1be2..c2ec017 100644
--- a/tp/Texinfo/Structuring.pm
+++ b/tp/Texinfo/Structuring.pm
@@ -1984,6 +1984,9 @@ sub _sort_index_entries($$)
if ($res == 0) {
$res = ($key1->{'number'} <=> $key2->{'number'});
}
+ if ($res == 0) {
+ $res = ($key1->{'line_nr'} <=> $key2->{'line_nr'});
+ }
return $res;
}
@@ -2016,6 +2019,7 @@ sub _do_index_keys($$$)
foreach my $index_name (keys(%$index_entries)) {
foreach my $entry (@{$index_entries->{$index_name}}) {
$entry->{'in_code'} = $index_names->{$entry->{'index_name'}}->{'in_code'};
+ $entry->{'line_nr'} = $entry->{'command'}->{'line_nr'}->{'line_nr'};
$options->{'code'} = $entry->{'in_code'};
$entry->{'key'} = Texinfo::Convert::Text::convert(
{'contents' => $entry->{'content'}}, $options);
--- End Message ---
--- Begin Message ---
Source: texinfo
Source-Version: 6.0.0.dfsg.1-2
We believe that the bug you reported is fixed in the latest version of
texinfo, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 790065@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Norbert Preining <preining@debian.org> (supplier of updated texinfo package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Format: 1.8
Date: Sat, 27 Jun 2015 23:15:25 +0900
Source: texinfo
Binary: texinfo info install-info
Architecture: source amd64
Version: 6.0.0.dfsg.1-2
Distribution: unstable
Urgency: medium
Maintainer: Debian TeX maintainers <debian-tex-maint@lists.debian.org>
Changed-By: Norbert Preining <preining@debian.org>
Description:
info - Standalone GNU Info documentation browser
install-info - Manage installed documentation in info format
texinfo - Documentation system for on-line information and printed output
Closes: 790065
Changes:
texinfo (6.0.0.dfsg.1-2) unstable; urgency=medium
.
* make texinfo indices reproducible (Closes: #790065) (thanks to Chris Lamb)
Checksums-Sha1:
660349188dc3c526efbd7d1b7cc2545b0a39d263 2129 texinfo_6.0.0.dfsg.1-2.dsc
7a29c7ff927087226ebbd860de965ca90159186a 23424 texinfo_6.0.0.dfsg.1-2.debian.tar.xz
95582bc59fd72b008d3c25e419b0530aec8ee44d 328054 info_6.0.0.dfsg.1-2_amd64.deb
41d64145850166237e390e188d2f71fcfeddd895 253742 install-info_6.0.0.dfsg.1-2_amd64.deb
4d2d74482d949cd66d4e452dc0c6b55fc4b90342 1063848 texinfo_6.0.0.dfsg.1-2_amd64.deb
Checksums-Sha256:
592e18118189010ec4403cab86dc862fba4e825541de9a0e02599855ff9a4468 2129 texinfo_6.0.0.dfsg.1-2.dsc
d98e1eef4b52b46748cee0b8606dc9e8639cfd4796e029cef6ea291bf1878105 23424 texinfo_6.0.0.dfsg.1-2.debian.tar.xz
3d07bd8a8ff1a26c8aeac3f9507206ef47ba051a0559d2f662b6e14ee53a66f8 328054 info_6.0.0.dfsg.1-2_amd64.deb
dfeea8f2a9ebfef072f3aee326a01d5a7fa56038ffbd1fed0b025bef5805920e 253742 install-info_6.0.0.dfsg.1-2_amd64.deb
fa51380f3df675ec51f863545041b0e5dadd0cfef4789e55037d0291a1303fca 1063848 texinfo_6.0.0.dfsg.1-2_amd64.deb
Files:
63dde1059dd4f70f654b343656fab2b7 2129 doc standard texinfo_6.0.0.dfsg.1-2.dsc
300ffae6b45483c323ef814a35b561ca 23424 doc standard texinfo_6.0.0.dfsg.1-2.debian.tar.xz
1ab21a4cba9b3a6f9e98316afd05c5c4 328054 doc important info_6.0.0.dfsg.1-2_amd64.deb
bf5aa03956d540426bf50eafb9988d9c 253742 doc important install-info_6.0.0.dfsg.1-2_amd64.deb
617078b4e941fbaff8ec42b6e00c5a25 1063848 text optional texinfo_6.0.0.dfsg.1-2_amd64.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIVAwUBVY6xdmyspEiGDNwTAQj4dA/8DvJCU5AEHaQpsWyfzT8DPlnMWS0hnrdt
kajIjh/8yApIXwW6UL8xWBHclLJLz8kGD9vCVeaSMSLpHZMCmWrgO5/AEInxJwsC
kqj5NXyGnZWhHf5KsUkt73vlZ7OfGsSbGx/aFPgQRy6AGUsQ+nZfqJGfwmkL1USb
YOv+lS3Rbap2USdnsLgr5Wfw90bZsWYRp3xk+MbqRKu679pmycUv0b0uzjOYZgeV
ZkuNrf9jUXANkSu7Yh7hoWmkKWd64TI9gPq2tEku1NKaec7WaoYJRmcDoGssNa4O
lNi5ESPLkbhdWm4raksbW4NCU7U511qpivxJU21hpkOAYvtw29cvyNlOSSsaCnsG
7Uqy4/qUioZPqx2/o+HREG86VVqkGtADLROClIrAJWVpnsF4hNJIUVnfCQv1DHAX
i1Q57kweiCHFI+Rr25b7U+QizaYISgXDB7KOwg4q2EkSASQKc5ZAEarURYnjfb69
xAZHDZalvHUqqRrIfULqdj4NirL9d4RTCPQ2KD0YhMkAH9GA9gmhtUxgZSCRCW7Q
JNDTx61uWP2ecINZKjZOsHTnAtrQTN23v1zhZY4ry2avLB2skW6juDAHlMb8+1jt
IJ7XHsZBeGP4D3RBGI+txOl3s2ZS3cavkS046snHllcl1r/h24VbmOPOkV8RLc1j
HCz2O9cvERM=
=3npj
-----END PGP SIGNATURE-----
--- End Message ---