GNU bug report logs - #24338
24.5; compile-start has /bin/sh hardcoded for remote executions.

Previous Next

Package: emacs;

Reported by: Jürgen A. Erhard <jae <at> jaerhard.com>

Date: Tue, 30 Aug 2016 15:29:02 UTC

Severity: normal

Tags: fixed

Merged with 29723

Found in versions 24.5, 25.3

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 24338 in the body.
You can then email your comments to 24338 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#24338; Package emacs. (Tue, 30 Aug 2016 15:29:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jürgen A. Erhard <jae <at> jaerhard.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 30 Aug 2016 15:29:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Jürgen A. Erhard <jae <at> jaerhard.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.5; compile-start has /bin/sh hardcoded for remote executions.
Date: Tue, 30 Aug 2016 11:15:57 +0200
Title says all, it checks with file-remote-p and the hardcodes /bin/sh.
It should ideally check the login shell of the remote system or... but
that all needs knowledge it's not supposed to have, I guess.  Hmm, but
file-remote-p does use a handler system.  So... have to ponder (if it's
not completely changed in 25)

At least document it, and please give a way to override in the "Use
shell-file-name, I know what I'm doing".



In GNU Emacs 24.5.1 (i586-pc-linux-gnu, GTK+ Version 3.18.9)
 of 2016-04-08 on x86-csail-01, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.11803000
System Description:	Debian GNU/Linux unstable (sid)

Configured using:
 `configure --build i586-linux-gnu --prefix=/usr
 --sharedstatedir=/var/lib --libexecdir=/usr/lib
 --localstatedir=/var/lib --infodir=/usr/share/info
 --mandir=/usr/share/man --with-pop=yes
 --enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.5/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.5/site-lisp:/usr/share/emacs/site-lisp
 --build i586-linux-gnu --prefix=/usr --sharedstatedir=/var/lib
 --libexecdir=/usr/lib --localstatedir=/var/lib
 --infodir=/usr/share/info --mandir=/usr/share/man --with-pop=yes
 --enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.5/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.5/site-lisp:/usr/share/emacs/site-lisp
 --with-x=yes --with-x-toolkit=gtk3 --with-toolkit-scroll-bars
 'CFLAGS=-g -O2 -fstack-protector-strong -Wformat
 -Werror=format-security -Wall' 'CPPFLAGS=-Wdate-time
 -D_FORTIFY_SOURCE=2' LDFLAGS=-Wl,-z,relro'

Important settings:
  value of $LC_ALL: en_US.utf-8
  value of $LANG: en_US.utf-8
  locale-coding-system: utf-8-unix

Major mode: Emacs-Lisp

Minor modes in effect:
  eldoc-mode: t
  global-auto-revert-mode: t
  server-mode: t
  which-function-mode: t
  savehist-mode: t
  desktop-save-mode: t
  shell-dirtrack-mode: t
  show-paren-mode: t
  diff-auto-refine-mode: t
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t

Recent messages:
mouse-2, RET: find function's definition
uncompressing compile.el.gz...done
Note: file is write protected
Mark saved where search started

call-interactively: Buffer is read-only: #<buffer compile.el.gz> [6 times]
Mark saved where search started

Making completion list... [4 times]
Reverting buffer `multirsync.torrentstats'.
Quit [2 times]

Load-path shadows:
/usr/share/emacs24/site-lisp/nethack/nethack-cmd hides /usr/share/emacs/site-lisp/nethack/nethack-cmd
/usr/share/emacs24/site-lisp/nethack/slashem-tiles hides /usr/share/emacs/site-lisp/nethack/slashem-tiles
/usr/share/emacs24/site-lisp/nethack/nethack-keys hides /usr/share/emacs/site-lisp/nethack/nethack-keys
/usr/share/emacs24/site-lisp/nethack/nethack-tiles hides /usr/share/emacs/site-lisp/nethack/nethack-tiles
/usr/share/emacs24/site-lisp/nethack/nethack hides /usr/share/emacs/site-lisp/nethack/nethack
/usr/share/emacs24/site-lisp/nethack/nethack-keys-dvorak hides /usr/share/emacs/site-lisp/nethack/nethack-keys-dvorak
/usr/share/emacs24/site-lisp/nethack/nethack-api hides /usr/share/emacs/site-lisp/nethack/nethack-api
/usr/share/emacs24/site-lisp/nethack/nethack-compat hides /usr/share/emacs/site-lisp/nethack/nethack-compat
/home/jae/.emacs.d/elpa/bar-cursor-1.1/bar-cursor hides /usr/share/emacs24/site-lisp/emacs-goodies-el/bar-cursor
/usr/share/emacs/24.5/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup
/usr/share/emacs/24.5/site-lisp/puppet-el/puppet-mode hides /usr/share/emacs/site-lisp/puppet-mode
/usr/share/emacs24/site-lisp/flim/md4 hides /usr/share/emacs/24.5/lisp/md4
/usr/share/emacs24/site-lisp/flim/hex-util hides /usr/share/emacs/24.5/lisp/hex-util
/usr/share/emacs/site-lisp/rst hides /usr/share/emacs/24.5/lisp/textmodes/rst
/usr/share/emacs24/site-lisp/flim/hmac-md5 hides /usr/share/emacs/24.5/lisp/net/hmac-md5
/usr/share/emacs24/site-lisp/flim/sasl-cram hides /usr/share/emacs/24.5/lisp/net/sasl-cram
/usr/share/emacs24/site-lisp/flim/sasl-ntlm hides /usr/share/emacs/24.5/lisp/net/sasl-ntlm
/usr/share/emacs24/site-lisp/flim/sasl hides /usr/share/emacs/24.5/lisp/net/sasl
/usr/share/emacs24/site-lisp/flim/hmac-def hides /usr/share/emacs/24.5/lisp/net/hmac-def
/usr/share/emacs24/site-lisp/flim/ntlm hides /usr/share/emacs/24.5/lisp/net/ntlm
/usr/share/emacs24/site-lisp/flim/sasl-digest hides /usr/share/emacs/24.5/lisp/net/sasl-digest
/usr/share/emacs24/site-lisp/latex-cjk-thai/thai-word hides /usr/share/emacs/24.5/lisp/language/thai-word

Features:
(shadow sort mail-extr emacsbug sendmail eieio-opt speedbar sb-image
ezimage dframe pp follow apropos log-view rect vc-arch vc-mtn lisp-mnt
gnutls parse-time mm-archive network-stream starttls url-http tls url-gw
url-cache url-auth url url-proxy url-privacy url-expand url-methods
url-history url-cookie url-domsuf url-util mailcap url-handlers epg
finder-inf sgml-mode dired-aux warnings vc-bzr vc-sccs vc-svn vc-cvs
vc-rcs mule-util ffap url-parse url-vars dabbrev tramp-cmds tramp-cache
tramp-sh log-edit message rfc822 mml mml-sec mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev mail-utils gmm-utils mailheader
pcvs-util misearch multi-isearch help-mode ruby-mode goto-addr view
tex-mode vc-git debian-control-mode debian-bug rfc2047 rfc2045
ietf-drums debian-changelog-mode add-log nroff-mode org-indent
org-element org-rmail org-mhe org-irc org-info org-gnus org-docview
doc-view image-mode org-bibtex bibtex org-bbdb org-w3m org org-macro
org-footnote org-pcomplete org-list org-faces org-entities noutline
outline org-version ob-emacs-lisp ob ob-tangle ob-ref ob-lob ob-table
ob-exp org-src ob-keys ob-comint ob-core ob-eval org-compat org-macs
org-loaddefs find-func cal-menu calendar cal-loaddefs rst derived
make-mode js thingatpt cc-mode cc-fonts cc-guess cc-menus cc-cmds
cc-styles cc-align cc-engine cc-vars cc-defs jka-compr info vc-dir ewoc
vc lua-mode rx sh-script smie executable pylint python json calc-arith
eldoc vc-dispatcher conf-mode dired autorevert filenotify server
which-func imenu savehist desktop frameset cus-start cus-load
novel-tools files-x color uuid calc-comb calc-ext calc calc-loaddefs
calc-macs eieio-base typopunct bar-cursor typopunct-autoloads
uuid-autoloads package epg-config vc-hg tramp tramp-compat auth-source
eieio byte-opt bytecomp byte-compile cl-extra cconv eieio-core gnus-util
mm-util mail-prsvr password-cache tramp-loaddefs trampver shell
pcomplete format-spec advice help-fns grep compile comint ansi-color
ring cl-macs paren cl gv diff-mode easymenu easy-mmode edmacro kmacro
cl-loaddefs cl-lib debian-el debian-el-loaddefs dpkg-dev-el
dpkg-dev-el-loaddefs time-date tooltip electric uniquify ediff-hook
vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register
page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock
font-lock syntax facemenu font-core frame cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew
greek romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process dbusbind
gfilenotify dynamic-setting system-font-setting font-render-setting
move-toolbar gtk x-toolkit x multi-tty emacs)

Memory information:
((conses 8 2211536 305942)
 (symbols 24 46959 0)
 (miscs 20 12484 5771)
 (strings 16 207050 30964)
 (string-bytes 1 10397737)
 (vectors 8 55844)
 (vector-slots 4 1773465 112312)
 (floats 8 526 2201)
 (intervals 28 392498 31178)
 (buffers 512 970)
 (heap 1024 245671 91250))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24338; Package emacs. (Tue, 30 Aug 2016 15:44:01 GMT) Full text and rfc822 format available.

Message #8 received at 24338 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Jürgen A. Erhard <jae <at> jaerhard.com>
Cc: 24338 <at> debbugs.gnu.org
Subject: Re: bug#24338: 24.5;
 compile-start has /bin/sh hardcoded for remote executions.
Date: Tue, 30 Aug 2016 17:42:34 +0200
Jürgen A. Erhard <jae <at> jaerhard.com> writes:

> Title says all, it checks with file-remote-p and the hardcodes /bin/sh.
> It should ideally check the login shell of the remote system or... but
> that all needs knowledge it's not supposed to have, I guess.  Hmm, but
> file-remote-p does use a handler system.  So... have to ponder (if it's
> not completely changed in 25)
>
> At least document it, and please give a way to override in the "Use
> shell-file-name, I know what I'm doing".

`shell-file-name' is often wrong for remote systems; there could be
another OS, for example. "/bin/sh" is POSIX and can be assumed to exist.

How shall one know the remote login shell in advance?

And, in order to find a proper solution, maybe you could show a use case
where "/bin/sh" is simply wrong?

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24338; Package emacs. (Tue, 30 Aug 2016 15:56:01 GMT) Full text and rfc822 format available.

Message #11 received at 24338 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Schwab <schwab <at> suse.de>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: "Jürgen A. Erhard" <jae <at> jaerhard.com>,
 24338 <at> debbugs.gnu.org
Subject: Re: bug#24338: 24.5;
 compile-start has /bin/sh hardcoded for remote executions.
Date: Tue, 30 Aug 2016 17:55:25 +0200
On Aug 30 2016, Michael Albinus <michael.albinus <at> gmx.de> wrote:

> `shell-file-name' is often wrong for remote systems; there could be
> another OS, for example. "/bin/sh" is POSIX and can be assumed to exist.

Actually, POSIX doesn't hardcode the location of sh.  File system layout
is not part of POSIX.

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab <at> suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24338; Package emacs. (Tue, 30 Aug 2016 16:04:01 GMT) Full text and rfc822 format available.

Message #14 received at 24338 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Andreas Schwab <schwab <at> suse.de>
Cc: "Jürgen A. Erhard" <jae <at> jaerhard.com>,
 24338 <at> debbugs.gnu.org
Subject: Re: bug#24338: 24.5;
 compile-start has /bin/sh hardcoded for remote executions.
Date: Tue, 30 Aug 2016 18:02:02 +0200
Andreas Schwab <schwab <at> suse.de> writes:

>> `shell-file-name' is often wrong for remote systems; there could be
>> another OS, for example. "/bin/sh" is POSIX and can be assumed to exist.
>
> Actually, POSIX doesn't hardcode the location of sh.  File system layout
> is not part of POSIX.

Right. I meant, that one can expect a POSIX compatible shell at "/bin/sh".

> Andreas.

Best regards, Michael.




Severity set to 'normal' from 'minor' Request was from Michael Albinus <michael.albinus <at> gmx.de> to control <at> debbugs.gnu.org. (Thu, 22 Feb 2018 10:43:02 GMT) Full text and rfc822 format available.

Merged 24338 29723. Request was from Michael Albinus <michael.albinus <at> gmx.de> to control <at> debbugs.gnu.org. (Thu, 22 Feb 2018 10:44:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24338; Package emacs. (Sat, 09 Mar 2019 17:11:02 GMT) Full text and rfc822 format available.

Message #21 received at 24338 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: "Matz\, Daniel A. \(JSC-EG511\)" <daniel.a.matz <at> nasa.gov>
Cc: 29723 <at> debbugs.gnu.org, 24338 <at> debbugs.gnu.org
Subject: Re: bug#29723: 25.3;
 `compile' doesn't honor `tramp-methods', always uses "/bin/sh"
Date: Sat, 09 Mar 2019 18:10:30 +0100
Michael Albinus <michael.albinus <at> gmx.de> writes:

Hi Daniel,

>> Starting with emacs -Q, execute the following:
>>
>> (require 'tramp)
>> (let ((scpx-method (cdr (assoc "scpx" tramp-methods))))
>>   (add-to-list 'scpx-method '(tramp-remote-shell "/bin/bash"))
>>   (add-to-list 'tramp-methods (cons "scpx" scpx-method)))
>>
>> Then use the "scpx" connection type to find a file on a remote host.
>> Then, use `shell-command' to run "echo $_".  I get an output of
>> "/bin/bash".  Then, run the same command with `compile'.  I get an
>> output of "/bin/sh".  I was expecting to again get "/bin/bash".
>
> This is the same problem as bug#24338, I will mark your report as
> duplicate.
>
> In fact, "/bin/sh" is hardcoded for remote compilation in function
> `compilation-start'. This shall be changed, using connection-local
> variables, see (info "(elisp) Connection Local Variables")
>
> It is on my todo list, but less prioritized. I would be happy if
> somebody else takes the ball, and implements this in `compilation-start'.

Finally, I've adapted connection-local variables accordingly, pushed to
the master branch. See the discussion in (info "(emacs) Connection Variables")

>> Thank you!
>>
>> Daniel

Best regards, Michael.




Added tag(s) fixed. Request was from Michael Albinus <michael.albinus <at> gmx.de> to control <at> debbugs.gnu.org. (Sat, 09 Mar 2019 17:12:03 GMT) Full text and rfc822 format available.

Reply sent to Michael Albinus <michael.albinus <at> gmx.de>:
You have taken responsibility. (Sun, 17 Mar 2019 14:10:02 GMT) Full text and rfc822 format available.

Notification sent to Jürgen A. Erhard <jae <at> jaerhard.com>:
bug acknowledged by developer. (Sun, 17 Mar 2019 14:10:02 GMT) Full text and rfc822 format available.

Message #28 received at 24338-done <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: "Matz\, Daniel A. \(JSC-EG511\)" <daniel.a.matz <at> nasa.gov>
Cc: 29723-done <at> debbugs.gnu.org, 24338-done <at> debbugs.gnu.org
Subject: Re: bug#24338: bug#29723: 25.3;
 `compile' doesn't honor `tramp-methods', always uses "/bin/sh"
Date: Sun, 17 Mar 2019 15:09:12 +0100
Michael Albinus <michael.albinus <at> gmx.de> writes:

> Finally, I've adapted connection-local variables accordingly, pushed to
> the master branch. See the discussion in (info "(emacs) Connection Variables")

No news are good news. I'm closing the bugs. Feel free to ask if there's
something not clear with the solution.

Best regards, Michael.




Reply sent to Michael Albinus <michael.albinus <at> gmx.de>:
You have taken responsibility. (Sun, 17 Mar 2019 14:10:02 GMT) Full text and rfc822 format available.

Notification sent to "Matz, Daniel A. (JSC-EG511)" <daniel.a.matz <at> nasa.gov>:
bug acknowledged by developer. (Sun, 17 Mar 2019 14:10:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 15 Apr 2019 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 349 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.