Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 526790

Summary: >=sys-libs/timezone-data-2014e: zdump -v searches /usr/local/etc/zoneinfo/
Product: Gentoo Linux Reporter: Victor <v.simankin>
Component: [OLD] Core systemAssignee: Gentoo Toolchain Maintainers <toolchain>
Status: RESOLVED FIXED    
Severity: normal CC: gentoo.8eaf7cd8e5128d8191fe, rik
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Victor 2014-10-25 19:50:54 UTC
# zdump -v Europe/Moscow
Europe/Moscow: No such file or directory

Reproducible: Always

Steps to Reproduce:
1.
# zdump -v Europe/Moscow
Europe/Moscow: No such file or directory




# strace zdump -v Europe/Moscow
....
open("/usr/local/etc/zoneinfo/UTC0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/etc/zoneinfo/posixrules", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/etc/zoneinfo/Europe/Moscow", O_RDONLY) = -1 ENOENT (No such file or directory)

Just wrong makefile
Workaround
1. mkdir /usr/local/etc
2. ln -s /usr/share/zoneinfo /usr/local/etc/zoneinfo
Comment 1 Roman 2014-10-25 22:26:16 UTC
The problem is caused by the zic binary cause it uses the default TZDIR from tzfile.h
It looks like the correct Makefile patch to build the zic correctly should be:
{{{
--- files/timezone-data-2014g-makefile.patch
+++ files/timezone-data-2014g-makefile.patch
@@ -49,7 +49,7 @@
  
 -cc=		cc
 -CC=		$(cc) -DTZDIR=\"$(TZDIR)\"
++override CC+=		-DTZDIR=\"$(TZDIR)\"
-+CC+=		-DTZDIR=\"$(TZDIR)\"
 +ifeq ($(NLS),1)
 +CC+= -DHAVE_GETTEXT=1 -DTZ_DOMAIN=\"libc\"
 +endif
}}}
This variant will allow to merge command line variable for the Makefile and the locally added value.  I suppose this was intended originally.
Comment 2 SpanKY gentoo-dev 2014-10-26 03:14:28 UTC
the 2014e ebuild started adding CC= to the command line which overrides the appending of the flags to the CC var
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2014-10-26 23:00:18 UTC
*** Bug 526956 has been marked as a duplicate of this bug. ***