From d9bf81ed122b699c63caf8ed1106a7fe58e59991 Mon Sep 17 00:00:00 2001 From: Leonid Pliushch Date: Wed, 2 Sep 2020 13:57:28 +0300 Subject: [PATCH] htop: update message for /proc/stat access denial Only engineering builds of Lineage OS allow free access to /proc/stat. Remove the mention of "install Lineage OS" to avoid confusion since official releases restrict /proc/stat access just like stock Android. --- packages/htop/build.sh | 2 +- packages/htop/no-proc-stat.patch | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/htop/build.sh b/packages/htop/build.sh index 2e6f7e14e..a02c4772a 100644 --- a/packages/htop/build.sh +++ b/packages/htop/build.sh @@ -2,7 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://htop.dev/ TERMUX_PKG_DESCRIPTION="Interactive process viewer for Linux" TERMUX_PKG_LICENSE="GPL-2.0" TERMUX_PKG_VERSION=3.0.0 -TERMUX_PKG_REVISION=1 +TERMUX_PKG_REVISION=2 TERMUX_PKG_SRCURL=https://github.com/htop-dev/htop/archive/${TERMUX_PKG_VERSION}/htop-${TERMUX_PKG_VERSION}.tar.gz TERMUX_PKG_SHA256=1c0661f0ae5f4e2874da250b60cd515e4ac4c041583221adfe95f10e18d1a4e6 # htop checks setlocale() return value for UTF-8 support, so use libandroid-support. diff --git a/packages/htop/no-proc-stat.patch b/packages/htop/no-proc-stat.patch index 6eb10be23..91c75829a 100644 --- a/packages/htop/no-proc-stat.patch +++ b/packages/htop/no-proc-stat.patch @@ -6,7 +6,7 @@ diff -uNr htop-3.0.0/linux/LinuxProcessList.c htop-3.0.0.mod/linux/LinuxProcessL file = fopen(PROCSTATFILE, "r"); if (file == NULL) { - CRT_fatalError("Cannot open " PROCSTATFILE); -+ CRT_fatalError("Cannot open '/proc/stat'.\nOn Android 8 and higher access to this file is restricted by SELinux.\nRoot your device and/or install Lineage OS in order to get 'htop' working properly.\n"); ++ CRT_fatalError("Cannot open '/proc/stat'.\nOn Android 8 and higher access to this file is restricted by SELinux.\nRoot your device in order to get 'htop' working properly.\n"); } int cpus = 0; do { @@ -15,7 +15,7 @@ diff -uNr htop-3.0.0/linux/LinuxProcessList.c htop-3.0.0.mod/linux/LinuxProcessL FILE* file = fopen(PROCSTATFILE, "r"); if (file == NULL) { - CRT_fatalError("Cannot open " PROCSTATFILE); -+ CRT_fatalError("Cannot open '/proc/stat'.\nOn Android 8 and higher access to this file is restricted by SELinux.\nRoot your device and/or install Lineage OS in order to get 'htop' working properly.\n"); ++ CRT_fatalError("Cannot open '/proc/stat'.\nOn Android 8 and higher access to this file is restricted by SELinux.\nRoot your device in order to get 'htop' working properly.\n"); } int cpus = this->super.cpuCount; assert(cpus > 0);