diff --git a/chrony-2.2-run-dir.patch b/chrony-2.2-run-dir.patch deleted file mode 100644 index 615205a..0000000 --- a/chrony-2.2-run-dir.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- chrony-2.2/conf.c.orig 2015-11-21 14:23:47.219442178 +0100 -+++ chrony-2.2/conf.c 2015-11-21 14:23:54.745391572 +0100 -@@ -322,7 +322,7 @@ - dumpdir = Strdup("."); - logdir = Strdup("."); - bind_cmd_path = Strdup(DEFAULT_COMMAND_SOCKET); -- pidfile = Strdup("/var/run/chronyd.pid"); -+ pidfile = Strdup("/run/chronyd.pid"); - rtc_device = Strdup("/dev/rtc"); - hwclock_file = Strdup(DEFAULT_HWCLOCK_FILE); - user = Strdup(DEFAULT_USER); diff --git a/chrony.spec b/chrony.spec index 7849665..a308352 100644 --- a/chrony.spec +++ b/chrony.spec @@ -2,7 +2,7 @@ %define chrony_userid 55 Name: chrony -Version: 4.5 +Version: 4.6 Release: 1mamba Summary: A pair of programs which are used to maintain the accuracy of the system clock on a computer Group: System/Servers @@ -10,14 +10,12 @@ Vendor: openmamba Distribution: openmamba Packager: Silvan Calarco URL: https://chrony-project.org/index.html -Source: http://download.tuxfamily.org/chrony/chrony-%{version}.tar.gz +Source: https://gitlab.com/chrony/chrony.git/%{version}/chrony-%{version}.tar.bz2 Source1: chrony-conf -Source2: chronyd-initscript Source3: chronyd-nm-dispatcher Source4: chrony-wait.service Source5: chronyd.service Source6: chrony.helper -Patch0: %{name}-2.2-run-dir.patch License: GPL ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel @@ -29,7 +27,9 @@ BuildRequires: libnettle-devel BuildRequires: libncurses-devel BuildRequires: libreadline-devel Provides: ntp -Obsoletes: ntp +Obsoletes: ntp < 4.6 +Provides: user(chrony) +Provides: group(chrony) %description Chrony is a pair of programs which are used to maintain the accuracy of the system clock on a computer. @@ -43,9 +43,10 @@ Chronyd implements the NTP protocol and can act as either a client or a server. Chronyc provides a user interface to Chronyd for monitoring its performance and configuring various settings. It can do so while running on the same computer as the Chronyd instance it is controlling or a different computer. +%debug_package + %prep %setup -q -#%patch0 -p1 %build ./configure \ @@ -58,15 +59,14 @@ It can do so while running on the same computer as the Chronyd instance it is co [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %makeinstall -install -D -m0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/chrony.conf -install -D -m0755 %{SOURCE2} %{buildroot}%{_initrddir}/chronyd -install -D -m0755 %{SOURCE3} %{buildroot}%{_sysconfdir}/NetworkManager/dispatcher.d/10_chronyd +#install -D -m0755 %{SOURCE3} %{buildroot}%{_sysconfdir}/NetworkManager/dispatcher.d/10_chronyd install -d %{buildroot}%{_var}/log/chrony +install -D -m0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/chrony.conf + # systemd stuff -install -d %{buildroot}/lib/systemd/system -install -m 0644 -p %{SOURCE4} %{buildroot}/lib/systemd/system/chrony-wait.service -install -m 0644 -p %{SOURCE5} %{buildroot}/lib/systemd/system/chronyd.service +install -D -m 0644 %{SOURCE4} %{buildroot}%{_unitdir}/chrony-wait.service +install -D -m 0644 %{SOURCE5} %{buildroot}%{_unitdir}/chronyd.service install -D -m0755 -p %{SOURCE6} %{buildroot}%{_prefix}/libexec/chrony-helper install -d -m0755 %{buildroot}%{_prefix}/lib/systemd/ntp-units.d echo 'chronyd.service' > %{buildroot}%{_prefix}/lib/systemd/ntp-units.d/50-chronyd.list @@ -85,54 +85,47 @@ fi : %preun +%systemd_preun chronyd if [ $1 -eq 0 ]; then - [ -x /sbin/service ] && /sbin/service chronyd stop - [ -x /sbin/chkconfig ] && /sbin/chkconfig --del chronyd - - systemctl -q disable chronyd - systemctl -q daemon-reload - /usr/sbin/groupdel chrony 2>/dev/null /usr/sbin/userdel chrony 2>/dev/null fi : %post +%systemd_post chronyd if [ $1 -ge 1 ]; then [ -e %{_sysconfdir}/chrony.drift ] || touch %{_sysconfdir}/chrony.drift [ -e %{_sysconfdir}/chrony.keys ] || touch %{_sysconfdir}/chrony.keys chown chrony.chrony %{_sysconfdir}/chrony.drift chown chrony.chrony %{_sysconfdir}/chrony.keys sed -i "s|/var/run/chronyd.pid|/run/chronyd.pid|" %{_sysconfdir}/chrony.conf - -# service start/stop now managed by NetworkManager dispatcher - [ -x /sbin/chkconfig ] && /sbin/chkconfig --del chronyd - - systemctl -q disable chronyd - systemctl -q daemon-reload fi : +%postun +%systemd_postun chronyd +: + %files %defattr(-,root,root) %config(noreplace) %{_sysconfdir}/chrony.conf -%{_sysconfdir}/NetworkManager/dispatcher.d/10_chronyd -%{_initrddir}/chronyd %{_bindir}/chronyc %{_sbindir}/chronyd -/lib/systemd/system/chrony-wait.service -/lib/systemd/system/chronyd.service +%{_unitdir}/chrony-wait.service +%{_unitdir}/chronyd.service %{_prefix}/lib/systemd/ntp-units.d/50-chronyd.list %{_prefix}/libexec/chrony-helper %dir %{_var}/log/chrony -#%{_mandir}/man1/chrony.* %{_mandir}/man1/chronyc.* %{_mandir}/man5/chrony.conf.* %{_mandir}/man8/chronyd.* %doc COPYING -#NEWS README chrony.txt examples/chrony.conf.example examples/chrony.keys.example %changelog +* Fri Sep 06 2024 Silvan Calarco 4.6-1mamba +- update to 4.6 + * Wed Dec 06 2023 Automatic Build System 4.5-1mamba - automatic version update by autodist diff --git a/chronyd-initscript b/chronyd-initscript deleted file mode 100644 index 9530a8e..0000000 --- a/chronyd-initscript +++ /dev/null @@ -1,67 +0,0 @@ -#! /bin/bash -# -# chronyd Start/Stop the chronyd NTP daemon. -# -# chkconfig: 345 55 10 -# description: chronyd is a daemon which obtains measurements via the network \ -# of the system clock’s offset relative to time servers on other \ -# systems and adjusts the system time accordingly. -# processname: chronyd -# pidfile: /var/run/chronyd.pid - -# Source function library. -. /etc/init.d/functions - -RETVAL=0 - -prog="chronyd" - -start() { - echo -n $"Starting $prog: " - daemon chronyd < /dev/null - RETVAL=$? - echo - [ $RETVAL -eq 0 ] && touch /var/lock/subsys/chronyd - return $RETVAL -} - -stop() { - echo -n $"Stopping $prog: " - killproc chronyd - RETVAL=$? - echo - [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/chronyd - return $RETVAL -} - -rhstatus() { - statusproc chronyd -} - -restart() { - stop - start -} - -case "$1" in - start) - start - ;; - stop) - stop - ;; - restart) - restart - ;; - status) - rhstatus - ;; - condrestart) - [ -f /var/lock/subsys/chronyd ] && restart || : - ;; - *) - echo $"Usage: $0 {start|stop|status|restart|condrestart}" - exit 1 -esac - -exit $?