From cab0fce01664dc28b903c62c4cd2a31a69ab14f9 Mon Sep 17 00:00:00 2001 From: Michel Alexandre Salim Date: Thu, 8 Dec 2022 16:33:58 -0600 Subject: [PATCH] Update to 1.0.4 Signed-off-by: Michel Alexandre Salim --- .gitignore | 2 +- libbpf-sys-fix-metadata.diff | 19 +++++++--- rust-libbpf-sys.spec | 63 +++++++++++++++++++++++---------- .rust2rpm.conf => rust2rpm.conf | 0 sources | 2 +- 5 files changed, 60 insertions(+), 26 deletions(-) rename .rust2rpm.conf => rust2rpm.conf (100%) diff --git a/.gitignore b/.gitignore index a837eee..f457728 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/libbpf-sys-0.6.1-2.crate +/libbpf-sys-1.0.4+v1.0.1.crate diff --git a/libbpf-sys-fix-metadata.diff b/libbpf-sys-fix-metadata.diff index 2f61d64..2623ebb 100644 --- a/libbpf-sys-fix-metadata.diff +++ b/libbpf-sys-fix-metadata.diff @@ -1,10 +1,19 @@ ---- libbpf-sys-0.6.1-2/Cargo.toml 1970-01-01T00:00:01+00:00 -+++ libbpf-sys-0.6.1-2/Cargo.toml 2022-02-10T23:20:20.526559+00:00 -@@ -32,6 +32,7 @@ +--- 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 2022-12-08T22:58:56.104613+00:00 +@@ -12,7 +12,7 @@ + [package] + edition = "2018" + name = "libbpf-sys" +-version = "1.0.4+v1.0.1" ++version = "1.0.4" + authors = [ + "Alex Forster ", + "Dan Siemon ", +@@ -48,6 +48,7 @@ version = "0.3" [features] +default = ["novendor"] novendor = [] - [badges.maintenance] - status = "passively-maintained" + static = [] + diff --git a/rust-libbpf-sys.spec b/rust-libbpf-sys.spec index 0a3ad25..445f7e1 100644 --- a/rust-libbpf-sys.spec +++ b/rust-libbpf-sys.spec @@ -1,24 +1,24 @@ -# Generated by rust2rpm 20 +# Generated by rust2rpm 23 %bcond_without check %global debug_package %{nil} %global crate libbpf-sys +%global upstream_version 1.0.4+v1.0.1 -Name: rust-%{crate} -Version: 0.6.1~2 +Name: rust-libbpf-sys +Version: 1.0.4 Release: %autorelease Summary: Rust bindings to libbpf from the Linux kernel -# Upstream license specification: BSD-2-Clause -License: BSD +License: BSD-2-Clause URL: https://crates.io/crates/libbpf-sys -Source: %{crates_source} -# Turn on the novendor feature by default -Patch0: libbpf-sys-fix-metadata.diff +Source: %{crates_source %{crate} %{upstream_version}} +# Manually created patch for downstream crate metadata changes +# * remove version suffix from crate version +# * default to novendor +Patch: libbpf-sys-fix-metadata.diff -ExclusiveArch: %{rust_arches} - -BuildRequires: rust-packaging +BuildRequires: rust-packaging >= 21 %global _description %{expand: Rust bindings to libbpf from the Linux kernel.} @@ -39,9 +39,12 @@ This package contains library source intended for building other packages which use the "%{crate}" crate. %files devel -%license LICENSE -%doc README.md -%{cargo_registry}/%{crate}-%{version_no_tilde}/ +%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} @@ -53,7 +56,19 @@ 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 %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%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} @@ -65,12 +80,22 @@ 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 %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%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_no_tilde} -p1 -# Remove bundled libbpf -rm -r libbpf +%autosetup -n %{crate}-%{upstream_version} -p1 %cargo_prep %generate_buildrequires diff --git a/.rust2rpm.conf b/rust2rpm.conf similarity index 100% rename from .rust2rpm.conf rename to rust2rpm.conf diff --git a/sources b/sources index ed94907..79bf73b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libbpf-sys-0.6.1-2.crate) = ce5bc7341d576181ae4350c5516bb3d9d3f611e673ee6586c876380b62389007d0b9f225bc94f20550b4b96ae108ee281197cb9db67737e1432417aee6f0e809 +SHA512 (libbpf-sys-1.0.4+v1.0.1.crate) = 9a8ac5eb85afcd6bd51f2992c73a4f5dd08fbab995a958929d058f35555112a8832665e749a00729da766e8364d442e3ad32064c0a526ee5da778eb25206319f