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

  ViewVC Help
Powered by ViewVC 1.1.26