ntp-vl.spec 13 KB

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