guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] gnu: xterm: Accept $SHELL even if not in /etc/shells


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

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


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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]