summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-oe/recipes-security/keyutils/files/0001-Adhere-to-the-SOURCE_DATE_EPOCH-standard.patch30
-rw-r--r--meta-oe/recipes-security/keyutils/files/0001-tests-builtin_trusted-Failure-command-is-failed.patch27
-rw-r--r--meta-oe/recipes-security/keyutils/files/0001-tests-toolbox.inc.sh-update-regex-for-getting-endian.patch14
-rw-r--r--meta-oe/recipes-security/keyutils/files/0002-tests-Use-head-n1-for-busybox-compatibility.patch64
-rw-r--r--meta-oe/recipes-security/keyutils/keyutils_1.6.3.bb (renamed from meta-oe/recipes-security/keyutils/keyutils_1.6.1.bb)17
5 files changed, 139 insertions, 13 deletions
diff --git a/meta-oe/recipes-security/keyutils/files/0001-Adhere-to-the-SOURCE_DATE_EPOCH-standard.patch b/meta-oe/recipes-security/keyutils/files/0001-Adhere-to-the-SOURCE_DATE_EPOCH-standard.patch
new file mode 100644
index 0000000000..8984e6502f
--- /dev/null
+++ b/meta-oe/recipes-security/keyutils/files/0001-Adhere-to-the-SOURCE_DATE_EPOCH-standard.patch
@@ -0,0 +1,30 @@
1From 3f7f70c746277e1a89978166533374a8b9bd5407 Mon Sep 17 00:00:00 2001
2From: Alex Kiernan <alex.kiernan@gmail.com>
3Date: Wed, 25 Jan 2023 17:05:25 +0000
4Subject: [PATCH] Adhere to the SOURCE_DATE_EPOCH standard
5
6Adhere to the SOURCE_DATE_EPOCH standard and use it's date when set
7otherwise fall back to the default behaviour.
8
9Signed-off-by: Jelle van der Waa <jelle@vdwaa.nl>
10Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
11---
12 Makefile | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-)
14
15diff --git a/Makefile b/Makefile
16index 599b1452a05a..7776b0f0d63d 100644
17--- a/Makefile
18+++ b/Makefile
19@@ -109,7 +109,7 @@ all: keyctl request-key key.dns_resolver cxx
20 ###############################################################################
21 #RPATH = -Wl,-rpath,$(LIBDIR)
22
23-VCPPFLAGS := -DPKGBUILD="\"$(shell date -u +%F)\""
24+VCPPFLAGS := -DPKGBUILD="\"$(date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%F)\""
25 VCPPFLAGS += -DPKGVERSION="\"keyutils-$(VERSION)\""
26 VCPPFLAGS += -DAPIVERSION="\"libkeyutils-$(APIVERSION)\""
27
28--
292.39.0
30
diff --git a/meta-oe/recipes-security/keyutils/files/0001-tests-builtin_trusted-Failure-command-is-failed.patch b/meta-oe/recipes-security/keyutils/files/0001-tests-builtin_trusted-Failure-command-is-failed.patch
new file mode 100644
index 0000000000..b78d7f7f28
--- /dev/null
+++ b/meta-oe/recipes-security/keyutils/files/0001-tests-builtin_trusted-Failure-command-is-failed.patch
@@ -0,0 +1,27 @@
1From 714542f009860e1652bc06d05ab939290374a114 Mon Sep 17 00:00:00 2001
2From: Alex Kiernan <alex.kiernan@gmail.com>
3Date: Thu, 26 Jan 2023 08:27:12 +0000
4Subject: [PATCH 1/2] tests: builtin_trusted: Failure command is `failed`
5
6Upstream-Status: Pending
7Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
8---
9 tests/features/builtin_trusted/runtest.sh | 2 +-
10 1 file changed, 1 insertion(+), 1 deletion(-)
11
12diff --git a/tests/features/builtin_trusted/runtest.sh b/tests/features/builtin_trusted/runtest.sh
13index 27910b5fa8e7..437f5ad1d6b2 100644
14--- a/tests/features/builtin_trusted/runtest.sh
15+++ b/tests/features/builtin_trusted/runtest.sh
16@@ -24,7 +24,7 @@ id_key --to=blk %:.blacklist
17 # There should be at least one built-in trusted key for module signing.
18 list_keyring $btk
19 expect_keyring_rlist bkeys
20-if [ `echo $bkeys | wc -w` = 0 ]; then fail; fi
21+if [ `echo $bkeys | wc -w` = 0 ]; then failed; fi
22
23 # Check we can't add random keys to those keyrings
24 marker "TRY ADDING USER KEYS"
25--
262.39.0
27
diff --git a/meta-oe/recipes-security/keyutils/files/0001-tests-toolbox.inc.sh-update-regex-for-getting-endian.patch b/meta-oe/recipes-security/keyutils/files/0001-tests-toolbox.inc.sh-update-regex-for-getting-endian.patch
index 728f464331..769118e422 100644
--- a/meta-oe/recipes-security/keyutils/files/0001-tests-toolbox.inc.sh-update-regex-for-getting-endian.patch
+++ b/meta-oe/recipes-security/keyutils/files/0001-tests-toolbox.inc.sh-update-regex-for-getting-endian.patch
@@ -1,4 +1,4 @@
1From 935a31dd6f14bd1aff735495f0fdbae4ca05c695 Mon Sep 17 00:00:00 2001 1From b84ecc2e3e56a25a3efd56c8942ad6bab3ff9ba1 Mon Sep 17 00:00:00 2001
2From: Changqing Li <changqing.li@windriver.com> 2From: Changqing Li <changqing.li@windriver.com>
3Date: Fri, 2 Dec 2022 15:35:40 +0800 3Date: Fri, 2 Dec 2022 15:35:40 +0800
4Subject: [PATCH] tests/toolbox.inc.sh: update regex for getting endian 4Subject: [PATCH] tests/toolbox.inc.sh: update regex for getting endian
@@ -14,22 +14,22 @@ Signed-off-by: Changqing Li <changqing.li@windriver.com>
14 1 file changed, 2 insertions(+), 2 deletions(-) 14 1 file changed, 2 insertions(+), 2 deletions(-)
15 15
16diff --git a/tests/toolbox.inc.sh b/tests/toolbox.inc.sh 16diff --git a/tests/toolbox.inc.sh b/tests/toolbox.inc.sh
17index 1964450..e827e20 100644 17index 8bf0db6f6d87..7ea2f253ba7d 100644
18--- a/tests/toolbox.inc.sh 18--- a/tests/toolbox.inc.sh
19+++ b/tests/toolbox.inc.sh 19+++ b/tests/toolbox.inc.sh
20@@ -13,10 +13,10 @@ 20@@ -13,10 +13,10 @@
21 echo === $OUTPUTFILE === 21 echo === $OUTPUTFILE ===
22 22
23 endian=`file -L /proc/$$/exe` 23 endian=`file -L /proc/$$/exe`
24-if expr "$endian" : '.* MSB \+\(executable\|shared object\).*' >&/dev/null 24-if expr "$endian" : '.* MSB \+\(pie executable\|executable\|shared object\).*' >&/dev/null
25+if expr "$endian" : '.* MSB .*\(executable\|shared object\).*' >&/dev/null 25+if expr "$endian" : '.* MSB .*\(pie executable\|executable\|shared object\).*' >&/dev/null
26 then 26 then
27 endian=BE 27 endian=BE
28-elif expr "$endian" : '.* LSB \+\(executable\|shared object\).*' >&/dev/null 28-elif expr "$endian" : '.* LSB \+\(pie executable\|executable\|shared object\).*' >&/dev/null
29+elif expr "$endian" : '.* LSB .*\(executable\|shared object\).*' >&/dev/null 29+elif expr "$endian" : '.* LSB .*\(pie executable\|executable\|shared object\).*' >&/dev/null
30 then 30 then
31 endian=LE 31 endian=LE
32 else 32 else
33-- 33--
342.25.1 342.39.0
35 35
diff --git a/meta-oe/recipes-security/keyutils/files/0002-tests-Use-head-n1-for-busybox-compatibility.patch b/meta-oe/recipes-security/keyutils/files/0002-tests-Use-head-n1-for-busybox-compatibility.patch
new file mode 100644
index 0000000000..900f2f0ec9
--- /dev/null
+++ b/meta-oe/recipes-security/keyutils/files/0002-tests-Use-head-n1-for-busybox-compatibility.patch
@@ -0,0 +1,64 @@
1From 5e660f246bb04560692ac9fc144574732c7e19e7 Mon Sep 17 00:00:00 2001
2From: Alex Kiernan <alex.kiernan@gmail.com>
3Date: Thu, 26 Jan 2023 08:28:16 +0000
4Subject: [PATCH 2/2] tests: Use `head -n1` for busybox compatibility
5
6Upstream-Status: Pending
7Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
8---
9 tests/keyctl/session/valid/runtest.sh | 4 ++--
10 tests/keyctl/show/noargs/runtest.sh | 2 +-
11 tests/toolbox.inc.sh | 2 +-
12 3 files changed, 4 insertions(+), 4 deletions(-)
13
14diff --git a/tests/keyctl/session/valid/runtest.sh b/tests/keyctl/session/valid/runtest.sh
15index 4c831314c0b0..456e9f32de23 100644
16--- a/tests/keyctl/session/valid/runtest.sh
17+++ b/tests/keyctl/session/valid/runtest.sh
18@@ -17,7 +17,7 @@ then
19 expect_key_rdesc rdesc "keyring@.*@.*@.*@_ses[^@]*\$"
20
21 # check the session keyring ID is shown
22- seskeyring="`tail -2 $OUTPUTFILE | head -1`"
23+ seskeyring="`tail -2 $OUTPUTFILE | head -n1`"
24 if ! expr "$seskeyring" : "Joined session keyring: [0-9]*" >&/dev/null
25 then
26 failed
27@@ -30,7 +30,7 @@ new_session qwerty keyctl rdescribe @s "@"
28 expect_key_rdesc rdesc "keyring@.*@.*@.*@qwerty"
29
30 # check the session keyring ID is shown
31-seskeyring="`tail -2 $OUTPUTFILE | head -1`"
32+seskeyring="`tail -2 $OUTPUTFILE | head -n1`"
33 if ! expr "$seskeyring" : "Joined session keyring: [0-9]*" >&/dev/null
34 then
35 failed
36diff --git a/tests/keyctl/show/noargs/runtest.sh b/tests/keyctl/show/noargs/runtest.sh
37index d5072716c76a..a6d8b6b585c4 100644
38--- a/tests/keyctl/show/noargs/runtest.sh
39+++ b/tests/keyctl/show/noargs/runtest.sh
40@@ -31,7 +31,7 @@ then
41 fi
42
43 # the first key listed (line 2) should be a keying (the session keyring) ...
44-keyring1="`grep -n keyring $OUTPUTFILE | cut -d: -f1 | head -1`"
45+keyring1="`grep -n keyring $OUTPUTFILE | cut -d: -f1 | head -n1`"
46 if [ "$keyring1" != "4" ]
47 then
48 failed
49diff --git a/tests/toolbox.inc.sh b/tests/toolbox.inc.sh
50index 7ea2f253ba7d..a461a73daaa3 100644
51--- a/tests/toolbox.inc.sh
52+++ b/tests/toolbox.inc.sh
53@@ -229,7 +229,7 @@ function check_notify ()
54 if [ "$1" = "-2" ]
55 then
56 shift
57- my_logline="`tail -2 $watch_log | head -1`"
58+ my_logline="`tail -2 $watch_log | head -n1`"
59 else
60 my_logline="`tail -1 $watch_log`"
61 fi
62--
632.39.0
64
diff --git a/meta-oe/recipes-security/keyutils/keyutils_1.6.1.bb b/meta-oe/recipes-security/keyutils/keyutils_1.6.3.bb
index 019118f38b..6cdfef9d11 100644
--- a/meta-oe/recipes-security/keyutils/keyutils_1.6.1.bb
+++ b/meta-oe/recipes-security/keyutils/keyutils_1.6.3.bb
@@ -12,18 +12,24 @@ LICENSE = "LGPL-2.1-or-later & GPL-2.0-or-later"
12LIC_FILES_CHKSUM = "file://LICENCE.GPL;md5=5f6e72824f5da505c1f4a7197f004b45 \ 12LIC_FILES_CHKSUM = "file://LICENCE.GPL;md5=5f6e72824f5da505c1f4a7197f004b45 \
13 file://LICENCE.LGPL;md5=7d1cacaa3ea752b72ea5e525df54a21f" 13 file://LICENCE.LGPL;md5=7d1cacaa3ea752b72ea5e525df54a21f"
14 14
15inherit siteinfo autotools-brokensep ptest 15inherit manpages ptest
16 16
17SRC_URI = "http://people.redhat.com/dhowells/keyutils/${BP}.tar.bz2 \ 17SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/keyutils.git;protocol=https;branch=master \
18 file://keyutils-test-fix-output-format.patch \ 18 file://keyutils-test-fix-output-format.patch \
19 file://keyutils-fix-error-report-by-adding-default-message.patch \ 19 file://keyutils-fix-error-report-by-adding-default-message.patch \
20 file://run-ptest \ 20 file://run-ptest \
21 file://fix_library_install_path.patch \ 21 file://fix_library_install_path.patch \
22 file://0001-tests-toolbox.inc.sh-update-regex-for-getting-endian.patch \ 22 file://0001-tests-toolbox.inc.sh-update-regex-for-getting-endian.patch \
23 file://0001-Adhere-to-the-SOURCE_DATE_EPOCH-standard.patch \
24 file://0001-tests-builtin_trusted-Failure-command-is-failed.patch \
25 file://0002-tests-Use-head-n1-for-busybox-compatibility.patch \
23 " 26 "
27SRCREV = "cb3bb194cca88211cbfcdde2f10c0f43c3fb8ec3"
24 28
25SRC_URI[md5sum] = "919af7f33576816b423d537f8a8692e8" 29S = "${WORKDIR}/git"
26SRC_URI[sha256sum] = "c8b15722ae51d95b9ad76cc6d49a4c2cc19b0c60f72f61fb9bf43eea7cbd64ce" 30
31PACKAGECONFIG ?= ""
32PACKAGECONFIG[manpages] = ""
27 33
28EXTRA_OEMAKE = "'CFLAGS=${CFLAGS} -Wall' \ 34EXTRA_OEMAKE = "'CFLAGS=${CFLAGS} -Wall' \
29 NO_ARLIB=1 \ 35 NO_ARLIB=1 \
@@ -40,7 +46,6 @@ EXTRA_OEMAKE = "'CFLAGS=${CFLAGS} -Wall' \
40 " 46 "
41 47
42do_install () { 48do_install () {
43 install -d ${D}/${libdir}/pkgconfig
44 oe_runmake DESTDIR=${D} install 49 oe_runmake DESTDIR=${D} install
45} 50}
46 51
@@ -50,7 +55,7 @@ do_install_ptest () {
50} 55}
51 56
52 57
53RDEPENDS:${PN}-ptest += "lsb-release" 58RDEPENDS:${PN}-ptest += "bash lsb-release make"
54RDEPENDS:${PN}-ptest:append:libc-glibc = " glibc-utils" 59RDEPENDS:${PN}-ptest:append:libc-glibc = " glibc-utils"
55RDEPENDS:${PN}-ptest:append:libc-musl = " musl-utils" 60RDEPENDS:${PN}-ptest:append:libc-musl = " musl-utils"
56 61