This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: [PATCH] tzselect: use zonedir instead of current working directory
- From: Allan McRae <allan at archlinux dot org>
- To: Sami Kerola <kerolasa at iki dot fi>, libc-help at sourceware dot org
- Date: Sat, 10 May 2014 20:11:03 +1000
- Subject: Re: [PATCH] tzselect: use zonedir instead of current working directory
- Authentication-results: sourceware.org; auth=none
- References: <1399716175-898-1-git-send-email-kerolasa at iki dot fi>
On 10/05/14 20:02, Sami Kerola wrote:
> 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
>
Shouldn't we adjust the Makefile as the tzselect.ksh file is taken
directly from tzcode?
> 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
>