%bcond_without check %global udevdir %(pkg-config --variable=udevdir udev) %global dracutdir %(pkg-config --variable=dracutdir dracut) Name: stratisd Version: 3.6.4 Release: 1%{?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) 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 Source2: %{crates_source} ExclusiveArch: %{rust_arches} %if 0%{?rhel} ExcludeArch: i686 %endif %if 0%{?rhel} BuildRequires: rust-toolset %else BuildRequires: rust-packaging %endif BuildRequires: rust-srpm-macros BuildRequires: systemd-devel 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 BuildRequires: systemd BuildRequires: dracut Requires: xfsprogs Requires: device-mapper-persistent-data Requires: systemd-libs 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 %{summary}. %package dracut Summary: Dracut modules for use with stratisd ExclusiveArch: %{rust_arches} %if 0%{?rhel} ExcludeArch: i686 %endif Requires: stratisd Requires: dracut >= 051 Requires: systemd %description dracut %{summary}. %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 --directory=./stratisd-%{version} --strip-components=1 --extract --overwrite --file %{SOURCE2} tar --create --gzip --file %{SOURCE0}.newfile ./stratisd-%{version} --remove-files mv %{SOURCE0}.newfile %{SOURCE0} %setup -q %if 0%{?rhel} %cargo_prep -V 1 %else %cargo_prep %generate_buildrequires %cargo_generate_buildrequires -f engine,dbus_enabled,min,systemd_compat,extras,udev_scripts %endif %build %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=stratisd-tools --no-default-features --features engine,extras,min %else %{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 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=stratisd-tools --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 # 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 %post %systemd_post stratisd.service %preun %systemd_preun stratisd.service %postun %systemd_postun_with_restart stratisd.service %files %license LICENSE %if 0%{?rhel} %else %license LICENSE.dependencies %endif %doc README.md %{_libexecdir}/stratisd %dir %{_datadir}/dbus-1 %dir %{_datadir}/dbus-1/system.d %{_datadir}/dbus-1/system.d/stratisd.conf %{_mandir}/man8/stratisd.8* %{_unitdir}/stratisd.service %{_udevrulesdir}/61-stratisd.rules %{udevdir}/stratis-str-cmp %{udevdir}/stratis-base32-decode %{_bindir}/stratis-predict-usage %{_unitdir}/stratisd-min-postinitrd.service %{_unitdir}/stratis-fstab-setup@.service %{_bindir}/stratis-min %{_libexecdir}/stratisd-min %{_systemd_util_dir}/stratis-fstab-setup %files dracut %license LICENSE %{dracutdir}/modules.d/90stratis-clevis/module-setup.sh %{dracutdir}/modules.d/90stratis-clevis/stratis-clevis-rootfs-setup %{dracutdir}/modules.d/90stratis/61-stratisd.rules %{dracutdir}/modules.d/90stratis/module-setup.sh %{dracutdir}/modules.d/90stratis/stratis-rootfs-setup %{dracutdir}/modules.d/90stratis/stratisd-min.service %{_systemd_util_dir}/system-generators/stratis-clevis-setup-generator %{_systemd_util_dir}/system-generators/stratis-setup-generator %files tools %license LICENSE %{_bindir}/stratisd-tools %{_bindir}/stratis-dumpmetadata %{_mandir}/man8/stratis-dumpmetadata.8* %changelog * Fri Jan 26 2024 Bryan Gurney - 3.6.4-1 - Update to 3.6.4 * Thu Nov 30 2023 Bryan Gurney - 3.6.3-1 - Update to 3.6.3 * Thu Nov 16 2023 Bryan Gurney - 3.6.2-1 - Update to 3.6.2 * Wed Nov 01 2023 Bryan Gurney - 3.6.1-1 - Update to 3.6.1 * Thu Oct 26 2023 Bryan Gurney - 3.6.0-1 - Update to 3.6.0 * Thu Aug 31 2023 Bryan Gurney - 3.5.9-1 - Update to 3.5.9 - Remove patch macro for serde_derive patch - Remove vendor-serde_derive.patch file * Mon Jul 31 2023 Bryan Gurney - 3.5.8-4 - Use patch macro for serde_derive patch * 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 * Thu Jul 27 2023 mulhern - 3.5.8-1 - Update to 3.5.8 * Sat Jul 22 2023 Fedora Release Engineering - 3.5.7-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Wed Jun 14 2023 Bryan Gurney - 3.5.7-2 - Use tmt tests * Wed Jun 07 2023 Bryan Gurney - 3.5.7-1 - Update to 3.5.7 * Wed May 31 2023 Bryan Gurney - 3.5.5-2 - Rebuild for new libcryptsetup-rs version * Wed May 17 2023 Bryan Gurney - 3.5.5-1 - Update to 3.5.5 * Wed Apr 26 2023 Bryan Gurney - 3.5.4-3 - Fix up ExclusiveArch directives * Mon Apr 24 2023 Bryan Gurney - 3.5.4-2 - Update spec file * Fri Apr 21 2023 Bryan Gurney - 3.5.4-1 - Update to 3.5.4 * Mon Apr 17 2023 Bryan Gurney - 3.5.3-1 - Update to 3.5.3 * Fri Mar 17 2023 Bryan Gurney - 3.5.2-2 - Add BuildRequires for device-mapper-devel * Fri Mar 17 2023 Bryan Gurney - 3.5.2-1 - Update to 3.5.2 * Tue Feb 28 2023 Bryan Gurney - 3.5.1-3 - Allow annocheck on rpminspect.yaml for non-static binaries * Mon Feb 20 2023 Bryan Gurney - 3.5.1-2 - Add debuginfo ignore to rpminspect.yaml * Tue Feb 07 2023 Bryan Gurney - 3.5.1-1 - Update to 3.5.1 * Fri Feb 03 2023 Bryan Gurney - 3.5.0-4 - Remove debuginfo ignore from rpminspect.yaml * Thu Feb 02 2023 Bryan Gurney - 3.5.0-3 - Remove elf ignore from rpminspect.yaml * Wed Feb 01 2023 Bryan Gurney - 3.5.0-2 - Update rpminspect.yaml * Tue Jan 24 2023 Bryan Gurney - 3.5.0-1 - Update to 3.5.0 * Sat Jan 21 2023 Fedora Release Engineering - 3.4.4-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Mon Jan 16 2023 Bryan Gurney - 3.4.4-2 - Remove Fedora ELN conditionals from spec file - Use ExclusiveArch only if RHEL * Tue Jan 03 2023 Bryan Gurney - 3.4.4-1 - Update to 3.4.4 * Thu Dec 15 2022 Bryan Gurney - 3.4.3-1 - Update to 3.4.3 * Tue Dec 06 2022 Bryan Gurney - 3.4.2-1 - Update to 3.4.2 * Tue Nov 29 2022 Bryan Gurney - 3.4.1-1 - Update to 3.4.1 * Tue Oct 18 2022 Bryan Gurney - 3.3.0-1 - Update to 3.3.0 * Sun Aug 28 2022 mulhern - 3.2.3-1 - Update to 3.2.3 * Wed Aug 24 2022 Bryan Gurney - 3.2.2-1 - Update to 3.2.2 * Fri Jul 29 2022 mulhern - 3.2.1-1 - Update to 3.2.1 * Wed Jul 27 2022 mulhern - 3.1.2-2 - Run all gating tests that require no devices * Wed Jul 27 2022 mulhern - 3.1.2-1 - Update to 3.1.2 * Sat Jul 23 2022 Fedora Release Engineering - 3.1.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Tue Jul 12 2022 Bryan Gurney - 3.1.1-1 - Update to 3.1.1 * Fri Jul 01 2022 Bryan Gurney - 3.1.0-5 - Refine gating tests to minimal set * Wed Jun 22 2022 Bryan Gurney - 3.1.0-4 - Add gating test * Mon Jun 06 2022 Bryan Gurney - 3.1.0-3 - Remove buildhost_subdomain section from rpminspect.yaml * Fri Jun 03 2022 Bryan Gurney - 3.1.0-2 - Synchronize spec with upstream unified spec file - Remove .rust2rpm.conf file * Wed May 25 2022 mulhern - 3.1.0-1 - Update to 3.1.0 * Mon Mar 28 2022 mulhern - 3.0.4-11 - Fix ${rust_arches}; use long form tar options * Sat Mar 26 2022 mulhern - 3.0.4-10 - Fix cryptsetup-Requires; add blkid-Requires * Fri Mar 25 2022 mulhern - 3.0.4-9 - Make specfile fully and minimally unified * Thu Mar 24 2022 mulhern - 3.0.4-8 - Tidy up BuildRequires * Thu Mar 24 2022 mulhern - 3.0.4-7 - Remove __cargo_skip_build * Thu Mar 24 2022 mulhern - 3.0.4-6 - Only build the tests, do not try to run them * Thu Mar 24 2022 mulhern - 3.0.4-5 - Do not set unused global * Tue Mar 15 2022 mulhern - 3.0.4-4 - Install two scripts * Mon Mar 14 2022 mulhern - 3.0.4-3 - Fix the previous revision * Mon Mar 14 2022 mulhern - 3.0.4-2 - Use upstream crate for Rust source * Sat Feb 12 2022 mulhern - 3.0.4-1 - Update to 3.0.4 * Mon Feb 7 2022 mulhern - 3.0.3-1 - Update to 3.0.3 * Sat Jan 22 2022 Fedora Release Engineering - 3.0.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Tue Dec 21 2021 mulhern - 3.0.2-1 - Update to 3.0.2 * Sun Nov 28 2021 mulhern - 2.4.4-1 - Update to 2.4.4 * Tue Oct 19 2021 mulhern - 2.4.2-3 - Rebuilt to include dbus-tree 0.9.2 * Fri Jul 23 2021 Fedora Release Engineering - 2.4.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Tue Jun 1 2021 mulhern - 2.4.2-1 - Update to 2.4.2 * Tue May 18 2021 John Baublitz - 2.4.1-1 - Update to new release and split dracut modules out into subpackage * Thu May 13 2021 John Baublitz - 2.4.0-4 - Ensure that binaries are installed with proper features enabled * Wed May 12 2021 John Baublitz - 2.4.0-3 - Fix installed file paths * Tue Apr 27 2021 mulhern - 2.4.0-2 - Fixes to previous release * Tue Apr 27 2021 mulhern - 2.4.0-1 - Update to 2.4.0 * Wed Mar 17 2021 mulhern - 2.3.0-10 - Use external URL for vendored sources * Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek - 2.3.0-9 - Rebuilt for updated systemd-rpm-macros See https://pagure.io/fesco/issue/2583. * Wed Jan 27 2021 Fedora Release Engineering - 2.3.0-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Fri Jan 15 2021 Igor Raits - 2.3.0-7 - Fix build on ELN * Fri Jan 15 2021 Igor Raits - 2.3.0-6 - Make package compatible without violating guidelines * Fri Jan 15 2021 mulhern - 2.3.0-5 - Add both sources at the same time * Fri Jan 15 2021 mulhern - 2.3.0-4 - Restore RHEL/Fedora compatible spec file, adding some additional changes * Fri Jan 15 2021 Igor Raits - 2.3.0-3 - Partially revert previous commit * Thu Jan 14 2021 mulhern - 2.3.0-2 - Make RHEL/Fedora compatible spec file * Tue Jan 12 2021 mulhern - 2.3.0-1 - Update to 2.3.0 * Mon Dec 28 13:34:26 CET 2020 Igor Raits - 2.2.1-3 - Rebuild * Sun Dec 27 2020 Igor Raits - 2.2.1-2 - Rebuild * Mon Nov 9 2020 mulhern - 2.2.1-1 - Update to 2.2.1 * Mon Oct 19 2020 mulhern - 2.2.0-1 - Update to 2.2.0 * Sat Aug 01 2020 Fedora Release Engineering - 2.1.0-3 - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Wed Jul 29 2020 Fedora Release Engineering - 2.1.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Tue Jul 07 2020 John Baublitz - 2.1.0-1 - Update to 2.1.0 * Wed Feb 19 2020 Igor Raits - 2.0.1-2 - Fixup license * Wed Feb 19 2020 Igor Raits - 2.0.1-1 - Update to 2.0.1 * Fri Jan 31 2020 Fedora Release Engineering - 2.0.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Thu Nov 07 2019 Igor Gnatenko - 2.0.0-1 - Update to 2.0.0 * Fri Sep 06 20:52:06 CEST 2019 Igor Gnatenko - 1.0.5-1 - Update to 1.0.5 * Sat Jul 27 2019 Fedora Release Engineering - 1.0.4-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Tue Jun 04 2019 Josh Stone - 1.0.4-2 - Bump nix to 0.14 * Tue May 07 08:16:24 CEST 2019 Igor Gnatenko - 1.0.4-1 - Update to 1.0.4 * Wed Mar 06 2019 Igor Gnatenko - 1.0.3-1 - Update to 1.0.3 * Wed Dec 12 2018 Igor Gnatenko - 1.0.2-1 - Update to 1.0.2 * Fri Nov 02 2018 Igor Gnatenko - 1.0.1-1 - Update to 1.0.1 * Thu Sep 27 2018 Igor Gnatenko - 1.0.0-1 - Update to 1.0.0 * Wed Sep 19 2018 Igor Gnatenko - 0.9.0-4 - Add missing systemd scriptlets * Wed Sep 19 2018 Tony Asleson - 0.9.0-3 - Add systemd unit file - Remove systemd activation file * Tue Sep 18 2018 Igor Gnatenko - 0.9.0-2 - Rebuild to workaround pungi bug * Sat Sep 01 2018 Igor Gnatenko - 0.9.0-1 - Update to 0.9.0 * Fri Aug 3 2018 Andy Grover - 0.5.5-2 - Disable a failing but noncritical test * Fri Aug 03 2018 Igor Gnatenko - 0.5.5-1 - Update to 0.5.5 * Thu Jul 19 2018 Igor Gnatenko - 0.5.4-3 - Upgrade dependencies * Sat Jul 14 2018 Fedora Release Engineering - 0.5.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Wed Jul 11 2018 Igor Gnatenko - 0.5.4-1 - Update to 0.5.4 * Fri Jun 22 2018 Igor Gnatenko - 0.5.3-2 - Add -init version of daemon - Own dbus-1 directory * Mon Jun 4 2018 Andy Grover - 0.5.3-1 - Update to 0.5.3 * Fri May 4 2018 Andy Grover - 0.5.2-2 - Add 0002-Prefix-commands-with-entire-path.patch * Tue May 1 2018 Andy Grover - 0.5.2-1 - Update to 0.5.2 * Tue Apr 03 2018 Igor Gnatenko - 0.5.1-1 - Update to 0.5.1 * Tue Mar 13 2018 Andy Grover - 0.5.0-2 - Add stratisd manpage * Thu Mar 08 2018 Igor Gnatenko - 0.5.0-1 - Update to 0.5.0 * Thu Feb 15 2018 Andy Grover - 0.1.5-2 - Require packages that contain binaries that we exec: xfsprogs and device-mapper-persistent-data * Sun Feb 11 2018 Igor Gnatenko - 0.1.5-1 - Update to 0.1.5 * Fri Feb 09 2018 Fedora Release Engineering - 0.1.4-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Mon Jan 08 2018 Igor Gnatenko - 0.1.4-3 - Rebuild for rust-packaging v5 * Mon Jan 08 2018 Igor Gnatenko - 0.1.4-2 - Move binary under %%{_libexecdir} - Add dbus service (so it is activatable) - Fix rand's version bump * Sun Jan 07 2018 Igor Gnatenko - 0.1.4-1 - Initial package