diff options
Diffstat (limited to 'meta-oe/recipes-support/mcelog')
-rw-r--r-- | meta-oe/recipes-support/mcelog/mce-inject_git.bb | 6 | ||||
-rw-r--r-- | meta-oe/recipes-support/mcelog/mce-test_git.bb | 16 | ||||
-rw-r--r-- | meta-oe/recipes-support/mcelog/mcelog/0001-client-Include-string.h-form-mem-function-prototypes.patch | 26 | ||||
-rw-r--r-- | meta-oe/recipes-support/mcelog/mcelog/0001-server-Correct-prameter-type-for-connect-API.patch | 43 | ||||
-rw-r--r-- | meta-oe/recipes-support/mcelog/mcelog/0001-test-avoid-the-pfa-test-hang.patch | 36 | ||||
-rw-r--r-- | meta-oe/recipes-support/mcelog/mcelog/run-ptest | 8 | ||||
-rw-r--r-- | meta-oe/recipes-support/mcelog/mcelog_198.bb (renamed from meta-oe/recipes-support/mcelog/mcelog_175.bb) | 27 |
7 files changed, 106 insertions, 56 deletions
diff --git a/meta-oe/recipes-support/mcelog/mce-inject_git.bb b/meta-oe/recipes-support/mcelog/mce-inject_git.bb index cc33cbaf28..a228c3cc06 100644 --- a/meta-oe/recipes-support/mcelog/mce-inject_git.bb +++ b/meta-oe/recipes-support/mcelog/mce-inject_git.bb @@ -4,7 +4,7 @@ software level into a running Linux kernel. This is intended for \ validation of the kernel machine check handler." SECTION = "System Environment/Base" -SRC_URI = "git://git.kernel.org/pub/scm/utils/cpu/mce/mce-inject.git" +SRC_URI = "git://git.kernel.org/pub/scm/utils/cpu/mce/mce-inject.git;branch=master" SRCREV = "4cbe46321b4a81365ff3aafafe63967264dbfec5" @@ -12,7 +12,7 @@ UPSTREAM_CHECK_COMMITS = "1" DEPENDS = "bison-native" -LICENSE = "GPLv2" +LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://README;beginline=30;md5=94c18755082a2da9c9cf97cba3ad47d6" S = "${WORKDIR}/git" @@ -21,4 +21,4 @@ COMPATIBLE_HOST = '(x86_64.*|i.86.*)-linux' inherit autotools-brokensep -EXTRA_OEMAKE = "destdir=${D}" +EXTRA_OEMAKE = "destdir=${D} CFLAGS='${CFLAGS}'" diff --git a/meta-oe/recipes-support/mcelog/mce-test_git.bb b/meta-oe/recipes-support/mcelog/mce-test_git.bb index 35fb944702..05e98e86ed 100644 --- a/meta-oe/recipes-support/mcelog/mce-test_git.bb +++ b/meta-oe/recipes-support/mcelog/mce-test_git.bb @@ -7,25 +7,27 @@ DESCRIPTION = "The MCE test suite is a collection of tools and test scripts for testing the Linux RAS related features, including CPU/Memory error \ containment and recovery, ACPI/APEI support etc." -LICENSE = "GPLv2" +LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3" -SRC_URI = "git://git.kernel.org/pub/scm/utils/cpu/mce/mce-test.git;protocol=git \ +SRC_URI = "git://git.kernel.org/pub/scm/utils/cpu/mce/mce-test.git;protocol=git;branch=master \ file://makefile-remove-ldflags.patch \ file://0001-gcov_merge.py-scov_merge.py-switch-to-python3.patch \ " -SRCREV = "7643baf6c3919b3d727e6ba6c2e545dc6a653307" -PV = "20190917+git${SRCPV}" +SRCREV = "025014dedca39d2b8a57a82e52286e72e157d73a" +PV = "20222810+git" -RDEPENDS_${PN} = "mcelog mce-inject dialog bash" +RDEPENDS:${PN} = "mcelog mce-inject dialog bash" COMPATIBLE_HOST = '(i.86|x86_64).*-linux' S ="${WORKDIR}/git" -do_install_append(){ +EXTRA_OEMAKE += "CFLAGS='${CFLAGS}'" + +do_install:append(){ install -d ${D}/opt/mce-test cp -rf ${S}/* ${D}/opt/mce-test/ } -FILES_${PN} += "/opt" +FILES:${PN} += "/opt" diff --git a/meta-oe/recipes-support/mcelog/mcelog/0001-client-Include-string.h-form-mem-function-prototypes.patch b/meta-oe/recipes-support/mcelog/mcelog/0001-client-Include-string.h-form-mem-function-prototypes.patch new file mode 100644 index 0000000000..3b6fd7d702 --- /dev/null +++ b/meta-oe/recipes-support/mcelog/mcelog/0001-client-Include-string.h-form-mem-function-prototypes.patch @@ -0,0 +1,26 @@ +From c7753f82261d49862d5e0f9691bf87799d36ef0c Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 31 Aug 2022 16:20:03 -0700 +Subject: [PATCH] client: Include string.h form mem* function prototypes + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + client.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/client.c b/client.c +index 883b1de..e474e55 100644 +--- a/client.c ++++ b/client.c +@@ -16,6 +16,7 @@ + on your Linux system; if not, write to the Free Software Foundation, + Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + #include <stdio.h> ++#include <string.h> + #include <sys/socket.h> + #include <sys/un.h> + #include <unistd.h> +-- +2.37.3 + diff --git a/meta-oe/recipes-support/mcelog/mcelog/0001-server-Correct-prameter-type-for-connect-API.patch b/meta-oe/recipes-support/mcelog/mcelog/0001-server-Correct-prameter-type-for-connect-API.patch new file mode 100644 index 0000000000..2f26f9ced5 --- /dev/null +++ b/meta-oe/recipes-support/mcelog/mcelog/0001-server-Correct-prameter-type-for-connect-API.patch @@ -0,0 +1,43 @@ +From 0370e7a9fb0ca1b27d7b0897739e2a7cce8977ab Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sat, 11 May 2024 22:42:07 -0700 +Subject: [PATCH] server: Correct prameter type for connect() API + +connect() function expects the second argument to be point to sockaddr +as per man sockaddr + +int connect (int, const struct sockaddr *, socklen_t); + +Fixes build failures with -Wincompatible-pointer-types when using GCC-14 +and musl + +Fixes +| server.c: In function 'server_ping': +| server.c:308:33: error: passing argument 2 of 'connect' from incompatible pointer type [-Wincompatible-pointer-types] +| 308 | if (connect(fd, un, sizeof(struct sockaddr_un)) < 0) +| | ^~ +| | | +| | struct sockaddr_un * + +Upstream-Status: Submitted [ sent to contact@mcelog.org ] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + server.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/server.c b/server.c +index 54c7d57..51b7d3a 100644 +--- a/server.c ++++ b/server.c +@@ -305,7 +305,7 @@ static int server_ping(struct sockaddr_un *un) + if (sigsetjmp(ping_timeout_ctx, 1) == 0) { + ret = -1; + alarm(initial_ping_timeout); +- if (connect(fd, un, sizeof(struct sockaddr_un)) < 0) ++ if (connect(fd, (const struct sockaddr *)un, sizeof(struct sockaddr_un)) < 0) + goto cleanup; + if (write(fd, PAIR("ping\n")) < 0) + goto cleanup; +-- +2.45.0 + diff --git a/meta-oe/recipes-support/mcelog/mcelog/0001-test-avoid-the-pfa-test-hang.patch b/meta-oe/recipes-support/mcelog/mcelog/0001-test-avoid-the-pfa-test-hang.patch deleted file mode 100644 index 03bcc451df..0000000000 --- a/meta-oe/recipes-support/mcelog/mcelog/0001-test-avoid-the-pfa-test-hang.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 3765b3a4cabf76f55c1c126ac64780a8c117d1d9 Mon Sep 17 00:00:00 2001 -From: Mingli Yu <mingli.yu@windriver.com> -Date: Tue, 12 Jan 2021 10:30:13 +0800 -Subject: [PATCH] test: avoid the pfa test hang - -Per [1], the pfa test needs to install page-types and the pfa test -will hang forever if there is no page-types installed. - -Improve the test script to avoid the pfa test hang. - -[1] https://git.kernel.org/pub/scm/utils/cpu/mce/mcelog.git/tree/tests/pfa/PFA_test_howto?id=7b776a8c005b60572f49797e81287540f99fff1f - -Upstream-Status: Submitted [https://github.com/andikleen/mcelog/pull/87] - -Signed-off-by: Mingli Yu <mingli.yu@windriver.com> ---- - tests/test | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/tests/test b/tests/test -index 020ae2b..320f57f 100755 ---- a/tests/test -+++ b/tests/test -@@ -47,6 +47,9 @@ do - # Inject mce records and run mcelog in parallel. - # So that the mce records can be consumed by mcelog in time (avoid mce record overflow). - ./inject $conf & -+ if [ "$1" = "pfa" ] ; then -+ which page-types > /dev/null 2>&1 || continue -+ fi - $D ../../mcelog --foreground --daemon --debug-numerrors --config $conf --logfile $log >> result - - # let triggers finish --- -2.29.2 - diff --git a/meta-oe/recipes-support/mcelog/mcelog/run-ptest b/meta-oe/recipes-support/mcelog/mcelog/run-ptest index ba7a2c7683..320240f276 100644 --- a/meta-oe/recipes-support/mcelog/mcelog/run-ptest +++ b/meta-oe/recipes-support/mcelog/mcelog/run-ptest @@ -1,3 +1,9 @@ #!/bin/sh -make -C tests test +make -C tests test | sed -e '/\[PASS\]/ s/^/PASS: /g' \ + -e '/\[FAIL\]/ s/^/FAIL: /g' \ + -e '/\[IGNORE\]/ s/^/SKIP: /g' \ + -e 's/IGNORE:/SKIP:/' \ + -e 's/: \[PASS\]//' \ + -e 's/: \[FAIL\]//' \ + -e 's/: \[IGNORE\]//' diff --git a/meta-oe/recipes-support/mcelog/mcelog_175.bb b/meta-oe/recipes-support/mcelog/mcelog_198.bb index ae810eff8e..10b2293195 100644 --- a/meta-oe/recipes-support/mcelog/mcelog_175.bb +++ b/meta-oe/recipes-support/mcelog/mcelog_198.bb @@ -2,26 +2,35 @@ SUMMARY = "mcelog daemon accounts memory and some other errors in various ways." DESCRIPTION = "mcelog is required by both 32bit x86 Linux kernels (since 2.6.30) \ and 64bit Linux kernels (since early 2.6 kernel releases) to log machine checks \ and should run on all Linux systems that need error handling." -HOMEPAGE = "http://mcelog.org/" +HOMEPAGE = "https://mcelog.org/" SECTION = "System Environment/Base" -SRC_URI = "git://git.kernel.org/pub/scm/utils/cpu/mce/mcelog.git;protocol=http; \ - file://0001-test-avoid-the-pfa-test-hang.patch \ +SRC_URI = "\ + git://git.kernel.org/pub/scm/utils/cpu/mce/mcelog.git;protocol=http;;branch=master \ + file://0001-client-Include-string.h-form-mem-function-prototypes.patch \ + file://0001-server-Correct-prameter-type-for-connect-API.patch \ file://run-ptest \ " -SRCREV = "7b776a8c005b60572f49797e81287540f99fff1f" +SRCREV = "ab58f07b9b1a4456fca0f5f41639d5cbecc80e36" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://README.md;md5=74bb47b9a68850cb398665cf78b31de6" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263" S = "${WORKDIR}/git" -inherit autotools-brokensep ptest +inherit ptest COMPATIBLE_HOST = '(x86_64.*|i.86.*)-linux' -do_install_append() { +EXTRA_OEMAKE += "CFLAGS='${CFLAGS}'" + +do_compile() { + oe_runmake +} + +do_install() { + oe_runmake install DESTDIR=${D} install -d ${D}${sysconfdir}/cron.hourly install -m 0755 ${S}/mcelog.cron ${D}${sysconfdir}/cron.hourly/ sed -i 's/bash/sh/' ${D}${sysconfdir}/cron.hourly/mcelog.cron @@ -33,4 +42,4 @@ do_install_ptest() { sed -i 's#../../mcelog#mcelog#' ${D}${PTEST_PATH}/tests/test } -RDEPENDS_${PN}-ptest += "make bash mce-inject" +RDEPENDS:${PN}-ptest += "make bash mce-inject" |