In message <1445109956.71631.44.ca...@freebsd.org>, Ian Lepore writes: > On Sat, 2015-10-17 at 13:19 -0600, Warner Losh wrote: > > Until the next leap second . It would be better to just > > always try to grab the latest one Can we put something > > in periodic to do that so users that have releases > > that are older than 6 months arenÂt screwed? > > > > Warner > > > > I think writing a leapfeatcher task for periodic daily|weekly would > make a nice junior-hacker task. It would be nice if it only hit the > network when expiration of the installed file is imminent (like within > a month), and only if both ntp and the leapfile feature are enabled and > stuff like that. It should probably have a configurable list of URLs t > o fetch from.
Enablement through and rc.conf option possibly? Not that this is an elegant solution though. -- Cheers, Cy Schubert <cy.schub...@komquats.com> or <cy.schub...@cschubert.com> FreeBSD UNIX: <c...@freebsd.org> Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. > > -- Ian > > > > On Oct 16, 2015, at 8:04 AM, Cy Schubert <c...@freebsd.org> wrote: > > > > > > Author: cy > > > Date: Fri Oct 16 14:04:16 2015 > > > New Revision: 289421 > > > URL: https://svnweb.freebsd.org/changeset/base/289421 > > > > > > Log: > > > Add default leap-seconds file. This should help ntp networks get > > > the > > > leap second date correct > > > > > > Updates to the file can be obtained from ftp://time.nist.gov/pub/ > > > or > > > ftp://tycho.usno.navy.mil/pub/ntp/. > > > > > > Suggested by: dwmalone > > > Reviewed by: roberto, dwmalone, delphij > > > Approved by: roberto > > > MFC after: 1 week > > > > > > Added: > > > head/etc/ntp/ > > > head/etc/ntp/Makefile (contents, props changed) > > > head/etc/ntp/leap-seconds (contents, props changed) > > > Modified: > > > head/etc/Makefile > > > head/etc/mtree/BSD.var.dist > > > head/etc/ntp.conf > > > > > > Modified: head/etc/Makefile > > > =================================================================== > > > =========== > > > --- head/etc/Makefile Fri Oct 16 12:53:22 2015 (r2894 > > > 20) > > > +++ head/etc/Makefile Fri Oct 16 14:04:16 2015 (r2894 > > > 21) > > > @@ -240,6 +240,9 @@ distribution: > > > ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install > > > ${_+_}cd ${.CURDIR}/devd; ${MAKE} install > > > ${_+_}cd ${.CURDIR}/gss; ${MAKE} install > > > +.if ${MK_NTP} != "no" > > > + ${_+_}cd ${.CURDIR}/ntp; ${MAKE} install > > > +.endif > > > ${_+_}cd ${.CURDIR}/periodic; ${MAKE} install > > > .if ${MK_PKGBOOTSTRAP} != "no" > > > ${_+_}cd ${.CURDIR}/pkg; ${MAKE} install > > > > > > Modified: head/etc/mtree/BSD.var.dist > > > =================================================================== > > > =========== > > > --- head/etc/mtree/BSD.var.dist Fri Oct 16 12:53:22 2015 > > > (r289420) > > > +++ head/etc/mtree/BSD.var.dist Fri Oct 16 14:04:16 2015 > > > (r289421) > > > @@ -46,6 +46,8 @@ > > > .. > > > ipf mode=0700 > > > .. > > > + ntp mode=0700 > > > + .. > > > pkg > > > .. > > > ports > > > > > > Modified: head/etc/ntp.conf > > > =================================================================== > > > =========== > > > --- head/etc/ntp.conf Fri Oct 16 12:53:22 2015 (r2894 > > > 20) > > > +++ head/etc/ntp.conf Fri Oct 16 14:04:16 2015 (r2894 > > > 21) > > > @@ -77,3 +77,8 @@ restrict 127.127.1.0 > > > # > > > #server 127.127.1.0 > > > #fudge 127.127.1.0 stratum 10 > > > + > > > +# See > > > http://support.ntp.org/bin/view/Support/ConfiguringNTP#Section_6.14 > > > . > > > +# for documentation regarding leapfile. Updates to the file can be > > > obtained > > > +# from ftp://time.nist.gov/pub/ or > > > ftp://tycho.usno.navy.mil/pub/ntp/. > > > +leapfile "/etc/ntp/leap-seconds" > > > > > > Added: head/etc/ntp/Makefile > > > =================================================================== > > > =========== > > > --- /dev/null 00:00:00 1970 (empty, because file is > > > newly added) > > > +++ head/etc/ntp/Makefile Fri Oct 16 14:04:16 2015 (r > > > 289421) > > > @@ -0,0 +1,10 @@ > > > +# $FreeBSD$ > > > + > > > +NO_OBJ= > > > + > > > +FILES= leap-seconds > > > + > > > +FILESDIR= /etc/ntp > > > +FILESMODE= 644 > > > + > > > +.include <bsd.prog.mk> > > > > > > Added: head/etc/ntp/leap-seconds > > > =================================================================== > > > =========== > > > --- /dev/null 00:00:00 1970 (empty, because file is > > > newly added) > > > +++ head/etc/ntp/leap-seconds Fri Oct 16 14:04:16 2015 > > > (r289421) > > > @@ -0,0 +1,119 @@ > > > +# > > > +# $FreeBSD$ > > > +# > > > +# ATOMIC TIME. > > > +# The Coordinated Universal Time (UTC) is the reference > > > time scale derived > > > +# from The "Temps Atomique International" (TAI) calculated > > > by the Bureau > > > +# International des Poids et Mesures (BIPM) using a > > > worldwide network of atomic > > > +# clocks. UTC differs from TAI by an integer number of > > > seconds; it is the basis > > > +# of all activities in the world. > > > +# > > > +# > > > +# ASTRONOMICAL TIME (UT1) is the time scale based on the > > > rate of rotation of the earth. > > > +# It is now mainly derived from Very Long Baseline > > > Interferometry (VLBI). The various > > > +# irregular fluctuations progressively detected in the > > > rotation rate of the Earth lead > > > +# in 1972 to the replacement of UT1 by UTC as the reference > > > time scale. > > > +# > > > +# > > > +# LEAP SECOND > > > +# Atomic clocks are more stable than the rate of the earth > > > rotatiob since the later > > > +# undergoes a full range of geophysical perturbations at > > > various time scales (lunisolar > > > +# and core-mantle torques,atmospheric and oceanic effetcs, > > > ...) > > > +# Leap seconds are needed to keep the two time scales in > > > agreement, i.e. UT1-UTC smaller > > > +# than 0.9 second. So, when necessary a "leap second" is > > > introduced in UTC. > > > +# Since the adoption of this system in 1972 it has been > > > necessary to add 26 seconds to UTC, > > > +# firstly due to the initial choice of the value of the > > > second (1/86400 mean solar day of > > > +# the year 1820) and secondly to the general slowing down > > > of the Earth's rotation. It is > > > +# theorically possible to have a negative leap second (a > > > second removed from UTC), but so far, > > > +# all leap seconds have been positive (a second has been > > > added to UTC). Based on what we know about the earth's rotation, > > > +# it is unlikely that we will ever have a negative leap > > > second. > > > +# > > > +# > > > +# HISTORY > > > +# The first leap second was added on June 30, 1972. Until > > > 2000, it was necessary in average to add a leap second at a rate > > > +# of 1 to 2 years. Since 2000, due to the fact that the > > > earth rate of rotation is accelerating, leap seconds are introduced > > > +# with an average frequency of 3 to 4 years. > > > +# > > > +# > > > +# RESPONSABILITY OF THE DECISION TO INTRODUCE A LEAP SECOND > > > IN UTC > > > +# The decision to introduce a leap second in UTC is the > > > responsibility of the Earth Orientation Center of > > > +# the International Earth Rotation and reference System > > > Service (IERS). This center is located at Paris > > > +# Observatory. According to international agreements, leap > > > second date have to occur at fixed date : > > > +# first preference is given to the end of December and > > > June, and second preference at the end of March > > > +# and September. Since the system was introduced in 1972, > > > only dates in June and December were used. > > > +# > > > +# Questions or comments to: > > > +# Daniel Gambis, daniel.gam...@obspm.fr > > > +# Christian Bizouard: > > > christian.bizou...@obspm.fr > > > +# Earth orientation Center of the IERS > > > +# Paris Observatory, France > > > +# > > > +# > > > +# > > > +# VALIDITY OF THE FILE > > > +# It is important to express the validity of the file. > > > These next two dates are > > > +# given in units of seconds since 1900.0. > > > +# > > > +# 1) Last update of the file. > > > +# > > > +# Updated through IERS Bulletin C ( > > > ftp://hpiers.obspm.fr/iers/bul/bulc/bulletinc.dat) > > > +# > > > +# The following line shows the last update of this file in > > > NTP timestamp: > > > +# > > > +#$ 3645216000 > > > +# > > > +# 2) Expiration date of the file given on a semi-annual > > > basis: last June or last December > > > +# > > > +# File expires on 28 December 2015 > > > +# > > > +# Expire date in NTP timestamp: > > > +# > > > +#@ 3660249600 > > > +# > > > +# > > > +# LIST OF LEAP SECONDS > > > +# NTP timestamp (X parameter) is the number of seconds > > > since 1900.0 > > > +# > > > +# MJD: The Modified Julian Day number. MJD = X/86400 + > > > 15020 > > > +# > > > +# DTAI: The difference DTAI= TAI-UTC in units of seconds > > > +# It is the quantity to add to UTC to get the time in TAI > > > +# > > > +# Day Month Year : epoch in clear > > > +# > > > +#NTP Time DTAI Day Month Year > > > +# > > > +2272060800 10 # 1 Jan 1972 > > > +2287785600 11 # 1 Jul 1972 > > > +2303683200 12 # 1 Jan 1973 > > > +2335219200 13 # 1 Jan 1974 > > > +2366755200 14 # 1 Jan 1975 > > > +2398291200 15 # 1 Jan 1976 > > > +2429913600 16 # 1 Jan 1977 > > > +2461449600 17 # 1 Jan 1978 > > > +2492985600 18 # 1 Jan 1979 > > > +2524521600 19 # 1 Jan 1980 > > > +2571782400 20 # 1 Jul 1981 > > > +2603318400 21 # 1 Jul 1982 > > > +2634854400 22 # 1 Jul 1983 > > > +2698012800 23 # 1 Jul 1985 > > > +2776982400 24 # 1 Jan 1988 > > > +2840140800 25 # 1 Jan 1990 > > > +2871676800 26 # 1 Jan 1991 > > > +2918937600 27 # 1 Jul 1992 > > > +2950473600 28 # 1 Jul 1993 > > > +2982009600 29 # 1 Jul 1994 > > > +3029443200 30 # 1 Jan 1996 > > > +3076704000 31 # 1 Jul 1997 > > > +3124137600 32 # 1 Jan 1999 > > > +3345062400 33 # 1 Jan 2006 > > > +3439756800 34 # 1 Jan 2009 > > > +3550089600 35 # 1 Jul 2012 > > > +3644697600 36 # 1 Jul 2015 > > > +# > > > +# In order to verify the integrity of this file, a hash > > > code > > > +# has been generated. For more information how to use > > > +# this hash code, please consult the README file under the > > > +# 'sha' repertory. > > > +# > > > +#h 620ba8af 37900668 95ac09ba d77640f9 6fd75493 > > > > > > _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"