[PATCH] tzselect: use zonedir instead of current working directory

Sami Kerola kerolasa@iki.fi
Sat May 10 10:03:00 GMT 2014


Makefile sed expression is looking for $(pwd) and replaces it to path
where zone files are installed.  As a fallback that expression defaults
to current working directory if sed fails.  The fallback mechanism does
not need to be overly portable, as it is fairly unlikely it is ever in
use.

This regression was introduced in commit 85bff96 and became part of
glibc-2.19 release.

$ cd /tmp/ && tzselect
/usr/bin/tzselect: line 171: /tmp/iso3166.tab: No such file or directory
/usr/bin/tzselect: time zone files are not set up correctly

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
---
 timezone/tzselect.ksh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/timezone/tzselect.ksh b/timezone/tzselect.ksh
index 9d70691..25f45a8 100755
--- a/timezone/tzselect.ksh
+++ b/timezone/tzselect.ksh
@@ -35,7 +35,7 @@ REPORT_BUGS_TO=tz@iana.org
 
 # Specify default values for environment variables if they are unset.
 : ${AWK=awk}
-: ${TZDIR=`pwd`}
+: ${TZDIR=$(pwd)}
 
 # Check for awk Posix compliance.
 ($AWK -v x=y 'BEGIN { exit 123 }') </dev/null >/dev/null 2>&1
-- 
1.9.2



More information about the Libc-help mailing list