commit:     144819c7841bf6b1c6866fe79ac8fa3fcc142996
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Mon Feb  9 18:15:42 2026 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Mon Feb  9 19:27:36 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=144819c7

sys-apps/systemd: fix build with /bin/sh -> mksh

Bug: https://bugs.gentoo.org/969789
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 sys-apps/systemd/files/systemd-259-test-echo.patch | 32 ++++++++++++++++++++++
 sys-apps/systemd/systemd-258.3.ebuild              |  1 +
 sys-apps/systemd/systemd-259.1.ebuild              |  1 +
 3 files changed, 34 insertions(+)

diff --git a/sys-apps/systemd/files/systemd-259-test-echo.patch 
b/sys-apps/systemd/files/systemd-259-test-echo.patch
new file mode 100644
index 000000000000..af592fc79119
--- /dev/null
+++ b/sys-apps/systemd/files/systemd-259-test-echo.patch
@@ -0,0 +1,32 @@
+https://github.com/systemd/systemd/pull/40607
+
+From 1766be649f2c153dee6fe2c79c5aac3a21c73a7b Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <[email protected]>
+Date: Sun, 8 Feb 2026 19:12:30 -0500
+Subject: [PATCH] meson: use printf instead of echo
+
+The echo builtin provided by some shells (mksh) will interpret \x2d as
+an escape sequence. This causes meson to fail:
+
+```
+test/fuzz/meson.build:93:52: ERROR: File fuzz-unit-file/dm-back-slash.swap 
does not exist.
+```
+
+Bug: https://bugs.gentoo.org/969789
+---
+ test/fuzz/meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/test/fuzz/meson.build b/test/fuzz/meson.build
+index d4cfc0a5b4816..6f9f43a4105f9 100644
+--- a/test/fuzz/meson.build
++++ b/test/fuzz/meson.build
+@@ -42,7 +42,7 @@ if git.found() and fs.is_dir(meson.project_source_root() / 
'.git')
+                           'ls-files', ':/@0@/*/*'.format(fuzz_testsdir),
+                           check: true)
+ else
+-        out = run_command(sh, '-c', 'cd "@0@"; echo 
@1@/*/*'.format(meson.project_source_root(), fuzz_testsdir), check: true)
++        out = run_command(sh, '-c', 'cd "@0@"; printf "%s " 
@1@/*/*'.format(meson.project_source_root(), fuzz_testsdir), check: true)
+ endif
+ 
+ # Add crafted fuzz inputs we have in the repo

diff --git a/sys-apps/systemd/systemd-258.3.ebuild 
b/sys-apps/systemd/systemd-258.3.ebuild
index 80850b485a04..1d462d6ea413 100644
--- a/sys-apps/systemd/systemd-258.3.ebuild
+++ b/sys-apps/systemd/systemd-258.3.ebuild
@@ -280,6 +280,7 @@ src_prepare() {
        local PATCHES=(
                "${FILESDIR}/systemd-258-shared-add-missing-alloc-util.patch"
                "${FILESDIR}/systemd-258.3-kernel-install-test.patch"
+               "${FILESDIR}/systemd-259-test-echo.patch"
        )
 
        if ! use vanilla; then

diff --git a/sys-apps/systemd/systemd-259.1.ebuild 
b/sys-apps/systemd/systemd-259.1.ebuild
index cf5a19b01c58..73bcaf2ebbf2 100644
--- a/sys-apps/systemd/systemd-259.1.ebuild
+++ b/sys-apps/systemd/systemd-259.1.ebuild
@@ -279,6 +279,7 @@ src_unpack() {
 
 src_prepare() {
        local PATCHES=(
+               "${FILESDIR}/systemd-259-test-echo.patch"
        )
 
        if ! use vanilla; then

Reply via email to