Browse Source

Update busybox to 1.24.1

android-5
Fredrik Fornwall 9 years ago
parent
commit
46559847b1
  1. 3
      packages/busybox/build.sh
  2. 16
      packages/busybox/busybox.config
  3. 15
      packages/busybox/change_identity.c.patch
  4. 17
      packages/busybox/ftpd.c.patch
  5. 17
      packages/busybox/libbb-change_identity.c.patch
  6. 16
      packages/busybox/platform.h.patch
  7. 12
      packages/busybox/uname.c.patch

3
packages/busybox/build.sh

@ -1,8 +1,7 @@
TERMUX_PKG_HOMEPAGE=http://www.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.23.2
TERMUX_PKG_BUILD_REVISION=6
TERMUX_PKG_VERSION=1.24.1
TERMUX_PKG_SRCURL=http://www.busybox.net/downloads/busybox-${TERMUX_PKG_VERSION}.tar.bz2
TERMUX_PKG_BUILD_IN_SRC=yes

16
packages/busybox/busybox.config

@ -653,6 +653,7 @@ CONFIG_FEATURE_LESS_WINCH=y
CONFIG_FEATURE_LESS_ASK_TERMINAL=y
CONFIG_FEATURE_LESS_DASHCMD=y
CONFIG_FEATURE_LESS_LINENUMS=y
CONFIG_FEATURE_LESS_TRUNCATE=y
# CONFIG_NANDWRITE is not set
# CONFIG_NANDDUMP is not set
# CONFIG_RFKILL is not set
@ -757,7 +758,7 @@ CONFIG_ARP=y
CONFIG_FTPD=y
CONFIG_FEATURE_FTP_WRITE=y
CONFIG_FEATURE_FTPD_ACCEPT_BROKEN_LIST=y
CONFIG_FEATURE_FTP_AUTHENTICATION=y
CONFIG_FEATURE_FTP_AUTHENTICATION=n
CONFIG_FTPGET=y
CONFIG_FTPPUT=y
# CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS is not set
@ -873,6 +874,8 @@ CONFIG_FEATURE_WGET_STATUSBAR=y
CONFIG_FEATURE_WGET_AUTHENTICATION=y
# CONFIG_FEATURE_WGET_LONG_OPTIONS is not set
CONFIG_FEATURE_WGET_TIMEOUT=y
CONFIG_FEATURE_WGET_OPENSSL=n
CONFIG_FEATURE_WGET_SSL_HELPER=n
# CONFIG_ZCIP is not set
#
@ -1031,3 +1034,14 @@ CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=0
# CONFIG_KLOGD is not set
# CONFIG_FEATURE_KLOGD_KLOGCTL is not set
# CONFIG_LOGGER is not set
CONFIG_UNAME_OSNAME="Android"
CONFIG_FEATURE_GZIP_LEVELS=n
CONFIG_FEATURE_DD_STATUS=y
CONFIG_FEATURE_SYNC_FANCY=n
CONFIG_TRUNCATE=n
CONFIG_UEVENT=n
CONFIG_I2CGET=n
CONFIG_I2CSET=n
CONFIG_I2CDUMP=n
CONFIG_I2CDETECT=n

15
packages/busybox/change_identity.c.patch

@ -1,15 +0,0 @@
diff -u -r ../busybox-1.22.1/libbb/change_identity.c ./libbb/change_identity.c
--- ../busybox-1.22.1/libbb/change_identity.c 2014-01-09 19:15:44.000000000 +0100
+++ ./libbb/change_identity.c 2014-07-01 09:57:10.000000000 +0200
@@ -33,9 +33,11 @@
/* Become the user and group(s) specified by PW. */
void FAST_FUNC change_identity(const struct passwd *pw)
{
+#ifndef __ANDROID__
if (initgroups(pw->pw_name, pw->pw_gid) == -1)
bb_perror_msg_and_die("can't set groups");
endgrent(); /* helps to close a fd used internally by libc */
xsetgid(pw->pw_gid);
xsetuid(pw->pw_uid);
+#endif
}

17
packages/busybox/ftpd.c.patch

@ -1,17 +0,0 @@
We disable security, because chroot() does not work with our non-root usage.
With chdir() it's unsafe as a general network service,
but can be used for bootstrapping on a local network.
diff -u -r ../busybox-1.23.1/networking/ftpd.c ./networking/ftpd.c
--- ../busybox-1.23.1/networking/ftpd.c 2015-01-27 03:51:46.000000000 -0500
+++ ./networking/ftpd.c 2015-02-06 16:38:33.202473045 -0500
@@ -1230,7 +1230,7 @@
G.root_fd = xopen("/", O_RDONLY | O_DIRECTORY);
close_on_exec_on(G.root_fd);
#endif
- xchroot(argv[0]);
+ xchdir(argv[0]);
}
/* RFC-959 Section 5.1

17
packages/busybox/libbb-change_identity.c.patch

@ -0,0 +1,17 @@
diff -u -r ../busybox-1.24.1/libbb/change_identity.c ./libbb/change_identity.c
--- ../busybox-1.24.1/libbb/change_identity.c 2015-07-12 22:18:47.000000000 -0400
+++ ./libbb/change_identity.c 2015-10-26 19:29:18.972044695 -0400
@@ -33,6 +33,7 @@
/* Become the user and group(s) specified by PW. */
void FAST_FUNC change_identity(const struct passwd *pw)
{
+#ifndef __ANDROID__
int res;
res = initgroups(pw->pw_name, pw->pw_gid);
@@ -57,4 +58,5 @@
xsetgid(pw->pw_gid);
xsetuid(pw->pw_uid);
+#endif
}

16
packages/busybox/platform.h.patch

@ -1,16 +0,0 @@
Android do have dprintf, getline and stpcpy in android-21,
and having custom definitions for them breaks on i686.
diff -u -r ../busybox-1.22.1/include/platform.h ./include/platform.h
--- ../busybox-1.22.1/include/platform.h 2014-01-19 21:38:10.000000000 -0500
+++ ./include/platform.h 2014-12-23 10:43:15.959769041 -0500
@@ -447,9 +447,6 @@
#endif
#if defined(ANDROID) || defined(__ANDROID__)
-# undef HAVE_DPRINTF
-# undef HAVE_GETLINE
-# undef HAVE_STPCPY
# undef HAVE_STRCHRNUL
# undef HAVE_STRVERSCMP
# undef HAVE_UNLOCKED_LINE_OPS

12
packages/busybox/uname.c.patch

@ -1,12 +0,0 @@
diff -u -r ../busybox-1.22.1/coreutils/uname.c ./coreutils/uname.c
--- ../busybox-1.22.1/coreutils/uname.c 2014-01-09 19:15:44.000000000 +0100
+++ ./coreutils/uname.c 2014-07-01 08:21:16.000000000 +0200
@@ -139,7 +139,7 @@
#endif
strcpy(uname_info.processor, unknown_str);
strcpy(uname_info.platform, unknown_str);
- strcpy(uname_info.os, "GNU/Linux");
+ strcpy(uname_info.os, "Android");
#if 0
/* Fedora does something like this */
strcpy(uname_info.processor, uname_info.name.machine);
Loading…
Cancel
Save