diff options
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 11 | ||||
-rwxr-xr-x | cros-locale.sh | 22 |
3 files changed, 33 insertions, 4 deletions
@@ -1,7 +1,7 @@ pkgbase = cros-container-guest-tools-git pkgdesc = Guest tools for the Crostini containers on ChromeOS pkgver = r44.45e9b92 - pkgrel = 3 + pkgrel = 4 url = https://chromium.googlesource.com/chromiumos/containers/cros-container-guest-tools install = cros-container-guest-tools.install arch = any @@ -12,9 +12,11 @@ pkgbase = cros-container-guest-tools-git source = git+https://chromium.googlesource.com/chromiumos/containers/cros-container-guest-tools source = cros-sftp-conditions.conf source = cros-garcon-conditions.conf + source = cros-locale.sh sha1sums = SKIP sha1sums = 3a2c55ecb22349265f26cdd021a436f5e0353c3d sha1sums = f10f9da29d3015a5e232050d666efa72ef90c98f + sha1sums = b5a315f5b8f474a31dc3576efa3ef19881ec80d6 pkgname = cros-container-guest-tools-git @@ -1,7 +1,7 @@ _pkgname=cros-container-guest-tools pkgname=${_pkgname}-git pkgver=r44.45e9b92 -pkgrel=3 +pkgrel=4 pkgdesc="Guest tools for the Crostini containers on ChromeOS" arch=('any') license=('custom') @@ -13,10 +13,11 @@ optdepends=( ) install=cros-container-guest-tools.install url="https://chromium.googlesource.com/chromiumos/containers/cros-container-guest-tools" -source=("git+${url}" 'cros-sftp-conditions.conf' 'cros-garcon-conditions.conf') +source=("git+${url}" 'cros-sftp-conditions.conf' 'cros-garcon-conditions.conf' 'cros-locale.sh') sha1sums=('SKIP' '3a2c55ecb22349265f26cdd021a436f5e0353c3d' - 'f10f9da29d3015a5e232050d666efa72ef90c98f') + 'f10f9da29d3015a5e232050d666efa72ef90c98f' + 'b5a315f5b8f474a31dc3576efa3ef19881ec80d6') pkgver() { cd ${srcdir}/${_pkgname} @@ -29,6 +30,10 @@ package() { install -m644 -D ${srcdir}/${_pkgname}/LICENSE \ ${pkgdir}/usr/share/licenses/cros-container-guest-tools/LICENSE + # install locale fix (to override C.UTF-8 locale, set to container by termina) + install -m755 -D ${srcdir}/cros-locale.sh \ + ${pkgdir}/etc/profile.d/cros-locale.sh + # Create required folder structure for systemd units mkdir -p ${pkgdir}/usr/lib/systemd/user/default.target.wants mkdir -p ${pkgdir}/usr/lib/systemd/system/multi-user.target.wants diff --git a/cros-locale.sh b/cros-locale.sh new file mode 100755 index 000000000000..2165bf38dc85 --- /dev/null +++ b/cros-locale.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +# termina force debian-specifi C.UTF-8 locale inside the container when +# launched via the Terminal app. We want to override this and set locate +# defined inside container itself +if [ "$LANG" = "C.UTF-8" ]; then + if [ -n "$XDG_CONFIG_HOME" ] && [ -r "$XDG_CONFIG_HOME/locale.conf" ]; then + . "$XDG_CONFIG_HOME/locale.conf" + elif [ -n "$HOME" ] && [ -r "$HOME/.config/locale.conf" ]; then + . "$HOME/.config/locale.conf" + elif [ -r /etc/locale.conf ]; then + . /etc/locale.conf + fi +fi + +# define default LANG to C if not already defined +LANG=${LANG:-C} + +# export all locale (7) variables when they exist +export LANG LANGUAGE LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY \ + LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT \ + LC_IDENTIFICATION |