~broder/network-manager/nm-fix-669925

« back to all changes in this revision

Viewing changes to debian/patches/99-support-dhcp3.patch

  • Committer: Mathieu Trudel-Lapierre
  • Date: 2010-10-11 18:13:44 UTC
  • Revision ID: mathieu.trudel-lapierre@canonical.com-20101011181344-wxa00m3adgel8aif
* drop dhcp3 support patch, it was applied upstream.
  - remove debian/patches/99-support-dhcp3.patch
  - update debian/patches/series

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
From: Mathieu Trudel-Lapierre <mathieu-tl@ubuntu.com>
2
 
Subject: Detect dhclient version at compile-time, and skip IP options -4,-6,
3
 
 as well as mode options when using dhclient V3.
4
 
Last-Update: 2010-08-09
5
 
 
6
 
Index: network-manager-0.8.1+git.20100715t004920.72399bf/configure.ac
7
 
===================================================================
8
 
--- network-manager-0.8.1+git.20100715t004920.72399bf.orig/configure.ac 2010-07-14 23:25:53.000000000 -0400
9
 
+++ network-manager-0.8.1+git.20100715t004920.72399bf/configure.ac      2010-08-09 15:50:07.968129649 -0400
10
 
@@ -318,7 +318,8 @@
11
 
                for path in /sbin /usr/sbin /usr/pkg/sbin /usr/local/sbin; do
12
 
                        test -x "${path}/dhclient" || continue
13
 
                        case `"$path/dhclient" --version 2>&1` in
14
 
-                               "isc-dhclient-4"*) DHCLIENT_PATH="$path/dhclient"; break;;
15
 
+                               "isc-dhclient-4"*) DHCLIENT_PATH="$path/dhclient"; DHCLIENT_VERSION=4; break;;
16
 
+                               "isc-dhclient-V3"*) DHCLIENT_PATH="$path/dhclient"; DHCLIENT_VERSION=3; break;;
17
 
                        esac
18
 
                done
19
 
                if test -n "${DHCLIENT_PATH}"; then
20
 
@@ -326,6 +327,10 @@
21
 
                else
22
 
                        AC_MSG_RESULT(no)
23
 
                fi
24
 
+               if test -n "${DHCLIENT_VERSION}"; then
25
 
+                       AC_MSG_NOTICE(Found dhclient version ${DHCLIENT_VERSION}.)
26
 
+                       AC_SUBST(DHCLIENT_VERSION)
27
 
+               fi
28
 
                ;;
29
 
 esac
30
 
 
31
 
Index: network-manager-0.8.1+git.20100715t004920.72399bf/src/dhcp-manager/Makefile.am
32
 
===================================================================
33
 
--- network-manager-0.8.1+git.20100715t004920.72399bf.orig/src/dhcp-manager/Makefile.am 2010-07-14 23:25:53.000000000 -0400
34
 
+++ network-manager-0.8.1+git.20100715t004920.72399bf/src/dhcp-manager/Makefile.am      2010-08-09 15:50:07.968129649 -0400
35
 
@@ -29,6 +29,7 @@
36
 
        -DLIBEXECDIR=\"$(libexecdir)\" \
37
 
        -DLOCALSTATEDIR=\"$(localstatedir)\" \
38
 
        -DDHCLIENT_PATH=\"$(DHCLIENT_PATH)\" \
39
 
+       -DDHCLIENT_V$(DHCLIENT_VERSION) \
40
 
        -DDHCPCD_PATH=\"$(DHCPCD_PATH)\"
41
 
 
42
 
 libdhcp_manager_la_LIBADD = \
43
 
Index: network-manager-0.8.1+git.20100715t004920.72399bf/src/dhcp-manager/nm-dhcp-dhclient.c
44
 
===================================================================
45
 
--- network-manager-0.8.1+git.20100715t004920.72399bf.orig/src/dhcp-manager/nm-dhcp-dhclient.c  2010-07-14 23:25:53.000000000 -0400
46
 
+++ network-manager-0.8.1+git.20100715t004920.72399bf/src/dhcp-manager/nm-dhcp-dhclient.c       2010-08-09 15:53:43.620144945 -0400
47
 
@@ -45,7 +45,11 @@
48
 
 #define NM_DHCP_DHCLIENT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DHCP_DHCLIENT, NMDHCPDhclientPrivate))
49
 
 
50
 
 #if defined(TARGET_DEBIAN) || defined(TARGET_SUSE) || defined(TARGET_MANDRIVA)
51
 
+#if defined(DHCLIENT_V3)
52
 
+#define NM_DHCLIENT_LEASE_DIR          LOCALSTATEDIR "/lib/dhcp3"
53
 
+#else
54
 
 #define NM_DHCLIENT_LEASE_DIR           LOCALSTATEDIR "/lib/dhcp"
55
 
+#endif
56
 
 #else
57
 
 #define NM_DHCLIENT_LEASE_DIR           LOCALSTATEDIR "/lib/dhclient"
58
 
 #endif
59
 
@@ -437,7 +441,11 @@
60
 
 #if defined(TARGET_SUSE)
61
 
        orig = g_strdup (SYSCONFDIR "/dhclient.conf");
62
 
 #elif defined(TARGET_DEBIAN) || defined(TARGET_GENTOO)
63
 
+#if defined(DHCLIENT_V3)
64
 
+       orig = g_strdup (SYSCONFDIR "/dhcp3/dhclient.conf");
65
 
+#else
66
 
        orig = g_strdup (SYSCONFDIR "/dhcp/dhclient.conf");
67
 
+#endif
68
 
 #else
69
 
        orig = g_strdup_printf (SYSCONFDIR "/dhclient-%s.conf", iface);
70
 
 #endif
71
 
@@ -499,7 +507,6 @@
72
 
        guint log_domain;
73
 
 
74
 
        g_return_val_if_fail (priv->pid_file == NULL, -1);
75
 
-       g_return_val_if_fail (ip_opt != NULL, -1);
76
 
 
77
 
        iface = nm_dhcp_client_get_iface (client);
78
 
        uuid = nm_dhcp_client_get_uuid (client);
79
 
@@ -536,10 +543,13 @@
80
 
 
81
 
        g_ptr_array_add (argv, (gpointer) "-d");
82
 
 
83
 
+#if !defined(DHCLIENT_V3)
84
 
+       g_return_val_if_fail (ip_opt != NULL, -1);
85
 
        g_ptr_array_add (argv, (gpointer) ip_opt);
86
 
 
87
 
        if (mode_opt)
88
 
                g_ptr_array_add (argv, (gpointer) mode_opt);
89
 
+#endif
90
 
 
91
 
        g_ptr_array_add (argv, (gpointer) "-sf");       /* Set script file */
92
 
        g_ptr_array_add (argv, (gpointer) ACTION_SCRIPT_PATH );