From 9fb33d997ffc1d9639bf8c206262b38c6d69043b Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Mon, 7 Aug 2023 23:45:00 +0200 Subject: [PATCH] Regenerate with rust2rpm v24 --- README.md | 3 --- rust-rd-hashd.spec | 41 ++++++++++++++++------------------------ update-vendor-tarball.sh | 25 ------------------------ 3 files changed, 16 insertions(+), 53 deletions(-) delete mode 100644 README.md delete mode 100755 update-vendor-tarball.sh diff --git a/README.md b/README.md deleted file mode 100644 index a7bc4eb..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# rust-rd-hashd - -The rust-rd-hashd package diff --git a/rust-rd-hashd.spec b/rust-rd-hashd.spec index 6c5b68f..c3a256a 100644 --- a/rust-rd-hashd.spec +++ b/rust-rd-hashd.spec @@ -1,37 +1,20 @@ -# Generated by rust2rpm 18 +# Generated by rust2rpm 24 %bcond_without check -%global __cargo_skip_build 0 %global crate rd-hashd -%if 0%{?el8} -# el8 doesn't have these macros -%global __crates_url https://crates.io/api/v1/crates/ -%global crates_source %{__crates_url}%{crate}/%{version}/download#/%{crate}-%{version}.crate -%global version_no_tilde %{version} -%endif - -Name: rust-%{crate} +Name: rust-rd-hashd Version: 2.1.2 Release: %autorelease Summary: Latency-sensitive pseudo workload for resctl-demo -# Upstream license specification: Apache-2.0 -License: ASL 2.0 and BSD and MIT +License: Apache-2.0 URL: https://crates.io/crates/rd-hashd Source: %{crates_source} -# Vendored dependencies for EPEL, update with ./update-vendor-tarball.sh -Source1: %{crate}-%{version}-vendor.tar.gz # hashd: build fix for 32bit archs Patch0: https://github.com/facebookexperimental/resctl-demo/commit/dbe5735bdf005a24e54dd19559016a59f6f43536.patch -ExclusiveArch: %{rust_arches} - -%if 0%{?el8} -BuildRequires: rust-toolset -%else -BuildRequires: rust-packaging -%endif +BuildRequires: rust-packaging >= 23 %global _description %{expand: Latency-sensitive pseudo workload for resctl-demo.} @@ -40,27 +23,35 @@ Latency-sensitive pseudo workload for resctl-demo.} %package -n %{crate} Summary: %{summary} +# (MIT OR Apache-2.0) AND Unicode-DFS-2016 +# Apache-2.0 +# Apache-2.0 OR BSL-1.0 +# BSD-3-Clause +# MIT +# MIT OR Apache-2.0 +# Unlicense OR MIT +License: Apache-2.0 AND BSD-3-Clause AND MIT AND Unicode-DFS-2016 AND (Apache-2.0 OR BSL-1.0) AND (MIT OR Apache-2.0) AND (Unlicense OR MIT) +# LICENSE.dependencies contains a full license breakdown %description -n %{crate} %{_description} %files -n %{crate} %license LICENSE +%license LICENSE.dependencies %doc README.md %{_bindir}/rd-hashd %prep %autosetup -n %{crate}-%{version_no_tilde} -p2 -%if 0%{?el8} -%cargo_prep -V 1 -%else %cargo_prep %generate_buildrequires %cargo_generate_buildrequires -%endif %build %cargo_build +%{cargo_license_summary} +%{cargo_license} > LICENSE.dependencies %install %cargo_install diff --git a/update-vendor-tarball.sh b/update-vendor-tarball.sh deleted file mode 100755 index 90ed3ef..0000000 --- a/update-vendor-tarball.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh - -name='rd-hashd' -specfile="rust-${name}.spec" -version=$(rpm -q --qf '%{VERSION}\n' --specfile "$specfile" | head -1) -nv="${name}-${version}" -crate="${nv}.crate" -vendor_tarball="${nv}-vendor.tar.gz" - -if [ -f "$vendor_tarball" ]; then - echo "${vendor_tarball} already exists, aborting" - exit 1 -fi - -[ -f "$crate" ] || spectool -g "$specfile" -tardir="$PWD" -workdir=$(mktemp -d) -trap 'rm -rf "$workdir"' EXIT - -tar xvzf "$tardir/$crate" -C "$workdir" -(cd "${workdir}/${nv}" && \ - cargo vendor && \ - tar cvzf "${tardir}/${vendor_tarball}" vendor/) - -exit 0