public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [flatpaks/flatpak-runtime] f45: Fix locales
@ 2026-09-11 14:43 Yaakov Selkowitz
  0 siblings, 0 replies; only message in thread
From: Yaakov Selkowitz @ 2026-09-11 14:43 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : flatpaks/flatpak-runtime
            Branch : f45
            Commit : 433b1a716e2b78459f3c13daae3b7e245dee606d
            Author : Yaakov Selkowitz <yselkowi@redhat.com>
            Date   : 2026-03-02T21:13:17-05:00
            Stats  : +13/-12 in 4 file(s)
            URL    : https://src.fedoraproject.org/flatpaks/flatpak-runtime/c/433b1a716e2b78459f3c13daae3b7e245dee606d?branch=f45

            Log:
            Fix locales

Testing shows that 'locale-subset' (which is on by default for *.Locale)
does work as intended, installing only the selected locale(s) subdirectory.
However, `locale -a` prints locales which are aliases and do not have their
own glibc filesets.  Therefore, instead of using and then deleting
locale-archive (from glibc-all-langpacks), we install all glibc-langpack-*
and create symlinks based on actual files.  Also, C.utf8 needs to be included,
and *.utf8/LC_CTYPE symlinks fixed against it.

---
diff --git a/container-sdk.in.yaml b/container-sdk.in.yaml
index 112472c..4547706 100644
--- a/container-sdk.in.yaml
+++ b/container-sdk.in.yaml
@@ -120,12 +120,13 @@ flatpak:
         touch -d @0 /usr/share/fonts /usr/share/fonts/*
         fc-cache -rs
 
-        for l in `locale -a`; do
-            if [ ! -d /usr/lib/locale/$l ]; then
-                ln -s ../../share/runtime/locale/${l%_*}/lib/$l /usr/lib/locale/$l
-            fi
+        cd /usr/lib/locale
+        for d in *; do
+            l=`echo $d | sed -e 's/\([^-_\.]*\)[-_\.].*/\1/'`
+            case $l in C|en) continue ;; esac
+            find $d -delete
+            ln -sf ../../share/runtime/locale/$l/lib/$d .
         done
-        rm -f /usr/lib/locale/locale-archive*
 
         cd /usr/share/hunspell
         for f in *; do

diff --git a/container.in.yaml b/container.in.yaml
index a054ab0..5817fb9 100644
--- a/container.in.yaml
+++ b/container.in.yaml
@@ -111,12 +111,13 @@ flatpak:
         touch -d @0 /usr/share/fonts /usr/share/fonts/*
         fc-cache -rs
 
-        for l in `locale -a`; do
-            if [ ! -d /usr/lib/locale/$l ]; then
-                ln -s ../../share/runtime/locale/${l%_*}/lib/$l /usr/lib/locale/$l
-            fi
+        cd /usr/lib/locale
+        for d in *; do
+            l=`echo $d | sed -e 's/\([^-_\.]*\)[-_\.].*/\1/'`
+            case $l in C|en) continue ;; esac
+            find $d -delete
+            ln -sf ../../share/runtime/locale/$l/lib/$d .
         done
-        rm -f /usr/lib/locale/locale-archive*
 
         cd /usr/share/hunspell
         for f in *; do

diff --git a/package-notes.txt b/package-notes.txt
index b7697e7..9e3d067 100644
--- a/package-notes.txt
+++ b/package-notes.txt
@@ -32,8 +32,6 @@ flatpak-xdg-utils: EB: flatpak versions of xdg-email and xdg-open
 fmt: E: dependency of libdnf5, and because of that cannot be built for /app as dnf in koji buildroots can't use libraries installed in /app
 fonts-filesystem: W: data files
 glib-networking: W: no bins/libs
-glibc-all-langpacks: EB: used for enumerating the locales when building the runtime, and then deleted
-glibc-langpack-en: EB: only en is included in the runtime, others go into the Locale extension
 gnome-themes-extra: E: until we figure out an extension system for the themes
 gnome-user-docs: E: help content for various gnome flatpaks
 gnu-free-fonts-common: W: data files

diff --git a/tools/generate-container-yaml.py b/tools/generate-container-yaml.py
index b5f8638..a003152 100755
--- a/tools/generate-container-yaml.py
+++ b/tools/generate-container-yaml.py
@@ -38,6 +38,7 @@ def update_container_yaml(template, output, list_file):
 
     preload_packages = [
         "flatpak-runtime-config",
+        "glibc-langpack-*",
         "hunspell-??",
         "hunspell-??-*",
         "hunspell-???",

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-11 14:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-11 14:43 [flatpaks/flatpak-runtime] f45: Fix locales Yaakov Selkowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox