From 4c39169a6b852bf72771f0958bd54eaf294698b1 Mon Sep 17 00:00:00 2001 From: Thomas Devoogdt Date: Fri, 4 Oct 2024 11:26:22 +0200 Subject: [PATCH] package/busybox: bump to 1.37.0 Notes: https://www.busybox.net/ The patches are rebased, and one patch has been added: 0007-libbb-sha-add-missing-sha-NI-guard.patch. Signed-off-by: Thomas Devoogdt --- ...route-use-linux-if_packet.h-instead-.patch | 10 +- ...trip-non-l-arguments-returned-by-pkg.patch | 15 ++- ...tr-ensure-only-printable-characters-.patch | 4 +- ...e-all-printed-strings-with-printable.patch | 16 +-- ...r-glibc-2.24-not-providing-getrandom.patch | 39 ------- ...random-detection-for-non-glibc-libc.patch} | 30 +---- ...failing-saying-ncurses-is-not-found.patch} | 16 +-- ...glibc-2.24-not-providing-random-head.patch | 60 ---------- ...sha1-on-x86-if-CONFIG_SHA1_HWACCEL-y.patch | 36 ++++++ ...CH-and-SIGCHLD-in-hush-interrupting-.patch | 103 ------------------ ...Fix-compilation-with-Linux-v6.8-rc1.patch} | 4 +- ...route-iplink.c-fix-support-for-older.patch | 62 +++++++++++ package/busybox/busybox.hash | 4 +- package/busybox/busybox.mk | 2 +- 14 files changed, 139 insertions(+), 262 deletions(-) delete mode 100644 package/busybox/0005-seedrng-fix-for-glibc-2.24-not-providing-getrandom.patch rename package/busybox/{0007-seedrng-fix-getrandom-detection-for-non-glibc-libc.patch => 0005-seedrng-fix-getrandom-detection-for-non-glibc-libc.patch} (81%) rename package/busybox/{0009-menuconfig-gcc-failing-saying-ncurses-is-not-found.patch => 0006-menuconfig-GCC-failing-saying-ncurses-is-not-found.patch} (82%) delete mode 100644 package/busybox/0006-seedrng-fix-for-glibc-2.24-not-providing-random-head.patch create mode 100644 package/busybox/0007-libbb-fix-sha1-on-x86-if-CONFIG_SHA1_HWACCEL-y.patch delete mode 100644 package/busybox/0008-shell-fix-SIGWINCH-and-SIGCHLD-in-hush-interrupting-.patch rename package/busybox/{0010-Linux-v6.8-rc1-removed-the-definitions-related-to-CB.patch => 0008-tc-Fix-compilation-with-Linux-v6.8-rc1.patch} (96%) create mode 100644 package/busybox/0009-networking-libiproute-iplink.c-fix-support-for-older.patch diff --git a/package/busybox/0001-networking-libiproute-use-linux-if_packet.h-instead-.patch b/package/busybox/0001-networking-libiproute-use-linux-if_packet.h-instead-.patch index 9b5eaf89bd9..2e6732b8ab7 100644 --- a/package/busybox/0001-networking-libiproute-use-linux-if_packet.h-instead-.patch +++ b/package/busybox/0001-networking-libiproute-use-linux-if_packet.h-instead-.patch @@ -1,4 +1,4 @@ -From 60da1d0763224698008d847eb8ad8d4d8c6f54ff Mon Sep 17 00:00:00 2001 +From d4a7311078cd5509d48ba13ead1abb885a6a6744 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Sat, 5 Oct 2013 15:55:06 +0200 Subject: [PATCH] networking/libiproute: use instead of @@ -20,7 +20,7 @@ Signed-off-by: Petr Vorel 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/networking/libiproute/iplink.c b/networking/libiproute/iplink.c -index 1a1064bdc..a4c3ad307 100644 +index 37ed114bc..bc526d89c 100644 --- a/networking/libiproute/iplink.c +++ b/networking/libiproute/iplink.c @@ -7,7 +7,7 @@ @@ -30,8 +30,8 @@ index 1a1064bdc..a4c3ad307 100644 -#include +#include #include - + #include --- -2.33.0 +-- +2.43.0 diff --git a/package/busybox/0002-Makefile.flags-strip-non-l-arguments-returned-by-pkg.patch b/package/busybox/0002-Makefile.flags-strip-non-l-arguments-returned-by-pkg.patch index 3a94241043e..157c47aab59 100644 --- a/package/busybox/0002-Makefile.flags-strip-non-l-arguments-returned-by-pkg.patch +++ b/package/busybox/0002-Makefile.flags-strip-non-l-arguments-returned-by-pkg.patch @@ -1,8 +1,7 @@ -From 59daea82e7b5abcdb42a4f97a0109f14d5a774ea Mon Sep 17 00:00:00 2001 +From cb080be5d14b2f240d964678315c292cbd936496 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Mon, 25 Nov 2013 22:51:53 +0100 -Subject: [PATCH] Makefile.flags: strip non -l arguments returned by - pkg-config +Subject: [PATCH] Makefile.flags: strip non -l arguments returned by pkg-config Signed-off-by: Thomas Petazzoni [yann.morin.1998@free.fr: refresh for 1.29.0] @@ -14,10 +13,10 @@ Signed-off-by: Petr Vorel 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile.flags b/Makefile.flags -index 667481983..88d76efec 100644 +index 97cb4dca2..92a9063d9 100644 --- a/Makefile.flags +++ b/Makefile.flags -@@ -180,7 +180,9 @@ ifeq ($(CONFIG_SELINUX),y) +@@ -181,7 +181,9 @@ ifeq ($(CONFIG_SELINUX),y) SELINUX_PC_MODULES = libselinux libsepol $(eval $(call pkg_check_modules,SELINUX,$(SELINUX_PC_MODULES))) CPPFLAGS += $(SELINUX_CFLAGS) @@ -26,8 +25,8 @@ index 667481983..88d76efec 100644 + $(patsubst -l%,%,$(filter -l%,$(SELINUX_LIBS))),\ + $(SELINUX_PC_MODULES:lib%=%)) endif - + ifeq ($(CONFIG_FEATURE_NSLOOKUP_BIG),y) --- -2.33.0 +-- +2.43.0 diff --git a/package/busybox/0003-libbb-sockaddr2str-ensure-only-printable-characters-.patch b/package/busybox/0003-libbb-sockaddr2str-ensure-only-printable-characters-.patch index 623b2597a20..b4431080fd1 100644 --- a/package/busybox/0003-libbb-sockaddr2str-ensure-only-printable-characters-.patch +++ b/package/busybox/0003-libbb-sockaddr2str-ensure-only-printable-characters-.patch @@ -1,4 +1,4 @@ -From 9d825e854ef53ebbe0aea2f1a69f52b763104daf Mon Sep 17 00:00:00 2001 +From 444bb9dded67070756995c0704c4638ee5af61a0 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Mon, 19 Sep 2022 14:15:12 +0200 Subject: [PATCH] libbb: sockaddr2str: ensure only printable characters are @@ -38,5 +38,5 @@ index 0e0b247b8..02c061e67 100644 } -- -2.37.3 +2.43.0 diff --git a/package/busybox/0004-nslookup-sanitize-all-printed-strings-with-printable.patch b/package/busybox/0004-nslookup-sanitize-all-printed-strings-with-printable.patch index bfa58465e73..5dc91fcfcd7 100644 --- a/package/busybox/0004-nslookup-sanitize-all-printed-strings-with-printable.patch +++ b/package/busybox/0004-nslookup-sanitize-all-printed-strings-with-printable.patch @@ -1,4 +1,4 @@ -From bd463a5564a2c0618317448c3f965d389534c3df Mon Sep 17 00:00:00 2001 +From 25a36f28f0a9207586ca9690238d760581db6452 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Mon, 19 Sep 2022 14:15:12 +0200 Subject: [PATCH] nslookup: sanitize all printed strings with printable_string @@ -16,10 +16,10 @@ Signed-off-by: Quentin Schulz 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/networking/nslookup.c b/networking/nslookup.c -index 6da97baf4..4bdcde1b8 100644 +index b67d354f7..79412477c 100644 --- a/networking/nslookup.c +++ b/networking/nslookup.c -@@ -407,7 +407,7 @@ static NOINLINE int parse_reply(const unsigned char *msg, size_t len) +@@ -784,7 +784,7 @@ static NOINLINE int parse_reply(const unsigned char *msg, size_t len) //printf("Unable to uncompress domain: %s\n", strerror(errno)); return -1; } @@ -28,7 +28,7 @@ index 6da97baf4..4bdcde1b8 100644 break; case ns_t_mx: -@@ -422,7 +422,7 @@ static NOINLINE int parse_reply(const unsigned char *msg, size_t len) +@@ -799,7 +799,7 @@ static NOINLINE int parse_reply(const unsigned char *msg, size_t len) //printf("Cannot uncompress MX domain: %s\n", strerror(errno)); return -1; } @@ -37,7 +37,7 @@ index 6da97baf4..4bdcde1b8 100644 break; case ns_t_txt: -@@ -434,7 +434,7 @@ static NOINLINE int parse_reply(const unsigned char *msg, size_t len) +@@ -811,7 +811,7 @@ static NOINLINE int parse_reply(const unsigned char *msg, size_t len) if (n > 0) { memset(dname, 0, sizeof(dname)); memcpy(dname, ns_rr_rdata(rr) + 1, n); @@ -46,7 +46,7 @@ index 6da97baf4..4bdcde1b8 100644 } break; -@@ -454,7 +454,7 @@ static NOINLINE int parse_reply(const unsigned char *msg, size_t len) +@@ -831,7 +831,7 @@ static NOINLINE int parse_reply(const unsigned char *msg, size_t len) } printf("%s\tservice = %u %u %u %s\n", ns_rr_name(rr), @@ -55,7 +55,7 @@ index 6da97baf4..4bdcde1b8 100644 break; case ns_t_soa: -@@ -483,7 +483,7 @@ static NOINLINE int parse_reply(const unsigned char *msg, size_t len) +@@ -860,7 +860,7 @@ static NOINLINE int parse_reply(const unsigned char *msg, size_t len) return -1; } @@ -65,5 +65,5 @@ index 6da97baf4..4bdcde1b8 100644 printf("\tserial = %lu\n", ns_get32(cp)); -- -2.37.3 +2.43.0 diff --git a/package/busybox/0005-seedrng-fix-for-glibc-2.24-not-providing-getrandom.patch b/package/busybox/0005-seedrng-fix-for-glibc-2.24-not-providing-getrandom.patch deleted file mode 100644 index 4a194612b46..00000000000 --- a/package/busybox/0005-seedrng-fix-for-glibc-2.24-not-providing-getrandom.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 200a9669fbf6f06894e4243cccc9fc11a1a6073a Mon Sep 17 00:00:00 2001 -From: Denys Vlasenko -Date: Mon, 10 Apr 2023 17:26:04 +0200 -Subject: [PATCH] seedrng: fix for glibc <= 2.24 not providing getrandom() - -Signed-off-by: Denys Vlasenko -Upstream: https://git.busybox.net/busybox/commit/?id=200a9669fbf6f06894e4243cccc9fc11a1a6073a ---- - miscutils/seedrng.c | 14 ++++++++++++++ - 1 file changed, 14 insertions(+) - -diff --git a/miscutils/seedrng.c b/miscutils/seedrng.c -index 967741dc7..7cc855141 100644 ---- a/miscutils/seedrng.c -+++ b/miscutils/seedrng.c -@@ -45,6 +45,20 @@ - #include - #include - -+/* Fix up glibc <= 2.24 not having getrandom() */ -+#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ <= 24 -+#include -+# define getrandom(...) bb_getrandom(__VA_ARGS__) -+static ssize_t getrandom(void *buffer, size_t length, unsigned flags) -+{ -+# if defined(__NR_getrandom) -+ return syscall(__NR_getrandom, buffer, length, flags); -+# else -+ return ENOSYS; -+# endif -+} -+#endif -+ - #ifndef GRND_INSECURE - #define GRND_INSECURE 0x0004 /* Apparently some headers don't ship with this yet. */ - #endif --- -2.39.1 - diff --git a/package/busybox/0007-seedrng-fix-getrandom-detection-for-non-glibc-libc.patch b/package/busybox/0005-seedrng-fix-getrandom-detection-for-non-glibc-libc.patch similarity index 81% rename from package/busybox/0007-seedrng-fix-getrandom-detection-for-non-glibc-libc.patch rename to package/busybox/0005-seedrng-fix-getrandom-detection-for-non-glibc-libc.patch index 140b27cae67..caf345ae276 100644 --- a/package/busybox/0007-seedrng-fix-getrandom-detection-for-non-glibc-libc.patch +++ b/package/busybox/0005-seedrng-fix-getrandom-detection-for-non-glibc-libc.patch @@ -1,7 +1,7 @@ -From b2d26d449ec855602b9a88f58c2eb675de0224f2 Mon Sep 17 00:00:00 2001 +From 933957dca6592f0b701151bdac72a651dbe8a54b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20M=C3=A9lotte?= Date: Tue, 18 Apr 2023 15:54:43 +0200 -Subject: [PATCH v4] seedrng: fix getrandom() detection for non-glibc libc +Subject: [PATCH] seedrng: fix getrandom() detection for non-glibc libc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -48,33 +48,15 @@ This should fix compiling with many libc/kernel combinations. Signed-off-by: Raphaël Mélotte Upstream: http://lists.busybox.net/pipermail/busybox/2023-May/090317.html --- -Changes v3 -> v4: - - use a variable for '#' for compatibility with GNU make 4.2.1 and earlier. - -Changes v2 -> v3: - - fix _GNU_SOURCE define location - -Changes v1 -> v2: - - move _GNU_SOURCE to bb_libtest.c - - remove GRND_NONBLOCK - -Note that I was not able to test every single combination, but I could -confirm it builds successfully for: -uClibc 10.0.24, linux headers 3.10 (libc getrandom NOT used) -uClibc 1.0.36, linux headers 4.9 (libc getrandom used) -musl 1.1.16, linux headers 4.12 (libc getrandom NOT used) -musl 1.2.1, linux headers (libc getrandom used) -glibc 2.25, linux headers 4.10 (libc getrandom used) - Makefile.flags | 12 ++++++++++++ miscutils/seedrng.c | 8 ++++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/Makefile.flags b/Makefile.flags -index 1cec5ba20..0d437303a 100644 +index 92a9063d9..c8f601308 100644 --- a/Makefile.flags +++ b/Makefile.flags -@@ -161,6 +161,18 @@ ifeq ($(RT_AVAILABLE),y) +@@ -162,6 +162,18 @@ ifeq ($(RT_AVAILABLE),y) LDLIBS += rt endif @@ -94,7 +76,7 @@ index 1cec5ba20..0d437303a 100644 # On some platforms that requires an explicit -lpthread, -ldl, -laudit. # However, on *other platforms* it fails when some of those flags diff --git a/miscutils/seedrng.c b/miscutils/seedrng.c -index 3bf6e2ea7..2f1e18c32 100644 +index 7a2331cb1..ba98f4d19 100644 --- a/miscutils/seedrng.c +++ b/miscutils/seedrng.c @@ -44,8 +44,10 @@ @@ -120,5 +102,5 @@ index 3bf6e2ea7..2f1e18c32 100644 /* Apparently some headers don't ship with this yet. */ -- -2.39.1 +2.43.0 diff --git a/package/busybox/0009-menuconfig-gcc-failing-saying-ncurses-is-not-found.patch b/package/busybox/0006-menuconfig-GCC-failing-saying-ncurses-is-not-found.patch similarity index 82% rename from package/busybox/0009-menuconfig-gcc-failing-saying-ncurses-is-not-found.patch rename to package/busybox/0006-menuconfig-GCC-failing-saying-ncurses-is-not-found.patch index 4651d8c2c91..bf175d52c79 100644 --- a/package/busybox/0009-menuconfig-gcc-failing-saying-ncurses-is-not-found.patch +++ b/package/busybox/0006-menuconfig-GCC-failing-saying-ncurses-is-not-found.patch @@ -1,5 +1,5 @@ -From ctxnop@gmail.com Sun Jul 21 12:10:52 2024 -From: ctxnop@gmail.com (Nop) +From e3bec255f30720e1541a97560361c706ccb91d6e Mon Sep 17 00:00:00 2001 +From: Nop Date: Sun, 21 Jul 2024 14:10:52 +0200 Subject: [PATCH] menuconfig: GCC failing saying ncurses is not found @@ -17,13 +17,12 @@ Signed-off-by: Fiona Klute (WIWA) scripts/kconfig/lxdialog/check-lxdialog.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -diff --git a/scripts/kconfig/lxdialog/check-lxdialog.sh -b/scripts/kconfig/lxdialog/check-lxdialog.sh -index 5075ebf2d..c644d1d48 100755 +diff --git a/scripts/kconfig/lxdialog/check-lxdialog.sh b/scripts/kconfig/lxdialog/check-lxdialog.sh +index 5075ebf2d..08e4da3de 100755 --- a/scripts/kconfig/lxdialog/check-lxdialog.sh +++ b/scripts/kconfig/lxdialog/check-lxdialog.sh @@ -45,9 +45,9 @@ trap "rm -f $tmp" 0 1 2 3 15 - + # Check if we can link to ncurses check() { - $cc -x c - -o $tmp 2>/dev/null <<'EOF' @@ -34,5 +33,6 @@ index 5075ebf2d..c644d1d48 100755 EOF if [ $? != 0 ]; then echo " *** Unable to find the ncurses libraries or the" 1>&2 --- -2.45.2 +-- +2.43.0 + diff --git a/package/busybox/0006-seedrng-fix-for-glibc-2.24-not-providing-random-head.patch b/package/busybox/0006-seedrng-fix-for-glibc-2.24-not-providing-random-head.patch deleted file mode 100644 index d7298848056..00000000000 --- a/package/busybox/0006-seedrng-fix-for-glibc-2.24-not-providing-random-head.patch +++ /dev/null @@ -1,60 +0,0 @@ -From cb57abb46f06f4ede8d9ccbdaac67377fdf416cf Mon Sep 17 00:00:00 2001 -From: Thomas Devoogdt -Date: Mon, 10 Apr 2023 19:58:15 +0200 -Subject: [PATCH] seedrng: fix for glibc <= 2.24 not providing random header - - - dropped the wrong define (not sure why it was there) - - not available if glibc <= 2.24 - - GRND_NONBLOCK not defined if not included - - ret < 0 && errno == ENOSYS has to be true to get creditable set - -Signed-off-by: Thomas Devoogdt -Signed-off-by: Denys Vlasenko -Upstream: https://git.busybox.net/busybox/commit/?id=cb57abb46f06f4ede8d9ccbdaac67377fdf416cf ---- - miscutils/seedrng.c | 14 ++++++++++---- - 1 file changed, 10 insertions(+), 4 deletions(-) - -diff --git a/miscutils/seedrng.c b/miscutils/seedrng.c -index 7cc855141..3bf6e2ea7 100644 ---- a/miscutils/seedrng.c -+++ b/miscutils/seedrng.c -@@ -42,25 +42,31 @@ - #include "libbb.h" - - #include --#include - #include - - /* Fix up glibc <= 2.24 not having getrandom() */ - #if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ <= 24 - #include --# define getrandom(...) bb_getrandom(__VA_ARGS__) - static ssize_t getrandom(void *buffer, size_t length, unsigned flags) - { - # if defined(__NR_getrandom) - return syscall(__NR_getrandom, buffer, length, flags); - # else -- return ENOSYS; -+ errno = ENOSYS; -+ return -1; - # endif - } -+#else -+#include -+#endif -+ -+/* Apparently some headers don't ship with this yet. */ -+#ifndef GRND_NONBLOCK -+#define GRND_NONBLOCK 0x0001 - #endif - - #ifndef GRND_INSECURE --#define GRND_INSECURE 0x0004 /* Apparently some headers don't ship with this yet. */ -+#define GRND_INSECURE 0x0004 - #endif - - #define DEFAULT_SEED_DIR "/var/lib/seedrng" --- -2.39.1 - diff --git a/package/busybox/0007-libbb-fix-sha1-on-x86-if-CONFIG_SHA1_HWACCEL-y.patch b/package/busybox/0007-libbb-fix-sha1-on-x86-if-CONFIG_SHA1_HWACCEL-y.patch new file mode 100644 index 00000000000..147ce20837c --- /dev/null +++ b/package/busybox/0007-libbb-fix-sha1-on-x86-if-CONFIG_SHA1_HWACCEL-y.patch @@ -0,0 +1,36 @@ +From 152606e9787dc8fbc693e3368b4264a136e61031 Mon Sep 17 00:00:00 2001 +From: Rudi Heitbaum +Date: Sun, 29 Sep 2024 17:57:55 +0000 +Subject: [PATCH] libbb: fix sha1 on !x86 if CONFIG_SHA1_HWACCEL=y + +fixes non i386 and x86 builds + +libbb/hash_md5_sha.c: In function 'sha1_end': +libbb/hash_md5_sha.c:1316:35: error: 'sha1_process_block64_shaNI' undeclared + 1316 | || ctx->process_block == sha1_process_block64_shaNI + +Signed-off-by: Rudi Heitbaum +Signed-off-by: Denys Vlasenko +Upstream: https://git.busybox.net/busybox/commit/?id=bf57f732a5b6842f6fa3e0f90385f039e5d6a92c +Signed-off-by: Thomas Devoogdt +--- + libbb/hash_md5_sha.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/libbb/hash_md5_sha.c b/libbb/hash_md5_sha.c +index 57a801459..75a61c32c 100644 +--- a/libbb/hash_md5_sha.c ++++ b/libbb/hash_md5_sha.c +@@ -1313,7 +1313,9 @@ unsigned FAST_FUNC sha1_end(sha1_ctx_t *ctx, void *resbuf) + hash_size = 8; + if (ctx->process_block == sha1_process_block64 + #if ENABLE_SHA1_HWACCEL ++# if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) + || ctx->process_block == sha1_process_block64_shaNI ++# endif + #endif + ) { + hash_size = 5; +-- +2.43.0 + diff --git a/package/busybox/0008-shell-fix-SIGWINCH-and-SIGCHLD-in-hush-interrupting-.patch b/package/busybox/0008-shell-fix-SIGWINCH-and-SIGCHLD-in-hush-interrupting-.patch deleted file mode 100644 index 8ebb487ec6d..00000000000 --- a/package/busybox/0008-shell-fix-SIGWINCH-and-SIGCHLD-in-hush-interrupting-.patch +++ /dev/null @@ -1,103 +0,0 @@ -From 93e0898c663a533082b5f3c2e7dcce93ec47076d Mon Sep 17 00:00:00 2001 -From: Denys Vlasenko -Date: Thu, 26 Jan 2023 12:56:33 +0100 -Subject: [PATCH] shell: fix SIGWINCH and SIGCHLD (in hush) interrupting line - input, closes 15256 - -function old new delta -record_pending_signo 32 63 +31 -lineedit_read_key 231 224 -7 ------------------------------------------------------------------------------- -(add/remove: 0/0 grow/shrink: 1/1 up/down: 31/-7) Total: 24 bytes - -Signed-off-by: Denys Vlasenko -Upstream: https://git.busybox.net/busybox/commit/?id=93e0898c663a533082b5f3c2e7dcce93ec47076d -Signed-off-by: Romain Naour ---- - libbb/lineedit.c | 17 ++++++++++------- - shell/ash.c | 3 ++- - shell/hush.c | 10 ++++++++-- - 3 files changed, 20 insertions(+), 10 deletions(-) - -diff --git a/libbb/lineedit.c b/libbb/lineedit.c -index d6b2e76ff..b942f540a 100644 ---- a/libbb/lineedit.c -+++ b/libbb/lineedit.c -@@ -2180,7 +2180,8 @@ static int lineedit_read_key(char *read_key_buffer, int timeout) - * "\xff\n",pause,"ls\n" invalid and thus won't lose "ls". - * - * If LI_INTERRUPTIBLE, return -1 if got EINTR in poll() -- * inside read_key, or if bb_got_signal != 0 (IOW: if signal -+ * inside read_key and bb_got_signal became != 0, -+ * or if bb_got_signal != 0 (IOW: if signal - * arrived before poll() is reached). - * - * Note: read_key sets errno to 0 on success. -@@ -2197,14 +2198,16 @@ static int lineedit_read_key(char *read_key_buffer, int timeout) - IF_FEATURE_EDITING_WINCH(S.ok_to_redraw = 0;) - if (errno != EINTR) - break; -+ /* It was EINTR. Repeat read_key() unless... */ - if (state->flags & LI_INTERRUPTIBLE) { -- /* LI_INTERRUPTIBLE bails out on EINTR, -- * but nothing really guarantees that bb_got_signal -- * is nonzero. Follow the least surprise principle: -+ /* LI_INTERRUPTIBLE bails out on EINTR -+ * if bb_got_signal became nonzero. -+ * (It may stay zero: for example, our SIGWINCH -+ * handler does not set it. This is used for signals -+ * which should not interrupt line editing). - */ -- if (bb_got_signal == 0) -- bb_got_signal = 255; -- goto ret; -+ if (bb_got_signal != 0) -+ goto ret; /* will return -1 */ - } - } - -diff --git a/shell/ash.c b/shell/ash.c -index 18ccc1329..5f8c8ea19 100644 ---- a/shell/ash.c -+++ b/shell/ash.c -@@ -10821,7 +10821,8 @@ preadfd(void) - again: - /* For shell, LI_INTERRUPTIBLE is set: - * read_line_input will abort on either -- * getting EINTR in poll(), or if it sees bb_got_signal != 0 -+ * getting EINTR in poll() and bb_got_signal became != 0, -+ * or if it sees bb_got_signal != 0 - * (IOW: if signal arrives before poll() is reached). - * Interactive testcases: - * (while kill -INT $$; do sleep 1; done) & -diff --git a/shell/hush.c b/shell/hush.c -index d111f0cc5..f064b8fd2 100644 ---- a/shell/hush.c -+++ b/shell/hush.c -@@ -1946,7 +1946,12 @@ static void record_pending_signo(int sig) - { - sigaddset(&G.pending_set, sig); - #if ENABLE_FEATURE_EDITING -- bb_got_signal = sig; /* for read_line_input: "we got a signal" */ -+ if (sig != SIGCHLD -+ || (G_traps && G_traps[SIGCHLD] && G_traps[SIGCHLD][0]) -+ /* ^^^ if SIGCHLD, interrupt line reading only if it has a trap */ -+ ) { -+ bb_got_signal = sig; /* for read_line_input: "we got a signal" */ -+ } - #endif - #if ENABLE_HUSH_FAST - if (sig == SIGCHLD) { -@@ -2669,7 +2674,8 @@ static int get_user_input(struct in_str *i) - } else { - /* For shell, LI_INTERRUPTIBLE is set: - * read_line_input will abort on either -- * getting EINTR in poll(), or if it sees bb_got_signal != 0 -+ * getting EINTR in poll() and bb_got_signal became != 0, -+ * or if it sees bb_got_signal != 0 - * (IOW: if signal arrives before poll() is reached). - * Interactive testcases: - * (while kill -INT $$; do sleep 1; done) & --- -2.30.2 - diff --git a/package/busybox/0010-Linux-v6.8-rc1-removed-the-definitions-related-to-CB.patch b/package/busybox/0008-tc-Fix-compilation-with-Linux-v6.8-rc1.patch similarity index 96% rename from package/busybox/0010-Linux-v6.8-rc1-removed-the-definitions-related-to-CB.patch rename to package/busybox/0008-tc-Fix-compilation-with-Linux-v6.8-rc1.patch index d997f00e82e..b4bd9a95de0 100644 --- a/package/busybox/0010-Linux-v6.8-rc1-removed-the-definitions-related-to-CB.patch +++ b/package/busybox/0008-tc-Fix-compilation-with-Linux-v6.8-rc1.patch @@ -1,4 +1,4 @@ -From c4f93565acf3718111cdbaea15e1a8aacf2f44cf Mon Sep 17 00:00:00 2001 +From 2534370784acab96318d26926f990c042214224e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Mon, 23 Sep 2024 18:56:00 +0200 Subject: [PATCH] tc: Fix compilation with Linux v6.8-rc1 @@ -66,5 +66,5 @@ index 3a79fd2d9..d08fd1359 100644 /* don't know how to print options for this class */ printf("(options for %s)", name); -- -2.39.5 +2.43.0 diff --git a/package/busybox/0009-networking-libiproute-iplink.c-fix-support-for-older.patch b/package/busybox/0009-networking-libiproute-iplink.c-fix-support-for-older.patch new file mode 100644 index 00000000000..6cec82b1a0c --- /dev/null +++ b/package/busybox/0009-networking-libiproute-iplink.c-fix-support-for-older.patch @@ -0,0 +1,62 @@ +From 39880b16b3eaf97fe6c494bf79aec9043a4ef6fc Mon Sep 17 00:00:00 2001 +From: Thomas Devoogdt +Date: Fri, 4 Oct 2024 15:32:55 +0200 +Subject: [PATCH] networking/libiproute/iplink.c: fix support for older kernels + +- The CAN netlink interface has been added in Linux v2.6.31 with only 3 options [1]: + + CAN_CTRLMODE_LOOPBACK 0x1 /* Loopback mode */ + CAN_CTRLMODE_LISTENONLY 0x2 /* Listen-only mode */ + CAN_CTRLMODE_3_SAMPLES 0x4 /* Triple sampling mode */ + + So define the other options. + +- IFLA_CAN_TERMINATION has been added in Linux 4.11 [2], + define it for older kernels. + +[1] https://github.com/torvalds/linux/blob/v2.6.31/include/linux/can/netlink.h#L80-L82 +[2] https://github.com/torvalds/linux/commit/12a6075cabc0d9ffbc0366b44daa22f278606312 + +Signed-off-by: Thomas Devoogdt +Signed-off-by: Denys Vlasenko +Upstream: https://git.busybox.net/busybox/commit/?id=8953429a8253176adda4dcfbed4738e55ee3b8ea +Signed-off-by: Thomas Devoogdt +--- + networking/libiproute/iplink.c | 21 +++++++++++++++++++++ + 1 file changed, 21 insertions(+) + +diff --git a/networking/libiproute/iplink.c b/networking/libiproute/iplink.c +index bc526d89c..7d6793e92 100644 +--- a/networking/libiproute/iplink.c ++++ b/networking/libiproute/iplink.c +@@ -51,6 +51,27 @@ struct ifla_vlan_flags { + }; + #endif + ++#if ENABLE_FEATURE_IP_LINK_CAN ++# ifndef CAN_CTRLMODE_ONE_SHOT ++# define CAN_CTRLMODE_ONE_SHOT 0x08 /* One-Shot mode */ ++# endif ++# ifndef CAN_CTRLMODE_BERR_REPORTING ++# define CAN_CTRLMODE_BERR_REPORTING 0x10 /* Bus-error reporting */ ++# endif ++# ifndef CAN_CTRLMODE_FD ++# define CAN_CTRLMODE_FD 0x20 /* CAN FD mode */ ++# endif ++# ifndef CAN_CTRLMODE_PRESUME_ACK ++# define CAN_CTRLMODE_PRESUME_ACK 0x40 /* Ignore missing CAN ACKs */ ++# endif ++# ifndef CAN_CTRLMODE_FD_NON_ISO ++# define CAN_CTRLMODE_FD_NON_ISO 0x80 /* CAN FD in non-ISO mode */ ++# endif ++# ifndef IFLA_CAN_TERMINATION ++# define IFLA_CAN_TERMINATION 11 ++# endif ++#endif ++ + /* taken from linux/sockios.h */ + #define SIOCSIFNAME 0x8923 /* set interface name */ + +-- +2.43.0 + diff --git a/package/busybox/busybox.hash b/package/busybox/busybox.hash index 6eba365ecc7..39ca8915f32 100644 --- a/package/busybox/busybox.hash +++ b/package/busybox/busybox.hash @@ -1,5 +1,5 @@ -# From https://busybox.net/downloads/busybox-1.36.1.tar.bz2.sha256 -sha256 b8cc24c9574d809e7279c3be349795c5d5ceb6fdf19ca709f80cde50e47de314 busybox-1.36.1.tar.bz2 +# From https://busybox.net/downloads/busybox-1.37.0.tar.bz2.sha256 +sha256 3311dff32e746499f4df0d5df04d7eb396382d7e108bb9250e7b519b837043a4 busybox-1.37.0.tar.bz2 # Locally computed sha256 bbfc9843646d483c334664f651c208b9839626891d8f17604db2146962f43548 LICENSE sha256 b5a136ed67798e51fe2e0ca0b2a21cb01b904ff0c9f7d563a6292e276607e58f archival/libarchive/bz/LICENSE diff --git a/package/busybox/busybox.mk b/package/busybox/busybox.mk index 942875ee0e1..cbd39a5e22d 100644 --- a/package/busybox/busybox.mk +++ b/package/busybox/busybox.mk @@ -4,7 +4,7 @@ # ################################################################################ -BUSYBOX_VERSION = 1.36.1 +BUSYBOX_VERSION = 1.37.0 BUSYBOX_SITE = https://www.busybox.net/downloads BUSYBOX_SOURCE = busybox-$(BUSYBOX_VERSION).tar.bz2 BUSYBOX_LICENSE = GPL-2.0, bzip2-1.0.4