[Pkg-utopia-commits] r924 - in
packages/unstable/networkmanager/debian: . patches
Michael Biebl
mbiebl-guest at costa.debian.org
Tue Aug 8 02:10:37 UTC 2006
Author: mbiebl-guest
Date: 2006-08-08 02:10:36 +0000 (Tue, 08 Aug 2006)
New Revision: 924
Added:
packages/unstable/networkmanager/debian/patches/05-debian_backend.patch
Removed:
packages/unstable/networkmanager/debian/patches/05-resolvconf.patch
packages/unstable/networkmanager/debian/patches/08-disabled_devices.patch
Modified:
packages/unstable/networkmanager/debian/changelog
Log:
- Merge the patches resolvonf+disabled_devices into a single patch debian_backend. This one patch should hold all modifications to the Debian backend.
- Do not handle mapped devices.
Modified: packages/unstable/networkmanager/debian/changelog
===================================================================
--- packages/unstable/networkmanager/debian/changelog 2006-08-07 22:35:37 UTC (rev 923)
+++ packages/unstable/networkmanager/debian/changelog 2006-08-08 02:10:36 UTC (rev 924)
@@ -1,13 +1,20 @@
network-manager (0.6.4-1) unstable; urgency=low
+ [ Riccardo Setti ]
* New upstream release. (Closes: #379163)
- * Allow interfaces marked "auto-hotplug" to be managed by NM.
+ * Allow interfaces marked "auto-hotplug" to be managed by NM.
(Closes: #381017)
* Added 09_fix_bigendian_words.patch wich will fix the WPA+plaint text pw
auth method on powerpc (and on other bigendian arch). (Closes: #381464)
- -- Riccardo Setti <giskard at debian.org> Mon, 7 Aug 2006 17:06:47 +0200
+ [ Michael Biebl ]
+ * Merged the patches 05-resolvconf.patch and 08-disabled_devices.patch into
+ a single patch called 05-debian_backend.patch.
+ * Updated 05-debian_backend.patch to not control mapped interfaces.
+ (Closes: #377498)
+ -- Michael Biebl <biebl at teco.edu> Tue, 8 Aug 2006 01:51:13 +0200
+
network-manager (0.6.3-2) unstable; urgency=low
* Updated 02-dbus_access_network_manager.patch to allow the hal daemon
Added: packages/unstable/networkmanager/debian/patches/05-debian_backend.patch
===================================================================
--- packages/unstable/networkmanager/debian/patches/05-debian_backend.patch 2006-08-07 22:35:37 UTC (rev 923)
+++ packages/unstable/networkmanager/debian/patches/05-debian_backend.patch 2006-08-08 02:10:36 UTC (rev 924)
@@ -0,0 +1,123 @@
+diff --git a/src/backends/NetworkManagerDebian.c b/src/backends/NetworkManagerDebian.c
+index 740572a..8090696 100644
+--- a/src/backends/NetworkManagerDebian.c
++++ b/src/backends/NetworkManagerDebian.c
+@@ -37,6 +37,7 @@ #include "interface_parser.h"
+ #include "nm-utils.h"
+
+ #define ARPING "/usr/sbin/arping"
++#define RESOLVCONF "resolvconf"
+
+ /*
+ * nm_system_init
+@@ -514,13 +515,60 @@ gboolean nm_system_device_get_use_dhcp (
+ /*
+ * nm_system_device_get_disabled
+ *
+- * Return whether the distro-specific system config tells us to use
+- * dhcp for this device.
++ * Return whether the distro-specific system config tells us to disable
++ * this device.
+ *
+ */
+ gboolean nm_system_device_get_disabled (NMDevice *dev)
+ {
+- return FALSE;
++ const char *iface;
++ if_block *curr_device, *curr_b;
++ if_data *curr_d;
++ gboolean blacklist = TRUE;
++
++ g_return_val_if_fail (dev != NULL, TRUE);
++
++ iface = nm_device_get_iface (dev);
++
++ ifparser_init ();
++
++ /* If the device is listed in a mapping, do not control it */
++ if (ifparser_getmapping (iface) != NULL) {
++ blacklist = TRUE;
++ goto out;
++ }
++
++ /* If the interface isn't listed in /etc/network/interfaces then
++ * it's considered okay to control it.
++ */
++ curr_device = ifparser_getif (iface);
++ if (curr_device == NULL) {
++ blacklist = FALSE;
++ goto out;
++ }
++
++ /* If the interface is listed and isn't marked "auto" then it's
++ * definitely not okay to control it.
++ */
++ for (curr_b = ifparser_getfirst (); curr_b; curr_b = curr_b->next) {
++ if ((!strcmp (curr_b->type, "auto") || !strcmp (curr_b->type, "allow-hotplug"))
++ && strstr (curr_b->name, iface))
++ blacklist = FALSE;
++ }
++
++ /* If the interface has no options other than just "inet dhcp"
++ * it's probably ok to fiddle with it.
++ */
++ for (curr_d = curr_device->info; curr_d; curr_d = curr_d->next) {
++ if (strcmp (curr_d->key, "inet")
++ || strcmp (curr_d->data, "dhcp" ))
++ blacklist = TRUE;
++ }
++
++out:
++ ifparser_destroy ();
++
++ return blacklist;
+ }
+
+
+@@ -679,7 +727,10 @@ void nm_system_set_hostname (NMIP4Config
+ */
+ gboolean nm_system_should_modify_resolv_conf (void)
+ {
+- return TRUE;
++ if (g_find_program_in_path(RESOLVCONF) != NULL)
++ return FALSE;
++ else
++ return TRUE;
+ }
+
+
+diff --git a/src/backends/interface_parser.c b/src/backends/interface_parser.c
+index 53d6487..aa81134 100644
+--- a/src/backends/interface_parser.c
++++ b/src/backends/interface_parser.c
+@@ -198,6 +198,18 @@ if_block *ifparser_getif(const char* ifa
+ return NULL;
+ }
+
++if_block *ifparser_getmapping(const char* iface)
++{
++ if_block *curr = first;
++ while(curr!=NULL)
++ {
++ if (strcmp(curr->type,"mapping")==0 && strcmp(curr->name,iface)==0)
++ return curr;
++ curr = curr->next;
++ }
++ return NULL;
++}
++
+ const char *ifparser_getkey(if_block* iface, const char *key)
+ {
+ if_data *curr = iface->info;
+diff --git a/src/backends/interface_parser.h b/src/backends/interface_parser.h
+index 075f454..8914283 100644
+--- a/src/backends/interface_parser.h
++++ b/src/backends/interface_parser.h
+@@ -44,6 +44,7 @@ void ifparser_init(void);
+ void ifparser_destroy(void);
+
+ if_block *ifparser_getif(const char* iface);
++if_block *ifparser_getmapping(const char* iface);
+ if_block *ifparser_getfirst(void);
+ const char *ifparser_getkey(if_block* iface, const char *key);
+
Deleted: packages/unstable/networkmanager/debian/patches/05-resolvconf.patch
===================================================================
--- packages/unstable/networkmanager/debian/patches/05-resolvconf.patch 2006-08-07 22:35:37 UTC (rev 923)
+++ packages/unstable/networkmanager/debian/patches/05-resolvconf.patch 2006-08-08 02:10:36 UTC (rev 924)
@@ -1,20 +0,0 @@
---- src/backends/NetworkManagerDebian.c 2006-02-28 22:24:22.000000000 +0100
-+++ ../NetworkManager-0.6.0.patched/src/backends/NetworkManagerDebian.c 2006-03-06 12:19:34.000000000 +0100
-@@ -37,6 +37,7 @@
- #include "nm-utils.h"
-
- #define ARPING "/usr/sbin/arping"
-+#define RESOLVCONF "resolvconf"
-
- /*
- * nm_system_init
-@@ -679,5 +680,8 @@
- */
- gboolean nm_system_should_modify_resolv_conf (void)
- {
-- return TRUE;
-+ if (g_find_program_in_path(RESOLVCONF) != NULL)
-+ return FALSE;
-+ else
-+ return TRUE;
- }
Deleted: packages/unstable/networkmanager/debian/patches/08-disabled_devices.patch
===================================================================
--- packages/unstable/networkmanager/debian/patches/08-disabled_devices.patch 2006-08-07 22:35:37 UTC (rev 923)
+++ packages/unstable/networkmanager/debian/patches/08-disabled_devices.patch 2006-08-08 02:10:36 UTC (rev 924)
@@ -1,52 +0,0 @@
---- src/backends/NetworkManagerDebian.c.orig 2006-05-05 19:59:18.000000000 +0200
-+++ src/backends/NetworkManagerDebian.c 2006-05-05 20:04:34.000000000 +0200
-@@ -521,7 +521,48 @@
- */
- gboolean nm_system_device_get_disabled (NMDevice *dev)
- {
-- return FALSE;
-+ const char *iface;
-+ if_block *curr_device, *curr_b;
-+ if_data *curr_d;
-+ gboolean blacklist = TRUE;
-+
-+ g_return_val_if_fail (dev != NULL, TRUE);
-+
-+ iface = nm_device_get_iface (dev);
-+
-+ ifparser_init ();
-+
-+ /* If the interface isn't listed in /etc/network/interfaces then
-+ * it's considered okay to control it.
-+ */
-+ curr_device = ifparser_getif (iface);
-+ if (curr_device == NULL) {
-+ blacklist = FALSE;
-+ goto out;
-+ }
-+
-+ /* If the interface is listed and isn't marked "auto" then it's
-+ * definitely not okay to control it.
-+ */
-+ for (curr_b = ifparser_getfirst(); curr_b; curr_b = curr_b->next) {
-+ if ((!strcmp (curr_b->type, "auto") || !strcmp (curr_b->type, "allow-hotplug"))
-+ && strstr (curr_b->name, iface))
-+ blacklist = FALSE;
-+ }
-+
-+ /* If the interface has no options other than just "inet dhcp"
-+ * it's probably ok to fiddle with it.
-+ */
-+ for (curr_d = curr_device->info; curr_d; curr_d = curr_d->next) {
-+ if (strcmp (curr_d->key, "inet")
-+ || strcmp (curr_d->data, "dhcp" ))
-+ blacklist = TRUE;
-+ }
-+
-+out:
-+ ifparser_destroy ();
-+
-+ return blacklist;
- }
-
-
More information about the Pkg-utopia-commits
mailing list