All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] connman: upgrade to 1.10
@ 2013-01-09 17:11 Cristian Iorga
  2013-01-09 17:42 ` Burton, Ross
  0 siblings, 1 reply; 8+ messages in thread
From: Cristian Iorga @ 2013-01-09 17:11 UTC (permalink / raw)
  To: openembedded-core

From: Constantin Musca <constantinx.musca@intel.com>

0002-storage.c-If-there-is-no-d_type-support-use-fstatat.patch
    - adapted to the new version

0001-timezone.c-If-there-is-no-d_type-support-use-fstatat.patch
    - patch removed (it is included in the new version)

inet-fix-ip-cleanup-functions.patch: added
    - fix for ip cleanup functions

Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
---
 ...If-there-is-no-d_type-support-use-fstatat.patch |   61 --------------------
 ...If-there-is-no-d_type-support-use-fstatat.patch |   38 +++++++-----
 .../connman/inet-fix-ip-cleanup-functions.patch    |   40 +++++++++++++
 meta/recipes-connectivity/connman/connman_1.10.bb  |   25 ++++++++
 meta/recipes-connectivity/connman/connman_1.4.bb   |   12 ----
 5 files changed, 87 insertions(+), 89 deletions(-)
 delete mode 100644 meta/recipes-connectivity/connman/connman/0001-timezone.c-If-there-is-no-d_type-support-use-fstatat.patch
 create mode 100644 meta/recipes-connectivity/connman/connman/inet-fix-ip-cleanup-functions.patch
 create mode 100644 meta/recipes-connectivity/connman/connman_1.10.bb
 delete mode 100644 meta/recipes-connectivity/connman/connman_1.4.bb

diff --git a/meta/recipes-connectivity/connman/connman/0001-timezone.c-If-there-is-no-d_type-support-use-fstatat.patch b/meta/recipes-connectivity/connman/connman/0001-timezone.c-If-there-is-no-d_type-support-use-fstatat.patch
deleted file mode 100644
index 3bced52..0000000
--- a/meta/recipes-connectivity/connman/connman/0001-timezone.c-If-there-is-no-d_type-support-use-fstatat.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From f2094e6b2e4542adf458d8fa58d7bccd5edb762e Mon Sep 17 00:00:00 2001
-From: Andrei Gherzan <andrei@gherzan.ro>
-Date: Tue, 17 Jul 2012 17:27:39 +0300
-Subject: [PATCH V3 1/2] timezone.c: If there is no d_type support use
- fstatat()
-
-This is useful for filesystems where d_type is always DT_UNKNOWN.
-In this case use fstatat() function.
-
-Signed-off-by: Andrei Gherzan <andrei.gherzan@windriver.com>
-Upstream-Status: Submitted
- 
----
- src/timezone.c |   24 ++++++++++++++++++++++++
- 1 file changed, 24 insertions(+)
-
-diff --git a/src/timezone.c b/src/timezone.c
-index 173d658..f951f6b 100644
---- a/src/timezone.c
-+++ b/src/timezone.c
-@@ -157,6 +157,8 @@ static char *find_origin(void *src_map, struct stat *src_st,
- 	DIR *dir;
- 	struct dirent *d;
- 	char *str, pathname[PATH_MAX];
-+	struct stat buf;
-+	int ret;
- 
- 	if (subpath == NULL)
- 		strncpy(pathname, basepath, sizeof(pathname));
-@@ -205,6 +207,28 @@ static char *find_origin(void *src_map, struct stat *src_st,
- 				return str;
- 			}
- 			break;
-+		case DT_UNKNOWN:
-+			/*
-+			 * If there is no d_type support use fstatat()
-+			 * to check if directory
-+			 */
-+			ret = fstatat(dirfd(dir), d->d_name, &buf, 0);
-+			if (ret < 0)
-+				continue;
-+			if (!(buf.st_mode & S_IFDIR))
-+				continue;
-+			if (subpath == NULL)
-+				strncpy(pathname, d->d_name, sizeof(pathname));
-+			else
-+				snprintf(pathname, sizeof(pathname),
-+						"%s/%s", subpath, d->d_name);
-+
-+			str = find_origin(src_map, src_st, basepath, pathname);
-+			if (str != NULL) {
-+				closedir(dir);
-+				return str;
-+			}
-+			break;
- 		}
- 	}
- 
--- 
-1.7.9.5
-
diff --git a/meta/recipes-connectivity/connman/connman/0002-storage.c-If-there-is-no-d_type-support-use-fstatat.patch b/meta/recipes-connectivity/connman/connman/0002-storage.c-If-there-is-no-d_type-support-use-fstatat.patch
index d3205c0..7315545 100644
--- a/meta/recipes-connectivity/connman/connman/0002-storage.c-If-there-is-no-d_type-support-use-fstatat.patch
+++ b/meta/recipes-connectivity/connman/connman/0002-storage.c-If-there-is-no-d_type-support-use-fstatat.patch
@@ -8,20 +8,33 @@ This is useful for filesystems where d_type is always DT_UNKNOWN.
 In this case use fstatat() function.
 
 Signed-off-by: Andrei Gherzan <andrei.gherzan@windriver.com>
+Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
 Upstream-Status: Submitted
  
 ---
  src/storage.c |   19 +++++++++++++++++++
  1 file changed, 19 insertions(+)
 
-diff --git a/src/storage.c b/src/storage.c
-index 47bd0cb..0491a52 100644
---- a/src/storage.c
-+++ b/src/storage.c
-@@ -206,6 +206,25 @@ gchar **connman_storage_get_services()
+Index: git/src/storage.c
+===================================================================
+--- git.orig/src/storage.c
++++ git/src/storage.c
+@@ -193,7 +193,6 @@ gchar **connman_storage_get_services()
  
- 			g_string_append_printf(result, "%s/", d->d_name);
- 			break;
+ 		switch (d->d_type) {
+ 		case DT_DIR:
+-		case DT_UNKNOWN:
+ 			/*
+ 			 * If the settings file is not found, then
+ 			 * assume this directory is not a services dir.
+@@ -203,6 +202,25 @@ gchar **connman_storage_get_services()
+ 			ret = stat(str, &buf);
+ 			g_free(str);
+ 			if (ret < 0)
++				continue;
++
++			g_string_append_printf(result, "%s/", d->d_name);
++			break;
 +		case DT_UNKNOWN:
 +			/*
 +			 * If there is no d_type support use fstatat()
@@ -37,13 +50,6 @@ index 47bd0cb..0491a52 100644
 +			ret = stat(str, &buf);
 +			g_free(str);
 +			if (ret < 0)
-+				continue;
-+
-+			g_string_append_printf(result, "%s/", d->d_name);
-+			break;
- 		}
- 	}
+ 				continue;
  
--- 
-1.7.9.5
-
+ 			g_string_append_printf(result, "%s/", d->d_name);
diff --git a/meta/recipes-connectivity/connman/connman/inet-fix-ip-cleanup-functions.patch b/meta/recipes-connectivity/connman/connman/inet-fix-ip-cleanup-functions.patch
new file mode 100644
index 0000000..3071549
--- /dev/null
+++ b/meta/recipes-connectivity/connman/connman/inet-fix-ip-cleanup-functions.patch
@@ -0,0 +1,40 @@
+From 100353e10f60a50ca1ba78daa6bc4dfebf5b3297 Mon Sep 17 00:00:00 2001
+From: Constantin Musca <constantinx.musca@intel.com>
+Date: Wed, 5 Dec 2012 15:07:21 +0200
+Subject: [PATCH] inet: fix ip cleanup functions
+
+Upstream-Status: Pending
+Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
+---
+ src/inet.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/src/inet.c b/src/inet.c
+index be69aca..e76a1f1 100644
+--- a/src/inet.c
++++ b/src/inet.c
+@@ -626,6 +626,10 @@ int connman_inet_clear_ipv6_address(int index, const char *address,
+ 
+ 	DBG("index %d address %s prefix_len %d", index, address, prefix_len);
+ 
++	if (address == NULL) {
++		return -1;
++	}
++
+ 	err = __connman_inet_modify_address(RTM_DELADDR, 0, index, AF_INET6,
+ 				address, NULL, prefix_len, NULL);
+ 	if (err < 0) {
+@@ -649,6 +653,10 @@ int connman_inet_clear_address(int index, struct connman_ipaddress *ipaddress)
+ 
+ 	DBG("index %d address %s prefix_len %d", index, address, prefix_len);
+ 
++	if (address == NULL) {
++		return -1;
++	}
++
+ 	err = __connman_inet_modify_address(RTM_DELADDR, 0, index, AF_INET,
+ 				address, peer, prefix_len, broadcast);
+ 	if (err < 0) {
+-- 
+1.7.11.7
+
diff --git a/meta/recipes-connectivity/connman/connman_1.10.bb b/meta/recipes-connectivity/connman/connman_1.10.bb
new file mode 100644
index 0000000..28b2e0d
--- /dev/null
+++ b/meta/recipes-connectivity/connman/connman_1.10.bb
@@ -0,0 +1,25 @@
+require connman.inc
+
+# 1.10 tag
+SRCREV = "3bda76eb442c9395db1dba17352c3e78376671cc"
+SRC_URI  = "git://git.kernel.org/pub/scm/network/connman/connman.git \
+            file://0001-plugin.h-Change-visibility-to-default-for-debug-symb.patch \
+            file://add_xuser_dbus_permission.patch \
+            file://connman \
+            file://0002-storage.c-If-there-is-no-d_type-support-use-fstatat.patch \
+            file://inet-fix-ip-cleanup-functions.patch"
+S = "${WORKDIR}/git"
+PR = "${INC_PR}.0"
+
+do_install_append() {
+    #Blacklist ethn network interface in case of qemu* machines
+    case "${MACHINE}" in
+        "qemuarm*" | "qemux86" | "qemux86-64" | "qemumips*" | "qemuppc" | "qemush*")
+            sed -i -e 's/^# NetworkInterfaceBlacklist = \(.*\)$/NetworkInterfaceBlacklist = \1,eth/g' ${S}/src/main.conf
+            install -d ${D}/etc/connman
+            install -m 0644  ${S}/src/main.conf ${D}/etc/connman/
+                ;;
+        *)
+                ;;
+    esac
+}
diff --git a/meta/recipes-connectivity/connman/connman_1.4.bb b/meta/recipes-connectivity/connman/connman_1.4.bb
deleted file mode 100644
index bd8ba65..0000000
--- a/meta/recipes-connectivity/connman/connman_1.4.bb
+++ /dev/null
@@ -1,12 +0,0 @@
-require connman.inc
-
-# 1.4 tag
-SRCREV = "f701bbca259f1f35e68d338f31f5373f75f3da5f"
-SRC_URI  = "git://git.kernel.org/pub/scm/network/connman/connman.git \
-            file://0001-plugin.h-Change-visibility-to-default-for-debug-symb.patch \
-            file://add_xuser_dbus_permission.patch \
-            file://connman \
-            file://0002-storage.c-If-there-is-no-d_type-support-use-fstatat.patch \
-            file://0001-timezone.c-If-there-is-no-d_type-support-use-fstatat.patch"
-S = "${WORKDIR}/git"
-PR = "${INC_PR}.0"
-- 
1.7.10.4




^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] connman: upgrade to 1.10
  2013-01-09 17:11 [PATCH] connman: upgrade to 1.10 Cristian Iorga
@ 2013-01-09 17:42 ` Burton, Ross
  2013-01-10  7:15   ` Iorga, Cristian
  0 siblings, 1 reply; 8+ messages in thread
From: Burton, Ross @ 2013-01-09 17:42 UTC (permalink / raw)
  To: Cristian Iorga; +Cc: openembedded-core

On 9 January 2013 17:11, Cristian Iorga <cristian.iorga@intel.com> wrote:
> +do_install_append() {
> +    #Blacklist ethn network interface in case of qemu* machines
> +    case "${MACHINE}" in

This makes connman machine-specific, which isn't a good thing.  This
configuration file should be split out into a separate package.

Ross



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] connman: upgrade to 1.10
  2013-01-09 17:42 ` Burton, Ross
@ 2013-01-10  7:15   ` Iorga, Cristian
  2013-01-10  7:56     ` Ross Burton
  0 siblings, 1 reply; 8+ messages in thread
From: Iorga, Cristian @ 2013-01-10  7:15 UTC (permalink / raw)
  To: Burton, Ross; +Cc: openembedded-core

Hi Ross,

Well, I have the prior art stand by me.
The same technique is applied for netbase.

And, in this specific case, connman should be machine specific.
Can you please give me more detail?

The configuration file will have only the interface blacklist enabled in case of a qemu* machine.

Regards,
Cristian

-----Original Message-----
From: Burton, Ross [mailto:ross.burton@intel.com] 
Sent: Wednesday, January 09, 2013 7:43 PM
To: Iorga, Cristian
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH] connman: upgrade to 1.10

On 9 January 2013 17:11, Cristian Iorga <cristian.iorga@intel.com> wrote:
> +do_install_append() {
> +    #Blacklist ethn network interface in case of qemu* machines
> +    case "${MACHINE}" in

This makes connman machine-specific, which isn't a good thing.  This configuration file should be split out into a separate package.

Ross

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] connman: upgrade to 1.10
  2013-01-10  7:15   ` Iorga, Cristian
@ 2013-01-10  7:56     ` Ross Burton
  2013-01-10  8:19       ` Iorga, Cristian
  2013-01-10  8:57       ` Martin Jansa
  0 siblings, 2 replies; 8+ messages in thread
From: Ross Burton @ 2013-01-10  7:56 UTC (permalink / raw)
  To: Iorga, Cristian; +Cc: openembedded-core

On Thursday, 10 January 2013 at 07:15, Iorga, Cristian wrote:
> Well, I have the prior art stand by me.
> The same technique is applied for netbase.
> 
> And, in this specific case, connman should be machine specific.
> Can you please give me more detail?
> 
> The configuration file will have only the interface blacklist enabled in case of a qemu* machine.
netbase is a lot smaller than connman.  With this change you're rebuilding connman per-machine instead of sharing the package between compatible machines, with the only difference being a configuration file.

Ross 





^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] connman: upgrade to 1.10
  2013-01-10  7:56     ` Ross Burton
@ 2013-01-10  8:19       ` Iorga, Cristian
  2013-01-10  8:57       ` Martin Jansa
  1 sibling, 0 replies; 8+ messages in thread
From: Iorga, Cristian @ 2013-01-10  8:19 UTC (permalink / raw)
  To: Burton, Ross; +Cc: Wold, Saul, openembedded-core

Hello Ross,

I saw the change in netbase recipe that Constantin submitted as a patch.
However, that patch has not been merged for 4 months now. I don't want that situation to happen to connman also.
Ross, Saul, please advise.

I can remake the patch as Costin did for netbase, but will it be merged?
In the meantime, nightly builds fail because connman sanity tests fail.

Regards,
Cristian

-----Original Message-----
From: Ross Burton [mailto:ross.burton@intel.com] 
Sent: Thursday, January 10, 2013 9:56 AM
To: Iorga, Cristian
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH] connman: upgrade to 1.10

On Thursday, 10 January 2013 at 07:15, Iorga, Cristian wrote:
> Well, I have the prior art stand by me.
> The same technique is applied for netbase.
> 
> And, in this specific case, connman should be machine specific.
> Can you please give me more detail?
> 
> The configuration file will have only the interface blacklist enabled in case of a qemu* machine.
netbase is a lot smaller than connman.  With this change you're rebuilding connman per-machine instead of sharing the package between compatible machines, with the only difference being a configuration file.

Ross 



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] connman: upgrade to 1.10
  2013-01-10  7:56     ` Ross Burton
  2013-01-10  8:19       ` Iorga, Cristian
@ 2013-01-10  8:57       ` Martin Jansa
  2013-01-10 18:47         ` Iorga, Cristian
  1 sibling, 1 reply; 8+ messages in thread
From: Martin Jansa @ 2013-01-10  8:57 UTC (permalink / raw)
  To: Ross Burton; +Cc: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 842 bytes --]

On Thu, Jan 10, 2013 at 07:56:30AM +0000, Ross Burton wrote:
> On Thursday, 10 January 2013 at 07:15, Iorga, Cristian wrote:
> > Well, I have the prior art stand by me.
> > The same technique is applied for netbase.
> > 
> > And, in this specific case, connman should be machine specific.
> > Can you please give me more detail?
> > 
> > The configuration file will have only the interface blacklist enabled in case of a qemu* machine.
> netbase is a lot smaller than connman.  

and also listed in SIGGEN_EXCLUDERECIPES_ABISAFE

>With this change you're rebuilding connman per-machine instead of sharing the package between compatible machines, with the only difference being a configuration file.

And rebuilding also all stuff depending on connman.

Cheers,

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] connman: upgrade to 1.10
  2013-01-10  8:57       ` Martin Jansa
@ 2013-01-10 18:47         ` Iorga, Cristian
  2013-01-10 19:00           ` Martin Jansa
  0 siblings, 1 reply; 8+ messages in thread
From: Iorga, Cristian @ 2013-01-10 18:47 UTC (permalink / raw)
  To: Martin Jansa, Burton, Ross; +Cc: openembedded-core

Hello all,
In SIGGEN_EXCLUDERECIPES_ABISAFE only connman-conf needs to be added, or connman + connman-conf? (see my V2 patch for connman 1.10 upgrade)

Regards,
Cristian

-----Original Message-----
From: Martin Jansa [mailto:martin.jansa@gmail.com] 
Sent: Thursday, January 10, 2013 10:58 AM
To: Burton, Ross
Cc: Iorga, Cristian; openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH] connman: upgrade to 1.10

On Thu, Jan 10, 2013 at 07:56:30AM +0000, Ross Burton wrote:
> On Thursday, 10 January 2013 at 07:15, Iorga, Cristian wrote:
> > Well, I have the prior art stand by me.
> > The same technique is applied for netbase.
> > 
> > And, in this specific case, connman should be machine specific.
> > Can you please give me more detail?
> > 
> > The configuration file will have only the interface blacklist enabled in case of a qemu* machine.
> netbase is a lot smaller than connman.  

and also listed in SIGGEN_EXCLUDERECIPES_ABISAFE

>With this change you're rebuilding connman per-machine instead of sharing the package between compatible machines, with the only difference being a configuration file.

And rebuilding also all stuff depending on connman.

Cheers,

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] connman: upgrade to 1.10
  2013-01-10 18:47         ` Iorga, Cristian
@ 2013-01-10 19:00           ` Martin Jansa
  0 siblings, 0 replies; 8+ messages in thread
From: Martin Jansa @ 2013-01-10 19:00 UTC (permalink / raw)
  To: Iorga, Cristian; +Cc: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 1531 bytes --]

On Thu, Jan 10, 2013 at 06:47:26PM +0000, Iorga, Cristian wrote:
> Hello all,
> In SIGGEN_EXCLUDERECIPES_ABISAFE only connman-conf needs to be added, or connman + connman-conf? (see my V2 patch for connman 1.10 upgrade)

connman-conf only, V2 looks better

Cheers,

> 
> Regards,
> Cristian
> 
> -----Original Message-----
> From: Martin Jansa [mailto:martin.jansa@gmail.com] 
> Sent: Thursday, January 10, 2013 10:58 AM
> To: Burton, Ross
> Cc: Iorga, Cristian; openembedded-core@lists.openembedded.org
> Subject: Re: [OE-core] [PATCH] connman: upgrade to 1.10
> 
> On Thu, Jan 10, 2013 at 07:56:30AM +0000, Ross Burton wrote:
> > On Thursday, 10 January 2013 at 07:15, Iorga, Cristian wrote:
> > > Well, I have the prior art stand by me.
> > > The same technique is applied for netbase.
> > > 
> > > And, in this specific case, connman should be machine specific.
> > > Can you please give me more detail?
> > > 
> > > The configuration file will have only the interface blacklist enabled in case of a qemu* machine.
> > netbase is a lot smaller than connman.  
> 
> and also listed in SIGGEN_EXCLUDERECIPES_ABISAFE
> 
> >With this change you're rebuilding connman per-machine instead of sharing the package between compatible machines, with the only difference being a configuration file.
> 
> And rebuilding also all stuff depending on connman.
> 
> Cheers,
> 
> -- 
> Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-01-10 19:15 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-09 17:11 [PATCH] connman: upgrade to 1.10 Cristian Iorga
2013-01-09 17:42 ` Burton, Ross
2013-01-10  7:15   ` Iorga, Cristian
2013-01-10  7:56     ` Ross Burton
2013-01-10  8:19       ` Iorga, Cristian
2013-01-10  8:57       ` Martin Jansa
2013-01-10 18:47         ` Iorga, Cristian
2013-01-10 19:00           ` Martin Jansa

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.