Use patch macro for serde_derive patch

Signed-off-by: Bryan Gurney <bgurney@redhat.com>
This commit is contained in:
Bryan Gurney 2023-07-31 16:17:09 -04:00
parent 928d848180
commit 741e48dc05

View File

@ -5,7 +5,7 @@
Name: stratisd
Version: 3.5.8
Release: 3%{?dist}
Release: 4%{?dist}
Summary: Daemon that manages block devices to create filesystems
License: (MIT OR Apache-2.0) AND Unicode-DFS-2016 AND Apache-2.0 AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND MIT AND MPL-2.0 AND (Unlicense OR MIT)
@ -14,6 +14,7 @@ Source0: %{url}/archive/stratisd-v%{version}/%{name}-%{version}.tar.gz
Source1: %{url}/releases/download/stratisd-v%{version}/%{name}-%{version}-vendor.tar.gz
Source2: %{crates_source}
Patch0: vendor-serde_derive.patch
ExclusiveArch: %{rust_arches}
%if 0%{?rhel}
@ -87,7 +88,7 @@ Requires: stratisd
# Rename SOURCE0's top-level directory because it starts with
# stratisd-stratisd-v. GitHub calculates the directory name from the repo name
# + the tag. Extract the upstream crate on top of the extracted GitHub release,
# overwriting changed files. The primary purpose of thie step is to ensure that
# overwriting changed files. The primary purpose of this step is to ensure that
# the Cargo.toml that is used in building is the one that is generated by
# cargo-publish and cargo-package, not the file with path dependencies that
# GitHub packs up. Tar the overwritten files back up again into a tar file
@ -108,7 +109,7 @@ tar --extract --file %{SOURCE1}
# Remove pre-compiled procedural macro, compile from source
rm ./vendor/serde_derive/serde_derive-x86_64-unknown-linux-gnu
patch -p1 ./vendor-serde_derive.patch
%patch0 -p1
# Rezip the tarfile
tar --create --gzip --file %{SOURCE1}.newfile ./vendor --remove-files
@ -206,6 +207,9 @@ a2x -f manpage docs/stratis-dumpmetadata.txt
%{_mandir}/man8/stratis-dumpmetadata.8*
%changelog
* Mon Jul 31 2023 Bryan Gurney <bgurney@redhat.com> - 3.5.8-4
- Use patch macro for serde_derive patch
* Fri Jul 28 2023 mulhern <amulhern@redhat.com> - 3.5.8-3
- Patch vendored tarfile to remove executable