Update to version 3.1.0

- Revise stratisd.spec file to unified format
- Remove old rust2rpm config file
- Add rpminspect.yaml file

Resolves: rhbz#2039946

Signed-off-by: Bryan Gurney <bgurney@redhat.com>
This commit is contained in:
Bryan Gurney 2022-05-26 14:04:33 -04:00
parent 2107983b1d
commit 13fd87d51f
6 changed files with 87 additions and 60 deletions

3
.gitignore vendored
View File

@ -22,3 +22,6 @@
/stratisd-2.3.0-vendor.tar.xz
/stratisd-2.4.2.tar.gz
/stratisd-2.4.2-vendor.tar.gz
/stratisd-3.1.0.tar.gz
/stratisd-3.1.0-vendor.tar.gz
/stratisd-3.1.0.crate

View File

@ -1,4 +0,0 @@
[DEFAULT]
buildrequires =
pkgconfig(libcryptsetup) >= 2.3.0
pkgconfig(blkid) >= 2.32.0

15
rpminspect.yaml Normal file
View File

@ -0,0 +1,15 @@
---
inspections:
# none of our compiled code has an ABI
abidiff: off
# at present the wrong debuginfo files are being used to run this check
annocheck: off
# the project does not use .desktop files
desktop: off
# the project uses no Java
javabytecode: off
rpmdeps:
# ignore auto dependencies like: (crate(bindgen/default) >= 0.59.0 with crate(bindgen/default) < 0.60.0~)'
ignore:
requires: ^\(crate\(.*\)$

View File

@ -1,2 +1,3 @@
SHA512 (stratisd-2.4.2.tar.gz) = fb6bdf343ce3a8eb2e18ea0bfc74c6032eca501987f261730ca353e4f91bbaaedaf9bd109063f70872cef0571a44f572dd2dd77ad751bb89f97ed00d7e7d501c
SHA512 (stratisd-2.4.2-vendor.tar.gz) = efe8d28db7b39550048ae42242467deba9cb5ee113cf7dff2b576578b7444a60cc2e7fb4f3083c6d0659e003f1069c7bf61332ae7c921aaf88afea07a9b25344
SHA512 (stratisd-3.1.0.tar.gz) = 3a0e5fc3e1dcf19dbbf060324fe19637a50ef0ff219aa5c8e6d5d8a84b8d98f939c10d602edd999a01cf9c9be503bfe88d1a7aa66ded1e3ff142021aa40fe239
SHA512 (stratisd-3.1.0-vendor.tar.gz) = e8b5e78f24453133f21559a2824a185efac39cfa2397e12c621d189b1c5f55a4529f930e4cc77bcd423d98ab440d595ec95612546f37857205a4fc35a5664ddb
SHA512 (stratisd-3.1.0.crate) = 9f1eaab6df58fd162d47e5213129ff46be6eaaf0c72b2bb1ef51bdebeb0ba7e625d546ac0068b2deb1a14bf676f9b7c205f63ae548837d8908405fc57fee4b92

View File

@ -1,51 +1,70 @@
%bcond_without check
# 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.4.2
Release: 3%{?dist}
Version: 3.1.0
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
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
Source2: %{crates_source}
ExclusiveArch: %{rust_arches}
%if 0%{?rhel} && !0%{?eln}
ExcludeArch: i686
%endif
%if 0%{?rhel} && !0%{?eln}
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: dracut
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 >= 2.3.0
Requires: cryptsetup-libs
Requires: libblkid
Recommends: clevis-luks >= 15
Recommends: clevis-luks >= 18
%description
%{summary}.
%package dracut
Summary: Dracut modules for use with stratisd
ExclusiveArch: ${rust_arches}
ExclusiveArch: %{rust_arches}
Requires: stratisd
Requires: dracut >= 049-136
Requires: dracut >= 051
Requires: plymouth
%description dracut
@ -54,54 +73,40 @@ This package contains dracut modules to be used with stratisd
to enable using Stratis filesystems as the root filesystem for
a Linux install.
%prep
%setup -q -n %{name}-%{version}
%prep
%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
%cargo_prep -V 1
%else
%cargo_prep
%generate_buildrequires
%cargo_generate_buildrequires -f dbus_enabled,min,systemd_compat
%endif
%build
%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} && !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
%{__install} -Dpm0644 -t %{buildroot}%{_datadir}/dbus-1/system.d stratisd.conf
# Daemon should be really private
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}
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
%make_install DRACUTDIR=%{dracutdir} PROFILEDIR=release
%if %{with check}
%check
%cargo_test -- --skip real_ --skip loop_ --skip travis_
%if 0%{?rhel} && !0%{?eln}
%cargo_test --no-run
%else
%cargo_test -- --no-run
%endif
%endif
%post
@ -118,10 +123,11 @@ ln -fv %{buildroot}%{udevdir}/stratis-str-cmp %{buildroot}%{_systemdgeneratordir
%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
%config %{_udevrulesdir}/61-stratisd.rules
%{_udevrulesdir}/61-stratisd.rules
%{udevdir}/stratis-str-cmp
%{udevdir}/stratis-base32-decode
%{_bindir}/stratis-predict-usage
@ -129,21 +135,27 @@ ln -fv %{buildroot}%{udevdir}/stratis-str-cmp %{buildroot}%{_systemdgeneratordir
%{_unitdir}/stratis-fstab-setup@.service
%{_bindir}/stratis-min
%{_libexecdir}/stratisd-min
%{_usr}/lib/systemd/stratis-fstab-setup
%{_systemd_util_dir}/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
%{_systemd_util_dir}/system-generators/stratis-clevis-setup-generator
%{_systemd_util_dir}/system-generators/stratis-setup-generator
%changelog
* Tue May 31 2022 Bryan Gurney <bgurney@redhat.com> - 3.1.0-1
- Update to 3.1.0
- Resolves: rhbz#2039946
- Revise stratisd.spec file to unified format
- Remove old rust2rpm config file
* Fri Aug 20 2021 Bryan Gurney <bgurney@redhat.com> - 2.4.2-3
- Add stratisd to requires for stratisd-dracut
- Resolves: rhbz#1996104

View File

@ -18,4 +18,4 @@
repositories:
- repo: "https://github.com/stratis-storage/testing.git"
dest: "testing"
version: "v2.4.0"
version: "v3.1.0"