update to 4.2.8p15 [release 4.2.8p15-1mamba;Sun Dec 13 2020]

This commit is contained in:
Silvan Calarco 2024-01-06 07:43:41 +01:00
parent d33ebd3a90
commit ad9fe05c3a
5 changed files with 89 additions and 37 deletions

View File

@ -3,6 +3,5 @@
The Network Time Protocol (NTP) is used to synchronize a computer's time with another reference time source.
The ntp package contains utilities and daemons which will synchronize your computer's time to Coordinated Universal Time (UTC) via the NTP protocol and NTP servers.
Ntp includes ntpdate (a program for retrieving the date and time from remote machines via a network) and ntpd (a daemon which continuously adjusts system time).
Install the ntp package if you need tools for keeping your system's time synchronized via the NTP protocol.

View File

@ -1,5 +1,6 @@
%define majver %(echo %version | cut -d. -f1-2)
Name: ntp-server
Version: 4.2.8
Version: 4.2.8p15
Release: 1mamba
Summary: Synchronizes system time using the Network Time Protocol (NTP)
Group: System/Configuration
@ -7,48 +8,66 @@ Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://www.ntp.org
Source0: http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-%{version}.tar.gz
Source0: https://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-%{majver}/ntp-%{version}.tar.gz
Source1: ntp.conf
Source2: ntp.keys
Source3: ntpd.rc
Source5: ntpservers
Source6: ntpd.service
Source7: ntp.sysusers
Source8: ntpdate.service
Patch0: ntp-4.2.6-nano.patch
License: BSD
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libbeecrypt-devel
BuildRequires: ldconfig
BuildRequires: libbzip2-devel
BuildRequires: libcap-devel
BuildRequires: libdb53-devel
BuildRequires: libe2fs-devel
BuildRequires: libedit-devel
BuildRequires: libelf-devel
BuildRequires: libexpat-devel
BuildRequires: libevent-devel
BuildRequires: libkrb5-devel
%if "%{stage1}" != "1"
BuildRequires: liblmdb-devel
BuildRequires: liblua-devel
BuildRequires: liblzma-devel
BuildRequires: libnetsnmp-devel
BuildRequires: libnl-devel
BuildRequires: rpm
BuildRequires: libpopt-devel
BuildRequires: libproxy-devel
BuildRequires: libneon-devel
%endif
BuildRequires: libnsl-devel
BuildRequires: libnss-devel
BuildRequires: libopenssl-devel
BuildRequires: libselinux-devel
BuildRequires: libstdc++6-devel
BuildRequires: libpci-devel
BuildRequires: libpcre-devel
BuildRequires: libperl
BuildRequires: libpopt-devel
BuildRequires: libreadline-devel
BuildRequires: librpm-devel
BuildRequires: libtirpc-devel
BuildRequires: libwrap-devel
BuildRequires: libwww-devel
BuildRequires: libz-devel
BuildRequires: libzstd-devel
BuildRequires: perl-IO-Socket-SSL
BuildRequires: perl-Net-SSLeay
BuildRequires: perl-devel
## AUTOBUILDREQ-END
%if "%{stage1}" != "1"
BuildRequires: libnetsnmp-devel >= 5.9
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
The Network Time Protocol (NTP) is used to synchronize a computer's time with another reference time source.
The ntp package contains utilities and daemons which will synchronize your computer's time to Coordinated Universal Time (UTC) via the NTP protocol and NTP servers.
Ntp includes ntpdate (a program for retrieving the date and time from remote machines via a network) and ntpd (a daemon which continuously adjusts system time).
Install the ntp package if you need tools for keeping your system's time synchronized via the NTP protocol.
%debug_package
%prep
%setup -q -n ntp-%{version}
%patch0 -p0
#%patch0 -p0
%build
%configure \
@ -71,39 +90,38 @@ Install the ntp package if you need tools for keeping your system's time synchro
install -D -m644 %{S:1} %{buildroot}%{_sysconfdir}/ntp.conf
install -D -m600 %{S:2} %{buildroot}%{_sysconfdir}/ntp/keys
install -D -m755 %{S:3} %{buildroot}%{_initrddir}/ntpd
install -D -m644 %{S:5} %{buildroot}%{_sysconfdir}/ntp/ntpservers
install -D -m644 %{S:6} %{buildroot}%{_unitdir}/ntpd.service
install -D -m644 %{S:7} %{buildroot}%{_sysusersdir}/ntp.conf
install -D -m644 %{S:8} %{buildroot}%{_unitdir}/ntpdate.service
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%pre
%sysusers_create_package ntp %{SOURCE7}
:
%post
if [ $1 -eq 1 ]; then
/sbin/chkconfig --add ntpd
fi
exit 0
%systemd_post ntpd
%systemd_post ntpdate
:
%preun
if [ $1 -eq 0 ]; then
# uninstall
service ntpd stop
/sbin/chkconfig --del ntpd
fi
exit 0
%systemd_preun ntpd
%systemd_preun ntpdate
:
%postun
if [ $1 -eq 1 ]; then
#update
service ntpd condrestart
fi
exit 0
%systemd_postun ntpd
%systemd_postun ntpdate
:
%files
%defattr(-,root,root)
%config(noreplace) %{_sysconfdir}/ntp.conf
%config(noreplace) %{_sysconfdir}/ntp/keys
%config %{_sysconfdir}/ntp/ntpservers
%{_initrddir}/ntpd
%{_sbindir}/calc_tickadj
%{_sbindir}/ntp-keygen
%{_sbindir}/ntp-wait
@ -118,14 +136,18 @@ exit 0
%{_sbindir}/ntptrace
%{_sbindir}/sntp
%{_sbindir}/tickadj
%{_sbindir}/update-leap
%{_unitdir}/ntpd.service
%{_unitdir}/ntpdate.service
%{_sysusersdir}/ntp.conf
%dir %{_datadir}/ntp
%dir %{_datadir}/ntp/lib
%dir %{_datadir}/ntp/lib/NTP
%{_datadir}/ntp/lib/NTP/Util.pm
%dir %{_docdir}/ntp4
%{_docdir}/ntp4/*.html
%dir %{_docdir}/ntp4/html
%{_docdir}/ntp4/html/*
%dir %{_docdir}/ntp
%{_docdir}/ntp/*.html
%dir %{_docdir}/ntp/html
%{_docdir}/ntp/html/*
%{_docdir}/sntp/sntp.html
%{_mandir}/man1/calc_tickadj.1*
%{_mandir}/man1/ntp-wait.1*
@ -138,10 +160,14 @@ exit 0
%{_mandir}/man1/ntpsnmpd.*
%{_mandir}/man1/ntpq.*
%{_mandir}/man1/sntp.*
%{_mandir}/man1/update-leap.1*
%doc COPYRIGHT
#%doc ChangeLog NEWS *.y2kfixes README* TODO WHERE-TO-START
%changelog
* Sun Dec 13 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 4.2.8p15-1mamba
- update to 4.2.8p15
* Thu Jan 29 2015 Automatic Build System <autodist@mambasoft.it> 4.2.8-1mamba
- automatic update by autodist
@ -209,7 +235,7 @@ exit 0
* Tue Feb 24 2004 Davide Madrisan <davide.madrisan@qilinux.it> 4.2.0-1qilnx
- new version rebuild
* Mon Sep 09 2003 Davide Madrisan <davide.madrisan@qilinux.it> 4.1.1-3qilnx
* Tue Sep 09 2003 Davide Madrisan <davide.madrisan@qilinux.it> 4.1.1-3qilnx
- fixed the date localization problem in /etc/init.d/ntpd
* Wed Jun 25 2003 Silvan Calarco <silvan.calarco@mambasoft.it> 4.1.1-2qilnx

2
ntp.sysusers Normal file
View File

@ -0,0 +1,2 @@
g ntp 87 -
u ntp 87 "Network Time Protocol" /var/lib/ntp /bin/false

13
ntpd.service Normal file
View File

@ -0,0 +1,13 @@
[Unit]
Description=Network Time Service
After=network.target nss-lookup.target
Conflicts=systemd-timesyncd.service
[Service]
Type=forking
PrivateTmp=true
ExecStart=/usr/bin/ntpd -g -u ntp:ntp
Restart=always
[Install]
WantedBy=multi-user.target

12
ntpdate.service Normal file
View File

@ -0,0 +1,12 @@
[Unit]
Description=One-Shot Network Time Service
After=network.target nss-lookup.target
Before=ntpd.service
[Service]
Type=oneshot
PrivateTmp=true
ExecStart=/usr/bin/ntpd -q -n -g -u ntp:ntp
[Install]
WantedBy=multi-user.target