sanity.bbclass: verify that user isn't building in PSEUDO_IGNORE_PATHS
PATCH 1/1 sanity.bbclass: verify that user isn't building in PSEUDO_IGNORE_PATHS
If a user builds in a path in PSEUDO_IGNORE_PATHS, random failures are generated. Hence this patch adds a sanity check in sanity.bbclass to ensure that a user isn't building in PSEUDO_IGNORE_PATHS.
[YOCTO #14179]
--- meta/classes/sanity.bbclass | 7 +++++++ 1 file changed, 7 insertions(+)
meta/classes/sanity.bbclass +7 -0
@@ -703,6 +703,13 @@ def check_sanity_version_change(status, d): if (tmpdirmode & stat.S_ISUID): status.addresult("TMPDIR is setuid, please don't build in a setuid directory") + # Check that a user isn't building in a path in PSEUDO_IGNORE_PATHS + pseudoignorepaths = d.getVar('PSEUDO_IGNORE_PATHS', expand=True).split(",") + workdir = d.getVar('WORKDIR', expand=True) + for i in pseudoignorepaths: + 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") + # Some third-party software apparently relies on chmod etc. being suid root (!!) import stat suid_check_bins = "chown chmod mknod".split()
Signature · 1 line
2.17.1
Hi Dorinda,
Quoted 2 lines · Dorinda
If a user builds in a path in
PSEUDO_IGNORE_PATHS, random failures are generated. Hence this patch adds a sanity check in sanity.bbclass to ensure that a user isn't building inPSEUDO_IGNORE_PATHS.
Commit log is usually wraped when reaching a given length. I personally have it set to 72 characters which IIRC is what's used for kernel contribution.
This does not apply to actual logs provided in the commit log.
It's just nitpick, as I saw a commit or two not following this implicit "rule" in poky, I'd say there's no need to resend a patch just for this.
Also, please add a version tag when you send revamped patches.
You can do that by adding -v 2 to git format-patch.
Quoted 4 lines
[YOCTO #14179]
Signed-off-by Dorinda Bassey <[email protected]>---
And if you want to do it really the very nice way (IMO, as always), you can provide below the --- (the one above this) and the list of files changed (the one below this), you can list what has changed between v N-1 and v N.
e.g.
v2:
- rephrased error log,
- added a check for empty paths in pseudoignorepaths,
meta/classes/sanity.bbclass
Quoted 7 lines
meta/classes/sanity.bbclass | 7 +++++++ 1 file changed, 7 insertions(+)meta/classes/sanity.bbclass +0
-0
Only nitpicks, so nothing to be done on my side if no new change is requested by other reviewers.
Cheers,
Quentin