From 928d848180d054ca81766bff4247dda192a33fc8 Mon Sep 17 00:00:00 2001 From: mulhern Date: Fri, 28 Jul 2023 17:48:11 -0400 Subject: [PATCH] Patch vendored tarfile to remove executable --- stratisd.spec | 27 +++++++++++++++++---- vendor-serde_derive.patch | 51 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+), 5 deletions(-) create mode 100644 vendor-serde_derive.patch diff --git a/stratisd.spec b/stratisd.spec index efe1b1b..2115ef1 100644 --- a/stratisd.spec +++ b/stratisd.spec @@ -5,7 +5,7 @@ Name: stratisd Version: 3.5.8 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Daemon that manages block devices to create filesystems License: (MIT OR Apache-2.0) AND Unicode-DFS-2016 AND Apache-2.0 AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND MIT AND MPL-2.0 AND (Unlicense OR MIT) @@ -94,14 +94,28 @@ Requires: stratisd # 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 --verbose --file %{SOURCE0} -tar --extract --verbose --overwrite --file %{SOURCE2} -tar --create --verbose --gzip --file %{SOURCE0}.newfile ./stratisd-%{version} --remove-files +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 + %if 0%{?rhel} -# Source1 is vendored dependencies + +# 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 +patch -p1 ./vendor-serde_derive.patch + +# Rezip the tarfile +tar --create --gzip --file %{SOURCE1}.newfile ./vendor --remove-files +mv %{SOURCE1}.newfile %{SOURCE1} + %cargo_prep -V 1 + %else %cargo_prep %generate_buildrequires @@ -192,6 +206,9 @@ a2x -f manpage docs/stratis-dumpmetadata.txt %{_mandir}/man8/stratis-dumpmetadata.8* %changelog +* Fri Jul 28 2023 mulhern - 3.5.8-3 +- Patch vendored tarfile to remove executable + * Thu Jul 27 2023 mulhern - 3.5.8-2 - Add additional dependency for TMT tests diff --git a/vendor-serde_derive.patch b/vendor-serde_derive.patch new file mode 100644 index 0000000..421d82d --- /dev/null +++ b/vendor-serde_derive.patch @@ -0,0 +1,51 @@ +diff -r -u a/vendor/serde_derive/.cargo-checksum.json b/vendor/serde_derive/.cargo-checksum.json +--- a/vendor/serde_derive/.cargo-checksum.json 2023-07-28 17:29:31.882146916 -0400 ++++ b/vendor/serde_derive/.cargo-checksum.json 2023-07-28 17:29:18.104951995 -0400 +@@ -1 +1 @@ +-{"files":{"Cargo.toml":"341a4425e672c1fc4571d37a0dddb54b35b4bdcf38c550af47c3c1f16426564b","LICENSE-APACHE":"62c7a1e35f56406896d7aa7ca52d0cc0d272ac022b5d2796e7d6905db8a3636a","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","serde_derive-x86_64-unknown-linux-gnu":"352a33dfb4b10e7beabef977b83fdd697e4443f27e03a6aceff8c3738edc30d5","src/bound.rs":"fee590a67ca956d7a2fca50a2dc069e71d27fa9adacde98670a88245a8841cf6","src/buffer.rs":"b2bbe4058cd60c2ccbbe5087516224d2975a38dbf9fb52c25f23c1b96c9f1ea7","src/bytecode.rs":"4b092d9d88e11dd544c14decb64ab50a1725f0f792adf6b69aeebaabc2919097","src/de.rs":"1ebe3d3fabd86bdfe15e7aed02d7ecd183353c276ce8e6302264740191965c74","src/dummy.rs":"1b7de5bfe1158ea7e70d668d4f76fdccf7f63144ac7869e82e8bf1e7ea0db13c","src/fragment.rs":"5548ba65a53d90a296f60c1328a7a7fb040db467f59c2f5210b2fb320457145d","src/internals/ast.rs":"07dfd9a789cd6268c2cff2889e738193d24e68c93873792a0548d5e6b3c94ca4","src/internals/attr.rs":"55b59fb42ac041ec44c34dfa58e2c11d37783fa4f5200fbd8520fe28d798eff7","src/internals/case.rs":"9492f0c5142d7b7e8cd39c86d13a855e5ce4489425adb2b96aed89e1b7851ac0","src/internals/check.rs":"41f4725b20919b8828850529d8d395dbb55f54ca4069a9cd0bf37109e9b93172","src/internals/ctxt.rs":"c403db8260a533e58af06e8d0a2bb962edb13a250424ab1f1fd2719902affc37","src/internals/mod.rs":"f32138ff19d57eb00f88ba11f6b015efab2102657804f71ebbf386a3698dad91","src/internals/receiver.rs":"6b016351b8294539039095863d8c99e81dd4530d7f769003d12d4ca73cca172c","src/internals/respan.rs":"899753859c58ce5f532a3ec4584796a52f13ed5a0533191e48c953ba5c1b52ff","src/internals/symbol.rs":"2bf0287da64d28da7e8673af60f66aaf6b29efe33131e56b24d6fa55edb533ad","src/lib.rs":"8fa0a5bbcc1126f29d5b5e69459c1510e47c607342a000d833ec382afb7848ea","src/lib_from_source.rs":"72960c007813da84dbcc2d98398e3bfb6c0617c29ffe456cf184c2a556d2e6e4","src/lib_precompiled.rs":"68cd898c82ecca3770fcda43c6514b967222e75ba2d4d618ad3925e34181ef21","src/pretend.rs":"0e570faf787015535ea6b6683ebc271633c1ca945d3ee1d072c497a1a920c380","src/ser.rs":"e435dc7ef8ee9dca02913f43b4162d22c664061510089745b6278a63df7d30fe","src/this.rs":"a2c128955324c2994ed7cdc3fe4eeceb7ad8a0f9d071665a8378c85c8df64ce2","src/try.rs":"b171b0088c23ebf4bfa07ba457881b41ac5e547d55dd16f737ea988d34badf61"},"package":"b23f7ade6f110613c0d63858ddb8b94c1041f550eab58a16b371bdf2c9c80ab4"} +\ No newline at end of file ++{"files":{"Cargo.toml":"77728000015e4d5b8932e7683214d185fa8af037032eaf98e17a45fbaf0964ed","LICENSE-APACHE":"62c7a1e35f56406896d7aa7ca52d0cc0d272ac022b5d2796e7d6905db8a3636a","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","src/bound.rs":"fee590a67ca956d7a2fca50a2dc069e71d27fa9adacde98670a88245a8841cf6","src/buffer.rs":"b2bbe4058cd60c2ccbbe5087516224d2975a38dbf9fb52c25f23c1b96c9f1ea7","src/bytecode.rs":"4b092d9d88e11dd544c14decb64ab50a1725f0f792adf6b69aeebaabc2919097","src/de.rs":"1ebe3d3fabd86bdfe15e7aed02d7ecd183353c276ce8e6302264740191965c74","src/dummy.rs":"1b7de5bfe1158ea7e70d668d4f76fdccf7f63144ac7869e82e8bf1e7ea0db13c","src/fragment.rs":"5548ba65a53d90a296f60c1328a7a7fb040db467f59c2f5210b2fb320457145d","src/internals/ast.rs":"07dfd9a789cd6268c2cff2889e738193d24e68c93873792a0548d5e6b3c94ca4","src/internals/attr.rs":"55b59fb42ac041ec44c34dfa58e2c11d37783fa4f5200fbd8520fe28d798eff7","src/internals/case.rs":"9492f0c5142d7b7e8cd39c86d13a855e5ce4489425adb2b96aed89e1b7851ac0","src/internals/check.rs":"41f4725b20919b8828850529d8d395dbb55f54ca4069a9cd0bf37109e9b93172","src/internals/ctxt.rs":"c403db8260a533e58af06e8d0a2bb962edb13a250424ab1f1fd2719902affc37","src/internals/mod.rs":"f32138ff19d57eb00f88ba11f6b015efab2102657804f71ebbf386a3698dad91","src/internals/receiver.rs":"6b016351b8294539039095863d8c99e81dd4530d7f769003d12d4ca73cca172c","src/internals/respan.rs":"899753859c58ce5f532a3ec4584796a52f13ed5a0533191e48c953ba5c1b52ff","src/internals/symbol.rs":"2bf0287da64d28da7e8673af60f66aaf6b29efe33131e56b24d6fa55edb533ad","src/lib.rs":"cb97725dce0245fc369a81c9328960225324b489792693a3830aa174f3c977f4","src/lib_from_source.rs":"72960c007813da84dbcc2d98398e3bfb6c0617c29ffe456cf184c2a556d2e6e4","src/lib_precompiled.rs":"68cd898c82ecca3770fcda43c6514b967222e75ba2d4d618ad3925e34181ef21","src/pretend.rs":"0e570faf787015535ea6b6683ebc271633c1ca945d3ee1d072c497a1a920c380","src/ser.rs":"e435dc7ef8ee9dca02913f43b4162d22c664061510089745b6278a63df7d30fe","src/this.rs":"a2c128955324c2994ed7cdc3fe4eeceb7ad8a0f9d071665a8378c85c8df64ce2","src/try.rs":"b171b0088c23ebf4bfa07ba457881b41ac5e547d55dd16f737ea988d34badf61"},"package":"b23f7ade6f110613c0d63858ddb8b94c1041f550eab58a16b371bdf2c9c80ab4"} +diff -r -u a/vendor/serde_derive/Cargo.toml b/vendor/serde_derive/Cargo.toml +--- a/vendor/serde_derive/Cargo.toml 2023-07-28 17:29:31.882146916 -0400 ++++ b/vendor/serde_derive/Cargo.toml 2023-07-28 17:29:18.104951995 -0400 +@@ -45,18 +45,18 @@ + [lib] + proc-macro = true + +-[dev-dependencies.serde] ++[dependencies.proc-macro2] + version = "1" + +-[features] +-default = [] +-deserialize_in_place = [] +- +-[target."cfg(not(all(target_arch = \"x86_64\", target_os = \"linux\", target_env = \"gnu\")))".dependencies.proc-macro2] ++[dependencies.quote] + version = "1" + +-[target."cfg(not(all(target_arch = \"x86_64\", target_os = \"linux\", target_env = \"gnu\")))".dependencies.quote] ++[dependencies.syn] ++version = "2.0.25" ++ ++[dev-dependencies.serde] + version = "1" + +-[target."cfg(not(all(target_arch = \"x86_64\", target_os = \"linux\", target_env = \"gnu\")))".dependencies.syn] +-version = "2.0.25" ++[features] ++default = [] ++deserialize_in_place = [] +Only in a/vendor/serde_derive: serde_derive-x86_64-unknown-linux-gnu +diff -r -u a/vendor/serde_derive/src/lib.rs b/vendor/serde_derive/src/lib.rs +--- a/vendor/serde_derive/src/lib.rs 2023-07-28 17:29:31.882146916 -0400 ++++ b/vendor/serde_derive/src/lib.rs 2023-07-28 17:29:18.104951995 -0400 +@@ -18,8 +18,4 @@ + + extern crate proc_macro; + +-#[cfg(not(all(target_arch = "x86_64", target_os = "linux", target_env = "gnu")))] + include!("lib_from_source.rs"); +- +-#[cfg(all(target_arch = "x86_64", target_os = "linux", target_env = "gnu"))] +-include!("lib_precompiled.rs");