fix testsuite build failure and delete libcap-devel dependency
This commit is contained in:
parent
6b687d0fd3
commit
288cf6d832
@ -0,0 +1,38 @@
|
|||||||
|
From c0a06885b944e1f14440f601a0b5266233814d54 Mon Sep 17 00:00:00 2001
|
||||||
|
From: gaoxingwang <gaoxingwang1@huawei.com>
|
||||||
|
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 <gaoxingwang1@huawei.com>
|
||||||
|
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
||||||
|
---
|
||||||
|
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
|
||||||
|
|
||||||
10
iproute.spec
10
iproute.spec
@ -2,7 +2,7 @@
|
|||||||
Name: iproute
|
Name: iproute
|
||||||
Version: 6.1.0
|
Version: 6.1.0
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
Release: 4
|
Release: 5
|
||||||
Summary: Linux network configuration utilities
|
Summary: Linux network configuration utilities
|
||||||
License: GPLv2+ and Public Domain
|
License: GPLv2+ and Public Domain
|
||||||
URL: https://kernel.org/pub/linux/utils/net/iproute2/
|
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
|
Patch1: bugfix-iproute2-3.10.0-fix-maddr-show.patch
|
||||||
Patch2: bugfix-iproute2-change-proc-to-ipnetnsproc-which-is-private.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
|
Patch9000: feature-iproute-add-support-for-ipvlan-l2e-mode.patch
|
||||||
Patch9001: bugfix-iproute2-cancel-some-test-cases.patch
|
Patch9001: bugfix-iproute2-cancel-some-test-cases.patch
|
||||||
|
|
||||||
BuildRequires: gcc bison elfutils-libelf-devel flex iptables-devel
|
BuildRequires: gcc bison elfutils-libelf-devel flex iptables-devel
|
||||||
BuildRequires: libmnl-devel libselinux-devel pkgconfig libbpf-devel sudo make
|
BuildRequires: libmnl-devel libselinux-devel pkgconfig libbpf-devel sudo make
|
||||||
BuildRequires: libcap-devel
|
|
||||||
Requires: libbpf psmisc
|
Requires: libbpf psmisc
|
||||||
|
|
||||||
Provides: /sbin/ip iproute-tc tc
|
Provides: /sbin/ip iproute-tc tc
|
||||||
@ -89,6 +89,12 @@ install -m 0644 lib/libnetlink.a %{buildroot}%{_libdir}/libnetlink.a
|
|||||||
%{_mandir}/*
|
%{_mandir}/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat Feb 18 2023 gaoxingwang <gaoxingwang1@huawei.com> - 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 <gaoxingwang1@huawei.com> - 1:6.1.0-4
|
* Fri Feb 17 2023 gaoxingwang <gaoxingwang1@huawei.com> - 1:6.1.0-4
|
||||||
- Type:bugfix
|
- Type:bugfix
|
||||||
- ID:NA
|
- ID:NA
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user