ntp-vl.spec 12 KB

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