From: Gyorgy Sarvari <skandigraun@gmail.com>
To: yocto@lists.yoctoproject.org, kfa@deif.com
Subject: Re: [yocto] Fakeroot fails with externalsrc
Date: Sat, 8 Mar 2025 20:19:19 +0100 [thread overview]
Message-ID: <24c41f4c-6ea7-48ea-83ee-e3501044504a@gmail.com> (raw)
In-Reply-To: <Og1U.1741378092435763581.EjNi@lists.yoctoproject.org>
Pseudo ignores the source- and build-dirs[1] (and everything that's
inside them), via the PSEUDO_IGNORE_PATHS variable.
E.g. When you set "/userdata/codesys-runtimes" as EXTERNALSRC, that
becomes ${S} - every path that starts with this prefix will be outside
of fakeroot.
You need to change this folder structure in a way that the EXTERNALSRC
path doesn't clash with your Yocto build-dir - build-dir can contain the
source-dir, but the source-dir shouldn't contain the build-dir.
[1]: https://git.yoctoproject.org/poky/tree/meta/conf/bitbake.conf#n754
On 07.03.25 21:08, Kjeld Flarup via lists.yoctoproject.org wrote:
> Hi
>
> I'm trying to make a CI/CD Yocto build in a git repository which is
> used in a recipe.
>
> I have made an include file
> meta-codesys/recipes-codesys/codesys-src.inc which normally contains.
>
> SRC_URI =
> "gitsm://gitlab.deif.com/codesys/codesys-runtimes.git;protocol=https;branch=master"
> SRCREV = "927fe8fa0b9e6537b3d7ec9f2231e13c4b367a61"
>
>
> When building in the codesys-runtimes repository I clone the Yocto
> project and replaces codesys-src.inc with
>
> inherit externalsrc
> EXTERNALSRC = "/userdata/codesys-runtimes"
> EXTERNALSRC_BUILD = "/userdata/codesys-runtimes/build"
>
> And then I run bitbake where I get this error
>
> *** 0418: os.lchown(path, uid, gid)
> 0419:
> 0420: # Return a list of configuration files based on
> either the default
> 0421: # files/fs-perms.txt or the contents of
> FILESYSTEM_PERMS_TABLES
> 0422: # paths are resolved via BBPATH
> Exception: PermissionError: [Errno 1] Operation not permitted:
> '/userdata/codesys-runtimes/yocto/tmp-glibc/work/cortexa53-crypto-oe-linux/codesys-runtime/1.0-r0/package/usr'
>
> ERROR: Logfile of failure stored in:
> /userdata/codesys-runtimes/yocto/tmp-glibc/work/cortexa53-crypto-oe-linux/codesys-runtime/1.0-r0/temp/log.do_package.59961
> ERROR: Task
> (/userdata/codesys-runtimes/yocto/meta-codesys/recipes-codesys/codesys-runtime/codesys-runtime.bb:do_package)
> failed with exit code '1'
>
>
> The problem is that do_package tries to set uid to root, but that is
> not allowed, unless fakeroot is used.
> Why does this fail when externalsrc is used?
>
> Just for the record, if I do not change codesys-src.inc it builds.
>
> --
> --
> Regards
> Kjeld Flarup
> DEIF A/S
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#64930): https://lists.yoctoproject.org/g/yocto/message/64930
> Mute This Topic: https://lists.yoctoproject.org/mt/111574850/6084445
> Group Owner: yocto+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [skandigraun@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
next prev parent reply other threads:[~2025-03-08 19:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-07 20:08 Fakeroot fails with externalsrc Kjeld Flarup
2025-03-08 19:19 ` Gyorgy Sarvari [this message]
2025-03-10 14:59 ` [yocto] " Kjeld Flarup Christensen
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=24c41f4c-6ea7-48ea-83ee-e3501044504a@gmail.com \
--to=skandigraun@gmail.com \
--cc=kfa@deif.com \
--cc=yocto@lists.yoctoproject.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.