]> git.pld-linux.org Git - packages/ntp.git/blobdiff - ntp.spec
- rebuild with libevent 2.1.9
[packages/ntp.git] / ntp.spec
index 487944e5c9fbc83173b89d3c863813a84de0e380..5c178ccf918e71cdb639595b0348bb3ed0dc3f80 100644 (file)
--- a/ntp.spec
+++ b/ntp.spec
@@ -2,29 +2,24 @@
 # - enable and package ntpdsim?
 # - net-snmp-ntpd needs initscript
 # - update FC patches
-# - unpackaged files:
-#        /usr/sbin/calc_tickadj
-#        /usr/share/doc/sntp/sntp.html
-#        /usr/share/man/man1/calc_tickadj.1.gz
-#        /usr/share/man/man1/ntp-wait.1.gz
-#        /usr/share/man/man5/ntp.conf.5.gz
-#        /usr/share/man/man5/ntp.keys.5.gz
-#        /usr/share/ntp/lib/NTP/Util.pm
+# - 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:       0.1
+Version:       4.2.8p8
+Release:       7
 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: 4a8636260435b230636f053ffd070e34
 Source1:       %{name}.conf
 Source2:       %{name}.keys
 Source3:       %{name}d.init
@@ -33,40 +28,34 @@ Source5:    %{name}date.init
 Source6:       %{name}date.sysconfig
 Source7:       %{name}-manpages.tar.gz
 # Source7-md5: 208fcc9019e19ab26d28e4597290bffb
-Source8:       %{name}.upstart
-Source9:       %{name}date.upstart
 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-md5:        daabf9679b23c4c4d8ba99dbb89bfdc8
 Patch0:                %{name}-build.patch
 Patch1:                %{name}-no_libelf.patch
 Patch2:                %{name}-ipv6.patch
 Patch3:                %{name}-nano.patch
-Patch4:                %{name}-no_avahi.patch
 # FC patches + 100
 Patch101:      %{name}-4.2.6p1-sleep.patch
 Patch102:      %{name}-4.2.6p1-droproot.patch
 Patch103:      %{name}-4.2.6p1-bcast.patch
 Patch104:      %{name}-4.2.6p1-cmsgalign.patch
 Patch105:      %{name}-4.2.6p1-linkfastmath.patch
-Patch106:      %{name}-4.2.6p1-tentative.patch
 Patch107:      %{name}-4.2.6p1-retcode.patch
 Patch108:      %{name}-4.2.6p1-rtnetlink.patch
-Patch109:      %{name}-4.2.4p7-getprecision.patch
-Patch110:      %{name}-4.2.6p1-logdefault.patch
+Patch110:      %{name}-logdefault.patch
 Patch111:      %{name}-4.2.6p1-mlock.patch
-Patch112:      %{name}-4.2.6p3-broadcastdelay.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
@@ -117,6 +106,7 @@ Requires(pre):      /usr/sbin/useradd
 Requires(post,preun,postun):   systemd-units >= 38
 Requires:      rc-scripts >= 0.4.3.0
 Requires:      systemd-units >= 38
+Requires:      autogen-libs >= 5.18.12
 Provides:      group(ntp)
 Provides:      ntp = %{version}-%{release}
 Provides:      ntpdaemon
@@ -151,19 +141,6 @@ referência de horário. Este pacote contém utilitários e servidores que
 sincronizarão o relógio do seu computador com o horário universal
 (UTC) através do protocolo NTP e utilizando servidores NTP públicos.
 
-%package -n ntpd-upstart
-Summary:       Upstart job description for the NTP daemon
-Summary(pl.UTF-8):     Opis zadania Upstart dla demona NTP
-Group:         Daemons
-Requires:      ntpd = %{version}-%{release}
-Requires:      upstart >= 0.6
-
-%description -n ntpd-upstart
-Upstart job description for the NTP daemon.
-
-%description -n ntpd-upstart -l pl.UTF-8
-Opis zadania Upstart dla demona NTP.
-
 %package -n ntpdate
 Summary:       Utility to set the date and time via NTP
 Summary(pl.UTF-8):     Klient do synchronizacji czasu po NTP (Network Time Protocol)
@@ -195,29 +172,24 @@ servers.
 %description -n ntpdate -l pl.UTF-8
 Klient do synchronizacji czasu po NTP (Network Time Protocol).
 
-%package -n ntpdate-upstart
-Summary:       Upstart job description for NTP client
-Summary(pl.UTF-8):     Opis zadania Upstart dla klienta NTP
-Group:         Daemons
-Requires:      ntpdate = %{version}-%{release}
-Requires:      upstart >= 0.6
-
-%description -n ntpdate-upstart
-Upstart job description for the NTP client.
-
-%description -n ntpdate-upstart -l pl.UTF-8
-Opis zadania Upstart dla klienta NTP.
-
 %package -n mibs-ntp
 Summary:       MIBs for NTP time entities
+Summary(pl.UTF-8):     Pliki MIB dla elementów czasu NTP
 Group:         Applications/System
 Requires:      mibs-dirs
+%if "%{_rpmversion}" >= "5"
+BuildArch:     noarch
+%endif
 
 %description -n mibs-ntp
 The Management Information Base for NTP time entities.
 
+%description -n mibs-ntp -l pl.UTF-8
+Pliki MIB (Management Information Base) dla elementów czasu NTP
+
 %package -n net-snmp-ntpd
 Summary:       NTP SNMP subagent for Net-SNMP
+Summary(pl.UTF-8):     Podagent SNMP NTP dla usługi Net-SNMP
 Group:         Daemons
 Requires(post,preun):  /sbin/chkconfig
 Requires:      net-snmp
@@ -227,21 +199,35 @@ Suggests: mibs-ntp
 %description -n net-snmp-ntpd
 NTP SNMP AgentX subagent for Net-SNMP.
 
+%description -n net-snmp-ntpd -l pl.UTF-8
+Podagent SNMP AgentX NTP dla usługi Net-SNMP.
+
 %package tools
 Summary:       NTP tools
+Summary(pl.UTF-8):     Narzędzia NTP
 Group:         Applications/Networking
 Obsoletes:     ntp-ntptrace
 
 %description tools
-This package contains ntp tools:
+This package contains NTP tools:
 - ntptrace: Trace a chain of NTP servers back to the primary source
 - ntp-wait: Wait for NTP server to synchronize
+- calc_tickadj: Calculate optimal value for tick given ntp drift file
+
+%description tools -l pl.UTF-8
+Ten pakiet zawiera narzędzia NTP:
+- ntptrace: śledzenie łańcucha serwerów NTP aż do oryginalnego źródła
+- ntp-wait: oczekiwanie na synchronizację serwera NTP
+- calc_tickadj: obliczenie optymalnej wartości dla pliku dryfu ntp
 
 %package doc-html
 Summary:       HTML documentation for ntp
 Summary(pl.UTF-8):     Dokumentacja HTML dla ntp
 Summary(pt_BR.UTF-8):  Documentação adicional para o pacote ntp
 Group:         Documentation
+%if "%{_rpmversion}" >= "5"
+BuildArch:     noarch
+%endif
 
 %description doc-html
 HTML documentation for ntp.
@@ -258,7 +244,6 @@ Este pacote contém documentação adicional sobre o NTP versão 4.
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
-%{!?with_avahi:%patch4 -p1}
 
 ## FC patches
 #%patch101 -p1
@@ -266,18 +251,15 @@ Este pacote contém documentação adicional sobre o NTP versão 4.
 #%patch103 -p1
 %patch104 -p1
 %patch105 -p1
-#%patch106 -p1 looks like obsolete
 %patch107 -p1
 %patch108 -p1
-#%patch109 -p1 upstream already decreased to 20e-9, not needed then?
-#%patch110 -p1
-#%patch111 -p1
-#%patch112 -p1
+%patch110 -p1
+#%patch111 -p1  -- obsolete?
 
 echo 'AM_CONDITIONAL([NEED_LIBOPTS], false)' >> configure.ac
 echo 'AM_CONDITIONAL([NEED_LIBOPTS], false)' >> sntp/configure.ac
 
-rm sntp/m4/{lt*,libtool}.m4 sntp/libevent/m4/{lt*,libtool}.m4
+%{__rm} sntp/m4/{lt*,libtool}.m4 sntp/libevent/m4/{lt*,libtool}.m4
 
 %build
 %{__libtoolize}
@@ -286,17 +268,24 @@ rm sntp/m4/{lt*,libtool}.m4 sntp/libevent/m4/{lt*,libtool}.m4
 %{__automake}
 cd sntp
 %{__libtoolize}
-%{__aclocal} -I libopts/m4 -I libevent/m4
+%{__aclocal} -I m4 -I libopts/m4 -I libevent/m4
+%{__autoconf}
+%{__automake}
+cd libevent
+%{__libtoolize}
+%{__aclocal} -I m4
 %{__autoconf}
 %{__automake}
-cd ..
+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 \
@@ -304,13 +293,13 @@ CPPFLAGS="%{rpmcppflags} -I/usr/include/readline"
        --disable-local-libopts \
        --disable-local-libevent
 
-%{__make}
+%{__make} -j1
 
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_mandir}/man1,%{systemdunitdir}} \
        $RPM_BUILD_ROOT%{_libexecdir}/systemd/ntp-units.d \
-       $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig,cron.hourly,init}
+       $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig,cron.hourly}
 
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
@@ -323,8 +312,6 @@ install -p %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/ntpd
 install -p %{SOURCE5} $RPM_BUILD_ROOT/etc/rc.d/init.d/ntpdate
 cp -p %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/ntpd
 cp -p %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/ntpdate
-cp -p %{SOURCE8} $RPM_BUILD_ROOT/etc/init/ntpd.conf
-cp -p %{SOURCE9} $RPM_BUILD_ROOT/etc/init/ntpdate.conf
 
 install -p %{SOURCE10} $RPM_BUILD_ROOT%{_sbindir}/ntpdate-wrapper
 cp -p %{SOURCE11} $RPM_BUILD_ROOT%{systemdunitdir}/ntpd.service
@@ -352,7 +339,7 @@ EOF
 install -d $RPM_BUILD_ROOT%{mibdir}
 cp -p ntpsnmpd/ntpv4-mib.mib $RPM_BUILD_ROOT%{mibdir}
 
-rm -r $RPM_BUILD_ROOT%{_docdir}/ntp4
+%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/{ntp,sntp}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -381,12 +368,6 @@ if [ "$1" = "0" ]; then
 fi
 %systemd_reload
 
-%post -n ntpd-upstart
-%upstart_post ntpd
-
-%postun -n ntpd-upstart
-%upstart_postun ntpd
-
 %pre -n ntpdate
 %groupadd -g 246 ntp
 %useradd -u 246 -d %{_sysconfdir} -g ntp -c "NTP Daemon" ntp
@@ -410,12 +391,6 @@ if [ "$1" = "0" ]; then
 fi
 %systemd_reload
 
-%post -n ntpdate-upstart
-%upstart_post ntpdate
-
-%postun -n ntpdate-upstart
-%upstart_postun ntpdate
-
 %triggerun -n ntpd -- ntp < 4.2.4p8-3.14
 # Prevent preun from ntp from working
 chmod a-x /etc/rc.d/init.d/ntpd
@@ -449,11 +424,12 @@ fi
 %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
-%{_libexecdir}/systemd/ntp-units.d/50-ntpd.list
+# dir not handled by systemd in pld
+#%{_libexecdir}/systemd/ntp-units.d/50-ntpd.list
 %attr(755,root,root) %{_sbindir}/ntpd
 %attr(755,root,root) %{_sbindir}/ntpdc
 %attr(755,root,root) %{_sbindir}/ntp-keygen
@@ -467,14 +443,12 @@ fi
 %{_mandir}/man1/ntpq.1*
 %{_mandir}/man1/ntptime.1*
 %{_mandir}/man1/sntp.1*
+%{_mandir}/man5/ntp.conf.5*
+%{_mandir}/man5/ntp.keys.5*
 
 %dir %attr(770,root,ntp) /var/lib/ntp
 %attr(640,ntp,ntp) %ghost /var/lib/ntp/drift
 
-%files -n ntpd-upstart
-%defattr(644,root,root,755)
-%config(noreplace) %verify(not md5 mtime size) /etc/init/ntpd.conf
-
 %files -n ntpdate
 %defattr(644,root,root,755)
 %doc COPYRIGHT
@@ -484,11 +458,7 @@ fi
 %attr(754,root,root) /etc/cron.hourly/ntpdate
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ntpdate
 %{systemdunitdir}/ntpdate.service
-%{_mandir}/man1/ntpdate*
-
-%files -n ntpdate-upstart
-%defattr(644,root,root,755)
-%config(noreplace) %verify(not md5 mtime size) /etc/init/ntpdate.conf
+%{_mandir}/man1/ntpdate.1*
 
 %files -n mibs-ntp
 %defattr(644,root,root,755)
@@ -502,9 +472,16 @@ fi
 
 %files tools
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_sbindir}/ntptrace
+%attr(755,root,root) %{_sbindir}/calc_tickadj
 %attr(755,root,root) %{_sbindir}/ntp-wait
-%{_mandir}/man1/ntptrace*
+%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)
This page took 0.038573 seconds and 4 git commands to generate.