From 73f0312aad182ac847f4c16b839683feb44d8162 Mon Sep 17 00:00:00 2001 From: Michael Tokarev Date: Mon, 9 May 2022 18:32:30 +0300 Subject: remove scripts-echo.c-fix-NUL-handling-in-abc-0-def.patch remove the fix for scripts/echo.c once we use /bin/echo for tests so scripts/echo.c is unused and not being built. --- debian/changelog | 2 - ...ipts-echo.c-fix-NUL-handling-in-abc-0-def.patch | 64 ---------------------- debian/patches/series | 1 - 3 files changed, 67 deletions(-) delete mode 100644 debian/patches/scripts-echo.c-fix-NUL-handling-in-abc-0-def.patch diff --git a/debian/changelog b/debian/changelog index 3aaa4c8af..bef1afbc8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -25,8 +25,6 @@ busybox (1:1.35.0-1) UNRELEASED; urgency=medium - Temporarily drop kFreeBSD patches pending rework. * Update busybox configurations for new upstream version * Don't run test suite in verbose mode: it's easier to read without. - * Add scripts-echo.c-fix-NUL-handling-in-abc-0-def.patch to work around a - test failure. [ Michael Tokarev ] * d/control: add myself to upladers diff --git a/debian/patches/scripts-echo.c-fix-NUL-handling-in-abc-0-def.patch b/debian/patches/scripts-echo.c-fix-NUL-handling-in-abc-0-def.patch deleted file mode 100644 index eb215e068..000000000 --- a/debian/patches/scripts-echo.c-fix-NUL-handling-in-abc-0-def.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 0fcc7f5f738e38766cde59ffd193643458c26cba Mon Sep 17 00:00:00 2001 -From: Denys Vlasenko -Date: Tue, 28 Dec 2021 21:05:59 +0100 -Subject: [PATCH] scripts/echo.c: fix NUL handling in "abc\0 def" - -Signed-off-by: Denys Vlasenko ---- - scripts/echo.c | 35 +++++++++++++++++++++-------------- - 1 file changed, 21 insertions(+), 14 deletions(-) - -diff --git a/scripts/echo.c b/scripts/echo.c -index 7474ccdd4dbe..e3a07adf0392 100644 ---- a/scripts/echo.c -+++ b/scripts/echo.c -@@ -153,25 +153,32 @@ int main(int argc, char **argv) - if (!eflag) { - /* optimization for very common case */ - fputs(arg, stdout); -- } else while ((c = *arg++)) { -- if (c == eflag) { /* Check for escape seq. */ -+ } else -+ while ((c = *arg++) != '\0') { -+ if (c == eflag) { -+ /* This is an "\x" sequence */ -+ - if (*arg == 'c') { -- /* '\c' means cancel newline and -+ /* "\c" means cancel newline and - * ignore all subsequent chars. */ - goto ret; - } -- { -- /* Since SUSv3 mandates a first digit of 0, 4-digit octals -- * of the form \0### are accepted. */ -- if (*arg == '0') { -- /* NB: don't turn "...\0" into "...\" */ -- if (arg[1] && ((unsigned char)(arg[1]) - '0') < 8) { -- arg++; -- } -+ /* Since SUSv3 mandates a first digit of 0, 4-digit octals -+ * of the form \0### are accepted. */ -+ if (*arg == '0') { -+ if ((unsigned char)(arg[1] - '0') < 8) { -+ /* 2nd char is 0..7: skip leading '0' */ -+ arg++; - } -- /* bb_process_escape_sequence handles NUL correctly -- * ("...\" case. */ -- c = bb_process_escape_sequence(&arg); -+ } -+ /* bb_process_escape_sequence handles NUL correctly -+ * ("...\" case). */ -+ { -+ /* optimization: don't force arg to be on-stack, -+ * use another variable for that. ~30 bytes win */ -+ const char *z = arg; -+ c = bb_process_escape_sequence(&z); -+ arg = z; - } - } - putchar(c); --- -2.34.1 - diff --git a/debian/patches/series b/debian/patches/series index e51b7417e..88296acca 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -10,5 +10,4 @@ stop-checking-ancient-kernel-version.patch revert-9c143ce52da11ec3d21a3491c3749841d3dc10f0.patch temp-deb-installer-hack.patch install-readlink-in-bin.patch -scripts-echo.c-fix-NUL-handling-in-abc-0-def.patch spelling.diff -- cgit v1.2.3