From c3aae44af07e93c1d76f2ea12d3a3d3232a1b7b36ce88a48d4a7c38b039acd75 Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Wed, 12 Feb 2020 10:03:46 +0000 Subject: [PATCH 1/5] Accepting request 773642 from home:marxin:branches:network:time - Update clknetsim to version 79ffe44 (fixes boo#1162964). OBS-URL: https://build.opensuse.org/request/show/773642 OBS-URL: https://build.opensuse.org/package/show/network:time/chrony?expand=0&rev=77 --- chrony.changes | 5 +++++ chrony.spec | 4 ++-- clknetsim-58c5e8b.tar.gz | 3 --- clknetsim-79ffe44.tar.gz | 3 +++ 4 files changed, 10 insertions(+), 5 deletions(-) delete mode 100644 clknetsim-58c5e8b.tar.gz create mode 100644 clknetsim-79ffe44.tar.gz diff --git a/chrony.changes b/chrony.changes index c3d292f..6681878 100644 --- a/chrony.changes +++ b/chrony.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Feb 12 09:24:24 UTC 2020 - Martin Liška + +- Update clknetsim to version 79ffe44 (fixes boo#1162964). + ------------------------------------------------------------------- Sat Oct 26 10:39:29 UTC 2019 - Arjen de Korte diff --git a/chrony.spec b/chrony.spec index 7570bfb..1615daf 100644 --- a/chrony.spec +++ b/chrony.spec @@ -1,7 +1,7 @@ # # spec file for package chrony # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ %define vendorzone opensuse. -%global clknetsim_ver 58c5e8b +%global clknetsim_ver 79ffe44 #Compat macro for new _fillupdir macro introduced in Nov 2017 %if ! %{defined _fillupdir} %define _fillupdir %{_localstatedir}/adm/fillup-templates diff --git a/clknetsim-58c5e8b.tar.gz b/clknetsim-58c5e8b.tar.gz deleted file mode 100644 index d101e00..0000000 --- a/clknetsim-58c5e8b.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:63566698c2c4bf70abd999666a02d52d00a85e68990bbed0361ffc50c9edf945 -size 42424 diff --git a/clknetsim-79ffe44.tar.gz b/clknetsim-79ffe44.tar.gz new file mode 100644 index 0000000..31bba15 --- /dev/null +++ b/clknetsim-79ffe44.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:abfe039afa7a9dcfaff4156274adacb367041d8b82f20e77ebc6c33a3bcc9c6d +size 45722 From 2bd32541921cde1ae4c068f1a1b973d75641d8c8c945ada13238f058de0f440d Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Wed, 12 Feb 2020 11:49:58 +0000 Subject: [PATCH 2/5] Accepting request 773674 from home:marxin:branches:network:time Use service to get tarball. OBS-URL: https://build.opensuse.org/request/show/773674 OBS-URL: https://build.opensuse.org/package/show/network:time/chrony?expand=0&rev=78 --- clknetsim-79ffe44.tar.gz | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clknetsim-79ffe44.tar.gz b/clknetsim-79ffe44.tar.gz index 31bba15..b917249 100644 --- a/clknetsim-79ffe44.tar.gz +++ b/clknetsim-79ffe44.tar.gz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:abfe039afa7a9dcfaff4156274adacb367041d8b82f20e77ebc6c33a3bcc9c6d -size 45722 +oid sha256:2d60fb5d6a12dd12fafa07b86a0ed8eba2bf552987e960c6d468c4869199dd6a +size 45700 From 965d6fca993f433ce765867bd15c5d331ba51830dfcfbef3ea48848c83f964d2 Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Thu, 13 Feb 2020 09:38:25 +0000 Subject: [PATCH 3/5] Accepting request 774112 from home:marxin:branches:network:time - Backport test-fix-util-unit-test-for-NTP-era-split.patch. OBS-URL: https://build.opensuse.org/request/show/774112 OBS-URL: https://build.opensuse.org/package/show/network:time/chrony?expand=0&rev=79 --- ...fix-util-unit-test-for-NTP-era-split.patch | 41 +++++++++++++++++++ chrony.changes | 1 + chrony.spec | 2 + 3 files changed, 44 insertions(+) create mode 100644 chrony-test-fix-util-unit-test-for-NTP-era-split.patch diff --git a/chrony-test-fix-util-unit-test-for-NTP-era-split.patch b/chrony-test-fix-util-unit-test-for-NTP-era-split.patch new file mode 100644 index 0000000..c1841ed --- /dev/null +++ b/chrony-test-fix-util-unit-test-for-NTP-era-split.patch @@ -0,0 +1,41 @@ +From 2d9eb5b6fa5225a7300c8eed95712969249900fb Mon Sep 17 00:00:00 2001 +From: Miroslav Lichvar +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; +-- +2.25.0 + diff --git a/chrony.changes b/chrony.changes index 6681878..7eaa3b7 100644 --- a/chrony.changes +++ b/chrony.changes @@ -2,6 +2,7 @@ Wed Feb 12 09:24:24 UTC 2020 - Martin Liška - Update clknetsim to version 79ffe44 (fixes boo#1162964). +- Backport test-fix-util-unit-test-for-NTP-era-split.patch. ------------------------------------------------------------------- Sat Oct 26 10:39:29 UTC 2019 - Arjen de Korte diff --git a/chrony.spec b/chrony.spec index 1615daf..d262ed5 100644 --- a/chrony.spec +++ b/chrony.spec @@ -46,6 +46,7 @@ Patch0: chrony-config.patch Patch1: chrony-service-helper.patch Patch2: chrony-logrotate.patch Patch3: chrony-service-ordering.patch +Patch4: chrony-test-fix-util-unit-test-for-NTP-era-split.patch BuildRequires: NetworkManager-devel BuildRequires: bison BuildRequires: gcc-c++ @@ -98,6 +99,7 @@ or a different computer. %patch1 -p1 %patch2 -p1 %patch3 +%patch4 -p1 # If this is an openSUSE build, use our vendor zone # (2.*pool.ntp.org names include IPv6 addresses). If not From a9fcc1aa070cbd22a9b6fe56a0a99d4f7dc82ca920b3442b404d27c4ffa331d3 Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Thu, 13 Feb 2020 10:00:16 +0000 Subject: [PATCH 4/5] Accepting request 774130 from home:marxin:branches:network:time - Backport chrony-test-fix-util-unit-test-for-NTP-era-split.patch. OBS-URL: https://build.opensuse.org/request/show/774130 OBS-URL: https://build.opensuse.org/package/show/network:time/chrony?expand=0&rev=80 --- chrony.changes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrony.changes b/chrony.changes index 7eaa3b7..ff62604 100644 --- a/chrony.changes +++ b/chrony.changes @@ -2,7 +2,7 @@ Wed Feb 12 09:24:24 UTC 2020 - Martin Liška - Update clknetsim to version 79ffe44 (fixes boo#1162964). -- Backport test-fix-util-unit-test-for-NTP-era-split.patch. +- Backport chrony-test-fix-util-unit-test-for-NTP-era-split.patch. ------------------------------------------------------------------- Sat Oct 26 10:39:29 UTC 2019 - Arjen de Korte From fd8ad00186b803746b56b78e9e94c4266b9e89282b0dccd86f77f37211212f63 Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Thu, 13 Feb 2020 12:49:51 +0000 Subject: [PATCH 5/5] Accepting request 774157 from home:marxin:branches:network:time - Add chrony-test-update-processing-of-packet-log.patch in order to fix test-suite failure. OBS-URL: https://build.opensuse.org/request/show/774157 OBS-URL: https://build.opensuse.org/package/show/network:time/chrony?expand=0&rev=81 --- ...test-update-processing-of-packet-log.patch | 30 +++++++++++++++++++ chrony.changes | 6 ++++ chrony.spec | 2 ++ 3 files changed, 38 insertions(+) create mode 100644 chrony-test-update-processing-of-packet-log.patch diff --git a/chrony-test-update-processing-of-packet-log.patch b/chrony-test-update-processing-of-packet-log.patch new file mode 100644 index 0000000..d0d0a15 --- /dev/null +++ b/chrony-test-update-processing-of-packet-log.patch @@ -0,0 +1,30 @@ +From 62d6aed6a64b887c9e3b7f03d9e0db1deaa2696a Mon Sep 17 00:00:00 2001 +From: Miroslav Lichvar +Date: Tue, 18 Jun 2019 15:41:50 +0200 +Subject: [PATCH] test: update processing of packet log + +Two new fields have been added to the packet log, which broke some +of the simulation tests. +--- + test/simulation/test.common | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/test/simulation/test.common b/test/simulation/test.common +index 951a794..8ed6ad9 100644 +--- a/test/simulation/test.common ++++ b/test/simulation/test.common +@@ -391,9 +391,9 @@ check_packet_port() { + for i in $(seq 1 $(get_chronyd_nodes)); do + test_message 3 0 "node $i:" + +- grep -E -q " $port [0-9]+\$" tmp/log.packets && \ ++ grep -E -q "^([0-9e.+-]+ ){5}$port " tmp/log.packets && \ + ! grep -E "^[0-9e.+-]+ $i " tmp/log.packets | \ +- grep -E -q -v " $port [0-9]+\$" && \ ++ grep -E -q -v "^([0-9e.+-]+ ){5}$port " && \ + test_ok || test_bad + [ $? -eq 0 ] || ret=1 + done +-- +2.25.0 + diff --git a/chrony.changes b/chrony.changes index ff62604..79891e6 100644 --- a/chrony.changes +++ b/chrony.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Feb 13 12:45:44 UTC 2020 - Martin Liška + +- Add chrony-test-update-processing-of-packet-log.patch in order + to fix test-suite failure. + ------------------------------------------------------------------- Wed Feb 12 09:24:24 UTC 2020 - Martin Liška diff --git a/chrony.spec b/chrony.spec index d262ed5..249af3a 100644 --- a/chrony.spec +++ b/chrony.spec @@ -47,6 +47,7 @@ Patch1: chrony-service-helper.patch Patch2: chrony-logrotate.patch Patch3: chrony-service-ordering.patch Patch4: chrony-test-fix-util-unit-test-for-NTP-era-split.patch +Patch5: chrony-test-update-processing-of-packet-log.patch BuildRequires: NetworkManager-devel BuildRequires: bison BuildRequires: gcc-c++ @@ -100,6 +101,7 @@ or a different computer. %patch2 -p1 %patch3 %patch4 -p1 +%patch5 -p1 # If this is an openSUSE build, use our vendor zone # (2.*pool.ntp.org names include IPv6 addresses). If not