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