diff options
Diffstat (limited to 'meta-oe/recipes-security/keyutils/files')
4 files changed, 114 insertions, 0 deletions
diff --git a/meta-oe/recipes-security/keyutils/files/fix_library_install_path.patch b/meta-oe/recipes-security/keyutils/files/fix_library_install_path.patch new file mode 100644 index 000000000..938fe2eb5 --- /dev/null +++ b/meta-oe/recipes-security/keyutils/files/fix_library_install_path.patch | |||
@@ -0,0 +1,28 @@ | |||
1 | From b0355cc205543ffd33752874295139d57c4fbc3e Mon Sep 17 00:00:00 2001 | ||
2 | From: Wenzong Fan <wenzong.fan@windriver.com> | ||
3 | Date: Tue, 26 Sep 2017 07:59:51 +0000 | ||
4 | Subject: [PATCH] Subject: [PATCH] keyutils: use relative path for link | ||
5 | |||
6 | The absolute path of the symlink will be invalid | ||
7 | when populated in sysroot, so use relative path instead. | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | |||
11 | Signed-off-by: Jackie Huang <jackie.huang@windriver.com> | ||
12 | Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> | ||
13 | {rebased for 1.6] | ||
14 | Signed-off-by: Armin Kuster <akuster808@gmail.com> | ||
15 | |||
16 | Index: keyutils-1.6/Makefile | ||
17 | =================================================================== | ||
18 | --- keyutils-1.6.orig/Makefile | ||
19 | +++ keyutils-1.6/Makefile | ||
20 | @@ -184,7 +184,7 @@ ifeq ($(NO_SOLIB),0) | ||
21 | $(INSTALL) -D $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(LIBNAME) | ||
22 | $(LNS) $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(SONAME) | ||
23 | mkdir -p $(DESTDIR)$(USRLIBDIR) | ||
24 | - $(LNS) $(LIBDIR)/$(SONAME) $(DESTDIR)$(USRLIBDIR)/$(DEVELLIB) | ||
25 | + $(LNS) $(SONAME) $(DESTDIR)$(USRLIBDIR)/$(DEVELLIB) | ||
26 | sed \ | ||
27 | -e 's,@VERSION\@,$(VERSION),g' \ | ||
28 | -e 's,@prefix\@,$(PREFIX),g' \ | ||
diff --git a/meta-oe/recipes-security/keyutils/files/keyutils-fix-error-report-by-adding-default-message.patch b/meta-oe/recipes-security/keyutils/files/keyutils-fix-error-report-by-adding-default-message.patch new file mode 100644 index 000000000..acd91c01c --- /dev/null +++ b/meta-oe/recipes-security/keyutils/files/keyutils-fix-error-report-by-adding-default-message.patch | |||
@@ -0,0 +1,42 @@ | |||
1 | fix keyutils test error report | ||
2 | |||
3 | Upstream-Status: Pending | ||
4 | |||
5 | "Permission denied" may be the reason of EKEYEXPIRED and EKEYREVOKED. | ||
6 | "Required key not available" may be the reason of EKEYREVOKED. | ||
7 | EXPIRED and REVOKED are 2 status of kernel security keys features. | ||
8 | But the userspace keyutils lib will output the error message, which may | ||
9 | have several reasons. | ||
10 | |||
11 | Signed-off-by: Han Chao <chan@windriver.com> | ||
12 | |||
13 | diff --git a/tests/toolbox.inc.sh b/tests/toolbox.inc.sh | ||
14 | index bbca00a..739e9d0 100644 | ||
15 | --- a/tests/toolbox.inc.sh | ||
16 | +++ b/tests/toolbox.inc.sh | ||
17 | @@ -227,11 +227,12 @@ function expect_error () | ||
18 | ;; | ||
19 | EKEYEXPIRED) | ||
20 | my_err="Key has expired" | ||
21 | - alt_err="Unknown error 127" | ||
22 | + alt_err="Permission denied" | ||
23 | ;; | ||
24 | EKEYREVOKED) | ||
25 | my_err="Key has been revoked" | ||
26 | - alt_err="Unknown error 128" | ||
27 | + alt_err="Permission denied" | ||
28 | + alt2_err="Required key not available" | ||
29 | ;; | ||
30 | EKEYREJECTED) | ||
31 | my_err="Key has been rejected" | ||
32 | @@ -249,6 +250,9 @@ function expect_error () | ||
33 | elif [ "x$alt_err" != "x" ] && expr "$my_errmsg" : ".*: $alt_err" >&/dev/null | ||
34 | then | ||
35 | : | ||
36 | + elif [ "x$alt2_err" != "x" ] && expr "$my_errmsg" : ".*: $alt2_err" >&/dev/null | ||
37 | + then | ||
38 | + : | ||
39 | elif [ "x$old_err" != "x" ] && expr "$my_errmsg" : ".*: $old_err" >&/dev/null | ||
40 | then | ||
41 | : | ||
42 | |||
diff --git a/meta-oe/recipes-security/keyutils/files/keyutils-test-fix-output-format.patch b/meta-oe/recipes-security/keyutils/files/keyutils-test-fix-output-format.patch new file mode 100644 index 000000000..a4ffd50ce --- /dev/null +++ b/meta-oe/recipes-security/keyutils/files/keyutils-test-fix-output-format.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | From 49b6321368e4bd3cd233d045cd09004ddd7968b2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jackie Huang <jackie.huang@windriver.com> | ||
3 | Date: Mon, 15 May 2017 14:52:00 +0800 | ||
4 | Subject: [PATCH] keyutils: fix output format | ||
5 | |||
6 | keyutils ptest output format is incorrect, according to yocto | ||
7 | Development Manual | ||
8 | (http://www.yoctoproject.org/docs/latest/dev-manual/dev-manual.html#testing-packages-with-ptest) | ||
9 | 5.10.6. Testing Packages With ptestThe test generates output in the format used by Automake: | ||
10 | <result>: <testname> | ||
11 | where the result can be PASS, FAIL, or SKIP, and the testname can be any | ||
12 | identifying string. | ||
13 | So we should change the test result format to match yocto ptest rules. | ||
14 | |||
15 | Upstream-Status: Inappropriate [OE ptest specific] | ||
16 | |||
17 | Signed-off-by: Li Wang <li.wang@windriver.com> | ||
18 | Signed-off-by: Jackie Huang <jackie.huang@windriver.com> | ||
19 | --- | ||
20 | tests/runtest.sh | 5 +++++ | ||
21 | 1 file changed, 5 insertions(+) | ||
22 | |||
23 | diff --git a/tests/runtest.sh b/tests/runtest.sh | ||
24 | index b6eaa7c..84263fb 100644 | ||
25 | --- a/tests/runtest.sh | ||
26 | +++ b/tests/runtest.sh | ||
27 | @@ -21,6 +21,11 @@ for i in ${TESTS}; do | ||
28 | echo "### RUNNING TEST $i" | ||
29 | if [[ $AUTOMATED != 0 ]] ; then | ||
30 | bash ./runtest.sh | ||
31 | + if [ $? != 0 ]; then | ||
32 | + echo "FAIL: $i" | ||
33 | + else | ||
34 | + echo "PASS: $i" | ||
35 | + fi | ||
36 | else | ||
37 | bash ./runtest.sh || exit 1 | ||
38 | fi | ||
39 | -- | ||
40 | 2.11.0 | ||
41 | |||
diff --git a/meta-oe/recipes-security/keyutils/files/run-ptest b/meta-oe/recipes-security/keyutils/files/run-ptest new file mode 100755 index 000000000..305707f65 --- /dev/null +++ b/meta-oe/recipes-security/keyutils/files/run-ptest | |||
@@ -0,0 +1,3 @@ | |||
1 | #!/bin/sh | ||
2 | export AUTOMATED=1 | ||
3 | make -C tests run | ||