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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.30