1 |
vapier 12/04/30 22:47:40 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: openssh-6.0_p1.ebuild |
5 |
Log: |
6 |
Version bump with work from Robin #414071 by Michael Weber. |
7 |
|
8 |
(Portage version: 2.2.0_alpha100/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.441 net-misc/openssh/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/openssh/ChangeLog?rev=1.441&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/openssh/ChangeLog?rev=1.441&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/openssh/ChangeLog?r1=1.440&r2=1.441 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/net-misc/openssh/ChangeLog,v |
20 |
retrieving revision 1.440 |
21 |
retrieving revision 1.441 |
22 |
diff -u -r1.440 -r1.441 |
23 |
--- ChangeLog 16 Apr 2012 20:48:30 -0000 1.440 |
24 |
+++ ChangeLog 30 Apr 2012 22:47:40 -0000 1.441 |
25 |
@@ -1,6 +1,14 @@ |
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.440 2012/04/16 20:48:30 maekke Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/ChangeLog,v 1.441 2012/04/30 22:47:40 vapier Exp $ |
30 |
+ |
31 |
+*openssh-6.0_p1 (30 Apr 2012) |
32 |
+ |
33 |
+ 30 Apr 2012; Mike Frysinger <vapier@g.o> |
34 |
+ +files/openssh-6.0_p1-hpn-progressmeter.patch, |
35 |
+ +files/openssh-6.0_p1-x509-glue.patch, |
36 |
+ +files/openssh-6.0_p1-x509-hpn-glue.patch, +openssh-6.0_p1.ebuild: |
37 |
+ Version bump with work from Robin #414071 by Michael Weber. |
38 |
|
39 |
16 Apr 2012; Markus Meier <maekke@g.o> openssh-5.9_p1-r4.ebuild: |
40 |
arm stable, bug #396075 |
41 |
|
42 |
|
43 |
|
44 |
1.1 net-misc/openssh/openssh-6.0_p1.ebuild |
45 |
|
46 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/openssh/openssh-6.0_p1.ebuild?rev=1.1&view=markup |
47 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/openssh/openssh-6.0_p1.ebuild?rev=1.1&content-type=text/plain |
48 |
|
49 |
Index: openssh-6.0_p1.ebuild |
50 |
=================================================================== |
51 |
# Copyright 1999-2012 Gentoo Foundation |
52 |
# Distributed under the terms of the GNU General Public License v2 |
53 |
# $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/openssh-6.0_p1.ebuild,v 1.1 2012/04/30 22:47:40 vapier Exp $ |
54 |
|
55 |
EAPI="2" |
56 |
inherit eutils flag-o-matic multilib autotools pam systemd |
57 |
|
58 |
# Make it more portable between straight releases |
59 |
# and _p? releases. |
60 |
PARCH=${P/_} |
61 |
|
62 |
HPN_PATCH="${PARCH}-hpn13v12.diff.gz" |
63 |
LDAP_PATCH="${PARCH/-/-lpk-}-0.3.14.patch.gz" |
64 |
X509_VER="7.1" X509_PATCH="${PARCH}+x509-${X509_VER}.diff.gz" |
65 |
|
66 |
DESCRIPTION="Port of OpenBSD's free SSH release" |
67 |
HOMEPAGE="http://www.openssh.org/" |
68 |
SRC_URI="mirror://openbsd/OpenSSH/portable/${PARCH}.tar.gz |
69 |
${HPN_PATCH:+hpn? ( http://www.psc.edu/networking/projects/hpn-ssh/${HPN_PATCH} mirror://gentoo/${HPN_PATCH} )} |
70 |
${LDAP_PATCH:+ldap? ( mirror://gentoo/${LDAP_PATCH} )} |
71 |
${X509_PATCH:+X509? ( http://roumenpetrov.info/openssh/x509-${X509_VER}/${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_PATCH:++}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? ( virtual/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 |
|
97 |
S=${WORKDIR}/${PARCH} |
98 |
|
99 |
pkg_setup() { |
100 |
# this sucks, but i'd rather have people unable to `emerge -u openssh` |
101 |
# than not be able to log in to their server any more |
102 |
maybe_fail() { [[ -z ${!2} ]] && echo ${1} ; } |
103 |
local fail=" |
104 |
$(use X509 && maybe_fail X509 X509_PATCH) |
105 |
$(use ldap && maybe_fail ldap LDAP_PATCH) |
106 |
$(use hpn && maybe_fail hpn HPN_PATCH) |
107 |
" |
108 |
fail=$(echo ${fail}) |
109 |
if [[ -n ${fail} ]] ; then |
110 |
eerror "Sorry, but this version does not yet support features" |
111 |
eerror "that you requested: ${fail}" |
112 |
eerror "Please mask ${PF} for now and check back later:" |
113 |
eerror " # echo '=${CATEGORY}/${PF}' >> /etc/portage/package.mask" |
114 |
die "booooo" |
115 |
fi |
116 |
} |
117 |
|
118 |
save_version() { |
119 |
# version.h patch conflict avoidence |
120 |
mv version.h version.h.$1 |
121 |
cp -f version.h.pristine version.h |
122 |
} |
123 |
|
124 |
src_prepare() { |
125 |
sed -i \ |
126 |
-e '/_PATH_XAUTH/s:/usr/X11R6/bin/xauth:/usr/bin/xauth:' \ |
127 |
pathnames.h || die |
128 |
# keep this as we need it to avoid the conflict between LPK and HPN changing |
129 |
# this file. |
130 |
cp version.h version.h.pristine |
131 |
|
132 |
# don't break .ssh/authorized_keys2 for fun |
133 |
sed -i '/^AuthorizedKeysFile/s:^:#:' sshd_config || die |
134 |
|
135 |
epatch "${FILESDIR}"/${PN}-5.9_p1-sshd-gssapi-multihomed.patch #378361 |
136 |
if use X509 ; then |
137 |
pushd .. >/dev/null |
138 |
epatch "${FILESDIR}"/${PN}-6.0_p1-x509-glue.patch |
139 |
popd >/dev/null |
140 |
epatch "${WORKDIR}"/${X509_PATCH%.*} |
141 |
epatch "${FILESDIR}"/${PN}-6.0_p1-x509-hpn-glue.patch |
142 |
save_version X509 |
143 |
fi |
144 |
if ! use X509 ; then |
145 |
if [[ -n ${LDAP_PATCH} ]] && use ldap ; then |
146 |
epatch "${WORKDIR}"/${LDAP_PATCH%.*} |
147 |
save_version LPK |
148 |
fi |
149 |
else |
150 |
use ldap && ewarn "Sorry, X509 and LDAP conflict internally, disabling LDAP" |
151 |
fi |
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}-6.0_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 |
# This instruction is from the HPN webpage, |
252 |
# Used for the server logging functionality |
253 |
if [[ -n ${HPN_PATCH} ]] && use hpn ; then |
254 |
keepdir /var/empty/dev |
255 |
fi |
256 |
|
257 |
if use ldap ; then |
258 |
insinto /etc/openldap/schema/ |
259 |
newins openssh-lpk_openldap.schema openssh-lpk.schema |
260 |
fi |
261 |
|
262 |
doman contrib/ssh-copy-id.1 |
263 |
dodoc ChangeLog CREDITS OVERVIEW README* TODO sshd_config |
264 |
|
265 |
diropts -m 0700 |
266 |
dodir /etc/skel/.ssh |
267 |
|
268 |
systemd_dounit "${FILESDIR}"/sshd.{service,socket} || die |
269 |
systemd_newunit "${FILESDIR}"/sshd_at.service 'sshd@.service' || die |
270 |
} |
271 |
|
272 |
src_test() { |
273 |
local t tests skipped failed passed shell |
274 |
tests="interop-tests compat-tests" |
275 |
skipped="" |
276 |
shell=$(egetshell ${UID}) |
277 |
if [[ ${shell} == */nologin ]] || [[ ${shell} == */false ]] ; then |
278 |
elog "Running the full OpenSSH testsuite" |
279 |
elog "requires a usable shell for the 'portage'" |
280 |
elog "user, so we will run a subset only." |
281 |
skipped="${skipped} tests" |
282 |
else |
283 |
tests="${tests} tests" |
284 |
fi |
285 |
# It will also attempt to write to the homedir .ssh |
286 |
local sshhome=${T}/homedir |
287 |
mkdir -p "${sshhome}"/.ssh |
288 |
for t in ${tests} ; do |
289 |
# Some tests read from stdin ... |
290 |
HOMEDIR="${sshhome}" \ |
291 |
emake -k -j1 ${t} </dev/null \ |
292 |
&& passed="${passed}${t} " \ |
293 |
|| failed="${failed}${t} " |
294 |
done |
295 |
einfo "Passed tests: ${passed}" |
296 |
ewarn "Skipped tests: ${skipped}" |
297 |
if [[ -n ${failed} ]] ; then |
298 |
ewarn "Failed tests: ${failed}" |
299 |
die "Some tests failed: ${failed}" |
300 |
else |
301 |
einfo "Failed tests: ${failed}" |
302 |
return 0 |
303 |
fi |
304 |
} |
305 |
|
306 |
pkg_preinst() { |
307 |
enewgroup sshd 22 |
308 |
enewuser sshd 22 -1 /var/empty sshd |
309 |
} |
310 |
|
311 |
pkg_postinst() { |
312 |
elog "Starting with openssh-5.8p1, the server will default to a newer key" |
313 |
elog "algorithm (ECDSA). You are encouraged to manually update your stored" |
314 |
elog "keys list as servers update theirs. See ssh-keyscan(1) for more info." |
315 |
echo |
316 |
ewarn "Remember to merge your config files in /etc/ssh/ and then" |
317 |
ewarn "reload sshd: '/etc/init.d/sshd reload'." |
318 |
if use pam ; then |
319 |
echo |
320 |
ewarn "Please be aware users need a valid shell in /etc/passwd" |
321 |
ewarn "in order to be allowed to login." |
322 |
fi |
323 |
# This instruction is from the HPN webpage, |
324 |
# Used for the server logging functionality |
325 |
if [[ -n ${HPN_PATCH} ]] && use hpn ; then |
326 |
echo |
327 |
einfo "For the HPN server logging patch, you must ensure that" |
328 |
einfo "your syslog application also listens at /var/empty/dev/log." |
329 |
fi |
330 |
} |