diff --git a/softhsm-sysusers.conf b/softhsm-sysusers.conf new file mode 100644 index 0000000..b47c25f --- /dev/null +++ b/softhsm-sysusers.conf @@ -0,0 +1 @@ +u ods - "opendnssec daemon account" diff --git a/softhsm.spec b/softhsm.spec index faf4582..62c9b85 100644 --- a/softhsm.spec +++ b/softhsm.spec @@ -4,11 +4,12 @@ Summary: Software version of a PKCS#11 Hardware Security Module Name: softhsm Version: 2.6.1 -Release: %{?prever:0.}14%{?prever:.%{prever}}%{?dist}.1 +Release: %{?prever:0.}15%{?prever:.%{prever}}%{?dist} License: BSD Url: http://www.opendnssec.org/ Source: http://dist.opendnssec.org/source/%{?prever:testing/}%{name}-%{version}.tar.gz Source1: http://dist.opendnssec.org/source/%{?prever:testing/}%{name}-%{version}.tar.gz.sig +Source2: softhsm-sysusers.conf Patch1: softhsm-2.6.1-rh1831086-exit.patch Patch2: softhsm-openssl3-tests.patch @@ -75,6 +76,8 @@ autoreconf -fiv rm -rf %{buildroot} %make_install +install -D %{SOURCE2} %{buildroot}%{_sysusersdir}/%{name}.conf + rm %{buildroot}/%{_sysconfdir}/softhsm2.conf.sample rm -f %{buildroot}/%{_libdir}/pkcs11/*a mkdir -p %{buildroot}%{_includedir}/softhsm @@ -100,17 +103,15 @@ ln -s ../pkcs11/libsofthsm2.so %{buildroot}/%{_libdir}/softhsm/libsofthsm.so %attr(1770,ods,ods) %dir %{_sharedstatedir}/softhsm/tokens %doc LICENSE README.md NEWS %{_mandir}/*/* +%{_sysusersdir}/%{name}.conf %files devel %attr(0755,root,root) %dir %{_includedir}/softhsm %{_includedir}/softhsm/*.h %pre -getent group ods >/dev/null || groupadd -r ods -getent passwd ods >/dev/null || \ - useradd -r -g ods -d %{_sharedstatedir}/softhsm -s /sbin/nologin \ - -c "softhsm private keys owner" ods -exit 0 + +%sysusers_create_package %{name} %{SOURCE2} %post @@ -120,6 +121,10 @@ if [ -f /var/softhsm/slot0.db ]; then fi %changelog +* Thu Jan 23 2025 Rafael Jeffman - 2.6.1-15 +- Use systemd-sysusers + Resolves: RHEL-4901 + * Tue Oct 29 2024 Troy Dawson - 2.6.1-14.1 - Bump release for October 2024 mass rebuild: Resolves: RHEL-64018 @@ -377,4 +382,4 @@ fi - Upgraded to 1.3.0 * Thu Mar 3 2011 Paul Wouters - 1.2.0-1 -- Initial package for Fedora +- Initial package for Fedora