From 3c67a19376251770df11ab64d724f17beb1ad2f0 Mon Sep 17 00:00:00 2001 From: Tobias Powalowski Date: Thu, 20 Jun 2024 16:03:58 +0200 Subject: [PATCH] replace LANG with LC_ALL --- usr/bin/archboot-setup.sh | 1 - usr/bin/archboot-testsuite.sh | 1 - usr/lib/archboot/common.sh | 2 +- usr/lib/archboot/cpio/cpio.sh | 4 ++-- usr/lib/archboot/cpio/init.sh | 1 - usr/lib/archboot/release.sh | 4 ++-- usr/lib/archboot/update/desktop.sh | 4 ++-- usr/lib/archboot/update/manage.sh | 4 ++-- 8 files changed, 9 insertions(+), 12 deletions(-) diff --git a/usr/bin/archboot-setup.sh b/usr/bin/archboot-setup.sh index 4c785c317..d31b4b2c7 100755 --- a/usr/bin/archboot-setup.sh +++ b/usr/bin/archboot-setup.sh @@ -2,7 +2,6 @@ # SPDX-License-Identifier: GPL-3.0-or-later # created by Tobias Powalowski # source base and common first, contains basic parameters -LANG=C . /usr/lib/archboot/common.sh . /usr/lib/archboot/installer/common.sh . /usr/lib/archboot/installer/base.sh diff --git a/usr/bin/archboot-testsuite.sh b/usr/bin/archboot-testsuite.sh index 44ded8868..005f64064 100755 --- a/usr/bin/archboot-testsuite.sh +++ b/usr/bin/archboot-testsuite.sh @@ -2,7 +2,6 @@ # SPDX-License-Identifier: GPL-3.0-or-later # created by Tobias Powalowski . /usr/lib/archboot/common.sh -_LANG=C _LOG=testsuite.log _APPNAME=${0##*/} _usage () { diff --git a/usr/lib/archboot/common.sh b/usr/lib/archboot/common.sh index 09e7bd804..2bc69c872 100644 --- a/usr/lib/archboot/common.sh +++ b/usr/lib/archboot/common.sh @@ -264,7 +264,7 @@ _fix_network() { _create_archboot_db() { echo "Creating archboot repository db..." #shellcheck disable=SC2046 - LANG=C repo-add -q "${1}"/archboot.db.tar.gz $(fd -u -t f -E '*.sig' . "${1}"/) + LC_ALL=C.UTF-8 repo-add -q "${1}"/archboot.db.tar.gz $(fd -u -t f -E '*.sig' . "${1}"/) } _pacman_parameters() { diff --git a/usr/lib/archboot/cpio/cpio.sh b/usr/lib/archboot/cpio/cpio.sh index 25a892dad..f674b8534 100644 --- a/usr/lib/archboot/cpio/cpio.sh +++ b/usr/lib/archboot/cpio/cpio.sh @@ -252,8 +252,8 @@ _create_cpio() { fd . -u --min-depth 1 -X touch -hcd "@0" # use zstd only it has best compression and decompression fd . -u --min-depth 1 -0 | sort -z | - LANG=C bsdtar --null -cnf - -T - | - LANG=C bsdtar --null -cf - --format=newc @- | + LC_ALL=C.UTF-8 bsdtar --null -cnf - -T - | + LC_ALL=C.UTF-8 bsdtar --null -cf - --format=newc @- | zstd -T0 -19 > "${_GENERATE_IMAGE}" || _abort "Image creation failed!" popd >"${_NO_LOG}" || return } diff --git a/usr/lib/archboot/cpio/init.sh b/usr/lib/archboot/cpio/init.sh index 1e68253bf..e75dedcba 100755 --- a/usr/lib/archboot/cpio/init.sh +++ b/usr/lib/archboot/cpio/init.sh @@ -1,7 +1,6 @@ #!/usr/bin/bash # SPDX-License-Identifier: GPL-3.0-or-later # created by Tobias Powalowski -LANG=C _KVER="$(uname -r)" _ARCH="$(uname -m)" _TITLE="archboot.com | ${_ARCH} | ${_KVER} | Basic Setup | Early Userspace" diff --git a/usr/lib/archboot/release.sh b/usr/lib/archboot/release.sh index 8e5d073db..4704f15f0 100644 --- a/usr/lib/archboot/release.sh +++ b/usr/lib/archboot/release.sh @@ -38,8 +38,8 @@ _compress_initrd() { fd . -u --min-depth 1 -X touch -hcd "@0" # use zstd only it has best compression and decompression fd . -u --min-depth 1 -0 | sort -z | - LANG=C bsdtar --null -cnf - -T - | - LANG=C bsdtar --null -cf - --format=newc @- | + LC_ALL=C.UTF-8 bsdtar --null -cnf - -T - | + LC_ALL=C.UTF-8 bsdtar --null -cf - --format=newc @- | zstd -T0 -19 > "../../${1}" || exit 1 popd >"${_NO_LOG}" || return echo "Build complete." diff --git a/usr/lib/archboot/update/desktop.sh b/usr/lib/archboot/update/desktop.sh index 116cc4d85..288f1f720 100644 --- a/usr/lib/archboot/update/desktop.sh +++ b/usr/lib/archboot/update/desktop.sh @@ -25,7 +25,7 @@ _cleanup() { _run_pacman() { for i in ${1}; do #shellcheck disable=SC2086 - LANG=C pacman -Sy ${i} --noconfirm &>"${_LOG}" + LC_ALL=C.UTF-8 pacman -Sy ${i} --noconfirm &>"${_LOG}" if [[ ! -e "/.full_system" ]]; then _cleanup fi @@ -41,7 +41,7 @@ _IGNORE="" done fi #shellcheck disable=SC2086 - LANG=C pacman -Syu ${_IGNORE} --noconfirm &>"${_LOG}" + LC_ALL=C.UTF-8 pacman -Syu ${_IGNORE} --noconfirm &>"${_LOG}" if [[ ! -e "/.full_system" ]]; then _cleanup fi diff --git a/usr/lib/archboot/update/manage.sh b/usr/lib/archboot/update/manage.sh index 6e6d0a65d..e7a47b106 100644 --- a/usr/lib/archboot/update/manage.sh +++ b/usr/lib/archboot/update/manage.sh @@ -131,8 +131,8 @@ _create_initramfs() { cd "${_ROOTFS_DIR}" || exit 1 fd . -u --min-depth 1 -0 | sort -z | - LANG=C bsdtar --null -cnf - -T - | - LANG=C bsdtar --null -cf - --format=newc @- | + LC_ALL=C.UTF-8 bsdtar --null -cnf - -T - | + LC_ALL=C.UTF-8 bsdtar --null -cf - --format=newc @- | zstd --rm -T0> "${_RAM}/${_INITRD}" & sleep 2 while pgrep -x zstd &>"${_NO_LOG}"; do