/[packages]/cauldron/dhcp/current/SPECS/dhcp.spec
ViewVC logotype

Annotation of /cauldron/dhcp/current/SPECS/dhcp.spec

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.28