openssh: bump version

This commit is contained in:
Jerome Duval
2014-11-24 22:57:23 +00:00
parent 23e893fe00
commit c4d1bd60f0
2 changed files with 180 additions and 0 deletions

View File

@@ -0,0 +1,133 @@
SUMMARY="Secure Shell Client and Server (Remote Login Program)"
DESCRIPTION="
OpenSSH is a FREE version of the SSH connectivity tools that technical users \
of the Internet rely on. Users of telnet, rlogin, and ftp may not realize that \
their password is transmitted across the Internet unencrypted, but it is. \
OpenSSH encrypts all traffic (including passwords) to effectively eliminate \
eavesdropping, connection hijacking, and other attacks. Additionally, OpenSSH \
provides secure tunneling capabilities and several authentication methods, and \
supports all SSH protocol versions.
The OpenSSH suite replaces rlogin and telnet with the ssh program, rcp with \
scp, and ftp with sftp. Also included is sshd (the server side of the \
package), and the other utilities like ssh-add, ssh-agent, ssh-keysign, \
ssh-keyscan, ssh-keygen and sftp-server.
"
HOMEPAGE="http://www.openssh.com/"
LICENSE="OpenSSH"
COPYRIGHT="2005-2014 Tatu Ylonen et al."
SRC_URI="http://openbsd.mirrorcatalogs.com/pub/OpenBSD/OpenSSH/portable/openssh-$portVersion.tar.gz"
CHECKSUM_SHA256="b2f8394eae858dabbdef7dac10b99aec00c95462753e80342e530bbb6f725507"
REVISION="1"
ARCHITECTURES="x86_gcc2 x86 x86_64"
PATCHES="sshd_config.patch
pathnames.patch
bzero.patch"
ADDITIONAL_FILES="sshd_keymaker.sh"
PROVIDES="
openssh = $portVersion compat >= 5
cmd:scp = $portVersion compat >= 5
cmd:sftp = $portVersion compat >= 5
cmd:sftp_server = $portVersion compat >= 5
cmd:slogin = $portVersion compat >= 5
cmd:ssh = $portVersion compat >= 5
cmd:ssh_add = $portVersion compat >= 5
cmd:ssh_agent = $portVersion compat >= 5
cmd:ssh_keygen = $portVersion compat >= 5
cmd:ssh_keyscan = $portVersion compat >= 5
cmd:ssh_keysign = $portVersion compat >= 5
cmd:ssh_pkcs11_helper = $portVersion compat >= 5
cmd:sshd = $portVersion compat >= 5
"
REQUIRES="
haiku >= $haikuVersion
cmd:login
cmd:passwd
lib:libcrypto
lib:libedit
lib:libncurses
lib:libssl
lib:libz
"
BUILD_REQUIRES="
devel:libcrypto
devel:libedit
devel:libncurses
devel:libssl
devel:libz
"
BUILD_PREREQUIRES="
haiku_devel >= $haikuVersion
cmd:aclocal
cmd:autoconf
cmd:automake
cmd:gcc
cmd:ld
cmd:libtoolize
cmd:make
cmd:pkg_config
"
GLOBAL_WRITABLE_FILES="
settings/ssh directory keep-old
"
USER_SETTINGS_FILES="
settings/ssh directory
"
POST_INSTALL_SCRIPTS="
$relativePostInstallDir/sshd_keymaker.sh
"
sshdUserHomeDir="/packages/$portVersionedName-$REVISION/.self/$relativeDataDir/openssh/empty"
PACKAGE_USERS="
sshd real-name \"sshd user\" home \"$sshdUserHomeDir\" shell \"/bin/true\"
"
PACKAGE_GROUPS="sshd"
PATCH()
{
echo 'AC_CONFIG_MACRO_DIR([m4])' >> configure.ac
}
BUILD()
{
mkdir -p m4
aclocal --install -I m4
libtoolize --force --copy
aclocal -I m4
autoconf
defaultPath=".:/boot/home/config/non-packaged/bin:/boot/home/config/bin"
defaultPath+=":/boot/common/non-packaged/bin:/boot/common/bin:/bin"
defaultPath+=":/boot/common/apps:/boot/common/preferences:/boot/system/apps"
defaultPath+=":/boot/system/preferences"
# Note: override sysconfdir and libexecdir since ssh doesn't create
# subdirectories as it should.
PATH_PASSWD_PROG=$portPackageLinksDir/cmd~passwd/bin/passwd \
LOGIN_PROGRAM=$portPackageLinksDir/cmd~login/bin/login \
runConfigure ./configure \
--sysconfdir=$sysconfDir/ssh \
--libexecdir=$libExecDir/openssh \
--with-privsep-path=$dataDir/openssh/empty \
--with-pid-dir=$prefix/var/run \
--with-default-path="$defaultPath" \
--with-md5-passwords \
--disable-utmpx \
--with-libedit
make $jobArgs
}
INSTALL()
{
make install-nokeys
mkdir -p $postInstallDir
cp -f $portDir/additional-files/sshd_keymaker.sh $postInstallDir
}
TEST()
{
make tests
}

View File

@@ -0,0 +1,47 @@
From 3db15d63ae6a9ceeaad80f367e3a7f9df003dae1 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Mon, 24 Nov 2014 18:45:00 +0000
Subject: haiku: we define bzero(x, y) but not bzero.
diff --git a/openbsd-compat/explicit_bzero.c b/openbsd-compat/explicit_bzero.c
index 3c85a48..a02e35e 100644
--- a/openbsd-compat/explicit_bzero.c
+++ b/openbsd-compat/explicit_bzero.c
@@ -23,6 +23,24 @@ explicit_bzero(void *p, size_t n)
#else /* HAVE_MEMSET_S */
+#ifdef __HAIKU__
+/* Haiku defines bzero(x, y) but not bzero */
+
+/*
+ * Indirect memset through a volatile pointer to hopefully avoid
+ * dead-store optimisation eliminating the call.
+ */
+static void (* volatile ssh_memset)(void *, int, size_t) = memset;
+
+void
+explicit_bzero(void *p, size_t n)
+{
+ ssh_memset(p, 0, n);
+}
+
+
+#else
+
/*
* Indirect bzero through a volatile pointer to hopefully avoid
* dead-store optimisation eliminating the call.
@@ -35,6 +53,8 @@ explicit_bzero(void *p, size_t n)
ssh_bzero(p, n);
}
+#endif
+
#endif /* HAVE_MEMSET_S */
#endif /* HAVE_EXPLICIT_BZERO */
--
1.8.3.4