]>
Commit | Line | Data |
---|---|---|
90a82b10 | 1 | # TODO: |
a4cc90b2 ER |
2 | # - enable and package ntpdsim? |
3 | # - net-snmp-ntpd needs initscript | |
6e00857d | 4 | # - update FC patches |
f656c610 ER |
5 | # - unpackaged files: |
6 | # /usr/sbin/calc_tickadj | |
7 | # /usr/share/doc/sntp/sntp.html | |
8 | # /usr/share/man/man1/calc_tickadj.1.gz | |
9 | # /usr/share/man/man1/ntp-wait.1.gz | |
10 | # /usr/share/man/man5/ntp.conf.5.gz | |
11 | # /usr/share/man/man5/ntp.keys.5.gz | |
12 | # /usr/share/ntp/lib/NTP/Util.pm | |
8f6c2b65 JK |
13 | # |
14 | # Conditional build: | |
15 | %bcond_without avahi # disable DNS-SD support via Avahi | |
a4cc90b2 | 16 | |
df3fadd8 | 17 | %include /usr/lib/rpm/macros.perl |
71bab42e | 18 | Summary: Network Time Protocol utilities |
fcc994b7 ER |
19 | Summary(pl.UTF-8): Narzędzia do synchronizacji czasu (Network Time Protocol) |
20 | Summary(pt_BR.UTF-8): Network Time Protocol versão 4 | |
45771d3d | 21 | Name: ntp |
6e00857d AM |
22 | Version: 4.2.8 |
23 | Release: 0.1 | |
a030fe3d | 24 | License: distributable |
aa729c5d | 25 | Group: Networking/Daemons |
5aa7cc17 | 26 | Source0: http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/%{name}-%{version}.tar.gz |
6e00857d | 27 | # Source0-md5: 6972a626be6150db8cfbd0b63d8719e7 |
28dfddc3 | 28 | Source1: %{name}.conf |
29 | Source2: %{name}.keys | |
39873f43 ER |
30 | Source3: %{name}d.init |
31 | Source4: %{name}d.sysconfig | |
32 | Source5: %{name}date.init | |
33 | Source6: %{name}date.sysconfig | |
bc6615d5 ER |
34 | Source7: %{name}-manpages.tar.gz |
35 | # Source7-md5: 208fcc9019e19ab26d28e4597290bffb | |
299584e5 ER |
36 | Source8: %{name}.upstart |
37 | Source9: %{name}date.upstart | |
38 | Source10: %{name}date-wrapper | |
39 | Source11: %{name}d.service | |
40 | Source12: %{name}date.service | |
87172492 | 41 | Source13: http://www.ietf.org/timezones/data/leap-seconds.list |
db90c4a2 | 42 | # Source13-md5: e99a84cf28b14c77fba76c05565604ac |
6e00857d | 43 | Patch0: %{name}-build.patch |
dbdd74ae | 44 | Patch1: %{name}-no_libelf.patch |
262e8067 | 45 | Patch2: %{name}-ipv6.patch |
0ffcfbfc KK |
46 | Patch3: %{name}-nano.patch |
47 | Patch4: %{name}-no_avahi.patch | |
a8809dbd ER |
48 | # FC patches + 100 |
49 | Patch101: %{name}-4.2.6p1-sleep.patch | |
50 | Patch102: %{name}-4.2.6p1-droproot.patch | |
51 | Patch103: %{name}-4.2.6p1-bcast.patch | |
52 | Patch104: %{name}-4.2.6p1-cmsgalign.patch | |
53 | Patch105: %{name}-4.2.6p1-linkfastmath.patch | |
54 | Patch106: %{name}-4.2.6p1-tentative.patch | |
55 | Patch107: %{name}-4.2.6p1-retcode.patch | |
56 | Patch108: %{name}-4.2.6p1-rtnetlink.patch | |
15931ca5 AG |
57 | Patch109: %{name}-4.2.4p7-getprecision.patch |
58 | Patch110: %{name}-4.2.6p1-logdefault.patch | |
59 | Patch111: %{name}-4.2.6p1-mlock.patch | |
60 | Patch112: %{name}-4.2.6p3-broadcastdelay.patch | |
6cd8a392 | 61 | URL: http://www.ntp.org/ |
8338fb6d | 62 | BuildRequires: autoconf |
6e00857d | 63 | BuildRequires: autogen-devel |
1ef6c8b4 | 64 | BuildRequires: automake |
8f6c2b65 | 65 | %{?with_avahi:BuildRequires: avahi-compat-libdns_sd-devel} |
61dbaaf1 | 66 | BuildRequires: libcap-devel |
6e00857d | 67 | BuildRequires: libevent-devel |
8ee97dcb | 68 | BuildRequires: libnl-devel |
6e00857d | 69 | BuildRequires: libseccomp-devel |
8338fb6d | 70 | BuildRequires: libtool |
5ecb988f | 71 | BuildRequires: net-snmp-devel |
e35272e3 | 72 | BuildRequires: openssl-devel >= 0.9.7d |
28341528 | 73 | BuildRequires: pciutils-devel |
ba10b9ba | 74 | BuildRequires: readline-devel >= 4.2 |
df3fadd8 | 75 | BuildRequires: rpm-perlprov >= 4.1-13 |
034cfc5e | 76 | BuildRequires: rpmbuild(macros) >= 1.626 |
71bab42e | 77 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
78 | ||
79 | %define _sysconfdir /etc/ntp | |
80 | %define _bindir %{_sbindir} | |
a4cc90b2 | 81 | %define mibdir %{_datadir}/mibs |
71bab42e | 82 | |
e24d986a | 83 | %description |
28dfddc3 | 84 | The Network Time Protocol (NTP) is used to synchronize a computer's |
85 | time with another reference time source. The ntp package contains | |
86 | utilities and daemons which will synchronize your computer's time to | |
a47685aa | 87 | Coordinated Universal Time (UTC) via the NTP protocol and NTP servers. |
71bab42e | 88 | |
00337413 JR |
89 | %description -l pl.UTF-8 |
90 | Network Time Protocol (NTP) służy do synchronizacji czasu komputera z | |
91 | innym, wzorcowym źródłem czasu. Pakiet ntp zawiera narzędzia i demony | |
92 | służące do dokładnego synchronizowania czasu komputera według czasu | |
cb15c3e4 | 93 | uniwersalnego (UTC) poprzez protokół NTP z serwerami NTP. |
71bab42e | 94 | |
00337413 JR |
95 | %description -l pt_BR.UTF-8 |
96 | Esta é a versão 4 do Network Time Protocol (NTP). Este protocolo é | |
97 | utilizado para sincronizar o relógio do computador com uma outra | |
98 | referência de horário. Este pacote contém utilitários e servidores que | |
99 | sincronizarão o relógio do seu computador com o horário universal | |
100 | (UTC) através do protocolo NTP e utilizando servidores NTP públicos. | |
608ad171 | 101 | |
00337413 JR |
102 | Instale o pacote ntp se você necessitar de ferramentas para manter o |
103 | relógio do seu computador constantemente atualizado. | |
608ad171 | 104 | |
cb15c3e4 ER |
105 | %package -n ntpd |
106 | Summary: The NTP daemon | |
107 | Summary(pl.UTF-8): Narzędzia do synchronizacji czasu (Network Time Protocol) | |
108 | Summary(pt_BR.UTF-8): Network Time Protocol versão 4 | |
109 | Group: Daemons | |
110 | Requires(post,preun): /sbin/chkconfig | |
932bc1ee ER |
111 | Requires(postun): /usr/sbin/groupdel |
112 | Requires(postun): /usr/sbin/userdel | |
113 | Requires(pre): /bin/id | |
114 | Requires(pre): /usr/bin/getgid | |
115 | Requires(pre): /usr/sbin/groupadd | |
116 | Requires(pre): /usr/sbin/useradd | |
6ff9635b | 117 | Requires(post,preun,postun): systemd-units >= 38 |
0d2671b6 | 118 | Requires: rc-scripts >= 0.4.3.0 |
6ff9635b | 119 | Requires: systemd-units >= 38 |
932bc1ee | 120 | Provides: group(ntp) |
cb15c3e4 ER |
121 | Provides: ntp = %{version}-%{release} |
122 | Provides: ntpdaemon | |
932bc1ee | 123 | Provides: user(ntp) |
f6fec3df | 124 | Obsoletes: ntp < 4.2.4p8-6 |
cb15c3e4 ER |
125 | Obsoletes: ntpdaemon |
126 | Obsoletes: openntpd | |
127 | Obsoletes: xntp3 | |
128 | ||
129 | %description -n ntpd | |
130 | The Network Time Protocol (NTP) is used to synchronize a computer's | |
131 | time with another reference time source. The ntp package contains | |
132 | utilities and daemons which will synchronize your computer's time to | |
133 | Coordinated Universal Time (UTC) via the NTP protocol and NTP servers. | |
134 | ||
135 | This package includes ntpd (a daemon which continuously adjusts system | |
136 | time) | |
137 | ||
138 | %description -n ntpd -l pl.UTF-8 | |
139 | Network Time Protocol (NTP) służy do synchronizacji czasu komputera z | |
140 | innym, wzorcowym źródłem czasu. Pakiet ntp zawiera narzędzia i demony | |
141 | służące do dokładnego synchronizowania czasu komputera według czasu | |
142 | uniwersalnego (UTC) poprzez protokół NTP z serwerami NTP. | |
143 | ||
144 | Pakiet ntp zawiera ntpd (demona, który w sposób ciągły aktualizuje | |
145 | czas systemowy) | |
146 | ||
147 | %description -n ntpd -l pt_BR.UTF-8 | |
148 | Esta é a versão 4 do Network Time Protocol (NTP). Este protocolo é | |
149 | utilizado para sincronizar o relógio do computador com uma outra | |
150 | referência de horário. Este pacote contém utilitários e servidores que | |
151 | sincronizarão o relógio do seu computador com o horário universal | |
152 | (UTC) através do protocolo NTP e utilizando servidores NTP públicos. | |
153 | ||
4aef70db JR |
154 | %package -n ntpd-upstart |
155 | Summary: Upstart job description for the NTP daemon | |
156 | Summary(pl.UTF-8): Opis zadania Upstart dla demona NTP | |
157 | Group: Daemons | |
158 | Requires: ntpd = %{version}-%{release} | |
159 | Requires: upstart >= 0.6 | |
160 | ||
161 | %description -n ntpd-upstart | |
162 | Upstart job description for the NTP daemon. | |
163 | ||
164 | %description -n ntpd-upstart -l pl.UTF-8 | |
165 | Opis zadania Upstart dla demona NTP. | |
166 | ||
cb15c3e4 ER |
167 | %package -n ntpdate |
168 | Summary: Utility to set the date and time via NTP | |
fcc994b7 | 169 | Summary(pl.UTF-8): Klient do synchronizacji czasu po NTP (Network Time Protocol) |
df3fadd8 | 170 | Group: Applications/Networking |
5acc7945 | 171 | Requires(post,preun): /sbin/chkconfig |
932bc1ee ER |
172 | Requires(postun): /usr/sbin/groupdel |
173 | Requires(postun): /usr/sbin/userdel | |
174 | Requires(pre): /bin/id | |
175 | Requires(pre): /usr/bin/getgid | |
176 | Requires(pre): /usr/sbin/groupadd | |
177 | Requires(pre): /usr/sbin/useradd | |
6ff9635b | 178 | Requires(post,preun,postun): systemd-units >= 38 |
b2073411 | 179 | Requires: rc-scripts >= 0.4.3.0 |
6ff9635b | 180 | Requires: systemd-units >= 38 |
92517d76 ER |
181 | Provides: group(ntp) |
182 | Provides: user(ntp) | |
691bd31f | 183 | Conflicts: ntp < 4.2.0-3 |
cb15c3e4 ER |
184 | # for upgrades |
185 | Provides: ntp-client = %{version}-%{release} | |
f6fec3df | 186 | Obsoletes: ntp-client < 4.2.4p8-6 |
92517d76 ER |
187 | # virtual |
188 | Provides: ntpclient | |
189 | Obsoletes: ntpclient | |
e1e25342 | 190 | |
cb15c3e4 ER |
191 | %description -n ntpdate |
192 | ntpdate is a program for retrieving the date and time from NTP | |
193 | servers. | |
e1e25342 | 194 | |
cb15c3e4 | 195 | %description -n ntpdate -l pl.UTF-8 |
c771054a | 196 | Klient do synchronizacji czasu po NTP (Network Time Protocol). |
e1e25342 | 197 | |
4aef70db JR |
198 | %package -n ntpdate-upstart |
199 | Summary: Upstart job description for NTP client | |
200 | Summary(pl.UTF-8): Opis zadania Upstart dla klienta NTP | |
201 | Group: Daemons | |
202 | Requires: ntpdate = %{version}-%{release} | |
203 | Requires: upstart >= 0.6 | |
204 | ||
205 | %description -n ntpdate-upstart | |
206 | Upstart job description for the NTP client. | |
207 | ||
208 | %description -n ntpdate-upstart -l pl.UTF-8 | |
209 | Opis zadania Upstart dla klienta NTP. | |
210 | ||
a4cc90b2 ER |
211 | %package -n mibs-ntp |
212 | Summary: MIBs for NTP time entities | |
213 | Group: Applications/System | |
214 | Requires: mibs-dirs | |
215 | ||
216 | %description -n mibs-ntp | |
217 | The Management Information Base for NTP time entities. | |
218 | ||
219 | %package -n net-snmp-ntpd | |
220 | Summary: NTP SNMP subagent for Net-SNMP | |
221 | Group: Daemons | |
222 | Requires(post,preun): /sbin/chkconfig | |
223 | Requires: net-snmp | |
224 | Requires: rc-scripts | |
225 | Suggests: mibs-ntp | |
226 | ||
227 | %description -n net-snmp-ntpd | |
228 | NTP SNMP AgentX subagent for Net-SNMP. | |
229 | ||
2cf5b026 ER |
230 | %package tools |
231 | Summary: NTP tools | |
232 | Group: Applications/Networking | |
a9d9ccd1 | 233 | Obsoletes: ntp-ntptrace |
2cf5b026 ER |
234 | |
235 | %description tools | |
236 | This package contains ntp tools: | |
237 | - ntptrace: Trace a chain of NTP servers back to the primary source | |
238 | - ntp-wait: Wait for NTP server to synchronize | |
239 | ||
82f74dd4 ER |
240 | %package doc-html |
241 | Summary: HTML documentation for ntp | |
242 | Summary(pl.UTF-8): Dokumentacja HTML dla ntp | |
243 | Summary(pt_BR.UTF-8): Documentação adicional para o pacote ntp | |
244 | Group: Documentation | |
245 | ||
246 | %description doc-html | |
247 | HTML documentation for ntp. | |
248 | ||
249 | %description doc-html -l pl.UTF-8 | |
250 | Dokumentacja do ntp w HTML. | |
251 | ||
252 | %description doc-html -l pt_BR.UTF-8 | |
253 | Este pacote contém documentação adicional sobre o NTP versão 4. | |
254 | ||
e24d986a | 255 | %prep |
bc6615d5 | 256 | %setup -q -a7 |
29f00086 | 257 | %patch0 -p1 |
be68fcb1 | 258 | %patch1 -p1 |
262e8067 | 259 | %patch2 -p1 |
e35272e3 | 260 | %patch3 -p1 |
0ffcfbfc | 261 | %{!?with_avahi:%patch4 -p1} |
71bab42e | 262 | |
23bc47dc | 263 | ## FC patches |
6e00857d | 264 | #%patch101 -p1 |
eb371d2a | 265 | %patch102 -p1 |
6e00857d | 266 | #%patch103 -p1 |
eb371d2a ER |
267 | %patch104 -p1 |
268 | %patch105 -p1 | |
269 | #%patch106 -p1 looks like obsolete | |
270 | %patch107 -p1 | |
271 | %patch108 -p1 | |
272 | #%patch109 -p1 upstream already decreased to 20e-9, not needed then? | |
6e00857d AM |
273 | #%patch110 -p1 |
274 | #%patch111 -p1 | |
275 | #%patch112 -p1 | |
6fca7355 | 276 | |
2c17d85d | 277 | echo 'AM_CONDITIONAL([NEED_LIBOPTS], false)' >> configure.ac |
740223e3 | 278 | echo 'AM_CONDITIONAL([NEED_LIBOPTS], false)' >> sntp/configure.ac |
2c17d85d | 279 | |
6e00857d AM |
280 | rm sntp/m4/{lt*,libtool}.m4 sntp/libevent/m4/{lt*,libtool}.m4 |
281 | ||
71bab42e | 282 | %build |
e35272e3 | 283 | %{__libtoolize} |
6e00857d | 284 | %{__aclocal} -I sntp/m4 -I sntp/libopts/m4 -I sntp/libevent/m4 |
e35272e3 JK |
285 | %{__autoconf} |
286 | %{__automake} | |
506da0ac | 287 | cd sntp |
288 | %{__libtoolize} | |
6e00857d | 289 | %{__aclocal} -I libopts/m4 -I libevent/m4 |
506da0ac | 290 | %{__autoconf} |
291 | %{__automake} | |
506da0ac | 292 | cd .. |
740223e3 | 293 | |
90a82b10 | 294 | CPPFLAGS="%{rpmcppflags} -I/usr/include/readline" |
636118eb | 295 | %configure \ |
2c17d85d AM |
296 | --with-binsubdir=sbin \ |
297 | --enable-linuxcaps \ | |
298 | --enable-getifaddrs \ | |
6e00857d | 299 | --enable-libseccomp \ |
2c17d85d | 300 | --enable-ipv6 \ |
784e30ae | 301 | --enable-ntp-signd \ |
90a82b10 | 302 | --with-lineeditlibs=readline \ |
6e00857d AM |
303 | --with-crypto=openssl \ |
304 | --disable-local-libopts \ | |
305 | --disable-local-libevent | |
deb05b4c | 306 | |
e24d986a | 307 | %{__make} |
71bab42e | 308 | |
309 | %install | |
310 | rm -rf $RPM_BUILD_ROOT | |
4aef70db | 311 | install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_mandir}/man1,%{systemdunitdir}} \ |
ba8c171f | 312 | $RPM_BUILD_ROOT%{_libexecdir}/systemd/ntp-units.d \ |
4aef70db | 313 | $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig,cron.hourly,init} |
71bab42e | 314 | |
1bf23378 | 315 | %{__make} install \ |
316 | DESTDIR=$RPM_BUILD_ROOT | |
71bab42e | 317 | |
299584e5 ER |
318 | cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/ntp.conf |
319 | cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/keys | |
87172492 | 320 | cp -p %{SOURCE13} $RPM_BUILD_ROOT%{_sysconfdir}/ntp.leapseconds |
299584e5 | 321 | |
740223e3 | 322 | install -p %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/ntpd |
cb15c3e4 | 323 | install -p %{SOURCE5} $RPM_BUILD_ROOT/etc/rc.d/init.d/ntpdate |
299584e5 ER |
324 | cp -p %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/ntpd |
325 | cp -p %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/ntpdate | |
ef83998a ER |
326 | cp -p %{SOURCE8} $RPM_BUILD_ROOT/etc/init/ntpd.conf |
327 | cp -p %{SOURCE9} $RPM_BUILD_ROOT/etc/init/ntpdate.conf | |
4aef70db | 328 | |
a114c2aa ER |
329 | install -p %{SOURCE10} $RPM_BUILD_ROOT%{_sbindir}/ntpdate-wrapper |
330 | cp -p %{SOURCE11} $RPM_BUILD_ROOT%{systemdunitdir}/ntpd.service | |
331 | cp -p %{SOURCE12} $RPM_BUILD_ROOT%{systemdunitdir}/ntpdate.service | |
ba8c171f AM |
332 | echo 'ntpd.service' > \ |
333 | $RPM_BUILD_ROOT%{_libexecdir}/systemd/ntp-units.d/50-ntpd.list | |
4aef70db | 334 | |
299584e5 | 335 | cp -p man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1 |
71bab42e | 336 | |
c52fbdbb ER |
337 | install -d $RPM_BUILD_ROOT/var/lib/ntp |
338 | touch $RPM_BUILD_ROOT/var/lib/ntp/drift | |
339 | ||
cb15c3e4 | 340 | cat > $RPM_BUILD_ROOT/etc/cron.hourly/ntpdate <<'EOF' |
394789ea | 341 | #!/bin/sh |
7d2f2be2 ER |
342 | # Source function library. |
343 | . /etc/rc.d/init.d/functions | |
344 | ||
a114c2aa ER |
345 | # Source ntpdate configuration |
346 | . /etc/sysconfig/ntpdate | |
347 | ||
348 | is_yes "$NTPDATE_CRON" || exit 0 | |
299584e5 | 349 | exec %{_sbindir}/ntpdate-wrapper |
394789ea AM |
350 | EOF |
351 | ||
a4cc90b2 | 352 | install -d $RPM_BUILD_ROOT%{mibdir} |
299584e5 | 353 | cp -p ntpsnmpd/ntpv4-mib.mib $RPM_BUILD_ROOT%{mibdir} |
a4cc90b2 | 354 | |
eb371d2a | 355 | rm -r $RPM_BUILD_ROOT%{_docdir}/ntp4 |
6e00857d | 356 | |
71bab42e | 357 | %clean |
be68fcb1 | 358 | rm -rf $RPM_BUILD_ROOT |
71bab42e | 359 | |
932bc1ee ER |
360 | %pre -n ntpd |
361 | %groupadd -g 246 ntp | |
362 | %useradd -u 246 -d %{_sysconfdir} -g ntp -c "NTP Daemon" ntp | |
363 | ||
cb15c3e4 | 364 | %post -n ntpd |
e1e25342 | 365 | /sbin/chkconfig --add ntpd |
740223e3 | 366 | %service ntpd restart "NTP Daemon" |
4aef70db | 367 | %systemd_post ntpd.service |
e1e25342 | 368 | |
cb15c3e4 | 369 | %preun -n ntpd |
e1e25342 | 370 | if [ "$1" = "0" ]; then |
b9625068 | 371 | %service ntpd stop |
e1e25342 | 372 | /sbin/chkconfig --del ntpd |
c52fbdbb | 373 | rm -f /var/lib/ntp/drift |
e1e25342 | 374 | fi |
4aef70db | 375 | %systemd_preun ntpd.service |
e1e25342 | 376 | |
932bc1ee ER |
377 | %postun -n ntp |
378 | if [ "$1" = "0" ]; then | |
379 | %userremove ntp | |
380 | %groupremove ntp | |
381 | fi | |
4aef70db JR |
382 | %systemd_reload |
383 | ||
384 | %post -n ntpd-upstart | |
385 | %upstart_post ntpd | |
932bc1ee | 386 | |
4aef70db JR |
387 | %postun -n ntpd-upstart |
388 | %upstart_postun ntpd | |
0d2671b6 | 389 | |
92517d76 ER |
390 | %pre -n ntpdate |
391 | %groupadd -g 246 ntp | |
392 | %useradd -u 246 -d %{_sysconfdir} -g ntp -c "NTP Daemon" ntp | |
393 | ||
cb15c3e4 ER |
394 | %post -n ntpdate |
395 | /sbin/chkconfig --add ntpdate | |
396 | %service ntpdate restart "NTP Date" | |
4aef70db | 397 | %systemd_post ntpdate.service |
e24d986a | 398 | |
cb15c3e4 | 399 | %preun -n ntpdate |
d470477a | 400 | if [ "$1" = "0" ]; then |
cb15c3e4 ER |
401 | %service ntpdate stop |
402 | /sbin/chkconfig --del ntpdate | |
d470477a | 403 | fi |
4aef70db | 404 | %systemd_preun ntpdate.service |
71bab42e | 405 | |
92517d76 ER |
406 | %postun -n ntpdate |
407 | if [ "$1" = "0" ]; then | |
408 | %userremove ntp | |
409 | %groupremove ntp | |
410 | fi | |
4aef70db JR |
411 | %systemd_reload |
412 | ||
413 | %post -n ntpdate-upstart | |
414 | %upstart_post ntpdate | |
415 | ||
416 | %postun -n ntpdate-upstart | |
417 | %upstart_postun ntpdate | |
92517d76 | 418 | |
7e284bc0 ER |
419 | %triggerun -n ntpd -- ntp < 4.2.4p8-3.14 |
420 | # Prevent preun from ntp from working | |
421 | chmod a-x /etc/rc.d/init.d/ntpd | |
c52fbdbb | 422 | |
7e284bc0 ER |
423 | %triggerpostun -n ntpd -- ntp < 4.2.4p8-3.14 |
424 | # Restore what triggerun removed | |
425 | chmod 754 /etc/rc.d/init.d/ntpd | |
c52fbdbb | 426 | sed -i -e 's,/etc/ntp/drift,/var/lib/ntp/drift,' %{_sysconfdir}/ntp.conf |
7e284bc0 ER |
427 | mv -f /etc/ntp/ntp.drift /var/lib/ntp/drift 2>/dev/null |
428 | mv -f /etc/ntp/drift /var/lib/ntp/drift 2>/dev/null | |
c52fbdbb | 429 | %service -q ntpd restart |
4aef70db JR |
430 | %systemd_trigger ntpd.service |
431 | %systemd_post ntpdate | |
432 | ||
433 | %triggerpostun -n ntpd -- ntpd < 4.2.6p5-2 | |
434 | %systemd_trigger ntpd.service | |
c52fbdbb | 435 | |
45735b52 ER |
436 | %triggerpostun -n ntpdate -- ntp-client < 4.2.4p8-3.2 |
437 | if [ -f /etc/sysconfig/ntp.rpmsave ]; then | |
438 | cp -f /etc/sysconfig/ntpdate{,.rpmnew} | |
439 | mv -f /etc/sysconfig/ntp.rpmsave /etc/sysconfig/ntpdate | |
440 | fi | |
4aef70db JR |
441 | %systemd_trigger ntpdate.service |
442 | ||
443 | %triggerpostun -n ntpdate -- ntpdate < 4.2.6p5-2 | |
444 | %systemd_trigger ntpdate.service | |
45735b52 | 445 | |
cb15c3e4 | 446 | %files -n ntpd |
71bab42e | 447 | %defattr(644,root,root,755) |
38034725 | 448 | %doc NEWS TODO WHERE-TO-START conf/*.conf COPYRIGHT |
c771054a | 449 | %attr(750,root,root) %dir %{_sysconfdir} |
299584e5 ER |
450 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/keys |
451 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ntp.conf | |
87172492 | 452 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ntp.leapseconds |
8fb3cd7e | 453 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ntpd |
2cf5b026 | 454 | %attr(754,root,root) /etc/rc.d/init.d/ntpd |
4aef70db | 455 | %{systemdunitdir}/ntpd.service |
ba8c171f | 456 | %{_libexecdir}/systemd/ntp-units.d/50-ntpd.list |
2cf5b026 ER |
457 | %attr(755,root,root) %{_sbindir}/ntpd |
458 | %attr(755,root,root) %{_sbindir}/ntpdc | |
459 | %attr(755,root,root) %{_sbindir}/ntp-keygen | |
460 | %attr(755,root,root) %{_sbindir}/ntpq | |
461 | %attr(755,root,root) %{_sbindir}/ntptime | |
462 | %attr(755,root,root) %{_sbindir}/sntp | |
463 | %attr(755,root,root) %{_sbindir}/tickadj | |
464 | %{_mandir}/man1/ntpd.1* | |
465 | %{_mandir}/man1/ntpdc.1* | |
2cf5b026 ER |
466 | %{_mandir}/man1/ntp-keygen.1* |
467 | %{_mandir}/man1/ntpq.1* | |
468 | %{_mandir}/man1/ntptime.1* | |
469 | %{_mandir}/man1/sntp.1* | |
470 | ||
c52fbdbb ER |
471 | %dir %attr(770,root,ntp) /var/lib/ntp |
472 | %attr(640,ntp,ntp) %ghost /var/lib/ntp/drift | |
473 | ||
4aef70db JR |
474 | %files -n ntpd-upstart |
475 | %defattr(644,root,root,755) | |
476 | %config(noreplace) %verify(not md5 mtime size) /etc/init/ntpd.conf | |
477 | ||
cb15c3e4 ER |
478 | %files -n ntpdate |
479 | %defattr(644,root,root,755) | |
480 | %doc COPYRIGHT | |
481 | %attr(755,root,root) %{_sbindir}/ntpdate | |
4aef70db | 482 | %attr(755,root,root) %{_sbindir}/ntpdate-wrapper |
cb15c3e4 ER |
483 | %attr(754,root,root) /etc/rc.d/init.d/ntpdate |
484 | %attr(754,root,root) /etc/cron.hourly/ntpdate | |
485 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ntpdate | |
4aef70db | 486 | %{systemdunitdir}/ntpdate.service |
cb15c3e4 ER |
487 | %{_mandir}/man1/ntpdate* |
488 | ||
4aef70db JR |
489 | %files -n ntpdate-upstart |
490 | %defattr(644,root,root,755) | |
491 | %config(noreplace) %verify(not md5 mtime size) /etc/init/ntpdate.conf | |
492 | ||
a4cc90b2 ER |
493 | %files -n mibs-ntp |
494 | %defattr(644,root,root,755) | |
495 | %{mibdir}/ntpv4-mib.mib | |
496 | ||
497 | %files -n net-snmp-ntpd | |
498 | %defattr(644,root,root,755) | |
936bfaef | 499 | %doc ntpsnmpd/README |
a4cc90b2 ER |
500 | %attr(755,root,root) %{_sbindir}/ntpsnmpd |
501 | %{_mandir}/man1/ntpsnmpd.1* | |
502 | ||
2cf5b026 | 503 | %files tools |
df3fadd8 ER |
504 | %defattr(644,root,root,755) |
505 | %attr(755,root,root) %{_sbindir}/ntptrace | |
2cf5b026 | 506 | %attr(755,root,root) %{_sbindir}/ntp-wait |
bc6615d5 | 507 | %{_mandir}/man1/ntptrace* |
2d74fa1d | 508 | |
509 | %files doc-html | |
a47685aa | 510 | %defattr(644,root,root,755) |
2d74fa1d | 511 | %doc html/* |