guix-commits
[Top][All Lists]
Advanced

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

branch master updated: gnu: openssh: Fix ssh-copy-id.


From: guix-commits
Subject: branch master updated: gnu: openssh: Fix ssh-copy-id.
Date: Wed, 25 Nov 2020 22:09:54 -0500

This is an automated email from the git hooks/post-receive script.

lfam pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new 81fbe03  gnu: openssh: Fix ssh-copy-id.
81fbe03 is described below

commit 81fbe03b509414aa1ede960141a7ffd241d5f9ee
Author: Jesse Gibbons <jgibbons2357+guix@gmail.com>
AuthorDate: Wed Nov 25 19:12:08 2020 -0700

    gnu: openssh: Fix ssh-copy-id.
    
    * gnu/packages/patches/openssh-fix-ssh-copy-id.patch: New file.
    * gnu/local.mk (dist_patch_DATA): Add it.
    * gnu/packages/ssh.scm (openssh)[source]: Use it.
    
    Signed-off-by: Leo Famulari <leo@famulari.name>
---
 gnu/local.mk                                       |  1 +
 gnu/packages/patches/openssh-fix-ssh-copy-id.patch | 38 ++++++++++++++++++++++
 gnu/packages/ssh.scm                               |  3 +-
 3 files changed, 41 insertions(+), 1 deletion(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index 5277403..e188f8f 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1412,6 +1412,7 @@ dist_patch_DATA =                                         
\
   %D%/packages/patches/openfoam-4.1-cleanup.patch                      \
   %D%/packages/patches/openjdk-10-idlj-reproducibility.patch   \
   %D%/packages/patches/openmpi-mtl-priorities.patch            \
+  %D%/packages/patches/openssh-fix-ssh-copy-id.patch           \
   %D%/packages/patches/openssh-hurd.patch                      \
   %D%/packages/patches/openresolv-restartcmd-guix.patch        \
   %D%/packages/patches/openscad-parser-boost-1.72.patch        \
diff --git a/gnu/packages/patches/openssh-fix-ssh-copy-id.patch 
b/gnu/packages/patches/openssh-fix-ssh-copy-id.patch
new file mode 100644
index 0000000..6adba63
--- /dev/null
+++ b/gnu/packages/patches/openssh-fix-ssh-copy-id.patch
@@ -0,0 +1,38 @@
+Fix a bug where ssh-copy-id would fail with "EOF: command not found":
+
+https://github.com/openssh/openssh-portable/pull/206
+
+Patch copied from upstream source repository:
+
+https://github.com/openssh/openssh-portable/commit/d9e727dcc04a52caaac87543ea1d230e9e6b5604
+
+From d9e727dcc04a52caaac87543ea1d230e9e6b5604 Mon Sep 17 00:00:00 2001
+From: Oleg <Fallmay@users.noreply.github.com>
+Date: Thu, 1 Oct 2020 12:09:08 +0300
+Subject: [PATCH] Fix `EOF: command not found` error in ssh-copy-id
+
+---
+ contrib/ssh-copy-id | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/contrib/ssh-copy-id b/contrib/ssh-copy-id
+index 392f64f94..a76907717 100644
+--- a/contrib/ssh-copy-id
++++ b/contrib/ssh-copy-id
+@@ -247,7 +247,7 @@ installkeys_sh() {
+   #    the -z `tail ...` checks for a trailing newline. The echo adds one if 
was missing
+   #    the cat adds the keys we're getting via STDIN
+   #    and if available restorecon is used to restore the SELinux context
+-  INSTALLKEYS_SH=$(tr '\t\n' ' ' <<-EOF)
++  INSTALLKEYS_SH=$(tr '\t\n' ' ' <<-EOF
+       cd;
+       umask 077;
+       mkdir -p $(dirname "${AUTH_KEY_FILE}") &&
+@@ -258,6 +258,7 @@ installkeys_sh() {
+         restorecon -F .ssh ${AUTH_KEY_FILE};
+       fi
+ EOF
++  )
+ 
+   # to defend against quirky remote shells: use 'exec sh -c' to get POSIX;
+   printf "exec sh -c '%s'" "${INSTALLKEYS_SH}"
diff --git a/gnu/packages/ssh.scm b/gnu/packages/ssh.scm
index e5bcac3..7b363e6 100644
--- a/gnu/packages/ssh.scm
+++ b/gnu/packages/ssh.scm
@@ -189,7 +189,8 @@ a server that supports the SSH-2 protocol.")
              (method url-fetch)
              (uri (string-append "mirror://openbsd/OpenSSH/portable/"
                                  "openssh-" version ".tar.gz"))
-             (patches (search-patches "openssh-hurd.patch"))
+             (patches (search-patches "openssh-hurd.patch"
+                                      "openssh-fix-ssh-copy-id.patch"))
              (sha256
               (base32
                "091b3pxdlj47scxx6kkf4agkx8c8sdacdxx8m1dw1cby80pd40as"))))



reply via email to

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