From ab9b52aa114446345a36b125b3d74f367f0b7b05 Mon Sep 17 00:00:00 2001 From: Jakub Jelen Date: Fri, 8 Oct 2021 13:20:01 +0200 Subject: [PATCH] Enable file caching by default Related to #1947025 which works around the pkcs15-init issues with file caching. Resolves: rhbz#2000626 --- opensc-0.22.0-file-cache.patch | 23 +++++++++++++++++++++++ opensc.spec | 3 +++ 2 files changed, 26 insertions(+) create mode 100644 opensc-0.22.0-file-cache.patch diff --git a/opensc-0.22.0-file-cache.patch b/opensc-0.22.0-file-cache.patch new file mode 100644 index 0000000..3702537 --- /dev/null +++ b/opensc-0.22.0-file-cache.patch @@ -0,0 +1,23 @@ +diff -up opensc-0.22.0/etc/opensc.conf.file-cache opensc-0.22.0/etc/opensc.conf +--- opensc-0.22.0/etc/opensc.conf.file-cache 2021-10-08 13:14:44.091772071 +0200 ++++ opensc-0.22.0/etc/opensc.conf 2021-10-08 13:19:27.339051951 +0200 +@@ -2,7 +2,7 @@ app default { + # debug = 3; + # debug_file = opensc-debug.txt; + framework pkcs15 { +- # use_file_caching = true; ++ use_file_caching = true; + } + reader_driver pcsc { + # The pinpad is disabled by default, +@@ -10,3 +10,10 @@ app default { + enable_pinpad = false; + } + } ++# the pkcs15-init is used for card initialization when the file caching ++# brings more trouble than use so disable that: ++app pkcs15-init { ++ framework pkcs15 { ++ use_file_caching = false; ++ } ++} diff --git a/opensc.spec b/opensc.spec index 8b245f8..f0b00f0 100644 --- a/opensc.spec +++ b/opensc.spec @@ -15,6 +15,8 @@ Patch1: opensc-0.19.0-pinpad.patch Patch5: %{name}-gcc11.patch # https://github.com/OpenSC/OpenSC/pull/2343 Patch7: %{name}-32b-arch.patch +# File caching by default (#2000626) +Patch8: %{name}-%{version}-file-cache.patch BuildRequires: make BuildRequires: pcsc-lite-devel @@ -54,6 +56,7 @@ every software/card that does so, too. %patch1 -p1 -b .pinpad %patch5 -p1 -b .gcc11 %patch7 -p1 -b .32b +%patch8 -p1 -b .file-cache cp -p src/pkcs15init/README ./README.pkcs15init cp -p src/scconf/README.scconf .