2 # - ntpdseem.1 manual page 'disappeared'
3 # - warning: Installed (but unpackaged) file(s) found:
4 # - package ntpsnmpd - NTP SNMP MIB agent
6 # /usr/share/man/man1/ntpsnmpd.1.gz
8 %include /usr/lib/rpm/macros.perl
9 Summary: Network Time Protocol utilities
10 Summary(pl.UTF-8): Narzędzia do synchronizacji czasu (Network Time Protocol)
11 Summary(pt_BR.UTF-8): Network Time Protocol versão 4
15 License: distributable
16 Group: Networking/Daemons
17 Source0: http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/%{name}-%{version}.tar.gz
18 # Source0-md5: 0510396dfbde40678b92f808ec07c0d2
22 Source4: %{name}.sysconfig
23 Source5: %{name}-client.init
24 Source6: %{name}-client.sysconfig
25 Source7: %{name}-manpages.tar.gz
26 # Source7-md5: 208fcc9019e19ab26d28e4597290bffb
27 Source8: %{name}.upstart
28 Patch0: %{name}-time.patch
29 Patch1: %{name}-no_libelf.patch
30 Patch2: %{name}-ipv6.patch
31 Patch3: %{name}-openssl_check.patch
32 Patch4: %{name}-nano.patch
33 Patch5: %{name}-ntpdc-link_order.patch
35 Patch101: %{name}-4.2.6p1-sleep.patch
36 Patch102: %{name}-4.2.6p1-droproot.patch
37 Patch103: %{name}-4.2.6p1-bcast.patch
38 Patch104: %{name}-4.2.6p1-cmsgalign.patch
39 Patch105: %{name}-4.2.6p1-linkfastmath.patch
40 Patch106: %{name}-4.2.6p1-tentative.patch
41 Patch107: %{name}-4.2.6p1-retcode.patch
42 Patch108: %{name}-4.2.6p1-rtnetlink.patch
43 Patch109: %{name}-4.2.6p1-html2man.patch
44 Patch110: %{name}-4.2.6p1-htmldoc.patch
45 Patch112: %{name}-4.2.4p7-getprecision.patch
46 Patch113: %{name}-4.2.6p1-logdefault.patch
47 Patch114: %{name}-4.2.6p1-mlock.patch
48 URL: http://www.ntp.org/
49 BuildRequires: autoconf
50 BuildRequires: automake
51 BuildRequires: libcap-devel
52 BuildRequires: libtool
53 BuildRequires: openssl-devel >= 0.9.7d
54 BuildRequires: readline-devel >= 4.2
55 BuildRequires: rpm-perlprov >= 4.1-13
56 BuildRequires: rpmbuild(macros) >= 1.561
57 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
59 %define _sysconfdir /etc/ntp
60 %define _bindir %{_sbindir}
63 The Network Time Protocol (NTP) is used to synchronize a computer's
64 time with another reference time source. The ntp package contains
65 utilities and daemons which will synchronize your computer's time to
66 Coordinated Universal Time (UTC) via the NTP protocol and NTP servers.
68 %description -l pl.UTF-8
69 Network Time Protocol (NTP) służy do synchronizacji czasu komputera z
70 innym, wzorcowym źródłem czasu. Pakiet ntp zawiera narzędzia i demony
71 służące do dokładnego synchronizowania czasu komputera według czasu
72 uniwersalnego (UTC) poprzez protokół NTP z serwerami NTP.
74 %description -l pt_BR.UTF-8
75 Esta é a versão 4 do Network Time Protocol (NTP). Este protocolo é
76 utilizado para sincronizar o relógio do computador com uma outra
77 referência de horário. Este pacote contém utilitários e servidores que
78 sincronizarão o relógio do seu computador com o horário universal
79 (UTC) através do protocolo NTP e utilizando servidores NTP públicos.
81 Instale o pacote ntp se você necessitar de ferramentas para manter o
82 relógio do seu computador constantemente atualizado.
85 Summary: The NTP daemon
86 Summary(pl.UTF-8): Narzędzia do synchronizacji czasu (Network Time Protocol)
87 Summary(pt_BR.UTF-8): Network Time Protocol versão 4
89 Requires(post,preun): /sbin/chkconfig
90 Requires(postun): /usr/sbin/groupdel
91 Requires(postun): /usr/sbin/userdel
92 Requires(pre): /bin/id
93 Requires(pre): /usr/bin/getgid
94 Requires(pre): /usr/sbin/groupadd
95 Requires(pre): /usr/sbin/useradd
96 Requires: rc-scripts >= 0.4.3.0
98 Provides: ntp = %{version}-%{release}
101 Obsoletes: ntp < 4.2.4p8-6
107 The Network Time Protocol (NTP) is used to synchronize a computer's
108 time with another reference time source. The ntp package contains
109 utilities and daemons which will synchronize your computer's time to
110 Coordinated Universal Time (UTC) via the NTP protocol and NTP servers.
112 This package includes ntpd (a daemon which continuously adjusts system
115 %description -n ntpd -l pl.UTF-8
116 Network Time Protocol (NTP) służy do synchronizacji czasu komputera z
117 innym, wzorcowym źródłem czasu. Pakiet ntp zawiera narzędzia i demony
118 służące do dokładnego synchronizowania czasu komputera według czasu
119 uniwersalnego (UTC) poprzez protokół NTP z serwerami NTP.
121 Pakiet ntp zawiera ntpd (demona, który w sposób ciągły aktualizuje
124 %description -n ntpd -l pt_BR.UTF-8
125 Esta é a versão 4 do Network Time Protocol (NTP). Este protocolo é
126 utilizado para sincronizar o relógio do computador com uma outra
127 referência de horário. Este pacote contém utilitários e servidores que
128 sincronizarão o relógio do seu computador com o horário universal
129 (UTC) através do protocolo NTP e utilizando servidores NTP públicos.
131 %package -n ntpd-upstart
132 Summary: Upstart job description for the NTP daemon
133 Summary(pl.UTF-8): Opis zadania Upstart dla demona NTP
135 Requires: ntpd = %{version}-%{release}
136 Requires: upstart >= 0.6
138 %description -n ntpd-upstart
139 Upstart job description for the NTP daemon.
141 %description -n ntpd-upstart -l pl.UTF-8
142 Opis zadania Upstart dla demona NTP.
145 Summary: Utility to set the date and time via NTP
146 Summary(pl.UTF-8): Klient do synchronizacji czasu po NTP (Network Time Protocol)
147 Group: Applications/Networking
148 Requires(post,preun): /sbin/chkconfig
149 Requires(postun): /usr/sbin/groupdel
150 Requires(postun): /usr/sbin/userdel
151 Requires(pre): /bin/id
152 Requires(pre): /usr/bin/getgid
153 Requires(pre): /usr/sbin/groupadd
154 Requires(pre): /usr/sbin/useradd
157 Conflicts: ntp < 4.2.0-3
159 Provides: ntp-client = %{version}-%{release}
160 Obsoletes: ntp-client < 4.2.4p8-6
165 %description -n ntpdate
166 ntpdate is a program for retrieving the date and time from NTP
169 %description -n ntpdate -l pl.UTF-8
170 Klient do synchronizacji czasu po NTP (Network Time Protocol).
174 Group: Applications/Networking
175 Obsoletes: ntp-ntptrace
178 This package contains ntp tools:
179 - ntptrace: Trace a chain of NTP servers back to the primary source
180 - ntp-wait: Wait for NTP server to synchronize
183 Summary: HTML documentation for ntp
184 Summary(pl.UTF-8): Dokumentacja HTML dla ntp
185 Summary(pt_BR.UTF-8): Documentação adicional para o pacote ntp
188 %description doc-html
189 HTML documentation for ntp.
191 %description doc-html -l pl.UTF-8
192 Dokumentacja do ntp w HTML.
194 %description doc-html -l pt_BR.UTF-8
195 Este pacote contém documentação adicional sobre o NTP versão 4.
221 echo 'AM_CONDITIONAL([NEED_LIBOPTS], false)' >> configure.ac
222 echo 'AM_CONDITIONAL([NEED_LIBOPTS], false)' >> sntp/configure.ac
226 %{__aclocal} -I m4 -I libopts/m4
231 %{__aclocal} -I ../m4 -I libopts/m4
236 CPPFLAGS="%{rpmcppflags} -I/usr/include/readline"
238 --with-binsubdir=sbin \
240 --enable-getifaddrs \
242 --with-lineeditlibs=readline \
243 --with-crypto=openssl
248 rm -rf $RPM_BUILD_ROOT
249 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{rc.d/init.d,sysconfig,cron.hourly,init},%{_mandir}/man1}
252 DESTDIR=$RPM_BUILD_ROOT
254 cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/ntp.conf
255 cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/keys
256 install -p %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/ntpd
257 install -p %{SOURCE5} $RPM_BUILD_ROOT/etc/rc.d/init.d/ntpdate
258 cp -a %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/ntpd
259 cp -a %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/ntpdate
260 install -p %{SOURCE8} $RPM_BUILD_ROOT/etc/init/ntpd.conf
261 cp -a man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
263 install -d $RPM_BUILD_ROOT/var/lib/ntp
264 touch $RPM_BUILD_ROOT/var/lib/ntp/drift
266 cat > $RPM_BUILD_ROOT/etc/cron.hourly/ntpdate <<'EOF'
268 exec /sbin/service ntpdate cronsettime
272 rm -rf $RPM_BUILD_ROOT
276 %useradd -u 246 -d %{_sysconfdir} -g ntp -c "NTP Daemon" ntp
279 /sbin/chkconfig --add ntpd
280 %service ntpd restart "NTP Daemon"
283 if [ "$1" = "0" ]; then
285 /sbin/chkconfig --del ntpd
286 rm -f /var/lib/ntp/drift
289 %post -n ntpd-upstart
292 %postun -n ntpd-upstart
296 if [ "$1" = "0" ]; then
304 %useradd -u 246 -d %{_sysconfdir} -g ntp -c "NTP Daemon" ntp
307 /sbin/chkconfig --add ntpdate
308 %service ntpdate restart "NTP Date"
311 if [ "$1" = "0" ]; then
312 %service ntpdate stop
313 /sbin/chkconfig --del ntpdate
317 if [ "$1" = "0" ]; then
322 %triggerun -n ntpd -- ntp < 4.2.4p8-3.14
323 # Prevent preun from ntp from working
324 chmod a-x /etc/rc.d/init.d/ntpd
326 %triggerpostun -n ntpd -- ntp < 4.2.4p8-3.14
327 # Restore what triggerun removed
328 chmod 754 /etc/rc.d/init.d/ntpd
329 sed -i -e 's,/etc/ntp/drift,/var/lib/ntp/drift,' %{_sysconfdir}/ntp.conf
330 mv -f /etc/ntp/ntp.drift /var/lib/ntp/drift 2>/dev/null
331 mv -f /etc/ntp/drift /var/lib/ntp/drift 2>/dev/null
332 %service -q ntpd restart
334 %triggerpostun -n ntpdate -- ntp-client < 4.2.4p8-3.2
335 if [ -f /etc/sysconfig/ntp.rpmsave ]; then
336 cp -f /etc/sysconfig/ntpdate{,.rpmnew}
337 mv -f /etc/sysconfig/ntp.rpmsave /etc/sysconfig/ntpdate
341 %defattr(644,root,root,755)
342 %doc NEWS TODO WHERE-TO-START conf/*.conf COPYRIGHT
343 %attr(750,root,root) %dir %{_sysconfdir}
344 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*
345 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ntpd
346 %attr(754,root,root) /etc/rc.d/init.d/ntpd
347 %attr(755,root,root) %{_sbindir}/ntpd
348 %attr(755,root,root) %{_sbindir}/ntpdc
349 %attr(755,root,root) %{_sbindir}/ntp-keygen
350 %attr(755,root,root) %{_sbindir}/ntpq
351 %attr(755,root,root) %{_sbindir}/ntptime
352 %attr(755,root,root) %{_sbindir}/sntp
353 %attr(755,root,root) %{_sbindir}/tickadj
354 %{_mandir}/man1/ntpd.1*
355 %{_mandir}/man1/ntpdc.1*
356 #%{_mandir}/man1/ntpdsim.1*
357 %{_mandir}/man1/ntp-keygen.1*
358 %{_mandir}/man1/ntpq.1*
359 %{_mandir}/man1/ntptime.1*
360 %{_mandir}/man1/sntp.1*
362 %dir %attr(770,root,ntp) /var/lib/ntp
363 %attr(640,ntp,ntp) %ghost /var/lib/ntp/drift
365 %files -n ntpd-upstart
366 %defattr(644,root,root,755)
367 %config(noreplace) %verify(not md5 mtime size) /etc/init/ntpd.conf
370 %defattr(644,root,root,755)
372 %attr(755,root,root) %{_sbindir}/ntpdate
373 %attr(754,root,root) /etc/rc.d/init.d/ntpdate
374 %attr(754,root,root) /etc/cron.hourly/ntpdate
375 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ntpdate
376 %{_mandir}/man1/ntpdate*
379 %defattr(644,root,root,755)
380 %attr(755,root,root) %{_sbindir}/ntptrace
381 %attr(755,root,root) %{_sbindir}/ntp-wait
382 %{_mandir}/man1/ntptrace*
385 %defattr(644,root,root,755)