[packages/chrony] Rel 2; parse /etc/ntp/chrony.d/*.conf by default. Don't fail if there are no files there.
arekm
arekm at pld-linux.org
Thu Sep 23 08:45:51 CEST 2021
commit 34f29393905f5a27178a07dba22a7b03b5a07d93
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Thu Sep 23 08:45:38 2021 +0200
Rel 2; parse /etc/ntp/chrony.d/*.conf by default. Don't fail if there are no files there.
chrony.conf | 2 ++
chrony.spec | 7 +++++--
conf.d.patch | 16 ++++++++++++++++
3 files changed, 23 insertions(+), 2 deletions(-)
---
diff --git a/chrony.spec b/chrony.spec
index 87f8016..f264f7e 100644
--- a/chrony.spec
+++ b/chrony.spec
@@ -5,7 +5,7 @@ Summary: An NTP client/server
Summary(pl.UTF-8): Klient/serwer NTP
Name: chrony
Version: 4.1
-Release: 1
+Release: 2
License: GPL v2
Group: Daemons
Source0: http://download.tuxfamily.org/chrony/%{name}-%{version}.tar.gz
@@ -17,6 +17,7 @@ Source4: %{name}d.init
Source5: %{name}.logrotate
Patch0: fix-seccomp-build.patch
Patch1: chrony-seccomp.patch
+Patch2: conf.d.patch
URL: http://chrony.tuxfamily.org/
BuildRequires: asciidoc
BuildRequires: bison
@@ -64,6 +65,7 @@ Internetu, obsługuje także komputery na stałym łączu.
%setup -q
%patch0 -p1
%patch1 -p1
+%patch2 -p1
%build
# NOTE: It is not autoconf generated configre
@@ -87,7 +89,7 @@ CPPFLAGS="%{rpmcppflags}" \
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT/etc/{sysconfig,logrotate.d,rc.d/init.d} \
- $RPM_BUILD_ROOT{%{_sysconfdir},/var/{lib/ntp,log/chrony}}
+ $RPM_BUILD_ROOT{%{_sysconfdir}/chrony.d,/var/{lib/ntp,log/chrony}}
%{__make} install install-docs \
DESTDIR=$RPM_BUILD_ROOT
@@ -130,6 +132,7 @@ fi
%doc NEWS README FAQ examples/* doc/{faq,installation}.html
%dir %{_sysconfdir}
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/chrony.conf
+%attr(750,root,root) %dir %{_sysconfdir}/chrony.d
%attr(640,root,ntp) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/keys
%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/chronyd
%config(noreplace) /etc/logrotate.d/chrony
diff --git a/chrony.conf b/chrony.conf
index 0c50f18..a837f34 100644
--- a/chrony.conf
+++ b/chrony.conf
@@ -38,3 +38,5 @@ logdir /var/log/chrony
# Uncomment the following line to turn logging on.
#log measurements statistics tracking
+
+include /etc/ntp/chrony.d/*.conf
diff --git a/conf.d.patch b/conf.d.patch
new file mode 100644
index 0000000..5eccfa6
--- /dev/null
+++ b/conf.d.patch
@@ -0,0 +1,16 @@
+diff -urN chrony-3.5.1.org/conf.c chrony-3.5.1/conf.c
+--- chrony-3.5.1.org/conf.c 2020-08-19 16:24:04.000000000 +0200
++++ chrony-3.5.1/conf.c 2021-09-23 08:40:12.354030905 +0200
+@@ -1359,8 +1359,10 @@
+ GLOB_NOMAGIC |
+ #endif
+ GLOB_ERR, NULL, &gl)) != 0) {
+- if (r != GLOB_NOMATCH)
+- LOG_FATAL("Could not search for files matching %s", line);
++ if (r != GLOB_NOMATCH) {
++ DEBUG_LOG("Could not search for files matching %s", line);
++ return;
++ }
+
+ DEBUG_LOG("glob of %s failed", line);
+ return;
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/chrony.git/commitdiff/34f29393905f5a27178a07dba22a7b03b5a07d93
More information about the pld-cvs-commit
mailing list