diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-04-12 23:00:00 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-04-12 23:01:26 +0100 |
commit | f41dc748ea839d3762966c59c1e289c581f1a94a (patch) | |
tree | 17389eddf397ad8cd3f9fe7e87bc6e57e04753f4 /meta | |
parent | eaded08b6e223367895e06bf79a79fe387cefcc1 (diff) | |
download | poky-f41dc748ea839d3762966c59c1e289c581f1a94a.tar.gz |
Revert "nettle: fix ptest failure"
This reverts commit 83faaf7b2a5f4fc4ae504b300134409e90389770.
This should never have merged as the change was rejected upstream and adding a library
to the ptest package resulted in it providing that SONAME which led to being
included in images like core-image-sato.
This in turn led to a ton of ptest failures in the 2.7 r1 QA report.
(From OE-Core rev: 303ac64b898e222904e6cbb88a59cd393b259c49)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
3 files changed, 24 insertions, 44 deletions
diff --git a/meta/recipes-support/nettle/nettle-3.4.1/0001-nettle-pbkdf2.c-change-the-initialization-for-salt.patch b/meta/recipes-support/nettle/nettle-3.4.1/0001-nettle-pbkdf2.c-change-the-initialization-for-salt.patch deleted file mode 100644 index 713823e294..0000000000 --- a/meta/recipes-support/nettle/nettle-3.4.1/0001-nettle-pbkdf2.c-change-the-initialization-for-salt.patch +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | From 7510ee2877368464ecce7de515ce056e08c75245 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mingli Yu <Mingli.Yu@windriver.com> | ||
3 | Date: Fri, 12 Apr 2019 10:30:14 +0800 | ||
4 | Subject: [PATCH] nettle-pbkdf2.c: change the initialization for salt | ||
5 | |||
6 | use malloc and strncpy altogether to replace | ||
7 | strdup for salt initialization to fix below | ||
8 | Segmentation fault: | ||
9 | # echo -n passwd| nettle-pbkdf2 -i 1 -l 16 salt | ||
10 | [65534.886509] nettle-pbkdf2[708]: segfault at 1f594260 ip 00007f3332256998 sp 00007fff60d44410 error 4 in libnettle.so.6.5[7f3332244000+1d00] | ||
11 | [65534.887525] Code: e8 6d db fe ff 44 01 6d 68 48 83 c4 08 5b 5d 41 5c 41 5d 41 5e 41 5f c3 66 2e 0f 1f 84 00 00 00 00 00 49 89 dc e9 68 ff f | ||
12 | Segmentation fault | ||
13 | |||
14 | Upstream-Status: Submitted[http://lists.lysator.liu.se/pipermail/nettle-bugs/2019/007467.html] | ||
15 | |||
16 | Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com> | ||
17 | --- | ||
18 | tools/nettle-pbkdf2.c | 5 ++++- | ||
19 | 1 file changed, 4 insertions(+), 1 deletion(-) | ||
20 | |||
21 | diff --git a/tools/nettle-pbkdf2.c b/tools/nettle-pbkdf2.c | ||
22 | index 1f0a301..000acd3 100644 | ||
23 | --- a/tools/nettle-pbkdf2.c | ||
24 | +++ b/tools/nettle-pbkdf2.c | ||
25 | @@ -141,7 +141,10 @@ main (int argc, char **argv) | ||
26 | return EXIT_FAILURE; | ||
27 | } | ||
28 | |||
29 | - salt = strdup (argv[0]); | ||
30 | + salt = malloc (strlen(argv[0]) + 1); | ||
31 | + if (! salt) | ||
32 | + die ("Failed to allocate memory for salt\n"); | ||
33 | + strncpy(salt, argv[0], sizeof(salt) - 1); | ||
34 | salt_length = strlen(argv[0]); | ||
35 | |||
36 | if (hex_salt) | ||
37 | -- | ||
38 | 2.7.4 | ||
39 | |||
diff --git a/meta/recipes-support/nettle/nettle-3.4.1/dlopen-test.patch b/meta/recipes-support/nettle/nettle-3.4.1/dlopen-test.patch new file mode 100644 index 0000000000..c4f0b7ea1c --- /dev/null +++ b/meta/recipes-support/nettle/nettle-3.4.1/dlopen-test.patch | |||
@@ -0,0 +1,20 @@ | |||
1 | Replace relative path of libnettle.so with absolute path so the test | ||
2 | program can find it. | ||
3 | Relative paths are not suitable, as the folder strucure for ptest | ||
4 | is different from the one expected by the nettle testsuite. | ||
5 | |||
6 | Upstream-Status: Inappropriate [embedded specific] | ||
7 | |||
8 | Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> | ||
9 | |||
10 | --- a/testsuite/dlopen-test.c 2016-10-01 00:28:38.000000000 -0700 | ||
11 | +++ b/testsuite/dlopen-test.c 2017-10-13 11:08:57.227572860 -0700 | ||
12 | @@ -9,7 +9,7 @@ | ||
13 | main (int argc UNUSED, char **argv UNUSED) | ||
14 | { | ||
15 | #if HAVE_LIBDL | ||
16 | - void *handle = dlopen ("../libnettle.so", RTLD_NOW); | ||
17 | + void *handle = dlopen ("/usr/lib/libnettle.so", RTLD_NOW); | ||
18 | int (*get_version)(void); | ||
19 | if (!handle) | ||
20 | { | ||
diff --git a/meta/recipes-support/nettle/nettle_3.4.1.bb b/meta/recipes-support/nettle/nettle_3.4.1.bb index 612e058862..dd49c30c84 100644 --- a/meta/recipes-support/nettle/nettle_3.4.1.bb +++ b/meta/recipes-support/nettle/nettle_3.4.1.bb | |||
@@ -14,9 +14,12 @@ SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz \ | |||
14 | file://Add-target-to-only-build-tests-not-run-them.patch \ | 14 | file://Add-target-to-only-build-tests-not-run-them.patch \ |
15 | file://run-ptest \ | 15 | file://run-ptest \ |
16 | file://check-header-files-of-openssl-only-if-enable_.patch \ | 16 | file://check-header-files-of-openssl-only-if-enable_.patch \ |
17 | file://0001-nettle-pbkdf2.c-change-the-initialization-for-salt.patch \ | ||
18 | " | 17 | " |
19 | 18 | ||
19 | SRC_URI_append_class-target = "\ | ||
20 | file://dlopen-test.patch \ | ||
21 | " | ||
22 | |||
20 | SRC_URI[md5sum] = "9bdebb0e2f638d3b9d91f7fc264b70c1" | 23 | SRC_URI[md5sum] = "9bdebb0e2f638d3b9d91f7fc264b70c1" |
21 | SRC_URI[sha256sum] = "f941cf1535cd5d1819be5ccae5babef01f6db611f9b5a777bae9c7604b8a92ad" | 24 | SRC_URI[sha256sum] = "f941cf1535cd5d1819be5ccae5babef01f6db611f9b5a777bae9c7604b8a92ad" |
22 | 25 | ||
@@ -44,10 +47,6 @@ do_install_ptest() { | |||
44 | # tools can be found in PATH, not in ../tools/ | 47 | # tools can be found in PATH, not in ../tools/ |
45 | sed -i -e 's|../tools/||' ${D}${PTEST_PATH}/testsuite/*-test | 48 | sed -i -e 's|../tools/||' ${D}${PTEST_PATH}/testsuite/*-test |
46 | install ${B}/testsuite/*-test ${D}${PTEST_PATH}/testsuite/ | 49 | install ${B}/testsuite/*-test ${D}${PTEST_PATH}/testsuite/ |
47 | # libnettle.so is needed for dlopen-test | ||
48 | if [ -f ${D}${libdir}/libnettle.so.6.* ]; then | ||
49 | cp ${D}${libdir}/libnettle.so.6.* ${D}${PTEST_PATH}/libnettle.so | ||
50 | fi | ||
51 | } | 50 | } |
52 | 51 | ||
53 | BBCLASSEXTEND = "native nativesdk" | 52 | BBCLASSEXTEND = "native nativesdk" |