commit:     b20b5bab12d0085e0c1e92c34ab1a1c39c2b01ce
Author:     Stijn Tintel <stijn <AT> linux-ipv6 <DOT> be>
AuthorDate: Thu Feb  2 00:17:21 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Feb  2 04:49:56 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b20b5bab

net-misc/openvswitch: add USE=unwind

Building net-misc/openvswitch on a host with sys-libs/libunwind
installed results in several binaries being linked to libunwind.so.

As net-misc/openvswitch lacks a dependency on sys-libs/libunwind,
installing a binpkg created on such host will result in broken binaries.

There is no configure option to disable libunwind, and upstream enables
the dependency unconditionally in their RPM spec, but as we support
architectures that do not support libunwind, this is not an option.

Add a USE flag to toggle libunwind via the autoconf macro.

Closes: https://bugs.gentoo.org/892389
Signed-off-by: Stijn Tintel <stijn <AT> linux-ipv6.be>
Closes: https://github.com/gentoo/gentoo/pull/29385
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../{openvswitch-2.17.2-r1.ebuild => openvswitch-2.17.2-r2.ebuild}   | 5 ++++-
 profiles/arch/alpha/package.use.mask                                 | 5 +++++
 profiles/arch/m68k/package.use.mask                                  | 5 +++++
 profiles/arch/sparc/package.use.mask                                 | 5 +++++
 4 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/net-misc/openvswitch/openvswitch-2.17.2-r1.ebuild 
b/net-misc/openvswitch/openvswitch-2.17.2-r2.ebuild
similarity index 97%
rename from net-misc/openvswitch/openvswitch-2.17.2-r1.ebuild
rename to net-misc/openvswitch/openvswitch-2.17.2-r2.ebuild
index c26ee73a3019..c17e37e3f3bb 100644
--- a/net-misc/openvswitch/openvswitch-2.17.2-r1.ebuild
+++ b/net-misc/openvswitch/openvswitch-2.17.2-r2.ebuild
@@ -15,7 +15,7 @@ SRC_URI="https://www.openvswitch.org/releases/${P}.tar.gz";
 LICENSE="Apache-2.0 GPL-2"
 SLOT="0"
 KEYWORDS="amd64 ~arm64 ~ppc64 x86"
-IUSE="debug modules monitor +ssl"
+IUSE="debug modules monitor +ssl unwind"
 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
 
 # Check python/ovs/version.py in tarball for dev-python/ovs dep
@@ -26,6 +26,7 @@ RDEPEND="${PYTHON_DEPS}
                dev-python/zope-interface[${PYTHON_USEDEP}]
        ')
        debug? ( dev-lang/perl )
+       unwind? ( sys-libs/libunwind:= )
        ssl? ( dev-libs/openssl:= )"
 DEPEND="${RDEPEND}
        sys-apps/util-linux[caps]"
@@ -82,6 +83,8 @@ src_configure() {
        local linux_config
        use modules && linux_config="--with-linux=${KV_OUT_DIR}"
 
+       export ac_cv_lib_unwind_unw_backtrace="$(usex unwind)"
+
        # Need PYTHON3 variable for bug #860240
        PYTHON3="${PYTHON}" CONFIG_SHELL="${BROOT}"/bin/bash 
SHELL="${BROOT}"/bin/bash econf ${linux_config} \
                --with-rundir=/var/run/openvswitch \

diff --git a/profiles/arch/alpha/package.use.mask 
b/profiles/arch/alpha/package.use.mask
index d911bcaf7be1..e446e594c592 100644
--- a/profiles/arch/alpha/package.use.mask
+++ b/profiles/arch/alpha/package.use.mask
@@ -1,6 +1,11 @@
 # Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
+# Stijn Tintel <st...@linux-ipv6.be> (2023-02-02)
+# Dependency not keyworded
+# https://bugs.gentoo.org/show_bug.cgi?id=892389
+net-misc/openvswitch unwind
+
 # matoro <matoro_gen...@matoro.tk> (2022-09-22)
 # Unable to test due to mask, bug #763963
 net-misc/openntpd constraints

diff --git a/profiles/arch/m68k/package.use.mask 
b/profiles/arch/m68k/package.use.mask
index 98c973ac29d0..0fac36b10ed5 100644
--- a/profiles/arch/m68k/package.use.mask
+++ b/profiles/arch/m68k/package.use.mask
@@ -1,6 +1,11 @@
 # Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
+# Stijn Tintel <st...@linux-ipv6.be> (2023-02-02)
+# Dependency not keyworded
+# https://bugs.gentoo.org/show_bug.cgi?id=892389
+net-misc/openvswitch unwind
+
 # Andreas K. Hüttel <dilfri...@gentoo.org> (2022-05-29)
 # No TMP here, no xkb here
 sys-apps/systemd tpm xkb

diff --git a/profiles/arch/sparc/package.use.mask 
b/profiles/arch/sparc/package.use.mask
index c460aac2ca72..525793fbb21d 100644
--- a/profiles/arch/sparc/package.use.mask
+++ b/profiles/arch/sparc/package.use.mask
@@ -1,6 +1,11 @@
 # Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
+# Stijn Tintel <st...@linux-ipv6.be> (2023-02-02)
+# Dependency not keyworded
+# https://bugs.gentoo.org/show_bug.cgi?id=892389
+net-misc/openvswitch unwind
+
 # Sam James <s...@gentoo.org> (2023-01-31)
 # jit not supported on sparc32 or sparc64
 dev-libs/libpcre2 jit

Reply via email to