ntp-vl.spec 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442
  1. %define _bindir %{_prefix}/sbin
  2. Summary: Synchronizes system time using the Network Time Protocol (NTP).
  3. Summary(ja): Network Time Protocol (NTP) を用いたシステム時刻の同期
  4. Name: ntp
  5. Version: 4.2.6p5
  6. Release: 3%{?_dist_release}
  7. License: distributable
  8. Group: System Environment/Daemons
  9. URL: http://www.ntp.org/
  10. Source0: ftp://ftp.udel.edu/pub/ntp/ntp4/ntp-%{version}.tar.gz
  11. Source1: ntp.conf
  12. Source2: ntp.keys
  13. Source3: ntpd.init
  14. Source4: ntpd.sysconfig
  15. Source5: ntpstat-0.2.tgz
  16. Source100: ntpd-NM-dispatch
  17. Source999: filter-requires-ntp.sh
  18. # ntpbz #802
  19. Patch1: ntp-4.2.6p1-sleep.patch
  20. # add support for dropping root to ntpdate
  21. Patch2: ntp-4.2.6p4-droproot.patch
  22. # ntpbz #779
  23. Patch3: ntp-4.2.6p3-bcast.patch
  24. # align buffer for control messages
  25. Patch4: ntp-4.2.6p1-cmsgalign.patch
  26. # link ntpd with -ffast-math on ia64
  27. # Patch5: ntp-4.2.6p1-linkfastmath.patch
  28. # ntpbz #1134
  29. # Patch6: ntp-4.2.6p5-tentative.patch
  30. # ntpbz #2294
  31. Patch6: ntp-4.2.6p5-fipsmd5.patch
  32. # ntpbz #759
  33. Patch7: ntp-4.2.6p1-retcode.patch
  34. # ntpbz #992
  35. Patch8: ntp-4.2.6p4-rtnetlink.patch
  36. # fix script used to generate man pages
  37. # Patch9: ntp-4.2.6p2-html2man.patch
  38. # ntpbz #898
  39. Patch10: ntp-4.2.6p4-htmldoc.patch
  40. # fix precision calculation on fast CPUs
  41. Patch12: ntp-4.2.4p7-getprecision.patch
  42. # ntpbz #1408
  43. Patch13: ntp-4.2.6p1-logdefault.patch
  44. # add option -m to lock memory
  45. Patch14: ntp-4.2.6p4-mlock.patch
  46. # allow -u and -p options to be used twice (#639101)
  47. Patch15: ntp-4.2.6p2-multiopts.patch
  48. # ntpbz #1554
  49. # Patch16: ntp-4.2.6p3-nosyspeer.patch
  50. # ntpbz #1670
  51. Patch17: ntp-4.2.6p3-broadcastdelay.patch
  52. # ntpbz #1671
  53. Patch18: ntp-4.2.6p5-delaycalib.patch
  54. # ntpbz #1695
  55. # Patch19: ntp-4.2.6p5-ntpdaterecv.patch
  56. # handle unknown clock types
  57. Patch50: ntpstat-0.2-clksrc.patch
  58. # process first packet in multipacket response
  59. Patch51: ntpstat-0.2-multipacket.patch
  60. # use current system variable names
  61. Patch52: ntpstat-0.2-sysvars.patch
  62. # print synchronization distance instead of dispersion
  63. Patch53: ntpstat-0.2-maxerror.patch
  64. # fix error bit checking
  65. Patch54: ntpstat-0.2-errorbit.patch
  66. # workaround fix for glibc headers
  67. Patch60: ntp-4.2.x_MOD_NANO.patch
  68. # security
  69. # Patch100: ntp-4.2.4_CVE-2009-0159.patch
  70. Patch100: ntp-4.2.6p5-cve-2014-9293.patch
  71. Patch110: ntp-4.2.6p5-cve-2014-9294.patch
  72. Patch120: ntp-4.2.6p3_CVE-2014-9295.patch
  73. Patch130: ntp-4.2.6p3_CVE-2014-9296.patch
  74. Requires(pre): /sbin/chkconfig
  75. # PreReq: /sbin/chkconfig
  76. BuildRequires: openssl-devel, readline-devel
  77. BuildRequires: libcap-devel
  78. BuildRequires: autoconf
  79. # ntpstat
  80. BuildRequires: perl-HTML-Parser
  81. #Conflicts: xntp3
  82. Obsoletes: xntp3
  83. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  84. # Working around perl dependency problem
  85. %define __find_requires %{SOURCE999}
  86. %description
  87. The Network Time Protocol (NTP) is used to synchronize a computer's
  88. time with another reference time source. The ntp package contains
  89. utilities and daemons which will synchronize your computer's time to
  90. Coordinated Universal Time (UTC) via the NTP protocol and NTP servers.
  91. The ntp package includes ntpdate (a program for retrieving the date
  92. and time from remote machines via a network) and ntpd (a daemon which
  93. continuously adjusts system time).
  94. Install the ntp package if you need tools for keeping your system's
  95. time synchronized via the NTP protocol.
  96. #'
  97. %package perl
  98. Summary: NTP utilities written in perl
  99. Summary(ja): perl で記述された NTP ユーティリティ
  100. Group: Applications/System
  101. Requires: %{name} = %{version}-%{release}
  102. %description perl
  103. This package contains perl scripts ntp-wait and ntptrace.
  104. Packager: iwamoto
  105. Vendor: Project Vine
  106. Distribution: Vine Linux
  107. %prep
  108. %setup -q -a 5
  109. %patch1 -p1 -b .sleep
  110. %patch2 -p1 -b .droproot
  111. %patch3 -p1 -b .bcast
  112. %patch4 -p1 -b .cmsgalign
  113. %ifarch ia64
  114. # %patch5 -p1 -b .linkfastmath
  115. %endif
  116. # %patch6 -p1 -b .tentative
  117. %patch6 -p1 -b .fipsmd5
  118. %patch7 -p1 -b .retcode
  119. %patch8 -p1 -b .rtnetlink
  120. # %patch9 -p1 -b .html2man
  121. %patch10 -p1 -b .htmldoc
  122. %patch12 -p1 -b .getprecision
  123. %patch13 -p1 -b .logdefault
  124. %patch14 -p1 -b .mlock
  125. %patch15 -p1 -b .multiopts
  126. # %patch16 -p1 -b .nosyspeer
  127. %patch17 -p1 -b .broadcastdelay
  128. %patch18 -p1 -b .delaycalib
  129. # %patch19 -p1 -b .ntpdaterecv
  130. # set default path to sntp KoD database
  131. sed -i 's|/var/db/ntp-kod|%{_localstatedir}/lib/ntp/sntp-kod|' sntp/{sntp.1,main.c}
  132. # ntpstat patches
  133. %patch50 -p1 -b .clksrc
  134. %patch51 -p1 -b .multipacket
  135. %patch52 -p1 -b .sysvars
  136. %patch53 -p1 -b .maxerror
  137. %patch54 -p1 -b .errorbit
  138. %patch60 -p0 -b .NANO
  139. # security
  140. # %patch100 -p1 -b .CVE-2009-0159
  141. %patch100 -p1 -b .cve-2014-9293
  142. %patch110 -p1 -b .cve-2014-9294
  143. %patch120 -p1 -b .CVE-2014-9295
  144. %patch130 -p1 -b .CVE-2014-9296
  145. %build
  146. # autoconf
  147. autoreconf -vfi
  148. # XXX work around for anal ntp configure
  149. # %define _target_platform %{nil}
  150. # %configure
  151. # CFLAGS="-g -DDEBUG" ./configure --prefix=/usr
  152. CFLAGS="-g" ./configure \
  153. --prefix=/usr \
  154. --with-openssl-libdir=%{_libdir} \
  155. --with-lineeditlibs=readline
  156. %undefine _target_platform
  157. %__make %{?_smp_mflags}
  158. %__make %{?_smp_mflags} -C ntpstat-0.2 CFLAGS="$CFLAGS"
  159. pushd html
  160. ../scripts/html2man
  161. # remove adjacent blank lines
  162. sed -i 's/^[\t\ ]*$//;/./,/^$/!d' man/man*/*.[58]
  163. popd
  164. %install
  165. rm -rf $RPM_BUILD_ROOT
  166. %makeinstall
  167. { pushd $RPM_BUILD_ROOT
  168. mkdir -p .%{_sysconfdir}/{ntp,rc.d/init.d,sysconfig}
  169. mkdir -p .%{_sysconfdir}/NetworkManager/dispatcher.d
  170. install -m644 $RPM_SOURCE_DIR/ntp.conf .%{_sysconfdir}/ntp.conf
  171. touch .%{_sysconfdir}/ntp/drift
  172. install -m600 $RPM_SOURCE_DIR/ntp.keys .%{_sysconfdir}/ntp/keys
  173. touch .%{_sysconfdir}/ntp/step-tickers
  174. install -m755 $RPM_SOURCE_DIR/ntpd.init .%{_sysconfdir}/rc.d/init.d/ntpd
  175. install -m644 %{SOURCE4} .%{_sysconfdir}/sysconfig/ntpd
  176. install -m755 %{SOURCE100} .%{_sysconfdir}/NetworkManager/dispatcher.d/06-ntpd
  177. strip .%{_bindir}/* || :
  178. popd
  179. }
  180. mkdir -p $RPM_BUILD_ROOT%{_mandir}/man8
  181. pushd html/man/man8
  182. install -m 644 ntp-wait.8 $RPM_BUILD_ROOT%{_mandir}/man8/
  183. install -m 644 ntptrace.8 $RPM_BUILD_ROOT%{_mandir}/man8/
  184. popd
  185. pushd ntpstat-0.2
  186. mkdir -p $RPM_BUILD_ROOT%{_bindir}
  187. install -m 755 ntpstat $RPM_BUILD_ROOT%{_bindir}
  188. install -m 644 ntpstat.1 $RPM_BUILD_ROOT%{_mandir}/man8/ntpstat.8
  189. popd
  190. %clean
  191. rm -rf $RPM_BUILD_ROOT
  192. %post
  193. /sbin/chkconfig --add ntpd
  194. %preun
  195. if [ $1 = 0 ]; then
  196. service ntpd stop > /dev/null 2>&1
  197. /sbin/chkconfig --del ntpd
  198. fi
  199. %postun
  200. if [ "$1" -ge "1" ]; then
  201. # service ntpd condrestart > /dev/null 2>&1
  202. service ntpd condrestart
  203. fi
  204. %files
  205. %defattr(-,root,root)
  206. %doc html/* NEWS TODO
  207. %{_sbindir}/ntp-keygen
  208. %{_sbindir}/ntpd
  209. %{_sbindir}/ntpdate
  210. %{_sbindir}/ntpdc
  211. %{_sbindir}/ntpq
  212. %{_sbindir}/ntpstat
  213. %{_sbindir}/ntptime
  214. %{_sbindir}/sntp
  215. %{_sbindir}/tickadj
  216. %config %{_sysconfdir}/rc.d/init.d/ntpd
  217. # %config(noreplace) %{_sysconfdir}/ntp.conf
  218. %config %{_sysconfdir}/ntp.conf
  219. %dir %{_sysconfdir}/ntp/
  220. %ghost %config(missingok) %{_sysconfdir}/ntp/drift
  221. %config(noreplace) %{_sysconfdir}/ntp/keys
  222. %ghost %config(missingok) %{_sysconfdir}/ntp/step-tickers
  223. %config(noreplace) %{_sysconfdir}/sysconfig/ntpd
  224. %{_sysconfdir}/NetworkManager/dispatcher.d/*
  225. %{_mandir}/man1/*
  226. %{_mandir}/man8/ntpstat*
  227. %files perl
  228. %defattr(-,root,root)
  229. %{_sbindir}/ntp-wait
  230. %{_sbindir}/ntptrace
  231. %{_mandir}/man8/ntp-wait.8*
  232. %{_mandir}/man8/ntptrace.8*
  233. %changelog
  234. * Fri Feb 6 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 4.2.6p5-3
  235. - added patch100-130 from Vine Linux/6
  236. * Sun Dec 21 2014 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.2.6p3-4
  237. - add Patch100-130 for fix CVE-2014-9293,4,5,6
  238. these patches are from rhel6, thanks.
  239. * Sat Dec 13 2014 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.2.6p3-3
  240. - update default ntp.conf
  241. - remove "noreplace" of ntp.conf in files section
  242. - added Japanese summary
  243. * Sat Nov 3 2012 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.2.6p5-1
  244. - new upstream release
  245. - update patches from fc18
  246. - fix changelog typo....
  247. * Sun Jan 16 2011 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.2.6p3-2
  248. - add config options to use openssl libs, readline libs
  249. - add BR: libcap-devel, perl-HTML-Parser (Thanks to Take-san)
  250. * Sat Jan 15 2011 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.2.6p3-1
  251. - new upstream release
  252. - built with openssl 1.0.0c
  253. - perl scripts are separated to -perl package
  254. * Sat Dec 12 2009 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.2.4p8-1
  255. - new upstream release with security fix (CVE-2009-3563)
  256. * Fri Aug 21 2009 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.2.4p7-3
  257. - add NetworkManager/dispatcher.d/06-ntpd for NM
  258. - fix changelog typo...
  259. * Wed May 20 2009 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.2.4p7-2
  260. - turn on daemon restart message
  261. * Wed May 20 2009 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.2.4p7-1
  262. - new upstream release with security fix (CVE-2009-0159,1252)
  263. - drop pacth100 (included in new release)
  264. - update patch5 to fit p7 release
  265. * Mon Apr 27 2009 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.2.4p6-2
  266. - add patch100 for fix CVE-2009-0159 (ntpq)
  267. - run autoreconf instead of autoconf
  268. * Sun Jan 11 2009 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.2.4p6-1
  269. - new upstream release with security fix (CVE-2009-0021)
  270. * Mon Apr 28 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.2.4p4-1
  271. - new upstream release
  272. * Sun Aug 5 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.2.4p3-0vl2
  273. - rebuilt
  274. * Thu Jul 26 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.2.4p3-0vl1
  275. - new upstream release
  276. - updated Patch5
  277. * Mon Nov 20 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 4.2.0-0vl7
  278. - rebuild for Vine Seed
  279. * Mon Nov 20 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 4.2.0-0vl6
  280. - add Patch5 to skip checking md5.h
  281. * Mon Nov 20 2006 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 4.2.0-0vl5
  282. - rebuilt without libelf-devel (ppc.rpm linked with libelf.so.0)
  283. * Fri Aug 18 2006 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 4.2.0-0vl4
  284. - rebuild with readline-5.1
  285. - add BuildRequires: openssl-devel, readline-devel
  286. * Fri Apr 09 2004 Tomoya TAKA <taka@vinelinux.org> 4.2.0-0vl3
  287. - rebuild with openssl-0.9.7d
  288. - add config_crypto.patch for alpha (Patch4)
  289. * Wed Mar 3 2004 NISHIMURA Daisuke <nishi@graco.c.u-tokyo.ac.jp> 4.2.0-0vl2
  290. - ntp.conf (Source1): authenticate command has been disappeared.
  291. - ntpd.init (Source3): remove RedHat's firewall-related codes.
  292. - remove obsolete patches (Patch0, Patch1)
  293. * Mon Feb 16 2004 IWAI, Masaharu <iwai@alib.jp> 4.2.0-0vl1
  294. - update to 4.2.0
  295. - update ntpd.init (Source3): from Fedora ntp-4.2.0-5
  296. - add ntpd.sysconfig (Source4)
  297. - stop patching vsnprintf patch (Patch1)
  298. * Mon Sep 1 2003 IWAI, Masaharu <iwai@alib.jp> 4.1.2-0vl1
  299. - update to 4.1.2
  300. - update URL tag
  301. - update vsnprintf.patch (Patch1)
  302. * Tue May 06 2003 Tomoya TAKA <taka@vinelinux.org> 4.1.1-0vl2
  303. - rebuild with new toolchain
  304. * Fri Mar 01 2002 Toru Sagami <sagami@vinelinux.org> 4.1.1-0vl1
  305. - update to 4.1.1
  306. * Tue Sep 04 2001 Jiro Yamada <jiro@fd.catv.ne.jp>
  307. - update to 4.1.0
  308. * Mon Apr 09 2001 akira yamada <akira@vinelinux.org>
  309. - new upstream version 4.0.99k23.
  310. * Thu Apr 05 2001 akira yamada <akira@vinelinux.org>
  311. - fixed buffer overrun (imported from debian).
  312. - imported from rawhide.
  313. * Mon Mar 5 2001 Preston Brown <pbrown@redhat.com>
  314. - allow comments in /etc/ntp/step-tickers file (#28786).
  315. - need patch0 (glibc patch) on ia64 too
  316. * Tue Feb 13 2001 Florian La Roche <Florian.LaRoche@redhat.de>
  317. - also set prog=ntpd in initscript
  318. * Tue Feb 13 2001 Florian La Roche <Florian.LaRoche@redhat.de>
  319. - use "$prog" instead of "$0" for the init script
  320. * Thu Feb 8 2001 Preston Brown <pbrown@redhat.com>
  321. - i18n-neutral .init script (#26525)
  322. * Tue Feb 6 2001 Preston Brown <pbrown@redhat.com>
  323. - use gethostbyname on addresses in /etc/ntp.conf for ntptime command (#26250)
  324. * Mon Feb 5 2001 Preston Brown <pbrown@redhat.com>
  325. - start earlier and stop later (#23530)
  326. * Mon Feb 5 2001 Bernhard Rosenkraenzer <bero@redhat.com>
  327. - i18nize init script (#26078)
  328. * Sat Jan 6 2001 Jeff Johnson <jbj@redhat.com>
  329. - typo in ntp.conf (#23173).
  330. * Mon Dec 11 2000 Karsten Hopp <karsten@redhat.de>
  331. - rebuilt to fix permissions of /usr/share/doc/ntp-xxx
  332. * Thu Nov 2 2000 Jeff Johnson <jbj@redhat.com>
  333. - correct mis-spellings in ntpq.htm (#20007).
  334. * Thu Oct 19 2000 Jeff Johnson <jbj@redhat.com>
  335. - add %ghost /etc/ntp/drift (#15222).
  336. * Wed Oct 18 2000 Jeff Johnson <jbj@redhat.com>
  337. - comment out default values for keys, warn about starting with -A (#19316).
  338. - take out -A from ntpd startup as well.
  339. - update to 4.0.99k.
  340. * Wed Aug 23 2000 Jeff Johnson <jbj@redhat.com>
  341. - use vsnprintf rather than vsprintf (#16676).
  342. * Mon Aug 14 2000 Jeff Johnson <jbj@redhat.com>
  343. - remove Conflicts: so that the installer is happy.
  344. * Tue Jul 25 2000 Jeff Johnson <jbj@redhat.com>
  345. - workaround glibc-2.1.90 lossage for now.
  346. * Thu Jul 20 2000 Bill Nottingham <notting@redhat.com>
  347. - move initscript back
  348. * Wed Jul 12 2000 Prospector <bugzilla@redhat.com>
  349. - automatic rebuild
  350. * Mon Jun 26 2000 Preston Brown <pbrown@redhat.com>
  351. - move and update init script, update post/preun/postun scripts
  352. * Wed Jun 21 2000 Preston Brown <pbrown@redhat.com>
  353. - noreplace ntp.conf,keys files
  354. * Mon Jun 12 2000 Jeff Johnson <jbj@redhat.com>
  355. - Create 4.0.99j package.
  356. - FHS packaging.