From: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
To: Martyn Welch <martyn.welch@collabora.com>,
Konrad Weihmann <kweihmann@outlook.com>,
OE-core <openembedded-core@lists.openembedded.org>
Subject: RE: [OE-core] [PATCH v6 2/2] core-image.bbclass: add default IMAGE_QA_PROHIBIT_PATHS variable
Date: Wed, 27 Oct 2021 16:43:50 +0000 [thread overview]
Message-ID: <74fe18d0a46440768666c0aacb7f0479@axis.com> (raw)
In-Reply-To: <83e703f86472f188406fa1f6004aca66ffb0ff0a.camel@collabora.com>
> -----Original Message-----
> From: Martyn Welch <martyn.welch@collabora.com>
> Sent: den 26 oktober 2021 17:32
> To: Peter Kjellerstedt <peter.kjellerstedt@axis.com>; Konrad Weihmann
> <kweihmann@outlook.com>; OE-core <openembedded-
> core@lists.openembedded.org>
> Subject: Re: [OE-core] [PATCH v6 2/2] core-image.bbclass: add default
> IMAGE_QA_PROHIBIT_PATHS variable
>
> On Tue, 2021-10-26 at 14:59 +0000, Peter Kjellerstedt wrote:
> > > -----Original Message-----
> > > From: openembedded-core@lists.openembedded.org <openembedded-
> > > core@lists.openembedded.org> On Behalf Of Konrad Weihmann
> > > Sent: den 26 oktober 2021 13:24
> > > To: Martyn Welch <martyn.welch@collabora.com>; OE-core
> > > <openembedded-
> > > core@lists.openembedded.org>
> > > Subject: Re: [OE-core] [PATCH v6 2/2] core-image.bbclass: add
> > > default
> > > IMAGE_QA_PROHIBIT_PATHS variable
> > >
> > >
> > >
> > > On 26.10.21 13:21, Martyn Welch wrote:
> > > > Note to self - remember to reply to list...
> > > >
> > > > -------- Forwarded Message --------
> > > > From: Martyn Welch <martyn.welch@collabora.com>
> > > > To: Konrad Weihmann <kweihmann@outlook.com>
> > > > Subject: Re: [OE-core] [PATCH v6 2/2] core-image.bbclass: add
> > > > default
> > > > IMAGE_QA_PROHIBIT_PATHS variable
> > > > Date: Tue, 26 Oct 2021 12:12:11 +0100
> > > >
> > > > On Tue, 2021-10-26 at 12:56 +0200, Konrad Weihmann wrote:
> > > > >
> > > > >
> > > > > On 26.10.21 12:50, Martyn Welch wrote:
>
> <snip>
>
> > > > > > +# IMAGE_QA_PROHIBITED_PATHS
> > > > > > +# Ensure images aren't including files in places that will
> > > > > > be used as mount points or that are
> > > > > > +# reserved for runtime data.
> > > > > > +IMAGE_QA_PROHIBITED_PATHS ?=
> > > > > > "/dev/pts/*:/media/*:/mnt/*:/proc/*:/run/*:/tmp/*:/var/run/*:
> > > > > > /var/tmp/*:/var/volatile/*"
> > > > >
> > > > > I like the idea, but wouldn't make more sense to do that on a
> > > > > package
> > > > > level, as here the user is more or less left alone in guessing
> > > > > where
> > > > > the file actually does come from
> > > >
> > > > I like that idea, however it would make to assumption that there
> > > > wasn't
> > > > any tweaks being made as part of image generation that would end
> > > > up
> > > > violating this. A quick check suggests the "build-appliance-
> > > > image_15.0.0.bb" image does this kind of thing in the core image
> > > > types.
> > >
> > > As Alex just wrote, I might be beneficial to do both
> > >
> > > > Martyn
> >
> > We have an alternative solution that hooks into the package QA. It
> > focuses on directories that are supposed to be empty. In addition to
> > failing the build if there are files in such a directory, it also
> > allows to specify for each directory why it should be empty. We have
> > used this, e.g., to mark common directories that have been renamed
> > to give an indication of where the files were supposed to have been
> > installed.
> >
> > Do you want me to generalize this and send a patch for it?
>
> Hi Peter,
>
> It would be great if we could merge these approaches, i.e. have one way
> to specify directories that need to be empty and test both as part of
> package QA and also image QA.
>
> I was just working on adding some package QA support to what I've had,
> but can pause that.
>
> Would you be able to provide show how you'd propose managing the
> prohibited directories? I'll try and tweak the image QA stuff already
> posted to fit that.
>
> Martyn
>
> > //Peter
I have sent two patches now. The first makes systemd not install
anything in /var/log, as it otherwise conflicts with the suggested
defaults. And then one patch that adds the package QA check for
empty directories. I used the same defaults as suggested in your
patch, except I removed /mnt since it is not obvious it should be
empty. At least we use subdirectories in /mnt for our mountpoints.
//Peter
next prev parent reply other threads:[~2021-10-27 16:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <e133da623f5a357c570efc036daa84098dbc691c.camel@collabora.com>
2021-10-26 11:21 ` Fwd: Re: [OE-core] [PATCH v6 2/2] core-image.bbclass: add default IMAGE_QA_PROHIBIT_PATHS variable Martyn Welch
2021-10-26 11:24 ` Konrad Weihmann
2021-10-26 14:59 ` Peter Kjellerstedt
2021-10-26 15:32 ` Martyn Welch
2021-10-27 16:43 ` Peter Kjellerstedt [this message]
2021-10-27 16:58 ` Martyn Welch
2021-10-26 10:50 [PATCH v6 1/2] image.bbclass: add prohibited-paths QA test Martyn Welch
2021-10-26 10:50 ` [PATCH v6 2/2] core-image.bbclass: add default IMAGE_QA_PROHIBIT_PATHS variable Martyn Welch
2021-10-26 10:56 ` [OE-core] " Konrad Weihmann
2021-10-26 11:01 ` Alexander Kanavin
2021-10-26 11:24 ` Martyn Welch
2021-10-26 11:09 ` Alexander Kanavin
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=74fe18d0a46440768666c0aacb7f0479@axis.com \
--to=peter.kjellerstedt@axis.com \
--cc=kweihmann@outlook.com \
--cc=martyn.welch@collabora.com \
--cc=openembedded-core@lists.openembedded.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.