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