* Fakeroot fails with externalsrc
@ 2025-03-07 20:08 Kjeld Flarup
2025-03-08 19:19 ` [yocto] " Gyorgy Sarvari
0 siblings, 1 reply; 3+ messages in thread
From: Kjeld Flarup @ 2025-03-07 20:08 UTC (permalink / raw)
To: yocto
[-- Attachment #1: Type: text/plain, Size: 1730 bytes --]
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
[-- Attachment #2: Type: text/html, Size: 2185 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [yocto] Fakeroot fails with externalsrc
2025-03-07 20:08 Fakeroot fails with externalsrc Kjeld Flarup
@ 2025-03-08 19:19 ` Gyorgy Sarvari
2025-03-10 14:59 ` Kjeld Flarup Christensen
0 siblings, 1 reply; 3+ messages in thread
From: Gyorgy Sarvari @ 2025-03-08 19:19 UTC (permalink / raw)
To: yocto, kfa
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]
> -=-=-=-=-=-=-=-=-=-=-=-
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [yocto] Fakeroot fails with externalsrc
2025-03-08 19:19 ` [yocto] " Gyorgy Sarvari
@ 2025-03-10 14:59 ` Kjeld Flarup Christensen
0 siblings, 0 replies; 3+ messages in thread
From: Kjeld Flarup Christensen @ 2025-03-10 14:59 UTC (permalink / raw)
To: Gyorgy Sarvari, yocto@lists.yoctoproject.org
[-- Attachment #1.1: Type: text/plain, Size: 6020 bytes --]
Thanks, that makes sense.
I kept yocto under my project, because I wanted to take advantage of the Gitlab CI cache.
But I solved the problem instead by setting a TMPDIR.
Best regards
Kjeld Flarup Christensen
Software Designer
BSP Software
DEIF A/S
Email: kfa@deif.com<mailto:kfa@deif.com> <mailto:kfa@deif.com>
Tel.: +45 9614 3568<tel:+45%209614%203568> <tel:+45%209614%203568>
Mobile: +45 4029 4149<tel:+45%204029%204149> <tel:+45%204029%204149>
[cid:30596ddb-7b04-4c9d-8818-8935c283e09a]
deif.com<https://deif.com/> <https://deif.com/>
[cid:2ab65bea-e110-4ebf-9280-913f7623dd02]<https://www.linkedin.com/company/21145/?utm_medium=email&utm_source=link-to-emailsignature&utm_campaign=signature-only> [cid:bfdc7927-4f6c-464f-b49b-7ef90e2a8b8e] <https://www.youtube.com/@deifgroup?utm_medium=email&utm_source=link-to-emailsignature&utm_campaign=signature-only> Follow us on LinkedIn and Youtube
________________________________
From: Gyorgy Sarvari <skandigraun@gmail.com>
Sent: Saturday, March 8, 2025 20:19
To: yocto@lists.yoctoproject.org <yocto@lists.yoctoproject.org>; Kjeld Flarup Christensen <kfa@deif.com>
Subject: Re: [yocto] Fakeroot fails with externalsrc
[You don't often get email from skandigraun@gmail.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
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://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit.yoctoproject.org%2Fpoky%2Ftree%2Fmeta%2Fconf%2Fbitbake.conf%23n754&data=05%7C02%7Ckfa%40deif.com%7C289daeeec4e44581f46008dd5e7621c3%7C3c7af82f7d06424482294b118df8fed0%7C0%7C0%7C638770583664666272%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=yI1xENWadC3e68SBSXfJ4u%2B6mR%2B7uJ5MfbEzwC4BRIg%3D&reserved=0<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://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.yoctoproject.org%2Fg%2Fyocto%2Fmessage%2F64930&data=05%7C02%7Ckfa%40deif.com%7C289daeeec4e44581f46008dd5e7621c3%7C3c7af82f7d06424482294b118df8fed0%7C0%7C0%7C638770583664685055%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=ccrbxj5hChHWJNaRG7%2BQADSYCyp%2BAeFSxDBGQYOT0Qs%3D&reserved=0<https://lists.yoctoproject.org/g/yocto/message/64930>
> Mute This Topic: https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.yoctoproject.org%2Fmt%2F111574850%2F6084445&data=05%7C02%7Ckfa%40deif.com%7C289daeeec4e44581f46008dd5e7621c3%7C3c7af82f7d06424482294b118df8fed0%7C0%7C0%7C638770583664697650%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=hEjj4usNfeI7HIhPLWP2lsMV1gr4iNr5iXDWS0nPMww%3D&reserved=0<https://lists.yoctoproject.org/mt/111574850/6084445>
> Group Owner: yocto+owner@lists.yoctoproject.org
> Unsubscribe: https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.yoctoproject.org%2Fg%2Fyocto%2Funsub&data=05%7C02%7Ckfa%40deif.com%7C289daeeec4e44581f46008dd5e7621c3%7C3c7af82f7d06424482294b118df8fed0%7C0%7C0%7C638770583664709585%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=NdnG1z6tl28gEiQW9igeh0%2BWn7dvKCBa0%2FqwOxtAhlo%3D&reserved=0<https://lists.yoctoproject.org/g/yocto/unsub> [skandigraun@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
[-- Attachment #1.2: Type: text/html, Size: 12630 bytes --]
[-- Attachment #2: npdm4j1gdfazvyynimg_KT7e9Y7cD2UeyI9Hv1.jpg --]
[-- Type: image/png, Size: 3346 bytes --]
[-- Attachment #3: npdm4j1gdfazvyynimg_Sru14jrRmq0FpPVfv1.png --]
[-- Type: image/png, Size: 3047 bytes --]
[-- Attachment #4: npdm4j1gdfazvyynimg_JNKI26fLLnQM4vBZv1.png --]
[-- Type: image/png, Size: 2981 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-03-10 14:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-07 20:08 Fakeroot fails with externalsrc Kjeld Flarup
2025-03-08 19:19 ` [yocto] " Gyorgy Sarvari
2025-03-10 14:59 ` Kjeld Flarup Christensen
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.