From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark H Weaver Subject: [PATCH] gnu: xterm: Accept $SHELL even if not in /etc/shells Date: Thu, 13 Feb 2014 03:00:29 -0500 Message-ID: <87zjlvh276.fsf@netris.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52511) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WDrEa-0002IK-BI for guix-devel@gnu.org; Thu, 13 Feb 2014 03:01:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WDrEV-00082K-3O for guix-devel@gnu.org; Thu, 13 Feb 2014 03:01:24 -0500 Received: from world.peace.net ([96.39.62.75]:59353) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WDrEU-0007zs-Uy for guix-devel@gnu.org; Thu, 13 Feb 2014 03:01:19 -0500 List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org --=-=-= Content-Type: text/plain This patch makes xterm honor $SHELL (or the shell in the user's password entry) even if it's not in /etc/shells. WDYT? Mark --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-gnu-xterm-Accept-SHELL-even-if-not-in-etc-shells.patch Content-Description: [PATCH] gnu: xterm: Accept $SHELL even if not in /etc/shells >From 15d59a2d31794ffa6049bbcf878d568593099dc5 Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Thu, 13 Feb 2014 02:00:39 -0500 Subject: [PATCH] gnu: xterm: Accept $SHELL even if not in /etc/shells. * gnu/packages/patches/xterm-shell.patch: New file. * gnu/packages/xorg.scm (xterm): Add the patch. * gnu-system.am (dist_patch_DATA): Add the patch. --- gnu-system.am | 3 ++- gnu/packages/patches/xterm-shell.patch | 22 ++++++++++++++++++++++ gnu/packages/xorg.scm | 3 ++- 3 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/xterm-shell.patch diff --git a/gnu-system.am b/gnu-system.am index 7110a60..66ff0f1 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -310,7 +310,8 @@ dist_patch_DATA = \ gnu/packages/patches/vpnc-script.patch \ gnu/packages/patches/w3m-fix-compile.patch \ gnu/packages/patches/xmodmap-asprintf.patch \ - gnu/packages/patches/xpdf-constchar.patch + gnu/packages/patches/xpdf-constchar.patch \ + gnu/packages/patches/xterm-shell.patch bootstrapdir = $(guilemoduledir)/gnu/packages/bootstrap bootstrap_x86_64_linuxdir = $(bootstrapdir)/x86_64-linux diff --git a/gnu/packages/patches/xterm-shell.patch b/gnu/packages/patches/xterm-shell.patch new file mode 100644 index 0000000..c3f65d3 --- /dev/null +++ b/gnu/packages/patches/xterm-shell.patch @@ -0,0 +1,22 @@ +Accept the value of $SHELL or the shell in the user's password entry, +even if it's not found in /etc/shells. + +Patch by Mark H Weaver . + +--- xterm/main.c.orig 2014-01-15 21:12:25.000000000 -0500 ++++ xterm/main.c 2014-02-13 01:55:04.840576171 -0500 +@@ -4570,12 +4570,12 @@ + if (validShell(explicit_shname)) { + xtermSetenv("SHELL", explicit_shname); + shell_path = explicit_shname; +- } else if (validShell(shell_path = x_getenv("SHELL"))) { ++ } else if (shell_path = x_getenv("SHELL")) { + ; /* OK */ + } else if ((!OkPasswd(&pw) && !x_getpwuid(screen->uid, &pw)) + || *(shell_path = x_strdup(pw.pw_shell)) == 0) { + shell_path = resetShell(shell_path); +- } else if (validShell(shell_path)) { ++ } else if (x_nonempty(shell_path)) { + xtermSetenv("SHELL", shell_path); + } else { + shell_path = resetShell(shell_path); diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm index abcbfba..85df02f 100644 --- a/gnu/packages/xorg.scm +++ b/gnu/packages/xorg.scm @@ -4721,7 +4721,8 @@ icccm: Both client and window-manager helpers for ICCCM.") "http://invisible-island.net/datafiles/release/xterm.tar.gz") (sha256 (base32 - "040rarvv18zg0lk7qy0m3n7gv10mh40jic708wvng01z4rlbpfhz")))) + "040rarvv18zg0lk7qy0m3n7gv10mh40jic708wvng01z4rlbpfhz")) + (patches (list (search-patch "xterm-shell.patch"))))) (build-system gnu-build-system) (arguments '(#:configure-flags '("--enable-wide-chars" "--enable-256-color" -- 1.8.4 --=-=-=--