Browse Source

busybox: Update from 1.26.2 to 1.27.1

android-5
Fredrik Fornwall 8 years ago
parent
commit
5aad30fa3a
  1. 5
      packages/busybox/build.sh
  2. 22
      packages/busybox/busybox.config
  3. 10
      packages/busybox/coreutils-mktemp.c.patch
  4. 22
      packages/busybox/networking-httpd.c.patch
  5. 13
      packages/busybox/sendmail.patch
  6. 57
      packages/busybox/wget.c.patch

5
packages/busybox/build.sh

@ -1,10 +1,9 @@
TERMUX_PKG_HOMEPAGE=https://busybox.net/
TERMUX_PKG_DESCRIPTION="Tiny versions of many common UNIX utilities into a single small executable"
TERMUX_PKG_ESSENTIAL=yes
TERMUX_PKG_VERSION=1.26.2
TERMUX_PKG_REVISION=3
TERMUX_PKG_VERSION=1.27.1
TERMUX_PKG_SHA256=c890ac53fb218eb4c6ad9ed3207a896783b142e6d306f292b8d9bec82af5f936
TERMUX_PKG_SRCURL=https://busybox.net/downloads/busybox-${TERMUX_PKG_VERSION}.tar.bz2
TERMUX_PKG_SHA256=da3e44913fc1a9c9b7c5337ea5292da518683cbff32be630777f565d6036af16
TERMUX_PKG_BUILD_IN_SRC=yes
# We replace env in the old coreutils package:
TERMUX_PKG_CONFLICTS="coreutils (<< 8.25-4)"

22
packages/busybox/busybox.config

@ -167,12 +167,17 @@ CONFIG_FEATURE_TAR_UNAME_GNAME=y
CONFIG_FEATURE_TAR_NOPRESERVE_TIME=y
# CONFIG_FEATURE_TAR_SELINUX is not set
CONFIG_UNZIP=y
CONFIG_FEATURE_UNZIP_CDF=y
CONFIG_FEATURE_UNZIP_BZIP2=n
CONFIG_FEATURE_UNZIP_LZMA=n
CONFIG_FEATURE_UNZIP_XZ=n
#
# Coreutils
#
CONFIG_BASENAME=y
CONFIG_CAT=y
CONFIG_FEATURE_CATV=y
CONFIG_DATE=y
CONFIG_FEATURE_DATE_ISOFMT=y
# CONFIG_FEATURE_DATE_NANO is not set
@ -226,6 +231,7 @@ CONFIG_EXPAND=y
# CONFIG_FEATURE_EXPAND_LONG_OPTIONS is not set
CONFIG_EXPR=y
CONFIG_EXPR_MATH_SUPPORT_64=y
CONFIG_FACTOR=n
CONFIG_FALSE=y
CONFIG_FOLD=y
CONFIG_FSYNC=y
@ -244,6 +250,7 @@ CONFIG_FEATURE_LS_TIMESTAMPS=y
CONFIG_FEATURE_LS_USERNAME=y
CONFIG_FEATURE_LS_COLOR=y
CONFIG_FEATURE_LS_COLOR_IS_DEFAULT=y
CONFIG_FEATURE_LS_WIDTH=y
CONFIG_MD5SUM=y
CONFIG_MKDIR=y
# CONFIG_FEATURE_MKDIR_LONG_OPTIONS is not set
@ -255,7 +262,10 @@ CONFIG_MV=y
# CONFIG_FEATURE_MV_LONG_OPTIONS is not set
CONFIG_NICE=y
CONFIG_NOHUP=y
CONFIG_NPROC=y
CONFIG_NL=n
CONFIG_OD=y
CONFIG_PASTE=n
CONFIG_PRINTENV=y
CONFIG_PRINTF=y
CONFIG_PWD=y
@ -267,6 +277,7 @@ CONFIG_RM=y
CONFIG_RMDIR=y
# CONFIG_FEATURE_RMDIR_LONG_OPTIONS is not set
CONFIG_SEQ=y
CONFIG_SHRED=n
CONFIG_SHA1SUM=y
CONFIG_SHA256SUM=y
CONFIG_SHA512SUM=y
@ -574,6 +585,7 @@ CONFIG_REV=y
# CONFIG_FLOCK is not set
# CONFIG_FREERAMDISK is not set
# CONFIG_FSCK_MINIX is not set
CONFIG_FSFREEZE=n
# CONFIG_MKFS_EXT2 is not set
# CONFIG_MKFS_MINIX is not set
# CONFIG_FEATURE_MINIX2 is not set
@ -584,6 +596,7 @@ CONFIG_FEATURE_GETOPT_LONG=y
CONFIG_HEXDUMP=y
CONFIG_FEATURE_HEXDUMP_REVERSE=y
CONFIG_HD=y
CONFIG_XXD=n
# CONFIG_HWCLOCK is not set
# CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS is not set
# CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS is not set
@ -663,8 +676,10 @@ CONFIG_FEATURE_LESS_ASK_TERMINAL=y
CONFIG_FEATURE_LESS_DASHCMD=y
CONFIG_FEATURE_LESS_LINENUMS=y
CONFIG_FEATURE_LESS_TRUNCATE=y
CONFIG_LSSCSI=n
# CONFIG_NANDWRITE is not set
# CONFIG_NANDDUMP is not set
CONFIG_PARTPROBE=n
# CONFIG_RFKILL is not set
# CONFIG_SETSERIAL is not set
# CONFIG_TASKSET is not set
@ -701,6 +716,7 @@ CONFIG_FEATURE_DC_LIBM=y
# CONFIG_FEATURE_DEVFS is not set
# CONFIG_DEVMEM is not set
# CONFIG_EJECT is not set
CONFIG_FALLOCATE=n
# CONFIG_FEATURE_EJECT_SCSI is not set
# CONFIG_FBSPLASH is not set
# CONFIG_FLASHCP is not set
@ -838,10 +854,12 @@ CONFIG_FEATURE_NETSTAT_PRG=y
CONFIG_PSCAN=y
CONFIG_ROUTE=y
# CONFIG_SLATTACH is not set
CONFIG_SSL_CLIENT=n
CONFIG_TCPSVD=y
CONFIG_TELNET=y
CONFIG_FEATURE_TELNET_TTYPE=y
CONFIG_FEATURE_TELNET_AUTOLOGIN=y
CONFIG_FEATURE_TELNET_WIDTH=y
CONFIG_TELNETD=y
CONFIG_FEATURE_TELNETD_STANDALONE=y
# CONFIG_FEATURE_TELNETD_INETD_WAIT is not set
@ -889,6 +907,7 @@ CONFIG_FEATURE_WGET_AUTHENTICATION=y
CONFIG_FEATURE_WGET_TIMEOUT=y
CONFIG_FEATURE_WGET_OPENSSL=n
CONFIG_FEATURE_WGET_SSL_HELPER=n
CONFIG_FEATURE_WGET_HTTPS=n
# CONFIG_ZCIP is not set
CONFIG_ZCAT=n
CONFIG_BZCAT=n
@ -933,6 +952,7 @@ CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS=y
CONFIG_FEATURE_TOP_SMP_CPU=y
CONFIG_FEATURE_TOP_DECIMALS=y
CONFIG_FEATURE_TOP_SMP_PROCESS=y
CONFIG_FEATURE_TOP_INTERACTIVE=y
CONFIG_FEATURE_TOPMEM=y
CONFIG_UPTIME=y
# CONFIG_FEATURE_UPTIME_UTMP_SUPPORT is not set
@ -1033,8 +1053,10 @@ CONFIG_BUSYBOX=y
CONFIG_DEBUG_SANITIZE=n
CONFIG_FEATURE_USE_BSS_TAIL=n
CONFIG_LINUXRC=n
CONFIG_LINK=n
CONFIG_LINUX32=y
CONFIG_LINUX64=y
CONFIG_SETPRIV=n
CONFIG_MKPASSWD=n
CONFIG_BLKDISCARD=n
CONFIG_NSENTER=n

10
packages/busybox/mktemp.c.patch → packages/busybox/coreutils-mktemp.c.patch

@ -1,7 +1,7 @@
diff -u -r ../busybox-1.22.1/debianutils/mktemp.c ./debianutils/mktemp.c
--- ../busybox-1.22.1/debianutils/mktemp.c 2014-01-09 19:15:44.000000000 +0100
+++ ./debianutils/mktemp.c 2014-06-26 12:52:38.386030778 +0200
@@ -43,7 +43,7 @@
diff -u -r ../busybox-1.27.1/coreutils/mktemp.c ./coreutils/mktemp.c
--- ../busybox-1.27.1/coreutils/mktemp.c 2017-07-06 15:14:57.000000000 +0000
+++ ./coreutils/mktemp.c 2017-07-24 23:44:41.384345896 +0000
@@ -52,7 +52,7 @@
//usage: "\n -p DIR Use DIR as a base directory (implies -t)"
//usage: "\n -u Do not create anything; print a name"
//usage: "\n"
@ -10,7 +10,7 @@ diff -u -r ../busybox-1.22.1/debianutils/mktemp.c ./debianutils/mktemp.c
//usage:
//usage:#define mktemp_example_usage
//usage: "$ mktemp /tmp/temp.XXXXXX\n"
@@ -69,7 +69,7 @@
@@ -78,7 +78,7 @@
path = getenv("TMPDIR");
if (!path || path[0] == '\0')

22
packages/busybox/httpd.patch → packages/busybox/networking-httpd.c.patch

@ -1,7 +1,7 @@
diff -u -r ../busybox-1.22.1/networking/httpd.c ./networking/httpd.c
--- ../busybox-1.22.1/networking/httpd.c 2014-01-09 19:15:44.000000000 +0100
+++ ./networking/httpd.c 2014-01-20 08:47:37.000000000 +0100
@@ -112,7 +112,7 @@
diff -u -r ../busybox-1.27.1/networking/httpd.c ./networking/httpd.c
--- ../busybox-1.27.1/networking/httpd.c 2017-07-06 15:14:57.000000000 +0000
+++ ./networking/httpd.c 2017-07-24 23:41:41.454424822 +0000
@@ -234,7 +234,7 @@
//usage: "\n -i Inetd mode"
//usage: "\n -f Don't daemonize"
//usage: "\n -v[v] Verbose"
@ -10,7 +10,7 @@ diff -u -r ../busybox-1.22.1/networking/httpd.c ./networking/httpd.c
//usage: IF_FEATURE_HTTPD_SETUID(
//usage: "\n -u USER[:GRP] Set uid/gid after binding to port")
//usage: IF_FEATURE_HTTPD_BASIC_AUTH(
@@ -371,7 +371,7 @@
@@ -491,7 +491,7 @@
SET_PTR_TO_GLOBALS(xzalloc(sizeof(G))); \
IF_FEATURE_HTTPD_BASIC_AUTH(g_realm = "Web Server Authentication";) \
IF_FEATURE_HTTPD_RANGES(range_start = -1;) \
@ -19,7 +19,7 @@ diff -u -r ../busybox-1.22.1/networking/httpd.c ./networking/httpd.c
index_page = index_html; \
file_size = -1; \
} while (0)
@@ -887,7 +887,7 @@
@@ -1007,7 +1007,7 @@
if (!errno && n && n <= 0xffff)
n = create_and_bind_stream_or_die(NULL, n);
else
@ -28,12 +28,12 @@ diff -u -r ../busybox-1.22.1/networking/httpd.c ./networking/httpd.c
xlisten(n, 9);
return n;
}
@@ -2245,7 +2245,7 @@
proxy_fd = socket(AF_INET, SOCK_STREAM, 0);
if (proxy_fd < 0)
send_headers_and_exit(HTTP_INTERNAL_SERVER_ERROR);
@@ -2396,7 +2396,7 @@
int proxy_fd;
len_and_sockaddr *lsa;
- lsa = host2sockaddr(proxy_entry->host_port, 80);
+ lsa = host2sockaddr(proxy_entry->host_port, 8080);
if (lsa == NULL)
send_headers_and_exit(HTTP_INTERNAL_SERVER_ERROR);
if (connect(proxy_fd, &lsa->u.sa, lsa->len) < 0)
proxy_fd = socket(lsa->u.sa.sa_family, SOCK_STREAM, 0);

13
packages/busybox/sendmail.patch

@ -1,13 +0,0 @@
diff --git a/mailutils/sendmail.c b/mailutils/sendmail.c
index 8ddb782..b542099 100644
--- a/mailutils/sendmail.c
+++ b/mailutils/sendmail.c
@@ -150,7 +150,7 @@ static char *sane_address(char *str)
trim(str);
s = str;
while (*s) {
- if (!isalnum(*s) && !strchr("_-.@", *s)) {
+ if (!isalnum(*s) && !strchr("+_-.@", *s)) {
bb_error_msg("bad address '%s'", str);
/* returning "": */
str[0] = '\0';

57
packages/busybox/wget.c.patch

@ -1,57 +0,0 @@
Apply fix for https://bugs.busybox.net/show_bug.cgi?id=9471 from git
diff --git a/networking/wget.c b/networking/wget.c
index c82086878..d5a92a950 100644
--- a/networking/wget.c
+++ b/networking/wget.c
@@ -137,6 +137,8 @@
#endif
+#define SSL_SUPPORTED (ENABLE_FEATURE_WGET_OPENSSL || ENABLE_FEATURE_WGET_SSL_HELPER)
+
struct host_info {
char *allocated;
const char *path;
@@ -147,7 +149,7 @@ struct host_info {
};
static const char P_FTP[] ALIGN1 = "ftp";
static const char P_HTTP[] ALIGN1 = "http";
-#if ENABLE_FEATURE_WGET_OPENSSL || ENABLE_FEATURE_WGET_SSL_HELPER
+#if SSL_SUPPORTED
static const char P_HTTPS[] ALIGN1 = "https";
#endif
@@ -448,7 +450,7 @@ static void parse_url(const char *src_url, struct host_info *h)
if (strcmp(url, P_FTP) == 0) {
h->port = bb_lookup_port(P_FTP, "tcp", 21);
} else
-#if ENABLE_FEATURE_WGET_OPENSSL || ENABLE_FEATURE_WGET_SSL_HELPER
+#if SSL_SUPPORTED
if (strcmp(url, P_HTTPS) == 0) {
h->port = bb_lookup_port(P_HTTPS, "tcp", 443);
h->protocol = P_HTTPS;
@@ -1089,12 +1091,17 @@ static void download_one_url(const char *url)
}
fflush(sfp);
- /* If we use SSL helper, keeping our end of the socket open for writing
- * makes our end (i.e. the same fd!) readable (EAGAIN instead of EOF)
- * even after child closes its copy of the fd.
- * This helps:
- */
- shutdown(fileno(sfp), SHUT_WR);
+
+#if SSL_SUPPORTED
+ if (target.protocol == P_HTTPS) {
+ /* If we use SSL helper, keeping our end of the socket open for writing
+ * makes our end (i.e. the same fd!) readable (EAGAIN instead of EOF)
+ * even after child closes its copy of the fd.
+ * This helps:
+ */
+ shutdown(fileno(sfp), SHUT_WR);
+ }
+#endif
/*
* Retrieve HTTP response line and check for "200" status code.
Loading…
Cancel
Save