diff options
author | Joe MacDonald <joe_macdonald@mentor.com> | 2017-11-01 09:23:42 -0400 |
---|---|---|
committer | Joe MacDonald <joe_macdonald@mentor.com> | 2018-01-08 11:57:34 -0500 |
commit | f0764a12deb3a64c6824669ca41e0c07f4ab8080 (patch) | |
tree | cb1ca7c70bfecad5263f08ad8a689d9ffef5c82a | |
parent | f9a1fe6ab2dfb6a53e58fc8da3a1580e76954e5e (diff) | |
download | meta-openembedded-f0764a12deb3a64c6824669ca41e0c07f4ab8080.tar.gz |
bridge-utils: update to v1.6
Updating to the latest version (1.6) and taking the opportunity to clean
up the old patches, switch to the upstream git repo for SRC_URI and make
the requested change to the older AR patch from a while back.
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
merge conflict with master-next
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
12 files changed, 91 insertions, 430 deletions
diff --git a/meta-networking/recipes-support/bridge-utils/bridge-utils/0001-build-error-out-correctly-if-a-submake-fails.patch b/meta-networking/recipes-support/bridge-utils/bridge-utils/0001-build-error-out-correctly-if-a-submake-fails.patch deleted file mode 100644 index c6897b4e7..000000000 --- a/meta-networking/recipes-support/bridge-utils/bridge-utils/0001-build-error-out-correctly-if-a-submake-fails.patch +++ /dev/null | |||
@@ -1,69 +0,0 @@ | |||
1 | From 5e102b453e254d16af1f95053134f58348e0f83a Mon Sep 17 00:00:00 2001 | ||
2 | From: root <git@andred.net> | ||
3 | Date: Wed, 20 Jul 2016 23:40:30 +0100 | ||
4 | Subject: [PATCH 1/5] build: error out correctly if a submake fails | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | Due to use of a for loop, return status from submake was always | ||
10 | ignored. | ||
11 | |||
12 | In the context of build-systems like OE this causes them to not | ||
13 | detect any errors and continue happily, resulting in a successful, | ||
14 | but incomplete, build. | ||
15 | |||
16 | Fix by having a nicer Makefile.in which now has rules for the | ||
17 | individual targets (directories) so that make itself can | ||
18 | figure out all the dependencies and build those targets as | ||
19 | needed rather than using a for loop to iterate over the | ||
20 | directories in a shell and thus loosing the return status of | ||
21 | the command inside the loop. | ||
22 | |||
23 | This has the added advantage that parallel builds work now. | ||
24 | |||
25 | Upstream-Status: Pending | ||
26 | |||
27 | Signed-off-by: André Draszik <git@andred.net> | ||
28 | --- | ||
29 | Makefile.in | 18 ++++++++++++------ | ||
30 | 1 file changed, 12 insertions(+), 6 deletions(-) | ||
31 | |||
32 | diff --git a/Makefile.in b/Makefile.in | ||
33 | index 6028513..dab88bb 100644 | ||
34 | --- a/Makefile.in | ||
35 | +++ b/Makefile.in | ||
36 | @@ -13,11 +13,11 @@ distdir = $(PACKAGE)-$(VERSION) | ||
37 | |||
38 | SUBDIRS=libbridge brctl doc | ||
39 | |||
40 | -all: | ||
41 | - for x in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$x ; done | ||
42 | +all: override ACTION= | ||
43 | +all: $(SUBDIRS) | ||
44 | |||
45 | -clean: | ||
46 | - for x in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$x clean ; done | ||
47 | +clean: override ACTION=clean | ||
48 | +clean: $(SUBDIRS) | ||
49 | |||
50 | distclean: clean | ||
51 | rm -f config.log | ||
52 | @@ -30,6 +30,12 @@ maintainer-clean: distclean | ||
53 | rm -f libbridge/Makefile | ||
54 | rm -f doc/Makefile | ||
55 | |||
56 | -install: | ||
57 | - for x in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$x install; done | ||
58 | +install: override ACTION=install | ||
59 | +install: $(SUBDIRS) | ||
60 | |||
61 | + | ||
62 | +brctl: libbridge | ||
63 | +$(SUBDIRS): | ||
64 | + $(MAKE) $(MFLAGS) -C $@ $(ACTION) | ||
65 | + | ||
66 | +.PHONY: $(SUBDIRS) | ||
67 | -- | ||
68 | 2.8.1 | ||
69 | |||
diff --git a/meta-networking/recipes-support/bridge-utils/bridge-utils/0002-libbridge-fix-some-build-time-warnings-fcntl.h.patch b/meta-networking/recipes-support/bridge-utils/bridge-utils/0002-libbridge-fix-some-build-time-warnings-fcntl.h.patch deleted file mode 100644 index 25d08ab95..000000000 --- a/meta-networking/recipes-support/bridge-utils/bridge-utils/0002-libbridge-fix-some-build-time-warnings-fcntl.h.patch +++ /dev/null | |||
@@ -1,64 +0,0 @@ | |||
1 | From 68fafc4ea10365ac2e74ab7c660d097696857677 Mon Sep 17 00:00:00 2001 | ||
2 | From: root <git@andred.net> | ||
3 | Date: Wed, 20 Jul 2016 23:40:32 +0100 | ||
4 | Subject: [PATCH 2/5] libbridge: fix some build-time warnings (fcntl.h) | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | There are build-time warnings at the moment when building | ||
10 | against musl, as the code here #include's the wrong file, | ||
11 | sys/fcntl.h instead of fcntl.h | ||
12 | |||
13 | In file included from libbridge_devif.c:26:0: | ||
14 | <sysroot>/usr/include/sys/fcntl.h:1:2: warning: #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h> [-Wcpp] | ||
15 | #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h> | ||
16 | ^~~~~~~ | ||
17 | In file included from libbridge_if.c:23:0: | ||
18 | <sysroot>/usr/include/sys/fcntl.h:1:2: warning: #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h> [-Wcpp] | ||
19 | #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h> | ||
20 | ^~~~~~~ | ||
21 | |||
22 | glibc headers silently redirect sys/fcntl.h to fcntl.h so the | ||
23 | issue is not seen there. | ||
24 | |||
25 | Let's fix the #include's to so as to use the correct ones | ||
26 | and silence the compiler. | ||
27 | |||
28 | Upstream-Status: Pending | ||
29 | |||
30 | Signed-off-by: André Draszik <git@andred.net> | ||
31 | --- | ||
32 | libbridge/libbridge_devif.c | 2 +- | ||
33 | libbridge/libbridge_if.c | 2 +- | ||
34 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
35 | |||
36 | diff --git a/libbridge/libbridge_devif.c b/libbridge/libbridge_devif.c | ||
37 | index 1e83925..2cf78f6 100644 | ||
38 | --- a/libbridge/libbridge_devif.c | ||
39 | +++ b/libbridge/libbridge_devif.c | ||
40 | @@ -23,7 +23,7 @@ | ||
41 | #include <errno.h> | ||
42 | #include <string.h> | ||
43 | #include <dirent.h> | ||
44 | -#include <sys/fcntl.h> | ||
45 | +#include <fcntl.h> | ||
46 | |||
47 | #include "libbridge.h" | ||
48 | #include "libbridge_private.h" | ||
49 | diff --git a/libbridge/libbridge_if.c b/libbridge/libbridge_if.c | ||
50 | index 77d3f8a..9cf4bac 100644 | ||
51 | --- a/libbridge/libbridge_if.c | ||
52 | +++ b/libbridge/libbridge_if.c | ||
53 | @@ -20,7 +20,7 @@ | ||
54 | #include <stdlib.h> | ||
55 | #include <errno.h> | ||
56 | #include <string.h> | ||
57 | -#include <sys/fcntl.h> | ||
58 | +#include <fcntl.h> | ||
59 | #include <sys/ioctl.h> | ||
60 | |||
61 | #include "libbridge.h" | ||
62 | -- | ||
63 | 2.8.1 | ||
64 | |||
diff --git a/meta-networking/recipes-support/bridge-utils/bridge-utils/0003-bridge-fix-some-build-time-warnings-errno.h.patch b/meta-networking/recipes-support/bridge-utils/bridge-utils/0003-bridge-fix-some-build-time-warnings-errno.h.patch deleted file mode 100644 index 72f2a6292..000000000 --- a/meta-networking/recipes-support/bridge-utils/bridge-utils/0003-bridge-fix-some-build-time-warnings-errno.h.patch +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | From 2b9dc245f93ab27d7da42a16ddbb9212888006e4 Mon Sep 17 00:00:00 2001 | ||
2 | From: root <git@andred.net> | ||
3 | Date: Wed, 20 Jul 2016 23:40:33 +0100 | ||
4 | Subject: [PATCH 3/5] bridge: fix some build-time warnings (errno.h) | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | There is a build-time warning at the moment when building | ||
10 | against musl, as the code here #include's the wrong file, | ||
11 | sys/errno.h instead of errno.h | ||
12 | |||
13 | In file included from brctl.c:22:0: | ||
14 | <sysroot>/usr/include/sys/errno.h:1:2: warning: #warning redirecting incorrect #include <sys/errno.h> to <errno.h> [-Wcpp] | ||
15 | #warning redirecting incorrect #include <sys/errno.h> to <errno.h> | ||
16 | ^~~~~~~ | ||
17 | |||
18 | glibc headers silently redirect sys/errno.h to errno.h so the | ||
19 | issue is not seen there. | ||
20 | |||
21 | Let's fix the #include's to so as to use the correct ones | ||
22 | and silence the compiler. | ||
23 | |||
24 | Upstream-Status: Pending | ||
25 | |||
26 | Signed-off-by: André Draszik <git@andred.net> | ||
27 | --- | ||
28 | brctl/brctl.c | 2 +- | ||
29 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
30 | |||
31 | diff --git a/brctl/brctl.c b/brctl/brctl.c | ||
32 | index 46ca352..8855234 100644 | ||
33 | --- a/brctl/brctl.c | ||
34 | +++ b/brctl/brctl.c | ||
35 | @@ -19,7 +19,7 @@ | ||
36 | #include <stdio.h> | ||
37 | #include <stdlib.h> | ||
38 | #include <string.h> | ||
39 | -#include <sys/errno.h> | ||
40 | +#include <errno.h> | ||
41 | #include <getopt.h> | ||
42 | |||
43 | #include "libbridge.h" | ||
44 | -- | ||
45 | 2.8.1 | ||
46 | |||
diff --git a/meta-networking/recipes-support/bridge-utils/bridge-utils/0004-libbridge-add-missing-include-s-fix-build-against-mu.patch b/meta-networking/recipes-support/bridge-utils/bridge-utils/0004-libbridge-add-missing-include-s-fix-build-against-mu.patch deleted file mode 100644 index 565186e0f..000000000 --- a/meta-networking/recipes-support/bridge-utils/bridge-utils/0004-libbridge-add-missing-include-s-fix-build-against-mu.patch +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | From c45b73829a8b8c7924df528baa7e16498f917288 Mon Sep 17 00:00:00 2001 | ||
2 | From: root <git@andred.net> | ||
3 | Date: Wed, 20 Jul 2016 23:40:33 +0100 | ||
4 | Subject: [PATCH 4/5] libbridge: add missing #include's (fix build against | ||
5 | musl) | ||
6 | MIME-Version: 1.0 | ||
7 | Content-Type: text/plain; charset=UTF-8 | ||
8 | Content-Transfer-Encoding: 8bit | ||
9 | |||
10 | Fixes error like: | ||
11 | |||
12 | In file included from libbridge_devif.c:28:0: | ||
13 | libbridge.h:45:17: error: field 'max_age' has incomplete type | ||
14 | struct timeval max_age; | ||
15 | ^~~~~~~ | ||
16 | In file included from libbridge_devif.c:28:0: | ||
17 | libbridge.h:51:2: error: unknown type name 'u_int16_t' | ||
18 | u_int16_t root_port; | ||
19 | ^~~~~~~~~ | ||
20 | |||
21 | These types are not standard C but rather Posix, | ||
22 | for struct timeval see: | ||
23 | http://pubs.opengroup.org/onlinepubs/7908799/xsh/systime.h.html | ||
24 | |||
25 | Upstream-Status: Pending | ||
26 | |||
27 | Signed-off-by: André Draszik <git@andred.net> | ||
28 | --- | ||
29 | libbridge/libbridge.h | 2 ++ | ||
30 | 1 file changed, 2 insertions(+) | ||
31 | |||
32 | diff --git a/libbridge/libbridge.h b/libbridge/libbridge.h | ||
33 | index 53ec869..b0727c1 100644 | ||
34 | --- a/libbridge/libbridge.h | ||
35 | +++ b/libbridge/libbridge.h | ||
36 | @@ -20,6 +20,8 @@ | ||
37 | #define _LIBBRIDGE_H | ||
38 | |||
39 | #include <sys/socket.h> | ||
40 | +#include <sys/time.h> | ||
41 | +#include <sys/types.h> | ||
42 | #include <linux/in6.h> | ||
43 | #include <linux/if.h> | ||
44 | #include <linux/if_bridge.h> | ||
45 | -- | ||
46 | 2.8.1 | ||
47 | |||
diff --git a/meta-networking/recipes-support/bridge-utils/bridge-utils/0005-build-don-t-ignore-CFLAGS-from-environment.patch b/meta-networking/recipes-support/bridge-utils/bridge-utils/0005-build-don-t-ignore-CFLAGS-from-environment.patch index 9f2155e9b..0a72c6b2c 100644 --- a/meta-networking/recipes-support/bridge-utils/bridge-utils/0005-build-don-t-ignore-CFLAGS-from-environment.patch +++ b/meta-networking/recipes-support/bridge-utils/bridge-utils/0005-build-don-t-ignore-CFLAGS-from-environment.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From 7bc1932cabfafca8c68e18bd43e3d203c70d2dd8 Mon Sep 17 00:00:00 2001 | 1 | From 9d63838d12c772dfe33371e2bb8b8191625539f2 Mon Sep 17 00:00:00 2001 |
2 | From: root <git@andred.net> | 2 | From: Joe MacDonald <joe_macdonald@mentor.com> |
3 | Date: Wed, 20 Jul 2016 23:40:33 +0100 | 3 | Date: Mon, 30 Oct 2017 13:37:48 -0400 |
4 | Subject: [PATCH 5/5] build: don't ignore CFLAGS from environment | 4 | Subject: [PATCH] build: don't ignore CFLAGS from environment |
5 | MIME-Version: 1.0 | 5 | MIME-Version: 1.0 |
6 | Content-Type: text/plain; charset=UTF-8 | 6 | Content-Type: text/plain; charset=UTF-8 |
7 | Content-Transfer-Encoding: 8bit | 7 | Content-Transfer-Encoding: 8bit |
@@ -17,10 +17,10 @@ used during compilation must also always be used during linking! | |||
17 | Upstream-Status: Pending | 17 | Upstream-Status: Pending |
18 | 18 | ||
19 | Signed-off-by: André Draszik <git@andred.net> | 19 | Signed-off-by: André Draszik <git@andred.net> |
20 | Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com> | ||
20 | --- | 21 | --- |
21 | brctl/Makefile.in | 2 +- | 22 | brctl/Makefile.in | 2 +- |
22 | libbridge/Makefile.in | 2 +- | 23 | 1 file changed, 1 insertion(+), 1 deletion(-) |
23 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
24 | 24 | ||
25 | diff --git a/brctl/Makefile.in b/brctl/Makefile.in | 25 | diff --git a/brctl/Makefile.in b/brctl/Makefile.in |
26 | index e1956d6..eff260c 100644 | 26 | index e1956d6..eff260c 100644 |
@@ -35,19 +35,6 @@ index e1956d6..eff260c 100644 | |||
35 | 35 | ||
36 | %.o: %.c brctl.h | 36 | %.o: %.c brctl.h |
37 | $(CC) $(CFLAGS) $(INCLUDE) -c $< | 37 | $(CC) $(CFLAGS) $(INCLUDE) -c $< |
38 | diff --git a/libbridge/Makefile.in b/libbridge/Makefile.in | ||
39 | index 20512c4..4e1cddc 100644 | ||
40 | --- a/libbridge/Makefile.in | ||
41 | +++ b/libbridge/Makefile.in | ||
42 | @@ -5,7 +5,7 @@ AR=ar | ||
43 | RANLIB=@RANLIB@ | ||
44 | |||
45 | CC=@CC@ | ||
46 | -CFLAGS = -Wall -g $(KERNEL_HEADERS) | ||
47 | +CFLAGS = -Wall -g $(KERNEL_HEADERS) @CFLAGS@ | ||
48 | |||
49 | prefix=@prefix@ | ||
50 | exec_prefix=@exec_prefix@ | ||
51 | -- | 38 | -- |
52 | 2.8.1 | 39 | 2.7.4 |
53 | 40 | ||
diff --git a/meta-networking/recipes-support/bridge-utils/bridge-utils/0006-libbridge-Modifying-the-AR-to-cross-toolchain.patch b/meta-networking/recipes-support/bridge-utils/bridge-utils/0006-libbridge-Modifying-the-AR-to-cross-toolchain.patch new file mode 100644 index 000000000..3f65761f5 --- /dev/null +++ b/meta-networking/recipes-support/bridge-utils/bridge-utils/0006-libbridge-Modifying-the-AR-to-cross-toolchain.patch | |||
@@ -0,0 +1,51 @@ | |||
1 | From c924f66743c054d7ebafef90ca1bbebc96732357 Mon Sep 17 00:00:00 2001 | ||
2 | From: Joe MacDonald <joe_macdonald@mentor.com> | ||
3 | Date: Mon, 30 Oct 2017 13:48:33 -0400 | ||
4 | Subject: [PATCH] libbridge: Modifying the AR to cross toolchain | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | The Makefile uses the host “ar” tool when it should be using the ar from | ||
10 | the target toolchain. | ||
11 | |||
12 | Upstream-Status: Pending | ||
13 | |||
14 | Signed-off-by: Li Zhou <li.zhou@windriver.com> | ||
15 | Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com> | ||
16 | --- | ||
17 | configure.ac | 1 + | ||
18 | libbridge/Makefile.in | 2 +- | ||
19 | 2 files changed, 2 insertions(+), 1 deletion(-) | ||
20 | |||
21 | diff --git a/configure.ac b/configure.ac | ||
22 | index 8b2e2ea..8426b7c 100644 | ||
23 | --- a/configure.ac | ||
24 | +++ b/configure.ac | ||
25 | @@ -12,6 +12,10 @@ dnl Checks for programs. | ||
26 | AC_PROG_CC | ||
27 | AC_PROG_INSTALL | ||
28 | AC_PROG_RANLIB | ||
29 | +AN_MAKEVAR([AR], [AC_PROG_AR]) | ||
30 | +AN_PROGRAM([ar], [AC_PROG_AR]) | ||
31 | +AC_DEFUN([AC_PROG_AR], [AC_CHECK_TOOL(AR, ar, :)]) | ||
32 | +AC_PROG_AR | ||
33 | |||
34 | dnl Checks for header files. | ||
35 | AC_HEADER_STDC | ||
36 | diff --git a/libbridge/Makefile.in b/libbridge/Makefile.in | ||
37 | index 7932bfe..bd55e9b 100644 | ||
38 | --- a/libbridge/Makefile.in | ||
39 | +++ b/libbridge/Makefile.in | ||
40 | @@ -1,7 +1,7 @@ | ||
41 | |||
42 | KERNEL_HEADERS=-I@KERNEL_HEADERS@ | ||
43 | |||
44 | -AR=ar | ||
45 | +AR=@AR@ | ||
46 | RANLIB=@RANLIB@ | ||
47 | |||
48 | CC=@CC@ | ||
49 | -- | ||
50 | 2.7.4 | ||
51 | |||
diff --git a/meta-networking/recipes-support/bridge-utils/bridge-utils/bridge-utils-1.5-check-error-returns-from-write-to-sysfs.patch b/meta-networking/recipes-support/bridge-utils/bridge-utils/bridge-utils-1.5-check-error-returns-from-write-to-sysfs.patch deleted file mode 100644 index d00af9c15..000000000 --- a/meta-networking/recipes-support/bridge-utils/bridge-utils/bridge-utils-1.5-check-error-returns-from-write-to-sysfs.patch +++ /dev/null | |||
@@ -1,87 +0,0 @@ | |||
1 | Upstream-status: BackPort [http://pkgs.fedoraproject.org/cgit/bridge-utils.git/diff/bridge-utils-1.5-check-error-returns-from-write-to-sysfs.patch?id=b0d10717fd7cebf5d85eed3f941b409fa0384f08] | ||
2 | |||
3 | Signed-off-by: Roy.Li <rongqing.li@windriver.com> | ||
4 | |||
5 | From bb9970a9df95837e39d680021b1f73d231e85406 Mon Sep 17 00:00:00 2001 | ||
6 | From: Stephen Hemminger <shemminger@vyatta.com> | ||
7 | Date: Tue, 3 May 2011 09:52:43 -0700 | ||
8 | Subject: [PATCH 3/3] Check error returns from write to sysfs | ||
9 | |||
10 | Add helper function to check write to sysfs files. | ||
11 | |||
12 | Signed-off-by: Petr Sabata <contyk@redhat.com> | ||
13 | --- | ||
14 | libbridge/libbridge_devif.c | 37 +++++++++++++++++++++++-------------- | ||
15 | 1 files changed, 23 insertions(+), 14 deletions(-) | ||
16 | |||
17 | diff --git a/libbridge/libbridge_devif.c b/libbridge/libbridge_devif.c | ||
18 | index aa8bc36..1e83925 100644 | ||
19 | --- a/libbridge/libbridge_devif.c | ||
20 | +++ b/libbridge/libbridge_devif.c | ||
21 | @@ -280,25 +280,38 @@ fallback: | ||
22 | return old_get_port_info(brname, port, info); | ||
23 | } | ||
24 | |||
25 | +static int set_sysfs(const char *path, unsigned long value) | ||
26 | +{ | ||
27 | + int fd, ret = 0, cc; | ||
28 | + char buf[32]; | ||
29 | + | ||
30 | + fd = open(path, O_WRONLY); | ||
31 | + if (fd < 0) | ||
32 | + return -1; | ||
33 | + | ||
34 | + cc = snprintf(buf, sizeof(buf), "%lu\n", value); | ||
35 | + if (write(fd, buf, cc) < 0) | ||
36 | + ret = -1; | ||
37 | + close(fd); | ||
38 | + | ||
39 | + return ret; | ||
40 | +} | ||
41 | + | ||
42 | |||
43 | static int br_set(const char *bridge, const char *name, | ||
44 | unsigned long value, unsigned long oldcode) | ||
45 | { | ||
46 | int ret; | ||
47 | char path[SYSFS_PATH_MAX]; | ||
48 | - FILE *f; | ||
49 | |||
50 | - snprintf(path, SYSFS_PATH_MAX, SYSFS_CLASS_NET "%s/%s", bridge, name); | ||
51 | + snprintf(path, SYSFS_PATH_MAX, SYSFS_CLASS_NET "%s/bridge/%s", | ||
52 | + bridge, name); | ||
53 | |||
54 | - f = fopen(path, "w"); | ||
55 | - if (f) { | ||
56 | - ret = fprintf(f, "%ld\n", value); | ||
57 | - fclose(f); | ||
58 | - } else { | ||
59 | + if ((ret = set_sysfs(path, value)) < 0) { | ||
60 | /* fallback to old ioctl */ | ||
61 | struct ifreq ifr; | ||
62 | unsigned long args[4] = { oldcode, value, 0, 0 }; | ||
63 | - | ||
64 | + | ||
65 | strncpy(ifr.ifr_name, bridge, IFNAMSIZ); | ||
66 | ifr.ifr_data = (char *) &args; | ||
67 | ret = ioctl(br_socket_fd, SIOCDEVPRIVATE, &ifr); | ||
68 | @@ -348,14 +361,10 @@ static int port_set(const char *bridge, const char *ifname, | ||
69 | { | ||
70 | int ret; | ||
71 | char path[SYSFS_PATH_MAX]; | ||
72 | - FILE *f; | ||
73 | |||
74 | snprintf(path, SYSFS_PATH_MAX, SYSFS_CLASS_NET "%s/brport/%s", ifname, name); | ||
75 | - f = fopen(path, "w"); | ||
76 | - if (f) { | ||
77 | - ret = fprintf(f, "%ld\n", value); | ||
78 | - fclose(f); | ||
79 | - } else { | ||
80 | + | ||
81 | + if ((ret = set_sysfs(path, value)) < 0) { | ||
82 | int index = get_portno(bridge, ifname); | ||
83 | |||
84 | if (index < 0) | ||
85 | -- | ||
86 | 1.7.5.2 | ||
87 | |||
diff --git a/meta-networking/recipes-support/bridge-utils/bridge-utils/bridge-utils-1.5-fix-error-message-for-incorrect-command.patch b/meta-networking/recipes-support/bridge-utils/bridge-utils/bridge-utils-1.5-fix-error-message-for-incorrect-command.patch deleted file mode 100644 index 2d0494e53..000000000 --- a/meta-networking/recipes-support/bridge-utils/bridge-utils/bridge-utils-1.5-fix-error-message-for-incorrect-command.patch +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | Upstream-status: BackPort [http://pkgs.fedoraproject.org/cgit/bridge-utils.git/diff/bridge-utils-1.5-fix-error-message-for-incorrect-command.patch?id=b0d10717fd7cebf5d85eed3f941b409fa0384f08] | ||
2 | |||
3 | Signed-off-by: Roy.Li <rongqing.li@windriver.com> | ||
4 | |||
5 | From c7ed0996ef58b497d3d30be802ab5ae6c37099b5 Mon Sep 17 00:00:00 2001 | ||
6 | From: Stephen Hemminger <shemminger@vyatta.com> | ||
7 | Date: Tue, 3 May 2011 09:49:57 -0700 | ||
8 | Subject: [PATCH 2/3] Fix error message for incorrect command | ||
9 | |||
10 | Debian bug 406907 | ||
11 | Error message was refering to incorrect command argument. | ||
12 | |||
13 | Signed-off-by: Petr Sabata <contyk@redhat.com> | ||
14 | --- | ||
15 | brctl/brctl.c | 2 +- | ||
16 | 1 files changed, 1 insertions(+), 1 deletions(-) | ||
17 | |||
18 | diff --git a/brctl/brctl.c b/brctl/brctl.c | ||
19 | index 454b8dd..46ca352 100644 | ||
20 | --- a/brctl/brctl.c | ||
21 | +++ b/brctl/brctl.c | ||
22 | @@ -69,7 +69,7 @@ int main(int argc, char *const* argv) | ||
23 | argc -= optind; | ||
24 | argv += optind; | ||
25 | if ((cmd = command_lookup(*argv)) == NULL) { | ||
26 | - fprintf(stderr, "never heard of command [%s]\n", argv[1]); | ||
27 | + fprintf(stderr, "never heard of command [%s]\n", *argv); | ||
28 | goto help; | ||
29 | } | ||
30 | |||
31 | -- | ||
32 | 1.7.5.2 | ||
33 | |||
diff --git a/meta-networking/recipes-support/bridge-utils/bridge-utils/bridge-utils-1.5-fix-incorrect-command-in-manual.patch b/meta-networking/recipes-support/bridge-utils/bridge-utils/bridge-utils-1.5-fix-incorrect-command-in-manual.patch deleted file mode 100644 index 6f6d6d423..000000000 --- a/meta-networking/recipes-support/bridge-utils/bridge-utils/bridge-utils-1.5-fix-incorrect-command-in-manual.patch +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | Upstream-status: BackPort [http://pkgs.fedoraproject.org/cgit/bridge-utils.git/diff/bridge-utils-1.5-fix-incorrect-command-in-manual.patch?id=b0d10717fd7cebf5d85eed3f941b409fa0384f08] | ||
2 | |||
3 | Signed-off-by: Roy.Li <rongqing.li@windriver.com> | ||
4 | |||
5 | From 8ef7b77562b636efcbd8b759eb324d6c069200f2 Mon Sep 17 00:00:00 2001 | ||
6 | From: Stephen Hemminger <shemminger@vyatta.com> | ||
7 | Date: Tue, 3 May 2011 09:48:40 -0700 | ||
8 | Subject: [PATCH 1/3] Fix incorrect command in manual | ||
9 | |||
10 | Command is "setageing" not "setageingtime"; fix man page. | ||
11 | Debian bug report. | ||
12 | |||
13 | Signed-off-by: Petr Sabata <contyk@redhat.com> | ||
14 | --- | ||
15 | doc/brctl.8 | 2 +- | ||
16 | 1 files changed, 1 insertions(+), 1 deletions(-) | ||
17 | |||
18 | diff --git a/doc/brctl.8 b/doc/brctl.8 | ||
19 | index d904047..771f323 100644 | ||
20 | --- a/doc/brctl.8 | ||
21 | +++ b/doc/brctl.8 | ||
22 | @@ -89,7 +89,7 @@ data. Machines can move to other ports, network cards can be replaced | ||
23 | .B brctl showmacs <brname> | ||
24 | shows a list of learned MAC addresses for this bridge. | ||
25 | |||
26 | -.B brctl setageingtime <brname> <time> | ||
27 | +.B brctl setageing <brname> <time> | ||
28 | sets the ethernet (MAC) address ageing time, in seconds. After <time> | ||
29 | seconds of not having seen a frame coming from a certain address, the | ||
30 | bridge will time out (delete) that address from the Forwarding | ||
31 | -- | ||
32 | 1.7.5.2 | ||
33 | |||
diff --git a/meta-networking/recipes-support/bridge-utils/bridge-utils/kernel-headers.patch b/meta-networking/recipes-support/bridge-utils/bridge-utils/kernel-headers.patch index de36f0598..8a23a3070 100644 --- a/meta-networking/recipes-support/bridge-utils/bridge-utils/kernel-headers.patch +++ b/meta-networking/recipes-support/bridge-utils/bridge-utils/kernel-headers.patch | |||
@@ -1,22 +1,33 @@ | |||
1 | include missing kernel header | 1 | From 824f838cc9c7b8a44174358446993d61be7bbb3f Mon Sep 17 00:00:00 2001 |
2 | From: Joe MacDonald <joe_macdonald@mentor.com> | ||
3 | Date: Mon, 30 Oct 2017 13:18:20 -0400 | ||
4 | Subject: [PATCH] include missing kernel header | ||
2 | 5 | ||
3 | Fixes errors like | 6 | Fixes errors like |
4 | 7 | ||
5 | | /b/kraj/jlinux-next/poky/build/tmp-eglibc/sysroots/re-64b/usr/include/linux/if_bridge.h:172:20: error: field 'ip6' has incomplete type | 8 | | /b/kraj/jlinux-next/poky/build/tmp-eglibc/sysroots/re-64b/usr/include/linux/if_bridge.h:172:20: error: field 'ip6' has incomplete type |
6 | | In file included from ../libbridge/libbridge.h:24:0, | 9 | | In file included from ../libbridge/libbridge.h:24:0, |
7 | 10 | ||
8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
9 | Upstream-Status: Pending | 11 | Upstream-Status: Pending |
10 | 12 | ||
11 | Index: bridge-utils-1.5/libbridge/libbridge.h | 13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
12 | =================================================================== | 14 | Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com> |
13 | --- bridge-utils-1.5.orig/libbridge/libbridge.h 2011-03-28 17:52:54.000000000 -0700 | 15 | --- |
14 | +++ bridge-utils-1.5/libbridge/libbridge.h 2013-03-04 21:16:25.781188309 -0800 | 16 | libbridge/libbridge.h | 1 + |
15 | @@ -20,6 +20,7 @@ | 17 | 1 file changed, 1 insertion(+) |
16 | #define _LIBBRIDGE_H | 18 | |
19 | diff --git a/libbridge/libbridge.h b/libbridge/libbridge.h | ||
20 | index c038b92..fd09306 100644 | ||
21 | --- a/libbridge/libbridge.h | ||
22 | +++ b/libbridge/libbridge.h | ||
23 | @@ -24,6 +24,7 @@ | ||
24 | #include <sys/time.h> | ||
25 | #include <netinet/in.h> | ||
17 | 26 | ||
18 | #include <sys/socket.h> | ||
19 | +#include <linux/in6.h> | 27 | +#include <linux/in6.h> |
20 | #include <linux/if.h> | 28 | #include <linux/if.h> |
21 | #include <linux/if_bridge.h> | 29 | #include <linux/if_bridge.h> |
22 | 30 | ||
31 | -- | ||
32 | 2.7.4 | ||
33 | |||
diff --git a/meta-networking/recipes-support/bridge-utils/bridge-utils_1.5.bb b/meta-networking/recipes-support/bridge-utils/bridge-utils_1.5.bb deleted file mode 100644 index 6032ab05e..000000000 --- a/meta-networking/recipes-support/bridge-utils/bridge-utils_1.5.bb +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | require bridge-utils.inc | ||
2 | |||
3 | SRC_URI += "\ | ||
4 | file://kernel-headers.patch \ | ||
5 | file://0001-build-error-out-correctly-if-a-submake-fails.patch \ | ||
6 | file://0002-libbridge-fix-some-build-time-warnings-fcntl.h.patch \ | ||
7 | file://0003-bridge-fix-some-build-time-warnings-errno.h.patch \ | ||
8 | file://0004-libbridge-add-missing-include-s-fix-build-against-mu.patch \ | ||
9 | file://0005-build-don-t-ignore-CFLAGS-from-environment.patch \ | ||
10 | " | ||
11 | |||
12 | LIC_FILES_CHKSUM = "file://COPYING;md5=f9d20a453221a1b7e32ae84694da2c37" | ||
13 | |||
14 | SRC_URI[md5sum] = "ec7b381160b340648dede58c31bb2238" | ||
15 | SRC_URI[sha256sum] = "42f9e5fb8f6c52e63a98a43b81bd281c227c529f194913e1c51ec48a393b6688" | ||
16 | |||
diff --git a/meta-networking/recipes-support/bridge-utils/bridge-utils.inc b/meta-networking/recipes-support/bridge-utils/bridge-utils_1.6.bb index 0fb18d5d6..1c87c48bf 100644 --- a/meta-networking/recipes-support/bridge-utils/bridge-utils.inc +++ b/meta-networking/recipes-support/bridge-utils/bridge-utils_1.6.bb | |||
@@ -3,14 +3,21 @@ HOMEPAGE = "http://www.linuxfoundation.org/collaborate/workgroups/networking/bri | |||
3 | SECTION = "net" | 3 | SECTION = "net" |
4 | LICENSE = "GPLv2" | 4 | LICENSE = "GPLv2" |
5 | 5 | ||
6 | DEPENDS = "sysfsutils" | 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=f9d20a453221a1b7e32ae84694da2c37" |
7 | |||
8 | SRCREV = "42c1aefc303fdf891fbb099ea51f00dca83ab606" | ||
7 | 9 | ||
8 | SRC_URI = "${SOURCEFORGE_MIRROR}/bridge/bridge-utils-${PV}.tar.gz \ | 10 | SRC_URI = "\ |
9 | file://bridge-utils-1.5-check-error-returns-from-write-to-sysfs.patch \ | 11 | git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/bridge-utils.git \ |
10 | file://bridge-utils-1.5-fix-error-message-for-incorrect-command.patch \ | 12 | file://kernel-headers.patch \ |
11 | file://bridge-utils-1.5-fix-incorrect-command-in-manual.patch \ | 13 | file://0005-build-don-t-ignore-CFLAGS-from-environment.patch \ |
14 | file://0006-libbridge-Modifying-the-AR-to-cross-toolchain.patch \ | ||
12 | " | 15 | " |
13 | 16 | ||
17 | S = "${WORKDIR}/git" | ||
18 | |||
19 | DEPENDS = "sysfsutils" | ||
20 | |||
14 | inherit autotools-brokensep update-alternatives | 21 | inherit autotools-brokensep update-alternatives |
15 | 22 | ||
16 | ALTERNATIVE_${PN} = "brctl" | 23 | ALTERNATIVE_${PN} = "brctl" |