On Thu, 2017-09-07 at 17:47:46 +0200, Michael Biebl wrote: > On Fri, 1 Sep 2017 10:57:42 +0200 Guillem Jover <guil...@debian.org> wrote: > > As long as the project considers debian/rules the main entry point to a > > package build, I'm not planning on predefining new general purpose > > environment variables from dpkg-buildpackage that would otherwise not > > be set by the builder. > > > > The distinction here would be something like LC_*, against something > > like CC on a cross-compilation, which you need to set no matter what. > > Having dozens, if not hundreds of packages set LC_ALL = C.UTF-8 in > debian/rules doesn't strike me as a great solution.
Well, "great solution" depends on what are we trying to achieve here and how. If that is measured by the amount of work, then perhaps it's not. But if it is measured by the increased resilience against the environment while not (even unintentionally) deteriorating our officially supported package build entry point (i.e. debian/rules), then probably yes. Also in many cases if this is an upstream build-system problem, it seems right that it gets detected, reported upstream and fixed there, because by setting this either from outside of the build process, from dpkg-buildpackage or even from inside debian/rules shadows those upstream problems. I've written about some of this in the past in <https://lists.debian.org/debian-devel/2012/02/msg00633.html> and <https://lists.debian.org/debian-devel/2013/05/msg00801.html>. > Guillem, if I understand you correctly you are against setting this via > dpkg-buildpackage. What would you suggest instead? As stated above, my objection is conditional on debian/rules still being our official build entry point interface. I'm not going to be an enabler of deteriorating the debian/rules interface (even if unintentionally). I see having either debian/rules or say dpkg-buildpackage as the only official build entry point interfaces both with pros and cons, and I'd be fine with either, *iff* the project decided to change its mind on this. Barring that, I guess the solutions that are kind of globalish and still preserve debian/rules, are to export LC_COLLATE=C.UTF-8 from one of the dpkg make fragments (or a new one) when the current Vendor is Debian or a derivative. Or to set it from debhelper. The first option has the con that it is limited by the amount of packages sourcing those files, the pro is that it is defined in the environment debian/rules is being run on. The second otion will have probably more reach, but might not cover all variables from within debian/rules as it will be used inside-out. Thanks, Guillem