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

Revert stratisd.spec file 3.5.8 patch configuration #444

Merged
Merged
Show file tree
Hide file tree
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
37 changes: 5 additions & 32 deletions mockbuild_test/stratisd.spec
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@ Summary: Daemon that manages block devices to create filesystems

License: MPL-2.0
URL: https://github.com/stratis-storage/stratisd
Source0: %{url}/archive/stratisd-v%{version}/%{name}-%{version}.tar.gz
Source1: %{url}/releases/download/stratisd-v%{version}/%{name}-%{version}-vendor.tar.gz
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
Source1: %{url}/releases/download/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 @@ -85,38 +84,12 @@ Requires: stratisd
%{summary}. This package should not be used in production.

%prep
# 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 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
# with the format and top-level directory that %setup expects cleaning up the
# previously extracted directory and its contents at the same time. Move the
# newly created tar file to the SOURCE0 location.
tar --transform="s/^stratisd\-stratisd-v/stratisd-/" --extract --file %{SOURCE0}
tar --extract --overwrite --file %{SOURCE2}
tar --create --gzip --file %{SOURCE0}.newfile ./stratisd-%{version} --remove-files
mv %{SOURCE0}.newfile %{SOURCE0}

%setup -q

tar --strip-components=1 --extract --verbose --file %{SOURCE2}
# Patches must be applied after the upstream package is extracted.
%if 0%{?rhel}

# Untar the vendor tarfile.
tar --extract --file %{SOURCE1}

# Remove pre-compiled procedural macro, compile from source
rm ./vendor/serde_derive/serde_derive-x86_64-unknown-linux-gnu
%patch0 -p1

# Rezip the tarfile
tar --create --gzip --file %{SOURCE1}.newfile ./vendor --remove-files
mv %{SOURCE1}.newfile %{SOURCE1}

# Source1 is vendored dependencies
%cargo_prep -V 1

%else
%cargo_prep
%generate_buildrequires
Expand Down
51 changes: 0 additions & 51 deletions mockbuild_test/vendor-serde_derive.patch

This file was deleted.