Message ID | 20230622161749.797820-2-maxime.roussinbelanger@gmail.com |
---|---|
State | New |
Headers | show |
Series | [v2,1/3] package: fix src packaging path for nativesdk | expand |
I'm not sure I understand this. The check is to ensure build process works as it should, specifically to prevent build host ownership leaking into packages. Yes this information doesn't matter when these packages are installed, but it matters for correctness of the build. Alex On Thu, 22 Jun 2023 at 18:20, Maxime Roussin-Bélanger <maxime.roussinbelanger@gmail.com> wrote: > > From: Maxime Roussin-Belanger <maxime.roussinbelanger@gmail.com> > > nativesdk-${PN}-src will be installed to a different machine and files > ownership will change at install. Since the ownership will change based > on how the user will install the sdk there is no point in checking > ownership > > Signed-off-by: Maxime Roussin-Belanger <maxime.roussinbelanger@gmail.com> > --- > v2: New commit > > meta/classes-global/insane.bbclass | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/meta/classes-global/insane.bbclass b/meta/classes-global/insane.bbclass > index a4dbc9a123..82ea834f99 100644 > --- a/meta/classes-global/insane.bbclass > +++ b/meta/classes-global/insane.bbclass > @@ -1116,6 +1116,9 @@ def package_qa_check_host_user(path, name, d, elf, messages): > if path == home or path.startswith(home + os.sep): > return > > + if name.startswith("nativesdk-") and name.endswith("-src"): > + return > + > try: > stat = os.lstat(path) > except OSError as exc: > -- > 2.36.0 > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#183264): https://lists.openembedded.org/g/openembedded-core/message/183264 > Mute This Topic: https://lists.openembedded.org/mt/99701051/1686489 > Group Owner: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- >
Hello Alex, On Thu, Jun 22, 2023 at 12:24 PM Alexander Kanavin <alex.kanavin@gmail.com> wrote: > > I'm not sure I understand this. The check is to ensure build process > works as it should, specifically to prevent build host ownership > leaking into packages. Yes this information doesn't matter when these > packages are installed, but it matters for correctness of the build. > > Alex Maybe I don't get how this check is done because everything in the TMPDIR is owned by the user running bitbake. Max > > On Thu, 22 Jun 2023 at 18:20, Maxime Roussin-Bélanger > <maxime.roussinbelanger@gmail.com> wrote: > > > > From: Maxime Roussin-Belanger <maxime.roussinbelanger@gmail.com> > > > > nativesdk-${PN}-src will be installed to a different machine and files > > ownership will change at install. Since the ownership will change based > > on how the user will install the sdk there is no point in checking > > ownership > > > > Signed-off-by: Maxime Roussin-Belanger <maxime.roussinbelanger@gmail.com> > > --- > > v2: New commit > > > > meta/classes-global/insane.bbclass | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/meta/classes-global/insane.bbclass b/meta/classes-global/insane.bbclass > > index a4dbc9a123..82ea834f99 100644 > > --- a/meta/classes-global/insane.bbclass > > +++ b/meta/classes-global/insane.bbclass > > @@ -1116,6 +1116,9 @@ def package_qa_check_host_user(path, name, d, elf, messages): > > if path == home or path.startswith(home + os.sep): > > return > > > > + if name.startswith("nativesdk-") and name.endswith("-src"): > > + return > > + > > try: > > stat = os.lstat(path) > > except OSError as exc: > > -- > > 2.36.0 > > > > > > -=-=-=-=-=-=-=-=-=-=-=- > > Links: You receive all messages sent to this group. > > View/Reply Online (#183264): https://lists.openembedded.org/g/openembedded-core/message/183264 > > Mute This Topic: https://lists.openembedded.org/mt/99701051/1686489 > > Group Owner: openembedded-core+owner@lists.openembedded.org > > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com] > > -=-=-=-=-=-=-=-=-=-=-=- > >
Hello Alex, On Thu, Jun 22, 2023 at 12:24 PM Alexander Kanavin <alex.kanavin@gmail.com> wrote: > > I'm not sure I understand this. The check is to ensure build process > works as it should, specifically to prevent build host ownership > leaking into packages. Yes this information doesn't matter when these > packages are installed, but it matters for correctness of the build. > > Alex Maybe I don't get how this check is done because everything in the TMPDIR is owned by the user running bitbake. Max > > On Thu, 22 Jun 2023 at 18:20, Maxime Roussin-Bélanger > <maxime.roussinbelanger@gmail.com> wrote: > > > > From: Maxime Roussin-Belanger <maxime.roussinbelanger@gmail.com> > > > > nativesdk-${PN}-src will be installed to a different machine and files > > ownership will change at install. Since the ownership will change based > > on how the user will install the sdk there is no point in checking > > ownership > > > > Signed-off-by: Maxime Roussin-Belanger <maxime.roussinbelanger@gmail.com> > > --- > > v2: New commit > > > > meta/classes-global/insane.bbclass | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/meta/classes-global/insane.bbclass b/meta/classes-global/insane.bbclass > > index a4dbc9a123..82ea834f99 100644 > > --- a/meta/classes-global/insane.bbclass > > +++ b/meta/classes-global/insane.bbclass > > @@ -1116,6 +1116,9 @@ def package_qa_check_host_user(path, name, d, elf, messages): > > if path == home or path.startswith(home + os.sep): > > return > > > > + if name.startswith("nativesdk-") and name.endswith("-src"): > > + return > > + > > try: > > stat = os.lstat(path) > > except OSError as exc: > > -- > > 2.36.0 > > > > > > -=-=-=-=-=-=-=-=-=-=-=- > > Links: You receive all messages sent to this group. > > View/Reply Online (#183264): https://lists.openembedded.org/g/openembedded-core/message/183264 > > Mute This Topic: https://lists.openembedded.org/mt/99701051/1686489 > > Group Owner: openembedded-core+owner@lists.openembedded.org > > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com] > > -=-=-=-=-=-=-=-=-=-=-=- > >
On Thu, 22 Jun 2023 at 20:04, Maxime Roussin-Bélanger <maxime.roussinbelanger@gmail.com> wrote: > > I'm not sure I understand this. The check is to ensure build process > > works as it should, specifically to prevent build host ownership > > leaking into packages. Yes this information doesn't matter when these > > packages are installed, but it matters for correctness of the build. > > > > Alex > > Maybe I don't get how this check is done because everything in the TMPDIR > is owned by the user running bitbake. Installation and packaging tasks run under 'pseudo', an abstraction that gives the tasks an illusion of running as root and setting file ownership without restrictions. On build host's disk it's all owned by bitbake user, but actual packages contain the desired ownership for the target package installation. Alex
On Fri, Jun 23, 2023 at 3:53 AM Alexander Kanavin <alex.kanavin@gmail.com> wrote: > > On Thu, 22 Jun 2023 at 20:04, Maxime Roussin-Bélanger > <maxime.roussinbelanger@gmail.com> wrote: > > > I'm not sure I understand this. The check is to ensure build process > > > works as it should, specifically to prevent build host ownership > > > leaking into packages. Yes this information doesn't matter when these > > > packages are installed, but it matters for correctness of the build. > > > > > > Alex > > > > Maybe I don't get how this check is done because everything in the TMPDIR > > is owned by the user running bitbake. > > Installation and packaging tasks run under 'pseudo', an abstraction > that gives the tasks an illusion of running as root and setting file > ownership without restrictions. On build host's disk it's all owned by > bitbake user, but actual packages contain the desired ownership for > the target package installation. When you mention `packages`, do you mean the .rpm, .deb, etc? What would be proper desired ownership inside those packages for a nativesdk -src package? Is it suppose to be root? Max. > > Alex
On Fri, 23 Jun 2023 at 16:56, Maxime Roussin-Bélanger <maxime.roussinbelanger@gmail.com> wrote: > When you mention `packages`, do you mean the .rpm, .deb, etc? > > What would be proper desired ownership inside those packages > for a nativesdk -src package? Is it suppose to be root? You can probably check how these packages get created in the first place? There will be explicit ownership set at that point. Alex
diff --git a/meta/classes-global/insane.bbclass b/meta/classes-global/insane.bbclass index a4dbc9a123..82ea834f99 100644 --- a/meta/classes-global/insane.bbclass +++ b/meta/classes-global/insane.bbclass @@ -1116,6 +1116,9 @@ def package_qa_check_host_user(path, name, d, elf, messages): if path == home or path.startswith(home + os.sep): return + if name.startswith("nativesdk-") and name.endswith("-src"): + return + try: stat = os.lstat(path) except OSError as exc: