all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] gnu: xterm: Accept $SHELL even if not in /etc/shells
@ 2014-02-13  8:00 Mark H Weaver
  2014-02-13  8:07 ` John Darrington
  0 siblings, 1 reply; 10+ messages in thread
From: Mark H Weaver @ 2014-02-13  8:00 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 132 bytes --]

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



[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: [PATCH] gnu: xterm: Accept $SHELL even if not in /etc/shells --]
[-- Type: text/x-patch, Size: 3023 bytes --]

From 15d59a2d31794ffa6049bbcf878d568593099dc5 Mon Sep 17 00:00:00 2001
From: Mark H Weaver <mhw@netris.org>
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 <mhw@netris.org>.
+
+--- 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


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-02-14 16:59 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-13  8:00 [PATCH] gnu: xterm: Accept $SHELL even if not in /etc/shells Mark H Weaver
2014-02-13  8:07 ` John Darrington
2014-02-13  8:47   ` Mark H Weaver
2014-02-13 11:06     ` John Darrington
2014-02-13 13:12     ` Ludovic Courtès
2014-02-13 16:29       ` Mark H Weaver
2014-02-14 10:59         ` Ludovic Courtès
2014-02-14 12:32           ` John Darrington
2014-02-14 13:30             ` Alex Sassmannshausen
2014-02-14 16:59             ` Ludovic Courtès

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.