Added uncompress requirement

Having an old enough version of "file" and no "uncompress" program
installed can cause rpmbuild as root to crash and mangle rpmdb.

So let's add a build dependency for RPM-based systems.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
Closes: #12071
Closes: #12168
This commit is contained in:
Rich Ercolani 2021-06-11 11:38:23 -04:00 committed by Brian Behlendorf
parent af4b6f7dab
commit a416b29e16
3 changed files with 19 additions and 0 deletions

View File

@ -32,6 +32,13 @@ Obsoletes: spl-dkms
Provides: %{module}-kmod = %{version} Provides: %{module}-kmod = %{version}
AutoReqProv: no AutoReqProv: no
%if 0%{?rhel}%{?fedora}%{?suse_version}
# We don't directly use it, but if this isn't installed, rpmbuild as root can
# crash+corrupt rpmdb
# See issue #12071
BuildRequires: ncompress
%endif
%description %description
This package contains the dkms ZFS kernel modules. This package contains the dkms ZFS kernel modules.

View File

@ -57,6 +57,13 @@ BuildRequires: gcc, make
BuildRequires: elfutils-libelf-devel BuildRequires: elfutils-libelf-devel
%endif %endif
%if 0%{?rhel}%{?fedora}%{?suse_version}
# We don't directly use it, but if this isn't installed, rpmbuild as root can
# crash+corrupt rpmdb
# See issue #12071
BuildRequires: ncompress
%endif
# The developments headers will conflict with the dkms packages. # The developments headers will conflict with the dkms packages.
Conflicts: %{module}-dkms Conflicts: %{module}-dkms

View File

@ -140,9 +140,14 @@ BuildRequires: libblkid-devel
BuildRequires: libudev-devel BuildRequires: libudev-devel
BuildRequires: libattr-devel BuildRequires: libattr-devel
BuildRequires: openssl-devel BuildRequires: openssl-devel
# We don't directly use it, but if this isn't installed, rpmbuild as root can
# crash+corrupt rpmdb
# See issue #12071
BuildRequires: ncompress
%if 0%{?fedora} >= 28 || 0%{?rhel} >= 8 || 0%{?centos} >= 8 %if 0%{?fedora} >= 28 || 0%{?rhel} >= 8 || 0%{?centos} >= 8
BuildRequires: libtirpc-devel BuildRequires: libtirpc-devel
%endif %endif
Requires: openssl Requires: openssl
%if 0%{?_systemd} %if 0%{?_systemd}
BuildRequires: systemd BuildRequires: systemd