File: [local] / src / share / zoneinfo / Makefile (download)
Revision 1.14, Thu Nov 7 16:25:05 2019 UTC (4 years, 6 months ago) by sthen
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7 Changes since 1.13: +2 -2 lines
Stop installing the "leap-second" zoneinfo files in share/zoneinfo/right
(and the second copy of the "normal" files in share/zoneinfo/posix).
The way these files are supposed to work is that you set the system
clock to the time with leap-seconds included (UTC+leap, or TAI-10) and
copy the entire "right" set of files to the main zoneinfo directory
(upstream provides them as parallel directories to encourage this).
And everyone else sets the system clock to UTC and uses the "posix" files.
https://data.iana.org/time-zones/theory.html#leapsec
We don't have much support for a non-UTC system clock, and these files
have been seen to cause some confusion.
kettenis@ says "Software that really cares probably has its own leap-
second table and will actually rely on the POSIX definition of time_t to
convert times into human readable form."
ok deraadt naddy millert
|
# $OpenBSD: Makefile,v 1.14 2019/11/07 16:25:05 sthen Exp $
# $NetBSD: Makefile,v 1.14 1995/04/22 12:10:17 cgd Exp $
# Change the line below for your time zone (after finding the zone you want in
# the time zone files, or adding it to a time zone file).
# Alternately, if you discover you've got the wrong time zone, you can just
# zic -l rightzone
# This line has been moved to /usr/src/etc/Makefile
LOCALTIME= US/Pacific
# If you want something other than Eastern United States time as a template
# for handling POSIX-style time zone environment variables,
# change the line below (after finding the zone you want in the
# time zone files, or adding it to a time zone file).
# Alternately, if you discover you've got the wrong time zone, you can just
# zic -p rightzone
POSIXRULES= US/Pacific
# Use an absolute path name for TZDIR unless you're just testing the software.
TZDIR= ${DESTDIR}/usr/share/zoneinfo
# If you always want time values interpreted as "seconds since the epoch
# (not counting leap seconds)", use
# REDO= posix_only
# below. If you always want right time values interpreted as "seconds since
# the epoch" (counting leap seconds)", use
# REDO= right_only
# below. If you want both sets of data available, with leap seconds not
# counted normally, use
# REDO= posix_right
# below. If you want both sets of data available, with leap seconds counted
# normally, use
# REDO= right_posix
# below.
REDO= posix_only
# Since "." may not be in PATH...
YEARISTYPE= ${.CURDIR}/datfiles/yearistype.sh
YEARISTYPECOPY= ${.OBJDIR}/yearistypecopy
YDATA= africa antarctica asia australasia \
europe northamerica southamerica pacificnew etcetera factory \
backward
NDATA= systemv
TDATA= $(YDATA) $(NDATA)
TABDATA= iso3166.tab zone.tab zone1970.tab
DATA= $(YDATA) $(NDATA) $(TABDATA) leapseconds # yearistype.sh
USNO= usno1988 usno1989 usno1989a usno1995 usno1997
ZIC=zic
all: ${YEARISTYPECOPY}
${YEARISTYPECOPY}:
cp ${YEARISTYPE} yearistypecopy
chmod u+x yearistypecopy
posix_only: ${TDATA} ${YEARISTYPECOPY}
(cd ${.CURDIR}/datfiles; \
${ZIC} -y ${YEARISTYPECOPY} -d ${TZDIR} -L /dev/null ${TDATA})
right_only: leapseconds ${TDATA} ${YEARISTYPECOPY}
(cd ${.CURDIR}/datfiles; \
${ZIC} -y ${YEARISTYPECOPY} -d ${TZDIR} -L leapseconds ${TDATA})
other_two: leapseconds ${TDATA} ${YEARISTYPECOPY}
(cd ${.CURDIR}/datfiles; \
${ZIC} -y ${YEARISTYPECOPY} -d ${TZDIR}/posix -L /dev/null ${TDATA})
(cd ${.CURDIR}/datfiles; \
${ZIC} -y ${YEARISTYPECOPY} -d ${TZDIR}/right -L leapseconds ${TDATA})
posix_right: posix_only other_two
right_posix: right_only other_two
realinstall: ${DATA} ${REDO} ${YEARISTYPECOPY}
(cd ${.CURDIR}/datfiles; \
${ZIC} -y ${YEARISTYPECOPY} -d ${TZDIR} -p ${POSIXRULES})
chown -R ${BINOWN}:${BINGRP} ${TZDIR}
find ${TZDIR} \
-type f -exec chmod a=r {} + -o \
-type d -exec chmod a=rx,u+w {} +
${INSTALL} -c -o root -g bin -m 644 ${.CURDIR}/datfiles/iso3166.tab \
${DESTDIR}/usr/share/misc
${INSTALL} -c -o root -g bin -m 644 ${.CURDIR}/datfiles/zone.tab \
${DESTDIR}/usr/share/zoneinfo
${INSTALL} -c -o root -g bin -m 644 ${.CURDIR}/datfiles/zone1970.tab \
${DESTDIR}/usr/share/zoneinfo
CLEANFILES+= yearistypecopy
.PATH: ${.CURDIR}/datfiles
.include <bsd.prog.mk>