Closed cromerc closed 7 years ago
I have done some tests.
In mkchrootpkg, /etc/profile is explicitly sourced in the script that gets written to the chroot copy before makepkg starts. https://github.com/artix-linux/artools/blob/master/bin/mkchrootpkg.in#L208
The chroots are sanely created with export LANG=C
When /etc/profile gets sourced, for whatever reason, the LANG environment variable is not set and defaults to 'C'. It definitely sources /etc/profile.d/*, printing locale
after sourcing shows the other vars are set from /etc/profile.d/locale.sh.
Could there be systemd localectl be setting the LANG instead of explicitly exporting it in chrootbuild script that gets written in the chroot copy?
==> Making package: polkit 0.113+29+g3272a98-10 (Mon Aug 14 08:41:26 CEST 2017)
==> Retrieving sources...
-> Updating polkit git repo...
Fetching origin
-> Found 99-cromnix.rules
-> Found polkit-0.114-elogind.patch
==> Validating source files with sha256sums...
polkit ... Skipped
99-cromnix.rules ... Passed
polkit-0.114-elogind.patch ... Passed
LANG=C
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES=C
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
LC_ALL=
#!/bin/bash
_chrootbuild ()
{
. /etc/profile;
locale;
sudo -iu builduser bash -c 'cd /startdir; makepkg "$@"' -bash "$@"
}
_chrootbuild "$@" || exit
buildpkg is failing on the new version of udisks2 due to an incorrect locale setting.
I just chrooted into the copy chroot and root chroot and ran:
It is showing C, however when I open /etc/locale.conf it has this:
LANG=en_US.UTF-8
I was able to get udisks2 to compile by modifying the PKGBUILD and adding export LANG=en_US.UTF-8 https://github.com/artix-linux/world/commit/85a04322c18cf387f117097d449d8213d948803e
It also builds just fine with standard makepkg outside of the chroot since my LANG is set correctly.
This is the error:
And here is some information on the solution: https://stackoverflow.com/questions/10561923/unicodedecodeerror-ascii-codec-cant-decode-byte-0xef-in-position-1
By having LANG set with UTF8 it fixes these build errors.