From: Fredrik Fornwall Date: Thu, 30 Jul 2015 23:47:00 +0000 (-0400) Subject: Use bash as login shell by default X-Git-Url: https://git.distorted.org.uk/~mdw/termux-packages/commitdiff_plain/02b55df699f03db125b6ba9e4dbaf685bb8b6cc3 Use bash as login shell by default --- diff --git a/ndk_patches/pwd.patch b/ndk_patches/pwd.patch index 5ce3323c..2cd2cb8f 100644 --- a/ndk_patches/pwd.patch +++ b/ndk_patches/pwd.patch @@ -11,7 +11,7 @@ diff -u -r /home/fornwall/lib/android-ndk/platforms/android-21/arch-arm/usr/incl #define _PATH_PASSWD "/etc/passwd" #define _PATH_MASTERPASSWD "/etc/master.passwd" #define _PATH_MASTERPASSWD_LOCK "/etc/ptmp" -@@ -119,6 +122,39 @@ +@@ -119,6 +122,41 @@ int getpwnam_r(const char*, struct passwd*, char*, size_t, struct passwd**); int getpwuid_r(uid_t, struct passwd*, char*, size_t, struct passwd**); @@ -24,7 +24,9 @@ diff -u -r /home/fornwall/lib/android-ndk/platforms/android-21/arch-arm/usr/incl + static char realpath_buffer[4096/*PATH_MAX*/]; + char* result = realpath("@TERMUX_HOME@/.termux/shell", realpath_buffer); + if (result == NULL || access(realpath_buffer, X_OK) == -1) { -+ pw->pw_shell = "@TERMUX_PREFIX@/bin/ash"; ++ char const* bash_path = "@TERMUX_PREFIX@/bin/bash"; ++ if (access(bash_path, X_OK) != -1) pw->pw_shell = bash_path; ++ else pw->pw_shell = "@TERMUX_PREFIX@/bin/ash"; + } else { + pw->pw_shell = realpath_buffer; + } diff --git a/packages/busybox/build.sh b/packages/busybox/build.sh index 6882e6d1..d1190306 100755 --- a/packages/busybox/build.sh +++ b/packages/busybox/build.sh @@ -2,7 +2,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=2 +TERMUX_PKG_BUILD_REVISION=3 TERMUX_PKG_SRCURL=http://www.busybox.net/downloads/busybox-${TERMUX_PKG_VERSION}.tar.bz2 TERMUX_PKG_BUILD_IN_SRC=yes diff --git a/packages/dropbear/build.sh b/packages/dropbear/build.sh index f89ee035..afa13a84 100755 --- a/packages/dropbear/build.sh +++ b/packages/dropbear/build.sh @@ -1,6 +1,7 @@ TERMUX_PKG_HOMEPAGE=https://matt.ucc.asn.au/dropbear/dropbear.html TERMUX_PKG_DESCRIPTION="Small SSH server and client" TERMUX_PKG_VERSION=2015.67 +TERMUX_PKG_BUILD_REVISION=1 # Using mirror since main site was down 2015-06-13: # TERMUX_PKG_SRCURL=https://matt.ucc.asn.au/dropbear/releases/dropbear-${TERMUX_PKG_VERSION}.tar.bz2 TERMUX_PKG_SRCURL=https://dropbear.nl/mirror/dropbear-${TERMUX_PKG_VERSION}.tar.bz2 diff --git a/packages/openssh/build.sh b/packages/openssh/build.sh index 17a1cf69..96be49a5 100755 --- a/packages/openssh/build.sh +++ b/packages/openssh/build.sh @@ -1,7 +1,7 @@ TERMUX_PKG_HOMEPAGE=http://www.openssh.com/ TERMUX_PKG_DESCRIPTION="Secure shell for logging into a remote machine" TERMUX_PKG_VERSION=6.9 -TERMUX_PKG_BUILD_REVISION=1 +TERMUX_PKG_BUILD_REVISION=2 TERMUX_PKG_SRCURL=http://ftp.eu.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${TERMUX_PKG_VERSION}p1.tar.gz TERMUX_PKG_DEPENDS="libandroid-support, ldns, openssl" # --disable-strip to prevent host "install" command to use "-s", which won't work for target binaries: diff --git a/packages/tmux/build.sh b/packages/tmux/build.sh index 97243c32..4bbfbee6 100755 --- a/packages/tmux/build.sh +++ b/packages/tmux/build.sh @@ -2,7 +2,7 @@ TERMUX_PKG_HOMEPAGE=http://tmux.github.io/ TERMUX_PKG_DESCRIPTION="Terminal multiplexer implementing switching between several programs in one terminal, detaching them and reattaching them to a different terminal" TERMUX_PKG_DEPENDS="ncurses, libevent" TERMUX_PKG_VERSION=2.0 -TERMUX_PKG_BUILD_REVISION=1 +TERMUX_PKG_BUILD_REVISION=2 TERMUX_PKG_SRCURL=http://downloads.sourceforge.net/project/tmux/tmux/tmux-${TERMUX_PKG_VERSION}/tmux-${TERMUX_PKG_VERSION}.tar.gz TERMUX_PKG_BUILD_IN_SRC=yes