Update to version 2.4.2

- Update to 2.4.2
- Resolves: rhbz#1914315
- Add boot from root support
- Resolves: rhbz#1869768
- Ensure that binaries are installed with proper features enabled
- Split dracut modules out to subpackage
- Add additional dependencies in dracut module

Signed-off-by: Bryan Gurney <bgurney@redhat.com>
This commit is contained in:
Bryan Gurney 2021-06-11 15:54:25 -04:00
parent bb5116792c
commit b3ea74c76f
3 changed files with 101 additions and 59 deletions

2
.gitignore vendored
View File

@ -20,3 +20,5 @@
/stratisd-2.2.1.tar.gz
/stratisd-2.3.0.tar.gz
/stratisd-2.3.0-vendor.tar.xz
/stratisd-2.4.2.tar.gz
/stratisd-2.4.2-vendor.tar.gz

View File

@ -1,2 +1,2 @@
SHA512 (stratisd-2.3.0.tar.gz) = ec16c30394a40c091efbb90a85818a230e93ab615a7f9728cc873d7ca02e16579e7c696bb12295a9778ee6a5e6b95f4cf152853716d7f40985f124e3898977fc
SHA512 (stratisd-2.3.0-vendor.tar.xz) = 6f1e5749961ca8f8d14b12ed707a8f9c130b511ebc8accdf7792bbbd6d8059beed445d5fb2530b3ce698a6c5f1da02ac0954b1803ab1316b9506cd8cc5a2c332
SHA512 (stratisd-2.4.2.tar.gz) = fb6bdf343ce3a8eb2e18ea0bfc74c6032eca501987f261730ca353e4f91bbaaedaf9bd109063f70872cef0571a44f572dd2dd77ad751bb89f97ed00d7e7d501c
SHA512 (stratisd-2.4.2-vendor.tar.gz) = efe8d28db7b39550048ae42242467deba9cb5ee113cf7dff2b576578b7444a60cc2e7fb4f3083c6d0659e003f1069c7bf61332ae7c921aaf88afea07a9b25344

View File

@ -1,92 +1,106 @@
# Generated by rust2rpm
%bcond_without check
%global __cargo_skip_build 0
%global udevdir %(pkg-config --variable=udevdir udev)
# Not interested in packaging lib
# stratisd is supposed to be daemon used through dbus
# A daemon that manages a pool of block devices to create flexible filesystems
%global __cargo_is_lib() false
%global udevdir %(pkg-config --variable=udevdir udev)
%global dracutdir %(pkg-config --variable=dracutdir dracut)
Name: stratisd
Version: 2.3.0
Release: 9%{?dist}
Version: 2.4.2
Release: 1%{?dist}
Summary: Daemon that manages block devices to create filesystems
# 0BSD or MIT or ASL 2.0
# ASL 2.0
# ASL 2.0 or Boost
# BSD
# MIT
# MIT or ASL 2.0
# MIT or zlib or ASL 2.0
# MPLv2.0
# Unlicense or MIT
License: MPLv2.0 and ASL 2.0 and BSD and MIT
License: MPLv2.0
URL: https://github.com/stratis-storage/stratisd
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
Source1: %{name}-%{version}-vendor.tar.xz
Source1: %{url}/releases/download/v%{version}/%{name}-%{version}-vendor.tar.gz
ExclusiveArch: %{rust_arches}
%if 0%{?rhel} && !0%{?eln}
ExcludeArch: i686
BuildRequires: rust-toolset
BuildRequires: systemd-devel
BuildRequires: dbus-devel
BuildRequires: libblkid-devel
BuildRequires: cryptsetup-devel
BuildRequires: clang
BuildRequires: /usr/bin/a2x
BuildRequires: pkgconfig(libcryptsetup) >= 2.3.0
BuildRequires: pkgconfig(blkid) >= 2.32.0
%else
BuildRequires: rust-packaging
%endif
BuildRequires: systemd
BuildRequires: dracut
BuildRequires: %{_bindir}/a2x
%{?systemd_requires}
Requires: xfsprogs
Requires: device-mapper-persistent-data
Requires: clevis-luks >= 15
Requires: systemd-libs
Requires: dbus-libs
Requires: cryptsetup >= 2.3.0
Recommends: clevis-luks >= 15
%description
%{summary}.
%package dracut
Summary: Dracut modules for use with stratisd
ExclusiveArch: ${rust_arches}
Requires: dracut >= 049-136
Requires: plymouth
%description dracut
This package contains dracut modules to be used with stratisd
to enable using Stratis filesystems as the root filesystem for
a Linux install.
%prep
%autosetup -p1
%if 0%{?rhel} && !0%{?eln}
%setup -q -n %{name}-%{version}
# Source1 is vendored dependencies
%cargo_prep -V 1
%else
%cargo_prep
%generate_buildrequires
%cargo_generate_buildrequires
echo '/usr/bin/a2x'
echo 'pkgconfig(libcryptsetup) >= 2.3.0'
echo 'pkgconfig(blkid) >= 2.32.0'
%endif
%build
%cargo_build
%cargo_build --bin=stratisd
%cargo_build --bin=stratis-min --bin=stratisd-min --bin=stratis-utils --no-default-features --features min,systemd_compat
a2x -f manpage docs/stratisd.txt
%install
%cargo_install
%{__install} -Dpm0644 -t %{buildroot}%{_datadir}/dbus-1/system.d stratisd.conf
# Daemon should be really private
mkdir -p %{buildroot}%{_libexecdir}
mv %{buildroot}%{_bindir}/stratisd %{buildroot}%{_libexecdir}/stratisd
mkdir -p %{buildroot}/developer_tools
%{__install} -Dpm0755 -t %{buildroot}%{_libexecdir} target/release/stratisd
%{__install} -Dpm0644 -t %{buildroot}%{_mandir}/man8 docs/stratisd.8
%{__install} -Dpm0644 -t %{buildroot}%{_udevrulesdir} udev/61-stratisd.rules
%{__install} -Dpm0644 -t %{buildroot}%{_unitdir} systemd/stratisd.service
%{__install} -Dpm0644 -t %{buildroot}%{dracutdir}/dracut.conf.d dracut/90-stratis.conf
mkdir -p %{buildroot}%{dracutdir}/modules.d/90stratis
%{__install} -Dpm0755 -t %{buildroot}%{dracutdir}/modules.d/90stratis dracut/90stratis/module-setup.sh
%{__install} -Dpm0755 -t %{buildroot}%{dracutdir}/modules.d/90stratis dracut/90stratis/stratis-rootfs-setup
%{__install} -Dpm0644 -t %{buildroot}%{dracutdir}/modules.d/90stratis dracut/90stratis/stratisd-min.service
%{__install} -Dpm0644 -t %{buildroot}%{dracutdir}/modules.d/90stratis dracut/90stratis/61-stratisd.rules
mkdir -p %{buildroot}%{dracutdir}/modules.d/90stratis-clevis
%{__install} -Dpm0755 -t %{buildroot}%{dracutdir}/modules.d/90stratis-clevis dracut/90stratis-clevis/module-setup.sh
%{__install} -Dpm0755 -t %{buildroot}%{dracutdir}/modules.d/90stratis-clevis dracut/90stratis-clevis/stratis-clevis-rootfs-setup
%{__install} -Dpm0644 -t %{buildroot}%{_unitdir} systemd/stratisd-min-postinitrd.service
%{__install} -Dpm0644 -t %{buildroot}%{_unitdir} systemd/stratis-fstab-setup\@.service
mkdir -p %{buildroot}%{udevdir}
mv %{buildroot}%{_bindir}/stratis_uuids_to_names %{buildroot}%{udevdir}/stratis_uuids_to_names
cp target/release/stratis-utils target/release/stratis-str-cmp
%{__install} -Dpm0755 -t %{buildroot}%{udevdir} target/release/stratis-str-cmp
ln -fv %{buildroot}%{udevdir}/stratis-str-cmp %{buildroot}%{udevdir}/stratis-base32-decode
mkdir -p %{buildroot}%{_bindir}
ln -fv %{buildroot}%{udevdir}/stratis-str-cmp %{buildroot}%{_bindir}/stratis-predict-usage
mkdir -p %{buildroot}%{_systemdgeneratordir}
ln -fv %{buildroot}%{udevdir}/stratis-str-cmp %{buildroot}%{_systemdgeneratordir}/stratis-clevis-setup-generator
ln -fv %{buildroot}%{udevdir}/stratis-str-cmp %{buildroot}%{_systemdgeneratordir}/stratis-setup-generator
%{__install} -Dpm0755 -t %{buildroot}%{_bindir} target/release/stratis-min
%{__install} -Dpm0755 -t %{buildroot}%{_libexecdir} target/release/stratisd-min
%{__install} -Dpm0755 -t %{buildroot}%{_usr}/lib/systemd systemd/stratis-fstab-setup
install -Dpm0644 -t %{buildroot}%{_datadir}/dbus-1/system.d stratisd.conf
install -Dpm0644 -t %{buildroot}%{_mandir}/man8 docs/stratisd.8
install -Dpm0644 -t %{buildroot}%{_udevrulesdir} udev/11-stratisd.rules
install -Dpm0644 -t %{buildroot}%{_unitdir} stratisd.service
install -Dpm0755 -t %{buildroot}%{_bindir} developer_tools/stratis_migrate_symlinks.sh
%if %{with check}
%check
%cargo_test -- -- --skip real_ --skip loop_ --skip travis_
%cargo_test -- --skip real_ --skip loop_ --skip travis_
%endif
%post
@ -102,17 +116,43 @@ install -Dpm0755 -t %{buildroot}%{_bindir} developer_tools/stratis_migrate_symli
%license LICENSE
%doc README.md
%{_libexecdir}/stratisd
%{udevdir}/stratis_uuids_to_names
%{_bindir}/stratis_dbusquery_version
%{_bindir}/stratis_migrate_symlinks.sh
%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}/11-stratisd.rules
%config %{_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
%{_usr}/lib/systemd/stratis-fstab-setup
%files dracut
%license LICENSE
%{dracutdir}/dracut.conf.d/90-stratis.conf
%{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
%{_systemdgeneratordir}/stratis-clevis-setup-generator
%{_systemdgeneratordir}/stratis-setup-generator
%changelog
* Fri Jun 11 2021 Bryan Gurney <bgurney@redhat.com> - 2.4.2-1
- Update to 2.4.2
- Resolves: rhbz#1914315
- Add boot from root support
- Resolves: rhbz#1869768
- Ensure that binaries are installed with proper features enabled
- Split dracut modules out to subpackage
- Add additional dependencies in dracut module
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 2.3.0-9
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937