summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2018-12-17 18:56:15 -0800
committerKhem Raj <raj.khem@gmail.com>2018-12-18 22:15:59 -0800
commitc011beeaa666cf02f952ef53630a0c2bc80bcc04 (patch)
tree7e6832cd5c0cf1f4ccdb665ddb410979e7206b0d
parent014b90ee43b0b74086b4da3e3c9fcd0a5ecd830d (diff)
downloadmeta-openembedded-c011beeaa666cf02f952ef53630a0c2bc80bcc04.tar.gz
opensc: Upgrade to 0.19.0
Switch fetcher to use github Add patch to build with gcc9 Remove upstreamed patch Inherit bash-completion Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/recipes-support/opensc/opensc/0001-Fixed-gcc-8-compilation-errors-1353.patch73
-rw-r--r--meta-oe/recipes-support/opensc/opensc/0001-Remove-redundant-logging.patch34
-rw-r--r--meta-oe/recipes-support/opensc/opensc_0.19.0.bb (renamed from meta-oe/recipes-support/opensc/opensc_0.18.0.bb)19
3 files changed, 42 insertions, 84 deletions
diff --git a/meta-oe/recipes-support/opensc/opensc/0001-Fixed-gcc-8-compilation-errors-1353.patch b/meta-oe/recipes-support/opensc/opensc/0001-Fixed-gcc-8-compilation-errors-1353.patch
deleted file mode 100644
index 48d8327546..0000000000
--- a/meta-oe/recipes-support/opensc/opensc/0001-Fixed-gcc-8-compilation-errors-1353.patch
+++ /dev/null
@@ -1,73 +0,0 @@
1From 87857d5cae7db94fdd776904886392b1e86053bd Mon Sep 17 00:00:00 2001
2From: Florian Bezdeka <1119693+fbezdeka@users.noreply.github.com>
3Date: Fri, 18 May 2018 18:54:56 +0200
4Subject: [PATCH] Fixed gcc 8 compilation errors (#1353)
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9The following errors occured during a compilation using gcc 8:
10
11In function »gids_create_file.constprop«,
12 inserted by »gids_save_certificate.isra.8« beicard-gids.c:1548:7:
13card-gids.c:465:2: Error: »strncpy« output may be truncated copying 8 bytes from a string of length 8 [-Werror=stringop-truncation]
14 strncpy(record->filename, filename, 8);
15 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
16
17pkcs15-oberthur.c: In function »sc_pkcs15emu_oberthur_add_prvkey«:
18pkcs15-oberthur.c:741:5: Error: »strncpy« output may be truncated copying 254 bytes from a string of length 254 [-Werror=stringop-truncation]
19 strncpy(kobj.label, objs[ii]->label, sizeof(kobj.label) - 1);
20 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
21
22Upstream-Status: Backport [https://github.com/OpenSC/OpenSC/pull/1353]
23Signed-off-by Khem Raj <raj.khem@gmail.com>
24---
25 src/libopensc/card-gids.c | 3 ++-
26 src/libopensc/pkcs15-oberthur.c | 3 ++-
27 2 files changed, 4 insertions(+), 2 deletions(-)
28
29diff --git a/src/libopensc/card-gids.c b/src/libopensc/card-gids.c
30index fc5d2a7..ac3e579 100644
31--- a/src/libopensc/card-gids.c
32+++ b/src/libopensc/card-gids.c
33@@ -33,6 +33,7 @@ Some features are undocumented like the format used to store certificates. They
34
35 #include <stdlib.h>
36 #include <string.h>
37+#include "../common/compat_strlcpy.h"
38
39 #ifdef ENABLE_OPENSSL
40 /* openssl only needed for card administration */
41@@ -462,7 +463,7 @@ static int gids_create_file(sc_card_t *card, char* directory, char* filename) {
42 memset(masterfilebuffer + offset, 0, sizeof(gids_mf_record_t));
43 record = (gids_mf_record_t*) (masterfilebuffer + offset);
44 strncpy(record->directory, directory, 8);
45- strncpy(record->filename, filename, 8);
46+ strlcpy(record->filename, filename, sizeof(record->filename));
47 record->fileIdentifier = fileIdentifier;
48 record->dataObjectIdentifier = dataObjectIdentifier;
49
50diff --git a/src/libopensc/pkcs15-oberthur.c b/src/libopensc/pkcs15-oberthur.c
51index 4f841ed..3415be7 100644
52--- a/src/libopensc/pkcs15-oberthur.c
53+++ b/src/libopensc/pkcs15-oberthur.c
54@@ -29,6 +29,7 @@
55 #include <stdlib.h>
56 #include <string.h>
57 #include <stdio.h>
58+#include "../common/compat_strlcpy.h"
59
60 #include "pkcs15.h"
61 #include "log.h"
62@@ -738,7 +739,7 @@ sc_pkcs15emu_oberthur_add_prvkey(struct sc_pkcs15_card *p15card,
63 unsigned int id = path.value[path.len - 2] * 0x100 + path.value[path.len - 1];
64
65 if (id == ccont.id_cert) {
66- strncpy(kobj.label, objs[ii]->label, sizeof(kobj.label) - 1);
67+ strlcpy(kobj.label, objs[ii]->label, sizeof(kobj.label));
68 break;
69 }
70 }
71--
722.18.0
73
diff --git a/meta-oe/recipes-support/opensc/opensc/0001-Remove-redundant-logging.patch b/meta-oe/recipes-support/opensc/opensc/0001-Remove-redundant-logging.patch
new file mode 100644
index 0000000000..291f1a239a
--- /dev/null
+++ b/meta-oe/recipes-support/opensc/opensc/0001-Remove-redundant-logging.patch
@@ -0,0 +1,34 @@
1From c012f46965b3fe24e31367796e52c2d0b14ca5d9 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 17 Dec 2018 18:44:23 -0800
4Subject: [PATCH] Remove redundant logging
5
6Same information is printed a few line below in same function, the only
7difference is that there it takes care of case when label is NULL pointer
8unlike this line
9
10secondly, every function call to cosm_write_tokeninfo() in this file
11passes label=NULL, and then it tries to print a null pointer
12
13Fixes errors like
14src/libopensc/log.h:48:47: error: '%s' directive argument is null
15[-Werror=format-overflow=]
16
17Upstream-Status: Submitted [https://github.com/OpenSC/OpenSC/pull/1557]
18Signed-off-by: Khem Raj <raj.khem@gmail.com>
19---
20 src/pkcs15init/pkcs15-oberthur.c | 1 -
21 1 file changed, 1 deletion(-)
22
23Index: git/src/pkcs15init/pkcs15-oberthur.c
24===================================================================
25--- git.orig/src/pkcs15init/pkcs15-oberthur.c
26+++ git/src/pkcs15init/pkcs15-oberthur.c
27@@ -70,7 +70,6 @@ cosm_write_tokeninfo (struct sc_pkcs15_c
28 ctx = p15card->card->ctx;
29
30 SC_FUNC_CALLED(ctx, SC_LOG_DEBUG_VERBOSE);
31- sc_debug(ctx, SC_LOG_DEBUG_NORMAL, "cosm_write_tokeninfo() label '%s'; flags 0x%X", label, flags);
32 if (sc_profile_get_file(profile, COSM_TITLE"-token-info", &file)) {
33 rv = SC_ERROR_INCONSISTENT_PROFILE;
34 SC_TEST_GOTO_ERR(ctx, SC_LOG_DEBUG_NORMAL, rv, "Cannot find "COSM_TITLE"-token-info");
diff --git a/meta-oe/recipes-support/opensc/opensc_0.18.0.bb b/meta-oe/recipes-support/opensc/opensc_0.19.0.bb
index 45c931e7bd..bc1722e394 100644
--- a/meta-oe/recipes-support/opensc/opensc_0.18.0.bb
+++ b/meta-oe/recipes-support/opensc/opensc_0.19.0.bb
@@ -8,22 +8,19 @@ eID cards have also been confirmed to work."
8 8
9HOMEPAGE = "http://www.opensc-project.org/opensc/" 9HOMEPAGE = "http://www.opensc-project.org/opensc/"
10SECTION = "System Environment/Libraries" 10SECTION = "System Environment/Libraries"
11LICENSE = "LGPLv2+"
12LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34"
11 13
12SRC_URI = "https://snapshot.debian.org/archive/debian/20180521T101428Z/pool/main/o/opensc/opensc_0.18.0.orig.tar.gz \ 14#v0.19.0
13 file://0001-Fixed-gcc-8-compilation-errors-1353.patch \ 15SRCREV = "f1691fc91fc113191c3a8aaf5facd6983334ec47"
16SRC_URI = "git://github.com/OpenSC/OpenSC \
17 file://0001-Remove-redundant-logging.patch \
14 " 18 "
15
16SRC_URI[md5sum] = "bce516f752e0db5327aa06cc0136fe27"
17SRC_URI[sha256sum] = "6ef62b00e8fdbe3e386c3ee25c2cadb56c1931ea42f1a11dce8c947f51b45033"
18
19DEPENDS = "openct pcsc-lite virtual/libiconv openssl" 19DEPENDS = "openct pcsc-lite virtual/libiconv openssl"
20 20
21LICENSE = "LGPLv2+" 21S = "${WORKDIR}/git"
22LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34" 22inherit autotools pkgconfig bash-completion
23
24inherit autotools pkgconfig
25 23
26S = "${WORKDIR}/OpenSC-${PV}"
27EXTRA_OECONF = " \ 24EXTRA_OECONF = " \
28 --disable-static \ 25 --disable-static \
29 --enable-openct \ 26 --enable-openct \