From 2762934d9d7fd19fcc56234afbc25a11badcff01 Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Fri, 21 Jun 2013 16:51:21 +0200 Subject: [PATCH] update to 1.28-pre1 --- .gitignore | 2 +- chrony-delta.patch | 24 ------------------------ chrony.conf | 3 +++ chrony.helper | 41 ++--------------------------------------- chrony.spec | 7 +++---- chronyd.service | 1 - sources | 2 +- 7 files changed, 10 insertions(+), 70 deletions(-) delete mode 100644 chrony-delta.patch diff --git a/.gitignore b/.gitignore index 9e1db75..d81b4fb 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/chrony-1.27.tar.gz +/chrony-1.28-pre1.tar.gz diff --git a/chrony-delta.patch b/chrony-delta.patch deleted file mode 100644 index 2f82fd8..0000000 --- a/chrony-delta.patch +++ /dev/null @@ -1,24 +0,0 @@ -commit 0bb772c575b3842c38e6a58591ecea94449e9bae -Author: Miroslav Lichvar -Date: Fri Mar 8 13:54:10 2013 +0100 - - Fix delta calculation with extreme frequency offsets - - This should prevent chronyd from getting stuck and refusing new samples - due to failing test4 when the current measured frequency offset is close - to 1.0. That can happen when the system clock is stepped forward behind - chronyd's back. - -diff --git a/ntp_core.c b/ntp_core.c -index 0fb93e1..be9f613 100644 ---- a/ntp_core.c -+++ b/ntp_core.c -@@ -793,7 +793,7 @@ receive_packet(NTP_Packet *message, struct timeval *now, double now_err, NCR_Ins - assuming worst case frequency error between us and the other - source */ - -- delta = local_interval - remote_interval / (1.0 - source_freq_lo); -+ delta = local_interval - remote_interval * (1.0 + source_freq_lo); - - /* Calculate theta. Following the NTP definition, this is negative - if we are fast of the remote source. */ diff --git a/chrony.conf b/chrony.conf index 5f2d482..87186e7 100644 --- a/chrony.conf +++ b/chrony.conf @@ -33,6 +33,9 @@ keyfile /etc/chrony.keys # Specify the key used as password for chronyc. commandkey 1 +# Generate command key if missing. +generatecommandkey + # Disable logging of client accesses. noclientlog diff --git a/chrony.helper b/chrony.helper index 1fc0b34..8deac0c 100644 --- a/chrony.helper +++ b/chrony.helper @@ -1,46 +1,12 @@ #!/bin/bash -config=/etc/chrony.conf -keyfile=/etc/chrony.keys chronyc=/usr/bin/chronyc dhclient_servers=/var/lib/dhclient/chrony.servers.* dhclient_added_servers=/var/lib/dhclient/chrony.added_servers service_name=chronyd.service -get_key() { - awk '/^[ \t]*'$1'\>/ { if ($3 == "") print "MD5", $2; - else print $2, $3; exit }' < $keyfile -} - -get_commandkeyid() { - awk '/^[ \t]*commandkey\>/ { keyid=$2 } END { print keyid }' < $config -} - chrony_command() { - commandkeyid=$(get_commandkeyid) - [ -z "$commandkeyid" ] && return 1 - commandkey=$(get_key $commandkeyid) - [ -z "$commandkey" ] && return 2 - - authhash=${commandkey% *} - password=${commandkey#* } - - $chronyc < /dev/null | head -c 40) - [ ${#password} -eq 40 ] && - echo "$commandkeyid SHA1 HEX:$password" >> $keyfile + $chronyc -a -m "$1" } update_dhclient_added_servers() { @@ -87,9 +53,6 @@ is_running() { } case "$1" in - generate-commandkey) - generate_commandkey - ;; add-dhclient-servers) add_dhclient_servers ;; @@ -106,7 +69,7 @@ case "$1" in chrony_command "$2" ;; *) - echo $"Usage: $0 {generate-commandkey|add-dhclient-servers|remove-dhclient-servers|is-running|command|forced-command}" + echo $"Usage: $0 {add-dhclient-servers|remove-dhclient-servers|is-running|command|forced-command}" exit 2 esac exit $? diff --git a/chrony.spec b/chrony.spec index a75db00..3d22881 100644 --- a/chrony.spec +++ b/chrony.spec @@ -1,6 +1,7 @@ +%global prerelease -pre1 Name: chrony -Version: 1.27 -Release: 3%{?gitpatch:.%{gitpatch}}%{?dist} +Version: 1.28 +Release: 0.1.pre1%{?dist} Summary: An NTP client/server Group: System Environment/Daemons @@ -16,7 +17,6 @@ Source7: chrony.nm-dispatcher Source8: chrony.dhclient Source9: chrony-wait.service %{?gitpatch:Patch0: chrony-%{version}%{?prerelease}-%{gitpatch}.patch.gz} -Patch1: chrony-delta.patch BuildRequires: libcap-devel libedit-devel nss-devel pps-tools-devel bison texinfo @@ -40,7 +40,6 @@ clocks, system real-time clock or manual input as time references. %prep %setup -q -n %{name}-%{version}%{?prerelease} %{?gitpatch:%patch0 -p1} -%patch1 -p1 -b .delta %{?gitpatch: echo %{version}-%{gitpatch} > version.txt} diff --git a/chronyd.service b/chronyd.service index a12e1de..77ca35e 100644 --- a/chronyd.service +++ b/chronyd.service @@ -6,7 +6,6 @@ Conflicts=ntpd.service [Service] Type=forking EnvironmentFile=-/etc/sysconfig/chronyd -ExecStartPre=/usr/libexec/chrony-helper generate-commandkey ExecStart=/usr/sbin/chronyd -u chrony $OPTIONS ExecStartPost=/usr/libexec/chrony-helper add-dhclient-servers diff --git a/sources b/sources index 63902e9..b3d5154 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -0c2ae73f7e8ddfe31eeafc803818b9e4 chrony-1.27.tar.gz +1d316443994a4027911a78e5888586d1 chrony-1.28-pre1.tar.gz