Gentoo Archives: gentoo-commits

From: "Diego Petteno (flameeyes)" <flameeyes@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-libs/opencryptoki/files: opencryptoki-2.2.8-steal_shmem.patch opencryptoki-2.2.8-remove_openlog.patch pkcsslotd.init.2 opencryptoki-2.3.2-build.patch opencryptoki-2.2.8-remove_recursive_chmod.patch pkcsslotd.init
Date: Wed, 01 Dec 2010 03:25:26
Message-Id: 20101201032511.EF8F12004E@flycatcher.gentoo.org
1 flameeyes 10/12/01 03:25:11
2
3 Added: opencryptoki-2.2.8-steal_shmem.patch
4 opencryptoki-2.2.8-remove_openlog.patch
5 pkcsslotd.init.2 opencryptoki-2.3.2-build.patch
6 opencryptoki-2.2.8-remove_recursive_chmod.patch
7 Removed: pkcsslotd.init
8 Log:
9 Version bump, rewrite ebuild to actually make sense and work, with the help of the one to be found in chromiumos-overlay. Many thanks to Nathan Williams and Chris Masone for their fixes and the patches. Drop all the previous ebuilds and the previous init script as they are totally broken by design.
10
11 (Portage version: 2.2.0_alpha6/cvs/Linux x86_64)
12
13 Revision Changes Path
14 1.1 dev-libs/opencryptoki/files/opencryptoki-2.2.8-steal_shmem.patch
15
16 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/opencryptoki/files/opencryptoki-2.2.8-steal_shmem.patch?rev=1.1&view=markup
17 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/opencryptoki/files/opencryptoki-2.2.8-steal_shmem.patch?rev=1.1&content-type=text/plain
18
19 Index: opencryptoki-2.2.8-steal_shmem.patch
20 ===================================================================
21 diff -Naur opencryptoki-2.2.8.orig/usr/sbin/pkcsslotd/shmem.c opencryptoki-2.2.8/usr/sbin/pkcsslotd/shmem.c
22 --- opencryptoki-2.2.8.orig/usr/sbin/pkcsslotd/shmem.c 2010-06-02 09:18:27.000000000 -0700
23 +++ opencryptoki-2.2.8/usr/sbin/pkcsslotd/shmem.c 2010-06-02 11:41:31.000000000 -0700
24 @@ -374,10 +374,20 @@
25
26
27 if ( shmid < 0 ) {
28 - ErrLog(SLOTD_MSG(SHMEMCR,
29 - "Shared memory creation failed (0x%X)\n"), errno);
30 - ErrLog(SLOTD_MSG(IPCRM, "perform ipcrm -M 0x%X\n"), tok);
31 - return FALSE;
32 + ErrLog(SLOTD_MSG(SHMEMCR,
33 + "Shared memory creation failed (0x%X)\n"), errno);
34 + ErrLog(SLOTD_MSG(SHMEMCR, "Reclaiming 0x%X\n"), tok);
35 + shmid = shmget( tok, sizeof( Slot_Mgr_Shr_t ), 0 );
36 + DestroySharedMemory();
37 + shmid = shmget( tok, sizeof( Slot_Mgr_Shr_t ),
38 + IPC_CREAT | IPC_EXCL | S_IRUSR |
39 + S_IRGRP | S_IWUSR | S_IWGRP );
40 + if ( shmid < 0 ) {
41 + ErrLog(SLOTD_MSG(SHMEMCR,
42 + "Shared memory reclamation failed (0x%X)\n"), errno);
43 + ErrLog(SLOTD_MSG(IPCRM, "perform ipcrm -M 0x%X\n"), tok);
44 + return FALSE;
45 + }
46 }
47
48 // SAB Set the group ownership of the shared mem segment..
49
50
51
52 1.1 dev-libs/opencryptoki/files/opencryptoki-2.2.8-remove_openlog.patch
53
54 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/opencryptoki/files/opencryptoki-2.2.8-remove_openlog.patch?rev=1.1&view=markup
55 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/opencryptoki/files/opencryptoki-2.2.8-remove_openlog.patch?rev=1.1&content-type=text/plain
56
57 Index: opencryptoki-2.2.8-remove_openlog.patch
58 ===================================================================
59 --- opencryptoki-2.2.8.orig/usr/lib/pkcs11/api/apiutil.c 2010-06-04 17:04:48.000000000 -0400
60 +++ opencryptoki-2.2.8/usr/lib/pkcs11/api/apiutil.c 2010-06-04 17:06:23.000000000 -0400
61 @@ -380,7 +380,6 @@
62
63 if (!enabled){
64 enabled=1;
65 - openlog("openCryptokiModule",LOG_PID|LOG_NDELAY,LOG_DAEMON);
66 setlogmask(LOG_UPTO(LOG_DEBUG));
67 logit(LOG_DEBUG,"Logging enabled %d enabled",enabled);
68 }
69
70
71
72 1.1 dev-libs/opencryptoki/files/pkcsslotd.init.2
73
74 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/opencryptoki/files/pkcsslotd.init.2?rev=1.1&view=markup
75 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/opencryptoki/files/pkcsslotd.init.2?rev=1.1&content-type=text/plain
76
77 Index: pkcsslotd.init.2
78 ===================================================================
79 #!/sbin/runscript
80 # Copyright 1999-2010 Gentoo Foundation
81 # Distributed under the terms of the GNU General Public License v2
82
83 depend() {
84 need localmount
85
86 # Optional services (see ebuild)
87 need tcsd
88 }
89
90 start() {
91 # detect available tokens and set up
92 # /var/lib/opencryptoki/pk_config_data
93 ebegin "Preparing pkcs configuration"
94 /usr/sbin/pkcs11_startup
95
96 ebegin "Starting pkcsslotd"
97 start-stop-daemon --start --exec /usr/sbin/pkcsslotd --pidfile /var/run/pkcsslotd.pid
98 eend $? "Check your logs to see why startup failed"
99 }
100
101 stop() {
102 ebegin "Stopping pkcsslotd"
103 start-stop-daemon --stop --exec /usr/sbin/pkcsslotd --pidfile /var/run/pkcsslotd.pid
104 eend $?
105 }
106
107
108
109 1.1 dev-libs/opencryptoki/files/opencryptoki-2.3.2-build.patch
110
111 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/opencryptoki/files/opencryptoki-2.3.2-build.patch?rev=1.1&view=markup
112 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/opencryptoki/files/opencryptoki-2.3.2-build.patch?rev=1.1&content-type=text/plain
113
114 Index: opencryptoki-2.3.2-build.patch
115 ===================================================================
116 Index: opencryptoki-2.3.2/usr/lib/pkcs11/api/Makefile.am
117 ===================================================================
118 --- opencryptoki-2.3.2.orig/usr/lib/pkcs11/api/Makefile.am
119 +++ opencryptoki-2.3.2/usr/lib/pkcs11/api/Makefile.am
120 @@ -15,17 +15,17 @@ opencryptoki_libopencryptoki_la_CFLAGS =
121 opencryptoki_libopencryptoki_la_SOURCES = api_interface.c shrd_mem.c apiutil.c
122
123 install-data-hook:
124 + $(MKDIR_P) $(DESTDIR)$(libdir)/opencryptoki/stdll
125 + $(MKDIR_P) $(DESTDIR)$(libdir)/pkcs11
126 cd $(DESTDIR)$(libdir)/opencryptoki && \
127 ln -sf libopencryptoki.so PKCS11_API.so
128 cd $(DESTDIR)$(libdir)/opencryptoki && \
129 ln -sf $(sbindir) methods
130 - $(MKDIR_P) $(DESTDIR)$(libdir)/pkcs11
131 cd $(DESTDIR)$(libdir)/pkcs11 && \
132 ln -sf $(sbindir) methods
133 cd $(DESTDIR)$(libdir)/pkcs11 && \
134 ln -sf ../opencryptoki/libopencryptoki.so PKCS11_API.so
135 cd $(DESTDIR)$(libdir)/pkcs11 && \
136 ln -sf ../opencryptoki/libopencryptoki.so libopencryptoki.so
137 - $(MKDIR_P) $(DESTDIR)$(libdir)/opencryptoki/stdll
138 cd $(DESTDIR)$(libdir)/pkcs11 && \
139 ln -sf ../opencryptoki/stdll/ stdll
140
141
142
143 1.1 dev-libs/opencryptoki/files/opencryptoki-2.2.8-remove_recursive_chmod.patch
144
145 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/opencryptoki/files/opencryptoki-2.2.8-remove_recursive_chmod.patch?rev=1.1&view=markup
146 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/opencryptoki/files/opencryptoki-2.2.8-remove_recursive_chmod.patch?rev=1.1&content-type=text/plain
147
148 Index: opencryptoki-2.2.8-remove_recursive_chmod.patch
149 ===================================================================
150 Index: opencryptoki-2.3.2/usr/sbin/pkcs_slot/pkcs_slot.in
151 ===================================================================
152 --- opencryptoki-2.3.2.orig/usr/sbin/pkcs_slot/pkcs_slot.in
153 +++ opencryptoki-2.3.2/usr/sbin/pkcs_slot/pkcs_slot.in
154 @@ -356,12 +356,14 @@ fi
155 DEVICE=$1
156 DEPTH=$2
157
158 +# Ensure that any directories created are group-accessible
159 +umask 002
160 +
161 # Check for the existance of the directories
162 if [ ! -d @localstatedir@/lib/opencryptoki ]
163 then
164 @MKDIR_P@ @localstatedir@/lib/opencryptoki
165 @CHGRP@ pkcs11 @localstatedir@/lib/opencryptoki
166 - @CHMOD@ -R g+rwX @localstatedir@/lib/opencryptoki
167 fi
168
169
170 @@ -502,7 +504,6 @@ then
171 echo "TRUE|0|$SLOT_DESCRIPTION|$MANUFACTURER|TRUE|FALSE|TRUE|0|0|1|1|NONE|$CCA_DLL_FN|$CCA_INIT" >>$CFGFILE
172 fi
173
174 -@CHMOD@ -R g+wrX @localstatedir@/lib/opencryptoki