Thread View: linux.debian.bugs.dist
3 messages
3 total messages
Started by Simon Richter
Fri, 06 Nov 2026 19:50
Bug#1068615: pbuilder will overwrite LANG/LC_ALL if they are set via config file
Author: Simon Richter
Date: Fri, 06 Nov 2026 19:50
Date: Fri, 06 Nov 2026 19:50
99 lines
5074 bytes
5074 bytes
Package: pbuilder
Version: 0.231.1
Followup-For: Bug #1068615
X-Debbugs-Cc: sjr@debian.org
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Hi,
this is still a problem, but it could be mitigated a bit by setting LANG
only and clearing all LC_* variables including LC_ALL.
Curl understands that they need an UTF-8 locale, so they build-depend on
locales-all and explicitly set LANG=en_US.UTF-8 for the Unicode tests, but
this doesn't work if LC_ALL then overrides it.
IMO, setting LC_ALL for a build is wrong.
Whether LANG should be "C" or "C.UTF-8" is a separate question -- but it
should not matter, reproducible-builds already builds with an obscure LANG
setting.
In any case, pbuilder-modules is the wrong place to set it, it needs to be
changed in pbuilder-buildpackage where the ENV_PREFIX is put together,
because that is the environment actually used for the build.
I'd probably do the radical thing and clear the environment, then
explicitly add those that should be set:
so instead of
ENV_PREFIX="env PATH=\"$PATH\" HOME=\"$BUILD_HOME\""
I'd use something like
ENV_PREFIX="env -i PATH=\"$PATH\" HOME=\"$BUILD_HOME\" LANG=C"
if [ -n "$DEB_BUILD_OPTIONS" ]
then
ENV_PREFIX+=" DEB_BUILD_OPTIONS=\"$DEB_BUILD_OPTIONS\""
fi
if [ -n "$DEB_BUILD_PROFILES" ]
then
ENV_PREFIX+=" DEB_BUILD_PROFILES=\"$DEB_BUILD_PROFILES\""
fi
I suspect the reproducible-builds people will want an explicit mechanism
here to set up weird variables, and there might be other variables we might
want to pass through, like $TERM (for interactive hooks) or $LOGNAME, so
that might need more thought than I am capable of on a Saturday morning at
5 AM.
Simon
- -- System Information:
Debian Release: 13.7
APT prefers stable-security
APT policy: (990, 'stable-security'), (990, 'stable'), (500, 'stable-debug')
Architecture: amd64 (x86_64)
Foreign Architectures: i386, riscv64
Kernel: Linux 7.2.11+deb13-amd64 (SMP w/8 CPU threads; PREEMPT)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: sysvinit (via /sbin/init)
LSM: AppArmor: enabled
Versions of packages pbuilder depends on:
ii cdebootstrap 0.7.9+b13
ii debconf [debconf-2.0] 1.5.91
ii debootstrap 1.0.141
ii dpkg-dev 1.22.22
ii mount 2.41.5-0+deb13u1
Versions of packages pbuilder recommends:
ii devscripts 2.26.11~bpo13+1
ii eatmydata 131-2
ii fakeroot 1.37.1.1-1
ii iproute2 6.15.0-1
ii net-tools 2.10-1.3
ii sudo 1.9.16p2-3+deb13u2
Versions of packages pbuilder suggests:
pn cowdancer <none>
pn gdebi-core <none>
- -- debconf information excluded
-----BEGIN PGP SIGNATURE-----
iQFDBAEBCgAtFiEEtjuqOJSXmNjSiX3Tfr04e7CZCBEFAmruLvEPHHNqckBkZWJp
YW4ub3JnAAoJEH69OHuwmQgR/HQH+gPbDhMIZSjUYngxS4ezJfgvvmP4wv9k8Xes
vGjejiLupOgkRUFKhQKPjW4iVe//4u4bo6kwfWN5JimcvxVj6P8T9Lmql1ipG1Ae
uKddn3EoLhkDTJL1jmlOZXcUM9uEJFd+0hu6W02sZLbQompy3XQwh85IeN7hxcSR
mmrM8HpiVQJfth+RP9I7LJUolJU9/SHVTqOkTGTfXsexqkgroQa6dPEjfObVTTBw
dxCAGIkXIcFGbNBQ3w0RIZxN4fMIJq4EllfveDDyp7/LbXuOJ7dSizwMNHIzqfPc
R+hO7ETwSJ6NJe5PIhK4ruv+c3oHtrhkSUCSAsXNC9qa9v2uIsQ=
=nFem
-----END PGP SIGNATURE-----
Bug#1068615: pbuilder will overwrite LANG/LC_ALL if they are set via config file
Author: Thorsten Glaser
Date: Fri, 06 Nov 2026 22:00
Date: Fri, 06 Nov 2026 22:00
24 lines
3286 bytes
3286 bytes
On Sat, 7 Nov 2026, Simon Richter wrote: >Curl understands that they need an UTF-8 locale, so they build-depend on >locales-all and explicitly set LANG=en_US.UTF-8 for the Unicode tests, but >this doesn't work if LC_ALL then overrides it. Thatβs a bug in the curl source package. Reproducible-Builds even checks with differing locales, so if the build needs any special locale (or, IMHO, always), it must set (and export) that from its debian/rules. Not the pbuilder maintainer, but ran into that recently when looking for something else in repro-builds. bye, //mirabilos -- https://toot.mirbsd.org/@mirabilos/statuses/01KNQD9RNZM1Z2A61AZHG857MP β long list of references on why βAIβ/LLMs are bad for everyone also: β from https://toot.cat/@dthompson/117180306961006760 > "responsible LLM usage" is the "clean coal" of the tech world
Bug#1068615: pbuilder will overwrite LANG/LC_ALL if they are set via config file
Author: Simon Richter
Date: Sat, 07 Nov 2026 03:40
Date: Sat, 07 Nov 2026 03:40
71 lines
5895 bytes
5895 bytes
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------fV32k5KonEn2hz6DhkRP7hLy Content-Type: multipart/mixed; boundary="------------X0FDzx5MkZtNIa67rYEGwE04"; protected-headers="v1"; hp="clear" Message-ID: <72f4a1e9-b5cf-4b63-8467-29e2c2a4f3b0@debian.org> Date: Sat, 7 Nov 2026 12:28:37 +0900 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Bug#1068615: pbuilder will overwrite LANG/LC_ALL if they are set via config file To: 1068615@bugs.debian.org References: <87plv0h729.fsf@debian.org> <179399448152.14614.4018345663106535662.reportbug@lime.hogyros.de> <a8269b6e-cd4a-c571-85b9-a60a678e20a7@debian.org> Content-Language: en-US From: Simon Richter <sjr@debian.org> In-Reply-To: <a8269b6e-cd4a-c571-85b9-a60a678e20a7@debian.org> --------------X0FDzx5MkZtNIa67rYEGwE04 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: base64 SGksDQoNCk9uIDExLzcvMjYgMDY6NTQsIFRob3JzdGVuIEdsYXNlciB3cm90ZToNCg0KPj4g Q3VybCB1bmRlcnN0YW5kcyB0aGF0IH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BidXQgcGJ1aWxkZXIncyBkZWZhdWx0IHNob3VsZG4ndCBiZSANCnRvIHRyaWdnZXIgdXBz dHJlYW0gYnVncyB0aGF0IGFyZW4ndCBhbHNvIHRyaWdnZXJlZCBieSBzYnVpbGQuDQoNCj4g UmVwcm9kdWNpYmxlLUJ1aWxkcyBldmVuIGNoZWNrcyB3aXRoIGRpZmZlcmluZyBsb2NhbGVz LA0KPiBzbyBpZiB0aGUgYnVpbGQgbmVlZHMgYW55IHNwZWNpYWwgbG9jYWxlIChvciwgSU1I TywgYWx3YXlzKSwNCj4gaXQgbXVzdCBzZXQgKGFuZCBleHBvcnQpIHRoYXQgZnJvbSBpdHMg ZGViaWFuL3J1bGVzLg0KDQpZZXMsIGRpZmZlcmVudCBMQU5HLCBidXQgbm90IGRpZmZlcmVu dCBMQ19BTEwuDQoNCiJXZSBoYXZlIHNldCB0aGUgY29ycmVjdCBsb2NhbGUsIGJ1dCB0aGUg dXNlciBvdmVycm9kZSBpdCIgaXMgdXNlciANCmVycm9yLCBub3QgdGhlIHBhY2thZ2UgZmFp bGluZyB0byByZW1vdmUgdGhlIHVzZXIncyBhdXRvbm9teSBieSANCm92ZXJyaWRpbmcgdGhl IG92ZXJyaWRlIG1lY2hhbmlzbS4NCg0KcGJ1aWxkZXIgdXNpbmcgYSBtZWNoYW5pc20gdGhh dCBpcyBtZWFudCBmb3IgdXNlciBvdmVycmlkZXMgaXMgYSBidWcuDQoNCiAgICBTaW1vbg0K --------------X0FDzx5MkZtNIa67rYEGwE04-- --------------fV32k5KonEn2hz6DhkRP7hLy Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEtjuqOJSXmNjSiX3Tfr04e7CZCBEFAmrumuUACgkQfr04e7CZ CBG5fQf/cG3xjYn/zPitCqJiNHYyzkZXMtSRKbOR5IihhQ54KC2thCQp/VqzSFpD I3ZDsjTJKjqLLioprGhxzWSNBPauP4kljoj7L3J74uLHf3jRy4527k9xM6QOhXIP a6V0bx01hDvxx3ttjAxZF+A7YXJcez0mwCe3NLHzL/uJgqTCNDyjtG8/C9r5aPKG WO4utuOxrp46hRHnOrBXDGXvu6fI98+Sr0tm7GnMESpvC9rKVJpJobm0ehIbX+fJ 3zbXfnbv7tnV17gblYEPC4WkPUJEJU+Y6Mj3cmYZ/CDpQ0m90Vfwi3ZlikysrVDI Ov5eeN9bMkJzargr4mM/vDCXLHOyOg== =WjEF -----END PGP SIGNATURE----- --------------fV32k5KonEn2hz6DhkRP7hLy--
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads