/[packages]/updates/5/dhcp/current/SPECS/dhcp.spec
ViewVC logotype

Contents of /updates/5/dhcp/current/SPECS/dhcp.spec

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.30