File: ftbfs-printf-string-error-in-info-target.patch

package info (click to toggle)
btop 1.4.6-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,056 kB
  • sloc: cpp: 29,113; ansic: 5,333; makefile: 350
file content (39 lines) | stat: -rw-r--r-- 1,843 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
From: =?utf-8?b?T3R0byBLZWvDpGzDpGluZW4=?= <otto@debian.org>
Date: Wed, 11 Feb 2026 15:57:44 +0000
Subject: Fix printf format string error in info target

The build fails on Launchpad because the Makefile's info target uses
`printf` with unescaped `%` characters from the OLDCXX and OLDLD
variables. These are interpreted as invalid format specifiers.

Change the printf calls to use `%s` format specifiers for the variables
instead of embedding them directly in the format string.

Fixes:

    DGPU_SUPPORT
    CXXFLAGS     | (REQFLAGS...
    /bin/sh: 13: printf: %7B: invalid directive
    LDFLAGS      | (LDCXXFLAGS...
    make[1]: *** [Makefile:229: info] Error 2

Forwarded: not yet, should be
---
 Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index d08a4ac..1ff3a41 100755
--- a/Makefile
+++ b/Makefile
@@ -237,8 +237,8 @@ info:
 	@printf "\033[1;91mWARNFLAGS    \033[1;94m:| \033[0m$(WARNFLAGS)\n"
 	@printf "\033[1;94mOPTFLAGS     \033[1;94m:| \033[0m$(OPTFLAGS)\n"
 	@printf "\033[1;93mLDCXXFLAGS   \033[1;94m:| \033[0m$(LDCXXFLAGS)\n"
-	@printf "\033[1;95mCXXFLAGS     \033[1;92m+| \033[0;37m\$$(\033[92mREQFLAGS\033[37m) \$$(\033[93mLDCXXFLAGS\033[37m) \$$(\033[94mOPTFLAGS\033[37m) \$$(\033[91mWARNFLAGS\033[37m) $(OLDCXX)\n"
-	@printf "\033[1;95mLDFLAGS      \033[1;92m+| \033[0;37m\$$(\033[93mLDCXXFLAGS\033[37m) \$$(\033[94mOPTFLAGS\033[37m) \$$(\033[91mWARNFLAGS\033[37m) $(OLDLD)\n"
+	@printf "\033[1;95mCXXFLAGS     \033[1;92m+| \033[0;37m\$$(\033[92mREQFLAGS\033[37m) \$$(\033[93mLDCXXFLAGS\033[37m) \$$(\033[94mOPTFLAGS\033[37m) \$$(\033[91mWARNFLAGS\033[37m) %s\n" "$(OLDCXX)"
+	@printf "\033[1;95mLDFLAGS      \033[1;92m+| \033[0;37m\$$(\033[93mLDCXXFLAGS\033[37m) \$$(\033[94mOPTFLAGS\033[37m) \$$(\033[91mWARNFLAGS\033[37m) %s\n" "$(OLDLD)"
 else
 info:
 	 @true