- Change the way libdhcp4client is compiled (patch main source, create new
Makefile rather than copy and patch code after main patches) - Fix up problems generating compiler warnings - Use 'gcc' for making dependencies - Pass -fPIC instead of -fpie/-fPIE in compiler flags - Combine the extended new option info changes in to one patch file (makes it easier for outside projects that want to use dhcdbd and NetworkManager)
This commit is contained in:
parent
3c1d581943
commit
08af1e1d6a
@ -1,5 +1,105 @@
|
||||
--- dhcp-3.0.5/client/Makefile.dist.Makefile 2004-06-10 13:59:11.000000000 -0400
|
||||
+++ dhcp-3.0.5/client/Makefile.dist 2006-11-10 11:10:13.000000000 -0500
|
||||
@@ -128,6 +128,6 @@
|
||||
|
||||
|
||||
dhclient: $(OBJS) $(DHCPLIB)
|
||||
- $(CC) $(LFLAGS) -o $(PROG) $(OBJS) $(DHCPLIB) $(LIBS)
|
||||
+ $(CC) $(LFLAGS) -pie $(RPM_OPT_FLAGS) -Wl,-z,relro,-z,now,-z,noexecstack,-z,nodlopen -o $(PROG) $(OBJS) $(DHCPLIB) $(LIBS)
|
||||
|
||||
# Dependencies (semi-automatically-generated)
|
||||
--- dhcp-3.0.5/dhcpctl/Makefile.dist.Makefile 2005-03-03 11:55:23.000000000 -0500
|
||||
+++ dhcp-3.0.5/dhcpctl/Makefile.dist 2006-11-10 11:11:16.000000000 -0500
|
||||
@@ -37,10 +37,10 @@
|
||||
all: libdhcpctl.a omshell cltest $(CATMANPAGES)
|
||||
|
||||
omshell: omshell.o $(DHCPCTLLIBS)
|
||||
- $(CC) $(DEBUG) $(LFLAGS) -o omshell omshell.o $(DHCPCTLLIBS) $(LIBS)
|
||||
+ $(CC) $(DEBUG) $(LFLAGS) -pie $(RPM_OPT_FLAGS) -Wl,-z,relro,-z,now,-z,noexecstack,-z,nodlopen -o omshell omshell.o $(DHCPCTLLIBS) $(LIBS)
|
||||
|
||||
cltest: cltest.o $(DHCPCTLLIBS)
|
||||
- $(CC) $(DEBUG) $(LFLAGS) -o cltest cltest.o $(DHCPCTLLIBS) $(LIBS)
|
||||
+ $(CC) $(DEBUG) $(LFLAGS) -pie $(RPM_OPT_FLAGS) -Wl,-z,relro,-z,now,-z,noexecstack,-z,nodlopen -o cltest cltest.o $(DHCPCTLLIBS) $(LIBS)
|
||||
|
||||
libdhcpctl.a: $(OBJ)
|
||||
rm -f libdhcpctl.a
|
||||
--- dhcp-3.0.5/dst/Makefile.dist.Makefile 2004-06-10 13:59:28.000000000 -0400
|
||||
+++ dhcp-3.0.5/dst/Makefile.dist 2006-11-10 11:11:42.000000000 -0500
|
||||
@@ -30,7 +30,12 @@
|
||||
|
||||
all: libdst.a
|
||||
|
||||
-install:
|
||||
+install: all
|
||||
+ if [ ! -d $(DESTDIR)$(LIBDIR) ]; then \
|
||||
+ mkdir $(DESTDIR)$(LIBDIR); chmod 755 $(DESTDIR)$(LIBDIR); \
|
||||
+ fi
|
||||
+ $(INSTALL) libdst.a $(DESTDIR)$(LIBDIR)
|
||||
+ $(CHMOD) 644 $(DESTDIR)$(LIBDIR)/libdst.a
|
||||
|
||||
libdst.a: $(OBJ)
|
||||
rm -f dst.a
|
||||
--- dhcp-3.0.5/minires/Makefile.dist.Makefile 2004-06-10 13:59:40.000000000 -0400
|
||||
+++ dhcp-3.0.5/minires/Makefile.dist 2006-11-10 11:14:00.000000000 -0500
|
||||
@@ -21,9 +21,6 @@
|
||||
# <info@isc.org>
|
||||
# http://www.isc.org/
|
||||
|
||||
-CATMANPAGES = dhcpctl.cat3
|
||||
-SEDMANPAGES = dhcpctl.man3
|
||||
-MAN = dhcpctl.3
|
||||
SRC = res_mkupdate.c res_init.c res_update.c res_send.c res_comp.c \
|
||||
res_sendsigned.c res_findzonecut.c res_query.c res_mkquery.c \
|
||||
ns_date.c ns_parse.c ns_sign.c ns_name.c ns_samedomain.c ns_verify.c
|
||||
@@ -50,24 +47,17 @@
|
||||
-rm -f $(OBJ) libres.a
|
||||
|
||||
realclean: clean
|
||||
- -rm -f *~ $(CATMANPAGES) $(SEDMANPAGES)
|
||||
+ -rm -f *~
|
||||
|
||||
distclean: realclean
|
||||
-rm -f Makefile
|
||||
|
||||
links:
|
||||
- @for foo in $(SRC) $(MAN) $(HDRS); do \
|
||||
+ @for foo in $(SRC) $(HDRS); do \
|
||||
if [ ! -b $$foo ]; then \
|
||||
rm -f $$foo; \
|
||||
fi; \
|
||||
ln -s $(TOP)/minires/$$foo $$foo; \
|
||||
done
|
||||
|
||||
-dhcpctl.cat3: dhcpctl.man3
|
||||
- nroff -man dhcpctl.man3 >dhcpctl.cat3
|
||||
-
|
||||
-dhcpctl.man3: dhcpctl.3
|
||||
- sed -e "s#ETCDIR#$(ETC)#g" -e "s#DBDIR#$(VARDB)#g" \
|
||||
- -e "s#RUNDIR#$(VARRUN)#g" < dhcpctl.3 >dhcpctl.man3
|
||||
-
|
||||
# Dependencies (semi-automatically-generated)
|
||||
--- dhcp-3.0.5/relay/Makefile.dist.Makefile 2004-06-10 13:59:50.000000000 -0400
|
||||
+++ dhcp-3.0.5/relay/Makefile.dist 2006-11-10 11:13:30.000000000 -0500
|
||||
@@ -83,6 +83,6 @@
|
||||
-e "s#RUNDIR#$(VARRUN)#" < dhcrelay.8 >dhcrelay.man8
|
||||
|
||||
dhcrelay: dhcrelay.o $(DHCPLIB)
|
||||
- $(CC) $(LFLAGS) -o $(PROG) dhcrelay.o $(DHCPLIB) $(LIBS)
|
||||
+ $(CC) $(LFLAGS) -pie $(RPM_OPT_FLAGS) -Wl,-z,relro,-z,now,-z,nodlopen,-z,noexecstack -o $(PROG) dhcrelay.o $(DHCPLIB) $(LIBS)
|
||||
|
||||
# Dependencies (semi-automatically-generated)
|
||||
--- dhcp-3.0.5/server/Makefile.dist.Makefile 2004-06-10 13:59:50.000000000 -0400
|
||||
+++ dhcp-3.0.5/server/Makefile.dist 2006-11-10 11:14:27.000000000 -0500
|
||||
@@ -103,6 +103,6 @@
|
||||
-e "s#RUNDIR#$(VARRUN)#g" < dhcpd.leases.5 >dhcpd.leases.man5
|
||||
|
||||
dhcpd: $(OBJS) $(COBJ) $(DHCPLIB)
|
||||
- $(CC) $(LFLAGS) -o dhcpd $(OBJS) $(DHCPLIB) $(LIBS)
|
||||
+ $(CC) $(LFLAGS) -pie $(RPM_OPT_FLAGS) -Wl,-z,relro,-z,now,-z,noexecstack,-z,nodlopen -o dhcpd $(OBJS) $(DHCPLIB) $(LIBS)
|
||||
|
||||
# Dependencies (semi-automatically-generated)
|
||||
--- dhcp-3.0.5/Makefile.Makefile 2004-06-10 13:59:10.000000000 -0400
|
||||
+++ dhcp-3.0.5/Makefile 2006-11-07 10:30:45.000000000 -0500
|
||||
+++ dhcp-3.0.5/Makefile 2006-11-10 11:09:32.000000000 -0500
|
||||
@@ -33,7 +33,7 @@
|
||||
if [ ! -d work.$$sysname ]; then \
|
||||
echo No build directory for $$sysname - please run ./configure.; \
|
||||
@ -35,3 +135,14 @@
|
||||
+ (cd work.$$sysname; $(MAKE) links); \
|
||||
fi
|
||||
|
||||
--- dhcp-3.0.5/Makefile.conf.Makefile 2005-06-16 15:39:35.000000000 -0400
|
||||
+++ dhcp-3.0.5/Makefile.conf 2006-11-10 11:12:43.000000000 -0500
|
||||
@@ -49,7 +49,7 @@
|
||||
DEBUG = -g
|
||||
#WARNERR = -Werror
|
||||
RANLIB = ranlib
|
||||
-MKDEP = mkdep
|
||||
+MKDEP = $(CC)
|
||||
CLIENT_PATH = '"PATH=/usr/ucb:/usr/bin:/usr/sbin:/bin:/sbin"'
|
||||
|
||||
BINDLIB = ../minires/libres.a
|
||||
|
197
dhcp-3.0.5-extended-new-option-info.patch
Normal file
197
dhcp-3.0.5-extended-new-option-info.patch
Normal file
@ -0,0 +1,197 @@
|
||||
--- dhcp-3.0.5/client/dhclient.c.enoi 2006-08-22 11:13:57.000000000 -0400
|
||||
+++ dhcp-3.0.5/client/dhclient.c 2006-11-10 11:00:51.000000000 -0500
|
||||
@@ -74,6 +74,9 @@
|
||||
int onetry=0;
|
||||
int quiet=0;
|
||||
int nowait=0;
|
||||
+#ifdef EXTENDED_NEW_OPTION_INFO
|
||||
+int extended_option_environment = 0;
|
||||
+#endif
|
||||
|
||||
static void usage PROTO ((void));
|
||||
|
||||
@@ -204,6 +207,11 @@
|
||||
} else if (!strcmp (argv [i], "--version")) {
|
||||
log_info ("isc-dhclient-%s", DHCP_VERSION);
|
||||
exit (0);
|
||||
+#ifdef EXTENDED_NEW_OPTION_INFO
|
||||
+ } else if (!strcmp (argv [i], "-x")) {
|
||||
+ extended_option_environment = 1;
|
||||
+ new_option_info_tree = GENERATE_NEW_OPTION_INFO;
|
||||
+#endif
|
||||
} else if (argv [i][0] == '-') {
|
||||
usage ();
|
||||
} else {
|
||||
@@ -476,7 +484,11 @@
|
||||
log_info (arr);
|
||||
log_info (url);
|
||||
|
||||
+#ifdef EXTENDED_NEW_OPTION_INFO
|
||||
+ log_error ("Usage: dhclient [-1dqr] [-nwx] [-p <port>] %s",
|
||||
+#else
|
||||
log_error ("Usage: dhclient [-1dqr] [-nw] [-p <port>] %s",
|
||||
+#endif
|
||||
"[-s server]");
|
||||
log_error (" [-cf config-file] [-lf lease-file]%s",
|
||||
"[-pf pid-file] [-e VAR=val]");
|
||||
@@ -2449,6 +2461,25 @@
|
||||
const char *prefix;
|
||||
};
|
||||
|
||||
+#ifdef EXTENDED_NEW_OPTION_INFO
|
||||
+static
|
||||
+void build_universe_info_envvar
|
||||
+( struct option_cache *oc,
|
||||
+ struct packet *p, struct lease *l,
|
||||
+ struct client_state *client,
|
||||
+ struct option_state *in_o,
|
||||
+ struct option_state *cf_o,
|
||||
+ struct binding_scope **scope,
|
||||
+ struct universe *u, void *es
|
||||
+)
|
||||
+{
|
||||
+ char info_name[512], info_data[512];
|
||||
+ snprintf(info_name, 512, "%s._universe_.", oc->option->universe->name);
|
||||
+ snprintf(info_data, 512, "%u:%s", oc->option->code,oc->option->format);
|
||||
+ client_envadd( client, info_name, oc->option->name, info_data );
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
void client_option_envadd (struct option_cache *oc,
|
||||
struct packet *packet, struct lease *lease,
|
||||
struct client_state *client_state,
|
||||
@@ -2465,6 +2496,28 @@
|
||||
in_options, cfg_options, scope, oc, MDL)) {
|
||||
if (data.len) {
|
||||
char name [256];
|
||||
+#ifdef EXTENDED_NEW_OPTION_INFO
|
||||
+ if (extended_option_environment) {
|
||||
+ if ((oc->option->universe != &dhcp_universe)
|
||||
+ && (oc->option->universe->index > fqdn_universe.index)
|
||||
+ && (es->universe != oc->option->universe)) {
|
||||
+ es->universe = oc->option->universe;
|
||||
+ (*(es->universe->foreach)) ((struct packet *)0,
|
||||
+ (struct lease *)0,
|
||||
+ client_state,
|
||||
+ in_options, cfg_options,
|
||||
+ scope, es->universe, es,
|
||||
+ build_universe_info_envvar);
|
||||
+ } else {
|
||||
+ if (lookup_new_option_info(oc->option) != NULL) {
|
||||
+ build_universe_info_envvar(oc, packet, lease,
|
||||
+ client_state, in_options,
|
||||
+ cfg_options, scope,
|
||||
+ oc->option->universe, es);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+#endif
|
||||
if (dhcp_option_ev_name (name, sizeof name,
|
||||
oc -> option)) {
|
||||
client_envadd (es -> client, es -> prefix,
|
||||
@@ -2704,7 +2757,14 @@
|
||||
s = option -> name;
|
||||
if (j + 1 == buflen)
|
||||
return 0;
|
||||
+#ifdef EXTENDED_NEW_OPTION_INFO
|
||||
+ if (!extended_option_environment)
|
||||
+ buf[j++] = '_';
|
||||
+ else
|
||||
+ buf[j++] = '.';
|
||||
+#else
|
||||
buf [j++] = '_';
|
||||
+#endif
|
||||
}
|
||||
++i;
|
||||
} while (i != 2);
|
||||
--- dhcp-3.0.5/client/dhclient.8.enoi 2005-09-14 12:03:33.000000000 -0400
|
||||
+++ dhcp-3.0.5/client/dhclient.8 2006-11-10 11:05:25.000000000 -0500
|
||||
@@ -82,6 +82,9 @@
|
||||
.B -w
|
||||
]
|
||||
[
|
||||
+.B -x
|
||||
+]
|
||||
+[
|
||||
.I if0
|
||||
[
|
||||
.I ...ifN
|
||||
@@ -265,6 +268,11 @@
|
||||
supplying the
|
||||
.B -nw
|
||||
flag.
|
||||
+.PP
|
||||
+The -x argument enables extended option information to be created in the
|
||||
+-s dhclient-script environment, which would allow applications running
|
||||
+in that environment to handle options they do not know about in advance -
|
||||
+this is a Red Hat extension to support dhcdbd and NetworkManager.
|
||||
.SH CONFIGURATION
|
||||
The syntax of the dhclient.conf(5) file is discussed separately.
|
||||
.SH OMAPI
|
||||
--- dhcp-3.0.5/common/parse.c.enoi 2006-02-22 17:43:27.000000000 -0500
|
||||
+++ dhcp-3.0.5/common/parse.c 2006-11-10 11:00:51.000000000 -0500
|
||||
@@ -1271,6 +1271,10 @@
|
||||
option_hash_add (option -> universe -> hash,
|
||||
(const char *)option -> name,
|
||||
0, option, MDL);
|
||||
+#ifdef EXTENDED_NEW_OPTION_INFO
|
||||
+ if (new_option_info_tree != NULL)
|
||||
+ add_new_option_info(option);
|
||||
+#endif
|
||||
return 1;
|
||||
}
|
||||
|
||||
--- dhcp-3.0.5/common/tables.c.enoi 2006-02-22 17:43:27.000000000 -0500
|
||||
+++ dhcp-3.0.5/common/tables.c 2006-11-10 11:00:51.000000000 -0500
|
||||
@@ -1250,3 +1250,35 @@
|
||||
fqdn_universe.name, 0,
|
||||
&fqdn_universe, MDL);
|
||||
}
|
||||
+
|
||||
+#ifdef EXTENDED_NEW_OPTION_INFO
|
||||
+#include <search.h>
|
||||
+
|
||||
+void *new_option_info_tree = NULL;
|
||||
+
|
||||
+static int new_option_info_comparator(const void * p1, const void * p2) {
|
||||
+ uint32_t ocode1 = (((const struct option*)p1)->universe->index << 8)
|
||||
+ | (((const struct option*)p1)->code),
|
||||
+ ocode2 = (((const struct option*)p2)->universe->index << 8)
|
||||
+ | (((const struct option*)p2)->code);
|
||||
+
|
||||
+ return((ocode1 == ocode2) ? 0 : ((ocode1 > ocode2) ? 1 : -1));
|
||||
+}
|
||||
+
|
||||
+void *add_new_option_info(struct option * option) {
|
||||
+ if (option->universe->index >= fqdn_universe.index)
|
||||
+ return NULL;
|
||||
+
|
||||
+ if (new_option_info_tree == GENERATE_NEW_OPTION_INFO)
|
||||
+ new_option_info_tree = NULL;
|
||||
+
|
||||
+ return tsearch(option, &(new_option_info_tree), new_option_info_comparator);
|
||||
+}
|
||||
+
|
||||
+void *lookup_new_option_info(struct option * option) {
|
||||
+ if (new_option_info_tree == GENERATE_NEW_OPTION_INFO)
|
||||
+ return NULL;
|
||||
+
|
||||
+ return tfind(option, &(new_option_info_tree), new_option_info_comparator);
|
||||
+}
|
||||
+#endif
|
||||
--- dhcp-3.0.5/includes/dhcpd.h.enoi 2006-05-17 16:16:59.000000000 -0400
|
||||
+++ dhcp-3.0.5/includes/dhcpd.h 2006-11-10 11:00:51.000000000 -0500
|
||||
@@ -1811,6 +1811,13 @@
|
||||
void initialize_common_option_spaces PROTO ((void));
|
||||
struct universe *config_universe;
|
||||
|
||||
+#ifdef EXTENDED_NEW_OPTION_INFO
|
||||
+#define GENERATE_NEW_OPTION_INFO ((void*)1)
|
||||
+extern void *new_option_info_tree;
|
||||
+extern void *add_new_option_info(struct option *);
|
||||
+extern void *lookup_new_option_info(struct option *);
|
||||
+#endif
|
||||
+
|
||||
/* stables.c */
|
||||
#if defined (FAILOVER_PROTOCOL)
|
||||
extern failover_option_t null_failover_option;
|
@ -1,5 +1,5 @@
|
||||
--- dhcp-3.0.5/client/dhclient.c.libdhcp4client 2006-11-09 16:02:36.000000000 -0500
|
||||
+++ dhcp-3.0.5/client/dhclient.c 2006-11-09 16:02:36.000000000 -0500
|
||||
--- dhcp-3.0.5/client/dhclient.c.libdhcp4client 2006-11-10 11:58:18.000000000 -0500
|
||||
+++ dhcp-3.0.5/client/dhclient.c 2006-11-10 11:58:30.000000000 -0500
|
||||
@@ -78,7 +78,9 @@
|
||||
int extended_option_environment = 0;
|
||||
#endif
|
||||
@ -90,7 +90,7 @@
|
||||
/* Set up the OMAPI. */
|
||||
status = omapi_init ();
|
||||
if (status != ISC_R_SUCCESS)
|
||||
@@ -475,9 +526,12 @@
|
||||
@@ -469,9 +520,12 @@
|
||||
log_fatal("dhclient(%u) is already running - exiting. ", dhcpid);
|
||||
return(1);
|
||||
}
|
||||
@ -105,7 +105,7 @@
|
||||
if (!quiet) {
|
||||
log_info ("%s %s", message, DHCP_VERSION);
|
||||
log_info (copyright);
|
||||
@@ -486,7 +540,7 @@
|
||||
@@ -480,7 +534,7 @@
|
||||
log_info ("%s", "");
|
||||
} else
|
||||
log_perror = 0;
|
||||
@ -114,7 +114,7 @@
|
||||
/* If we're given a relay agent address to insert, for testing
|
||||
purposes, figure out what it is. */
|
||||
if (relay) {
|
||||
@@ -773,12 +827,18 @@
|
||||
@@ -767,12 +821,18 @@
|
||||
arg_conf_len = 0L;
|
||||
}
|
||||
|
||||
@ -134,7 +134,7 @@
|
||||
/* XXX */
|
||||
/* config_counter(&snd_counter, &rcv_counter); */
|
||||
|
||||
@@ -796,7 +856,7 @@
|
||||
@@ -790,7 +850,7 @@
|
||||
if (!persist) {
|
||||
/* Nothing more to do. */
|
||||
log_info ("No broadcast interfaces found - exiting.");
|
||||
@ -143,7 +143,7 @@
|
||||
}
|
||||
} else if (!release_mode) {
|
||||
/* Call the script with the list of interfaces. */
|
||||
@@ -891,7 +951,7 @@
|
||||
@@ -885,7 +945,7 @@
|
||||
dmalloc_longterm = dmalloc_outstanding;
|
||||
dmalloc_outstanding = 0;
|
||||
#endif
|
||||
@ -152,7 +152,7 @@
|
||||
/* If we're not supposed to wait before getting the address,
|
||||
don't. */
|
||||
if (nowait)
|
||||
@@ -904,7 +964,123 @@
|
||||
@@ -898,7 +958,123 @@
|
||||
|
||||
/* Start dispatching packets and timeouts... */
|
||||
dispatch ();
|
||||
@ -276,7 +276,7 @@
|
||||
/*NOTREACHED*/
|
||||
return 0;
|
||||
}
|
||||
@@ -1301,8 +1477,25 @@
|
||||
@@ -1294,8 +1470,25 @@
|
||||
client -> new -> rebind += cur_time;
|
||||
if (client -> new -> rebind < cur_time)
|
||||
client -> new -> rebind = TIME_MAX;
|
||||
@ -302,7 +302,7 @@
|
||||
}
|
||||
|
||||
void bind_lease (client)
|
||||
@@ -1340,6 +1533,9 @@
|
||||
@@ -1333,6 +1526,9 @@
|
||||
return;
|
||||
}
|
||||
|
||||
@ -312,7 +312,7 @@
|
||||
/* Write out the new lease. */
|
||||
write_client_lease (client, client -> new, 0, 0);
|
||||
|
||||
@@ -1441,13 +1637,13 @@
|
||||
@@ -1434,13 +1630,13 @@
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -328,7 +328,7 @@
|
||||
int write_host (host)
|
||||
struct host_decl *host;
|
||||
{
|
||||
@@ -2020,6 +2216,10 @@
|
||||
@@ -2013,6 +2209,10 @@
|
||||
tell the shell script that we failed to allocate an address,
|
||||
and try again later. */
|
||||
if (onetry) {
|
||||
@ -339,7 +339,7 @@
|
||||
if (!quiet)
|
||||
log_info ("Unable to obtain a lease on first try.%s",
|
||||
" Exiting.");
|
||||
@@ -2631,7 +2831,9 @@
|
||||
@@ -2624,7 +2824,9 @@
|
||||
free_client_lease (lease, MDL);
|
||||
}
|
||||
|
||||
@ -349,7 +349,7 @@
|
||||
|
||||
void rewrite_client_leases ()
|
||||
{
|
||||
@@ -3079,16 +3281,60 @@
|
||||
@@ -3069,16 +3271,60 @@
|
||||
int script_go (client)
|
||||
struct client_state *client;
|
||||
{
|
||||
@ -413,7 +413,7 @@
|
||||
|
||||
if (client)
|
||||
scriptName = client -> config -> script_name;
|
||||
@@ -3154,6 +3400,7 @@
|
||||
@@ -3144,6 +3390,7 @@
|
||||
GET_TIME (&cur_time);
|
||||
return (WIFEXITED (wstatus) ?
|
||||
WEXITSTATUS (wstatus) : -WTERMSIG (wstatus));
|
||||
@ -421,7 +421,7 @@
|
||||
}
|
||||
|
||||
void client_envadd (struct client_state *client,
|
||||
@@ -3244,6 +3491,9 @@
|
||||
@@ -3234,6 +3481,9 @@
|
||||
|
||||
/* Don't become a daemon if the user requested otherwise. */
|
||||
if (no_daemon) {
|
||||
@ -431,7 +431,7 @@
|
||||
write_client_pid_file ();
|
||||
return;
|
||||
}
|
||||
@@ -3252,7 +3502,9 @@
|
||||
@@ -3242,7 +3492,9 @@
|
||||
if (state)
|
||||
return;
|
||||
state = 1;
|
||||
@ -442,8 +442,8 @@
|
||||
/* Stop logging to stderr... */
|
||||
log_perror = 0;
|
||||
|
||||
--- dhcp-3.0.5/common/alloc.c.libdhcp4client 2006-11-09 16:02:36.000000000 -0500
|
||||
+++ dhcp-3.0.5/common/alloc.c 2006-11-09 16:02:36.000000000 -0500
|
||||
--- dhcp-3.0.5/common/alloc.c.libdhcp4client 2006-11-10 11:58:18.000000000 -0500
|
||||
+++ dhcp-3.0.5/common/alloc.c 2006-11-10 11:58:30.000000000 -0500
|
||||
@@ -1016,9 +1016,11 @@
|
||||
rc_register (file, line, ptr, bp, bp -> refcnt, 0, RC_MISC);
|
||||
return 1;
|
||||
@ -458,8 +458,8 @@
|
||||
#if defined (DEBUG_MEMORY_LEAKAGE) || \
|
||||
defined (DEBUG_MEMORY_LEAKAGE_ON_EXIT)
|
||||
void relinquish_free_packets ()
|
||||
--- dhcp-3.0.5/common/discover.c.libdhcp4client 2006-11-09 16:02:36.000000000 -0500
|
||||
+++ dhcp-3.0.5/common/discover.c 2006-11-09 16:02:36.000000000 -0500
|
||||
--- dhcp-3.0.5/common/discover.c.libdhcp4client 2006-11-10 11:58:18.000000000 -0500
|
||||
+++ dhcp-3.0.5/common/discover.c 2006-11-10 11:58:30.000000000 -0500
|
||||
@@ -120,7 +120,9 @@
|
||||
For each interface that's of type INET and not the loopback interface,
|
||||
register that interface with the network I/O software, figure out what
|
||||
@ -504,7 +504,7 @@
|
||||
if (fallback_interface) {
|
||||
if (fcntl (fallback_interface -> rfdesc, F_SETFD, 1) < 0)
|
||||
--- dhcp-3.0.5/common/lpf.c.libdhcp4client 2004-11-24 12:39:15.000000000 -0500
|
||||
+++ dhcp-3.0.5/common/lpf.c 2006-11-09 16:02:36.000000000 -0500
|
||||
+++ dhcp-3.0.5/common/lpf.c 2006-11-10 11:58:30.000000000 -0500
|
||||
@@ -216,6 +216,7 @@
|
||||
struct interface_info *info;
|
||||
{
|
||||
@ -514,7 +514,7 @@
|
||||
/* Set up the bpf filter program structure. This is defined in
|
||||
bpf.c */
|
||||
--- dhcp-3.0.5/dst/hmac_link.c.libdhcp4client 2001-02-22 02:22:08.000000000 -0500
|
||||
+++ dhcp-3.0.5/dst/hmac_link.c 2006-11-09 16:02:36.000000000 -0500
|
||||
+++ dhcp-3.0.5/dst/hmac_link.c 2006-11-10 11:58:30.000000000 -0500
|
||||
@@ -38,6 +38,10 @@
|
||||
|
||||
#include "dst_internal.h"
|
||||
@ -602,7 +602,7 @@
|
||||
return (0);
|
||||
memset(dst_t_func[KEY_HMAC_MD5], 0, sizeof(struct dst_func));
|
||||
--- dhcp-3.0.5/omapip/alloc.c.libdhcp4client 2006-02-22 17:43:27.000000000 -0500
|
||||
+++ dhcp-3.0.5/omapip/alloc.c 2006-11-09 16:02:36.000000000 -0500
|
||||
+++ dhcp-3.0.5/omapip/alloc.c 2006-11-10 11:58:30.000000000 -0500
|
||||
@@ -40,6 +40,41 @@
|
||||
|
||||
#include <omapip/omapip_p.h>
|
||||
@ -666,8 +666,8 @@
|
||||
}
|
||||
|
||||
#if defined (DEBUG_MEMORY_LEAKAGE) || defined (DEBUG_MALLOC_POOL) || \
|
||||
--- dhcp-3.0.5/omapip/dispatch.c.libdhcp4client 2006-11-09 16:02:36.000000000 -0500
|
||||
+++ dhcp-3.0.5/omapip/dispatch.c 2006-11-09 16:02:36.000000000 -0500
|
||||
--- dhcp-3.0.5/omapip/dispatch.c.libdhcp4client 2006-11-10 11:58:18.000000000 -0500
|
||||
+++ dhcp-3.0.5/omapip/dispatch.c 2006-11-10 11:58:30.000000000 -0500
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
#include <omapip/omapip_p.h>
|
||||
@ -677,8 +677,8 @@
|
||||
TIME cur_time;
|
||||
|
||||
OMAPI_OBJECT_ALLOC (omapi_io,
|
||||
--- dhcp-3.0.5/omapip/errwarn.c.libdhcp4client 2006-11-09 16:02:36.000000000 -0500
|
||||
+++ dhcp-3.0.5/omapip/errwarn.c 2006-11-09 16:02:36.000000000 -0500
|
||||
--- dhcp-3.0.5/omapip/errwarn.c.libdhcp4client 2006-11-10 11:58:18.000000000 -0500
|
||||
+++ dhcp-3.0.5/omapip/errwarn.c 2006-11-10 11:58:30.000000000 -0500
|
||||
@@ -39,6 +39,11 @@
|
||||
#include <omapip/omapip_p.h>
|
||||
#include <errno.h>
|
||||
@ -801,7 +801,7 @@
|
||||
}
|
||||
|
||||
--- dhcp-3.0.5/configure.libdhcp4client 2004-09-10 17:02:30.000000000 -0400
|
||||
+++ dhcp-3.0.5/configure 2006-11-09 16:02:36.000000000 -0500
|
||||
+++ dhcp-3.0.5/configure 2006-11-10 11:58:30.000000000 -0500
|
||||
@@ -246,7 +246,7 @@
|
||||
fi
|
||||
|
||||
@ -811,8 +811,8 @@
|
||||
fi
|
||||
|
||||
for foo in $dirs; do
|
||||
--- /dev/null 2006-11-09 08:39:48.641391297 -0500
|
||||
+++ dhcp-3.0.5/libdhcp4client/Makefile.dist 2006-11-09 16:03:42.000000000 -0500
|
||||
--- /dev/null 2006-11-10 10:29:00.408684247 -0500
|
||||
+++ dhcp-3.0.5/libdhcp4client/Makefile.dist 2006-11-10 11:58:30.000000000 -0500
|
||||
@@ -0,0 +1,86 @@
|
||||
+# Makefile.dist for libdhcp4client
|
||||
+#
|
||||
@ -900,8 +900,8 @@
|
||||
+ $(CC) -shared -o $@ -Wl,-soname,$@ $^
|
||||
+
|
||||
+# Dependencies (semi-automatically-generated)
|
||||
--- /dev/null 2006-11-09 08:39:48.641391297 -0500
|
||||
+++ dhcp-3.0.5/libdhcp4client/dhcp4client.h 2006-11-09 16:02:36.000000000 -0500
|
||||
--- /dev/null 2006-11-10 10:29:00.408684247 -0500
|
||||
+++ dhcp-3.0.5/libdhcp4client/dhcp4client.h 2006-11-10 11:58:30.000000000 -0500
|
||||
@@ -0,0 +1,24 @@
|
||||
+/* dhcp4client.h
|
||||
+ *
|
||||
@ -927,8 +927,8 @@
|
||||
+extern int dhcpv4_client( struct libdhcp_control_s *dhc_ctl, int argc, char **argv, char **envp);
|
||||
+ /* The ISC IPv4 DHCP client main() function .
|
||||
+ */
|
||||
--- /dev/null 2006-11-09 08:39:48.641391297 -0500
|
||||
+++ dhcp-3.0.5/libdhcp4client/libdhcp_control.h 2006-11-09 16:02:36.000000000 -0500
|
||||
--- /dev/null 2006-11-10 10:29:00.408684247 -0500
|
||||
+++ dhcp-3.0.5/libdhcp4client/libdhcp_control.h 2006-11-10 11:58:30.000000000 -0500
|
||||
@@ -0,0 +1,102 @@
|
||||
+/* libdhcp_control.h
|
||||
+ *
|
||||
@ -1033,7 +1033,7 @@
|
||||
+
|
||||
+#endif
|
||||
--- dhcp-3.0.5/Makefile.dist.libdhcp4client 2004-06-10 13:59:10.000000000 -0400
|
||||
+++ dhcp-3.0.5/Makefile.dist 2006-11-09 16:02:36.000000000 -0500
|
||||
+++ dhcp-3.0.5/Makefile.dist 2006-11-10 11:58:30.000000000 -0500
|
||||
@@ -22,7 +22,7 @@
|
||||
# http://www.isc.org/
|
||||
|
||||
|
7
dhcp-3.0.5-version.patch
Normal file
7
dhcp-3.0.5-version.patch
Normal file
@ -0,0 +1,7 @@
|
||||
--- dhcp-3.0.5/includes/version.h.version 2006-10-26 18:19:38.000000000 -0400
|
||||
+++ dhcp-3.0.5/includes/version.h 2006-11-10 11:16:04.000000000 -0500
|
||||
@@ -1,3 +1,3 @@
|
||||
/* Current version of ISC DHCP Distribution. */
|
||||
|
||||
-#define DHCP_VERSION "V3.0.5"
|
||||
+#define DHCP_VERSION "V3.0.5-RedHat"
|
59
dhcp.spec
59
dhcp.spec
@ -21,19 +21,19 @@ Source4: dhcpd.conf
|
||||
Source5: libdhcp4client.pc
|
||||
Source6: dhcptables.pl
|
||||
|
||||
Patch0: dhcp-3.0.5-Makefile.patch
|
||||
Patch1: dhcp-3.0.5-client.patch
|
||||
Patch2: dhcp-3.0.5-common.patch
|
||||
Patch3: dhcp-3.0.5-dhcpctl.patch
|
||||
Patch4: dhcp-3.0.5-dst.patch
|
||||
Patch5: dhcp-3.0.5-includes.patch
|
||||
Patch6: dhcp-3.0.5-minires.patch
|
||||
Patch7: dhcp-3.0.5-omapip.patch
|
||||
Patch8: dhcp-3.0.5-relay.patch
|
||||
Patch9: dhcp-3.0.5-server.patch
|
||||
Patch10: dhcp-3.0.5-libdhcp4client.patch
|
||||
Patch11: dhcp-3.0.5-timeouts.patch
|
||||
Patch12: dhcp-3.0.5-mkdep.patch
|
||||
Patch0: dhcp-3.0.5-extended-new-option-info.patch
|
||||
Patch1: dhcp-3.0.5-Makefile.patch
|
||||
Patch2: dhcp-3.0.5-version.patch
|
||||
Patch3: dhcp-3.0.5-client.patch
|
||||
Patch4: dhcp-3.0.5-common.patch
|
||||
Patch5: dhcp-3.0.5-dhcpctl.patch
|
||||
Patch6: dhcp-3.0.5-dst.patch
|
||||
Patch7: dhcp-3.0.5-includes.patch
|
||||
Patch8: dhcp-3.0.5-omapip.patch
|
||||
Patch9: dhcp-3.0.5-minires.patch
|
||||
Patch10: dhcp-3.0.5-server.patch
|
||||
Patch11: dhcp-3.0.5-libdhcp4client.patch
|
||||
Patch12: dhcp-3.0.5-timeouts.patch
|
||||
Patch13: dhcp-3.0.5-fix-warnings.patch
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
||||
@ -99,19 +99,19 @@ client library .
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1 -b .Makefile
|
||||
%patch1 -p1 -b .client
|
||||
%patch2 -p1 -b .common
|
||||
%patch3 -p1 -b .dhcpctl
|
||||
%patch4 -p1 -b .dst
|
||||
%patch5 -p1 -b .includes
|
||||
%patch6 -p1 -b .minires
|
||||
%patch7 -p1 -b .omapip
|
||||
%patch8 -p1 -b .relay
|
||||
%patch9 -p1 -b .server
|
||||
%patch10 -p1 -b .libdhcp4client
|
||||
%patch11 -p1 -b .timeouts
|
||||
%patch12 -p1 -b .mkdep
|
||||
%patch0 -p1 -b .enoi
|
||||
%patch1 -p1 -b .Makefile
|
||||
%patch2 -p1 -b .version
|
||||
%patch3 -p1 -b .client
|
||||
%patch4 -p1 -b .common
|
||||
%patch5 -p1 -b .dhcpctl
|
||||
%patch6 -p1 -b .dst
|
||||
%patch7 -p1 -b .includes
|
||||
%patch8 -p1 -b .omapip
|
||||
%patch9 -p1 -b .minires
|
||||
%patch10 -p1 -b .server
|
||||
%patch11 -p1 -b .libdhcp4client
|
||||
%patch12 -p1 -b .timeouts
|
||||
%patch13 -p1 -b .warnings
|
||||
|
||||
%build
|
||||
@ -130,7 +130,7 @@ cat <<EOF >>includes/site.h
|
||||
#define _PATH_DHCLIENT_DB "%{_localstatedir}/lib/dhclient/dhclient.leases"
|
||||
EOF
|
||||
|
||||
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -Werror -Dlint -DEXTENDED_NEW_OPTION_INFO"
|
||||
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -fPIC -Werror -Dlint -DEXTENDED_NEW_OPTION_INFO"
|
||||
|
||||
# DO NOT use the %%configure macro because this configure script is not autognu
|
||||
CC="%{__cc}" ./configure \
|
||||
@ -318,11 +318,14 @@ exit 0
|
||||
%{_libdir}/libdhcp4client.so
|
||||
|
||||
%changelog
|
||||
* Thu Nov 09 2006 David Cantrell <dcantrell@redhat.com> - 12:3.0.5-2
|
||||
* Fri Nov 10 2006 David Cantrell <dcantrell@redhat.com> - 12:3.0.5-2
|
||||
- Change the way libdhcp4client is compiled (patch main source, create new
|
||||
Makefile rather than copy and patch code after main patches)
|
||||
- Fix up problems generating compiler warnings
|
||||
- Use 'gcc' for making dependencies
|
||||
- Pass -fPIC instead of -fpie/-fPIE in compiler flags
|
||||
- Combine the extended new option info changes in to one patch file (makes
|
||||
it easier for outside projects that want to use dhcdbd and NetworkManager)
|
||||
|
||||
* Tue Nov 07 2006 David Cantrell <dcantrell@redhat.com> - 12:3.0.5-1
|
||||
- Upgrade to ISC dhcp-3.0.5
|
||||
|
Loading…
Reference in New Issue
Block a user