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

Revision 9466, 13.6 KB checked in by tomop, 9 years ago (diff)

ntp-4.2.6p5-6

Line 
1%define _bindir %{_prefix}/sbin
2
3Summary: Synchronizes system time using the Network Time Protocol (NTP).
4Summary(ja): Network Time Protocol (NTP) を用いたシステム時刻の同期
5Name: ntp
6Version: 4.2.6p5
7Release: 6%{?_dist_release}
8License: distributable
9Group: System Environment/Daemons
10URL: http://www.ntp.org/
11Source0: ftp://ftp.udel.edu/pub/ntp/ntp4/ntp-%{version}.tar.gz
12Source1: ntp.conf
13Source2: ntp.keys
14Source3: ntpd.init
15Source4: ntpd.sysconfig
16Source5: ntpstat-0.2.tgz
17
18Source100: ntpd-NM-dispatch
19Source999: filter-requires-ntp.sh
20
21# ntpbz #802
22Patch1: ntp-4.2.6p1-sleep.patch
23# add support for dropping root to ntpdate
24Patch2: ntp-4.2.6p4-droproot.patch
25# ntpbz #779
26Patch3: ntp-4.2.6p3-bcast.patch
27# align buffer for control messages
28Patch4: ntp-4.2.6p1-cmsgalign.patch
29# link ntpd with -ffast-math on ia64
30# Patch5: ntp-4.2.6p1-linkfastmath.patch
31# ntpbz #1134
32# Patch6: ntp-4.2.6p5-tentative.patch
33# ntpbz #2294
34Patch6: ntp-4.2.6p5-fipsmd5.patch
35# ntpbz #759
36Patch7: ntp-4.2.6p1-retcode.patch
37# ntpbz #992
38Patch8: ntp-4.2.6p4-rtnetlink.patch
39# fix script used to generate man pages
40# Patch9: ntp-4.2.6p2-html2man.patch
41# ntpbz #898
42Patch10: ntp-4.2.6p4-htmldoc.patch
43# fix precision calculation on fast CPUs
44Patch12: ntp-4.2.4p7-getprecision.patch
45# ntpbz #1408
46Patch13: ntp-4.2.6p1-logdefault.patch
47# add option -m to lock memory
48Patch14: ntp-4.2.6p4-mlock.patch
49# allow -u and -p options to be used twice (#639101)
50Patch15: ntp-4.2.6p2-multiopts.patch
51# ntpbz #1554
52# Patch16: ntp-4.2.6p3-nosyspeer.patch
53# ntpbz #1670
54Patch17: ntp-4.2.6p3-broadcastdelay.patch
55# ntpbz #1671
56Patch18: ntp-4.2.6p5-delaycalib.patch
57# ntpbz #1695
58# Patch19: ntp-4.2.6p5-ntpdaterecv.patch
59
60# handle unknown clock types
61Patch50: ntpstat-0.2-clksrc.patch
62# process first packet in multipacket response
63Patch51: ntpstat-0.2-multipacket.patch
64# use current system variable names
65Patch52: ntpstat-0.2-sysvars.patch
66# print synchronization distance instead of dispersion
67Patch53: ntpstat-0.2-maxerror.patch
68# fix error bit checking
69Patch54: ntpstat-0.2-errorbit.patch
70
71# workaround fix for glibc headers
72Patch60: ntp-4.2.x_MOD_NANO.patch
73
74# security
75# Patch100: ntp-4.2.4_CVE-2009-0159.patch
76Patch100: ntp-4.2.6p5-cve-2014-9293.patch
77Patch110: ntp-4.2.6p5-cve-2014-9294.patch
78Patch120: ntp-4.2.6p3_CVE-2014-9295.patch
79Patch130: ntp-4.2.6p3_CVE-2014-9296.patch
80Patch140: ntp-4.2.6p3-CVE-2014-9297.patch
81Patch150: ntp-4.2.6p5-CVE-2014-9298.patch
82
83Requires(pre): /sbin/chkconfig
84BuildRequires: openssl-devel
85BuildRequires: libedit-devel
86BuildRequires: libcap-devel
87BuildRequires: autoconf
88# ntpstat
89BuildRequires: perl-HTML-Parser
90#Conflicts: xntp3
91Obsoletes: xntp3
92BuildRoot: %{_tmppath}/%{name}-%{version}-root
93
94Packager: iwamoto
95Vendor: Project Vine
96Distribution: Vine Linux
97
98# Working around perl dependency problem
99%define __find_requires %{SOURCE999}
100
101%description
102The Network Time Protocol (NTP) is used to synchronize a computer's
103time with another reference time source.  The ntp package contains
104utilities and daemons which will synchronize your computer's time to
105Coordinated Universal Time (UTC) via the NTP protocol and NTP servers.
106The ntp package includes ntpdate (a program for retrieving the date
107and time from remote machines via a network) and ntpd (a daemon which
108continuously adjusts system time).
109
110Install the ntp package if you need tools for keeping your system's
111time synchronized via the NTP protocol.
112#'
113
114%package perl
115Summary: NTP utilities written in perl
116Summary(ja): perl で記述された NTP ユーティリティ
117Group: Applications/System
118Requires: %{name} = %{version}-%{release}
119
120%description perl
121This package contains perl scripts ntp-wait and ntptrace.
122
123
124%prep
125%setup -q -a 5
126
127%patch1 -p1 -b .sleep
128%patch2 -p1 -b .droproot
129%patch3 -p1 -b .bcast
130%patch4 -p1 -b .cmsgalign
131%ifarch ia64
132# %patch5 -p1 -b .linkfastmath
133%endif
134# %patch6 -p1 -b .tentative
135%patch6 -p1 -b .fipsmd5
136%patch7 -p1 -b .retcode
137%patch8 -p1 -b .rtnetlink
138# %patch9 -p1 -b .html2man
139%patch10 -p1 -b .htmldoc
140%patch12 -p1 -b .getprecision
141%patch13 -p1 -b .logdefault
142%patch14 -p1 -b .mlock
143%patch15 -p1 -b .multiopts
144# %patch16 -p1 -b .nosyspeer
145%patch17 -p1 -b .broadcastdelay
146%patch18 -p1 -b .delaycalib
147# %patch19 -p1 -b .ntpdaterecv
148
149# set default path to sntp KoD database
150sed -i 's|/var/db/ntp-kod|%{_localstatedir}/lib/ntp/sntp-kod|' sntp/{sntp.1,main.c}
151
152# ntpstat patches
153%patch50 -p1 -b .clksrc
154%patch51 -p1 -b .multipacket
155%patch52 -p1 -b .sysvars
156%patch53 -p1 -b .maxerror
157%patch54 -p1 -b .errorbit
158
159%patch60 -p0 -b .NANO
160
161# security
162%patch100 -p1 -b .cve-2014-9293
163%patch110 -p1 -b .cve-2014-9294
164%patch120 -p1 -b .CVE-2014-9295
165%patch130 -p1 -b .CVE-2014-9296
166%patch140 -p1 -b .CVE-2014-9297
167%patch150 -p1 -b .CVE-2014-9298
168
169%build
170# autoconf
171autoreconf -vfi
172
173# XXX work around for anal ntp configure
174# %define       _target_platform        %{nil}
175# %configure
176# CFLAGS="-g -DDEBUG" ./configure --prefix=/usr
177
178CFLAGS="-g" ./configure         \
179             --prefix=/usr      \
180             --with-openssl-libdir=%{_libdir}
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* Mon Mar 23 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.2.6p5-6
279- replaced readline with libedit (NTPL conflicts GPL).
280
281* Sun Mar 22 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 4.2.6p5-5
282- rebuilt with readline 6.3
283- fixed location of Vendor/Distribution/Packager tag
284  (to avoid inclusion in %%description perl)
285
286* Fri Feb 27 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 4.2.6p5-4
287- added patch140 and 150 from Vine Linux/6
288  * Mon Feb  9 2015 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.2.6p3-5
289  - add patch140 for fix CVE-2014-9297 (length value in extension fields)
290  - add patch150 for fix CVE-2014-9298 (bypass ACLs based on IPv6)
291    these patches based from debian wheezy, thanks.
292 
293* Fri Feb  6 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 4.2.6p5-3
294- added patch100-130 from Vine Linux/6
295  * Sun Dec 21 2014 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.2.6p3-4
296  - add Patch100-130 for fix CVE-2014-9293,4,5,6
297    these patches are from rhel6, thanks.
298  * Sat Dec 13 2014 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.2.6p3-3
299  - update default ntp.conf
300  - remove "noreplace" of ntp.conf in files section
301- added Japanese summary
302 
303* Sat Nov  3 2012 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.2.6p5-1
304- new upstream release
305- update patches from fc18
306- fix changelog typo....
307
308* Sun Jan 16 2011 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.2.6p3-2
309- add config options to use openssl libs, readline libs
310- add BR: libcap-devel, perl-HTML-Parser (Thanks to Take-san)
311
312* Sat Jan 15 2011 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.2.6p3-1
313- new upstream release
314- built with openssl 1.0.0c
315- perl scripts are separated to -perl package
316
317* Sat Dec 12 2009 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.2.4p8-1
318- new upstream release with security fix (CVE-2009-3563)
319
320* Fri Aug 21 2009 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.2.4p7-3
321- add NetworkManager/dispatcher.d/06-ntpd for NM
322- fix changelog typo...
323
324* Wed May 20 2009 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.2.4p7-2
325- turn on daemon restart message
326
327* Wed May 20 2009 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.2.4p7-1
328- new upstream release with security fix (CVE-2009-0159,1252)
329- drop pacth100 (included in new release)
330- update patch5 to fit p7 release
331
332* Mon Apr 27 2009 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.2.4p6-2
333- add patch100 for fix CVE-2009-0159 (ntpq)
334- run autoreconf instead of autoconf
335
336* Sun Jan 11 2009 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.2.4p6-1
337- new upstream release with security fix (CVE-2009-0021)
338
339* Mon Apr 28 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.2.4p4-1
340- new upstream release
341
342* Sun Aug  5 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.2.4p3-0vl2
343- rebuilt
344
345* Thu Jul 26 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.2.4p3-0vl1
346- new upstream release
347- updated Patch5
348
349* Mon Nov 20 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 4.2.0-0vl7
350- rebuild for Vine Seed
351
352* Mon Nov 20 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 4.2.0-0vl6
353- add Patch5 to skip checking md5.h
354
355* Mon Nov 20 2006 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 4.2.0-0vl5
356- rebuilt without libelf-devel (ppc.rpm linked with libelf.so.0)
357
358* Fri Aug 18 2006 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 4.2.0-0vl4
359- rebuild with readline-5.1
360- add BuildRequires: openssl-devel, readline-devel
361
362* Fri Apr 09 2004 Tomoya TAKA <taka@vinelinux.org> 4.2.0-0vl3
363- rebuild with openssl-0.9.7d
364- add config_crypto.patch for alpha (Patch4)
365
366* Wed Mar  3 2004 NISHIMURA Daisuke <nishi@graco.c.u-tokyo.ac.jp> 4.2.0-0vl2
367- ntp.conf (Source1): authenticate command has been disappeared.
368- ntpd.init (Source3): remove RedHat's firewall-related codes.
369- remove obsolete patches (Patch0, Patch1)
370
371* Mon Feb 16 2004 IWAI, Masaharu <iwai@alib.jp> 4.2.0-0vl1
372- update to 4.2.0
373- update ntpd.init (Source3): from Fedora ntp-4.2.0-5
374- add ntpd.sysconfig (Source4)
375- stop patching vsnprintf patch (Patch1)
376
377* Mon Sep  1 2003 IWAI, Masaharu <iwai@alib.jp> 4.1.2-0vl1
378- update to 4.1.2
379- update URL tag
380- update vsnprintf.patch (Patch1)
381
382* Tue May 06 2003 Tomoya TAKA <taka@vinelinux.org> 4.1.1-0vl2
383- rebuild with new toolchain
384
385* Fri Mar 01 2002 Toru Sagami <sagami@vinelinux.org> 4.1.1-0vl1
386- update to 4.1.1
387
388* Tue Sep 04 2001 Jiro Yamada <jiro@fd.catv.ne.jp>
389- update to 4.1.0
390
391* Mon Apr 09 2001 akira yamada <akira@vinelinux.org>
392- new upstream version 4.0.99k23.
393
394* Thu Apr 05 2001 akira yamada <akira@vinelinux.org>
395- fixed buffer overrun (imported from debian).
396- imported from rawhide.
397
398* Mon Mar  5 2001 Preston Brown <pbrown@redhat.com>
399- allow comments in /etc/ntp/step-tickers file (#28786).
400- need patch0 (glibc patch) on ia64 too
401
402* Tue Feb 13 2001 Florian La Roche <Florian.LaRoche@redhat.de>
403- also set prog=ntpd in initscript
404
405* Tue Feb 13 2001 Florian La Roche <Florian.LaRoche@redhat.de>
406- use "$prog" instead of "$0" for the init script
407
408* Thu Feb  8 2001 Preston Brown <pbrown@redhat.com>
409- i18n-neutral .init script (#26525)
410
411* Tue Feb  6 2001 Preston Brown <pbrown@redhat.com>
412- use gethostbyname on addresses in /etc/ntp.conf for ntptime command (#26250)
413
414* Mon Feb  5 2001 Preston Brown <pbrown@redhat.com>
415- start earlier and stop later (#23530)
416
417* Mon Feb  5 2001 Bernhard Rosenkraenzer <bero@redhat.com>
418- i18nize init script (#26078)
419
420* Sat Jan  6 2001 Jeff Johnson <jbj@redhat.com>
421- typo in ntp.conf (#23173).
422
423* Mon Dec 11 2000 Karsten Hopp <karsten@redhat.de>
424- rebuilt to fix permissions of /usr/share/doc/ntp-xxx
425
426* Thu Nov  2 2000 Jeff Johnson <jbj@redhat.com>
427- correct mis-spellings in ntpq.htm (#20007).
428
429* Thu Oct 19 2000 Jeff Johnson <jbj@redhat.com>
430- add %ghost /etc/ntp/drift (#15222).
431
432* Wed Oct 18 2000 Jeff Johnson <jbj@redhat.com>
433- comment out default values for keys, warn about starting with -A (#19316).
434- take out -A from ntpd startup as well.
435- update to 4.0.99k.
436
437* Wed Aug 23 2000 Jeff Johnson <jbj@redhat.com>
438- use vsnprintf rather than vsprintf (#16676).
439
440* Mon Aug 14 2000 Jeff Johnson <jbj@redhat.com>
441- remove Conflicts: so that the installer is happy.
442
443* Tue Jul 25 2000 Jeff Johnson <jbj@redhat.com>
444- workaround glibc-2.1.90 lossage for now.
445
446* Thu Jul 20 2000 Bill Nottingham <notting@redhat.com>
447- move initscript back
448
449* Wed Jul 12 2000 Prospector <bugzilla@redhat.com>
450- automatic rebuild
451
452* Mon Jun 26 2000 Preston Brown <pbrown@redhat.com>
453- move and update init script, update post/preun/postun scripts
454
455* Wed Jun 21 2000 Preston Brown <pbrown@redhat.com>
456- noreplace ntp.conf,keys files
457
458* Mon Jun 12 2000 Jeff Johnson <jbj@redhat.com>
459- Create 4.0.99j package.
460- FHS packaging.
Note: See TracBrowser for help on using the repository browser.