From 288cf6d8326af28027031359a71fd00fa4f41077 Mon Sep 17 00:00:00 2001 From: gaoxingwang Date: Sat, 18 Feb 2023 16:26:52 +0800 Subject: [PATCH] fix testsuite build failure and delete libcap-devel dependency --- ...stsuite-build-failure-when-iproute-b.patch | 38 +++++++++++++++++++ iproute.spec | 10 ++++- 2 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 backport-testsuite-fix-testsuite-build-failure-when-iproute-b.patch diff --git a/backport-testsuite-fix-testsuite-build-failure-when-iproute-b.patch b/backport-testsuite-fix-testsuite-build-failure-when-iproute-b.patch new file mode 100644 index 0000000..adfd356 --- /dev/null +++ b/backport-testsuite-fix-testsuite-build-failure-when-iproute-b.patch @@ -0,0 +1,38 @@ +From c0a06885b944e1f14440f601a0b5266233814d54 Mon Sep 17 00:00:00 2001 +From: gaoxingwang +Date: Fri, 10 Feb 2023 16:45:31 +0800 +Subject: [PATCH] testsuite: fix testsuite build failure when iproute build + without libcap-devel + +iproute allows to build without libcap.The testsuite will fail to +compile when libcap dose not exists.It was required in 6d68d7f85d. + +Fixes: 6d68d7f85d ("testsuite: fix build failure") +Signed-off-by: gaoxingwang +Signed-off-by: Stephen Hemminger +--- + testsuite/tools/Makefile | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/testsuite/tools/Makefile b/testsuite/tools/Makefile +index e0162ccc..0356ddae 100644 +--- a/testsuite/tools/Makefile ++++ b/testsuite/tools/Makefile +@@ -1,9 +1,13 @@ + # SPDX-License-Identifier: GPL-2.0 + CFLAGS= ++LDLIBS= + include ../../config.mk ++ifeq ($(HAVE_CAP),y) ++LDLIBS+= -lcap ++endif + + generate_nlmsg: generate_nlmsg.c ../../lib/libnetlink.a ../../lib/libutil.a +- $(QUIET_CC)$(CC) $(CPPFLAGS) $(CFLAGS) $(EXTRA_CFLAGS) -I../../include -I../../include/uapi -include../../include/uapi/linux/netlink.h -o $@ $^ -lmnl -lcap ++ $(QUIET_CC)$(CC) $(CPPFLAGS) $(CFLAGS) $(EXTRA_CFLAGS) -I../../include -I../../include/uapi -include../../include/uapi/linux/netlink.h -o $@ $^ -lmnl $(LDLIBS) + + clean: + rm -f generate_nlmsg +-- +2.27.0 + diff --git a/iproute.spec b/iproute.spec index 77e653b..8ce16d7 100644 --- a/iproute.spec +++ b/iproute.spec @@ -2,7 +2,7 @@ Name: iproute Version: 6.1.0 Epoch: 1 -Release: 4 +Release: 5 Summary: Linux network configuration utilities License: GPLv2+ and Public Domain URL: https://kernel.org/pub/linux/utils/net/iproute2/ @@ -10,13 +10,13 @@ Source0: https://mirrors.edge.kernel.org/pub/linux/utils/net/iproute2/iproute2-% Patch1: bugfix-iproute2-3.10.0-fix-maddr-show.patch Patch2: bugfix-iproute2-change-proc-to-ipnetnsproc-which-is-private.patch +Patch3: backport-testsuite-fix-testsuite-build-failure-when-iproute-b.patch Patch9000: feature-iproute-add-support-for-ipvlan-l2e-mode.patch Patch9001: bugfix-iproute2-cancel-some-test-cases.patch BuildRequires: gcc bison elfutils-libelf-devel flex iptables-devel BuildRequires: libmnl-devel libselinux-devel pkgconfig libbpf-devel sudo make -BuildRequires: libcap-devel Requires: libbpf psmisc Provides: /sbin/ip iproute-tc tc @@ -89,6 +89,12 @@ install -m 0644 lib/libnetlink.a %{buildroot}%{_libdir}/libnetlink.a %{_mandir}/* %changelog +* Sat Feb 18 2023 gaoxingwang - 1:6.1.0-5 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:fix testsuite build failure and delete libcap-devel dependency + * Fri Feb 17 2023 gaoxingwang - 1:6.1.0-4 - Type:bugfix - ID:NA