/[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 142670 - (hide annotations) (download)
Mon Sep 12 11:40:26 2011 UTC (12 years, 6 months ago) by guillomovitch
File size: 10818 byte(s)
- resync ipv6-not-fatal patch with fedora
- add 3 new fedora patches
 * dhcp-4.2.0-add_timeout_when_NULL.patch
 * dhcp-4.2.1-64_bit_lease_parse.patch
 * dhcp-4.2.2-xen-checksum.patch (attempt to fix #1243)

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

  ViewVC Help
Powered by ViewVC 1.1.30