Skip to contentSkip to conversation

base-files: add usage warning to motd

PATCH In review [email protected] 4 participants 5 messages Feb 7, 2024 – Feb 23, 2024

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 base-files: add usage warning to motd

From: Ross Burton <[email protected]>

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.

---
 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
meta-poky/recipes-core/base-files/base-files_%.bbappend new file +1 -0
new file mode 100644
index 00000000000..8802adbb46b
@@ -0,0 +1 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
meta-poky/recipes-core/base-files/files/poky/motd new file +5 -0
new file mode 100644
index 00000000000..0fb6e633f0a
@@ -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.
+
Signature · 1 line
2.34.1
#1 lore raw

On Wed, 7 Feb 2024 at 10:48, Ross Burton <[email protected]> wrote:
<SNIP>

meta-poky/recipes-core/base-files/base-files_%.bbappend line 1

Quoted 8 lines
meta-poky/recipes-core/base-files/base-files_%.bbappend new file +1 -0
new file mode 100644
index 00000000000..8802adbb46b
@@ -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 :/

#2 lore raw
Quoted 20 lines · Dan McGregor

On Wed, 7 Feb 2024 at 10:48, Ross Burton <[email protected]> wrote:
<SNIP>

meta-poky/recipes-core/base-files/base-files_%.bbappend line 1

Quoted 10 lines
(quoted diff) +0 -0

files_%.bbappend b/meta-poky/recipes-core/base-files/base- files_%.bbappend
new file mode 100644
index 00000000000..8802adbb46b

meta-poky/recipes-core/base-files/base-files_%.bbappend new file +1 -0
@@ -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.

Quoted 2 lines

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

#3 lore raw
Quoted 22 lines · Richard Purdie
Quoted 20 lines · Dan McGregor

On Wed, 7 Feb 2024 at 10:48, Ross Burton <[email protected]> wrote:
<SNIP>

meta-poky/recipes-core/base-files/base-files_%.bbappend line 1

Quoted 10 lines
(quoted diff) +0 -0

files_%.bbappend b/meta-poky/recipes-core/base-files/base- files_%.bbappend
new file mode 100644
index 00000000000..8802adbb46b

meta-poky/recipes-core/base-files/base-files_%.bbappend new file +1 -0
@@ -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.

Quoted 6 lines
Quoted 2 lines

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.

Quoted 3 lines

Cheers,

Richard

#4 lore raw

PATCH 1/1 base-files: only show usage warning for poky

In reply to [email protected]

meta-poky may be included with any configuration based on poky, not just those using it as its distribution. Only apply the motd warning to the poky distro and its derivatives.

---
 meta-poky/recipes-core/base-files/base-files_%.bbappend | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-poky/recipes-core/base-files/base-files_%.bbappend +1 -1
index 8802adbb46b..480f568f7b4 100644
@@ -1 +1 @@
-FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
+FILESEXTRAPATHS:prepend:poky := "${THISDIR}/files:"
Signature · 1 line
2.41.0