All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/3] toolchain: purge locales by default
@ 2016-08-02 22:19 Thomas Petazzoni
  2016-08-02 22:19 ` [Buildroot] [PATCH 2/3] toolchain: reduce the list of locales to keep " Thomas Petazzoni
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2016-08-02 22:19 UTC (permalink / raw)
  To: buildroot

Our current default is to keep all locales installed in
/usr/share/locale/. However, in practice, those locales take up a
significant amount of space, and most users do not need
locales. Therefore, it makes more sense to default to purging locales,
in order to keep only a few useful ones rather than keeping them all.

It helps in providing a small filesystem size by default, and still
allows advanced users who really need locales to tune their
configuration.

As an example, a very basic system with just util-linux enabled (not
even Busybox) weights 11 MB, including 6.4 MB of locales. With this new
default, the generated system is only 4.2 MB.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 toolchain/toolchain-common.in | 1 +
 1 file changed, 1 insertion(+)

diff --git a/toolchain/toolchain-common.in b/toolchain/toolchain-common.in
index ff667c0..dae34ab 100644
--- a/toolchain/toolchain-common.in
+++ b/toolchain/toolchain-common.in
@@ -44,6 +44,7 @@ config BR2_TOOLCHAIN_SUPPORTS_PIE
 
 config BR2_ENABLE_LOCALE_PURGE
 	bool "Purge unwanted locales"
+	default y
 	help
 	  Explicitly specify what locales to install on target. If N
 	  then all locales supported by packages are installed.
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 2/3] toolchain: reduce the list of locales to keep by default
  2016-08-02 22:19 [Buildroot] [PATCH 1/3] toolchain: purge locales by default Thomas Petazzoni
@ 2016-08-02 22:19 ` Thomas Petazzoni
  2016-08-03 19:18   ` Peter Korsgaard
  2016-08-02 22:19 ` [Buildroot] [PATCH 3/3] system: move locale purging options to the "System configuration" menu Thomas Petazzoni
  2016-08-03 19:18 ` [Buildroot] [PATCH 1/3] toolchain: purge locales by default Peter Korsgaard
  2 siblings, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2016-08-02 22:19 UTC (permalink / raw)
  To: buildroot

Our current list of locales to keep by default is "C en_US de fr". It
doesn't make much sense to keep "de" and "fr" more than any other
language. So let's keep only the "C" and "en_US" locales by default,
and leave it to the user to specify other locales to keep if needed.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 toolchain/toolchain-common.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/toolchain/toolchain-common.in b/toolchain/toolchain-common.in
index dae34ab..77b4cb1 100644
--- a/toolchain/toolchain-common.in
+++ b/toolchain/toolchain-common.in
@@ -51,7 +51,7 @@ config BR2_ENABLE_LOCALE_PURGE
 
 config BR2_ENABLE_LOCALE_WHITELIST
 	string "Locales to keep"
-	default "C en_US de fr"
+	default "C en_US"
 	depends on BR2_ENABLE_LOCALE_PURGE
 	help
 	  Whitespace seperated list of locales to allow on target.
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 3/3] system: move locale purging options to the "System configuration" menu
  2016-08-02 22:19 [Buildroot] [PATCH 1/3] toolchain: purge locales by default Thomas Petazzoni
  2016-08-02 22:19 ` [Buildroot] [PATCH 2/3] toolchain: reduce the list of locales to keep " Thomas Petazzoni
@ 2016-08-02 22:19 ` Thomas Petazzoni
  2016-08-03 19:18   ` Peter Korsgaard
  2016-08-03 19:18 ` [Buildroot] [PATCH 1/3] toolchain: purge locales by default Peter Korsgaard
  2 siblings, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2016-08-02 22:19 UTC (permalink / raw)
  To: buildroot

The options to purge locales and to generate locale data are currently
located in the toolchain menu. However, these options are not really
related to the toolchain per-se, they are more system-level
configuration options, much like the timezone selection option we
already have in the "System configuration" menu.

Therefore, it makes more sense to have the locale-related options in
the "System configuration" menu as well.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 system/Config.in              | 34 ++++++++++++++++++++++++++++++++++
 toolchain/toolchain-common.in | 34 ----------------------------------
 2 files changed, 34 insertions(+), 34 deletions(-)

diff --git a/system/Config.in b/system/Config.in
index 4c05186..4c7efac 100644
--- a/system/Config.in
+++ b/system/Config.in
@@ -382,6 +382,40 @@ comment "automatic network configuration via DHCP needs ifupdown or busybox"
 
 endif # BR2_ROOTFS_SKELETON_DEFAULT
 
+config BR2_ENABLE_LOCALE_PURGE
+	bool "Purge unwanted locales"
+	default y
+	help
+	  Explicitly specify what locales to install on target. If N
+	  then all locales supported by packages are installed.
+
+config BR2_ENABLE_LOCALE_WHITELIST
+	string "Locales to keep"
+	default "C en_US"
+	depends on BR2_ENABLE_LOCALE_PURGE
+	help
+	  Whitespace seperated list of locales to allow on target.
+	  Locales not listed here will be removed from the target.
+	  See 'locale -a' on your host for a list of locales available
+	  on your build host, or have a look in /usr/share/locale in
+	  the target file system for available locales.
+
+	  Notice that listing a locale here doesn't guarantee that it
+	  will be available on the target - That purely depends on the
+	  support for that locale in the selected packages.
+
+config BR2_GENERATE_LOCALE
+	string "Generate locale data"
+	default ""
+	depends on \
+		(BR2_TOOLCHAIN_BUILDROOT_UCLIBC && BR2_ENABLE_LOCALE) || \
+		BR2_TOOLCHAIN_USES_GLIBC
+	help
+	  Generate support for a list of locales. Locales can be
+	  specified with or without encoding, when no encoding is
+	  specified, UTF-8 is assumed. Examples of locales: en_US,
+	  fr_FR.UTF-8.
+
 config BR2_TARGET_TZ_INFO
 	bool "Install timezone info"
 	# No timezone for musl; only for uClibc or glibc.
diff --git a/toolchain/toolchain-common.in b/toolchain/toolchain-common.in
index 77b4cb1..03fa880 100644
--- a/toolchain/toolchain-common.in
+++ b/toolchain/toolchain-common.in
@@ -42,40 +42,6 @@ config BR2_TOOLCHAIN_HAS_SSP
 config BR2_TOOLCHAIN_SUPPORTS_PIE
 	bool
 
-config BR2_ENABLE_LOCALE_PURGE
-	bool "Purge unwanted locales"
-	default y
-	help
-	  Explicitly specify what locales to install on target. If N
-	  then all locales supported by packages are installed.
-
-config BR2_ENABLE_LOCALE_WHITELIST
-	string "Locales to keep"
-	default "C en_US"
-	depends on BR2_ENABLE_LOCALE_PURGE
-	help
-	  Whitespace seperated list of locales to allow on target.
-	  Locales not listed here will be removed from the target.
-	  See 'locale -a' on your host for a list of locales available
-	  on your build host, or have a look in /usr/share/locale in
-	  the target file system for available locales.
-
-	  Notice that listing a locale here doesn't guarantee that it
-	  will be available on the target - That purely depends on the
-	  support for that locale in the selected packages.
-
-config BR2_GENERATE_LOCALE
-	string "Generate locale data"
-	default ""
-	depends on \
-		(BR2_TOOLCHAIN_BUILDROOT_UCLIBC && BR2_ENABLE_LOCALE) || \
-		BR2_TOOLCHAIN_USES_GLIBC
-	help
-	  Generate support for a list of locales. Locales can be
-	  specified with or without encoding, when no encoding is
-	  specified, UTF-8 is assumed. Examples of locales: en_US,
-	  fr_FR.UTF-8.
-
 config BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY
 	bool "Copy gconv libraries"
 	depends on BR2_TOOLCHAIN_USES_GLIBC
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 1/3] toolchain: purge locales by default
  2016-08-02 22:19 [Buildroot] [PATCH 1/3] toolchain: purge locales by default Thomas Petazzoni
  2016-08-02 22:19 ` [Buildroot] [PATCH 2/3] toolchain: reduce the list of locales to keep " Thomas Petazzoni
  2016-08-02 22:19 ` [Buildroot] [PATCH 3/3] system: move locale purging options to the "System configuration" menu Thomas Petazzoni
@ 2016-08-03 19:18 ` Peter Korsgaard
  2 siblings, 0 replies; 6+ messages in thread
From: Peter Korsgaard @ 2016-08-03 19:18 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 > Our current default is to keep all locales installed in
 > /usr/share/locale/. However, in practice, those locales take up a
 > significant amount of space, and most users do not need
 > locales. Therefore, it makes more sense to default to purging locales,
 > in order to keep only a few useful ones rather than keeping them all.

 > It helps in providing a small filesystem size by default, and still
 > allows advanced users who really need locales to tune their
 > configuration.

 > As an example, a very basic system with just util-linux enabled (not
 > even Busybox) weights 11 MB, including 6.4 MB of locales. With this new
 > default, the generated system is only 4.2 MB.

 > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 2/3] toolchain: reduce the list of locales to keep by default
  2016-08-02 22:19 ` [Buildroot] [PATCH 2/3] toolchain: reduce the list of locales to keep " Thomas Petazzoni
@ 2016-08-03 19:18   ` Peter Korsgaard
  0 siblings, 0 replies; 6+ messages in thread
From: Peter Korsgaard @ 2016-08-03 19:18 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 > Our current list of locales to keep by default is "C en_US de fr". It
 > doesn't make much sense to keep "de" and "fr" more than any other
 > language. So let's keep only the "C" and "en_US" locales by default,
 > and leave it to the user to specify other locales to keep if needed.

 > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 3/3] system: move locale purging options to the "System configuration" menu
  2016-08-02 22:19 ` [Buildroot] [PATCH 3/3] system: move locale purging options to the "System configuration" menu Thomas Petazzoni
@ 2016-08-03 19:18   ` Peter Korsgaard
  0 siblings, 0 replies; 6+ messages in thread
From: Peter Korsgaard @ 2016-08-03 19:18 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 > The options to purge locales and to generate locale data are currently
 > located in the toolchain menu. However, these options are not really
 > related to the toolchain per-se, they are more system-level
 > configuration options, much like the timezone selection option we
 > already have in the "System configuration" menu.

 > Therefore, it makes more sense to have the locale-related options in
 > the "System configuration" menu as well.

 > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-08-03 19:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-02 22:19 [Buildroot] [PATCH 1/3] toolchain: purge locales by default Thomas Petazzoni
2016-08-02 22:19 ` [Buildroot] [PATCH 2/3] toolchain: reduce the list of locales to keep " Thomas Petazzoni
2016-08-03 19:18   ` Peter Korsgaard
2016-08-02 22:19 ` [Buildroot] [PATCH 3/3] system: move locale purging options to the "System configuration" menu Thomas Petazzoni
2016-08-03 19:18   ` Peter Korsgaard
2016-08-03 19:18 ` [Buildroot] [PATCH 1/3] toolchain: purge locales by default Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.