From b26c47c04a18c9a9491573ac2ce09cc4046f1aeb Mon Sep 17 00:00:00 2001 From: Leonid Plyushch Date: Tue, 23 Jul 2019 17:42:29 +0300 Subject: [PATCH] util-linux: update to 2.34 --- packages/util-linux/build.sh | 9 +- packages/util-linux/fix-paths.patch | 390 +++++++++++++--------------- 2 files changed, 193 insertions(+), 206 deletions(-) diff --git a/packages/util-linux/build.sh b/packages/util-linux/build.sh index 24a81e9f0..58096ed4d 100644 --- a/packages/util-linux/build.sh +++ b/packages/util-linux/build.sh @@ -1,22 +1,27 @@ TERMUX_PKG_HOMEPAGE=https://en.wikipedia.org/wiki/Util-linux TERMUX_PKG_DESCRIPTION="Miscellaneous system utilities" TERMUX_PKG_LICENSE="GPL-2.0" -TERMUX_PKG_VERSION=2.33.2 +TERMUX_PKG_VERSION=2.34 TERMUX_PKG_SRCURL=https://www.kernel.org/pub/linux/utils/util-linux/v${TERMUX_PKG_VERSION:0:4}/util-linux-${TERMUX_PKG_VERSION}.tar.xz -TERMUX_PKG_SHA256=631be8eac6cf6230ba478de211941d526808dba3cd436380793334496013ce97 +TERMUX_PKG_SHA256=743f9d0c7252b6db246b659c1e1ce0bd45d8d4508b4dfa427bbb4a3e9b9f62b5 TERMUX_PKG_DEPENDS="ncurses, libutil, libcrypt, zlib" TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" ac_cv_func_setns=yes ac_cv_func_unshare=yes --disable-agetty +--disable-ctrlaltdel --disable-eject +--disable-fdformat --disable-ipcrm --disable-ipcs --disable-kill --disable-last --disable-libuuid --disable-logger +--disable-mesg +--disable-nologin --disable-pivot_root +--disable-raw --disable-switch_root --disable-wall --disable-libmount diff --git a/packages/util-linux/fix-paths.patch b/packages/util-linux/fix-paths.patch index 32cafaa72..669341587 100644 --- a/packages/util-linux/fix-paths.patch +++ b/packages/util-linux/fix-paths.patch @@ -1,166 +1,148 @@ -diff -uNr util-linux-2.33.2/include/pathnames.h util-linux-2.33.2.mod/include/pathnames.h ---- util-linux-2.33.2/include/pathnames.h 2019-04-09 14:13:15.392600293 +0300 -+++ util-linux-2.33.2.mod/include/pathnames.h 2019-05-19 22:25:24.919315467 +0300 -@@ -19,68 +19,58 @@ - - /* DEFPATHs from don't include /usr/local */ - #undef _PATH_DEFPATH -- --#ifdef USE_USRDIR_PATHS_ONLY --# define _PATH_DEFPATH "/usr/local/bin:/usr/bin" --#else --# define _PATH_DEFPATH "/usr/local/bin:/bin:/usr/bin" --#endif -+#define _PATH_DEFPATH "@TERMUX_PREFIX@/bin:@TERMUX_PREFIX@/bin/applets" - - #undef _PATH_DEFPATH_ROOT -- --#ifdef USE_USRDIR_PATHS_ONLY --# define _PATH_DEFPATH_ROOT "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin" --#else --# define _PATH_DEFPATH_ROOT "/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" --#endif -+#define _PATH_DEFPATH_ROOT "@TERMUX_PREFIX@/bin:@TERMUX_PREFIX@/bin/applets" - - #define _PATH_HUSHLOGIN ".hushlogin" --#define _PATH_HUSHLOGINS "/etc/hushlogins" -+#define _PATH_HUSHLOGINS "@TERMUX_PREFIX@/etc/hushlogins" - --#define _PATH_NOLOGIN_TXT "/etc/nologin.txt" -+#define _PATH_NOLOGIN_TXT "@TERMUX_PREFIX@/etc/nologin.txt" - - #ifndef _PATH_MAILDIR --# define _PATH_MAILDIR "/var/spool/mail" -+# define _PATH_MAILDIR "@TERMUX_PREFIX@/var/spool/mail" - #endif --#define _PATH_MOTDFILE "/usr/share/misc/motd:/run/motd:/etc/motd" -+#define _PATH_MOTDFILE "@TERMUX_PREFIX@/share/misc/motd:@TERMUX_PREFIX@/var/run/motd:@TERMUX_PREFIX@/etc/motd" - #ifndef _PATH_NOLOGIN --# define _PATH_NOLOGIN "/etc/nologin" -+# define _PATH_NOLOGIN "@TERMUX_PREFIX@/etc/nologin" - #endif --#define _PATH_VAR_NOLOGIN "/var/run/nologin" -+#define _PATH_VAR_NOLOGIN "@TERMUX_PREFIX@/var/run/nologin" - - #ifndef _PATH_LOGIN --# define _PATH_LOGIN "/bin/login" -+# define _PATH_LOGIN "@TERMUX_PREFIX@/bin/login" - #endif --#define _PATH_SHUTDOWN "/sbin/shutdown" -+#define _PATH_SHUTDOWN "@TERMUX_PREFIX@/bin/shutdown" - - #define _PATH_TERMCOLORS_DIRNAME "terminal-colors.d" --#define _PATH_TERMCOLORS_DIR "/etc/" _PATH_TERMCOLORS_DIRNAME -+#define _PATH_TERMCOLORS_DIR "@TERMUX_PREFIX@/etc/" _PATH_TERMCOLORS_DIRNAME - - /* login paths */ --#define _PATH_PASSWD "/etc/passwd" --#define _PATH_GSHADOW "/etc/gshadow" --#define _PATH_GROUP "/etc/group" --#define _PATH_SHADOW_PASSWD "/etc/shadow" --#define _PATH_SHELLS "/etc/shells" -+#define _PATH_PASSWD "@TERMUX_PREFIX@/etc/passwd" -+#define _PATH_GSHADOW "@TERMUX_PREFIX@/etc/gshadow" -+#define _PATH_GROUP "@TERMUX_PREFIX@/etc/group" -+#define _PATH_SHADOW_PASSWD "@TERMUX_PREFIX@/etc/shadow" -+#define _PATH_SHELLS "@TERMUX_PREFIX@/etc/shells" - - #ifndef _PATH_BTMP --# define _PATH_BTMP "/var/log/btmp" -+# define _PATH_BTMP "@TERMUX_PREFIX@/var/log/btmp" - #endif - --#define _PATH_ISSUE "/etc/issue" -+#define _PATH_ISSUE "@TERMUX_PREFIX@/etc/issue" - #define _PATH_ISSUEDIR _PATH_ISSUE ".d" - --#define _PATH_OS_RELEASE_ETC "/etc/os-release" --#define _PATH_OS_RELEASE_USR "/usr/lib/os-release" -+#define _PATH_OS_RELEASE_ETC "@TERMUX_PREFIX@/etc/os-release" -+#define _PATH_OS_RELEASE_USR "@TERMUX_PREFIX@/lib/os-release" - #define _PATH_NUMLOCK_ON _PATH_RUNSTATEDIR "/numlock-on" --#define _PATH_LOGINDEFS "/etc/login.defs" -+#define _PATH_LOGINDEFS "@TERMUX_PREFIX@/etc/login.defs" - - /* misc paths */ --#define _PATH_WORDS "/usr/share/dict/words" --#define _PATH_WORDS_ALT "/usr/share/dict/web2" -+#define _PATH_WORDS "@TERMUX_PREFIX@/share/dict/words" -+#define _PATH_WORDS_ALT "@TERMUX_PREFIX@/share/dict/web2" - - /* mount paths */ --#define _PATH_FILESYSTEMS "/etc/filesystems" -+#define _PATH_FILESYSTEMS "@TERMUX_PREFIX@/etc/filesystems" - #define _PATH_PROC_SWAPS "/proc/swaps" - #define _PATH_PROC_FILESYSTEMS "/proc/filesystems" - #define _PATH_PROC_MOUNTS "/proc/mounts" -@@ -111,7 +101,7 @@ - # ifdef MOUNTED /* deprecated */ - # define _PATH_MOUNTED MOUNTED - # else --# define _PATH_MOUNTED "/etc/mtab" -+# define _PATH_MOUNTED "@TERMUX_PREFIX@/etc/mtab" - # endif - #endif - -@@ -119,7 +109,7 @@ - # ifdef MNTTAB /* deprecated */ - # define _PATH_MNTTAB MNTTAB - # else --# define _PATH_MNTTAB "/etc/fstab" -+# define _PATH_MNTTAB "@TERMUX_PREFIX@/etc/fstab" - # endif - #endif - -@@ -146,11 +136,7 @@ - #define _PATH_DEV_BYPARTUUID "/dev/disk/by-partuuid" - - /* hwclock paths */ --#ifdef CONFIG_ADJTIME_PATH --# define _PATH_ADJTIME CONFIG_ADJTIME_PATH --#else --# define _PATH_ADJTIME "/etc/adjtime" --#endif -+#define _PATH_ADJTIME "@TERMUX_PREFIX@/etc/adjtime" - - #ifdef __ia64__ - # define _PATH_RTC_DEV "/dev/efirtc" -diff -uNr util-linux-2.33.2/lib/exec_shell.c util-linux-2.33.2.mod/lib/exec_shell.c ---- util-linux-2.33.2/lib/exec_shell.c 2018-09-20 15:38:55.851404915 +0300 -+++ util-linux-2.33.2.mod/lib/exec_shell.c 2019-05-19 22:25:24.919315467 +0300 +diff -uNr util-linux-2.34/include/pathnames.h util-linux-2.34.mod/include/pathnames.h +--- util-linux-2.34/include/pathnames.h 2019-06-06 13:38:50.260626816 +0300 ++++ util-linux-2.34.mod/include/pathnames.h 2019-07-23 17:41:33.987363668 +0300 +@@ -198,4 +198,105 @@ + #define _PATH_DEV_RFKILL "/dev/rfkill" + #define _PATH_SYS_RFKILL "/sys/class/rfkill" + ++// On Android (Termux) paths are different. ++#if defined(__ANDROID__) ++# undef _PATH_DEFPATH ++# undef _PATH_DEFPATH_ROOT ++# undef _PATH_HUSHLOGINS ++# undef _PATH_NOLOGIN_TXT ++# undef _PATH_MAILDIR ++# undef _PATH_MOTDFILE ++# undef _PATH_NOLOGIN ++# undef _PATH_VAR_NOLOGIN ++# undef _PATH_LOGIN ++# undef _PATH_SHUTDOWN ++# undef _PATH_POWEROFF ++# undef _PATH_TERMCOLORS_DIR ++# undef _PATH_PASSWD ++# undef _PATH_GSHADOW ++# undef _PATH_GROUP ++# undef _PATH_SHADOW_PASSWD ++# undef _PATH_SHELLS ++# undef _PATH_BTMP ++# undef _PATH_ISSUE ++# undef _PATH_ISSUEDIR ++# undef _PATH_OS_RELEASE_ETC ++# undef _PATH_OS_RELEASE_USR ++# undef _PATH_LOGINDEFS ++# undef _PATH_WORDS ++# undef _PATH_WORDS_ALT ++# undef _PATH_FILESYSTEMS ++# undef _PATH_MOUNTED ++# undef _PATH_MNTTAB ++# undef _PATH_DEV_LOOP ++# undef _PATH_DEV_BYLABEL ++# undef _PATH_DEV_BYUUID ++# undef _PATH_DEV_BYID ++# undef _PATH_DEV_BYPATH ++# undef _PATH_DEV_BYPARTLABEL ++# undef _PATH_DEV_BYPARTUUID ++# undef _PATH_ADJTIME ++ ++# define _PATH_DEFPATH "@TERMUX_PREFIX@/bin:@TERMUX_PREFIX@/bin/applets" ++# define _PATH_DEFPATH_ROOT _PATH_DEFPATH ++ ++// Unused and not needed in Termux. ++# define _PATH_HUSHLOGINS "@TERMUX_PREFIX@/etc/hushlogins" ++# define _PATH_NOLOGIN_TXT "@TERMUX_PREFIX@/etc/nologin.txt" ++# define _PATH_NOLOGIN "@TERMUX_PREFIX@/etc/nologin" ++# define _PATH_VAR_NOLOGIN "@TERMUX_PREFIX@/var/run/nologin" ++ ++# define _PATH_MAILDIR "@TERMUX_PREFIX@/var/spool/mail" ++# define _PATH_MOTDFILE "@TERMUX_PREFIX@/etc/motd" ++# define _PATH_LOGIN "@TERMUX_PREFIX@/bin/login" ++# define _PATH_SHUTDOWN "@TERMUX_PREFIX@/bin/shutdown" ++# define _PATH_POWEROFF "@TERMUX_PREFIX@/bin/poweroff" ++# define _PATH_TERMCOLORS_DIR "@TERMUX_PREFIX@/etc/" _PATH_TERMCOLORS_DIRNAME ++ ++// Termux doesn't support multiuser environment. ++// Some Android versions support /etc/passwd and /etc/group but files ++// /etc/shadow and /etc/gshadow are not supported. ++# define _PATH_PASSWD "/system/etc/passwd" ++# define _PATH_GSHADOW "/system/etc/gshadow" ++# define _PATH_GROUP "/system/etc/group" ++# define _PATH_SHADOW_PASSWD "/system/etc/shadow" ++ ++// Ignored in Termux. ++# define _PATH_SHELLS "@TERMUX_PREFIX@/etc/shells" ++ ++// btmp, (and utmp/wtmp) files are unsupported. ++# define _PATH_BTMP "@TERMUX_PREFIX@/var/log/btmp" ++ ++# define _PATH_ISSUE "@TERMUX_PREFIX@/etc/issue" ++# define _PATH_ISSUEDIR _PATH_ISSUE ".d" ++ ++// os release definition is not available in Termux. ++# define _PATH_OS_RELEASE_ETC "@TERMUX_PREFIX@/etc/os-release" ++# define _PATH_OS_RELEASE_USR "@TERMUX_PREFIX@/lib/os-release" ++ ++// login configuration is unsupported. ++# define _PATH_LOGINDEFS "@TERMUX_PREFIX@/etc/login.defs" ++ ++# define _PATH_WORDS "@TERMUX_PREFIX@/share/dict/words" ++# define _PATH_WORDS_ALT "@TERMUX_PREFIX@/share/dict/web2" ++ ++// Not available. ++# define _PATH_FILESYSTEMS "@TERMUX_PREFIX@/etc/filesystems" ++ ++# define _PATH_MOUNTED "/proc/self/mounts" ++ ++// Not available. ++# define _PATH_MNTTAB "@TERMUX_PREFIX@/etc/fstab" ++ ++# define _PATH_DEV_LOOP "/dev/block/loop" ++# define _PATH_DEV_BYLABEL "/dev/block/by-label" ++# define _PATH_DEV_BYUUID "/dev/block/by-uuid" ++# define _PATH_DEV_BYID "/dev/block/by-id" ++# define _PATH_DEV_BYPATH "/dev/block/by-path" ++# define _PATH_DEV_BYPARTLABEL "/dev/block/by-name" ++# define _PATH_DEV_BYPARTUUID "/dev/block/by-partuuid" ++ ++# define _PATH_ADJTIME "@TERMUX_PREFIX@/etc/adjtime" ++#endif ++ + #endif /* PATHNAMES_H */ +diff -uNr util-linux-2.34/lib/exec_shell.c util-linux-2.34.mod/lib/exec_shell.c +--- util-linux-2.34/lib/exec_shell.c 2018-09-20 15:38:55.851404915 +0300 ++++ util-linux-2.34.mod/lib/exec_shell.c 2019-07-23 16:55:28.498453815 +0300 @@ -28,7 +28,7 @@ - + #include "exec_shell.h" - + -#define DEFAULT_SHELL "/bin/sh" +#define DEFAULT_SHELL "@TERMUX_PREFIX@/bin/sh" - + void __attribute__((__noreturn__)) exec_shell(void) { -diff -uNr util-linux-2.33.2/libblkid/src/blkidP.h util-linux-2.33.2.mod/libblkid/src/blkidP.h ---- util-linux-2.33.2/libblkid/src/blkidP.h 2019-04-09 14:13:15.393600282 +0300 -+++ util-linux-2.33.2.mod/libblkid/src/blkidP.h 2019-05-19 22:25:24.919315467 +0300 -@@ -288,7 +288,7 @@ +diff -uNr util-linux-2.34/libblkid/src/blkidP.h util-linux-2.34.mod/libblkid/src/blkidP.h +--- util-linux-2.34/libblkid/src/blkidP.h 2019-04-10 14:28:20.589837335 +0300 ++++ util-linux-2.34.mod/libblkid/src/blkidP.h 2019-07-23 16:55:28.498453815 +0300 +@@ -286,7 +286,7 @@ #define BLKID_BIC_FL_CHANGED 0x0004 /* Cache has changed from disk */ - + /* config file */ -#define BLKID_CONFIG_FILE "/etc/blkid.conf" +#define BLKID_CONFIG_FILE "@TERMUX_PREFIX@/etc/blkid.conf" - + /* cache file on systemds with /run */ #define BLKID_RUNTIME_TOPDIR "/run" -@@ -296,7 +296,7 @@ +@@ -294,7 +294,7 @@ #define BLKID_CACHE_FILE BLKID_RUNTIME_DIR "/blkid.tab" - + /* old systems */ -#define BLKID_CACHE_FILE_OLD "/etc/blkid.tab" +#define BLKID_CACHE_FILE_OLD "@TERMUX_PREFIX@/etc/blkid.tab" - + #define BLKID_PROBE_OK 0 #define BLKID_PROBE_NONE 1 -diff -uNr util-linux-2.33.2/libblkid/src/topology/dm.c util-linux-2.33.2.mod/libblkid/src/topology/dm.c ---- util-linux-2.33.2/libblkid/src/topology/dm.c 2019-02-22 12:17:43.709854171 +0200 -+++ util-linux-2.33.2.mod/libblkid/src/topology/dm.c 2019-05-19 22:25:24.919315467 +0300 +diff -uNr util-linux-2.34/libblkid/src/topology/dm.c util-linux-2.34.mod/libblkid/src/topology/dm.c +--- util-linux-2.34/libblkid/src/topology/dm.c 2019-02-22 12:17:43.709854171 +0200 ++++ util-linux-2.34.mod/libblkid/src/topology/dm.c 2019-07-23 16:55:28.498453815 +0300 @@ -30,9 +30,8 @@ const struct blkid_idmag *mag __attribute__((__unused__))) { @@ -173,9 +155,9 @@ diff -uNr util-linux-2.33.2/libblkid/src/topology/dm.c util-linux-2.33.2.mod/lib }; int dmpipe[] = { -1, -1 }, stripes, stripesize; const char *cmd = NULL; -diff -uNr util-linux-2.33.2/libblkid/src/topology/lvm.c util-linux-2.33.2.mod/libblkid/src/topology/lvm.c ---- util-linux-2.33.2/libblkid/src/topology/lvm.c 2017-09-18 12:48:03.563891490 +0300 -+++ util-linux-2.33.2.mod/libblkid/src/topology/lvm.c 2019-05-19 22:25:24.919315467 +0300 +diff -uNr util-linux-2.34/libblkid/src/topology/lvm.c util-linux-2.34.mod/libblkid/src/topology/lvm.c +--- util-linux-2.34/libblkid/src/topology/lvm.c 2017-09-18 12:48:03.563891490 +0300 ++++ util-linux-2.34.mod/libblkid/src/topology/lvm.c 2019-07-23 16:55:28.498453815 +0300 @@ -36,9 +36,8 @@ const struct blkid_idmag *mag __attribute__((__unused__))) { @@ -188,35 +170,35 @@ diff -uNr util-linux-2.33.2/libblkid/src/topology/lvm.c util-linux-2.33.2.mod/li }; int lvpipe[] = { -1, -1 }, stripes = 0, stripesize = 0; FILE *stream = NULL; -diff -uNr util-linux-2.33.2/libuuid/src/uuidd.h util-linux-2.33.2.mod/libuuid/src/uuidd.h ---- util-linux-2.33.2/libuuid/src/uuidd.h 2018-06-04 10:57:02.806445781 +0300 -+++ util-linux-2.33.2.mod/libuuid/src/uuidd.h 2019-05-19 22:25:24.919315467 +0300 +diff -uNr util-linux-2.34/libuuid/src/uuidd.h util-linux-2.34.mod/libuuid/src/uuidd.h +--- util-linux-2.34/libuuid/src/uuidd.h 2018-06-04 10:57:02.806445781 +0300 ++++ util-linux-2.34.mod/libuuid/src/uuidd.h 2019-07-23 16:55:28.498453815 +0300 @@ -38,7 +38,7 @@ #define UUIDD_DIR _PATH_RUNSTATEDIR "/uuidd" #define UUIDD_SOCKET_PATH UUIDD_DIR "/request" #define UUIDD_PIDFILE_PATH UUIDD_DIR "/uuidd.pid" -#define UUIDD_PATH "/usr/sbin/uuidd" +#define UUIDD_PATH "@TERMUX_PREFIX@/bin/uuidd" - + #define UUIDD_OP_GETPID 0 #define UUIDD_OP_GET_MAXOP 1 -diff -uNr util-linux-2.33.2/libuuid/src/uuidP.h util-linux-2.33.2.mod/libuuid/src/uuidP.h ---- util-linux-2.33.2/libuuid/src/uuidP.h 2019-02-22 12:17:43.722854062 +0200 -+++ util-linux-2.33.2.mod/libuuid/src/uuidP.h 2019-05-19 22:25:24.920315472 +0300 +diff -uNr util-linux-2.34/libuuid/src/uuidP.h util-linux-2.34.mod/libuuid/src/uuidP.h +--- util-linux-2.34/libuuid/src/uuidP.h 2019-02-22 12:17:43.722854062 +0200 ++++ util-linux-2.34.mod/libuuid/src/uuidP.h 2019-07-23 16:55:28.498453815 +0300 @@ -37,7 +37,7 @@ - + #include "uuid.h" - + -#define LIBUUID_CLOCK_FILE "/var/lib/libuuid/clock.txt" +#define LIBUUID_CLOCK_FILE "@TERMUX_PREFIX@/var/lib/libuuid/clock.txt" - + /* * Offset between 15-Oct-1582 and 1-Jan-70 -diff -uNr util-linux-2.33.2/login-utils/login.c util-linux-2.33.2.mod/login-utils/login.c ---- util-linux-2.33.2/login-utils/login.c 2019-04-09 14:13:15.398600230 +0300 -+++ util-linux-2.33.2.mod/login-utils/login.c 2019-05-19 22:25:24.920315472 +0300 -@@ -1358,7 +1358,7 @@ - +diff -uNr util-linux-2.34/login-utils/login.c util-linux-2.34.mod/login-utils/login.c +--- util-linux-2.34/login-utils/login.c 2019-05-27 12:53:09.756205982 +0300 ++++ util-linux-2.34.mod/login-utils/login.c 2019-07-23 16:55:28.501787205 +0300 +@@ -1359,7 +1359,7 @@ + strcpy(buff, "exec "); strcat(buff, pwd->pw_shell); - childArgv[childArgc++] = "/bin/sh"; @@ -224,31 +206,31 @@ diff -uNr util-linux-2.33.2/login-utils/login.c util-linux-2.33.2.mod/login-util childArgv[childArgc++] = "-sh"; childArgv[childArgc++] = "-c"; childArgv[childArgc++] = buff; -@@ -1377,7 +1377,7 @@ - +@@ -1378,7 +1378,7 @@ + execvp(childArgv[0], childArgv + 1); - + - if (!strcmp(childArgv[0], "/bin/sh")) + if (!strcmp(childArgv[0], "@TERMUX_PREFIX@/bin/sh")) warn(_("couldn't exec shell script")); else warn(_("no shell")); -diff -uNr util-linux-2.33.2/login-utils/su-common.c util-linux-2.33.2.mod/login-utils/su-common.c ---- util-linux-2.33.2/login-utils/su-common.c 2019-04-09 14:13:15.399600220 +0300 -+++ util-linux-2.33.2.mod/login-utils/su-common.c 2019-05-19 22:25:24.920315472 +0300 +diff -uNr util-linux-2.34/login-utils/su-common.c util-linux-2.34.mod/login-utils/su-common.c +--- util-linux-2.34/login-utils/su-common.c 2019-04-24 13:44:31.858967658 +0300 ++++ util-linux-2.34.mod/login-utils/su-common.c 2019-07-23 16:55:28.501787205 +0300 @@ -96,7 +96,7 @@ #define is_pam_failure(_rc) ((_rc) != PAM_SUCCESS) - + /* The shell to run if none is given in the user's passwd entry. */ -#define DEFAULT_SHELL "/bin/sh" +#define DEFAULT_SHELL "@TERMUX_PREFIX@/bin/sh" - + /* The user to become if none is specified. */ #define DEFAULT_USER "root" -diff -uNr util-linux-2.33.2/login-utils/sulogin.c util-linux-2.33.2.mod/login-utils/sulogin.c ---- util-linux-2.33.2/login-utils/sulogin.c 2019-02-22 12:17:43.725854037 +0200 -+++ util-linux-2.33.2.mod/login-utils/sulogin.c 2019-05-19 22:25:24.920315472 +0300 -@@ -742,7 +742,7 @@ +diff -uNr util-linux-2.34/login-utils/sulogin.c util-linux-2.34.mod/login-utils/sulogin.c +--- util-linux-2.34/login-utils/sulogin.c 2019-05-20 13:35:38.631791539 +0300 ++++ util-linux-2.34.mod/login-utils/sulogin.c 2019-07-23 16:55:28.501787205 +0300 +@@ -743,7 +743,7 @@ if (pwd->pw_shell[0]) su_shell = pwd->pw_shell; else @@ -257,10 +239,10 @@ diff -uNr util-linux-2.33.2/login-utils/sulogin.c util-linux-2.33.2.mod/login-ut } if ((p = strrchr(su_shell, '/')) == NULL) p = su_shell; -@@ -791,9 +791,9 @@ +@@ -792,9 +792,9 @@ execl(su_shell, shell, NULL); warn(_("failed to execute %s"), su_shell); - + - xsetenv("SHELL", "/bin/sh", 1); - execl("/bin/sh", profile ? "-sh" : "sh", NULL); - warn(_("failed to execute %s"), "/bin/sh"); @@ -268,14 +250,14 @@ diff -uNr util-linux-2.33.2/login-utils/sulogin.c util-linux-2.33.2.mod/login-ut + execl("@TERMUX_PREFIX@/bin/sh", profile ? "-sh" : "sh", NULL); + warn(_("failed to execute %s"), "@TERMUX_PREFIX@/bin/sh"); } - + static void usage(void) -diff -uNr util-linux-2.33.2/misc-utils/whereis.c util-linux-2.33.2.mod/misc-utils/whereis.c ---- util-linux-2.33.2/misc-utils/whereis.c 2019-04-09 14:13:15.401600199 +0300 -+++ util-linux-2.33.2.mod/misc-utils/whereis.c 2019-05-19 22:28:53.038429658 +0300 +diff -uNr util-linux-2.34/misc-utils/whereis.c util-linux-2.34.mod/misc-utils/whereis.c +--- util-linux-2.34/misc-utils/whereis.c 2019-05-23 14:51:09.593338063 +0300 ++++ util-linux-2.34.mod/misc-utils/whereis.c 2019-07-23 16:55:28.501787205 +0300 @@ -97,82 +97,21 @@ }; - + static const char *bindirs[] = { - "/usr/bin", - "/usr/sbin", @@ -338,7 +320,7 @@ diff -uNr util-linux-2.33.2/misc-utils/whereis.c util-linux-2.33.2.mod/misc-util + "/system/xbin", NULL }; - + static const char *mandirs[] = { - "/usr/man/*", - "/usr/share/man/*", @@ -351,7 +333,7 @@ diff -uNr util-linux-2.33.2/misc-utils/whereis.c util-linux-2.33.2.mod/misc-util + "@TERMUX_PREFIX@/share/info", NULL }; - + static const char *srcdirs[] = { - "/usr/src/*", - "/usr/src/lib/libc/*", @@ -362,11 +344,11 @@ diff -uNr util-linux-2.33.2/misc-utils/whereis.c util-linux-2.33.2.mod/misc-util + "@TERMUX_PREFIX@/src", NULL }; - -diff -uNr util-linux-2.33.2/sys-utils/setarch.c util-linux-2.33.2.mod/sys-utils/setarch.c ---- util-linux-2.33.2/sys-utils/setarch.c 2019-04-09 14:13:15.464599542 +0300 -+++ util-linux-2.33.2.mod/sys-utils/setarch.c 2019-05-19 22:25:24.921315478 +0300 -@@ -315,7 +315,7 @@ + +diff -uNr util-linux-2.34/sys-utils/setarch.c util-linux-2.34.mod/sys-utils/setarch.c +--- util-linux-2.34/sys-utils/setarch.c 2019-05-28 14:07:37.094903856 +0300 ++++ util-linux-2.34.mod/sys-utils/setarch.c 2019-07-23 16:55:28.501787205 +0300 +@@ -328,7 +328,7 @@ /* Don't use ifdef sparc here, we get "Unrecognized architecture" * error message later if necessary */ if (strcmp(arch, "sparc32bash") == 0) { @@ -375,32 +357,32 @@ diff -uNr util-linux-2.33.2/sys-utils/setarch.c util-linux-2.33.2.mod/sys-utils/ shell_arg = ""; goto set_arch; } -@@ -425,7 +425,7 @@ +@@ -437,7 +437,7 @@ verify_arch_domain(target, arch); - + if (!argc) { - shell = "/bin/sh"; + shell = "@TERMUX_PREFIX@/bin/sh"; shell_arg = "-sh"; } if (verbose) { -diff -uNr util-linux-2.33.2/sys-utils/setpriv.c util-linux-2.33.2.mod/sys-utils/setpriv.c ---- util-linux-2.33.2/sys-utils/setpriv.c 2019-02-22 12:17:43.810853328 +0200 -+++ util-linux-2.33.2.mod/sys-utils/setpriv.c 2019-05-19 22:25:24.921315478 +0300 +diff -uNr util-linux-2.34/sys-utils/setpriv.c util-linux-2.34.mod/sys-utils/setpriv.c +--- util-linux-2.34/sys-utils/setpriv.c 2019-05-28 14:10:54.998680500 +0300 ++++ util-linux-2.34.mod/sys-utils/setpriv.c 2019-07-23 16:55:28.505120594 +0300 @@ -58,7 +58,7 @@ #define SETPRIV_EXIT_PRIVERR 127 /* how we exit when we fail to set privs */ - + /* The shell to set SHELL env.variable if none is given in the user's passwd entry. */ -#define DEFAULT_SHELL "/bin/sh" +#define DEFAULT_SHELL "@TERMUX_PREFIX@/bin/sh" - + static gid_t get_group(const char *s, const char *err); - -diff -uNr util-linux-2.33.2/text-utils/more.c util-linux-2.33.2.mod/text-utils/more.c ---- util-linux-2.33.2/text-utils/more.c 2019-02-22 12:17:43.842853060 +0200 -+++ util-linux-2.33.2.mod/text-utils/more.c 2019-05-19 22:25:24.922315483 +0300 + +diff -uNr util-linux-2.34/text-utils/more.c util-linux-2.34.mod/text-utils/more.c +--- util-linux-2.34/text-utils/more.c 2019-04-24 12:02:03.133448736 +0300 ++++ util-linux-2.34.mod/text-utils/more.c 2019-07-23 16:55:28.505120594 +0300 @@ -1877,7 +1877,7 @@ - + } if ((ctl->shell = getenv("SHELL")) == NULL) - ctl->shell = "/bin/sh"; @@ -408,9 +390,9 @@ diff -uNr util-linux-2.33.2/text-utils/more.c util-linux-2.33.2.mod/text-utils/m } ctl->no_tty_in = tcgetattr(STDIN_FILENO, &ctl->output_tty); tcgetattr(STDERR_FILENO, &ctl->output_tty); -diff -uNr util-linux-2.33.2/text-utils/pg.c util-linux-2.33.2.mod/text-utils/pg.c ---- util-linux-2.33.2/text-utils/pg.c 2018-06-04 10:57:02.900445049 +0300 -+++ util-linux-2.33.2.mod/text-utils/pg.c 2019-05-19 22:25:24.922315483 +0300 +diff -uNr util-linux-2.34/text-utils/pg.c util-linux-2.34.mod/text-utils/pg.c +--- util-linux-2.34/text-utils/pg.c 2019-04-24 12:02:03.133448736 +0300 ++++ util-linux-2.34.mod/text-utils/pg.c 2019-07-23 16:55:28.505120594 +0300 @@ -1365,7 +1365,7 @@ { const char *sh = getenv("SHELL");