1 |
dmorgan |
16733 |
%define _catdir /var/cache/man |
2 |
|
|
|
3 |
oden |
405968 |
%define major_version 4.2.5 |
4 |
|
|
%define patch_version P1 |
5 |
anssi |
188952 |
|
6 |
dmorgan |
16733 |
Name: dhcp |
7 |
guillomovitch |
276555 |
Epoch: 3 |
8 |
guillomovitch |
197339 |
Version: %{major_version}%{patch_version} |
9 |
oden |
405968 |
Release: %mkrel 1 |
10 |
guillomovitch |
197339 |
Summary: The ISC DHCP (Dynamic Host Configuration Protocol) server/relay agent/client |
11 |
dmorgan |
16733 |
License: Distributable |
12 |
|
|
Group: System/Servers |
13 |
guillomovitch |
136282 |
URL: http://www.isc.org/software/dhcp |
14 |
luigiwalser |
344562 |
Source0: ftp://ftp.isc.org/isc/%{name}/%{major_version}-%{patch_version}/%{name}-%{major_version}-%{patch_version}.tar.gz |
15 |
|
|
Source1: ftp://ftp.isc.org/isc/%{name}/%{major_version}-%{patch_version}/%{name}-%{major_version}-%{patch_version}.tar.gz.sha512.asc |
16 |
dmorgan |
16733 |
Source2: dhcpd.conf |
17 |
|
|
Source4: dhcp-dynamic-dns-examples.tar.bz2 |
18 |
|
|
Source7: dhcpreport.pl |
19 |
|
|
Source8: dhcpd-chroot.sh |
20 |
tv |
84559 |
# (eugeni) dhclient-exit-hooks script |
21 |
|
|
Source9: dhclient-exit-hooks |
22 |
guillomovitch |
138691 |
Source10: draft-ietf-dhc-ldap-schema-01.txt |
23 |
|
|
Source12: dhcpd.service |
24 |
|
|
Source14: dhcpd6.service |
25 |
|
|
Source16: dhcrelay.service |
26 |
guillomovitch |
331827 |
Source17: dhcpd.tmpfiles |
27 |
|
|
Source18: dhclient.tmpfiles |
28 |
|
|
Source19: dhcrelay.tmpfiles |
29 |
guillomovitch |
142670 |
# mageia patches |
30 |
|
|
Patch100: dhcp-4.2.2-ifup.patch |
31 |
|
|
Patch101: dhcp-4.2.2-fix-format-errors.patch |
32 |
dmorgan |
16733 |
# prevents needless deassociation, working around mdv bug #43441 |
33 |
guillomovitch |
142670 |
Patch102: dhcp-4.1.1-prevent_wireless_deassociation.patch |
34 |
oden |
405980 |
Patch103: dhcp-4.2.5-P1-man.patch |
35 |
guillomovitch |
142670 |
# fedora patches |
36 |
guillomovitch |
335360 |
Patch7: dhcp-4.2.0-default-requested-options.patch |
37 |
luigiwalser |
288629 |
Patch8: dhcp-4.2.2-xen-checksum.patch |
38 |
|
|
Patch15: dhcp-4.2.2-missing-ipv6-not-fatal.patch |
39 |
|
|
Patch17: dhcp-4.2.0-add_timeout_when_NULL.patch |
40 |
|
|
Patch18: dhcp-4.2.4-64_bit_lease_parse.patch |
41 |
guillomovitch |
136282 |
BuildRequires: groff-for-man |
42 |
dmorgan |
16733 |
BuildRequires: openldap-devel |
43 |
luigiwalser |
288629 |
Requires(post): rpm-helper >= 0.24.8-1 |
44 |
tmb |
233666 |
Requires(preun): rpm-helper >= 0.24.8-1 |
45 |
dmorgan |
16733 |
|
46 |
|
|
%description |
47 |
|
|
DHCP (Dynamic Host Configuration Protocol) is a protocol which allows |
48 |
|
|
individual devices on an IP network to get their own network configuration |
49 |
|
|
information (IP address, subnetmask, broadcast address, etc.) from a DHCP |
50 |
|
|
server. The overall purpose of DHCP is to make it easier to administer a |
51 |
|
|
large network. The dhcp package includes the DHCP server and a DHCP relay |
52 |
|
|
agent. You will also need to install the dhcp-client or dhcpcd package, |
53 |
|
|
or pump or dhcpxd, which provides the DHCP client daemon, on client machines. |
54 |
|
|
|
55 |
|
|
If you want the DHCP server and/or relay, you will also need to install the |
56 |
|
|
dhcp-server and/or dhcp-relay packages. |
57 |
|
|
|
58 |
|
|
%package common |
59 |
|
|
Summary: The ISC DHCP (Dynamic Host Configuration Protocol) server |
60 |
|
|
Group: System/Servers |
61 |
|
|
|
62 |
|
|
%description common |
63 |
|
|
DHCP (Dynamic Host Configuration Protocol) is a protocol which allows |
64 |
|
|
individual devices on an IP network to get their own network |
65 |
|
|
configuration information (IP address, subnetmask, broadcast address, |
66 |
|
|
etc.) from a DHCP server. The overall purpose of DHCP is to make it |
67 |
|
|
easier to administer a large network. The dhcp package includes the |
68 |
|
|
DHCP server and a DHCP relay agent. |
69 |
|
|
|
70 |
|
|
You will also need to install the dhcp-client or dhcpcd package, or pump or |
71 |
|
|
dhcpxd, which provides the DHCP client daemon, on client machines. If you |
72 |
|
|
want the DHCP server and/or relay, you will also need to install the |
73 |
|
|
dhcp-server and/or dhcp-relay packages. |
74 |
|
|
|
75 |
|
|
%package doc |
76 |
|
|
Summary: Documentation about the ISC DHCP server/client |
77 |
|
|
Group: System/Servers |
78 |
|
|
|
79 |
|
|
%description doc |
80 |
|
|
This package contains RFC/API/protocol documentation about the ISC |
81 |
|
|
DHCP server and client. |
82 |
|
|
|
83 |
|
|
DHCP (Dynamic Host Configuration Protocol) is a protocol which allows |
84 |
|
|
individual devices on an IP network to get their own network |
85 |
|
|
configuration information (IP address, subnetmask, broadcast address, |
86 |
|
|
etc.) from a DHCP server. The overall purpose of DHCP is to make it |
87 |
|
|
easier to administer a large network. The dhcp package includes the |
88 |
|
|
DHCP server and a DHCP relay agent. |
89 |
|
|
|
90 |
|
|
%package server |
91 |
|
|
Summary: The ISC DHCP (Dynamic Host Configuration Protocol) server |
92 |
|
|
Group: System/Servers |
93 |
|
|
Requires: dhcp-common = %{epoch}:%{version}-%{release} |
94 |
colin |
405136 |
Requires(post): systemd >= %{systemd_required_version} |
95 |
tmb |
233666 |
Requires(post): rpm-helper >= 0.24.8-1 |
96 |
|
|
Requires(preun): rpm-helper >= 0.24.8-1 |
97 |
dmorgan |
16733 |
|
98 |
|
|
%description server |
99 |
|
|
DHCP server is the Internet Software Consortium (ISC) DHCP server for various |
100 |
|
|
UNIX operating systems. It allows a UNIX mac hine to serve DHCP requests from |
101 |
|
|
the network. |
102 |
|
|
|
103 |
|
|
You should install dhcp-server if you want to set up a DHCP server on your |
104 |
|
|
network. You will also need to install the base dhcp package. |
105 |
|
|
|
106 |
|
|
%package client |
107 |
|
|
Summary: The ISC DHCP (Dynamic Host Configuration Protocol) client |
108 |
|
|
Group: System/Servers |
109 |
|
|
Requires: dhcp-common = %{epoch}:%{version}-%{release} |
110 |
colin |
405136 |
Requires(post): systemd >= %{systemd_required_version} |
111 |
dmorgan |
16733 |
|
112 |
|
|
%description client |
113 |
|
|
DHCP client is the Internet Software Consortium (ISC) DHCP client for various |
114 |
|
|
UNIX operating systems. It allows a UNIX mac hine to obtain it's networking |
115 |
|
|
parameters from a DHCP server. |
116 |
|
|
|
117 |
|
|
You should install dhcp-client if you want to use the ISC DHCP client instead |
118 |
|
|
of the Red Hat DHCP client, pump, or dhcpcd, or dhcpxd. You will also need to |
119 |
|
|
install the base dhcp package. |
120 |
|
|
|
121 |
|
|
%package relay |
122 |
|
|
Summary: The ISC DHCP (Dynamic Host Configuration Protocol) relay |
123 |
|
|
Group: System/Servers |
124 |
|
|
Requires: dhcp-common = %{epoch}:%{version}-%{release} |
125 |
colin |
405136 |
Requires(post): systemd >= %{systemd_required_version} |
126 |
tmb |
233666 |
Requires(post): rpm-helper >= 0.24.8-1 |
127 |
|
|
Requires(preun): rpm-helper >= 0.24.8-1 |
128 |
dmorgan |
16733 |
|
129 |
|
|
%description relay |
130 |
|
|
DHCP relay is the Internet Software Consortium (ISC) relay agent for DHCP |
131 |
|
|
packets. It is used on a subnet with DHCP clients to "relay" their requests |
132 |
|
|
to a subnet that has a DHCP server on it. Because DHCP packets can be |
133 |
|
|
broadcast, they will not be routed off of the local subnet. The DHCP relay |
134 |
|
|
takes care of this for the client. You will need to set the environment |
135 |
|
|
variable SERVERS and optionally OPTIONS in /etc/sysconfig/dhcrelay before |
136 |
|
|
starting the server. |
137 |
|
|
|
138 |
|
|
%package devel |
139 |
|
|
Summary: Development headers and libraries for the dhcpctl API |
140 |
|
|
Group: Development/Other |
141 |
|
|
Requires: dhcp-common = %{epoch}:%{version}-%{release} |
142 |
|
|
|
143 |
|
|
%description devel |
144 |
|
|
DHCP devel contains all of the libraries and headers for developing with the |
145 |
|
|
Internet Software Consortium (ISC) dhcpctl API. |
146 |
|
|
|
147 |
|
|
%prep |
148 |
luigiwalser |
344562 |
%setup -q -n %{name}-%{major_version}-%{patch_version} |
149 |
guillomovitch |
142670 |
%patch100 -p1 -b .ifup |
150 |
|
|
%patch101 -p1 -b .format_not_a_string_literal_and_no_format_arguments |
151 |
|
|
%patch102 -p1 -b .prevent_wireless_deassociation |
152 |
guillomovitch |
335360 |
%patch103 -p1 -b .man |
153 |
dmorgan |
16733 |
|
154 |
guillomovitch |
335360 |
# Add NIS domain, NIS servers, NTP servers, interface-mtu and domain-search |
155 |
|
|
# to the list of default requested DHCP options |
156 |
|
|
%patch7 -p1 -b .requested |
157 |
guillomovitch |
142670 |
# Handle Xen partial UDP checksums |
158 |
|
|
%patch8 -p1 -b .xen |
159 |
|
|
# If the ipv6 kernel module is missing, do not segfault |
160 |
|
|
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #19367]) |
161 |
|
|
%patch15 -p1 -b .noipv6 |
162 |
|
|
# Handle cases in add_timeout() where the function is called with a NULL |
163 |
|
|
# value for the 'when' parameter |
164 |
|
|
%patch17 -p1 -b .dracut |
165 |
|
|
# Ensure 64-bit platforms parse lease file dates & times correctly |
166 |
|
|
%patch18 -p1 -b .64-bit_lease_parse |
167 |
|
|
|
168 |
guillomovitch |
138691 |
install -m0644 %{SOURCE10} doc |
169 |
dmorgan |
16733 |
|
170 |
|
|
%build |
171 |
|
|
%serverbuild |
172 |
|
|
%configure2_5x --enable-paranoia --enable-early-chroot \ |
173 |
|
|
--with-ldapcrypto \ |
174 |
guillomovitch |
331827 |
--with-srv-lease-file=%{_var}/lib/dhcpd/dhcpd.leases \ |
175 |
|
|
--with-srv6-lease-file=%{_var}/lib/dhcpd/dhcpd6.leases \ |
176 |
|
|
--with-cli-lease-file=%{_var}/lib/dhclient/dhclient.leases \ |
177 |
|
|
--with-cli6-lease-file=%{_var}/lib/dhclient/dhclient6.leases \ |
178 |
|
|
--with-srv-pid-file=/run/dhcpd/dhcpd.pid \ |
179 |
|
|
--with-srv6-pid-file=/run/dhcpd/dhcpd6.pid \ |
180 |
|
|
--with-cli-pid-file=/run/dhclient/dhclient.pid \ |
181 |
|
|
--with-cli6-pid-file=/run/dhclient/dhclient6.pid \ |
182 |
|
|
--with-relay-pid-file=/run/dhcrelay/dhcrelay.pid \ |
183 |
|
|
--disable-static |
184 |
dmorgan |
16733 |
%make |
185 |
|
|
|
186 |
|
|
%install |
187 |
|
|
rm -rf %{buildroot} |
188 |
|
|
|
189 |
|
|
%makeinstall_std |
190 |
|
|
|
191 |
|
|
# Install correct dhclient-script |
192 |
guillomovitch |
331827 |
install -d %{buildroot}/sbin |
193 |
|
|
mv %{buildroot}%{_sbindir}/dhclient %{buildroot}/sbin/dhclient |
194 |
|
|
install -m 755 client/scripts/linux %{buildroot}/sbin/dhclient-script |
195 |
dmorgan |
16733 |
|
196 |
guillomovitch |
276012 |
install -d %{buildroot}%{_unitdir} |
197 |
|
|
install -m 644 %{SOURCE12} %{buildroot}%{_unitdir}/dhcpd.service |
198 |
|
|
install -m 644 %{SOURCE14} %{buildroot}%{_unitdir}/dhcpd6.service |
199 |
|
|
install -m 644 %{SOURCE16} %{buildroot}%{_unitdir}/dhcrelay.service |
200 |
dmorgan |
16733 |
|
201 |
colin |
405136 |
install -D -p -m 644 %{SOURCE17} %{buildroot}%{_tmpfilesdir}/dhcpd.conf |
202 |
|
|
install -D -p -m 644 %{SOURCE18} %{buildroot}%{_tmpfilesdir}/dhclient.conf |
203 |
|
|
install -D -p -m 644 %{SOURCE19} %{buildroot}%{_tmpfilesdir}/dhcrelay.conf |
204 |
dmorgan |
16733 |
|
205 |
guillomovitch |
331827 |
install -m 755 %{SOURCE7} %{SOURCE8} %{buildroot}%{_sbindir} |
206 |
|
|
install -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir} |
207 |
|
|
install -m 755 contrib/ldap/dhcpd-conf-to-ldap %{buildroot}%{_sbindir} |
208 |
|
|
|
209 |
tv |
84559 |
# install exit-hooks script to /etc/ |
210 |
guillomovitch |
331827 |
install -m 755 %{SOURCE9} %{buildroot}%{_sysconfdir} |
211 |
tv |
84559 |
|
212 |
guillomovitch |
331827 |
install -d %{buildroot}%{_sysconfdir}/sysconfig |
213 |
dmorgan |
16733 |
cat > %{buildroot}%{_sysconfdir}/sysconfig/dhcpd <<EOF |
214 |
|
|
# You can set here various option for dhcpd |
215 |
|
|
|
216 |
|
|
# Which configuration file to use. |
217 |
|
|
# CONFIGFILE="/etc/dhcpd.conf" |
218 |
|
|
|
219 |
|
|
# Where to store the lease state information. |
220 |
guillomovitch |
332184 |
# LEASEFILE="/var/lib/dhcpd/dhcpd.leases" |
221 |
dmorgan |
16733 |
|
222 |
|
|
# Define INTERFACES to limit which network interfaces dhcpd listens on. |
223 |
|
|
# The default null value causes dhcpd to listen on all interfaces. |
224 |
|
|
#INTERFACES="" |
225 |
|
|
|
226 |
|
|
# Define OPTIONS with any other options to pass to the dhcpd server. |
227 |
|
|
# See dhcpd(8) for available options and syntax. |
228 |
|
|
OPTIONS="-q" |
229 |
|
|
EOF |
230 |
|
|
|
231 |
guillomovitch |
331827 |
install -d %{buildroot}%{_var}/lib/dhcpd |
232 |
|
|
touch %{buildroot}%{_var}/lib/dhcpd/dhcpd.leases |
233 |
|
|
install -d %{buildroot}%{_var}/lib/dhclient |
234 |
|
|
touch %{buildroot}%{_var}/lib/dhclient/dhclient.leases |
235 |
dmorgan |
16733 |
|
236 |
|
|
cat > %{buildroot}%{_sysconfdir}/sysconfig/dhcrelay <<EOF |
237 |
|
|
# Define SERVERS with a list of one or more DHCP servers where |
238 |
|
|
# DHCP packets are to be relayed to and from. This is mandatory. |
239 |
|
|
#SERVERS="10.11.12.13 10.9.8.7" |
240 |
|
|
SERVERS="" |
241 |
|
|
|
242 |
|
|
# Define OPTIONS with any other options to pass to the dhcrelay server. |
243 |
|
|
# See dhcrelay(8) for available options and syntax. |
244 |
|
|
#OPTIONS="-q -i eth0 -i eth1" |
245 |
|
|
OPTIONS="-q" |
246 |
|
|
EOF |
247 |
|
|
|
248 |
|
|
find . -type d -exec chmod 0755 {} \; |
249 |
|
|
find . -type f -exec chmod 0644 {} \; |
250 |
|
|
|
251 |
|
|
rm -rf doc/ja_JP.eucJP |
252 |
|
|
|
253 |
|
|
# remove empty files |
254 |
|
|
find -size 0 |grep ldap | xargs rm -rf |
255 |
|
|
|
256 |
|
|
# remove unwanted file |
257 |
oden |
405968 |
rm -f %{buildroot}%{_sysconfdir}/dhclient.conf.example |
258 |
|
|
rm -f %{buildroot}%{_sysconfdir}/dhcpd.conf.example |
259 |
guillomovitch |
331827 |
rm -f %{buildroot}%{_libdir}/*.a |
260 |
dmorgan |
16733 |
|
261 |
dmorgan |
203650 |
%pre server |
262 |
|
|
%_pre_useradd dhcpd /dev/null /bin/false |
263 |
|
|
|
264 |
dmorgan |
16733 |
%post server |
265 |
|
|
%_post_service dhcpd |
266 |
colin |
405136 |
%_tmpfilescreate dhcpd |
267 |
dmorgan |
16733 |
# New dhcpd lease file |
268 |
guillomovitch |
331827 |
if [ ! -f %{_var}/lib/dhcpd/dhcpd.leases ]; then |
269 |
|
|
touch %{_var}/lib/dhcpd/dhcpd.leases |
270 |
dmorgan |
16733 |
fi |
271 |
|
|
|
272 |
|
|
%preun server |
273 |
|
|
%_preun_service dhcpd |
274 |
|
|
|
275 |
|
|
%post relay |
276 |
|
|
%_post_service dhcrelay |
277 |
colin |
405136 |
%_tmpfilescreate dhcrelay |
278 |
dmorgan |
16733 |
|
279 |
|
|
%preun relay |
280 |
|
|
%_preun_service dhcrelay |
281 |
|
|
|
282 |
|
|
%post client |
283 |
guillomovitch |
331827 |
touch %{_var}/lib/dhclient/dhclient.leases |
284 |
colin |
405136 |
%_tmpfilescreate dhclient |
285 |
dmorgan |
16733 |
|
286 |
|
|
%postun client |
287 |
guillomovitch |
331827 |
rm -rf %{_var}/lib/dhclient/dhclient.leases |
288 |
dmorgan |
16733 |
|
289 |
|
|
%files common |
290 |
|
|
%doc README contrib/ldap/README.ldap RELNOTES |
291 |
|
|
%doc contrib/3.0b1-lease-convert |
292 |
|
|
%{_mandir}/man5/dhcp-options.5* |
293 |
|
|
|
294 |
|
|
%files doc |
295 |
|
|
%doc doc/* |
296 |
|
|
|
297 |
|
|
%files server |
298 |
oden |
405968 |
%doc server/dhcpd.conf.example tests/failover contrib/ldap/dhcp.schema |
299 |
guillomovitch |
276012 |
%{_unitdir}/dhcpd.service |
300 |
|
|
%{_unitdir}/dhcpd6.service |
301 |
guillomovitch |
331827 |
%{_tmpfilesdir}/dhcpd.conf |
302 |
dmorgan |
16733 |
%config(noreplace) %{_sysconfdir}/dhcpd.conf |
303 |
tv |
84559 |
%config(noreplace) %{_sysconfdir}/dhclient-exit-hooks |
304 |
dmorgan |
16733 |
%config(noreplace) %{_sysconfdir}/sysconfig/dhcpd |
305 |
|
|
%{_sbindir}/dhcpd |
306 |
|
|
%{_sbindir}/dhcpreport.pl |
307 |
|
|
%{_sbindir}/dhcpd-conf-to-ldap |
308 |
|
|
%{_sbindir}/dhcpd-chroot.sh |
309 |
|
|
%{_bindir}/omshell |
310 |
|
|
%{_mandir}/man1/omshell.1* |
311 |
|
|
%{_mandir}/man3/omapi.3* |
312 |
|
|
%{_mandir}/man5/dhcpd.conf.5* |
313 |
|
|
%{_mandir}/man5/dhcpd.leases.5* |
314 |
|
|
%{_mandir}/man5/dhcp-eval.5* |
315 |
|
|
%{_mandir}/man8/dhcpd.8* |
316 |
guillomovitch |
331827 |
%dir %{_var}/lib/dhcpd |
317 |
|
|
%config(noreplace) %ghost %{_var}/lib/dhcpd/dhcpd.leases |
318 |
dmorgan |
16733 |
|
319 |
|
|
%files relay |
320 |
guillomovitch |
276012 |
%{_unitdir}/dhcrelay.service |
321 |
guillomovitch |
331827 |
%{_tmpfilesdir}/dhcrelay.conf |
322 |
dmorgan |
16733 |
%config(noreplace) %{_sysconfdir}/sysconfig/dhcrelay |
323 |
|
|
%{_sbindir}/dhcrelay |
324 |
|
|
%{_mandir}/man8/dhcrelay.8* |
325 |
|
|
|
326 |
|
|
%files client |
327 |
oden |
405968 |
%doc client/dhclient.conf.example |
328 |
dmorgan |
16733 |
%attr (0755,root,root) /sbin/dhclient-script |
329 |
guillomovitch |
331827 |
%{_tmpfilesdir}/dhclient.conf |
330 |
dmorgan |
16733 |
/sbin/dhclient |
331 |
|
|
%{_mandir}/man5/dhclient.conf.5* |
332 |
|
|
%{_mandir}/man5/dhclient.leases.5* |
333 |
|
|
%{_mandir}/man8/dhclient.8* |
334 |
|
|
%{_mandir}/man8/dhclient-script.8* |
335 |
guillomovitch |
331827 |
%dir %{_var}/lib/dhclient |
336 |
|
|
%config(noreplace) %ghost %{_var}/lib/dhclient/dhclient.leases |
337 |
dmorgan |
16733 |
|
338 |
|
|
%files devel |
339 |
|
|
%{_includedir}/* |
340 |
|
|
%{_mandir}/man3/* |