Use vendored dependencies in RHEL builds

RHEL does not package individual rust crate dependencies.  Instead,
rust-based packages must vendor these, and use the RHEL macros to
build them.
This commit is contained in:
Yaakov Selkowitz 2023-10-23 20:45:57 -04:00
parent 3b4ba770c1
commit 535cc10766
3 changed files with 23 additions and 1 deletions

1
.gitignore vendored
View File

@ -6,3 +6,4 @@ src_vipa-2.0.4.tar.gz
/src_vipa-2.1.0.tar.gz
/s390-tools-*.tar.bz2
/s390-tools-*.tar.gz
/s390-tools-*-rust-vendor.tar.xz

View File

@ -16,13 +16,18 @@
Name: s390utils
Summary: Utilities and daemons for IBM z Systems
Version: 2.29.0
Release: 2%{?dist}
Release: 3%{?dist}
Epoch: 2
# MIT covers nearly all the files, except init files
License: MIT AND LGPL-2.1-or-later
ExclusiveArch: s390 s390x
URL: https://github.com/ibm-s390-linux/s390-tools
Source0: https://github.com/ibm-s390-linux/s390-tools/archive/v%{version}.tar.gz#/s390-tools-%{version}.tar.gz
# To create the vendor tarball:
# tar xf s390-tools-%%{version}.tar.gz ; pushd s390-tools-%%{version}/rust/pvsecret ; \
# rm -f Cargo.lock && cargo vendor && \
# tar Jvcf ../../../s390-tools-%%{version}-rust-vendor.tar.xz vendor/ ; popd
Source1: s390-tools-%{version}-rust-vendor.tar.xz
Source5: https://fedorapeople.org/cgit/sharkcz/public_git/utils.git/tree/zfcpconf.sh
Source7: https://fedorapeople.org/cgit/sharkcz/public_git/utils.git/tree/zfcp.udev
Source12: https://fedorapeople.org/cgit/sharkcz/public_git/utils.git/tree/dasd.udev
@ -60,6 +65,11 @@ Requires: s390utils-ziomon = %{epoch}:%{version}-%{release}
BuildRequires: make
BuildRequires: gcc-c++
%if %{with rust}
%if 0%{?rhel}
BuildRequires: libcurl-devel
BuildRequires: openssl-devel
BuildRequires: rust-toolset
%else
BuildRequires: crate(anstream)
BuildRequires: crate(anstyle-query)
BuildRequires: crate(anyhow)
@ -84,6 +94,7 @@ BuildRequires: crate(thiserror)
BuildRequires: crate(zerocopy)
BuildRequires: rust-packaging
%endif
%endif
%description
This is a meta package for installing the default s390-tools sub packages.
@ -104,7 +115,13 @@ be used together with the zSeries (s390) Linux kernel and device drivers.
# upstream fixes/updates
#%%patch 100 -p1
%if %{with rust}
%if 0%{?rhel}
pushd rust
%cargo_prep -V 1
popd
%else
%cargo_prep
%endif
rm -rf ./rust/pvsecret/Cargo.lock
%endif
@ -952,6 +969,9 @@ User-space development files for the s390/s390x architecture.
%changelog
* Mon Oct 23 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 2:2.29.0-3
- Use vendored dependencies in RHEL builds
* Thu Aug 31 2023 Jakub Čajka <jcajka[at]redhat.com> - 2:2.29.0-2
- enable rust based tools

View File

@ -1 +1,2 @@
SHA512 (s390-tools-2.29.0.tar.gz) = 3eeaab0e0c6559b9fb0b4c7cca49358a7cc7fe0cb11684d2d761fe105cc2bfd791d33ecc2070e3dfd877039b68e868699cd3cea318e64aee1cc0f348c7b41617
SHA512 (s390-tools-2.29.0-rust-vendor.tar.xz) = 7ee717c5848e7b59c3e11ef6b461122e5f1195e67d11e378352b297926b498180222bfc23719d952fb11677a3fd440d299e0035ca6ab0c6d784573e9a5698594