#
PKG_NAME:=openvswitch
PKG_VERSION:=$(ovs_version)
-PKG_RELEASE:=7
+PKG_RELEASE:=8
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://www.openvswitch.org/releases/
PKG_HASH:=dd5f727427e36cab22bdeae61529d8c8fccacc53d968cfa7658f7f935ddda531
ovs_kmod_openvswitch-lisp-intree_files:= $(ovs_kmod_intree_dir)/vport-lisp.ko
$(eval $(call OvsKmodPackageTemplate,openvswitch-lisp-intree))
-ovs__common_depends:= +libatomic +libunbound +libunwind
+ovs__common_depends:=+libatomic +librt
# Dependency review
#
#
ovs_libopenvswitch_title:=Open vSwitch (libopenvswitch.so)
ovs_libopenvswitch_hidden:=1
-ovs_libopenvswitch_depends:=+libopenssl +librt
+ovs_libopenvswitch_depends:=+libopenssl +libunbound +!(arc||arceb):libunwind
+ovs_libopenvswitch_depends+=$(ovs__common_depends)
ovs_libopenvswitch_files:=usr/lib/libopenvswitch*.so*
$(eval $(call OvsPackageTemplate,libopenvswitch))
ovs_libofproto_title:=Open vSwitch (libofproto.so libsflow.so)
ovs_libofproto_hidden:=1
-ovs_libofproto_depends:=+librt
+ovs_libofproto_depends+=$(ovs__common_depends)
ovs_libofproto_files:=usr/lib/libofproto*.so* usr/lib/libsflow*.so*
$(eval $(call OvsPackageTemplate,libofproto))
ovs_libovsdb_title:=Open vSwitch (libovsdb.so)
ovs_libovsdb_hidden:=1
-ovs_libovsdb_depends:=+librt
+ovs_libovsdb_depends+=$(ovs__common_depends)
ovs_libovsdb_files:=usr/lib/libovsdb*.so*
$(eval $(call OvsPackageTemplate,libovsdb))
ovs_vswitchd_title:=Open vSwitch (ovs-vswitchd)
ovs_vswitchd_hidden:=1
-ovs_vswitchd_depends:=+librt +openvswitch-libopenvswitch +openvswitch-libofproto
+ovs_vswitchd_depends:=+openvswitch-libopenvswitch +openvswitch-libofproto
+ovs_vswitchd_depends+=$(ovs__common_depends)
ovs_vswitchd_files:=usr/sbin/ovs-vswitchd
$(eval $(call OvsPackageTemplate,vswitchd))
ovs_ovsdb_title:=Open vSwitch (ovsdb-server)
ovs_ovsdb_hidden:=1
-ovs_ovsdb_depends:=+librt +openvswitch-libopenvswitch +openvswitch-libovsdb
+ovs_ovsdb_depends:=+openvswitch-libopenvswitch +openvswitch-libovsdb
+ovs_ovsdb_depends+=$(ovs__common_depends)
ovs_ovsdb_files:=usr/sbin/ovsdb-server
$(eval $(call OvsPackageTemplate,ovsdb))
ovs_common_title:=Open vSwitch (common files)
ovs_common_hidden:=1
-ovs_common_depends:=+librt +openvswitch-libopenvswitch +openvswitch-libofproto +openvswitch-libovsdb
+ovs_common_depends:=+openvswitch-libopenvswitch +openvswitch-libofproto +openvswitch-libovsdb
+ovs_common_depends+=$(ovs__common_depends)
ovs_common_files:= \
usr/share/openvswitch/scripts/ovs-lib \
usr/share/openvswitch/scripts/ovs-ctl \
# uuidgen is required for generating system-id
ovs_openvswitch_title:=Open vSwitch
ovs_openvswitch_hidden:=
-ovs_openvswitch_depends:=+librt +coreutils +coreutils-sleep +uuidgen \
+ovs_openvswitch_depends:=+coreutils +coreutils-sleep +uuidgen \
+openvswitch-common +openvswitch-vswitchd +openvswitch-ovsdb +kmod-openvswitch
+ovs_openvswitch_depends+=$(ovs__common_depends)
ovs_openvswitch_files:= usr/share/openvswitch/vswitch.ovsschema
$(eval $(call OvsPackageTemplate,openvswitch))
# Shared vars, macros
-ovs__common_depends:=
ovs_packages:=
ovs_package_name=$(if $(filter openvswitch,$(1)),openvswitch,openvswitch-$(1))
URL:=https://www.openvswitch.org
TITLE:=$(ovs_$(1)_title)
HIDDEN:=$(ovs_$(1)_hidden)
- DEPENDS:=$(ovs_$(1)_depends) $(ovs__common_depends)
+ DEPENDS:=$(ovs_$(1)_depends)
endef
define Package/$(call ovs_package_name,$(1))/install
--- /dev/null
+From 6324f0c594e3773c754861e630fff694d1bec15a Mon Sep 17 00:00:00 2001
+From: Yousong Zhou <yszhou4tech@gmail.com>
+Date: Wed, 29 Jul 2020 17:29:14 +0800
+Subject: [PATCH] build: only link libopenvswitch with libunwind, libunbound
+
+Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
+---
+ lib/automake.mk | 2 ++
+ lib/libopenvswitch.pc.in | 2 +-
+ m4/openvswitch.m4 | 6 ++++--
+ 3 files changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/lib/automake.mk b/lib/automake.mk
+index 95925b57c..df95bea10 100644
+--- a/lib/automake.mk
++++ b/lib/automake.mk
+@@ -10,6 +10,8 @@ lib_LTLIBRARIES += lib/libopenvswitch.la
+ lib_libopenvswitch_la_LIBADD = $(SSL_LIBS)
+ lib_libopenvswitch_la_LIBADD += $(CAPNG_LDADD)
+ lib_libopenvswitch_la_LIBADD += $(LIBBPF_LDADD)
++lib_libopenvswitch_la_LIBADD += $(LIBUNBOUND_LDADD)
++lib_libopenvswitch_la_LIBADD += $(LIBUNWIND_LDADD)
+
+ if WIN32
+ lib_libopenvswitch_la_LIBADD += ${PTHREAD_LIBS}
+diff --git a/lib/libopenvswitch.pc.in b/lib/libopenvswitch.pc.in
+index 2a3f2ca7b..c8d02eb5a 100644
+--- a/lib/libopenvswitch.pc.in
++++ b/lib/libopenvswitch.pc.in
+@@ -7,5 +7,5 @@ Name: libopenvswitch
+ Description: Open vSwitch library
+ Version: @VERSION@
+ Libs: -L${libdir} -lopenvswitch
+-Libs.private: @LIBS@
++Libs.private: @LIBS@ @SSL_LIBS@ @CAPNG_LDADD@ @LIBBPF_LDADD@ @LIBUNBOUND_LDADD@ @LIBUNWIND_LDADD@
+ Cflags: -I${includedir}/openvswitch
+diff --git a/m4/openvswitch.m4 b/m4/openvswitch.m4
+index ada31c491..6165cc7b1 100644
+--- a/m4/openvswitch.m4
++++ b/m4/openvswitch.m4
+@@ -623,7 +623,8 @@ AC_DEFUN([OVS_CHECK_UNBOUND],
+ [AC_CHECK_LIB(unbound, ub_ctx_create, [HAVE_UNBOUND=yes], [HAVE_UNBOUND=no])
+ if test "$HAVE_UNBOUND" = yes; then
+ AC_DEFINE([HAVE_UNBOUND], [1], [Define to 1 if unbound is detected.])
+- LIBS="$LIBS -lunbound"
++ LIBUNBOUND_LDADD="-lunbound"
++ AC_SUBST(LIBUNBOUND_LDADD)
+ fi
+ AM_CONDITIONAL([HAVE_UNBOUND], [test "$HAVE_UNBOUND" = yes])
+ AC_SUBST([HAVE_UNBOUND])])
+@@ -635,7 +636,8 @@ AC_DEFUN([OVS_CHECK_UNWIND],
+ [HAVE_UNWIND=no])
+ if test "$HAVE_UNWIND" = yes; then
+ AC_DEFINE([HAVE_UNWIND], [1], [Define to 1 if unwind is detected.])
+- LIBS="$LIBS -lunwind"
++ LIBUNWIND_LDADD="-lunwind"
++ AC_SUBST(LIBUNWIND_LDADD)
+ fi
+ AM_CONDITIONAL([HAVE_UNWIND], [test "$HAVE_UNWIND" = yes])
+ AC_SUBST([HAVE_UNWIND])])
PKG_NAME:=ovn
PKG_VERSION:=20.06.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/ovn-org/ovn.git
include $(INCLUDE_DIR)/package.mk
include ../../lang/python/python3-host.mk
-ovs__common_depends:= +libatomic +libunbound
+ovs__common_depends:=+libatomic +librt
ovs_libovn_title:=Open vSwitch (libovn.so)
ovs_libovn_hidden:=1
-ovs_libovn_depends:=+librt
+ovs_libovn_depends+=$(ovs__common_depends)
ovs_libovn_files:=usr/lib/libovn*.so*
$(eval $(call OvsPackageTemplate,libovn))
ovs_ovn-common_title:=Open Virtual Network (common files)
ovs_ovn-common_hidden:=1
-ovs_ovn-common_depends:=+librt +openvswitch-common +openvswitch-libopenvswitch +openvswitch-libovn +openvswitch-libovsdb
+ovs_ovn-common_depends:=+openvswitch-common +openvswitch-libopenvswitch +openvswitch-libovn +openvswitch-libovsdb
+ovs_ovn-common_depends+=$(ovs__common_depends)
ovs_ovn-common_files:= \
usr/share/ovn/scripts/ovn-ctl \
usr/share/ovn/scripts/ovn-lib \
ovs_ovn-north_title:=Open Virtual Network (north package)
ovs_ovn-north_hidden:=
ovs_ovn-north_depends:=+openvswitch-ovsdb +openvswitch-ovn-common
+ovs_ovn-north_depends+=$(ovs__common_depends)
ovs_ovn-north_files:=\
usr/share/ovn/ovn-nb.ovsschema \
usr/share/ovn/ovn-sb.ovsschema \
ovs_ovn-host_title:=Open Virtual Network (chassis package)
ovs_ovn-host_hidden:=
ovs_ovn-host_depends:=+openvswitch +openvswitch-ovn-common
+ovs_ovn-host_depends+=$(ovs__common_depends)
ovs_ovn-host_files:=usr/bin/ovn-controller
$(eval $(call OvsPackageTemplate,ovn-host))
+++ /dev/null
-From d048a1e98363197c0d2609f6adb6919bde473df4 Mon Sep 17 00:00:00 2001
-From: Yousong Zhou <yszhou4tech@gmail.com>
-Date: Mon, 23 Mar 2020 14:18:30 +0800
-Subject: [PATCH] build: skip building tests
-
-Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
----
- Makefile.am | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index 04400e184..b2c42d84c 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -492,7 +492,6 @@ include Documentation/automake.mk
- include m4/automake.mk
- include lib/automake.mk
- include utilities/automake.mk
--include tests/automake.mk
- include include/automake.mk
- include third-party/automake.mk
- include debian/automake.mk
--- /dev/null
+From f3cc8c83993486b9d35557f2bd85038d5bb96bc5 Mon Sep 17 00:00:00 2001
+From: Yousong Zhou <yszhou4tech@gmail.com>
+Date: Wed, 29 Jul 2020 20:09:56 +0800
+Subject: [PATCH] build: skip check and use of libunbound
+
+Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
+---
+ configure.ac | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 2bcd1945b..ad550fff8 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -130,7 +130,6 @@ OVS_CHECK_LINUX_HOST
+ OVS_LIBTOOL_VERSIONS
+ OVS_CHECK_CXX
+ AX_FUNC_POSIX_MEMALIGN
+-OVN_CHECK_UNBOUND
+
+ OVS_CHECK_INCLUDE_NEXT([stdio.h string.h])
+ AC_CONFIG_FILES([lib/libovn.sym])
--- /dev/null
+From cea7c74ecc4a0843f29ce1882d7876fff199a721 Mon Sep 17 00:00:00 2001
+From: Yousong Zhou <yszhou4tech@gmail.com>
+Date: Mon, 23 Mar 2020 14:18:30 +0800
+Subject: [PATCH] build: skip tests and docs
+
+Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
+---
+ Makefile.am | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 04400e184..c12cfcd11 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -488,11 +488,9 @@ dist-docs:
+
+
+ include automake.mk
+-include Documentation/automake.mk
+ include m4/automake.mk
+ include lib/automake.mk
+ include utilities/automake.mk
+-include tests/automake.mk
+ include include/automake.mk
+ include third-party/automake.mk
+ include debian/automake.mk
+++ /dev/null
-From ecf232bf32dd433642bb9da2ac0c2de483b8736a Mon Sep 17 00:00:00 2001
-From: Yousong Zhou <yszhou4tech@gmail.com>
-Date: Mon, 23 Mar 2020 15:54:26 +0800
-Subject: [PATCH] ovn-lib: fix install_dir()
-
-The command "install" is not available in OpenWrt by default
-
-Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
----
- utilities/ovn-lib.in | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/utilities/ovn-lib.in b/utilities/ovn-lib.in
-index af1b72edb..f6ab5581c 100644
---- a/utilities/ovn-lib.in
-+++ b/utilities/ovn-lib.in
-@@ -54,7 +54,10 @@ ovn_install_dir () {
- [ "${OVN_USER##*:}" != "" ] && INSTALL_GROUP="${OVN_USER##*:}"
-
- if test ! -d "$DIR"; then
-- install -d -m "$INSTALL_MODE" -o "$INSTALL_USER" -g "$INSTALL_GROUP" "$DIR"
-+ mkdir -p "$DIR"
-+ chmod "$INSTALL_MODE" "$DIR"
-+ chown "$INSTALL_USER" "$DIR"
-+ chgrp "$INSTALL_GROUP" "$DIR"
- restorecon "$DIR" >/dev/null 2>&1
- fi
- }
--- /dev/null
+From 7385d1e67dda100853cf748034220cdbed6b3d7c Mon Sep 17 00:00:00 2001
+From: Yousong Zhou <yszhou4tech@gmail.com>
+Date: Mon, 23 Mar 2020 15:54:26 +0800
+Subject: [PATCH] ovn-lib: fix install_dir()
+
+The command "install" is not available in OpenWrt by default
+
+Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
+---
+ utilities/ovn-lib.in | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/utilities/ovn-lib.in b/utilities/ovn-lib.in
+index af1b72edb..f6ab5581c 100644
+--- a/utilities/ovn-lib.in
++++ b/utilities/ovn-lib.in
+@@ -54,7 +54,10 @@ ovn_install_dir () {
+ [ "${OVN_USER##*:}" != "" ] && INSTALL_GROUP="${OVN_USER##*:}"
+
+ if test ! -d "$DIR"; then
+- install -d -m "$INSTALL_MODE" -o "$INSTALL_USER" -g "$INSTALL_GROUP" "$DIR"
++ mkdir -p "$DIR"
++ chmod "$INSTALL_MODE" "$DIR"
++ chown "$INSTALL_USER" "$DIR"
++ chgrp "$INSTALL_GROUP" "$DIR"
+ restorecon "$DIR" >/dev/null 2>&1
+ fi
+ }