ntp-vl.spec 12 KB

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