]>
Commit | Line | Data |
---|---|---|
fa424e73 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with ldap # with support for ldap storage | |
4 | # | |
8dc004f7 | 5 | Summary: DHCP Server |
6e8d2260 ER |
6 | Summary(es.UTF-8): Servidor DHCP |
7 | Summary(pl.UTF-8): Serwer DHCP | |
8 | Summary(pt_BR.UTF-8): Servidor DHCP (Protocolo de configuração dinâmica de hosts) | |
cd3ce1e4 | 9 | Name: dhcp |
0ed97b59 | 10 | Version: 3.1.0a3 |
eda193cb | 11 | Release: 0.3 |
9598ee90 | 12 | Epoch: 4 |
aa104090 | 13 | License: distributable |
cd3ce1e4 | 14 | Group: Networking/Daemons |
748a53c8 | 15 | Source0: ftp://ftp.isc.org/isc/dhcp/%{name}-%{version}.tar.gz |
0ed97b59 | 16 | # Source0-md5: d09be1a80982b78482e8fbd416924468 |
a4dfcb55 | 17 | Source1: %{name}.init |
18 | Source2: %{name}-relay.init | |
19 | Source3: %{name}-relay.sysconfig | |
20 | Source4: %{name}d.conf.sample | |
21 | Source5: %{name}.sysconfig | |
eda193cb JR |
22 | Patch0: %{name}-dhclient.script.patch |
23 | Patch1: %{name}-if_buffer_size.patch | |
24 | Patch2: %{name}-ldap.patch | |
25 | Patch3: %{name}-ldap1.patch | |
26 | Patch4: %{name}-client-script-redhat.patch | |
27 | Patch5: %{name}-3.0.3-x-option.patch | |
28 | Patch6: %{name}-typo.patch | |
29 | Patch7: %{name}-arg-concat.patch | |
30 | Patch8: %{name}-split-VARDB.patch | |
5ea0fa25 | 31 | URL: http://www.isc.org/sw/dhcp/ |
bca716bd | 32 | BuildRequires: groff |
5deae13f | 33 | %{?with_ldap:BuildRequires: openldap-devel} |
30c45ada | 34 | BuildRequires: rpmbuild(macros) >= 1.268 |
208108e2 | 35 | Requires(post): fileutils |
ac30bae3 ER |
36 | Requires(post,preun): /sbin/chkconfig |
37 | Requires: rc-scripts >= 0.2.0 | |
73612d9c | 38 | Provides: dhcpd |
bf74a63f | 39 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
cd3ce1e4 | 40 | |
41 | %description | |
0770f14a | 42 | DHCP (Dynamic Host Configuration Protocol) is a protocol which allows |
37bec083 | 43 | individual devices on an IP network to get their own network |
44 | configuration information (IP address, subnetmask, broadcast address, | |
45 | etc.) from a DHCP server. The overall purpose of DHCP is to make it | |
46 | easier to administer a large network. | |
0770f14a | 47 | |
39cd54ba | 48 | %description -l es.UTF-8 |
1f522308 | 49 | DHCP permite que hosts en una red TCP/IP soliciten y tengan sus |
39cd54ba JR |
50 | direcciones IP alocadas dinámicamente, permite también descubrir |
51 | información sobre la red en que están conectados. BOOTP provee una | |
1f522308 | 52 | funcionalidad similar, con ciertas restricciones. Este servidor |
39cd54ba | 53 | también las atiende. |
1f522308 | 54 | |
39cd54ba | 55 | %description -l pl.UTF-8 |
b7cc5fa2 | 56 | Serwer DHCP (Dynamic Host Configuration Protocol). |
cd3ce1e4 | 57 | |
39cd54ba | 58 | DHCP to protokół pozwalający urządzeniom pracującym w sieci IP na |
cd42af6b | 59 | pobieranie ich konfiguracji IP (adresu, maski podsieci, adresu |
39cd54ba JR |
60 | rozgłoszeniowego itp.) z serwera DHCP. Ułatwia on administrowanie |
61 | dużymi sieciami IP. | |
cd42af6b | 62 | |
39cd54ba | 63 | %description -l pt_BR.UTF-8 |
1f522308 | 64 | DHCP permite que hosts numa rede TCP/IP requisitem e tenham seus |
39cd54ba JR |
65 | endereços IP alocados dinamicamente, permite também descobrir |
66 | informações sobre a rede em que estão conectados. BOOTP provê uma | |
67 | funcionalidade similar, com certas restrições. Este servidor também | |
68 | atende aquelas requisições. Esta versão é ainda considerada um | |
1f522308 | 69 | software BETA. |
70 | ||
3bb4bab9 | 71 | %package client |
72 | Summary: DHCP Client | |
6e8d2260 | 73 | Summary(pl.UTF-8): Klient DHCP |
3bb4bab9 | 74 | Group: Networking/Daemons |
208108e2 | 75 | Requires(post): fileutils |
eda193cb JR |
76 | Requires: coreutils |
77 | Requires: iproute2 | |
78 | Requires: net-tools | |
dd3090a5 | 79 | Obsoletes: dhclient |
30c45ada | 80 | Obsoletes: pump |
3bb4bab9 | 81 | |
82 | %description client | |
0770f14a | 83 | Dynamic Host Configuration Protocol Client. |
3bb4bab9 | 84 | |
39cd54ba | 85 | %description client -l pl.UTF-8 |
0770f14a | 86 | Klient DHCP (Dynamic Host Configuration Protocol). |
3bb4bab9 | 87 | |
45ef0575 | 88 | %package relay |
89 | Summary: DHCP Relay Agent | |
6e8d2260 | 90 | Summary(pl.UTF-8): Agent przekazywania informacji DHCP |
45ef0575 | 91 | Group: Networking/Daemons |
208108e2 | 92 | Requires(post): fileutils |
ac30bae3 ER |
93 | Requires(post,preun): /sbin/chkconfig |
94 | Requires: rc-scripts >= 0.2.0 | |
45ef0575 | 95 | |
96 | %description relay | |
a4dfcb55 | 97 | Dhcp relay is a relay agent for DHCP packets. It is used on a subnet |
98 | with DHCP clients to "relay" their requests to a subnet that has a | |
99 | DHCP server on it. Because DHCP packets can be broadcast, they will | |
100 | not be routed off of the local subnet. The DHCP relay takes care of | |
101 | this for the client. | |
102 | ||
39cd54ba JR |
103 | %description relay -l pl.UTF-8 |
104 | Agent przekazywania DHCP (Dynamic Host Configuration Protocol) między | |
105 | podsieciami. Ponieważ komunikaty DHCP mogą być przekazywane w formie | |
106 | rozgłoszeniowej, bez tego agenta nie zostaną przerutowane do innej | |
cd42af6b | 107 | podsieci. |
45ef0575 | 108 | |
1d526f5b JK |
109 | %package devel |
110 | Summary: DHCP development includes and libs | |
6e8d2260 | 111 | Summary(pl.UTF-8): Pliki nagłówkowe i biblioteki dla oprogramowania DHCP |
1d526f5b JK |
112 | Group: Development/Libraries |
113 | ||
114 | %description devel | |
115 | Includes OMAPI and dhcptl libraries. | |
116 | ||
117 | OMAPI is an programming layer designed for controlling remote | |
118 | applications, and for querying them for their state. It is currently | |
119 | used by the ISC DHCP server. | |
120 | ||
121 | The dhcpctl set of functions provide an API that can be used to | |
122 | communicate with and manipulate a running ISC DHCP server. | |
123 | ||
39cd54ba | 124 | %description devel -l pl.UTF-8 |
1d526f5b JK |
125 | Zawiera biblioteki OMAPI oraz dhcpctl. |
126 | ||
127 | OMAPI to warstwa programowa stworzona do kontroli zdalnych aplikacji i | |
39cd54ba | 128 | odpytywania o ich stan. Aktualnie jest używana przez serwer ISC DHCP. |
1d526f5b | 129 | |
39cd54ba JR |
130 | dhcpctl to zbiór funkcji tworzących API, które może być używane do |
131 | komunikacji z działającym serwerem ISC DHCP i jego kontroli. | |
1d526f5b | 132 | |
cd3ce1e4 | 133 | %prep |
748a53c8 | 134 | %setup -q |
ca2187eb | 135 | install %{SOURCE4} . |
5c01071a | 136 | %patch0 -p1 |
eda193cb | 137 | %patch1 -p1 |
5deae13f | 138 | %{?with_ldap:%patch2 -p1} |
eda193cb JR |
139 | %{?with_ldap:%patch3 -p1} |
140 | # These two patches are required for dhcdbd to function | |
9598ee90 | 141 | %patch4 -p1 |
fb6403fa | 142 | %patch5 -p1 |
eda193cb | 143 | # |
74b36fbe | 144 | %patch6 -p1 |
b0caeee3 | 145 | %patch7 -p1 |
eda193cb | 146 | %patch8 -p1 |
4b8d2654 | 147 | |
0770f14a | 148 | %build |
c5dc12be | 149 | # NOTE: this is not autoconf configure - do not change it to %%configure |
ca2187eb | 150 | ./configure |
cd3ce1e4 | 151 | |
fa424e73 | 152 | %{__make} \ |
a63fcfce | 153 | CC="%{__cc}" \ |
0c23a828 | 154 | CC_OPTIONS="%{rpmcflags} \ |
b955a7fa ER |
155 | -D_PATH_DHCPD_DB=\\\"/var/lib/%{name}/dhcpd.leases\\\" \ |
156 | -DEXTENDED_NEW_OPTION_INFO \ | |
b0caeee3 | 157 | -D_PATH_DHCLIENT_DB=\\\"/var/lib/dhclient/dhclient.leases\\\" \ |
b955a7fa | 158 | " |
fdc24592 | 159 | LFLAGS="%{rpmldflags}" \ |
160 | DEBUG="" \ | |
b0caeee3 JR |
161 | VARDBS="/var/lib/%{name}" |
162 | VARDBC="/var/lib/dhclient" | |
cd3ce1e4 | 163 | |
164 | %install | |
165 | rm -rf $RPM_BUILD_ROOT | |
a451dd85 | 166 | install -d $RPM_BUILD_ROOT{/sbin,%{_sbindir},%{_bindir},%{_mandir}/man{5,8}} \ |
0e6925b2 | 167 | $RPM_BUILD_ROOT{/var/lib/%{name},%{_sysconfdir}/{rc.d/init.d,sysconfig}} |
cd3ce1e4 | 168 | |
771aee8c | 169 | %{__make} install \ |
5eb60a7e PG |
170 | DESTDIR=$RPM_BUILD_ROOT \ |
171 | CLIENTBINDIR=/sbin \ | |
172 | BINDIR=%{_sbindir} \ | |
173 | LIBDIR=%{_libdir} \ | |
174 | INCDIR=%{_includedir} \ | |
175 | ADMMANDIR=%{_mandir}/man8 \ | |
cd3ce1e4 | 176 | ADMMANEXT=.8 \ |
5eb60a7e PG |
177 | FFMANDIR=%{_mandir}/man5 \ |
178 | LIBMANDIR=%{_mandir}/man3 \ | |
1d526f5b | 179 | LIBMANEXT=.3 \ |
5eb60a7e | 180 | USRMANDIR=%{_mandir}/man1 \ |
1d526f5b | 181 | USRMANEXT=.1 \ |
b0caeee3 JR |
182 | VARDBS=/var/lib/%{name} \ |
183 | VARDBC=/var/lib/dhclient \ | |
cd3ce1e4 | 184 | FFMANEXT=.5 |
185 | ||
186 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/dhcpd | |
3ac86cff | 187 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/dhcp-relay |
188 | install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/dhcp-relay | |
ac30bae3 | 189 | install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/dhcpd.conf |
6d98e2f2 | 190 | install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/dhcpd |
cd3ce1e4 | 191 | |
1d526f5b JK |
192 | mv $RPM_BUILD_ROOT%{_mandir}/man3/omshell.3 \ |
193 | $RPM_BUILD_ROOT%{_mandir}/man1/omshell.1 | |
194 | ||
fd8c978e | 195 | install client/scripts/linux $RPM_BUILD_ROOT%{_sbindir}/dhclient-script |
9da55644 | 196 | |
b0caeee3 JR |
197 | touch $RPM_BUILD_ROOT/var/lib/%{name}/dhcpd.leases |
198 | touch $RPM_BUILD_ROOT/var/lib/dhclient/dhclient.leases | |
3bb4bab9 | 199 | |
82fbb222 JB |
200 | %clean |
201 | rm -rf $RPM_BUILD_ROOT | |
202 | ||
cd3ce1e4 | 203 | %post |
3a01d42c | 204 | /sbin/chkconfig --add dhcpd |
d6a3364d | 205 | touch /var/lib/%{name}/dhcpd.leases |
30c45ada | 206 | %service dhcpd restart "dhcpd daemon" |
cd3ce1e4 | 207 | |
208108e2 JB |
208 | %preun |
209 | if [ "$1" = "0" ];then | |
30c45ada | 210 | %service dhcpd stop |
208108e2 JB |
211 | /sbin/chkconfig --del dhcpd |
212 | fi | |
213 | ||
214 | %post client | |
b0caeee3 JR |
215 | if [ -f /var/lib/dhcp/dhclient.leases.rpmsave ]; then |
216 | mv /var/lib/dhcp/dhclient.leases.rpmsave /var/lib/dhclient/dhclient.leases | |
208108e2 JB |
217 | fi |
218 | ||
7940deed | 219 | %post relay |
3a01d42c | 220 | /sbin/chkconfig --add dhcp-relay |
3a01d42c | 221 | if [ -f /var/lock/subsys/dhcrelay ]; then |
30c45ada | 222 | mv -f /var/lock/subsys/{dhcrelay,dhcp-relay} |
3a01d42c | 223 | fi |
30c45ada | 224 | %service dhcp-relay restart "dhcrelay daemon" |
7940deed | 225 | |
7940deed | 226 | %preun relay |
3a01d42c | 227 | if [ "$1" = "0" ];then |
30c45ada | 228 | %service dhcp-relay stop |
3a01d42c | 229 | /sbin/chkconfig --del dhcp-relay |
230 | fi | |
7940deed | 231 | |
b7f7d94b | 232 | %triggerpostun -- dhcp < 3.0 |
30c45ada | 233 | if [ "`grep ddns-update-style /etc/dhcpd.conf`" = "" ]; then |
208108e2 | 234 | umask 027 |
b7f7d94b | 235 | echo "ddns-update-style none;" > /etc/dhcpd.conf.tmp |
236 | echo "" >> /etc/dhcpd.conf.tmp | |
237 | cat /etc/dhcpd.conf >>/etc/dhcpd.conf.tmp | |
238 | mv -f /etc/dhcpd.conf.tmp /etc/dhcpd.conf | |
239 | fi | |
240 | ||
cd3ce1e4 | 241 | %files |
242 | %defattr(644,root,root,755) | |
79e4cc69 | 243 | %doc doc/* README RELNOTES dhcpd.conf.sample LICENSE |
5deae13f | 244 | %{?with_ldap:%doc contrib/*} |
1d526f5b | 245 | %{_mandir}/man1/* |
3bb4bab9 | 246 | %{_mandir}/man5/dhcp* |
247 | %{_mandir}/man8/dhcp* | |
ac30bae3 ER |
248 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/dhcpd |
249 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dhcpd.conf | |
1d526f5b | 250 | %attr(755,root,root) %{_bindir}/* |
cd3ce1e4 | 251 | %attr(755,root,root) %{_sbindir}/dhcpd |
d3d402da | 252 | %attr(754,root,root) /etc/rc.d/init.d/dhcpd |
d6a3364d JR |
253 | %attr(750,root,root) %dir /var/lib/%{name} |
254 | %ghost /var/lib/%{name}/dhcpd.leases | |
3bb4bab9 | 255 | |
256 | %files client | |
ccf64540 | 257 | %defattr(644,root,root,755) |
3bb4bab9 | 258 | %attr(755,root,root) /sbin/dhclient |
f9cc1a26 | 259 | %attr(755,root,root) /sbin/dhclient-script |
d3d402da | 260 | %{_mandir}/man[58]/dhclient* |
b0caeee3 JR |
261 | %attr(750,root,root) %dir /var/lib/dhclient |
262 | %ghost /var/lib/dhclient/dhclient.leases | |
45ef0575 | 263 | |
264 | %files relay | |
265 | %defattr(644,root,root,755) | |
266 | %{_mandir}/man8/dhcrelay* | |
ac30bae3 | 267 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/dhcp-relay |
45ef0575 | 268 | %attr(755,root,root) %{_sbindir}/dhcrelay |
3ac86cff | 269 | %attr(754,root,root) /etc/rc.d/init.d/dhcp-relay |
1d526f5b JK |
270 | |
271 | %files devel | |
272 | %defattr(644,root,root,755) | |
79686690 | 273 | %{_mandir}/man3/* |
1d526f5b JK |
274 | %{_libdir}/*.a |
275 | %{_includedir}/* |