From: Martin Jansa <martin.jansa@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH] sanity.bbclass: show warning when chmod fails
Date: Thu, 24 Sep 2015 15:46:50 +0200 [thread overview]
Message-ID: <20150924134650.GA2397@jama> (raw)
In-Reply-To: <1443024836-20974-1-git-send-email-Martin.Jansa@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 3997 bytes --]
On Wed, Sep 23, 2015 at 06:13:56PM +0200, Martin Jansa wrote:
> From: Alex Franco <alejandro.franco@linux.intel.com>
>
> * for some reason this part of:
> http://patchwork.openembedded.org/patch/102561/
> wasn't ever merged.
I've changed the configuration on my jenkins servers, so that now it
doesn't fail.
In case someone needs that as well then you need to use mode, uid and
git parameters for mounting tmpfs, e.g.
none /home/jenkins/oe/world/shr-core/tmp-glibc/ tmpfs noatime,nodev,nosuid,size=74G,mode=777,users,exec,uid=3004,gid=3004 0 0
where 3004 is uid and gid of jenkins user which is running the bitbake.
This change is still needed, because following exception shows so much about
bbclass sanity, that average user will get confused and eventually insane.
ERROR: Execution of event handler 'check_sanity_eventhandler' failed
Traceback (most recent call last):
File "check_sanity_eventhandler(e)", line 6, in check_sanity_eventhandler(e=<bb.event.SanityCheck object at 0x57ec3d0>)
File "sanity.bbclass", line 34, in check_sanity(sanity_data=<bb.data_smart.DataSmart object at 0x57d5e10>)
File "sanity.bbclass", line 155, in check_sanity_everybuild(status=<SanityStatus object at 0x57d5490>, d=<bb.data_smart.DataSmart object at 0x57d5e10>)
OSError: [Errno 1] Operation not permitted: '/home/jenkins/workspace/luneos-unstable/webos-ports/tmp-glibc'
ERROR: Command execution failed: Traceback (most recent call last):
File "/home/jenkins/workspace/luneos-unstable/webos-ports/bitbake/lib/bb/command.py", line 101, in runAsyncCommand
self.cooker.updateCache()
File "/home/jenkins/workspace/luneos-unstable/webos-ports/bitbake/lib/bb/cooker.py", line 1503, in updateCache
bb.event.fire(bb.event.SanityCheck(False), self.data)
File "/home/jenkins/workspace/luneos-unstable/webos-ports/bitbake/lib/bb/event.py", line 170, in fire
fire_class_handlers(event, d)
File "/home/jenkins/workspace/luneos-unstable/webos-ports/bitbake/lib/bb/event.py", line 109, in fire_class_handlers
execute_handler(name, handler, event, d)
File "/home/jenkins/workspace/luneos-unstable/webos-ports/bitbake/lib/bb/event.py", line 81, in execute_handler
ret = handler(event)
File "check_sanity_eventhandler(e)", line 6, in check_sanity_eventhandler
File "sanity.bbclass", line 34, in check_sanity
File "sanity.bbclass", line 155, in check_sanity_everybuild
OSError: [Errno 1] Operation not permitted: '/home/jenkins/workspace/luneos-unstable/webos-ports/tmp-glibc'
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
Command exited with non-zero status 1
>
> [YOCTO #7669]
>
> Signed-off-by: Alex Franco <alejandro.franco@linux.intel.com>
> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> ---
> meta/classes/sanity.bbclass | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
> index 2eb744f..34f8618 100644
> --- a/meta/classes/sanity.bbclass
> +++ b/meta/classes/sanity.bbclass
> @@ -839,9 +839,12 @@ def check_sanity_everybuild(status, d):
> else:
> bb.utils.mkdirhier(tmpdir)
> # Remove setuid, setgid and sticky bits from TMPDIR
> - os.chmod(tmpdir, os.stat(tmpdir).st_mode & ~ stat.S_ISUID)
> - os.chmod(tmpdir, os.stat(tmpdir).st_mode & ~ stat.S_ISGID)
> - os.chmod(tmpdir, os.stat(tmpdir).st_mode & ~ stat.S_ISVTX)
> + try:
> + os.chmod(tmpdir, os.stat(tmpdir).st_mode & ~ stat.S_ISUID)
> + os.chmod(tmpdir, os.stat(tmpdir).st_mode & ~ stat.S_ISGID)
> + os.chmod(tmpdir, os.stat(tmpdir).st_mode & ~ stat.S_ISVTX)
> + except OSError:
> + bb.warn("Unable to chmod TMPDIR: %s" % tmpdir)
> with open(checkfile, "w") as f:
> f.write(tmpdir)
>
> --
> 2.5.3
>
--
Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 188 bytes --]
prev parent reply other threads:[~2015-09-24 13:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-03 21:56 [PATCHv4] Fix recursive mode -st on BUILDDIR setup Alex Franco
2015-09-04 7:17 ` Patrick Ohly
2015-09-04 7:23 ` Patrick Ohly
2015-09-04 20:20 ` Alex Franco
2015-09-23 16:13 ` [PATCH] sanity.bbclass: show warning when chmod fails Martin Jansa
2015-09-23 20:25 ` Christopher Larson
2015-09-24 13:46 ` Martin Jansa [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150924134650.GA2397@jama \
--to=martin.jansa@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox