diff mbox series

[v2] base-files: add usage warning to motd

Message ID 20240207164849.4039004-1-ross.burton@arm.com (mailing list archive)
State New
Headers show
Series [v2] base-files: add usage warning to motd | expand

Commit Message

Ross Burton Feb. 7, 2024, 4:48 p.m. UTC
From: Ross Burton <ross.burton@arm.com>

The Poky distro is explicitly a _reference_ distribution for _testing_
and _development_ purposes.  It enables most hardware and software
features so that they can be tested, but this also means that
from a security point of view the attack surface is very large.

We encourage anyone using OpenEmbedded for production use to create their
own distribution and not use Poky.  To encourage this behaviour further,
add a warning to /etc/motd when Poky is used so the developer will see it
when they log in.

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 meta-poky/recipes-core/base-files/base-files_%.bbappend | 1 +
 meta-poky/recipes-core/base-files/files/poky/motd       | 5 +++++
 2 files changed, 6 insertions(+)
 create mode 100644 meta-poky/recipes-core/base-files/base-files_%.bbappend
 create mode 100644 meta-poky/recipes-core/base-files/files/poky/motd

Comments

Daniel McGregor Feb. 23, 2024, 4:15 p.m. UTC | #1
On Wed, 7 Feb 2024 at 10:48, Ross Burton <ross.burton@arm.com> wrote:
<SNIP>
>
> diff --git a/meta-poky/recipes-core/base-files/base-files_%.bbappend b/meta-poky/recipes-core/base-files/base-files_%.bbappend
> new file mode 100644
> index 00000000000..8802adbb46b
> --- /dev/null
> +++ b/meta-poky/recipes-core/base-files/base-files_%.bbappend
> @@ -0,0 +1 @@
> +FILESEXTRAPATHS:prepend := "${THISDIR}/files:"

Should this be FILESEXTRAPATHS:prepend:poky :=.....? That way
meta-poky can be included (as it is with a default configuration) even
with a custom distribution layer? This is what the psplash bbappend in
meta-poky does.

I need to start monitoring this mailing list more; I didn't see it
until it was merged :/
Richard Purdie Feb. 23, 2024, 4:20 p.m. UTC | #2
On Fri, 2024-02-23 at 10:15 -0600, Dan McGregor wrote:
> On Wed, 7 Feb 2024 at 10:48, Ross Burton <ross.burton@arm.com> wrote:
> <SNIP>
> > 
> > diff --git a/meta-poky/recipes-core/base-files/base-
> > files_%.bbappend b/meta-poky/recipes-core/base-files/base-
> > files_%.bbappend
> > new file mode 100644
> > index 00000000000..8802adbb46b
> > --- /dev/null
> > +++ b/meta-poky/recipes-core/base-files/base-files_%.bbappend
> > @@ -0,0 +1 @@
> > +FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
> 
> Should this be FILESEXTRAPATHS:prepend:poky :=.....? That way
> meta-poky can be included (as it is with a default configuration)
> even
> with a custom distribution layer? This is what the psplash bbappend
> in
> meta-poky does.
> 
> I need to start monitoring this mailing list more; I didn't see it
> until it was merged :/

I did ask this previously. The file is in a poky subdirectory under
files so the change is only active for the poky distro.

Cheers,

Richard
Daniel McGregor Feb. 23, 2024, 4:26 p.m. UTC | #3
On Fri, 23 Feb 2024 at 10:20, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
>
> On Fri, 2024-02-23 at 10:15 -0600, Dan McGregor wrote:
> > On Wed, 7 Feb 2024 at 10:48, Ross Burton <ross.burton@arm.com> wrote:
> > <SNIP>
> > >
> > > diff --git a/meta-poky/recipes-core/base-files/base-
> > > files_%.bbappend b/meta-poky/recipes-core/base-files/base-
> > > files_%.bbappend
> > > new file mode 100644
> > > index 00000000000..8802adbb46b
> > > --- /dev/null
> > > +++ b/meta-poky/recipes-core/base-files/base-files_%.bbappend
> > > @@ -0,0 +1 @@
> > > +FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
> >
> > Should this be FILESEXTRAPATHS:prepend:poky :=.....? That way
> > meta-poky can be included (as it is with a default configuration)
> > even
> > with a custom distribution layer? This is what the psplash bbappend
> > in
> > meta-poky does.
> >
> > I need to start monitoring this mailing list more; I didn't see it
> > until it was merged :/
>
> I did ask this previously. The file is in a poky subdirectory under
> files so the change is only active for the poky distro.
>

Great, missed that. We can ignore the patch I just sent then.

> Cheers,
>
> Richard
diff mbox series

Patch

diff --git a/meta-poky/recipes-core/base-files/base-files_%.bbappend b/meta-poky/recipes-core/base-files/base-files_%.bbappend
new file mode 100644
index 00000000000..8802adbb46b
--- /dev/null
+++ b/meta-poky/recipes-core/base-files/base-files_%.bbappend
@@ -0,0 +1 @@ 
+FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
diff --git a/meta-poky/recipes-core/base-files/files/poky/motd b/meta-poky/recipes-core/base-files/files/poky/motd
new file mode 100644
index 00000000000..0fb6e633f0a
--- /dev/null
+++ b/meta-poky/recipes-core/base-files/files/poky/motd
@@ -0,0 +1,5 @@ 
+
+WARNING: Poky is a reference Yocto Project distribution that should be used for
+testing and development purposes only. It is recommended that you create your
+own distribution for production use.
+