diff --git a/bundle-serde_with.patch b/bundle-serde_with.patch new file mode 100644 index 0000000..a4e9a09 --- /dev/null +++ b/bundle-serde_with.patch @@ -0,0 +1,11 @@ +--- coreos-installer-0.12.0/Cargo.toml.old 2021-12-17 15:04:38.560516015 -0500 ++++ coreos-installer-0.12.0/Cargo.toml 2021-12-17 16:45:29.567815138 -0500 +@@ -120,7 +120,7 @@ + version = "^1.0" + + [dependencies.serde_with] +-version = "1.9.4" ++path = "vendor/serde_with" + + [dependencies.serde_yaml] + version = "0.8" diff --git a/rust-coreos-installer.spec b/rust-coreos-installer.spec index f323d97..f87b98d 100644 --- a/rust-coreos-installer.spec +++ b/rust-coreos-installer.spec @@ -23,6 +23,16 @@ Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{ Source1: https://github.com/coreos/%{crate}/releases/download/v%{version}/%{crate}-%{version}-vendor.tar.gz Source2: https://github.com/coreos/coreos-installer-dracut/archive/%{dracutcommit}/coreos-installer-dracut-%{dracutshortcommit}.tar.gz +# rust-serde_with doesn't include the default "macros" feature. Bundle +# serde_with and its dependencies while we sort out this mess. +Patch1: bundle-serde_with.patch +BuildRequires: rust-ident_case+default-devel +Provides: bundled(crate(darling)) = 0.13.0 +Provides: bundled(crate(darling_core)) = 0.13.0 +Provides: bundled(crate(darling_macro)) = 0.13.0 +Provides: bundled(crate(serde_with)) = 1.11.0 +Provides: bundled(crate(serde_with_macros)) = 1.5.1 + ExclusiveArch: %{rust_arches} %if 0%{?rhel} && !0%{?eln} BuildRequires: rust-toolset @@ -96,6 +106,18 @@ directory = "vendor" EOF %else %cargo_prep +# FIXME: until the serde_with package provides the macros feature +tar xvf %{SOURCE1} +mkdir -p .cargo +cat >>.cargo/config << EOF +[patch.crates-io] +darling = { path = 'vendor/darling' } +darling_core = { path = 'vendor/darling_core' } +darling_macro = { path = 'vendor/darling_macro' } +serde_with = { path = 'vendor/serde_with' } +serde_with_macros = { path = 'vendor/serde_with_macros' } +EOF +# /FIXME %endif # Fix SIGSEGV in tests on s390x # https://bugzilla.redhat.com/show_bug.cgi?id=1883457 @@ -192,6 +214,7 @@ from the initramfs. %changelog * Fri Dec 17 2021 Benjamin Gilbert - 0.12.0-1 - New release +- Temporarily bundle serde_with and its dependencies * Wed Dec 15 2021 Sohan Kunkerkar - 0.11.0-3 - Remove conditional around sourcing the vendor tarball