commit:     5483ca01f8bbc1d6ad960d1ef7846a10ab5044d9
Author:     Patrick McLean <patrick.mclean <AT> sony <DOT> com>
AuthorDate: Wed Oct 14 21:14:24 2020 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Wed Oct 14 21:14:32 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5483ca01

net-misc/openssh-8.4_p1-r2: Pull in fix for ssh-copy-id (bug #749026)

Closes: https://bugs.gentoo.org/749026
Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-3.0.8, Repoman-3.0.1
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>

 .../files/openssh-8.4_p1-fix-ssh-copy-id.patch     | 30 ++++++++++++++++++++++
 ...h-8.4_p1-r1.ebuild => openssh-8.4_p1-r2.ebuild} |  3 +++
 2 files changed, 33 insertions(+)

diff --git a/net-misc/openssh/files/openssh-8.4_p1-fix-ssh-copy-id.patch 
b/net-misc/openssh/files/openssh-8.4_p1-fix-ssh-copy-id.patch
new file mode 100644
index 00000000000..32713d43ff3
--- /dev/null
+++ b/net-misc/openssh/files/openssh-8.4_p1-fix-ssh-copy-id.patch
@@ -0,0 +1,30 @@
+From d9e727dcc04a52caaac87543ea1d230e9e6b5604 Mon Sep 17 00:00:00 2001
+From: Oleg <[email protected]>
+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/net-misc/openssh/openssh-8.4_p1-r1.ebuild 
b/net-misc/openssh/openssh-8.4_p1-r2.ebuild
similarity index 99%
rename from net-misc/openssh/openssh-8.4_p1-r1.ebuild
rename to net-misc/openssh/openssh-8.4_p1-r2.ebuild
index 6c183e64862..09691782910 100644
--- a/net-misc/openssh/openssh-8.4_p1-r1.ebuild
+++ b/net-misc/openssh/openssh-8.4_p1-r2.ebuild
@@ -138,6 +138,9 @@ src_prepare() {
        eapply "${FILESDIR}"/${PN}-8.0_p1-fix-putty-tests.patch
        eapply 
"${FILESDIR}"/${PN}-8.0_p1-deny-shmget-shmat-shmdt-in-preauth-privsep-child.patch
 
+       # https://bugs.gentoo.org/749026
+       use X509 || eapply "${FILESDIR}"/${PN}-8.4_p1-fix-ssh-copy-id.patch
+
        # workaround for https://bugs.gentoo.org/734984
        use X509 || eapply "${FILESDIR}"/${PN}-8.3_p1-sha2-include.patch
 

Reply via email to