From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Fri, 09 May 2025 09:29:51 +0200 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uDIB5-003it0-0y for lore@lore.pengutronix.de; Fri, 09 May 2025 09:29:51 +0200 Received: from localhost ([127.0.0.1] helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1uDIB4-0000p1-Mh; Fri, 09 May 2025 09:29:50 +0200 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1uDI6b-0005uB-Il; Fri, 09 May 2025 09:25:13 +0200 Received: from dude05.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::54]) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uDI6b-001qrz-1E; Fri, 09 May 2025 09:25:13 +0200 Received: from mol by dude05.red.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1uDI6b-00BF5k-14; Fri, 09 May 2025 09:25:13 +0200 From: Michael Olbrich To: ptxdist@pengutronix.de Date: Fri, 9 May 2025 09:25:13 +0200 Message-Id: <20250509072513.2679613-1-m.olbrich@pengutronix.de> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250417091036.3758538-1-m.grzeschik@pengutronix.de> References: <20250417091036.3758538-1-m.grzeschik@pengutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Re: [ptxdist] [APPLIED] busybox: add lineedit patches X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Cc: Michael Grzeschik Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false Thanks, applied as bfa6f385e37b7ab1d939ad40248e4a58d3b507f5. Michael [sent from post-receive hook] On Fri, 09 May 2025 09:25:13 +0200, Michael Grzeschik wrote: > In busybox the tabcompletion was broken. With the recent patches this is > fixed. > > Signed-off-by: Michael Grzeschik > Message-Id: <20250417091036.3758538-1-m.grzeschik@pengutronix.de> > Signed-off-by: Michael Olbrich > > diff --git a/patches/busybox-1.37.0/0204-lineedit-fix-printing-lines-during-tab-completion.patch b/patches/busybox-1.37.0/0204-lineedit-fix-printing-lines-during-tab-completion.patch > new file mode 100644 > index 000000000000..d9864d8d79c0 > --- /dev/null > +++ b/patches/busybox-1.37.0/0204-lineedit-fix-printing-lines-during-tab-completion.patch > @@ -0,0 +1,37 @@ > +From c443f2d2c67b5e5080632819980799c55b7bb89f Mon Sep 17 00:00:00 2001 > +From: Ahmad Fatoum > +Date: Thu, 17 Apr 2025 11:00:43 +0200 > +Subject: [PATCH 1/2] lineedit: fix printing lines during tab completion > + > +Indentation and escape characters are all output to stderr now, but the > +matches themself remained on stdout leading to garbled output on Tab > +completion. > + > +Print the results to stderr as well to fix this. > + > +Fixes: fd47f056765a ("lineedit: print prompt and editing operations to stderr") > +Signed-off-by: Ahmad Fatoum > +--- > + libbb/lineedit.c | 5 +++-- > + 1 file changed, 3 insertions(+), 2 deletions(-) > + > +diff --git a/libbb/lineedit.c b/libbb/lineedit.c > +index 543a3f11c3e4..1f4b011008b6 100644 > +--- a/libbb/lineedit.c > ++++ b/libbb/lineedit.c > +@@ -1170,9 +1170,10 @@ static void showfiles(void) > + ); > + } > + if (ENABLE_UNICODE_SUPPORT) > +- puts(printable_string(matches[n])); > ++ fputs(printable_string(matches[n]), stderr); > + else > +- puts(matches[n]); > ++ fputs(matches[n], stderr); > ++ bb_putchar_stderr('\n'); > + } > + } > + > +-- > +2.39.5 > + > diff --git a/patches/busybox-1.37.0/0205-lineedit-fix-left-over-print-to-stdout.patch b/patches/busybox-1.37.0/0205-lineedit-fix-left-over-print-to-stdout.patch > new file mode 100644 > index 000000000000..6c0d00e18b59 > --- /dev/null > +++ b/patches/busybox-1.37.0/0205-lineedit-fix-left-over-print-to-stdout.patch > @@ -0,0 +1,33 @@ > +From 40a8532dea18363fb67466e1b02651cc964017e8 Mon Sep 17 00:00:00 2001 > +From: Ahmad Fatoum > +Date: Thu, 17 Apr 2025 11:00:43 +0200 > +Subject: [PATCH 2/2] lineedit: fix left-over print to stdout > + > +There's code printing to stderr both before and after the single call to > +puts inside put_cur_glyph_and_inc_cursor(). > + > +This is likely an oversight as we want everything to go through the > +same file descriptor, so switch it over to fputs. > + > +Fixes: fd47f056765a ("lineedit: print prompt and editing operations to stderr") > +Signed-off-by: Ahmad Fatoum > +--- > + libbb/lineedit.c | 2 +- > + 1 file changed, 1 insertion(+), 1 deletion(-) > + > +diff --git a/libbb/lineedit.c b/libbb/lineedit.c > +index 1f4b011008b6..206fc36ef5c0 100644 > +--- a/libbb/lineedit.c > ++++ b/libbb/lineedit.c > +@@ -451,7 +451,7 @@ static void put_cur_glyph_and_inc_cursor(void) > + * have automargin (IOW: it is moving cursor to next line > + * by itself (which is wrong for VT-10x terminals)), > + * this will break things: there will be one extra empty line */ > +- puts("\r"); /* + implicit '\n' */ > ++ fputs("\r\n", stderr); > + #else > + /* VT-10x terminals don't wrap cursor to next line when last char > + * on the line is printed - cursor stays "over" this char. > +-- > +2.39.5 > + > diff --git a/patches/busybox-1.37.0/series b/patches/busybox-1.37.0/series > index 87fee50916c0..f403c5683e27 100644 > --- a/patches/busybox-1.37.0/series > +++ b/patches/busybox-1.37.0/series > @@ -7,4 +7,6 @@ > 0201-build-system-only-pass-real-libs-to-SELINUX_LIBS.patch > 0202-scripts-trylink-honour-SKIP_STRIP-and-don-t-strip-if.patch > 0203-tc-Fix-compilation-with-Linux-v6.8-rc1.patch > -# e781b8c6838e27fd021f9c1a9f87654d - git-ptx-patches magic > +0204-lineedit-fix-printing-lines-during-tab-completion.patch > +0205-lineedit-fix-left-over-print-to-stdout.patch > +# de06cc1132910215a67ae025e9b0aaa9 - git-ptx-patches magic