diff --git a/opensc-fix-gcc-warnings.patch b/opensc-fix-gcc-warnings.patch index 82dcf91..f89744f 100644 --- a/opensc-fix-gcc-warnings.patch +++ b/opensc-fix-gcc-warnings.patch @@ -1,7 +1,7 @@ Index: opensc-0.11.13/src/libopensc/card-belpic.c =================================================================== ---- opensc-0.11.13.orig/src/libopensc/card-belpic.c 2010-02-16 10:03:28.000000000 +0100 -+++ opensc-0.11.13/src/libopensc/card-belpic.c 2010-04-13 16:29:22.000000000 +0200 +--- opensc-0.11.13.orig/src/libopensc/card-belpic.c ++++ opensc-0.11.13/src/libopensc/card-belpic.c @@ -1338,7 +1338,7 @@ static int belpic_pin_cmd_usage(sc_card_ data->pin1.encoding = data->pin2.encoding = BELPIC_PIN_ENCODING; data->pin1.pad_char = data->pin2.pad_char = BELPIC_PAD_CHAR; @@ -11,17 +11,16 @@ Index: opensc-0.11.13/src/libopensc/card-belpic.c data->apdu = NULL; return iso_ops->pin_cmd(card, data, tries_left); -Index: opensc-0.11.13/src/libopensc/log.h +Index: opensc-0.11.13/src/libopensc/card-myeid.c =================================================================== ---- opensc-0.11.13.orig/src/libopensc/log.h 2010-02-16 10:03:28.000000000 +0100 -+++ opensc-0.11.13/src/libopensc/log.h 2010-04-13 16:30:36.000000000 +0200 -@@ -74,8 +74,8 @@ void sc_hex_dump(struct sc_context *ctx, - int _ret = (r); \ - if (_ret < 0) { \ - sc_do_log(ctx, SC_LOG_TYPE_ERROR, __FILE__, __LINE__, __FUNCTION__, "%s: %s\n", (text), sc_strerror(_ret)); \ -- return _ret; \ - } \ -+ return _ret; \ - } while(0) +--- opensc-0.11.13.orig/src/libopensc/card-myeid.c ++++ opensc-0.11.13/src/libopensc/card-myeid.c +@@ -394,7 +394,7 @@ static int myeid_create_file(struct sc_c + SC_FUNC_RETURN(card->ctx, 1, SC_ERROR_FILE_ALREADY_EXISTS); + + r = sc_check_sw(card, apdu.sw1, apdu.sw2); +- SC_TEST_RET(card->ctx, r, "Card returned error"); ++ SC_FUNC_RETURN(card->ctx, 1, r); + } - #define sc_perror(ctx, errno, str) { \ + /* no record oriented file services */ diff --git a/opensc-plugindir.patch b/opensc-plugindir.patch new file mode 100644 index 0000000..e0a0dba --- /dev/null +++ b/opensc-plugindir.patch @@ -0,0 +1,26 @@ +Index: opensc-0.11.13/src/signer/Makefile.am +=================================================================== +--- opensc-0.11.13/src/signer/Makefile.am ++++ opensc-0.11.13/src/signer/Makefile.am +@@ -2,8 +2,9 @@ MAINTAINERCLEANFILES = $(srcdir)/Makefil + + SUBDIRS = npinclude + if ENABLE_NSPLUGIN ++nsplugindir = $(plugindir) + noinst_HEADERS = opensc-crypto.h opensc-support.h signer.h +-lib_LTLIBRARIES = opensc-signer.la ++nsplugin_LTLIBRARIES = opensc-signer.la + dist_noinst_DATA = testprog.c + endif + +@@ -18,10 +19,3 @@ opensc_signer_la_LIBADD = $(OPENSSL_LIBS + opensc_signer_la_LDFLAGS = $(AM_LDFLAGS) \ + -export-symbols "$(srcdir)/signer.exports" \ + -module -avoid-version -no-undefined +- +-if ENABLE_NSPLUGIN +-plugin_DATA=#Create directory +-install-exec-hook: install-pluginDATA +- -rm -f "$(DESTDIR)$(plugindir)/opensc-signer.so" +- $(LN_S) "$(libdir)/opensc-signer.so" "$(DESTDIR)$(plugindir)" +-endif diff --git a/opensc.changes b/opensc.changes index a95e6d9..fbdf0f2 100644 --- a/opensc.changes +++ b/opensc.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Aug 23 14:15:22 CEST 2010 - sbrabec@suse.cz + +- Fixed broken opensc-fix-gcc-warnings.patch (bnc#627619). +- Simplified plugin installation. + ------------------------------------------------------------------- Tue Apr 13 14:35:32 UTC 2010 - puzel@novell.com diff --git a/opensc.spec b/opensc.spec index 3a49950..e8d52ce 100644 --- a/opensc.spec +++ b/opensc.spec @@ -35,7 +35,7 @@ Obsoletes: opensc-64bit # Url: http://www.opensc-project.org/opensc/ Version: 0.11.13 -Release: 1 +Release: 4 Group: Productivity/Security Summary: OpenSC Smart Card Library License: LGPLv2.1+ @@ -49,8 +49,12 @@ Source1: %{name}-ADVISORIES Source2: %{name}-rpmlintrc # and also skip-check-libtool-deps (and add these dependencies to the devel package) Source3: baselibs.conf +# PATCH-FIX-UPSTREAM opensc-libassuan-2.patch http://www.opensc-project.org/opensc/ticket/217 puzel@novell.com -- allows to build with libassuan2 Patch0: opensc-libassuan-2.patch +# PATCH-FIX-UPSTREAM opensc-fix-gcc-warnings.patch http://www.opensc-project.org/opensc/ticket/249 reddwarf@opensuse.org -- the card-myeid.c part has an equivalent fix in upstream's trunk Patch1: opensc-fix-gcc-warnings.patch +# PATCH-FIX-UPSTREAM opensc-plugindir.patch https://www.opensc-project.org/opensc/ticket/251 sbrabec@suse.cz -- clean plugin installation +Patch2: opensc-plugindir.patch %description OpenSC provides a set of libraries and utilities to access smart cards. @@ -131,6 +135,7 @@ Authors: %setup -q %patch0 -p1 %patch1 -p1 +%patch2 -p1 tr -d '\r' doc/nonpersistent/wiki.out/trac.css~ touch -r doc/nonpersistent/wiki.out/trac.css doc/nonpersistent/wiki.out/trac.css~ mv doc/nonpersistent/wiki.out/trac.css~ doc/nonpersistent/wiki.out/trac.css @@ -153,6 +158,7 @@ make %{?jobs:-j%jobs} %install %makeinstall +rm $RPM_BUILD_ROOT%{_libdir}/browser-plugins/*.la cp COPYING ADVISORIES doc/nonpersistent/ChangeLog $RPM_BUILD_ROOT%{_docdir}/%{name} %clean