rpms/dhcp/devel dhclient-script, 1.3, 1.4 dhcp.spec, 1.228, 1.229 dhcp-4.0.0-libdhcp4client.patch, 1.7, NONE dhcp4client.h, 1.5, NONE libdhcp4client.pc, 1.6, NONE libdhcp_control.h, 1.6, NONE

David Cantrell dcantrel at fedoraproject.org
Thu Dec 4 22:08:36 UTC 2008


Author: dcantrel

Update of /cvs/pkgs/rpms/dhcp/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv27209

Modified Files:
	dhclient-script dhcp.spec 
Removed Files:
	dhcp-4.0.0-libdhcp4client.patch dhcp4client.h 
	libdhcp4client.pc libdhcp_control.h 
Log Message:
* Wed Dec 03 2008 David Cantrell <dcantrell at redhat.com> - 12:4.0.0-32
- Enable LDAP/SSL support in dhcpd (#467740)
- Do not calculate a prefix for an address we did not receive (#473885)
- Removed libdhcp4client because libdhcp has been removed from Fedora



Index: dhclient-script
===================================================================
RCS file: /cvs/pkgs/rpms/dhcp/devel/dhclient-script,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- dhclient-script	1 Oct 2008 22:38:30 -0000	1.3
+++ dhclient-script	4 Dec 2008 22:08:05 -0000	1.4
@@ -215,7 +215,7 @@
        [ ! "${old_ip_address}" = "${new_ip_address}" ]; then
         # IP address changed.  Bringing down the interface will delete all
         # routes, and clear the ARP cache.
-        ip -family inet addr flush dev ${interface}
+        ip -family inet addr flush dev ${interface} >/dev/null 2>&1
         ip -family inet link set dev ${interface} down
     fi
 
@@ -319,7 +319,7 @@
 
     if [ ! "${new_ip_address}" = "${alias_ip_address}" ] &&
        [ -n "${alias_ip_address}" ]; then
-        ip -family inet addr flush dev ${interface}:0
+        ip -family inet addr flush dev ${interface}:0 >/dev/null 2>&1
         ip -family inet addr add ${alias_ip_address}/${alias_prefix} dev ${interface}:0
         ip route replace ${alias_ip_address}/32 dev ${interface}:0
     fi
@@ -413,6 +413,15 @@
     fi
 }
 
+get_prefix() {
+    ip="${1}"
+    nm="${2}"
+
+    if [ -n "${ip}" -a -n "${nm}" ]; then
+        ipcalc -s -p ${ip} ${nm} | cut -d '=' -f 2
+    fi
+}
+
 
 #
 # ### MAIN
@@ -450,24 +459,13 @@
     . /etc/sysconfig/networking/network
 fi
 
-CONFIG="${interface}"
+CONFIG="/etc/sysconfig/network-scripts/ifcfg-${interface}"
 need_config ${CONFIG}
+source_config >/dev/null 2>&1
 
-if [ -f "${CONFIG}" ]; then
-    source_config
-fi
-
-if [ -n "${new_subnet_mask}" ]; then
-    new_prefix="$(ipcalc -p ${new_ip_address} ${new_subnet_mask} | cut -d '=' -f 2)"
-fi
-
-if [ -n "${old_subnet_mask}" ]; then
-    old_prefix="$(ipcalc -p ${old_ip_address} ${new_subnet_mask} | cut -d '=' -f 2)"
-fi
-
-if [ -n "${alias_subnet_mask}" ]; then
-    alias_prefix="$(ipcalc -p ${alias_ip_address} ${alias_subnet_mask} | cut -d '=' -f 2)"
-fi
+new_prefix="$(get_prefix ${new_ip_address} ${new_subnet_mask})"
+old_prefix="$(get_prefix ${old_ip_address} ${new_subnet_mask})"
+alias_prefix="$(get_prefix ${alias_ip_address} ${alias_subnet_mask})"
 
 case "${reason}" in
     MEDIUM)
@@ -484,7 +482,7 @@
         if [ "${keep_old_ip}" = "yes" ]; then
             ip -family inet link set ${interface} up
         else
-            ip -family inet addr flush dev ${interface}
+            ip -family inet addr flush dev ${interface} >/dev/null 2>&1
             ip -family inet link set ${interface} up
         fi
 
@@ -556,7 +554,7 @@
 
         if [ -n "${old_ip_address}" ]; then
             # Shut down interface, which will delete routes and clear arp cache.
-            ip -family inet addr flush dev ${interface}
+            ip -family inet addr flush dev ${interface} >/dev/null 2>&1
             ip -family inet link set ${interface} down
         fi
 
@@ -571,7 +569,7 @@
     TIMEOUT)
         if [ -n "${new_routers}" ]; then
             if [ -n "${alias_ip_address}" ]; then
-                ip -family inet addr flush dev ${interface}:0
+                ip -family inet addr flush dev ${interface}:0 >/dev/null 2>&1
             fi
 
             ip -family inet addr add ${new_ip_address}/${new_prefix} broadcast ${new_broadcast_address} dev ${interface}
@@ -582,7 +580,7 @@
                 exit_with_hooks 0
             fi
 
-            ip -family inet addr flush dev ${interface}
+            ip -family inet addr flush dev ${interface} >/dev/null 2>&1
             ip -family inet link set ${interface} down
             exit_with_hooks 1
         else


Index: dhcp.spec
===================================================================
RCS file: /cvs/pkgs/rpms/dhcp/devel/dhcp.spec,v
retrieving revision 1.228
retrieving revision 1.229
diff -u -r1.228 -r1.229
--- dhcp.spec	29 Oct 2008 23:35:06 -0000	1.228
+++ dhcp.spec	4 Dec 2008 22:08:05 -0000	1.229
@@ -1,10 +1,23 @@
 # vendor string (e.g., Fedora, EL)
 %define vvendor Fedora
 
+# Make it easy for package rebuilders to select LPF or sockets
+%define netmethod USE_LPF
+
+%define with_USE_SOCKETS %{?_with_USE_SOCKETS: 1} %{?!_with_USE_SOCKETS: 0}
+%if %{with_USE_SOCKETS}
+%define netmethod USE_SOCKETS
+%endif
+
+%define with_USE_LPF %{?_with_USE_LPF: 1} %{?!_with_USE_LPF: 0}
+%if %{with_USE_LPF}
+%define netmethod USE_LPF
+%endif
+
 Summary:  DHCP (Dynamic Host Configuration Protocol) server and relay agent
 Name:     dhcp
 Version:  4.0.0
-Release:  31%{?dist}
+Release:  32%{?dist}
 # NEVER CHANGE THE EPOCH on this package.  The previous maintainer (prior to
 # dcantrell maintaining the package) made incorrect use of the epoch and
 # that's why it is at 12 now.  It should have never been used, but it was.
@@ -16,15 +29,12 @@
 Source0:  ftp://ftp.isc.org/isc/%{name}/%{name}-%{version}.tar.gz
 Source1:  dhcpd.init
 Source2:  dhcrelay.init
-Source3:  libdhcp4client.pc
-Source5:  README.ldap
-Source6:  draft-ietf-dhc-ldap-schema-01.txt
-Source7:  dhcpd-conf-to-ldap
+Source3:  README.ldap
+Source4:  draft-ietf-dhc-ldap-schema-01.txt
+Source5:  dhcpd-conf-to-ldap
 Source8:  dhclient-script
-Source9:  dhcp4client.h
-Source10: libdhcp_control.h
-Source11: dhcp.schema
-Source12: get-ldap-patch.sh
+Source9:  dhcp.schema
+Source10: get-ldap-patch.sh
 
 Patch0:   %{name}-4.0.0-errwarn-message.patch
 Patch1:   %{name}-4.0.0-ldap-configuration.patch
@@ -44,11 +54,10 @@
 Patch15:  %{name}-4.0.0-paths.patch
 Patch16:  %{name}-4.0.0-NetworkManager-crash.patch
 Patch17:  %{name}-4.0.0-CLOEXEC.patch
-Patch18:  %{name}-4.0.0-libdhcp4client.patch
-Patch19:  %{name}-4.0.0-inherit-leases.patch
-Patch20:  %{name}-4.0.0-garbage-chars.patch
-Patch21:  %{name}-4.0.0-port-validation.patch
-Patch22:  %{name}-4.0.0-invalid-dhclient-conf.patch
+Patch18:  %{name}-4.0.0-inherit-leases.patch
+Patch19:  %{name}-4.0.0-garbage-chars.patch
+Patch20:  %{name}-4.0.0-port-validation.patch
+Patch21:  %{name}-4.0.0-invalid-dhclient-conf.patch
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires: autoconf
@@ -101,29 +110,17 @@
 Header files and API documentation for using the ISC DHCP libraries.  The
 libdhcpctl and libomapi static libraries are also included in this package.
 
-%package -n libdhcp4client
-Summary: ISC DHCP IPv4 client in a library for invocation from other programs
-Group: Development/Libraries
-
-%description -n libdhcp4client
-The Internet Software Consortium (ISC) Dynamic Host Configuration Protocol
-(DHCP) Internet Protocol version 4 (IPv4) client software in a library
-suitable for linkage with and invocation by other programs.
-
-%package -n libdhcp4client-devel
-Summary: Header files for development with the ISC DHCP IPv4 client library
-Group: Development/Libraries
-Requires: dhcp-devel = %{epoch}:%{version}-%{release}
-Requires: libdhcp4client = %{epoch}:%{version}-%{release}
-Requires: openldap-devel
-Requires: pkgconfig
-
-%description -n libdhcp4client-devel
-Header files for development with the Internet Software Consortium (ISC)
-Dynamic Host Configuration Protocol (DHCP) Internet Protocol version 4 (IPv4)
-client library.
-
 %prep
+case "%{netmethod}" in
+    USE_LPF|USE_SOCKETS)
+        continue ;;
+    *)
+        echo >&2
+        echo "ERROR: Only --with options supported:  USE_LPF, USE_SOCKETS" >&2
+        echo >&2
+        exit 1 ;;
+esac
+
 %setup -q
 
 # Replace the standard ISC warning message about requesting help with an
@@ -196,36 +193,27 @@
 # Make sure all open file descriptors are closed-on-exec for SELinux (#446632)
 %patch17 -p1
 
-# Add the libdhcp4client target (library version of dhclient)
-%patch18 -p1
-
 # If we have an active lease, do not down the interface (#453982)
-%patch19 -p1
+%patch18 -p1
 
 # Fix 'garbage in format string' error (#450052)
-%patch20 -p1
+%patch19 -p1
 
 # Validate port numbers specified for dhclient, dhcpd, and dhcrelay
 # to make sure they are within 1-65535, inclusive.  (#438149)
-%patch21 -p1
+%patch20 -p1
 
 # The sample dhclient.conf should say 'supersede domain-search' (#467955)
-%patch22 -p1
+%patch21 -p1
 
 # Copy in documentation and example scripts for LDAP patch to dhcpd
-%{__install} -p -m 0644 %{SOURCE5} .
-%{__install} -p -m 0644 %{SOURCE6} doc/
-%{__install} -p -m 0755 %{SOURCE7} contrib/
+%{__install} -p -m 0644 %{SOURCE3} .
+%{__install} -p -m 0644 %{SOURCE4} doc/
+%{__install} -p -m 0755 %{SOURCE5} contrib/
 
 # Copy in the Fedora/RHEL dhclient script
 %{__install} -p -m 0755 %{SOURCE8} client/scripts/linux
 
-# Copy in the libdhcp4client headers and Makefile.dist
-%{__install} -p -m 0644 %{SOURCE9} includes/
-
-# Copy in libdhcp_control.h to the isc-dhcp includes directory
-%{__install} -p -m 0644 %{SOURCE10} includes/isc-dhcp/
-
 # Ensure we don't pick up Perl as a dependency from the scripts and modules
 # in the contrib directory (we copy this to /usr/share/doc in the final
 # package).
@@ -278,7 +266,7 @@
 automake --foreign --add-missing --copy
 
 %build
-CFLAGS="%{optflags} -fPIC -D_GNU_SOURCE" \
+CFLAGS="%{optflags} -fPIC -D_GNU_SOURCE -DUSE_SSL=1 -D%{netmethod}=1" \
 %configure \
     --disable-dhcpv6 \
     --with-srv-lease-file=%{_localstatedir}/lib/dhcpd/dhcpd.leases \
@@ -288,15 +276,11 @@
     --with-relay-pid-file=%{_localstatedir}/run/dhcrelay.pid
 %{__make} %{?_smp_mflags}
 
-%{__sed} 's/@DHCP_VERSION@/%{version}/' < %{SOURCE3} > libdhcp4client.pc
-
 %install
 %{__rm} -rf %{buildroot}
 %{__make} install DESTDIR=%{buildroot}
 
 # Remove files we don't want
-%{__rm} -rf %{buildroot}%{_libdir}/libdhcp4client.a
-%{__rm} -rf %{buildroot}%{_libdir}/libdhcp4client.la
 %{__rm} %{buildroot}%{_sysconfdir}/dhclient.conf
 
 # Install correct dhclient-script
@@ -304,19 +288,6 @@
 %{__mv} %{buildroot}%{_sbindir}/dhclient %{buildroot}/sbin/dhclient
 %{__install} -p -m 0755 client/scripts/linux %{buildroot}/sbin/dhclient-script
 
-# Install pkg-config file
-%{__install} -p -m 0644 %{SOURCE10} %{buildroot}%{_includedir}/isc-dhcp/
-%{__install} -p -m 0644 -D libdhcp4client.pc %{buildroot}%{_libdir}/pkgconfig/libdhcp4client.pc
-
-# Install headers for libdhcp4client-devel
-%{__mkdir} -p %{buildroot}%{_includedir}/dhcp4client/minires
-%{__install} -p -m 0644 %{SOURCE9} %{buildroot}%{_includedir}/dhcp4client
-for hdr in cdefs.h ctrace.h dhcp.h dhcp6.h dhcpd.h dhctoken.h failover.h \
-           heap.h inet.h minires/minires.h minires/res_update.h \
-           minires/resolv.h osdep.h site.h statement.h tree.h ; do
-    %{__install} -p -m 0644 includes/${hdr} %{buildroot}%{_includedir}/dhcp4client/${hdr}
-done
-
 # Install init scripts
 %{__mkdir} -p %{buildroot}%{_initrddir}
 %{__install} -p -m 0755 %{SOURCE1} %{buildroot}%{_initrddir}/dhcpd
@@ -356,7 +327,7 @@
 
 # Install dhcp.schema for LDAP configuration
 %{__mkdir} -p %{buildroot}%{_sysconfdir}/openldap/schema
-%{__install} -p -m 0644 -D %{SOURCE11} %{buildroot}%{_sysconfdir}/openldap/schema
+%{__install} -p -m 0644 -D %{SOURCE9} %{buildroot}%{_sysconfdir}/openldap/schema
 
 %clean
 %{__rm} -rf %{buildroot}
@@ -387,10 +358,6 @@
     /sbin/service dhcrelay condrestart >/dev/null 2>&1 || :
 fi
 
-%post -n libdhcp4client -p /sbin/ldconfig
-
-%postun -n libdhcp4client -p /sbin/ldconfig
-
 %files
 %defattr(-,root,root,-)
 %doc LICENSE README README.ldap RELNOTES dhcpd.conf.sample
@@ -438,17 +405,12 @@
 %attr(0644,root,root) %{_mandir}/man3/dhcpctl.3.gz
 %attr(0644,root,root) %{_mandir}/man3/omapi.3.gz
 
-%files -n libdhcp4client
-%defattr(0755,root,root,0755)
-%{_libdir}/libdhcp4client-*.*.so.*
-
-%files -n libdhcp4client-devel
-%defattr(0644,root,root,0755)
-%{_includedir}/dhcp4client
-%{_libdir}/pkgconfig/libdhcp4client.pc
-%{_libdir}/libdhcp4client.so
-
 %changelog
+* Wed Dec 03 2008 David Cantrell <dcantrell at redhat.com> - 12:4.0.0-32
+- Enable LDAP/SSL support in dhcpd (#467740)
+- Do not calculate a prefix for an address we did not receive (#473885)
+- Removed libdhcp4client because libdhcp has been removed from Fedora
+
 * Wed Oct 29 2008 David Cantrell <dcantrell at redhat.com> - 12:4.0.0-31
 - Use O_CLOEXEC in open(2) calls and "e" mode in fopen(3) calls, build
   with -D_GNU_SOURCE so we pick up O_CLOEXEC (#468984)


--- dhcp-4.0.0-libdhcp4client.patch DELETED ---


--- dhcp4client.h DELETED ---


--- libdhcp4client.pc DELETED ---


--- libdhcp_control.h DELETED ---




More information about the fedora-extras-commits mailing list