commit 1f093cc20ada65e8a7bb33262672abed44a4cfbd Author: tigro Date: Mon Jan 15 21:44:02 2024 +0300 import rust-libbpf-sys-1.2.1-1.el9 diff --git a/.rust-libbpf-sys.metadata b/.rust-libbpf-sys.metadata new file mode 100644 index 0000000..e69de29 diff --git a/SOURCES/libbpf-sys-1.2.1+v1.2.0.crate b/SOURCES/libbpf-sys-1.2.1+v1.2.0.crate new file mode 100644 index 0000000..ecfdf68 Binary files /dev/null and b/SOURCES/libbpf-sys-1.2.1+v1.2.0.crate differ diff --git a/SOURCES/libbpf-sys-fix-metadata.diff b/SOURCES/libbpf-sys-fix-metadata.diff new file mode 100644 index 0000000..3c14ee8 --- /dev/null +++ b/SOURCES/libbpf-sys-fix-metadata.diff @@ -0,0 +1,20 @@ +--- libbpf-sys-1.2.1+v1.2.0/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ libbpf-sys-1.2.1+v1.2.0/Cargo.toml 2023-08-01T16:18:58.399707+00:00 +@@ -12,7 +12,7 @@ + [package] + edition = "2018" + name = "libbpf-sys" +-version = "1.2.1+v1.2.0" ++version = "1.2.1" + authors = [ + "Alex Forster ", + "Dan Siemon ", +@@ -43,7 +43,7 @@ + ] + + [build-dependencies.bindgen] +-version = "^0.66" ++version = "^0.63" + optional = true + + [build-dependencies.cc] diff --git a/SPECS/rust-libbpf-sys.spec b/SPECS/rust-libbpf-sys.spec new file mode 100644 index 0000000..d1c94ba --- /dev/null +++ b/SPECS/rust-libbpf-sys.spec @@ -0,0 +1,215 @@ +## START: Set by rpmautospec +## (rpmautospec version 0.3.5) +## RPMAUTOSPEC: autorelease, autochangelog +%define autorelease(e:s:pb:n) %{?-p:0.}%{lua: + release_number = 1; + 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 24 +%bcond_without check +%global debug_package %{nil} + +%global crate libbpf-sys +%global libbpf_version 1.2.0 + +Name: rust-libbpf-sys +Version: 1.2.1 +Release: %autorelease +Summary: Rust bindings to libbpf from the Linux kernel + +License: BSD-2-Clause +URL: https://crates.io/crates/libbpf-sys + +%global upstream_version %{version}+v%{libbpf_version} + +Source: %{crates_source %{crate} %{upstream_version}} +# Manually created patch for downstream crate metadata changes +# * remove version suffix from crate version +# * downgrade bindgen to 0.63 +Patch: libbpf-sys-fix-metadata.diff + +BuildRequires: rust-packaging >= 21 +Provides: bundled(libbpf) = %{libbpf_version} + +%global _description %{expand: +Rust bindings to libbpf from the Linux kernel.} + +%description %{_description} + +%package devel +Summary: %{summary} +BuildArch: noarch +Requires: elfutils-libelf-devel +Requires: kernel-headers +Requires: zlib-devel + +%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}/libbpf/LICENSE +%license %{crate_instdir}/libbpf/LICENSE.BSD-2-Clause +%license %{crate_instdir}/libbpf/LICENSE.LGPL-2.1 +%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}+bindgen-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+bindgen-devel %{_description} + +This package contains library source intended for building other packages which +use the "bindgen" feature of the "%{crate}" crate. + +%files -n %{name}+bindgen-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 + +%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 +%autosetup -n %{crate}-%{upstream_version} -p1 +# these should use system libs +rm -rf elfutils zlib +%cargo_prep + +%generate_buildrequires +%cargo_generate_buildrequires +echo 'elfutils-libelf-devel' +echo 'kernel-headers' +echo 'zlib-devel' + +%build +%cargo_build + +%install +%cargo_install + +%if %{with check} +%check +%cargo_test +%endif + +%changelog +* Mon Jan 15 2024 Arkady L. Shane - 1.2.1-1 +- Rebuilt for MSVSphere 9.3 + +* Wed Aug 02 2023 Michel Alexandre Salim - 1.2.1-1 +- Update to 1.2.1 + +* Thu Jul 27 2023 Michel Alexandre Salim - 1.0.4-8 +- Always use vendored libbpf for consistency + +* Fri Jul 21 2023 Fedora Release Engineering - 1.0.4-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Mon Jan 30 2023 Michel Alexandre Salim - 1.0.4-6 +- Only declare providing the bundled libbpf if we're vendoring +- restore deleting the bundled libbpf if defaulting to novendor + +* Mon Jan 30 2023 Michel Alexandre Salim - 1.0.4-5 +- Unify spec so novendor is toggled based on Fedora release version + +* Fri Jan 27 2023 Michel Alexandre Salim - 1.0.4-4 +- Switch back to vendored libbpf, as the system one is too old + +* Thu Jan 19 2023 Michel Alexandre Salim - 1.0.4-3 +- Fix FTI for bindgen feature by bumping the bindgen requirement to 0.63 + +* Fri Dec 09 2022 Michel Alexandre Salim - 1.0.4-2 +- Restore the removal of the bundled libbpf + +* Thu Dec 08 2022 Michel Alexandre Salim - 1.0.4-1 +- Update to 1.0.4 + +* Sat Jul 23 2022 Fedora Release Engineering - 0.6.1~2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Tue Feb 15 2022 Michel Alexandre Salim - 0.6.1~2-1 +- Update to 0.6.1~2 (resolves: rhbz#2028922) + +* Fri Jan 21 2022 Fedora Release Engineering - 0.5.0~2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Thu Nov 11 2021 Davide Cavalca - 0.5.0~2-1 +- Update to 0.5.0~2; Fixes: RHBZ#2012618 + +* Thu Oct 14 2021 Davide Cavalca - 0.5.0~1-1 +- Update to 0.5.0~1; Fixes: RHBZ#2012618 + +* Thu Jul 29 2021 Davide Cavalca - 0.4.0~2-1 +- Update to 0.4.0~2; Fixes: RHBZ#1980903 + +* Fri Jul 23 2021 Fedora Release Engineering - 0.4.0~1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Fri Jun 04 2021 Davide Cavalca - 0.4.0~1-1 +- Update to 0.4.0~1 + +* Mon May 10 2021 Davide Cavalca - 0.3.0~2-1 +- Update to 0.3.0~2 +- Drop redundant Requires for subpackages + +* Mon May 10 2021 Davide Cavalca - 0.3.0~1-3 +- Backport PR#18 and turn the novendor feature on by default + +* Sun May 09 2021 Davide Cavalca - 0.3.0~1-2 +- Install license +- Unbundle libbpf and use the system one instead +- Add missing Requires to devel subpackages + +* Fri May 07 2021 Davide Cavalca - 0.3.0~1-1 +- Initial package +