Source: apertium-en-ca
Version: 0.9.3~r61232-1
Severity: wishlist
Tags: patch


While working on the “reproducible builds” effort [1], we have noticed
that apertium-en-ca (as well as other apertium-*-* packages) could not
be built reproducibly.

The problem is that these packages try to run localedef to compile
files for the en_US.UTF-8 locale in a nonstandard directory. This is
problematic because localedef needs the locales package to work, but
"Build-Depends: locales" isn't guaranteed to install locales if
locales-all is already installed (because locales-all contains
"Provides: locales" in its control file) and locales-all isn't good
enough for localedef. The solution is to simply build-depend on
locales-all instead of locales and use the locale files in the default
location; here is a patch to do that. (While the patch is against the
apertium-en-ca source package, essentially identical patches should be
applied to the other apertium-*-* packages as well.)

diff -ur apertium-en-ca-0.9.3~r61232.orig/debian/control apertium-en-ca-0.9.3~r61232/debian/control
--- apertium-en-ca-0.9.3~r61232.orig/debian/control	2015-07-09 17:21:03.000000000 +0300
+++ apertium-en-ca-0.9.3~r61232/debian/control	2015-10-20 15:33:17.591980258 +0300
@@ -9,7 +9,7 @@
                debhelper (>= 8.0),
-               locales,
+               locales-all,
                pkg-config (>= 0.21)
 Standards-Version: 3.9.6
diff -ur apertium-en-ca-0.9.3~r61232.orig/debian/rules apertium-en-ca-0.9.3~r61232/debian/rules
--- apertium-en-ca-0.9.3~r61232.orig/debian/rules	2015-07-09 16:46:04.000000000 +0300
+++ apertium-en-ca-0.9.3~r61232/debian/rules	2015-10-20 15:33:01.701610251 +0300
@@ -20,8 +20,5 @@
 	dh $@ --with autoreconf
-	mkdir -p debian/tmp/locale/
-	localedef -f UTF-8 -i en_US ./debian/tmp/locale/en_US.UTF-8/
-	export LOCPATH=$(CURDIR)/debian/tmp/locale/ && \
 	export LC_ALL=en_US.UTF-8 && \
Reproducible-builds mailing list

Reply via email to