* [Buildroot] [PATCH 1/1] postgresql: add host-zic dependency
@ 2014-04-22 15:41 Peter Seiderer
2014-04-22 15:52 ` Thomas Petazzoni
0 siblings, 1 reply; 5+ messages in thread
From: Peter Seiderer @ 2014-04-22 15:41 UTC (permalink / raw)
To: buildroot
Fixes zic related build failure [1], patch suggested by
Yann E. MORIN [2].
[1] http://autobuild.buildroot.net/results/9ec69f92a48c1adc50bdb3096008243d842c27e6/
[2] http://lists.busybox.net/pipermail/buildroot/2014-April/094767.html
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
package/postgresql/postgresql.mk | 3 +++
1 file changed, 3 insertions(+)
diff --git a/package/postgresql/postgresql.mk b/package/postgresql/postgresql.mk
index 11b167a..2606e25 100644
--- a/package/postgresql/postgresql.mk
+++ b/package/postgresql/postgresql.mk
@@ -29,6 +29,9 @@ endif
ifeq ($(BR2_PACKAGE_TZDATA),y)
POSTGRESQL_DEPENDENCIES += tzdata
POSTGRESQL_CONF_OPT += --with-system-tzdata=/usr/share/zoneinfo
+else
+ POSTGRESQL_DEPENDENCIES += host-zic
+ POSTGRESQL_CONF_ENV += ZIC=$$(ZIC)
endif
ifeq ($(BR2_PACKAGE_OPENSSL),y)
--
1.8.1.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 1/1] postgresql: add host-zic dependency
2014-04-22 15:41 [Buildroot] [PATCH 1/1] postgresql: add host-zic dependency Peter Seiderer
@ 2014-04-22 15:52 ` Thomas Petazzoni
2014-04-22 16:41 ` Yann E. MORIN
0 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2014-04-22 15:52 UTC (permalink / raw)
To: buildroot
Dear Peter Seiderer,
On Tue, 22 Apr 2014 17:41:25 +0200, Peter Seiderer wrote:
> diff --git a/package/postgresql/postgresql.mk b/package/postgresql/postgresql.mk
> index 11b167a..2606e25 100644
> --- a/package/postgresql/postgresql.mk
> +++ b/package/postgresql/postgresql.mk
> @@ -29,6 +29,9 @@ endif
> ifeq ($(BR2_PACKAGE_TZDATA),y)
> POSTGRESQL_DEPENDENCIES += tzdata
> POSTGRESQL_CONF_OPT += --with-system-tzdata=/usr/share/zoneinfo
> +else
> + POSTGRESQL_DEPENDENCIES += host-zic
> + POSTGRESQL_CONF_ENV += ZIC=$$(ZIC)
> endif
I'm not entirely sure to understand how this works. If
BR2_PACKAGE_TZDATA is not enabled, where will host-zic find the
time-zone informations?
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] [PATCH 1/1] postgresql: add host-zic dependency
2014-04-22 15:52 ` Thomas Petazzoni
@ 2014-04-22 16:41 ` Yann E. MORIN
2014-04-22 18:21 ` Thomas Petazzoni
0 siblings, 1 reply; 5+ messages in thread
From: Yann E. MORIN @ 2014-04-22 16:41 UTC (permalink / raw)
To: buildroot
Thomas, All,
On 2014-04-22 17:52 +0200, Thomas Petazzoni spake thusly:
> Dear Peter Seiderer,
>
> On Tue, 22 Apr 2014 17:41:25 +0200, Peter Seiderer wrote:
>
> > diff --git a/package/postgresql/postgresql.mk b/package/postgresql/postgresql.mk
> > index 11b167a..2606e25 100644
> > --- a/package/postgresql/postgresql.mk
> > +++ b/package/postgresql/postgresql.mk
> > @@ -29,6 +29,9 @@ endif
> > ifeq ($(BR2_PACKAGE_TZDATA),y)
> > POSTGRESQL_DEPENDENCIES += tzdata
> > POSTGRESQL_CONF_OPT += --with-system-tzdata=/usr/share/zoneinfo
> > +else
> > + POSTGRESQL_DEPENDENCIES += host-zic
> > + POSTGRESQL_CONF_ENV += ZIC=$$(ZIC)
> > endif
>
> I'm not entirely sure to understand how this works. If
> BR2_PACKAGE_TZDATA is not enabled, where will host-zic find the
> time-zone informations?
host-zin only builds the 'zic' program, which pacakge can access using
$(ZIC), so host-zip (our package) does not need the tz-data itslef.
But postgresql needs the time zone info. It can use either the system
ones, or it has a limited set bundled in its source tree, in:
postgresql-9.3.3/src/timezone/data/
That's what the error message hints at:
When cross-compiling, either use the option --with-system-tzdata to use
existing time-zone data, or set the environment variable ZIC to a zic
program to use during the build.
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
* [Buildroot] [PATCH 1/1] postgresql: add host-zic dependency
2014-04-22 16:41 ` Yann E. MORIN
@ 2014-04-22 18:21 ` Thomas Petazzoni
0 siblings, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2014-04-22 18:21 UTC (permalink / raw)
To: buildroot
Dear Yann E. MORIN,
On Tue, 22 Apr 2014 18:41:08 +0200, Yann E. MORIN wrote:
> host-zin only builds the 'zic' program, which pacakge can access using
> $(ZIC), so host-zip (our package) does not need the tz-data itslef.
Right.
>
> But postgresql needs the time zone info. It can use either the system
> ones, or it has a limited set bundled in its source tree, in:
> postgresql-9.3.3/src/timezone/data/
What I'm worried about here is *precisely* that even though we build
our own host-zic, it might end up time zone infos from the host system.
And nowhere we check that these are available/sane/etc.
So I think we should either (1) ensure that PostgreSQL only uses its
one limited set of time zone data when --with-system-data is *not*
passed, or (2) always build with tzdata.
> That's what the error message hints at:
>
> When cross-compiling, either use the option --with-system-tzdata to use
> existing time-zone data, or set the environment variable ZIC to a zic
> program to use during the build.
Yes, I've read this error message. But I'm worried that just pointing
ZIC to a zic program is papering over the fact that we in this case
rely on the time zone info from the host system.
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] [PATCH 1/1] postgresql: add host-zic dependency
@ 2014-04-22 19:11 Peter Seiderer
0 siblings, 0 replies; 5+ messages in thread
From: Peter Seiderer @ 2014-04-22 19:11 UTC (permalink / raw)
To: buildroot
Hello Thomas, Yann,
On Tue, Apr 22, 2014 at 08:21:39PM +0200, Thomas Petazzoni wrote:
> Dear Yann E. MORIN,
>
> On Tue, 22 Apr 2014 18:41:08 +0200, Yann E. MORIN wrote:
>
> > host-zin only builds the 'zic' program, which pacakge can access using
> > $(ZIC), so host-zip (our package) does not need the tz-data itslef.
>
> Right.
>
> >
> > But postgresql needs the time zone info. It can use either the system
> > ones, or it has a limited set bundled in its source tree, in:
> > postgresql-9.3.3/src/timezone/data/
>
> What I'm worried about here is *precisely* that even though we build
> our own host-zic, it might end up time zone infos from the host system.
> And nowhere we check that these are available/sane/etc.
>
> So I think we should either (1) ensure that PostgreSQL only uses its
> one limited set of time zone data when --with-system-data is *not*
> passed, or (2) always build with tzdata.
seiderer at localhost:~/Work/build_002> rm -r build/postgresql-9.3.4
seiderer at localhost:~/Work/build_002> make 2>&1 | grep zic
checking for zic... /home/seiderer/Work/build_rpi_002/host/usr/sbin/zic
/home/seiderer/Work/build_002/host/usr/bin/arm-buildroot-linux-gnueabi-gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_totypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-preciRGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -c -o zic.o zic.c
/home/seiderer/Work/build_002/host/usr/bin/arm-buildroot-linux-gnueabi-gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_totypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-preciocaltime.o -L../../src/port -L../../src/common -Wl,-rpath,'/usr/lib',--enable-new-dtags -lpgport -lpgcommon -lz -lreadline -lcrypt -ldl -lm -o zic
/home/seiderer/Work/build_002/host/usr/sbin/zic -d '/home/seiderer/Work/build_002/target/usr/share/postgresql/timezone' -p 'US/Eastern' ./data/africa ./data/antarctica ./data/asia ./data/australasia ./data/europe ./data/northamerica ./data/southamerica ./data/pacificnew ./data/etcetera ./data/factory ./data/backward ./data/systemv
seiderer at localhost:~/Work/build_002> ls target/usr/share/postgresql/timezone*
target/usr/share/postgresql/timezone:
Africa Asia Canada Cuba EST Factory GMT0 Hongkong Iran Kwajalein MST NZ-CHAT posixrules ROK Universal W-SU
America Atlantic CET EET EST5EDT GB GMT-0 HST Israel Libya MST7MDT Pacific PRC Singapore US Zulu
Antarctica Australia Chile Egypt Etc GB-Eire GMT+0 Iceland Jamaica MET Navajo Poland PST8PDT Turkey UTC
Arctic Brazil CST6CDT Eire Europe GMT Greenwich Indian Japan Mexico NZ Portugal ROC UCT WET
target/usr/share/postgresql/timezonesets:
Africa.txt America.txt Antarctica.txt Asia.txt Atlantic.txt Australia Australia.txt Default Etc.txt Europe.txt India Indian.txt Pacific.txt
I think postgresql takes the given buildroot-host-zic with the data taken from build/postgresql-9.3.4/src/timezone/data
and uses the timezone data installed into target/usr/share/postgresql/timezone...
Regards,
Peter
>
> > That's what the error message hints at:
> >
> > When cross-compiling, either use the option --with-system-tzdata to use
> > existing time-zone data, or set the environment variable ZIC to a zic
> > program to use during the build.
>
> Yes, I've read this error message. But I'm worried that just pointing
> ZIC to a zic program is papering over the fact that we in this case
> rely on the time zone info from the host system.
>
> 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
end of thread, other threads:[~2014-04-22 19:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-22 15:41 [Buildroot] [PATCH 1/1] postgresql: add host-zic dependency Peter Seiderer
2014-04-22 15:52 ` Thomas Petazzoni
2014-04-22 16:41 ` Yann E. MORIN
2014-04-22 18:21 ` Thomas Petazzoni
-- strict thread matches above, loose matches on Subject: below --
2014-04-22 19:11 Peter Seiderer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox