Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package chrony for openSUSE:Factory checked in at 2024-02-27 22:44:22 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/chrony (Old) and /work/SRC/openSUSE:Factory/.chrony.new.1770 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "chrony" Tue Feb 27 22:44:22 2024 rev:41 rq:1151495 version:4.5 Changes: -------- --- /work/SRC/openSUSE:Factory/chrony/chrony.changes 2023-10-05 20:03:20.659127468 +0200 +++ /work/SRC/openSUSE:Factory/.chrony.new.1770/chrony.changes 2024-02-27 22:44:29.446145723 +0100 @@ -1,0 +2,15 @@ +Mon Feb 26 10:33:53 UTC 2024 - Dominique Leuenberger <[email protected]> + +- Use %patch -P N instead of deprecated %patchN. + +------------------------------------------------------------------- +Mon Jan 15 14:12:31 UTC 2024 - Reinhard Max <[email protected]> + +- Update to version 4.5: + * Add support for AES-GCM-SIV in GnuTLS + * Add support for corrections from PTP transparent clocks + * Add support for systemd socket activation + * Fix presend in interleaved mode + * Fix reloading of modified sources from sourcedir + +------------------------------------------------------------------- Old: ---- chrony-4.4.tar.gz chrony-4.4.tar.gz.sig clknetsim-ef2a7a9.tar.gz New: ---- chrony-4.5.tar.gz chrony-4.5.tar.gz.sig clknetsim-5d1dc05.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ chrony.spec ++++++ --- /var/tmp/diff_new_pack.0mwaTw/_old 2024-02-27 22:44:30.314177191 +0100 +++ /var/tmp/diff_new_pack.0mwaTw/_new 2024-02-27 22:44:30.314177191 +0100 @@ -1,7 +1,7 @@ # # spec file for package chrony # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -33,7 +33,7 @@ %bcond_without testsuite %define _systemdutildir %(pkg-config --variable systemdutildir systemd) -%global clknetsim_ver ef2a7a9 +%global clknetsim_ver 5d1dc05 #Compat macro for new _fillupdir macro introduced in Nov 2017 %if ! %{defined _fillupdir} %define _fillupdir %{_localstatedir}/adm/fillup-templates @@ -41,7 +41,7 @@ %define chrony_helper %{_libexecdir}/chrony/helper %define chrony_rundir %{_rundir}/%{name} Name: chrony -Version: 4.4 +Version: 4.5 Release: 0 Summary: System Clock Synchronization Client and Server License: GPL-2.0-only @@ -136,7 +136,7 @@ Requires: %name = %version BuildArch: noarch Supplements: (chrony and branding-SLE) -Removepathpostfixes:.suse +Removepathpostfixes: .suse %description pool-suse This package configures chrony to use the SUSE NTP server pool by @@ -151,7 +151,7 @@ Requires: %name = %version BuildArch: noarch Supplements: (chrony and branding-openSUSE) -Removepathpostfixes:.opensuse +Removepathpostfixes: .opensuse %description pool-openSUSE This package configures chrony to use the openSUSE NTP server pool by @@ -164,7 +164,7 @@ Conflicts: %name-pool Requires: %name = %version BuildArch: noarch -Removepathpostfixes:.empty +Removepathpostfixes: .empty %description pool-empty This package provides an empty /etc/chrony.d/pool.conf file for @@ -175,12 +175,12 @@ %prep %setup -q -a 10 -%patch0 -p1 -%patch1 -%patch2 -p1 -%patch3 -%patch7 -%patch8 +%patch -P 0 +%patch -P 1 +%patch -P 2 -p1 +%patch -P 3 +%patch -P 7 +%patch -P 8 # Remove pool statements from the default /etc/chrony.conf. They will # be provided by branding packages in /etc/chrony.d/pool.conf . ++++++ chrony-4.4.tar.gz -> chrony-4.5.tar.gz ++++++ ++++ 3714 lines of diff (skipped) ++++++ chrony-config.patch ++++++ --- /var/tmp/diff_new_pack.0mwaTw/_old 2024-02-27 22:44:30.466182701 +0100 +++ /var/tmp/diff_new_pack.0mwaTw/_new 2024-02-27 22:44:30.470182846 +0100 @@ -1,14 +1,12 @@ -Index: chrony-4.0/examples/chrony.conf.example3 -=================================================================== ---- chrony-4.0.orig/examples/chrony.conf.example3 -+++ chrony-4.0/examples/chrony.conf.example3 +--- examples/chrony.conf.example3.orig ++++ examples/chrony.conf.example3 @@ -27,12 +27,38 @@ # you can access at http://support.ntp.org/bin/view/Servers/WebHome or # you can use servers from the pool.ntp.org project. --! server foo.example.net iburst --! server bar.example.net iburst --! server baz.example.net iburst +-! server ntp1.example.net iburst +-! server ntp2.example.net iburst +-! server ntp3.example.net iburst - ! pool pool.ntp.org iburst ++++++ chrony-htonl.patch ++++++ --- /var/tmp/diff_new_pack.0mwaTw/_old 2024-02-27 22:44:30.498183862 +0100 +++ /var/tmp/diff_new_pack.0mwaTw/_new 2024-02-27 22:44:30.502184006 +0100 @@ -1,6 +1,6 @@ --- test/unit/util.c.orig +++ test/unit/util.c -@@ -561,7 +561,7 @@ test_unit(void) +@@ -602,7 +602,7 @@ test_unit(void) #else TEST_CHECK(tspec.tv_sec_high == htonl(TV_NOHIGHSEC)); #endif ++++++ clknetsim-ef2a7a9.tar.gz -> clknetsim-5d1dc05.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clknetsim-ef2a7a92b05bbefcacaf3ec4e265fd22c098d602/Makefile new/clknetsim-5d1dc05806155924d7f0a004f7e0643b866c7807/Makefile --- old/clknetsim-ef2a7a92b05bbefcacaf3ec4e265fd22c098d602/Makefile 2023-06-12 10:50:01.000000000 +0200 +++ new/clknetsim-5d1dc05806155924d7f0a004f7e0643b866c7807/Makefile 2023-10-05 10:42:12.000000000 +0200 @@ -4,7 +4,8 @@ all: clknetsim.so clknetsim -apiflags := $(shell grep -q __timezone_ptr_t /usr/include/sys/time.h || echo -DGETTIMEOFDAY_VOID) +apiflags := $(shell echo -e '\x23include <sys/time.h>' | $(CC) -x c -E - | \ + grep __timezone_ptr_t > /dev/null || echo -DGETTIMEOFDAY_VOID) clientobjs = client.o serverobjs = $(patsubst %.cc,%.o,$(wildcard *.cc)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clknetsim-ef2a7a92b05bbefcacaf3ec4e265fd22c098d602/README new/clknetsim-5d1dc05806155924d7f0a004f7e0643b866c7807/README --- old/clknetsim-ef2a7a92b05bbefcacaf3ec4e265fd22c098d602/README 2023-06-12 10:50:01.000000000 +0200 +++ new/clknetsim-5d1dc05806155924d7f0a004f7e0643b866c7807/README 2023-10-05 10:42:12.000000000 +0200 @@ -121,6 +121,9 @@ the network delay for packets sent from node X to node Y in seconds, the expression is evaluated for each sent packet, a negative value means the packet will be dropped, there is no default (packets are dropped) +- nodeX_delay_correctionY = expr + the correction written to PTP packets (as a one-step E2E transparent clock) + sent from node X to node Y in seconds, no correction is written by default - nodeX_offset = float the initial time error of the system clock in seconds, the default is 0 - nodeX_start = float @@ -177,6 +180,10 @@ subnet - number of the Ethernet network in which the packet was sent +Variables available in delay correction expressions: + delay - delay of the packet + length - length of the packet (layer 4) + An example: # node1 is an NTP server, it has an accurate and absolutely stable clock diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clknetsim-ef2a7a92b05bbefcacaf3ec4e265fd22c098d602/client.c new/clknetsim-5d1dc05806155924d7f0a004f7e0643b866c7807/client.c --- old/clknetsim-ef2a7a92b05bbefcacaf3ec4e265fd22c098d602/client.c 2023-06-12 10:50:01.000000000 +0200 +++ new/clknetsim-5d1dc05806155924d7f0a004f7e0643b866c7807/client.c 2023-10-05 10:42:12.000000000 +0200 @@ -80,8 +80,6 @@ #define PTP_PRIMARY_MCAST_ADDR 0xe0000181 /* 224.0.1.129 */ #define PTP_PDELAY_MCAST_ADDR 0xe000006b /* 224.0.0.107 */ -#define LINK_SPEED 100000 - #define REFCLK_FD 1000 #define REFCLK_ID ((clockid_t)(((unsigned int)~REFCLK_FD << 3) | 3)) #define REFCLK_PHC_INDEX 0 @@ -147,6 +145,9 @@ static double phc_jitter_asym = 0.0; static int phc_swap = 0; +/* Ethernet speed in Mb/s */ +static int link_speed = 100000; + static double rtc_offset = 0.0; static int rtc_timerfd = 0; @@ -161,7 +162,7 @@ char data[MAX_PACKET_SIZE]; unsigned int len; unsigned int subnet; - unsigned int to; + unsigned int to_from; unsigned int port; }; @@ -309,6 +310,10 @@ if (env) timestamping = atoi(env); + env = getenv("CLKNETSIM_LINK_SPEED"); + if (env) + link_speed = atoi(env); + env = getenv("CLKNETSIM_PHC_DELAY"); if (env) phc_delay = atof(env); @@ -1227,11 +1232,21 @@ struct Reply_recv recv_rep; make_request(REQ_RECV, NULL, 0, &recv_rep, sizeof (recv_rep)); - if (rep.ret != REPLY_SELECT_BROADCAST) - fprintf(stderr, "clknetsim: dropped packet of type %d from " - "node %d on port %d in subnet %d\n", - recv_rep.type, recv_rep.from + 1, - recv_rep.dst_port, recv_rep.subnet + 1); + if (rep.ret != REPLY_SELECT_BROADCAST) { + if (s >= 0 && sockets[s].buffer.len == 0) { + sockets[s].buffer.len = recv_rep.len; + assert(sockets[s].buffer.len <= sizeof (sockets[s].buffer.data)); + memcpy(sockets[s].buffer.data, recv_rep.data, sockets[s].buffer.len); + sockets[s].buffer.subnet = recv_rep.subnet; + sockets[s].buffer.to_from = recv_rep.from; + sockets[s].buffer.port = recv_rep.src_port; + } else { + fprintf(stderr, "clknetsim: dropped packet of type %d from " + "node %d on port %d in subnet %d\n", + recv_rep.type, recv_rep.from + 1, + recv_rep.dst_port, recv_rep.subnet + 1); + } + } goto try_again; } @@ -1971,7 +1986,7 @@ if (cmd->cmd == ETHTOOL_GSET) { memset(cmd, 0, sizeof (*cmd)); - ethtool_cmd_speed_set(cmd, LINK_SPEED); + ethtool_cmd_speed_set(cmd, link_speed); #ifdef ETHTOOL_GET_TS_INFO } else if (cmd->cmd == ETHTOOL_GET_TS_INFO) { struct ethtool_ts_info *info; @@ -2306,7 +2321,7 @@ memcpy(last_ts_msg->data, req.data, req.len); last_ts_msg->len = req.len; last_ts_msg->subnet = req.subnet; - last_ts_msg->to = req.to; + last_ts_msg->to_from = req.to; last_ts_msg->port = req.dst_port; } @@ -2398,13 +2413,13 @@ assert(sockets[s].type == SOCK_DGRAM); rep.type = MSG_TYPE_UDP_DATA; rep.subnet = last_ts_msg->subnet; - rep.from = last_ts_msg->to; + rep.from = last_ts_msg->to_from; rep.src_port = last_ts_msg->port; rep.dst_port = sockets[s].port; /* put the message in an Ethernet frame */ rep.len = generate_eth_frame(sockets[s].type, last_ts_msg->subnet, - node, last_ts_msg->to, + node, last_ts_msg->to_from, sockets[s].port, last_ts_msg->port, last_ts_msg->data, last_ts_msg->len, rep.data, sizeof (rep.data)); @@ -2412,14 +2427,24 @@ last_ts_msg->len = 0; } else if (sockets[s].buffer.len > 0) { - assert(sockets[s].type == SOCK_STREAM && sockets[s].remote_node != -1); + switch (sockets[s].type) { + case SOCK_STREAM: + assert(sockets[s].remote_node != -1); + rep.type = MSG_TYPE_TCP_DATA; + break; + case SOCK_DGRAM: + rep.type = MSG_TYPE_UDP_DATA; + break; + default: + assert(0); + } + assert(sockets[s].buffer.len <= sizeof (rep.data)); memcpy(rep.data, sockets[s].buffer.data, sockets[s].buffer.len); - rep.type = MSG_TYPE_TCP_DATA; - rep.subnet = sockets[s].iface - IFACE_ETH0; - rep.from = sockets[s].remote_node; - rep.src_port = sockets[s].remote_port; + rep.subnet = sockets[s].buffer.subnet; + rep.from = sockets[s].buffer.to_from; + rep.src_port = sockets[s].buffer.port; rep.dst_port = sockets[s].port; rep.len = sockets[s].buffer.len; @@ -2488,13 +2513,16 @@ memcpy(msg->msg_iov[0].iov_base, rep.data, msglen); if (sockets[s].type == SOCK_STREAM) { - if (msglen < rep.len) { - sockets[s].buffer.len = rep.len - msglen; - assert(sockets[s].buffer.len <= sizeof (sockets[s].buffer.data)); - memcpy(sockets[s].buffer.data, rep.data + msglen, rep.len - msglen); - } else { - sockets[s].buffer.len = 0; - } + if (msglen < rep.len) { + sockets[s].buffer.len = rep.len - msglen; + assert(sockets[s].buffer.len <= sizeof (sockets[s].buffer.data)); + memcpy(sockets[s].buffer.data, rep.data + msglen, rep.len - msglen); + sockets[s].buffer.subnet = rep.subnet; + sockets[s].buffer.to_from = rep.from; + sockets[s].buffer.port = rep.src_port; + } else { + sockets[s].buffer.len = 0; + } } cmsglen = 0; @@ -2542,7 +2570,7 @@ if (sockets[s].time_stamping & SOF_TIMESTAMPING_RAW_HARDWARE) { clock_gettime(timestamping > 1 ? REFCLK_ID : CLOCK_REALTIME, &ts); if (!(flags & MSG_ERRQUEUE)) - add_to_timespec(&ts, -(8 * (msglen + 42 + 4) / (1e6 * LINK_SPEED))); + add_to_timespec(&ts, -(8 * (msglen + 42 + 4) / (1e6 * link_speed))); memcpy((struct timespec *)CMSG_DATA(cmsg) + 2, &ts, sizeof (ts)); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clknetsim-ef2a7a92b05bbefcacaf3ec4e265fd22c098d602/client_fuzz.c new/clknetsim-5d1dc05806155924d7f0a004f7e0643b866c7807/client_fuzz.c --- old/clknetsim-ef2a7a92b05bbefcacaf3ec4e265fd22c098d602/client_fuzz.c 2023-06-12 10:50:01.000000000 +0200 +++ new/clknetsim-5d1dc05806155924d7f0a004f7e0643b866c7807/client_fuzz.c 2023-10-05 10:42:12.000000000 +0200 @@ -262,9 +262,11 @@ case REQ_SETTIME: network_time = request->settime.time; break; + case REQ_GETREFOFFSETS: + reply->getrefoffsets.size = MAX_GETREFOFFSETS_SIZE; + break; case REQ_ADJTIME: case REQ_GETREFSAMPLE: - case REQ_GETREFOFFSETS: case REQ_DEREGISTER: break; case REQ_ADJTIMEX: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clknetsim-ef2a7a92b05bbefcacaf3ec4e265fd22c098d602/network.cc new/clknetsim-5d1dc05806155924d7f0a004f7e0643b866c7807/network.cc --- old/clknetsim-ef2a7a92b05bbefcacaf3ec4e265fd22c098d602/network.cc 2023-06-12 10:50:01.000000000 +0200 +++ new/clknetsim-5d1dc05806155924d7f0a004f7e0643b866c7807/network.cc 2023-10-05 10:42:12.000000000 +0200 @@ -74,6 +74,7 @@ stats.resize(n); link_delays.resize(n * n); + link_corrections.resize(n * n); } Network::~Network() { @@ -87,6 +88,11 @@ link_delays.pop_back(); } + while (!link_corrections.empty()) { + delete link_corrections.back(); + link_corrections.pop_back(); + } + unlink(socket_name); if (offset_log) @@ -179,6 +185,17 @@ link_delays[i] = generator; } +void Network::set_link_correction_generator(unsigned int from, unsigned int to, Generator *generator) { + unsigned int i; + + assert(from < nodes.size() && to < nodes.size()); + + i = from * nodes.size() + to; + if (link_corrections[i]) + delete link_corrections[i]; + link_corrections[i] = generator; +} + bool Network::run(double time_limit) { int i, n = nodes.size(), waiting; bool pending_update; @@ -289,6 +306,22 @@ nodes[i]->get_clock()->get_raw_freq() - 1.0); } +void Network::write_correction(struct Packet *packet, double correction) { + uint64_t c; + + /* one-step transparent edge-to-edge PTP clock */ + + if (packet->src_port != 319 || packet->dst_port != 319 || packet->len < 34 || + (packet->data[0] != 0 && packet->data[0] != 1) || (packet->data[1] & 0xf) != 2) + return; + + c = ((uint64_t)ntohl(*(uint32_t *)(packet->data + 8)) << 32) | + ntohl(*(uint32_t *)(packet->data + 12)); + c += (uint64_t)(correction * ((1 << 16) * 1.0e9)); + *(uint32_t *)(packet->data + 8) = htonl(c >> 32); + *(uint32_t *)(packet->data + 12) = htonl(c); +} + void Network::open_offset_log(const char *log) { offset_log = fopen(log, "w"); } @@ -383,6 +416,12 @@ delay = link_delays[i]->generate(&link_delay_variables); } + if (delay > 0.0 && link_corrections[i]) { + link_correction_variables["delay"] = delay; + link_correction_variables["length"] = packet->len; + write_correction(packet, link_corrections[i]->generate(&link_correction_variables)); + } + stats[packet->from].update_packet_stats(false, time, delay); if (packet_log) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clknetsim-ef2a7a92b05bbefcacaf3ec4e265fd22c098d602/network.h new/clknetsim-5d1dc05806155924d7f0a004f7e0643b866c7807/network.h --- old/clknetsim-ef2a7a92b05bbefcacaf3ec4e265fd22c098d602/network.h 2023-06-12 10:50:01.000000000 +0200 +++ new/clknetsim-5d1dc05806155924d7f0a004f7e0643b866c7807/network.h 2023-10-05 10:42:12.000000000 +0200 @@ -59,9 +59,11 @@ const char *socket_name; vector<Node *> nodes; vector<Generator *> link_delays; + vector<Generator *> link_corrections; vector<Stats> stats; Generator_variables link_delay_variables; + Generator_variables link_correction_variables; Packet_queue packet_queue; @@ -72,6 +74,7 @@ void update(); void update_clock_stats(); + void write_correction(struct Packet *packet, double correction); public: Network(const char *socket, unsigned int n, unsigned int s, unsigned int rate); @@ -79,6 +82,7 @@ bool prepare_clients(); Node *get_node(unsigned int node); void set_link_delay_generator(unsigned int from, unsigned int to, Generator *generator); + void set_link_correction_generator(unsigned int from, unsigned int to, Generator *generator); bool run(double time_limit); void open_offset_log(const char *log); void open_freq_log(const char *log); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clknetsim-ef2a7a92b05bbefcacaf3ec4e265fd22c098d602/server.cc new/clknetsim-5d1dc05806155924d7f0a004f7e0643b866c7807/server.cc --- old/clknetsim-ef2a7a92b05bbefcacaf3ec4e265fd22c098d602/server.cc 2023-06-12 10:50:01.000000000 +0200 +++ new/clknetsim-5d1dc05806155924d7f0a004f7e0643b866c7807/server.cc 2023-10-05 10:42:12.000000000 +0200 @@ -75,7 +75,13 @@ network->get_node(node)->get_clock()->set_ntp_flag(atoi(arg), CLOCK_NTP_FLL_MODE2); else if (strncmp(var, "pll_clamp", 9) == 0) network->get_node(node)->get_clock()->set_ntp_flag(atoi(arg), CLOCK_NTP_PLL_CLAMP); - else if (strncmp(var, "delay", 5) == 0) { + else if (strncmp(var, "delay_correction", 16) == 0) { + var += 16; + node2 = atoi(var) - 1; + if (node2 >= nodes) + continue; + network->set_link_correction_generator(node, node2, generator.generate(arg)); + } else if (strncmp(var, "delay", 5) == 0) { var += 5; node2 = atoi(var) - 1; if (node2 >= nodes) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clknetsim-ef2a7a92b05bbefcacaf3ec4e265fd22c098d602/sysheaders.h new/clknetsim-5d1dc05806155924d7f0a004f7e0643b866c7807/sysheaders.h --- old/clknetsim-ef2a7a92b05bbefcacaf3ec4e265fd22c098d602/sysheaders.h 2023-06-12 10:50:01.000000000 +0200 +++ new/clknetsim-5d1dc05806155924d7f0a004f7e0643b866c7807/sysheaders.h 2023-10-05 10:42:12.000000000 +0200 @@ -1,6 +1,8 @@ #ifndef SYSTEM_H +#include <arpa/inet.h> #include <errno.h> +#include <stdint.h> #include <stdio.h> #include <string.h> #include <unistd.h>
