* [PATCH v2] sanity.bbclass: check if PSEUDO_IGNORE_PATHS and ${S} overlap
@ 2021-01-28 19:51 Dorinda
2021-01-28 21:06 ` Dorinda
2021-01-30 11:01 ` [OE-core] " Richard Purdie
0 siblings, 2 replies; 4+ messages in thread
From: Dorinda @ 2021-01-28 19:51 UTC (permalink / raw)
To: openembedded-core; +Cc: dorindabassey
added a sanity check for when PSEUDO_IGNORE_PATHS and ${S} overlap to avoid random failures generated.
[YOCTO #14193]
Signed-off-by: Dorinda Bassey <dorindabassey@gmail.com>
---
v2:
added a condition for when {WORKDIR}={S}
meta/classes/sanity.bbclass | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index c6842ff549..63284b7917 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -710,6 +710,16 @@ def check_sanity_version_change(status, d):
if i and workdir.startswith(i):
status.addresult("You are building in a path included in PSEUDO_IGNORE_PATHS " + str(i) + " please locate the build outside this path.\n")
+ # Check if PSEUDO_IGNORE_PATHS and ${S} overlap
+ pseudoignorepaths = d.getVar('PSEUDO_IGNORE_PATHS', expand=True).split(",")
+ workdir = d.getVar('WORKDIR')
+ sourcefile = d.getVar('S')
+ if (workdir == sourcefile):
+ for i in pseudoignorepaths:
+ if i and sourcefile:
+ if sourcefile.startswith(i) or i.startswith(sourcefile):
+ status.addresult("a path included in PSEUDO_IGNORE_PATHS " + str(i) + " and ${S} (source files) path " + str(sourcefile) + " are overlapping each other, please set ${S} in your recipe to point to a different directory. \n")
+
# Some third-party software apparently relies on chmod etc. being suid root (!!)
import stat
suid_check_bins = "chown chmod mknod".split()
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] sanity.bbclass: check if PSEUDO_IGNORE_PATHS and ${S} overlap
2021-01-28 19:51 [PATCH v2] sanity.bbclass: check if PSEUDO_IGNORE_PATHS and ${S} overlap Dorinda
@ 2021-01-28 21:06 ` Dorinda
2021-01-30 11:01 ` [OE-core] " Richard Purdie
1 sibling, 0 replies; 4+ messages in thread
From: Dorinda @ 2021-01-28 21:06 UTC (permalink / raw)
To: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 1962 bytes --]
This patch won't be necessary as the previous patch here
https://listshanks.openembedded.org/g/openembedded-core/message/147238?p=,,,20,0,0,0::Created,,verify+that+user,20,2,0,80117826
would detect it.
Thanks,
Dorinda
On Jan 28, 2021 20:51, "dorindabassey" <dorindabassey@gmail.com> wrote:
> added a sanity check for when PSEUDO_IGNORE_PATHS and ${S} overlap to
> avoid random failures generated.
>
> [YOCTO #14193]
>
> Signed-off-by: Dorinda Bassey <dorindabassey@gmail.com>
> ---
> v2:
> added a condition for when {WORKDIR}={S}
>
> meta/classes/sanity.bbclass | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
> index c6842ff549..63284b7917 100644
> --- a/meta/classes/sanity.bbclass
> +++ b/meta/classes/sanity.bbclass
> @@ -710,6 +710,16 @@ def check_sanity_version_change(status, d):
> if i and workdir.startswith(i):
> status.addresult("You are building in a path included in
> PSEUDO_IGNORE_PATHS " + str(i) + " please locate the build outside this
> path.\n")
>
> + # Check if PSEUDO_IGNORE_PATHS and ${S} overlap
> + pseudoignorepaths = d.getVar('PSEUDO_IGNORE_PATHS',
> expand=True).split(",")
> + workdir = d.getVar('WORKDIR')
> + sourcefile = d.getVar('S')
> + if (workdir == sourcefile):
> + for i in pseudoignorepaths:
> + if i and sourcefile:
> + if sourcefile.startswith(i) or i.startswith(sourcefile):
> + status.addresult("a path included in
> PSEUDO_IGNORE_PATHS " + str(i) + " and ${S} (source files) path " +
> str(sourcefile) + " are overlapping each other, please set ${S} in your
> recipe to point to a different directory. \n")
> +
> # Some third-party software apparently relies on chmod etc. being
> suid root (!!)
> import stat
> suid_check_bins = "chown chmod mknod".split()
> --
> 2.17.1
>
>
[-- Attachment #2: Type: text/html, Size: 2763 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [OE-core] [PATCH v2] sanity.bbclass: check if PSEUDO_IGNORE_PATHS and ${S} overlap
2021-01-28 19:51 [PATCH v2] sanity.bbclass: check if PSEUDO_IGNORE_PATHS and ${S} overlap Dorinda
2021-01-28 21:06 ` Dorinda
@ 2021-01-30 11:01 ` Richard Purdie
2021-01-31 21:15 ` Dorinda
1 sibling, 1 reply; 4+ messages in thread
From: Richard Purdie @ 2021-01-30 11:01 UTC (permalink / raw)
To: Dorinda, openembedded-core; +Cc: Qi.Chen, ip.jango
On Thu, 2021-01-28 at 20:51 +0100, Dorinda wrote:
> added a sanity check for when PSEUDO_IGNORE_PATHS and ${S} overlap to avoid random failures generated.
>
> [YOCTO #14193]
>
> Signed-off-by: Dorinda Bassey <dorindabassey@gmail.com>
> ---
> v2:
> added a condition for when {WORKDIR}={S}
>
> meta/classes/sanity.bbclass | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
> index c6842ff549..63284b7917 100644
> --- a/meta/classes/sanity.bbclass
> +++ b/meta/classes/sanity.bbclass
> @@ -710,6 +710,16 @@ def check_sanity_version_change(status, d):
> if i and workdir.startswith(i):
> status.addresult("You are building in a path included in PSEUDO_IGNORE_PATHS " + str(i) + " please locate the build outside this path.\n")
>
>
>
>
> + # Check if PSEUDO_IGNORE_PATHS and ${S} overlap
> + pseudoignorepaths = d.getVar('PSEUDO_IGNORE_PATHS', expand=True).split(",")
> + workdir = d.getVar('WORKDIR')
> + sourcefile = d.getVar('S')
> + if (workdir == sourcefile):
> + for i in pseudoignorepaths:
> + if i and sourcefile:
> + if sourcefile.startswith(i) or i.startswith(sourcefile):
> + status.addresult("a path included in PSEUDO_IGNORE_PATHS " + str(i) + " and ${S} (source files) path " + str(sourcefile) + " are overlapping each other, please set ${S} in your recipe to point to a different directory. \n")
> +
> # Some third-party software apparently relies on chmod etc. being suid root (!!)
> import stat
> suid_check_bins = "chown chmod mknod".split()
This isn't quite solving the problem in bug 14193. In that bug lets
say:
S = "${WORKDIR}/pack"
and this overlaps with ${WORKDIR}/package (PKGD) and
${WORKDIR}/packages-split (PKGDEST) which are set in package.bbclass.
So the sanity test we need here is to test whether any element of
PSEUDO_IGNORE_PATHS overlaps with directories we know need to be under
pseudo control. Qi already had a list of these in a different patch:
${D},${PKGD},${PKGDEST},${IMAGE_ROOTFS},${SDK_OUTPUT}
Cheers,
Richard
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [OE-core] [PATCH v2] sanity.bbclass: check if PSEUDO_IGNORE_PATHS and ${S} overlap
2021-01-30 11:01 ` [OE-core] " Richard Purdie
@ 2021-01-31 21:15 ` Dorinda
0 siblings, 0 replies; 4+ messages in thread
From: Dorinda @ 2021-01-31 21:15 UTC (permalink / raw)
To: Richard Purdie; +Cc: openembedded-core, Qi.Chen
[-- Attachment #1: Type: text/plain, Size: 2430 bytes --]
Alright, I understand Thanks.
I've added the directories under pseudo control and sent a v3 patch to the
list.
Thanks,
Dorinda.
On Jan 30, 2021 12:01, "Richard Purdie" <richard.purdie@linuxfoundation.org>
wrote:
On Thu, 2021-01-28 at 20:51 +0100, Dorinda wrote:
> added a sanity check for when PSEUDO_IGNORE_PATHS and ${S} overlap to
avoid random failures generated.
>
> [YOCTO #14193]
>
> Signed-off-by: Dorinda Bassey <dorindabassey@gmail.com>
> ---
> v2:
> added a condition for when {WORKDIR}={S}
>
> meta/classes/sanity.bbclass | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
> index c6842ff549..63284b7917 100644
> --- a/meta/classes/sanity.bbclass
> +++ b/meta/classes/sanity.bbclass
> @@ -710,6 +710,16 @@ def check_sanity_version_change(status, d):
> if i and workdir.startswith(i):
> status.addresult("You are building in a path included in
PSEUDO_IGNORE_PATHS " + str(i) + " please locate the build outside this
path.\n")
>
>
>
>
> + # Check if PSEUDO_IGNORE_PATHS and ${S} overlap
> + pseudoignorepaths = d.getVar('PSEUDO_IGNORE_PATHS',
expand=True).split(",")
> + workdir = d.getVar('WORKDIR')
> + sourcefile = d.getVar('S')
> + if (workdir == sourcefile):
> + for i in pseudoignorepaths:
> + if i and sourcefile:
> + if sourcefile.startswith(i) or i.startswith(sourcefile):
> + status.addresult("a path included in
PSEUDO_IGNORE_PATHS " + str(i) + " and ${S} (source files) path " +
str(sourcefile) + " are overlapping each other, please set ${S} in your
recipe to point to a different directory. \n")
> +
> # Some third-party software apparently relies on chmod etc. being
suid root (!!)
> import stat
> suid_check_bins = "chown chmod mknod".split()
This isn't quite solving the problem in bug 14193. In that bug lets
say:
S = "${WORKDIR}/pack"
and this overlaps with ${WORKDIR}/package (PKGD) and
${WORKDIR}/packages-split (PKGDEST) which are set in package.bbclass.
So the sanity test we need here is to test whether any element of
PSEUDO_IGNORE_PATHS overlaps with directories we know need to be under
pseudo control. Qi already had a list of these in a different patch:
${D},${PKGD},${PKGDEST},${IMAGE_ROOTFS},${SDK_OUTPUT}
Cheers,
Richard
[-- Attachment #2: Type: text/html, Size: 3458 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-01-31 21:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-28 19:51 [PATCH v2] sanity.bbclass: check if PSEUDO_IGNORE_PATHS and ${S} overlap Dorinda
2021-01-28 21:06 ` Dorinda
2021-01-30 11:01 ` [OE-core] " Richard Purdie
2021-01-31 21:15 ` Dorinda
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.