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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.30