Source: qemu
Severity: normal
Tags: patch
User: [email protected]
Usertags: shell ftbfs
X-Debbugs-Cc: [email protected]

When /bin/sh points to bash (instead of dash), the behavior of "echo"
differs in the rendering of "\n", and so the debian/rules target for
vof.bin fails to correctly create the config.mak.

The attached patch fixes this by switching to use printf, which appears
to behave consistently regardless of the shell (at least with my quick
testing).

Thanks for maintaining qemu!

live well,
  vagrant
From 18c9ac7af5cfad59ed06978baaf1e6a741accbd2 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <[email protected]>
Date: Fri, 14 Apr 2023 20:11:08 -0700
Subject: [PATCH] debian/rules: Use 'printf' instead of 'echo' to avoid
 differences in underlying /bin/sh implementations.

---
 debian/rules | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debian/rules b/debian/rules
index 28f258b8..c22fcefb 100755
--- a/debian/rules
+++ b/debian/rules
@@ -477,7 +477,7 @@ sysdata-components += skiboot
 build-vof: b/vof/vof.bin
 b/vof/vof.bin: | b
 	mkdir -p b/vof
-	echo 'CC=$${CROSS}gcc\nLD=$${CROSS}ld\nOBJCOPY=$${CROSS}objcopy\nEXTRA_CFLAGS=-m32 -mbig-endian' > b/vof/config.mak
+	printf 'CC=$${CROSS}gcc\nLD=$${CROSS}ld\nOBJCOPY=$${CROSS}objcopy\nEXTRA_CFLAGS=-m32 -mbig-endian' > b/vof/config.mak
 	${MAKE} -C b/vof CROSS=${PPC64_CROSSPFX} SRC_DIR=../../pc-bios/vof -f../../pc-bios/vof/Makefile
 install-vof: b/vof/vof.bin
 	install -m 0644 -t ${sysdataidir} $<
-- 
2.39.2

Attachment: signature.asc
Description: PGP signature

Reply via email to