From 4d698330044fb798743426b90646f9a1742259bb Mon Sep 17 00:00:00 2001 From: Than Ngo Date: Mon, 13 Feb 2023 18:36:55 +0100 Subject: [PATCH] drop unnecessary opencryptoki-3.11.0-group.patch, problem with root run all the pkcs11 commands without the need to be a member of the pkcs11 group was fixed long ago --- opencryptoki-3.11.0-group.patch | 31 ------------------------------- opencryptoki-3.20.0-p11sak.patch | 11 +++++++++++ opencryptoki.spec | 5 ++--- 3 files changed, 13 insertions(+), 34 deletions(-) delete mode 100644 opencryptoki-3.11.0-group.patch diff --git a/opencryptoki-3.11.0-group.patch b/opencryptoki-3.11.0-group.patch deleted file mode 100644 index e88b391..0000000 --- a/opencryptoki-3.11.0-group.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff -up opencryptoki-3.11.0/usr/lib/api/shrd_mem.c.in.me opencryptoki-3.11.0/usr/lib/api/shrd_mem.c.in ---- opencryptoki-3.11.0/usr/lib/api/shrd_mem.c.in.me 2019-01-31 10:42:23.325797012 +0100 -+++ opencryptoki-3.11.0/usr/lib/api/shrd_mem.c.in 2019-01-31 10:52:17.585191667 +0100 -@@ -55,9 +55,11 @@ void *attach_shared_memory() - int shmid; - char *shmp; - struct stat statbuf; -+#if 0 - struct group *grp; - struct passwd *pw, *epw; - uid_t uid, euid; -+#endif - - #if !(MMAP) - // Really should fstat the tok_path, since it will be the actual -@@ -69,6 +71,7 @@ void *attach_shared_memory() - return NULL; - } - -+#if 0 - uid = getuid(); - euid = geteuid(); - // only check group membership if not root user -@@ -102,6 +105,7 @@ void *attach_shared_memory() - return NULL; - } - } -+#endif - - Anchor->shm_tok = ftok(TOK_PATH, 'b'); - diff --git a/opencryptoki-3.20.0-p11sak.patch b/opencryptoki-3.20.0-p11sak.patch index ccd4021..c608778 100644 --- a/opencryptoki-3.20.0-p11sak.patch +++ b/opencryptoki-3.20.0-p11sak.patch @@ -19,3 +19,14 @@ diff -up opencryptoki-3.18.0/Makefile.am.me opencryptoki-3.18.0/Makefile.am endif $(MKDIR_P) $(DESTDIR)/etc/ld.so.conf.d echo "$(libdir)/opencryptoki" >\ +diff -up opencryptoki-3.20.0/Makefile.am.me opencryptoki-3.20.0/Makefile.am +--- opencryptoki-3.20.0/Makefile.am.me 2023-02-13 17:23:17.263189936 +0100 ++++ opencryptoki-3.20.0/Makefile.am 2023-02-13 17:24:22.743815752 +0100 +@@ -39,7 +39,6 @@ include tools/tools.mk + include doc/doc.mk + + install-data-hook: +- getent group pkcs11 > /dev/null || $(GROUPADD) -r pkcs11 + if ENABLE_LIBRARY + $(MKDIR_P) $(DESTDIR)$(libdir)/opencryptoki/stdll + $(MKDIR_P) $(DESTDIR)$(libdir)/pkcs11 diff --git a/opencryptoki.spec b/opencryptoki.spec index 9fb698d..566bb3d 100644 --- a/opencryptoki.spec +++ b/opencryptoki.spec @@ -11,11 +11,9 @@ License: CPL URL: https://github.com/opencryptoki/opencryptoki Source0: https://github.com/opencryptoki/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz Source1: opencryptoki.module -# https://bugzilla.redhat.com/show_bug.cgi?id=732756 -Patch0: opencryptoki-3.11.0-group.patch # bz#1373833, change tmpfiles snippets from /var/lock/* to /run/lock/* Patch1: opencryptoki-3.11.0-lockdir.patch -# add missing config file +# fix install problem in buildroot Patch2: opencryptoki-3.20.0-p11sak.patch # upstream patches @@ -360,6 +358,7 @@ fi %changelog * Mon Feb 13 2023 Than Ngo - 3.20.0-1 - update to 3.20.0 +- drop unnecessary opencryptoki-3.11.0-group.patch * Wed Feb 08 2023 Than Ngo - 3.19.0-3 - Add support of ep11 token for new IBM Z Hardware (IBM z16)