rpms/dhcp/devel Makefile.libdhcp4client, NONE, 1.1 dhcp.spec, 1.180, 1.181 libdhcp_control.h, 1.2, 1.3 Makefile.dist, 1.3, NONE
David Cantrell (dcantrel)
fedora-extras-commits at redhat.com
Thu Oct 25 20:29:14 UTC 2007
Author: dcantrel
Update of /cvs/pkgs/rpms/dhcp/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv30873
Modified Files:
dhcp.spec libdhcp_control.h
Added Files:
Makefile.libdhcp4client
Removed Files:
Makefile.dist
Log Message:
* Thu Oct 25 2007 David Cantrell <dcantrell at redhat.com> - 12:3.1.0-6
- Rename Makefile.dist to Makefile.libdhcp4client
- Spec file cleanups
- Include stdarg.h in libdhcp_control.h
--- NEW FILE Makefile.libdhcp4client ---
# Makefile.dist for libdhcp4client
#
# We get the libdhcp4client library from the patched ISC source code. We
# rebuild key C files with -DLIBDHCP to turn on the library features we
# need. Normal build results in standard ISC code (i.e., not LIBDHCP
# stuff enabled). We then link together a static library and a shared
# library with the new resulting objects.
#
# David Cantrell <dcantrell at redhat.com>
# What version of ISC DHCP is this?
VER = $(shell grep DHCP_VERSION ../../includes/version.h | head -1 | cut -d '"' -f 2 | cut -d 'V' -f 2 | cut -d '-' -f 1)
PROGS = libdhcp4client.a libdhcp4client-$(VER).so.0
# NOTE: The ordering of these file lists is important! We are using the
# whole program optimization features of gcc, so the order matters here.
# Source files shared by all objects
COMMON_SRCS = client_clparse.c client_dhclient.c common_alloc.c common_bpf.c \
common_comapi.c common_conflex.c common_discover.c \
common_dispatch.c common_dns.c common_ethernet.c \
common_execute.c common_inet.c common_lpf.c common_memory.c \
common_options.c common_packet.c common_parse.c common_print.c \
common_socket.c common_tables.c common_tr.c common_tree.c \
dst_dst_api.c dst_base64.c dst_hmac_link.c dst_md5_dgst.c \
omapip_alloc.c omapip_array.c omapip_auth.c omapip_buffer.c \
omapip_connection.c omapip_convert.c omapip_dispatch.c \
omapip_errwarn.c omapip_handle.c omapip_hash.c \
omapip_listener.c omapip_mrtrace.c omapip_result.c \
omapip_support.c omapip_toisc.c omapip_trace.c
# Source files for libdhcp4client.o
CLIENT_SRCS = common_ctrace.c common_dlpi.c common_nit.c common_upf.c \
dst_dst_support.c dst_prandom.c omapip_generic.c \
omapip_message.c omapip_protocol.c
# Source files for libres.o (minires)
MINIRES_SRCS = minires_ns_date.c minires_ns_name.c minires_ns_parse.c \
minires_ns_samedomain.c minires_ns_sign.c minires_ns_verify.c \
minires_res_comp.c minires_res_findzonecut.c \
minires_res_init.c minires_res_mkquery.c \
minires_res_mkupdate.c minires_res_query.c minires_res_send.c \
minires_res_sendsigned.c minires_res_update.c
# ISC dhcp headers we need to copy to /usr/include/dhcp4client
DHCP_HEADERS = dhcpd.h cdefs.h osdep.h arpa/nameser.h minires/minires.h \
site.h cf/linux.h dhcp.h statement.h tree.h inet.h dhctoken.h \
omapip/omapip_p.h failover.h ctrace.h minires/resolv.h \
minires/res_update.h omapip/convert.h omapip/hash.h \
omapip/trace.h
HDRS = dhcp4client.h
SRCS = $(COMMON_SRCS) $(CLIENT_SRCS)
OBJS = $(SRCS:.c=.o)
INCLUDES = -I$(TOP) -I$(TOP)/includes -I$(TOP)/dst -I.
CFLAGS = $(DEBUG) $(PREDEFINES) $(INCLUDES) $(COPTS) \
-DCLIENT_PATH=${CLIENT_PATH} -DLIBDHCP -DUSE_MD5
all: $(PROGS)
install: all
install -p -m 0755 -D libdhcp4client-$(VER).so.0 $(DESTDIR)$(LIBDIR)/libdhcp4client-$(VER).so.0
ln -sf libdhcp4client-$(VER).so.0 $(DESTDIR)/$(LIBDIR)/libdhcp4client.so
install -p -m 0644 -D libdhcp4client.a $(DESTDIR)$(LIBDIR)/libdhcp4client.a
install -p -m 0644 -D dhcp4client.h $(DESTDIR)$(INCDIR)/dhcp4client/dhcp4client.h
for hdr in $(DHCP_HEADERS) ; do \
install -p -m 0644 -D $(TOP)/includes/$${hdr} $(DESTDIR)$(INCDIR)/dhcp4client/$${hdr} ; \
done
depend:
$(MKDEP) $(INCLUDES) $(PREDEFINES) $(SRCS)
clean:
-rm -f $(OBJS)
realclean: clean
-rm -f $(PROG) *~ #*
distclean: realclean
-rm -f Makefile
# This isn't the cleanest way to set up links, but I prefer this so I don't
# need object targets for each subdirectory. The idea is simple. Since
# libdhcp4client is a linked together wad of objects from across the source
# tree, we change / to _ when linking source files here. Follow this example:
#
# We need to use client/dhclient.c, so we make this link:
# rm -f client_dhclient.c
# ln -s $(TOP)/client/dhclient.c client_dhclient.c
#
# Simple. Given the way the ISC build system works, this is the easiest to
# maintain and least invasive.
#
# David Cantrell <dcantrell at redhat.com>
links:
@for target in $(SRCS); do \
source="`echo $$target | sed -e 's|_|/|'`"; \
if [ ! -b $$target ]; then \
rm -f $$target; \
fi; \
ln -s $(TOP)/$$source $$target; \
done; \
for hdr in $(HDRS); do \
if [ ! -b $$hdr ]; then \
rm -f $$hdr; \
fi; \
ln -s $(TOP)/libdhcp4client/$$hdr $$hdr; \
done
# minires is difficult to build because it overrides things in common and dst,
# so we just link with the already built libres.a since we need it all anyway
libres.a:
if [ ! -f ../minires/$@ ]; then \
$(MAKE) -C ../minires; \
fi; \
ln ../minires/libres.a .; \
$(AR) x libres.a
# Create the libraries
# minires/res_query.o contains an undefined symbol __h_errno_set, is not
# used by any dhcp code, and is optimized out by the linker when producing
# the dhclient executable or a shared library
libdhcp4client.a: $(OBJS) libres.a
$(AR) crus $@ $(OBJS) `$(AR) t libres.a | grep -v res_query.o`
libdhcp4client-$(VER).so.0: $(OBJS) libres.a
$(CC) -shared -o $@ -Wl,-soname,$@ $(OBJS) `$(AR) t libres.a | grep -v res_query.o`
# Dependencies (semi-automatically-generated)
Index: dhcp.spec
===================================================================
RCS file: /cvs/pkgs/rpms/dhcp/devel/dhcp.spec,v
retrieving revision 1.180
retrieving revision 1.181
diff -u -r1.180 -r1.181
--- dhcp.spec 25 Oct 2007 15:39:53 -0000 1.180
+++ dhcp.spec 25 Oct 2007 20:28:35 -0000 1.181
@@ -13,7 +13,7 @@
Summary: DHCP (Dynamic Host Configuration Protocol) server and relay agent
Name: dhcp
Version: 3.1.0
-Release: 5%{?dist}
+Release: 6%{?dist}
# NEVER CHANGE THE EPOCH on this package. The previous maintainer made
# incorrect use of the epoch and that's why it is at 12 now. It should have
# never been used, but it was. So we are stuck with it.
@@ -31,7 +31,7 @@
Source7: draft-ietf-dhc-ldap-schema-01.txt
Source8: dhcpd-conf-to-ldap
Source9: linux
-Source10: Makefile.dist
+Source10: Makefile.libdhcp4client
Source11: dhcp4client.h
Source12: libdhcp_control.h
Source13: dhcp.schema
@@ -59,7 +59,8 @@
Patch20: %{name}-3.1.0-warnings.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildRequires: groff openldap-devel
+BuildRequires: groff
+BuildRequires: openldap-devel
Requires(post): /sbin/chkconfig
Requires(preun): /sbin/chkconfig
@@ -232,20 +233,20 @@
%patch20 -p1 -b .warnings
# Copy in documentation and example scripts for LDAP patch to dhcpd
-%{__install} -p -m 0644 %SOURCE6 .
-%{__install} -p -m 0644 %SOURCE7 doc
-%{__install} -p -m 0755 %SOURCE8 contrib
+%{__install} -p -m 0644 %{SOURCE6} .
+%{__install} -p -m 0644 %{SOURCE7} doc/
+%{__install} -p -m 0755 %{SOURCE8} contrib/
# Copy in the Fedora/RHEL dhclient script
-%{__install} -p -m 0755 %SOURCE9 client/scripts
+%{__install} -p -m 0755 %{SOURCE9} client/scripts/
# Copy in the libdhcp4client headers and Makefile.dist
%{__mkdir} -p libdhcp4client
-%{__install} -p -m 0644 %SOURCE10 libdhcp4client
-%{__install} -p -m 0644 %SOURCE11 libdhcp4client
+%{__install} -p -m 0644 %{SOURCE10} libdhcp4client/Makefile.dist
+%{__install} -p -m 0644 %{SOURCE11} libdhcp4client/
# Copy in libdhcp_control.h to the isc-dhcp includes directory
-%{__install} -p -m 0644 %SOURCE12 includes/isc-dhcp
+%{__install} -p -m 0644 %{SOURCE12} 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
@@ -262,7 +263,7 @@
%{__sed} -i -e 's/\r//' __fedora_contrib/ms2isc/ms2isc.pl
%build
-%{__cp} %SOURCE1 .
+%{__cp} %{SOURCE1} .
%{__cat} <<EOF > site.conf
VARDB=%{_localstatedir}/lib/dhcpd
ADMMANDIR=%{_mandir}/man8
@@ -290,7 +291,7 @@
--copts "$RPM_OPT_FLAGS $COPTS %{?bigptrs}" \
--work-dir %{workdir}
-%{__sed} 's/@DHCP_VERSION@/%{version}/' < %SOURCE5 > libdhcp4client.pc
+%{__sed} 's/@DHCP_VERSION@/%{version}/' < %{SOURCE5} > libdhcp4client.pc
%{__make} %{?_smp_mflags} CC="%{__cc}"
%install
@@ -298,10 +299,10 @@
%{__mkdir} -p %{buildroot}%{_sysconfdir}/sysconfig
%{__make} install DESTDIR=%{buildroot}
-%{__install} -p -m 0644 %SOURCE12 %{buildroot}%{_includedir}/isc-dhcp
+%{__install} -p -m 0644 %{SOURCE12} %{buildroot}%{_includedir}/isc-dhcp/
%{__mkdir} -p %{buildroot}%{_initrddir}
-%{__install} -p -m 0755 %SOURCE2 %{buildroot}%{_initrddir}/dhcpd
+%{__install} -p -m 0755 %{SOURCE2} %{buildroot}%{_initrddir}/dhcpd
touch %{buildroot}%{_localstatedir}/lib/dhcpd/dhcpd.leases
%{__mkdir} -p %{buildroot}%{_localstatedir}/lib/dhclient/
@@ -310,7 +311,7 @@
DHCPDARGS=
EOF
-%{__install} -p -m 0755 %SOURCE3 %{buildroot}%{_initrddir}/dhcrelay
+%{__install} -p -m 0755 %{SOURCE3} %{buildroot}%{_initrddir}/dhcrelay
%{__cat} <<EOF > %{buildroot}%{_sysconfdir}/sysconfig/dhcrelay
# Command line options here
@@ -323,11 +324,11 @@
%{__chmod} 0755 %{buildroot}/sbin/dhclient-script
# Install default (empty) dhcpd.conf:
-%{__cp} -fp %SOURCE4 %{buildroot}%{_sysconfdir}
+%{__cp} -fp %{SOURCE4} %{buildroot}%{_sysconfdir}
# Install dhcp.schema for LDAP configuration
%{__mkdir} -p %{buildroot}%{_sysconfdir}/openldap
-%{__install} -p -m 0644 -D %SOURCE13 %{buildroot}%{_sysconfdir}/openldap
+%{__install} -p -m 0644 -D %{SOURCE13} %{buildroot}%{_sysconfdir}/openldap/
%{__install} -p -m 0644 -D libdhcp4client.pc %{buildroot}%{_libdir}/pkgconfig/libdhcp4client.pc
@@ -428,6 +429,11 @@
%{_libdir}/libdhcp4client.a
%changelog
+* Thu Oct 25 2007 David Cantrell <dcantrell at redhat.com> - 12:3.1.0-6
+- Rename Makefile.dist to Makefile.libdhcp4client
+- Spec file cleanups
+- Include stdarg.h in libdhcp_control.h
+
* Thu Oct 25 2007 David Cantrell <dcantrell at redhat.com> - 12:3.1.0-5
- Remove chkconfig usage for ypbind in dhclient-script (#351211)
- Combine dhcp-static and dhcp-devel packages since there are no shared
Index: libdhcp_control.h
===================================================================
RCS file: /cvs/pkgs/rpms/dhcp/devel/libdhcp_control.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- libdhcp_control.h 24 Oct 2007 19:22:41 -0000 1.2
+++ libdhcp_control.h 25 Oct 2007 20:28:35 -0000 1.3
@@ -29,6 +29,7 @@
#ifndef LIBDHCP_CONTROL_H
#define LIBDHCP_CONTROL_H
+#include <stdarg.h>
#include <stdint.h>
#define LOG_FATAL 8
--- Makefile.dist DELETED ---
More information about the fedora-extras-commits
mailing list