Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 526790 - >=sys-libs/timezone-data-2014e: zdump -v searches /usr/local/etc/zoneinfo/
Summary: >=sys-libs/timezone-data-2014e: zdump -v searches /usr/local/etc/zoneinfo/
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
: 526956 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-10-25 19:50 UTC by Victor
Modified: 2014-10-26 23:00 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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. ***