Revert "Make RHEL/Fedora compatible spec file"
It is actually not compatible and violates packaging guidelines (e.g.
for Sources).
This reverts commit 32d8769707
.
Signed-off-by: Igor Raits <ignatenkobrain@fedoraproject.org>
This commit is contained in:
parent
32d8769707
commit
616e21eba8
@ -1,13 +1,15 @@
|
||||
# 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
|
||||
%global __cargo_is_lib() false
|
||||
%global udevdir %(pkg-config --variable=udevdir udev)
|
||||
|
||||
Name: stratisd
|
||||
Version: 2.3.0
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
Summary: Daemon that manages block devices to create filesystems
|
||||
|
||||
# 0BSD or MIT or ASL 2.0
|
||||
@ -21,72 +23,51 @@ Summary: Daemon that manages block devices to create filesystems
|
||||
# Unlicense or MIT
|
||||
License: MPLv2.0 and ASL 2.0 and BSD and MIT
|
||||
URL: https://github.com/stratis-storage/stratisd
|
||||
|
||||
%if 0%{?rhel}
|
||||
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
|
||||
Source1: %{name}-%{version}-vendor.tar.xz
|
||||
%else
|
||||
Source: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
|
||||
%endif
|
||||
|
||||
ExclusiveArch: %{rust_arches}
|
||||
|
||||
%if 0%{?rhel}
|
||||
BuildRequires: rust-toolset
|
||||
%else
|
||||
BuildRequires: rust-packaging
|
||||
%endif
|
||||
|
||||
BuildRequires: systemd-devel
|
||||
BuildRequires: dbus-devel
|
||||
BuildRequires: libblkid-devel
|
||||
BuildRequires: cryptsetup-devel
|
||||
BuildRequires: clang
|
||||
BuildRequires: %{_bindir}/a2x
|
||||
BuildRequires: systemd
|
||||
|
||||
%{?systemd_requires}
|
||||
Requires: xfsprogs
|
||||
Requires: device-mapper-persistent-data
|
||||
Requires: systemd-libs
|
||||
Requires: dbus-libs
|
||||
Requires: clevis-luks >= 15
|
||||
|
||||
%description
|
||||
%{summary}.
|
||||
|
||||
%prep
|
||||
%if 0%{?rhel}
|
||||
%setup -q -n %{name}-%{version}
|
||||
|
||||
# Source1 is vendored dependencies
|
||||
%cargo_prep -V 1
|
||||
%else
|
||||
%autosetup -p1
|
||||
%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 -n
|
||||
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}
|
||||
mkdir -p %{buildroot}%{udevdir}
|
||||
mkdir -p %{buildroot}/developer_tools
|
||||
mv %{buildroot}%{_bindir}/stratisd %{buildroot}%{_libexecdir}/stratisd
|
||||
|
||||
mkdir -p %{buildroot}%{udevdir}
|
||||
mv %{buildroot}%{_bindir}/stratis_uuids_to_names %{buildroot}%{udevdir}/stratis_uuids_to_names
|
||||
%{__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
|
||||
|
||||
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 -Dpm0644 -t %{buildroot}%{_bindir} developer_tools/stratis_migrate_symlinks.sh
|
||||
|
||||
%if %{with check}
|
||||
%check
|
||||
@ -110,12 +91,16 @@ mv %{buildroot}%{_bindir}/stratis_uuids_to_names %{buildroot}%{udevdir}/stratis_
|
||||
%{_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
|
||||
%config %{_udevrulesdir}/11-stratisd.rules
|
||||
%{_udevrulesdir}/11-stratisd.rules
|
||||
|
||||
%changelog
|
||||
* Fri Jan 15 2021 Igor Raits <ignatenkobrain@fedoraproject.org> - 2.3.0-3
|
||||
- Partially revert previous commit
|
||||
|
||||
* Thu Jan 14 2021 mulhern <amulhern@redhat.com> - 2.3.0-2
|
||||
- Make RHEL/Fedora compatible spec file
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user