* Do_package is changing permissions of files
@ 2025-05-22 10:31 rroyce
2025-05-22 10:45 ` [yocto] " Alexander Kanavin
2025-05-22 13:30 ` Ross Burton
0 siblings, 2 replies; 9+ messages in thread
From: rroyce @ 2025-05-22 10:31 UTC (permalink / raw)
To: yocto
[-- Attachment #1: Type: text/plain, Size: 494 bytes --]
When the do_package step executes it is changing permissions of files in {S}/{B}. These files with changed permissions are stored in the cache so the next time do_compile executes against the cached files the files are different from the last time it executed. Is this is a bug or a feature of do_package that isn't well documented? Or it could be that I am doing something incorrectly with setting up the source directory that do_package sets permissions in it?
Any insight is appreciated
[-- Attachment #2: Type: text/html, Size: 533 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [yocto] Do_package is changing permissions of files
2025-05-22 10:31 Do_package is changing permissions of files rroyce
@ 2025-05-22 10:45 ` Alexander Kanavin
2025-05-22 13:02 ` rroyce
2025-05-22 13:30 ` Ross Burton
1 sibling, 1 reply; 9+ messages in thread
From: Alexander Kanavin @ 2025-05-22 10:45 UTC (permalink / raw)
To: yocto, rroyce
On Thu, 22 May 2025 at 12:31, rroyce via lists.yoctoproject.org
<rroyce=textronsystems.com@lists.yoctoproject.org> wrote:
> When the do_package step executes it is changing permissions of files in {S}/{B}. These files with changed permissions are stored in the cache so the next time do_compile executes against the cached files the files are different from the last time it executed. Is this is a bug or a feature of do_package that isn't well documented? Or it could be that I am doing something incorrectly with setting up the source directory that do_package sets permissions in it?
>
do_package does not touch anything in B or S. It copies from D into
WORKDIR/package, and any further processing is done from that
directory.
Alx
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [yocto] Do_package is changing permissions of files
2025-05-22 10:45 ` [yocto] " Alexander Kanavin
@ 2025-05-22 13:02 ` rroyce
2025-05-22 13:19 ` Alexander Kanavin
2025-05-22 13:37 ` Ross Burton
0 siblings, 2 replies; 9+ messages in thread
From: rroyce @ 2025-05-22 13:02 UTC (permalink / raw)
To: Alexander Kanavin, yocto
[-- Attachment #1: Type: text/plain, Size: 645 bytes --]
That was what i thought as well from the docs and looking through do_package.
Any ideas for what could be changing file permissions in S?
Some info about what i'm running
Scarthgap
creating RPM packages
generating SPDX
using the archiver to capture content of S
The files affected appear to be the same files that are placed in WORKDIR/package/src/debug/PV/
It looks like it is only grabbing .h and .cpp files from S and placing in that directory. These files then end up with permissions set to 644. Somehow the original files in S also get set to 644 around the same time. I'm hoping you have an idea of what might be going on.
[-- Attachment #2: Type: text/html, Size: 795 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [yocto] Do_package is changing permissions of files
2025-05-22 13:02 ` rroyce
@ 2025-05-22 13:19 ` Alexander Kanavin
2025-05-22 13:37 ` Ross Burton
1 sibling, 0 replies; 9+ messages in thread
From: Alexander Kanavin @ 2025-05-22 13:19 UTC (permalink / raw)
To: yocto, rroyce
What would help is that you provide steps to observe the issue on
plain poky master.
Alex
On Thu, 22 May 2025 at 15:02, rroyce via lists.yoctoproject.org
<rroyce=textronsystems.com@lists.yoctoproject.org> wrote:
>
> That was what i thought as well from the docs and looking through do_package.
>
> Any ideas for what could be changing file permissions in S?
>
> Some info about what i'm running
> Scarthgap
> creating RPM packages
> generating SPDX
> using the archiver to capture content of S
>
> The files affected appear to be the same files that are placed in WORKDIR/package/src/debug/PV/
> It looks like it is only grabbing .h and .cpp files from S and placing in that directory. These files then end up with permissions set to 644. Somehow the original files in S also get set to 644 around the same time. I'm hoping you have an idea of what might be going on.
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#65398): https://lists.yoctoproject.org/g/yocto/message/65398
> Mute This Topic: https://lists.yoctoproject.org/mt/113244745/1686489
> Group Owner: yocto+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [alex.kanavin@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [yocto] Do_package is changing permissions of files
2025-05-22 10:31 Do_package is changing permissions of files rroyce
2025-05-22 10:45 ` [yocto] " Alexander Kanavin
@ 2025-05-22 13:30 ` Ross Burton
1 sibling, 0 replies; 9+ messages in thread
From: Ross Burton @ 2025-05-22 13:30 UTC (permalink / raw)
To: yocto@lists.yoctoproject.org, rroyce@textronsystems.com
On 22 May 2025, at 11:31, rroyce via lists.yoctoproject.org <rroyce=textronsystems.com@lists.yoctoproject.org> wrote:
>
> When the do_package step executes it is changing permissions of files in {S}/{B}. These files with changed permissions are stored in the cache so the next time do_compile executes against the cached files the files are different from the last time it executed. Is this is a bug or a feature of do_package that isn't well documented? Or it could be that I am doing something incorrectly with setting up the source directory that do_package sets permissions in it?
The only way do_package will touch $S or $B is if you hardlink a file into $D instead of copying. This is a bug in the recipe, and should be fixed.
Ross
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [yocto] Do_package is changing permissions of files
2025-05-22 13:02 ` rroyce
2025-05-22 13:19 ` Alexander Kanavin
@ 2025-05-22 13:37 ` Ross Burton
2025-05-22 14:02 ` rroyce
1 sibling, 1 reply; 9+ messages in thread
From: Ross Burton @ 2025-05-22 13:37 UTC (permalink / raw)
To: yocto@lists.yoctoproject.org, rroyce@textronsystems.com
On 22 May 2025, at 14:02, rroyce via lists.yoctoproject.org <rroyce=textronsystems.com@lists.yoctoproject.org> wrote:
>
> That was what i thought as well from the docs and looking through do_package.
> Any ideas for what could be changing file permissions in S?
> Some info about what i'm running
> Scarthgap
> creating RPM packages
> generating SPDX
> using the archiver to capture content of S
> The files affected appear to be the same files that are placed in WORKDIR/package/src/debug/PV/
> It looks like it is only grabbing .h and .cpp files from S and placing in that directory. These files then end up with permissions set to 644. Somehow the original files in S also get set to 644 around the same time. I'm hoping you have an idea of what might be going on.
I should have continued reading the thread before replying…
The source packaging is “fun” because we want to hardlink it in to save large amounts of time and space. We stopped it touching the timestamps already:
https://git.openembedded.org/openembedded-core/commit/?id=475759fdab7200488b2a568b2ba1aa31a456d113
So if you can replicate with a specific package with walnascar that would be very interesting. It might be the permissions squashing happening later that is reaching back into the source tree.
Was this just an interesting observation, or is it actually breaking something?
Ross
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [yocto] Do_package is changing permissions of files
2025-05-22 13:37 ` Ross Burton
@ 2025-05-22 14:02 ` rroyce
2025-05-22 14:16 ` Ross Burton
0 siblings, 1 reply; 9+ messages in thread
From: rroyce @ 2025-05-22 14:02 UTC (permalink / raw)
To: Ross Burton, yocto
[-- Attachment #1: Type: text/plain, Size: 952 bytes --]
I'll see what i can do with reproducing it from walnascar package but i'm not a strong user of bitbake and yocto. I mostly work on recipes from an existing build structure.
The permissions changes on the source files normally isn't a problem, however, we have some source that have the exec bit set on them in the repo we are pulling from. One of the checks we perform involves checking with mercurial if anything in the source clone has changed from the version checked out and capturing that as part of the binary. It is probably not the "right" way to do it but it is what i'm working with for now. Changed permissions are seen by mercurial as a delta from the source clone.
Thanks for the headsup on the hard links. It looks like they are hardlinks from the source in WORKDIR/package to S. I don't need that source package for my use case and it is missing key files we need to be a real source rpm anyway. Can I disable the creation of it?
[-- Attachment #2: Type: text/html, Size: 1019 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [yocto] Do_package is changing permissions of files
2025-05-22 14:02 ` rroyce
@ 2025-05-22 14:16 ` Ross Burton
2025-05-22 20:00 ` rroyce
0 siblings, 1 reply; 9+ messages in thread
From: Ross Burton @ 2025-05-22 14:16 UTC (permalink / raw)
To: yocto@lists.yoctoproject.org, rroyce@textronsystems.com
> On 22 May 2025, at 15:02, rroyce via lists.yoctoproject.org <rroyce=textronsystems.com@lists.yoctoproject.org> wrote:
>
> Thanks for the headsup on the hard links. It looks like they are hardlinks from the source in WORKDIR/package to S. I don't need that source package for my use case and it is missing key files we need to be a real source rpm anyway. Can I disable the creation of it?
>
It looks like setting PACKAGE_DEBUG_SPLIT_STYLE="debug-without-src” in your distro/local conf would do that.
Ross
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [yocto] Do_package is changing permissions of files
2025-05-22 14:16 ` Ross Burton
@ 2025-05-22 20:00 ` rroyce
0 siblings, 0 replies; 9+ messages in thread
From: rroyce @ 2025-05-22 20:00 UTC (permalink / raw)
To: Ross Burton, yocto
[-- Attachment #1: Type: text/plain, Size: 234 bytes --]
Thanks Ross.
I didn't get an opportunity to try to reproduce with a package from walnascar but using debug-without-src to disable grabbing the source in the package resolved the file permissions being modified in the S directory.
[-- Attachment #2: Type: text/html, Size: 273 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2025-05-22 20:00 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-22 10:31 Do_package is changing permissions of files rroyce
2025-05-22 10:45 ` [yocto] " Alexander Kanavin
2025-05-22 13:02 ` rroyce
2025-05-22 13:19 ` Alexander Kanavin
2025-05-22 13:37 ` Ross Burton
2025-05-22 14:02 ` rroyce
2025-05-22 14:16 ` Ross Burton
2025-05-22 20:00 ` rroyce
2025-05-22 13:30 ` Ross Burton
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.