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