* [Buildroot] [git commit] package/tzdata: install a default localtime
@ 2014-01-09 20:23 Peter Korsgaard
2014-01-09 23:22 ` Thomas Petazzoni
0 siblings, 1 reply; 5+ messages in thread
From: Peter Korsgaard @ 2014-01-09 20:23 UTC (permalink / raw)
To: buildroot
commit: http://git.buildroot.net/buildroot/commit/?id=f96e4d7f348ce1b7b53763f102bbedb1ef6a1991
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master
Add an option to install a default localtime.
since tzdata only makes sense for (e)glibc, we don't care
that we install timezone files that uClibc can't understand.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
package/tzdata/Config.in | 10 ++++++++++
package/tzdata/tzdata.mk | 8 +++++++-
2 files changed, 17 insertions(+), 1 deletions(-)
diff --git a/package/tzdata/Config.in b/package/tzdata/Config.in
index 1be6814..c0ede1f 100644
--- a/package/tzdata/Config.in
+++ b/package/tzdata/Config.in
@@ -23,4 +23,14 @@ config BR2_PACKAGE_TZDATA_ZONELIST
The full list is the list of files in the time zone database source,
not including the build and .tab files.
+config BR2_PACKAGE_TZDATA_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
diff --git a/package/tzdata/tzdata.mk b/package/tzdata/tzdata.mk
index 1cb5b3f..74263e1 100644
--- a/package/tzdata/tzdata.mk
+++ b/package/tzdata/tzdata.mk
@@ -39,8 +39,14 @@ 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_PACKAGE_TZDATA_LOCALTIME)" ]; then \
+ cd $(TARGET_DIR)/etc; \
+ ln -sf ../usr/share/zoneinfo/$(BR2_PACKAGE_TZDATA_LOCALTIME) \
+ localtime; \
+ echo "$(BR2_PACKAGE_TZDATA_LOCALTIME)" >timezone; \
+ fi
endef
$(eval $(generic-package))
^ permalink raw reply related [flat|nested] 5+ messages in thread* [Buildroot] [git commit] package/tzdata: install a default localtime
2014-01-09 20:23 [Buildroot] [git commit] package/tzdata: install a default localtime Peter Korsgaard
@ 2014-01-09 23:22 ` Thomas Petazzoni
2014-01-10 0:44 ` Alexandre Belloni
0 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2014-01-09 23:22 UTC (permalink / raw)
To: buildroot
Dear Peter Korsgaard,
On Thu, 9 Jan 2014 21:23:05 +0100, Peter Korsgaard wrote:
> commit: http://git.buildroot.net/buildroot/commit/?id=f96e4d7f348ce1b7b53763f102bbedb1ef6a1991
> branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master
>
> Add an option to install a default localtime.
>
> since tzdata only makes sense for (e)glibc, we don't care
> that we install timezone files that uClibc can't understand.
>
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
I know I should have raised my voice earlier, but I'm not entirely sure
about this one. Instead of having this as a tzdata specific option, I'd
very much prefer to have a "System configuration" option that allows to
set the default time zone, and which works for both glibc and uClibc.
Alexandre Belloni has posted some patches some time ago around time
zone handling with uClibc, it would have be great to have a better
integration here.
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [git commit] package/tzdata: install a default localtime
2014-01-09 23:22 ` Thomas Petazzoni
@ 2014-01-10 0:44 ` Alexandre Belloni
2014-01-28 21:26 ` Yann E. MORIN
0 siblings, 1 reply; 5+ messages in thread
From: Alexandre Belloni @ 2014-01-10 0:44 UTC (permalink / raw)
To: buildroot
On 10/01/2014 00:22, Thomas Petazzoni wrote:
> Dear Peter Korsgaard,
>
> On Thu, 9 Jan 2014 21:23:05 +0100, Peter Korsgaard wrote:
>> commit: http://git.buildroot.net/buildroot/commit/?id=f96e4d7f348ce1b7b53763f102bbedb1ef6a1991
>> branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master
>>
>> Add an option to install a default localtime.
>>
>> since tzdata only makes sense for (e)glibc, we don't care
>> that we install timezone files that uClibc can't understand.
>>
>> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
>> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
>
> I know I should have raised my voice earlier, but I'm not entirely sure
> about this one. Instead of having this as a tzdata specific option, I'd
> very much prefer to have a "System configuration" option that allows to
> set the default time zone, and which works for both glibc and uClibc.
>
> Alexandre Belloni has posted some patches some time ago around time
> zone handling with uClibc, it would have be great to have a better
> integration here.
>
Yeah, it is still on my todo list. I'm trying to get the timezone
specification generated automatically but it requires some host packages
and I still didn't take the time to do that correctly.
> Thanks,
>
> Thomas
>
--
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [git commit] package/tzdata: install a default localtime
2014-01-10 0:44 ` Alexandre Belloni
@ 2014-01-28 21:26 ` Yann E. MORIN
2014-02-05 2:01 ` Alexandre Belloni
0 siblings, 1 reply; 5+ messages in thread
From: Yann E. MORIN @ 2014-01-28 21:26 UTC (permalink / raw)
To: buildroot
Alexandre, All,
On 2014-01-10 01:44 +0100, Alexandre Belloni spake thusly:
> On 10/01/2014 00:22, Thomas Petazzoni wrote:
> > Dear Peter Korsgaard,
> >
> > On Thu, 9 Jan 2014 21:23:05 +0100, Peter Korsgaard wrote:
> >> commit: http://git.buildroot.net/buildroot/commit/?id=f96e4d7f348ce1b7b53763f102bbedb1ef6a1991
> >> branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master
> >>
> >> Add an option to install a default localtime.
> >>
> >> since tzdata only makes sense for (e)glibc, we don't care
> >> that we install timezone files that uClibc can't understand.
> >>
> >> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> >> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
> >
> > I know I should have raised my voice earlier, but I'm not entirely sure
> > about this one. Instead of having this as a tzdata specific option, I'd
> > very much prefer to have a "System configuration" option that allows to
> > set the default time zone, and which works for both glibc and uClibc.
> >
> > Alexandre Belloni has posted some patches some time ago around time
> > zone handling with uClibc, it would have be great to have a better
> > integration here.
> >
>
> Yeah, it is still on my todo list. I'm trying to get the timezone
> specification generated automatically but it requires some host packages
> and I still didn't take the time to do that correctly.
Ping? What's your status on this?
Since I'm interested in that as well, do you want to push your branch
somewhere, so I can pull from it and complete the missing bits?
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] 5+ messages in thread
end of thread, other threads:[~2014-02-05 2:01 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-09 20:23 [Buildroot] [git commit] package/tzdata: install a default localtime Peter Korsgaard
2014-01-09 23:22 ` Thomas Petazzoni
2014-01-10 0:44 ` Alexandre Belloni
2014-01-28 21:26 ` Yann E. MORIN
2014-02-05 2:01 ` Alexandre Belloni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox