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

Revision 7061, 11.9 KB checked in by iwamoto, 12 years ago (diff)

update: ntp

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