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

Revision 9172, 12.2 KB checked in by iwamoto, 10 years ago (diff)

ntp: fix CVE-2014-9293,4,5,6

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