ntp-vl.spec 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270
  1. %define _bindir %{_prefix}/sbin
  2. Summary: Synchronizes system time using the Network Time Protocol (NTP).
  3. Name: ntp
  4. Version: 4.2.4p7
  5. Release: 3%{?_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: ntpd-NM-dispatch
  15. # Don't depend on perl modules
  16. Source999: filter-requires-ntp.sh
  17. #Patch0: ntp-4.0.99j-glibc22.patch
  18. #Patch1: ntp-4.1.2-vsnprintf.patch
  19. Patch3: ntp-4.0.99k23-usegethost.patch
  20. Patch4: ntp-4.2.0-config_crypto.patch
  21. Patch5: ntp-4.2.4p7-md5.patch
  22. # security
  23. # Patch100: ntp-4.2.4_CVE-2009-0159.patch
  24. PreReq: /sbin/chkconfig
  25. BuildRequires: openssl-devel, readline-devel
  26. BuildRequires: autoconf
  27. #Conflicts: xntp3
  28. Obsoletes: xntp3
  29. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  30. # Working around perl dependency problem
  31. %define __find_requires %{SOURCE999}
  32. %description
  33. The Network Time Protocol (NTP) is used to synchronize a computer's
  34. time with another reference time source. The ntp package contains
  35. utilities and daemons which will synchronize your computer's time to
  36. Coordinated Universal Time (UTC) via the NTP protocol and NTP servers.
  37. The ntp package includes ntpdate (a program for retrieving the date
  38. and time from remote machines via a network) and ntpd (a daemon which
  39. continuously adjusts system time).
  40. Install the ntp package if you need tools for keeping your system's
  41. time synchronized via the NTP protocol.
  42. #'
  43. %prep
  44. %setup -q
  45. #%patch1 -p1 -b .vsnprintf
  46. %patch3 -p1 -b .usegethost
  47. %ifarch alpha
  48. %patch4 -p1 -b .config_crypto
  49. %endif
  50. %patch5 -p1 -b .nomd5
  51. # security
  52. # %patch100 -p1 -b .CVE-2009-0159
  53. %build
  54. # autoconf
  55. autoreconf -vfi
  56. # XXX work around for anal ntp configure
  57. %define _target_platform %{nil}
  58. #%configure
  59. CFLAGS="-g -DDEBUG" ./configure --prefix=/usr
  60. %undefine _target_platform
  61. %__make %{?_smp_mflags}
  62. %install
  63. rm -rf $RPM_BUILD_ROOT
  64. %makeinstall
  65. { cd $RPM_BUILD_ROOT
  66. mkdir -p .%{_sysconfdir}/{ntp,rc.d/init.d,sysconfig}
  67. mkdir -p .%{_sysconfdir}/NetworkManager/dispatcher.d
  68. install -m644 $RPM_SOURCE_DIR/ntp.conf .%{_sysconfdir}/ntp.conf
  69. touch .%{_sysconfdir}/ntp/drift
  70. install -m600 $RPM_SOURCE_DIR/ntp.keys .%{_sysconfdir}/ntp/keys
  71. touch .%{_sysconfdir}/ntp/step-tickers
  72. install -m755 $RPM_SOURCE_DIR/ntpd.init .%{_sysconfdir}/rc.d/init.d/ntpd
  73. install -m644 %{SOURCE4} .%{_sysconfdir}/sysconfig/ntpd
  74. install -m755 %{SOURCE5} .%{_sysconfdir}/NetworkManager/dispatcher.d/06-ntpd
  75. strip .%{_bindir}/* || :
  76. }
  77. %clean
  78. rm -rf $RPM_BUILD_ROOT
  79. %post
  80. /sbin/chkconfig --add ntpd
  81. %preun
  82. if [ $1 = 0 ]; then
  83. service ntpd stop > /dev/null 2>&1
  84. /sbin/chkconfig --del ntpd
  85. fi
  86. %postun
  87. if [ "$1" -ge "1" ]; then
  88. # service ntpd condrestart > /dev/null 2>&1
  89. service ntpd condrestart
  90. fi
  91. %files
  92. %defattr(-,root,root)
  93. %doc html/* NEWS TODO
  94. %{_bindir}/*
  95. %config %{_sysconfdir}/rc.d/init.d/ntpd
  96. %config(noreplace) %{_sysconfdir}/ntp.conf
  97. %dir %{_sysconfdir}/ntp/
  98. %ghost %config(missingok) %{_sysconfdir}/ntp/drift
  99. %config(noreplace) %{_sysconfdir}/ntp/keys
  100. %ghost %config(missingok) %{_sysconfdir}/ntp/step-tickers
  101. %config(noreplace) %{_sysconfdir}/sysconfig/ntpd
  102. %{_sysconfdir}/NetworkManager/dispatcher.d/*
  103. %{_mandir}/man1/*
  104. %changelog
  105. * Fri Aug 21 2009 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.2.4p7-3
  106. - add NetworkManager/dispatcher.d/06-ntpd for NM
  107. - fix changelog typo...
  108. * Wed May 20 2009 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.2.4p7-2
  109. - turn on daemon restart message
  110. * Wed May 20 2009 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.2.4p7-1
  111. - new upstream release with security fix (CVE-2009-0159,1252)
  112. - drop pacth100 (included in new release)
  113. - update patch5 to fit p7 release
  114. * Mon Apr 27 2009 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.2.4p6-2
  115. - add patch100 for fix CVE-2009-0159 (ntpq)
  116. - run autoreconf instead of autoconf
  117. * Sun Jan 11 2009 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.2.4p6-1
  118. - new upstream release with security fix (CVE-2009-0021)
  119. * Mon Apr 28 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.2.4p4-1
  120. - new upstream release
  121. * Sun Aug 5 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.2.4p3-0vl2
  122. - rebuilt
  123. * Thu Jul 26 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.2.4p3-0vl1
  124. - new upstream release
  125. - updated Patch5
  126. * Mon Nov 20 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 4.2.0-0vl7
  127. - rebuild for Vine Seed
  128. * Mon Nov 20 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 4.2.0-0vl6
  129. - add Patch5 to skip checking md5.h
  130. * Mon Nov 20 2006 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 4.2.0-0vl5
  131. - rebuilt without libelf-devel (ppc.rpm linked with libelf.so.0)
  132. * Fri Aug 18 2006 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 4.2.0-0vl4
  133. - rebuild with readline-5.1
  134. - add BuildRequires: openssl-devel, readline-devel
  135. * Fri Apr 09 2004 Tomoya TAKA <taka@vinelinux.org> 4.2.0-0vl3
  136. - rebuild with openssl-0.9.7d
  137. - add config_crypto.patch for alpha (Patch4)
  138. * Wed Mar 3 2004 NISHIMURA Daisuke <nishi@graco.c.u-tokyo.ac.jp> 4.2.0-0vl2
  139. - ntp.conf (Source1): authenticate command has been disappeared.
  140. - ntpd.init (Source3): remove RedHat's firewall-related codes.
  141. - remove obsolete patches (Patch0, Patch1)
  142. * Mon Feb 16 2004 IWAI, Masaharu <iwai@alib.jp> 4.2.0-0vl1
  143. - update to 4.2.0
  144. - update ntpd.init (Source3): from Fedora ntp-4.2.0-5
  145. - add ntpd.sysconfig (Source4)
  146. - stop patching vsnprintf patch (Patch1)
  147. * Mon Sep 1 2003 IWAI, Masaharu <iwai@alib.jp> 4.1.2-0vl1
  148. - update to 4.1.2
  149. - update URL tag
  150. - update vsnprintf.patch (Patch1)
  151. * Tue May 06 2003 Tomoya TAKA <taka@vinelinux.org> 4.1.1-0vl2
  152. - rebuild with new toolchain
  153. * Fri Mar 01 2002 Toru Sagami <sagami@vinelinux.org> 4.1.1-0vl1
  154. - update to 4.1.1
  155. * Tue Sep 04 2001 Jiro Yamada <jiro@fd.catv.ne.jp>
  156. - update to 4.1.0
  157. * Mon Apr 09 2001 akira yamada <akira@vinelinux.org>
  158. - new upstream version 4.0.99k23.
  159. * Thu Apr 05 2001 akira yamada <akira@vinelinux.org>
  160. - fixed buffer overrun (imported from debian).
  161. - imported from rawhide.
  162. * Mon Mar 5 2001 Preston Brown <pbrown@redhat.com>
  163. - allow comments in /etc/ntp/step-tickers file (#28786).
  164. - need patch0 (glibc patch) on ia64 too
  165. * Tue Feb 13 2001 Florian La Roche <Florian.LaRoche@redhat.de>
  166. - also set prog=ntpd in initscript
  167. * Tue Feb 13 2001 Florian La Roche <Florian.LaRoche@redhat.de>
  168. - use "$prog" instead of "$0" for the init script
  169. * Thu Feb 8 2001 Preston Brown <pbrown@redhat.com>
  170. - i18n-neutral .init script (#26525)
  171. * Tue Feb 6 2001 Preston Brown <pbrown@redhat.com>
  172. - use gethostbyname on addresses in /etc/ntp.conf for ntptime command (#26250)
  173. * Mon Feb 5 2001 Preston Brown <pbrown@redhat.com>
  174. - start earlier and stop later (#23530)
  175. * Mon Feb 5 2001 Bernhard Rosenkraenzer <bero@redhat.com>
  176. - i18nize init script (#26078)
  177. * Sat Jan 6 2001 Jeff Johnson <jbj@redhat.com>
  178. - typo in ntp.conf (#23173).
  179. * Mon Dec 11 2000 Karsten Hopp <karsten@redhat.de>
  180. - rebuilt to fix permissions of /usr/share/doc/ntp-xxx
  181. * Thu Nov 2 2000 Jeff Johnson <jbj@redhat.com>
  182. - correct mis-spellings in ntpq.htm (#20007).
  183. * Thu Oct 19 2000 Jeff Johnson <jbj@redhat.com>
  184. - add %ghost /etc/ntp/drift (#15222).
  185. * Wed Oct 18 2000 Jeff Johnson <jbj@redhat.com>
  186. - comment out default values for keys, warn about starting with -A (#19316).
  187. - take out -A from ntpd startup as well.
  188. - update to 4.0.99k.
  189. * Wed Aug 23 2000 Jeff Johnson <jbj@redhat.com>
  190. - use vsnprintf rather than vsprintf (#16676).
  191. * Mon Aug 14 2000 Jeff Johnson <jbj@redhat.com>
  192. - remove Conflicts: so that the installer is happy.
  193. * Tue Jul 25 2000 Jeff Johnson <jbj@redhat.com>
  194. - workaround glibc-2.1.90 lossage for now.
  195. * Thu Jul 20 2000 Bill Nottingham <notting@redhat.com>
  196. - move initscript back
  197. * Wed Jul 12 2000 Prospector <bugzilla@redhat.com>
  198. - automatic rebuild
  199. * Mon Jun 26 2000 Preston Brown <pbrown@redhat.com>
  200. - move and update init script, update post/preun/postun scripts
  201. * Wed Jun 21 2000 Preston Brown <pbrown@redhat.com>
  202. - noreplace ntp.conf,keys files
  203. * Mon Jun 12 2000 Jeff Johnson <jbj@redhat.com>
  204. - Create 4.0.99j package.
  205. - FHS packaging.