# - enable and package ntpdsim?
# - net-snmp-ntpd needs initscript
# - update FC patches
+# - update man pages (from Debian?)
#
# Conditional build:
-%bcond_without avahi # disable DNS-SD support via Avahi
+%bcond_without avahi # disable DNS-SD support via Avahi
+%bcond_without sntp # disable building sntp and sntp/tests
+%bcond_with seccomp # enable experimental support for libseccomp sandboxing
-%include /usr/lib/rpm/macros.perl
Summary: Network Time Protocol utilities
Summary(pl.UTF-8): Narzędzia do synchronizacji czasu (Network Time Protocol)
Summary(pt_BR.UTF-8): Network Time Protocol versão 4
Name: ntp
-Version: 4.2.8
-Release: 3
+Version: 4.2.8p15
+Release: 1
License: distributable
Group: Networking/Daemons
-Source0: http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/%{name}-%{version}.tar.gz
-# Source0-md5: 6972a626be6150db8cfbd0b63d8719e7
+Source0: https://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/%{name}-%{version}.tar.gz
+# Source0-md5: e1e6b23d2fc75cced41801dbcd6c2561
Source1: %{name}.conf
Source2: %{name}.keys
Source3: %{name}d.init
Source10: %{name}date-wrapper
Source11: %{name}d.service
Source12: %{name}date.service
-Source13: http://www.ietf.org/timezones/data/leap-seconds.list
-# Source13-md5: e99a84cf28b14c77fba76c05565604ac
+Source13: https://www.ietf.org/timezones/data/leap-seconds.list
+# Source13-md5: 961f9b603309f2d12dcb420c054eff5f
Patch0: %{name}-build.patch
Patch1: %{name}-no_libelf.patch
Patch2: %{name}-ipv6.patch
Patch3: %{name}-nano.patch
-Patch4: %{name}-no_avahi.patch
+Patch4: threadstack-sysconf.patch
# FC patches + 100
Patch101: %{name}-4.2.6p1-sleep.patch
Patch102: %{name}-4.2.6p1-droproot.patch
Patch110: %{name}-logdefault.patch
Patch111: %{name}-4.2.6p1-mlock.patch
URL: http://www.ntp.org/
-BuildRequires: autoconf
-BuildRequires: autogen-devel
-BuildRequires: automake
+BuildRequires: autoconf >= 2.61
+BuildRequires: autogen-devel >= 5.18.12
+BuildRequires: automake >= 1:1.10
%{?with_avahi:BuildRequires: avahi-compat-libdns_sd-devel}
BuildRequires: libcap-devel
-BuildRequires: libevent-devel
+%{?with_sntp:BuildRequires: libevent-devel >= 2.0}
BuildRequires: libnl-devel
-BuildRequires: libseccomp-devel
+%{?with_seccomp:BuildRequires: libseccomp-devel}
BuildRequires: libtool
BuildRequires: net-snmp-devel
BuildRequires: openssl-devel >= 0.9.7d
BuildRequires: pciutils-devel
+# AUTO: -- checking for pkg-config... no
+BuildRequires: pkgconfig
BuildRequires: readline-devel >= 4.2
BuildRequires: rpm-perlprov >= 4.1-13
BuildRequires: rpmbuild(macros) >= 1.626
Requires(pre): /usr/sbin/groupadd
Requires(pre): /usr/sbin/useradd
Requires(post,preun,postun): systemd-units >= 38
+%requires_ge autogen-libs
+Requires: libgcc
Requires: rc-scripts >= 0.4.3.0
Requires: systemd-units >= 38
Provides: group(ntp)
Summary(pl.UTF-8): Pliki MIB dla elementów czasu NTP
Group: Applications/System
Requires: mibs-dirs
+BuildArch: noarch
%description -n mibs-ntp
The Management Information Base for NTP time entities.
Summary(pl.UTF-8): Dokumentacja HTML dla ntp
Summary(pt_BR.UTF-8): Documentação adicional para o pacote ntp
Group: Documentation
+BuildArch: noarch
%description doc-html
HTML documentation for ntp.
%patch1 -p1
%patch2 -p1
%patch3 -p1
-%{!?with_avahi:%patch4 -p1}
+%patch4 -p1
## FC patches
#%patch101 -p1
%{__automake}
cd sntp
%{__libtoolize}
-%{__aclocal} -I libopts/m4 -I libevent/m4
+%{__aclocal} -I m4 -I libopts/m4 -I libevent/m4
%{__autoconf}
%{__automake}
-cd ..
+cd libevent
+%{__libtoolize}
+%{__aclocal} -I m4
+%{__autoconf}
+%{__automake}
+cd ../..
CPPFLAGS="%{rpmcppflags} -I/usr/include/readline"
%configure \
+ --disable-silent-rules \
--with-binsubdir=sbin \
--enable-linuxcaps \
--enable-getifaddrs \
- --enable-libseccomp \
+ %{?with_seccomp:--enable-libseccomp} \
+ %{__with_without sntp} \
--enable-ipv6 \
--enable-ntp-signd \
--with-lineeditlibs=readline \
--disable-local-libopts \
--disable-local-libevent
-%{__make}
+%{__make} -j1
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{mibdir}
cp -p ntpsnmpd/ntpv4-mib.mib $RPM_BUILD_ROOT%{mibdir}
-%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/{ntp4,sntp}
+%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/{ntp,sntp}
%clean
rm -rf $RPM_BUILD_ROOT
%attr(750,root,root) %dir %{_sysconfdir}
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/keys
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ntp.conf
-%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ntp.leapseconds
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ntp.leapseconds
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ntpd
%attr(754,root,root) /etc/rc.d/init.d/ntpd
%{systemdunitdir}/ntpd.service
%attr(755,root,root) %{_sbindir}/calc_tickadj
%attr(755,root,root) %{_sbindir}/ntp-wait
%attr(755,root,root) %{_sbindir}/ntptrace
+%attr(755,root,root) %{_sbindir}/update-leap
%dir %{_datadir}/ntp
%{_datadir}/ntp/lib
%{_mandir}/man1/calc_tickadj.1*
%{_mandir}/man1/ntp-wait.1*
%{_mandir}/man1/ntptrace.1*
+%{_mandir}/man1/update-leap.1*
%files doc-html
%defattr(644,root,root,755)