unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#55443: emacs-28.1: tramp sudo broken
@ 2022-05-16  6:27 Remco van 't Veer
  2022-05-19 12:46 ` benoit
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Remco van 't Veer @ 2022-05-16  6:27 UTC (permalink / raw)
  To: 55443

After upgrading from emacs-27.2 to emacs-28.1 on a Guix system, opening
files/directories via sudo using tramp no longer works.

Here's what's in the *Messages* buffer:

> Tramp: Opening connection nil for root@remq240 using sudo...done
> File error: Couldn't find a proper `ls' command [6 times]
> tramp-error: Couldn't find a proper `ls' command

I am at:

> Generation 48	May 15 2022 16:38:54	(current)
>   guix 9860c90
>     repository URL: https://git.savannah.gnu.org/git/guix.git
>     branch: master
>     commit: 9860c90e8e5362e0e843efbd45f4563b9746a196

Logging out after upgrade does not help.

Kind regards,
Remco




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

* bug#55443: emacs-28.1: tramp sudo broken
  2022-05-16  6:27 bug#55443: emacs-28.1: tramp sudo broken Remco van 't Veer
@ 2022-05-19 12:46 ` benoit
  2022-05-19 13:57 ` Josselin Poiret via Bug reports for GNU Guix
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 10+ messages in thread
From: benoit @ 2022-05-19 12:46 UTC (permalink / raw)
  To: 55443

Hi,

had similar issue using tramp without sudo targetting a guix host.

I could fix the issue by adding /bin/ls as a special file to my services 
with something like:

   (extra-special-file "/bin/ls" (file-append coreutils "/bin/ls"))

Benoit




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

* bug#55443: emacs-28.1: tramp sudo broken
  2022-05-16  6:27 bug#55443: emacs-28.1: tramp sudo broken Remco van 't Veer
  2022-05-19 12:46 ` benoit
@ 2022-05-19 13:57 ` Josselin Poiret via Bug reports for GNU Guix
  2022-05-19 14:55   ` Remco van 't Veer
  2022-06-22  1:53 ` bug#55443: [PATCH] gnu: emacs: Fix source snippet John Kehayias via Bug reports for GNU Guix
       [not found] ` <handler.55443.D55443.165592726026934.notifdone@debbugs.gnu.org>
  3 siblings, 1 reply; 10+ messages in thread
From: Josselin Poiret via Bug reports for GNU Guix @ 2022-05-19 13:57 UTC (permalink / raw)
  To: Remco van 't Veer, 55443

Hello,

Remco van 't Veer <remco@remworks.net> writes:

> After upgrading from emacs-27.2 to emacs-28.1 on a Guix system, opening
> files/directories via sudo using tramp no longer works.
>
> Here's what's in the *Messages* buffer:
>
>> Tramp: Opening connection nil for root@remq240 using sudo...done
>> File error: Couldn't find a proper `ls' command [6 times]
>> tramp-error: Couldn't find a proper `ls' command

What I personally use is described at [1], and fixed this issue I had
when I switched to emacs-next.

[1] https://yhetil.org/guix/87czjsmif0.fsf@jpoiret.xyz/
-- 
Josselin Poiret




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

* bug#55443: emacs-28.1: tramp sudo broken
  2022-05-19 13:57 ` Josselin Poiret via Bug reports for GNU Guix
@ 2022-05-19 14:55   ` Remco van 't Veer
  0 siblings, 0 replies; 10+ messages in thread
From: Remco van 't Veer @ 2022-05-19 14:55 UTC (permalink / raw)
  To: Josselin Poiret; +Cc: 55443

2022/05/19 15:57, Josselin Poiret:

> What I personally use is described at [1], and fixed this issue I had
> when I switched to emacs-next.
>
> [1] https://yhetil.org/guix/87czjsmif0.fsf@jpoiret.xyz/

Thanks!  Your workaround works.  Here's my slightly tweaked version
(inspired by the post by Max Brieiev):

  (connection-local-set-profile-variables
    'guix-system
    '((tramp-remote-path . (tramp-own-remote-path))))

  (connection-local-set-profiles
    `(:application tramp :protocol "sudo" :machine ,(system-name))
    'guix-system))

I do agree with Maxime Devos in the same thread, ideally tramp sudo
should just work on guix.




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

* bug#55443: [PATCH] gnu: emacs: Fix source snippet.
  2022-05-16  6:27 bug#55443: emacs-28.1: tramp sudo broken Remco van 't Veer
  2022-05-19 12:46 ` benoit
  2022-05-19 13:57 ` Josselin Poiret via Bug reports for GNU Guix
@ 2022-06-22  1:53 ` John Kehayias via Bug reports for GNU Guix
  2022-06-22 14:41   ` John Kehayias via Bug reports for GNU Guix
  2022-06-22 19:47   ` Liliana Marie Prikler
       [not found] ` <handler.55443.D55443.165592726026934.notifdone@debbugs.gnu.org>
  3 siblings, 2 replies; 10+ messages in thread
From: John Kehayias via Bug reports for GNU Guix @ 2022-06-22  1:53 UTC (permalink / raw)
  To: 55443

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

Hello,

I believe this bug is due to a change in emacs to where the tramp-default-remote-path was moved from tramp-sh.el to tramp.el: https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=695f6792f1524a446d276bf5c5e53bbb4c200909

Due to this the source snippet in emacs that adds guix paths did not work, as you should see by examining the variable: C-h v tramp-remote-path

I've tested this patch builds, sets tramp-remote-path, and alleviates the sudo problem I also experienced (for local tramp). Please test if this fixes it for you. And maybe someone can relay this to the guix-devel thread mentioned in case there is more to be done as per the discussion there.

Thanks,
John


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-emacs-Fix-source-snippet.patch --]
[-- Type: text/x-patch; name=0001-gnu-emacs-Fix-source-snippet.patch, Size: 1171 bytes --]

From 9cf58b23bc169e173c363a8c9107caa90d2a8f71 Mon Sep 17 00:00:00 2001
From: John Kehayias <john.kehayias@protonmail.com>
Date: Tue, 21 Jun 2022 21:22:26 -0400
Subject: [PATCH] gnu: emacs: Fix source snippet.

Fixes <https://issues.guix.gnu.org/55443>.

* gnu/packages/emacs.scm (emacs)[source](snippet): Patch tramp.el rather than
tramp-sh.el as the code to be patched moved.
---
 gnu/packages/emacs.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 31b5c04324..0de4b7a5d5 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -106,7 +106,7 @@ (define-public emacs
                   ;; Make sure Tramp looks for binaries in the right places on
                   ;; remote Guix System machines, where 'getconf PATH' returns
                   ;; something bogus.
-                  (substitute* "net/tramp-sh.el"
+                  (substitute* "net/tramp.el"
                     ;; Patch the line after "(defcustom tramp-remote-path".
                     (("\\(tramp-default-remote-path")
                      (format #f "(tramp-default-remote-path ~s ~s ~s ~s "
-- 
2.36.1


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

* bug#55443: [PATCH] gnu: emacs: Fix source snippet.
  2022-06-22  1:53 ` bug#55443: [PATCH] gnu: emacs: Fix source snippet John Kehayias via Bug reports for GNU Guix
@ 2022-06-22 14:41   ` John Kehayias via Bug reports for GNU Guix
  2022-06-22 19:47   ` Liliana Marie Prikler
  1 sibling, 0 replies; 10+ messages in thread
From: John Kehayias via Bug reports for GNU Guix @ 2022-06-22 14:41 UTC (permalink / raw)
  To: 55443; +Cc: dev, benoit

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

I forgot to CC other users on the bug, so I'm sending the message again. Apologies if you got this twice.


------- Original Message -------
On Tuesday, June 21st, 2022 at 9:53 PM, John Kehayias <john.kehayias@protonmail.com> wrote:


> Hello,
>
> I believe this bug is due to a change in emacs to where the tramp-default-remote-path was moved from tramp-sh.el to tramp.el: https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=695f6792f1524a446d276bf5c5e53bbb4c200909
>
> Due to this the source snippet in emacs that adds guix paths did not work, as you should see by examining the variable: C-h v tramp-remote-path
>
> I've tested this patch builds, sets tramp-remote-path, and alleviates the sudo problem I also experienced (for local tramp). Please test if this fixes it for you. And maybe someone can relay this to the guix-devel thread mentioned in case there is more to be done as per the discussion there.
>
> Thanks,
> John

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-emacs-Fix-source-snippet.patch --]
[-- Type: text/x-patch; name=0001-gnu-emacs-Fix-source-snippet.patch, Size: 1171 bytes --]

From 9cf58b23bc169e173c363a8c9107caa90d2a8f71 Mon Sep 17 00:00:00 2001
From: John Kehayias <john.kehayias@protonmail.com>
Date: Tue, 21 Jun 2022 21:22:26 -0400
Subject: [PATCH] gnu: emacs: Fix source snippet.

Fixes <https://issues.guix.gnu.org/55443>.

* gnu/packages/emacs.scm (emacs)[source](snippet): Patch tramp.el rather than
tramp-sh.el as the code to be patched moved.
---
 gnu/packages/emacs.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 31b5c04324..0de4b7a5d5 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -106,7 +106,7 @@ (define-public emacs
                   ;; Make sure Tramp looks for binaries in the right places on
                   ;; remote Guix System machines, where 'getconf PATH' returns
                   ;; something bogus.
-                  (substitute* "net/tramp-sh.el"
+                  (substitute* "net/tramp.el"
                     ;; Patch the line after "(defcustom tramp-remote-path".
                     (("\\(tramp-default-remote-path")
                      (format #f "(tramp-default-remote-path ~s ~s ~s ~s "
-- 
2.36.1


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

* bug#55443: [PATCH] gnu: emacs: Fix source snippet.
  2022-06-22  1:53 ` bug#55443: [PATCH] gnu: emacs: Fix source snippet John Kehayias via Bug reports for GNU Guix
  2022-06-22 14:41   ` John Kehayias via Bug reports for GNU Guix
@ 2022-06-22 19:47   ` Liliana Marie Prikler
  2022-06-22 20:06     ` John Kehayias via Bug reports for GNU Guix
  1 sibling, 1 reply; 10+ messages in thread
From: Liliana Marie Prikler @ 2022-06-22 19:47 UTC (permalink / raw)
  To: John Kehayias, 55443-done

Am Mittwoch, dem 22.06.2022 um 01:53 +0000 schrieb John Kehayias:
> I've tested this patch builds, sets tramp-remote-path, and alleviates
> the sudo problem I also experienced (for local tramp). 
I saw, I reworded slightly, I pushed.

> Maybe someone can relay this to the guix-devel thread mentioned in
> case there is more to be done as per the discussion there.
I don't think a discussion that is several months old has weight in
deciding what to do with relatively newer bugs.  In any case, I think
our tramp fixes should at some point also end up in the actual tramp
package, not just emacs itself :)

That being said, thanks for the fix and have a nice evening




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

* bug#55443: [PATCH] gnu: emacs: Fix source snippet.
  2022-06-22 19:47   ` Liliana Marie Prikler
@ 2022-06-22 20:06     ` John Kehayias via Bug reports for GNU Guix
  2022-06-23  5:26       ` Liliana Marie Prikler
  0 siblings, 1 reply; 10+ messages in thread
From: John Kehayias via Bug reports for GNU Guix @ 2022-06-22 20:06 UTC (permalink / raw)
  To: Liliana Marie Prikler; +Cc: 55443

Hello!

------- Original Message -------
On Wednesday, June 22nd, 2022 at 3:47 PM, Liliana Marie Prikler wrote:

> I saw, I reworded slightly, I pushed.
>

Thanks!

> > Maybe someone can relay this to the guix-devel thread mentioned in
> > case there is more to be done as per the discussion there.
>
> I don't think a discussion that is several months old has weight in
> deciding what to do with relatively newer bugs. In any case, I think
> our tramp fixes should at some point also end up in the actual tramp
> package, not just emacs itself :)
>

I didn't follow the discussion thread but thought it might be the same (or in addition to) this bug. In any event, sure let's leave that to the actual bug tracking.

And yes, we should see about getting this in emacs proper, they should have GNU's own Guix taken care of as well :)

> That being said, thanks for the fix and have a nice evening

Thanks for the quick review and push, have a great day too!




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

* bug#55443: [PATCH] gnu: emacs: Fix source snippet.
  2022-06-22 20:06     ` John Kehayias via Bug reports for GNU Guix
@ 2022-06-23  5:26       ` Liliana Marie Prikler
  0 siblings, 0 replies; 10+ messages in thread
From: Liliana Marie Prikler @ 2022-06-23  5:26 UTC (permalink / raw)
  To: John Kehayias; +Cc: 55443

Am Mittwoch, dem 22.06.2022 um 20:06 +0000 schrieb John Kehayias:
> [...]
> On Wednesday, June 22nd, 2022 at 3:47 PM, Liliana Marie Prikler
> wrote:
> > [O]ur tramp fixes should at some point also end up in the actual
> > tramp package, not just emacs itself :)
> [...]
> And yes, we should see about getting this in emacs proper, they
> should have GNU's own Guix taken care of as well :)
Actually, the point was to also have them in our emacs-tramp package,
which (like emacs-org) doesn't always receive the fixups that land in
the emacs package.  Lots of work duplicated since Emacs vendors those.

Cheers




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

* bug#55443: closed (Re: [PATCH] gnu: emacs: Fix source snippet.)
       [not found] ` <handler.55443.D55443.165592726026934.notifdone@debbugs.gnu.org>
@ 2022-06-25 14:57   ` Remco van 't Veer
  0 siblings, 0 replies; 10+ messages in thread
From: Remco van 't Veer @ 2022-06-25 14:57 UTC (permalink / raw)
  To: 55443; +Cc: John Kehayias, Liliana Marie Prikler

Works for me, thank you!

Cheers,
Remco




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

end of thread, other threads:[~2022-06-25 14:58 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-16  6:27 bug#55443: emacs-28.1: tramp sudo broken Remco van 't Veer
2022-05-19 12:46 ` benoit
2022-05-19 13:57 ` Josselin Poiret via Bug reports for GNU Guix
2022-05-19 14:55   ` Remco van 't Veer
2022-06-22  1:53 ` bug#55443: [PATCH] gnu: emacs: Fix source snippet John Kehayias via Bug reports for GNU Guix
2022-06-22 14:41   ` John Kehayias via Bug reports for GNU Guix
2022-06-22 19:47   ` Liliana Marie Prikler
2022-06-22 20:06     ` John Kehayias via Bug reports for GNU Guix
2022-06-23  5:26       ` Liliana Marie Prikler
     [not found] ` <handler.55443.D55443.165592726026934.notifdone@debbugs.gnu.org>
2022-06-25 14:57   ` bug#55443: closed (Re: [PATCH] gnu: emacs: Fix source snippet.) Remco van 't Veer

Code repositories for project(s) associated with this inbox:

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).