public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Yaakov Selkowitz <yselkowi@redhat.com>
To: git-commits@fedoraproject.org
Subject: [flatpaks/flatpak-runtime] f45: Accept Locale extension
Date: Fri, 11 Sep 2026 14:43:22 GMT	[thread overview]
Message-ID: <178913780230.1.826862985450879512.flatpaks-flatpak-runtime-6be67b428ea8@fedoraproject.org> (raw)

            A new commit has been pushed.

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

            Log:
            Accept Locale extension

For now, this provides glibc-langpack-*, and hunspell and hyphen
dictionaries (aside from -en, which is included in the runtime).  The FD.o
Locale extension also includes l10n message catalogs, but that is not so
easily done with how these are built.

---
diff --git a/container-sdk.in.yaml b/container-sdk.in.yaml
index 6ac1268..98cebd4 100644
--- a/container-sdk.in.yaml
+++ b/container-sdk.in.yaml
@@ -36,6 +36,9 @@ flatpak:
             merge-dirs: share/vulkan/implicit_layer.d;share/vulkan/explicit_layer.d;
             subdirectories: true
             no-autodownload: true
+        @ID_PREFIX@.Platform.Locale:
+            directory: share/runtime/locale
+            autodelete: true
     finish-args: >
         --env=ALSA_CONFIG_DIR=/usr/share/alsa
         --env=ALSA_CONFIG_PATH=/usr/share/alsa/alsa.conf
@@ -96,4 +99,26 @@ 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
+        done
+        rm -f /usr/lib/locale/locale-archive*
+
+        cd /usr/share/hunspell
+        for f in *; do
+            l=`echo $f | sed -e 's/\([^-_\.]*\)[-_\.].*/\1/'`
+            case $l in en) continue ;; esac
+            rm -f $f
+            ln -sf ../runtime/locale/$l/hunspell/$f .
+        done
+        cd /usr/share/hyphen
+        for f in *; do
+            l=`echo $f | sed -e 's/hyph_\([^-_\.]*\)[-_\.].*/\1/'`
+            case $l in en) continue ;; esac
+            rm -f $f
+            ln -sf ../runtime/locale/$l/hyphen/$f .
+        done
+
     packages: []

diff --git a/container.in.yaml b/container.in.yaml
index 3ecb1e8..4cf2a84 100644
--- a/container.in.yaml
+++ b/container.in.yaml
@@ -36,6 +36,9 @@ flatpak:
             merge-dirs: share/vulkan/implicit_layer.d;share/vulkan/explicit_layer.d;
             subdirectories: true
             no-autodownload: true
+        @ID_PREFIX@.Platform.Locale:
+            directory: share/runtime/locale
+            autodelete: true
     finish-args: >
         --env=ALSA_CONFIG_DIR=/usr/share/alsa
         --env=ALSA_CONFIG_PATH=/usr/share/alsa/alsa.conf
@@ -97,4 +100,26 @@ 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
+        done
+        rm -f /usr/lib/locale/locale-archive*
+
+        cd /usr/share/hunspell
+        for f in *; do
+            l=`echo $f | sed -e 's/\([^-_\.]*\)[-_\.].*/\1/'`
+            case $l in en) continue ;; esac
+            rm -f $f
+            ln -sf ../runtime/locale/$l/hunspell/$f .
+        done
+        cd /usr/share/hyphen
+        for f in *; do
+            l=`echo $f | sed -e 's/hyph_\([^-_\.]*\)[-_\.].*/\1/'`
+            case $l in en) continue ;; esac
+            rm -f $f
+            ln -sf ../runtime/locale/$l/hyphen/$f .
+        done
+
     packages: []

diff --git a/package-notes.txt b/package-notes.txt
index a0dc89e..1c94a30 100644
--- a/package-notes.txt
+++ b/package-notes.txt
@@ -33,7 +33,8 @@ 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: until we figure out an extension system for this
+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
@@ -43,9 +44,6 @@ gsettings-desktop-schemas: W: data files
 gstreamer1-plugins-ugly-free: E: in base but not runtime
 gtk2-immodules: E: input method module
 hicolor-icon-theme: W: data files
-hunspell-es: EB: community runtime missing some subpackages
-hunspell-it: EB: nothing pulls it into runtime as of F41
-hyphen-it: EB: nothing pulls it into runtime as of F41
 ibus-gtk2: E: input method module
 info: F: pulled in by gzip
 jxl-pixbuf-loader: E: subpackage of libjxl already in base

diff --git a/tools/generate-container-yaml.py b/tools/generate-container-yaml.py
index f5db1d8..b5f8638 100755
--- a/tools/generate-container-yaml.py
+++ b/tools/generate-container-yaml.py
@@ -36,9 +36,19 @@ def update_container_yaml(template, output, list_file):
     container_yaml["flatpak"]["finish-args"] = folded(container_yaml["flatpak"]["finish-args"])
     container_yaml["flatpak"]["cleanup-commands"] = literal(container_yaml["flatpak"]["cleanup-commands"])
 
+    preload_packages = [
+        "flatpak-runtime-config",
+        "hunspell-??",
+        "hunspell-??-*",
+        "hunspell-???",
+        "hyphen-??",
+        "hyphen-??-*",
+        "hyphen-???",
+    ]
+
     with open(list_file) as f:
         packages: list[str | Any] = \
-            sorted(["flatpak-runtime-config"] + [line.strip() for line in f], key=str.lower)
+            sorted(preload_packages + [line.strip() for line in f], key=str.lower)
     print("{}: {} packages".format(template, len(packages)), file=sys.stderr)
 
     for i, package in enumerate(packages):

diff --git a/tools/list-files.py b/tools/list-files.py
index 8d01967..73b7846 100755
--- a/tools/list-files.py
+++ b/tools/list-files.py
@@ -38,8 +38,6 @@ for d in python_dirs:
 output_dir_recurse('/usr/share/aclocal')
 output_dir_recurse('/usr/share/cracklib')
 output_dir_recurse('/usr/share/fonts')
-output_dir_recurse('/usr/share/hunspell')
-output_dir_recurse('/usr/share/hyphen')
 output_dir_recurse('/usr/share/iso-codes')
 output_dir_recurse('/usr/share/terminfo')
 output_dir_recurse('/usr/share/themes')

                 reply	other threads:[~2026-09-11 14:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178913780230.1.826862985450879512.flatpaks-flatpak-runtime-6be67b428ea8@fedoraproject.org \
    --to=yselkowi@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox