From a5cea4c0b49792408edfe5f68e92900acb860cef Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Wed, 15 May 2024 07:53:23 +0100 Subject: [PATCH] recipes: Ensure S is set to a valid directory Several recipes have S pointing at a directory that does not exist. Set S in these cases to somethig valid making the metadata and recipe behaviour more consistent. Tweak one of the QA test diff offsets to match the changed recipe. (From OE-Core rev: 22f1f5849a9a3bf287dbe8933546e52e39ddc86e) Signed-off-by: Richard Purdie --- .../recipes-test/recipeutils/recipeutils-test_1.2.bb | 3 +++ meta-selftest/recipes-test/testrpm/testrpm_0.0.1.bb | 3 +++ meta/lib/oeqa/selftest/cases/recipeutils.py | 4 ++-- .../ssh-pregen-hostkeys/ssh-pregen-hostkeys_1.0.bb | 3 +++ meta/recipes-extended/watchdog/watchdog-config.bb | 3 +++ meta/recipes-kernel/dtc/python3-dtschema-wrapper_2021.10.bb | 3 +++ meta/recipes-support/user-creation/xuser-account_0.1.bb | 3 +++ 7 files changed, 20 insertions(+), 2 deletions(-) diff --git a/meta-selftest/recipes-test/recipeutils/recipeutils-test_1.2.bb b/meta-selftest/recipes-test/recipeutils/recipeutils-test_1.2.bb index c64c469396..8b314d396e 100644 --- a/meta-selftest/recipes-test/recipeutils/recipeutils-test_1.2.bb +++ b/meta-selftest/recipes-test/recipeutils/recipeutils-test_1.2.bb @@ -6,6 +6,9 @@ LICENSE = "HPND" LIC_FILES_CHKSUM = "file://${UNPACKDIR}/somefile;md5=d41d8cd98f00b204e9800998ecf8427e" DEPENDS += "zlib" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" + BBCLASSEXTEND = "native nativesdk" SRC_URI += "file://somefile" diff --git a/meta-selftest/recipes-test/testrpm/testrpm_0.0.1.bb b/meta-selftest/recipes-test/testrpm/testrpm_0.0.1.bb index 5e8761ab55..db674d0efc 100644 --- a/meta-selftest/recipes-test/testrpm/testrpm_0.0.1.bb +++ b/meta-selftest/recipes-test/testrpm/testrpm_0.0.1.bb @@ -6,6 +6,9 @@ LICENSE = "MIT" SRC_URI = "file://testfile.txt" INHIBIT_DEFAULT_DEPS = "1" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" + do_compile(){ echo "testdata" > ${B}/"file with [brackets].txt" echo "testdata" > ${B}/"file with (parentheses).txt" diff --git a/meta/lib/oeqa/selftest/cases/recipeutils.py b/meta/lib/oeqa/selftest/cases/recipeutils.py index 2cb4445f81..9949737172 100644 --- a/meta/lib/oeqa/selftest/cases/recipeutils.py +++ b/meta/lib/oeqa/selftest/cases/recipeutils.py @@ -72,7 +72,7 @@ class RecipeUtilsTests(OESelftestTestCase): expected_patch = """ --- a/recipes-test/recipeutils/recipeutils-test_1.2.bb +++ b/recipes-test/recipeutils/recipeutils-test_1.2.bb -@@ -8,6 +8,4 @@ +@@ -11,6 +11,4 @@ BBCLASSEXTEND = "native nativesdk" @@ -97,7 +97,7 @@ class RecipeUtilsTests(OESelftestTestCase): expected_patch = """ --- a/recipes-test/recipeutils/recipeutils-test_1.2.bb +++ b/recipes-test/recipeutils/recipeutils-test_1.2.bb -@@ -8,6 +8,3 @@ +@@ -11,6 +11,3 @@ BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-connectivity/ssh-pregen-hostkeys/ssh-pregen-hostkeys_1.0.bb b/meta/recipes-connectivity/ssh-pregen-hostkeys/ssh-pregen-hostkeys_1.0.bb index 4a62ddacd5..db5a0eb8ce 100644 --- a/meta/recipes-connectivity/ssh-pregen-hostkeys/ssh-pregen-hostkeys_1.0.bb +++ b/meta/recipes-connectivity/ssh-pregen-hostkeys/ssh-pregen-hostkeys_1.0.bb @@ -6,6 +6,9 @@ SRC_URI = "file://dropbear_rsa_host_key \ LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" + INHIBIT_DEFAULT_DEPS = "1" COMPATIBLE_MACHINE = "^qemu.*$" diff --git a/meta/recipes-extended/watchdog/watchdog-config.bb b/meta/recipes-extended/watchdog/watchdog-config.bb index e826a7d4a6..17151ced5e 100644 --- a/meta/recipes-extended/watchdog/watchdog-config.bb +++ b/meta/recipes-extended/watchdog/watchdog-config.bb @@ -13,6 +13,9 @@ SRC_URI = " \ file://watchdog.conf \ " +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" + # The default value is 60 seconds when null. WATCHDOG_TIMEOUT ??= "" diff --git a/meta/recipes-kernel/dtc/python3-dtschema-wrapper_2021.10.bb b/meta/recipes-kernel/dtc/python3-dtschema-wrapper_2021.10.bb index 332525f5c9..a766b00bef 100644 --- a/meta/recipes-kernel/dtc/python3-dtschema-wrapper_2021.10.bb +++ b/meta/recipes-kernel/dtc/python3-dtschema-wrapper_2021.10.bb @@ -7,6 +7,9 @@ SRC_URI = "file://dt-doc-validate \ file://dt-mk-schema \ file://dt-validate" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" + do_install() { install -d ${D}${bindir}/ install -m 755 ${UNPACKDIR}/dt-doc-validate ${D}${bindir}/ diff --git a/meta/recipes-support/user-creation/xuser-account_0.1.bb b/meta/recipes-support/user-creation/xuser-account_0.1.bb index 2bd3699e74..80a429c6d3 100644 --- a/meta/recipes-support/user-creation/xuser-account_0.1.bb +++ b/meta/recipes-support/user-creation/xuser-account_0.1.bb @@ -6,6 +6,9 @@ SRC_URI = "file://system-xuser.conf" inherit allarch useradd +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" + do_configure() { : }