Update to 0.21.2

Signed-off-by: Michel Alexandre Salim <salimma@fedoraproject.org>
epel9
Michel Alexandre Salim 2 years ago
parent 21cde05f68
commit 4f7cd69ab8
No known key found for this signature in database
GPG Key ID: 8B229D2F7CCC04F2

1
.gitignore vendored

@ -1,3 +1,4 @@
/libbpf-cargo-0.9.3.crate
/libbpf-cargo-0.10.0.crate
/libbpf-cargo-0.13.1.crate
/libbpf-cargo-0.21.2.crate

@ -1,10 +0,0 @@
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -76,6 +76,7 @@ version = "1.0"
version = "0.5"
[features]
+default = ["novendor"]
novendor = ["libbpf-sys/novendor"]
[badges.maintenance]
status = "actively-developed"

@ -1,15 +1,18 @@
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");
@@ -108,14 +108,7 @@ fn validate_bpf_o(path: &Path) {
- Path::new(&cwd)
/// Returns the path to the local libbpf-rs
fn get_libbpf_rs_path() -> PathBuf {
- // The `CARGO_MANIFEST_DIR` environment variable points to the
- // libbpf-cargo directory, at build time.
- let libcargo_dir = env!("CARGO_MANIFEST_DIR");
-
- Path::new(&libcargo_dir)
- .parent()
- .expect("failed to get parent of cwd")
- .expect("failed to get parent of libbpf-cargo directory")
- .join("libbpf-rs")
+ Path::new("/usr/share/cargo/registry/libbpf-rs-0.19.1")
+ Path::new("/usr/share/cargo/registry/libbpf-rs-0.21.2")
.canonicalize()
.expect("failed to canonicalize libbpf-rs")
}

@ -1,20 +0,0 @@
--- libbpf-cargo-0.13.1/Cargo.toml 1970-01-01T00:00:01+00:00
+++ libbpf-cargo-0.13.1/Cargo.toml 2023-01-30T20:36:09.129229+00:00
@@ -32,7 +32,7 @@
version = "1.0"
[dependencies.cargo_metadata]
-version = "0.14"
+version = "0.15"
[dependencies.clap]
version = "3.1"
@@ -73,7 +73,7 @@
[dependencies.thiserror]
version = "1.0"
[dev-dependencies.goblin]
-version = "0.4"
+version = "0.5"
[features]
novendor = ["libbpf-sys/novendor"]

@ -1,29 +1,19 @@
# Generated by rust2rpm 23
# Generated by rust2rpm 24
%bcond_without check
%global crate libbpf-cargo
# default to vendored libbpf
# otherwise we have to keep reasoning about if the system libbpf is new enough
%bcond_with novendor
Name: rust-libbpf-cargo
Version: 0.13.1
Version: 0.21.2
Release: %autorelease
Summary: Cargo plugin to build bpf programs
License: LGPL-2.1 OR BSD-2-Clause
License: LGPL-2.1-only OR BSD-2-Clause
URL: https://crates.io/crates/libbpf-cargo
Source: %{crates_source}
# Manually created patch for downstream crate metadata changes
# - bump cargo_metadata to 0.15
# - bump goblin to 0.5
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
# Conditional patch for defaulting to novendor
Patch101: libbpf-cargo-default-to-novendor.diff
BuildRequires: rust-packaging >= 21
@ -40,7 +30,8 @@ Summary: %{summary}
%files -n %{crate}
%license LICENSE
%license LICENSE.BSD-2-Clause
%license LICENSE.LPGL-2.1
%license LICENSE.LGPL-2.1
%doc CHANGELOG.md
%doc README.md
%{_bindir}/cargo-libbpf
@ -58,7 +49,8 @@ use the "%{crate}" crate.
%files devel
%license %{crate_instdir}/LICENSE
%license %{crate_instdir}/LICENSE.BSD-2-Clause
%license %{crate_instdir}/LICENSE.LPGL-2.1
%license %{crate_instdir}/LICENSE.LGPL-2.1
%doc %{crate_instdir}/CHANGELOG.md
%doc %{crate_instdir}/README.md
%{crate_instdir}/
@ -74,7 +66,6 @@ use the "default" feature of the "%{crate}" crate.
%files -n %{name}+default-devel
%ghost %{crate_instdir}/Cargo.toml
%if %{with novendor}
%package -n %{name}+novendor-devel
Summary: %{summary}
BuildArch: noarch
@ -86,22 +77,14 @@ use the "novendor" feature of the "%{crate}" crate.
%files -n %{name}+novendor-devel
%ghost %{crate_instdir}/Cargo.toml
%endif
%prep
%autosetup -n %{crate}-%{version_no_tilde} -N
%autopatch -p1 -M 100
%if %{with novendor}
%autopatch -p1 -m 101
%endif
%autosetup -n %{crate}-%{version_no_tilde} -p1
%cargo_prep
%generate_buildrequires
%cargo_generate_buildrequires
echo 'clang'
# 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

@ -1 +1 @@
SHA512 (libbpf-cargo-0.13.1.crate) = 5c43b2d751f9d73100db2659c0f9693bf86ce06d84cda285c75f436a46116756bbbd338c795dfdb235f9081e8f1ced237d007fbbb8f50ecdadc9485ccbf85040
SHA512 (libbpf-cargo-0.21.2.crate) = 8cc6e1e9f159fdc619621fe21960d6c634a978b14a203fdbad5b8615e31e871f68f85ad43521625235bf312f03804de633d7d45d0056b58288e612d6794f5db3

Loading…
Cancel
Save