diff options
author | Robert Piasek <dagger@gentoo.org> | 2010-08-17 13:48:59 +0100 |
---|---|---|
committer | Robert Piasek <dagger@gentoo.org> | 2010-08-17 13:48:59 +0100 |
commit | 75ffb913ac8c244e8aaa627276cb01d0566916eb (patch) | |
tree | d9be616a09f420d9ef62b40a9a5b1280652f72fb /net-misc | |
parent | Use correct patch (diff) | |
download | dagger-75ffb913ac8c244e8aaa627276cb01d0566916eb.tar.gz dagger-75ffb913ac8c244e8aaa627276cb01d0566916eb.tar.bz2 dagger-75ffb913ac8c244e8aaa627276cb01d0566916eb.zip |
Backported patch which allows dhclient3 to be used. Please bear in mind
dhclient3 doesn't support IPv6
Diffstat (limited to 'net-misc')
-rw-r--r-- | net-misc/networkmanager/ChangeLog | 6 | ||||
-rw-r--r-- | net-misc/networkmanager/Manifest | 5 | ||||
-rw-r--r-- | net-misc/networkmanager/files/networkmanager-0.8.1-dhclient3.patch | 129 | ||||
-rw-r--r-- | net-misc/networkmanager/networkmanager-0.8.1-r2.ebuild | 8 |
4 files changed, 143 insertions, 5 deletions
diff --git a/net-misc/networkmanager/ChangeLog b/net-misc/networkmanager/ChangeLog index 19abb59..97a89e3 100644 --- a/net-misc/networkmanager/ChangeLog +++ b/net-misc/networkmanager/ChangeLog @@ -2,6 +2,12 @@ # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 # $Header: /var/cvsroot/gentoo-x86/net-misc/networkmanager/ChangeLog,v 1.47 2009/06/10 22:03:19 dagger Exp $ + 17 Aug 2010; Robert Piasek <dagger@gentoo.org> + networkmanager-0.8.1-r2.ebuild, + +files/networkmanager-0.8.1-dhclient3.patch: + Backported patch which allows dhclient3 to be used. Please bear in mind + dhclient3 doesn't support IPv6 + *networkmanager-0.8.1-r2 (17 Aug 2010) 17 Aug 2010; Robert Piasek <dagger@gentoo.org> diff --git a/net-misc/networkmanager/Manifest b/net-misc/networkmanager/Manifest index 588cf48..47f709c 100644 --- a/net-misc/networkmanager/Manifest +++ b/net-misc/networkmanager/Manifest @@ -1,10 +1,11 @@ AUX networkmanager-0.8.1-CVE-2010-1172.patch 6034 RMD160 358efedb9265524ee19153599eeb2ef1b51ccff8 SHA1 c3d2318e2eb0c13a2099e91e7a837e8bbcff0e7d SHA256 dfcf6727842250b858968ba6be49a5d6c77d3761cbd30a5cdb82fa3765ed52ed AUX networkmanager-0.8.1-confchanges.patch 1145 RMD160 c540696830e311cc9941e55650f7214063f841b9 SHA1 e675fbbf24e5cbf3a2fb53fec3d25db46596a0b4 SHA256 29bdc1ba93aa57450602af49225ede0c535c2cbf5f18777e9eb64d5b09d4d5a3 +AUX networkmanager-0.8.1-dhclient3.patch 4658 RMD160 d229c87a41f882a6162520ee3f2afdc5650c283a SHA1 06ca671ba76cd1591556cdcc96a88060ca89e727 SHA256 45b1c302cea8605cc489a77250404e4457d0747ca3cab9ed993eb51551da3290 AUX networkmanager-0.8.1-dhcp-configure.patch 2447 RMD160 1c222ce867a7f92167b2ffcbc401f8ea83b24193 SHA1 f17b676ad65788b5b665c16b29d01a88e3cdd041 SHA256 7bda5db2d937b2562c98435620774bba487bf8b53da5c035422b2bc2ed21a400 AUX networkmanager-0.8.1-glib-2.25.12-workaround.patch 663 RMD160 b4397b17a6148244dedd341b35185c07ca267f06 SHA1 926acbd76076750ab4ec48ac34fe73679693a4ca SHA256 a00523ad7d6bdced76be82b980788af4c313fc59aff8b9d258343e17ad6bf969 AUX nm-system-settings.conf 70 RMD160 c0d2be147383999b62cead86ab4333169e4ef277 SHA1 679ec8052b610969c148a2d34cd4da7a41484a76 SHA256 34f53d9ac1ad65eda6942dc3059117f60f6321059ca23f4fbfcc2f2edcae151f DIST NetworkManager-0.8.1.tar.bz2 1505134 RMD160 82f5ad1a641fa49acf34604f89154c865f3d5fbc SHA1 778989ed73cfd7ec05714f77121fa8bfc1bf0981 SHA256 dc126fbe3199d47899c4781e4fff32cee404dc7c728c6ade9eaa899bd80f19fa DIST networkmanager-ifnet-962f678.patch 262822 RMD160 e13b2bf9635f17369848a72e991df767dc95c8a1 SHA1 d1ab0e36c2ba62b9be2d10dc1e7129e95ea16566 SHA256 ca3467e011755ab827d0c9c1b479f5be4f842f2db04f7eb9a7a4d11ac9e018d6 -EBUILD networkmanager-0.8.1-r2.ebuild 3659 RMD160 014ebb97d20e18c2d8ed0381b07ec764442bd04d SHA1 cda9fd770c5f588b51a53e0d35c9814b4b94f391 SHA256 15f493ae4d8443abd57f03288020bfa09f7b7069dbc7692afb15ed321b1821aa -MISC ChangeLog 12486 RMD160 984598624e5f07cc4d4945137dc5b61000b6d82d SHA1 681ea157a451d18a1e33b63b735940d2b9c1994a SHA256 d235c3bbe4a758080dbecb6f7bc9deb970663305d8507238a7a2f328809ee7cc +EBUILD networkmanager-0.8.1-r2.ebuild 3703 RMD160 ae2f8ed2a4a700873f7445dc9b0db9e235a4a4f4 SHA1 08f81011c7c73f71f79793af1f19db36fa34274e SHA256 777286407d1d44c285b69b31f9322af806b9d0a13c6df2f467857ed5ef573b41 +MISC ChangeLog 12724 RMD160 840f4535a92095a83d716581e3f389478db7a351 SHA1 b15189bc66cd7994807b9714bfe0ad1fdb57e546 SHA256 88d20732ad113c5083977a251fb4f9a34ef8cedfa827d653d8d756bc5267bf22 MISC metadata.xml 969 RMD160 c16683ef7fed4b5603029ae39f5872032ec37554 SHA1 813e0b48a78ce50d5257030507d22fd0e9452161 SHA256 e4375eae4ff0d47386780e4d29575e6581f7c9b89168372bb1bb7713a452c02f diff --git a/net-misc/networkmanager/files/networkmanager-0.8.1-dhclient3.patch b/net-misc/networkmanager/files/networkmanager-0.8.1-dhclient3.patch new file mode 100644 index 0000000..e00a379 --- /dev/null +++ b/net-misc/networkmanager/files/networkmanager-0.8.1-dhclient3.patch @@ -0,0 +1,129 @@ +From d39fda772235d967266a25159b877596d636c048 Mon Sep 17 00:00:00 2001 +From: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com> +Date: Thu, 12 Aug 2010 22:52:20 +0000 +Subject: dhcp: don't fail with dhclient v3 + +--- +diff --git a/configure.ac b/configure.ac +index cfc2122..efdef27 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -319,21 +319,30 @@ AC_SUBST(PPPD_PLUGIN_DIR) + AC_ARG_WITH([dhclient], AS_HELP_STRING([--with-dhclient=yes|no|path], [Enable dhclient 4.x support])) + # If a full path is given, use that and do not test if it works or not. + case "${with_dhclient}" in ++ # NM only works with ISC dhclient - other derivatives don't have ++ # the same userland. dhclient 4.x is required for IPv6 support; ++ # with older versions NM won't be able to use DHCPv6. ++ + /*) + DHCLIENT_PATH="${with_dhclient}" ++ DHCLIENT_VERSION=4 ++ if test -x "${with_dhclient}"; then ++ case `"${with_dhclient}" --version 2>&1` in ++ "isc-dhclient-4"*) DHCLIENT_VERSION=4; break;; ++ "isc-dhclient-V3"*) DHCLIENT_VERSION=3; break;; ++ esac ++ fi + AC_MSG_NOTICE(using dhclient at ${DHCLIENT_PATH}) + ;; + no) AC_MSG_NOTICE(dhclient support disabled) + ;; + *) + AC_MSG_CHECKING(for dhclient) +- # NM only works with ISC dhclient - other derivatives don't have +- # the same userland. NM also requires dhclient 4.x since older +- # versions do not have IPv6 support. + for path in /sbin /usr/sbin /usr/pkg/sbin /usr/local/sbin; do + test -x "${path}/dhclient" || continue + case `"$path/dhclient" --version 2>&1` in +- "isc-dhclient-4"*) DHCLIENT_PATH="$path/dhclient"; break;; ++ "isc-dhclient-4"*) DHCLIENT_PATH="$path/dhclient"; DHCLIENT_VERSION=4; break;; ++ "isc-dhclient-V3"*) DHCLIENT_PATH="$path/dhclient"; DHCLIENT_VERSION=3; break;; + esac + done + if test -n "${DHCLIENT_PATH}"; then +@@ -554,6 +563,7 @@ echo + + if test -n "${DHCLIENT_PATH}"; then + echo ISC dhclient support: ${DHCLIENT_PATH} ++ echo ISC dhclient version: ${DHCLIENT_VERSION} + else + echo ISC dhclient support: no + fi +diff --git a/src/dhcp-manager/Makefile.am b/src/dhcp-manager/Makefile.am +index f75e6b3..4c54087 100644 +--- a/src/dhcp-manager/Makefile.am ++++ b/src/dhcp-manager/Makefile.am +@@ -29,6 +29,7 @@ libdhcp_manager_la_CPPFLAGS = \ + -DLIBEXECDIR=\"$(libexecdir)\" \ + -DLOCALSTATEDIR=\"$(localstatedir)\" \ + -DDHCLIENT_PATH=\"$(DHCLIENT_PATH)\" \ ++ -DDHCLIENT_V$(DHCLIENT_VERSION) \ + -DDHCPCD_PATH=\"$(DHCPCD_PATH)\" + + libdhcp_manager_la_LIBADD = \ +diff --git a/src/dhcp-manager/nm-dhcp-dhclient.c b/src/dhcp-manager/nm-dhcp-dhclient.c +index cae7df2..13caa02 100644 +--- a/src/dhcp-manager/nm-dhcp-dhclient.c ++++ b/src/dhcp-manager/nm-dhcp-dhclient.c +@@ -45,7 +45,11 @@ G_DEFINE_TYPE (NMDHCPDhclient, nm_dhcp_dhclient, NM_TYPE_DHCP_CLIENT) + #define NM_DHCP_DHCLIENT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DHCP_DHCLIENT, NMDHCPDhclientPrivate)) + + #if defined(TARGET_DEBIAN) || defined(TARGET_SUSE) || defined(TARGET_MANDRIVA) ++#if defined(DHCLIENT_V3) ++#define NM_DHCLIENT_LEASE_DIR LOCALSTATEDIR "/lib/dhcp3" ++#else + #define NM_DHCLIENT_LEASE_DIR LOCALSTATEDIR "/lib/dhcp" ++#endif + #else + #define NM_DHCLIENT_LEASE_DIR LOCALSTATEDIR "/lib/dhclient" + #endif +@@ -437,7 +441,11 @@ create_dhclient_config (const char *iface, + #if defined(TARGET_SUSE) + orig = g_strdup (SYSCONFDIR "/dhclient.conf"); + #elif defined(TARGET_DEBIAN) || defined(TARGET_GENTOO) ++#if defined(DHCLIENT_V3) ++ orig = g_strdup (SYSCONFDIR "/dhcp3/dhclient.conf"); ++#else + orig = g_strdup (SYSCONFDIR "/dhcp/dhclient.conf"); ++#endif + #else + orig = g_strdup_printf (SYSCONFDIR "/dhclient-%s.conf", iface); + #endif +@@ -499,12 +507,20 @@ dhclient_start (NMDHCPClient *client, + guint log_domain; + + g_return_val_if_fail (priv->pid_file == NULL, -1); +- g_return_val_if_fail (ip_opt != NULL, -1); + + iface = nm_dhcp_client_get_iface (client); + uuid = nm_dhcp_client_get_uuid (client); + ipv6 = nm_dhcp_client_get_ipv6 (client); + ++#if defined(DHCLIENT_V3) ++ if (ipv6) { ++ nm_log_warn (log_domain, "(%s): ISC dhcp3 does not support IPv6", iface); ++ return -1; ++ } ++#else ++ g_return_val_if_fail (ip_opt != NULL, -1); ++#endif ++ + log_domain = ipv6 ? LOGD_DHCP6 : LOGD_DHCP4; + + priv->pid_file = g_strdup_printf (LOCALSTATEDIR "/run/dhclient%s-%s.pid", +@@ -536,10 +552,11 @@ dhclient_start (NMDHCPClient *client, + + g_ptr_array_add (argv, (gpointer) "-d"); + ++#if !defined(DHCLIENT_V3) + g_ptr_array_add (argv, (gpointer) ip_opt); +- + if (mode_opt) + g_ptr_array_add (argv, (gpointer) mode_opt); ++#endif + + g_ptr_array_add (argv, (gpointer) "-sf"); /* Set script file */ + g_ptr_array_add (argv, (gpointer) ACTION_SCRIPT_PATH ); +-- diff --git a/net-misc/networkmanager/networkmanager-0.8.1-r2.ebuild b/net-misc/networkmanager/networkmanager-0.8.1-r2.ebuild index 35ec5a8..6d1fc9b 100644 --- a/net-misc/networkmanager/networkmanager-0.8.1-r2.ebuild +++ b/net-misc/networkmanager/networkmanager-0.8.1-r2.ebuild @@ -55,18 +55,20 @@ DEPEND="${RDEPEND} S=${WORKDIR}/${MY_P} src_prepare() { + + # Gentoo system-plugin + epatch "${DISTDIR}/${PN}-ifnet-962f678.patch" + # Fix up the dbus conf file to use plugdev group epatch "${FILESDIR}/${P}-confchanges.patch" # Fix problems with dhcpcd/dhclient (bug #330319) epatch "${FILESDIR}/${P}-dhcp-configure.patch" - # Gentoo system-plugin - epatch "${DISTDIR}/${PN}-ifnet-962f678.patch" - # Backport some important patches epatch "${FILESDIR}/${P}-CVE-2010-1172.patch" epatch "${FILESDIR}/${P}-glib-2.25.12-workaround.patch" + epatch "${FILESDIR}/${P}-dhclient3.patch" eautoreconf } |