[OE-core] Ownership issue in package contents
Mario Domenech Goulart
mario at ossystems.com.br
Tue Mar 31 20:33:41 UTC 2015
Hi Mark,
On Tue, 31 Mar 2015 13:23:00 -0500 Mark Hatle <mark.hatle at windriver.com> wrote:
> On 3/31/15 12:20 PM, Mario Domenech Goulart wrote:
>>
>> On Tue, 31 Mar 2015 14:50:06 +0100 "Burton, Ross" <ross.burton at intel.com> wrote:
>>
>>> On 27 March 2015 at 17:31, Mario Domenech Goulart <mario at ossystems.com.br> wrote:
>>>
>>> Note that, although I run "chown -R foo:foo ${D}${libdir}/foo" in
>>> the recipe, ./usr/lib/foo/ in the package is owned by root.
>>> However, its content has the right ownership.
>>>
>>> Looks like a bug in pseudo to me, can you file a bug for that?
>>
>> Sure. Filed #7554.
>
> I'd suggest you look at meta/classes/package.bbclass "fixup_perms" function.
>
> The ${D}${libdir} (and above) are "corrected" to be 'root:root' by this
> function. I don't know why 'foo' would be, but if it's a standard defined
> variable -- or if 'directory walking' is enabled it could end up doing this as well.
>
> The control file for this is in meta/files/fs-perms.txt (unless otherwise
> defined by a distribution or other configuration file.)
Thanks a lot. You seem to have guided me exactly to what causes the
issue.
>
> Format of the file is:
>
> # The format of this file
> #
> #<path> <mode> <uid> <gid> <walk> <fmode> <fuid> <fgid>
...
>
> The default is:
...
> libexecdir 0755 root root false - - -
...
This variable seems to be the cause of problems:
$ bitbake -e foo | grep libexecdir=
export libexecdir="/usr/lib/foo"
As far as I understand, package.bbclass may use a user-configured
permissions table (via FILESYSTEM_PERMS_TABLES), but I'm not sure if
this is the right "fix" for the case in question. I'd have to hardcode
the owner of /usr/lib/foo to be "foo", but foo may not be available when
packaging other recipes.
Should libexecdir actually be in the `target_path_vars' variable
(package.bbclass)?
Best wishes.
Mario
--
http://www.ossystems.com.br
More information about the Openembedded-core
mailing list