From b378a9adeeccdc0c1800ad00eb44c03a9b283647 Mon Sep 17 00:00:00 2001 From: Michel Alexandre Salim Date: Mon, 30 Jan 2023 13:53:22 -0600 Subject: [PATCH] Only declare providing the bundled libbpf if we're vendoring - restore deleting the bundled libbpf if defaulting to novendor Signed-off-by: Michel Alexandre Salim --- rust-libbpf-sys.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rust-libbpf-sys.spec b/rust-libbpf-sys.spec index 897ccbc..7bfb87d 100644 --- a/rust-libbpf-sys.spec +++ b/rust-libbpf-sys.spec @@ -30,8 +30,10 @@ Patch101: libbpf-sys-default-to-novendor.diff BuildRequires: rust-packaging >= 21 +%if %{without novendor} # the system libbpf is too old, use the bundled copy Provides: bundled(libbpf) = 1.0.1 +%endif %global _description %{expand: Rust bindings to libbpf from the Linux kernel.} @@ -113,6 +115,7 @@ use the "static" feature of the "%{crate}" crate. %autopatch -p1 -M 100 %if %{with novendor} %autopatch -p1 -m 101 +rm -rf libbpf %endif %cargo_prep