diff --git a/.gitignore b/.gitignore index 2bedd17..31cf5e8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ -SOURCES/stratisd-3.4.4-vendor.tar.gz -SOURCES/stratisd-3.4.4.crate -SOURCES/stratisd-3.4.4.tar.gz +SOURCES/stratisd-3.5.8-vendor.tar.gz +SOURCES/stratisd-3.5.8.crate +SOURCES/stratisd-3.5.8.tar.gz diff --git a/.stratisd.metadata b/.stratisd.metadata index 2a1b2a7..d977900 100644 --- a/.stratisd.metadata +++ b/.stratisd.metadata @@ -1,3 +1,3 @@ -de15861e853524ddfde150a4be3087a358735ad0 SOURCES/stratisd-3.4.4-vendor.tar.gz -687ec4f71bd84890437e16ce44ccefc6ac00f8ee SOURCES/stratisd-3.4.4.crate -b6aa3c0cfbeef4b21c8bed10558403e17b8a90f1 SOURCES/stratisd-3.4.4.tar.gz +7db20a706ac0e878eac74b879a248bce9b833013 SOURCES/stratisd-3.5.8-vendor.tar.gz +7275cca97e0036b5310d601cb4763a7693c37578 SOURCES/stratisd-3.5.8.crate +9aa3f208e50ddf73bb6a6b0e99181e86bced2c7f SOURCES/stratisd-3.5.8.tar.gz diff --git a/SOURCES/vendor-serde_derive.patch b/SOURCES/vendor-serde_derive.patch new file mode 100644 index 0000000..421d82d --- /dev/null +++ b/SOURCES/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"); diff --git a/SPECS/stratisd.spec b/SPECS/stratisd.spec index b7a5be9..c199f5d 100644 --- a/SPECS/stratisd.spec +++ b/SPECS/stratisd.spec @@ -4,32 +4,24 @@ %global dracutdir %(pkg-config --variable=dracutdir dracut) Name: stratisd -Version: 3.4.4 +Version: 3.5.8 Release: 1%{?dist} Summary: Daemon that manages block devices to create filesystems -# ASL 2.0 -# ASL 2.0 or Boost -# ASL 2.0 or MIT -# BSD -# ISC -# MIT -# MIT or ASL 2.0 -# MPLv2.0 -# Unlicense or MIT -License: MPLv2.0 +License: MPL-2.0 URL: https://github.com/stratis-storage/stratisd -Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz -Source1: %{url}/releases/download/v%{version}/%{name}-%{version}-vendor.tar.gz +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} && !0%{?eln} +%if 0%{?rhel} ExcludeArch: i686 %endif -%if 0%{?rhel} && !0%{?eln} +%if 0%{?rhel} BuildRequires: rust-toolset %else BuildRequires: rust-packaging @@ -40,6 +32,8 @@ BuildRequires: dbus-devel BuildRequires: libblkid-devel BuildRequires: cryptsetup-devel BuildRequires: clang +BuildRequires: glibc-static +BuildRequires: device-mapper-devel BuildRequires: %{_bindir}/a2x # Required to calculate install directories @@ -53,6 +47,10 @@ Requires: dbus-libs Requires: cryptsetup-libs Requires: libblkid +# stratisd does not require clevis; it can be used in restricted environments +# where clevis is not available. +# If using encryption via clevis, stratisd requires the instance of clevis +# that it uses to have been built in an environment with cryptsetup >= 2.6.0. Recommends: clevis-luks >= 18 %description @@ -62,49 +60,99 @@ Recommends: clevis-luks >= 18 Summary: Dracut modules for use with stratisd ExclusiveArch: %{rust_arches} +%if 0%{?rhel} +ExcludeArch: i686 +%endif Requires: stratisd Requires: dracut >= 051 Requires: plymouth %description dracut +%{summary}. -This package contains dracut modules to be used with stratisd -to enable using Stratis filesystems as the root filesystem for -a Linux install. +%package tools +Summary: Tools that support Stratis operation +ExclusiveArch: %{rust_arches} +%if 0%{?rhel} +ExcludeArch: i686 +%endif + +Requires: stratisd + +%description tools +%{summary}. %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} && !0%{?eln} -# Source1 is vendored dependencies + +%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} + %cargo_prep -V 1 + %else %cargo_prep %generate_buildrequires -%cargo_generate_buildrequires -f dbus_enabled,min,systemd_compat +%cargo_generate_buildrequires -f engine,dbus_enabled,min,systemd_compat,extras,udev_scripts %endif %build -%if 0%{?rhel} && !0%{?eln} -%{cargo_build} --bin=stratisd -%{cargo_build} --bin=stratis-min --bin=stratisd-min --bin=stratis-utils --no-default-features --features min,systemd_compat +%if 0%{?rhel} +%{__cargo} build %{?_smp_mflags} --release --bin=stratisd +%{__cargo} build %{?_smp_mflags} --release --bin=stratis-min --bin=stratisd-min --bin=stratis-utils --no-default-features --features engine,min,systemd_compat +%{__cargo} rustc %{?_smp_mflags} --release --bin=stratis-str-cmp --no-default-features --features udev_scripts -- -Ctarget-feature=+crt-static +%{__cargo} rustc %{?_smp_mflags} --release --bin=stratis-base32-decode --no-default-features --features udev_scripts -- -Ctarget-feature=+crt-static +%{__cargo} build %{?_smp_mflags} --release --bin=stratis-dumpmetadata --no-default-features --features engine,extras,min %else +%cargo_license_summary -f engine,dbus_enabled,min,systemd_compat,extras,udev_scripts +%{cargo_license -f engine,dbus_enabled,min,systemd_compat,extras,udev_scripts} > LICENSE.dependencies %{__cargo} build %{?__cargo_common_opts} --release --bin=stratisd -%{__cargo} build %{?__cargo_common_opts} --release --bin=stratis-min --bin=stratisd-min --bin=stratis-utils --no-default-features --features min,systemd_compat +%{__cargo} build %{?__cargo_common_opts} --release --bin=stratis-min --bin=stratisd-min --bin=stratis-utils --no-default-features --features engine,min,systemd_compat +%{__cargo} rustc %{?__cargo_common_opts} --release --bin=stratis-str-cmp --no-default-features --features udev_scripts -- -Ctarget-feature=+crt-static +%{__cargo} rustc %{?__cargo_common_opts} --release --bin=stratis-base32-decode --no-default-features --features udev_scripts -- -Ctarget-feature=+crt-static +%{__cargo} build %{?__cargo_common_opts} --release --bin=stratis-dumpmetadata --no-default-features --features engine,extras,min %endif a2x -f manpage docs/stratisd.txt +a2x -f manpage docs/stratis-dumpmetadata.txt %install %make_install DRACUTDIR=%{dracutdir} PROFILEDIR=release %if %{with check} %check -%if 0%{?rhel} && !0%{?eln} -%cargo_test --no-run -%else +# Compile stratisd tests only where package does not use vendoring. +# This is a temporary step, to address the problem of loopdev crate +# 0.4.0 failing to build properly in some situations due to a failure of +# bindgen 0.59.0. +# See https://github.com/stratis-storage/project/issues/607 +%if !0%{?rhel} %cargo_test -- --no-run %endif %endif @@ -120,6 +168,10 @@ a2x -f manpage docs/stratisd.txt %files %license LICENSE +%if 0%{?rhel} +%else +%license LICENSE.dependencies +%endif %doc README.md %{_libexecdir}/stratisd %dir %{_datadir}/dbus-1 @@ -149,7 +201,30 @@ a2x -f manpage docs/stratisd.txt %{_systemd_util_dir}/system-generators/stratis-clevis-setup-generator %{_systemd_util_dir}/system-generators/stratis-setup-generator +%files tools +%license LICENSE +%{_bindir}/stratis-dumpmetadata +%{_mandir}/man8/stratis-dumpmetadata.8* + %changelog +* Mon Jul 31 2023 Bryan Gurney - 3.5.8-1 +- Refine handling of partially-set-up pools +- Resolves: rhbz#2223409 + +* Thu Jun 08 2023 Bryan Gurney - 3.5.7-1 +- Increase libcryptsetup-rs dependency lower bound to 0.8.0 +- Resolves: rhbz#2213277 + +* Tue May 16 2023 Bryan Gurney - 3.5.5-1 +- Update to version 3.5.5 +- Resolves: rhbz#2167463 +- Take into account the sector size of crypt devices +- Resolves: rhbz#2170318 +- Add stratisd-tools package with stratis-dumpmetadata program +- Resolves: rhbz#2173726 +- Support key description key in kernel keyring +- Resolves: rhbz#2038492 + * Tue Jan 03 2023 Bryan Gurney - 3.4.4-1 - Use devicemapper-rs version 0.32.3 - Resolves: rhbz#2155689