import rust-libbpf-cargo0.21-0.21.2-2.el9

i9ce changed/i9ce/rust-libbpf-cargo0.21-0.21.2-2.el9
Arkady L. Shane 1 year ago
commit dfd49ee464
Signed by: tigro
GPG Key ID: 1EC08A25C9DB2503

Binary file not shown.

@ -0,0 +1,18 @@
--- a/src/test.rs
+++ b/src/test.rs
@@ -108,14 +108,7 @@ fn validate_bpf_o(path: &Path) {
/// 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 libbpf-cargo directory")
- .join("libbpf-rs")
+ Path::new("/usr/share/cargo/registry/libbpf-rs-0.21.2")
.canonicalize()
.expect("failed to canonicalize libbpf-rs")
}

@ -0,0 +1,17 @@
--- libbpf-cargo-0.21.2/Cargo.toml 1970-01-01T00:00:01+00:00
+++ libbpf-cargo-0.21.2/Cargo.toml 2023-12-29T20:36:11.240361+00:00
@@ -30,12 +30,10 @@
license = "LGPL-2.1-only OR BSD-2-Clause"
repository = "https://github.com/libbpf/libbpf-rs"
+autobins = false
+
[lib]
path = "src/lib.rs"
-
-[[bin]]
-name = "cargo-libbpf"
-path = "src/main.rs"
[dependencies.anyhow]
version = "1.0.1"

@ -0,0 +1,110 @@
## START: Set by rpmautospec
## (rpmautospec version 0.3.5)
## RPMAUTOSPEC: autorelease, autochangelog
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
release_number = 2;
base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
print(release_number + base_release_number - 1);
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
## END: Set by rpmautospec
# Generated by rust2rpm 25
%bcond_without check
%global debug_package %{nil}
%global crate libbpf-cargo
Name: rust-libbpf-cargo0.21
Version: 0.21.2
Release: %autorelease
Summary: Cargo plugin to build bpf programs
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
# * disable bin - compat crate
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
BuildRequires: cargo-rpm-macros >= 24
%global _description %{expand:
Cargo plugin to build bpf programs.}
%description %{_description}
%package devel
Summary: %{summary}
BuildArch: noarch
Requires: clang
Requires: rustfmt
%description devel %{_description}
This package contains library source intended for building other packages which
use the "%{crate}" crate.
%files devel
%license %{crate_instdir}/LICENSE
%license %{crate_instdir}/LICENSE.BSD-2-Clause
%license %{crate_instdir}/LICENSE.LGPL-2.1
%doc %{crate_instdir}/CHANGELOG.md
%doc %{crate_instdir}/README.md
%{crate_instdir}/
%package -n %{name}+default-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+default-devel %{_description}
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 %{crate_instdir}/Cargo.toml
%package -n %{name}+novendor-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+novendor-devel %{_description}
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 %{crate_instdir}/Cargo.toml
%prep
%autosetup -n %{crate}-%{version} -p1
%cargo_prep
%generate_buildrequires
%cargo_generate_buildrequires
echo 'clang'
echo 'rustfmt'
%build
%cargo_build
%install
%cargo_install
%if %{with check}
%check
%cargo_test
%endif
%changelog
* Mon Jan 15 2024 Arkady L. Shane <tigro@msvsphere-os.ru> - 0.21.2-2
- Rebuilt for MSVSphere 9.3
* Fri Dec 29 2023 Michel Lind <salimma@fedoraproject.org> - 0.21.2-2
- Disable bin, this is a compat crate
* Fri Dec 29 2023 Michel Lind <salimma@fedoraproject.org> - 0.21.2-1
- Initial package
Loading…
Cancel
Save