All of lore.kernel.org
 help / color / mirror / Atom feed
From: Max Krummenacher <max.oss.09@gmail.com>
To: Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: Max Krummenacher <max.krummenacher@toradex.com>,
	OE-core <openembedded-core@lists.openembedded.org>
Subject: Re: [oe][Patch] package.bbclass: fix host contamination warnings for source files
Date: Mon, 4 Apr 2016 00:51:29 +0200	[thread overview]
Message-ID: <CAEHkU3VUnh78uOWRT2gYhAR5QOxYGDnc6J8RAsqkEkyj31HWfA@mail.gmail.com> (raw)
In-Reply-To: <1459719934.7348.141.camel@linuxfoundation.org>

2016-04-03 23:45 GMT+02:00 Richard Purdie <richard.purdie@linuxfoundation.org>:
> On Sun, 2016-04-03 at 22:57 +0200, Max Krummenacher wrote:
>> Addresses https://bugzilla.yoctoproject.org/show_bug.cgi?id=8939
>>
>> Source files deployed with the *-dbg packages are owned by the user
>> running bitbake leading to warnings as the one below.
>>
>> WARNING: glibc-2.23-r0 do_package_qa: QA Issue: glibc: /glibc
>> -dbg/usr/src/debug/glibc/2.23-r0/git/include/resolv.h is owned by uid
>> 1000, which is the same as the user running bitbake. This may be due
>> to host contamination
>> glibc: /glibc-dbg/usr/src/debug/glibc/2.23-r0/git/include/monetary.h
>> is owned by uid 1000, which is the same as the user running bitbake.
>> This may be due to host contamination
>> glibc: /glibc-dbg/usr/src/debug/glibc/2.23-r0/git/include/locale.h is
>> owned by uid 1000, which is the same as the user running bitbake.
>> This may be due to host contamination
>> ...
>>
>> The files are copied as part of the do_package task.
>> The patch chowns all file in packages/usr/src after cpio copied them
>> into the
>> package directory.
>>
>> Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
>> ---
>>
>>
>>  meta/classes/package.bbclass | 23 +++++++++++++++++++++++
>>  1 file changed, 23 insertions(+)
>>
>> diff --git a/meta/classes/package.bbclass
>> b/meta/classes/package.bbclass
>> index bdbe96d..d9ef62c 100644
>> --- a/meta/classes/package.bbclass
>> +++ b/meta/classes/package.bbclass
>> @@ -362,6 +362,7 @@ def copydebugsources(debugsrcdir, d):
>>      # and copied to the destination here.
>>
>>      import stat
>> +    import subprocess
>>
>>      sourcefile = d.expand("${WORKDIR}/debugsources.list")
>>      if debugsrcdir and os.path.isfile(sourcefile):
>> @@ -410,6 +411,28 @@ def copydebugsources(debugsrcdir, d):
>>          if retval:
>>              bb.fatal("debugsrc symlink fixup failed with exit code
>> %s (cmd was %s)" % (retval, cmd))
>>
>> +        # cpio --no-preserve-owner does not create the destination
>> files with
>> +        # owner root even when run under pseudo, chown them
>> explicitely.
>
> How about passing --owner=0:0 to cpio?

That was my first try, it didn't help.
I'm also not sure if do_package() is executed under pseudo by default.
Also since the command is a pipeline, I don't know if pseudo is
propagated from one command to the next.
Actually I feel a bit as a sorcerer apprentice when it comes to
python/pseudo/packaging.

>
> I'm a little worried about why I don't see this failure on my own local
> builds.
I added some text to bugzilla. The gist is: In poky the sources are
not deployed.
No source files, no wrong ownership.

What I did is doing a repo setup of angstrom master.

Removed the following from bblayers.conf because of parsing errors:
  ${TOPDIR}/sources/meta-uav
  ${TOPDIR}/sources/meta-kde4
  ${TOPDIR}/sources/meta-edison
  ${TOPDIR}/sources/meta-atmel
  ${TOPDIR}/sources/meta-minnow
  ${TOPDIR}/sources/meta-altera

And then:
. setup-environment qemux86
bitbake core-image-minimal

Regards
Max

>
> We have a few cases where things sometimes seem to work out and
> sometimes don't and I'd love to get to the bottom of how to reproduce
> it and to understand why its different for different people.
>
> Cheers,
>
> Richard


  parent reply	other threads:[~2016-04-03 22:51 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-03 20:57 [oe][Patch] package.bbclass: fix host contamination warnings for source files Max Krummenacher
2016-04-03 21:37 ` Andreas Müller
2016-04-03 21:45 ` Richard Purdie
2016-04-03 21:53   ` Khem Raj
2016-04-03 22:54     ` Max Krummenacher
2016-04-03 22:51   ` Max Krummenacher [this message]
2016-04-03 23:00     ` Richard Purdie
2016-04-04  2:36       ` Khem Raj
2016-04-04  7:49         ` Max Krummenacher
2016-04-04  7:56         ` Andreas Müller
2016-04-04  8:00           ` Max Krummenacher
2016-04-04  8:46             ` Andreas Müller
2016-04-04 21:12               ` Andreas Müller
2016-04-04 22:43                 ` Richard Purdie
2016-04-05  0:44           ` Khem Raj
2016-04-05  7:43             ` Max Krummenacher
2016-07-18 20:07   ` Max Krummenacher

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=CAEHkU3VUnh78uOWRT2gYhAR5QOxYGDnc6J8RAsqkEkyj31HWfA@mail.gmail.com \
    --to=max.oss.09@gmail.com \
    --cc=max.krummenacher@toradex.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=richard.purdie@linuxfoundation.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 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.