* Santiago Vila <sanv...@unex.es>, 2015-10-04, 17:18:
I'm looking at some of the reasons packages do not build reproducibly,
and one of them is different locale settings.
Let's say that I want to ensure that some UTF-8 locale is available
during the build. It seems my options are the following:
I don't don't care what kind of UTF-8 locale it is, just use C.UTF-8.
It's provided by libc-bin since wheezy (more precisely: since 2.13-1),
so no extra build-dependency is needed.
* Add a "Build-Depends: locales-all"
The locales-all package is very big, but I guess it would work.
Right, I wouldn't build-depend on locales-all if I could avoid it.
* Use the trick in the apertium packages, namely:
override_dh_auto_build:
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 && \
dh_auto_build
One gotcha with this approach is that to generate locales you need
the "locales" package installed; "locales-all" is insufficient, even
though the latter has "Provides: locales". :\ This is bug #788352.
If someone packaged localehelper[0] (hint, hint), then you could replace
these 5 lines with simple:
localehelper LC_ALL=en_US.UTF_8 dh_auto_build
and wouldn't have to worry about "locales" vs "locales-all".
[0] http://jwilk.net/software/localehelper
--
Jakub Wilk