source: projects/specs/trunk/n/ntp/ntp-vl.spec @ 2509

Revision 2509, 11.2 KB checked in by iwamoto, 13 years ago (diff)

ntp: new upstream release with openssl 1.0.0c

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