Skip to content

Commit

Permalink
package/busybox: bump to 1.37.0
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
ThomasDevoogdt committed Oct 19, 2024
1 parent 34d5874 commit 4c39169
Show file tree
Hide file tree
Showing 14 changed files with 139 additions and 262 deletions.
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>
Date: Sat, 5 Oct 2013 15:55:06 +0200
Subject: [PATCH] networking/libiproute: use <linux/if_packet.h> instead of
Expand All @@ -20,7 +20,7 @@ Signed-off-by: Petr Vorel <[email protected]>
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 @@
Expand All @@ -30,8 +30,8 @@ index 1a1064bdc..a4c3ad307 100644
-#include <netpacket/packet.h>
+#include <linux/if_packet.h>
#include <netinet/if_ether.h>

#include <linux/if_vlan.h>
--
2.33.0
--
2.43.0

Original file line number Diff line number Diff line change
@@ -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 <[email protected]>
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 <[email protected]>
[[email protected]: refresh for 1.29.0]
Expand All @@ -14,10 +13,10 @@ Signed-off-by: Petr Vorel <[email protected]>
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)
Expand All @@ -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

Original file line number Diff line number Diff line change
@@ -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 <[email protected]>
Date: Mon, 19 Sep 2022 14:15:12 +0200
Subject: [PATCH] libbb: sockaddr2str: ensure only printable characters are
Expand Down Expand Up @@ -38,5 +38,5 @@ index 0e0b247b8..02c061e67 100644
}

--
2.37.3
2.43.0

Original file line number Diff line number Diff line change
@@ -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 <[email protected]>
Date: Mon, 19 Sep 2022 14:15:12 +0200
Subject: [PATCH] nslookup: sanitize all printed strings with printable_string
Expand All @@ -16,10 +16,10 @@ Signed-off-by: Quentin Schulz <[email protected]>
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;
}
Expand All @@ -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;
}
Expand All @@ -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);
Expand All @@ -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),
Expand All @@ -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;
}

Expand All @@ -65,5 +65,5 @@ index 6da97baf4..4bdcde1b8 100644

printf("\tserial = %lu\n", ns_get32(cp));
--
2.37.3
2.43.0

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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?= <[email protected]>
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
Expand Down Expand Up @@ -48,33 +48,15 @@ This should fix compiling with many libc/kernel combinations.
Signed-off-by: Raphaël Mélotte <[email protected]>
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

Expand All @@ -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 @@
Expand All @@ -120,5 +102,5 @@ index 3bf6e2ea7..2f1e18c32 100644

/* Apparently some headers don't ship with this yet. */
--
2.39.1
2.43.0

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
From [email protected] Sun Jul 21 12:10:52 2024
From: [email protected] (Nop)
From e3bec255f30720e1541a97560361c706ccb91d6e Mon Sep 17 00:00:00 2001
From: Nop <[email protected]>
Date: Sun, 21 Jul 2024 14:10:52 +0200
Subject: [PATCH] menuconfig: GCC failing saying ncurses is not found

Expand All @@ -17,13 +17,12 @@ Signed-off-by: Fiona Klute (WIWA) <[email protected]>
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'
Expand All @@ -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

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
From 152606e9787dc8fbc693e3368b4264a136e61031 Mon Sep 17 00:00:00 2001
From: Rudi Heitbaum <[email protected]>
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 <[email protected]>
Signed-off-by: Denys Vlasenko <[email protected]>
Upstream: https://git.busybox.net/busybox/commit/?id=bf57f732a5b6842f6fa3e0f90385f039e5d6a92c
Signed-off-by: Thomas Devoogdt <[email protected]>
---
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

Loading

0 comments on commit 4c39169

Please sign in to comment.