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

Revision 9333, 12.8 KB checked in by inagaki, 9 years ago (diff)

2015-02-06 Ryoichi INAGAKI <ryo1@…>

  • bind, ntp, procmail: security fix


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: 3%{?_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
80
81Requires(pre): /sbin/chkconfig
82# PreReq: /sbin/chkconfig
83BuildRequires: openssl-devel, readline-devel
84BuildRequires: libcap-devel
85BuildRequires: autoconf
86# ntpstat
87BuildRequires: perl-HTML-Parser
88#Conflicts: xntp3
89Obsoletes: xntp3
90BuildRoot: %{_tmppath}/%{name}-%{version}-root
91
92# Working around perl dependency problem
93%define __find_requires %{SOURCE999}
94
95%description
96The Network Time Protocol (NTP) is used to synchronize a computer's
97time with another reference time source.  The ntp package contains
98utilities and daemons which will synchronize your computer's time to
99Coordinated Universal Time (UTC) via the NTP protocol and NTP servers.
100The ntp package includes ntpdate (a program for retrieving the date
101and time from remote machines via a network) and ntpd (a daemon which
102continuously adjusts system time).
103
104Install the ntp package if you need tools for keeping your system's
105time synchronized via the NTP protocol.
106#'
107
108%package perl
109Summary: NTP utilities written in perl
110Summary(ja): perl で記述された NTP ユーティリティ
111Group: Applications/System
112Requires: %{name} = %{version}-%{release}
113
114%description perl
115This package contains perl scripts ntp-wait and ntptrace.
116
117Packager: iwamoto
118Vendor: Project Vine
119Distribution: Vine Linux
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%patch6 -p1 -b .fipsmd5
133%patch7 -p1 -b .retcode
134%patch8 -p1 -b .rtnetlink
135# %patch9 -p1 -b .html2man
136%patch10 -p1 -b .htmldoc
137%patch12 -p1 -b .getprecision
138%patch13 -p1 -b .logdefault
139%patch14 -p1 -b .mlock
140%patch15 -p1 -b .multiopts
141# %patch16 -p1 -b .nosyspeer
142%patch17 -p1 -b .broadcastdelay
143%patch18 -p1 -b .delaycalib
144# %patch19 -p1 -b .ntpdaterecv
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%patch54 -p1 -b .errorbit
155
156%patch60 -p0 -b .NANO
157
158# security
159# %patch100 -p1 -b .CVE-2009-0159
160%patch100 -p1 -b .cve-2014-9293
161%patch110 -p1 -b .cve-2014-9294
162%patch120 -p1 -b .CVE-2014-9295
163%patch130 -p1 -b .CVE-2014-9296
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* Fri Feb  6 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 4.2.6p5-3
276- added patch100-130 from Vine Linux/6
277  * Sun Dec 21 2014 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.2.6p3-4
278  - add Patch100-130 for fix CVE-2014-9293,4,5,6
279    these patches are from rhel6, thanks.
280  * Sat Dec 13 2014 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.2.6p3-3
281  - update default ntp.conf
282  - remove "noreplace" of ntp.conf in files section
283- added Japanese summary
284 
285* Sat Nov  3 2012 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.2.6p5-1
286- new upstream release
287- update patches from fc18
288- fix changelog typo....
289
290* Sun Jan 16 2011 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.2.6p3-2
291- add config options to use openssl libs, readline libs
292- add BR: libcap-devel, perl-HTML-Parser (Thanks to Take-san)
293
294* Sat Jan 15 2011 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.2.6p3-1
295- new upstream release
296- built with openssl 1.0.0c
297- perl scripts are separated to -perl package
298
299* Sat Dec 12 2009 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.2.4p8-1
300- new upstream release with security fix (CVE-2009-3563)
301
302* Fri Aug 21 2009 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.2.4p7-3
303- add NetworkManager/dispatcher.d/06-ntpd for NM
304- fix changelog typo...
305
306* Wed May 20 2009 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.2.4p7-2
307- turn on daemon restart message
308
309* Wed May 20 2009 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.2.4p7-1
310- new upstream release with security fix (CVE-2009-0159,1252)
311- drop pacth100 (included in new release)
312- update patch5 to fit p7 release
313
314* Mon Apr 27 2009 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.2.4p6-2
315- add patch100 for fix CVE-2009-0159 (ntpq)
316- run autoreconf instead of autoconf
317
318* Sun Jan 11 2009 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.2.4p6-1
319- new upstream release with security fix (CVE-2009-0021)
320
321* Mon Apr 28 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.2.4p4-1
322- new upstream release
323
324* Sun Aug  5 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.2.4p3-0vl2
325- rebuilt
326
327* Thu Jul 26 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.2.4p3-0vl1
328- new upstream release
329- updated Patch5
330
331* Mon Nov 20 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 4.2.0-0vl7
332- rebuild for Vine Seed
333
334* Mon Nov 20 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 4.2.0-0vl6
335- add Patch5 to skip checking md5.h
336
337* Mon Nov 20 2006 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 4.2.0-0vl5
338- rebuilt without libelf-devel (ppc.rpm linked with libelf.so.0)
339
340* Fri Aug 18 2006 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 4.2.0-0vl4
341- rebuild with readline-5.1
342- add BuildRequires: openssl-devel, readline-devel
343
344* Fri Apr 09 2004 Tomoya TAKA <taka@vinelinux.org> 4.2.0-0vl3
345- rebuild with openssl-0.9.7d
346- add config_crypto.patch for alpha (Patch4)
347
348* Wed Mar  3 2004 NISHIMURA Daisuke <nishi@graco.c.u-tokyo.ac.jp> 4.2.0-0vl2
349- ntp.conf (Source1): authenticate command has been disappeared.
350- ntpd.init (Source3): remove RedHat's firewall-related codes.
351- remove obsolete patches (Patch0, Patch1)
352
353* Mon Feb 16 2004 IWAI, Masaharu <iwai@alib.jp> 4.2.0-0vl1
354- update to 4.2.0
355- update ntpd.init (Source3): from Fedora ntp-4.2.0-5
356- add ntpd.sysconfig (Source4)
357- stop patching vsnprintf patch (Patch1)
358
359* Mon Sep  1 2003 IWAI, Masaharu <iwai@alib.jp> 4.1.2-0vl1
360- update to 4.1.2
361- update URL tag
362- update vsnprintf.patch (Patch1)
363
364* Tue May 06 2003 Tomoya TAKA <taka@vinelinux.org> 4.1.1-0vl2
365- rebuild with new toolchain
366
367* Fri Mar 01 2002 Toru Sagami <sagami@vinelinux.org> 4.1.1-0vl1
368- update to 4.1.1
369
370* Tue Sep 04 2001 Jiro Yamada <jiro@fd.catv.ne.jp>
371- update to 4.1.0
372
373* Mon Apr 09 2001 akira yamada <akira@vinelinux.org>
374- new upstream version 4.0.99k23.
375
376* Thu Apr 05 2001 akira yamada <akira@vinelinux.org>
377- fixed buffer overrun (imported from debian).
378- imported from rawhide.
379
380* Mon Mar  5 2001 Preston Brown <pbrown@redhat.com>
381- allow comments in /etc/ntp/step-tickers file (#28786).
382- need patch0 (glibc patch) on ia64 too
383
384* Tue Feb 13 2001 Florian La Roche <Florian.LaRoche@redhat.de>
385- also set prog=ntpd in initscript
386
387* Tue Feb 13 2001 Florian La Roche <Florian.LaRoche@redhat.de>
388- use "$prog" instead of "$0" for the init script
389
390* Thu Feb  8 2001 Preston Brown <pbrown@redhat.com>
391- i18n-neutral .init script (#26525)
392
393* Tue Feb  6 2001 Preston Brown <pbrown@redhat.com>
394- use gethostbyname on addresses in /etc/ntp.conf for ntptime command (#26250)
395
396* Mon Feb  5 2001 Preston Brown <pbrown@redhat.com>
397- start earlier and stop later (#23530)
398
399* Mon Feb  5 2001 Bernhard Rosenkraenzer <bero@redhat.com>
400- i18nize init script (#26078)
401
402* Sat Jan  6 2001 Jeff Johnson <jbj@redhat.com>
403- typo in ntp.conf (#23173).
404
405* Mon Dec 11 2000 Karsten Hopp <karsten@redhat.de>
406- rebuilt to fix permissions of /usr/share/doc/ntp-xxx
407
408* Thu Nov  2 2000 Jeff Johnson <jbj@redhat.com>
409- correct mis-spellings in ntpq.htm (#20007).
410
411* Thu Oct 19 2000 Jeff Johnson <jbj@redhat.com>
412- add %ghost /etc/ntp/drift (#15222).
413
414* Wed Oct 18 2000 Jeff Johnson <jbj@redhat.com>
415- comment out default values for keys, warn about starting with -A (#19316).
416- take out -A from ntpd startup as well.
417- update to 4.0.99k.
418
419* Wed Aug 23 2000 Jeff Johnson <jbj@redhat.com>
420- use vsnprintf rather than vsprintf (#16676).
421
422* Mon Aug 14 2000 Jeff Johnson <jbj@redhat.com>
423- remove Conflicts: so that the installer is happy.
424
425* Tue Jul 25 2000 Jeff Johnson <jbj@redhat.com>
426- workaround glibc-2.1.90 lossage for now.
427
428* Thu Jul 20 2000 Bill Nottingham <notting@redhat.com>
429- move initscript back
430
431* Wed Jul 12 2000 Prospector <bugzilla@redhat.com>
432- automatic rebuild
433
434* Mon Jun 26 2000 Preston Brown <pbrown@redhat.com>
435- move and update init script, update post/preun/postun scripts
436
437* Wed Jun 21 2000 Preston Brown <pbrown@redhat.com>
438- noreplace ntp.conf,keys files
439
440* Mon Jun 12 2000 Jeff Johnson <jbj@redhat.com>
441- Create 4.0.99j package.
442- FHS packaging.
Note: See TracBrowser for help on using the repository browser.