1 |
robbat2 11/09/07 07:37:45 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: openssh-5.9_p1-r1.ebuild |
5 |
Log: |
6 |
Add complete port of HPN+LPK patches, also adjust the HOMEDIR setting for src_test to complete in more cases. |
7 |
|
8 |
(Portage version: 2.2.0_alpha51/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.423 net-misc/openssh/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/openssh/ChangeLog?rev=1.423&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/openssh/ChangeLog?rev=1.423&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/openssh/ChangeLog?r1=1.422&r2=1.423 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/net-misc/openssh/ChangeLog,v |
20 |
retrieving revision 1.422 |
21 |
retrieving revision 1.423 |
22 |
diff -p -w -b -B -u -u -r1.422 -r1.423 |
23 |
--- ChangeLog 7 Sep 2011 03:33:26 -0000 1.422 |
24 |
+++ ChangeLog 7 Sep 2011 07:37:45 -0000 1.423 |
25 |
@@ -1,6 +1,12 @@ |
26 |
# ChangeLog for net-misc/openssh |
27 |
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/ChangeLog,v 1.422 2011/09/07 03:33:26 vapier Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/ChangeLog,v 1.423 2011/09/07 07:37:45 robbat2 Exp $ |
30 |
+ |
31 |
+*openssh-5.9_p1-r1 (07 Sep 2011) |
32 |
+ |
33 |
+ 07 Sep 2011; Robin H. Johnson <robbat2@g.o> +openssh-5.9_p1-r1.ebuild: |
34 |
+ Add complete port of HPN+LPK patches, also adjust the HOMEDIR setting for |
35 |
+ src_test to complete in more cases. |
36 |
|
37 |
07 Sep 2011; Mike Frysinger <vapier@g.o> openssh-5.9_p1.ebuild: |
38 |
Retain default AuthorizedKeysFile behavior. |
39 |
|
40 |
|
41 |
|
42 |
1.1 net-misc/openssh/openssh-5.9_p1-r1.ebuild |
43 |
|
44 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/openssh/openssh-5.9_p1-r1.ebuild?rev=1.1&view=markup |
45 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/openssh/openssh-5.9_p1-r1.ebuild?rev=1.1&content-type=text/plain |
46 |
|
47 |
Index: openssh-5.9_p1-r1.ebuild |
48 |
=================================================================== |
49 |
# Copyright 1999-2011 Gentoo Foundation |
50 |
# Distributed under the terms of the GNU General Public License v2 |
51 |
# $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/openssh-5.9_p1-r1.ebuild,v 1.1 2011/09/07 07:37:45 robbat2 Exp $ |
52 |
|
53 |
EAPI="2" |
54 |
inherit eutils flag-o-matic multilib autotools pam |
55 |
|
56 |
# Make it more portable between straight releases |
57 |
# and _p? releases. |
58 |
PARCH=${P/_} |
59 |
|
60 |
HPN_PATCH="${PARCH}-hpn13v11.diff.gz" |
61 |
LDAP_PATCH="${PARCH/-/-lpk-}-0.3.14.patch.gz" |
62 |
#X509_VER="7.0" X509_PATCH="${PARCH}+x509-${X509_VER}.diff.gz" |
63 |
|
64 |
DESCRIPTION="Port of OpenBSD's free SSH release" |
65 |
HOMEPAGE="http://www.openssh.org/" |
66 |
SRC_URI="mirror://openbsd/OpenSSH/portable/${PARCH}.tar.gz |
67 |
${HPN_PATCH:+hpn? ( http://www.psc.edu/networking/projects/hpn-ssh/${HPN_PATCH} mirror://gentoo/${HPN_PATCH} )} |
68 |
${LDAP_PATCH:+ldap? ( mirror://gentoo/${LDAP_PATCH} )} |
69 |
${X509_PATCH:+X509? ( http://roumenpetrov.info/openssh/x509-${X509_VER}/${X509_PATCH} )} |
70 |
" |
71 |
|
72 |
LICENSE="as-is" |
73 |
SLOT="0" |
74 |
#KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd" |
75 |
IUSE="${HPN_PATCH:++}hpn kerberos ldap libedit pam selinux skey static tcpd X X509" |
76 |
|
77 |
RDEPEND="pam? ( virtual/pam ) |
78 |
kerberos? ( virtual/krb5 ) |
79 |
selinux? ( >=sys-libs/libselinux-1.28 ) |
80 |
skey? ( >=sys-auth/skey-1.1.5-r1 ) |
81 |
ldap? ( net-nds/openldap ) |
82 |
libedit? ( dev-libs/libedit ) |
83 |
>=dev-libs/openssl-0.9.6d |
84 |
>=sys-libs/zlib-1.2.3 |
85 |
tcpd? ( >=sys-apps/tcp-wrappers-7.6 ) |
86 |
X? ( x11-apps/xauth ) |
87 |
userland_GNU? ( sys-apps/shadow )" |
88 |
DEPEND="${RDEPEND} |
89 |
dev-util/pkgconfig |
90 |
virtual/os-headers |
91 |
sys-devel/autoconf" |
92 |
RDEPEND="${RDEPEND} |
93 |
pam? ( >=sys-auth/pambase-20081028 )" |
94 |
|
95 |
S=${WORKDIR}/${PARCH} |
96 |
|
97 |
pkg_setup() { |
98 |
# this sucks, but i'd rather have people unable to `emerge -u openssh` |
99 |
# than not be able to log in to their server any more |
100 |
maybe_fail() { [[ -z ${!2} ]] && echo ${1} ; } |
101 |
local fail=" |
102 |
$(use X509 && maybe_fail X509 X509_PATCH) |
103 |
$(use ldap && maybe_fail ldap LDAP_PATCH) |
104 |
$(use hpn && maybe_fail hpn HPN_PATCH) |
105 |
" |
106 |
fail=$(echo ${fail}) |
107 |
if [[ -n ${fail} ]] ; then |
108 |
eerror "Sorry, but this version does not yet support features" |
109 |
eerror "that you requested: ${fail}" |
110 |
eerror "Please mask ${PF} for now and check back later:" |
111 |
eerror " # echo '=${CATEGORY}/${PF}' >> /etc/portage/package.mask" |
112 |
die "booooo" |
113 |
fi |
114 |
} |
115 |
|
116 |
src_prepare() { |
117 |
sed -i \ |
118 |
-e '/_PATH_XAUTH/s:/usr/X11R6/bin/xauth:/usr/bin/xauth:' \ |
119 |
pathnames.h || die |
120 |
# keep this as we need it to avoid the conflict between LPK and HPN changing |
121 |
# this file. |
122 |
cp version.h version.h.pristine |
123 |
|
124 |
# don't break .ssh/authorized_keys2 for fun |
125 |
sed -i '/^AuthorizedKeysFile/s:^:#:' sshd_config || die |
126 |
|
127 |
if use X509 ; then |
128 |
epatch "${WORKDIR}"/${X509_PATCH%.*} |
129 |
epatch "${FILESDIR}"/${PN}-5.8_p1-x509-hpn-glue.patch |
130 |
fi |
131 |
if ! use X509 ; then |
132 |
if [[ -n ${LDAP_PATCH} ]] && use ldap ; then |
133 |
epatch "${WORKDIR}"/${LDAP_PATCH%.*} |
134 |
#epatch "${FILESDIR}"/${PN}-5.2p1-ldap-stdargs.diff #266654 - merged |
135 |
# version.h patch conflict avoidence |
136 |
mv version.h version.h.lpk |
137 |
cp -f version.h.pristine version.h |
138 |
fi |
139 |
else |
140 |
use ldap && ewarn "Sorry, X509 and LDAP conflict internally, disabling LDAP" |
141 |
fi |
142 |
epatch "${FILESDIR}"/${PN}-5.9_p1-sshd-gssapi-multihomed.patch #378361 |
143 |
epatch "${FILESDIR}"/${PN}-4.7_p1-GSSAPI-dns.patch #165444 integrated into gsskex |
144 |
if [[ -n ${HPN_PATCH} ]] && use hpn; then |
145 |
epatch "${WORKDIR}"/${HPN_PATCH%.*} |
146 |
epatch "${FILESDIR}"/${PN}-5.6_p1-hpn-progressmeter.patch |
147 |
# version.h patch conflict avoidence |
148 |
mv version.h version.h.hpn |
149 |
cp -f version.h.pristine version.h |
150 |
# The AES-CTR multithreaded variant is broken, and causes random hangs |
151 |
# when combined background threading and control sockets. To avoid |
152 |
# this, we change the internal table to use the non-multithread version |
153 |
# for the meantime. Do NOT remove this in new versions. See bug #354113 |
154 |
# comment #6 for testcase. |
155 |
# Upstream reference: http://www.psc.edu/networking/projects/hpn-ssh/ |
156 |
## Additionally, the MT-AES-CTR mode cipher replaces the default ST-AES-CTR mode |
157 |
## cipher. Be aware that if the client process is forked using the -f command line |
158 |
## option the process will hang as the parent thread gets 'divorced' from the key |
159 |
## generation threads. This issue will be resolved as soon as possible |
160 |
sed -i \ |
161 |
-e '/aes...-ctr.*SSH_CIPHER_SSH2/s,evp_aes_ctr_mt,evp_aes_128_ctr,' \ |
162 |
cipher.c || die |
163 |
fi |
164 |
|
165 |
sed -i "s:-lcrypto:$(pkg-config --libs openssl):" configure{,.ac} || die |
166 |
|
167 |
# Disable PATH reset, trust what portage gives us. bug 254615 |
168 |
sed -i -e 's:^PATH=/:#PATH=/:' configure || die |
169 |
|
170 |
# Now we can build a sane merged version.h |
171 |
( |
172 |
sed '/^#define SSH_RELEASE/d' version.h.* | sort -u |
173 |
printf '#define SSH_RELEASE SSH_VERSION SSH_PORTABLE %s %s\n' \ |
174 |
"$([ -e version.h.hpn ] && echo SSH_HPN)" \ |
175 |
"$([ -e version.h.lpk ] && echo SSH_LPK)" |
176 |
) > version.h |
177 |
|
178 |
eautoreconf |
179 |
} |
180 |
|
181 |
static_use_with() { |
182 |
local flag=$1 |
183 |
if use static && use ${flag} ; then |
184 |
ewarn "Disabling '${flag}' support because of USE='static'" |
185 |
# rebuild args so that we invert the first one (USE flag) |
186 |
# but otherwise leave everything else working so we can |
187 |
# just leverage use_with |
188 |
shift |
189 |
[[ -z $1 ]] && flag="${flag} ${flag}" |
190 |
set -- !${flag} "$@" |
191 |
fi |
192 |
use_with "$@" |
193 |
} |
194 |
|
195 |
src_configure() { |
196 |
addwrite /dev/ptmx |
197 |
addpredict /etc/skey/skeykeys #skey configure code triggers this |
198 |
|
199 |
use static && append-ldflags -static |
200 |
|
201 |
econf \ |
202 |
--with-ldflags="${LDFLAGS}" \ |
203 |
--disable-strip \ |
204 |
--sysconfdir=/etc/ssh \ |
205 |
--libexecdir=/usr/$(get_libdir)/misc \ |
206 |
--datadir=/usr/share/openssh \ |
207 |
--with-privsep-path=/var/empty \ |
208 |
--with-privsep-user=sshd \ |
209 |
--with-md5-passwords \ |
210 |
--with-ssl-engine \ |
211 |
$(static_use_with pam) \ |
212 |
$(static_use_with kerberos kerberos5 /usr) \ |
213 |
${LDAP_PATCH:+$(use X509 || ( use ldap && use_with ldap ))} \ |
214 |
$(use_with libedit) \ |
215 |
$(use_with selinux) \ |
216 |
$(use_with skey) \ |
217 |
$(use_with tcpd tcp-wrappers) |
218 |
} |
219 |
|
220 |
src_install() { |
221 |
emake install-nokeys DESTDIR="${D}" || die |
222 |
fperms 600 /etc/ssh/sshd_config |
223 |
dobin contrib/ssh-copy-id || die |
224 |
newinitd "${FILESDIR}"/sshd.rc6.3 sshd |
225 |
newconfd "${FILESDIR}"/sshd.confd sshd |
226 |
keepdir /var/empty |
227 |
|
228 |
# not all openssl installs support ecc, or are functional #352645 |
229 |
if ! grep -q '#define OPENSSL_HAS_ECC 1' config.h ; then |
230 |
dosed 's:&& gen_key ecdsa::' /etc/init.d/sshd || die |
231 |
fi |
232 |
|
233 |
newpamd "${FILESDIR}"/sshd.pam_include.2 sshd |
234 |
if use pam ; then |
235 |
sed -i \ |
236 |
-e "/^#UsePAM /s:.*:UsePAM yes:" \ |
237 |
-e "/^#PasswordAuthentication /s:.*:PasswordAuthentication no:" \ |
238 |
-e "/^#PrintMotd /s:.*:PrintMotd no:" \ |
239 |
-e "/^#PrintLastLog /s:.*:PrintLastLog no:" \ |
240 |
"${D}"/etc/ssh/sshd_config || die "sed of configuration file failed" |
241 |
fi |
242 |
|
243 |
# This instruction is from the HPN webpage, |
244 |
# Used for the server logging functionality |
245 |
if [[ -n ${HPN_PATCH} ]] && use hpn ; then |
246 |
keepdir /var/empty/dev |
247 |
fi |
248 |
|
249 |
doman contrib/ssh-copy-id.1 |
250 |
dodoc ChangeLog CREDITS OVERVIEW README* TODO sshd_config |
251 |
|
252 |
diropts -m 0700 |
253 |
dodir /etc/skel/.ssh |
254 |
} |
255 |
|
256 |
src_test() { |
257 |
local t tests skipped failed passed shell |
258 |
tests="interop-tests compat-tests" |
259 |
skipped="" |
260 |
shell=$(getent passwd ${UID} | cut -d: -f7) |
261 |
if [[ ${shell} == */nologin ]] || [[ ${shell} == */false ]] ; then |
262 |
elog "Running the full OpenSSH testsuite" |
263 |
elog "requires a usable shell for the 'portage'" |
264 |
elog "user, so we will run a subset only." |
265 |
skipped="${skipped} tests" |
266 |
else |
267 |
tests="${tests} tests" |
268 |
fi |
269 |
# It will also attempt to write to the homedir .ssh |
270 |
local oldhome=$HOMEDIR |
271 |
export HOMEDIR="${T}/homedir" |
272 |
mkdir -pv $HOMEDIR/.ssh/ |
273 |
for t in ${tests} ; do |
274 |
# Some tests read from stdin ... |
275 |
emake -k -j1 ${t} </dev/null \ |
276 |
&& passed="${passed}${t} " \ |
277 |
|| failed="${failed}${t} " |
278 |
done |
279 |
unset HOMEDIR |
280 |
export HOMEDIR="$oldhome" |
281 |
einfo "Passed tests: ${passed}" |
282 |
ewarn "Skipped tests: ${skipped}" |
283 |
if [[ -n ${failed} ]] ; then |
284 |
ewarn "Failed tests: ${failed}" |
285 |
die "Some tests failed: ${failed}" |
286 |
else |
287 |
einfo "Failed tests: ${failed}" |
288 |
return 0 |
289 |
fi |
290 |
} |
291 |
|
292 |
pkg_postinst() { |
293 |
enewgroup sshd 22 |
294 |
enewuser sshd 22 -1 /var/empty sshd |
295 |
|
296 |
elog "Starting with openssh-5.8p1, the server will default to a newer key" |
297 |
elog "algorithm (ECDSA). You are encouraged to manually update your stored" |
298 |
elog "keys list as servers update theirs. See ssh-keyscan(1) for more info." |
299 |
echo |
300 |
ewarn "Remember to merge your config files in /etc/ssh/ and then" |
301 |
ewarn "reload sshd: '/etc/init.d/sshd reload'." |
302 |
if use pam ; then |
303 |
echo |
304 |
ewarn "Please be aware users need a valid shell in /etc/passwd" |
305 |
ewarn "in order to be allowed to login." |
306 |
fi |
307 |
# This instruction is from the HPN webpage, |
308 |
# Used for the server logging functionality |
309 |
if [[ -n ${HPN_PATCH} ]] && use hpn ; then |
310 |
echo |
311 |
einfo "For the HPN server logging patch, you must ensure that" |
312 |
einfo "your syslog application also listens at /var/empty/dev/log." |
313 |
fi |
314 |
} |