rpms/dhcpv6/devel dhcpv6-0.10-redhat.patch, NONE, 1.1 dhcpv6-0.10-libdhcp6client.patch, 1.7, 1.8 dhcpv6.spec, 1.43, 1.44
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Tue Oct 31 18:29:57 UTC 2006
Author: dcantrel
Update of /cvs/dist/rpms/dhcpv6/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv25837
Modified Files:
dhcpv6-0.10-libdhcp6client.patch dhcpv6.spec
Added Files:
dhcpv6-0.10-redhat.patch
Log Message:
- spec file cleanup (remove NODEBUGINFO, useless code, etc)
- Patch rollup since a lot of the later patches overwrote previous patches
- Put typedef for dhcp_state_e before it's used in libdhcp_control.h (#212612)
dhcpv6-0.10-redhat.patch:
Makefile.in | 65 +++-
ReadMe | 10
client6_addr.c | 52 ++-
client6_parse.y | 45 ++-
client6_token.l | 2
common.c | 87 ++++-
common.h | 3
config.c | 92 ++++--
config.h | 39 +-
configure.in | 8
dad_token.l | 5
dhcp6.h | 33 ++
dhcp6c.c | 45 +--
dhcp6c.conf.5 | 420 ++++++++++++++--------------
dhcp6r.8 | 213 ++++++++++++++
dhcp6r.c | 354 +++++++++++++++++++++++
dhcp6r.h | 74 ++++
dhcp6r.sh | 80 +++++
dhcp6r.sysconfig | 3
dhcp6relay.c | 4
dhcp6s.c | 412 ++++++++++++++++++++++++++-
dhcp6s.conf.5 | 660 ++++++++++++++++++++++----------------------
dhcp6s.sh | 10
dhcp6s.sysconfig | 4
htonl.h | 47 +++
ifaddrs.c | 2
netlink.c | 22 -
ra_token.l | 4
radvd_token.l | 25 +
relay6_database.c | 574 ++++++++++++++++++++++++++++++++++++++
relay6_database.h | 98 ++++++
relay6_parser.c | 278 ++++++++++++++++++
relay6_parser.h | 62 ++++
relay6_socket.c | 802 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
relay6_socket.h | 74 ++++
resolv_token.l | 50 ++-
server6_addr.c | 22 -
server6_conf.c | 2
server6_conf.h | 1
server6_parse.y | 15 -
server6_token.l | 1
41 files changed, 4099 insertions(+), 700 deletions(-)
--- NEW FILE dhcpv6-0.10-redhat.patch ---
diff -urN dhcp-0.10.orig/Makefile.in dhcp-0.10/Makefile.in
--- dhcp-0.10.orig/Makefile.in 2004-03-04 18:31:24.000000000 -0500
+++ dhcp-0.10/Makefile.in 2006-10-31 11:12:36.000000000 -0500
@@ -10,12 +10,14 @@
CC= @CC@
YACC= @YACC@
LEX= @LEX@
-TARGET= dhcp6c dhcp6s
-DESTDIR=
+TARGET= dhcp6c dhcp6s dhcp6r libdhcp6client.so.1 libdhcp6client.a
+DESTDIR ?=
INSTALL=@INSTALL@
INSTALL_PROGRAM=@INSTALL_PROGRAM@
INSTALL_DATA=@INSTALL_DATA@
+INSTALL_USER ?= root
+INSTALL_GROUP ?= root
prefix= @prefix@
exec_prefix= @exec_prefix@
bindir= @bindir@
@@ -25,8 +27,11 @@
etc=/etc
sysconfigdir=/etc/sysconfig
CHKCONFIG=/sbin/chkconfig
+LIBDIR ?= /usr/lib
+INCLUDEDIR ?= /usr/include
+PKGCFGDIR ?= /usr/lib/pkgconfig
-CFLAGS+= -DCONF_DH6OPT_DNS_RESOLVERS=@dhcpopt_dns_resolvers@ \
+CFLAGS+= -Wall -DCONF_DH6OPT_DNS_RESOLVERS=@dhcpopt_dns_resolvers@ \
-DCONF_DH6OPT_DOMAIN_LIST=@dhcpopt_domain_list@ \
-DCONF_DH6OPT_IA_PD=@dhcpopt_pdel@ \
-DCONF_DH6OPT_IAPREFIX=@dhcpopt_pinfo@
@@ -41,16 +46,24 @@
SERVOBJS= dhcp6s.o common.o timer.o hash.o lease.o \
server6_conf.o server6_addr.o \
$(SERVERGENSRCS:%.c=%.o) $(COMMONGENSRCS:%.c=%.o)
+RELAYOBJS= dhcp6r.o relay6_database.o relay6_parser.o relay6_socket.o
CLEANFILES=cf.tab.h cp.tab.h sf.tab.h dad_token.c ra_token.c client6_token.c client6_parse.c \
server6_parse.c server6_token.c lease_token.c resolv_token.c radvd_token.c
+CLIENTHDRS=common.h config.h cp.tab.h dhcp6.h hash.h lease.h queue.h timer.h
+
all: $(TARGET)
+
dhcp6c: $(CLIENTOBJS) $(LIBOBJS)
$(CC) $(LDFLAGS) -o dhcp6c $(CLIENTOBJS) $(LIBOBJS) $(LIBS)
+
dhcp6s: $(SERVOBJS) $(LIBOBJS)
$(CC) $(LDFLAGS) -o dhcp6s $(SERVOBJS) $(LIBOBJS) $(LIBS)
+dhcp6r: $(RELAYOBJS) $(LIBOBJS)
+ $(CC) $(LDFLAGS) -o dhcp6r $(RELAYOBJS)
+
dad_token.c: dad_token.l
$(LEX) -Pifyy dad_token.l
mv lex.ifyy.c $@
@@ -89,19 +102,51 @@
$(LEX) -Psfyy server6_token.l
mv lex.sfyy.c $@
+libdhcp6client/.: $(CLIENTOBJS:%.o=%.c)
+ mkdir -p libdhcp6client/
+ cp -fa $(CLIENTOBJS:%.o=%.c) $(CLIENTHDRS) $(COMMONGENSRCS:%.c=%.l) $(subst client6_parse.l,client6_parse.y,$(CLIENTGENSRCS:%.c=%.l)) strlcat.c strlcpy.c libdhcp6client/
+ cp -fa Makefile libdhcp6client/
+
+libdhcp6client/%.o: $(@:%.o:%.c) $(patsubst %,libdhcp6client/%,$(CLIENTHDRS))
+ $(MAKE) -C libdhcp6client $*.o CFLAGS="$(subst -fPIE,-fPIC,$(subst -O2,-Os,$(CFLAGS))) -DLIBDHCP"
+
+libdhcp6client.a: libdhcp6client/. $(patsubst %,libdhcp6client/%,$(CLIENTOBJS) strlcpy.o strlcat.o dhc6_alloc.o)
+ $(AR) cruv $@ $(patsubst %,libdhcp6client/%,$(CLIENTOBJS) strlcpy.o strlcat.o dhc6_alloc.o)
+
+libdhcp6client.so.1: libdhcp6client/. $(patsubst %,libdhcp6client/%,$(CLIENTOBJS) strlcpy.o strlcat.o dhc6_alloc.o)
+ $(CC) -shared -o $@ -Wl,-soname,$@ $(patsubst %,libdhcp6client/%,$(CLIENTOBJS) strlcpy.o strlcat.o dhc6_alloc.o) -lresolv -lcrypto
+ /bin/ln -sf $@ $(@:%=%.1)
+
install::
$(INSTALL) -d $(DESTDIR)$(sbindir)
- $(INSTALL_PROGRAM) -s -o bin -g bin $(TARGET) $(DESTDIR)$(sbindir)
+ $(INSTALL) -d $(DESTDIR)/sbin
+ $(INSTALL_PROGRAM) -o $(INSTALL_USER) -g $(INSTALL_GROUP) dhcp6s $(DESTDIR)$(sbindir)
+ $(INSTALL_PROGRAM) -o $(INSTALL_USER) -g $(INSTALL_GROUP) dhcp6r $(DESTDIR)$(sbindir)
+ $(INSTALL_PROGRAM) -o $(INSTALL_USER) -g $(INSTALL_GROUP) dhcp6c $(DESTDIR)/sbin
$(INSTALL) -d $(DESTDIR)$(mandir)/man8 $(DESTDIR)$(mandir)/man5
- $(INSTALL_DATA) -o bin -g bin dhcp6c.8 $(DESTDIR)$(mandir)/man8/
- $(INSTALL_DATA) -o bin -g bin dhcp6s.8 $(DESTDIR)$(mandir)/man8/
- $(INSTALL_DATA) -o bin -g bin dhcp6c.conf.5 $(DESTDIR)$(mandir)/man5/
- $(INSTALL_DATA) -o bin -g bin dhcp6s.conf.5 $(DESTDIR)$(mandir)/man5/
+ $(INSTALL_DATA) -o $(INSTALL_USER) -g $(INSTALL_GROUP) dhcp6c.8 $(DESTDIR)$(mandir)/man8/
+ $(INSTALL_DATA) -o $(INSTALL_USER) -g $(INSTALL_GROUP) dhcp6s.8 $(DESTDIR)$(mandir)/man8/
+ $(INSTALL_DATA) -o $(INSTALL_USER) -g $(INSTALL_GROUP) dhcp6r.8 $(DESTDIR)$(mandir)/man8/
+ $(INSTALL_DATA) -o $(INSTALL_USER) -g $(INSTALL_GROUP) dhcp6c.conf.5 $(DESTDIR)$(mandir)/man5/
+ $(INSTALL_DATA) -o $(INSTALL_USER) -g $(INSTALL_GROUP) dhcp6s.conf.5 $(DESTDIR)$(mandir)/man5/
+ $(INSTALL) -d $(DESTDIR)$(initdir)
+ $(INSTALL_PROGRAM) -o $(INSTALL_USER) -g $(INSTALL_GROUP) dhcp6s.sh $(DESTDIR)$(initdir)/dhcp6s
+ $(INSTALL_PROGRAM) -o $(INSTALL_USER) -g $(INSTALL_GROUP) dhcp6r.sh $(DESTDIR)$(initdir)/dhcp6r
+ $(INSTALL) -d $(DESTDIR)/etc/sysconfig
+ $(INSTALL_DATA) -o $(INSTALL_USER) -g $(INSTALL_GROUP) dhcp6s.sysconfig $(DESTDIR)/etc/sysconfig/dhcp6s
+ $(INSTALL_DATA) -o $(INSTALL_USER) -g $(INSTALL_GROUP) dhcp6r.sysconfig $(DESTDIR)/etc/sysconfig/dhcp6r
+ $(INSTALL) -m 754 -D -o $(INSTALL_USER) -g $(INSTALL_GROUP) libdhcp6client.so.1 $(DESTDIR)/$(LIBDIR)/libdhcp6client.so.1
+ /bin/ln -sf libdhcp6client.so.1 $(DESTDIR)/$(LIBDIR)/libdhcp6client.so
+ $(INSTALL) -m 644 -D -o $(INSTALL_USER) -g $(INSTALL_GROUP) libdhcp6client.a $(DESTDIR)/$(LIBDIR)/libdhcp6client.a
+ mkdir -p $(DESTDIR)/$(INCLUDEDIR)/dhcp6client/dhcpv6
+ $(INSTALL) -m 644 -o $(INSTALL_USER) -g $(INSTALL_GROUP) libdhcp6client/*.h $(DESTDIR)/$(INCLUDEDIR)/dhcp6client/dhcpv6
+ mv $(DESTDIR)/$(INCLUDEDIR)/dhcp6client/dhcpv6/{libdhcp_control.h,dhcp6client.h} $(DESTDIR)/$(INCLUDEDIR)/dhcp6client
+ $(INSTALL) -m 644 -D -o $(INSTALL_USER) -g $(INSTALL_GROUP) libdhcp6client.pc $(DESTDIR)/$(PKGCFGDIR)/libdhcp6client.pc
rh_install:: install
$(INSTALL) -d $(initdir)
- $(INSTALL_PROGRAM) -o root -g root dhcp6s.sh $(initdir)/dhcp6s
- $(INSTALL_PROGRAM) -o root -g root dhcp6c.sh $(initdir)/dhcp6c
+ $(INSTALL_PROGRAM) -o $(INSTALL_USER) -g $(INSTALL_GROUP) dhcp6s.sh $(initdir)/dhcp6s
+ $(INSTALL_PROGRAM) -o $(INSTALL_USER) -g $(INSTALL_GROUP) dhcp6c.sh $(initdir)/dhcp6c
$(CHKCONFIG) --add dhcp6s
$(CHKCONFIG) --add dhcp6c
diff -urN dhcp-0.10.orig/ReadMe dhcp-0.10/ReadMe
--- dhcp-0.10.orig/ReadMe 2003-05-28 17:18:22.000000000 -0400
+++ dhcp-0.10/ReadMe 2006-10-31 11:12:36.000000000 -0500
@@ -18,7 +18,8 @@
This implementation supports IPv6 address assignment to the clients.
It also has the support for prefix delegation, DNS server updates but those
-features are not validated yet.
+features are not validated yet. The server also supports messages sent through
+relay agents, both inbound and outbound.
The Linux implementation is based upon KAME's DHCPv6 implementation
on BSD which lacked the support for dynamic address assignment feature, now
@@ -34,7 +35,8 @@
3. Client IPv6 address assignment and temporary IPv6 address assignment support
on the same link.
4. Supported Options: Rapid commit, Server Preference, Information Request, Unicast,
- Elapsed Time, ClientID, ServerID , IA_NA , IA_TA , IA_ADDR , IA_PD, Status support.
+ Elapsed Time, ClientID, ServerID , IA_NA , IA_TA , IA_ADDR , IA_PD, Status,
+ Relay Message, Interface Identifier.
5. Solicit/Request/Advertise/Reply/Infomation-request messages/Renew/Rebind
/Release/Confirm/ messages support for IPv6 address binding.
8. Client configuration file support for IPv6 address assignment.
@@ -47,13 +49,13 @@
B. Support available but not validated yet
1. Request option support
+ 2. Relay-Forw/Relay-Repl messages and Relay Message Option
C. ToDo List:
1. Authentication/User class/Vendor class/Interface-ID option
support
- 2. Relay agent support.
- 3. Reconfig/Relay messages support.
+ 2. Reconfig message support.
D. INSTALLATTION:
diff -urN dhcp-0.10.orig/client6_addr.c dhcp-0.10/client6_addr.c
--- dhcp-0.10.orig/client6_addr.c 2003-07-01 22:21:25.000000000 -0400
+++ dhcp-0.10/client6_addr.c 2006-10-31 11:12:36.000000000 -0500
@@ -47,6 +47,7 @@
#include <stdlib.h>
#include <unistd.h>
#include <net/if_arp.h>
+#include <ifaddrs.h>
#include "queue.h"
#include "dhcp6.h"
@@ -109,7 +110,11 @@
/* add new address */
for (lv = TAILQ_FIRST(&optinfo->addr_list); lv; lv = lv_next) {
lv_next = TAILQ_NEXT(lv, link);
- if (lv->val_dhcp6addr.type != IAPD) {
+
+ if ( (lv->val_dhcp6addr.type != IAPD)
+ &&(lv->val_dhcp6addr.plen == 0)
+ )
+ {
lv->val_dhcp6addr.plen =
dhcp6_get_prefixlen(&lv->val_dhcp6addr.addr, dhcp6_if);
if (lv->val_dhcp6addr.plen == PREFIX_LEN_NOTINRA) {
@@ -119,6 +124,7 @@
in6addr2str(&lv->val_dhcp6addr.addr, 0));
}
}
+
if ((cl_lease = dhcp6_find_lease(&client6_iaidaddr,
&lv->val_dhcp6addr)) != NULL) {
dhcp6_update_lease(&lv->val_dhcp6addr, cl_lease);
@@ -156,7 +162,7 @@
if (client6_iaidaddr.client6_info.iaidinfo.renewtime == 0)
return (0);
if (client6_iaidaddr.client6_info.iaidinfo.renewtime == DHCP6_DURATITION_INFINITE) {
- client6_iaidaddr.client6_info.iaidinfo.rebindtime == DHCP6_DURATITION_INFINITE;
+ client6_iaidaddr.client6_info.iaidinfo.rebindtime = DHCP6_DURATITION_INFINITE;
return (0);
}
/* set up start date, and renew timer */
@@ -334,15 +340,21 @@
/* flag == ADDR_UPDATE */
[...5591 lines suppressed...]
update_resolver(struct dns_list *dns_list)
{
struct domain_list *oldlist, *dprev, *dlist, *dlist_next;
- struct domain_list *dfirst = NULL;
+// struct domain_list *dfirst = NULL;
struct dhcp6_listval *d, *d_next;
struct stat buf;
int i = 0;
@@ -311,9 +348,9 @@
}
}
}
- if (rename(resolv_dhcpv6_file, RESOLV_CONF_FILE)) {
- dprintf(LOG_ERR, "%s" " rename failed for resolv.conf file", FNAME);
- return(-1);
+ if (change_resolv_conf(resolv_dhcpv6_file)!=0) {
+// dprintf(LOG_ERR, "%s" " rename failed for resolv.conf file", FNAME);
+// needs initscripts patch! return(-1);
}
return (0);
}
@@ -321,7 +358,8 @@
static int
yywrap()
{
- update_resolver(new_dns_list);
+ update_resolver(new_dns_list);
fclose(yyin);
close(oldfd);
+ return 1;
}
diff -urN dhcp-0.10.orig/server6_addr.c dhcp-0.10/server6_addr.c
--- dhcp-0.10.orig/server6_addr.c 2004-03-15 17:02:55.000000000 -0500
+++ dhcp-0.10/server6_addr.c 2006-10-31 11:12:36.000000000 -0500
@@ -40,10 +40,8 @@
#include <sys/time.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
-
-#include <linux/ipv6.h>
-
#include <net/if.h>
+#include <linux/ipv6.h>
#include <errno.h>
#include <syslog.h>
@@ -58,6 +56,7 @@
#include "lease.h"
#include "timer.h"
#include "hash.h"
+#include "htonl.h"
extern FILE *server6_lease_file;
@@ -553,7 +552,7 @@
struct in6_addr *tempaddr;
{
int i, num_bytes;
- u_int8_t digest[16];
+// u_int8_t digest[16];
u_int8_t seed[16];
get_random_bytes(seed, 16);
@@ -579,8 +578,8 @@
struct dhcp6_optinfo *optinfo, *roptinfo;
{
struct dhcp6_list *reply_list = &roptinfo->addr_list;
- struct dhcp6_list *req_list = &optinfo->addr_list;
- struct dhcp6_listval *lv, *lv_next;
+// struct dhcp6_list *req_list = &optinfo->addr_list;
+// struct dhcp6_listval *lv, *lv_next;
if (!(host->hostscope.allow_flags & DHCIFF_TEMP_ADDRS)) {
roptinfo->iaidinfo.renewtime = host->hostscope.renew_time;
@@ -933,8 +932,8 @@
continue;
else {
for (link = ifnetwork->linklist; link; link = link->next) {
- /* without relay agent support, so far we assume
- * that client and server on the same link, no relay
+ /* if relay is NULL, assume client and server are on the
+ * same link (which cannot have a relay configuration option)
*/
struct v6addrlist *temp;
if (relay == NULL) {
@@ -944,8 +943,11 @@
return link;
} else {
for (temp = link->relaylist; temp; temp = temp->next) {
- if (IN6_ARE_ADDR_EQUAL(relay,
- &temp->v6addr.addr))
+ /* only compare the prefix configured to the relay
+ link address */
+ if (!prefixcmp (relay,
+ &temp->v6addr.addr,
+ temp->v6addr.plen))
return link;
else
continue;
diff -urN dhcp-0.10.orig/server6_conf.c dhcp-0.10/server6_conf.c
--- dhcp-0.10.orig/server6_conf.c 2004-03-15 17:03:52.000000000 -0500
+++ dhcp-0.10/server6_conf.c 2006-10-31 11:12:36.000000000 -0500
@@ -293,6 +293,8 @@
dhcp6_copy_list(¤t->dnslist.addrlist, &up->dnslist.addrlist);
if (current->dnslist.domainlist == NULL)
current->dnslist.domainlist = up->dnslist.domainlist;
+ if ( current->use_ra_prefix )
+ up->use_ra_prefix = 1;
return;
}
diff -urN dhcp-0.10.orig/server6_conf.h dhcp-0.10/server6_conf.h
--- dhcp-0.10.orig/server6_conf.h 2003-04-30 15:04:14.000000000 -0400
+++ dhcp-0.10/server6_conf.h 2006-10-31 11:12:36.000000000 -0500
@@ -50,6 +50,7 @@
u_int8_t send_flags;
u_int8_t allow_flags;
struct dns_list dnslist;
+ u_int8_t use_ra_prefix;
};
struct scopelist {
diff -urN dhcp-0.10.orig/server6_parse.y dhcp-0.10/server6_parse.y
--- dhcp-0.10.orig/server6_parse.y 2004-02-04 19:10:31.000000000 -0500
+++ dhcp-0.10/server6_parse.y 2006-10-31 11:12:36.000000000 -0500
@@ -33,6 +33,7 @@
%{
+#include <sys/types.h>
#include <stdio.h>
#include <string.h>
#include <syslog.h>
@@ -40,6 +41,7 @@
#include <sys/socket.h>
#include <net/if.h>
#include <linux/ipv6.h>
+#include <malloc.h>
#include "queue.h"
#include "dhcp6.h"
#include "config.h"
@@ -47,6 +49,7 @@
#include "server6_conf.h"
#include "hash.h"
#include "lease.h"
+#include "htonl.h"
extern int num_lines;
extern char *sfyytext;
@@ -104,6 +107,7 @@
%token <str> IAID IAIDINFO
%token <str> INFO_ONLY
%token <str> TO
+%token <str> USE_RA_PREFIX
%token <str> BAD_TOKEN
%type <str> name
@@ -267,7 +271,6 @@
linkbody
:
| linkbody linkparams
- | relaylist
;
linkparams
@@ -277,6 +280,7 @@
| hostdef
| groupdef
| confdecl
+ | relaylist
;
relaylist
@@ -900,6 +904,15 @@
dprintf(LOG_ERR, "%s" "bad server preference number", FNAME);
currentscope->scope->server_pref = $2;
}
+ | USE_RA_PREFIX ';'
+ {
+ if (!currentscope) {
+ currentscope = push_double_list(currentscope, &globalgroup->scope);
+ if (currentscope == NULL)
+ ABORT;
+ }
+ currentscope->scope->use_ra_prefix = 1;
+ }
;
number_or_infinity
diff -urN dhcp-0.10.orig/server6_token.l dhcp-0.10/server6_token.l
--- dhcp-0.10.orig/server6_token.l 2003-07-16 15:09:53.000000000 -0400
+++ dhcp-0.10/server6_token.l 2006-10-31 11:12:36.000000000 -0500
@@ -118,6 +118,7 @@
valid-life-time { return VALIDLIFETIME; }
prefer-life-time { return PREFERLIFETIME; }
server-preference { return PREFERENCE; }
+use-ra-prefix { return USE_RA_PREFIX; }
to { return TO; }
infinity { return INFINITY; }
dhcpv6-0.10-libdhcp6client.patch:
client6_addr.c | 61 +++++--
common.c | 37 +++-
dhc6_alloc.c | 67 ++++++++
dhc6_alloc.h | 17 ++
dhcp6.h | 17 +-
dhcp6c.c | 447 +++++++++++++++++++++++++++++++++++++++++++++++-------
dhcp6client.h | 22 ++
lease.c | 10 -
lease.h | 2
lease_token.l | 3
libdhcp_control.h | 103 ++++++++++++
11 files changed, 704 insertions(+), 82 deletions(-)
Index: dhcpv6-0.10-libdhcp6client.patch
===================================================================
RCS file: /cvs/dist/rpms/dhcpv6/devel/dhcpv6-0.10-libdhcp6client.patch,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- dhcpv6-0.10-libdhcp6client.patch 19 Jul 2006 06:46:03 -0000 1.7
+++ dhcpv6-0.10-libdhcp6client.patch 31 Oct 2006 18:29:55 -0000 1.8
@@ -1,5 +1,5 @@
--- dhcp-0.10/libdhcp6client/lease_token.l.libdhcp6client 2004-02-04 18:29:24.000000000 -0500
-+++ dhcp-0.10/libdhcp6client/lease_token.l 2006-07-19 01:30:57.000000000 -0400
++++ dhcp-0.10/libdhcp6client/lease_token.l 2006-10-31 12:07:24.000000000 -0500
@@ -241,6 +241,9 @@
fseek(file, 0, 0);
@@ -10,8 +10,8 @@
yylex();
return;
}
---- dhcp-0.10/libdhcp6client/client6_addr.c.libdhcp6client 2006-07-19 01:30:48.000000000 -0400
-+++ dhcp-0.10/libdhcp6client/client6_addr.c 2006-07-19 01:30:57.000000000 -0400
+--- dhcp-0.10/libdhcp6client/client6_addr.c.libdhcp6client 2006-10-31 12:07:19.000000000 -0500
++++ dhcp-0.10/libdhcp6client/client6_addr.c 2006-10-31 12:07:24.000000000 -0500
@@ -56,6 +56,10 @@
#include "timer.h"
#include "lease.h"
@@ -139,8 +139,8 @@
(ifa != 0L) && ( i < MAX_DEVICE );
i++, ifa = ifa->ifa_next
)
---- dhcp-0.10/libdhcp6client/dhcp6c.c.libdhcp6client 2006-07-19 01:30:48.000000000 -0400
-+++ dhcp-0.10/libdhcp6client/dhcp6c.c 2006-07-19 01:30:57.000000000 -0400
+--- dhcp-0.10/libdhcp6client/dhcp6c.c.libdhcp6client 2006-10-31 12:07:19.000000000 -0500
++++ dhcp-0.10/libdhcp6client/dhcp6c.c 2006-10-31 12:07:24.000000000 -0500
@@ -73,6 +73,9 @@
#include "common.h"
#include "timer.h"
@@ -1042,9 +1042,9 @@
}
return;
}
---- /dev/null 2006-07-18 14:52:55.494029261 -0400
-+++ dhcp-0.10/libdhcp6client/libdhcp_control.h 2006-07-19 01:30:57.000000000 -0400
-@@ -0,0 +1,104 @@
+--- /dev/null 2006-10-31 10:23:48.419497130 -0500
++++ dhcp-0.10/libdhcp6client/libdhcp_control.h 2006-10-31 12:08:05.000000000 -0500
+@@ -0,0 +1,103 @@
+/* libdhcp_control.h
+ *
+ * DHCP client control API for libdhcp, a minimal interface to the
@@ -1075,7 +1075,30 @@
+
+#define LOG_FATAL 8
+
-+enum dhcp_state_e;
++typedef enum dhcp_state_e
++{
++
++ /* DHCPv4 client states - third callback arg will be a 'struct client_state *' */
++ DHC4_NBI, /* failed: no broadcast interfaces found */
++ DHC4_PREINIT, /* configuration started - bring the interface "UP" */
++ DHC4_BOUND, /* lease obtained */
++ DHC4_RENEW, /* lease renewed */
++ DHC4_REBOOT, /* have valid lease, but now obtained a different one */
++ DHC4_REBIND, /* new, different lease */
++ DHC4_STOP, /* remove old lease */
++ DHC4_MEDIUM, /* media selection begun */
++ DHC4_TIMEOUT, /* timed out contacting DHCP server */
++ DHC4_FAIL, /* all attempts to contact server timed out, sleeping */
++ DHC4_EXPIRE, /* lease has expired, renewing */
++ DHC4_RELEASE, /* releasing lease */
++ /* This state raised by both clients: */
++ DHC_TIMEDOUT, /* libdhcp_control timeout has been exceeded */
++ /* DHCPv6 client states: */
++ DHC6_BOUND, /* new lease obtained - arg is optinfo * */
++ DHC6_REBIND, /* existing expired lease rebound - arg is optinfo * */
++ DHC6_RELEASE /* existing lease expired - arg is dhcp6_iaidaddr*/
++} DHCP_State;
++
+struct libdhcp_control_s;
+
+typedef
@@ -1106,30 +1129,6 @@
+ LIBDHCP_Error_Handler eh;
+} LIBDHCP_Control;
+
-+typedef enum dhcp_state_e
-+{
-+
-+ /* DHCPv4 client states - third callback arg will be a 'struct client_state *' */
-+ DHC4_NBI, /* failed: no broadcast interfaces found */
-+ DHC4_PREINIT, /* configuration started - bring the interface "UP" */
-+ DHC4_BOUND, /* lease obtained */
-+ DHC4_RENEW, /* lease renewed */
-+ DHC4_REBOOT, /* have valid lease, but now obtained a different one */
-+ DHC4_REBIND, /* new, different lease */
-+ DHC4_STOP, /* remove old lease */
-+ DHC4_MEDIUM, /* media selection begun */
-+ DHC4_TIMEOUT, /* timed out contacting DHCP server */
-+ DHC4_FAIL, /* all attempts to contact server timed out, sleeping */
-+ DHC4_EXPIRE, /* lease has expired, renewing */
-+ DHC4_RELEASE, /* releasing lease */
-+ /* This state raised by both clients: */
-+ DHC_TIMEDOUT, /* libdhcp_control timeout has been exceeded */
-+ /* DHCPv6 client states: */
-+ DHC6_BOUND, /* new lease obtained - arg is optinfo * */
-+ DHC6_REBIND, /* existing expired lease rebound - arg is optinfo * */
-+ DHC6_RELEASE /* existing lease expired - arg is dhcp6_iaidaddr*/
-+} DHCP_State;
-+
+typedef enum libdhcp_capability_e
+{/* DHCP client "capabilities" */
+ DHCP_USE_LEASE_DATABASE = 1, /* use / do not use persistent lease database files */
@@ -1149,8 +1148,8 @@
+} LIBDHCP_Capability;
+
+#endif
---- /dev/null 2006-07-18 14:52:55.494029261 -0400
-+++ dhcp-0.10/libdhcp6client/dhc6_alloc.h 2006-07-19 01:30:57.000000000 -0400
+--- /dev/null 2006-10-31 10:23:48.419497130 -0500
++++ dhcp-0.10/libdhcp6client/dhc6_alloc.h 2006-10-31 12:07:24.000000000 -0500
@@ -0,0 +1,17 @@
+
+extern void *dhc6_alloc( size_t );
@@ -1170,7 +1169,7 @@
+#undef strdup
+#define strdup( str ) dhc6_strdup( str )
--- dhcp-0.10/libdhcp6client/lease.c.libdhcp6client 2004-03-03 15:11:16.000000000 -0500
-+++ dhcp-0.10/libdhcp6client/lease.c 2006-07-19 01:30:57.000000000 -0400
++++ dhcp-0.10/libdhcp6client/lease.c 2006-10-31 12:07:24.000000000 -0500
@@ -64,7 +64,7 @@
static int init_lease_hashes __P((void));
@@ -1210,7 +1209,7 @@
dprintf(LOG_ERR, "getifaddrs error");
return -1;
--- dhcp-0.10/libdhcp6client/lease.h.libdhcp6client 2003-07-01 22:21:25.000000000 -0400
-+++ dhcp-0.10/libdhcp6client/lease.h 2006-07-19 01:30:57.000000000 -0400
++++ dhcp-0.10/libdhcp6client/lease.h 2006-10-31 12:07:24.000000000 -0500
@@ -101,7 +101,7 @@
extern FILE *init_leases __P((const char *));
extern void lease_parse __P((FILE *));
@@ -1220,8 +1219,8 @@
extern FILE *sync_leases __P((FILE *, const char *, char *));
extern struct dhcp6_timer *syncfile_timo __P((void *));
extern unsigned int addr_hash __P((const void *));
---- /dev/null 2006-07-18 14:52:55.494029261 -0400
-+++ dhcp-0.10/libdhcp6client/dhc6_alloc.c 2006-07-19 01:30:57.000000000 -0400
+--- /dev/null 2006-10-31 10:23:48.419497130 -0500
++++ dhcp-0.10/libdhcp6client/dhc6_alloc.c 2006-10-31 12:07:24.000000000 -0500
@@ -0,0 +1,67 @@
+#include <malloc.h>
+#include <search.h>
@@ -1290,8 +1289,8 @@
+ tdestroy(ptr_tree, free);
+ ptr_tree = 0L;
+}
---- dhcp-0.10/libdhcp6client/common.c.libdhcp6client 2006-07-19 01:30:48.000000000 -0400
-+++ dhcp-0.10/libdhcp6client/common.c 2006-07-19 01:30:57.000000000 -0400
+--- dhcp-0.10/libdhcp6client/common.c.libdhcp6client 2006-10-31 12:07:19.000000000 -0500
++++ dhcp-0.10/libdhcp6client/common.c 2006-10-31 12:07:24.000000000 -0500
@@ -79,11 +79,19 @@
#include "timer.h"
#include "lease.h"
@@ -1408,8 +1407,8 @@
if (foreground && debug_thresh >= level) {
time_t now;
---- dhcp-0.10/libdhcp6client/dhcp6.h.libdhcp6client 2006-07-19 01:30:48.000000000 -0400
-+++ dhcp-0.10/libdhcp6client/dhcp6.h 2006-07-19 01:30:57.000000000 -0400
+--- dhcp-0.10/libdhcp6client/dhcp6.h.libdhcp6client 2006-10-31 12:07:19.000000000 -0500
++++ dhcp-0.10/libdhcp6client/dhcp6.h 2006-10-31 12:07:24.000000000 -0500
@@ -116,9 +116,24 @@
typedef enum { IANA, IATA, IAPD} iatype_t;
@@ -1436,8 +1435,8 @@
/* Internal data structure */
struct duid {
---- /dev/null 2006-07-18 14:52:55.494029261 -0400
-+++ dhcp-0.10/libdhcp6client/dhcp6client.h 2006-07-19 01:30:57.000000000 -0400
+--- /dev/null 2006-10-31 10:23:48.419497130 -0500
++++ dhcp-0.10/libdhcp6client/dhcp6client.h 2006-10-31 12:07:24.000000000 -0500
@@ -0,0 +1,22 @@
+/* dhcp6client.h
+ *
Index: dhcpv6.spec
===================================================================
RCS file: /cvs/dist/rpms/dhcpv6/devel/dhcpv6.spec,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- dhcpv6.spec 29 Sep 2006 19:30:11 -0000 1.43
+++ dhcpv6.spec 31 Oct 2006 18:29:55 -0000 1.44
@@ -1,45 +1,21 @@
Summary: DHCPv6 - DHCP server and client for IPv6
Name: dhcpv6
Version: 0.10
-Release: 32%{?dist}
+Release: 33%{?dist}
License: GPL
Group: System Environment/Daemons
URL: http://dhcpv6.sourceforge.net/
Source0: ftp://ftp.sourceforge.net/pub/sourceforge/d/dh/dhcp/dhcp-%{version}.tgz
-Source1: rfc3315.txt
-Source3: libdhcp6client.pc
-BuildRoot: %{_tmppath}/%{name}-%{version}-root
-Patch0: dhcpv6-0.10-initscripts.patch
-Patch1: dhcpv6-0.10-change_resolv_conf.patch
-Patch2: dhcpv6-0.10-bug_136146.patch
-Patch3: dhcpv6-0.10-yywrap.patch
-Patch4: dhcpv6-0.10-relay_agent.patch
-Patch5: dhcpv6-0.10-server_relay_support.patch
-Patch6: dhcpv6-0.10-install_relay_agent.patch
-Patch7: dhcpv6-0.10-dhcp6r-init.patch
-Patch8: dhcpv6-0.10-server6_addr.patch
-Patch9: dhcpv6-0.10-bug_144585.patch
-Patch10: dhcpv6-0.10-prefix_delegation_interface.patch
-Patch11: dhcpv6-0.10-warnings.patch
-Patch12: dhcpv6-0.10-use_glibc_ifaddrs.patch
-Patch13: dhcpv6-0.10-165882.patch
-Patch14: dhcpv6-0.10-install_no_chown.patch
-Patch15: dhcpv6-0.10-no-strip.patch
-Patch16: dhcpv6-0.10-prefix.patch
-Patch17: dhcpv6-0.10-htonl.patch
-Patch18: dhcpv6-0.10-libdhcp6client-Makefile.patch
-Patch19: dhcpv6-0.10-libdhcp6client.patch
-Patch20: dhcpv6-0.10-salen.patch
-Patch21: dhcpv6-0.10-prefix_bz196429.patch
-Patch22: dhcpv6-0.10-bz204713.patch
+Source1: libdhcp6client.pc
+Source2: rfc3315.txt
+
+Patch0: dhcpv6-0.10-redhat.patch
+Patch1: dhcpv6-0.10-libdhcp6client.patch
+
Prereq: /sbin/chkconfig, /sbin/service
+BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: flex, bison, openssl-devel, autoconf, automake, libtool
-%{?!NODEBUGINFO: %define NODEBUGINFO 0}
-%if %{NODEBUGINFO}
-%define debug_package %{nil}
-%endif
-
%description
Implements the Dynamic Host Configuration Protocol (DHCP) for
Internet Protocol version 6 (IPv6) networks in accordance with
@@ -51,64 +27,6 @@
See man dhcp6s(8), dhcp6r(8), dhcp6s.conf(5),
and the documentation in /usr/share/doc/dhcpv6* .
-%prep
-%setup -q -n dhcp-%{version}
-%patch0 -p1 -b .initscripts
-%patch1 -p1 -b .change_resolv_conf
-%patch2 -p1 -b .bug_136146
-%patch3 -p1 -b .yywrap
-%patch4 -p1 -b .relay_agent
-%patch5 -b .server_relay_support
-%patch6 -p1 -b .install_relay_agent
-%patch7 -p1 -b .dhcp6r_init
-%patch8 -p1 -b .server6_addr
-%patch9 -p1 -b .bug_144585
-%patch10 -p1 -b .prefix_delegation_interface
-%patch11 -p1 -b .warnings
-%patch12 -p1 -b .use_glibc_ifaddrs
-rm -f ifaddrs.h
-%patch13 -p1 -b .165882
-%patch14 -p1 -b .install_no_chown
-%patch15 -p1 -b .no-strip
-%patch16 -p1 -b .prefix
-%patch17 -p1 -b .htonl
-%patch18 -p1 -b .libdhcp6client-Makefile
-%patch20 -p1 -b .salen
-%patch21 -p1 -b .prefix_bz196429
-%patch22 -p1 -b .bz204713
-%if %{NODEBUGINFO}
-export CFLAGS=`echo "$RPM_OPT_FLAGS" | sed 's/-O2//g'`' -g3 -gdwarf-2'
-%else
-export LDFLAGS='-pie -Wl,-z,relro,-z,now,-z,nodlopen,-z,noexecstack'
-export CFLAGS="$RPM_OPT_FLAGS -fPIE -g -Wall"
-%endif
-autoconf
-%configure \
- --prefix=\
- --mandir=/usr/share/man
-make libdhcp6client/.
-%patch19 -p1 -b .libdhcp6client
-
-%build
-make
-cp -fp %{SOURCE1} docs
-
-%install
-rm -rf %{buildroot}
-pushd ${RPM_BUILD_DIR}/dhcp-%{version}
-for m in dhcp6c.8 dhcp6s.8 dhcp6r.8 dhcp6c.conf.5 dhcp6s.conf.5 ; do
- /bin/mv $m $m.dos;
- /usr/bin/tr -d '\r' < $m.dos > $m;
-done;
-popd
-sed 's/@DHCPV6_VERSION@/'%{version}'/' < %SOURCE3 > libdhcp6client.pc
-make install DESTDIR=%{buildroot} LIBDIR=%{_libdir} PKGCFGDIR=%{_libdir}/pkgconfig INSTALL_USER=`id -nu` INSTALL_GROUP=`id -gn`
-mkdir -p %{buildroot}%{_localstatedir}/lib/dhcpv6
-%if %{NODEBUGINFO}
-/usr/lib/rpm/brp-compress
-exit 0
-%endif
-
%package -n dhcpv6_client
Summary: DHCPv6 client
Requires: initscripts >= 7.73
@@ -136,18 +54,44 @@
%description -n libdhcp6client-devel
Header files for development with the DHCPv6 client library.
+%prep
+%setup -q -n dhcp-%{version}
+%patch0 -p1 -b .rh
+rm -f ifaddrs.h # part of glibc-headers
+autoconf
+
+# configure here because we need to patch libdhcp6client subdir
+export LDFLAGS='-pie -Wl,-z,relro,-z,now,-z,nodlopen,-z,noexecstack'
+export CFLAGS="$RPM_OPT_FLAGS -fPIE -g -Wall"
+%configure --prefix=/ --mandir=%{_mandir}
+make libdhcp6client/.
+%patch1 -p1 -b .libdhcp6client
+
+%build
+make
+cp -fp %{SOURCE2} docs
+
+%install
+rm -rf $RPM_BUILD_ROOT
+sed 's/@DHCPV6_VERSION@/'%{version}'/' < %{SOURCE1} > libdhcp6client.pc
+make install DESTDIR=$RPM_BUILD_ROOT \
+ LIBDIR=%{_libdir} \
+ PKGCFGDIR=%{_libdir}/pkgconfig \
+ INSTALL_USER=`id -nu` INSTALL_GROUP=`id -gn`
+mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/dhcpv6
+
%post
chkconfig --add dhcp6s
%preun
if [ $1 = 0 ]; then
- service dhcp6s stop > /dev/null 2>&1
- chkconfig --del dhcp6s
+ service dhcp6s stop > /dev/null 2>&1
+ chkconfig --del dhcp6s
fi
%postun
if [ "$1" -ge "1" ]; then
- service dhcp6s condrestart >/dev/null 2>&1
+ service dhcp6s condrestart >/dev/null 2>&1
fi
exit 0
@@ -156,7 +100,7 @@
%postun -n libdhcp6client -p /sbin/ldconfig
%clean
-rm -rf %{buildroot}
+rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
@@ -194,6 +138,11 @@
%{_libdir}/libdhcp6client.a
%changelog
+* Tue Oct 31 2006 David Cantrell <dcantrell at redhat.com> - 0.10-33
+- spec file cleanup (remove NODEBUGINFO, useless code, etc)
+- Patch rollup since a lot of the later patches overwrote previous patches
+- Put typedef for dhcp_state_e before it's used in libdhcp_control.h (#212612)
+
* Fri Sep 29 2006 David Cantrell <dcantrell at redhat.com> - 0.10-32
- Line continuation slashes for init script description (#204713)
More information about the fedora-cvs-commits
mailing list