Browse Source

Use system top

Remove top both from busybox (which is broken on Android 8+), and
procps (which has issues on Android 8+) and use a system wrapper
in termux-tools instead.
android-5
Fredrik Fornwall 6 years ago
parent
commit
edbb4081d3
  1. 1
      packages/busybox/build.sh
  2. 9
      packages/busybox/busybox.config
  3. 4
      packages/procps/build.sh
  4. 5
      packages/termux-tools/build.sh

1
packages/busybox/build.sh

@ -2,6 +2,7 @@ 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.29.3
TERMUX_PKG_REVISION=1
TERMUX_PKG_SHA256=97648636e579462296478e0218e65e4bc1e9cd69089a3b1aeb810bff7621efb7
TERMUX_PKG_SRCURL=https://busybox.net/downloads/busybox-${TERMUX_PKG_VERSION}.tar.bz2
TERMUX_PKG_BUILD_IN_SRC=yes

9
packages/busybox/busybox.config

@ -958,14 +958,7 @@ CONFIG_POWEROFF=n
CONFIG_PSTREE=y
CONFIG_PWDX=y
CONFIG_SMEMCAP=y
CONFIG_TOP=y
CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE=y
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_TOP=n
CONFIG_UPTIME=y
# CONFIG_FEATURE_UPTIME_UTMP_SUPPORT is not set
CONFIG_FREE=y

4
packages/procps/build.sh

@ -1,7 +1,7 @@
TERMUX_PKG_HOMEPAGE=https://gitlab.com/procps-ng/procps
TERMUX_PKG_DESCRIPTION="Utilities that give information about processes using the /proc filesystem"
TERMUX_PKG_VERSION=3.3.15
TERMUX_PKG_REVISION=1
TERMUX_PKG_REVISION=2
TERMUX_PKG_SHA256=10bd744ffcb3de2d591d2f6acf1a54a7ba070fdcc432a855931a5057149f0465
TERMUX_PKG_SRCURL=https://fossies.org/linux/misc/procps-ng-$TERMUX_PKG_VERSION.tar.xz
TERMUX_PKG_BUILD_IN_SRC=yes
@ -18,7 +18,9 @@ TERMUX_PKG_DEPENDS="ncurses"
# About kill: https://bugs.launchpad.net/ubuntu/+source/coreutils/+bug/141168:
# "For compatibility between distributions, can we have /bin/kill made available from coreutils?"
# About uptime: Does not work on later android versions as /proc/uptime cannot be read.
# About top: The system top works better.
TERMUX_PKG_RM_AFTER_INSTALL="
bin/top share/man/man1/top.1
bin/kill share/man/man1/kill.1
bin/slabtop share/man/man1/slabtop.1
bin/uptime share/man/man1/uptime.1

5
packages/termux-tools/build.sh

@ -1,16 +1,17 @@
TERMUX_PKG_HOMEPAGE=https://termux.com/
TERMUX_PKG_DESCRIPTION="Basic system tools for Termux"
TERMUX_PKG_VERSION=0.56
TERMUX_PKG_VERSION=0.58
TERMUX_PKG_PLATFORM_INDEPENDENT=yes
TERMUX_PKG_ESSENTIAL=yes
TERMUX_PKG_DEPENDS="termux-am"
TERMUX_PKG_CONFFILES="etc/motd"
TERMUX_PKG_CONFLICTS="procps (<< 3.3.15-2)"
termux_step_make_install () {
mkdir -p $TERMUX_PREFIX/bin/applets
# Remove LD_LIBRARY_PATH from environment to avoid conflicting
# with system libraries that system binaries may link against:
for tool in df getprop logcat ping ping6 ip pm settings; do
for tool in df getprop logcat ping ping6 ip pm settings top; do
WRAPPER_FILE=$TERMUX_PREFIX/bin/$tool
echo '#!/bin/sh' > $WRAPPER_FILE
echo 'unset LD_LIBRARY_PATH LD_PRELOAD' >> $WRAPPER_FILE

Loading…
Cancel
Save