ntp-vl.spec 11 KB

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