diff options
Diffstat (limited to 'meta-openembedded/meta-oe/recipes-support/libteam')
5 files changed, 145 insertions, 0 deletions
diff --git a/meta-openembedded/meta-oe/recipes-support/libteam/libteam/0001-include-sys-select.h-for-fd_set-definition.patch b/meta-openembedded/meta-oe/recipes-support/libteam/libteam/0001-include-sys-select.h-for-fd_set-definition.patch new file mode 100644 index 000000000..a4a17ed85 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-support/libteam/libteam/0001-include-sys-select.h-for-fd_set-definition.patch @@ -0,0 +1,28 @@ +From 0ab69dc18a2057ff5bf41abcdf2b983b72d5a903 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 12 Jul 2017 15:34:49 -0700 +Subject: [PATCH 1/2] include sys/select.h for fd_set definition + +Fixes +teamnl.c:160:2: error: unknown type name 'fd_set'; did you mean 'fpos_t'? + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + utils/teamnl.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/utils/teamnl.c b/utils/teamnl.c +index e8de7e2..25129e8 100644 +--- a/utils/teamnl.c ++++ b/utils/teamnl.c +@@ -24,6 +24,7 @@ + #include <getopt.h> + #include <errno.h> + #include <sys/signalfd.h> ++#include <sys/select.h> + #include <signal.h> + #include <unistd.h> + #include <team.h> +-- +2.13.2 + diff --git a/meta-openembedded/meta-oe/recipes-support/libteam/libteam/0001-team_basic_test.py-disable-RedHat-specific-test.patch b/meta-openembedded/meta-oe/recipes-support/libteam/libteam/0001-team_basic_test.py-disable-RedHat-specific-test.patch new file mode 100644 index 000000000..468a55f34 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-support/libteam/libteam/0001-team_basic_test.py-disable-RedHat-specific-test.patch @@ -0,0 +1,32 @@ +From 00debe6bd4cf5a3133a8fbaab75f7447a39fa655 Mon Sep 17 00:00:00 2001 +From: Wenzong Fan <wenzong.fan@windriver.com> +Date: Thu, 12 Apr 2018 01:54:15 +0000 +Subject: [PATCH] team_basic_test.py: disable RedHat specific test + +The test _run_teamd_initscripts() is for RedHat ifcfg scripts which are +incompatible with OE: + /etc/sysconfig/network-scripts/ifcfg-* + +Upstream-Status: Inappropriate [OE Specific] + +Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> +--- + scripts/team_basic_test.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/scripts/team_basic_test.py b/scripts/team_basic_test.py +index b05be9e..faabd18 100755 +--- a/scripts/team_basic_test.py ++++ b/scripts/team_basic_test.py +@@ -171,7 +171,7 @@ TEAM_PORT_CONFIG='{"prio": 10}' + try: + for mode_name in self._team_modes: + self._run_one_mode(mode_name) +- self._run_teamd_initscripts() ++ #self._run_teamd_initscripts() + finally: + cmd_exec("modprobe -r team_mode_loadbalance team_mode_roundrobin team_mode_activebackup team_mode_broadcast team"); + +-- +2.13.3 + diff --git a/meta-openembedded/meta-oe/recipes-support/libteam/libteam/0002-teamd-Re-adjust-include-header-order.patch b/meta-openembedded/meta-oe/recipes-support/libteam/libteam/0002-teamd-Re-adjust-include-header-order.patch new file mode 100644 index 000000000..beabf63ca --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-support/libteam/libteam/0002-teamd-Re-adjust-include-header-order.patch @@ -0,0 +1,40 @@ +From a5b945cb3c62a18dcd7047f62707c09076c4e48b Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 12 Jul 2017 15:35:51 -0700 +Subject: [PATCH 2/2] teamd: Re-adjust include header order + +So it gets the library definition before kernel definition + +usr/include/ne +tinet/if_ether.h:101:8: error: redefinition of 'struct ethhdr' + struct ethhdr { + ^~~~~~ + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + teamd/teamd_runner_lacp.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/teamd/teamd_runner_lacp.c b/teamd/teamd_runner_lacp.c +index 9c77fae..8800854 100644 +--- a/teamd/teamd_runner_lacp.c ++++ b/teamd/teamd_runner_lacp.c +@@ -23,6 +23,7 @@ + #include <unistd.h> + #include <limits.h> + #include <sys/ioctl.h> ++#include <net/ethernet.h> + #include <linux/if_ether.h> + #include <sys/socket.h> + #include <linux/netdevice.h> +@@ -30,7 +31,6 @@ + #include <errno.h> + #include <team.h> + #include <private/misc.h> +-#include <net/ethernet.h> + + #include "teamd.h" + #include "teamd_config.h" +-- +2.13.2 + diff --git a/meta-openembedded/meta-oe/recipes-support/libteam/libteam/run-ptest b/meta-openembedded/meta-oe/recipes-support/libteam/libteam/run-ptest new file mode 100644 index 000000000..4ba5acf05 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-support/libteam/libteam/run-ptest @@ -0,0 +1,3 @@ +#!/bin/sh + +python $(dirname $0)/team_basic_test.py diff --git a/meta-openembedded/meta-oe/recipes-support/libteam/libteam_1.27.bb b/meta-openembedded/meta-oe/recipes-support/libteam/libteam_1.27.bb new file mode 100644 index 000000000..442592de9 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-support/libteam/libteam_1.27.bb @@ -0,0 +1,42 @@ +SUMMARY = "Library for controlling team network device" +HOMEPAGE = "http://www.libteam.org/" +SECTION = "libs/network" + +LICENSE = "LGPLv2.1" +LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" + +DEPENDS = "libnl libdaemon jansson" + +SRC_URI = "git://github.com/jpirko/libteam \ + file://0001-include-sys-select.h-for-fd_set-definition.patch \ + file://0002-teamd-Re-adjust-include-header-order.patch \ + file://0001-team_basic_test.py-disable-RedHat-specific-test.patch \ + file://run-ptest \ + " +SRCREV = "91a928a56a501daac5ce8b3c16bd9943661f1d16" + +SRC_URI[md5sum] = "565114d70c41bff6093d8e57be284e8a" +SRC_URI[sha256sum] = "d65286379141db141bea33424ec0507bb0f827a0bf03d9c65004bb593e3d5545" + +S = "${WORKDIR}/git" + +inherit autotools pkgconfig ptest + +FILES_${PN} = "${libdir}/libteam${SOLIBS} \ +" + +PACKAGES += "${PN}-dctl ${PN}-utils" +FILES_${PN}-dctl = "${libdir}/libteamdctl${SOLIBS} \ +" +FILES_${PN}-utils = "${bindir}/bond2team \ + ${bindir}/teamd \ + ${bindir}/teamdctl \ + ${bindir}/teamnl \ +" + +RDEPENDS_${PN}-utils = "bash" +RDEPENDS_${PN}-ptest = "python" + +do_install_ptest() { + install ${S}/scripts/team_basic_test.py ${D}${PTEST_PATH}/ +} |