From 4ce1688b56961792650d4dbf1a5cfe8156a4b0162f7ba3639f60ee852f227e84 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Sat, 8 Dec 2012 18:43:00 +0000 Subject: [PATCH 1/3] tst OBS-URL: https://build.opensuse.org/package/show/security/openCryptoki?expand=0&rev=7 --- openCryptoki.spec | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/openCryptoki.spec b/openCryptoki.spec index 3b6e4d8..1a300d9 100644 --- a/openCryptoki.spec +++ b/openCryptoki.spec @@ -1,7 +1,7 @@ # # spec file for package openCryptoki # -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -15,7 +15,6 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # -# norootforbuild %define openCryptoki_32bit_arch %ix86 s390 ppc %arm # support in the workings for: ppc64 @@ -27,12 +26,16 @@ %define oc_cvs_tag opencryptoki-%{version} Name: openCryptoki -BuildRequires: gcc-c++ libica libtool openssl-devel pwdutils +BuildRequires: gcc-c++ +BuildRequires: libica +BuildRequires: libtool +BuildRequires: openssl-devel +BuildRequires: pwdutils Summary: An Implementation of PKCS#11 (Cryptoki) v2.11 for IBM Cryptographic Hardware -Version: 2.2.6 -Release: 0 License: IPL-1.0 Group: Productivity/Security +Version: 2.2.6 +Release: 0 # :pserver:anonymous@cvs.sourceforge.net:/cvsroot/opencryptoki # cvs co -r openCryptoki-2-1-5 -d openCryptoki-2-1-5 . Source: %{oc_cvs_tag}.tar.bz2 @@ -55,10 +58,11 @@ Cryptographic Accelerator (FC 4960 on pSeries). %package devel -License: IPL-1.0 Summary: An Implementation of PKCS#11 (Cryptoki) v2.01 for IBM Cryptographic Hardware Group: Development/Languages/C and C++ -Requires: openCryptoki = %{version}-%{release}, glibc-devel, openssl-devel +Requires: glibc-devel +Requires: openCryptoki = %{version}-%{release} +Requires: openssl-devel %description devel The PKCS#11 version 2.01 API implemented for the IBM cryptographic @@ -71,7 +75,6 @@ Cryptographic Accelerator (FC 4960 on pSeries). %ifarch %openCryptoki_32bit_arch %package 32bit -License: IPL-1.0 Summary: An Implementation of PKCS#11 (Cryptoki) v2.11 for IBM Cryptographic Hardware Group: Productivity/Security # this is needed to make sure the pkcs11 group exists before @@ -94,7 +97,6 @@ Cryptographic Accelerator (FC 4960 on pSeries). %ifarch %openCryptoki_64bit_arch %package 64bit -License: IPL-1.0 Summary: An Implementation of PKCS#11 (Cryptoki) v2.11 for IBM Cryptographic Hardware Group: Productivity/Security # this is needed to make sure the pkcs11 group exists before @@ -141,8 +143,16 @@ rm -f $RPM_BUILD_ROOT/%_libdir/opencryptoki/methods %pre # autobuild:/work/cd/lib/misc/group # openCryptoki pkcs11:x:64: -/usr/sbin/groupadd -g %pkcs11_group_id -o -r pkcs11 2>/dev/null || true +/usr/sbin/groupadd -g %pkcs11_group_id -r pkcs11 2>/dev/null || true # add root to group pkcs11 to enable root to run pkcsconf +echo $(/usr/bin/id --groups --name root | /bin/sed \ +-e 's/root//' -e ' +# add the pkcs group if it is missing +/(^| )pkcs11( |$)/!s/$/ pkcs11/ +# replace spaces by commas +y/ /,/ +'),pkcs11 root + /usr/sbin/usermod -G $(/usr/bin/id --groups --name root | /bin/sed \ -e 's/root//' -e ' # add the pkcs group if it is missing From bddeada3ae92723cb97cc0400a82394ec29e310515b8a37c42907b5bbd6fbec8 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Sat, 8 Dec 2012 18:50:55 +0000 Subject: [PATCH 2/3] - remove -o from groupadd - fixed sed script to not a grouplist with leading , OBS-URL: https://build.opensuse.org/package/show/security/openCryptoki?expand=0&rev=8 --- openCryptoki.changes | 6 ++++++ openCryptoki.spec | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/openCryptoki.changes b/openCryptoki.changes index 6f9dc84..d539bde 100644 --- a/openCryptoki.changes +++ b/openCryptoki.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sat Dec 8 18:51:31 UTC 2012 - meissner@suse.com + +- remove -o from groupadd +- fixed sed script to not a grouplist with leading , + ------------------------------------------------------------------- Sun Nov 27 06:59:49 UTC 2011 - coolo@suse.com diff --git a/openCryptoki.spec b/openCryptoki.spec index 1a300d9..75ae8c5 100644 --- a/openCryptoki.spec +++ b/openCryptoki.spec @@ -145,12 +145,16 @@ rm -f $RPM_BUILD_ROOT/%_libdir/opencryptoki/methods # openCryptoki pkcs11:x:64: /usr/sbin/groupadd -g %pkcs11_group_id -r pkcs11 2>/dev/null || true # add root to group pkcs11 to enable root to run pkcsconf +/usr/bin/id --groups --name root | /bin/sed -e 's/root//' + echo $(/usr/bin/id --groups --name root | /bin/sed \ -e 's/root//' -e ' # add the pkcs group if it is missing /(^| )pkcs11( |$)/!s/$/ pkcs11/ # replace spaces by commas y/ /,/ +# replace spaces by commas +s/^,// '),pkcs11 root /usr/sbin/usermod -G $(/usr/bin/id --groups --name root | /bin/sed \ @@ -159,6 +163,8 @@ y/ /,/ /(^| )pkcs11( |$)/!s/$/ pkcs11/ # replace spaces by commas y/ /,/ +# remove leading , if present +s/^,// '),pkcs11 root %post From 111fc52ebc016d21b24a621e427f4bebeb340d75e73199dafa7ea95bcbaa2679 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Sat, 8 Dec 2012 18:58:05 +0000 Subject: [PATCH 3/3] OBS-URL: https://build.opensuse.org/package/show/security/openCryptoki?expand=0&rev=9 --- openCryptoki.spec | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/openCryptoki.spec b/openCryptoki.spec index 75ae8c5..2d40732 100644 --- a/openCryptoki.spec +++ b/openCryptoki.spec @@ -144,19 +144,6 @@ rm -f $RPM_BUILD_ROOT/%_libdir/opencryptoki/methods # autobuild:/work/cd/lib/misc/group # openCryptoki pkcs11:x:64: /usr/sbin/groupadd -g %pkcs11_group_id -r pkcs11 2>/dev/null || true -# add root to group pkcs11 to enable root to run pkcsconf -/usr/bin/id --groups --name root | /bin/sed -e 's/root//' - -echo $(/usr/bin/id --groups --name root | /bin/sed \ --e 's/root//' -e ' -# add the pkcs group if it is missing -/(^| )pkcs11( |$)/!s/$/ pkcs11/ -# replace spaces by commas -y/ /,/ -# replace spaces by commas -s/^,// -'),pkcs11 root - /usr/sbin/usermod -G $(/usr/bin/id --groups --name root | /bin/sed \ -e 's/root//' -e ' # add the pkcs group if it is missing