Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Oct 2015 21:13:37 -0700
From:      Cy Schubert <Cy.Schubert@komquats.com>
To:        Cy Schubert <Cy.Schubert@komquats.com>
Cc:        Warner Losh <imp@bsdimp.com>, Cy Schubert <cy@FreeBSD.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, David Malone <dwmalone@maths.tcd.ie>, Ollivier Robert <roberto@keltia.freenix.fr>, Xin Li <delphij@delphij.net>
Subject:   Re: svn commit: r289421 - in head/etc: . mtree ntp
Message-ID:  <201510230413.t9N4DbrT005724@slippy.cwsent.com>
In-Reply-To: Message from Cy Schubert <Cy.Schubert@komquats.com> of "Sat, 17 Oct 2015 19:00:20 -0700." <201510180200.t9I20KLI062531@slippy.cwsent.com>

next in thread | previous in thread | raw e-mail | index | archive | help
We already have an example to work from. The family of ports (ntp, 
ntp-devel) installs ${LOCALBASE}/sbin/update-leap. It would be fine except 
for the fact that it's written in Perl, not something we'd want to visit on 
FreeBSD again. I'm sure it could be rewritten in shell script or C/C++.


-- 
Cheers,
Cy Schubert <Cy.Schubert@komquats.com> or <Cy.Schubert@cschubert.com>
FreeBSD UNIX:  <cy@FreeBSD.org>   Web:  http://www.FreeBSD.org

	The need of the many outweighs the greed of the few.



In message <201510180200.t9I20KLI062531@slippy.cwsent.com>, Cy Schubert 
writes:
> Agreed, this would be best. There was a suggestion a GSoC person could do 
> it (though I'm willing to roll up my sleeves if necessary).
> 
> 
> -- 
> Cheers,
> Cy Schubert <Cy.Schubert@komquats.com> or <Cy.Schubert@cschubert.com>
> FreeBSD UNIX:  <cy@FreeBSD.org>   Web:  http://www.FreeBSD.org
> 
> 	The need of the many outweighs the greed of the few.
> 
> 
> 
> In message <8154492E-C29E-41B1-A13B-34E33586DEC6@bsdimp.com>, Warner Losh 
> write
> s:
> > 
> > 
> > --Apple-Mail=_60572A67-97E7-4200-AEF6-88DC6354712B
> > Content-Transfer-Encoding: quoted-printable
> > Content-Type: text/plain;
> > 	charset=utf-8
> > 
> > Until the next leap second=E2=80=A6. It would be better to just
> > always try to grab the latest one=E2=80=A6 Can we put something
> > in periodic to do that so users that have releases
> > that are older than 6 months aren=E2=80=99t screwed?
> > 
> > Warner
> > 
> > > On Oct 16, 2015, at 8:04 AM, Cy Schubert <cy@FreeBSD.org> wrote:
> > >=20
> > > Author: cy
> > > Date: Fri Oct 16 14:04:16 2015
> > > New Revision: 289421
> > > URL: https://svnweb.freebsd.org/changeset/base/289421
> > >=20
> > > Log:
> > >  Add default leap-seconds file. This should help ntp networks get the
> > >  leap second date correct
> > >=20
> > >  Updates to the file can be obtained from ftp://time.nist.gov/pub/ or
> > >  ftp://tycho.usno.navy.mil/pub/ntp/.
> > >=20
> > >  Suggested by:	dwmalone
> > >  Reviewed by:	roberto, dwmalone, delphij
> > >  Approved by:	roberto
> > >  MFC after:	1 week
> > >=20
> > > 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
> > >=20
> > > Modified: head/etc/Makefile
> > > =
> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> =
> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> =
> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> =
> > =3D=3D=3D
> > > --- head/etc/Makefile	Fri Oct 16 12:53:22 2015	(r289420)
> > > +++ head/etc/Makefile	Fri Oct 16 14:04:16 2015	(r289421)
> > > @@ -240,6 +240,9 @@ distribution:
> > > 	${_+_}cd ${.CURDIR}/defaults; ${MAKE} install
> > > 	${_+_}cd ${.CURDIR}/devd; ${MAKE} install
> > > 	${_+_}cd ${.CURDIR}/gss; ${MAKE} install
> > > +.if ${MK_NTP} !=3D "no"
> > > +	${_+_}cd ${.CURDIR}/ntp; ${MAKE} install
> > > +.endif
> > > 	${_+_}cd ${.CURDIR}/periodic; ${MAKE} install
> > > .if ${MK_PKGBOOTSTRAP} !=3D "no"
> > > 	${_+_}cd ${.CURDIR}/pkg; ${MAKE} install
> > >=20
> > > Modified: head/etc/mtree/BSD.var.dist
> > > =
> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> =
> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> =
> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> =
> > =3D=3D=3D
> > > --- 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=3D0700
> > >         ..
> > > +        ntp             mode=3D0700
> > > +        ..
> > >         pkg
> > >         ..
> > >         ports
> > >=20
> > > Modified: head/etc/ntp.conf
> > > =
> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> =
> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> =
> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> =
> > =3D=3D=3D
> > > --- head/etc/ntp.conf	Fri Oct 16 12:53:22 2015	(r289420)
> > > +++ head/etc/ntp.conf	Fri Oct 16 14:04:16 2015	(r289421)
> > > @@ -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"
> > >=20
> > > Added: head/etc/ntp/Makefile
> > > =
> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> =
> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> =
> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> =
> > =3D=3D=3D
> > > --- /dev/null	00:00:00 1970	(empty, because file is newly added)
> > > +++ head/etc/ntp/Makefile	Fri Oct 16 14:04:16 2015	=
> > (r289421)
> > > @@ -0,0 +1,10 @@
> > > +# $FreeBSD$
> > > +
> > > +NO_OBJ=3D
> > > +
> > > +FILES=3D	leap-seconds
> > > +
> > > +FILESDIR=3D	/etc/ntp
> > > +FILESMODE=3D	644
> > > +
> > > +.include <bsd.prog.mk>
> > >=20
> > > Added: head/etc/ntp/leap-seconds
> > > =
> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> =
> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> =
> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> =
> > =3D=3D=3D
> > > --- /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 scal
> e =
> > 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; i
> t =
> > 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, i
> t =
> > 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 rat
> e =
> > 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 UT
> C
> > > +#	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.gambis@obspm.fr
> > > +#			Christian Bizouard:  christian.bizouard@obspm.f
> r
> > > +#			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 =3D X/86400 + 15020
> > > +#
> > > +#	DTAI: The difference DTAI=3D 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
> > >=20
> > 
> > 
> > --Apple-Mail=_60572A67-97E7-4200-AEF6-88DC6354712B
> > Content-Transfer-Encoding: 7bit
> > Content-Disposition: attachment;
> > 	filename=signature.asc
> > Content-Type: application/pgp-signature;
> > 	name=signature.asc
> > Content-Description: Message signed with OpenPGP using GPGMail
> > 
> > -----BEGIN PGP SIGNATURE-----
> > Comment: GPGTools - https://gpgtools.org
> > 
> > iQIcBAEBCgAGBQJWIp9QAAoJEGwc0Sh9sBEA8GMP/RxMSBQvI0BKgbMfYZh7+x2w
> > gGPNOl5FrDjv6R1QxM2alDe3sEZmhNsZ5o0Ekso4kA/uzz5hF9eElp2EA0wn2DMa
> > 1IWJKbLUwLsKvN5bC2cMVmzlklqknm9R7EVyRwPB1Q9jgN8cQV4q01tN96XzbCmQ
> > 1M2Tg8CccnpI9hpdOLjpZQB72kr+rTUm9YrIuiP+nq62NjP4u4UyquKOeUfyyZP1
> > WnpDNHNknvzlhCnXiexFHUtueL0bAjnSs0F9C7k661xtdt43q/zp0VWkTUeib8/y
> > o64PLOmq3dRK+PLDwRLY94OSpe5QqDivyR4H0BAbKbV97GjC/9byhJenR2J+5GUC
> > 2w54ddlW6rr7rE5kZYd8E5DSoMlmunpm1rMbEwHLHtRXxorZxDUMvj779VS4rj2b
> > MDxVngI/H0/o3inpSZjsqyLqNut8h204r64m2W5MWTMUJ5z1Evb/Uj6Gewfu3rk2
> > kALtxq32we0Edt8VjYUAOOG/ZjTUWdBY0DPsDBeqjeYqkTNP7Ebgj0z0P69UYRsu
> > XBuMd7ONzSDSAGYXHbyBa2eLhPxDpInBPZ/R4agybBQIJ1qKv6PtV0VH8VGYzADm
> > DhrVGOsSc/yyou+YX7EzTT4F0S1gjPEgO4wopmZdOUFaNBzE8n8UVxTmT4jMlrTH
> > SchUp801COK+osnNyG4c
> > =3+ya
> > -----END PGP SIGNATURE-----
> > 
> > --Apple-Mail=_60572A67-97E7-4200-AEF6-88DC6354712B--
> > 
> 
> 
> 





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201510230413.t9N4DbrT005724>