]> git.pld-linux.org Git - packages/chrony.git/commitdiff
Rel 2; parse /etc/ntp/chrony.d/*.conf by default. Don't fail if there are no files... auto/th/chrony-4.1-2
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Thu, 23 Sep 2021 06:45:38 +0000 (08:45 +0200)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Thu, 23 Sep 2021 06:45:38 +0000 (08:45 +0200)
chrony.conf
chrony.spec
conf.d.patch [new file with mode: 0644]

index 0c50f185fb05a17802e7068c07a46b2196d71525..a837f34665b693e522a2880614b425341c374b68 100644 (file)
@@ -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
index 87f8016ab9c762ba5740ad67d4f2c4c537bc8609..f264f7ee725d5ddfc5b8b64c316b4a0ea9af1a85 100644 (file)
@@ -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/conf.d.patch b/conf.d.patch
new file mode 100644 (file)
index 0000000..5eccfa6
--- /dev/null
@@ -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;
This page took 0.04606 seconds and 4 git commands to generate.