From 9abdcdcfa1500c3e0e03df84dab16f7d17162ea1 Mon Sep 17 00:00:00 2001 From: Bryan Gurney Date: Tue, 1 Aug 2023 10:51:01 -0400 Subject: [PATCH] Use patch macro for serde_derive patch Signed-off-by: Bryan Gurney --- mockbuild_test/stratisd.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mockbuild_test/stratisd.spec b/mockbuild_test/stratisd.spec index 90bc0f7..768813b 100644 --- a/mockbuild_test/stratisd.spec +++ b/mockbuild_test/stratisd.spec @@ -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