openssh: update to 7.3p1
This update made the fix-man-install patch unnecessary and required minor adjustments to the msys2 one (to avoid huge changes due to autoconf tools updates resulting in vastly different generated files, we simply call autoreconf after patching configure.ac). Due to a recent export of setkey() in msys2-runtime-devel's stdlib.h when _XOPEN_SOURCE is defined, we need to add a little work-around patch that avoids clashing with crypt.h's declaration of the function of the same name. Suggested by Ryan Rode-Corrent. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
parent
c24b978a18
commit
633933b513
@ -1,7 +1,7 @@
|
||||
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
|
||||
|
||||
pkgname=openssh
|
||||
pkgver=7.1p2
|
||||
pkgver=7.3p1
|
||||
pkgrel=1
|
||||
pkgdesc='Free version of the SSH connectivity tools'
|
||||
url='http://www.openssh.org/portable.html'
|
||||
@ -11,18 +11,19 @@ groups=('net-utils')
|
||||
depends=('heimdal' 'libedit' 'libcrypt' 'openssl')
|
||||
makedepends=('heimdal-devel' 'libedit-devel' 'libcrypt-devel' 'openssl-devel')
|
||||
source=("http://mirrors.mit.edu/pub/OpenBSD/OpenSSH/portable/${pkgname}-${pkgver}.tar.gz"
|
||||
openssh-6.3p1-fix-man-install.patch
|
||||
openssh-6.3p1-msys2.patch)
|
||||
sha256sums=('dd75f024dcf21e06a0d6421d582690bf987a1f6323e32ad6619392f3bfde6bbd'
|
||||
'88a755f5a3c52cfeb1d7764e05c4eada86339ba3a009d2f8c527fb44521db02b'
|
||||
'07259e7908a6a6677c5e8ad26cd3b6274b1e9d1deea343e433bdf3e049033bd4')
|
||||
openssh-7.3p1-msys2.patch
|
||||
openssh-7.3p1-msys2-setkey.patch)
|
||||
sha256sums=('3ffb989a6dcaa69594c3b550d4855a5a2e1718ccdde7f5e36387b424220fbecc'
|
||||
'ab54293758c908bfdcd95b338bad5eb35290291e957dc99bc09fae4f906987fc'
|
||||
'25079cf4a10c1ab70d60302bccaabee513762520dffd7c35285f7aae3ea36087')
|
||||
|
||||
backup=('etc/ssh/ssh_config')
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}/${pkgname}-${pkgver}"
|
||||
patch -p1 -i ${srcdir}/openssh-6.3p1-fix-man-install.patch
|
||||
patch -p1 -i ${srcdir}/openssh-6.3p1-msys2.patch
|
||||
patch -p1 -i ${srcdir}/openssh-7.3p1-msys2.patch
|
||||
patch -p1 -i ${srcdir}/openssh-7.3p1-msys2-setkey.patch
|
||||
autoreconf -fvi
|
||||
}
|
||||
|
||||
build() {
|
||||
|
||||
@ -1,11 +0,0 @@
|
||||
--- openssh-6.3p1/Makefile.in.orig 2013-10-21 16:01:01.869400000 +0400
|
||||
+++ openssh-6.3p1/Makefile.in 2013-10-21 16:01:39.096600000 +0400
|
||||
@@ -288,7 +288,7 @@
|
||||
-rm -f $(DESTDIR)$(bindir)/slogin
|
||||
ln -s ./ssh$(EXEEXT) $(DESTDIR)$(bindir)/slogin
|
||||
-rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1
|
||||
- ln -s ./ssh.1 $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1
|
||||
+ cp -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh.1 $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1
|
||||
|
||||
install-sysconf:
|
||||
if [ ! -d $(DESTDIR)$(sysconfdir) ]; then \
|
||||
@ -1,126 +0,0 @@
|
||||
diff -Naur openssh-6.3p1-orig/config.guess openssh-6.3p1/config.guess
|
||||
--- openssh-6.3p1-orig/config.guess 2013-04-18 05:26:26.000000000 +0400
|
||||
+++ openssh-6.3p1/config.guess 2013-10-20 21:05:15.482000000 +0400
|
||||
@@ -851,6 +851,9 @@
|
||||
amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
|
||||
echo x86_64-unknown-cygwin
|
||||
exit ;;
|
||||
+ amd64:MSYS*:*:* | x86_64:MSYS*:*:*)
|
||||
+ echo x86_64-unknown-msys
|
||||
+ exit ;;
|
||||
p*:CYGWIN*:*)
|
||||
echo powerpcle-unknown-cygwin
|
||||
exit ;;
|
||||
diff -Naur openssh-6.3p1-orig/configure openssh-6.3p1/configure
|
||||
--- openssh-6.3p1-orig/configure 2013-09-13 10:20:40.000000000 +0400
|
||||
+++ openssh-6.3p1/configure 2013-10-20 21:04:13.523400000 +0400
|
||||
@@ -6686,7 +6686,7 @@
|
||||
$as_echo "#define DISABLE_WTMP 1" >>confdefs.h
|
||||
|
||||
;;
|
||||
-*-*-cygwin*)
|
||||
+*-*-cygwin* | *-*-msys*)
|
||||
check_for_libcrypt_later=1
|
||||
LIBS="$LIBS /usr/lib/textreadmode.o"
|
||||
|
||||
diff -Naur openssh-6.3p1-orig/configure.ac openssh-6.3p1/configure.ac
|
||||
--- openssh-6.3p1-orig/configure.ac 2013-08-04 15:48:41.000000000 +0400
|
||||
+++ openssh-6.3p1/configure.ac 2013-10-20 21:04:13.570200000 +0400
|
||||
@@ -497,7 +497,7 @@
|
||||
AC_DEFINE([DISABLE_UTMP], [1], [Define if you don't want to use utmp])
|
||||
AC_DEFINE([DISABLE_WTMP], [1], [Define if you don't want to use wtmp])
|
||||
;;
|
||||
-*-*-cygwin*)
|
||||
+*-*-cygwin* | *-*-msys*)
|
||||
check_for_libcrypt_later=1
|
||||
LIBS="$LIBS /usr/lib/textreadmode.o"
|
||||
AC_DEFINE([HAVE_CYGWIN], [1], [Define if you are on Cygwin])
|
||||
diff -Naur openssh-6.3p1-orig/contrib/cygwin/Makefile openssh-6.3p1/contrib/cygwin/Makefile
|
||||
--- openssh-6.3p1-orig/contrib/cygwin/Makefile 2011-10-25 02:38:00.000000000 +0400
|
||||
+++ openssh-6.3p1/contrib/cygwin/Makefile 2013-10-20 21:04:13.570200000 +0400
|
||||
@@ -7,7 +7,7 @@
|
||||
mandir=$(datadir)/man
|
||||
docdir=$(datadir)/doc
|
||||
sshdocdir=$(docdir)/openssh
|
||||
-cygdocdir=$(docdir)/Cygwin
|
||||
+cygdocdir=$(docdir)/MSYS
|
||||
sysconfdir=/etc
|
||||
defaultsdir=$(sysconfdir)/defaults/etc
|
||||
inetdefdir=$(defaultsdir)/inetd.d
|
||||
diff -Naur openssh-6.3p1-orig/openbsd-compat/bsd-cygwin_util.c openssh-6.3p1/openbsd-compat/bsd-cygwin_util.c
|
||||
--- openssh-6.3p1-orig/openbsd-compat/bsd-cygwin_util.c 2013-06-02 02:07:32.000000000 +0400
|
||||
+++ openssh-6.3p1/openbsd-compat/bsd-cygwin_util.c 2013-10-20 21:04:13.570200000 +0400
|
||||
@@ -67,7 +67,7 @@
|
||||
{ NL("ALLUSERSPROFILE=") },
|
||||
{ NL("COMPUTERNAME=") },
|
||||
{ NL("COMSPEC=") },
|
||||
- { NL("CYGWIN=") },
|
||||
+ { NL("MSYS=") },
|
||||
{ NL("OS=") },
|
||||
{ NL("PATH=") },
|
||||
{ NL("PATHEXT=") },
|
||||
diff -Naur openssh-6.3p1-orig/regress/agent-ptrace.sh openssh-6.3p1/regress/agent-ptrace.sh
|
||||
--- openssh-6.3p1-orig/regress/agent-ptrace.sh 2011-01-17 03:20:20.000000000 +0300
|
||||
+++ openssh-6.3p1/regress/agent-ptrace.sh 2013-10-20 21:04:13.570200000 +0400
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
if have_prog uname ; then
|
||||
case `uname` in
|
||||
- AIX|CYGWIN*|OSF1)
|
||||
+ AIX|CYGWIN*|MSYS*|OSF1)
|
||||
echo "skipped (not supported on this platform)"
|
||||
exit 0
|
||||
;;
|
||||
diff -Naur openssh-6.3p1-orig/regress/reexec.sh openssh-6.3p1/regress/reexec.sh
|
||||
--- openssh-6.3p1-orig/regress/reexec.sh 2013-05-17 14:41:07.000000000 +0400
|
||||
+++ openssh-6.3p1/regress/reexec.sh 2013-10-20 21:04:13.570200000 +0400
|
||||
@@ -45,7 +45,7 @@
|
||||
cp $OBJ/sshd_config.orig $OBJ/sshd_config
|
||||
|
||||
# cygwin can't fork a deleted binary
|
||||
-if [ "$os" != "cygwin" ]; then
|
||||
+if [ "$os" != "cygwin" || "$os" != "msys" ]; then
|
||||
|
||||
verbose "test reexec fallback"
|
||||
|
||||
diff -Naur openssh-6.3p1-orig/regress/sftp-cmds.sh openssh-6.3p1/regress/sftp-cmds.sh
|
||||
--- openssh-6.3p1-orig/regress/sftp-cmds.sh 2013-07-25 06:11:20.000000000 +0400
|
||||
+++ openssh-6.3p1/regress/sftp-cmds.sh 2013-10-20 21:04:13.585800000 +0400
|
||||
@@ -77,7 +77,7 @@
|
||||
|| fail "get failed"
|
||||
cmp $DATA ${COPY} || fail "corrupted copy after get"
|
||||
|
||||
-if [ "$os" != "cygwin" ]; then
|
||||
+if [ "$os" != "cygwin" || "$os" != "msys" ]; then
|
||||
rm -f ${QUOTECOPY}
|
||||
cp $DATA ${QUOTECOPY}
|
||||
verbose "$tid: get filename with quotes"
|
||||
@@ -136,7 +136,7 @@
|
||||
${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 || fail "put failed"
|
||||
cmp $DATA ${COPY} || fail "corrupted copy after put"
|
||||
|
||||
-if [ "$os" != "cygwin" ]; then
|
||||
+if [ "$os" != "cygwin" || "$os" != "msys" ]; then
|
||||
rm -f ${QUOTECOPY}
|
||||
verbose "$tid: put filename with quotes"
|
||||
echo "put $DATA \"$QUOTECOPY_ARG\"" | \
|
||||
diff -Naur openssh-6.3p1-orig/regress/test-exec.sh openssh-6.3p1/regress/test-exec.sh
|
||||
--- openssh-6.3p1-orig/regress/test-exec.sh 2013-08-08 11:02:12.000000000 +0400
|
||||
+++ openssh-6.3p1/regress/test-exec.sh 2013-10-20 21:04:13.585800000 +0400
|
||||
@@ -16,9 +16,16 @@
|
||||
os=cygwin
|
||||
TEST_SSH_IPV6=no
|
||||
;;
|
||||
+MSYS_NT-5.0)
|
||||
+ os=cygwin
|
||||
+ TEST_SSH_IPV6=no
|
||||
+ ;;
|
||||
CYGWIN*)
|
||||
os=cygwin
|
||||
;;
|
||||
+MSYS*)
|
||||
+ os=cygwin
|
||||
+ ;;
|
||||
esac
|
||||
|
||||
if [ ! -z "$TEST_SSH_PORT" ]; then
|
||||
34
openssh/openssh-7.3p1-msys2-setkey.patch
Normal file
34
openssh/openssh-7.3p1-msys2-setkey.patch
Normal file
@ -0,0 +1,34 @@
|
||||
From 0490e734e4023964d4662c07a5ac109747b8e0af Mon Sep 17 00:00:00 2001
|
||||
From: Johannes Schindelin <johannes.schindelin@gmx.de>
|
||||
Date: Mon, 22 Aug 2016 17:09:20 +0200
|
||||
Subject: [PATCH] openssh: work around Cygwin declaring setkey
|
||||
|
||||
When _XOPEN_SOURCE is defined, setkey() is declared in
|
||||
/usr/include/stdlib.h in a manner that is incompatible with
|
||||
/usr/include/crypt.h.
|
||||
|
||||
Let's work around that.
|
||||
|
||||
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
|
||||
---
|
||||
includes.h | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/includes.h b/includes.h
|
||||
index 497a038..4f9e233 100644
|
||||
--- a/includes.h
|
||||
+++ b/includes.h
|
||||
@@ -22,6 +22,10 @@
|
||||
#define _GNU_SOURCE /* activate extra prototypes for glibc */
|
||||
#endif
|
||||
|
||||
+#define setkey CYGWIN_setkey
|
||||
+#include <stdlib.h>
|
||||
+#undef setkey
|
||||
+
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/socket.h> /* For CMSG_* */
|
||||
--
|
||||
2.9.1
|
||||
|
||||
142
openssh/openssh-7.3p1-msys2.patch
Normal file
142
openssh/openssh-7.3p1-msys2.patch
Normal file
@ -0,0 +1,142 @@
|
||||
From 3018c32948c66b246b1020dea40f4e8688fae61a Mon Sep 17 00:00:00 2001
|
||||
From: Johannes Schindelin <johannes.schindelin@gmx.de>
|
||||
Date: Mon, 22 Aug 2016 09:17:42 +0200
|
||||
Subject: [PATCH] Forward-port MSys2 patches
|
||||
|
||||
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
|
||||
---
|
||||
config.guess | 3 +
|
||||
configure.ac | 2 +-
|
||||
contrib/cygwin/Makefile | 2 +-
|
||||
openbsd-compat/bsd-cygwin_util.c | 2 +-
|
||||
regress/agent-ptrace.sh | 2 +-
|
||||
regress/reexec.sh | 2 +-
|
||||
regress/sftp-cmds.sh | 4 +-
|
||||
regress/test-exec.sh | 7 +
|
||||
10 files changed, 13385 insertions(+), 30689 deletions(-)
|
||||
|
||||
diff --git a/config.guess b/config.guess
|
||||
index c563628..4b7bada 100755
|
||||
--- a/config.guess
|
||||
+++ b/config.guess
|
||||
@@ -851,6 +851,9 @@ EOF
|
||||
amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
|
||||
echo x86_64-unknown-cygwin
|
||||
exit ;;
|
||||
+ amd64:MSYS*:*:* | x86_64:MSYS*:*:*)
|
||||
+ echo x86_64-unknown-msys
|
||||
+ exit ;;
|
||||
p*:CYGWIN*:*)
|
||||
echo powerpcle-unknown-cygwin
|
||||
exit ;;
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 373d21b..7843791 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -578,7 +578,7 @@ case "$host" in
|
||||
AC_DEFINE([DISABLE_UTMP], [1], [Define if you don't want to use utmp])
|
||||
AC_DEFINE([DISABLE_WTMP], [1], [Define if you don't want to use wtmp])
|
||||
;;
|
||||
-*-*-cygwin*)
|
||||
+*-*-cygwin* | *-*-msys*)
|
||||
check_for_libcrypt_later=1
|
||||
LIBS="$LIBS /usr/lib/textreadmode.o"
|
||||
AC_DEFINE([HAVE_CYGWIN], [1], [Define if you are on Cygwin])
|
||||
diff --git a/contrib/cygwin/Makefile b/contrib/cygwin/Makefile
|
||||
index a0261f4..2fdb676 100644
|
||||
--- a/contrib/cygwin/Makefile
|
||||
+++ b/contrib/cygwin/Makefile
|
||||
@@ -7,7 +7,7 @@ datadir=$(prefix)/share
|
||||
mandir=$(datadir)/man
|
||||
docdir=$(datadir)/doc
|
||||
sshdocdir=$(docdir)/openssh
|
||||
-cygdocdir=$(docdir)/Cygwin
|
||||
+cygdocdir=$(docdir)/MSYS
|
||||
sysconfdir=/etc
|
||||
defaultsdir=$(sysconfdir)/defaults/etc
|
||||
inetdefdir=$(defaultsdir)/inetd.d
|
||||
diff --git a/openbsd-compat/bsd-cygwin_util.c b/openbsd-compat/bsd-cygwin_util.c
|
||||
index 8672ccf..f36a207 100644
|
||||
--- a/openbsd-compat/bsd-cygwin_util.c
|
||||
+++ b/openbsd-compat/bsd-cygwin_util.c
|
||||
@@ -83,7 +83,7 @@ static struct wenv {
|
||||
{ NL("ALLUSERSPROFILE=") },
|
||||
{ NL("COMPUTERNAME=") },
|
||||
{ NL("COMSPEC=") },
|
||||
- { NL("CYGWIN=") },
|
||||
+ { NL("MSYS=") },
|
||||
{ NL("OS=") },
|
||||
{ NL("PATH=") },
|
||||
{ NL("PATHEXT=") },
|
||||
diff --git a/regress/agent-ptrace.sh b/regress/agent-ptrace.sh
|
||||
index bb676d6..854d711 100644
|
||||
--- a/regress/agent-ptrace.sh
|
||||
+++ b/regress/agent-ptrace.sh
|
||||
@@ -5,7 +5,7 @@ tid="disallow agent ptrace attach"
|
||||
|
||||
if have_prog uname ; then
|
||||
case `uname` in
|
||||
- AIX|CYGWIN*|OSF1)
|
||||
+ AIX|CYGWIN*|MSYS*|OSF1)
|
||||
echo "skipped (not supported on this platform)"
|
||||
exit 0
|
||||
;;
|
||||
diff --git a/regress/reexec.sh b/regress/reexec.sh
|
||||
index 5c0a7b4..ba17e9b 100644
|
||||
--- a/regress/reexec.sh
|
||||
+++ b/regress/reexec.sh
|
||||
@@ -45,7 +45,7 @@ rm -f $PIDFILE
|
||||
cp $OBJ/sshd_config.orig $OBJ/sshd_config
|
||||
|
||||
# cygwin can't fork a deleted binary
|
||||
-if [ "$os" != "cygwin" ]; then
|
||||
+if [ "$os" != "cygwin" || "$os" != "msys" ]; then
|
||||
|
||||
verbose "test reexec fallback"
|
||||
|
||||
diff --git a/regress/sftp-cmds.sh b/regress/sftp-cmds.sh
|
||||
index aad7fca..e8c002c 100644
|
||||
--- a/regress/sftp-cmds.sh
|
||||
+++ b/regress/sftp-cmds.sh
|
||||
@@ -77,7 +77,7 @@ echo "get \"$DATA\" $COPY" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
|
||||
|| fail "get failed"
|
||||
cmp $DATA ${COPY} || fail "corrupted copy after get"
|
||||
|
||||
-if [ "$os" != "cygwin" ]; then
|
||||
+if [ "$os" != "cygwin" || "$os" != "msys" ]; then
|
||||
rm -f ${QUOTECOPY}
|
||||
cp $DATA ${QUOTECOPY}
|
||||
verbose "$tid: get filename with quotes"
|
||||
@@ -136,7 +136,7 @@ echo "put $DATA $COPY" | \
|
||||
${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 || fail "put failed"
|
||||
cmp $DATA ${COPY} || fail "corrupted copy after put"
|
||||
|
||||
-if [ "$os" != "cygwin" ]; then
|
||||
+if [ "$os" != "cygwin" || "$os" != "msys" ]; then
|
||||
rm -f ${QUOTECOPY}
|
||||
verbose "$tid: put filename with quotes"
|
||||
echo "put $DATA \"$QUOTECOPY_ARG\"" | \
|
||||
diff --git a/regress/test-exec.sh b/regress/test-exec.sh
|
||||
index 1b6526d..0b5426f 100644
|
||||
--- a/regress/test-exec.sh
|
||||
+++ b/regress/test-exec.sh
|
||||
@@ -16,9 +16,16 @@ CYGWIN_NT-5.0)
|
||||
os=cygwin
|
||||
TEST_SSH_IPV6=no
|
||||
;;
|
||||
+MSYS_NT-5.0)
|
||||
+ os=cygwin
|
||||
+ TEST_SSH_IPV6=no
|
||||
+ ;;
|
||||
CYGWIN*)
|
||||
os=cygwin
|
||||
;;
|
||||
+MSYS*)
|
||||
+ os=cygwin
|
||||
+ ;;
|
||||
esac
|
||||
|
||||
if [ ! -z "$TEST_SSH_PORT" ]; then
|
||||
--
|
||||
2.9.1
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user