The package rpms/rust-libbpf-cargo.git has added or updated architecture specific content
in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/rust-libbpf-cargo.git/commit/?id=....
Change:
-ExclusiveArch: %{rust_arches}
Thanks.
Full change:
============
commit 69c05e5ed2f867d13f7e0832ca7a0f64c69b6d53
Author: Michel Alexandre Salim <salimma(a)fedoraproject.org>
Date: Fri Jan 27 12:52:55 2023 -0600
Remove unused patch
Signed-off-by: Michel Alexandre Salim <salimma(a)fedoraproject.org>
diff --git a/libbpf-cargo-downgrade-libbpf-sys.patch
b/libbpf-cargo-downgrade-libbpf-sys.patch
deleted file mode 100644
index c486c23..0000000
--- a/libbpf-cargo-downgrade-libbpf-sys.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Naur a/Cargo.toml b/Cargo.toml
---- a/Cargo.toml 2021-11-11 07:46:13.666336171 -0800
-+++ b/Cargo.toml 2021-11-11 07:46:29.139418018 -0800
-@@ -35,7 +35,7 @@
- version = "0.12"
-
- [dependencies.libbpf-sys]
--version = "0.5.0-2"
-+version = "0.4.0-2"
-
- [dependencies.memmap2]
- version = "0.3"
commit ee82f0c977ddac853b69d8d983e492795a4b8cd8
Author: Fedora Release Engineering <releng(a)fedoraproject.org>
Date: Fri Jan 20 23:42:09 2023 +0000
Rebuilt for
https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng(a)fedoraproject.org>
commit fdcfa65e0607c2330f690b4125fed881bcdef5c2
Author: Michel Alexandre Salim <salimma(a)fedoraproject.org>
Date: Tue Jan 17 15:49:50 2023 -0600
Update to 0.13.1
Signed-off-by: Michel Alexandre Salim <salimma(a)fedoraproject.org>
diff --git a/.gitignore b/.gitignore
index f691761..da329d3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
/libbpf-cargo-0.9.3.crate
/libbpf-cargo-0.10.0.crate
+/libbpf-cargo-0.13.1.crate
diff --git a/libbpf-cargo-fix-finding-libbpf-rs.diff
b/libbpf-cargo-fix-finding-libbpf-rs.diff
new file mode 100644
index 0000000..f49e617
--- /dev/null
+++ b/libbpf-cargo-fix-finding-libbpf-rs.diff
@@ -0,0 +1,15 @@
+Find libbpf-rs in /usr/share/cargo/registry, not in the local checkout
+--- a/src/test.rs
++++ b/src/test.rs
+@@ -103,10 +103,7 @@ fn validate_bpf_o(path: &Path) {
+ fn get_libbpf_rs_path() -> PathBuf {
+ let cwd = std::env::current_dir().expect("failed to get cwd");
+
+- Path::new(&cwd)
+- .parent()
+- .expect("failed to get parent of cwd")
+- .join("libbpf-rs")
++ Path::new("/usr/share/cargo/registry/libbpf-rs-0.19.1")
+ .canonicalize()
+ .expect("failed to canonicalize libbpf-rs")
+ }
diff --git a/libbpf-cargo-fix-finding-libbpf-rs.patch
b/libbpf-cargo-fix-finding-libbpf-rs.patch
deleted file mode 100644
index c1e2627..0000000
--- a/libbpf-cargo-fix-finding-libbpf-rs.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff '--color=auto' -ruN libbpf-cargo-0.10.0/src/test.rs
libbpf-cargo-0.10.0-fix-finding-libbpf-rs/src/test.rs
---- libbpf-cargo-0.10.0/src/test.rs 1973-11-29 13:33:09.000000000 -0800
-+++ libbpf-cargo-0.10.0-fix-finding-libbpf-rs/src/test.rs 2022-02-16 15:36:05.637528820
-0800
-@@ -102,10 +102,7 @@
- fn get_libbpf_rs_path() -> PathBuf {
- let cwd = std::env::current_dir().expect("failed to get cwd");
-
-- Path::new(&cwd)
-- .parent()
-- .expect("failed to get parent of cwd")
-- .join("libbpf-rs")
-+ Path::new("/usr/share/cargo/registry/libbpf-rs-0.16.0")
- .canonicalize()
- .expect("failed to canonicalize libbpf-rs")
- }
diff --git a/libbpf-cargo-fix-metadata.diff b/libbpf-cargo-fix-metadata.diff
index 2759ff9..9caee74 100644
--- a/libbpf-cargo-fix-metadata.diff
+++ b/libbpf-cargo-fix-metadata.diff
@@ -1,23 +1,19 @@
---- libbpf-cargo-0.10.0/Cargo.toml 1970-01-01T00:00:01+00:00
-+++ libbpf-cargo-0.10.0/Cargo.toml 2022-07-22T12:16:13.899028+00:00
-@@ -47,10 +47,10 @@
- version = "1.5"
-
- [dependencies.scroll]
--version = "0.10"
-+version = "0.11"
+--- libbpf-cargo-0.13.1/Cargo.toml 1970-01-01T00:00:01+00:00
++++ libbpf-cargo-0.13.1/Cargo.toml 2022-12-12T18:44:06.726590+00:00
+@@ -32,7 +32,7 @@
+ version = "1.0"
- [dependencies.scroll_derive]
--version = "0.10"
-+version = "0.11"
+ [dependencies.cargo_metadata]
+-version = "0.14"
++version = "0.15"
- [dependencies.semver]
- version = "1.0"
-@@ -71,9 +71,10 @@
+ [dependencies.clap]
+ version = "3.1"
+@@ -73,9 +73,10 @@
[dependencies.thiserror]
version = "1.0"
[dev-dependencies.goblin]
--version = "0.2"
+-version = "0.4"
+version = "0.5"
[features]
diff --git a/rust-libbpf-cargo.spec b/rust-libbpf-cargo.spec
index 36d0b6f..ebb6cc0 100644
--- a/rust-libbpf-cargo.spec
+++ b/rust-libbpf-cargo.spec
@@ -1,28 +1,26 @@
-# Generated by rust2rpm 20
+# Generated by rust2rpm 23
%bcond_without check
%global crate libbpf-cargo
-Name: rust-%{crate}
-Version: 0.10.0
+Name: rust-libbpf-cargo
+Version: 0.13.1
Release: %autorelease
Summary: Cargo plugin to build bpf programs
-# Upstream license specification: LGPL-2.1 OR BSD-2-Clause
-License: LGPLv2 or BSD
+License: LGPL-2.1 OR BSD-2-Clause
URL:
https://crates.io/crates/libbpf-cargo
Source: %{crates_source}
-# * turn on the novendor feature by default
-# * bump scroll and scroll_derive from 0.10 to 0.11,
-# * bump goblin from 0.2 to 0.5:
-#
https://github.com/libbpf/libbpf-rs/commit/56608e0
-Patch0: libbpf-cargo-fix-metadata.diff
-# Fix finding libbpf-rs
-Patch1: libbpf-cargo-fix-finding-libbpf-rs.patch
+# Manually created patch for downstream crate metadata changes
+# - bump cargo_metadata to 0.15
+# - bump goblin to 0.5
+# - use libbpf-sys/novendor by default
+Patch: libbpf-cargo-fix-metadata.diff
+# by default, test.rs expects libbpf-rs to be in the same checkout
+# fix to point to /usr/share/cargo/registry
+Patch: libbpf-cargo-fix-finding-libbpf-rs.diff
-ExclusiveArch: %{rust_arches}
-
-BuildRequires: rust-packaging
+BuildRequires: rust-packaging >= 21
%global _description %{expand:
Cargo plugin to build bpf programs.}
@@ -35,7 +33,9 @@ Summary: %{summary}
%description -n %{crate} %{_description}
%files -n %{crate}
-%license LICENSE LICENSE.BSD-2-Clause LICENSE.LPGL-2.1
+%license LICENSE
+%license LICENSE.BSD-2-Clause
+%license LICENSE.LPGL-2.1
%doc README.md
%{_bindir}/cargo-libbpf
@@ -51,9 +51,11 @@ This package contains library source intended for building other
packages which
use the "%{crate}" crate.
%files devel
-%license LICENSE LICENSE.BSD-2-Clause LICENSE.LPGL-2.1
-%doc README.md
-%{cargo_registry}/%{crate}-%{version_no_tilde}/
+%license %{crate_instdir}/LICENSE
+%license %{crate_instdir}/LICENSE.BSD-2-Clause
+%license %{crate_instdir}/LICENSE.LPGL-2.1
+%doc %{crate_instdir}/README.md
+%{crate_instdir}/
%package -n %{name}+default-devel
Summary: %{summary}
@@ -65,7 +67,7 @@ This package contains library source intended for building other
packages which
use the "default" feature of the "%{crate}" crate.
%files -n %{name}+default-devel
-%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
+%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+novendor-devel
Summary: %{summary}
@@ -77,25 +79,18 @@ This package contains library source intended for building other
packages which
use the "novendor" feature of the "%{crate}" crate.
%files -n %{name}+novendor-devel
-%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
+%ghost %{crate_instdir}/Cargo.toml
%prep
%autosetup -n %{crate}-%{version_no_tilde} -p1
-%if 0%{?fedora} < 36
-sed -i -e 's/version = "0.6.0-1"/version = "0.4.0-2"/'
Cargo.toml
-%else
-%if 0%{?fc36}
-sed -i -e 's/version = "0.6.0-1"/version = "0.5.0-2"/'
Cargo.toml
-%else
-sed -i -e 's/version = "0.6.0-1"/version = "0.6.1-2"/'
Cargo.toml
-%endif
-%endif
%cargo_prep
%generate_buildrequires
%cargo_generate_buildrequires
echo 'clang'
-echo 'rust-libbpf-rs-devel'
+# this was dropped from Cargo.toml upstream with the expectation that
+# libbpf-rs is built from the same Git checkout
+echo 'crate(libbpf-rs) = 0.19.1'
echo 'rustfmt'
%build
diff --git a/.rust2rpm.conf b/rust2rpm.conf
similarity index 100%
rename from .rust2rpm.conf
rename to rust2rpm.conf
diff --git a/sources b/sources
index d440e81..25b68f3 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (libbpf-cargo-0.10.0.crate) =
60533b247928b0d1c3d8136abedb1d0309d69bf96bf4b95a122082295a1da6af0ff73a44fd3498979990d002f33a1ff8152df46b58167c5278fc6ce4bdf5ac0c
+SHA512 (libbpf-cargo-0.13.1.crate) =
5c43b2d751f9d73100db2659c0f9693bf86ce06d84cda285c75f436a46116756bbbd338c795dfdb235f9081e8f1ced237d007fbbb8f50ecdadc9485ccbf85040