Signed-off-by: Michel Lind <salimma@fedoraproject.org>epel9 imports/e9/rust-libbpf-rs0.21-0.21.2-1.el9
parent
7c360357b3
commit
ad749c539f
@ -0,0 +1 @@
|
|||||||
|
/libbpf-rs-0.21.2.crate
|
@ -0,0 +1,13 @@
|
|||||||
|
--- a/Cargo.toml
|
||||||
|
+++ b/Cargo.toml
|
||||||
|
@@ -78,8 +78,8 @@ version = "0.1.1"
|
||||||
|
[dev-dependencies.plain]
|
||||||
|
version = "0.2.3"
|
||||||
|
|
||||||
|
-[dev-dependencies.probe]
|
||||||
|
-version = "0.3"
|
||||||
|
+[target."cfg(any(target_arch = \"x86\", target_arch = \"x86_64\", target_arch = \"aarch64\"))".dev-dependencies.probe]
|
||||||
|
+version = "0.5"
|
||||||
|
|
||||||
|
[dev-dependencies.scopeguard]
|
||||||
|
version = "1.1"
|
@ -0,0 +1,26 @@
|
|||||||
|
--- a/tests/test.rs
|
||||||
|
+++ b/tests/test.rs
|
||||||
|
@@ -17,6 +17,7 @@ use std::time::Duration;
|
||||||
|
use nix::errno;
|
||||||
|
use nix::unistd::close;
|
||||||
|
use plain::Plain;
|
||||||
|
+#[cfg(any(target_arch = "x86", target_arch = "x86_64", target_arch = "aarch64"))]
|
||||||
|
use probe::probe;
|
||||||
|
use scopeguard::defer;
|
||||||
|
use std::ptr;
|
||||||
|
@@ -1136,6 +1137,7 @@ fn test_sudo_object_map_handle_clone() {
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
+#[cfg(any(target_arch = "x86", target_arch = "x86_64", target_arch = "aarch64"))]
|
||||||
|
fn test_sudo_object_usdt() {
|
||||||
|
bump_rlimit_mlock();
|
||||||
|
|
||||||
|
@@ -1165,6 +1167,7 @@ fn test_sudo_object_usdt() {
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
+#[cfg(any(target_arch = "x86", target_arch = "x86_64", target_arch = "aarch64"))]
|
||||||
|
fn test_sudo_object_usdt_cookie() {
|
||||||
|
bump_rlimit_mlock();
|
||||||
|
|
@ -0,0 +1,105 @@
|
|||||||
|
# Generated by rust2rpm 25
|
||||||
|
%bcond_without check
|
||||||
|
%global debug_package %{nil}
|
||||||
|
|
||||||
|
%global crate libbpf-rs
|
||||||
|
|
||||||
|
Name: rust-libbpf-rs0.21
|
||||||
|
Version: 0.21.2
|
||||||
|
Release: %autorelease
|
||||||
|
Summary: Safe, idiomatic, and opinionated wrapper around libbpf-sys
|
||||||
|
|
||||||
|
License: LGPL-2.1-only OR BSD-2-Clause
|
||||||
|
URL: https://crates.io/crates/libbpf-rs
|
||||||
|
Source: %{crates_source}
|
||||||
|
# Manually created patch for downstream crate metadata changes
|
||||||
|
# * bump probe dependency to 0.5
|
||||||
|
# * only depend on probe on architectures that support inline assembly
|
||||||
|
Patch: libbpf-rs-fix-metadata.diff
|
||||||
|
# * restrict probe tests to architectures that support inline assembly
|
||||||
|
Patch: libbpf-rs-restrict-probe-arches.diff
|
||||||
|
|
||||||
|
BuildRequires: cargo-rpm-macros >= 24
|
||||||
|
|
||||||
|
%global _description %{expand:
|
||||||
|
Libbpf-rs is a safe, idiomatic, and opinionated wrapper around libbpf-
|
||||||
|
sys.}
|
||||||
|
|
||||||
|
%description %{_description}
|
||||||
|
|
||||||
|
%package devel
|
||||||
|
Summary: %{summary}
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%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
|
||||||
|
|
||||||
|
%package -n %{name}+static-devel
|
||||||
|
Summary: %{summary}
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description -n %{name}+static-devel %{_description}
|
||||||
|
|
||||||
|
This package contains library source intended for building other packages which
|
||||||
|
use the "static" feature of the "%{crate}" crate.
|
||||||
|
|
||||||
|
%files -n %{name}+static-devel
|
||||||
|
%ghost %{crate_instdir}/Cargo.toml
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -n %{crate}-%{version} -p1
|
||||||
|
%cargo_prep
|
||||||
|
|
||||||
|
%generate_buildrequires
|
||||||
|
%cargo_generate_buildrequires
|
||||||
|
|
||||||
|
%build
|
||||||
|
%cargo_build
|
||||||
|
|
||||||
|
%install
|
||||||
|
%cargo_install
|
||||||
|
|
||||||
|
%if %{with check}
|
||||||
|
%check
|
||||||
|
# most of these tests fail, RLIMIT_MEMLOCK does not work in mock
|
||||||
|
rm tests/test.rs
|
||||||
|
rm tests/test_tc.rs
|
||||||
|
%cargo_test
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
%autochangelog
|
Loading…
Reference in new issue