Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use patch macro for serde_derive patch #443

Merged
merged 1 commit into from
Aug 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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