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

Revision 9627, 13.1 KB checked in by iwamoto, 9 years ago (diff)

ntp: fix -x option

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