diff --git a/stratisd.spec b/stratisd.spec index 9a7cc32..90d31de 100644 --- a/stratisd.spec +++ b/stratisd.spec @@ -4,7 +4,7 @@ Name: stratisd Version: 3.0.4 -Release: 8%{?dist} +Release: 9%{?dist} Summary: Daemon that manages block devices to create filesystems # 0BSD or MIT or ASL 2.0 @@ -26,23 +26,25 @@ ExclusiveArch: %{rust_arches} %if 0%{?rhel} && !0%{?eln} BuildRequires: rust-toolset +%else +BuildRequires: rust-packaging +%endif BuildRequires: systemd-devel BuildRequires: dbus-devel BuildRequires: libblkid-devel BuildRequires: cryptsetup-devel BuildRequires: clang -%else -BuildRequires: rust-packaging -%endif BuildRequires: %{_bindir}/a2x # Required to calculate install directories BuildRequires: systemd BuildRequires: dracut -%{?systemd_requires} Requires: xfsprogs Requires: device-mapper-persistent-data +Requires: systemd-libs +Requires: dbus-libs +Requires: libcryptsetup Recommends: clevis-luks >= 18 @@ -78,8 +80,13 @@ tar xvf %{SOURCE2} --strip-components=1 %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 +%else %{__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 +%endif a2x -f manpage docs/stratisd.txt %install @@ -123,8 +130,12 @@ install -Dpm0755 -t %{buildroot}%{_systemd_util_dir} systemd/stratis-fstab-setup %if %{with check} %check +%if 0%{?rhel} && !0%{?eln} +%cargo_test --no-run +%else %cargo_test -- --no-run %endif +%endif %post %systemd_post stratisd.service @@ -164,10 +175,13 @@ install -Dpm0755 -t %{buildroot}%{_systemd_util_dir} systemd/stratis-fstab-setup %{dracutdir}/modules.d/90stratis/module-setup.sh %{dracutdir}/modules.d/90stratis/stratis-rootfs-setup %{dracutdir}/modules.d/90stratis/stratisd-min.service -%{_systemdgeneratordir}/stratis-clevis-setup-generator -%{_systemdgeneratordir}/stratis-setup-generator +%{_systemd_util_dir}/system-generators/stratis-clevis-setup-generator +%{_systemd_util_dir}/system-generators/stratis-setup-generator %changelog +* 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