diff --git a/opensc-0.17.0.tar.gz b/opensc-0.17.0.tar.gz deleted file mode 100644 index 31dddc7..0000000 --- a/opensc-0.17.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:be73c6816867ab4721e6a9ae7dba8e890c5f169f0a2cbb4bf354e0f30a948300 -size 1950547 diff --git a/opensc-0.18.0.tar.gz b/opensc-0.18.0.tar.gz new file mode 100644 index 0000000..290108e --- /dev/null +++ b/opensc-0.18.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9bc0ff030dd1c10f646d54415eae1bb2b1c72dda710378343f027e17cd8c3757 +size 2037073 diff --git a/opensc-bash-completions.patch b/opensc-bash-completions.patch new file mode 100644 index 0000000..8f4c994 --- /dev/null +++ b/opensc-bash-completions.patch @@ -0,0 +1,45 @@ +From e2285ded3e5e6c8c3446174200cfc1bbfe07be15 Mon Sep 17 00:00:00 2001 +From: Stanislav Brabec +Date: Fri, 22 Jun 2018 16:38:38 +0200 +Subject: [PATCH] Use correct bash-completion path + +Recent versions of bash is leaving /etc/bash_completion.d. The correct +directory is specified by pkg-config --variable completionsdir +bash-completion. + +Fixes https://github.com/OpenSC/OpenSC/issues/1403 +--- + configure.ac | 4 ++++ + doc/tools/Makefile.am | 1 - + 2 files changed, 4 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 700b14dc..6abad0b7 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -839,6 +839,10 @@ if test "${enable_cryptotokenkit}" = "yes"; then + fi + AC_DEFINE([ENABLE_CRYPTOTOKENKIT], [1], [Define if CryptoTokenKit is to be enabled]) + fi ++PKG_CHECK_MODULES([BASH_COMPLETION], [bash-completion >= 2.0], ++ [completiondir="`pkg-config --variable=completionsdir bash-completion`"], ++ [completiondir="${sysconfdir}/bash_completion.d"]) ++AC_SUBST([completiondir]) + + + AC_SUBST(DYN_LIB_EXT) +diff --git a/doc/tools/Makefile.am b/doc/tools/Makefile.am +index 17e4fbf1..4e2d941c 100644 +--- a/doc/tools/Makefile.am ++++ b/doc/tools/Makefile.am +@@ -15,7 +15,6 @@ man5_MANS = $(patsubst $(srcdir)/%.xml, %, $(wildcard $(srcdir)/*.5.xml)) + endif + + completion_DATA = $(patsubst $(srcdir)/%.1.xml, %, $(wildcard $(srcdir)/*.1.xml)) +-completiondir = $(sysconfdir)/bash_completion.d + + tools.html: $(srcdir)/tools.xml $(wildcard $(srcdir)/*.1.xml) $(wildcard $(srcdir)/*.5.xml) + $(XSLTPROC) --nonet --path "$(srcdir)/..:$(xslstylesheetsdir)/html" --xinclude -o $@ html.xsl $< +-- +2.17.1 + diff --git a/opensc-desktop.patch b/opensc-desktop.patch new file mode 100644 index 0000000..ac3d2a6 --- /dev/null +++ b/opensc-desktop.patch @@ -0,0 +1,22 @@ +Backport. +From d831076974f02dc7714f92526e6352ab18aee748 Mon Sep 17 00:00:00 2001 +From: Frank Morgner +Date: Fri, 22 Jun 2018 08:47:06 +0200 +Subject: [PATCH] opensc-notify: use generic icon + +fixes https://github.com/OpenSC/OpenSC/issues/1402 +--- + src/tools/org.opensc.notify.desktop.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: opensc-0.18.0/src/tools/org.opensc.notify.desktop.in +=================================================================== +--- opensc-0.18.0.orig/src/tools/org.opensc.notify.desktop.in ++++ opensc-0.18.0/src/tools/org.opensc.notify.desktop.in +@@ -3,5 +3,5 @@ Name=OpenSC Notify + Type=Application + Comment=Monitor smart card events to send notifications. + Exec=@bindir@/opensc-notify +-Icon=preferences-system-notifications ++Icon=utilities-system-monitor + Categories=Security;System; diff --git a/opensc-desktop2.patch b/opensc-desktop2.patch new file mode 100644 index 0000000..64fb29b --- /dev/null +++ b/opensc-desktop2.patch @@ -0,0 +1,11 @@ +Index: opensc-0.18.0/src/tools/org.opensc.notify.desktop.in +=================================================================== +--- opensc-0.18.0.orig/src/tools/org.opensc.notify.desktop.in ++++ opensc-0.18.0/src/tools/org.opensc.notify.desktop.in +@@ -1,5 +1,6 @@ + [Desktop Entry] + Name=OpenSC Notify ++GenericName=Smard card notification + Type=Application + Comment=Monitor smart card events to send notifications. + Exec=@bindir@/opensc-notify diff --git a/opensc.changes b/opensc.changes index e2d2739..4eb8d13 100644 --- a/opensc.changes +++ b/opensc.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Fri Jun 22 16:43:27 CEST 2018 - sbrabec@suse.com + +- Update to version 0.18.0: + * Further improvements of PIN support. + * Large number of improvements and fixes (boo#1097951). + * See /usr/share/doc/packages/opensc/NEWS for complete list. +- Add opensc-desktop.patch and opensc-bash-completions.patch. + ------------------------------------------------------------------- Mon Jan 1 16:16:13 UTC 2018 - michael@stroeder.com diff --git a/opensc.spec b/opensc.spec index 33d98c6..1990988 100644 --- a/opensc.spec +++ b/opensc.spec @@ -17,29 +17,36 @@ Name: opensc -Version: 0.17.0 +Version: 0.18.0 Release: 0 Summary: Smart Card Utilities -License: LGPL-2.1+ +License: LGPL-2.1-or-later Group: Productivity/Security Url: https://github.com/OpenSC/OpenSC/wiki Source: https://github.com/OpenSC/OpenSC/releases/download/%{version}/%{name}-%{version}.tar.gz Source1: baselibs.conf Source2: %{name}-rpmlintrc # Register with p11-kit -# https://www.opensc-project.org/opensc/ticket/390 +# https://web.archive.org/web/20111225073733/http://www.opensc-project.org/opensc/ticket/390 Source3: opensc.module +# PATCH-FIX-UPSTREAM opensc-desktop.patch https://github.com/OpenSC/OpenSC/issues/1402 sbrabec@suse.com -- Fix desktop file. +Patch1: opensc-desktop.patch +# PATCH-FIX-UPSTREAM opensc-bash-completions.patch sbrabec@suse.com https://github.com/OpenSC/OpenSC/issues/1403 -- Use correct bash-completion path. +Patch2: opensc-bash-completions.patch +# PATCH-FEATURE-OPENSUSE opensc-desktop2.patch https://github.com/OpenSC/OpenSC/issues/1402 sbrabec@suse.com -- Add GenericName to the desktop file. +Patch3: opensc-desktop2.patch BuildRequires: docbook-xsl-stylesheets BuildRequires: libtool BuildRequires: libxslt BuildRequires: pkgconfig BuildRequires: readline-devel +BuildRequires: pkgconfig(bash-completion) BuildRequires: pkgconfig(libpcsclite) BuildRequires: pkgconfig(openssl) - Requires: pcsc-lite # There is no more devel package. Obsoletes: opensc-devel < %{version} +%define completionsdir %(pkg-config --variable completionsdir bash-completion) %description OpenSC provides a set of utilities to access smart cards. It mainly @@ -58,6 +65,9 @@ may require third party proprietary software. %prep %setup -q +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 %build autoreconf -fvi @@ -85,6 +95,7 @@ install -D -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/pkcs11/modules/opensc.mo %doc %{_docdir}/%{name}/README %doc %{_docdir}/%{name}/tools.html %{_bindir}/* +%{_datadir}/applications/*.desktop %{_datadir}/opensc # Note: .la and .so must be in the main package, required by ltdl: %{_libdir}/*.la @@ -96,8 +107,8 @@ install -D -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/pkcs11/modules/opensc.mo %config %{_sysconfdir}/opensc.conf %dir %{_sysconfdir}/pkcs11 %config %{_sysconfdir}/pkcs11/modules/ -%{_sysconfdir}/bash_completion.d/* # This is a private library. There is no reason to split it to libopensc* package. %{_libdir}/libopensc.so.* +%{completionsdir}/* %changelog