source: projects/specs/branches/6/n/ntp/ntp-vl.spec @ 2512

Revision 2512, 11.6 KB checked in by iwamoto, 13 years ago (diff)

ntp: add BR: / add config options

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