]> git.pld-linux.org Git - packages/opensc.git/commitdiff
- updated to 0.12.0
authorJakub Bogusz <qboosh@pld-linux.org>
Sat, 8 Jan 2011 18:32:54 +0000 (18:32 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- removed obsolete assuan-2,pcsc patches
- libopensc API no longer public

Changed files:
    opensc-libassuan-2.patch -> 1.2
    opensc-pcsc.patch -> 1.2
    opensc.spec -> 1.70

opensc-libassuan-2.patch [deleted file]
opensc-pcsc.patch [deleted file]
opensc.spec

diff --git a/opensc-libassuan-2.patch b/opensc-libassuan-2.patch
deleted file mode 100644 (file)
index 66d6807..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
----
- m4/gpg-error.m4     |   65 ++++++++++++++++++++++++++++++++++++++++++++++++++++
- m4/libassuan.m4     |    2 -
- src/signer/dialog.c |   35 +++++++++++++++++-----------
- 3 files changed, 88 insertions(+), 14 deletions(-)
-
-Index: opensc-0.11.13/m4/libassuan.m4
-===================================================================
---- opensc-0.11.13.orig/m4/libassuan.m4        2009-12-13 10:14:26.000000000 +0100
-+++ opensc-0.11.13/m4/libassuan.m4     2010-04-13 12:26:56.000000000 +0200
-@@ -26,7 +26,7 @@ AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON],
-   fi
-   AC_PATH_PROG(LIBASSUAN_CONFIG, libassuan-config, no)
--  tmp=ifelse([$1], ,1:0.9.2,$1)
-+  tmp=ifelse([$1], ,2:2.0.0,$1)
-   if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
-     req_libassuan_api=`echo "$tmp"     | sed 's/\(.*\):\(.*\)/\1/'`
-     min_libassuan_version=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\2/'`
-Index: opensc-0.11.13/src/signer/dialog.c
-===================================================================
---- opensc-0.11.13.orig/src/signer/dialog.c    2010-02-16 10:03:25.000000000 +0100
-+++ opensc-0.11.13/src/signer/dialog.c 2010-04-13 16:03:10.000000000 +0200
-@@ -15,31 +15,31 @@ struct entry_parm_s {
-   char *buffer;
- };
--static AssuanError
-+static gpg_error_t
- getpin_cb (void *opaque, const void *buffer, size_t length)
- {
-   struct entry_parm_s *parm = (struct entry_parm_s *) opaque;
-   /* we expect the pin to fit on one line */
-   if (parm->lines || length >= parm->size)
--    return ASSUAN_Too_Much_Data;
-+    return gpg_error(GPG_ERR_ASS_TOO_MUCH_DATA);
-   /* fixme: we should make sure that the assuan buffer is allocated in
-      secure memory or read the response byte by byte */
-   memcpy(parm->buffer, buffer, length);
-   parm->buffer[length] = 0;
-   parm->lines++;
--  return (AssuanError) 0;
-+  return gpg_error(GPG_ERR_NO_ERROR);
- }
- int ask_and_verify_pin_code(struct sc_pkcs15_card *p15card,
-                           struct sc_pkcs15_object *pin)
- {
--      int r;
-+      gpg_error_t r;
-       size_t len;
-       const char *argv[3];
-       const char *pgmname = PIN_ENTRY;
--      ASSUAN_CONTEXT ctx;
-+      assuan_context_t ctx = NULL;
-       char buf[500];
-       char errtext[100];
-       struct entry_parm_s parm;
-@@ -48,16 +48,26 @@ int ask_and_verify_pin_code(struct sc_pk
-       argv[0] = pgmname;
-       argv[1] = NULL;
-       
--      r = assuan_pipe_connect(&ctx, pgmname, (char **) argv, NULL);
-+      assuan_set_gpg_err_source (GPG_ERR_SOURCE_DEFAULT);
-+
-+      r = assuan_new(&ctx);
-+      if (r) {
-+              printf("Can't initialize assuan context: %s\n)",
-+                      gpg_strerror(r));
-+              goto err;
-+      }
-+      
-+      r = assuan_pipe_connect(ctx, pgmname, (const char **) argv, \
-+                              NULL, NULL, NULL, 0);
-       if (r) {
-               printf("Can't connect to the PIN entry module: %s\n",
--                     assuan_strerror((AssuanError) r));
-+                     gpg_strerror(r));
-               goto err;
-       }
-       sprintf(buf, "SETDESC Enter PIN [%s] for digital signing  ", pin->label);
-       r = assuan_transact(ctx, buf, NULL, NULL, NULL, NULL, NULL, NULL);
-       if (r) {
--              printf("SETDESC: %s\n", assuan_strerror((AssuanError) r));
-+              printf("SETDESC: %s\n", gpg_strerror(r));
-               goto err;
-       }
-       errtext[0] = 0;
-@@ -71,12 +81,12 @@ int ask_and_verify_pin_code(struct sc_pk
-               parm.size = sizeof(buf);
-               parm.buffer = buf;
-               r = assuan_transact(ctx, "GETPIN", getpin_cb, &parm, NULL, NULL, NULL, NULL);
--              if (r == ASSUAN_Canceled) {
--                      assuan_disconnect(ctx);
-+              if (gpg_err_code(r) == GPG_ERR_ASS_CANCELED) {
-+                      assuan_release(ctx);
-                       return -2;
-               }
-               if (r) {
--                      printf("GETPIN: %s\n", assuan_strerror((AssuanError) r));
-+                      printf("GETPIN: %s\n", gpg_strerror(r));
-                       goto err;
-               }
-               len = strlen(buf);
-@@ -104,9 +114,9 @@ int ask_and_verify_pin_code(struct sc_pk
-                       break;
-       }
--      assuan_disconnect(ctx); 
-+      assuan_release(ctx);
-       return 0;
- err:  
--      assuan_disconnect(ctx);
-+      assuan_release(ctx);
-       return -1;
- }
diff --git a/opensc-pcsc.patch b/opensc-pcsc.patch
deleted file mode 100644 (file)
index 2db36b7..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
---- opensc-0.11.13/src/libopensc/reader-pcsc.c.orig    2010-02-16 10:03:28.000000000 +0100
-+++ opensc-0.11.13/src/libopensc/reader-pcsc.c 2010-08-09 08:30:20.494823295 +0200
-@@ -80,7 +80,7 @@ struct pcsc_private_data {
- struct pcsc_slot_data {
-       SCARDHANDLE pcsc_card;
--      SCARD_READERSTATE_A reader_state;
-+      SCARD_READERSTATE reader_state;
-       DWORD verify_ioctl;
-       DWORD verify_ioctl_start;
-       DWORD verify_ioctl_finish;
-@@ -353,7 +353,7 @@ static int pcsc_wait_for_event(sc_reader
-       sc_context_t *ctx;
-       SCARDCONTEXT pcsc_ctx;
-       LONG ret;
--      SCARD_READERSTATE_A rgReaderStates[SC_MAX_READERS];
-+      SCARD_READERSTATE rgReaderStates[SC_MAX_READERS];
-       unsigned long on_bits, off_bits;
-       time_t end_time, now, delta;
-       size_t i;
-@@ -401,7 +401,7 @@ static int pcsc_wait_for_event(sc_reader
-       /* Wait for a status change and return if it's a card insert/removal
-        */
-       for( ; ; ) {
--              SCARD_READERSTATE_A *rsp;
-+              SCARD_READERSTATE *rsp;
-               /* Scan the current state of all readers to see if they
-                * match any of the events we're polling for */
---- opensc-0.11.13/src/libopensc/internal-winscard.h.orig      2010-02-16 10:03:28.000000000 +0100
-+++ opensc-0.11.13/src/libopensc/internal-winscard.h   2010-08-09 08:32:13.282823295 +0200
-@@ -77,7 +77,7 @@ typedef struct
-       unsigned long cbAtr;
-       unsigned char rgbAtr[MAX_ATR_SIZE];
- }
--SCARD_READERSTATE_A;
-+SCARD_READERSTATE;
- typedef struct _SCARD_IO_REQUEST
- {
-@@ -87,8 +87,8 @@ typedef struct _SCARD_IO_REQUEST
- SCARD_IO_REQUEST, *PSCARD_IO_REQUEST, *LPSCARD_IO_REQUEST;
- typedef const SCARD_IO_REQUEST *LPCSCARD_IO_REQUEST;
--typedef SCARD_READERSTATE_A SCARD_READERSTATE, *PSCARD_READERSTATE_A,
--      *LPSCARD_READERSTATE_A;
-+typedef SCARD_READERSTATE *PSCARD_READERSTATE,
-+      *LPSCARD_READERSTATE;
- #endif        /* HAVE_SCARD_H */
-@@ -113,7 +113,7 @@ typedef LONG (PCSC_API *SCardEndTransact
- typedef LONG (PCSC_API *SCardStatus_t)(SCARDHANDLE hCard, LPSTR mszReaderNames, LPDWORD pcchReaderLen,
-       LPDWORD pdwState, LPDWORD pdwProtocol, LPBYTE pbAtr, LPDWORD pcbAtrLen);
- typedef LONG (PCSC_API *SCardGetStatusChange_t)(SCARDCONTEXT hContext, DWORD dwTimeout,
--      LPSCARD_READERSTATE_A rgReaderStates, DWORD cReaders);
-+      SCARD_READERSTATE *rgReaderStates, DWORD cReaders);
- typedef LONG (PCSC_API *SCardControlOLD_t)(SCARDHANDLE hCard, LPCVOID pbSendBuffer, DWORD cbSendLength,
-       LPVOID pbRecvBuffer, LPDWORD lpBytesReturned);
- typedef LONG (PCSC_API *SCardControl_t)(SCARDHANDLE hCard, DWORD dwControlCode, LPCVOID pbSendBuffer,
index b12a0ff890dae74e3446c297949b00a11a4f9fef..3691db8b8f93c4e8efaa6fcc8e98f8f32916df5f 100644 (file)
@@ -1,36 +1,39 @@
+#
+# Conditional build:
+%bcond_without openct  # use PCSC directly, without OpenCT support
+#
 Summary:       OpenSC library - for accessing SmartCard devices using PC/SC Lite
 Summary(pl.UTF-8):     Biblioteka OpenSC - do korzystania z kart procesorowych przy użyciu PC/SC Lite
 Name:          opensc
-Version:       0.11.13
-Release:       2
+Version:       0.12.0
+Release:       1
 Epoch:         0
 License:       LGPL v2.1+
 Group:         Applications
 Source0:       http://www.opensc-project.org/files/opensc/%{name}-%{version}.tar.gz
-# Source0-md5: 98fa151e947941f9c3f27420fdf47c11
+# Source0-md5: 630fa3b8717d22a1d069d120153a0c52
 Source1:       %{name}-initramfs-hook
 Source2:       %{name}-initramfs-local-bottom
 Source3:       %{name}-initramfs-local-top
 Source4:       %{name}-initramfs-README
-Patch0:                %{name}-libassuan-2.patch
-Patch1:                %{name}-pcsc.patch
 URL:           http://www.opensc-project.org/
 BuildRequires: autoconf >= 2.60
 BuildRequires: automake >= 1:1.10
-BuildRequires: libassuan-devel >= 1:2.0.0
+BuildRequires: docbook-style-xsl
 BuildRequires: libltdl-devel
 BuildRequires: libtool >= 1:1.4.2-9
 BuildRequires: libxslt-progs
-BuildRequires: openct-devel
+%{?with_openct:BuildRequires:  openct-devel}
 BuildRequires: openldap-devel >= 2.4.6
 BuildRequires: openssl-devel >= 0.9.7d
-BuildRequires: pcsc-lite-devel >= 1.6.0
+%{!?with_openct:BuildRequires: pcsc-lite-devel >= 1.6.0}
 BuildRequires: pkgconfig >= 1:0.9.0
 BuildRequires: readline-devel
 BuildRequires: rpmbuild(macros) >= 1.364
-BuildRequires: xorg-lib-libXt-devel
 BuildRequires: zlib-devel
-Requires:      pcsc-lite-libs >= 1.6.0
+%{!?with_openct:Requires:      pcsc-lite-libs >= 1.6.0}
+Obsoletes:     browser-plugin-opensc
+Obsoletes:     mozilla-plugin-opensc
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 # datadir is used for config files and (editable) profiles
@@ -62,9 +65,9 @@ Summary(pl.UTF-8):    Pliki dla programistów używających OpenSC
 Group:         Development/Tools
 Requires:      %{name} = %{epoch}:%{version}-%{release}
 Requires:      libltdl-devel
-Requires:      openct-devel
+%{?with_openct:Requires:       openct-devel}
 Requires:      openssl-devel
-Requires:      pcsc-lite-devel >= 1.6.0
+%{!?with_openct:Requires:      pcsc-lite-devel >= 1.6.0}
 
 %description devel
 OpenSC development files.
@@ -73,37 +76,16 @@ OpenSC development files.
 Pliki dla programistów używających OpenSC.
 
 %package static
-Summary:       Static OpenSC libraries
-Summary(pl.UTF-8):     Bibloteki statyczne OpenSC
+Summary:       Static OpenSC library
+Summary(pl.UTF-8):     Bibloteka statyczna OpenSC
 Group:         Development/Tools
 Requires:      %{name}-devel = %{epoch}:%{version}-%{release}
 
 %description static
-Static OpenSC libraries.
+Static OpenSC library.
 
 %description static -l pl.UTF-8
-Statyczne biblioteki OpenSC.
-
-%package -n browser-plugin-opensc
-Summary:       OpenSC Signer plugin for Mozilla
-Summary(pl.UTF-8):     Wtyczka OpenSC Signer dla Mozilli
-Group:         X11/Applications
-Requires:      %{name} = %{epoch}:%{version}-%{release}
-Requires:      browser-plugins >= 2.0
-Requires:      browser-plugins(%{_target_base_arch})
-Requires:      pinentry >= 0.7.5-2
-Provides:      mozilla-plugin-opensc
-Obsoletes:     mozilla-plugin-opensc
-
-%description -n browser-plugin-opensc
-OpenSC Signer browser plugin.
-
-Supported browsers: %{browsers}.
-
-%description -n browser-plugin-opensc -l pl.UTF-8
-Wtyczka OpenSC Signer dla przeglądarek.
-
-Obsługiwane przeglądarki: %{browsers}.
+Biblioteka statyczna OpenSC.
 
 %package initramfs
 Summary:       OpenSC support scripts for initramfs-tools
@@ -120,8 +102,6 @@ Skrypty dla initramfs-tools ze wsparciem dla OpenSC.
 
 %prep
 %setup -q
-%patch0 -p1
-%patch1 -p1
 
 install %{SOURCE4} README.initramfs
 
@@ -132,37 +112,29 @@ install %{SOURCE4} README.initramfs
 %{__autoheader}
 %{__automake}
 %configure \
-       --enable-openct \
-       --enable-nsplugin \
-       --enable-pcsc \
-       --with-pcsc-provider=%{_libdir}/libpcsclite.so.1 \
-       --with-pinentry=/usr/bin/pinentry \
-       --with-plugindir=%{_browserpluginsdir}
+       %{?with_openct:--enable-openct --disable-pcsc} \
+       %{!?with_openct:--enable-pcsc --disable-openct} \
+       --enable-doc \
+       --with-pcsc-provider=%{_libdir}/libpcsclite.so.1
 
 %{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_browserpluginsdir} \
-       $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/{hooks,scripts/local-{bottom,top}}
+install -d $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/{hooks,scripts/local-{bottom,top}}
 
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
 
-# just install instead of symlinking
-%{__rm} $RPM_BUILD_ROOT%{_browserpluginsdir}/opensc-signer.so
-mv -f $RPM_BUILD_ROOT%{_libdir}/opensc-signer.so $RPM_BUILD_ROOT%{_browserpluginsdir}
-
 # default config
-install etc/opensc.conf $RPM_BUILD_ROOT%{_sysconfdir}
+#install etc/opensc.conf $RPM_BUILD_ROOT%{_sysconfdir}
 
 install %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/hooks/opensc
 install %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/scripts/local-bottom/opensc
 install %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/scripts/local-top/opensc
 
-# useless (dlopened by *.so)
-rm -f $RPM_BUILD_ROOT%{_libdir}/{onepin-opensc,opensc,pkcs11}-*.{a,la} \
-       $RPM_BUILD_ROOT%{_libdir}/opensc/*.{a,la}
+# not needed (dlopened by soname)
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/{onepin-opensc-pkcs11,opensc-pkcs11,pkcs11-spy}.la
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -170,18 +142,9 @@ rm -rf $RPM_BUILD_ROOT
 %post  -p /sbin/ldconfig
 %postun        -p /sbin/ldconfig
 
-%post  -n browser-plugin-opensc
-%update_browser_plugins
-
-%postun        -n browser-plugin-opensc
-if [ "$1" = "0" ]; then
-        %update_browser_plugins
-fi
-
 %files
 %defattr(644,root,root,755)
-%doc NEWS README doc/nonpersistent/{ChangeLog,wiki.out} doc/html.out/tools.html
-%attr(755,root,root) %{_bindir}/cardos-info
+%doc ChangeLog NEWS README doc/html.out/tools.html
 %attr(755,root,root) %{_bindir}/cardos-tool
 %attr(755,root,root) %{_bindir}/cryptoflex-tool
 %attr(755,root,root) %{_bindir}/eidenv
@@ -190,15 +153,13 @@ fi
 %attr(755,root,root) %{_bindir}/opensc-tool
 %attr(755,root,root) %{_bindir}/piv-tool
 %attr(755,root,root) %{_bindir}/pkcs11-tool
-%attr(755,root,root) %{_bindir}/pkcs15-*
+%attr(755,root,root) %{_bindir}/pkcs15-crypt
+%attr(755,root,root) %{_bindir}/pkcs15-init
+%attr(755,root,root) %{_bindir}/pkcs15-tool
 %attr(755,root,root) %{_bindir}/rutoken-tool
 %attr(755,root,root) %{_bindir}/westcos-tool
 %attr(755,root,root) %{_libdir}/libopensc.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libopensc.so.2
-%attr(755,root,root) %{_libdir}/libpkcs15init.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libpkcs15init.so.2
-%attr(755,root,root) %{_libdir}/libscconf.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libscconf.so.2
+%attr(755,root,root) %ghost %{_libdir}/libopensc.so.3
 # PKCS11 modules
 %attr(755,root,root) %{_libdir}/onepin-opensc-pkcs11.so
 %attr(755,root,root) %{_libdir}/opensc-pkcs11.so
@@ -216,36 +177,20 @@ fi
 %{_mandir}/man1/opensc-explorer.1*
 %{_mandir}/man1/opensc-tool.1*
 %{_mandir}/man1/pkcs11-tool.1*
-%{_mandir}/man1/pkcs15-*.1*
+%{_mandir}/man1/pkcs15-crypt.1*
+%{_mandir}/man1/pkcs15-init.1*
+%{_mandir}/man1/pkcs15-tool.1*
 %{_mandir}/man1/westcos-tool.1*
 %{_mandir}/man5/pkcs15-profile.5*
 
 %files devel
 %defattr(644,root,root,755)
-%doc doc/html.out/api.html
-%attr(755,root,root) %{_bindir}/opensc-config
 %attr(755,root,root) %{_libdir}/libopensc.so
-%attr(755,root,root) %{_libdir}/libpkcs15init.so
-%attr(755,root,root) %{_libdir}/libscconf.so
 %{_libdir}/libopensc.la
-%{_libdir}/libpkcs15init.la
-%{_libdir}/libscconf.la
-%{_includedir}/opensc
-%{_pkgconfigdir}/libopensc.pc
-%{_pkgconfigdir}/libpkcs15init.pc
-%{_pkgconfigdir}/libscconf.pc
-%{_mandir}/man1/opensc-config.1*
-%{_mandir}/man3/sc_*.3*
 
 %files static
 %defattr(644,root,root,755)
 %{_libdir}/libopensc.a
-%{_libdir}/libpkcs15init.a
-%{_libdir}/libscconf.a
-
-%files -n browser-plugin-opensc
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_browserpluginsdir}/opensc-signer.so
 
 %files initramfs
 %defattr(644,root,root,755)
This page took 0.086647 seconds and 4 git commands to generate.