Bug#1000685: Randomness in hunspell.db
Roland Clobus
rclobus at rclobus.nl
Sat Nov 27 08:27:54 GMT 2021
Package: dictionaries-common
Version: 1.28.12
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 of dictionaries-common,
While working on the “reproducible builds” effort [1], I have noticed
that the content of the file '/var/cache/dictionaries-common/hunspell.db' is
changing randomly.
The order of the comma separated values for the key 'hunspell-locales' is
random [2]. This can be reproduced when e.g. the hunspell-nl package is
installed (manually invoking 'update-dictcommon-hunspell' will rebuild the
file).
The attached patch sorts the values and will guarantee the order.
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'), (50, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 5.15.0-1-amd64 (SMP w/8 CPU threads)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages dictionaries-common depends on:
ii debconf [debconf-2.0] 1.5.79
ii emacsen-common 3.0.4
ii libtext-iconv-perl 1.7-7+b1
dictionaries-common recommends no packages.
Versions of packages dictionaries-common suggests:
ii aspell 0.60.8-4
ii ispell 3.4.02-2
ii wamerican [wordlist] 2020.12.07-1
-- debconf information excluded
-- debsums errors found:
debsums: changed file /usr/share/perl5/Debian/DictionariesCommon.pm (from dictionaries-common package)
-------------- next part --------------
diff --git a/scripts/perl5/Debian/DictionariesCommon.pm.in b/scripts/perl5/Debian/DictionariesCommon.pm.in
index d41658a..8261f18 100644
--- a/scripts/perl5/Debian/DictionariesCommon.pm.in
+++ b/scripts/perl5/Debian/DictionariesCommon.pm.in
@@ -542,7 +542,7 @@ sub dc_merge_installed_hunspell_dicts {
foreach my $lang ( keys %{$parsed_dicts} ){
if ( defined $locales_info->{$lang} ){
$parsed_dicts->{$lang}->{'hunspell-locales'} =
- join(', ',sort keys %{$locales_info->{$lang}});
+ join(', ',keys %{$locales_info->{$lang}});
}
}
More information about the Reproducible-bugs
mailing list