[coolkey/f14/master] Bug 631253 FTBFS coolkey doesn't rebuild.
Robert Relyea
rrelyea at fedoraproject.org
Wed Sep 8 21:12:36 UTC 2010
commit e19efae49aa2880d3f8fb8727dcacf721af37f68
Author: Robert Relyea <rrelyea at bobs-laptop.localhost>
Date: Wed Sep 8 14:07:21 2010 -0700
Bug 631253 FTBFS coolkey doesn't rebuild.
pcsc-lite has removed a symbol SCARD_READERSTATE_A.
The pcsc interface is based on the windows interface. Windows defines 3 values:
SCARD_READERSTATE - the reader state structure
SCARD_READERSTATE_A - the reader state structure with ascii pointers
SCARD_READERSTATE_W - the reader state structure with wchar_t pointers.
Linux has never supported the _W structures and so the _A was always identical
to the base define, and redunant.
coolkey-pcsc-lite-fix.patch | 58 +++++++++++++++++++++++++++++++++++++++++++
coolkey.spec | 9 ++++++-
2 files changed, 66 insertions(+), 1 deletions(-)
---
diff --git a/coolkey-pcsc-lite-fix.patch b/coolkey-pcsc-lite-fix.patch
new file mode 100644
index 0000000..8b1dcd8
--- /dev/null
+++ b/coolkey-pcsc-lite-fix.patch
@@ -0,0 +1,58 @@
+diff -up ./src/coolkey/slot.cpp.f14 ./src/coolkey/slot.cpp
+--- ./src/coolkey/slot.cpp.f14 2010-09-08 13:14:46.498363000 -0700
++++ ./src/coolkey/slot.cpp 2010-09-08 13:15:25.962285000 -0700
+@@ -2185,6 +2185,7 @@ Slot::readCACCertificateFirst(CKYBuffer
+ {
+ CKYStatus status;
+ CKYISOStatus apduRC;
++ *nextSize = 0;
+
+ if (mOldCAC) {
+ /* get the first 100 bytes of the cert */
+diff -up ./src/libckyapplet/cky_card.h.f14 ./src/libckyapplet/cky_card.h
+--- ./src/libckyapplet/cky_card.h.f14 2010-09-08 13:17:14.393067000 -0700
++++ ./src/libckyapplet/cky_card.h 2010-09-08 13:17:45.733005000 -0700
+@@ -41,23 +41,23 @@ CKYLIST_DECLARE(CKYReaderName, char *)
+ CKYLIST_DECLARE(CKYCardConnection, CKYCardConnection *)
+
+ CKY_BEGIN_PROTOS
+-void CKYReader_Init(SCARD_READERSTATE_A *reader);
+-void CKYReader_FreeData(SCARD_READERSTATE_A *reader);
++void CKYReader_Init(SCARD_READERSTATE *reader);
++void CKYReader_FreeData(SCARD_READERSTATE *reader);
+
+ /*
+- * "Accessors": for SCARD_READERSTATE_A structure as a class.
+- * These functions take an SCARD_READERSTATE_A which can also be referenced
++ * "Accessors": for SCARD_READERSTATE structure as a class.
++ * These functions take an SCARD_READERSTATE which can also be referenced
+ * directly.
+ */
+-CKYStatus CKYReader_SetReaderName(SCARD_READERSTATE_A *reader, const char *name);
+-const char *CKYReader_GetReaderName(const SCARD_READERSTATE_A *reader);
+-CKYStatus CKYReader_SetKnownState(SCARD_READERSTATE_A *reader,
++CKYStatus CKYReader_SetReaderName(SCARD_READERSTATE *reader, const char *name);
++const char *CKYReader_GetReaderName(const SCARD_READERSTATE *reader);
++CKYStatus CKYReader_SetKnownState(SCARD_READERSTATE *reader,
+ unsigned long state);
+-unsigned long CKYReader_GetKnownState(const SCARD_READERSTATE_A *reader);
+-unsigned long CKYReader_GetEventState(const SCARD_READERSTATE_A *reader);
+-CKYStatus CKYReader_GetATR(const SCARD_READERSTATE_A *reader, CKYBuffer *buf);
++unsigned long CKYReader_GetKnownState(const SCARD_READERSTATE *reader);
++unsigned long CKYReader_GetEventState(const SCARD_READERSTATE *reader);
++CKYStatus CKYReader_GetATR(const SCARD_READERSTATE *reader, CKYBuffer *buf);
+ /* create an array of READERSTATEs from a LIST of Readers */
+-SCARD_READERSTATE_A *CKYReader_CreateArray(const CKYReaderNameList readerNames,
++SCARD_READERSTATE *CKYReader_CreateArray(const CKYReaderNameList readerNames,
+ unsigned long *readerCount);
+ /* frees the reader, then the full array */
+ void CKYReader_DestroyArray(SCARD_READERSTATE *reader, unsigned long count);
+@@ -88,7 +88,7 @@ CKYStatus CKYCardContext_FindReadersByAT
+ const CKYBuffer *targetATR);
+ /* return if any of the readers in our array has changed in status */
+ CKYStatus CKYCardContext_WaitForStatusChange(CKYCardContext *context,
+- SCARD_READERSTATE_A *readers,
++ SCARD_READERSTATE *readers,
+ unsigned long readerCount,
+ unsigned long timeout);
+ /* cancel any current operation (such as wait for status change) on this
diff --git a/coolkey.spec b/coolkey.spec
index b43b648..269f97d 100644
--- a/coolkey.spec
+++ b/coolkey.spec
@@ -22,7 +22,7 @@
Name: coolkey
Version: 1.1.0
-Release: 16%{?dist}
+Release: 17%{?dist}
Summary: CoolKey PKCS #11 module
License: LGPLv2
URL: http://directory.fedora.redhat.com/wiki/CoolKey
@@ -34,6 +34,7 @@ Patch4: coolkey-simple-bugs.patch
Patch5: coolkey-thread-fix.patch
Patch6: coolkey-cac.patch
Patch7: coolkey-cac-1.patch
+Patch8: coolkey-pcsc-lite-fix.patch
Group: System Environment/Libraries
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: autoconf
@@ -69,6 +70,7 @@ Linux Driver support to access the CoolKey applet.
%patch5 -b .coolkey-thread-fix
%patch6 -b .cac
%patch7 -b .cac-1
+%patch8 -b .reader-state-fix
%build
autoconf
@@ -117,8 +119,13 @@ fi
%changelog
+* Wed Sep 8 2010 Robert Relyea <rrelyea at redhat.com> - 1.1.0-17
+- pscs-lite removed SCARD_READERSTATE_A definition. revert to the prefered
+ SCARD_READERSTATE
+
* Wed Jun 23 2010 Jack Magne <jmagne at redhat.com> - 1.1.0-16
- fix possible crash when loading cac certs.
+
* Wed Jun 16 2010 Robert Relyea <rrelyea at redhat.com> - 1.1.0-15
- better cac support.
More information about the scm-commits
mailing list