Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/7] system: make the zoneinfo list a system option
  2014-03-03 22:10 [Buildroot] [PATCH 0/7 v3] Setting timezone for uClibc, and setting localtime Yann E. MORIN
@ 2014-03-03 22:10 ` Yann E. MORIN
  2014-03-03 22:10 ` [Buildroot] [PATCH 2/7] system: add selection of a default localtime Yann E. MORIN
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: Yann E. MORIN @ 2014-03-03 22:10 UTC (permalink / raw)
  To: buildroot

From: "Yann E. MORIN" <yann.morin.1998@free.fr>

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>

---
Note: because the tzdata package loses its prompt, it defaults
to 'n'. This means a user will loose his timezone settings,
unless he selects to install timezone info in the system
configuration menu.

We can not add a legacy option for that, or we'd get a circular
dependency. The only way we'd be fool-proof would be by renaming
the package altogether, and adding a legacy option for the old
name.
---
 Config.in.legacy         | 15 +++++++++++++++
 package/tzdata/Config.in | 23 +++--------------------
 package/tzdata/tzdata.mk |  4 ++--
 system/Config.in         | 22 ++++++++++++++++++++++
 4 files changed, 42 insertions(+), 22 deletions(-)

diff --git a/Config.in.legacy b/Config.in.legacy
index afcd3b1..5e2970a 100644
--- a/Config.in.legacy
+++ b/Config.in.legacy
@@ -184,6 +184,21 @@ config BR2_PACKAGE_XLIB_LIBPTHREAD_STUBS
 ###############################################################################
 comment "Legacy options removed in 2014.02"
 
+config BR2_TARGET_TZ_ZONELIST
+	default BR2_PACKAGE_TZDATA_ZONELIST if BR2_PACKAGE_TZDATA_ZONELIST != ""
+
+config BR2_PACKAGE_TZDATA_ZONELIST
+	string "tzdata: the timezone list option has been renamed"
+	help
+	  The option BR2_PACKAGE_TZDATA_ZONELIST has been renamed to
+	  BR2_TARGET_TZ_ZONELIST, and moved to the "System configuration"
+	  menu. You'll need to select BR2_TARGET_TZ_INFO.
+
+config BR2_PACKAGE_TZDATA_ZONELIST_WRAP
+	bool
+	default y if BR2_PACKAGE_TZDATA_ZONELIST != ""
+	select BR2_LEGACY
+
 config BR2_sh2
 	bool "sh2 support removed"
 	help
diff --git a/package/tzdata/Config.in b/package/tzdata/Config.in
index 1be6814..1e6cc0f 100644
--- a/package/tzdata/Config.in
+++ b/package/tzdata/Config.in
@@ -1,26 +1,9 @@
-comment "tzdata needs an (e)glibc toolchain"
-	depends on !BR2_TOOLCHAIN_USES_GLIBC
+# This package is not meant to be user-visible.
+# It gets selected by BR2_TARGET_TZ in system/Config.in
 
 config BR2_PACKAGE_TZDATA
-	bool "tzdata"
-	depends on BR2_TOOLCHAIN_USES_GLIBC
+	bool
 	help
 	  Time zone database
 
 	  http://www.iana.org/time-zones/repository/tz-link.html
-
-if BR2_PACKAGE_TZDATA
-
-config BR2_PACKAGE_TZDATA_ZONELIST
-	string "Time zone list"
-	default "default"
-	help
-	  Space-separated list of time zones to compile.
-
-	  The value "default" includes all commonly used time zones. Note
-	  that this set consumes around 5.5M.
-
-	  The full list is the list of files in the time zone database source,
-	  not including the build and .tab files.
-
-endif
diff --git a/package/tzdata/tzdata.mk b/package/tzdata/tzdata.mk
index 1cb5b3f..b6f07e2 100644
--- a/package/tzdata/tzdata.mk
+++ b/package/tzdata/tzdata.mk
@@ -13,10 +13,10 @@ TZDATA_LICENSE = Public domain
 TZDATA_DEFAULT_ZONELIST = africa antarctica asia australasia backward etcetera \
 			europe factory northamerica pacificnew southamerica
 
-ifeq ($(call qstrip,$(BR2_PACKAGE_TZDATA_ZONELIST)),default)
+ifeq ($(call qstrip,$(BR2_TARGET_TZ_ZONELIST)),default)
 TZDATA_ZONELIST = $(TZDATA_DEFAULT_ZONELIST)
 else
-TZDATA_ZONELIST = $(call qstrip,$(BR2_PACKAGE_TZDATA_ZONELIST))
+TZDATA_ZONELIST = $(call qstrip,$(BR2_TARGET_TZ_ZONELIST))
 endif
 
 # Don't strip any path components during extraction.
diff --git a/system/Config.in b/system/Config.in
index 89578c5..7ea0208 100644
--- a/system/Config.in
+++ b/system/Config.in
@@ -265,6 +265,28 @@ config BR2_TARGET_GENERIC_GETTY_OPTIONS
 endmenu
 endif
 
+config BR2_TARGET_TZ_INFO
+	bool "Install timezone info"
+	depends on BR2_TOOLCHAIN_USES_GLIBC
+	select BR2_PACKAGE_TZDATA
+	help
+	  Say 'y' here to install timezone info.
+
+if BR2_TARGET_TZ_INFO
+
+config BR2_TARGET_TZ_ZONELIST
+	string "timezone list"
+	help
+	  Space-separated list of time zones to compile.
+
+	  The value "default" includes all commonly used time zones. Note
+	  that this set consumes around 5.5M.
+
+	  The full list is the list of files in the time zone database source,
+	  not including the build and .tab files.
+
+endif # BR2_TARGET_TZ_INFO
+
 config BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW
 	bool "remount root filesystem read-write during boot"
 	default y
-- 
1.8.3.2

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

* [Buildroot] [PATCH 2/7] system: add selection of a default localtime
  2014-03-03 22:10 [Buildroot] [PATCH 0/7 v3] Setting timezone for uClibc, and setting localtime Yann E. MORIN
  2014-03-03 22:10 ` [Buildroot] [PATCH 1/7] system: make the zoneinfo list a system option Yann E. MORIN
@ 2014-03-03 22:10 ` Yann E. MORIN
  2014-03-03 22:10 ` [Buildroot] [PATCH 3/7] tzdata: allow host build Yann E. MORIN
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: Yann E. MORIN @ 2014-03-03 22:10 UTC (permalink / raw)
  To: buildroot

From: "Yann E. MORIN" <yann.morin.1998@free.fr>

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
[alexandre.belloni: move from "tzdata" to "system configuration"]
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
[yann.morin.1998 at free.fr: move into the BR2_TARGET_TZ_INFO conditionnal block]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
 package/tzdata/tzdata.mk |  7 ++++++-
 system/Config.in         | 14 ++++++++++++++
 2 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/package/tzdata/tzdata.mk b/package/tzdata/tzdata.mk
index b6f07e2..c23b3df 100644
--- a/package/tzdata/tzdata.mk
+++ b/package/tzdata/tzdata.mk
@@ -39,8 +39,13 @@ define TZDATA_INSTALL_TARGET_CMDS
 	cp -a $(@D)/_output/* $(TARGET_DIR)/usr/share/zoneinfo
 	cd $(TARGET_DIR)/usr/share/zoneinfo;    \
 	for zone in posix/*; do                 \
-	    ln -sfn "$${zone}" "$${zone##*/}";    \
+	    ln -sfn "$${zone}" "$${zone##*/}";  \
 	done
+	if [ -n "$(BR2_TARGET_LOCALTIME)" ]; then                           \
+	    cd $(TARGET_DIR)/etc;                                           \
+	    ln -sf ../usr/share/zoneinfo/$(BR2_TARGET_LOCALTIME) localtime; \
+	    echo "$(BR2_TARGET_LOCALTIME)" >timezone;                       \
+	fi
 endef
 
 $(eval $(generic-package))
diff --git a/system/Config.in b/system/Config.in
index 7ea0208..008369f 100644
--- a/system/Config.in
+++ b/system/Config.in
@@ -285,6 +285,20 @@ config BR2_TARGET_TZ_ZONELIST
 	  The full list is the list of files in the time zone database source,
 	  not including the build and .tab files.
 
+config BR2_TARGET_LOCALTIME
+	string "default local time"
+	help
+	  The time zone to install as the default local time, expressed as a
+	  tzdata location, such as:
+	    GMT
+	    Europe/Paris
+	    America/New_York
+	    Pacific/Wallis
+	    ...
+
+	  If empty, no local time will be set, and the dates will be
+	  expressed in UTC.
+
 endif # BR2_TARGET_TZ_INFO
 
 config BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW
-- 
1.8.3.2

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

* [Buildroot] [PATCH 0/7 v3] Setting timezone for uClibc, and setting localtime
@ 2014-03-03 22:10 Yann E. MORIN
  2014-03-03 22:10 ` [Buildroot] [PATCH 1/7] system: make the zoneinfo list a system option Yann E. MORIN
                   ` (6 more replies)
  0 siblings, 7 replies; 11+ messages in thread
From: Yann E. MORIN @ 2014-03-03 22:10 UTC (permalink / raw)
  To: buildroot

From: "Yann E. MORIN" <yann.morin.1998@free.fr>

Hello All!

Here is a series that adds the possibility to:

  - install the timezone info for uClibc; currently, that was only
    supported for glibc or eglibc-based systems. Thanks to Alexandre's
    packaging of tzdump, we can generate zoneinfo for uClibc, too.

  - set a default localtime for the system, for both *glibc-based
    systems and uClibc-based systems.

Unfortunately, musl-based systems are still left behind for now.
This is not too bad, as musl is not yet widely available.

Regards,
Yann E. MORIN.


----------------------------------------------------------------
Alexandre Belloni (3):
      tzdata: allow host build
      tzdump: new host package
      tz: new package

Yann E. MORIN (4):
      system: make the zoneinfo list a system option
      system: add selection of a default localtime
      package/zic: install header
      system: allow setting the local timezone for uClibc

 Config.in.legacy         | 15 +++++++++++++++
 package/Config.in        |  1 +
 package/tz/Config.in     |  4 ++++
 package/tz/tz.mk         | 30 ++++++++++++++++++++++++++++++
 package/tzdata/Config.in | 23 +++--------------------
 package/tzdata/tzdata.mk | 31 ++++++++++++++++++++++++++++---
 package/tzdump/tzdump.mk | 24 ++++++++++++++++++++++++
 package/zic/zic.mk       |  2 ++
 system/Config.in         | 40 ++++++++++++++++++++++++++++++++++++++++
 9 files changed, 147 insertions(+), 23 deletions(-)
 create mode 100644 package/tz/Config.in
 create mode 100644 package/tz/tz.mk
 create mode 100644 package/tzdump/tzdump.mk

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH 3/7] tzdata: allow host build
  2014-03-03 22:10 [Buildroot] [PATCH 0/7 v3] Setting timezone for uClibc, and setting localtime Yann E. MORIN
  2014-03-03 22:10 ` [Buildroot] [PATCH 1/7] system: make the zoneinfo list a system option Yann E. MORIN
  2014-03-03 22:10 ` [Buildroot] [PATCH 2/7] system: add selection of a default localtime Yann E. MORIN
@ 2014-03-03 22:10 ` Yann E. MORIN
  2014-03-03 22:10 ` [Buildroot] [PATCH 4/7] package/zic: install header Yann E. MORIN
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: Yann E. MORIN @ 2014-03-03 22:10 UTC (permalink / raw)
  To: buildroot

From: Alexandre Belloni <alexandre.belloni@free-electrons.com>

uClibc uses its own format for timezone info. OTOH, we can generate
uClibc-compatible timezone info from existing tzdata.

Add a host-version of tzdata, so we can harvest its installed timezone
info.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
 package/tzdata/tzdata.mk | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/package/tzdata/tzdata.mk b/package/tzdata/tzdata.mk
index c23b3df..7a60c2c 100644
--- a/package/tzdata/tzdata.mk
+++ b/package/tzdata/tzdata.mk
@@ -48,4 +48,24 @@ define TZDATA_INSTALL_TARGET_CMDS
 	fi
 endef
 
+define HOST_TZDATA_EXTRACT_CMDS
+	gzip -d -c $(DL_DIR)/$(TZDATA_SOURCE) \
+		| $(TAR) --strip-components=0 -C $(@D) -xf -
+endef
+
+define HOST_TZDATA_BUILD_CMDS
+	(cd $(@D); \
+		for zone in $(TZDATA_ZONELIST); do \
+			$(ZIC) -d _output/posix -y yearistype.sh $$zone; \
+			$(ZIC) -d _output/right -L leapseconds -y yearistype.sh $$zone; \
+		done; \
+	)
+endef
+
+define HOST_TZDATA_INSTALL_CMDS
+	mkdir -p $(HOST_DIR)/usr/share/zoneinfo
+	cp -a $(@D)/_output/* $(HOST_DIR)/usr/share/zoneinfo
+endef
+
 $(eval $(generic-package))
+$(eval $(host-generic-package))
-- 
1.8.3.2

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

* [Buildroot] [PATCH 4/7] package/zic: install header
  2014-03-03 22:10 [Buildroot] [PATCH 0/7 v3] Setting timezone for uClibc, and setting localtime Yann E. MORIN
                   ` (2 preceding siblings ...)
  2014-03-03 22:10 ` [Buildroot] [PATCH 3/7] tzdata: allow host build Yann E. MORIN
@ 2014-03-03 22:10 ` Yann E. MORIN
  2014-03-07 22:39   ` Thomas Petazzoni
  2014-03-03 22:10 ` [Buildroot] [PATCH 5/7] tzdump: new host package Yann E. MORIN
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 11+ messages in thread
From: Yann E. MORIN @ 2014-03-03 22:10 UTC (permalink / raw)
  To: buildroot

From: "Yann E. MORIN" <yann.morin.1998@free.fr>

The incoming host-tzdump package requires the tzfile header,
so we isntall it.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
[yann.morin.1998 at free.fr: split zic header-install to its own cset]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
 package/zic/zic.mk | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/package/zic/zic.mk b/package/zic/zic.mk
index c9b6c7b..4814fba 100644
--- a/package/zic/zic.mk
+++ b/package/zic/zic.mk
@@ -22,6 +22,8 @@ endef
 define HOST_ZIC_INSTALL_CMDS
 	mkdir -p $(HOST_DIR)/usr/sbin
 	install -D -m 755 $(@D)/zic $(HOST_DIR)/usr/sbin/zic
+	mkdir -p $(HOST_DIR)/usr/include
+	install -D -m 644 $(@D)/tzfile.h $(HOST_DIR)/usr/include/tzfile.h
 endef
 
 $(eval $(host-generic-package))
-- 
1.8.3.2

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

* [Buildroot] [PATCH 5/7] tzdump: new host package
  2014-03-03 22:10 [Buildroot] [PATCH 0/7 v3] Setting timezone for uClibc, and setting localtime Yann E. MORIN
                   ` (3 preceding siblings ...)
  2014-03-03 22:10 ` [Buildroot] [PATCH 4/7] package/zic: install header Yann E. MORIN
@ 2014-03-03 22:10 ` Yann E. MORIN
  2014-03-03 22:10 ` [Buildroot] [PATCH 6/7] tz: new package Yann E. MORIN
  2014-03-03 22:10 ` [Buildroot] [PATCH 7/7] system: allow setting the local timezone for uClibc Yann E. MORIN
  6 siblings, 0 replies; 11+ messages in thread
From: Yann E. MORIN @ 2014-03-03 22:10 UTC (permalink / raw)
  To: buildroot

From: Alexandre Belloni <alexandre.belloni@free-electrons.com>

tzdump takes timezone info in the installed tzdata format, and
outputs timezone info parseable by uClibc.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
[yann.morin.1998 at free.fr: split zic header-install to its own cset]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
 package/tzdump/tzdump.mk | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100644 package/tzdump/tzdump.mk

diff --git a/package/tzdump/tzdump.mk b/package/tzdump/tzdump.mk
new file mode 100644
index 0000000..471a719
--- /dev/null
+++ b/package/tzdump/tzdump.mk
@@ -0,0 +1,24 @@
+################################################################################
+#
+# tzdump
+#
+################################################################################
+
+TZDUMP_VERSION = 65a10105564801094b18c3fcacf4dde4c44e4ab8
+TZDUMP_SITE = $(call github,alexandrebelloni,tzdump,$(TZDUMP_VERSION))
+TZDUMP_DEPENDENCIES = host-zic
+
+define HOST_TZDUMP_BUILD_CMDS
+	(cd $(@D) ;\
+		$(HOSTCC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o tzdump tzdump.c ; \
+	)
+endef
+
+define HOST_TZDUMP_INSTALL_CMDS
+	mkdir -p $(HOST_DIR)/usr/sbin
+	install -D -m 755 $(@D)/tzdump $(HOST_DIR)/usr/sbin/tzdump
+endef
+
+$(eval $(host-generic-package))
+
+TZDUMP = $(HOST_DIR)/usr/sbin/tzdump
-- 
1.8.3.2

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

* [Buildroot] [PATCH 6/7] tz: new package
  2014-03-03 22:10 [Buildroot] [PATCH 0/7 v3] Setting timezone for uClibc, and setting localtime Yann E. MORIN
                   ` (4 preceding siblings ...)
  2014-03-03 22:10 ` [Buildroot] [PATCH 5/7] tzdump: new host package Yann E. MORIN
@ 2014-03-03 22:10 ` Yann E. MORIN
  2014-03-03 22:10 ` [Buildroot] [PATCH 7/7] system: allow setting the local timezone for uClibc Yann E. MORIN
  6 siblings, 0 replies; 11+ messages in thread
From: Yann E. MORIN @ 2014-03-03 22:10 UTC (permalink / raw)
  To: buildroot

From: Alexandre Belloni <alexandre.belloni@free-electrons.com>

uClibc can not use timezone info from tzdata as-is, but accepts setting
the local timezone in /etc/TZ.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
[yann.morin.1998 at free.fr: make it a blind package; little tweak to help text]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
 package/Config.in    |  1 +
 package/tz/Config.in |  4 ++++
 package/tz/tz.mk     | 30 ++++++++++++++++++++++++++++++
 3 files changed, 35 insertions(+)
 create mode 100644 package/tz/Config.in
 create mode 100644 package/tz/tz.mk

diff --git a/package/Config.in b/package/Config.in
index 417c9b8..68d1f33 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -800,6 +800,7 @@ source "package/protobuf/Config.in"
 source "package/protobuf-c/Config.in"
 source "package/schifra/Config.in"
 source "package/startup-notification/Config.in"
+source "package/tz/Config.in"
 source "package/tzdata/Config.in"
 source "package/zlog/Config.in"
 endmenu
diff --git a/package/tz/Config.in b/package/tz/Config.in
new file mode 100644
index 0000000..943dc5c
--- /dev/null
+++ b/package/tz/Config.in
@@ -0,0 +1,4 @@
+config BR2_PACKAGE_TZ
+	bool
+	help
+	  Timezone info for uClibc.
diff --git a/package/tz/tz.mk b/package/tz/tz.mk
new file mode 100644
index 0000000..e74c41b
--- /dev/null
+++ b/package/tz/tz.mk
@@ -0,0 +1,30 @@
+################################################################################
+#
+# tz
+#
+################################################################################
+
+TZ_SOURCE =
+TZ_DEPENDENCIES = host-tzdata host-tzdump
+TZ_LICENSE = Public domain
+
+define TZ_BUILD_CMDS
+	(cd $(HOST_DIR)/usr/share/zoneinfo/posix/;                 \
+		for i in $$(find . -type f); do                    \
+			mkdir -p $(@D)/output/$$(dirname $$i);         \
+			$(TZDUMP) -p . -q $${i#./} > $(@D)/output/$$i; \
+		done                                               \
+	)
+endef
+
+define TZ_INSTALL_TARGET_CMDS
+	mkdir -p $(TARGET_DIR)/usr/share/zoneinfo/uclibc
+	cp -a $(@D)/output/* $(TARGET_DIR)/usr/share/zoneinfo/uclibc
+	if [ -n "$(BR2_TARGET_LOCALTIME)" ]; then                     \
+		ln -sf /usr/share/zoneinfo/uclibc/$(BR2_TARGET_LOCALTIME) \
+			$(TARGET_DIR)/etc/TZ;                                 \
+	fi
+
+endef
+
+$(eval $(generic-package))
-- 
1.8.3.2

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

* [Buildroot] [PATCH 7/7] system: allow setting the local timezone for uClibc
  2014-03-03 22:10 [Buildroot] [PATCH 0/7 v3] Setting timezone for uClibc, and setting localtime Yann E. MORIN
                   ` (5 preceding siblings ...)
  2014-03-03 22:10 ` [Buildroot] [PATCH 6/7] tz: new package Yann E. MORIN
@ 2014-03-03 22:10 ` Yann E. MORIN
  2014-03-03 22:20   ` Yann E. MORIN
  2014-03-03 22:26   ` [Buildroot] [PATCH] " Yann E. MORIN
  6 siblings, 2 replies; 11+ messages in thread
From: Yann E. MORIN @ 2014-03-03 22:10 UTC (permalink / raw)
  To: buildroot

From: "Yann E. MORIN" <yann.morin.1998@free.fr>

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
 system/Config.in | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/system/Config.in b/system/Config.in
index 008369f..cea9429 100644
--- a/system/Config.in
+++ b/system/Config.in
@@ -267,8 +267,10 @@ endif
 
 config BR2_TARGET_TZ_INFO
 	bool "Install timezone info"
-	depends on BR2_TOOLCHAIN_USES_GLIBC
-	select BR2_PACKAGE_TZDATA
+	# No timezone for musl; only for uClibc or (e)glibc.
+	depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_UCLIBC
+	select BR2_PACKAGE_TZDATA if BR2_TOOLCHAIN_USES_GLIBC
+	select BR2_PACKAGE_TZ if BR2_TOOLCHAIN_USES_UCLIBC
 	help
 	  Say 'y' here to install timezone info.
 
@@ -276,11 +278,13 @@ if BR2_TARGET_TZ_INFO
 
 config BR2_TARGET_TZ_ZONELIST
 	string "timezone list"
+	# Only valid for uClibc or (e)glibc
+	depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_UCLIBC
 	help
 	  Space-separated list of time zones to compile.
 
 	  The value "default" includes all commonly used time zones. Note
-	  that this set consumes around 5.5M.
+	  that this set consumes around 5.5M for (e)glibc and 2.1M for uClibc.
 
 	  The full list is the list of files in the time zone database source,
 	  not including the build and .tab files.
-- 
1.8.3.2

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

* [Buildroot] [PATCH 7/7] system: allow setting the local timezone for uClibc
  2014-03-03 22:10 ` [Buildroot] [PATCH 7/7] system: allow setting the local timezone for uClibc Yann E. MORIN
@ 2014-03-03 22:20   ` Yann E. MORIN
  2014-03-03 22:26   ` [Buildroot] [PATCH] " Yann E. MORIN
  1 sibling, 0 replies; 11+ messages in thread
From: Yann E. MORIN @ 2014-03-03 22:20 UTC (permalink / raw)
  To: buildroot

Alexandre, All,

Reviewing our own patch here:

On 2014-03-03 23:10 +0100, Yann E. MORIN spake thusly:
> From: "Yann E. MORIN" <yann.morin.1998@free.fr>
> 
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> ---
>  system/Config.in | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/system/Config.in b/system/Config.in
> index 008369f..cea9429 100644
> --- a/system/Config.in
> +++ b/system/Config.in
> @@ -267,8 +267,10 @@ endif
>  
>  config BR2_TARGET_TZ_INFO
>  	bool "Install timezone info"
> -	depends on BR2_TOOLCHAIN_USES_GLIBC
> -	select BR2_PACKAGE_TZDATA
> +	# No timezone for musl; only for uClibc or (e)glibc.
> +	depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_UCLIBC
> +	select BR2_PACKAGE_TZDATA if BR2_TOOLCHAIN_USES_GLIBC
> +	select BR2_PACKAGE_TZ if BR2_TOOLCHAIN_USES_UCLIBC
>  	help
>  	  Say 'y' here to install timezone info.
>  
> @@ -276,11 +278,13 @@ if BR2_TARGET_TZ_INFO
>  
>  config BR2_TARGET_TZ_ZONELIST
>  	string "timezone list"
> +	# Only valid for uClibc or (e)glibc
> +	depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_UCLIBC

Unneeded, it already 'depends on' BR2_TARGET_TZ_INFO (in an if-block),
so we do not need to repeat this here.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH] system: allow setting the local timezone for uClibc
  2014-03-03 22:10 ` [Buildroot] [PATCH 7/7] system: allow setting the local timezone for uClibc Yann E. MORIN
  2014-03-03 22:20   ` Yann E. MORIN
@ 2014-03-03 22:26   ` Yann E. MORIN
  1 sibling, 0 replies; 11+ messages in thread
From: Yann E. MORIN @ 2014-03-03 22:26 UTC (permalink / raw)
  To: buildroot

From: "Yann E. MORIN" <yann.morin.1998@free.fr>

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>

---
Changes v3 -> v4
  - do not double-depend on glibc||uClibc
---
 system/Config.in | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/system/Config.in b/system/Config.in
index 008369f..11656df 100644
--- a/system/Config.in
+++ b/system/Config.in
@@ -267,8 +267,10 @@ endif
 
 config BR2_TARGET_TZ_INFO
 	bool "Install timezone info"
-	depends on BR2_TOOLCHAIN_USES_GLIBC
-	select BR2_PACKAGE_TZDATA
+	# No timezone for musl; only for uClibc or (e)glibc.
+	depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_UCLIBC
+	select BR2_PACKAGE_TZDATA if BR2_TOOLCHAIN_USES_GLIBC
+	select BR2_PACKAGE_TZ if BR2_TOOLCHAIN_USES_UCLIBC
 	help
 	  Say 'y' here to install timezone info.
 
@@ -280,7 +282,7 @@ config BR2_TARGET_TZ_ZONELIST
 	  Space-separated list of time zones to compile.
 
 	  The value "default" includes all commonly used time zones. Note
-	  that this set consumes around 5.5M.
+	  that this set consumes around 5.5M for (e)glibc and 2.1M for uClibc.
 
 	  The full list is the list of files in the time zone database source,
 	  not including the build and .tab files.
-- 
1.8.3.2

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

* [Buildroot] [PATCH 4/7] package/zic: install header
  2014-03-03 22:10 ` [Buildroot] [PATCH 4/7] package/zic: install header Yann E. MORIN
@ 2014-03-07 22:39   ` Thomas Petazzoni
  0 siblings, 0 replies; 11+ messages in thread
From: Thomas Petazzoni @ 2014-03-07 22:39 UTC (permalink / raw)
  To: buildroot

Dear Yann E. MORIN,

On Mon,  3 Mar 2014 23:10:23 +0100, Yann E. MORIN wrote:
> From: "Yann E. MORIN" <yann.morin.1998@free.fr>
> 
> The incoming host-tzdump package requires the tzfile header,
> so we isntall it.
> 
> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> [yann.morin.1998 at free.fr: split zic header-install to its own cset]
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> ---
>  package/zic/zic.mk | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/package/zic/zic.mk b/package/zic/zic.mk
> index c9b6c7b..4814fba 100644
> --- a/package/zic/zic.mk
> +++ b/package/zic/zic.mk
> @@ -22,6 +22,8 @@ endef
>  define HOST_ZIC_INSTALL_CMDS
>  	mkdir -p $(HOST_DIR)/usr/sbin
>  	install -D -m 755 $(@D)/zic $(HOST_DIR)/usr/sbin/zic
> +	mkdir -p $(HOST_DIR)/usr/include
> +	install -D -m 644 $(@D)/tzfile.h $(HOST_DIR)/usr/include/tzfile.h
>  endef

Applied, thanks.

However, I've removed the mkdir -p line, which is useless because of
the use of install -D. And I've replaced install by $(INSTALL), was we
do in all other packages.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

end of thread, other threads:[~2014-03-07 22:39 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-03 22:10 [Buildroot] [PATCH 0/7 v3] Setting timezone for uClibc, and setting localtime Yann E. MORIN
2014-03-03 22:10 ` [Buildroot] [PATCH 1/7] system: make the zoneinfo list a system option Yann E. MORIN
2014-03-03 22:10 ` [Buildroot] [PATCH 2/7] system: add selection of a default localtime Yann E. MORIN
2014-03-03 22:10 ` [Buildroot] [PATCH 3/7] tzdata: allow host build Yann E. MORIN
2014-03-03 22:10 ` [Buildroot] [PATCH 4/7] package/zic: install header Yann E. MORIN
2014-03-07 22:39   ` Thomas Petazzoni
2014-03-03 22:10 ` [Buildroot] [PATCH 5/7] tzdump: new host package Yann E. MORIN
2014-03-03 22:10 ` [Buildroot] [PATCH 6/7] tz: new package Yann E. MORIN
2014-03-03 22:10 ` [Buildroot] [PATCH 7/7] system: allow setting the local timezone for uClibc Yann E. MORIN
2014-03-03 22:20   ` Yann E. MORIN
2014-03-03 22:26   ` [Buildroot] [PATCH] " Yann E. MORIN

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