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

Revision 9507, 13.0 KB checked in by iwamoto, 9 years ago (diff)

ntp: fix CVE-2015-1798,1799

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