diff --git a/chrony-dnssrv@.service b/chrony-dnssrv@.service index 05d4094..cb9028d 100644 --- a/chrony-dnssrv@.service +++ b/chrony-dnssrv@.service @@ -5,4 +5,4 @@ Wants=network-online.target [Service] Type=oneshot -ExecStart=@LIBEXECDIR@/chrony/helper update-dnssrv-servers %I +ExecStart=@CHRONY_HELPER@ update-dnssrv-servers %I diff --git a/chrony-service-helper.patch b/chrony-service-helper.patch index 1275338..0aa7599 100644 --- a/chrony-service-helper.patch +++ b/chrony-service-helper.patch @@ -5,7 +5,7 @@ diff -burNE chrony-3.5_orig/examples/chronyd.service chrony-3.5/examples/chronyd PIDFile=/run/chrony/chronyd.pid EnvironmentFile=-/etc/sysconfig/chronyd ExecStart=/usr/sbin/chronyd $OPTIONS -+ExecStartPost=@LIBEXECDIR@/chrony/helper update-daemon ++ExecStartPost=@CHRONY_HELPER@ update-daemon PrivateTmp=yes ProtectHome=yes ProtectSystem=full diff --git a/chrony.changes b/chrony.changes index f3aae4f..b4a57c5 100644 --- a/chrony.changes +++ b/chrony.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Jul 1 12:38:13 UTC 2021 - Reinhard Max + +- boo#1187906: Consolidate all references to the helper script. + ------------------------------------------------------------------- Sun Jun 13 13:29:36 UTC 2021 - Callum Farmer diff --git a/chrony.dhclient b/chrony.dhclient index f590e26..51ae8a4 100644 --- a/chrony.dhclient +++ b/chrony.dhclient @@ -8,13 +8,13 @@ chrony_config() { for server in $new_ntp_servers; do echo "$server ${NTPSERVERARGS:-iburst}" >> $SERVERFILE done - /usr/share/chrony-helper update-daemon || : + @CHRONY_HELPER@ update-daemon || : fi } chrony_restore() { if [ -f $SERVERFILE ]; then rm -f $SERVERFILE - /usr/share/chrony-helper update-daemon || : + @CHRONY_HELPER@ update-daemon || : fi } diff --git a/chrony.spec b/chrony.spec index eb681db..1f1f4d0 100644 --- a/chrony.spec +++ b/chrony.spec @@ -25,6 +25,7 @@ %if ! %{defined _fillupdir} %define _fillupdir %{_localstatedir}/adm/fillup-templates %endif +%define chrony_helper %{_libexecdir}/chrony/helper Name: chrony Version: 4.1 Release: 0 @@ -63,10 +64,10 @@ BuildRequires: pkgconfig BuildRequires: pps-tools-devel # The timezone package is needed for the "make check" tests. It can be # removed if the call to make check is ever deleted. +BuildRequires: sysuser-tools BuildRequires: timezone BuildRequires: pkgconfig(systemd) BuildRequires: rubygem(asciidoctor) -BuildRequires: sysuser-tools Recommends: logrotate Requires(post): %fillup_prereq %sysusers_requires @@ -147,8 +148,8 @@ e.g. because the servers will be set via DHCP. %prep %setup -q -a 10 +sed -e 's-@CHRONY_HELPER@-%{chrony_helper}-g' -i %{PATCH1} %{SOURCE3} %{SOURCE5} %patch0 -p1 -sed -e 's-@LIBEXECDIR@-%{_libexecdir}-g' -i %{PATCH1} %patch1 -p1 %patch2 -p1 %patch3 @@ -203,7 +204,6 @@ install -Dpm 0644 examples/chronyd.service \ %{buildroot}%{_unitdir}/chronyd.service install -Dpm 0644 examples/chrony-wait.service \ %{buildroot}%{_unitdir}/chrony-wait.service -sed -e 's-@LIBEXECDIR@-%{_libexecdir}-g' -i %{SOURCE5} install -Dpm 0644 %{SOURCE5} \ %{buildroot}%{_unitdir}/chrony-dnssrv@.service install -Dpm 0644 %{SOURCE6} \ @@ -221,8 +221,7 @@ echo 'chronyd.service' > \ install -Dpm 0644 %{SOURCE2} \ %{buildroot}%{_fillupdir}/sysconfig.chronyd -install -Dpm 755 %{SOURCE4} \ - %{buildroot}%{_libexecdir}/%name/helper +install -Dpm 755 %{SOURCE4} %{buildroot}%{chrony_helper} install -d %{buildroot}%{_localstatedir}/log/chrony touch %{buildroot}%{_localstatedir}/lib/chrony/{drift,rtc}