[arch-commits] Commit in chrony/repos/community-x86_64 (7 files)

Levente Polyak anthraxx at archlinux.org
Sun Aug 30 11:35:33 UTC 2020


    Date: Sunday, August 30, 2020 @ 11:35:33
  Author: anthraxx
Revision: 692747

archrelease: copy trunk to community-x86_64

Added:
  chrony/repos/community-x86_64/PKGBUILD
    (from rev 692746, chrony/trunk/PKGBUILD)
  chrony/repos/community-x86_64/chrony.sysusers
    (from rev 692746, chrony/trunk/chrony.sysusers)
  chrony/repos/community-x86_64/chrony.tmpfiles
    (from rev 692746, chrony/trunk/chrony.tmpfiles)
  chrony/repos/community-x86_64/fix-util-unit-test-for-NTP-era-split.patch
    (from rev 692746, chrony/trunk/fix-util-unit-test-for-NTP-era-split.patch)
Deleted:
  chrony/repos/community-x86_64/PKGBUILD
  chrony/repos/community-x86_64/chrony.sysusers
  chrony/repos/community-x86_64/chrony.tmpfiles

--------------------------------------------+
 PKGBUILD                                   |  159 ++++++++++++++-------------
 chrony.sysusers                            |    2 
 chrony.tmpfiles                            |    2 
 fix-util-unit-test-for-NTP-era-split.patch |   38 ++++++
 4 files changed, 126 insertions(+), 75 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2020-08-30 11:35:28 UTC (rev 692746)
+++ PKGBUILD	2020-08-30 11:35:33 UTC (rev 692747)
@@ -1,73 +0,0 @@
-# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
-# Contributor: Sergej Pupykin <pupykin.s+arch at gmail.com>
-# Contributor: Daniel Micay <danielmicay at gmail.com>
-# Contributor: Bartłomiej Piotrowski <nospam at bpiotrowski.pl>
-# Contributor: Patrick Leslie Polzer <leslie.polzer at gmx.net>
-# Contributor: cdhotfire <cdhotfire at gmail.com>
-# Contributor: Shinlun Hsieh <yngwiexx at yahoo.com.tw>
-# Contributor: Elisamuel Resto <ryuji at simplysam.us>
-
-pkgname=chrony
-pkgver=3.5
-pkgrel=3
-pkgdesc='Lightweight NTP client and server'
-url='https://chrony.tuxfamily.org/'
-arch=('x86_64')
-license=('GPL2')
-depends=('glibc' 'nss' 'readline' 'libcap' 'libedit' 'libseccomp' 'nettle')
-makedepends=('asciidoctor')
-options=('!emptydirs')
-backup=('etc/chrony.conf')
-source=(https://download.tuxfamily.org/chrony/${pkgname}-${pkgver}.tar.gz
-        ${pkgname}-${pkgver}.tar.gz.asc::https://download.tuxfamily.org/chrony/${pkgname}-${pkgver}-tar-gz-asc.txt
-        chrony.sysusers
-        chrony.tmpfiles)
-sha256sums=('4e02795b1260a4ec51e6ace84149036305cc9fc340e65edb9f8452aa611339b5'
-            'SKIP'
-            '56aa817638c8f959169d514f1e7fc727ef31e7d3beda4fca5165292c7602ee42'
-            'c0b52787f68f3ef365eef64f53f22b4fb0046a91f0e38923f9d16f1ca19c3f3a')
-validpgpkeys=('8B1F4A9ADA73D401E3085A0B5FF06F29BA1E013B') # Miroslav Lichvar <mlichvar at redhat.com> has a dsa1024 key *in the wild*
-
-prepare() {
-  cd ${pkgname}-${pkgver}
-  sed -i \
-    -e 's|pool.ntp.org|3.arch.pool.ntp.org|g' \
-    -e 's|server foo.example.net|server 0.arch.pool.ntp.org iburst|g' \
-    -e 's|server bar.example.net|server 1.arch.pool.ntp.org iburst|g' \
-    -e 's|server baz.example.net|server 2.arch.pool.ntp.org iburst|g' \
-    examples/chrony.conf.example*
-  sed 's|/usr/sbin|/usr/bin|g' -i examples/*.service
-}
-
-build() {
-  cd ${pkgname}-${pkgver}
-  ./configure \
-    --prefix=/usr \
-    --enable-scfilter \
-    --enable-ntp-signd \
-    --with-user=chrony \
-    --with-sendmail=/usr/bin/sendmail \
-    --with-hwclockfile=/etc/adjtime
-  make
-}
-
-package() {
-  cd ${pkgname}-${pkgver}
-  make DESTDIR="${pkgdir}" install install-docs
-
-  install -Dm 644 "${srcdir}/chrony.sysusers" "${pkgdir}/usr/lib/sysusers.d/chrony.conf"
-  install -Dm 644 "${srcdir}/chrony.tmpfiles" "${pkgdir}/usr/lib/tmpfiles.d/chrony.conf"
-  install -Dm 644 examples/{chronyd,chrony-wait}.service -t "${pkgdir}/usr/lib/systemd/system"
-  install -Dm 644 examples/chrony.logrotate "${pkgdir}/etc/logrotate.d/chrony"
-  install -Dm 644 README NEWS FAQ -t "${pkgdir}/usr/share/doc/${pkgname}"
-  install -Dm 644 examples/* -t "${pkgdir}/usr/share/doc/${pkgname}/examples"
-
-  install -Dm 644 examples/chrony.conf.example3 "${pkgdir}/etc/chrony.conf"
-  echo -e "\n# Enable kernel RTC sync\nrtcsync" >> "${pkgdir}/etc/chrony.conf"
-  sed -i '/^! rtconutc$/ s/^! //' "${pkgdir}/etc/chrony.conf"
-
-  mv "${pkgdir}/usr/sbin/chronyd" "${pkgdir}/usr/bin"
-  rmdir "${pkgdir}"{/usr/sbin,/var/lib/chrony,/var/lib}
-}
-
-# vim: ts=2 sw=2 et:

Copied: chrony/repos/community-x86_64/PKGBUILD (from rev 692746, chrony/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2020-08-30 11:35:33 UTC (rev 692747)
@@ -0,0 +1,86 @@
+# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
+# Contributor: Sergej Pupykin <pupykin.s+arch at gmail.com>
+# Contributor: Daniel Micay <danielmicay at gmail.com>
+# Contributor: Bartłomiej Piotrowski <nospam at bpiotrowski.pl>
+# Contributor: Patrick Leslie Polzer <leslie.polzer at gmx.net>
+# Contributor: cdhotfire <cdhotfire at gmail.com>
+# Contributor: Shinlun Hsieh <yngwiexx at yahoo.com.tw>
+# Contributor: Elisamuel Resto <ryuji at simplysam.us>
+
+pkgname=chrony
+pkgver=3.5.1
+pkgrel=1
+pkgdesc='Lightweight NTP client and server'
+url='https://chrony.tuxfamily.org/'
+arch=('x86_64')
+license=('GPL2')
+depends=('glibc' 'nss' 'readline' 'libcap' 'libcap.so' 'libedit' 'libseccomp' 'libseccomp.so' 'nettle')
+makedepends=('asciidoctor')
+options=('!emptydirs')
+backup=('etc/chrony.conf')
+source=(https://download.tuxfamily.org/chrony/${pkgname}-${pkgver}.tar.gz
+        ${pkgname}-${pkgver}.tar.gz.asc::https://download.tuxfamily.org/chrony/${pkgname}-${pkgver}-tar-gz-asc.txt
+        chrony.sysusers
+        chrony.tmpfiles
+        fix-util-unit-test-for-NTP-era-split.patch)
+sha256sums=('1ba82f70db85d414cd7420c39858e3ceca4b9eb8b028cbe869512c3a14a2dca7'
+            'SKIP'
+            '56aa817638c8f959169d514f1e7fc727ef31e7d3beda4fca5165292c7602ee42'
+            'c0b52787f68f3ef365eef64f53f22b4fb0046a91f0e38923f9d16f1ca19c3f3a'
+            '69fad197b790f1fdb273b9d1905c3025dd38abf82fa93ffe675d096bf0f3d45b')
+validpgpkeys=('8B1F4A9ADA73D401E3085A0B5FF06F29BA1E013B') # Miroslav Lichvar <mlichvar at redhat.com> has a dsa1024 key *in the wild*
+
+prepare() {
+  cd ${pkgname}-${pkgver}
+  patch -Np1 < ../fix-util-unit-test-for-NTP-era-split.patch
+  sed -i \
+    -e 's|pool pool.ntp.org|pool 2.arch.pool.ntp.org|g' \
+    -e 's|server foo.example.net|server 0.arch.pool.ntp.org|g' \
+    -e 's|server bar.example.net|server 1.arch.pool.ntp.org|g' \
+    -e 's|server baz.example.net|server 3.arch.pool.ntp.org|g' \
+    examples/chrony.conf.example*
+  sed 's|/usr/sbin|/usr/bin|g' -i examples/*.service
+}
+
+build() {
+  cd ${pkgname}-${pkgver}
+  ./configure \
+    --prefix=/usr \
+    --enable-scfilter \
+    --enable-ntp-signd \
+    --with-user=chrony \
+    --with-sendmail=/usr/bin/sendmail \
+    --with-hwclockfile=/etc/adjtime \
+    --sbindir=/usr/bin \
+    --with-pidfile=/run/chrony/chronyd.pid
+  make
+}
+
+check() {
+  cd ${pkgname}-${pkgver}
+  make check
+}
+
+package() {
+  cd ${pkgname}-${pkgver}
+  make DESTDIR="${pkgdir}" install install-docs
+
+  install -Dm 644 "${srcdir}/chrony.sysusers" "${pkgdir}/usr/lib/sysusers.d/chrony.conf"
+  install -Dm 644 "${srcdir}/chrony.tmpfiles" "${pkgdir}/usr/lib/tmpfiles.d/chrony.conf"
+  install -Dm 644 examples/{chronyd,chrony-wait}.service -t "${pkgdir}/usr/lib/systemd/system"
+  install -Dm 644 examples/chrony.logrotate "${pkgdir}/etc/logrotate.d/chrony"
+  install -Dm 644 README NEWS FAQ -t "${pkgdir}/usr/share/doc/${pkgname}"
+  install -Dm 644 examples/* -t "${pkgdir}/usr/share/doc/${pkgname}/examples"
+
+  install -Dm 644 examples/chrony.conf.example3 "${pkgdir}/etc/chrony.conf"
+  sed -i \
+    -e '/^! pool /s/^! //' \
+    -e '/^! leapsectz right\/UTC/s/^! //' \
+    -e '/^! makestep 1.0 3/s/^! //' \
+    -e '/^! rtcsync/s/^! //' \
+    "${pkgdir}/etc/chrony.conf"
+
+  rmdir "${pkgdir}"{/var/lib/chrony,/var/lib}
+}
+
+# vim: ts=2 sw=2 et:

Deleted: chrony.sysusers
===================================================================
--- chrony.sysusers	2020-08-30 11:35:28 UTC (rev 692746)
+++ chrony.sysusers	2020-08-30 11:35:33 UTC (rev 692747)
@@ -1 +0,0 @@
-u chrony - "Network Time Protocol" /var/lib/chrony

Copied: chrony/repos/community-x86_64/chrony.sysusers (from rev 692746, chrony/trunk/chrony.sysusers)
===================================================================
--- chrony.sysusers	                        (rev 0)
+++ chrony.sysusers	2020-08-30 11:35:33 UTC (rev 692747)
@@ -0,0 +1 @@
+u chrony - "Network Time Protocol" /var/lib/chrony

Deleted: chrony.tmpfiles
===================================================================
--- chrony.tmpfiles	2020-08-30 11:35:28 UTC (rev 692746)
+++ chrony.tmpfiles	2020-08-30 11:35:33 UTC (rev 692747)
@@ -1 +0,0 @@
-d /var/lib/chrony 0755 chrony chrony - -

Copied: chrony/repos/community-x86_64/chrony.tmpfiles (from rev 692746, chrony/trunk/chrony.tmpfiles)
===================================================================
--- chrony.tmpfiles	                        (rev 0)
+++ chrony.tmpfiles	2020-08-30 11:35:33 UTC (rev 692747)
@@ -0,0 +1 @@
+d /var/lib/chrony 0755 chrony chrony - -

Copied: chrony/repos/community-x86_64/fix-util-unit-test-for-NTP-era-split.patch (from rev 692746, chrony/trunk/fix-util-unit-test-for-NTP-era-split.patch)
===================================================================
--- fix-util-unit-test-for-NTP-era-split.patch	                        (rev 0)
+++ fix-util-unit-test-for-NTP-era-split.patch	2020-08-30 11:35:33 UTC (rev 692747)
@@ -0,0 +1,38 @@
+From 2d9eb5b6fa5225a7300c8eed95712969249900fb Mon Sep 17 00:00:00 2001
+From: Miroslav Lichvar <mlichvar at redhat.com>
+Date: Fri, 3 Jan 2020 11:25:55 +0100
+Subject: [PATCH] test: fix util unit test for NTP era split
+
+The current default NTP era split passed the Unix epoch (~50 years ago),
+which means the epoch converted to an NTP timestamp and back ends up in
+the next NTP era (year 2106).
+
+Fix the test to take into account the era split.
+---
+ test/unit/util.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/test/unit/util.c b/test/unit/util.c
+index f4d9f33..af9e90c 100644
+--- a/test/unit/util.c
++++ b/test/unit/util.c
+@@ -100,11 +100,19 @@ void test_unit(void) {
+   ntp_ts.hi = htonl(JAN_1970);
+   ntp_ts.lo = 0xffffffff;
+   UTI_Ntp64ToTimespec(&ntp_ts, &ts);
++#if defined(HAVE_LONG_TIME_T) && NTP_ERA_SPLIT > 0
++  TEST_CHECK(ts.tv_sec == 0x100000000LL * (1 + (NTP_ERA_SPLIT - 1) / 0x100000000LL));
++#else
+   TEST_CHECK(ts.tv_sec == 0);
++#endif
+   TEST_CHECK(ts.tv_nsec == 999999999);
+ 
+   UTI_AddDoubleToTimespec(&ts, 1e-9, &ts);
++#if defined(HAVE_LONG_TIME_T) && NTP_ERA_SPLIT > 0
++  TEST_CHECK(ts.tv_sec == 1 + 0x100000000LL * (1 + (NTP_ERA_SPLIT - 1) / 0x100000000LL));
++#else
+   TEST_CHECK(ts.tv_sec == 1);
++#endif
+   TEST_CHECK(ts.tv_nsec == 0);
+ 
+   ntp_fuzz.hi = 0;



More information about the arch-commits mailing list