]> git.ipfire.org Git - people/stevee/ipfire-3.x.git/commitdiff
chrony: Update to 3.4
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 25 Mar 2019 22:01:17 +0000 (22:01 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 25 Mar 2019 22:01:17 +0000 (22:01 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
chrony/chrony-helper [deleted file]
chrony/chrony.conf
chrony/chrony.dhclient [deleted file]
chrony/chrony.nm
chrony/systemd/chronyd.service

diff --git a/chrony/chrony-helper b/chrony/chrony-helper
deleted file mode 100644 (file)
index 34add5f..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-#!/bin/bash
-
-config=/etc/chrony.conf
-keyfile=/etc/chrony.keys
-chronyc=/usr/bin/chronyc
-dhclient_servers=/var/lib/dhclient/chrony.servers.*
-service_name=chronyd.service
-
-get_key() {
-    awk '/^[ \t]*'$1'\>/ { print $2; 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
-
-    $chronyc <<EOF
-password $commandkey
-$1
-EOF
-}
-
-generate_commandkey() {
-    commandkeyid=$(get_commandkeyid)
-    [ -z "$commandkeyid" ] && return 1
-    commandkey=$(get_key $commandkeyid)
-    [ -z "$commandkey" ] || return 0
-
-    commandkey=$(tr -c -d '[\041-\176]' < /dev/urandom | head -c 16)
-    [ -n "$commandkey" ] && echo "$commandkeyid $commandkey" >> $keyfile
-}
-
-add_dhclient_servers() {
-    command=$(cat $dhclient_servers 2> /dev/null |
-        while read server serverargs; do
-            echo "add server $server $serverargs"
-        done)
-    if [ -n "$command" ]; then
-        chrony_command "$command" &> /dev/null
-    fi
-}
-
-is_running() {
-    systemctl status chronyd.service &> /dev/null
-}
-
-case "$1" in
-    generate-commandkey)
-        generate_commandkey
-        ;;
-    add-dhclient-servers)
-        add_dhclient_servers
-        ;;
-    command)
-        is_running && chrony_command "$2"
-        ;;
-    *)
-        echo $"Usage: $0 {generate-commandkey|add-dhclient-servers|command}"
-        exit 2
-esac
-exit $?
-
index 3d58b816d5f0dea041c371e15d35df5359d70224..0a1adda98a52284964bc6656b931cd6f9eff403e 100644 (file)
@@ -26,9 +26,6 @@ makestep 100 3
 
 keyfile /etc/chrony.keys
 
-# Specify the key used as password for chronyc.
-commandkey 1
-
 # Disable logging of client accesses.
 noclientlog
 
diff --git a/chrony/chrony.dhclient b/chrony/chrony.dhclient
deleted file mode 100644 (file)
index 73fa893..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/bash
-
-SERVERFILE=$SAVEDIR/chrony.servers.$interface
-
-chrony_config() {
-       rm -f $SERVERFILE
-       if [ "$PEERNTP" != "no" ]; then
-               /usr/libexec/chrony-helper command "$(
-                       for server in $new_ntp_servers; do
-                               echo "add server $server $NTPSERVERARGS"
-                               echo "$server $NTPSERVERARGS" >> $SERVERFILE
-                       done)" &> /dev/null
-       fi
-}
-
-chrony_restore() {
-       if [ -f $SERVERFILE ]; then
-               /usr/libexec/chrony-helper command "$(
-                       while read server serverargs; do
-                               echo "delete $server"
-                       done < $SERVERFILE)" &> /dev/null
-               rm -f $SERVERFILE
-       fi
-}
index 10daf278de0b5642ad5bc8f63b0c37cedf764d23..a0e073db71486112197cf2ed5fb8def36544468f 100644 (file)
@@ -4,11 +4,11 @@
 ###############################################################################
 
 name       = chrony
-version    = 1.26
-release    = 9
+version    = 3.4
+release    = 1
 
 groups     = System/Daemons
-url        = http://chrony.tuxfamily.org
+url        = https://chrony.tuxfamily.org
 license    = GPLv2
 summary    = An NTP client/server.
 
@@ -20,11 +20,14 @@ description
        clocks, system real-time clock or manual input as time references.
 end
 
+source_dl  = https://download.tuxfamily.org/chrony/
+
 build
        requires
                bison
                libcap-devel
                libedit-devel
+               nettle-devel
                readline-devel
                shadow-utils
                texinfo
@@ -50,17 +53,10 @@ build
                install -m 640 -p %{DIR_SOURCE}/chrony.keys %{BUILDROOT}/etc/chrony.keys
                chown -v root.chrony %{BUILDROOT}/etc/chrony.keys
 
-               mkdir -pv %{BUILDROOT}/etc/dhcp/dhclient.d
-               install -m 755 -p %{DIR_SOURCE}/chrony.dhclient \
-                       %{BUILDROOT}/etc/dhcp/dhclient.d/chrony.sh
-
                mkdir -pv %{BUILDROOT}/etc/logrotate.d
                install -m 644 -p %{DIR_SOURCE}/chrony.logrotate \
                        %{BUILDROOT}/etc/logrotate.d/chrony
 
-               mkdir -pv %{BUILDROOT}/usr/lib/chrony
-               install -m 755 -p %{DIR_SOURCE}/chrony-helper %{BUILDROOT}/usr/lib/chrony-helper
-
                chown -Rv chrony.chrony %{BUILDROOT}/var/{lib,log}/chrony
        end
 end
index 018098299ccbae48b0be5d8ee0ad1e1392f8d272..0a8ab0ad783d7dd1622ee15272bc2631c12ec1bd 100644 (file)
@@ -5,9 +5,7 @@ Conflicts=ntpd.service
 
 [Service]
 EnvironmentFile=-/etc/sysconfig/chronyd
-ExecStartPre=/usr/lib/chrony-helper generate-commandkey
 ExecStart=/usr/sbin/chronyd -n -u chrony $OPTIONS
-ExecStartPost=/usr/lib/chrony-helper add-dhclient-servers
 
 [Install]
 WantedBy=multi-user.target