summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2015-03-25 21:06:04 +0000
committerMike Frysinger <vapier@gentoo.org>2015-03-25 21:06:04 +0000
commitde7103ce2de67d14803fbece39dcf880fd876de9 (patch)
treea8f87e1248aefd305b4567c89ec0287b310111f6 /net-misc
parentRevert openssh[hpn] masking #544254. (diff)
downloadhistorical-de7103ce2de67d14803fbece39dcf880fd876de9.tar.gz
historical-de7103ce2de67d14803fbece39dcf880fd876de9.tar.bz2
historical-de7103ce2de67d14803fbece39dcf880fd876de9.zip
Fix the server logging patch to work on IPv6 & x86 (socketcall) #544254 by Thomas D..
Package-Manager: portage-2.2.18/cvs/Linux x86_64 Manifest-Sign-Key: 0xD2E96200
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/openssh/ChangeLog8
-rw-r--r--net-misc/openssh/Manifest26
-rw-r--r--net-misc/openssh/openssh-6.8_p1-r3.ebuild325
3 files changed, 356 insertions, 3 deletions
diff --git a/net-misc/openssh/ChangeLog b/net-misc/openssh/ChangeLog
index 1a41de5dcd06..a07ae9d779a3 100644
--- a/net-misc/openssh/ChangeLog
+++ b/net-misc/openssh/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for net-misc/openssh
# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/ChangeLog,v 1.556 2015/03/25 21:03:54 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/ChangeLog,v 1.557 2015/03/25 21:06:03 vapier Exp $
+
+*openssh-6.8_p1-r3 (25 Mar 2015)
+
+ 25 Mar 2015; Mike Frysinger <vapier@gentoo.org> +openssh-6.8_p1-r3.ebuild:
+ Fix the server logging patch to work on IPv6 & x86 (socketcall) #544254 by
+ Thomas D..
25 Mar 2015; Mike Frysinger <vapier@gentoo.org>
files/openssh-6.8_p1-ssh-keygen-no-ssh1.patch:
diff --git a/net-misc/openssh/Manifest b/net-misc/openssh/Manifest
index 5ee87d3f02b8..5bf15ae5c2cc 100644
--- a/net-misc/openssh/Manifest
+++ b/net-misc/openssh/Manifest
@@ -1,3 +1,6 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
AUX openssh-4.7_p1-GSSAPI-dns.patch 4494 SHA256 88a08f349258d4be5b2faa838a89fe1aa0196502990b745ac0e3a70dda30a0d7 SHA512 4d00a9ed79f66b92502c3e5ee580523f63d7b3643fe1bd330ff97994acce527d4d285d38199cef66eddc0ef68afabf7b268abc60cba871bac5d2e99045d4ac11 WHIRLPOOL 2f118fd2f016c529dbc31e8f2b6b418931e6770ab02c28b7feeaba93e84e7fcd1c742f4420a43a9fec0bdfaa4d4bc7cf14fb860c0a56c68a30e7b136fb60bcdb
AUX openssh-6.3_p1-x509-hpn14v2-glue.patch 1451 SHA256 d7179b3c16edd065977aaf56a410e2b9b237206fb619474f312972b430b73c8d SHA512 02577e3f718ff994bb4e962189f17048b4c03104d0a1981683f3c6a1d6d30701db368e132102c8396da2c0f5eb2f6602b26f32f74d19382af34bd9a93fc508f3 WHIRLPOOL b7d224d71634f380bd31b3a1dd3e588a29582255f717a6a308738ad58b485b693d827a53704479995ec2ebca53c9dc9b2113d8de52a1336b67ce83943f946b77
AUX openssh-6.6.1_p1-x509-glue.patch 635 SHA256 381794bdfc4880da4411041ab1f795cba303644b0a35e88f0f452fca8c2bfbb8 SHA512 6d3adefc5449f812052221b69c588f9948e6116dd5c5644db4e0426264f06fd9a15f04364c2484ce03267f4a84b8806de7d7a7c9140538d73be9e7b50f4eeb47 WHIRLPOOL 823249e96f7175eef09f86dbcc67f6158c23f453eaa940a33c18a838389204cd3a43f5dccd39b6004e05cb05ea327d33be91c2ee1eb4525f13dc29e6943ea6b6
@@ -8,7 +11,7 @@ AUX openssh-6.7_p1-sshd-gssapi-multihomed.patch 5489 SHA256 d2a1735b523709a4b4ce
AUX openssh-6.7_p1-x509-glue.patch 1633 SHA256 58031e90e0bf220028934ab590af6ccfc45722629b2416df13d84f10c9b94478 SHA512 364ca0280be5cc83d1dedf7727323fd5fc0093c6dbcf9cc8ccaa30ee754b866584be28da1166953f03faf8745d6364e33fad7daad9be9a29681a8674eb9d292b WHIRLPOOL b79a6cff897be78793bbf2ca03154103aa1380647b8c53e104155fd68122568a8e7dea23996213b192e4269f980b1035d3ca395dbd2c318fd81a45f44d110c31
AUX openssh-6.7_p1-xmalloc-include.patch 390 SHA256 ea43a6a211d8cae4a078b748736f43d4a9d11804ace65886dec826b878dec28e SHA512 b51d9149418217828bdc53c234e248f8be1703b480ccf808814d37cd2589bccdbecff0046d2f2d0e4626420d0d4c2e02d25a9cc07ae31b365cd0b848ccc02035 WHIRLPOOL 04b298eb481fef585b055eb3d706cca55ad6efed6168246f0031e5f614085ae5e70cbb77717047d6c70d7d13a6846657e4a0089d4b8cdf5d9d05652ee22f7209
AUX openssh-6.8_p1-sctp-x509-glue.patch 2937 SHA256 fe79e3e828f8599e7bad787c6e35bce5f6781a0875c56b250f0d7fde83e2f841 SHA512 776a4eab916ff64d255fb19dca26f0cb1cebb0a5d0c2dbcb40ecbf97b122fb20123532897fb962b27fae375c059ef0dc00c771bf47b67bd092a5ebb3f2252216 WHIRLPOOL c8126624b4be260f8fe40a4a9d7142b6f77ee15504e2d280c6429360ebbf53103974746d5746fe4b27edec6246f01afa1d921d1b5a2d46ae808e4bb41afbb181
-AUX openssh-6.8_p1-ssh-keygen-no-ssh1.patch 491 SHA256 18ee3bf3bc2216e92c825a9c8eb4b415eff9a29f5fb5e4824b43202d744ef637 SHA512 4b94d839bf9e9ea3881b9a7c8f18983eb64fe462a612efefabc89a1262895bde4cfecc51a24c242d46a923a6a601efda5c19679f8d8bb2b82202fdd2d5d42124 WHIRLPOOL 64981a70c33a9f1a754918730a711c44e4c17d66de4cad8223d5665f602bdb728cb4b83a6bba6c2a81c64156e4e13f9ea5bdd6e21ef069ba98031860b08e42f3
+AUX openssh-6.8_p1-ssh-keygen-no-ssh1.patch 1209 SHA256 2ef08a14aab7d5c761670321ed6c66fb8e66c467625ce22448b2d1c020686b66 SHA512 1fae1c0b36b5e792861e83868d55de9e3df85270fda4aaf465c83e2deaf47045429f94c84d1abd270be4fc7519a42e3676839edda588322273e6ebd3ff37a570 WHIRLPOOL 93619f61208f86cc3857a5d2283343645614d7285b56f4585e073405e16c396272cb590e96225f09046de8fe918de5e1a81504385dda2ca3a0d467d0fdfde76f
AUX openssh-6.8_p1-sshd-gssapi-multihomed.patch 5464 SHA256 5f3506f0d45c22de85cf170c7dfeff134a144ec94f9fc1c57c5b3b797ee82756 SHA512 7bfbf720af2728abb55f73b67609967f34da27fea9a9dd6e0293e486a03d7d1167f506623771792d782707bfe58b46c69675bb3c5ad83332b7a50ee748176fbc WHIRLPOOL 81432c4ba7e34d216d73f63945f3c8d52d9113c07fb1f7c3dd5b39ac96223d38d2321a6d6de21b58b29767576c2a779a5703fa2e5727cd3fe4981581e822155d
AUX openssh-6.8_p1-ssl-engine-configure.patch 883 SHA256 c25d219d8baea01bde40dce34378d4f185b83968debded0b2d4e2035f6467530 SHA512 ce8c3362af9dd9d95174b8248b0e9c08463e6fa18d3e83bf01687756c2df77607674a95acd2930ee85994aa186b5229d93e32662e13caae0b45980fddc00e65e WHIRLPOOL d7f285e3317ddd797222a4d584da385a14fa5c7316b8002faa1005ae5129cb580abc9a70189470c0ff5feb0368de4b0b171596d1aa3705556037084c8eff3d34
AUX sshd.confd 396 SHA256 29c6d57ac3ec6018cadc6ba6cd9b90c9ed46e20049b970fdcc68ee2481a2ee41 SHA512 b9ae816af54a55e134a9307e376f05367b815f1b3fd545c2a2c312d18aedcf907f413e8bad8db980cdd9aad4011a72a79e1e94594f69500939a9cb46287f2f81 WHIRLPOOL 69f43e6192e009a4663d130f7e40ee8b13c6eb9cc7d960b5e0e22f5d477649c88806a9d219efef211f4346582c2bb51e40d230a8191e5953dbe08bfff976ae53
@@ -27,6 +30,7 @@ DIST openssh-6.8p1+x509-8.3.diff.gz 347942 SHA256 34dbefcce8509d3c876be3e7d89664
DIST openssh-6.8p1-hpnssh14v5.tar.xz 24660 SHA256 dea2c5cdfd08d09f832a88aaf9d8285e57a67bbc68e6652ca3e0bf8b0213d99e SHA512 0b77e5d7d13ac7e2392d52e18240e5a0233d0a452d6cb7d1a0bf7ea7b640df5edc64cfcbe8c4fcb7c011b0eaa6a7aa3d6585292be753387af369d726345b7f5c WHIRLPOOL 2385c4f8ce5b9a2359991b9ca38362ec19482d3c904b10ceeb77c5044c88edabc2470db2ed156931d1c3ab6f93872809bef66a6848e9b39969f7c59d144c31ba
DIST openssh-6.8p1-r1-hpnssh14v5.tar.xz 24648 SHA256 87ab38507c7e4f1855c127f276c7c20e58bcd539dd303a37843d3d24ff72df7e SHA512 5883787b09330ae154f385bbc6bda8c6dbc727df7e9a96ddf4cb4a5162c932937bce8e3aa2b555ff4854df80b738c2ea1cdc4c170a10f9ed6252520edb070edb WHIRLPOOL e508fbfbb148fbd311927c4a88d388d1d15a1ee99e5445df0c774fd23acf7c87962682eab03a0bef6bd12c9d7149b047cbb145e60e6e947bd577e88110b47d52
DIST openssh-6.8p1-r3-hpnssh14v5.tar.xz 25396 SHA256 fc8d075679b659a15df919e1a946fae396b272e7da5de84d993ca0c90a212b43 SHA512 d710aab0f788a56615f951dc1e030d443dd6e14ef2944e41ef82e621b9406542142e095f2ebd4090f16471b08e300665c159edd7567cec17a178586b47aea92d WHIRLPOOL faee05730e96d00c09fb3ca39af39a516b602d841f894cd3b3e8051735eb8bcfb13674aba9b9b139d3407720791232af172a4c935453a525c92726b45fce4df7
+DIST openssh-6.8p1-r4-hpnssh14v5.tar.xz 26448 SHA256 5d903a790987df90536c80cf94c9dccb0834bdd223b6bddc5c54bc7d25f9d383 SHA512 f71b8bf3d66c85d1b9e6fcab8f81d3f68c69c9af07fe158182a49438f3876bbe447d404d692ecdaf645af7885c6b10a89466b43e72e816017c925e4e007f2d32 WHIRLPOOL c95b02464ccc497a98ba1e8b3a8dfb5eec38c7214f438028f4d26b79adcf528baa480269063a46a0a8d113cd91f0e65de2e74693da8596143943e38b23afc23d
DIST openssh-6.8p1.tar.gz 1475953 SHA256 3ff64ce73ee124480b5bf767b9830d7d3c03bbcb6abe716b78f0192c37ce160e SHA512 7c4457e4525a56cdabb1164ffaf6bed1c094294ae7d06dd3484dcffcd87738fcffe7019b6cae0032c254b0389832644522d5a9f2603b50637ffeb9999b5fcede WHIRLPOOL 3ac9cc4fe0b11ca66c0220618d0ef0c5925e5605d4d3d55c9579b708c478cf8613b7575fe213aba57054d97d3290baac4eba26b7a630d22477ec947f22327a5a
DIST openssh-lpk-6.7p1-0.3.14.patch.xz 16920 SHA256 0203e6e44e41d58ec46d1611d7efc985134e662bbee51632c29f43ae809003f0 SHA512 344ccde4a04aeb1500400f779e64b2d8a5ad2970de3c4c343ca9605758e22d3812ef5453cd3221b18ad74a9762583c62417879107e4e1dda1398a6a65bcd04b2 WHIRLPOOL 5b6beeb743d04deea70c8b471a328b5f056fd4651e1370c7882e5d12f54fa2170486dcd6f97aa8c58e80af9a2d4012e2dfbcf53185317976d309783ca8d6cf73
DIST openssh-lpk-6.8p1-0.3.14.patch.xz 16940 SHA256 d5f048dc7e9d3fca085c152fc31306f1d8fa793e524c538295915b075ec085b0 SHA512 2470b6b46f8c7ac985f82d14b788a3eb81a468a1d5013cb7f89257d9dd78b6037e24bf54ac57b757db8ed1df24332d659cf918c11ea73592fd24a69c25a54081 WHIRLPOOL b041ee9e0efdf370686f11df4131ab5e5ffb2f11cc66c386a8223bf563c5b78ab9443f06e4adc2e506e440cdec9dc5b20f5972cd8d691d786d2f903bb49b947b
@@ -35,6 +39,24 @@ EBUILD openssh-6.7_p1-r4.ebuild 10138 SHA256 e4f6c4e80485352cc75e62c0212670a0d7f
EBUILD openssh-6.7_p1.ebuild 10067 SHA256 970be3a06c0293262f6c59d068d290cc71935fe91f4295b1352b6c41c46c3bf7 SHA512 f2b689767c8da075f16e9e5d9fe258e22fb4019034539883d63632c1543d3141787883ec7013f87c23d709a554b4f994c4c2f41b1829e5301b55f7a5da3fbf46 WHIRLPOOL 8d70fd99a1f3307b801999a9c80be4bcc603cbc151170160d78a2fa8a50ceb701657cbb0b0eb9ccfe1287bff9299dcffb36f884b860a5ca88ac4a9936b21a574
EBUILD openssh-6.8_p1-r1.ebuild 10084 SHA256 c0905c8c9f5a7c6c9ddb00aa61f6ba12164e8000bef4f0ff42e3f7fc4f48cd83 SHA512 737d554d3e28b203967d334387b51962b67e7e503d8ed2e2bb000f23b1b2fe671c70cd725d93fb9e137e6c40275006fea8f942b0f3e94d0f82578a293e50c013 WHIRLPOOL f1e0876c9094d25b5f5c03f14ed68ed1257eccbab9dde61854ab5aefcc00f0addcb1478b225bde79ead6bc37f4e2b0a5871d91aa42e42d5e80bfdc3be6aa5372
EBUILD openssh-6.8_p1-r2.ebuild 10152 SHA256 5623f420dbcd5d535390f83d07b0c9c7d07ab7cdfd88fb916c79843f2c3baf0b SHA512 e326f438faf7106fad9c1ce0a8eb240c9da17fe1cbd3436885f17f17723fef8dfadee376775242731f2534b4bdf99dfc1e44c7f103c267938d5d924616991f93 WHIRLPOOL 6d351f4d85912e5978ea3b44edcd4bdbf7906ab993dce5bd13e45f3f77cd2925bcc0ef448beb589c91f059db7c7997d24b403664fa1dde8cc35117feeca277cf
+EBUILD openssh-6.8_p1-r3.ebuild 10218 SHA256 f5e40e903d70cb9373cd8d908cffc2eb42dfe84a78a5eb912bb1473154fdb52a SHA512 5ad4aa2064a8d6768bc4d9b7a98a727f51b3da5a37851d8c5f6c1c7e604a4bb9c6376483c4b5afe61d4b0bc6653ab76633146b971ab2677f86c7f3ec3312696e WHIRLPOOL 5d38ae9bce4cffba2a15eaedbacdd08889b3a0c9e56f9c159f6986eb0700fc443ea294b4ed89e2e9c6b4ae9cf21601b09298e33e90e80ca97fb4608dfefa8031
EBUILD openssh-6.8_p1.ebuild 10045 SHA256 13378c09cc4ceec7cd1b8c12ad925db87c9d37910edb679eb2404527226ee18d SHA512 daa5ba19f6fbc0ac7104c8c7822b22745736bf864999ade1e205d1b7184e0fd67f997c4635ab2335eafdf2d2917cf677764080d3004b24935f4189fce338010f WHIRLPOOL b8d40e35bf44bf26296c8d87e3b293b31f767920afb288a10deff8a9ceeb1c130b4da2697d7ce970091d0810c5d1e3839640e2ebee2f0d63b8ca5b0f430c0c0c
-MISC ChangeLog 92598 SHA256 33e16a20e6f5d9627d8da40cc97459209ba214f42bf20cce9f55a958add4b0c9 SHA512 2d2ca279c5c6127edc05f8b4a3b37fc53630241c5b1dfe8755e798e373797ce7c74cf1ae30ec50305ec5ce3b17d58dee4bc90d4d1efc8183413fa2ffe4828fa1 WHIRLPOOL 0169d2c905a9582ca33ecd1e9baffa3c73b54c9ed6faf4726e525c8c2040cd34fab1c28d3e5ca9f7ad7cedc342906f3276a067788a65834f1bd27c8355bdd485
+MISC ChangeLog 92974 SHA256 9729985baaa2a281e77499d2ad665bee52bf3a0f33cc4ce91cdf514ca2cd379e SHA512 ba75bd788734dbb88c6a28cb2a9f36d4092079bd0622b1f551b5041fe9f102e460014b9668c66fae5b95de66861e5516bdc3d13f38827864ee34940e9ff09d3a WHIRLPOOL ad6f05a6862305fb95c4079338b8b040cff2f917cef9c45b637b12d098f76ffbbd34e4e002bdf51f02eaaa1d9c79c4dbff385d1056bf24e8bf2d9e0a2fef1da6
MISC metadata.xml 2049 SHA256 db7830f81086b967b8212af7c318bf27d22ac7db58b1a4d9c80cc86453ff03ab SHA512 3641e38203376c78fddc11b9d5861bdb629a1f9faf2768be5dc35f62ef3d37636a2f9f990e3ade1de2cec45d33a5fcdf7bb0dcd5f4376d40753fe29b354da42e WHIRLPOOL 6a7497491a150ede87bf20f5da5ed9003d545c9c376db7b78a6c1db66b1b90213f5f97d9211fb8b1ab204c1814c1a90d7be77a2d83cc045cf0762b4d2708c56a
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2
+
+iQIcBAEBCAAGBQJVEyM8AAoJEPGu1DbS6WIAsUMP/2as7f6O1+DovZD1Xy4wE6Z+
+flf9b9zpIAV/OTzJpx5z5eNK6BEjQACbBeecB0lYovXpoVTOdYLlDBW9IZ58jV1k
+80YiKMO6RpXqg1rInh071Eak0UucgvGIH0rsNCINs5+HpQ9rw9Ow/MQCfFDI1HWG
+PXI0J750vAHrY45ALZul3Vn8kr5AMcmhIvyYZCcBuoTtDwb9aodS1hqjZHa563Mv
+U18bY7wt3buaDqvaRE6OHqFA4VTlSJ2HaK+2h2BuUOxJvcH9ZOSY1Bdz3Qqo1yIf
+6oZw94Uz+wIj6QZxH2DTTfriVow5AmGLCXg+X2YUW0sOTajx4JS9+CjmO4t5c1+4
+xSPmrm922/+ZLPL6r74xNhlis7R6vfqoz8MpcsHCzuV7mkaBqeFEOJjEgLwimdj0
+TN15fVIr9cQLK+uc37EKCPtOqsl8Sioq9TR4u7nfy5OqPht7wvSoa9jm9gAu3XN0
+V0PQ0+0ffqN4bjWCixhmJf1VjPv+B+SjE+6gxgGrH6Gp2jDE4vGaAeccaIbJ8rQ5
+2+3DcDUy9kXg8vMu/1dICD5dsxp363VS1gV1ywLYdAZSrytd8Zvflejf3L5wqEyK
+EdPRknwLfaHHxuZ+0xshHH+Lz9Ts9V/zZc/fYAcKp9VX2007DhHOD0aCgy0soov4
+qp0cjZ1sBvaMl7OkAv2Y
+=cLOf
+-----END PGP SIGNATURE-----
diff --git a/net-misc/openssh/openssh-6.8_p1-r3.ebuild b/net-misc/openssh/openssh-6.8_p1-r3.ebuild
new file mode 100644
index 000000000000..f082b31e233a
--- /dev/null
+++ b/net-misc/openssh/openssh-6.8_p1-r3.ebuild
@@ -0,0 +1,325 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/openssh-6.8_p1-r3.ebuild,v 1.1 2015/03/25 21:06:03 vapier Exp $
+
+EAPI="4"
+inherit eutils user flag-o-matic multilib autotools pam systemd versionator
+
+# Make it more portable between straight releases
+# and _p? releases.
+PARCH=${P/_}
+
+HPN_PATCH="${PN}-6.8p1-r4-hpnssh14v5.tar.xz"
+LDAP_PATCH="${PN}-lpk-6.8p1-0.3.14.patch.xz"
+X509_VER="8.3" 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
+ mirror://gentoo/${P}-sctp.patch.xz
+ ${HPN_PATCH:+hpn? (
+ mirror://gentoo/${HPN_PATCH}
+ http://dev.gentoo.org/~vapier/dist/${HPN_PATCH}
+ mirror://sourceforge/hpnssh/${HPN_PATCH}
+ )}
+ ${LDAP_PATCH:+ldap? ( mirror://gentoo/${LDAP_PATCH} )}
+ ${X509_PATCH:+X509? (
+ http://roumenpetrov.info/openssh/x509-${X509_VER}/${X509_PATCH}
+ mirror://gentoo/${P}-x509-glue.patch.xz
+ )}
+ "
+
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~arm-linux ~x86-linux"
+# Probably want to drop ssh1/ssl defaulting to on in a future version.
+IUSE="bindist debug ${HPN_PATCH:++}hpn kerberos kernel_linux ldap ldns libedit pam +pie sctp selinux skey +ssh1 +ssl static X X509"
+REQUIRED_USE="pie? ( !static )
+ ssh1? ( ssl )
+ static? ( !kerberos !pam )
+ X509? ( !ldap ssl )"
+
+LIB_DEPEND="sctp? ( net-misc/lksctp-tools[static-libs(+)] )
+ selinux? ( >=sys-libs/libselinux-1.28[static-libs(+)] )
+ skey? ( >=sys-auth/skey-1.1.5-r1[static-libs(+)] )
+ libedit? ( dev-libs/libedit[static-libs(+)] )
+ ssl? (
+ >=dev-libs/openssl-0.9.6d:0[bindist=]
+ dev-libs/openssl[static-libs(+)]
+ )
+ >=sys-libs/zlib-1.2.3[static-libs(+)]"
+RDEPEND="
+ !static? (
+ ${LIB_DEPEND//\[static-libs(+)]}
+ ldns? (
+ !bindist? ( net-libs/ldns[ecdsa,ssl] )
+ bindist? ( net-libs/ldns[-ecdsa,ssl] )
+ )
+ )
+ pam? ( virtual/pam )
+ kerberos? ( virtual/krb5 )
+ ldap? ( net-nds/openldap )"
+DEPEND="${RDEPEND}
+ static? (
+ ${LIB_DEPEND}
+ ldns? (
+ !bindist? ( net-libs/ldns[ecdsa,ssl,static-libs(+)] )
+ bindist? ( net-libs/ldns[-ecdsa,ssl,static-libs(+)] )
+ )
+ )
+ virtual/pkgconfig
+ virtual/os-headers
+ sys-devel/autoconf"
+RDEPEND="${RDEPEND}
+ pam? ( >=sys-auth/pambase-20081028 )
+ userland_GNU? ( virtual/shadow )
+ X? ( x11-apps/xauth )"
+
+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} ]] && echo "$1" ; }
+ local fail="
+ $(use X509 && maybe_fail X509 X509_PATCH)
+ $(use ldap && maybe_fail ldap LDAP_PATCH)
+ $(use hpn && maybe_fail hpn HPN_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
+
+ # Make sure people who are using tcp wrappers are notified of its removal. #531156
+ if grep -qs '^ *sshd *:' "${EROOT}"/etc/hosts.{allow,deny} ; then
+ eerror "Sorry, but openssh no longer supports tcp-wrappers, and it seems like"
+ eerror "you're trying to use it. Update your ${EROOT}etc/hosts.{allow,deny} please."
+ die "USE=tcpd no longer works"
+ fi
+}
+
+save_version() {
+ # version.h patch conflict avoidence
+ mv version.h version.h.$1
+ cp -f version.h.pristine version.h
+}
+
+src_prepare() {
+ sed -i \
+ -e "/_PATH_XAUTH/s:/usr/X11R6/bin/xauth:${EPREFIX}/usr/bin/xauth:" \
+ pathnames.h || die
+ # keep this as we need it to avoid the conflict between LPK and HPN changing
+ # this file.
+ cp version.h version.h.pristine
+
+ # don't break .ssh/authorized_keys2 for fun
+ sed -i '/^AuthorizedKeysFile/s:^:#:' sshd_config || die
+
+ epatch "${FILESDIR}"/${PN}-6.8_p1-sshd-gssapi-multihomed.patch #378361
+ if use X509 ; then
+ pushd .. >/dev/null
+ epatch "${WORKDIR}"/${P}-x509-glue.patch
+ epatch "${FILESDIR}"/${P}-sctp-x509-glue.patch
+ popd >/dev/null
+ epatch "${WORKDIR}"/${X509_PATCH%.*}
+ epatch "${FILESDIR}"/${PN}-6.3_p1-x509-hpn14v2-glue.patch
+ save_version X509
+ fi
+ if use ldap ; then
+ epatch "${WORKDIR}"/${LDAP_PATCH%.*}
+ save_version LPK
+ fi
+ epatch "${FILESDIR}"/${PN}-4.7_p1-GSSAPI-dns.patch #165444 integrated into gsskex
+ epatch "${FILESDIR}"/${PN}-6.7_p1-openssl-ignore-status.patch
+ epatch "${FILESDIR}"/${PN}-6.8_p1-ssh-keygen-no-ssh1.patch #544078
+ # The X509 patchset fixes this independently.
+ use X509 || epatch "${FILESDIR}"/${PN}-6.8_p1-ssl-engine-configure.patch
+ epatch "${WORKDIR}"/${P}-sctp.patch
+ if use hpn ; then
+ epatch "${WORKDIR}"/${HPN_PATCH%.*.*}/*
+ save_version HPN
+ fi
+
+ tc-export PKG_CONFIG
+ local sed_args=(
+ -e "s:-lcrypto:$(${PKG_CONFIG} --libs openssl):"
+ # Disable PATH reset, trust what portage gives us #254615
+ -e 's:^PATH=/:#PATH=/:'
+ # Disable fortify flags ... our gcc does this for us
+ -e 's:-D_FORTIFY_SOURCE=2::'
+ )
+ # The -ftrapv flag ICEs on hppa #505182
+ use hppa && sed_args+=(
+ -e '/CFLAGS/s:-ftrapv:-fdisable-this-test:'
+ -e '/OSSH_CHECK_CFLAG_LINK.*-ftrapv/d'
+ )
+ sed -i "${sed_args[@]}" configure{.ac,} || die
+
+ epatch_user #473004
+
+ # Now we can build a sane merged version.h
+ (
+ sed '/^#define SSH_RELEASE/d' version.h.* | sort -u
+ macros=()
+ for p in HPN LPK X509 ; do [ -e version.h.${p} ] && macros+=( SSH_${p} ) ; done
+ printf '#define SSH_RELEASE SSH_VERSION SSH_PORTABLE %s\n' "${macros}"
+ ) > version.h
+
+ eautoreconf
+}
+
+src_configure() {
+ addwrite /dev/ptmx
+ addpredict /etc/skey/skeykeys # skey configure code triggers this
+
+ use debug && append-cppflags -DSANDBOX_SECCOMP_FILTER_DEBUG
+ use static && append-ldflags -static
+
+ local myconf=(
+ --with-ldflags="${LDFLAGS}"
+ --disable-strip
+ --with-pid-dir="${EPREFIX}"$(usex kernel_linux '' '/var')/run
+ --sysconfdir="${EPREFIX}"/etc/ssh
+ --libexecdir="${EPREFIX}"/usr/$(get_libdir)/misc
+ --datadir="${EPREFIX}"/usr/share/openssh
+ --with-privsep-path="${EPREFIX}"/var/empty
+ --with-privsep-user=sshd
+ $(use_with kerberos kerberos5 "${EPREFIX}"/usr)
+ # We apply the ldap patch conditionally, so can't pass --without-ldap
+ # unconditionally else we get unknown flag warnings.
+ $(use ldap && use_with ldap)
+ $(use_with ldns)
+ $(use_with libedit)
+ $(use_with pam)
+ $(use_with pie)
+ $(use_with sctp)
+ $(use_with selinux)
+ $(use_with skey)
+ $(use_with ssh1)
+ # The X509 patch deletes this option entirely.
+ $(use X509 || use_with ssl openssl)
+ $(use_with ssl md5-passwords)
+ $(use_with ssl ssl-engine)
+ )
+
+ # Special settings for Gentoo/FreeBSD 9.0 or later (see bug #391011)
+ if use elibc_FreeBSD && version_is_at_least 9.0 "$(uname -r|sed 's/\(.\..\).*/\1/')" ; then
+ myconf+=( --disable-utmp --disable-wtmp --disable-wtmpx )
+ append-ldflags -lutil
+ fi
+
+ econf "${myconf[@]}"
+}
+
+src_install() {
+ emake install-nokeys DESTDIR="${D}"
+ fperms 600 /etc/ssh/sshd_config
+ dobin contrib/ssh-copy-id
+ newinitd "${FILESDIR}"/sshd.rc6.4 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:" \
+ "${ED}"/etc/ssh/sshd_config || die
+ fi
+
+ # Gentoo tweaks to default config files
+ cat <<-EOF >> "${ED}"/etc/ssh/sshd_config
+
+ # Allow client to pass locale environment variables #367017
+ AcceptEnv LANG LC_*
+ EOF
+ cat <<-EOF >> "${ED}"/etc/ssh/ssh_config
+
+ # Send locale environment variables #367017
+ SendEnv LANG LC_*
+ EOF
+
+ # This instruction is from the HPN webpage,
+ # Used for the server logging functionality
+ if [[ -n ${HPN_PATCH} ]] && use hpn ; then
+ keepdir /var/empty/dev
+ fi
+
+ if ! use X509 && [[ -n ${LDAP_PATCH} ]] && use ldap ; then
+ insinto /etc/openldap/schema/
+ newins openssh-lpk_openldap.schema openssh-lpk.schema
+ fi
+
+ doman contrib/ssh-copy-id.1
+ dodoc ChangeLog CREDITS OVERVIEW README* TODO sshd_config
+
+ diropts -m 0700
+ dodir /etc/skel/.ssh
+
+ systemd_dounit "${FILESDIR}"/sshd.{service,socket}
+ systemd_newunit "${FILESDIR}"/sshd_at.service 'sshd@.service'
+}
+
+src_test() {
+ local t tests skipped failed passed shell
+ tests="interop-tests compat-tests"
+ skipped=""
+ shell=$(egetshell ${UID})
+ 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
+ # It will also attempt to write to the homedir .ssh
+ local sshhome=${T}/homedir
+ mkdir -p "${sshhome}"/.ssh
+ for t in ${tests} ; do
+ # Some tests read from stdin ...
+ HOMEDIR="${sshhome}" \
+ 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_preinst() {
+ enewgroup sshd 22
+ enewuser sshd 22 -1 /var/empty sshd
+}
+
+pkg_postinst() {
+ if has_version "<${CATEGORY}/${PN}-5.8_p1" ; then
+ elog "Starting with openssh-5.8p1, the server will default to a newer key"
+ elog "algorithm (ECDSA). You are encouraged to manually update your stored"
+ elog "keys list as servers update theirs. See ssh-keyscan(1) for more info."
+ fi
+ ewarn "Remember to merge your config files in /etc/ssh/ and then"
+ ewarn "reload sshd: '/etc/init.d/sshd reload'."
+ # This instruction is from the HPN webpage,
+ # Used for the server logging functionality
+ if [[ -n ${HPN_PATCH} ]] && use hpn ; then
+ einfo "For the HPN server logging patch, you must ensure that"
+ einfo "your syslog application also listens at /var/empty/dev/log."
+ fi
+ elog "Note: openssh-6.7 versions no longer support USE=tcpd as upstream has"
+ elog " dropped it. Make sure to update any configs that you might have."
+}