Date   

[kirkstone][PATCH 2/3] freetype: backport patch for CVE-2022-27405

Davide Gardenal
 

CVE: CVE-2022-27405

Upstream issue:
https://gitlab.freedesktop.org/freetype/freetype/-/issues/1139

Signed-off-by: Davide Gardenal <davide.gardenal@...>
---
.../freetype/freetype/CVE-2022-27405.patch | 41 +++++++++++++++++++
.../freetype/freetype_2.11.1.bb | 1 +
2 files changed, 42 insertions(+)
create mode 100644 meta/recipes-graphics/freetype/freetype/CVE-2022-27405.patch

diff --git a/meta/recipes-graphics/freetype/freetype/CVE-2022-27405.patch b/meta/recipes-graphics/freetype/freetype/CVE-2022-27405.patch
new file mode 100644
index 0000000000..582a985221
--- /dev/null
+++ b/meta/recipes-graphics/freetype/freetype/CVE-2022-27405.patch
@@ -0,0 +1,41 @@
+From 22a0cccb4d9d002f33c1ba7a4b36812c7d4f46b5 Mon Sep 17 00:00:00 2001
+From: Werner Lemberg <wl@...>
+Date: Sat, 19 Mar 2022 06:40:17 +0100
+Subject: [PATCH] * src/base/ftobjs.c (ft_open_face_internal): Properly guard
+ `face_index`.
+
+We must ensure that the cast to `FT_Int` doesn't change the sign.
+
+Fixes #1139.
+
+Upstream-Status: Backport
+https://gitlab.freedesktop.org/freetype/freetype/-/commit/22a0cccb4d9d002f33c1ba7a4b36812c7d4f46b5
+
+Signed-off-by: Davide Gardenal <davide.gardenal@...>
+---
+ src/base/ftobjs.c | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
+index 2c0f0e6c9..10952a6c6 100644
+--- a/src/base/ftobjs.c
++++ b/src/base/ftobjs.c
+@@ -2527,6 +2527,15 @@
+ #endif
+
+
++ /* only use lower 31 bits together with sign bit */
++ if ( face_index > 0 )
++ face_index &= 0x7FFFFFFFL;
++ else
++ {
++ face_index &= 0x7FFFFFFFL;
++ face_index = -face_index;
++ }
++
+ #ifdef FT_DEBUG_LEVEL_TRACE
+ FT_TRACE3(( "FT_Open_Face: " ));
+ if ( face_index < 0 )
+--
+GitLab
+
diff --git a/meta/recipes-graphics/freetype/freetype_2.11.1.bb b/meta/recipes-graphics/freetype/freetype_2.11.1.bb
index 257c5c6d9a..02a81a4f4f 100644
--- a/meta/recipes-graphics/freetype/freetype_2.11.1.bb
+++ b/meta/recipes-graphics/freetype/freetype_2.11.1.bb
@@ -14,6 +14,7 @@ LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=a5927784d823d443c6cae55701d01553 \

SRC_URI = "${SAVANNAH_NONGNU_MIRROR}/${BPN}/${BP}.tar.xz \
file://CVE-2022-27404.patch \
+ file://CVE-2022-27405.patch \
"
SRC_URI[sha256sum] = "3333ae7cfda88429c97a7ae63b7d01ab398076c3b67182e960e5684050f2c5c8"

--
2.32.0


[kirkstone][PATCH 1/3] freetype: backport patch for CVE-2022-27404

Davide Gardenal
 

CVE: CVE-2022-27404

Upstream issue:
https://gitlab.freedesktop.org/freetype/freetype/-/issues/1138

Signed-off-by: Davide Gardenal <davide.gardenal@...>
---
.../freetype/freetype/CVE-2022-27404.patch | 48 +++++++++++++++++++
.../freetype/freetype_2.11.1.bb | 4 +-
2 files changed, 51 insertions(+), 1 deletion(-)
create mode 100644 meta/recipes-graphics/freetype/freetype/CVE-2022-27404.patch

diff --git a/meta/recipes-graphics/freetype/freetype/CVE-2022-27404.patch b/meta/recipes-graphics/freetype/freetype/CVE-2022-27404.patch
new file mode 100644
index 0000000000..3335fbda06
--- /dev/null
+++ b/meta/recipes-graphics/freetype/freetype/CVE-2022-27404.patch
@@ -0,0 +1,48 @@
+From 53dfdcd8198d2b3201a23c4bad9190519ba918db Mon Sep 17 00:00:00 2001
+From: Werner Lemberg <wl@...>
+Date: Thu, 17 Mar 2022 19:24:16 +0100
+Subject: [PATCH] [sfnt] Avoid invalid face index.
+
+Fixes #1138.
+
+* src/sfnt/sfobjs.c (sfnt_init_face), src/sfnt/sfwoff2.c (woff2_open_font):
+Check `face_index` before decrementing.
+
+Upstream-Status: Backport
+https://gitlab.freedesktop.org/freetype/freetype/-/commit/53dfdcd8198d2b3201a23c4bad9190519ba918db
+
+Signed-off-by: Davide Gardenal <davide.gardenal@...>
+---
+ src/sfnt/sfobjs.c | 2 +-
+ src/sfnt/sfwoff2.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/sfnt/sfobjs.c b/src/sfnt/sfobjs.c
+index f9d4d3858..9771c35df 100644
+--- a/src/sfnt/sfobjs.c
++++ b/src/sfnt/sfobjs.c
+@@ -566,7 +566,7 @@
+ face_index = FT_ABS( face_instance_index ) & 0xFFFF;
+
+ /* value -(N+1) requests information on index N */
+- if ( face_instance_index < 0 )
++ if ( face_instance_index < 0 && face_index > 0 )
+ face_index--;
+
+ if ( face_index >= face->ttc_header.count )
+diff --git a/src/sfnt/sfwoff2.c b/src/sfnt/sfwoff2.c
+index cb1e0664a..165b875e5 100644
+--- a/src/sfnt/sfwoff2.c
++++ b/src/sfnt/sfwoff2.c
+@@ -2085,7 +2085,7 @@
+ /* Validate requested face index. */
+ *num_faces = woff2.num_fonts;
+ /* value -(N+1) requests information on index N */
+- if ( *face_instance_index < 0 )
++ if ( *face_instance_index < 0 && face_index > 0 )
+ face_index--;
+
+ if ( face_index >= woff2.num_fonts )
+--
+GitLab
+
diff --git a/meta/recipes-graphics/freetype/freetype_2.11.1.bb b/meta/recipes-graphics/freetype/freetype_2.11.1.bb
index 5055ff185c..257c5c6d9a 100644
--- a/meta/recipes-graphics/freetype/freetype_2.11.1.bb
+++ b/meta/recipes-graphics/freetype/freetype_2.11.1.bb
@@ -12,7 +12,9 @@ LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=a5927784d823d443c6cae55701d01553 \
file://docs/FTL.TXT;md5=9f37b4e6afa3fef9dba8932b16bd3f97 \
file://docs/GPLv2.TXT;md5=8ef380476f642c20ebf40fecb0add2ec"

-SRC_URI = "${SAVANNAH_NONGNU_MIRROR}/${BPN}/${BP}.tar.xz"
+SRC_URI = "${SAVANNAH_NONGNU_MIRROR}/${BPN}/${BP}.tar.xz \
+ file://CVE-2022-27404.patch \
+ "
SRC_URI[sha256sum] = "3333ae7cfda88429c97a7ae63b7d01ab398076c3b67182e960e5684050f2c5c8"

UPSTREAM_CHECK_REGEX = "freetype-(?P<pver>\d+(\.\d+)+)"
--
2.32.0


[kirkstone] [PATCH v3 3/3] base-passwd: Disable shell for default users

Jiaqing Zhao
 

From: Davide Gardenal <davidegarde2000@...>

Change the shell of all global static users other than root (which
retains /bin/sh) and sync (as /bin/sync is rather harmless) to
/sbin/nologin (as /usr/sbin/nologin does not exist in openembedded)

Upstream-Status: Backport [https://launchpad.net/ubuntu/+source/base-passwd/3.5.30]
Signed-off-by: Jiaqing Zhao <jiaqing.zhao@...>
Signed-off-by: Richard Purdie <richard.purdie@...>
(cherry picked from commit ba3bc4d7a0a39a96f6e8d340e1b2654d47475f07)
Signed-off-by: Davide Gardenal <davide.gardenal@...>
---
.../base-passwd/disable-shell.patch | 57 +++++++++++++++++++
.../base-passwd/base-passwd_3.5.29.bb | 1 +
2 files changed, 58 insertions(+)
create mode 100644 meta/recipes-core/base-passwd/base-passwd/disable-shell.patch

diff --git a/meta/recipes-core/base-passwd/base-passwd/disable-shell.patch b/meta/recipes-core/base-passwd/base-passwd/disable-shell.patch
new file mode 100644
index 0000000000..bfaa786018
--- /dev/null
+++ b/meta/recipes-core/base-passwd/base-passwd/disable-shell.patch
@@ -0,0 +1,57 @@
+From 91e0db96741359173ddf2be083aafcc1a3c32472 Mon Sep 17 00:00:00 2001
+From: Jiaqing Zhao <jiaqing.zhao@...>
+Date: Mon, 18 Apr 2022 11:22:43 +0800
+Subject: [PATCH] Disable shell for default users
+
+Change the shell of all global static users other than root (which
+retains /bin/sh) and sync (as /bin/sync is rather harmless) to
+/sbin/nologin (as /usr/sbin/nologin does not exist in openembedded)
+
+Upstream-Status: Backport [https://launchpad.net/ubuntu/+source/base-passwd/3.5.30]
+Signed-off-by: Jiaqing Zhao <jiaqing.zhao@...>
+---
+ passwd.master | 32 ++++++++++++++++----------------
+ 1 file changed, 16 insertions(+), 16 deletions(-)
+
+diff --git a/passwd.master b/passwd.master
+index e1c32ff..0cd5ffd 100644
+--- a/passwd.master
++++ b/passwd.master
+@@ -1,18 +1,18 @@
+ root::0:0:root:/root:/bin/sh
+-daemon:*:1:1:daemon:/usr/sbin:/bin/sh
+-bin:*:2:2:bin:/bin:/bin/sh
+-sys:*:3:3:sys:/dev:/bin/sh
++daemon:*:1:1:daemon:/usr/sbin:/sbin/nologin
++bin:*:2:2:bin:/bin:/sbin/nologin
++sys:*:3:3:sys:/dev:/sbin/nologin
+ sync:*:4:65534:sync:/bin:/bin/sync
+-games:*:5:60:games:/usr/games:/bin/sh
+-man:*:6:12:man:/var/cache/man:/bin/sh
+-lp:*:7:7:lp:/var/spool/lpd:/bin/sh
+-mail:*:8:8:mail:/var/mail:/bin/sh
+-news:*:9:9:news:/var/spool/news:/bin/sh
+-uucp:*:10:10:uucp:/var/spool/uucp:/bin/sh
+-proxy:*:13:13:proxy:/bin:/bin/sh
+-www-data:*:33:33:www-data:/var/www:/bin/sh
+-backup:*:34:34:backup:/var/backups:/bin/sh
+-list:*:38:38:Mailing List Manager:/var/list:/bin/sh
+-irc:*:39:39:ircd:/var/run/ircd:/bin/sh
+-gnats:*:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
+-nobody:*:65534:65534:nobody:/nonexistent:/bin/sh
++games:*:5:60:games:/usr/games:/sbin/nologin
++man:*:6:12:man:/var/cache/man:/sbin/nologin
++lp:*:7:7:lp:/var/spool/lpd:/sbin/nologin
++mail:*:8:8:mail:/var/mail:/sbin/nologin
++news:*:9:9:news:/var/spool/news:/sbin/nologin
++uucp:*:10:10:uucp:/var/spool/uucp:/sbin/nologin
++proxy:*:13:13:proxy:/bin:/sbin/nologin
++www-data:*:33:33:www-data:/var/www:/sbin/nologin
++backup:*:34:34:backup:/var/backups:/sbin/nologin
++list:*:38:38:Mailing List Manager:/var/list:/sbin/nologin
++irc:*:39:39:ircd:/var/run/ircd:/sbin/nologin
++gnats:*:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/sbin/nologin
++nobody:*:65534:65534:nobody:/nonexistent:/sbin/nologin
+--
+2.32.0
+
diff --git a/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb b/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb
index 9a27ad3ab5..ef7792ae49 100644
--- a/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb
+++ b/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb
@@ -14,6 +14,7 @@ SRC_URI = "https://launchpad.net/debian/+archive/primary/+files/${BPN}_${PV}.tar
file://input.patch \
file://disable-docs.patch \
file://kvm.patch \
+ file://disable-shell.patch \
"

SRC_URI[md5sum] = "6beccac48083fe8ae5048acd062e5421"
--
2.34.1


[kirkstone] [PATCH v3 2/3] strace: Don't run ptest as "nobody"

Jiaqing Zhao
 

strace ptests can run successfully with root user, there is no need to
run as "nobody". The ptest results are the same.

Signed-off-by: Jiaqing Zhao <jiaqing.zhao@...>
Signed-off-by: Richard Purdie <richard.purdie@...>
(cherry picked from commit 5ab213178c011152e29dfb0a80251c5e5ab79900)
---
meta/recipes-devtools/strace/strace/run-ptest | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/meta/recipes-devtools/strace/strace/run-ptest b/meta/recipes-devtools/strace/strace/run-ptest
index 02bb91e07f..86daed9220 100755
--- a/meta/recipes-devtools/strace/strace/run-ptest
+++ b/meta/recipes-devtools/strace/strace/run-ptest
@@ -3,11 +3,7 @@
set -u

export TIMEOUT_DURATION=240
-chown nobody tests
-chown nobody tests/*
-chown nobody ../ptest
-
-su nobody -c "make -B -C tests -k test-suite.log"
+make -B -C tests -k test-suite.log
res=$?
if [ $res -ne 0 ]; then
cat tests/test-suite.log
--
2.34.1


[kirkstone] [PATCH v3 1/3] sed: Specify shell for "nobody" user in run-ptest

Jiaqing Zhao
 

ptest testsuite/panic-tests.sh of sed need to be run as a non-root user
so that the expected "sed: couldn't open temporary file <filename>:
Permission denied" error can be generated. After disabling default
shell for "nobody", a shell needs to be specified for running ptest.

Signed-off-by: Jiaqing Zhao <jiaqing.zhao@...>
Signed-off-by: Richard Purdie <richard.purdie@...>
(cherry picked from commit c6d7216772f76af4429fdaaca518858cf014293f)
---
meta/recipes-extended/sed/sed/run-ptest | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-extended/sed/sed/run-ptest b/meta/recipes-extended/sed/sed/run-ptest
index 993d7d5d75..0460c7961f 100644
--- a/meta/recipes-extended/sed/sed/run-ptest
+++ b/meta/recipes-extended/sed/sed/run-ptest
@@ -2,4 +2,4 @@

chown nobody testsuite
chown nobody ../ptest
-su nobody -c "make test-suite.log"
+su nobody -s /bin/sh -c "make test-suite.log"
--
2.34.1


[kirkstone] [PATCH v3 0/3] base-passwd: Disable shell for default users

Jiaqing Zhao
 

Change the shell of all global static users other than root (which
retains /bin/sh) and sync (as /bin/sync is rather harmless) to
/sbin/nologin (as /usr/sbin/nologin does not exist in openembedded)

Davide Gardenal (1):
base-passwd: Disable shell for default users

Jiaqing Zhao (2):
sed: Specify shell for "nobody" user in run-ptest
strace: Don't run ptest as "nobody"

---
Updates:
- v3: cherry pick related patches to fix ptest issues
- v2: fix commit message

---

.../base-passwd/disable-shell.patch | 57 +++++++++++++++++++
.../base-passwd/base-passwd_3.5.29.bb | 1 +
meta/recipes-devtools/strace/strace/run-ptest | 6 +-
meta/recipes-extended/sed/sed/run-ptest | 2 +-
4 files changed, 60 insertions(+), 6 deletions(-)
create mode 100644 meta/recipes-core/base-passwd/base-passwd/disable-shell.patch

--
2.34.1


Re: [PATCH] qemuarmv5: use arm-versatile-926ejs KMACHINE

Richard Purdie
 

On Thu, 2022-05-12 at 22:15 -0400, Jon Mason wrote:
I think this needs to get pulled back to kirkstone, as I'm now seeing
ERROR: linux-yocto-5.15.36+gitAUTOINC+fcf48627ea_ebfb1822e9-r0
do_kernel_metadata: Could not locate BSP definition for
qemuarm/standard and no defconfig was provided
You didn't cc Steve. Since I know things are nearly ready for a build
I've taken this back to kirkstone since the other patches went in.

Cheers,

Richard


[kirkstone][PATCH v2] base-passwd: Disable shell for default users

Davide Gardenal
 

Change the shell of all global static users other than root (which
retains /bin/sh) and sync (as /bin/sync is rather harmless) to
/sbin/nologin (as /usr/sbin/nologin does not exist in openembedded)

Upstream-Status: Backport [https://launchpad.net/ubuntu/+source/base-passwd/3.5.30]
Signed-off-by: Jiaqing Zhao <jiaqing.zhao@...>
Signed-off-by: Richard Purdie <richard.purdie@...>

Master reference: ba3bc4d7a0a39a96f6e8d340e1b2654d47475f07

Signed-off-by: Davide Gardenal <davide.gardenal@...>
---
Updates:
- v2: fix commit message

---
.../base-passwd/disable-shell.patch | 57 +++++++++++++++++++
.../base-passwd/base-passwd_3.5.29.bb | 1 +
2 files changed, 58 insertions(+)
create mode 100644 meta/recipes-core/base-passwd/base-passwd/disable-shell.patch

diff --git a/meta/recipes-core/base-passwd/base-passwd/disable-shell.patch b/meta/recipes-core/base-passwd/base-passwd/disable-shell.patch
new file mode 100644
index 0000000000..bfaa786018
--- /dev/null
+++ b/meta/recipes-core/base-passwd/base-passwd/disable-shell.patch
@@ -0,0 +1,57 @@
+From 91e0db96741359173ddf2be083aafcc1a3c32472 Mon Sep 17 00:00:00 2001
+From: Jiaqing Zhao <jiaqing.zhao@...>
+Date: Mon, 18 Apr 2022 11:22:43 +0800
+Subject: [PATCH] Disable shell for default users
+
+Change the shell of all global static users other than root (which
+retains /bin/sh) and sync (as /bin/sync is rather harmless) to
+/sbin/nologin (as /usr/sbin/nologin does not exist in openembedded)
+
+Upstream-Status: Backport [https://launchpad.net/ubuntu/+source/base-passwd/3.5.30]
+Signed-off-by: Jiaqing Zhao <jiaqing.zhao@...>
+---
+ passwd.master | 32 ++++++++++++++++----------------
+ 1 file changed, 16 insertions(+), 16 deletions(-)
+
+diff --git a/passwd.master b/passwd.master
+index e1c32ff..0cd5ffd 100644
+--- a/passwd.master
++++ b/passwd.master
+@@ -1,18 +1,18 @@
+ root::0:0:root:/root:/bin/sh
+-daemon:*:1:1:daemon:/usr/sbin:/bin/sh
+-bin:*:2:2:bin:/bin:/bin/sh
+-sys:*:3:3:sys:/dev:/bin/sh
++daemon:*:1:1:daemon:/usr/sbin:/sbin/nologin
++bin:*:2:2:bin:/bin:/sbin/nologin
++sys:*:3:3:sys:/dev:/sbin/nologin
+ sync:*:4:65534:sync:/bin:/bin/sync
+-games:*:5:60:games:/usr/games:/bin/sh
+-man:*:6:12:man:/var/cache/man:/bin/sh
+-lp:*:7:7:lp:/var/spool/lpd:/bin/sh
+-mail:*:8:8:mail:/var/mail:/bin/sh
+-news:*:9:9:news:/var/spool/news:/bin/sh
+-uucp:*:10:10:uucp:/var/spool/uucp:/bin/sh
+-proxy:*:13:13:proxy:/bin:/bin/sh
+-www-data:*:33:33:www-data:/var/www:/bin/sh
+-backup:*:34:34:backup:/var/backups:/bin/sh
+-list:*:38:38:Mailing List Manager:/var/list:/bin/sh
+-irc:*:39:39:ircd:/var/run/ircd:/bin/sh
+-gnats:*:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
+-nobody:*:65534:65534:nobody:/nonexistent:/bin/sh
++games:*:5:60:games:/usr/games:/sbin/nologin
++man:*:6:12:man:/var/cache/man:/sbin/nologin
++lp:*:7:7:lp:/var/spool/lpd:/sbin/nologin
++mail:*:8:8:mail:/var/mail:/sbin/nologin
++news:*:9:9:news:/var/spool/news:/sbin/nologin
++uucp:*:10:10:uucp:/var/spool/uucp:/sbin/nologin
++proxy:*:13:13:proxy:/bin:/sbin/nologin
++www-data:*:33:33:www-data:/var/www:/sbin/nologin
++backup:*:34:34:backup:/var/backups:/sbin/nologin
++list:*:38:38:Mailing List Manager:/var/list:/sbin/nologin
++irc:*:39:39:ircd:/var/run/ircd:/sbin/nologin
++gnats:*:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/sbin/nologin
++nobody:*:65534:65534:nobody:/nonexistent:/sbin/nologin
+--
+2.32.0
+
diff --git a/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb b/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb
index 9a27ad3ab5..ef7792ae49 100644
--- a/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb
+++ b/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb
@@ -14,6 +14,7 @@ SRC_URI = "https://launchpad.net/debian/+archive/primary/+files/${BPN}_${PV}.tar
file://input.patch \
file://disable-docs.patch \
file://kvm.patch \
+ file://disable-shell.patch \
"

SRC_URI[md5sum] = "6beccac48083fe8ae5048acd062e5421"
--
2.32.0


[kirkstone][PATCH] base-passwd: Disable shell for default users

Davide Gardenal
 

From: Jiaqing Zhao <jiaqing.zhao@...>

Change the shell of all global static users other than root (which
retains /bin/sh) and sync (as /bin/sync is rather harmless) to
/sbin/nologin (as /usr/sbin/nologin does not exist in openembedded)

Upstream-Status: Backport [https://launchpad.net/ubuntu/+source/base-passwd/3.5.30]
Signed-off-by: Jiaqing Zhao <jiaqing.zhao@...>
Signed-off-by: Richard Purdie <richard.purdie@...>

Master reference: ba3bc4d7a0a39a96f6e8d340e1b2654d47475f07

Signed-off-by: Davide Gardenal <davide.gardenal@...>
---
.../base-passwd/disable-shell.patch | 57 +++++++++++++++++++
.../base-passwd/base-passwd_3.5.29.bb | 1 +
2 files changed, 58 insertions(+)
create mode 100644 meta/recipes-core/base-passwd/base-passwd/disable-shell.patch

diff --git a/meta/recipes-core/base-passwd/base-passwd/disable-shell.patch b/meta/recipes-core/base-passwd/base-passwd/disable-shell.patch
new file mode 100644
index 00000000000..dddc93ca353
--- /dev/null
+++ b/meta/recipes-core/base-passwd/base-passwd/disable-shell.patch
@@ -0,0 +1,57 @@
+From 91e0db96741359173ddf2be083aafcc1a3c32472 Mon Sep 17 00:00:00 2001
+From: Jiaqing Zhao <jiaqing.zhao@...>
+Date: Mon, 18 Apr 2022 11:22:43 +0800
+Subject: [PATCH] Disable shell for default users
+
+Change the shell of all global static users other than root (which
+retains /bin/sh) and sync (as /bin/sync is rather harmless) to
+/sbin/nologin (as /usr/sbin/nologin does not exist in openembedded)
+
+Upstream-Status: Backport [https://launchpad.net/ubuntu/+source/base-passwd/3.5.30]
+Signed-off-by: Jiaqing Zhao <jiaqing.zhao@...>
+---
+ passwd.master | 32 ++++++++++++++++----------------
+ 1 file changed, 16 insertions(+), 16 deletions(-)
+
+diff --git a/passwd.master b/passwd.master
+index e1c32ff..0cd5ffd 100644
+--- a/passwd.master
++++ b/passwd.master
+@@ -1,18 +1,18 @@
+ root::0:0:root:/root:/bin/sh
+-daemon:*:1:1:daemon:/usr/sbin:/bin/sh
+-bin:*:2:2:bin:/bin:/bin/sh
+-sys:*:3:3:sys:/dev:/bin/sh
++daemon:*:1:1:daemon:/usr/sbin:/sbin/nologin
++bin:*:2:2:bin:/bin:/sbin/nologin
++sys:*:3:3:sys:/dev:/sbin/nologin
+ sync:*:4:65534:sync:/bin:/bin/sync
+-games:*:5:60:games:/usr/games:/bin/sh
+-man:*:6:12:man:/var/cache/man:/bin/sh
+-lp:*:7:7:lp:/var/spool/lpd:/bin/sh
+-mail:*:8:8:mail:/var/mail:/bin/sh
+-news:*:9:9:news:/var/spool/news:/bin/sh
+-uucp:*:10:10:uucp:/var/spool/uucp:/bin/sh
+-proxy:*:13:13:proxy:/bin:/bin/sh
+-www-data:*:33:33:www-data:/var/www:/bin/sh
+-backup:*:34:34:backup:/var/backups:/bin/sh
+-list:*:38:38:Mailing List Manager:/var/list:/bin/sh
+-irc:*:39:39:ircd:/var/run/ircd:/bin/sh
+-gnats:*:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
+-nobody:*:65534:65534:nobody:/nonexistent:/bin/sh
++games:*:5:60:games:/usr/games:/sbin/nologin
++man:*:6:12:man:/var/cache/man:/sbin/nologin
++lp:*:7:7:lp:/var/spool/lpd:/sbin/nologin
++mail:*:8:8:mail:/var/mail:/sbin/nologin
++news:*:9:9:news:/var/spool/news:/sbin/nologin
++uucp:*:10:10:uucp:/var/spool/uucp:/sbin/nologin
++proxy:*:13:13:proxy:/bin:/sbin/nologin
++www-data:*:33:33:www-data:/var/www:/sbin/nologin
++backup:*:34:34:backup:/var/backups:/sbin/nologin
++list:*:38:38:Mailing List Manager:/var/list:/sbin/nologin
++irc:*:39:39:ircd:/var/run/ircd:/sbin/nologin
++gnats:*:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/sbin/nologin
++nobody:*:65534:65534:nobody:/nonexistent:/sbin/nologin
+--
+2.32.0
+
diff --git a/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb b/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb
index 9a27ad3ab5a..ef7792ae49c 100644
--- a/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb
+++ b/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb
@@ -14,6 +14,7 @@ SRC_URI = "https://launchpad.net/debian/+archive/primary/+files/${BPN}_${PV}.tar
file://input.patch \
file://disable-docs.patch \
file://kvm.patch \
+ file://disable-shell.patch \
"

SRC_URI[md5sum] = "6beccac48083fe8ae5048acd062e5421"


[PATCH V4] meta: rust - Bug fix for target definitions returning 'NoneType' for arm

Sundeep KOKKONDA
 

[Yocto bug #14742]
The build shows below error while building for arm machines.
Exception: TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
Detailed error info :

Steps to reproduce:
1. Set MACHINE ?= "qemuarm" in local.conf & add 'TOOLCHAIN_HOST_TASK:append = " packagegroup-rust-cross-canadian-${MACHINE}"'
2. bitbake core-image-minimal -cpopulate_sdk

Complete Error:
ERROR: rust-cross-canadian-arm-1.59.0-r0 do_rust_gen_targets: Error executing a python function in exec_func_python() autogenerated:
The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_func_python() autogenerated', lineno: 2, function: <module>
0001:
*** 0002:do_rust_gen_targets(d)
0003:
File: '/ala-lpggp31/skokkonda/yocto/poky/meta/recipes-devtools/rust/rust-cross-canadian-common.inc', lineno: 31, function: do_rust_gen_targets
0027:
0028:LLVM_TARGET[x86_64] = "${RUST_HOST_SYS}"
0029:python do_rust_gen_targets () {
0030: wd = d.getVar('WORKDIR') + '/targets/'
*** 0031: rust_gen_target(d, 'TARGET', wd, d.getVar('TARGET_LLVM_FEATURES') or "", d.getVar('TARGET_LLVM_CPU'), d.getVar('TARGET_ARCH'))
0032: rust_gen_target(d, 'HOST', wd, "", "generic", d.getVar('HOST_ARCH'))
0033: rust_gen_target(d, 'BUILD', wd, "", "generic", d.getVar('BUILD_ARCH'))
0034:}
0035:
File: '/ala-lpggp31/skokkonda/yocto/poky/meta/recipes-devtools/rust/rust-common.inc', lineno: 330, function: rust_gen_target
0326: # build tspec
0327: tspec = {}
0328: tspec['llvm-target'] = d.getVarFlag('LLVM_TARGET', arch_abi)
0329: tspec['data-layout'] = d.getVarFlag('DATA_LAYOUT', arch_abi)
*** 0330: tspec['max-atomic-width'] = int(d.getVarFlag('MAX_ATOMIC_WIDTH', arch_abi))
0331: tspec['target-pointer-width'] = d.getVarFlag('TARGET_POINTER_WIDTH', arch_abi)
0332: tspec['target-c-int-width'] = d.getVarFlag('TARGET_C_INT_WIDTH', arch_abi)
0333: tspec['target-endian'] = d.getVarFlag('TARGET_ENDIAN', arch_abi)
0334: tspec['arch'] = arch_to_rust_target_arch(rust_arch)
Exception: TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'

Below are the local variables from rust_gen_target function for arm and aarch64 targets. Refer below, the tspec varibles for 'arm' generated with NoneType.
(a) Locals at rust_gen_target for arm::
tspec['data-layout'] = None, Type of tspec['data-layout'] = <class 'NoneType'>
tspec['data-layout'] = None, Type of tspec['data-layout'] = <class 'NoneType'>
DEBUG: Python function do_rust_gen_targets finished
(b) Locals at rust_gen_target for aarch64::
tspec['data-layout'] = aarch64-unknown-linux-gnu, Type of tspec['data-layout'] = <class 'str'>
tspec['max-atomic-width'] = 128, Type of tspec['max-atomic-width'] = <class 'int'>

Reason for changing arm-eabi to arm: The earlier changes introduced this bug, so reverting the change 'arm-eabi' to 'arm' fixed the issue.

The 'rust_gen_targets' Task added with its dependent variable list.

Signed-off-by: Sundeep KOKKONDA <sundeep.kokkonda@...>
---
meta/recipes-devtools/rust/rust-common.inc | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/meta/recipes-devtools/rust/rust-common.inc b/meta/recipes-devtools/rust/rust-common.inc
index 310aecef22..984fe9099e 100644
--- a/meta/recipes-devtools/rust/rust-common.inc
+++ b/meta/recipes-devtools/rust/rust-common.inc
@@ -119,13 +119,13 @@ def llvm_features(d):


## arm-unknown-linux-gnueabihf
-DATA_LAYOUT[arm-eabi] = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
-LLVM_TARGET[arm-eabi] = "${RUST_TARGET_SYS}"
-TARGET_ENDIAN[arm-eabi] = "little"
-TARGET_POINTER_WIDTH[arm-eabi] = "32"
-TARGET_C_INT_WIDTH[arm-eabi] = "32"
-MAX_ATOMIC_WIDTH[arm-eabi] = "64"
-FEATURES[arm-eabi] = "+v6,+vfp2"
+DATA_LAYOUT[arm] = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
+LLVM_TARGET[arm] = "${RUST_TARGET_SYS}"
+TARGET_ENDIAN[arm] = "little"
+TARGET_POINTER_WIDTH[arm] = "32"
+TARGET_C_INT_WIDTH[arm] = "32"
+MAX_ATOMIC_WIDTH[arm] = "64"
+FEATURES[arm] = "+v6,+vfp2"

## armv7-unknown-linux-gnueabihf
DATA_LAYOUT[armv7-eabi] = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
@@ -360,6 +360,8 @@ def rust_gen_target(d, thing, wd, features, cpu, arch, abi=""):
with open(wd + sys + '.json', 'w') as f:
json.dump(tspec, f, indent=4)

+do_rust_gen_targets[vardeps] += "DATA_LAYOUT LLVM_TARGET TARGET_ENDIAN TARGET_POINTER_WIDTH TARGET_C_INT_WIDTH MAX_ATOMIC_WIDTH FEATURES"
+
python do_rust_gen_targets () {
wd = d.getVar('WORKDIR') + '/targets/'
build_arch = d.getVar('BUILD_ARCH')
--
2.35.1


Re: [PATCH] qemuarmv5: use arm-versatile-926ejs KMACHINE

Jon Mason
 

I think this needs to get pulled back to kirkstone, as I'm now seeing
ERROR: linux-yocto-5.15.36+gitAUTOINC+fcf48627ea_ebfb1822e9-r0
do_kernel_metadata: Could not locate BSP definition for
qemuarm/standard and no defconfig was provided

On Wed, May 4, 2022 at 10:24 AM Bruce Ashfield <bruce.ashfield@...> wrote:

On Wed, May 4, 2022 at 10:09 AM Jon Mason <jdmason@...> wrote:

Use the Arm Versatile 926 kernel configs to get this machine working
again.
Acked-by: Bruce Ashfield <bruce.ashfield@...>

Signed-off-by: Jon Mason <jdmason@...>
---
meta/conf/machine/qemuarmv5.conf | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/conf/machine/qemuarmv5.conf b/meta/conf/machine/qemuarmv5.conf
index 2dad504c9932..abdae5f36182 100644
--- a/meta/conf/machine/qemuarmv5.conf
+++ b/meta/conf/machine/qemuarmv5.conf
@@ -15,7 +15,7 @@ QB_MACHINE = "-machine versatilepb"
QB_KERNEL_CMDLINE_APPEND = "vmalloc=256"
QB_GRAPHICS = "-device virtio-gpu-pci"
QB_OPT_APPEND = "-device qemu-xhci -device usb-tablet -device usb-kbd"
-PREFERRED_VERSION_linux-yocto ??= "5.15%"
QB_DTB = "${@oe.utils.version_less_or_equal('PREFERRED_VERSION_linux-yocto', '4.7', '', 'zImage-versatile-pb.dtb', d)}"

-KMACHINE:qemuarmv5 = "qemuarm"
+PREFERRED_VERSION_linux-yocto ??= "5.15%"
+KMACHINE:qemuarmv5 = "arm-versatile-926ejs"
--
2.30.2

--
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II


Re: [PATCH] eudev: create static nodes from modules

Changqing Li
 




From: richard.purdie@... <richard.purdie@...>
Sent: Thursday, May 12, 2022 6:33 PM
To: Alex Kiernan <alex.kiernan@...>; Li, Changqing <Changqing.Li@...>
Cc: Patches and discussions about the oe-core layer <openembedded-core@...>
Subject: Re: [OE-core] [PATCH] eudev: create static nodes from modules
 
[Please note: This e-mail is from an EXTERNAL e-mail address]

On Thu, 2022-05-12 at 08:45 +0100, Alex Kiernan wrote:
> On Thu, May 12, 2022 at 6:43 AM Changqing Li <changqing.li@...> wrote:
> >
> > From: Changqing Li <changqing.li@...>
> >
> > dev in modules.devname should be populated in /dev on boot.
> > remove create static mode from udevd will make these devices
> > cannot be populated. When use sysVinit, devices like /dev/net/tun
> > will not be created.
> >
> > more info:
> > udevd in systemd also remove create static mode in udevd, but using
> > service kmod-static-nodes.service and
> > systemd-tmpfiles-setup-dev.service in systemd to create these node, so
> > systemd works well.
> >
> > Signed-off-by: Changqing Li <changqing.li@...>
> > ---
> >  ...dev-create-static-nodes-from-modules.patch | 115 ++++++++++++++++++
> >  meta/recipes-core/udev/eudev_3.2.11.bb        |   1 +
> >  2 files changed, 116 insertions(+)
> >  create mode 100644 meta/recipes-core/udev/eudev/0001-eudev-create-static-nodes-from-modules.patch
> >
> > diff --git a/meta/recipes-core/udev/eudev/0001-eudev-create-static-nodes-from-modules.patch b/meta/recipes-core/udev/eudev/0001-eudev-create-static-nodes-from-modules.patch
> > new file mode 100644
> > index 0000000000..19611f4e89
> > --- /dev/null
> > +++ b/meta/recipes-core/udev/eudev/0001-eudev-create-static-nodes-from-modules.patch
> > @@ -0,0 +1,115 @@
> > +From 573d6c4106d5b3828da43d2843c1d599ae3cd1cd Mon Sep 17 00:00:00 2001
> > +From: Changqing Li <changqing.li@...>
> > +Date: Tue, 10 May 2022 14:04:35 +0800
> > +Subject: [PATCH] eudev: create static nodes from modules
> > +
> > +Revert commit <src/udev/udevd.c: remove create static nodes from modules>
> > +https://gitweb.gentoo.org/proj/eudev.git/commit/?id=2b7abd5ec9cc47a8b895df6db77fb1537c6f1a39
> > +
> > +Upstream-Status: Inappropriate [oe-specific]
> > +
> > +Upstream intentionally remove create static nodes from modules, it is
> > +expected handled by tmpfiles services, refer [1].
> > +[1] https://github.com/eudev-project/eudev/issues/229
> > +
> > +For yocto, when start with sysVinit, to enable systemd distro feature,
> > +and install systemd-tmpfiles is not proper, so revert this commit.
> > +
>
> Reading the upstream issue, I'm not sure this really is an
> "Inappropriate" upstream. eudev has dropped this commit, because you
> can use systemd-tmpfiles ("as it works without systemd and can be
> compiled individually" - presumably using our unsupported musl
> patches...) or opentmpfiles (which is dead and points you back to
> systemd-tmpfiles).
>
> Feels like this is an engage with upstream rather than carry a patch
> forever which just causes us to be perpetually divergent.

I agree, this does sound like something we need to address to keep the
project maintainable...

I tried to suggest  upstream to add this back,  but  upstream seems prefer to use tmpfile solution.

Regrads
Sandy


Cheers,

Richard


[PATCH] gdb: Upgrade to 12.1

Khem Raj
 

Release Announcement [1] and Notes [2]

[1] https://lists.gnu.org/archive/html/info-gnu/2022-05/msg00000.html
[2] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob_plain;f=gdb/NEWS;hb=gdb-12.1-release

Signed-off-by: Khem Raj <raj.khem@...>
---
meta/conf/distro/include/tcmode-default.inc | 2 +-
...canadian_11.2.bb => gdb-cross-canadian_12.1.bb} | 0
.../gdb/{gdb-cross_11.2.bb => gdb-cross_12.1.bb} | 0
meta/recipes-devtools/gdb/gdb.inc | 14 +++++++-------
...0001-make-man-install-relative-to-DESTDIR.patch | 10 +++++-----
...s-linux-nat-Define-_ABIO32-if-not-defined.patch | 8 ++++----
...Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch | 11 +++++------
...-libreadline.a-when-using-disable-static.patch} | 14 +++++++-------
...gidefs.h.patch => 0005-use-asm-sgidefs.h.patch} | 8 ++++----
...AGS.patch => 0006-Change-order-of-CFLAGS.patch} | 10 +++++-----
...> 0007-resolve-restrict-keyword-conflict.patch} | 6 +++---
...tch => 0008-Fix-invalid-sigprocmask-call.patch} | 8 ++++----
....patch => 0009-gdbserver-ctrl-c-handling.patch} | 10 +++++-----
.../gdb/{gdb_11.2.bb => gdb_12.1.bb} | 0
14 files changed, 50 insertions(+), 51 deletions(-)
rename meta/recipes-devtools/gdb/{gdb-cross-canadian_11.2.bb => gdb-cross-canadian_12.1.bb} (100%)
rename meta/recipes-devtools/gdb/{gdb-cross_11.2.bb => gdb-cross_12.1.bb} (100%)
rename meta/recipes-devtools/gdb/gdb/{0005-Dont-disable-libreadline.a-when-using-disable-static.patch => 0004-Dont-disable-libreadline.a-when-using-disable-static.patch} (80%)
rename meta/recipes-devtools/gdb/gdb/{0006-use-asm-sgidefs.h.patch => 0005-use-asm-sgidefs.h.patch} (84%)
rename meta/recipes-devtools/gdb/gdb/{0007-Change-order-of-CFLAGS.patch => 0006-Change-order-of-CFLAGS.patch} (80%)
rename meta/recipes-devtools/gdb/gdb/{0008-resolve-restrict-keyword-conflict.patch => 0007-resolve-restrict-keyword-conflict.patch} (93%)
rename meta/recipes-devtools/gdb/gdb/{0009-Fix-invalid-sigprocmask-call.patch => 0008-Fix-invalid-sigprocmask-call.patch} (90%)
rename meta/recipes-devtools/gdb/gdb/{0010-gdbserver-ctrl-c-handling.patch => 0009-gdbserver-ctrl-c-handling.patch} (82%)
rename meta/recipes-devtools/gdb/{gdb_11.2.bb => gdb_12.1.bb} (100%)

diff --git a/meta/conf/distro/include/tcmode-default.inc b/meta/conf/distro/include/tcmode-default.inc
index 9660f2804a7..1179ba172ff 100644
--- a/meta/conf/distro/include/tcmode-default.inc
+++ b/meta/conf/distro/include/tcmode-default.inc
@@ -19,7 +19,7 @@ PREFERRED_PROVIDER_virtual/gettext ??= "gettext"
GCCVERSION ?= "12.%"
SDKGCCVERSION ?= "${GCCVERSION}"
BINUVERSION ?= "2.38%"
-GDBVERSION ?= "11.%"
+GDBVERSION ?= "12.%"
GLIBCVERSION ?= "2.35"
LINUXLIBCVERSION ?= "5.16%"
QEMUVERSION ?= "7.0%"
diff --git a/meta/recipes-devtools/gdb/gdb-cross-canadian_11.2.bb b/meta/recipes-devtools/gdb/gdb-cross-canadian_12.1.bb
similarity index 100%
rename from meta/recipes-devtools/gdb/gdb-cross-canadian_11.2.bb
rename to meta/recipes-devtools/gdb/gdb-cross-canadian_12.1.bb
diff --git a/meta/recipes-devtools/gdb/gdb-cross_11.2.bb b/meta/recipes-devtools/gdb/gdb-cross_12.1.bb
similarity index 100%
rename from meta/recipes-devtools/gdb/gdb-cross_11.2.bb
rename to meta/recipes-devtools/gdb/gdb-cross_12.1.bb
diff --git a/meta/recipes-devtools/gdb/gdb.inc b/meta/recipes-devtools/gdb/gdb.inc
index 649ee287276..3b569fd40e7 100644
--- a/meta/recipes-devtools/gdb/gdb.inc
+++ b/meta/recipes-devtools/gdb/gdb.inc
@@ -8,11 +8,11 @@ SRC_URI = "${GNU_MIRROR}/gdb/gdb-${PV}.tar.xz \
file://0001-make-man-install-relative-to-DESTDIR.patch \
file://0002-mips-linux-nat-Define-_ABIO32-if-not-defined.patch \
file://0003-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch \
- file://0005-Dont-disable-libreadline.a-when-using-disable-static.patch \
- file://0006-use-asm-sgidefs.h.patch \
- file://0007-Change-order-of-CFLAGS.patch \
- file://0008-resolve-restrict-keyword-conflict.patch \
- file://0009-Fix-invalid-sigprocmask-call.patch \
- file://0010-gdbserver-ctrl-c-handling.patch \
+ file://0004-Dont-disable-libreadline.a-when-using-disable-static.patch \
+ file://0005-use-asm-sgidefs.h.patch \
+ file://0006-Change-order-of-CFLAGS.patch \
+ file://0007-resolve-restrict-keyword-conflict.patch \
+ file://0008-Fix-invalid-sigprocmask-call.patch \
+ file://0009-gdbserver-ctrl-c-handling.patch \
"
-SRC_URI[sha256sum] = "1497c36a71881b8671a9a84a0ee40faab788ca30d7ba19d8463c3cc787152e32"
+SRC_URI[sha256sum] = "0e1793bf8f2b54d53f46dea84ccfd446f48f81b297b28c4f7fc017b818d69fed"
diff --git a/meta/recipes-devtools/gdb/gdb/0001-make-man-install-relative-to-DESTDIR.patch b/meta/recipes-devtools/gdb/gdb/0001-make-man-install-relative-to-DESTDIR.patch
index 824b96f6afe..16d6cf196fd 100644
--- a/meta/recipes-devtools/gdb/gdb/0001-make-man-install-relative-to-DESTDIR.patch
+++ b/meta/recipes-devtools/gdb/gdb/0001-make-man-install-relative-to-DESTDIR.patch
@@ -1,7 +1,7 @@
-From a6d3df9d84463ec500d9d01558ab8a17e824e9e5 Mon Sep 17 00:00:00 2001
+From 8eca28eddcda4ce8a345ca031f43ff1ed6f37089 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@...>
Date: Mon, 2 Mar 2015 02:27:55 +0000
-Subject: [PATCH 01/10] make man install relative to DESTDIR
+Subject: [PATCH 1/9] make man install relative to DESTDIR

Upstream-Status: Pending

@@ -11,10 +11,10 @@ Signed-off-by: Khem Raj <raj.khem@...>
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sim/common/Make-common.in b/sim/common/Make-common.in
-index 8c2cacea1e5..4a52eef2203 100644
+index 74e5dad3049..9e95c224ba4 100644
--- a/sim/common/Make-common.in
+++ b/sim/common/Make-common.in
-@@ -63,7 +63,7 @@ tooldir = $(libdir)/$(target_alias)
+@@ -70,7 +70,7 @@ tooldir = $(libdir)/$(target_alias)
datadir = @datadir@
datarootdir = @datarootdir@
mandir = @mandir@
@@ -24,5 +24,5 @@ index 8c2cacea1e5..4a52eef2203 100644
includedir = @includedir@

--
-2.33.1
+2.36.1

diff --git a/meta/recipes-devtools/gdb/gdb/0002-mips-linux-nat-Define-_ABIO32-if-not-defined.patch b/meta/recipes-devtools/gdb/gdb/0002-mips-linux-nat-Define-_ABIO32-if-not-defined.patch
index 591c9bfa3f9..8d263de8963 100644
--- a/meta/recipes-devtools/gdb/gdb/0002-mips-linux-nat-Define-_ABIO32-if-not-defined.patch
+++ b/meta/recipes-devtools/gdb/gdb/0002-mips-linux-nat-Define-_ABIO32-if-not-defined.patch
@@ -1,7 +1,7 @@
-From 7f1f25eaaace289bc33c5aaa1c5fe9e04e719651 Mon Sep 17 00:00:00 2001
+From 37d3afd2eaa95c89ad7cb5d0079b017752e4d0ea Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@...>
Date: Wed, 23 Mar 2016 06:30:09 +0000
-Subject: [PATCH 02/10] mips-linux-nat: Define _ABIO32 if not defined
+Subject: [PATCH 2/9] mips-linux-nat: Define _ABIO32 if not defined

This helps building gdb on mips64 on musl, since
musl does not provide sgidefs.h this define is
@@ -16,7 +16,7 @@ Signed-off-by: Khem Raj <raj.khem@...>
1 file changed, 4 insertions(+)

diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c
-index b21c7cb2ea6..6614b4de31e 100644
+index 20e12b6889e..6adc61235aa 100644
--- a/gdb/mips-linux-nat.c
+++ b/gdb/mips-linux-nat.c
@@ -41,6 +41,10 @@
@@ -31,5 +31,5 @@ index b21c7cb2ea6..6614b4de31e 100644
class mips_linux_nat_target final : public linux_nat_trad_target
{
--
-2.33.1
+2.36.1

diff --git a/meta/recipes-devtools/gdb/gdb/0003-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch b/meta/recipes-devtools/gdb/gdb/0003-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch
index 09ea533b00d..7e09404bb05 100644
--- a/meta/recipes-devtools/gdb/gdb/0003-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch
+++ b/meta/recipes-devtools/gdb/gdb/0003-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch
@@ -1,8 +1,7 @@
-From 0cb233ec3951582fa1a051a16bfd644ef4969df5 Mon Sep 17 00:00:00 2001
+From e689eec672ee8c53b3adb2ade2b5deb9b7cd99d4 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@...>
Date: Sat, 30 Apr 2016 18:32:14 -0700
-Subject: [PATCH 03/10] ppc/ptrace: Define pt_regs uapi_pt_regs on !GLIBC
- systems
+Subject: [PATCH 3/9] ppc/ptrace: Define pt_regs uapi_pt_regs on !GLIBC systems

Upstream-Status: Pending

@@ -13,7 +12,7 @@ Signed-off-by: Khem Raj <raj.khem@...>
2 files changed, 12 insertions(+)

diff --git a/gdb/nat/ppc-linux.h b/gdb/nat/ppc-linux.h
-index e712a9a5713..76bbcca0928 100644
+index 1094f6b0be3..d8588a646c2 100644
--- a/gdb/nat/ppc-linux.h
+++ b/gdb/nat/ppc-linux.h
@@ -18,7 +18,13 @@
@@ -31,7 +30,7 @@ index e712a9a5713..76bbcca0928 100644

/* This sometimes isn't defined. */
diff --git a/gdbserver/linux-ppc-low.cc b/gdbserver/linux-ppc-low.cc
-index db9a88219ea..151e4183bb1 100644
+index 08824887003..69afbae5359 100644
--- a/gdbserver/linux-ppc-low.cc
+++ b/gdbserver/linux-ppc-low.cc
@@ -23,7 +23,13 @@
@@ -49,5 +48,5 @@ index db9a88219ea..151e4183bb1 100644
#include "arch/ppc-linux-common.h"
#include "arch/ppc-linux-tdesc.h"
--
-2.33.1
+2.36.1

diff --git a/meta/recipes-devtools/gdb/gdb/0005-Dont-disable-libreadline.a-when-using-disable-static.patch b/meta/recipes-devtools/gdb/gdb/0004-Dont-disable-libreadline.a-when-using-disable-static.patch
similarity index 80%
rename from meta/recipes-devtools/gdb/gdb/0005-Dont-disable-libreadline.a-when-using-disable-static.patch
rename to meta/recipes-devtools/gdb/gdb/0004-Dont-disable-libreadline.a-when-using-disable-static.patch
index 02ea30f9bf8..a1e85e91b33 100644
--- a/meta/recipes-devtools/gdb/gdb/0005-Dont-disable-libreadline.a-when-using-disable-static.patch
+++ b/meta/recipes-devtools/gdb/gdb/0004-Dont-disable-libreadline.a-when-using-disable-static.patch
@@ -1,7 +1,7 @@
-From e2efd044c479895767f1b929f5a54fa0c689f318 Mon Sep 17 00:00:00 2001
+From 15ee6a626242efb8f367be49c13e00d0b72317f0 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@...>
Date: Sat, 30 Apr 2016 15:25:03 -0700
-Subject: [PATCH 05/10] Dont disable libreadline.a when using --disable-static
+Subject: [PATCH 4/9] Dont disable libreadline.a when using --disable-static

If gdb is configured with --disable-static then this is dutifully passed to
readline which then disables libreadline.a, which causes a problem when gdb
@@ -19,10 +19,10 @@ Signed-off-by: Khem Raj <raj.khem@...>
2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/Makefile.def b/Makefile.def
-index 5a460f1dbbc..77a702ac6d6 100644
+index acdcd625ed6..78fc31e1199 100644
--- a/Makefile.def
+++ b/Makefile.def
-@@ -105,7 +105,8 @@ host_modules= { module= libiconv;
+@@ -120,7 +120,8 @@ host_modules= { module= libiconv;
missing= install-html;
missing= install-info; };
host_modules= { module= m4; };
@@ -33,10 +33,10 @@ index 5a460f1dbbc..77a702ac6d6 100644
host_modules= { module= sim; };
host_modules= { module= texinfo; no_install= true; };
diff --git a/Makefile.in b/Makefile.in
-index 9b3a5d75735..98cbe844fca 100644
+index 3aacd2daac9..aa58adada4a 100644
--- a/Makefile.in
+++ b/Makefile.in
-@@ -25607,7 +25607,7 @@ configure-readline:
+@@ -32791,7 +32791,7 @@ configure-readline:
$$s/$$module_srcdir/configure \
--srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
@@ -46,5 +46,5 @@ index 9b3a5d75735..98cbe844fca 100644
@endif readline

--
-2.33.1
+2.36.1

diff --git a/meta/recipes-devtools/gdb/gdb/0006-use-asm-sgidefs.h.patch b/meta/recipes-devtools/gdb/gdb/0005-use-asm-sgidefs.h.patch
similarity index 84%
rename from meta/recipes-devtools/gdb/gdb/0006-use-asm-sgidefs.h.patch
rename to meta/recipes-devtools/gdb/gdb/0005-use-asm-sgidefs.h.patch
index ef271c45e29..242099b9b1e 100644
--- a/meta/recipes-devtools/gdb/gdb/0006-use-asm-sgidefs.h.patch
+++ b/meta/recipes-devtools/gdb/gdb/0005-use-asm-sgidefs.h.patch
@@ -1,7 +1,7 @@
-From 5077518c11e8d75e9bf65cdf9ca21c59564e1037 Mon Sep 17 00:00:00 2001
+From 25a75aaf29791f4302f0e4452f7ebaf735d4f083 Mon Sep 17 00:00:00 2001
From: Andre McCurdy <amccurdy@...>
Date: Sat, 30 Apr 2016 15:29:06 -0700
-Subject: [PATCH 06/10] use <asm/sgidefs.h>
+Subject: [PATCH 5/9] use <asm/sgidefs.h>

Build fix for MIPS with musl libc

@@ -19,7 +19,7 @@ Signed-off-by: Khem Raj <raj.khem@...>
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c
-index 6614b4de31e..237eb6eb975 100644
+index 6adc61235aa..afb40066744 100644
--- a/gdb/mips-linux-nat.c
+++ b/gdb/mips-linux-nat.c
@@ -31,7 +31,7 @@
@@ -32,5 +32,5 @@ index 6614b4de31e..237eb6eb975 100644
#include <asm/ptrace.h>
#include "inf-ptrace.h"
--
-2.33.1
+2.36.1

diff --git a/meta/recipes-devtools/gdb/gdb/0007-Change-order-of-CFLAGS.patch b/meta/recipes-devtools/gdb/gdb/0006-Change-order-of-CFLAGS.patch
similarity index 80%
rename from meta/recipes-devtools/gdb/gdb/0007-Change-order-of-CFLAGS.patch
rename to meta/recipes-devtools/gdb/gdb/0006-Change-order-of-CFLAGS.patch
index 40d12579c0e..58c9b1d0a78 100644
--- a/meta/recipes-devtools/gdb/gdb/0007-Change-order-of-CFLAGS.patch
+++ b/meta/recipes-devtools/gdb/gdb/0006-Change-order-of-CFLAGS.patch
@@ -1,7 +1,7 @@
-From 80080e6c8425ac51498f49c2063b960a08f9a27d Mon Sep 17 00:00:00 2001
+From c0e7c34134aa1f9644075c596a2338a50d3d923e Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@...>
Date: Sat, 30 Apr 2016 15:35:39 -0700
-Subject: [PATCH 07/10] Change order of CFLAGS
+Subject: [PATCH 6/9] Change order of CFLAGS

Lets us override Werror if need be

@@ -13,10 +13,10 @@ Signed-off-by: Khem Raj <raj.khem@...>
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdbserver/Makefile.in b/gdbserver/Makefile.in
-index 12e9b2777ae..ad44fbc3309 100644
+index 47648b8d962..5599779de57 100644
--- a/gdbserver/Makefile.in
+++ b/gdbserver/Makefile.in
-@@ -172,7 +172,7 @@ WIN32APILIBS = @WIN32APILIBS@
+@@ -156,7 +156,7 @@ WIN32APILIBS = @WIN32APILIBS@
INTERNAL_CFLAGS_BASE = ${GLOBAL_CFLAGS} \
${PROFILE_CFLAGS} ${INCLUDE_CFLAGS} ${CPPFLAGS} $(PTHREAD_CFLAGS)
INTERNAL_WARN_CFLAGS = ${INTERNAL_CFLAGS_BASE} $(WARN_CFLAGS)
@@ -26,5 +26,5 @@ index 12e9b2777ae..ad44fbc3309 100644
# LDFLAGS is specifically reserved for setting from the command line
# when running make.
--
-2.33.1
+2.36.1

diff --git a/meta/recipes-devtools/gdb/gdb/0008-resolve-restrict-keyword-conflict.patch b/meta/recipes-devtools/gdb/gdb/0007-resolve-restrict-keyword-conflict.patch
similarity index 93%
rename from meta/recipes-devtools/gdb/gdb/0008-resolve-restrict-keyword-conflict.patch
rename to meta/recipes-devtools/gdb/gdb/0007-resolve-restrict-keyword-conflict.patch
index 9095f905828..bbd1f0b27f1 100644
--- a/meta/recipes-devtools/gdb/gdb/0008-resolve-restrict-keyword-conflict.patch
+++ b/meta/recipes-devtools/gdb/gdb/0007-resolve-restrict-keyword-conflict.patch
@@ -1,7 +1,7 @@
-From 4ee7e8afb9ff259e889ac938c673fda9ddc5e15a Mon Sep 17 00:00:00 2001
+From 44fa1ecfbd8a5fe0cfea12a175fa041686842a0c Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@...>
Date: Tue, 10 May 2016 08:47:05 -0700
-Subject: [PATCH 08/10] resolve restrict keyword conflict
+Subject: [PATCH 7/9] resolve restrict keyword conflict

GCC detects that we call 'restrict' as param name in function
signatures and complains since both params are called 'restrict'
@@ -44,5 +44,5 @@ index 90a67d18426..664641a1fe8 100644
_GL_CXXALIASWARN (gettimeofday);
# if defined __cplusplus && defined GNULIB_NAMESPACE
--
-2.33.1
+2.36.1

diff --git a/meta/recipes-devtools/gdb/gdb/0009-Fix-invalid-sigprocmask-call.patch b/meta/recipes-devtools/gdb/gdb/0008-Fix-invalid-sigprocmask-call.patch
similarity index 90%
rename from meta/recipes-devtools/gdb/gdb/0009-Fix-invalid-sigprocmask-call.patch
rename to meta/recipes-devtools/gdb/gdb/0008-Fix-invalid-sigprocmask-call.patch
index 5b9d1cfaf93..ed1310ced28 100644
--- a/meta/recipes-devtools/gdb/gdb/0009-Fix-invalid-sigprocmask-call.patch
+++ b/meta/recipes-devtools/gdb/gdb/0008-Fix-invalid-sigprocmask-call.patch
@@ -1,7 +1,7 @@
-From 5740876d92ddb67b039d5fbcd1b71e6c58823c08 Mon Sep 17 00:00:00 2001
+From 5bdd15553daef7370ca3c1f12d8f14247fdd4907 Mon Sep 17 00:00:00 2001
From: Yousong Zhou <yszhou4tech@...>
Date: Fri, 24 Mar 2017 10:36:03 +0800
-Subject: [PATCH 09/10] Fix invalid sigprocmask call
+Subject: [PATCH 8/9] Fix invalid sigprocmask call
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
@@ -32,7 +32,7 @@ Signed-off-by: Khem Raj <raj.khem@...>
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdbsupport/signals-state-save-restore.cc b/gdbsupport/signals-state-save-restore.cc
-index 95c156e5036..f4aa512d105 100644
+index 92e799d3551..a4a0234272a 100644
--- a/gdbsupport/signals-state-save-restore.cc
+++ b/gdbsupport/signals-state-save-restore.cc
@@ -38,7 +38,7 @@ save_original_signals_state (bool quiet)
@@ -45,5 +45,5 @@ index 95c156e5036..f4aa512d105 100644
perror_with_name (("sigprocmask"));

--
-2.33.1
+2.36.1

diff --git a/meta/recipes-devtools/gdb/gdb/0010-gdbserver-ctrl-c-handling.patch b/meta/recipes-devtools/gdb/gdb/0009-gdbserver-ctrl-c-handling.patch
similarity index 82%
rename from meta/recipes-devtools/gdb/gdb/0010-gdbserver-ctrl-c-handling.patch
rename to meta/recipes-devtools/gdb/gdb/0009-gdbserver-ctrl-c-handling.patch
index cb4744e5dda..f53d3bd1e54 100644
--- a/meta/recipes-devtools/gdb/gdb/0010-gdbserver-ctrl-c-handling.patch
+++ b/meta/recipes-devtools/gdb/gdb/0009-gdbserver-ctrl-c-handling.patch
@@ -1,7 +1,7 @@
-From d611a68f05c0c86af27bf6beae189a90a946e2e3 Mon Sep 17 00:00:00 2001
+From bc3b1f6aacf2d8fe66b022fbfcf28cd82c76e52f Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@...>
Date: Thu, 29 Nov 2018 18:00:23 -0800
-Subject: [PATCH 10/10] gdbserver ctrl-c handling
+Subject: [PATCH 9/9] gdbserver ctrl-c handling

This problem was created by the upstream commit 78708b7c8c
After applying the commit, it will send SIGINT to the process
@@ -23,10 +23,10 @@ Signed-off-by: Khem Raj <raj.khem@...>
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdbserver/linux-low.cc b/gdbserver/linux-low.cc
-index 5c6191d941c..7f7acf6700d 100644
+index 7726a4a0c36..f750e074a03 100644
--- a/gdbserver/linux-low.cc
+++ b/gdbserver/linux-low.cc
-@@ -5733,7 +5733,7 @@ linux_process_target::request_interrupt ()
+@@ -5496,7 +5496,7 @@ linux_process_target::request_interrupt ()
{
/* Send a SIGINT to the process group. This acts just like the user
typed a ^C on the controlling terminal. */
@@ -36,5 +36,5 @@ index 5c6191d941c..7f7acf6700d 100644

bool
--
-2.33.1
+2.36.1

diff --git a/meta/recipes-devtools/gdb/gdb_11.2.bb b/meta/recipes-devtools/gdb/gdb_12.1.bb
similarity index 100%
rename from meta/recipes-devtools/gdb/gdb_11.2.bb
rename to meta/recipes-devtools/gdb/gdb_12.1.bb
--
2.36.1


[kirstone][PATCH] go: minor upgrade 1.17.8 -> 1.17.9

Davide Gardenal
 

This minor update include fixes to the following CVE

CVE: CVE-2022-28327

Signed-off-by: Davide Gardenal <davide.gardenal@...>
---
meta/recipes-devtools/go/{go-1.17.8.inc => go-1.17.9.inc} | 2 +-
...{go-binary-native_1.17.8.bb => go-binary-native_1.17.9.bb} | 4 ++--
...o-cross-canadian_1.17.8.bb => go-cross-canadian_1.17.9.bb} | 0
.../go/{go-cross_1.17.8.bb => go-cross_1.17.9.bb} | 0
.../go/{go-crosssdk_1.17.8.bb => go-crosssdk_1.17.9.bb} | 0
.../go/{go-native_1.17.8.bb => go-native_1.17.9.bb} | 0
.../go/{go-runtime_1.17.8.bb => go-runtime_1.17.9.bb} | 0
meta/recipes-devtools/go/{go_1.17.8.bb => go_1.17.9.bb} | 0
8 files changed, 3 insertions(+), 3 deletions(-)
rename meta/recipes-devtools/go/{go-1.17.8.inc => go-1.17.9.inc} (92%)
rename meta/recipes-devtools/go/{go-binary-native_1.17.8.bb => go-binary-native_1.17.9.bb} (83%)
rename meta/recipes-devtools/go/{go-cross-canadian_1.17.8.bb => go-cross-canadian_1.17.9.bb} (100%)
rename meta/recipes-devtools/go/{go-cross_1.17.8.bb => go-cross_1.17.9.bb} (100%)
rename meta/recipes-devtools/go/{go-crosssdk_1.17.8.bb => go-crosssdk_1.17.9.bb} (100%)
rename meta/recipes-devtools/go/{go-native_1.17.8.bb => go-native_1.17.9.bb} (100%)
rename meta/recipes-devtools/go/{go-runtime_1.17.8.bb => go-runtime_1.17.9.bb} (100%)
rename meta/recipes-devtools/go/{go_1.17.8.bb => go_1.17.9.bb} (100%)

diff --git a/meta/recipes-devtools/go/go-1.17.8.inc b/meta/recipes-devtools/go/go-1.17.9.inc
similarity index 92%
rename from meta/recipes-devtools/go/go-1.17.8.inc
rename to meta/recipes-devtools/go/go-1.17.9.inc
index 649c09ec1d..aa2630016b 100644
--- a/meta/recipes-devtools/go/go-1.17.8.inc
+++ b/meta/recipes-devtools/go/go-1.17.9.inc
@@ -17,7 +17,7 @@ SRC_URI += "\
file://0001-exec.go-do-not-write-linker-flags-into-buildids.patch \
file://0001-src-cmd-dist-buildgo.go-do-not-hardcode-host-compile.patch \
"
-SRC_URI[main.sha256sum] = "2effcd898140da79a061f3784ca4f8d8b13d811fb2abe9dad2404442dabbdf7a"
+SRC_URI[main.sha256sum] = "763ad4bafb80a9204458c5fa2b8e7327fa971aee454252c0e362c11236156813"

# Upstream don't believe it is a signifiant real world issue and will only
# fix in 1.17 onwards where we can drop this.
diff --git a/meta/recipes-devtools/go/go-binary-native_1.17.8.bb b/meta/recipes-devtools/go/go-binary-native_1.17.9.bb
similarity index 83%
rename from meta/recipes-devtools/go/go-binary-native_1.17.8.bb
rename to meta/recipes-devtools/go/go-binary-native_1.17.9.bb
index 1b85cd50d6..8a80fd1f69 100644
--- a/meta/recipes-devtools/go/go-binary-native_1.17.8.bb
+++ b/meta/recipes-devtools/go/go-binary-native_1.17.9.bb
@@ -8,8 +8,8 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=5d4950ecb7b26d2c5e4e7b4e0dd74707"
PROVIDES = "go-native"

SRC_URI = "https://dl.google.com/go/go${PV}.${BUILD_GOOS}-${BUILD_GOARCH}.tar.gz;name=go_${BUILD_GOTUPLE}"
-SRC_URI[go_linux_amd64.sha256sum] = "980e65a863377e69fd9b67df9d8395fd8e93858e7a24c9f55803421e453f4f99"
-SRC_URI[go_linux_arm64.sha256sum] = "57a9171682e297df1a5bd287be056ed0280195ad079af90af16dcad4f64710cb"
+SRC_URI[go_linux_amd64.sha256sum] = "9dacf782028fdfc79120576c872dee488b81257b1c48e9032d122cfdb379cca6"
+SRC_URI[go_linux_arm64.sha256sum] = "44dcdcd4f0fa6f83c15ef70b31580f1e3f95895c2f11a00e36c440c3554b6ad5"

UPSTREAM_CHECK_URI = "https://golang.org/dl/"
UPSTREAM_CHECK_REGEX = "go(?P<pver>\d+(\.\d+)+)\.linux"
diff --git a/meta/recipes-devtools/go/go-cross-canadian_1.17.8.bb b/meta/recipes-devtools/go/go-cross-canadian_1.17.9.bb
similarity index 100%
rename from meta/recipes-devtools/go/go-cross-canadian_1.17.8.bb
rename to meta/recipes-devtools/go/go-cross-canadian_1.17.9.bb
diff --git a/meta/recipes-devtools/go/go-cross_1.17.8.bb b/meta/recipes-devtools/go/go-cross_1.17.9.bb
similarity index 100%
rename from meta/recipes-devtools/go/go-cross_1.17.8.bb
rename to meta/recipes-devtools/go/go-cross_1.17.9.bb
diff --git a/meta/recipes-devtools/go/go-crosssdk_1.17.8.bb b/meta/recipes-devtools/go/go-crosssdk_1.17.9.bb
similarity index 100%
rename from meta/recipes-devtools/go/go-crosssdk_1.17.8.bb
rename to meta/recipes-devtools/go/go-crosssdk_1.17.9.bb
diff --git a/meta/recipes-devtools/go/go-native_1.17.8.bb b/meta/recipes-devtools/go/go-native_1.17.9.bb
similarity index 100%
rename from meta/recipes-devtools/go/go-native_1.17.8.bb
rename to meta/recipes-devtools/go/go-native_1.17.9.bb
diff --git a/meta/recipes-devtools/go/go-runtime_1.17.8.bb b/meta/recipes-devtools/go/go-runtime_1.17.9.bb
similarity index 100%
rename from meta/recipes-devtools/go/go-runtime_1.17.8.bb
rename to meta/recipes-devtools/go/go-runtime_1.17.9.bb
diff --git a/meta/recipes-devtools/go/go_1.17.8.bb b/meta/recipes-devtools/go/go_1.17.9.bb
similarity index 100%
rename from meta/recipes-devtools/go/go_1.17.8.bb
rename to meta/recipes-devtools/go/go_1.17.9.bb
--
2.32.0


Re: [PATCH] eudev: create static nodes from modules

Richard Purdie
 

On Thu, 2022-05-12 at 08:45 +0100, Alex Kiernan wrote:
On Thu, May 12, 2022 at 6:43 AM Changqing Li <changqing.li@...> wrote:

From: Changqing Li <changqing.li@...>

dev in modules.devname should be populated in /dev on boot.
remove create static mode from udevd will make these devices
cannot be populated. When use sysVinit, devices like /dev/net/tun
will not be created.

more info:
udevd in systemd also remove create static mode in udevd, but using
service kmod-static-nodes.service and
systemd-tmpfiles-setup-dev.service in systemd to create these node, so
systemd works well.

Signed-off-by: Changqing Li <changqing.li@...>
---
...dev-create-static-nodes-from-modules.patch | 115 ++++++++++++++++++
meta/recipes-core/udev/eudev_3.2.11.bb | 1 +
2 files changed, 116 insertions(+)
create mode 100644 meta/recipes-core/udev/eudev/0001-eudev-create-static-nodes-from-modules.patch

diff --git a/meta/recipes-core/udev/eudev/0001-eudev-create-static-nodes-from-modules.patch b/meta/recipes-core/udev/eudev/0001-eudev-create-static-nodes-from-modules.patch
new file mode 100644
index 0000000000..19611f4e89
--- /dev/null
+++ b/meta/recipes-core/udev/eudev/0001-eudev-create-static-nodes-from-modules.patch
@@ -0,0 +1,115 @@
+From 573d6c4106d5b3828da43d2843c1d599ae3cd1cd Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@...>
+Date: Tue, 10 May 2022 14:04:35 +0800
+Subject: [PATCH] eudev: create static nodes from modules
+
+Revert commit <src/udev/udevd.c: remove create static nodes from modules>
+https://gitweb.gentoo.org/proj/eudev.git/commit/?id=2b7abd5ec9cc47a8b895df6db77fb1537c6f1a39
+
+Upstream-Status: Inappropriate [oe-specific]
+
+Upstream intentionally remove create static nodes from modules, it is
+expected handled by tmpfiles services, refer [1].
+[1] https://github.com/eudev-project/eudev/issues/229
+
+For yocto, when start with sysVinit, to enable systemd distro feature,
+and install systemd-tmpfiles is not proper, so revert this commit.
+
Reading the upstream issue, I'm not sure this really is an
"Inappropriate" upstream. eudev has dropped this commit, because you
can use systemd-tmpfiles ("as it works without systemd and can be
compiled individually" - presumably using our unsupported musl
patches...) or opentmpfiles (which is dead and points you back to
systemd-tmpfiles).

Feels like this is an engage with upstream rather than carry a patch
forever which just causes us to be perpetually divergent.
I agree, this does sound like something we need to address to keep the
project maintainable...

Cheers,

Richard


[PATCH] sanity.bbclass: grammar/typo fixes re: Python install

Robert P. J. Day
 

Clean up various spelling/grammar oopsies in a small section of
sanity.bbclass.

Signed-off-by: Robert P. J. Day <rpjday@...>

---

diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index b416918013..491a3bac6f 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -631,11 +631,14 @@ def check_sanity_sstate_dir_change(sstate_dir, data):
def check_sanity_version_change(status, d):
# Sanity checks to be done when SANITY_VERSION or NATIVELSBSTRING changes
# In other words, these tests run once in a given build directory and then
- # never again until the sanity version or host distrubution id/version changes.
+ # never again until the sanity version or host distribution id/version changes.
+
+ # Verify that the python install is complete. Examples that are often removed in
+ # minimal installations:
+ #
+ # glib-2.0-native requires xml.parsers.expat
+ # icu requires distutils.sysconfig

- # Check the python install is complete. Examples that are often removed in
- # minimal installations: glib-2.0-natives requries # xml.parsers.expat and icu
- # requires distutils.sysconfig.
try:
import xml.parsers.expat
import distutils.sysconfig

--

========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca

LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================


[PATCH] local.conf.sample: mention other QEMU targets in OE

Robert P. J. Day
 

Mention that there are other QEMU targets available in the OE layer,
and leave it for the reader to check them out.

Signed-off-by: Robert P. J. Day <rpjday@...>

---

i think this is the happy medium between not saying anything about
the additional QEMU machines, and promoting them to full equality with
the other layers -- just let the reader know where they can examine
them.

diff --git a/meta/conf/local.conf.sample b/meta/conf/local.conf.sample
index c05691de58..c28ff62468 100644
--- a/meta/conf/local.conf.sample
+++ b/meta/conf/local.conf.sample
@@ -29,7 +29,11 @@
# This sets the default machine to be qemux86-64 if no other machine is selected:
MACHINE ??= "qemux86-64"

-#
+# Note that the openembedded-core layer defines a few more QEMU targets that
+# are not listed here as they are not tested as robustly as the above, but they
+# are still available for the adventurous; see the full list at:
+# https://git.openembedded.org/openembedded-core/tree/meta/conf/machine
+
# Where to place downloads
#
# During a first build the system will download many different source code tarballs

--

========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca

LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================


Re: [PATCH] classes/kernel.bbclass: allow disabling symlink creation also for pkg_postinst

Luca Ceresoli
 

Hi Jonas,

Il giorno Wed, 11 May 2022 16:05:39 +0000
"Jonas via lists.openembedded.org"
<jonas.hoeppner=garz-fricke.com@...> ha scritto:

The commit d7341f1f22c32ff6cc95d7127f26f87d7fc9c6bd has introduced a
variable to disable the symlink creation for kernel images.
kernel.bbclass contains code to generate a pkg_posinst step for the
kernel-image package which will generate a symlink after installation
on target/during rootfs creation. This part didn't checked the
KERNEL_IMAGETYPE_SYMLINK variable.


This patch adds this check, so that it is possible to disable this
symlink also.


Signed-off-by: Jonas Höppner <jonas.hoeppner@...>
This patch does not apply, apparently because it is not properly
text-encoded. Did you use git send-email to send it?

--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


Re: [PATCH] eudev: create static nodes from modules

Alex Kiernan
 

On Thu, May 12, 2022 at 6:43 AM Changqing Li <changqing.li@...> wrote:

From: Changqing Li <changqing.li@...>

dev in modules.devname should be populated in /dev on boot.
remove create static mode from udevd will make these devices
cannot be populated. When use sysVinit, devices like /dev/net/tun
will not be created.

more info:
udevd in systemd also remove create static mode in udevd, but using
service kmod-static-nodes.service and
systemd-tmpfiles-setup-dev.service in systemd to create these node, so
systemd works well.

Signed-off-by: Changqing Li <changqing.li@...>
---
...dev-create-static-nodes-from-modules.patch | 115 ++++++++++++++++++
meta/recipes-core/udev/eudev_3.2.11.bb | 1 +
2 files changed, 116 insertions(+)
create mode 100644 meta/recipes-core/udev/eudev/0001-eudev-create-static-nodes-from-modules.patch

diff --git a/meta/recipes-core/udev/eudev/0001-eudev-create-static-nodes-from-modules.patch b/meta/recipes-core/udev/eudev/0001-eudev-create-static-nodes-from-modules.patch
new file mode 100644
index 0000000000..19611f4e89
--- /dev/null
+++ b/meta/recipes-core/udev/eudev/0001-eudev-create-static-nodes-from-modules.patch
@@ -0,0 +1,115 @@
+From 573d6c4106d5b3828da43d2843c1d599ae3cd1cd Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@...>
+Date: Tue, 10 May 2022 14:04:35 +0800
+Subject: [PATCH] eudev: create static nodes from modules
+
+Revert commit <src/udev/udevd.c: remove create static nodes from modules>
+https://gitweb.gentoo.org/proj/eudev.git/commit/?id=2b7abd5ec9cc47a8b895df6db77fb1537c6f1a39
+
+Upstream-Status: Inappropriate [oe-specific]
+
+Upstream intentionally remove create static nodes from modules, it is
+expected handled by tmpfiles services, refer [1].
+[1] https://github.com/eudev-project/eudev/issues/229
+
+For yocto, when start with sysVinit, to enable systemd distro feature,
+and install systemd-tmpfiles is not proper, so revert this commit.
+
Reading the upstream issue, I'm not sure this really is an
"Inappropriate" upstream. eudev has dropped this commit, because you
can use systemd-tmpfiles ("as it works without systemd and can be
compiled individually" - presumably using our unsupported musl
patches...) or opentmpfiles (which is dead and points you back to
systemd-tmpfiles).

Feels like this is an engage with upstream rather than carry a patch
forever which just causes us to be perpetually divergent.

+Signed-off-by: Li Zhou <li.zhou@...>
+Signed-off-by: Changqing Li <changqing.li@...>
+---
+ src/udev/udevd.c | 71 ++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 71 insertions(+)
+
+diff --git a/src/udev/udevd.c b/src/udev/udevd.c
+index 7ffd174..ff53fe4 100644
+--- a/src/udev/udevd.c
++++ b/src/udev/udevd.c
+@@ -993,6 +993,76 @@ static void handle_signal(struct udev *udev, int signo) {
+ }
+ }
+
++static void static_dev_create_from_modules(struct udev *udev) {
++ struct utsname kernel;
++ char modules[UTIL_PATH_SIZE];
++ char buf[4096];
++ FILE *f;
++
++ if (uname(&kernel) < 0) {
++ log_error("uname failed: %m");
++ return;
++ }
++
++ strscpyl(modules, sizeof(modules), ROOTPREFIX "/lib/modules/", kernel.release, "/modules.devname", NULL);
++ f = fopen(modules, "re");
++ if (f == NULL)
++ return;
++
++ while (fgets(buf, sizeof(buf), f) != NULL) {
++ char *s;
++ const char *modname;
++ const char *devname;
++ const char *devno;
++ int maj, min;
++ char type;
++ mode_t mode;
++ char filename[UTIL_PATH_SIZE];
++
++ if (buf[0] == '#')
++ continue;
++
++ modname = buf;
++ s = strchr(modname, ' ');
++ if (s == NULL)
++ continue;
++ s[0] = '\0';
++
++ devname = &s[1];
++ s = strchr(devname, ' ');
++ if (s == NULL)
++ continue;
++ s[0] = '\0';
++
++ devno = &s[1];
++ s = strchr(devno, ' ');
++ if (s == NULL)
++ s = strchr(devno, '\n');
++ if (s != NULL)
++ s[0] = '\0';
++ if (sscanf(devno, "%c%u:%u", &type, &maj, &min) != 3)
++ continue;
++
++ mode = 0600;
++ if (type == 'c')
++ mode |= S_IFCHR;
++ else if (type == 'b')
++ mode |= S_IFBLK;
++ else
++ continue;
++
++ strscpyl(filename, sizeof(filename), "/dev/", devname, NULL);
++ mkdir_parents_label(filename, 0755);
++ mac_selinux_create_file_prepare(filename, mode);
++ log_debug("mknod '%s' %c%u:%u", filename, type, maj, min);
++ if (mknod(filename, mode, makedev(maj, min)) < 0 && errno == EEXIST)
++ utimensat(AT_FDCWD, filename, NULL, 0);
++ mac_selinux_create_file_clear();
++ }
++
++ fclose(f);
++}
++
+ /*
+ * read the kernel command line, in case we need to get into debug mode
+ * udev.log-priority=<level> syslog priority
+@@ -1199,6 +1269,7 @@ int main(int argc, char *argv[]) {
+ }
+
+ dev_setup(NULL, UID_INVALID, GID_INVALID);
++ static_dev_create_from_modules(udev);
+
+ /* before opening new files, make sure std{in,out,err} fds are in a sane state */
+ if (arg_daemonize) {
+--
+2.25.1
+
diff --git a/meta/recipes-core/udev/eudev_3.2.11.bb b/meta/recipes-core/udev/eudev_3.2.11.bb
index 841039f6d7..deb6c90a82 100644
--- a/meta/recipes-core/udev/eudev_3.2.11.bb
+++ b/meta/recipes-core/udev/eudev_3.2.11.bb
@@ -12,6 +12,7 @@ PROVIDES = "udev"
SRC_URI = "https://github.com/eudev-project/${BPN}/releases/download/v${PV}/${BP}.tar.gz \
file://init \
file://local.rules \
+ file://0001-eudev-create-static-nodes-from-modules.patch \
"

SRC_URI[sha256sum] = "19847cafec67897da855fde56f9dc7d92e21c50e450aa79068a7e704ed44558b"
--
2.25.1




--
Alex Kiernan


Re: [PATCH] kernel: add missing path to search for debug files

Andrej Valek
 

ping

On Mon, 2022-01-24 at 08:19 +0000, Andrej Valek via
lists.openembedded.org wrote:
Hello Richard,

Fine, that we have it, but are you going to take a look on the patch
:)
?

Regards,
Andrej

On Fri, 2022-01-21 at 10:18 +0100, Michael Opdenacker wrote:

On 1/19/22 5:48 PM, Richard Purdie wrote:
On Wed, 2022-01-19 at 12:57 +0100, Andrej Valek wrote:
Since explicit debug package creation via
${KERNEL_PACKAGE_NAME}-
dbg has
been added to kernel, it has to cover all
PACKAGE_DEBUG_SPLIT_STYLE
options. For ex. when the variable "debug-file-directory"
package
search
path has to be set explicitly, otherwise it will not find any
files.

Signed-off-by: Andrej Valek <andrej.valek@...>
---
 meta/classes/kernel.bbclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/classes/kernel.bbclass
b/meta/classes/kernel.bbclass
index 473e28be47..9ea201c936 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -647,6 +647,7 @@ FILES:${KERNEL_PACKAGE_NAME}-image = ""
 FILES:${KERNEL_PACKAGE_NAME}-dev = "/boot/System.map*
/boot/Module.symvers* /boot/config* ${KERNEL_SRC_PATH}
${nonarch_base_libdir}/modules/${KERNEL_VERSION}/build"
 FILES:${KERNEL_PACKAGE_NAME}-vmlinux = "/boot/vmlinux-
${KERNEL_VERSION_NAME}"
 FILES:${KERNEL_PACKAGE_NAME}-modules = ""
+FILES:${KERNEL_PACKAGE_NAME}-dbg = "/usr/lib/debug
/usr/src/debug"
This seems to highlight that we have no tests for
KERNEL_PACKAGE_NAME. At the
very least we need a bugzilla entry for creating some...

Done: https://bugzilla.yoctoproject.org/show_bug.cgi?id=14700
Cheers
Michael


8681 - 8700 of 174224