aboutsummaryrefslogtreecommitdiffstats
path: root/rpm
diff options
context:
space:
mode:
authorRich Ercolani <[email protected]>2021-06-11 11:38:23 -0400
committerGitHub <[email protected]>2021-06-11 09:38:23 -0600
commit1a345d645a5389ac4f9922bc7ecf5cc519e15d32 (patch)
tree3aa35f4a44d952f88d931d8e3fac635dd6b2d786 /rpm
parent9d639d879954e694dea7d2fa5d9c4e9ff1ef0e69 (diff)
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 <[email protected]> Reviewed-by: Tony Hutter <[email protected]> Signed-off-by: Rich Ercolani <[email protected]> Closes: #12071 Closes: #12168
Diffstat (limited to 'rpm')
-rw-r--r--rpm/generic/zfs-dkms.spec.in7
-rw-r--r--rpm/generic/zfs-kmod.spec.in7
-rw-r--r--rpm/generic/zfs.spec.in5
3 files changed, 19 insertions, 0 deletions
diff --git a/rpm/generic/zfs-dkms.spec.in b/rpm/generic/zfs-dkms.spec.in
index 0a6935516..e0c410c68 100644
--- a/rpm/generic/zfs-dkms.spec.in
+++ b/rpm/generic/zfs-dkms.spec.in
@@ -32,6 +32,13 @@ Obsoletes: spl-dkms
Provides: %{module}-kmod = %{version}
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
This package contains the dkms ZFS kernel modules.
diff --git a/rpm/generic/zfs-kmod.spec.in b/rpm/generic/zfs-kmod.spec.in
index 6e4bfdcfe..1692be1a7 100644
--- a/rpm/generic/zfs-kmod.spec.in
+++ b/rpm/generic/zfs-kmod.spec.in
@@ -57,6 +57,13 @@ BuildRequires: gcc, make
BuildRequires: elfutils-libelf-devel
%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.
Conflicts: %{module}-dkms
diff --git a/rpm/generic/zfs.spec.in b/rpm/generic/zfs.spec.in
index 6ce64db4f..4a37ae8ce 100644
--- a/rpm/generic/zfs.spec.in
+++ b/rpm/generic/zfs.spec.in
@@ -140,9 +140,14 @@ BuildRequires: libblkid-devel
BuildRequires: libudev-devel
BuildRequires: libattr-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
BuildRequires: libtirpc-devel
%endif
+
Requires: openssl
%if 0%{?_systemd}
BuildRequires: systemd