|
|
@ -1,35 +1,28 @@
|
|
|
|
# Generated by rust2rpm 23
|
|
|
|
# Generated by rust2rpm 24
|
|
|
|
%bcond_without check
|
|
|
|
%bcond_without check
|
|
|
|
%global debug_package %{nil}
|
|
|
|
%global debug_package %{nil}
|
|
|
|
|
|
|
|
|
|
|
|
%global crate libbpf-sys
|
|
|
|
%global crate libbpf-sys
|
|
|
|
%global upstream_version 1.0.4+v1.0.1
|
|
|
|
%global libbpf_version 1.2.0
|
|
|
|
|
|
|
|
|
|
|
|
# default to vendored libbpf
|
|
|
|
|
|
|
|
# otherwise we have to keep reasoning about if the system libbpf is new enough
|
|
|
|
|
|
|
|
%bcond_with novendor
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Name: rust-libbpf-sys
|
|
|
|
Name: rust-libbpf-sys
|
|
|
|
Version: 1.0.4
|
|
|
|
Version: 1.2.1
|
|
|
|
Release: %autorelease
|
|
|
|
Release: %autorelease
|
|
|
|
Summary: Rust bindings to libbpf from the Linux kernel
|
|
|
|
Summary: Rust bindings to libbpf from the Linux kernel
|
|
|
|
|
|
|
|
|
|
|
|
License: BSD-2-Clause
|
|
|
|
License: BSD-2-Clause
|
|
|
|
URL: https://crates.io/crates/libbpf-sys
|
|
|
|
URL: https://crates.io/crates/libbpf-sys
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%global upstream_version %{version}+v%{libbpf_version}
|
|
|
|
|
|
|
|
|
|
|
|
Source: %{crates_source %{crate} %{upstream_version}}
|
|
|
|
Source: %{crates_source %{crate} %{upstream_version}}
|
|
|
|
# Manually created patch for downstream crate metadata changes
|
|
|
|
# Manually created patch for downstream crate metadata changes
|
|
|
|
# * remove version suffix from crate version
|
|
|
|
# * remove version suffix from crate version
|
|
|
|
# * bump bindgen to 0.63
|
|
|
|
# * downgrade bindgen to 0.63
|
|
|
|
Patch: libbpf-sys-fix-metadata.diff
|
|
|
|
Patch: libbpf-sys-fix-metadata.diff
|
|
|
|
# Conditional patch for defaulting to novendor
|
|
|
|
|
|
|
|
Patch101: libbpf-sys-default-to-novendor.diff
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BuildRequires: rust-packaging >= 21
|
|
|
|
BuildRequires: rust-packaging >= 21
|
|
|
|
|
|
|
|
Provides: bundled(libbpf) = %{libbpf_version}
|
|
|
|
%if %{without novendor}
|
|
|
|
|
|
|
|
# the system libbpf is too old, use the bundled copy
|
|
|
|
|
|
|
|
Provides: bundled(libbpf) = 1.0.1
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%global _description %{expand:
|
|
|
|
%global _description %{expand:
|
|
|
|
Rust bindings to libbpf from the Linux kernel.}
|
|
|
|
Rust bindings to libbpf from the Linux kernel.}
|
|
|
@ -41,9 +34,6 @@ Summary: %{summary}
|
|
|
|
BuildArch: noarch
|
|
|
|
BuildArch: noarch
|
|
|
|
Requires: elfutils-libelf-devel
|
|
|
|
Requires: elfutils-libelf-devel
|
|
|
|
Requires: kernel-headers
|
|
|
|
Requires: kernel-headers
|
|
|
|
%if %{with novendor}
|
|
|
|
|
|
|
|
Requires: libbpf-devel
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
Requires: zlib-devel
|
|
|
|
Requires: zlib-devel
|
|
|
|
|
|
|
|
|
|
|
|
%description devel %{_description}
|
|
|
|
%description devel %{_description}
|
|
|
@ -53,6 +43,9 @@ use the "%{crate}" crate.
|
|
|
|
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
%files devel
|
|
|
|
%license %{crate_instdir}/LICENSE
|
|
|
|
%license %{crate_instdir}/LICENSE
|
|
|
|
|
|
|
|
%license %{crate_instdir}/libbpf/LICENSE
|
|
|
|
|
|
|
|
%license %{crate_instdir}/libbpf/LICENSE.BSD-2-Clause
|
|
|
|
|
|
|
|
%license %{crate_instdir}/libbpf/LICENSE.LGPL-2.1
|
|
|
|
%doc %{crate_instdir}/README.md
|
|
|
|
%doc %{crate_instdir}/README.md
|
|
|
|
%{crate_instdir}/
|
|
|
|
%{crate_instdir}/
|
|
|
|
|
|
|
|
|
|
|
@ -80,7 +73,6 @@ use the "bindgen" feature of the "%{crate}" crate.
|
|
|
|
%files -n %{name}+bindgen-devel
|
|
|
|
%files -n %{name}+bindgen-devel
|
|
|
|
%ghost %{crate_instdir}/Cargo.toml
|
|
|
|
%ghost %{crate_instdir}/Cargo.toml
|
|
|
|
|
|
|
|
|
|
|
|
%if %{with novendor}
|
|
|
|
|
|
|
|
%package -n %{name}+novendor-devel
|
|
|
|
%package -n %{name}+novendor-devel
|
|
|
|
Summary: %{summary}
|
|
|
|
Summary: %{summary}
|
|
|
|
BuildArch: noarch
|
|
|
|
BuildArch: noarch
|
|
|
@ -92,7 +84,6 @@ use the "novendor" feature of the "%{crate}" crate.
|
|
|
|
|
|
|
|
|
|
|
|
%files -n %{name}+novendor-devel
|
|
|
|
%files -n %{name}+novendor-devel
|
|
|
|
%ghost %{crate_instdir}/Cargo.toml
|
|
|
|
%ghost %{crate_instdir}/Cargo.toml
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%package -n %{name}+static-devel
|
|
|
|
%package -n %{name}+static-devel
|
|
|
|
Summary: %{summary}
|
|
|
|
Summary: %{summary}
|
|
|
@ -106,22 +97,28 @@ use the "static" feature of the "%{crate}" crate.
|
|
|
|
%files -n %{name}+static-devel
|
|
|
|
%files -n %{name}+static-devel
|
|
|
|
%ghost %{crate_instdir}/Cargo.toml
|
|
|
|
%ghost %{crate_instdir}/Cargo.toml
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%package -n %{name}+vendored-devel
|
|
|
|
|
|
|
|
Summary: %{summary}
|
|
|
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%description -n %{name}+vendored-devel %{_description}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This package contains library source intended for building other packages which
|
|
|
|
|
|
|
|
use the "vendored" feature of the "%{crate}" crate.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%files -n %{name}+vendored-devel
|
|
|
|
|
|
|
|
%ghost %{crate_instdir}/Cargo.toml
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%prep
|
|
|
|
%autosetup -n %{crate}-%{upstream_version} -N
|
|
|
|
%autosetup -n %{crate}-%{upstream_version} -p1
|
|
|
|
%autopatch -p1 -M 100
|
|
|
|
# these should use system libs
|
|
|
|
%if %{with novendor}
|
|
|
|
rm -rf elfutils zlib
|
|
|
|
%autopatch -p1 -m 101
|
|
|
|
|
|
|
|
rm -rf libbpf
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%cargo_prep
|
|
|
|
%cargo_prep
|
|
|
|
|
|
|
|
|
|
|
|
%generate_buildrequires
|
|
|
|
%generate_buildrequires
|
|
|
|
%cargo_generate_buildrequires
|
|
|
|
%cargo_generate_buildrequires
|
|
|
|
echo 'elfutils-libelf-devel'
|
|
|
|
echo 'elfutils-libelf-devel'
|
|
|
|
echo 'kernel-headers'
|
|
|
|
echo 'kernel-headers'
|
|
|
|
%if %{with novendor}
|
|
|
|
|
|
|
|
echo 'libbpf-devel'
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
echo 'zlib-devel'
|
|
|
|
echo 'zlib-devel'
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
%build
|
|
|
|