From f072b8698a849c195ca058392f40e629011e33387ec39e96f294cb514827e5c6 Mon Sep 17 00:00:00 2001 From: Mark Post Date: Thu, 29 Nov 2018 22:49:07 +0000 Subject: [PATCH] - Don't hide error messages from the groupadd command. To eliminate a potentially common one, check to see if the pkcs11 group is already defined before trying to add it. - Update the summary for the -devel package. - Changed several PreReq entries to Requires(pre) as a result of the output from spec-cleaner. Removed a couple of obsolete lines. OBS-URL: https://build.opensuse.org/package/show/security/openCryptoki?expand=0&rev=80 --- openCryptoki.changes | 10 ++++++++++ openCryptoki.spec | 11 +++++------ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/openCryptoki.changes b/openCryptoki.changes index 4f21c0c..f75c1d5 100644 --- a/openCryptoki.changes +++ b/openCryptoki.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Thu Nov 29 22:45:36 UTC 2018 - mpost@suse.com + +- Don't hide error messages from the groupadd command. To eliminate + a potentially common one, check to see if the pkcs11 group is + already defined before trying to add it. +- Update the summary for the -devel package. +- Changed several PreReq entries to Requires(pre) as a result of + the output from spec-cleaner. Removed a couple of obsolete lines. + ------------------------------------------------------------------- Fri Nov 16 15:00:52 UTC 2018 - mpost@suse.com diff --git a/openCryptoki.spec b/openCryptoki.spec index 57a5010..a0bbbf4 100644 --- a/openCryptoki.spec +++ b/openCryptoki.spec @@ -57,10 +57,9 @@ BuildRequires: pkgconfig BuildRequires: pwdutils BuildRequires: trousers-devel BuildRequires: pkgconfig(systemd) -PreReq: %{_bindir}/id -PreReq: %{_sbindir}/groupadd -PreReq: %{_sbindir}/usermod -PreReq: /bin/sed +Requires(pre): %{_sbindir}/groupadd +Requires(pre): %{_sbindir}/usermod + # IBM maintains openCryptoki on these architectures: ExclusiveArch: %{openCryptoki_32bit_arch} %{openCryptoki_64bit_arch} %{?systemd_requires} @@ -76,7 +75,7 @@ coprocessor (with the PKCS#11 firmware loaded) and the IBM eServer Cryptographic Accelerator (FC 4960 on pSeries). %package devel -Summary: An Implementation of PKCS#11 (Cryptoki) v2.01 for IBM Cryptographic Hardware +Summary: Development files for openCryptoki, a PKCS#11 implementation for IBM hardware Group: Development/Languages/C and C++ Requires: glibc-devel Requires: libopenssl-devel @@ -166,7 +165,7 @@ rm -f %{buildroot}%{_libdir}/opencryptoki/methods %{service_add_pre pkcsslotd.service} # autobuild:/work/cd/lib/misc/group # openCryptoki pkcs11:x:64: -%{_sbindir}/groupadd -g %{pkcs11_group_id} -r pkcs11 2>/dev/null || true +%{_bindir}/getent group %{pkcs11_group_id} >/dev/null || %{_sbindir}/groupadd -g %{pkcs11_group_id} -r pkcs11 || true %{_sbindir}/usermod -a -G pkcs11 root %preun