1 |
vapier 12/06/08 05:43:01 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: openssh-6.0_p1-r1.ebuild |
5 |
Log: |
6 |
Back hpn patch back down to v11 as v12 does not want to work for us #414401 by Sean McGovern. |
7 |
|
8 |
(Portage version: 2.2.0_alpha110/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.450 net-misc/openssh/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/openssh/ChangeLog?rev=1.450&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/openssh/ChangeLog?rev=1.450&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/openssh/ChangeLog?r1=1.449&r2=1.450 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/net-misc/openssh/ChangeLog,v |
20 |
retrieving revision 1.449 |
21 |
retrieving revision 1.450 |
22 |
diff -u -r1.449 -r1.450 |
23 |
--- ChangeLog 2 Jun 2012 18:07:02 -0000 1.449 |
24 |
+++ ChangeLog 8 Jun 2012 05:43:01 -0000 1.450 |
25 |
@@ -1,6 +1,12 @@ |
26 |
# ChangeLog for net-misc/openssh |
27 |
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/ChangeLog,v 1.449 2012/06/02 18:07:02 vapier Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/ChangeLog,v 1.450 2012/06/08 05:43:01 vapier Exp $ |
30 |
+ |
31 |
+*openssh-6.0_p1-r1 (08 Jun 2012) |
32 |
+ |
33 |
+ 08 Jun 2012; Mike Frysinger <vapier@g.o> +openssh-6.0_p1-r1.ebuild: |
34 |
+ Back hpn patch back down to v11 as v12 does not want to work for us #414401 by |
35 |
+ Sean McGovern. |
36 |
|
37 |
02 Jun 2012; Mike Frysinger <vapier@g.o> openssh-5.9_p1-r4.ebuild: |
38 |
Mark alpha/ia64/s390/sh/sparc stable #396075. |
39 |
|
40 |
|
41 |
|
42 |
1.1 net-misc/openssh/openssh-6.0_p1-r1.ebuild |
43 |
|
44 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/openssh/openssh-6.0_p1-r1.ebuild?rev=1.1&view=markup |
45 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/openssh/openssh-6.0_p1-r1.ebuild?rev=1.1&content-type=text/plain |
46 |
|
47 |
Index: openssh-6.0_p1-r1.ebuild |
48 |
=================================================================== |
49 |
# Copyright 1999-2012 Gentoo Foundation |
50 |
# Distributed under the terms of the GNU General Public License v2 |
51 |
# $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/openssh-6.0_p1-r1.ebuild,v 1.1 2012/06/08 05:43:01 vapier Exp $ |
52 |
|
53 |
EAPI="2" |
54 |
inherit eutils user flag-o-matic multilib autotools pam systemd |
55 |
|
56 |
# Make it more portable between straight releases |
57 |
# and _p? releases. |
58 |
PARCH=${P/_} |
59 |
|
60 |
HPN_PATCH="${PARCH}-hpn13v11.diff.bz2" |
61 |
LDAP_PATCH="${PARCH/-/-lpk-}-0.3.14.patch.gz" |
62 |
X509_VER="7.1" 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 ~amd64-fbsd ~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? ( virtual/shadow )" |
88 |
DEPEND="${RDEPEND} |
89 |
virtual/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 |
save_version() { |
117 |
# version.h patch conflict avoidence |
118 |
mv version.h version.h.$1 |
119 |
cp -f version.h.pristine version.h |
120 |
} |
121 |
|
122 |
src_prepare() { |
123 |
sed -i \ |
124 |
-e '/_PATH_XAUTH/s:/usr/X11R6/bin/xauth:/usr/bin/xauth:' \ |
125 |
pathnames.h || die |
126 |
# keep this as we need it to avoid the conflict between LPK and HPN changing |
127 |
# this file. |
128 |
cp version.h version.h.pristine |
129 |
|
130 |
# don't break .ssh/authorized_keys2 for fun |
131 |
sed -i '/^AuthorizedKeysFile/s:^:#:' sshd_config || die |
132 |
|
133 |
epatch "${FILESDIR}"/${PN}-5.9_p1-sshd-gssapi-multihomed.patch #378361 |
134 |
if use X509 ; then |
135 |
pushd .. >/dev/null |
136 |
epatch "${FILESDIR}"/${PN}-6.0_p1-x509-glue.patch |
137 |
popd >/dev/null |
138 |
epatch "${WORKDIR}"/${X509_PATCH%.*} |
139 |
epatch "${FILESDIR}"/${PN}-6.0_p1-x509-hpn-glue.patch |
140 |
save_version X509 |
141 |
fi |
142 |
if ! use X509 ; then |
143 |
if [[ -n ${LDAP_PATCH} ]] && use ldap ; then |
144 |
epatch "${WORKDIR}"/${LDAP_PATCH%.*} |
145 |
save_version LPK |
146 |
fi |
147 |
else |
148 |
use ldap && ewarn "Sorry, X509 and LDAP conflict internally, disabling LDAP" |
149 |
fi |
150 |
epatch "${FILESDIR}"/${PN}-6.0_p1-test.patch #391011 |
151 |
epatch "${FILESDIR}"/${PN}-6.0_p1-fix-freebsd-compilation.patch #391011 |
152 |
epatch "${FILESDIR}"/${PN}-4.7_p1-GSSAPI-dns.patch #165444 integrated into gsskex |
153 |
if [[ -n ${HPN_PATCH} ]] && use hpn; then |
154 |
epatch "${WORKDIR}"/${HPN_PATCH%.*} |
155 |
epatch "${FILESDIR}"/${PN}-5.6_p1-hpn-progressmeter.patch |
156 |
save_version HPN |
157 |
# The AES-CTR multithreaded variant is broken, and causes random hangs |
158 |
# when combined background threading and control sockets. To avoid |
159 |
# this, we change the internal table to use the non-multithread version |
160 |
# for the meantime. Do NOT remove this in new versions. See bug #354113 |
161 |
# comment #6 for testcase. |
162 |
# Upstream reference: http://www.psc.edu/networking/projects/hpn-ssh/ |
163 |
## Additionally, the MT-AES-CTR mode cipher replaces the default ST-AES-CTR mode |
164 |
## cipher. Be aware that if the client process is forked using the -f command line |
165 |
## option the process will hang as the parent thread gets 'divorced' from the key |
166 |
## generation threads. This issue will be resolved as soon as possible |
167 |
sed -i \ |
168 |
-e '/aes...-ctr.*SSH_CIPHER_SSH2/s,evp_aes_ctr_mt,evp_aes_128_ctr,' \ |
169 |
cipher.c || die |
170 |
fi |
171 |
|
172 |
sed -i "s:-lcrypto:$(pkg-config --libs openssl):" configure{,.ac} || die |
173 |
|
174 |
# Disable PATH reset, trust what portage gives us. bug 254615 |
175 |
sed -i -e 's:^PATH=/:#PATH=/:' configure || die |
176 |
|
177 |
# Now we can build a sane merged version.h |
178 |
( |
179 |
sed '/^#define SSH_RELEASE/d' version.h.* | sort -u |
180 |
macros=() |
181 |
for p in HPN LPK X509 ; do [ -e version.h.${p} ] && macros+=( SSH_${p} ) ; done |
182 |
printf '#define SSH_RELEASE SSH_VERSION SSH_PORTABLE %s\n' "${macros}" |
183 |
) > version.h |
184 |
|
185 |
eautoreconf |
186 |
} |
187 |
|
188 |
static_use_with() { |
189 |
local flag=$1 |
190 |
if use static && use ${flag} ; then |
191 |
ewarn "Disabling '${flag}' support because of USE='static'" |
192 |
# rebuild args so that we invert the first one (USE flag) |
193 |
# but otherwise leave everything else working so we can |
194 |
# just leverage use_with |
195 |
shift |
196 |
[[ -z $1 ]] && flag="${flag} ${flag}" |
197 |
set -- !${flag} "$@" |
198 |
fi |
199 |
use_with "$@" |
200 |
} |
201 |
|
202 |
src_configure() { |
203 |
addwrite /dev/ptmx |
204 |
addpredict /etc/skey/skeykeys #skey configure code triggers this |
205 |
|
206 |
use static && append-ldflags -static |
207 |
|
208 |
econf \ |
209 |
--with-ldflags="${LDFLAGS}" \ |
210 |
--disable-strip \ |
211 |
--sysconfdir=/etc/ssh \ |
212 |
--libexecdir=/usr/$(get_libdir)/misc \ |
213 |
--datadir=/usr/share/openssh \ |
214 |
--with-privsep-path=/var/empty \ |
215 |
--with-privsep-user=sshd \ |
216 |
--with-md5-passwords \ |
217 |
--with-ssl-engine \ |
218 |
$(static_use_with pam) \ |
219 |
$(static_use_with kerberos kerberos5 /usr) \ |
220 |
${LDAP_PATCH:+$(use X509 || ( use ldap && use_with ldap ))} \ |
221 |
$(use_with libedit) \ |
222 |
$(use_with selinux) \ |
223 |
$(use_with skey) \ |
224 |
$(use_with tcpd tcp-wrappers) |
225 |
} |
226 |
|
227 |
src_install() { |
228 |
emake install-nokeys DESTDIR="${D}" || die |
229 |
fperms 600 /etc/ssh/sshd_config |
230 |
dobin contrib/ssh-copy-id || die |
231 |
newinitd "${FILESDIR}"/sshd.rc6.3 sshd |
232 |
newconfd "${FILESDIR}"/sshd.confd sshd |
233 |
keepdir /var/empty |
234 |
|
235 |
# not all openssl installs support ecc, or are functional #352645 |
236 |
if ! grep -q '#define OPENSSL_HAS_ECC 1' config.h ; then |
237 |
elog "dev-libs/openssl was built with 'bindist' - disabling ecdsa support" |
238 |
dosed 's:&& gen_key ecdsa::' /etc/init.d/sshd || die |
239 |
fi |
240 |
|
241 |
newpamd "${FILESDIR}"/sshd.pam_include.2 sshd |
242 |
if use pam ; then |
243 |
sed -i \ |
244 |
-e "/^#UsePAM /s:.*:UsePAM yes:" \ |
245 |
-e "/^#PasswordAuthentication /s:.*:PasswordAuthentication no:" \ |
246 |
-e "/^#PrintMotd /s:.*:PrintMotd no:" \ |
247 |
-e "/^#PrintLastLog /s:.*:PrintLastLog no:" \ |
248 |
"${D}"/etc/ssh/sshd_config || die "sed of configuration file failed" |
249 |
fi |
250 |
|
251 |
# Gentoo tweaks to default config files |
252 |
cat <<-EOF >> "${D}"/etc/ssh/sshd_config |
253 |
|
254 |
# Allow client to pass locale environment variables #367017 |
255 |
AcceptEnv LANG LC_* |
256 |
EOF |
257 |
cat <<-EOF >> "${D}"/etc/ssh/ssh_config |
258 |
|
259 |
# Send locale environment variables #367017 |
260 |
SendEnv LANG LC_* |
261 |
EOF |
262 |
|
263 |
# This instruction is from the HPN webpage, |
264 |
# Used for the server logging functionality |
265 |
if [[ -n ${HPN_PATCH} ]] && use hpn ; then |
266 |
keepdir /var/empty/dev |
267 |
fi |
268 |
|
269 |
if use ldap ; then |
270 |
insinto /etc/openldap/schema/ |
271 |
newins openssh-lpk_openldap.schema openssh-lpk.schema |
272 |
fi |
273 |
|
274 |
doman contrib/ssh-copy-id.1 |
275 |
dodoc ChangeLog CREDITS OVERVIEW README* TODO sshd_config |
276 |
|
277 |
diropts -m 0700 |
278 |
dodir /etc/skel/.ssh |
279 |
|
280 |
systemd_dounit "${FILESDIR}"/sshd.{service,socket} || die |
281 |
systemd_newunit "${FILESDIR}"/sshd_at.service 'sshd@.service' || die |
282 |
} |
283 |
|
284 |
src_test() { |
285 |
local t tests skipped failed passed shell |
286 |
tests="interop-tests compat-tests" |
287 |
skipped="" |
288 |
shell=$(egetshell ${UID}) |
289 |
if [[ ${shell} == */nologin ]] || [[ ${shell} == */false ]] ; then |
290 |
elog "Running the full OpenSSH testsuite" |
291 |
elog "requires a usable shell for the 'portage'" |
292 |
elog "user, so we will run a subset only." |
293 |
skipped="${skipped} tests" |
294 |
else |
295 |
tests="${tests} tests" |
296 |
fi |
297 |
# It will also attempt to write to the homedir .ssh |
298 |
local sshhome=${T}/homedir |
299 |
mkdir -p "${sshhome}"/.ssh |
300 |
for t in ${tests} ; do |
301 |
# Some tests read from stdin ... |
302 |
HOMEDIR="${sshhome}" \ |
303 |
emake -k -j1 ${t} </dev/null \ |
304 |
&& passed="${passed}${t} " \ |
305 |
|| failed="${failed}${t} " |
306 |
done |
307 |
einfo "Passed tests: ${passed}" |
308 |
ewarn "Skipped tests: ${skipped}" |
309 |
if [[ -n ${failed} ]] ; then |
310 |
ewarn "Failed tests: ${failed}" |
311 |
die "Some tests failed: ${failed}" |
312 |
else |
313 |
einfo "Failed tests: ${failed}" |
314 |
return 0 |
315 |
fi |
316 |
} |
317 |
|
318 |
pkg_preinst() { |
319 |
enewgroup sshd 22 |
320 |
enewuser sshd 22 -1 /var/empty sshd |
321 |
} |
322 |
|
323 |
pkg_postinst() { |
324 |
elog "Starting with openssh-5.8p1, the server will default to a newer key" |
325 |
elog "algorithm (ECDSA). You are encouraged to manually update your stored" |
326 |
elog "keys list as servers update theirs. See ssh-keyscan(1) for more info." |
327 |
echo |
328 |
ewarn "Remember to merge your config files in /etc/ssh/ and then" |
329 |
ewarn "reload sshd: '/etc/init.d/sshd reload'." |
330 |
if use pam ; then |
331 |
echo |
332 |
ewarn "Please be aware users need a valid shell in /etc/passwd" |
333 |
ewarn "in order to be allowed to login." |
334 |
fi |
335 |
# This instruction is from the HPN webpage, |
336 |
# Used for the server logging functionality |
337 |
if [[ -n ${HPN_PATCH} ]] && use hpn ; then |
338 |
echo |
339 |
einfo "For the HPN server logging patch, you must ensure that" |
340 |
einfo "your syslog application also listens at /var/empty/dev/log." |
341 |
fi |
342 |
} |