267 lines
9.9 KiB
RPMSpec
267 lines
9.9 KiB
RPMSpec
%define chrony_groupid 55
|
||
%define chrony_userid 55
|
||
|
||
Name: chrony
|
||
Version: 4.6.1
|
||
Release: 1mamba
|
||
Summary: A pair of programs which are used to maintain the accuracy of the system clock on a computer
|
||
Group: System/Servers
|
||
Vendor: openmamba
|
||
Distribution: openmamba
|
||
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
||
URL: https://chrony-project.org/index.html
|
||
Source: https://gitlab.com/chrony/chrony.git/%{version}/chrony-%{version}.tar.bz2
|
||
Source1: chrony-conf
|
||
Source3: chronyd-nm-dispatcher
|
||
Source4: chrony-wait.service
|
||
Source5: chronyd.service
|
||
Source6: chrony.helper
|
||
License: GPL
|
||
## AUTOBUILDREQ-BEGIN
|
||
BuildRequires: glibc-devel
|
||
BuildRequires: libcap-devel
|
||
BuildRequires: libedit-devel
|
||
BuildRequires: libgnutls-devel
|
||
BuildRequires: libnettle-devel
|
||
## AUTOBUILDREQ-END
|
||
BuildRequires: libncurses-devel
|
||
BuildRequires: libreadline-devel
|
||
Provides: 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.
|
||
The two programs are called chronyd and chronyc.
|
||
Chronyd is a daemon which runs in background on the system.
|
||
It obtains measurements via the network of the system clock’s offset relative to time servers on other systems and adjusts the system time accordingly.
|
||
For isolated systems, the user can periodically enter the correct time by hand (using Chronyc).
|
||
In either case, Chronyd determines the rate at which the computer gains or loses time, and compensates for this.
|
||
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
|
||
|
||
%build
|
||
./configure \
|
||
--prefix=%{_prefix} \
|
||
--with-pidile=/run/chronyd.pid
|
||
|
||
%make CC=%{_host}-gcc
|
||
|
||
%install
|
||
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||
%makeinstall
|
||
|
||
#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 -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
|
||
|
||
rm -rf %{buildroot}%{_docdir}/chrony
|
||
|
||
%clean
|
||
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||
|
||
%pre
|
||
if [ $1 -ge 1 ]; then
|
||
/usr/sbin/groupadd chrony -g %{chrony_groupid} 2>/dev/null
|
||
/usr/sbin/useradd -u %{chrony_userid} -c 'Chrony daemon' -d /dev/null -g chrony \
|
||
-s /bin/false chrony 2>/dev/null
|
||
fi
|
||
:
|
||
|
||
%preun
|
||
%systemd_preun chronyd
|
||
if [ $1 -eq 0 ]; then
|
||
/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
|
||
fi
|
||
:
|
||
|
||
%postun
|
||
%systemd_postun chronyd
|
||
:
|
||
|
||
%files
|
||
%defattr(-,root,root)
|
||
%config(noreplace) %{_sysconfdir}/chrony.conf
|
||
%{_bindir}/chronyc
|
||
%{_sbindir}/chronyd
|
||
%{_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/chronyc.*
|
||
%{_mandir}/man5/chrony.conf.*
|
||
%{_mandir}/man8/chronyd.*
|
||
%doc COPYING
|
||
|
||
%changelog
|
||
* Thu Oct 10 2024 Automatic Build System <autodist@openmamba.org> 4.6.1-1mamba
|
||
- automatic version update by autodist
|
||
|
||
* Fri Sep 06 2024 Silvan Calarco <silvan.calarco@mambasoft.it> 4.6-1mamba
|
||
- update to 4.6
|
||
|
||
* Wed Dec 06 2023 Automatic Build System <autodist@mambasoft.it> 4.5-1mamba
|
||
- automatic version update by autodist
|
||
|
||
* Sat Aug 12 2023 Automatic Build System <autodist@mambasoft.it> 4.4-1mamba
|
||
- automatic version update by autodist
|
||
|
||
* Wed Aug 31 2022 Automatic Build System <autodist@mambasoft.it> 4.3-1mamba
|
||
- automatic version update by autodist
|
||
|
||
* Thu Dec 16 2021 Automatic Build System <autodist@mambasoft.it> 4.2-1mamba
|
||
- automatic version update by autodist
|
||
|
||
* Fri May 14 2021 Automatic Build System <autodist@mambasoft.it> 4.1-1mamba
|
||
- automatic version update by autodist
|
||
|
||
* Thu Feb 04 2021 Automatic Build System <autodist@mambasoft.it> 4.0-1mamba
|
||
- automatic version update by autodist
|
||
|
||
* Sun Aug 30 2020 Automatic Build System <autodist@mambasoft.it> 3.5.1-1mamba
|
||
- automatic version update by autodist
|
||
|
||
* Thu May 23 2019 Automatic Build System <autodist@mambasoft.it> 3.5-1mamba
|
||
- automatic version update by autodist
|
||
|
||
* Sun Sep 23 2018 Automatic Build System <autodist@mambasoft.it> 3.4-1mamba
|
||
- automatic version update by autodist
|
||
|
||
* Thu May 10 2018 Automatic Build System <autodist@mambasoft.it> 3.3-1mamba
|
||
- automatic version update by autodist
|
||
|
||
* Wed Sep 27 2017 Automatic Build System <autodist@mambasoft.it> 3.2-1mamba
|
||
- automatic version update by autodist
|
||
|
||
* Wed Feb 01 2017 Automatic Build System <autodist@mambasoft.it> 3.1-1mamba
|
||
- automatic version update by autodist
|
||
|
||
* Sat Jan 21 2017 Automatic Build System <autodist@mambasoft.it> 3.0-1mamba
|
||
- automatic version update by autodist
|
||
|
||
* Tue Nov 22 2016 Automatic Build System <autodist@mambasoft.it> 2.4.1-1mamba
|
||
- automatic version update by autodist
|
||
|
||
* Tue Jun 07 2016 Automatic Build System <autodist@mambasoft.it> 2.4-1mamba
|
||
- automatic version update by autodist
|
||
|
||
* Tue Feb 16 2016 Automatic Build System <autodist@mambasoft.it> 2.3-1mamba
|
||
- automatic version update by autodist
|
||
|
||
* Wed Jan 20 2016 Automatic Build System <autodist@mambasoft.it> 2.2.1-1mamba
|
||
- automatic version update by autodist
|
||
|
||
* Sat Nov 21 2015 Automatic Build System <autodist@mambasoft.it> 2.2-1mamba
|
||
- automatic version update by autodist
|
||
|
||
* Wed Jul 01 2015 Automatic Build System <autodist@mambasoft.it> 2.1.1-1mamba
|
||
- automatic version update by autodist
|
||
|
||
* Thu Apr 30 2015 Automatic Build System <autodist@mambasoft.it> 2.0-1mamba
|
||
- automatic version update by autodist
|
||
|
||
* Wed Apr 08 2015 Automatic Build System <autodist@mambasoft.it> 1.31.1-1mamba
|
||
- automatic version update by autodist
|
||
|
||
* Thu Sep 18 2014 Automatic Build System <autodist@mambasoft.it> 1.31-1mamba
|
||
- automatic update by autodist
|
||
|
||
* Thu Jul 03 2014 Automatic Build System <autodist@mambasoft.it> 1.30-1mamba
|
||
- automatic version update by autodist
|
||
|
||
* Sat Feb 01 2014 Automatic Build System <autodist@mambasoft.it> 1.29.1-1mamba
|
||
- automatic version update by autodist
|
||
|
||
* Thu Sep 26 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 1.29-4mamba
|
||
- chronyd-nm-dispatcher: removed forgotten debugging line
|
||
|
||
* Wed Sep 18 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 1.29-3mamba
|
||
- chronyd-nm-dispatcher: re-add check on default route removed by mistake in previous release
|
||
- chronyd-nm-dispatcher: start chronyd with "systemctl --no-block ..."
|
||
|
||
* Wed Sep 11 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 1.29-2mamba
|
||
- disable service to let is be started by NetworkManager dispatcher
|
||
- chronyd-nm-dispatcher: need to start here chronyd for big time adjust to be made
|
||
- chronyd-nm-dispatcher: unmaintain (remove) non systemd code
|
||
- chronyd.service: don't start after network service to allow it starting inside nm dispatcher
|
||
- chrony-wait.service: fix service name (was chron-wait.service)
|
||
|
||
* Fri Aug 09 2013 Automatic Build System <autodist@mambasoft.it> 1.29-1mamba
|
||
- automatic version update by autodist
|
||
|
||
* Fri Jul 19 2013 Automatic Build System <autodist@mambasoft.it> 1.28-1mamba
|
||
- automatic version update by autodist
|
||
|
||
* Fri Jun 14 2013 openmamba WebBuild System <webbuild@openmamba.org> 1.27-8mamba
|
||
- rework NetworkManager dispatcher script for systemd integration
|
||
|
||
* Tue May 07 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 1.27-7mamba
|
||
- post: fix permissions of chrony.drift and chrony.keys if they where created with root permissions by previous releases
|
||
|
||
* Sat Apr 13 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 1.27-6mamba
|
||
- patch to use /run instead of /var/run for pid
|
||
|
||
* Sat Apr 13 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 1.27-5mamba
|
||
- x86_64: install chrony-helper under /usr/libexec instead of /usr/libexec64
|
||
- NetworkManager dispatcher.d file: do nothing if systemd is running
|
||
|
||
* Wed Apr 03 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 1.27-4mamba
|
||
- provide a chrony user as requested by new systemd service script
|
||
- remove BindTo=systemd-timedated-ntp.target from chronyd.service for recent systemd
|
||
|
||
* Fri Mar 29 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 1.27-3mamba
|
||
- added systemd service files
|
||
|
||
* Mon Mar 25 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 1.27-2mamba
|
||
- update NetworkManager dispatcher.d startup file to check for ip route on the interface
|
||
|
||
* Sat Feb 02 2013 Automatic Build System <autodist@mambasoft.it> 1.27-1mamba
|
||
- automatic version update by autodist
|
||
|
||
* Mon Jul 25 2011 Automatic Build System <autodist@mambasoft.it> 1.26-1mamba
|
||
- automatic version update by autodist
|
||
|
||
* Sun Jun 19 2011 Automatic Build System <autodist@mambasoft.it> 1.25-1mamba
|
||
- automatic update by autodist
|
||
|
||
* Thu Apr 14 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 1.24-4mamba
|
||
- configure to use NetworkManager dispatcher to start/stop service
|
||
|
||
* Fri Dec 03 2010 Silvan Calarco <silvan.calarco@mambasoft.it> 1.24-3mamba
|
||
- enable big adjustement on service startup for a skew > 60 sec
|
||
|
||
* Fri Oct 22 2010 Davide Madrisan <davide.madrisan@gmail.com> 1.24-2mamba
|
||
- create the directory %{_var}/log/chrony
|
||
|
||
* Fri Oct 15 2010 Silvan Calarco <silvan.calarco@mambasoft.it> 1.24-1mamba
|
||
- package created by autospec
|