summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2020-08-01 23:23:24 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-08-02 14:42:08 +0100
commit65525a3c6a55dafb8ea01b65ba55cd7025545cbb (patch)
tree075517cdb1e45dc63666a4bb69619a775d107387 /meta/recipes-core
parent0c0a03eb4ad713b992b9dfc8711904fb307d82f0 (diff)
downloadpoky-65525a3c6a55dafb8ea01b65ba55cd7025545cbb.tar.gz
kbd: update 2.2.0 -> 2.3.0
Drop ptest support: upstream has rewritten the tests in GNU autotest, which is another m4 monstrosity entirely incompatible with the idea of installing tests to the target system. All dropped patches are either merged upstream, or made for ptest. (From OE-Core rev: 79f456da4b752f897bb5546d9ec291cdf4196ae8) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r--meta/recipes-core/kbd/kbd/0001-Use-DATADIR-and-append-i386-to-fix-libkbdfile-test08.patch45
-rw-r--r--meta/recipes-core/kbd/kbd/0001-analyze.l-add-missing-string-format.patch24
-rw-r--r--meta/recipes-core/kbd/kbd/fix_cflags.patch25
-rw-r--r--meta/recipes-core/kbd/kbd/run-ptest4
-rw-r--r--meta/recipes-core/kbd/kbd/set-proper-path-of-resources.patch99
-rw-r--r--meta/recipes-core/kbd/kbd_2.2.0.bb72
-rw-r--r--meta/recipes-core/kbd/kbd_2.3.0.bb38
7 files changed, 38 insertions, 269 deletions
diff --git a/meta/recipes-core/kbd/kbd/0001-Use-DATADIR-and-append-i386-to-fix-libkbdfile-test08.patch b/meta/recipes-core/kbd/kbd/0001-Use-DATADIR-and-append-i386-to-fix-libkbdfile-test08.patch
deleted file mode 100644
index dc5236063b..0000000000
--- a/meta/recipes-core/kbd/kbd/0001-Use-DATADIR-and-append-i386-to-fix-libkbdfile-test08.patch
+++ /dev/null
@@ -1,45 +0,0 @@
1From 4c12f76f4177cfd560cf708a16774ebfadbd41a5 Mon Sep 17 00:00:00 2001
2From: "Mingde (Matthew) Zeng" <matthew.zeng@windriver.com>
3Date: Wed, 22 Jan 2020 11:02:17 -0500
4Subject: [PATCH] Use DATADIR and append i386 to fix libkbdfile-test08 ptest
5 failure
6
7Replace ABS_DATADIR with DATADIR and append i386 to dirpath.
8
9Upstream-Status: Inappropriate [OE specific]
10
11This OE specific patch applies to kbd v2.2.0 for now, the upstream
12made drastic changes since v2.2.0, in fact they got rid of ABS_DATADIR
13in commit 5b6df5c along with a series of other commits which may or
14may not fix this issue. We will find out in future releases.
15
16Signed-off-by: Matthew Zeng<Matthew.Zeng@windriver.com>
17---
18 tests/libkbdfile-test08.c | 6 +++---
19 1 file changed, 3 insertions(+), 3 deletions(-)
20
21diff --git a/tests/libkbdfile-test08.c b/tests/libkbdfile-test08.c
22index bf41707..5e287f1 100644
23--- a/tests/libkbdfile-test08.c
24+++ b/tests/libkbdfile-test08.c
25@@ -14,14 +14,14 @@ main(int __attribute__((unused)) argc, char **argv)
26 if (!fp)
27 kbd_error(EXIT_FAILURE, 0, "unable to create kbdfile");
28
29- const char *const dirpath[] = { "", DATADIR "/findfile/test_0/keymaps/**", 0 };
30+ const char *const dirpath[] = { "", DATADIR "/findfile/test_0/keymaps/i386/**", 0 };
31 const char *const suffixes[] = { "", ".map", ".kmap", 0 };
32
33- const char *expect = ABS_DATADIR "/findfile/test_0/keymaps/i386/qwerty/test0.map";
34+ const char *expect = DATADIR "/findfile/test_0/keymaps/i386/qwerty/test0.map";
35
36 int rc = 0;
37
38- rc = kbdfile_find((char *)(ABS_DATADIR "/findfile/test_0/keymaps/i386/qwerty/test0"), (char **) dirpath, (char **) suffixes, fp);
39+ rc = kbdfile_find((char *)"test0", (char **) dirpath, (char **) suffixes, fp);
40
41 if (rc != 0)
42 kbd_error(EXIT_FAILURE, 0, "unable to find file");
43--
442.24.1
45
diff --git a/meta/recipes-core/kbd/kbd/0001-analyze.l-add-missing-string-format.patch b/meta/recipes-core/kbd/kbd/0001-analyze.l-add-missing-string-format.patch
deleted file mode 100644
index 8916fd9f5e..0000000000
--- a/meta/recipes-core/kbd/kbd/0001-analyze.l-add-missing-string-format.patch
+++ /dev/null
@@ -1,24 +0,0 @@
1From dc6bf2ae0835c6569b270e8e1f26a3173f3927d9 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Wed, 4 Dec 2019 13:14:01 +0100
4Subject: [PATCH] analyze.l: add missing string format
5
6Upstream-Status: Submitted [https://github.com/legionus/kbd/pull/35]
7Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
8---
9 src/libkeymap/analyze.l | 2 +-
10 1 file changed, 1 insertion(+), 1 deletion(-)
11
12diff --git a/src/libkeymap/analyze.l b/src/libkeymap/analyze.l
13index e32ace6..de62f46 100644
14--- a/src/libkeymap/analyze.l
15+++ b/src/libkeymap/analyze.l
16@@ -463,7 +463,7 @@ To to|To|TO
17
18 strerror_r(errno, buf, sizeof(buf));
19
20- ERR(yyextra, buf);
21+ ERR(yyextra, "%s", buf);
22 return(ERROR);
23 }
24
diff --git a/meta/recipes-core/kbd/kbd/fix_cflags.patch b/meta/recipes-core/kbd/kbd/fix_cflags.patch
deleted file mode 100644
index 37220960ab..0000000000
--- a/meta/recipes-core/kbd/kbd/fix_cflags.patch
+++ /dev/null
@@ -1,25 +0,0 @@
1We need to ensure our CFLAGS are preserved as well as whatever tweak configure
2tries to make. Without these, the debug prefix changes get lost and we lose
3build reproducibility, likely with other side effects.
4
5Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6Upstream-Status: Pending
72020/1/27
8
9Index: kbd-2.2.0/configure.ac
10===================================================================
11--- kbd-2.2.0.orig/configure.ac
12+++ kbd-2.2.0/configure.ac
13@@ -72,9 +72,9 @@ if test "$enable_code_coverage" = yes; t
14 fi
15
16 case "$GCC,$ac_cv_prog_cc_g" in
17- yes,yes) CFLAGS="-g $CC_O_LEVEL $FORTIFY_SOURCE" ;;
18- yes,) CFLAGS="$CC_O_LEVEL $FORTIFY_SOURCE" ;;
19- ,yes) CFLAGS="-g" ;;
20+ yes,yes) CFLAGS="-g $CC_O_LEVEL $FORTIFY_SOURCE $CFLAGS" ;;
21+ yes,) CFLAGS="$CC_O_LEVEL $FORTIFY_SOURCE $CFLAGS" ;;
22+ ,yes) CFLAGS="-g $CFLAGS" ;;
23 esac
24
25 CC_CHECK_CFLAGS_APPEND([\
diff --git a/meta/recipes-core/kbd/kbd/run-ptest b/meta/recipes-core/kbd/kbd/run-ptest
deleted file mode 100644
index 7a2d205f54..0000000000
--- a/meta/recipes-core/kbd/kbd/run-ptest
+++ /dev/null
@@ -1,4 +0,0 @@
1#!/bin/sh
2
3CURDIR=$(dirname `readlink -f $0`)
4make -k -C ${CURDIR}/tests check-TESTS
diff --git a/meta/recipes-core/kbd/kbd/set-proper-path-of-resources.patch b/meta/recipes-core/kbd/kbd/set-proper-path-of-resources.patch
deleted file mode 100644
index 4b1e5b8eeb..0000000000
--- a/meta/recipes-core/kbd/kbd/set-proper-path-of-resources.patch
+++ /dev/null
@@ -1,99 +0,0 @@
1From cb3af8fb072f8999dbb5160bdc95a102b02fd37a Mon Sep 17 00:00:00 2001
2From: Kai Kang <kai.kang@windriver.com>
3Date: Fri, 30 Sep 2016 16:49:55 +0800
4Subject: [PATCH] kbd: create ptest sub-package
5
6Upstream-Status: Inappropriate [embedded specific]
7
8kbd is out of source built, then the value of $(srcdir) is relative path of
9${S}/tests to ${B}/tests. Macro DATADIR is defined with $(srcdir) and replaced
10in .c files by compiler, and string @DATADIR@ is replaced with $(srdir) by rule
11"%: %.in" in Makefile.
12
13But kbd-ptest puts test cases and resource files in same directory, then some
14ptest cases fail to find resources.
15
16Replace DATADIR and @DATADIR@ with current directory(dot) to make test cases
17run as expected.
18
19Signed-off-by: Kai Kang <kai.kang@windriver.com>
20
21---
22 tests/Makefile.am | 4 ++--
23 tests/alt-is-meta.in | 2 +-
24 tests/dumpkeys-bkeymap.in | 4 ++--
25 tests/dumpkeys-fulltable.in | 2 +-
26 tests/dumpkeys-mktable.in | 4 ++--
27 5 files changed, 8 insertions(+), 8 deletions(-)
28
29diff --git a/tests/Makefile.am b/tests/Makefile.am
30index 8d0ab69..5147c28 100644
31--- a/tests/Makefile.am
32+++ b/tests/Makefile.am
33@@ -7,8 +7,8 @@ AM_CPPFLAGS = \
34 -I$(builddir)/../src/libkeymap \
35 -I$(srcdir)/../src/libkbdfile \
36 -I$(builddir)/../src/libkbdfile \
37- -DDATADIR=\"$(srcdir)\" \
38- -DABS_DATADIR=\"$(realpath $(srcdir))\" \
39+ -DDATADIR=\".\" \
40+ -DABS_DATADIR=\"/usr/lib/kbd/ptest/tests\" \
41 -DBUILDDIR=\"$(builddir)\"
42
43 AM_CFLAGS = $(CHECK_CFLAGS) $(CODE_COVERAGE_CFLAGS)
44diff --git a/tests/alt-is-meta.in b/tests/alt-is-meta.in
45index 3a1441f..d829f2e 100755
46--- a/tests/alt-is-meta.in
47+++ b/tests/alt-is-meta.in
48@@ -7,7 +7,7 @@ cd "$cwd"
49 rc=0
50 temp="$(mktemp "@BUILDDIR@/temp.XXXXXXXXX")"
51
52-datadir="@DATADIR@/data/alt-is-meta"
53+datadir="./data/alt-is-meta"
54
55 ./libkeymap-showmaps "$datadir"/alt-is-meta.map > "$temp" || rc=$?
56 cmp -s "$datadir/alt-is-meta.output" "$temp" || rc=$?
57diff --git a/tests/dumpkeys-bkeymap.in b/tests/dumpkeys-bkeymap.in
58index 03d4ca2..d1d0e26 100755
59--- a/tests/dumpkeys-bkeymap.in
60+++ b/tests/dumpkeys-bkeymap.in
61@@ -9,8 +9,8 @@ temp="$(mktemp "@BUILDDIR@/temp.XXXXXXXXX")"
62
63 datadir="@DATADIR@"
64
65-./libkeymap-bkeymap "$datadir/"../data/keymaps/i386/qwerty/defkeymap.map > "$temp" || rc=$?
66-cmp -s "$datadir/data/dumpkeys-bkeymap/bkeymap.bin" "$temp" || rc=$?
67+./libkeymap-bkeymap ../data/keymaps/i386/qwerty/defkeymap.map > "$temp" || rc=$?
68+cmp -s "./data/dumpkeys-bkeymap/bkeymap.bin" "$temp" || rc=$?
69
70 if [ "$rc" != 0 ]; then
71 printf 'failed\n'
72diff --git a/tests/dumpkeys-fulltable.in b/tests/dumpkeys-fulltable.in
73index a3a5ece..67a73ef 100755
74--- a/tests/dumpkeys-fulltable.in
75+++ b/tests/dumpkeys-fulltable.in
76@@ -5,7 +5,7 @@ cwd="$(readlink -ev "${0%/*}")"
77 cd "$cwd"
78
79 BUILDDIR="@BUILDDIR@"
80-DATADIR="@DATADIR@"
81+DATADIR="."
82
83 check_keymap() {
84 local kmap temp rc
85diff --git a/tests/dumpkeys-mktable.in b/tests/dumpkeys-mktable.in
86index 0f17c40..7e5161d 100755
87--- a/tests/dumpkeys-mktable.in
88+++ b/tests/dumpkeys-mktable.in
89@@ -7,8 +7,8 @@ cd "$cwd"
90 rc=0
91 temp="$(mktemp "@BUILDDIR@/temp.XXXXXXXXX")"
92
93-./libkeymap-mktable "@DATADIR@/"../data/keymaps/i386/qwerty/defkeymap.map > "$temp" || rc=$?
94-cmp -s "@DATADIR@/data/dumpkeys-mktable/defkeymap.c" "$temp" || rc=$?
95+./libkeymap-mktable ../data/keymaps/i386/qwerty/defkeymap.map > "$temp" || rc=$?
96+cmp -s "./data/dumpkeys-mktable/defkeymap.c" "$temp" || rc=$?
97
98 if [ "$rc" != 0 ]; then
99 printf 'failed\n'
diff --git a/meta/recipes-core/kbd/kbd_2.2.0.bb b/meta/recipes-core/kbd/kbd_2.2.0.bb
deleted file mode 100644
index e5700ff57f..0000000000
--- a/meta/recipes-core/kbd/kbd_2.2.0.bb
+++ /dev/null
@@ -1,72 +0,0 @@
1SUMMARY = "Keytable files and keyboard utilities"
2HOMEPAGE = "http://www.kbd-project.org/"
3# everything minus console-fonts is GPLv2+
4LICENSE = "GPLv2+"
5LIC_FILES_CHKSUM = "file://COPYING;md5=892f569a555ba9c07a568a7c0c4fa63a"
6
7inherit autotools gettext ptest pkgconfig
8
9DEPENDS += "flex-native"
10
11RREPLACES_${PN} = "console-tools"
12RPROVIDES_${PN} = "console-tools"
13RCONFLICTS_${PN} = "console-tools"
14
15SRC_URI = "${KERNELORG_MIRROR}/linux/utils/${BPN}/${BP}.tar.xz \
16 file://run-ptest \
17 ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'file://set-proper-path-of-resources.patch', '', d)} \
18 file://0001-analyze.l-add-missing-string-format.patch \
19 file://0001-Use-DATADIR-and-append-i386-to-fix-libkbdfile-test08.patch \
20 file://fix_cflags.patch \
21 "
22
23SRC_URI[md5sum] = "d1d7ae0b5fb875dc082731e09cd0c8bc"
24SRC_URI[sha256sum] = "21a1bc5f6fb3b18ce9fdd717e4533368060a3182a39c7155eaf7ec0f5f83e9f7"
25
26PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} \
27 ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests','', d)} \
28 "
29
30PACKAGECONFIG[pam] = "--enable-vlock, --disable-vlock, libpam,"
31PACKAGECONFIG[tests] = "--enable-tests, --disable-tests, libcheck"
32
33do_compile_ptest() {
34 oe_runmake -C ${B}/tests alt-is-meta dumpkeys-bkeymap dumpkeys-fulltable dumpkeys-mktable
35}
36
37do_install_ptest() {
38 install -D ${B}/tests/Makefile ${D}${PTEST_PATH}/tests/Makefile
39 sed -i -e '/Makefile:/,/^$/d' -e '/%: %.in/,/^$/d' \
40 -e 's:--sysroot=${STAGING_DIR_TARGET}::g' \
41 -e 's:${DEBUG_PREFIX_MAP}::g' \
42 -e 's:${HOSTTOOLS_DIR}/::g' \
43 -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
44 -e 's:${RECIPE_SYSROOT}::g' \
45 -e 's:${S}/config/missing::g' \
46 -e 's:${WORKDIR}::g' \
47 -e '/^lib.*_SOURCES =/d' -e '/$(EXEEXT):/,/^$/d' ${D}${PTEST_PATH}/tests/Makefile
48
49 find ${B}/tests -executable -exec install {} ${D}${PTEST_PATH}/tests \;
50 cp -rf ${S}/tests/data ${D}${PTEST_PATH}/tests
51 cp -rf ${S}/tests/findfile ${D}${PTEST_PATH}/tests
52 cp -rf ${S}/data ${D}${PTEST_PATH}
53
54 install -D -m 755 ${S}/config/test-driver ${D}${PTEST_PATH}/config/test-driver
55}
56
57PACKAGES += "${PN}-consolefonts ${PN}-keymaps ${PN}-unimaps ${PN}-consoletrans"
58
59FILES_${PN}-consolefonts = "${datadir}/consolefonts"
60FILES_${PN}-consoletrans = "${datadir}/consoletrans"
61FILES_${PN}-keymaps = "${datadir}/keymaps"
62FILES_${PN}-unimaps = "${datadir}/unimaps"
63
64RDEPENDS_${PN}-ptest = "make"
65
66inherit update-alternatives
67
68ALTERNATIVE_${PN} = "chvt deallocvt fgconsole openvt showkey \
69 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'vlock','', d)}"
70ALTERNATIVE_PRIORITY = "100"
71
72BBCLASSEXTEND = "native"
diff --git a/meta/recipes-core/kbd/kbd_2.3.0.bb b/meta/recipes-core/kbd/kbd_2.3.0.bb
new file mode 100644
index 0000000000..529f49bef4
--- /dev/null
+++ b/meta/recipes-core/kbd/kbd_2.3.0.bb
@@ -0,0 +1,38 @@
1SUMMARY = "Keytable files and keyboard utilities"
2HOMEPAGE = "http://www.kbd-project.org/"
3# everything minus console-fonts is GPLv2+
4LICENSE = "GPLv2+"
5LIC_FILES_CHKSUM = "file://COPYING;md5=892f569a555ba9c07a568a7c0c4fa63a"
6
7inherit autotools gettext pkgconfig
8
9DEPENDS += "flex-native"
10
11RREPLACES_${PN} = "console-tools"
12RPROVIDES_${PN} = "console-tools"
13RCONFLICTS_${PN} = "console-tools"
14
15SRC_URI = "${KERNELORG_MIRROR}/linux/utils/${BPN}/${BP}.tar.xz \
16 "
17
18SRC_URI[sha256sum] = "685056143cb8effd0a1d44b5c391eb50d80dcfd014b1a4d6e2650a28d61cb82a"
19
20PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} \
21 "
22
23PACKAGECONFIG[pam] = "--enable-vlock, --disable-vlock, libpam,"
24
25PACKAGES += "${PN}-consolefonts ${PN}-keymaps ${PN}-unimaps ${PN}-consoletrans"
26
27FILES_${PN}-consolefonts = "${datadir}/consolefonts"
28FILES_${PN}-consoletrans = "${datadir}/consoletrans"
29FILES_${PN}-keymaps = "${datadir}/keymaps"
30FILES_${PN}-unimaps = "${datadir}/unimaps"
31
32inherit update-alternatives
33
34ALTERNATIVE_${PN} = "chvt deallocvt fgconsole openvt showkey \
35 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'vlock','', d)}"
36ALTERNATIVE_PRIORITY = "100"
37
38BBCLASSEXTEND = "native"