From f6208dd207e8f23dec9fff32ef2cf2728bd22364 Mon Sep 17 00:00:00 2001 From: Jonas Witschel Date: Fri, 3 Jun 2022 17:19:10 +0200 Subject: [PATCH] upgpkg: glibc 2.35-6: package C.UTF-8 locale to be available by default C.UTF-8 is a Unicode aware default locale that is available since glibc 2.35 (https://sourceware.org/glibc/wiki/Proposals/C.UTF-8). It is not directly built into glibc like the C locale yet, however projects like systemd start relying on its existence (https://github.com/systemd/systemd/pull/23192). Therefore let us ship C.UTF-8 with glibc so that it is available by default, like other major distributions already do. This requires pregenerating the locale using localedef and installing it to /usr/lib/locale/. Our custom locale-gen script also needs an updated to avoid removing this locale during updates (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=626575). --- trunk/PKGBUILD | 12 ++++++++++-- trunk/locale-gen | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/trunk/PKGBUILD b/trunk/PKGBUILD index aa64c04..592b47f 100644 --- a/trunk/PKGBUILD +++ b/trunk/PKGBUILD @@ -10,7 +10,7 @@ pkgbase=glibc pkgname=(glibc lib32-glibc) pkgver=2.35 _commit=28ea43f8d64f0dd1f2de75525157730e1532e600 -pkgrel=5 +pkgrel=6 arch=(x86_64) url='https://www.gnu.org/software/libc' license=(GPL LGPL) @@ -27,7 +27,7 @@ validpgpkeys=(7273542B39962DF7B299931416792B4EA25340F8 # Carlos O'Donell BC7C7372637EC10C57D7AA6579C43DFBF1CF2187) # Siddhesh Poyarekar b2sums=('SKIP' '46d533d25c7a2ce4ae75d452eee7ebb8e3ce4d191af9be3daa43718b78cb81d33cfd8046a117a15d87de9f5e940448c66005b0490515bf731c9e4691c53908d6' - '1f6d927b4972220b1c00abee5329c5d6bc01ed5bee57b20db0c7d7433292f7d666b02baf9968267f8e378b1f3bb273e8eef0ccbf22d21400ac36949d7615a474' + '04fbb3b0b28705f41ccc6c15ed5532faf0105370f22133a2b49867e790df0491f5a1255220ff6ebab91a462f088d0cf299491b3eb8ea53534cb8638a213e46e3' '7c265e6d36a5c0dff127093580827d15519b6c7205c2e1300e82f0fb5b9dd00b6accb40c56581f18179c4fbbc95bd2bf1b900ace867a83accde0969f7b609f8a' 'a6a5e2f2a627cc0d13d11a82458cfd0aa75ec1c5a3c7647e5d5a3bb1d4c0770887a3909bfda1236803d5bc9801bfd6251e13483e9adf797e4725332cd0d91a0e' '214e995e84b342fe7b2a7704ce011b7c7fc74c2971f98eeb3b4e677b99c860addc0a7d91b8dc0f0b8be7537782ee331999e02ba48f4ccc1c331b60f27d715678' @@ -115,6 +115,9 @@ build() { echo "CFLAGS += -Wp,-D_FORTIFY_SOURCE=2" >> configparms make -O + # pregenerate C.UTF-8 locale until it is built into glibc + # (https://sourceware.org/glibc/wiki/Proposals/C.UTF-8, FS#74864) + locale/localedef -c -f ../glibc/localedata/charmaps/UTF-8 -i ../glibc/localedata/locales/C ../C.UTF-8/ } # Credits for skip_test() and check() @allanmcrae @@ -182,6 +185,11 @@ package_glibc() { sed -e '1,3d' -e 's|/| |g' -e 's|\\| |g' -e 's|^|#|g' \ "$srcdir/glibc/localedata/SUPPORTED" >> "$pkgdir/etc/locale.gen" + # install C.UTF-8 so that it is always available + install -dm755 "$pkgdir/usr/lib/locale" + cp -r "$srcdir/C.UTF-8" -t "$pkgdir/usr/lib/locale" + sed -i '/#C\.UTF-8 /d' "$pkgdir/etc/locale.gen" + # Provide tracing probes to libstdc++ for exceptions, possibly for other # libraries too. Useful for gdb's catch command. install -Dm644 "$srcdir/sdt.h" "$pkgdir/usr/include/sys/sdt.h" diff --git a/trunk/locale-gen b/trunk/locale-gen index 5aff344..ee88880 100755 --- a/trunk/locale-gen +++ b/trunk/locale-gen @@ -13,7 +13,7 @@ fi # Remove all old locale dir and locale-archive before generating new # locale data. -rm -rf /usr/lib/locale/* || true +rm -rf /usr/lib/locale/locale-archive || true umask 022 -- 2.36.1