On 07/06/24 14:32, Guillem Jover wrote:
Related to this, dpkg-buildpackage 1.20.0 gained a --sanitize-env,
which for now on Debian and derivatives sets LC_COLLATE=C.UTF-8 and
umask=0022.

That's great news!

But _iff_ we end up with dpkg-buildpackage being declared the only
supported entry point, [...]
Personally, I really appreciate how dpkg-buildpackage more and more provides a standardized API to/for building Debian packages.

However I would prefer to have this API explicitly described in Policy rather than hidden and implicitly defined by the code of a specific program.

What I propose is a new section in Policy [1] that explicitly lists all these environment requirements (umask, LC_*, SOURCE_DATE_EPOCH, TMPDIR, /bin/sh = POSIX shell + -n, etc). Each builder would then be changed to be conformant by default, with the option to steer away if desired (for example `dpkg-buildpackage --with-env-var LC_ALL=fr_FR.UTF-8`). This would create an uniform environment while preserving the ability to run d/rules with user-specific settings.

[1] Or any other similarly "binding" document.

Regards,

--
Gioele Barabucci

Reply via email to