From 44f535d38fc64fee814ae8e02b61cbff5ce4ad08 Mon Sep 17 00:00:00 2001 From: DistroBaker Date: Fri, 5 Feb 2021 17:55:55 +0000 Subject: [PATCH] Merged update from upstream sources This is an automated DistroBaker update from upstream sources. If you do not know what this is about or would like to opt out, contact the OSCI team. Source: https://src.fedoraproject.org/rpms/chrony.git#ed6f12d1c1f5c3419fcbd28c3c03e54bcec4d8bd --- chrony-nm-dispatcher-dhcp.patch | 44 ++++++++++++++++----------------- chrony.spec | 12 ++++++--- 2 files changed, 30 insertions(+), 26 deletions(-) diff --git a/chrony-nm-dispatcher-dhcp.patch b/chrony-nm-dispatcher-dhcp.patch index afb56cf..bdd199d 100644 --- a/chrony-nm-dispatcher-dhcp.patch +++ b/chrony-nm-dispatcher-dhcp.patch @@ -1,4 +1,4 @@ -From e0c6457fd42252f88ec60d16582b7b6e6fb04f41 Mon Sep 17 00:00:00 2001 +From 1b29e43133d992e735ffbf87d79f008994479036 Mon Sep 17 00:00:00 2001 From: Robert Fairley Date: Wed, 17 Jun 2020 10:14:19 -0400 Subject: [PATCH] examples/nm-dispatcher.dhcp: use sysconfig, detect dhclient @@ -7,27 +7,39 @@ Use the PEERNTP and NTPSERVERARGS environment variables from /etc/sysconfig/network{-scripts}. Detect a dhclient install to avoid a redundant operation with the 11-dhclient NM dispatcher in the dhcp-client package. + +Co-Authored-By: Christian Glombek --- - examples/chrony.nm-dispatcher.dhcp | 15 ++++++++++++++- - 1 file changed, 14 insertions(+), 1 deletion(-) + examples/chrony.nm-dispatcher.dhcp | 21 +++++++++++++++++++-- + 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/examples/chrony.nm-dispatcher.dhcp b/examples/chrony.nm-dispatcher.dhcp -index 6ea4c37..878e72f 100644 +index 6ea4c37..a6ad35a 100644 --- a/examples/chrony.nm-dispatcher.dhcp +++ b/examples/chrony.nm-dispatcher.dhcp -@@ -6,6 +6,11 @@ +@@ -6,21 +6,39 @@ export LC_ALL=C +# If a dhclient installation is present, avoid a redundant operation -+# with dhclient which handles NTP server config through its own -+# NetworkManager dispatcher script 11-dhclient. -+[ -e /usr/sbin/dhclient ] && exit 0 ++# in case dhclient handles NTP server config through its own chrony config script, ++# exec'ed by NetworkManager's 11-dhclient dispatcher script. ++# In RHCOS, 11-dhclient is excluded and not shipped with base image. ++[ -e /usr/sbin/dhclient ] && \ ++ [ -e /etc/dhcp/dhclient.d/chrony.sh ] && \ ++ [ -e /etc/NetworkManager/dispatcher.d/11-dhclient -o \ ++ -e /usr/lib/NetworkManager/dispatcher.d/11-dhclient ] && \ ++ exit 0 + interface=$1 action=$2 -@@ -17,10 +22,18 @@ dhcp_server_file=$server_dir/$interface.sources + chronyc=/usr/bin/chronyc + default_server_options=iburst +-server_dir=/var/run/chrony-dhcp ++server_dir=/run/chrony-dhcp + + dhcp_server_file=$server_dir/$interface.sources # DHCP4_NTP_SERVERS is passed from DHCP options by NetworkManager. nm_dhcp_servers=$DHCP4_NTP_SERVERS @@ -48,17 +60,5 @@ index 6ea4c37..878e72f 100644 $chronyc reload sources > /dev/null 2>&1 || : } -- -2.26.2 +2.29.2 -diff -up chrony-4.0-pre3/examples/chrony.nm-dispatcher.dhcp.nm-dispatcher-dhcp chrony-4.0-pre3/examples/chrony.nm-dispatcher.dhcp ---- chrony-4.0-pre3/examples/chrony.nm-dispatcher.dhcp.nm-dispatcher-dhcp 2020-08-26 09:27:47.076282468 +0200 -+++ chrony-4.0-pre3/examples/chrony.nm-dispatcher.dhcp 2020-08-26 09:27:51.847297974 +0200 -@@ -16,7 +16,7 @@ action=$2 - - chronyc=/usr/bin/chronyc - default_server_options=iburst --server_dir=/var/run/chrony-dhcp -+server_dir=/run/chrony-dhcp - - dhcp_server_file=$server_dir/$interface.sources - # DHCP4_NTP_SERVERS is passed from DHCP options by NetworkManager. diff --git a/chrony.spec b/chrony.spec index dc39db6..0492642 100644 --- a/chrony.spec +++ b/chrony.spec @@ -5,7 +5,7 @@ Name: chrony Version: 4.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: An NTP client/server License: GPLv2 @@ -26,8 +26,7 @@ BuildRequires: libcap-devel libedit-devel nettle-devel pps-tools-devel %ifarch %{ix86} x86_64 %{arm} aarch64 mipsel mips64el ppc64 ppc64le s390 s390x BuildRequires: libseccomp-devel %endif -BuildRequires: gcc gcc-c++ bison systemd gnupg2 net-tools -BuildRequires: make +BuildRequires: gcc gcc-c++ make bison systemd gnupg2 net-tools %{?with_nts:BuildRequires: gnutls-devel gnutls-utils} Requires(pre): shadow-utils @@ -64,7 +63,7 @@ md5sum -c <<-EOF | (! grep -v 'OK$') 2d01b94bc1a7b7fb70cbee831488d121 examples/chrony.conf.example2 96999221eeef476bd49fe97b97503126 examples/chrony.keys.example 6a3178c4670de7de393d9365e2793740 examples/chrony.logrotate - e051740bb4b21e2e12e6dc63f5195c48 examples/chrony.nm-dispatcher.dhcp + 2da011da89727ef009799502d84e7cd0 examples/chrony.nm-dispatcher.dhcp 8f5a98fcb400a482d355b929d04b5518 examples/chrony.nm-dispatcher.onoffline 32c34c995c59fd1c3ad1616d063ae4a0 examples/chronyd.service EOF @@ -204,8 +203,13 @@ fi %dir %attr(750,chrony,chrony) %{_localstatedir}/log/chrony %changelog +* Tue Feb 02 2021 Miroslav Lichvar 4.0-3 +- update NM DHCP dispatcher script + * Tue Jan 26 2021 Fedora Release Engineering - 4.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild +- Add BuildRequires: make +- drop dnssrv service and timer * Wed Oct 07 2020 Miroslav Lichvar 4.0-1 - update to 4.0