Use vendored dependencies in RHEL builds
RHEL does not ship individual Rust dependency packages. However, upstream does provide vendor tarballs which simplifies this greatly.
This commit is contained in:
parent
5f064a251e
commit
4df7b79969
1
.gitignore
vendored
1
.gitignore
vendored
@ -8,3 +8,4 @@
|
||||
/mdevctl-1.0.0.crate
|
||||
/mdevctl-1.1.0.crate
|
||||
/mdevctl-1.2.0.crate
|
||||
/mdevctl-1.2.0-vendor.tar.gz
|
||||
|
12
mdevctl.spec
12
mdevctl.spec
@ -10,8 +10,14 @@ Summary: A mediated device management utility for Linux
|
||||
License: LGPLv2
|
||||
URL: https://crates.io/crates/mdevctl
|
||||
Source: %{crates_source}
|
||||
Source1: https://github.com/mdevctl/mdevctl/releases/download/v%{version}/mdevctl-%{version}-vendor.tar.gz
|
||||
|
||||
BuildRequires: make systemd rust-packaging python3-docutils
|
||||
BuildRequires: make systemd python3-docutils
|
||||
%if 0%{?rhel}
|
||||
BuildRequires: rust-toolset
|
||||
%else
|
||||
BuildRequires: rust-packaging >= 21
|
||||
%endif
|
||||
Requires(post,postun): %{_sbindir}/udevadm
|
||||
|
||||
%description
|
||||
@ -23,10 +29,14 @@ vfio-mdev for assignment to virtual machines.
|
||||
|
||||
%prep
|
||||
%autosetup -n %{crate}-%{version_no_tilde} -p1
|
||||
%if 0%{?rhel}
|
||||
%cargo_prep -V 1
|
||||
%else
|
||||
%cargo_prep
|
||||
|
||||
%generate_buildrequires
|
||||
%cargo_generate_buildrequires
|
||||
%endif
|
||||
|
||||
%build
|
||||
%cargo_build
|
||||
|
1
sources
1
sources
@ -1 +1,2 @@
|
||||
SHA512 (mdevctl-1.2.0.crate) = e4880842780d1f3e29da1671151a8415b2b19172bbc379804e4f12a8609b6455d7da68857f9cd77a9e0473024000e80914d3158c781c4291b4814455af254175
|
||||
SHA512 (mdevctl-1.2.0-vendor.tar.gz) = 752ad0fe393d2f466dda8da1aefb04f22f447ef288873cb350f0b1ae67f8caae49315be6ea413fd2cbdd89afc1889b8d8e082fe416c45dfa1a4613e0d05943c3
|
||||
|
Loading…
Reference in New Issue
Block a user