Hello community,

here is the log from the commit of package chrony for openSUSE:Factory checked 
in at 2017-09-23 21:35:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/chrony (Old)
 and      /work/SRC/openSUSE:Factory/.chrony.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "chrony"

Sat Sep 23 21:35:56 2017 rev:6 rq:528217 version:3.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/chrony/chrony.changes    2017-02-03 
17:34:37.310851211 +0100
+++ /work/SRC/openSUSE:Factory/.chrony.new/chrony.changes       2017-09-23 
21:36:10.057943360 +0200
@@ -1,0 +2,36 @@
+Wed Sep 20 23:57:53 UTC 2017 - [email protected]
+
+- Upgraded to version 3.2:
+  Enhancements
+  * Improve stability with NTP sources and reference clocks
+  * Improve stability with hardware timestamping
+  * Improve support for NTP interleaved modes
+  * Control frequency of system clock on macOS 10.13 and later
+  * Set TAI-UTC offset of system clock with leapsectz directive
+  * Minimise data in client requests to improve privacy
+  * Allow transmit-only hardware timestamping
+  * Add support for new timestamping options introduced in Linux 4.13
+  * Add root delay, root dispersion and maximum error to tracking log
+  * Add mindelay and asymmetry options to server/peer/pool directive
+  * Add extpps option to PHC refclock to timestamp external PPS signal
+  * Add pps option to refclock directive to treat any refclock as PPS
+  * Add width option to refclock directive to filter wrong pulse edges
+  * Add rxfilter option to hwtimestamp directive
+  * Add -x option to disable control of system clock
+  * Add -l option to log to specified file instead of syslog
+  * Allow multiple command-line options to be specified together
+  * Allow starting without root privileges with -Q option
+  * Update seccomp filter for new glibc versions
+  * Dump history on exit by default with dumpdir directive
+  * Use hardening compiler options by default
+  Bug fixes
+  * Don't drop PHC samples with low-resolution system clock
+  * Ignore outliers in PHC tracking, RTC tracking, manual input
+  * Increase polling interval when peer is not responding
+  * Exit with error message when include directive fails
+  * Don't allow slash after hostname in allow/deny directive/command
+  * Try to connect to all addresses in chronyc before giving up
+- Upgraded clknetsim to version 71dbbc5.
+- Reworked chrony-fix-open.patch to fit the new version
+
+-------------------------------------------------------------------

Old:
----
  chrony-3.1.tar.gz
  clknetsim-ce89a1b.tar.gz

New:
----
  chrony-3.2.tar.gz
  clknetsim-71dbbc5.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ chrony.spec ++++++
--- /var/tmp/diff_new_pack.hjxZV2/_old  2017-09-23 21:36:11.521737498 +0200
+++ /var/tmp/diff_new_pack.hjxZV2/_new  2017-09-23 21:36:11.525736936 +0200
@@ -17,7 +17,7 @@
 
 
 %define vendorzone opensuse.
-%global clknetsim_ver ce89a1b
+%global clknetsim_ver 71dbbc5
 %if 0%{?suse_version} > 1230
 %bcond_without  systemd
 %bcond_without  syscallfilter
@@ -26,7 +26,7 @@
 %bcond_with     syscallfilter
 %endif
 Name:           chrony
-Version:        3.1
+Version:        3.2
 Release:        0
 Summary:        System Clock Synchronization Client and Server
 License:        GPL-2.0

++++++ chrony-3.1.tar.gz -> chrony-3.2.tar.gz ++++++
++++ 10812 lines of diff (skipped)

++++++ chrony-fix-open.patch ++++++
--- /var/tmp/diff_new_pack.hjxZV2/_old  2017-09-23 21:36:11.757704313 +0200
+++ /var/tmp/diff_new_pack.hjxZV2/_new  2017-09-23 21:36:11.757704313 +0200
@@ -1,7 +1,7 @@
-Index: chrony-3.1/clknetsim-ce89a1b4e361c432ba3541548008ef0a87bd7fdb/client.c
+Index: chrony-3.2/clknetsim-71dbbc509eee05cb29e33468be93d5ba52b79429/client.c
 ===================================================================
---- chrony-3.1/clknetsim-ce89a1b4e361c432ba3541548008ef0a87bd7fdb/client.c
-+++ chrony-3.1/clknetsim-ce89a1b4e361c432ba3541548008ef0a87bd7fdb/client.c
+--- chrony-3.2/clknetsim-71dbbc509eee05cb29e33468be93d5ba52b79429/client.c
++++ chrony-3.2/clknetsim-71dbbc509eee05cb29e33468be93d5ba52b79429/client.c
 @@ -1000,6 +1000,8 @@ int open(const char *pathname, int flags
        else if (!strcmp(pathname, "/dev/ptp1"))
                return SYSCLK_FD;

++++++ clknetsim-ce89a1b.tar.gz -> clknetsim-71dbbc5.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/clknetsim-ce89a1b4e361c432ba3541548008ef0a87bd7fdb/client.c 
new/clknetsim-71dbbc509eee05cb29e33468be93d5ba52b79429/client.c
--- old/clknetsim-ce89a1b4e361c432ba3541548008ef0a87bd7fdb/client.c     
2017-01-24 14:49:02.000000000 +0100
+++ new/clknetsim-71dbbc509eee05cb29e33468be93d5ba52b79429/client.c     
2017-07-25 09:46:32.000000000 +0200
@@ -191,7 +191,8 @@
        const char *env;
        unsigned int connect_retries = 100; /* 10 seconds */
 
-       assert(!initialized);
+       if (initialized)
+               return;
 
        _fopen = (FILE *(*)(const char *path, const char 
*mode))dlsym(RTLD_NEXT, "fopen");
        _fread = (size_t (*)(void *ptr, size_t size, size_t nmemb, FILE 
*stream))dlsym(RTLD_NEXT, "fread");
@@ -215,7 +216,6 @@
        env = getenv("CLKNETSIM_RANDOM_SEED");
        if (env)
                random_seed = atoi(env);
-       srandom(0);
 
        env = getenv("CLKNETSIM_RECV_MULTIPLY");
        if (env)
@@ -259,6 +259,9 @@
                _usleep(100000);
        }
 
+       /* this requires the node variable to be already set */
+       srandom(0);
+
        initialized = 1;
 
        req.node = node;
@@ -869,7 +872,8 @@
 
        /* ptp4l waiting for tx SO_TIMESTAMPING */
        if (nfds == 1 && fds[0].events != POLLOUT && 
get_socket_from_fd(fds[0].fd) >= 0 &&
-                       sockets[get_socket_from_fd(fds[0].fd)].time_stamping) {
+           sockets[get_socket_from_fd(fds[0].fd)].time_stamping &
+           (SOF_TIMESTAMPING_TX_SOFTWARE | SOF_TIMESTAMPING_TX_HARDWARE)) {
                if (!fds[0].events) {
                        fds[0].revents = POLLERR;
                        return 1;
@@ -961,6 +965,10 @@
                return URANDOM_FILE;
        }
 
+       /* make sure _fopen is initialized in case it is called from another
+          constructor (e.g. OpenSSL's libcrypto) */
+       init();
+
        return _fopen(path, mode);
 }
 
@@ -1165,7 +1173,7 @@
                        errno = EINVAL;
                        return -1;
                }
-               sockets[s].time_stamping = !!(int *)optval;
+               sockets[s].time_stamping = *(int *)optval;
        }
 #endif
 
@@ -1280,7 +1288,7 @@
        struct iface {
                struct ifaddrs ifaddrs;
                struct sockaddr_in addr, netmask, broadaddr;
-               char name[10];
+               char name[11];
        } *ifaces;
        int i;
        
@@ -1369,7 +1377,7 @@
 
        make_request(REQ_SEND, &req, offsetof(struct Request_send, data) + 
req.len, NULL, 0);
 
-       if (sockets[s].time_stamping) {
+       if (sockets[s].time_stamping & (SOF_TIMESTAMPING_TX_SOFTWARE | 
SOF_TIMESTAMPING_TX_HARDWARE)) {
                assert(req.len <= sizeof (last_ts_msg.data));
                memcpy(last_ts_msg.data, req.data, req.len);
                last_ts_msg.len = req.len;
@@ -1457,7 +1465,8 @@
 
        assert(s >= 0 && sockets[s].type == SOCK_DGRAM);
 
-       if (sockets[s].time_stamping && flags & MSG_ERRQUEUE) {
+       if (sockets[s].time_stamping & (SOF_TIMESTAMPING_TX_SOFTWARE | 
SOF_TIMESTAMPING_TX_HARDWARE) &&
+           flags & MSG_ERRQUEUE) {
                uint32_t addr;
                uint16_t port;
 
@@ -1535,7 +1544,10 @@
        }
 
 #ifdef SO_TIMESTAMPING
-       if (sockets[s].time_stamping) {
+       if ((sockets[s].time_stamping & (SOF_TIMESTAMPING_TX_SOFTWARE | 
SOF_TIMESTAMPING_TX_HARDWARE) &&
+            flags & MSG_ERRQUEUE) ||
+           (sockets[s].time_stamping & (SOF_TIMESTAMPING_RX_SOFTWARE | 
SOF_TIMESTAMPING_RX_HARDWARE) &&
+            !(flags & MSG_ERRQUEUE))) {
                struct timespec ts;
 
                /* don't use CMSG_NXTHDR as it's buggy in glibc */
@@ -1543,7 +1555,7 @@
                cmsglen += CMSG_SPACE(3 * sizeof (ts));
                assert(msg->msg_control && msg->msg_controllen >= cmsglen);
 
-               memset(cmsg, 0, sizeof (*cmsg));
+               memset(cmsg, 0, CMSG_SPACE(3 * sizeof (ts)));
                cmsg->cmsg_level = SOL_SOCKET;
                cmsg->cmsg_type = SO_TIMESTAMPING;
                cmsg->cmsg_len = CMSG_LEN(3 * sizeof (ts));
@@ -1551,8 +1563,10 @@
                clock_gettime(CLOCK_REALTIME, &ts);
 
                /* copy as sw and hw time stamp */
-               memcpy((struct timespec *)CMSG_DATA(cmsg), &ts, sizeof (ts));
-               memcpy((struct timespec *)CMSG_DATA(cmsg) + 2, &ts, sizeof 
(ts));
+               if (sockets[s].time_stamping & SOF_TIMESTAMPING_SOFTWARE)
+                       memcpy((struct timespec *)CMSG_DATA(cmsg), &ts, sizeof 
(ts));
+               if (sockets[s].time_stamping & SOF_TIMESTAMPING_RAW_HARDWARE)
+                       memcpy((struct timespec *)CMSG_DATA(cmsg) + 2, &ts, 
sizeof (ts));
        }
 #endif
        msg->msg_controllen = cmsglen;
@@ -1828,6 +1842,11 @@
 }
 #endif
 
+ssize_t getrandom(void *buf, size_t length, unsigned int flags) {
+       errno = ENOTSUP;
+       return -1;
+}
+
 void srandom(unsigned int seed) {
        FILE *f;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/clknetsim-ce89a1b4e361c432ba3541548008ef0a87bd7fdb/clknetsim.bash 
new/clknetsim-71dbbc509eee05cb29e33468be93d5ba52b79429/clknetsim.bash
--- old/clknetsim-ce89a1b4e361c432ba3541548008ef0a87bd7fdb/clknetsim.bash       
2017-01-24 14:49:02.000000000 +0100
+++ new/clknetsim-71dbbc509eee05cb29e33468be93d5ba52b79429/clknetsim.bash       
2017-07-25 09:46:32.000000000 +0200
@@ -13,13 +13,15 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+[ -n "$CLKNETSIM_TMPDIR" ] || CLKNETSIM_TMPDIR=tmp
+
 client_pids=""
 
 start_client() {
     local node=$1 client=$2 config=$3 suffix=$4 opts=$5
     local args=() line lastpid
 
-    rm -f tmp/log.$node tmp/conf.$node
+    rm -f $CLKNETSIM_TMPDIR/log.$node $CLKNETSIM_TMPDIR/conf.$node
 
     [ $client = chrony ] && client=chronyd
     [ $client = ntp ] && client=ntpd
@@ -31,29 +33,29 @@
 
     case $client in
        chronyd)
-           cat > tmp/conf.$node <<-EOF
-               pidfile tmp/pidfile.$node
+           cat > $CLKNETSIM_TMPDIR/conf.$node <<-EOF
+               pidfile $CLKNETSIM_TMPDIR/pidfile.$node
                allow
                cmdallow
                bindcmdaddress 0.0.0.0
                $config
                EOF
-           args=(-d -f tmp/conf.$node $opts)
+           args=(-d -f $CLKNETSIM_TMPDIR/conf.$node $opts)
            ;;
        ntpd)
-           cat > tmp/conf.$node <<-EOF
-               pidfile tmp/pidfile.$node
+           cat > $CLKNETSIM_TMPDIR/conf.$node <<-EOF
+               pidfile $CLKNETSIM_TMPDIR/pidfile.$node
                restrict default
                $config
                EOF
-           args=(-n -c tmp/conf.$node $opts)
+           args=(-n -c $CLKNETSIM_TMPDIR/conf.$node $opts)
            ;;
        ptp4l)
-           cat > tmp/conf.$node <<-EOF
+           cat > $CLKNETSIM_TMPDIR/conf.$node <<-EOF
                [global]
                $config
                EOF
-           args=(-f tmp/conf.$node $opts)
+           args=(-f $CLKNETSIM_TMPDIR/conf.$node $opts)
            ;;
        chronyc)
            args=($opts -m)
@@ -88,8 +90,8 @@
     esac
 
     LD_PRELOAD=$CLKNETSIM_PATH/clknetsim.so \
-    CLKNETSIM_NODE=$node CLKNETSIM_SOCKET=tmp/sock \
-    $client_wrapper $client$suffix "${args[@]}" &> tmp/log.$node &
+    CLKNETSIM_NODE=$node CLKNETSIM_SOCKET=$CLKNETSIM_TMPDIR/sock \
+    $client_wrapper $client$suffix "${args[@]}" &> $CLKNETSIM_TMPDIR/log.$node 
&
     lastpid=$!
     disown $lastpid
 
@@ -99,7 +101,8 @@
 start_server() {
     local nodes=$1 ret=0
     shift
-    $server_wrapper $CLKNETSIM_PATH/clknetsim "$@" -s tmp/sock tmp/conf $nodes 
> tmp/stats 2> tmp/log
+    $server_wrapper $CLKNETSIM_PATH/clknetsim "$@" -s $CLKNETSIM_TMPDIR/sock \
+       $CLKNETSIM_TMPDIR/conf $nodes > $CLKNETSIM_TMPDIR/stats 2> 
$CLKNETSIM_TMPDIR/log
     if [ $? -ne 0 ]; then
         echo clknetsim failed 1>&2
         ret=1
@@ -126,7 +129,7 @@
            echo "node1_delay${i} = $delayexprup"
        fi
         [ -n "$refclockexpr" ] && echo "node${i}_refclock = $refclockexpr"
-    done > tmp/conf
+    done > $CLKNETSIM_TMPDIR/conf
 }
 
 generate_config2() {
@@ -140,7 +143,7 @@
            echo "node${i}_delay${j} = $delayexpr"
            echo "node${j}_delay${i} = $delayexpr"
        done
-    done > tmp/conf
+    done > $CLKNETSIM_TMPDIR/conf
 }
 
 generate_config3() {
@@ -158,7 +161,7 @@
                echo "node${j}_delay${i} = $delayexprup"
            fi
        done
-    done > tmp/conf
+    done > $CLKNETSIM_TMPDIR/conf
 }
 
 generate_config4() {
@@ -177,7 +180,7 @@
            done
            added="$added $i"
        done
-    done > tmp/conf
+    done > $CLKNETSIM_TMPDIR/conf
 }
 
 find_sync() {
@@ -219,9 +222,9 @@
     local statname=$1 index=$2
 
     if [ -z "$index" ]; then
-       echo $(cat tmp/stats | grep "^$statname:" | cut -f 2)
+       echo $(cat $CLKNETSIM_TMPDIR/stats | grep "^$statname:" | cut -f 2)
     else
-       cat tmp/stats | grep "^$statname:" | cut -f 2 |
+       cat $CLKNETSIM_TMPDIR/stats | grep "^$statname:" | cut -f 2 |
        head -n $index | tail -n 1
     fi
 }
@@ -250,4 +253,4 @@
     exit 1
 fi
 
-[ -d tmp ] || mkdir tmp
+[ -d $CLKNETSIM_TMPDIR ] || mkdir $CLKNETSIM_TMPDIR
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/clknetsim-ce89a1b4e361c432ba3541548008ef0a87bd7fdb/clock.cc 
new/clknetsim-71dbbc509eee05cb29e33468be93d5ba52b79429/clock.cc
--- old/clknetsim-ce89a1b4e361c432ba3541548008ef0a87bd7fdb/clock.cc     
2017-01-24 14:49:02.000000000 +0100
+++ new/clknetsim-71dbbc509eee05cb29e33468be93d5ba52b79429/clock.cc     
2017-07-25 09:46:32.000000000 +0200
@@ -204,6 +204,7 @@
                case TIME_INS:
                        if ((time_t)(time + 0.5) % (24 * 3600) <= 1) {
                                time -= 1.0;
+                               ntp_timex.tai += 1.0;
                                ntp_state = TIME_OOP;
                        } else if (!(ntp_timex.status & STA_INS)) {
                                ntp_state = TIME_OK;
@@ -212,6 +213,7 @@
                case TIME_DEL:
                        if ((time_t)(time + 1.0 + 0.5) % (24 * 3600) <= 1) {
                                time += 1.0;
+                               ntp_timex.tai -= 1.0;
                                ntp_state = TIME_WAIT;
                        } else if (!(ntp_timex.status & STA_DEL)) {
                                ntp_state = TIME_OK;
@@ -329,6 +331,9 @@
                        time += buf->time.tv_sec + buf->time.tv_usec * 1e-6;
                ntp_timex.maxerror = MAXMAXERROR;
        }
+       if (buf->modes & ADJ_TAI) {
+               ntp_timex.tai = buf->constant;
+       }
 
        t = ntp_timex;
 


Reply via email to