diff --git a/.gitignore b/.gitignore index f457728..8413d37 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /libbpf-sys-1.0.4+v1.0.1.crate +/libbpf-sys-1.2.1+v1.2.0.crate diff --git a/libbpf-sys-fix-metadata.diff b/libbpf-sys-fix-metadata.diff index daea48d..3c14ee8 100644 --- a/libbpf-sys-fix-metadata.diff +++ b/libbpf-sys-fix-metadata.diff @@ -1,19 +1,19 @@ ---- libbpf-sys-1.0.4+v1.0.1/Cargo.toml 1970-01-01T00:00:01+00:00 -+++ libbpf-sys-1.0.4+v1.0.1/Cargo.toml 2023-01-19T04:19:55.090748+00:00 +--- 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.0.4+v1.0.1" -+version = "1.0.4" +-version = "1.2.1+v1.2.0" ++version = "1.2.1" authors = [ "Alex Forster ", "Dan Siemon ", -@@ -38,7 +38,7 @@ +@@ -43,7 +43,7 @@ ] [build-dependencies.bindgen] --version = "^0.60" +-version = "^0.66" +version = "^0.63" optional = true diff --git a/rust-libbpf-sys.spec b/rust-libbpf-sys.spec index 33fc6d3..42cc7c2 100644 --- a/rust-libbpf-sys.spec +++ b/rust-libbpf-sys.spec @@ -1,35 +1,28 @@ -# Generated by rust2rpm 23 +# Generated by rust2rpm 24 %bcond_without check %global debug_package %{nil} %global crate libbpf-sys -%global upstream_version 1.0.4+v1.0.1 - -# default to vendored libbpf -# otherwise we have to keep reasoning about if the system libbpf is new enough -%bcond_with novendor +%global libbpf_version 1.2.0 Name: rust-libbpf-sys -Version: 1.0.4 +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 -# * bump bindgen to 0.63 +# * downgrade bindgen to 0.63 Patch: libbpf-sys-fix-metadata.diff -# Conditional patch for defaulting to novendor -Patch101: libbpf-sys-default-to-novendor.diff BuildRequires: rust-packaging >= 21 - -%if %{without novendor} -# the system libbpf is too old, use the bundled copy -Provides: bundled(libbpf) = 1.0.1 -%endif +Provides: bundled(libbpf) = %{libbpf_version} %global _description %{expand: Rust bindings to libbpf from the Linux kernel.} @@ -41,9 +34,6 @@ Summary: %{summary} BuildArch: noarch Requires: elfutils-libelf-devel Requires: kernel-headers -%if %{with novendor} -Requires: libbpf-devel -%endif Requires: zlib-devel %description devel %{_description} @@ -53,6 +43,9 @@ 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}/ @@ -80,7 +73,6 @@ use the "bindgen" feature of the "%{crate}" crate. %files -n %{name}+bindgen-devel %ghost %{crate_instdir}/Cargo.toml -%if %{with novendor} %package -n %{name}+novendor-devel Summary: %{summary} BuildArch: noarch @@ -92,7 +84,6 @@ use the "novendor" feature of the "%{crate}" crate. %files -n %{name}+novendor-devel %ghost %{crate_instdir}/Cargo.toml -%endif %package -n %{name}+static-devel Summary: %{summary} @@ -106,22 +97,28 @@ 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} -N -%autopatch -p1 -M 100 -%if %{with novendor} -%autopatch -p1 -m 101 -rm -rf libbpf -%endif +%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' -%if %{with novendor} -echo 'libbpf-devel' -%endif echo 'zlib-devel' %build diff --git a/rust2rpm.conf b/rust2rpm.conf index 83ba2b0..4e04e54 100644 --- a/rust2rpm.conf +++ b/rust2rpm.conf @@ -2,10 +2,8 @@ buildrequires = elfutils-libelf-devel kernel-headers - libbpf-devel zlib-devel lib.requires = elfutils-libelf-devel kernel-headers - libbpf-devel zlib-devel diff --git a/sources b/sources index 79bf73b..ad5ab22 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libbpf-sys-1.0.4+v1.0.1.crate) = 9a8ac5eb85afcd6bd51f2992c73a4f5dd08fbab995a958929d058f35555112a8832665e749a00729da766e8364d442e3ad32064c0a526ee5da778eb25206319f +SHA512 (libbpf-sys-1.2.1+v1.2.0.crate) = 0a9e49c7d752440ca78496bfbc10a1084189b1125b9115e334f486afc22f2d5594d3eaf6f92d48fa54c69128614260a4e9cdc22b1ae53841bd745a4f227d8039