From 8b4a709161cf5dfcec9bfed35a60eded1df2c7ea83acd40fd1c44a17ac4ccf84 Mon Sep 17 00:00:00 2001 From: Stanislav Brabec Date: Mon, 25 Jun 2018 15:55:59 +0000 Subject: [PATCH 1/3] Accepting request 618520 from home:sbrabec:branches:security:chipcard - 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. OBS-URL: https://build.opensuse.org/request/show/618520 OBS-URL: https://build.opensuse.org/package/show/security:chipcard/opensc?expand=0&rev=51 --- opensc-0.17.0.tar.gz | 3 --- opensc-0.18.0.tar.gz | 3 +++ opensc-bash-completions.patch | 45 +++++++++++++++++++++++++++++++++++ opensc-desktop.patch | 22 +++++++++++++++++ opensc-desktop2.patch | 11 +++++++++ opensc.changes | 9 +++++++ opensc.spec | 21 ++++++++++++---- 7 files changed, 106 insertions(+), 8 deletions(-) delete mode 100644 opensc-0.17.0.tar.gz create mode 100644 opensc-0.18.0.tar.gz create mode 100644 opensc-bash-completions.patch create mode 100644 opensc-desktop.patch create mode 100644 opensc-desktop2.patch 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 From 7fe76428463a17f8944b87d2302c8d2324e4cc55f7f2e1d3486e8b116155cc61 Mon Sep 17 00:00:00 2001 From: Stanislav Brabec Date: Tue, 10 Jul 2018 14:50:23 +0000 Subject: [PATCH 2/3] Add another BOO. OBS-URL: https://build.opensuse.org/package/show/security:chipcard/opensc?expand=0&rev=52 --- opensc.changes | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/opensc.changes b/opensc.changes index 4eb8d13..aac0db9 100644 --- a/opensc.changes +++ b/opensc.changes @@ -3,7 +3,8 @@ 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). + * Large number of improvements and fixes + (boo#1097951, boo#1100501). * See /usr/share/doc/packages/opensc/NEWS for complete list. - Add opensc-desktop.patch and opensc-bash-completions.patch. From defc0af54f231a018ccaf75ac48c3ca894910a75e2514e82c05291a2c80039b1 Mon Sep 17 00:00:00 2001 From: Stanislav Brabec Date: Tue, 10 Jul 2018 14:57:49 +0000 Subject: [PATCH 3/3] - Replace patch preambles by the upstream ones. - Add missing patch to changes. OBS-URL: https://build.opensuse.org/package/show/security:chipcard/opensc?expand=0&rev=53 --- opensc-bash-completions.patch | 4 ++-- opensc-desktop2.patch | 22 ++++++++++++++++++---- opensc.changes | 5 +++-- 3 files changed, 23 insertions(+), 8 deletions(-) diff --git a/opensc-bash-completions.patch b/opensc-bash-completions.patch index 8f4c994..256814a 100644 --- a/opensc-bash-completions.patch +++ b/opensc-bash-completions.patch @@ -1,4 +1,4 @@ -From e2285ded3e5e6c8c3446174200cfc1bbfe07be15 Mon Sep 17 00:00:00 2001 +From b0a20fa7ca30dc6c6198954fadc5a7fe812834dc 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 @@ -41,5 +41,5 @@ index 17e4fbf1..4e2d941c 100644 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 +2.18.0 diff --git a/opensc-desktop2.patch b/opensc-desktop2.patch index 64fb29b..00f84a8 100644 --- a/opensc-desktop2.patch +++ b/opensc-desktop2.patch @@ -1,7 +1,18 @@ -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 +From 4db9db7403cd5c49efc97ce6eac4ab5b4cd46e66 Mon Sep 17 00:00:00 2001 +From: Stanislav Brabec +Date: Wed, 27 Jun 2018 21:20:04 +0200 +Subject: [PATCH] Add GenericName to the desktop file + +Add optional GenericName to org.opensc.notify.desktop. GenericName is +recently widely used for menu rendering in desktop environments. +--- + src/tools/org.opensc.notify.desktop.in | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/tools/org.opensc.notify.desktop.in b/src/tools/org.opensc.notify.desktop.in +index 20e217d6..1c8755c4 100644 +--- a/src/tools/org.opensc.notify.desktop.in ++++ b/src/tools/org.opensc.notify.desktop.in @@ -1,5 +1,6 @@ [Desktop Entry] Name=OpenSC Notify @@ -9,3 +20,6 @@ Index: opensc-0.18.0/src/tools/org.opensc.notify.desktop.in Type=Application Comment=Monitor smart card events to send notifications. Exec=@bindir@/opensc-notify +-- +2.18.0 + diff --git a/opensc.changes b/opensc.changes index aac0db9..9dd006d 100644 --- a/opensc.changes +++ b/opensc.changes @@ -1,12 +1,13 @@ ------------------------------------------------------------------- -Fri Jun 22 16:43:27 CEST 2018 - sbrabec@suse.com +Tue Jul 10 16:56:28 CEST 2018 - sbrabec@suse.com - Update to version 0.18.0: * Further improvements of PIN support. * Large number of improvements and fixes (boo#1097951, boo#1100501). * See /usr/share/doc/packages/opensc/NEWS for complete list. -- Add opensc-desktop.patch and opensc-bash-completions.patch. +- Add opensc-desktop.patch, opensc-desktop2.patch and + opensc-bash-completions.patch. ------------------------------------------------------------------- Mon Jan 1 16:16:13 UTC 2018 - michael@stroeder.com