Skip to contentSkip to conversation

Pull request for branch yem-misc

GIT PULL New Yann E. MORIN 3 participants 7 messages Feb 4, 2013 – Feb 26, 2013

lore
Share & tools
lore
#0 lore raw

Hello All!

This series is a based on Richard's tzdata initial series, with some fixes discussed today during the Developper's Day.

Changes since Richard's post:
- install POSIX time zones only once
- path to 'zic' is exported by the 'zic' package

The following changes since commit d3e7fbd75e49e3368b8c361c45344266ceca5cfd:

heirloom-mailx: needs fork() (2013-02-03 21:37:32 +0100)

are available in the git repository at:
git://gitorious.org/buildroot/buildroot.git yem-misc

Richard Braun (2):
package/zic: new host package
package/tzdata: new package

 package/Config.in                      |    1 +
 package/tzdata/Config.in               |   20 ++++++++++++++
 package/tzdata/tzdata.mk               |   46 ++++++++++++++++++++++++++++++++
 package/zic/zic-fix-dependencies.patch |   27 ++++++++++++++++++
 package/zic/zic.mk                     |   29 ++++++++++++++++++++
 5 files changed, 123 insertions(+), 0 deletions(-)
 create mode 100644 package/tzdata/Config.in
 create mode 100644 package/tzdata/tzdata.mk
 create mode 100644 package/zic/zic-fix-dependencies.patch
 create mode 100644 package/zic/zic.mk

Regards,
Yann E. MORIN

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'
#1 lore raw

PATCH 1/2 package/zic: new host package

From: Richard Braun <[email protected]>

This is the zone information compiler, used to compile the time zone database.

[yann.morin.1998 at free.fr: export ZIC for all to use]
---
 package/zic/zic-fix-dependencies.patch |   27 +++++++++++++++++++++++++++
 package/zic/zic.mk                     |   29 +++++++++++++++++++++++++++++
 2 files changed, 56 insertions(+), 0 deletions(-)
 create mode 100644 package/zic/zic-fix-dependencies.patch
 create mode 100644 package/zic/zic.mk
package/zic/zic-fix-dependencies.patch new file +27 -0
new file mode 100644
index 0000000..e1cbc12
@@ -0,0 +1,27 @@
+From 4a2a55a640dd9316dac5f31832064f28f59ab0ae Mon Sep 17 00:00:00 2001
+From: Richard Braun <[email protected]>
+Date: Fri, 4 Jan 2013 10:57:24 +0100
+Subject: [PATCH] zic: fix dependencies
+
+The yearistype script is provided by the tzdata package, and is required
+at runtime only.
+---
+ Makefile |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index d76a81e..30df7dc 100644
+--- a/Makefile
++++ b/Makefile
+@@ -349,7 +349,7 @@ version.h:
+ zdump:		$(TZDOBJS)
+ 		$(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(TZDOBJS) $(LDLIBS)
+ 
+-zic:		$(TZCOBJS) yearistype
++zic:		$(TZCOBJS)
+ 		$(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(TZCOBJS) $(LDLIBS)
+ 
+ yearistype:	yearistype.sh
+-- 
+1.7.2.5
+
package/zic/zic.mk new file +29 -0
new file mode 100644
index 0000000..3dec6af
@@ -0,0 +1,29 @@
+#############################################################
+#
+# zic
+#
+#############################################################
+
+ZIC_VERSION = 2012j
+ZIC_SOURCE = tzcode$(ZIC_VERSION).tar.gz
+ZIC_SITE = http://www.iana.org/time-zones/repository/releases
+ZIC_LICENSE = Public domain
+
+# Don't strip any path components during extraction.
+define HOST_ZIC_EXTRACT_CMDS
+	gzip -d -c $(DL_DIR)/$(ZIC_SOURCE) \
+		| $(TAR) --strip-components=0 -C $(@D) -xf -
+endef
+
+define HOST_ZIC_BUILD_CMDS
+	$(HOST_MAKE_ENV) $(MAKE) -C $(@D) zic
+endef
+
+define HOST_ZIC_INSTALL_CMDS
+	mkdir -p $(HOST_DIR)/usr/sbin
+	install -D -m 755 $(@D)/zic $(HOST_DIR)/usr/sbin/zic
+endef
+
+$(eval $(host-generic-package))
+
+ZIC = $(HOST_DIR)/usr/sbin/zic
Signature · 1 line
1.7.2.5
#2 lore raw

PATCH 2/2 package/tzdata: new package

In reply to Yann E. MORIN

From: Richard Braun <[email protected]>

This is the time zone database, used by glibc for translations between UTC and local time.

[yann.morin.1998 at free.fr: use global ZIC, install posix TZ only once]
---
 package/Config.in        |    1 +
 package/tzdata/Config.in |   20 ++++++++++++++++++++
 package/tzdata/tzdata.mk |   46 ++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 67 insertions(+), 0 deletions(-)
 create mode 100644 package/tzdata/Config.in
 create mode 100644 package/tzdata/tzdata.mk
package/Config.in +1 -0
index 2f219b6..090216e 100644
@@ -566,6 +566,7 @@ source "package/protobuf/Config.in"
 source "package/schifra/Config.in"
 source "package/startup-notification/Config.in"
 source "package/liblog4c-localtime/Config.in"
+source "package/tzdata/Config.in"
 endmenu
 
 menu "Text and terminal handling"
package/tzdata/Config.in new file +20 -0
new file mode 100644
index 0000000..4e68a97
@@ -0,0 +1,20 @@
+config BR2_PACKAGE_TZDATA
+	bool "tzdata"
+	depends on BR2_TOOLCHAIN_EXTERNAL_GLIBC || BR2_TOOLCHAIN_CTNG_eglibc || BR2_TOOLCHAIN_CTNG_glibc
+	help
+	  Time zone database
+
+	  http://www.iana.org/time-zones/repository/tz-link.html
+
+config BR2_PACKAGE_TZDATA_ZONELIST
+	string "Time zone list"
+	depends on BR2_PACKAGE_TZDATA
+	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.
package/tzdata/tzdata.mk new file +46 -0

46 lines not on this page · raw message

Signature · 1 line
1.7.2.5
#3 lore raw

PATCH 2/2 package/tzdata: new package

+define TZDATA_INSTALL_TARGET_CMDS

+       mkdir -p $(TARGET_DIR)/usr/share/zoneinfo
+       cp -a $(@D)/_output/* $(TARGET_DIR)/usr/share/zoneinfo
+       cd $(TARGET_DIR)/usr/share/zoneinfo;    \
+       for zone in posix/*; do                 \

+ ln -s "$${zone}" "$${zone##*/}"; \
+ done
+endef

Yann,

Today, a co-worker applied these patches, and ran into a small problem during the install phase. He had made a mistake while applying the companion zic patch, which caused the tzdata package to stop. Then, after he fixed his mistake, the tzdata failed to install, because the 'ln -s' failed to overwrite symlinks that already exist. So I think that it might be good to add an 'rm -f "$${zone##*/}";' before the 'ln -s'. (Or at least make it an 'ln -sf', though I personally am distrustful of 'ln -sf' due to sometimes unexpected behavior when the target of the symlink is a directory.)

Danomi -

#4 lore raw

PATCH 2/2 package/tzdata: new package

Quoted 11 lines · Danomi Manchego
package/tzdata/tzdata.mk new file +8 -0
+define TZDATA_INSTALL_TARGET_CMDS
+       mkdir -p $(TARGET_DIR)/usr/share/zoneinfo
+       cp -a $(@D)/_output/* $(TARGET_DIR)/usr/share/zoneinfo
+       cd $(TARGET_DIR)/usr/share/zoneinfo;    \
+       for zone in posix/*; do                 \
+           ln -s "$${zone}" "$${zone##*/}";    \
+       done
+endef

Yann,

Quoted 9 lines

Today, a co-worker applied these patches, and ran into a small problem during the install phase. He had made a mistake while applying the companion zic patch, which caused the tzdata package to stop. Then, after he fixed his mistake, the tzdata failed to install, because the 'ln -s' failed to overwrite symlinks that already exist. So I think that it might be good to add an 'rm -f "$${zone##*/}";' before the 'ln -s'. (Or at least make it an 'ln -sf', though I personally am distrustful of 'ln -sf' due to sometimes unexpected behavior when the target of the symlink is a directory.)

This is best fixed with ln -sfn. Sorry for not doing it in the first place.

Signature · 1 line
Richard Braun
#5 lore raw

PATCH 2/2 package/tzdata: new package

In reply to Danomi Manchego

Danomi, Richard, All,

Quoted 11 lines · On Tuesday 26 February 2013 Danomi Manchego wrote:
package/tzdata/tzdata.mk new file +8 -0
+define TZDATA_INSTALL_TARGET_CMDS
+       mkdir -p $(TARGET_DIR)/usr/share/zoneinfo
+       cp -a $(@D)/_output/* $(TARGET_DIR)/usr/share/zoneinfo
+       cd $(TARGET_DIR)/usr/share/zoneinfo;    \
+       for zone in posix/*; do                 \
+           ln -s "$${zone}" "$${zone##*/}";    \
+       done
+endef

Yann,

Quoted 9 lines

Today, a co-worker applied these patches, and ran into a small problem during the install phase. He had made a mistake while applying the companion zic patch, which caused the tzdata package to stop. Then, after he fixed his mistake, the tzdata failed to install, because the 'ln -s' failed to overwrite symlinks that already exist. So I think that it might be good to add an 'rm -f "$${zone##*/}";' before the 'ln -s'. (Or at least make it an 'ln -sf', though I personally am distrustful of 'ln -sf' due to sometimes unexpected behavior when the target of the symlink is a directory.)

OK, I'll apply Richard's "ln -sfn" fix, and re-submit. Thank you both for the feedback!

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'
#6 lore raw
In reply to Yann E. MORIN

Peter, All,

Quoted 9 lines · On Monday 04 February 2013 Yann E. MORIN wrote:

This series is a based on Richard's tzdata initial series, with some fixes discussed today during the Developper's Day.

Changes since Richard's post:
- install POSIX time zones only once
- path to 'zic' is exported by the 'zic' package

The following changes since commit d3e7fbd75e49e3368b8c361c45344266ceca5cfd:

Quoted 8 lines

heirloom-mailx: needs fork() (2013-02-03 21:37:32 +0100)

are available in the git repository at:
git://gitorious.org/buildroot/buildroot.git yem-misc

Richard Braun (2):
package/zic: new host package
package/tzdata: new package

Ping? This is material for the 'next' branch, of course! ;-)

Not re-spinning this series, since it has not changed. It's still in the patchwork.

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'