diff options
author | Roy Marples <uberlord@gentoo.org> | 2007-09-06 14:02:38 +0000 |
---|---|---|
committer | Roy Marples <uberlord@gentoo.org> | 2007-09-06 14:02:38 +0000 |
commit | ad499031e9637be8838f942d98c3d7d7e03b4f28 (patch) | |
tree | c657da40dbee177f3cb18a738d695387d8b8202d /net-misc/dhcp | |
parent | x86 stable wrt #189313 (diff) | |
download | gentoo-2-ad499031e9637be8838f942d98c3d7d7e03b4f28.tar.gz gentoo-2-ad499031e9637be8838f942d98c3d7d7e03b4f28.tar.bz2 gentoo-2-ad499031e9637be8838f942d98c3d7d7e03b4f28.zip |
Drop the extended option patch for 3.1.0 as we stopped using it.
(Portage version: 2.1.3.7)
Diffstat (limited to 'net-misc/dhcp')
-rw-r--r-- | net-misc/dhcp/ChangeLog | 6 | ||||
-rw-r--r-- | net-misc/dhcp/dhcp-3.1.0.ebuild | 9 | ||||
-rw-r--r-- | net-misc/dhcp/files/dhcp-3.1.0a1-x-option.patch | 223 |
3 files changed, 8 insertions, 230 deletions
diff --git a/net-misc/dhcp/ChangeLog b/net-misc/dhcp/ChangeLog index 327d278f841b..c5eb12e8691a 100644 --- a/net-misc/dhcp/ChangeLog +++ b/net-misc/dhcp/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for net-misc/dhcp # Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/ChangeLog,v 1.136 2007/09/02 21:50:16 kumba Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/ChangeLog,v 1.137 2007/09/06 14:02:38 uberlord Exp $ + + 06 Sep 2007; Roy Marples <uberlord@gentoo.org> + -files/dhcp-3.1.0a1-x-option.patch, dhcp-3.1.0.ebuild: + Drop the extended option patch for 3.1.0 as we stopped using it. 02 Sep 2007; Joshua Kinard <kumba@gentoo.org> dhcp-3.0.6.ebuild, dhcp-3.1.0.ebuild: diff --git a/net-misc/dhcp/dhcp-3.1.0.ebuild b/net-misc/dhcp/dhcp-3.1.0.ebuild index 4437915a60f0..d1abe1f25eae 100644 --- a/net-misc/dhcp/dhcp-3.1.0.ebuild +++ b/net-misc/dhcp/dhcp-3.1.0.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-3.1.0.ebuild,v 1.6 2007/09/02 21:50:16 kumba Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-3.1.0.ebuild,v 1.7 2007/09/06 14:02:38 uberlord Exp $ inherit eutils flag-o-matic multilib toolchain-funcs @@ -62,9 +62,6 @@ src_unpack() { # NetworkManager support patches # If they fail to apply to future versions they will be dropped - # Enable eXtended options - # dhcp-3.1.0_rc2 has it's own -x option which conflicts here - #epatch "${FILESDIR}/${PN}"-3.1.0a1-x-option.patch # Add dbus support to dhclient epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-dbus.patch @@ -142,8 +139,8 @@ src_compile() { MANCAT = man END - ./configure --copts "-DPARANOIA -DEARLY_CHROOT -DEXTENDED_NEW_OPTION_INFO \ - ${CFLAGS}" || die "configure failed" + ./configure --copts "-DPARANOIA -DEARLY_CHROOT ${CFLAGS}" \ + || die "configure failed" # Remove server support from the Makefile # We still install some extra crud though diff --git a/net-misc/dhcp/files/dhcp-3.1.0a1-x-option.patch b/net-misc/dhcp/files/dhcp-3.1.0a1-x-option.patch deleted file mode 100644 index 8728e0ced490..000000000000 --- a/net-misc/dhcp/files/dhcp-3.1.0a1-x-option.patch +++ /dev/null @@ -1,223 +0,0 @@ -diff -ur client.orig/dhclient.8 client/dhclient.8 ---- client.orig/dhclient.8 2006-09-07 19:24:17.756460024 +0100 -+++ client/dhclient.8 2006-09-07 19:24:52.000000000 +0100 -@@ -85,6 +85,9 @@ - .B -w - ] - [ -+.B -x -+] -+[ - .I if0 - [ - .I ...ifN -@@ -268,6 +271,10 @@ - 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. - .SH CONFIGURATION - The syntax of the dhclient.conf(5) file is discussed separately. - .SH OMAPI -diff -ur client.orig/dhclient.c client/dhclient.c ---- client.orig/dhclient.c 2006-09-07 19:24:17.756460024 +0100 -+++ client/dhclient.c 2006-09-07 19:24:52.000000000 +0100 -@@ -74,7 +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)); - - void do_release(struct client_state *); -@@ -211,6 +213,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 { -@@ -483,7 +490,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]"); -@@ -2479,8 +2490,28 @@ - struct envadd_state { - struct client_state *client; - const char *prefix; -+ struct universe *universe; - }; - -+#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, -@@ -2497,6 +2528,31 @@ - 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) != 0L ) -+ 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, -@@ -2525,6 +2581,7 @@ - - es.client = client; - es.prefix = prefix; -+ es.universe = 0L; - - client_envadd (client, - prefix, "ip_address", "%s", piaddr (lease -> address)); -@@ -2736,7 +2793,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); -diff -ur /tmp/dhcp-3.1.0a1/common/parse.c ./common/parse.c ---- /tmp/dhcp-3.1.0a1/common/parse.c 2006-09-07 19:24:17.753460480 +0100 -+++ ./common/parse.c 2006-09-07 19:27:18.000000000 +0100 -@@ -1566,6 +1566,10 @@ - option, MDL); - option_name_hash_add(option->universe->name_hash, option->name, 0, - option, MDL); -+#ifdef EXTENDED_NEW_OPTION_INFO -+ if (new_option_info_tree != 0L) -+ add_new_option_info(option); -+#endif - return 1; - } - -Only in ./common: parse.c.orig -diff -ur /tmp/dhcp-3.1.0a1/common/tables.c ./common/tables.c ---- /tmp/dhcp-3.1.0a1/common/tables.c 2006-09-07 19:24:17.754460328 +0100 -+++ ./common/tables.c 2006-09-07 19:24:52.000000000 +0100 -@@ -887,3 +887,40 @@ - universe_hash_add(universe_hash, isc_universe.name, 0, - &isc_universe, MDL); - } -+ -+#ifdef EXTENDED_NEW_OPTION_INFO -+#include <search.h> -+ -+void *new_option_info_tree = 0L; -+ -+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 0L; -+ if ( new_option_info_tree == GENERATE_NEW_OPTION_INFO ) -+ new_option_info_tree = (void*)0L; -+ 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 0L; -+ return tfind( option, &(new_option_info_tree), new_option_info_comparator ); -+} -+#endif -Only in ./common: tables.c.orig -diff -ur /tmp/dhcp-3.1.0a1/includes/dhcpd.h ./includes/dhcpd.h ---- /tmp/dhcp-3.1.0a1/includes/dhcpd.h 2006-09-07 19:24:17.831448624 +0100 -+++ ./includes/dhcpd.h 2006-09-07 19:24:52.000000000 +0100 -@@ -1938,6 +1938,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; |