[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[atomic-devel] [PATCH] Use install-langs, and trim locale set



This matches what the current Fedora cloud image does.  The idea is
that Atomic is minimal infrastructure designed to run on many nodes;
if you want things like translations, you'd install a mainline system.

Only the very latest rpm-ostree (git master as of 20141114) supports
this.
---
 fedora-atomic-docker-host.json |  4 ++++
 treecompose-post.sh            | 10 ++++++++++
 2 files changed, 14 insertions(+)
 create mode 100755 treecompose-post.sh

From 58149d91565d4fa3587d9260d6d5ecfe75888348 Mon Sep 17 00:00:00 2001
From: Colin Walters <walters verbum org>
Date: Fri, 14 Nov 2014 15:34:28 -0500
Subject: [PATCH] Use install-langs, and trim locale set

This matches what the current Fedora cloud image does.  The idea is
that Atomic is minimal infrastructure designed to run on many nodes;
if you want things like translations, you'd install a mainline system.

Only the very latest rpm-ostree (git master as of 20141114) supports
this.
---
 fedora-atomic-docker-host.json |  4 ++++
 treecompose-post.sh            | 10 ++++++++++
 2 files changed, 14 insertions(+)
 create mode 100755 treecompose-post.sh

diff --git a/fedora-atomic-docker-host.json b/fedora-atomic-docker-host.json
index 395f5a3..ecc1a19 100644
--- a/fedora-atomic-docker-host.json
+++ b/fedora-atomic-docker-host.json
@@ -7,6 +7,10 @@
 
     "bootstrap_packages": ["filesystem"],
 
+    "install-langs": ["en_US"],
+
+    "postprocess-script": "treecompose-post.sh",
+
     "packages": ["glibc", "nss-altfiles", "shadow-utils",
 		 "fedora-release",
 		 "dracut-config-generic", "kernel", "rpm-ostree", "lvm2",
diff --git a/treecompose-post.sh b/treecompose-post.sh
new file mode 100755
index 0000000..b7633ec
--- /dev/null
+++ b/treecompose-post.sh
@@ -0,0 +1,10 @@
+#!/usr/bin/env bash
+
+set -e
+
+# See: https://bugzilla.redhat.com/show_bug.cgi?id=1051816
+KEEPLANG=en_US
+find /usr/share/locale -mindepth  1 -maxdepth 1 -type d -not -name "${KEEPLANG}" -exec rm -rf {} +
+localedef --list-archive | grep -v ^"${KEEPLANG}" | xargs localedef --delete-from-archive
+mv -f /usr/lib/locale/locale-archive /usr/lib/locale/locale-archive.tmpl
+build-locale-archive
-- 
1.8.3.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]