From 9b9eeb03c6b111e11893410f0e964fbce34498aa Mon Sep 17 00:00:00 2001 From: Chris Lindee Date: Tue, 25 Jan 2022 00:23:03 -0600 Subject: [PATCH] RPM: Split out pam_zfs_key into separate package Create a separate `pam_zfs_key` package for the PAM module components, an optional addition to the deliverables, in much the same way as the Python bindings are released as a separate `python#-pyzfs` package. This makes it clear when the PAM module is shipped with the package, since it's now in its own package. Signed-off-by: Chris Lindee Closes: #13026 --- rpm/generic/zfs.spec.in | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/rpm/generic/zfs.spec.in b/rpm/generic/zfs.spec.in index bdd77b43da6f..4b78a93085ac 100644 --- a/rpm/generic/zfs.spec.in +++ b/rpm/generic/zfs.spec.in @@ -118,10 +118,6 @@ BuildRequires: ncompress BuildRequires: libtirpc-devel %endif -%if %{with pam} -BuildRequires: pam-devel -%endif - Requires: openssl %if 0%{?_systemd} BuildRequires: systemd @@ -326,6 +322,19 @@ This package contains a initramfs module used to construct an initramfs image which is ZFS aware. %endif +%if %{with pam} +%package -n pam_zfs_key +Summary: PAM module for encrypted ZFS datasets + +%if 0%{?rhel}%{?centos}%{?fedora}%{?suse_version} +BuildRequires: pam-devel +%endif + +%description -n pam_zfs_key +This package contains the pam_zfs_key PAM module, which provides +support for unlocking datasets on user login. +%endif + %prep %if %{with debug} %define debug --enable-debug @@ -508,10 +517,6 @@ systemctl --system daemon-reload >/dev/null || true %config(noreplace) %{_sysconfdir}/%{name}/zpool.d/* %config(noreplace) %{_sysconfdir}/%{name}/vdev_id.conf.*.example %attr(440, root, root) %config(noreplace) %{_sysconfdir}/sudoers.d/* -%if %{with pam} -%{_libdir}/security/* -%{_datadir}/pam-configs/* -%endif %files -n libzpool5 %{_libdir}/libzpool.so.* @@ -561,3 +566,9 @@ systemctl --system daemon-reload >/dev/null || true # ignore those files. %exclude /usr/share/initramfs-tools %endif + +%if %{with pam} +%files -n pam_zfs_key +%{_libdir}/security/* +%{_datadir}/pam-configs/* +%endif