summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net-misc/openssh/Manifest9
-rw-r--r--net-misc/openssh/files/openssh-5.2_p1-BJA-ldap-stdargs.diff10
-rw-r--r--net-misc/openssh/files/sshd.rc68
-rw-r--r--net-misc/openssh/openssh-5.2_p1-r1.ebuild224
4 files changed, 248 insertions, 3 deletions
diff --git a/net-misc/openssh/Manifest b/net-misc/openssh/Manifest
index 915f79d8..6d8c1487 100644
--- a/net-misc/openssh/Manifest
+++ b/net-misc/openssh/Manifest
@@ -7,11 +7,12 @@ AUX openssh-4.7_p1-engines.patch 4202 RMD160 33648508fc66d422eaea17ff5ed756ceb64
AUX openssh-4.7_p1-lpk-64bit.patch 1096 RMD160 566e48f34b44add23e3d46456e54d6d3a453cac1 SHA1 83704313a423be33f9ac62499908b5da95c0d8f4 SHA256 442bb358ebeceaead8fd8a84c7c041f2bf7fb11ab623d74a902febeeb582903d
AUX openssh-4.7_p1-packet-size.patch 1130 RMD160 b604b500747f5b53c9ddc3950adfaca9af54cfff SHA1 ba13a01dceb5aadfa646c23b675b74b14123c68f SHA256 8d0c89ae533366d3f7808274eb4a46c969a51011d7c25e167e22a476d6b2f168
AUX openssh-4.7p1-selinux.diff 541 RMD160 bcb8f1fef2ae8378e7000732223c6116e06e0d6f SHA1 395b4dcff3eb7b92582a4364e612fff87278e7bc SHA256 ef8d71c46059bdcc8487cad06914639a8237197561cc030d8eed3baf418cc810
+AUX openssh-5.2_p1-BJA-ldap-stdargs.diff 251 RMD160 b4b7fef4db654feb27d3752b3ba229097e663300 SHA1 a60afd12e1832e38d3ea37ee60779bda6dec5da8 SHA256 321a458d02e87d0928d254409c9452295f853f199f2a238a3e1fe0853199f243
AUX openssh_4.7p1-blacklist.patch 29059 RMD160 0bd01594f8174ebd8e55ffc56cfe9de09137509b SHA1 6057cfa1e4357f7b116149a793824902fa37efa6 SHA256 37d05f2f5957d121d00219f2fb79089d1e4488232e16e0fded9f4403d9b05c2c
AUX sshd.confd 396 RMD160 029680b2281961130a815ef599750c4fc4e84987 SHA1 23c283d0967944b6125be26ed4628f49abf586b2 SHA256 29c6d57ac3ec6018cadc6ba6cd9b90c9ed46e20049b970fdcc68ee2481a2ee41
AUX sshd.pam_include 205 RMD160 6b20ea83c69ef613d75daf43515aaec88d4cd815 SHA1 122472d859c24f7c776bb10fbfcb0221146ed056 SHA256 8d59135e96f4eff6b80c143b82cced7beb0bbca19ff91b479f1ba92916243d5e
AUX sshd.pam_include.1 205 RMD160 3051b92836a496c7c431f41585de688f7c9f51a7 SHA1 b9eca146fcea016b7146f1ac11cf3d072d887b27 SHA256 3185075821bb1f76cdc584c28f690a7338f8db5489d5fce73fe4bcbbfd3dfbfa
-AUX sshd.rc6 2046 RMD160 68df8ff7933b7a232882b2a6140fe1a2637609b6 SHA1 c3f74dbd764d570f69e60f18a081f19e3cefb037 SHA256 6569cb934cb1d5b9016c2828ff8c79b5c8477dd27b7078c609445cfc16692e9e
+AUX sshd.rc6 2123 RMD160 e1f655ae93bfed5dfe9ecc49a6adbe860e2f6364 SHA1 2c3117ff61d28d1d9f52ef0d8348c9cfc5b8d55d SHA256 b86a728768a1ce2d47cc5fef01627cb53da6ebb79d827ad4616ae6eb8c0f00f1
DIST openssh-4.4p1+SecurID_v1.3.2.patch 48240 RMD160 45d5734f7e65709cce581f1f85c06f60a73b825b SHA1 10bece428f6f36a0bb59b8fe9b9fb4321b544fa5 SHA256 189ad59139d86e5c808650add131af20ade00439713c3abcfac9a4e53580a196
DIST openssh-4.5p1+x509-5.5.2.diff.gz 137561 RMD160 2e7597bc97d634ecc3d434cc714cc5b1d4076fec SHA1 5f29fbf73a991d778f81f9029fd90ffc4be9b726 SHA256 580b9b2be2a5224852f9979180fa9570059c1aa398b908dc1907d2a5a5e1f4a2
DIST openssh-4.5p1-engines.diff 4190 RMD160 f20464e72d6138df287c694e0dc7c47c3a601b88 SHA1 ba47f2557b08c68464f1ed09cfd2767967e38670 SHA256 48e1dd6e218f9583fb896b19c7632b8b023e511dc9fc697e5834c8e7181592f6
@@ -23,9 +24,15 @@ DIST openssh-4.7p1-gsskex-20070927.patch 66693 RMD160 586cd6d2581552fd8aee3e5410
DIST openssh-4.7p1-hpn12v18.diff.gz 16094 RMD160 7b35eb1a3f6f3b703ac7f155f620bff63a900a0e SHA1 8ab61d12b5bcf70d0ffe9cb1d157136d20ebb22c SHA256 45e6ea24e2722cab9b4e143952bf6539024aa8cc93353b88807c910330bb735b
DIST openssh-4.7p1-hpn13v1.diff.gz 23384 RMD160 8975e2af1043cf4f35e73d353faba292f8ff12a6 SHA1 5a1b7c29450084deef116cd718e67142c238d34e SHA256 5c2dfcfe3c8d3713af14dd401f9a34d239bcbfcf2c8261f91c0543f817fe8dbe
DIST openssh-4.7p1.tar.gz 991119 RMD160 b828e79d3d1a931cb77651ec7d7276cf3ba22d90 SHA1 58357db9e64ba6382bef3d73d1d386fcdc0508f4 SHA256 d47133f0c6737d2889bf8da7bdf389fc2268d1c7fa3cd11a52451501eab548bc
+DIST openssh-5.0p1-gsskex-20080404.patch 68272 RMD160 7adfadf11f0fbc8fb5f71848d6fb8c4231e4ebc4 SHA1 41dfe293b3a3c08163cd43926fefabd321f0c37f SHA256 8f8b9910af767ce8e2a5d4854e95c8eb8b089bb250b290d22add38e9ddb1791e
+DIST openssh-5.2p1+x509-6.2.diff.gz 153010 RMD160 a4d7675edc87ee34d4fbc912ca03830936abee5e SHA1 cb5508827185412295b997705711f9f7697ace4e SHA256 72cfb1e232b6ae0a9df6e8539a9f6b53db7c0a2141cf2e4dd65b407748fa9f34
+DIST openssh-5.2p1.tar.gz 1016612 RMD160 7c53f342034b16e9faa9f5a09ef46390420722eb SHA1 8273a0237db98179fbdc412207ff8eb14ff3d6de SHA256 4023710c37d0b3d79e6299cb79b6de2a31db7d581fe59e775a5351784034ecae
+DIST openssh-5.2pkcs11-0.26.tar.bz2 18642 RMD160 07093fb2ad47247b2f028fae4fe1b80edf4ddaf8 SHA1 755793398e1b04ee6c15458a69ce4ad68d2abee0 SHA256 9655f118c614f76cfdd3164b5c0e3e430f20a4ce16c65df0dc1b594648cf1c07
DIST openssh-lpk-4.4p1-0.3.7.patch 61187 RMD160 90b0bbe07a3617f6eecb9f77c1a38c5f4dd4dcaf SHA1 b1854a4391c5d11f1a5ab09059643bbaf2278009 SHA256 c74aa642b4b2eeceb0c3f554752d172f8d5a7cd30f2aae517e93ef3bf1bd24e7
DIST openssh-lpk-4.6p1-0.3.9.patch 61605 RMD160 1bf1830192c3eba43c66c3c6469740724cb1ecf2 SHA1 2d0d41f6913d6e899e58a4b569afa30aadf82092 SHA256 e12335e8bf020508ea3866db07b306f4c965e3f9de262c06f62fad494e93107e
+DIST openssh-lpk-5.2p1-0.3.11.patch.gz 18116 RMD160 2ff9bdff19e0854a96063be1e0589fa3f85da0d7 SHA1 33b36cf94f68a80fca497da110529ce69d62fbb0 SHA256 450b56a989767aa65a974213e8f7e9d0ee9d08522247db7b787730e53685bebd
EBUILD openssh-4.5_p1-r1.ebuild 5573 RMD160 f0f1336dffb2eb92af883b18c850f2f9bb201d0c SHA1 2cd9ca7bbd9b25a7f97645e9f453b324e5494c9a SHA256 7c95b14eb03eb2f4d150ce43744a384a10bbed67d10b66db914d354aace86201
EBUILD openssh-4.7_p1-r1.ebuild 5050 RMD160 903d72bae274e223771cbbec71ad95d8a485cf22 SHA1 a89a06c1d11e7a36f6eb7f9a5c7e833de997c2b0 SHA256 c872ee9c8d6ee86ce8f6c636bf44fe34e6fe910de4a9fe673855248ee353f0a7
EBUILD openssh-4.7_p1-r2.ebuild 5051 RMD160 6eb00af7bd7bbc5ef2fdd2c9061acd350b2c5682 SHA1 be630dd4cfe9a865a7fbd1d54908744df11ad46e SHA256 5c2edf5778a89f89324254e033c8d8c9ba28f8335e815fbb3146cba2e5396275
EBUILD openssh-4.7_p1-r6.ebuild 5404 RMD160 dc538642c60297f60babd80f3df0ce83b7072903 SHA1 4fed7023be0ea1669a0f31382dfe023423079fc7 SHA256 bdec8cc4705ab3b2f6573898cc428d4d12233821396a73fa393af14e20df77d8
+EBUILD openssh-5.2_p1-r1.ebuild 7024 RMD160 59a191d64bed42fd43af2aab54680bf87dd5db3f SHA1 e46bcd44b689971c599b7a5a8310aeb7edf53151 SHA256 ca385089dd54edcf68687efbd5ce535af6be7bb395e684be06ee55dac152d841
diff --git a/net-misc/openssh/files/openssh-5.2_p1-BJA-ldap-stdargs.diff b/net-misc/openssh/files/openssh-5.2_p1-BJA-ldap-stdargs.diff
new file mode 100644
index 00000000..edac277a
--- /dev/null
+++ b/net-misc/openssh/files/openssh-5.2_p1-BJA-ldap-stdargs.diff
@@ -0,0 +1,10 @@
+--- ldapauth.c.ori 2009-04-18 18:06:38.000000000 +0200
++++ ldapauth.c 2009-04-18 18:06:11.000000000 +0200
+@@ -31,6 +31,7 @@
+ #include <stdlib.h>
+ #include <unistd.h>
+ #include <string.h>
++#include <stdarg.h>
+
+ #include "ldapauth.h"
+ #include "log.h"
diff --git a/net-misc/openssh/files/sshd.rc6 b/net-misc/openssh/files/sshd.rc6
index 258c3a3f..aeaf09c9 100644
--- a/net-misc/openssh/files/sshd.rc6
+++ b/net-misc/openssh/files/sshd.rc6
@@ -1,9 +1,9 @@
#!/sbin/runscript
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/files/sshd.rc6,v 1.22 2007/02/23 10:51:48 uberlord Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/files/sshd.rc6,v 1.24 2009/04/12 20:12:49 robbat2 Exp $
-opts="reload"
+opts="${opts} reload"
depend() {
use logger dns
@@ -62,6 +62,10 @@ start() {
}
stop() {
+ if [ "${RC_CMD}" = "restart" ] ; then
+ checkconfig || return 1
+ fi
+
ebegin "Stopping ${SVCNAME}"
start-stop-daemon --stop --exec "${SSHD_BINARY}" \
--pidfile "${SSHD_PIDFILE}" --quiet
diff --git a/net-misc/openssh/openssh-5.2_p1-r1.ebuild b/net-misc/openssh/openssh-5.2_p1-r1.ebuild
new file mode 100644
index 00000000..deb4dde3
--- /dev/null
+++ b/net-misc/openssh/openssh-5.2_p1-r1.ebuild
@@ -0,0 +1,224 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/openssh-5.2_p1-r1.ebuild,v 1.10 2009/04/12 22:39:03 vapier Exp $
+
+inherit eutils flag-o-matic multilib autotools pam
+
+# Make it more portable between straight releases
+# and _p? releases.
+PARCH=${P/_/}
+
+#HPN_PATCH="${PARCH/2/1}-hpn13v5.diff.gz"
+LDAP_PATCH="${PARCH/openssh/openssh-lpk}-0.3.11.patch.gz"
+PKCS11_PATCH="${PARCH/p1}pkcs11-0.26.tar.bz2"
+X509_VER="6.2" X509_PATCH="${PARCH}+x509-${X509_VER}.diff.gz"
+
+DESCRIPTION="Port of OpenBSD's free SSH release"
+HOMEPAGE="http://www.openssh.org/"
+SRC_URI="mirror://openbsd/OpenSSH/portable/${PARCH}.tar.gz
+ http://www.sxw.org.uk/computing/patches/openssh-5.0p1-gsskex-20080404.patch
+ ${HPN_PATCH:+hpn? ( http://www.psc.edu/networking/projects/hpn-ssh/${HPN_PATCH} )}
+ ${LDAP_PATCH:+ldap? ( mirror://gentoo/${LDAP_PATCH} )}
+ ${PKCS11_PATCH:+pkcs11? ( http://alon.barlev.googlepages.com/${PKCS11_PATCH} )}
+ ${X509_PATCH:+X509? ( http://roumenpetrov.info/openssh/x509-${X509_VER}/${X509_PATCH} )}"
+
+LICENSE="as-is"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc ~sparc-fbsd x86 ~x86-fbsd"
+IUSE="hpn kerberos ldap libedit pam pkcs11 selinux skey smartcard static tcpd X X509"
+
+RDEPEND="pam? ( virtual/pam )
+ kerberos? ( virtual/krb5 )
+ selinux? ( >=sys-libs/libselinux-1.28 )
+ skey? ( >=sys-auth/skey-1.1.5-r1 )
+ ldap? ( net-nds/openldap )
+ libedit? ( dev-libs/libedit )
+ >=dev-libs/openssl-0.9.6d
+ >=sys-libs/zlib-1.2.3
+ smartcard? ( dev-libs/opensc )
+ pkcs11? ( dev-libs/pkcs11-helper )
+ tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
+ X? ( x11-apps/xauth )
+ userland_GNU? ( sys-apps/shadow )"
+DEPEND="${RDEPEND}
+ dev-util/pkgconfig
+ virtual/os-headers
+ sys-devel/autoconf"
+RDEPEND="${RDEPEND}
+ pam? ( >=sys-auth/pambase-20081028 )"
+PROVIDE="virtual/ssh"
+
+S=${WORKDIR}/${PARCH}
+
+pkg_setup() {
+ # this sucks, but i'd rather have people unable to `emerge -u openssh`
+ # than not be able to log in to their server any more
+ maybe_fail() { [[ -z ${!2} ]] && use ${1} && echo ${1} ; }
+ local fail="
+ $(maybe_fail ldap LDAP_PATCH)
+ $(maybe_fail pkcs11 PKCS11_PATCH)
+ $(maybe_fail X509 X509_PATCH)
+ "
+ fail=$(echo ${fail})
+ if [[ -n ${fail} ]] ; then
+ eerror "Sorry, but this version does not yet support features"
+ eerror "that you requested: ${fail}"
+ eerror "Please mask ${PF} for now and check back later:"
+ eerror " # echo '=${CATEGORY}/${PF}' >> /etc/portage/package.mask"
+ die "booooo"
+ fi
+}
+
+src_unpack() {
+ unpack ${PARCH}.tar.gz
+ cd "${S}"
+
+ sed -i \
+ -e '/_PATH_XAUTH/s:/usr/X11R6/bin/xauth:/usr/bin/xauth:' \
+ pathnames.h || die
+
+ if use pkcs11 ; then
+ cd "${WORKDIR}"
+ unpack "${PKCS11_PATCH}"
+ cd "${S}"
+ EPATCH_OPTS="-p1" epatch "${WORKDIR}"/*pkcs11*/{1,2,4}*
+ use X509 && EPATCH_OPTS="-R" epatch "${WORKDIR}"/*pkcs11*/1000_all_log.patch
+ fi
+ use X509 && epatch "${DISTDIR}"/${X509_PATCH}
+ use smartcard && epatch "${FILESDIR}"/openssh-3.9_p1-opensc.patch
+ if ! use X509 ; then
+ if [[ -n ${LDAP_PATCH} ]] && use ldap ; then
+ # The patch for bug 210110 64-bit stuff is now included.
+ epatch "${DISTDIR}"/${LDAP_PATCH}
+ # Not needed anymore of 0.3.11. Merged into the main patch.
+ #epatch "${FILESDIR}"/${PN}-5.1_p1-ldap-hpn-glue.patch
+ fi
+ #epatch "${DISTDIR}"/openssh-5.0p1-gsskex-20080404.patch #115553 #216932
+ else
+ use ldap && ewarn "Sorry, X509 and ldap don't get along, disabling ldap"
+ fi
+ epatch "${FILESDIR}"/${PN}-4.7_p1-GSSAPI-dns.patch #165444 integrated into gsskex
+ [[ -n ${HPN_PATCH} ]] && use hpn && epatch "${DISTDIR}"/${HPN_PATCH}
+ epatch "${FILESDIR}"/${PN}-4.7p1-selinux.diff #191665
+ use ldap && epatch "${FILESDIR}"/${P}-BJA-ldap-stdargs.diff
+
+ sed -i "s:-lcrypto:$(pkg-config --libs openssl):" configure{,.ac} || die
+
+ # Disable PATH reset, trust what portage gives us. bug 254615
+ sed -i -e 's:^PATH=/:#PATH=/:' configure || die
+
+ eautoreconf
+}
+
+src_compile() {
+ addwrite /dev/ptmx
+ addpredict /etc/skey/skeykeys #skey configure code triggers this
+
+ local myconf=""
+ if use static ; then
+ append-ldflags -static
+ use pam && ewarn "Disabling pam support becuse of static flag"
+ myconf="${myconf} --without-pam"
+ else
+ myconf="${myconf} $(use_with pam)"
+ fi
+
+ econf \
+ --with-ldflags="${LDFLAGS}" \
+ --disable-strip \
+ --sysconfdir=/etc/ssh \
+ --libexecdir=/usr/$(get_libdir)/misc \
+ --datadir=/usr/share/openssh \
+ --with-privsep-path=/var/empty \
+ --with-privsep-user=sshd \
+ --with-md5-passwords \
+ --with-ssl-engine \
+ $(use_with kerberos kerberos5 /usr) \
+ ${LDAP_PATCH:+$(use ldap && use_with ldap)} \
+ $(use_with libedit) \
+ ${PKCS11_PATCH:+$(use pkcs11 && use_with pkcs11)} \
+ $(use_with selinux) \
+ $(use_with skey) \
+ $(use_with smartcard opensc) \
+ $(use_with tcpd tcp-wrappers) \
+ ${myconf} \
+ || die "bad configure"
+ emake || die "compile problem"
+}
+
+src_install() {
+ emake install-nokeys DESTDIR="${D}" || die
+ fperms 600 /etc/ssh/sshd_config
+ dobin contrib/ssh-copy-id
+ newinitd "${FILESDIR}"/sshd.rc6 sshd
+ newconfd "${FILESDIR}"/sshd.confd sshd
+ keepdir /var/empty
+
+ newpamd "${FILESDIR}"/sshd.pam_include.2 sshd
+ if use pam ; then
+ sed -i \
+ -e "/^#UsePAM /s:.*:UsePAM yes:" \
+ -e "/^#PasswordAuthentication /s:.*:PasswordAuthentication no:" \
+ -e "/^#PrintMotd /s:.*:PrintMotd no:" \
+ -e "/^#PrintLastLog /s:.*:PrintLastLog no:" \
+ "${D}"/etc/ssh/sshd_config || die "sed of configuration file failed"
+ fi
+
+ doman contrib/ssh-copy-id.1
+ dodoc ChangeLog CREDITS OVERVIEW README* TODO sshd_config
+
+ diropts -m 0700
+ dodir /etc/skel/.ssh
+}
+
+src_test() {
+ local t tests skipped failed passed shell
+ tests="interop-tests compat-tests"
+ skipped=""
+ shell=$(getent passwd ${UID} | cut -d: -f7)
+ if [[ ${shell} == */nologin ]] || [[ ${shell} == */false ]] ; then
+ elog "Running the full OpenSSH testsuite"
+ elog "requires a usable shell for the 'portage'"
+ elog "user, so we will run a subset only."
+ skipped="${skipped} tests"
+ else
+ tests="${tests} tests"
+ fi
+ for t in ${tests} ; do
+ # Some tests read from stdin ...
+ emake -k -j1 ${t} </dev/null \
+ && passed="${passed}${t} " \
+ || failed="${failed}${t} "
+ done
+ einfo "Passed tests: ${passed}"
+ ewarn "Skipped tests: ${skipped}"
+ if [[ -n ${failed} ]] ; then
+ ewarn "Failed tests: ${failed}"
+ die "Some tests failed: ${failed}"
+ else
+ einfo "Failed tests: ${failed}"
+ return 0
+ fi
+}
+
+pkg_postinst() {
+ enewgroup sshd 22
+ enewuser sshd 22 -1 /var/empty sshd
+
+ # help fix broken perms caused by older ebuilds.
+ # can probably cut this after the next stage release.
+ chmod u+x "${ROOT}"/etc/skel/.ssh >& /dev/null
+
+ ewarn "Remember to merge your config files in /etc/ssh/ and then"
+ ewarn "restart sshd: '/etc/init.d/sshd restart'."
+ if use pam ; then
+ echo
+ ewarn "Please be aware users need a valid shell in /etc/passwd"
+ ewarn "in order to be allowed to login."
+ fi
+ if use pkcs11 ; then
+ echo
+ einfo "For PKCS#11 you should also emerge one of the askpass softwares"
+ einfo "Example: net-misc/x11-ssh-askpass"
+ fi
+}