ntp-vl.spec 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460
  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: 6%{?_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: libedit-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. %undefine _target_platform
  159. %__make %{?_smp_mflags}
  160. %__make %{?_smp_mflags} -C ntpstat-0.2 CFLAGS="$CFLAGS"
  161. pushd html
  162. ../scripts/html2man
  163. # remove adjacent blank lines
  164. sed -i 's/^[\t\ ]*$//;/./,/^$/!d' man/man*/*.[58]
  165. popd
  166. %install
  167. rm -rf $RPM_BUILD_ROOT
  168. %makeinstall
  169. { pushd $RPM_BUILD_ROOT
  170. mkdir -p .%{_sysconfdir}/{ntp,rc.d/init.d,sysconfig}
  171. mkdir -p .%{_sysconfdir}/NetworkManager/dispatcher.d
  172. install -m644 $RPM_SOURCE_DIR/ntp.conf .%{_sysconfdir}/ntp.conf
  173. touch .%{_sysconfdir}/ntp/drift
  174. install -m600 $RPM_SOURCE_DIR/ntp.keys .%{_sysconfdir}/ntp/keys
  175. touch .%{_sysconfdir}/ntp/step-tickers
  176. install -m755 $RPM_SOURCE_DIR/ntpd.init .%{_sysconfdir}/rc.d/init.d/ntpd
  177. install -m644 %{SOURCE4} .%{_sysconfdir}/sysconfig/ntpd
  178. install -m755 %{SOURCE100} .%{_sysconfdir}/NetworkManager/dispatcher.d/06-ntpd
  179. strip .%{_bindir}/* || :
  180. popd
  181. }
  182. mkdir -p $RPM_BUILD_ROOT%{_mandir}/man8
  183. pushd html/man/man8
  184. install -m 644 ntp-wait.8 $RPM_BUILD_ROOT%{_mandir}/man8/
  185. install -m 644 ntptrace.8 $RPM_BUILD_ROOT%{_mandir}/man8/
  186. popd
  187. pushd ntpstat-0.2
  188. mkdir -p $RPM_BUILD_ROOT%{_bindir}
  189. install -m 755 ntpstat $RPM_BUILD_ROOT%{_bindir}
  190. install -m 644 ntpstat.1 $RPM_BUILD_ROOT%{_mandir}/man8/ntpstat.8
  191. popd
  192. %clean
  193. rm -rf $RPM_BUILD_ROOT
  194. %post
  195. /sbin/chkconfig --add ntpd
  196. %preun
  197. if [ $1 = 0 ]; then
  198. service ntpd stop > /dev/null 2>&1
  199. /sbin/chkconfig --del ntpd
  200. fi
  201. %postun
  202. if [ "$1" -ge "1" ]; then
  203. # service ntpd condrestart > /dev/null 2>&1
  204. service ntpd condrestart
  205. fi
  206. %files
  207. %defattr(-,root,root)
  208. %doc html/* NEWS TODO
  209. %{_sbindir}/ntp-keygen
  210. %{_sbindir}/ntpd
  211. %{_sbindir}/ntpdate
  212. %{_sbindir}/ntpdc
  213. %{_sbindir}/ntpq
  214. %{_sbindir}/ntpstat
  215. %{_sbindir}/ntptime
  216. %{_sbindir}/sntp
  217. %{_sbindir}/tickadj
  218. %config %{_sysconfdir}/rc.d/init.d/ntpd
  219. # %config(noreplace) %{_sysconfdir}/ntp.conf
  220. %config %{_sysconfdir}/ntp.conf
  221. %dir %{_sysconfdir}/ntp/
  222. %ghost %config(missingok) %{_sysconfdir}/ntp/drift
  223. %config(noreplace) %{_sysconfdir}/ntp/keys
  224. %ghost %config(missingok) %{_sysconfdir}/ntp/step-tickers
  225. %config(noreplace) %{_sysconfdir}/sysconfig/ntpd
  226. %{_sysconfdir}/NetworkManager/dispatcher.d/*
  227. %{_mandir}/man1/*
  228. %{_mandir}/man8/ntpstat*
  229. %files perl
  230. %defattr(-,root,root)
  231. %{_sbindir}/ntp-wait
  232. %{_sbindir}/ntptrace
  233. %{_mandir}/man8/ntp-wait.8*
  234. %{_mandir}/man8/ntptrace.8*
  235. %changelog
  236. * Mon Mar 23 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.2.6p5-6
  237. - replaced readline with libedit (NTPL conflicts GPL).
  238. * Sun Mar 22 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 4.2.6p5-5
  239. - rebuilt with readline 6.3
  240. - fixed location of Vendor/Distribution/Packager tag
  241. (to avoid inclusion in %%description perl)
  242. * Fri Feb 27 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 4.2.6p5-4
  243. - added patch140 and 150 from Vine Linux/6
  244. * Mon Feb 9 2015 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.2.6p3-5
  245. - add patch140 for fix CVE-2014-9297 (length value in extension fields)
  246. - add patch150 for fix CVE-2014-9298 (bypass ACLs based on IPv6)
  247. these patches based from debian wheezy, thanks.
  248. * Fri Feb 6 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 4.2.6p5-3
  249. - added patch100-130 from Vine Linux/6
  250. * Sun Dec 21 2014 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.2.6p3-4
  251. - add Patch100-130 for fix CVE-2014-9293,4,5,6
  252. these patches are from rhel6, thanks.
  253. * Sat Dec 13 2014 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.2.6p3-3
  254. - update default ntp.conf
  255. - remove "noreplace" of ntp.conf in files section
  256. - added Japanese summary
  257. * Sat Nov 3 2012 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.2.6p5-1
  258. - new upstream release
  259. - update patches from fc18
  260. - fix changelog typo....
  261. * Sun Jan 16 2011 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.2.6p3-2
  262. - add config options to use openssl libs, readline libs
  263. - add BR: libcap-devel, perl-HTML-Parser (Thanks to Take-san)
  264. * Sat Jan 15 2011 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.2.6p3-1
  265. - new upstream release
  266. - built with openssl 1.0.0c
  267. - perl scripts are separated to -perl package
  268. * Sat Dec 12 2009 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.2.4p8-1
  269. - new upstream release with security fix (CVE-2009-3563)
  270. * Fri Aug 21 2009 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.2.4p7-3
  271. - add NetworkManager/dispatcher.d/06-ntpd for NM
  272. - fix changelog typo...
  273. * Wed May 20 2009 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.2.4p7-2
  274. - turn on daemon restart message
  275. * Wed May 20 2009 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.2.4p7-1
  276. - new upstream release with security fix (CVE-2009-0159,1252)
  277. - drop pacth100 (included in new release)
  278. - update patch5 to fit p7 release
  279. * Mon Apr 27 2009 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.2.4p6-2
  280. - add patch100 for fix CVE-2009-0159 (ntpq)
  281. - run autoreconf instead of autoconf
  282. * Sun Jan 11 2009 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.2.4p6-1
  283. - new upstream release with security fix (CVE-2009-0021)
  284. * Mon Apr 28 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.2.4p4-1
  285. - new upstream release
  286. * Sun Aug 5 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.2.4p3-0vl2
  287. - rebuilt
  288. * Thu Jul 26 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.2.4p3-0vl1
  289. - new upstream release
  290. - updated Patch5
  291. * Mon Nov 20 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 4.2.0-0vl7
  292. - rebuild for Vine Seed
  293. * Mon Nov 20 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 4.2.0-0vl6
  294. - add Patch5 to skip checking md5.h
  295. * Mon Nov 20 2006 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 4.2.0-0vl5
  296. - rebuilt without libelf-devel (ppc.rpm linked with libelf.so.0)
  297. * Fri Aug 18 2006 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 4.2.0-0vl4
  298. - rebuild with readline-5.1
  299. - add BuildRequires: openssl-devel, readline-devel
  300. * Fri Apr 09 2004 Tomoya TAKA <taka@vinelinux.org> 4.2.0-0vl3
  301. - rebuild with openssl-0.9.7d
  302. - add config_crypto.patch for alpha (Patch4)
  303. * Wed Mar 3 2004 NISHIMURA Daisuke <nishi@graco.c.u-tokyo.ac.jp> 4.2.0-0vl2
  304. - ntp.conf (Source1): authenticate command has been disappeared.
  305. - ntpd.init (Source3): remove RedHat's firewall-related codes.
  306. - remove obsolete patches (Patch0, Patch1)
  307. * Mon Feb 16 2004 IWAI, Masaharu <iwai@alib.jp> 4.2.0-0vl1
  308. - update to 4.2.0
  309. - update ntpd.init (Source3): from Fedora ntp-4.2.0-5
  310. - add ntpd.sysconfig (Source4)
  311. - stop patching vsnprintf patch (Patch1)
  312. * Mon Sep 1 2003 IWAI, Masaharu <iwai@alib.jp> 4.1.2-0vl1
  313. - update to 4.1.2
  314. - update URL tag
  315. - update vsnprintf.patch (Patch1)
  316. * Tue May 06 2003 Tomoya TAKA <taka@vinelinux.org> 4.1.1-0vl2
  317. - rebuild with new toolchain
  318. * Fri Mar 01 2002 Toru Sagami <sagami@vinelinux.org> 4.1.1-0vl1
  319. - update to 4.1.1
  320. * Tue Sep 04 2001 Jiro Yamada <jiro@fd.catv.ne.jp>
  321. - update to 4.1.0
  322. * Mon Apr 09 2001 akira yamada <akira@vinelinux.org>
  323. - new upstream version 4.0.99k23.
  324. * Thu Apr 05 2001 akira yamada <akira@vinelinux.org>
  325. - fixed buffer overrun (imported from debian).
  326. - imported from rawhide.
  327. * Mon Mar 5 2001 Preston Brown <pbrown@redhat.com>
  328. - allow comments in /etc/ntp/step-tickers file (#28786).
  329. - need patch0 (glibc patch) on ia64 too
  330. * Tue Feb 13 2001 Florian La Roche <Florian.LaRoche@redhat.de>
  331. - also set prog=ntpd in initscript
  332. * Tue Feb 13 2001 Florian La Roche <Florian.LaRoche@redhat.de>
  333. - use "$prog" instead of "$0" for the init script
  334. * Thu Feb 8 2001 Preston Brown <pbrown@redhat.com>
  335. - i18n-neutral .init script (#26525)
  336. * Tue Feb 6 2001 Preston Brown <pbrown@redhat.com>
  337. - use gethostbyname on addresses in /etc/ntp.conf for ntptime command (#26250)
  338. * Mon Feb 5 2001 Preston Brown <pbrown@redhat.com>
  339. - start earlier and stop later (#23530)
  340. * Mon Feb 5 2001 Bernhard Rosenkraenzer <bero@redhat.com>
  341. - i18nize init script (#26078)
  342. * Sat Jan 6 2001 Jeff Johnson <jbj@redhat.com>
  343. - typo in ntp.conf (#23173).
  344. * Mon Dec 11 2000 Karsten Hopp <karsten@redhat.de>
  345. - rebuilt to fix permissions of /usr/share/doc/ntp-xxx
  346. * Thu Nov 2 2000 Jeff Johnson <jbj@redhat.com>
  347. - correct mis-spellings in ntpq.htm (#20007).
  348. * Thu Oct 19 2000 Jeff Johnson <jbj@redhat.com>
  349. - add %ghost /etc/ntp/drift (#15222).
  350. * Wed Oct 18 2000 Jeff Johnson <jbj@redhat.com>
  351. - comment out default values for keys, warn about starting with -A (#19316).
  352. - take out -A from ntpd startup as well.
  353. - update to 4.0.99k.
  354. * Wed Aug 23 2000 Jeff Johnson <jbj@redhat.com>
  355. - use vsnprintf rather than vsprintf (#16676).
  356. * Mon Aug 14 2000 Jeff Johnson <jbj@redhat.com>
  357. - remove Conflicts: so that the installer is happy.
  358. * Tue Jul 25 2000 Jeff Johnson <jbj@redhat.com>
  359. - workaround glibc-2.1.90 lossage for now.
  360. * Thu Jul 20 2000 Bill Nottingham <notting@redhat.com>
  361. - move initscript back
  362. * Wed Jul 12 2000 Prospector <bugzilla@redhat.com>
  363. - automatic rebuild
  364. * Mon Jun 26 2000 Preston Brown <pbrown@redhat.com>
  365. - move and update init script, update post/preun/postun scripts
  366. * Wed Jun 21 2000 Preston Brown <pbrown@redhat.com>
  367. - noreplace ntp.conf,keys files
  368. * Mon Jun 12 2000 Jeff Johnson <jbj@redhat.com>
  369. - Create 4.0.99j package.
  370. - FHS packaging.