[07/21] systemd: update 250.5 -> 251.2

Message ID 20220606120126.3381438-7-alex@linutronix.de
State Accepted, archived
Commit 9403233b2f9e58dd8a416342a37024dc08164317
Headers show
Series [01/21] sato: work around missing icons in adwaita 42.0 | expand

Commit Message

Alexander Kanavin June 6, 2022, 12:01 p.m. UTC
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
 ...md-boot_250.5.bb => systemd-boot_251.2.bb} |  0
 meta/recipes-core/systemd/systemd.inc         |  8 ++--
 ...e-Use-sockaddr-pointer-type-for-bind.patch | 46 -------------------
 ...7ca2ab96d085158485ecfc46c7cb6af0f166.patch | 41 +++++++++++++++++
 .../{systemd_250.5.bb => systemd_251.2.bb}    |  1 -
 5 files changed, 46 insertions(+), 50 deletions(-)
 rename meta/recipes-core/systemd/{systemd-boot_250.5.bb => systemd-boot_251.2.bb} (100%)
 delete mode 100644 meta/recipes-core/systemd/systemd/0001-resolve-Use-sockaddr-pointer-type-for-bind.patch
 create mode 100644 meta/recipes-core/systemd/systemd/38c87ca2ab96d085158485ecfc46c7cb6af0f166.patch
 rename meta/recipes-core/systemd/{systemd_250.5.bb => systemd_251.2.bb} (99%)

Patch

diff --git a/meta/recipes-core/systemd/systemd-boot_250.5.bb b/meta/recipes-core/systemd/systemd-boot_251.2.bb
similarity index 100%
rename from meta/recipes-core/systemd/systemd-boot_250.5.bb
rename to meta/recipes-core/systemd/systemd-boot_251.2.bb
diff --git a/meta/recipes-core/systemd/systemd.inc b/meta/recipes-core/systemd/systemd.inc
index 309105290f..b8dbe2263a 100644
--- a/meta/recipes-core/systemd/systemd.inc
+++ b/meta/recipes-core/systemd/systemd.inc
@@ -14,8 +14,10 @@  LICENSE = "GPL-2.0-only & LGPL-2.1-only"
 LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \
                     file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c"
 
-SRCREV = "4a31fa2fb040005b73253da75cf84949b8485175"
-SRCBRANCH = "v250-stable"
-SRC_URI = "git://github.com/systemd/systemd-stable.git;protocol=https;branch=${SRCBRANCH}"
+SRCREV = "253052686cbd840ac69030d31c4b186af23aba4c"
+SRCBRANCH = "v251-stable"
+SRC_URI = "git://github.com/systemd/systemd-stable.git;protocol=https;branch=${SRCBRANCH} \
+           file://38c87ca2ab96d085158485ecfc46c7cb6af0f166.patch \
+"
 
 S = "${WORKDIR}/git"
diff --git a/meta/recipes-core/systemd/systemd/0001-resolve-Use-sockaddr-pointer-type-for-bind.patch b/meta/recipes-core/systemd/systemd/0001-resolve-Use-sockaddr-pointer-type-for-bind.patch
deleted file mode 100644
index 8567283537..0000000000
--- a/meta/recipes-core/systemd/systemd/0001-resolve-Use-sockaddr-pointer-type-for-bind.patch
+++ /dev/null
@@ -1,46 +0,0 @@ 
-From ad1428f29196bcc88ae382ee67ff705928e2be24 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Thu, 5 May 2022 20:25:37 -0700
-Subject: [PATCH] resolve: Use sockaddr pointer type for bind()
-
-bind() expects sockaddr* but SERVER_ADDRESS is sockaddr_in type struct
-
-Fixes errors with clang e.g.
-
-../git/src/resolve/test-resolved-stream.c:112:32: error: incompatible pointer types passing 'struct sockaddr_in *' to parameter of type 'const struct sockaddr *' [-Werror,-Wincompatible-pointer-types]
-        assert_se(bind(bindfd, &SERVER_ADDRESS, sizeof(SERVER_ADDRESS)) >= 0);
-                               ^~~~~~~~~~~~~~~
-../git/src/resolve/test-resolved-stream.c:251:39: error: incompatible pointer types passing 'struct sockaddr_in *' to parameter of type 'const struct sockaddr *' [-Werror,-Wincompatible-pointer-types]
-                r = connect(clientfd, &SERVER_ADDRESS, sizeof(SERVER_ADDRESS));
-
-Upstream-Status: Submitted [https://github.com/systemd/systemd/pull/23281]
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- src/resolve/test-resolved-stream.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/resolve/test-resolved-stream.c b/src/resolve/test-resolved-stream.c
-index f12c729e50..504b532002 100644
---- a/src/resolve/test-resolved-stream.c
-+++ b/src/resolve/test-resolved-stream.c
-@@ -109,7 +109,7 @@ static void *tcp_dns_server(void *p) {
- 
-         assert_se((bindfd = socket(AF_INET, SOCK_STREAM | SOCK_CLOEXEC, 0)) >= 0);
-         assert_se(setsockopt(bindfd, SOL_SOCKET, SO_REUSEADDR, &(int){1}, sizeof(int)) >= 0);
--        assert_se(bind(bindfd, &SERVER_ADDRESS, sizeof(SERVER_ADDRESS)) >= 0);
-+        assert_se(bind(bindfd, (struct sockaddr*)&SERVER_ADDRESS, sizeof(SERVER_ADDRESS)) >= 0);
-         assert_se(listen(bindfd, 1) >= 0);
-         assert_se((acceptfd = accept(bindfd, NULL, NULL)) >= 0);
-         server_handle(acceptfd);
-@@ -248,7 +248,7 @@ static void test_dns_stream(bool tls) {
-         assert_se((clientfd = socket(AF_INET, SOCK_STREAM | SOCK_CLOEXEC, 0)) >= 0);
- 
-         for (int i = 0; i < 100; i++) {
--                r = connect(clientfd, &SERVER_ADDRESS, sizeof(SERVER_ADDRESS));
-+                r = connect(clientfd, (struct sockaddr*)&SERVER_ADDRESS, sizeof(SERVER_ADDRESS));
-                 if (r >= 0)
-                         break;
-                 usleep(EVENT_TIMEOUT_USEC / 100);
--- 
-2.36.0
-
diff --git a/meta/recipes-core/systemd/systemd/38c87ca2ab96d085158485ecfc46c7cb6af0f166.patch b/meta/recipes-core/systemd/systemd/38c87ca2ab96d085158485ecfc46c7cb6af0f166.patch
new file mode 100644
index 0000000000..2449023083
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/38c87ca2ab96d085158485ecfc46c7cb6af0f166.patch
@@ -0,0 +1,41 @@ 
+From 38c87ca2ab96d085158485ecfc46c7cb6af0f166 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
+Date: Fri, 3 Jun 2022 09:32:02 +0200
+Subject: [PATCH] sha256: fix compilation on efi-ia32
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+/usr/bin/gcc -c ../src/fundamental/sha256.c -o src/boot/efi/sha256.c.o -Wno-format-signedness -Wno-missing-field-initializers -Wno-unused-parameter -Wdate-time -Wendif-labels -Werror=format=2 -Werror=implicit-function-declaration -Werror=incompatible-pointer-types -Werror=int-conversion -Werror=overflow -Werror=override-init -Werror=return-type -Werror=shift-count-overflow -Werror=shift-overflow=2 -Werror=undef -Wfloat-equal -Wimplicit-fallthrough=5 -Winit-self -Wlogical-op -Wmissing-include-dirs -Wmissing-noreturn -Wnested-externs -Wold-style-definition -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-aliasing=2 -Wstrict-prototypes -Wsuggest-attribute=noreturn -Wunused-function -Wwrite-strings -Wno-unused-result -fno-stack-protector -fno-strict-aliasing -fpic -fwide-exec-charset=UCS2 -Wall -Wextra -Wsign-compare -nostdlib -std=gnu99 -ffreestanding -fshort-wchar -fvisibility=hidden -isystem /usr/include/efi -isystem /usr/include/efi/ia32 -I /builddir/build/BUILD/systemd-stable-250.7/src/fundamental -DSD_BOOT -DGNU_EFI_USE_MS_ABI -include src/boot/efi/efi_config.h -include version.h -mno-sse -mno-mmx -flto -O2 -flto=auto
+../src/fundamental/sha256.c: In function ‘sha256_finish_ctx’:
+../src/fundamental/sha256.c:61:25: error: ‘false’ undeclared (first use in this function)
+   61 | # define UNALIGNED_P(p) false
+      |                         ^~~~~
+../src/fundamental/sha256.c:136:21: note: in expansion of macro ‘UNALIGNED_P’
+  136 |                 if (UNALIGNED_P(resbuf))
+      |                     ^~~~~~~~~~~
+../src/fundamental/sha256.c:32:1: note: ‘false’ is defined in header ‘<stdbool.h>’; did you forget to ‘#include <stdbool.h>’?
+   31 | #include "sha256.h"
+  +++ |+#include <stdbool.h>
+   32 |
+...
+
+Upstream-Status: Backport
+Signed-off-by: Alexander Kanavin <alex@linutronix.de>
+---
+ src/fundamental/sha256.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/fundamental/sha256.c b/src/fundamental/sha256.c
+index 67d83b5f1cd6..f08959479643 100644
+--- a/src/fundamental/sha256.c
++++ b/src/fundamental/sha256.c
+@@ -60,7 +60,7 @@
+ #  define UNALIGNED_P(p) (((size_t) p) % sizeof(uint32_t) != 0)
+ # endif
+ #else
+-# define UNALIGNED_P(p) false
++# define UNALIGNED_P(p) sd_false
+ #endif
+ 
+ /* This array contains the bytes used to pad the buffer to the next
diff --git a/meta/recipes-core/systemd/systemd_250.5.bb b/meta/recipes-core/systemd/systemd_251.2.bb
similarity index 99%
rename from meta/recipes-core/systemd/systemd_250.5.bb
rename to meta/recipes-core/systemd/systemd_251.2.bb
index 6fac27ee56..80f80849d0 100644
--- a/meta/recipes-core/systemd/systemd_250.5.bb
+++ b/meta/recipes-core/systemd/systemd_251.2.bb
@@ -24,7 +24,6 @@  SRC_URI += "file://touchscreen.rules \
            file://0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch \
            file://0003-implment-systemd-sysv-install-for-OE.patch \
            file://0001-Move-sysusers.d-sysctl.d-binfmt.d-modules-load.d-to-.patch \
-           file://0001-resolve-Use-sockaddr-pointer-type-for-bind.patch \
            "
 
 # patches needed by musl