Update for BusyBox 1.33.1

This commit is contained in:
osm0sis 2021-05-06 15:45:36 -03:00 committed by John Wu
parent f3838e0cc2
commit 87ca6f75aa
35 changed files with 162 additions and 156 deletions

View File

@ -12,7 +12,7 @@ git clone https://github.com/SELinuxProject/selinux.git jni/selinux
git clone https://android.googlesource.com/platform/external/pcre jni/pcre
```
Currently, the script supports BusyBox version `1.31.1`, please checkout to the correct tags before running scripts
Currently, the script supports BusyBox version `1.33.1`, please checkout to the correct tags before running scripts
To build ToyBox, clone the following repo:

View File

@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Busybox version: 1.32.1
# Wed Jan 20 22:20:59 2021
# Busybox version: 1.33.1
# Thu May 6 15:44:23 2021
#
CONFIG_HAVE_DOT_CONFIG=y
@ -36,7 +36,6 @@ CONFIG_SELINUX=y
# CONFIG_FEATURE_CLEAN_UP is not set
CONFIG_FEATURE_SYSLOG_INFO=y
CONFIG_FEATURE_SYSLOG=y
CONFIG_PLATFORM_LINUX=y
#
# Build Options
@ -55,6 +54,7 @@ CONFIG_EXTRA_LDFLAGS=""
CONFIG_EXTRA_LDLIBS=""
# CONFIG_USE_PORTABLE_CODE is not set
CONFIG_STACK_OPTIMIZATION_386=y
CONFIG_STATIC_LIBGCC=y
#
# Installation Options ("make install" behavior)
@ -331,6 +331,7 @@ CONFIG_UNIQ=y
CONFIG_UNLINK=y
CONFIG_USLEEP=y
CONFIG_UUDECODE=y
CONFIG_BASE32=y
CONFIG_BASE64=y
CONFIG_UUENCODE=y
CONFIG_WC=y
@ -623,7 +624,6 @@ CONFIG_FSTRIM=y
CONFIG_GETOPT=y
CONFIG_FEATURE_GETOPT_LONG=y
CONFIG_HEXDUMP=y
CONFIG_FEATURE_HEXDUMP_REVERSE=y
CONFIG_HD=y
CONFIG_XXD=y
CONFIG_HWCLOCK=y
@ -715,6 +715,7 @@ CONFIG_VOLUMEID=y
CONFIG_FEATURE_VOLUMEID_BCACHE=y
CONFIG_FEATURE_VOLUMEID_BTRFS=y
CONFIG_FEATURE_VOLUMEID_CRAMFS=y
CONFIG_FEATURE_VOLUMEID_EROFS=y
CONFIG_FEATURE_VOLUMEID_EXFAT=y
CONFIG_FEATURE_VOLUMEID_EXT=y
CONFIG_FEATURE_VOLUMEID_F2FS=y
@ -874,6 +875,10 @@ CONFIG_FEATURE_HTTPD_ENCODE_URL_STR=y
CONFIG_FEATURE_HTTPD_ERROR_PAGES=y
CONFIG_FEATURE_HTTPD_PROXY=y
CONFIG_FEATURE_HTTPD_GZIP=y
CONFIG_FEATURE_HTTPD_ETAG=y
CONFIG_FEATURE_HTTPD_LAST_MODIFIED=y
CONFIG_FEATURE_HTTPD_DATE=y
CONFIG_FEATURE_HTTPD_ACL_IP=y
CONFIG_IFCONFIG=y
CONFIG_FEATURE_IFCONFIG_STATUS=y
CONFIG_FEATURE_IFCONFIG_SLIP=y

View File

@ -1,4 +1,4 @@
From ce6ef61b941add424b4a3d6b2bcbe9c4e0412c88 Mon Sep 17 00:00:00 2001
From 1617c2ddd3a6b81fca9f28f564ff44470a1930ed Mon Sep 17 00:00:00 2001
From: Chris Renshaw <osm0sis@outlook.com>
Date: Fri, 27 Nov 2015 11:40:52 -0400
Subject: [PATCH 01/33] Fix mconf/lkc host "warning statement with no effect"
@ -23,5 +23,5 @@ index 527f60c99..1972cb9a0 100644
#ifdef __cplusplus
--
2.30.0
2.31.1

View File

@ -1,10 +1,11 @@
From 5894ff979698e21b3595a9e6ccabb6c506240469 Mon Sep 17 00:00:00 2001
From: Tias Guns <tias@ulyssis.org>
Date: Sun, 18 Mar 2012 14:12:41 +0000
From b9f214dc0434c1ba5c2987945807165dedcb7aa6 Mon Sep 17 00:00:00 2001
From: Chris Renshaw <osm0sis@outlook.com>
Date: Tue, 4 May 2021 00:56:55 -0300
Subject: [PATCH 02/33] android: fix 'mount', 'umount', 'fsck', 'df'
patch modified from 'Bionic Patch V1.0 (Vitaly Greck)'
Patch by Tias Guns <tias@ulyssis.org>, based on 'Bionic Patch V1.0' by Vitaly Greck
https://code.google.com/p/busybox-android/downloads/detail?name=patch
Rebased for busybox 1.33.1 by Chris Renshaw <osm0sis@outlook.com>
---
libbb/Kbuild.src | 3 +
libbb/mntent_r.c | 288 +++++++++++++++++++++++++++++++++++++++++++++++
@ -12,7 +13,7 @@ https://code.google.com/p/busybox-android/downloads/detail?name=patch
create mode 100644 libbb/mntent_r.c
diff --git a/libbb/Kbuild.src b/libbb/Kbuild.src
index 8c9ba8cca..48e98e77b 100644
index 676300801..a71cc4527 100644
--- a/libbb/Kbuild.src
+++ b/libbb/Kbuild.src
@@ -112,6 +112,9 @@ lib-y += xgethostbyname.o
@ -22,9 +23,9 @@ index 8c9ba8cca..48e98e77b 100644
+# for android-busybox-ndk
+lib-y += mntent_r.o
+
lib-$(CONFIG_PLATFORM_LINUX) += match_fstype.o
lib-$(CONFIG_MOUNT) += match_fstype.o
lib-$(CONFIG_UMOUNT) += match_fstype.o
lib-$(CONFIG_FEATURE_UTMP) += utmp.o
diff --git a/libbb/mntent_r.c b/libbb/mntent_r.c
new file mode 100644
index 000000000..107748740
@ -320,5 +321,5 @@ index 000000000..107748740
+ return NULL;
+}
--
2.30.0
2.31.1

View File

@ -1,4 +1,4 @@
From c80954af6d7867a1577222d3ee333b42512bb573 Mon Sep 17 00:00:00 2001
From 47d2878611ba1f38b40e71ec70e23e0ff6cd3098 Mon Sep 17 00:00:00 2001
From: Chris Renshaw <osm0sis@outlook.com>
Date: Thu, 3 Dec 2015 17:01:57 -0400
Subject: [PATCH 03/33] eject: add missing headers
@ -526,5 +526,5 @@ index 000000000..767945236
+
+#endif /* scsi/sg.h */
--
2.30.0
2.31.1

View File

@ -1,4 +1,4 @@
From ef4fbefa1af01469412711ca30d0563fb60bd037 Mon Sep 17 00:00:00 2001
From f8bbea7bb539f4c22d02d9d92dd141e9d81eb6f2 Mon Sep 17 00:00:00 2001
From: Chris Renshaw <osm0sis@outlook.com>
Date: Tue, 10 Jan 2017 10:24:29 -0400
Subject: [PATCH 04/33] fix udhcpd and nameif, add ether_ntoa_r and
@ -24,10 +24,10 @@ Rebased for busybox 1.26.1 by Chris Renshaw <osm0sis@outlook.com>
create mode 100644 networking/ether_port.h
diff --git a/networking/arping.c b/networking/arping.c
index 2a256aaa0..cf9358de2 100644
index d44d7d697..80e9571ec 100644
--- a/networking/arping.c
+++ b/networking/arping.c
@@ -15,6 +15,7 @@
@@ -14,6 +14,7 @@
//applet:IF_ARPING(APPLET(arping, BB_DIR_USR_SBIN, BB_SUID_DROP))
//kbuild:lib-$(CONFIG_ARPING) += arping.o
@ -36,10 +36,10 @@ index 2a256aaa0..cf9358de2 100644
//usage:#define arping_trivial_usage
//usage: "[-fqbDUA] [-c CNT] [-w TIMEOUT] [-I IFACE] [-s SRC_IP] DST_IP"
diff --git a/networking/ether-wake.c b/networking/ether-wake.c
index f45d43609..8e8e82845 100644
index 36e90acfb..809c0d9f0 100644
--- a/networking/ether-wake.c
+++ b/networking/ether-wake.c
@@ -73,6 +73,7 @@
@@ -72,6 +72,7 @@
//applet:IF_ETHER_WAKE(APPLET_ODDNAME(ether-wake, ether_wake, BB_DIR_USR_SBIN, BB_SUID_DROP, ether_wake))
//kbuild:lib-$(CONFIG_ETHER_WAKE) += ether-wake.o
@ -47,7 +47,7 @@ index f45d43609..8e8e82845 100644
//usage:#define ether_wake_trivial_usage
//usage: "[-b] [-i IFACE] [-p aa:bb:cc:dd[:ee:ff]/a.b.c.d] MAC"
@@ -127,13 +128,14 @@ void bb_debug_dump_packet(unsigned char *outpack, int pktsize)
@@ -126,13 +127,14 @@ void bb_debug_dump_packet(unsigned char *outpack, int pktsize)
static void get_dest_addr(const char *hostid, struct ether_addr *eaddr)
{
struct ether_addr *eap;
@ -208,10 +208,10 @@ index 000000000..5e0146b29
+
+#endif /* ETHER_PORT_H */
diff --git a/networking/nameif.c b/networking/nameif.c
index 91d50536a..38a30ba6f 100644
index 854594c83..bfb91b5ca 100644
--- a/networking/nameif.c
+++ b/networking/nameif.c
@@ -42,6 +42,7 @@
@@ -41,6 +41,7 @@
//applet:IF_NAMEIF(APPLET_NOEXEC(nameif, nameif, BB_DIR_SBIN, BB_SUID_DROP, nameif))
//kbuild:lib-$(CONFIG_NAMEIF) += nameif.o
@ -232,7 +232,7 @@ index fcb725fbc..2d5739c7e 100644
lib-$(CONFIG_DHCPRELAY) += dhcprelay.o common.o socket.o packet.o
diff --git a/networking/udhcp/dhcpd.c b/networking/udhcp/dhcpd.c
index 9d6604943..5734d3ccb 100644
index cd32cb437..c9815501b 100644
--- a/networking/udhcp/dhcpd.c
+++ b/networking/udhcp/dhcpd.c
@@ -40,8 +40,12 @@
@ -249,5 +249,5 @@ index 9d6604943..5734d3ccb 100644
#include "dhcpc.h"
#include "dhcpd.h"
--
2.30.0
2.31.1

View File

@ -1,4 +1,4 @@
From d6acaafa5d8352269bcaaa459ad31d188d939291 Mon Sep 17 00:00:00 2001
From a395a49ee47d880db702ec1c4072bc7783a0b9f1 Mon Sep 17 00:00:00 2001
From: Chris Renshaw <osm0sis@outlook.com>
Date: Wed, 2 Dec 2015 23:44:06 -0400
Subject: [PATCH 05/33] fix ether-wake, avoid ether_hostton and include
@ -13,10 +13,10 @@ Rebased for busybox 1.24.1 by Chris Renshaw <osm0sis@outlook.com>
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/networking/ether-wake.c b/networking/ether-wake.c
index 8e8e82845..f77a4c7a4 100644
index 809c0d9f0..920f0c4a0 100644
--- a/networking/ether-wake.c
+++ b/networking/ether-wake.c
@@ -88,6 +88,7 @@
@@ -87,6 +87,7 @@
#include "libbb.h"
#include <netpacket/packet.h>
#include <netinet/ether.h>
@ -24,7 +24,7 @@ index 8e8e82845..f77a4c7a4 100644
#include <linux/if.h>
/* Note: PF_INET, SOCK_DGRAM, IPPROTO_UDP would allow SIOCGIFHWADDR to
@@ -133,7 +134,7 @@ static void get_dest_addr(const char *hostid, struct ether_addr *eaddr)
@@ -132,7 +133,7 @@ static void get_dest_addr(const char *hostid, struct ether_addr *eaddr)
eap = ether_aton_r(hostid, eaddr);
if (eap) {
bb_debug_msg("The target station address is %s\n\n", ether_ntoa_r(eap, ether_buf));
@ -34,5 +34,5 @@ index 8e8e82845..f77a4c7a4 100644
bb_debug_msg("Station address for hostname %s is %s\n\n", hostid, ether_ntoa_r(eaddr, ether_buf));
#endif
--
2.30.0
2.31.1

View File

@ -1,4 +1,4 @@
From 378ccb6abf3be6aed64337e99e6a53ce1da138d1 Mon Sep 17 00:00:00 2001
From 4dc8baa9576c44a16b4516aca42ae5e3f6294aa9 Mon Sep 17 00:00:00 2001
From: Chris Renshaw <osm0sis@outlook.com>
Date: Thu, 3 Dec 2015 01:29:35 -0400
Subject: [PATCH 06/33] loadfont/setfont/conspy: add missing header
@ -51,5 +51,5 @@ index 000000000..8b8e56d4d
+
+#endif /* sys/kd.h */
--
2.30.0
2.31.1

View File

@ -1,4 +1,4 @@
From b9902f038a9595ee6336291f43978192fb480d39 Mon Sep 17 00:00:00 2001
From bfda344e790457f197a3abbc1b2e08e1da0ce780 Mon Sep 17 00:00:00 2001
From: Chris Renshaw <osm0sis@outlook.com>
Date: Mon, 12 Sep 2016 14:45:35 -0300
Subject: [PATCH 07/33] android syscalls: shmget/msgget/semget
@ -37,5 +37,5 @@ index dc40d9155..82b600ced 100644
int tcdrain(int fd)
{
--
2.30.0
2.31.1

View File

@ -1,4 +1,4 @@
From ee37cf5d148002d4855bc6458a4cb9384d9adb90 Mon Sep 17 00:00:00 2001
From c4a61a027785c6ce94e3ca872c7415b4e1c2590a Mon Sep 17 00:00:00 2001
From: Chris Renshaw <osm0sis@outlook.com>
Date: Mon, 12 Sep 2016 14:46:40 -0300
Subject: [PATCH 08/33] android syscalls: msgctl shmctl
@ -34,5 +34,5 @@ index 82b600ced..018f72d62 100644
int tcdrain(int fd)
{
--
2.30.0
2.31.1

View File

@ -1,4 +1,4 @@
From 39d11a5fc29d2ab91867713d7dd9632f74d06630 Mon Sep 17 00:00:00 2001
From 8f6ad8a7cc23feb47e083f4129e4d1c78ccd946f Mon Sep 17 00:00:00 2001
From: Chris Renshaw <osm0sis@outlook.com>
Date: Mon, 12 Sep 2016 14:48:30 -0300
Subject: [PATCH 09/33] android syscalls: shmdt shmat sembuf
@ -44,5 +44,5 @@ index 018f72d62..b5ea2612e 100644
int tcdrain(int fd)
{
--
2.30.0
2.31.1

View File

@ -1,4 +1,4 @@
From 9e991ba65c34da288d5e2cd317ee8a5263bec8a2 Mon Sep 17 00:00:00 2001
From cc92de78af168a7f82542e25e8133ffa354d9041 Mon Sep 17 00:00:00 2001
From: Tias Guns <tias@ulyssis.org>
Date: Sun, 5 Aug 2012 15:25:34 +0200
Subject: [PATCH 10/33] android syscall (non-trivial): semctl
@ -80,5 +80,5 @@ index 000000000..2c600e4f0
+ return syscall(__NR_semctl, semid, semnum, cmd, arg);
+}
--
2.30.0
2.31.1

View File

@ -1,4 +1,4 @@
From 603389d7e8c2fb9cd9805c825186955311555ee2 Mon Sep 17 00:00:00 2001
From 840337a66f736edf95578027ec73f100de0c4194 Mon Sep 17 00:00:00 2001
From: Umakanthan Chandran <cumakt@gmail.com>
Date: Fri, 3 Mar 2017 07:32:22 +0530
Subject: [PATCH 11/33] missing_syscalls/semctl: fix missing definitions on x86
@ -81,5 +81,5 @@ index 2c600e4f0..84ab1c92e 100644
int semctl(int semid, int semnum, int cmd, ...) {
union semun arg;
--
2.30.0
2.31.1

View File

@ -1,4 +1,4 @@
From 311509e99e7bcf7016fb7d925056883f1a83330f Mon Sep 17 00:00:00 2001
From 2748d1cb52bc3d464d4bf07c4fbb1ce54d33b61b Mon Sep 17 00:00:00 2001
From: Tias Guns <tias@ulyssis.org>
Date: Tue, 20 Mar 2012 21:26:07 +0000
Subject: [PATCH 12/33] fix ipcs, ipcrm no sys/sem-shm-msg, etc
@ -27,10 +27,10 @@ index 3d3ad0b56..a97f39f29 100644
#else
/* according to X/OPEN we have to define it ourselves */
diff --git a/util-linux/ipcs.c b/util-linux/ipcs.c
index df86cfb9d..2e6321470 100644
index ef2529c05..3a08020e8 100644
--- a/util-linux/ipcs.c
+++ b/util-linux/ipcs.c
@@ -72,7 +72,8 @@ struct shm_info {
@@ -71,7 +71,8 @@ struct shm_info {
/* The last arg of semctl is a union semun, but where is it defined?
X/OPEN tells us to define it ourselves, but until recently
Linux include files would also define it. */
@ -41,5 +41,5 @@ index df86cfb9d..2e6321470 100644
#else
/* according to X/OPEN we have to define it ourselves */
--
2.30.0
2.31.1

View File

@ -1,4 +1,4 @@
From 84a5121034b7578d8e2796edb804cdf9294d0063 Mon Sep 17 00:00:00 2001
From 74fa2bc25dae8105436192a119b1c3bdceb78160 Mon Sep 17 00:00:00 2001
From: Tias Guns <tias@ulyssis.org>
Date: Tue, 20 Mar 2012 21:30:10 +0000
Subject: [PATCH 13/33] fix syslogd, logread: add syslog.h, semop shmdt-at
@ -169,5 +169,5 @@ index 94d8273b6..9a768daa5 100644
#if 0
/* For the record: with SYSLOG_NAMES <syslog.h> defines
--
2.30.0
2.31.1

View File

@ -1,4 +1,4 @@
From 1ae695b4cbb6ac4389af85d2165beab36b10b0dc Mon Sep 17 00:00:00 2001
From b70c272e49622cf09fced3a360af8a58137f8fa1 Mon Sep 17 00:00:00 2001
From: Chris Renshaw <osm0sis@outlook.com>
Date: Sun, 18 Feb 2018 07:54:58 -0400
Subject: [PATCH 14/33] fix fsck.minix, mkfs.minix: undef HAVE_SETBIT,
@ -18,10 +18,10 @@ Rebased for busybox 1.28.1 by Chris Renshaw <osm0sis@outlook.com>
2 files changed, 3 insertions(+)
diff --git a/include/platform.h b/include/platform.h
index 43bb391bd..c3d7d971e 100644
index 085387fd8..3c90e2e6b 100644
--- a/include/platform.h
+++ b/include/platform.h
@@ -535,6 +535,7 @@ typedef unsigned smalluint;
@@ -537,6 +537,7 @@ typedef unsigned smalluint;
# undef HAVE_UNLOCKED_LINE_OPS
# undef HAVE_NET_ETHERNET_H
# undef HAVE_PRINTF_PERCENTM
@ -43,5 +43,5 @@ index 83ffe6da5..91ced691c 100644
BLOCK_SIZE = 1024,
BITS_PER_BLOCK = BLOCK_SIZE << 3,
--
2.30.0
2.31.1

View File

@ -1,4 +1,4 @@
From de130ffd089502e2825836fb27b7dbe7812a1941 Mon Sep 17 00:00:00 2001
From fb787658ad4e638bf15d7d44ac0df1b09c3ad2e3 Mon Sep 17 00:00:00 2001
From: Tias Guns <tias@ulyssis.org>
Date: Mon, 19 Mar 2012 18:24:29 +0000
Subject: [PATCH 15/33] fix ipv6, add ipv6_route.h
@ -78,10 +78,10 @@ index 000000000..144875dab
+
+#endif
diff --git a/networking/ifconfig.c b/networking/ifconfig.c
index b566d91a9..cabaa98e3 100644
index 9ee232a66..f9a66e801 100644
--- a/networking/ifconfig.c
+++ b/networking/ifconfig.c
@@ -129,12 +129,14 @@
@@ -128,12 +128,14 @@
#endif
#if ENABLE_FEATURE_IPV6
@ -97,10 +97,10 @@ index b566d91a9..cabaa98e3 100644
/*
* Here are the bit masks for the "flags" member of struct options below.
diff --git a/networking/route.c b/networking/route.c
index e785b1da6..1a6b19b46 100644
index ff5daa8a7..89617db9d 100644
--- a/networking/route.c
+++ b/networking/route.c
@@ -45,6 +45,8 @@
@@ -36,6 +36,8 @@
#include <net/route.h>
#include <net/if.h>
@ -110,5 +110,5 @@ index e785b1da6..1a6b19b46 100644
#include "libbb.h"
#include "inet_common.h"
--
2.30.0
2.31.1

View File

@ -1,6 +1,6 @@
From 62726fa7676fbccc3d04b820cb570b3adf2618b1 Mon Sep 17 00:00:00 2001
From 93e1a4cc9e849b5c65b5946bfa6dff884c3346bf Mon Sep 17 00:00:00 2001
From: Chris Renshaw <osm0sis@outlook.com>
Date: Thu, 22 Jun 2017 14:07:04 -0300
Date: Thu, 6 May 2021 16:09:06 -0300
Subject: [PATCH 16/33] additional fix-up for IPV6 on Android API 21+
fixes: networking/interface.c:62:8: error: redefinition of 'struct in6_ifreq'
@ -18,7 +18,7 @@ since sockaddr was moved from linux/socket.h to sys/socket.h in newer NDK revisi
2 files changed, 3 insertions(+)
diff --git a/networking/interface.c b/networking/interface.c
index e5e55d8d4..9f1903a09 100644
index ea6a2c8a8..6f0716680 100644
--- a/networking/interface.c
+++ b/networking/interface.c
@@ -55,6 +55,7 @@
@ -38,17 +38,17 @@ index e5e55d8d4..9f1903a09 100644
#endif /* HAVE_AFINET6 */
diff --git a/networking/route.c b/networking/route.c
index 1a6b19b46..efbb46f91 100644
index 89617db9d..f20070889 100644
--- a/networking/route.c
+++ b/networking/route.c
@@ -43,6 +43,7 @@
//usage: "\n -e Display other/more information"
//usage: "\n -A inet" IF_FEATURE_IPV6("{6}") " Select address family"
@@ -36,6 +36,7 @@
+#include <netinet/in.h>
#include <net/route.h>
#include <net/if.h>
+#include <netinet/in.h>
#include <linux/in6.h>
--
2.30.0
#include <linux/ipv6_route.h>
--
2.31.1

View File

@ -1,4 +1,4 @@
From 12af12adedb960deedbfb9591816a85ff6bc0574 Mon Sep 17 00:00:00 2001
From c333f43703ed6c2714ad78c1edd3ca685b70823c Mon Sep 17 00:00:00 2001
From: Chris Renshaw <osm0sis@outlook.com>
Date: Wed, 19 Jul 2017 17:22:55 -0300
Subject: [PATCH 17/33] fix udhcpc6: add missing ifaddrs.h and
@ -16,7 +16,7 @@ https://github.com/morristech/android-ifaddrs
create mode 100644 networking/udhcp/ifaddrs.h
diff --git a/networking/udhcp/d6_dhcpc.c b/networking/udhcp/d6_dhcpc.c
index fc2d672b7..216485097 100644
index d4d29dcbb..dddf146f0 100644
--- a/networking/udhcp/d6_dhcpc.c
+++ b/networking/udhcp/d6_dhcpc.c
@@ -48,6 +48,7 @@
@ -707,5 +707,5 @@ index 000000000..9cd19fec1
+
+#endif
--
2.30.0
2.31.1

View File

@ -1,4 +1,4 @@
From 357d2a6afebafa2b98e1bb80c369814454d81f20 Mon Sep 17 00:00:00 2001
From 8ec92b47e5c92e5070acbbf367b571dcb1c58e29 Mon Sep 17 00:00:00 2001
From: Chris Renshaw <osm0sis@outlook.com>
Date: Fri, 2 Feb 2018 16:37:54 -0400
Subject: [PATCH 18/33] fix time+hush: add missing definitions on Android API
@ -14,10 +14,10 @@ issetugid is required for hush via glob.c; add the hacky pre-API 21 definition b
2 files changed, 25 insertions(+)
diff --git a/include/platform.h b/include/platform.h
index c3d7d971e..f924219e2 100644
index 3c90e2e6b..fb881af9b 100644
--- a/include/platform.h
+++ b/include/platform.h
@@ -421,6 +421,8 @@ typedef unsigned smalluint;
@@ -423,6 +423,8 @@ typedef unsigned smalluint;
#define HAVE_NET_ETHERNET_H 1
#define HAVE_SYS_STATFS_H 1
#define HAVE_PRINTF_PERCENTM 1
@ -26,7 +26,7 @@ index c3d7d971e..f924219e2 100644
#if defined(__UCLIBC__)
# if UCLIBC_VERSION < KERNEL_VERSION(0, 9, 32)
@@ -524,10 +526,15 @@ typedef unsigned smalluint;
@@ -526,10 +528,15 @@ typedef unsigned smalluint;
# else
/* ANDROID >= 21 has standard dprintf */
# endif
@ -42,7 +42,7 @@ index c3d7d971e..f924219e2 100644
# endif
# undef HAVE_MEMPCPY
# undef HAVE_STRCHRNUL
@@ -616,4 +623,14 @@ extern int vasprintf(char **string_ptr, const char *format, va_list p) FAST_FUNC
@@ -618,4 +625,14 @@ extern int vasprintf(char **string_ptr, const char *format, va_list p) FAST_FUNC
extern ssize_t getline(char **lineptr, size_t *n, FILE *stream) FAST_FUNC;
#endif
@ -58,7 +58,7 @@ index c3d7d971e..f924219e2 100644
+
#endif
diff --git a/libbb/platform.c b/libbb/platform.c
index 03bbb798b..a5b60074a 100644
index 329b0237e..df039f066 100644
--- a/libbb/platform.c
+++ b/libbb/platform.c
@@ -213,3 +213,11 @@ int ttyname_r(int fd, char *buf, size_t buflen)
@ -74,5 +74,5 @@ index 03bbb798b..a5b60074a 100644
+}
+#endif
--
2.30.0
2.31.1

View File

@ -1,4 +1,4 @@
From 6b79016f3774dd1984bf95fe827d58016a172ac7 Mon Sep 17 00:00:00 2001
From fe1c2ead89b2b249189e3f3eec1add7d80b6efae Mon Sep 17 00:00:00 2001
From: John Wu <topjohnwu@gmail.com>
Date: Sun, 12 Aug 2018 18:31:26 +0800
Subject: [PATCH 19/33] platform: minor adjustments to support unified headers
@ -8,7 +8,7 @@ Subject: [PATCH 19/33] platform: minor adjustments to support unified headers
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/platform.h b/include/platform.h
index f924219e2..692acdc91 100644
index fb881af9b..0d355ae85 100644
--- a/include/platform.h
+++ b/include/platform.h
@@ -124,7 +124,7 @@
@ -21,5 +21,5 @@ index f924219e2..692acdc91 100644
# define FAST_FUNC __attribute__((regparm(3),stdcall))
/* #elif ... - add your favorite arch today! */
--
2.30.0
2.31.1

View File

@ -1,4 +1,4 @@
From 98778678a1734c4f20374cd9f3b82d82b22ad4cb Mon Sep 17 00:00:00 2001
From 0ea8ca8d656c655aa073305a64a67a2d07e0459d Mon Sep 17 00:00:00 2001
From: Chris Renshaw <osm0sis@outlook.com>
Date: Tue, 10 Jan 2017 10:49:59 -0400
Subject: [PATCH 20/33] fix hush, add glob and sigisemptyset
@ -928,10 +928,10 @@ index 000000000..e8e65786d
+
+#endif /* !_GLOB_H_ */
diff --git a/shell/hush.c b/shell/hush.c
index bc6e6014f..c910658f4 100644
index 9fead37da..603c9f9be 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -333,6 +333,7 @@
@@ -331,6 +331,7 @@
//applet:IF_BASH_IS_HUSH(APPLET_ODDNAME(bash, hush, BB_DIR_BIN, BB_SUID_DROP, hush))
//kbuild:lib-$(CONFIG_SHELL_HUSH) += hush.o match.o shell_common.o
@ -939,7 +939,7 @@ index bc6e6014f..c910658f4 100644
//kbuild:lib-$(CONFIG_HUSH_RANDOM_SUPPORT) += random.o
/* -i (interactive) is also accepted,
@@ -350,7 +351,7 @@
@@ -348,7 +349,7 @@
)
# include <malloc.h> /* for malloc_trim */
#endif
@ -963,5 +963,5 @@ index 000000000..82973138e
+ return set;
+}
--
2.30.0
2.31.1

View File

@ -1,4 +1,4 @@
From 1f383c3b5a569f27ac7c91204b300de34fa06ae0 Mon Sep 17 00:00:00 2001
From 985a83ace17ce69d3bd776ce3247c5afc745cf62 Mon Sep 17 00:00:00 2001
From: John Wu <topjohnwu@gmail.com>
Date: Sun, 12 Aug 2018 18:31:26 +0800
Subject: [PATCH 21/33] glob: minor adjustments to support unified headers
@ -39,5 +39,5 @@ index e8e65786d..c274a8f6a 100644
#define GLOB_BRACE 0x0080 /* Expand braces ala csh. */
#define GLOB_MAGCHAR 0x0100 /* Pattern had globbing characters. */
--
2.30.0
2.31.1

View File

@ -1,6 +1,6 @@
From c9edbdc0e7d2a177c0aa0abf749f0863aadf9c04 Mon Sep 17 00:00:00 2001
From 8fb538cbe2e65b10c559af8967bc7543fb04a21f Mon Sep 17 00:00:00 2001
From: Chris Renshaw <osm0sis@outlook.com>
Date: Mon, 12 Sep 2016 16:25:51 -0300
Date: Thu, 6 May 2021 16:30:26 -0300
Subject: [PATCH 22/33] modinfo/modprobe: use ifdef block for android
without-utsrel modules path
@ -13,17 +13,17 @@ from https://github.com/tpruvot/android_external_busybox
and commit 2df42d3971f1e260e67c3fa4831cb9195fb276c4
from https://github.com/tpruvot/android_external_busybox
Rebased for busybox 1.25.0 by Chris Renshaw <osm0sis@outlook.com>
Rebased for busybox 1.33.1 by Chris Renshaw <osm0sis@outlook.com>
---
modutils/modinfo.c | 33 +++++++++++++++++++++++++++++----
modutils/modprobe.c | 18 +++++++++++++++++-
2 files changed, 46 insertions(+), 5 deletions(-)
diff --git a/modutils/modinfo.c b/modutils/modinfo.c
index 1e63f745f..d85aa7543 100644
index d15772f0d..0b6a89329 100644
--- a/modutils/modinfo.c
+++ b/modutils/modinfo.c
@@ -21,6 +21,10 @@
@@ -20,6 +20,10 @@
#include "libbb.h"
#include "modutils.h"
@ -31,10 +31,10 @@ index 1e63f745f..d85aa7543 100644
+#define DONT_USE_UTS_REL_FOLDER
+#endif
+
static const char *const shortcuts[] = {
static const char *const shortcuts[] ALIGN_PTR = {
"filename", // -n
"author", // -a
@@ -64,7 +68,7 @@ static void modinfo(const char *path, const char *version,
@@ -63,7 +67,7 @@ static void modinfo(const char *path, const char *version,
{
size_t len;
int j;
@ -43,7 +43,7 @@ index 1e63f745f..d85aa7543 100644
char *allocated;
int tags = option_mask32;
@@ -75,8 +79,14 @@ static void modinfo(const char *path, const char *version,
@@ -74,8 +78,14 @@ static void modinfo(const char *path, const char *version,
if (path[0] == '/')
return;
/* Newer depmod puts relative paths in modules.dep */
@ -60,7 +60,7 @@ index 1e63f745f..d85aa7543 100644
if (!the_module) {
bb_error_msg("module '%s' not found", path);
goto ret;
@@ -157,9 +167,23 @@ int modinfo_main(int argc UNUSED_PARAM, char **argv)
@@ -156,9 +166,23 @@ int modinfo_main(int argc UNUSED_PARAM, char **argv)
uname(&uts);
parser = config_open2(
xasprintf("%s/%s/%s", CONFIG_DEFAULT_MODULES_DIR, uts.release, CONFIG_DEFAULT_DEPMOD_FILE),
@ -85,7 +85,7 @@ index 1e63f745f..d85aa7543 100644
while (config_read(parser, tokens, 2, 1, "# \t", PARSE_NORMAL)) {
colon = last_char_is(tokens[0], ':');
if (colon == NULL)
@@ -176,6 +200,7 @@ int modinfo_main(int argc UNUSED_PARAM, char **argv)
@@ -175,6 +199,7 @@ int modinfo_main(int argc UNUSED_PARAM, char **argv)
if (ENABLE_FEATURE_CLEAN_UP)
config_close(parser);
@ -94,10 +94,10 @@ index 1e63f745f..d85aa7543 100644
if (argv[i][0]) {
modinfo(argv[i], uts.release, field);
diff --git a/modutils/modprobe.c b/modutils/modprobe.c
index 0a372a049..bcfa6522e 100644
index c334186b8..eecccac1b 100644
--- a/modutils/modprobe.c
+++ b/modutils/modprobe.c
@@ -173,6 +173,10 @@ static const char modprobe_longopts[] ALIGN1 =
@@ -172,6 +172,10 @@ static const char modprobe_longopts[] ALIGN1 =
#define MODULE_FLAG_BLACKLISTED 0x0008
#define MODULE_FLAG_BUILTIN 0x0010
@ -108,7 +108,7 @@ index 0a372a049..bcfa6522e 100644
struct globals {
llist_t *probes; /* MEs of module(s) requested on cmdline */
#if ENABLE_FEATURE_CMDLINE_MODULE_OPTIONS
@@ -477,10 +481,17 @@ static int do_modprobe(struct module_entry *m)
@@ -474,10 +478,17 @@ static int do_modprobe(struct module_entry *m)
#endif
if (option_mask32 & OPT_SHOW_DEPS) {
@ -126,7 +126,7 @@ index 0a372a049..bcfa6522e 100644
free(options);
continue;
}
@@ -562,6 +573,7 @@ int modprobe_main(int argc UNUSED_PARAM, char **argv)
@@ -559,6 +570,7 @@ int modprobe_main(int argc UNUSED_PARAM, char **argv)
int rc;
unsigned opt;
struct module_entry *me;
@ -134,7 +134,7 @@ index 0a372a049..bcfa6522e 100644
INIT_G();
@@ -573,8 +585,12 @@ int modprobe_main(int argc UNUSED_PARAM, char **argv)
@@ -570,8 +582,12 @@ int modprobe_main(int argc UNUSED_PARAM, char **argv)
/* Goto modules location */
xchdir(CONFIG_DEFAULT_MODULES_DIR);
@ -149,5 +149,5 @@ index 0a372a049..bcfa6522e 100644
if (opt & OPT_LIST_ONLY) {
int i;
--
2.30.0
2.31.1

View File

@ -1,4 +1,4 @@
From 5669abbb917b5b7b486c01cb5f75f0fa9b949fc1 Mon Sep 17 00:00:00 2001
From 3868d8ef449ca229b2bee9f19d922918830a5ac6 Mon Sep 17 00:00:00 2001
From: Chris Renshaw <osm0sis@outlook.com>
Date: Mon, 12 Sep 2016 16:55:01 -0300
Subject: [PATCH 23/33] depmod: fix syntax with modules in parameter
@ -12,10 +12,10 @@ Rebased for busybox 1.25.0 by Chris Renshaw <osm0sis@outlook.com>
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/modutils/depmod.c b/modutils/depmod.c
index b5244fc60..d37a14e1f 100644
index bb42bbefe..5e4c4c538 100644
--- a/modutils/depmod.c
+++ b/modutils/depmod.c
@@ -49,7 +49,10 @@ static int FAST_FUNC parse_module(const char *fname, struct stat *sb UNUSED_PARA
@@ -49,7 +49,10 @@ static int FAST_FUNC parse_module(struct recursive_state *state,
image = xmalloc_open_zipped_read_close(fname, &len);
e = moddb_get_or_create(modules, bb_get_last_path_component_nostrip(fname));
@ -28,5 +28,5 @@ index b5244fc60..d37a14e1f 100644
for (ptr = image; ptr < image + len - 10; ptr++) {
if (is_prefixed_with(ptr, "depends=")) {
--
2.30.0
2.31.1

View File

@ -1,4 +1,4 @@
From 4aa018064aaf64e0061c0086e3aa19bd5ec21a41 Mon Sep 17 00:00:00 2001
From 5f81074e32ea8373e8ad1c8bf500b963c27ada4a Mon Sep 17 00:00:00 2001
From: Chris Renshaw <osm0sis@outlook.com>
Date: Mon, 26 Jun 2017 23:53:06 -0300
Subject: [PATCH 24/33] fix reboot+poweroff: hack android_reboot support
@ -20,7 +20,7 @@ and added work around to write the property value directly via shell since prope
create mode 100644 init/reboot.c
diff --git a/init/halt.c b/init/halt.c
index 785c38130..521922d2c 100644
index fe3cb9e75..895009972 100644
--- a/init/halt.c
+++ b/init/halt.c
@@ -94,6 +94,10 @@
@ -104,5 +104,5 @@ index 000000000..97fe523a7
+ return ret;
+}
--
2.30.0
2.31.1

View File

@ -1,4 +1,4 @@
From f626ca5fe4757c23348ef6198d233ba197e8ad78 Mon Sep 17 00:00:00 2001
From 4188631fa69400723cf8458c9fc15b1aad60d581 Mon Sep 17 00:00:00 2001
From: osm0sis <osm0sis@outlook.com>
Date: Thu, 20 Jul 2017 09:16:07 -0300
Subject: [PATCH 25/33] fix tls: avoid problematic ASM code only triggered by
@ -22,5 +22,5 @@ index d4ac1bef8..07032477e 100644
# define PSTM_32BIT
# define PSTM_X86
--
2.30.0
2.31.1

View File

@ -1,4 +1,4 @@
From 9332714db411dd7cb40e64b9d7bd235d0a49d830 Mon Sep 17 00:00:00 2001
From 5f669911378aa054117d8b8586d35bab7e0a09b1 Mon Sep 17 00:00:00 2001
From: Chris Renshaw <osm0sis@outlook.com>
Date: Sat, 21 Jul 2018 20:02:13 -0300
Subject: [PATCH 26/33] fix nslookup, add libres, a dietlibc resolver
@ -52,7 +52,7 @@ Rebased for busybox 1.29.1 by Chris Renshaw <osm0sis@outlook.com>
create mode 100644 libres/test.c
diff --git a/Makefile b/Makefile
index 48b79759b..8c61daee2 100644
index 35d1589cb..f858955a7 100644
--- a/Makefile
+++ b/Makefile
@@ -477,6 +477,7 @@ libs-y := \
@ -1156,7 +1156,7 @@ index 000000000..45095d81d
+ return 0;
+}
diff --git a/networking/nslookup.c b/networking/nslookup.c
index c43e60558..486795999 100644
index dda22de0e..35632bb60 100644
--- a/networking/nslookup.c
+++ b/networking/nslookup.c
@@ -36,8 +36,9 @@
@ -1241,5 +1241,5 @@ index c43e60558..486795999 100644
/* (but it also says "may be enabled in /etc/resolv.conf") */
/*_res.options |= RES_USE_INET6;*/
--
2.30.0
2.31.1

View File

@ -1,4 +1,4 @@
From 267054c182e87928847bc5dc963c911bd4c24b5b Mon Sep 17 00:00:00 2001
From 31550f512959446007a7a7256a43ebd2dc84b8f1 Mon Sep 17 00:00:00 2001
From: Chris Renshaw <osm0sis@outlook.com>
Date: Wed, 30 Oct 2019 02:47:24 -0300
Subject: [PATCH 27/33] hack: use dietlibc's resolver to avoid static
@ -10,7 +10,7 @@ Subject: [PATCH 27/33] hack: use dietlibc's resolver to avoid static
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/libbb/xconnect.c b/libbb/xconnect.c
index e9a2470e4..3ab0868d4 100644
index 5dd9cfd28..ecfcdaefa 100644
--- a/libbb/xconnect.c
+++ b/libbb/xconnect.c
@@ -11,6 +11,8 @@
@ -41,5 +41,5 @@ index e9a2470e4..3ab0868d4 100644
}
#if !ENABLE_FEATURE_IPV6
--
2.30.0
2.31.1

View File

@ -1,11 +1,11 @@
From 71e468a49f77837f45d75075400866e1d0ae1645 Mon Sep 17 00:00:00 2001
From da3b18d4355b125328c8438f3aac3b3a9d116949 Mon Sep 17 00:00:00 2001
From: Chris Renshaw <osm0sis@outlook.com>
Date: Mon, 3 Jul 2017 03:17:06 -0300
Subject: [PATCH 28/33] dietlibc/dnscruft: try to get dns server via command if
__sys_property_get fails - bionic libc's property_get and __sys_property_get
fail for statically compiled binaries - fallback to a default known dns
server if all else fails
__sys_property_get fails
- bionic libc's property_get and __sys_property_get fail for statically compiled binaries
- fallback to a default known dns server if all else fails
---
libres/dnscruft.c | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
@ -46,5 +46,5 @@ index 142ffecd1..7804765b9 100644
if (parsesockaddr(propvalue,&_diet_res.nsaddr_list[_diet_res.nscount]))
--
2.30.0
2.31.1

View File

@ -1,13 +1,13 @@
From 38523bea42fdd63746587015ddb8f2edfdb0f6dd Mon Sep 17 00:00:00 2001
From 1d23cd87d8483491b436a053d813a5af0f94bc20 Mon Sep 17 00:00:00 2001
From: Chris Renshaw <osm0sis@outlook.com>
Date: Fri, 22 Feb 2019 13:01:48 -0400
Date: Thu, 6 May 2021 16:44:48 -0300
Subject: [PATCH 29/33] ash history
allows ash history to work on Android
Patch modified by Tias Guns <tias@ulyssis.org> from 'busybox-android.patch' by Alexandre Courbot
https://github.com/Gnurou/busybox-android
Rebased for busybox 1.30.1 by Chris Renshaw <osm0sis@outlook.com>
Rebased for busybox 1.33.1 by Chris Renshaw <osm0sis@outlook.com>
---
include/libbb.h | 4 ++--
init/init.c | 2 +-
@ -15,10 +15,10 @@ Rebased for busybox 1.30.1 by Chris Renshaw <osm0sis@outlook.com>
3 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/include/libbb.h b/include/libbb.h
index 6be934994..dcb82fca5 100644
index cae54658b..ae94e921d 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -2205,12 +2205,12 @@ static ALWAYS_INLINE void* not_const_pp(const void *p) { return (void*)p; }
@@ -2265,12 +2265,12 @@ static ALWAYS_INLINE void* not_const_pp(const void *p) { return (void*)p; }
* use bb_default_login_shell and following defines.
* If you change LIBBB_DEFAULT_LOGIN_SHELL,
* don't forget to change increment constant. */
@ -34,7 +34,7 @@ index 6be934994..dcb82fca5 100644
/* The following devices are the same on all systems. */
#define CURRENT_TTY "/dev/tty"
diff --git a/init/init.c b/init/init.c
index 28775a65c..eea2bc46d 100644
index efab5dcb4..de9044751 100644
--- a/init/init.c
+++ b/init/init.c
@@ -1107,7 +1107,7 @@ int init_main(int argc UNUSED_PARAM, char **argv)
@ -47,10 +47,10 @@ index 28775a65c..eea2bc46d 100644
if (argv[1])
diff --git a/shell/ash.c b/shell/ash.c
index 07aa2da2e..13d4875db 100644
index a33ab0626..ad7978bbe 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -14279,7 +14279,7 @@ procargs(char **argv)
@@ -14282,7 +14282,7 @@ procargs(char **argv)
int login_sh;
xargv = argv;
@ -59,7 +59,7 @@ index 07aa2da2e..13d4875db 100644
#if NUM_SCRIPTS > 0
if (minusc)
goto setarg0;
@@ -14444,7 +14444,7 @@ int ash_main(int argc UNUSED_PARAM, char **argv)
@@ -14458,7 +14458,7 @@ int ash_main(int argc UNUSED_PARAM, char **argv)
const char *hp;
state = 1;
@ -68,8 +68,8 @@ index 07aa2da2e..13d4875db 100644
state1:
state = 2;
hp = lookupvar("HOME");
@@ -14489,6 +14489,9 @@ int ash_main(int argc UNUSED_PARAM, char **argv)
if (iflag) {
@@ -14503,6 +14503,9 @@ int ash_main(int argc UNUSED_PARAM, char **argv)
if (line_input_state) {
const char *hp = lookupvar("HISTFILE");
if (!hp) {
+#ifdef __ANDROID__
@ -78,14 +78,14 @@ index 07aa2da2e..13d4875db 100644
hp = lookupvar("HOME");
if (hp) {
INT_OFF;
@@ -14498,6 +14501,7 @@ int ash_main(int argc UNUSED_PARAM, char **argv)
@@ -14512,6 +14515,7 @@ int ash_main(int argc UNUSED_PARAM, char **argv)
INT_ON;
hp = lookupvar("HISTFILE");
}
+#endif
}
if (hp)
line_input_state->hist_file = hp;
line_input_state->hist_file = xstrdup(hp);
--
2.30.0
2.31.1

View File

@ -1,4 +1,4 @@
From 31b2b5780bf9fe982e1f3d9df0bd4b1b44d6e394 Mon Sep 17 00:00:00 2001
From 4556e7333436f9e651657e750948f5849e6fd418 Mon Sep 17 00:00:00 2001
From: topjohnwu <topjohnwu@gmail.com>
Date: Fri, 3 Apr 2020 02:09:55 -0700
Subject: [PATCH 30/33] Remove unnecessary missing syscalls
@ -34,5 +34,5 @@ index f02e8d14c..a6db67da9 100644
int pivot_root(const char *new_root, const char *put_old)
{
--
2.30.0
2.31.1

View File

@ -1,4 +1,4 @@
From fd9e073f9f5e31369c60d9359dfad6f88e366880 Mon Sep 17 00:00:00 2001
From 88d63f1489151534e170d0c6954d6c1b5be59c1e Mon Sep 17 00:00:00 2001
From: topjohnwu <topjohnwu@gmail.com>
Date: Fri, 7 Feb 2020 14:32:06 -0800
Subject: [PATCH 31/33] Add runtime toggle to enable standalone ash
@ -8,7 +8,7 @@ Subject: [PATCH 31/33] Add runtime toggle to enable standalone ash
1 file changed, 24 insertions(+), 18 deletions(-)
diff --git a/shell/ash.c b/shell/ash.c
index 13d4875db..6901c48d4 100644
index ad7978bbe..6e796cf88 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -266,16 +266,14 @@ typedef long arith_t;
@ -66,7 +66,7 @@ index 13d4875db..6901c48d4 100644
#endif
/* trap handler commands */
@@ -8099,7 +8100,7 @@ static void
@@ -8102,7 +8103,7 @@ static void
tryexec(IF_FEATURE_SH_STANDALONE(int applet_no,) const char *cmd, char **argv, char **envp)
{
#if ENABLE_FEATURE_SH_STANDALONE
@ -75,7 +75,7 @@ index 13d4875db..6901c48d4 100644
if (APPLET_IS_NOEXEC(applet_no)) {
clearenv();
while (*envp)
@@ -8168,7 +8169,7 @@ static void shellexec(char *prog, char **argv, const char *path, int idx)
@@ -8171,7 +8172,7 @@ static void shellexec(char *prog, char **argv, const char *path, int idx)
envp = listvars(VEXPORT, VUNSET, /*strlist:*/ NULL, /*end:*/ NULL);
if (strchr(prog, '/') != NULL
#if ENABLE_FEATURE_SH_STANDALONE
@ -84,7 +84,7 @@ index 13d4875db..6901c48d4 100644
#endif
) {
tryexec(IF_FEATURE_SH_STANDALONE(applet_no,) prog, argv, envp);
@@ -13573,7 +13574,7 @@ find_command(char *name, struct cmdentry *entry, int act, const char *path)
@@ -13576,7 +13577,7 @@ find_command(char *name, struct cmdentry *entry, int act, const char *path)
goto fail;
#if ENABLE_FEATURE_SH_STANDALONE
@ -93,7 +93,7 @@ index 13d4875db..6901c48d4 100644
int applet_no = find_applet_by_name(name);
if (applet_no >= 0) {
entry->cmdtype = CMDNORMAL;
@@ -13795,7 +13796,7 @@ helpcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
@@ -13798,7 +13799,7 @@ helpcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
}
}
# if ENABLE_FEATURE_SH_STANDALONE
@ -102,7 +102,7 @@ index 13d4875db..6901c48d4 100644
const char *a = applet_names;
while (*a) {
col += out1fmt("%c%s", ((col == 0) ? '\t' : ' '), a);
@@ -14440,6 +14441,11 @@ int ash_main(int argc UNUSED_PARAM, char **argv)
@@ -14454,6 +14455,11 @@ int ash_main(int argc UNUSED_PARAM, char **argv)
trace_puts_args(argv);
#endif
@ -115,5 +115,5 @@ index 13d4875db..6901c48d4 100644
const char *hp;
--
2.30.0
2.31.1

View File

@ -1,4 +1,4 @@
From a0e0a5cc5719f39c5ff05d7bcbcfb54ca9df7123 Mon Sep 17 00:00:00 2001
From 411f362efe9a0876a4f0878de292cfbc86088abb Mon Sep 17 00:00:00 2001
From: topjohnwu <topjohnwu@gmail.com>
Date: Sat, 2 May 2020 01:48:30 -0700
Subject: [PATCH 32/33] Disable SELinux features for install
@ -32,5 +32,5 @@ index c0f1c538a..16c014384 100644
static const char install_longopts[] ALIGN1 =
IF_FEATURE_VERBOSE(
--
2.30.0
2.31.1

View File

@ -1,4 +1,4 @@
From cda6c81983ac5eca8ac0ca01c343c1586c7eac32 Mon Sep 17 00:00:00 2001
From 70f2490249ba5ff244581bfb8c3d38dfbfc4fdea Mon Sep 17 00:00:00 2001
From: topjohnwu <topjohnwu@gmail.com>
Date: Thu, 21 Jan 2021 00:07:41 -0800
Subject: [PATCH 33/33] Allow running as libbusybox.so
@ -8,10 +8,10 @@ Subject: [PATCH 33/33] Allow running as libbusybox.so
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/libbb/appletlib.c b/libbb/appletlib.c
index a515c3fe3..056f5177a 100644
index 5f59f1273..030c8008d 100644
--- a/libbb/appletlib.c
+++ b/libbb/appletlib.c
@@ -1133,7 +1133,10 @@ int main(int argc UNUSED_PARAM, char **argv)
@@ -1138,7 +1138,10 @@ int main(int argc UNUSED_PARAM, char **argv)
if (argv[1] && is_prefixed_with(bb_basename(argv[0]), "busybox"))
argv++;
# endif
@ -24,5 +24,5 @@ index a515c3fe3..056f5177a 100644
applet_name++;
applet_name = bb_basename(applet_name);
--
2.30.0
2.31.1