Skip to content

Commit

Permalink
Use patch macro for serde_derive patch
Browse files Browse the repository at this point in the history
Signed-off-by: Bryan Gurney <[email protected]>
  • Loading branch information
bgurney-rh committed Aug 1, 2023
1 parent d28e7a3 commit 9abdcdc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mockbuild_test/stratisd.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 9abdcdc

Please sign in to comment.