diff mbox series

[2/2] libteam: add library to control team devices

Message ID 20210114023848.27135-2-code@simerda.eu
State Changes Requested
Headers show
Series [1/2] libnl: add libnl-cli library | expand

Commit Message

Pavel Šimerda Jan. 14, 2021, 2:38 a.m. UTC
---
 package/network/services/libteam/Makefile     | 30 +++++++++++++
 .../0001-fix-build-on-OpenWRT-musl-libc.patch | 43 +++++++++++++++++++
 2 files changed, 73 insertions(+)
 create mode 100644 package/network/services/libteam/Makefile
 create mode 100644 package/network/services/libteam/patches/0001-fix-build-on-OpenWRT-musl-libc.patch

Comments

Petr Štetiar Jan. 16, 2021, 11:54 a.m. UTC | #1
Pavel Šimerda <code@simerda.eu> [2021-01-14 03:38:48]:

Hi,

> +++ b/package/network/services/libteam/Makefile
> @@ -0,0 +1,30 @@
> +include $(TOPDIR)/rules.mk
> +
> +PKG_NAME := libteam
> +PKG_FIXUP := autoreconf
> +PKG_BUILD_DEPENDS := libdaemon jansson

libdaemon is not in the main tree, it's in the packages tree, so this package
should go there as well.

> +Subject: [PATCH] fix build on OpenWRT/musl-libc

this should be upstreamed

-- ynezz
Pavel Šimerda Jan. 16, 2021, 12:20 p.m. UTC | #2
On 1/16/21 12:54 PM, Petr Štetiar wrote:
> Pavel Šimerda <code@simerda.eu> [2021-01-14 03:38:48]:
> 
> Hi,
> 
>> +++ b/package/network/services/libteam/Makefile
>> @@ -0,0 +1,30 @@
>> +include $(TOPDIR)/rules.mk
>> +
>> +PKG_NAME := libteam
>> +PKG_FIXUP := autoreconf
>> +PKG_BUILD_DEPENDS := libdaemon jansson
> 
> libdaemon is not in the main tree, it's in the packages tree, so this package
> should go there as well.
> 
>> +Subject: [PATCH] fix build on OpenWRT/musl-libc
> 
> this should be upstreamed

Sure. This has been submitted to upstream but there seems to be a communication issue.

https://github.com/jpirko/libteam/pull/31

> 
> -- ynezz
>
diff mbox series

Patch

diff --git a/package/network/services/libteam/Makefile b/package/network/services/libteam/Makefile
new file mode 100644
index 0000000000..367134656b
--- /dev/null
+++ b/package/network/services/libteam/Makefile
@@ -0,0 +1,30 @@ 
+include $(TOPDIR)/rules.mk
+
+PKG_NAME := libteam
+PKG_FIXUP := autoreconf
+PKG_BUILD_DEPENDS := libdaemon jansson
+PKG_INSTALL := 1
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL=https://github.com/jpirko/libteam.git
+PKG_SOURCE_DATE:=2021-01-12
+PKG_SOURCE_VERSION:=61efd6de2fbb8ee077863ee5a355ac3dfd9365b9
+
+PKG_LICENSE:=LGPL-2.1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libteam
+  SECTION := base
+  CATEGORY := Network
+  DEPENDS := +libnl +libnl-cli +libnl-core +libnl-genl +libnl-nf +libnl-route +libdaemon +jansson
+  TITLE := Library for controlling team network device
+  URL := http://libteam.org/
+endef
+
+define Package/libteam/install
+	$(INSTALL_DIR) $(1)/
+	$(CP) $(PKG_INSTALL_DIR)/. $(1)/
+endef
+
+$(eval $(call BuildPackage,libteam))
diff --git a/package/network/services/libteam/patches/0001-fix-build-on-OpenWRT-musl-libc.patch b/package/network/services/libteam/patches/0001-fix-build-on-OpenWRT-musl-libc.patch
new file mode 100644
index 0000000000..71b2b8abba
--- /dev/null
+++ b/package/network/services/libteam/patches/0001-fix-build-on-OpenWRT-musl-libc.patch
@@ -0,0 +1,43 @@ 
+From 5a5825708ba0bfcb7700a9fba4ea9f8c41c1ae6c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Pavel=20=C5=A0imerda?= <code@simerda.eu>
+Date: Tue, 5 Jan 2021 22:13:06 +0100
+Subject: [PATCH] fix build on OpenWRT/musl-libc
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Pavel Šimerda <code@simerda.eu>
+---
+ teamd/teamd_runner_lacp.c | 2 --
+ utils/teamnl.c            | 1 +
+ 2 files changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/teamd/teamd_runner_lacp.c b/teamd/teamd_runner_lacp.c
+index 9437f05..f524be2 100644
+--- a/teamd/teamd_runner_lacp.c
++++ b/teamd/teamd_runner_lacp.c
+@@ -23,9 +23,7 @@
+ #include <unistd.h>
+ #include <limits.h>
+ #include <sys/ioctl.h>
+-#include <linux/if_ether.h>
+ #include <sys/socket.h>
+-#include <linux/netdevice.h>
+ #include <netinet/in.h>
+ #include <errno.h>
+ #include <team.h>
+diff --git a/utils/teamnl.c b/utils/teamnl.c
+index c53345d..ec2b435 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.29.2
+