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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 331827 - (hide annotations) (download)
Sun Dec 16 22:47:45 2012 UTC (11 years, 4 months ago) by guillomovitch
Original Path: cauldron/dhcp/current/SPECS/dhcp.spec
File size: 11422 byte(s)
- drop static libs
- use /run instead of /var/run for pid files
- switch to tmpfs for /run subdirectories
- use distinct state directories for client and server, as in fedora

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

  ViewVC Help
Powered by ViewVC 1.1.30