]>
Commit | Line | Data |
---|---|---|
fa424e73 JB |
1 | # |
2 | # Conditional build: | |
967af251 | 3 | %bcond_without ldap # without support for ldap storage |
6db0fb84 | 4 | %bcond_without static_libs # don't build static library |
1830ecd4 | 5 | %bcond_without systemd # without systemd units |
ceee8beb | 6 | |
15c1a831 | 7 | %define ver 4.4.3 |
19507c9d | 8 | %if 0 |
990742a8 JR |
9 | %define pverdot .P1 |
10 | %define pverdir -P1 | |
11 | %else | |
12 | %define pverdot %{nil} | |
13 | %define pverdir %{nil} | |
14 | %endif | |
15 | ||
ceee8beb ER |
16 | # vendor string |
17 | %define vvendor PLD/Linux | |
8dc004f7 | 18 | Summary: DHCP Server |
6e8d2260 ER |
19 | Summary(es.UTF-8): Servidor DHCP |
20 | Summary(pl.UTF-8): Serwer DHCP | |
21 | Summary(pt_BR.UTF-8): Servidor DHCP (Protocolo de configuração dinâmica de hosts) | |
cd3ce1e4 | 22 | Name: dhcp |
990742a8 | 23 | Version: %{ver}%{pverdot} |
1830ecd4 | 24 | Release: 2 |
9598ee90 | 25 | Epoch: 4 |
6acbb058 | 26 | License: MIT |
cd3ce1e4 | 27 | Group: Networking/Daemons |
990742a8 | 28 | Source0: ftp://ftp.isc.org/isc/dhcp/%{ver}%{pverdir}/%{name}-%{ver}%{pverdir}.tar.gz |
15c1a831 | 29 | # Source0-md5: 9076af4cc1293dde5a7c6cae7de6ab45 |
a4dfcb55 | 30 | Source1: %{name}.init |
6e6494f3 AM |
31 | Source2: %{name}6.init |
32 | Source3: %{name}-relay.init | |
33 | Source4: %{name}.sysconfig | |
34 | Source5: %{name}-relay.sysconfig | |
1830ecd4 JP |
35 | Source6: dhcpd.service |
36 | Source7: dhcpd6.service | |
37 | Source8: dhcp-relay.service | |
03a6f6c6 | 38 | Source10: %{name}.schema |
ceee8beb ER |
39 | Source11: %{name}-README.ldap |
40 | Source12: draft-ietf-dhc-ldap-schema-01.txt | |
77e9a55a | 41 | Source13: %{name}d-conf-to-ldap |
4ca0a88e | 42 | Patch0: %{name}-release-by-ifup.patch |
12777244 JK |
43 | Patch1: %{name}-3.0.3-x-option.patch |
44 | Patch2: %{name}-paths.patch | |
45 | Patch3: %{name}-timeouts.patch | |
46 | Patch4: %{name}-options.patch | |
47 | Patch5: %{name}-errwarn-message.patch | |
48 | Patch6: %{name}-memory.patch | |
3ae1beff PZ |
49 | Patch7: %{name}-unicast-bootp.patch |
50 | Patch8: %{name}-default-requested-options.patch | |
51 | Patch9: %{name}-manpages.patch | |
52 | Patch10: %{name}-extravars.patch | |
1830ecd4 | 53 | Patch11: systemd-notify.patch |
15c1a831 MK |
54 | Patch12: %{name}-CLOEXEC.patch |
55 | Patch13: %{name}-garbage-in-format-string-error.patch | |
56 | Patch14: %{name}-handle-null-timouet.patch | |
57 | Patch15: %{name}-capabilities.patch | |
58 | Patch16: %{name}-rfc3442-classless-static-routes.patch | |
59 | Patch17: %{name}-ppp.patch | |
60 | Patch18: %{name}-lpf-ib.patch | |
61 | Patch19: %{name}-add-guid-duid-to-logs.patch | |
62 | Patch20: %{name}-duid_uuid.patch | |
63 | Patch21: %{name}-client-request-release-bind-iface.patch | |
64 | Patch22: %{name}-no-subnet-error2info.patch | |
65 | Patch23: %{name}-stateless-duid-llt.patch | |
66 | Patch24: %{name}-hwaddress.patch | |
67 | Patch25: %{name}-confparse.patch | |
68 | Patch26: %{name}-link-local-address.patch | |
69 | Patch27: %{name}-option97-pxe-client-id.patch | |
70 | Patch28: %{name}-detect-time-changes.patch | |
71 | Patch29: bind-detect-time-changes.patch | |
72 | Patch30: bind-system-getaddrinfo.patch | |
067d19b4 | 73 | URL: https://www.isc.org/dhcp/ |
03a6f6c6 AM |
74 | BuildRequires: autoconf |
75 | BuildRequires: automake | |
bca716bd | 76 | BuildRequires: groff |
d812b9c4 JP |
77 | %ifarch %{arm} |
78 | BuildRequires: libatomic-devel | |
79 | %endif | |
ceee8beb | 80 | BuildRequires: libtool |
01b31b42 | 81 | %{?with_ldap:BuildRequires: openldap-devel} |
5bf1b3cd | 82 | %{?with_ldap:BuildRequires: openssl-devel} |
1830ecd4 JP |
83 | BuildRequires: rpmbuild(macros) >= 1.644 |
84 | %{?with_systemd:BuildRequires: systemd-devel} | |
967af251 | 85 | Requires(post): coreutils |
ac30bae3 ER |
86 | Requires(post,preun): /sbin/chkconfig |
87 | Requires: rc-scripts >= 0.2.0 | |
1830ecd4 | 88 | %{?with_systemd:Requires: systemd-units >= 38} |
73612d9c | 89 | Provides: dhcpd |
990742a8 | 90 | Obsoletes: dhcpv6-server |
bf74a63f | 91 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
cd3ce1e4 | 92 | |
6e6494f3 | 93 | %define _sbindir /sbin |
967af251 JR |
94 | %define schemadir /usr/share/openldap/schema |
95 | ||
cd3ce1e4 | 96 | %description |
0770f14a | 97 | DHCP (Dynamic Host Configuration Protocol) is a protocol which allows |
37bec083 | 98 | individual devices on an IP network to get their own network |
99 | configuration information (IP address, subnetmask, broadcast address, | |
100 | etc.) from a DHCP server. The overall purpose of DHCP is to make it | |
101 | easier to administer a large network. | |
0770f14a | 102 | |
39cd54ba | 103 | %description -l es.UTF-8 |
1f522308 | 104 | DHCP permite que hosts en una red TCP/IP soliciten y tengan sus |
39cd54ba JR |
105 | direcciones IP alocadas dinámicamente, permite también descubrir |
106 | información sobre la red en que están conectados. BOOTP provee una | |
1f522308 | 107 | funcionalidad similar, con ciertas restricciones. Este servidor |
39cd54ba | 108 | también las atiende. |
1f522308 | 109 | |
39cd54ba | 110 | %description -l pl.UTF-8 |
b7cc5fa2 | 111 | Serwer DHCP (Dynamic Host Configuration Protocol). |
cd3ce1e4 | 112 | |
39cd54ba | 113 | DHCP to protokół pozwalający urządzeniom pracującym w sieci IP na |
cd42af6b | 114 | pobieranie ich konfiguracji IP (adresu, maski podsieci, adresu |
39cd54ba JR |
115 | rozgłoszeniowego itp.) z serwera DHCP. Ułatwia on administrowanie |
116 | dużymi sieciami IP. | |
cd42af6b | 117 | |
39cd54ba | 118 | %description -l pt_BR.UTF-8 |
1f522308 | 119 | DHCP permite que hosts numa rede TCP/IP requisitem e tenham seus |
39cd54ba JR |
120 | endereços IP alocados dinamicamente, permite também descobrir |
121 | informações sobre a rede em que estão conectados. BOOTP provê uma | |
122 | funcionalidade similar, com certas restrições. Este servidor também | |
123 | atende aquelas requisições. Esta versão é ainda considerada um | |
1f522308 | 124 | software BETA. |
125 | ||
b62eae95 | 126 | %package -n openldap-schema-dhcp |
967af251 JR |
127 | Summary: LDAP Schema for DHCP Server |
128 | Summary(pl.UTF-8): Schemat LDAP dla serwera DHCP | |
129 | Group: Networking/Daemons | |
130 | Requires(post,postun): sed >= 4.0 | |
131 | Requires: openldap-servers | |
5c93787f | 132 | BuildArch: noarch |
967af251 | 133 | |
b62eae95 | 134 | %description -n openldap-schema-dhcp |
967af251 JR |
135 | This package contains LDAPv3 schema for use with the DHCP Server. |
136 | ||
b62eae95 | 137 | %description -n openldap-schema-dhcp -l pl.UTF-8 |
967af251 JR |
138 | Ten pakiet zawiera schemat LDAPv3 do używania z serwerem DHCP. |
139 | ||
3bb4bab9 | 140 | %package client |
141 | Summary: DHCP Client | |
6e8d2260 | 142 | Summary(pl.UTF-8): Klient DHCP |
3bb4bab9 | 143 | Group: Networking/Daemons |
132c7fb0 | 144 | Requires: bash |
eda193cb | 145 | Requires: coreutils |
132c7fb0 JP |
146 | Requires: grep |
147 | Requires: hostname | |
eda193cb | 148 | Requires: iproute2 |
132c7fb0 JP |
149 | Requires: sed |
150 | Requires: util-linux | |
51ba29e1 | 151 | Suggests: avahi-autoipd |
77e9a55a | 152 | Provides: dhclient = %{epoch}:%{version}-%{release} |
dd3090a5 | 153 | Obsoletes: dhclient |
990742a8 | 154 | Obsoletes: dhcpv6-client |
96d6b603 JR |
155 | Obsoletes: libdhcp4client |
156 | Obsoletes: libdhcp4client-devel | |
157 | Obsoletes: libdhcp4client-static | |
3bb4bab9 | 158 | |
159 | %description client | |
0770f14a | 160 | Dynamic Host Configuration Protocol Client. |
3bb4bab9 | 161 | |
39cd54ba | 162 | %description client -l pl.UTF-8 |
0770f14a | 163 | Klient DHCP (Dynamic Host Configuration Protocol). |
3bb4bab9 | 164 | |
e8a49f77 | 165 | %package client-dirs |
166 | Summary: DHCP Client common dirs | |
167 | Summary(pl.UTF-8): Katalogi klienta DHCP | |
168 | Group: Networking/Daemons | |
169 | ||
170 | %description client-dirs | |
171 | Directories for scripts for dhcp-client. | |
172 | ||
e4a792b4 | 173 | %description client-dirs -l pl.UTF-8 |
e8a49f77 | 174 | Katalog przeznaczony na skrypty dla klienta dhcp. |
175 | ||
45ef0575 | 176 | %package relay |
177 | Summary: DHCP Relay Agent | |
6e8d2260 | 178 | Summary(pl.UTF-8): Agent przekazywania informacji DHCP |
45ef0575 | 179 | Group: Networking/Daemons |
967af251 | 180 | Requires(post): coreutils |
ac30bae3 ER |
181 | Requires(post,preun): /sbin/chkconfig |
182 | Requires: rc-scripts >= 0.2.0 | |
990742a8 | 183 | Obsoletes: dhcpv6-relay |
45ef0575 | 184 | |
185 | %description relay | |
a4dfcb55 | 186 | Dhcp relay is a relay agent for DHCP packets. It is used on a subnet |
187 | with DHCP clients to "relay" their requests to a subnet that has a | |
188 | DHCP server on it. Because DHCP packets can be broadcast, they will | |
189 | not be routed off of the local subnet. The DHCP relay takes care of | |
190 | this for the client. | |
191 | ||
39cd54ba JR |
192 | %description relay -l pl.UTF-8 |
193 | Agent przekazywania DHCP (Dynamic Host Configuration Protocol) między | |
194 | podsieciami. Ponieważ komunikaty DHCP mogą być przekazywane w formie | |
195 | rozgłoszeniowej, bez tego agenta nie zostaną przerutowane do innej | |
cd42af6b | 196 | podsieci. |
45ef0575 | 197 | |
1d526f5b JK |
198 | %package devel |
199 | Summary: DHCP development includes and libs | |
6e8d2260 | 200 | Summary(pl.UTF-8): Pliki nagłówkowe i biblioteki dla oprogramowania DHCP |
1d526f5b JK |
201 | Group: Development/Libraries |
202 | ||
203 | %description devel | |
204 | Includes OMAPI and dhcptl libraries. | |
205 | ||
206 | OMAPI is an programming layer designed for controlling remote | |
207 | applications, and for querying them for their state. It is currently | |
208 | used by the ISC DHCP server. | |
209 | ||
210 | The dhcpctl set of functions provide an API that can be used to | |
211 | communicate with and manipulate a running ISC DHCP server. | |
212 | ||
39cd54ba | 213 | %description devel -l pl.UTF-8 |
1d526f5b JK |
214 | Zawiera biblioteki OMAPI oraz dhcpctl. |
215 | ||
216 | OMAPI to warstwa programowa stworzona do kontroli zdalnych aplikacji i | |
39cd54ba | 217 | odpytywania o ich stan. Aktualnie jest używana przez serwer ISC DHCP. |
1d526f5b | 218 | |
39cd54ba JR |
219 | dhcpctl to zbiór funkcji tworzących API, które może być używane do |
220 | komunikacji z działającym serwerem ISC DHCP i jego kontroli. | |
1d526f5b | 221 | |
cd3ce1e4 | 222 | %prep |
990742a8 | 223 | %setup -q -n %{name}-%{ver}%{pverdir} |
37332297 | 224 | %patch0 -p1 |
4ca0a88e | 225 | # This patch is required for dhcdbd to function |
ceee8beb ER |
226 | # CHECK ME: adds -x (formerly -y): |
227 | #The -x argument enables extended option information to be created in the | |
228 | #-s dhclient-script environment, which would allow applications running | |
229 | #in that environment to handle options they do not know about in advance - | |
230 | #this is a Red Hat extension to support dhcdbd and NetworkManager. | |
f805880f | 231 | # however, fedora doesn't have this patch anymore, so can drop? |
12777244 JK |
232 | #%%patch1 -p1 |
233 | %patch2 -p1 | |
4ca0a88e | 234 | %patch3 -p1 |
12777244 | 235 | %patch4 -p1 |
92eb981e | 236 | %patch5 -p1 |
74b36fbe | 237 | %patch6 -p1 |
12777244 JK |
238 | %patch7 -p1 |
239 | %patch8 -p1 | |
03a6f6c6 AM |
240 | %patch9 -p1 |
241 | %patch10 -p1 | |
1830ecd4 | 242 | %patch11 -p1 |
15c1a831 MK |
243 | %patch12 -p1 |
244 | %patch13 -p1 | |
245 | %patch14 -p1 | |
246 | %patch15 -p1 | |
247 | %patch16 -p1 | |
248 | %patch17 -p1 | |
249 | %patch18 -p1 | |
250 | %patch19 -p1 | |
251 | %patch20 -p1 | |
252 | %patch21 -p1 | |
253 | %patch22 -p1 | |
254 | %patch23 -p1 | |
255 | %patch24 -p1 | |
256 | %patch25 -p1 | |
257 | %patch26 -p1 | |
258 | %patch27 -p1 | |
259 | %patch28 -p1 | |
260 | ||
261 | cd bind | |
262 | tar -xvf bind.tar.gz | |
263 | ln -s bind-9* bind | |
264 | cd .. | |
265 | ||
266 | %patch29 -p1 | |
267 | %patch30 -p1 | |
ceee8beb ER |
268 | |
269 | # Copy in documentation and example scripts for LDAP patch to dhcpd | |
270 | cp -a %{SOURCE11} README.ldap | |
271 | cp -a %{SOURCE12} doc | |
272 | cp -a %{SOURCE13} contrib | |
273 | ||
ceee8beb ER |
274 | # Replace @PRODUCTNAME@ |
275 | %{__sed} -i -e 's|@PRODUCTNAME@|%{vvendor}|g' common/dhcp-options.5 | |
276 | %{__sed} -i -e 's|@PRODUCTNAME@|%{vvendor}|g' configure.ac | |
277 | ||
278 | # Update paths in all man pages | |
279 | for page in client/dhclient.conf.5 client/dhclient.leases.5 client/dhclient-script.8 client/dhclient.8; do | |
280 | %{__sed} -i -e 's|CLIENTBINDIR|/sbin|g' \ | |
281 | -e 's|RUNDIR|%{_localstatedir}/run|g' \ | |
282 | -e 's|DBDIR|%{_localstatedir}/db/dhclient|g' \ | |
283 | -e 's|ETCDIR|%{_sysconfdir}|g' $page | |
284 | done | |
285 | ||
286 | for page in server/dhcpd.conf.5 server/dhcpd.leases.5 server/dhcpd.8; do | |
287 | %{__sed} -i -e 's|CLIENTBINDIR|/sbin|g' \ | |
288 | -e 's|RUNDIR|%{_localstatedir}/run|g' \ | |
289 | -e 's|DBDIR|%{_localstatedir}/db/dhcpd|g' \ | |
290 | -e 's|ETCDIR|%{_sysconfdir}|g' $page | |
291 | done | |
292 | ||
0770f14a | 293 | %build |
03a6f6c6 AM |
294 | %{__libtoolize} |
295 | %{__aclocal} | |
296 | %{__autoconf} | |
297 | %{__autoheader} | |
298 | %{__automake} | |
4a7f1e32 | 299 | CFLAGS="%{rpmcflags} -fPIC -D_GNU_SOURCE=1" |
6e6494f3 | 300 | %configure \ |
d812b9c4 JP |
301 | %ifarch %{arm} |
302 | LIBS="-latomic" \ | |
303 | %endif | |
6db0fb84 | 304 | %{!?with_static_libs:--disable-static} \ |
6e6494f3 | 305 | --enable-dhcpv6 \ |
9f600e9f | 306 | --with-srv-lease-file=/var/lib/dhcpd/dhcpd.leases \ |
307 | --with-cli-lease-file=/var/lib/dhclient/dhclient.leases \ | |
308 | --with-srv-pid-file=/var/run/dhcpd.pid \ | |
309 | --with-cli-pid-file=/var/run/dhclient.pid \ | |
310 | --with-relay-pid-file=/var/run/dhcrelay.pid \ | |
1830ecd4 JP |
311 | --with%{!?with_ldap:out}-ldap \ |
312 | --with%{!?with_systemd:out}-systemd | |
19507c9d | 313 | %{__make} -j1 |
cd3ce1e4 | 314 | |
315 | %install | |
316 | rm -rf $RPM_BUILD_ROOT | |
51ba29e1 | 317 | install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,sysconfig,dhclient-enter-hooks.d,dhclient-exit-hooks.d},%{_pkgconfigdir},/var/lib/{dhcpd,dhclient}} |
cd3ce1e4 | 318 | |
771aee8c | 319 | %{__make} install \ |
6e6494f3 | 320 | DESTDIR=$RPM_BUILD_ROOT |
967af251 | 321 | |
cd3ce1e4 | 322 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/dhcpd |
6e6494f3 AM |
323 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/dhcpd6 |
324 | install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/dhcp-relay | |
325 | install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/dhcpd | |
326 | install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/dhcp-relay | |
12777244 | 327 | |
1830ecd4 JP |
328 | %if %{with systemd} |
329 | install -d $RPM_BUILD_ROOT%{systemdunitdir} | |
330 | cp -p %{SOURCE6} %{SOURCE7} %{SOURCE8} $RPM_BUILD_ROOT%{systemdunitdir} | |
331 | %endif | |
332 | ||
12777244 | 333 | install client/scripts/linux $RPM_BUILD_ROOT/sbin/dhclient-script |
cd3ce1e4 | 334 | |
96d6b603 JR |
335 | install server/dhcpd.conf.example $RPM_BUILD_ROOT%{_sysconfdir}/dhcpd.conf |
336 | install doc/examples/dhcpd-dhcpv6.conf $RPM_BUILD_ROOT%{_sysconfdir}/dhcpd6.conf | |
ceee8beb | 337 | |
967af251 | 338 | %if %{with ldap} |
ceee8beb | 339 | install -d $RPM_BUILD_ROOT%{schemadir} |
03a6f6c6 | 340 | install %{SOURCE10} $RPM_BUILD_ROOT%{schemadir} |
967af251 | 341 | %endif |
1d526f5b | 342 | |
4ca0a88e | 343 | :> $RPM_BUILD_ROOT%{_sysconfdir}/dhclient.conf |
9da55644 | 344 | |
ceee8beb | 345 | touch $RPM_BUILD_ROOT/var/lib/dhcpd/dhcpd.leases |
b0caeee3 | 346 | touch $RPM_BUILD_ROOT/var/lib/dhclient/dhclient.leases |
3bb4bab9 | 347 | |
ceee8beb | 348 | touch $RPM_BUILD_ROOT/var/lib/dhcpd/dhcpd6.leases |
8f0f47ea AM |
349 | touch $RPM_BUILD_ROOT/var/lib/dhclient/dhclient6.leases |
350 | ||
6db0fb84 ER |
351 | %if %{with static_libs} |
352 | # HACK: strip doesn't like .a inside .a | |
ceee8beb | 353 | install -d stripworkdir |
6db0fb84 ER |
354 | cd stripworkdir |
355 | for a in $RPM_BUILD_ROOT%{_libdir}/*.a; do | |
356 | archives=$(ar t $a | grep '\.a$' || :) | |
357 | [ "$archives" ] || continue | |
358 | ||
359 | # hope we don't have to recurse here | |
360 | for ar in $archives; do | |
361 | rm -f *.o *.a | |
362 | ar x $a $ar | |
363 | ar x $ar | |
364 | ar d $a $ar | |
365 | ar cr $a *.o | |
366 | done | |
367 | done | |
368 | cd - | |
369 | %endif | |
370 | ||
82fbb222 JB |
371 | %clean |
372 | rm -rf $RPM_BUILD_ROOT | |
373 | ||
cd3ce1e4 | 374 | %post |
ceee8beb | 375 | touch /var/lib/dhcpd/dhcpd.leases |
7089f517 | 376 | touch /var/lib/dhcpd/dhcpd6.leases |
3a01d42c | 377 | /sbin/chkconfig --add dhcpd |
30c45ada | 378 | %service dhcpd restart "dhcpd daemon" |
ceee8beb | 379 | /sbin/chkconfig --add dhcpd6 |
6e6494f3 | 380 | %service dhcpd6 restart "dhcpd IPv6 daemon" |
1830ecd4 | 381 | %{?with_systemd:%systemd_post dhcpd.service dhcpd6.service} |
cd3ce1e4 | 382 | |
208108e2 JB |
383 | %preun |
384 | if [ "$1" = "0" ];then | |
30c45ada | 385 | %service dhcpd stop |
208108e2 | 386 | /sbin/chkconfig --del dhcpd |
ceee8beb | 387 | %service dhcpd6 stop |
6e6494f3 | 388 | /sbin/chkconfig --del dhcpd6 |
208108e2 | 389 | fi |
1830ecd4 JP |
390 | %{?with_systemd:%systemd_preun dhcpd.service dhcpd6.service} |
391 | ||
392 | %postun | |
393 | %{?with_systemd:%systemd_reload} | |
208108e2 | 394 | |
1830ecd4 | 395 | %triggerpostun -- dhcp < 4.4.2-2 |
ceee8beb ER |
396 | if ! grep -q ddns-update-style /etc/dhcpd.conf; then |
397 | %{__sed} -i -e '1iddns-update-style none;' /etc/dhcpd.conf | |
6acbb058 | 398 | fi |
1830ecd4 | 399 | %systemd_trigger dhcpd.service dhcpd6.service |
6acbb058 | 400 | |
b62eae95 | 401 | %post -n openldap-schema-dhcp |
967af251 JR |
402 | %openldap_schema_register %{schemadir}/dhcp.schema -d core |
403 | %service -q ldap restart | |
404 | ||
b62eae95 | 405 | %postun -n openldap-schema-dhcp |
967af251 JR |
406 | if [ "$1" = "0" ]; then |
407 | %openldap_schema_unregister %{schemadir}/dhcp.schema | |
408 | %service -q ldap restart | |
409 | fi | |
410 | ||
7940deed | 411 | %post relay |
3a01d42c | 412 | /sbin/chkconfig --add dhcp-relay |
3a01d42c | 413 | if [ -f /var/lock/subsys/dhcrelay ]; then |
30c45ada | 414 | mv -f /var/lock/subsys/{dhcrelay,dhcp-relay} |
3a01d42c | 415 | fi |
30c45ada | 416 | %service dhcp-relay restart "dhcrelay daemon" |
1830ecd4 | 417 | %{?with_systemd:%systemd_post dhcp-relay.service} |
7940deed | 418 | |
7940deed | 419 | %preun relay |
3a01d42c | 420 | if [ "$1" = "0" ];then |
30c45ada | 421 | %service dhcp-relay stop |
3a01d42c | 422 | /sbin/chkconfig --del dhcp-relay |
423 | fi | |
1830ecd4 JP |
424 | %{?with_systemd:%systemd_preun dhcp-relay.service} |
425 | ||
426 | %postun relay | |
427 | %{?with_systemd:%systemd_reload} | |
428 | ||
429 | %triggerpostun -- dhcp-relay < 4.4.2-2 | |
430 | %systemd_trigger dhcp-relay.service | |
7940deed | 431 | |
51ba29e1 JK |
432 | %triggerun client -- %{name}-client < 4:4.0.2-2 |
433 | if [ -f /etc/dhclient-enter-hooks ] ; then | |
434 | mv /etc/dhclient-enter-hooks /etc/dhclient-enter-hooks.d/ | |
435 | fi | |
436 | if [ -f /etc/dhclient-exit-hooks ] ; then | |
437 | mv /etc/dhclient-exit-hooks /etc/dhclient-exit-hooks.d/ | |
438 | fi | |
439 | ||
cd3ce1e4 | 440 | %files |
441 | %defattr(644,root,root,755) | |
96d6b603 | 442 | %doc doc/* README RELNOTES server/dhcpd.conf.example LICENSE |
9f600e9f | 443 | %doc contrib/ms2isc %{?with_ldap:contrib/dhcpd-conf-to-ldap README.ldap} |
ac30bae3 ER |
444 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/dhcpd |
445 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dhcpd.conf | |
a5aaaa8f | 446 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dhcpd6.conf |
967af251 | 447 | %attr(755,root,root) %{_bindir}/omshell |
cd3ce1e4 | 448 | %attr(755,root,root) %{_sbindir}/dhcpd |
d3d402da | 449 | %attr(754,root,root) /etc/rc.d/init.d/dhcpd |
6e6494f3 | 450 | %attr(754,root,root) /etc/rc.d/init.d/dhcpd6 |
1830ecd4 JP |
451 | %if %{with systemd} |
452 | %{systemdunitdir}/dhcpd.service | |
453 | %{systemdunitdir}/dhcpd6.service | |
454 | %endif | |
ceee8beb ER |
455 | %attr(750,root,root) %dir /var/lib/dhcpd |
456 | %ghost /var/lib/dhcpd/dhcpd.leases | |
457 | %ghost /var/lib/dhcpd/dhcpd6.leases | |
6acbb058 JB |
458 | %{_mandir}/man1/omshell.1* |
459 | %{_mandir}/man5/dhcp-eval.5* | |
460 | %{_mandir}/man5/dhcp-options.5* | |
461 | %{_mandir}/man5/dhcpd.conf.5* | |
462 | %{_mandir}/man5/dhcpd.leases.5* | |
463 | %{_mandir}/man8/dhcpd.8* | |
3bb4bab9 | 464 | |
465 | %files client | |
ccf64540 | 466 | %defattr(644,root,root,755) |
96d6b603 | 467 | %doc contrib/sethostname.sh client/dhclient.conf.example |
967af251 | 468 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dhclient.conf |
3bb4bab9 | 469 | %attr(755,root,root) /sbin/dhclient |
ceee8beb | 470 | %attr(755,root,root) /sbin/dhclient-script |
6acbb058 JB |
471 | %{_mandir}/man5/dhclient.conf.5* |
472 | %{_mandir}/man5/dhclient.leases.5* | |
473 | %{_mandir}/man8/dhclient.8* | |
474 | %{_mandir}/man8/dhclient-script.8* | |
ceee8beb | 475 | %dir %attr(750,root,root) /var/lib/dhclient |
b0caeee3 | 476 | %ghost /var/lib/dhclient/dhclient.leases |
8f0f47ea | 477 | %ghost /var/lib/dhclient/dhclient6.leases |
45ef0575 | 478 | |
e8a49f77 | 479 | %files client-dirs |
480 | %defattr(644,root,root,755) | |
481 | %dir %{_sysconfdir}/dhclient-enter-hooks.d | |
482 | %dir %{_sysconfdir}/dhclient-exit-hooks.d | |
483 | ||
45ef0575 | 484 | %files relay |
485 | %defattr(644,root,root,755) | |
ac30bae3 | 486 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/dhcp-relay |
45ef0575 | 487 | %attr(755,root,root) %{_sbindir}/dhcrelay |
3ac86cff | 488 | %attr(754,root,root) /etc/rc.d/init.d/dhcp-relay |
1830ecd4 | 489 | %{?with_systemd:%{systemdunitdir}/dhcp-relay.service} |
6acbb058 | 490 | %{_mandir}/man8/dhcrelay.8* |
1d526f5b JK |
491 | |
492 | %files devel | |
493 | %defattr(644,root,root,755) | |
3ae1beff | 494 | %{_libdir}/libdhcp.a |
6acbb058 JB |
495 | %{_libdir}/libdhcpctl.a |
496 | %{_libdir}/libomapi.a | |
6e6494f3 | 497 | %{_includedir}/dhcpctl |
6acbb058 JB |
498 | %{_includedir}/omapip |
499 | %{_mandir}/man3/dhcpctl.3* | |
500 | %{_mandir}/man3/omapi.3* | |
c494ae74 | 501 | |
ceee8beb ER |
502 | %if %{with ldap} |
503 | %files -n openldap-schema-dhcp | |
504 | %defattr(644,root,root,755) | |
505 | %{schemadir}/dhcp.schema | |
506 | %endif |