%define _bindir %{_prefix}/sbin Summary: Synchronizes system time using the Network Time Protocol (NTP). Summary(ja): Network Time Protocol (NTP) を用いたシステム時刻の同期 Name: ntp Version: 4.2.6p5 Release: 8%{?_dist_release} License: distributable Group: System Environment/Daemons URL: http://www.ntp.org/ Source0: ftp://ftp.udel.edu/pub/ntp/ntp4/ntp-%{version}.tar.gz Source1: ntp.conf Source2: ntp.keys Source3: ntpd.init Source4: ntpd.sysconfig Source5: ntpstat-0.2.tgz Source100: ntpd-NM-dispatch Source999: filter-requires-ntp.sh # ntpbz #802 Patch1: ntp-4.2.6p1-sleep.patch # add support for dropping root to ntpdate Patch2: ntp-4.2.6p4-droproot.patch # ntpbz #779 Patch3: ntp-4.2.6p3-bcast.patch # align buffer for control messages Patch4: ntp-4.2.6p1-cmsgalign.patch # link ntpd with -ffast-math on ia64 Patch5: ntp-4.2.6p1-linkfastmath.patch # ntpbz #2294 Patch6: ntp-4.2.6p5-fipsmd5.patch # ntpbz #759 Patch7: ntp-4.2.6p1-retcode.patch # ntpbz #2085 Patch8: ntp-4.2.6p5-rootdisp.patch # ntpbz #2309 Patch9: ntp-4.2.6p5-hexpw.patch # ntpbz #898 Patch10: ntp-4.2.6p4-htmldoc.patch # ntpbz #1402 Patch11: ntp-4.2.6p5-updatebclient.patch # fix precision calculation on fast CPUs Patch12: ntp-4.2.4p7-getprecision.patch # ntpbz #1408 Patch13: ntp-4.2.6p5-logdefault.patch # add option -m to lock memory Patch14: ntp-4.2.6p4-mlock.patch # restore pre 4.2.6 ntpdate behavior Patch15: ntp-4.2.6p5-ntpdatetimeout.patch # ntpbz #2040 Patch16: ntp-4.2.6p5-identlen.patch # ntpbz #1670 Patch17: ntp-4.2.6p3-broadcastdelay.patch # ntpbz #1671 Patch18: ntp-4.2.6p5-delaycalib.patch # ntpbz #2019 Patch19: ntp-4.2.6p5-pwcipher.patch # ntpbz #2320 Patch20: ntp-4.2.6p5-noservres.patch # ntpbz #2506 Patch21: ntp-4.2.6p5-refreshroute.patch # ntpbz #2666 Patch22: ntp-4.2.6p5-cve-2014-9294.patch # ntpbz #2665 Patch23: ntp-4.2.6p5-cve-2014-9293.patch # ntpbz #2667 Patch24: ntp-4.2.6p5-cve-2014-9295.patch # ntpbz #2670 Patch25: ntp-4.2.6p5-cve-2014-9296.patch # ntpbz #2671 Patch26: ntp-4.2.6p5-cve-2014-9297.patch # ntpbz #2672 Patch27: ntp-4.2.6p5-cve-2014-9298.patch # ntpbz #2174 Patch28: ntp-4.2.6p5-sourceport.patch # ntpbz #2612 Patch29: ntp-4.2.6p5-monwarn.patch # ntpbz #1232 Patch30: ntp-4.2.6p5-nanoshm.patch # ntpbz #2661 Patch32: ntp-4.2.6p5-mreadvar.patch # ntpbz #730 Patch33: ntp-4.2.6p5-rsaexp.patch # ntpbz #2537 Patch34: ntp-4.2.6p5-keylen.patch # ntpbz #2627 Patch35: ntp-4.2.6p5-shmperm.patch # ntpbz #2745 Patch36: ntp-4.2.6p5-xleap.patch # ntpbz #2805 Patch37: ntp-4.2.6p5-mcastjoin.patch # ntpbz #2779 Patch39: ntp-4.2.6p5-cve-2015-1798.patch # ntpbz #2781 Patch40: ntp-4.2.6p5-cve-2015-1799.patch # ntpbz #2797 Patch41: ntp-4.2.6p5-cve-2015-3405.patch # ntpbz #2837 Patch42: ntp-4.2.6p5-dscp.patch # ntpbz #2901 Patch43: ntp-4.2.6p5-cve-2015-7704.patch # allow only one step larger than panic threshold with -g Patch44: ntp-4.2.6p5-cve-2015-5300.patch # ntpbz #2246 Patch45: ntp-4.2.6p5-leapreset.patch # ntpbz #2081 Patch46: ntp-4.2.6p5-rawstats.patch # ntpbz #2639, #2880 Patch47: ntp-4.2.6p5-clockstate.patch # ntpbz #2851 Patch48: ntp-4.2.6p5-restrict46.patch # ntpbz #1593 Patch49: ntp-4.2.6p5-cve-2015-5194.patch # fix crash when referencing disabled statistic type Patch50: ntp-4.2.6p5-cve-2015-5195.patch # don't hang in sntp with crafted reply Patch51: ntp-4.2.6p5-cve-2015-5219.patch # ntpbz #2909 Patch52: ntp-4.2.6p5-cve-2015-7701.patch # ntpbz #2899 Patch53: ntp-4.2.6p5-cve-2015-7691_7692_7702.patch # ntpbz #2919 Patch54: ntp-4.2.6p5-cve-2015-7852.patch # ntpbz #2902 Patch55: ntp-4.2.6p5-cve-2015-7703.patch # ntpbz #2945 Patch56: ntp-4.2.6p5-cve-2015-8138.patch # ntpbz #2939, #2940 Patch57: ntp-4.2.6p5-cve-2015-7977_7978.patch # ntpbz #2942, ntpbz #3007 Patch60: ntp-4.2.6p5-cve-2015-7979.patch # ntpbz #2978 Patch61: ntp-4.2.6p5-cve-2016-1548.patch # ntpbz #3009 Patch62: ntp-4.2.6p5-cve-2016-2518.patch # ntpbz #2879 Patch63: ntp-4.2.6p5-cve-2016-1550.patch # handle unknown clock types Patch100: ntpstat-0.2-clksrc.patch # process first packet in multipacket response Patch101: ntpstat-0.2-multipacket.patch # use current system variable names Patch102: ntpstat-0.2-sysvars.patch # print synchronization distance instead of dispersion Patch103: ntpstat-0.2-maxerror.patch # fix error bit checking Patch104: ntpstat-0.2-errorbit.patch # improve man page Patch105: ntpstat-0.2-manual.patch # fix included autoopts to not crash on range error Patch150: ntp-4.2.6p5-optsrange.patch Patch1000: ntp-4.2.6p5-u64.patch Requires(pre): /sbin/chkconfig BuildRequires: openssl-devel BuildRequires: libedit-devel BuildRequires: libcap-devel BuildRequires: autoconf BuildRequires: bison # ntpstat BuildRequires: perl-HTML-Parser #Conflicts: xntp3 Obsoletes: xntp3 BuildRoot: %{_tmppath}/%{name}-%{version}-root Packager: iwamoto Vendor: Project Vine Distribution: Vine Linux # Working around perl dependency problem %define __find_requires %{SOURCE999} %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. The ntp package 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. #' %package perl Summary: NTP utilities written in perl Summary(ja): perl で記述された NTP ユーティリティ Group: Applications/System Requires: %{name} = %{version}-%{release} %description perl This package contains perl scripts ntp-wait and ntptrace. %prep %setup -q -a 5 %patch1 -p1 -b .sleep %patch2 -p1 -b .droproot %patch3 -p1 -b .bcast %patch4 -p1 -b .cmsgalign %ifarch ia64 %patch5 -p1 -b .linkfastmath %endif %patch6 -p1 -b .fipsmd5 %patch7 -p1 -b .retcode %patch8 -p1 -b .rootdisp %patch9 -p1 -b .hexpw %patch10 -p1 -b .htmldoc %patch11 -p1 -b .updatebclient %patch12 -p1 -b .getprecision %patch13 -p1 -b .logdefault %patch14 -p1 -b .mlock %patch15 -p1 -b .ntpdatetimeout %patch16 -p1 -b .identlen %patch17 -p1 -b .broadcastdelay %patch18 -p1 -b .delaycalib %patch19 -p1 -b .pwcipher %patch20 -p1 -b .noservres %patch21 -p1 -b .refreshroute %patch22 -p1 -b .cve-2014-9294 %patch23 -p1 -b .cve-2014-9293 %patch24 -p1 -b .cve-2014-9295 %patch25 -p1 -b .cve-2014-9296 %patch26 -p1 -b .cve-2014-9297 %patch27 -p1 -b .cve-2014-9298 %patch28 -p1 -b .sourceport %patch29 -p1 -b .monwarn %patch30 -p1 -b .nanoshm %patch32 -p1 -b .mreadvar %patch33 -p1 -b .rsaexp %patch34 -p1 -b .keylen %patch35 -p1 -b .shmperm %patch36 -p1 -b .xleap %patch37 -p1 -b .mcastjoin %patch39 -p1 -b .cve-2015-1798 %patch40 -p1 -b .cve-2015-1799 %patch41 -p1 -b .cve-2015-3405 %patch42 -p1 -b .dscp %patch43 -p1 -b .cve-2015-7704 %patch44 -p1 -b .cve-2015-5300 %patch45 -p1 -b .leapreset %patch46 -p1 -b .rawstats %patch47 -p1 -b .clockstate %patch48 -p1 -b .restrict46 %patch49 -p1 -b .cve-2015-5194 %patch50 -p1 -b .cve-2015-5195 %patch51 -p1 -b .cve-2015-5219 %patch52 -p1 -b .cve-2015-7701 %patch53 -p1 -b .cve-2015-7691_7692_7702 %patch54 -p1 -b .cve-2015-7852 %patch55 -p1 -b .cve-2015-7703 %patch56 -p1 -b .cve-2015-8138 %patch57 -p1 -b .cve-2015-7977_7978 %patch60 -p1 -b .cve-2015-7979 %patch61 -p1 -b .cve-2016-1548 %patch62 -p1 -b .cve-2016-2518 %patch63 -p1 -b .cve-2016-1550 # ntpstat patches %patch100 -p1 -b .clksrc %patch101 -p1 -b .multipacket %patch102 -p1 -b .sysvars %patch103 -p1 -b .maxerror %patch104 -p1 -b .errorbit %patch105 -p1 -b .manual # autoopt patches %patch150 -p1 -b .optsrange %patch1000 -p1 -b .u64 # set default path to sntp KoD database sed -i 's|/var/db/ntp-kod|%{_localstatedir}/lib/ntp/sntp-kod|' sntp/{sntp.1,main.c} # fix line terminators sed -i 's|\r||g' html/scripts/{footer.txt,style.css} for f in COPYRIGHT ChangeLog; do iconv -f iso8859-1 -t utf8 -o ${f}{_,} && touch -r ${f}{,_} && mv -f ${f}{_,} done # make the build fail if the parsers are not regenerated rm ntpd/ntp_parser.{c,h} echo > ntpd/ntp_keyword.h %build export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -fno-strict-overflow" if echo 'int main () { return 0; }' | gcc -pie -fPIE -O2 -xc - -o pietest 2>/dev/null; then ./pietest && export CFLAGS="$CFLAGS -pie -fPIE" rm -f pietest fi export LDFLAGS="-Wl,-z,relro,-z,now" %configure \ --prefix=/usr \ --with-openssl-libdir=%{_libdir} make -C ntpd ntp_keyword.h %__make %{?_smp_mflags} sed -i 's|$ntpq = "ntpq"|$ntpq = "%{_sbindir}/ntpq"|' scripts/ntptrace sed -i 's|ntpq -c |%{_sbindir}/ntpq -c |' scripts/ntp-wait pushd html ../scripts/html2man # remove adjacent blank lines sed -i 's/^[\t\ ]*$//;/./,/^$/!d' man/man*/*.[58] popd %__make %{?_smp_mflags} -C ntpstat-0.2 CFLAGS="$CFLAGS" %install rm -rf $RPM_BUILD_ROOT %makeinstall { pushd $RPM_BUILD_ROOT mkdir -p .%{_sysconfdir}/{ntp,rc.d/init.d,sysconfig} mkdir -p .%{_sysconfdir}/NetworkManager/dispatcher.d install -m644 $RPM_SOURCE_DIR/ntp.conf .%{_sysconfdir}/ntp.conf touch .%{_sysconfdir}/ntp/drift install -m600 $RPM_SOURCE_DIR/ntp.keys .%{_sysconfdir}/ntp/keys touch .%{_sysconfdir}/ntp/step-tickers install -m755 $RPM_SOURCE_DIR/ntpd.init .%{_sysconfdir}/rc.d/init.d/ntpd install -m644 %{SOURCE4} .%{_sysconfdir}/sysconfig/ntpd install -m755 %{SOURCE100} .%{_sysconfdir}/NetworkManager/dispatcher.d/06-ntpd strip .%{_bindir}/* || : popd } mkdir -p $RPM_BUILD_ROOT%{_mandir}/man8 pushd html/man/man8 install -m 644 ntp-wait.8 $RPM_BUILD_ROOT%{_mandir}/man8/ install -m 644 ntptrace.8 $RPM_BUILD_ROOT%{_mandir}/man8/ popd pushd ntpstat-0.2 mkdir -p $RPM_BUILD_ROOT%{_bindir} install -m 755 ntpstat $RPM_BUILD_ROOT%{_bindir} install -m 644 ntpstat.1 $RPM_BUILD_ROOT%{_mandir}/man8/ntpstat.8 popd %clean rm -rf $RPM_BUILD_ROOT %post /sbin/chkconfig --add ntpd %preun if [ $1 = 0 ]; then service ntpd stop > /dev/null 2>&1 /sbin/chkconfig --del ntpd fi %postun if [ "$1" -ge "1" ]; then # service ntpd condrestart > /dev/null 2>&1 service ntpd condrestart fi %files %defattr(-,root,root) %doc html/* NEWS TODO %{_sbindir}/ntp-keygen %{_sbindir}/ntpd %{_sbindir}/ntpdate %{_sbindir}/ntpdc %{_sbindir}/ntpq %{_sbindir}/ntpstat %{_sbindir}/ntptime %{_sbindir}/sntp %{_sbindir}/tickadj %config %{_sysconfdir}/rc.d/init.d/ntpd # %config(noreplace) %{_sysconfdir}/ntp.conf %config %{_sysconfdir}/ntp.conf %dir %{_sysconfdir}/ntp/ %ghost %config(missingok) %{_sysconfdir}/ntp/drift %config(noreplace) %{_sysconfdir}/ntp/keys %ghost %config(missingok) %{_sysconfdir}/ntp/step-tickers %config(noreplace) %{_sysconfdir}/sysconfig/ntpd %{_sysconfdir}/NetworkManager/dispatcher.d/* %{_mandir}/man1/* %{_mandir}/man8/ntpstat* %files perl %defattr(-,root,root) %{_sbindir}/ntp-wait %{_sbindir}/ntptrace %{_mandir}/man8/ntp-wait.8* %{_mandir}/man8/ntptrace.8* %changelog * Thu Jul 21 2016 Tomohiro "Tomo-p" KATO 4.2.6p5-8 - imported all patches from CentOS. * Sun May 15 2016 Yoji TOYODA 4.2.6p5-7 - rebuild with openssl-1.0.2 * Mon Mar 23 2015 Tomohiro "Tomo-p" KATO 4.2.6p5-6 - replaced readline with libedit (NTPL conflicts GPL). * Sun Mar 22 2015 Ryoichi INAGAKI 4.2.6p5-5 - rebuilt with readline 6.3 - fixed location of Vendor/Distribution/Packager tag (to avoid inclusion in %%description perl) * Fri Feb 27 2015 Ryoichi INAGAKI 4.2.6p5-4 - added patch140 and 150 from Vine Linux/6 * Mon Feb 9 2015 Satoshi IWAMOTO 4.2.6p3-5 - add patch140 for fix CVE-2014-9297 (length value in extension fields) - add patch150 for fix CVE-2014-9298 (bypass ACLs based on IPv6) these patches based from debian wheezy, thanks. * Fri Feb 6 2015 Ryoichi INAGAKI 4.2.6p5-3 - added patch100-130 from Vine Linux/6 * Sun Dec 21 2014 Satoshi IWAMOTO 4.2.6p3-4 - add Patch100-130 for fix CVE-2014-9293,4,5,6 these patches are from rhel6, thanks. * Sat Dec 13 2014 Satoshi IWAMOTO 4.2.6p3-3 - update default ntp.conf - remove "noreplace" of ntp.conf in files section - added Japanese summary * Sat Nov 3 2012 Satoshi IWAMOTO 4.2.6p5-1 - new upstream release - update patches from fc18 - fix changelog typo.... * Sun Jan 16 2011 Satoshi IWAMOTO 4.2.6p3-2 - add config options to use openssl libs, readline libs - add BR: libcap-devel, perl-HTML-Parser (Thanks to Take-san) * Sat Jan 15 2011 Satoshi IWAMOTO 4.2.6p3-1 - new upstream release - built with openssl 1.0.0c - perl scripts are separated to -perl package * Sat Dec 12 2009 Satoshi IWAMOTO 4.2.4p8-1 - new upstream release with security fix (CVE-2009-3563) * Fri Aug 21 2009 Satoshi IWAMOTO 4.2.4p7-3 - add NetworkManager/dispatcher.d/06-ntpd for NM - fix changelog typo... * Wed May 20 2009 Satoshi IWAMOTO 4.2.4p7-2 - turn on daemon restart message * Wed May 20 2009 Satoshi IWAMOTO 4.2.4p7-1 - new upstream release with security fix (CVE-2009-0159,1252) - drop pacth100 (included in new release) - update patch5 to fit p7 release * Mon Apr 27 2009 Satoshi IWAMOTO 4.2.4p6-2 - add patch100 for fix CVE-2009-0159 (ntpq) - run autoreconf instead of autoconf * Sun Jan 11 2009 Satoshi IWAMOTO 4.2.4p6-1 - new upstream release with security fix (CVE-2009-0021) * Mon Apr 28 2008 Ryoichi INAGAKI 4.2.4p4-1 - new upstream release * Sun Aug 5 2007 Ryoichi INAGAKI 4.2.4p3-0vl2 - rebuilt * Thu Jul 26 2007 Ryoichi INAGAKI 4.2.4p3-0vl1 - new upstream release - updated Patch5 * Mon Nov 20 2006 Daisuke SUZUKI 4.2.0-0vl7 - rebuild for Vine Seed * Mon Nov 20 2006 Daisuke SUZUKI 4.2.0-0vl6 - add Patch5 to skip checking md5.h * Mon Nov 20 2006 MATSUBAYASHI Kohji 4.2.0-0vl5 - rebuilt without libelf-devel (ppc.rpm linked with libelf.so.0) * Fri Aug 18 2006 KAZUKI SHIMURA 4.2.0-0vl4 - rebuild with readline-5.1 - add BuildRequires: openssl-devel, readline-devel * Fri Apr 09 2004 Tomoya TAKA 4.2.0-0vl3 - rebuild with openssl-0.9.7d - add config_crypto.patch for alpha (Patch4) * Wed Mar 3 2004 NISHIMURA Daisuke 4.2.0-0vl2 - ntp.conf (Source1): authenticate command has been disappeared. - ntpd.init (Source3): remove RedHat's firewall-related codes. - remove obsolete patches (Patch0, Patch1) * Mon Feb 16 2004 IWAI, Masaharu 4.2.0-0vl1 - update to 4.2.0 - update ntpd.init (Source3): from Fedora ntp-4.2.0-5 - add ntpd.sysconfig (Source4) - stop patching vsnprintf patch (Patch1) * Mon Sep 1 2003 IWAI, Masaharu 4.1.2-0vl1 - update to 4.1.2 - update URL tag - update vsnprintf.patch (Patch1) * Tue May 06 2003 Tomoya TAKA 4.1.1-0vl2 - rebuild with new toolchain * Fri Mar 01 2002 Toru Sagami 4.1.1-0vl1 - update to 4.1.1 * Tue Sep 04 2001 Jiro Yamada - update to 4.1.0 * Mon Apr 09 2001 akira yamada - new upstream version 4.0.99k23. * Thu Apr 05 2001 akira yamada - fixed buffer overrun (imported from debian). - imported from rawhide. * Mon Mar 5 2001 Preston Brown - allow comments in /etc/ntp/step-tickers file (#28786). - need patch0 (glibc patch) on ia64 too * Tue Feb 13 2001 Florian La Roche - also set prog=ntpd in initscript * Tue Feb 13 2001 Florian La Roche - use "$prog" instead of "$0" for the init script * Thu Feb 8 2001 Preston Brown - i18n-neutral .init script (#26525) * Tue Feb 6 2001 Preston Brown - use gethostbyname on addresses in /etc/ntp.conf for ntptime command (#26250) * Mon Feb 5 2001 Preston Brown - start earlier and stop later (#23530) * Mon Feb 5 2001 Bernhard Rosenkraenzer - i18nize init script (#26078) * Sat Jan 6 2001 Jeff Johnson - typo in ntp.conf (#23173). * Mon Dec 11 2000 Karsten Hopp - rebuilt to fix permissions of /usr/share/doc/ntp-xxx * Thu Nov 2 2000 Jeff Johnson - correct mis-spellings in ntpq.htm (#20007). * Thu Oct 19 2000 Jeff Johnson - add %ghost /etc/ntp/drift (#15222). * Wed Oct 18 2000 Jeff Johnson - comment out default values for keys, warn about starting with -A (#19316). - take out -A from ntpd startup as well. - update to 4.0.99k. * Wed Aug 23 2000 Jeff Johnson - use vsnprintf rather than vsprintf (#16676). * Mon Aug 14 2000 Jeff Johnson - remove Conflicts: so that the installer is happy. * Tue Jul 25 2000 Jeff Johnson - workaround glibc-2.1.90 lossage for now. * Thu Jul 20 2000 Bill Nottingham - move initscript back * Wed Jul 12 2000 Prospector - automatic rebuild * Mon Jun 26 2000 Preston Brown - move and update init script, update post/preun/postun scripts * Wed Jun 21 2000 Preston Brown - noreplace ntp.conf,keys files * Mon Jun 12 2000 Jeff Johnson - Create 4.0.99j package. - FHS packaging.