/[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 138691 - (show annotations) (download)
Mon Sep 5 09:17:05 2011 UTC (9 years, 9 months ago) by guillomovitch
File size: 10320 byte(s)
- sync init scripts with fedora (lsb headers, mostly)
- ship systemd service files

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

  ViewVC Help
Powered by ViewVC 1.1.28