Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-misc/openssh: ChangeLog openssh-5.6_p1-r2.ebuild
Date: Thu, 30 Sep 2010 02:48:47
Message-Id: 20100930024844.8E7AC20057@flycatcher.gentoo.org
1 vapier 10/09/30 02:48:44
2
3 Modified: ChangeLog
4 Added: openssh-5.6_p1-r2.ebuild
5 Log:
6 Switch to latest upstream hpn patch, and fix a pointer error in it.
7
8 (Portage version: 2.2_rc86/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.392 net-misc/openssh/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/openssh/ChangeLog?rev=1.392&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/openssh/ChangeLog?rev=1.392&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/openssh/ChangeLog?r1=1.391&r2=1.392
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/net-misc/openssh/ChangeLog,v
20 retrieving revision 1.391
21 retrieving revision 1.392
22 diff -u -r1.391 -r1.392
23 --- ChangeLog 24 Sep 2010 11:11:23 -0000 1.391
24 +++ ChangeLog 30 Sep 2010 02:48:44 -0000 1.392
25 @@ -1,6 +1,12 @@
26 # ChangeLog for net-misc/openssh
27 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/ChangeLog,v 1.391 2010/09/24 11:11:23 armin76 Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/ChangeLog,v 1.392 2010/09/30 02:48:44 vapier Exp $
30 +
31 +*openssh-5.6_p1-r2 (30 Sep 2010)
32 +
33 + 30 Sep 2010; Mike Frysinger <vapier@g.o> +openssh-5.6_p1-r2.ebuild,
34 + +files/openssh-5.6_p1-hpn-progressmeter.patch:
35 + Switch to latest upstream hpn patch, and fix a pointer error in it.
36
37 24 Sep 2010; Raúl Porcel <armin76@g.o> openssh-5.5_p1-r2.ebuild:
38 alpha/ia64/m68k/s390/sh/sparc stable wrt #334165
39
40
41
42 1.1 net-misc/openssh/openssh-5.6_p1-r2.ebuild
43
44 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/openssh/openssh-5.6_p1-r2.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/openssh/openssh-5.6_p1-r2.ebuild?rev=1.1&content-type=text/plain
46
47 Index: openssh-5.6_p1-r2.ebuild
48 ===================================================================
49 # Copyright 1999-2010 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.6_p1-r2.ebuild,v 1.1 2010/09/30 02:48:44 vapier 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}-hpn13v10.diff.gz"
61 LDAP_PATCH="${PARCH/openssh/openssh-lpk}-0.3.13.patch.gz"
62 X509_VER="6.2.3" 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 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 PROVIDE="virtual/ssh"
95
96 S=${WORKDIR}/${PARCH}
97
98 pkg_setup() {
99 # this sucks, but i'd rather have people unable to `emerge -u openssh`
100 # than not be able to log in to their server any more
101 maybe_fail() { [[ -z ${!2} ]] && echo ${1} ; }
102 local fail="
103 $(use X509 && maybe_fail X509 X509_PATCH)
104 $(use ldap && maybe_fail ldap LDAP_PATCH)
105 $(use hpn && maybe_fail hpn HPN_PATCH)
106 "
107 fail=$(echo ${fail})
108 if [[ -n ${fail} ]] ; then
109 eerror "Sorry, but this version does not yet support features"
110 eerror "that you requested: ${fail}"
111 eerror "Please mask ${PF} for now and check back later:"
112 eerror " # echo '=${CATEGORY}/${PF}' >> /etc/portage/package.mask"
113 die "booooo"
114 fi
115 }
116
117 src_prepare() {
118 sed -i \
119 -e '/_PATH_XAUTH/s:/usr/X11R6/bin/xauth:/usr/bin/xauth:' \
120 pathnames.h || die
121 # keep this as we need it to avoid the conflict between LPK and HPN changing
122 # this file.
123 cp version.h version.h.pristine
124
125 if use X509 ; then
126 # Apply X509 patch
127 epatch "${DISTDIR}"/${X509_PATCH}
128 # Apply glue so that HPN will still work after X509
129 epatch "${FILESDIR}"/${PN}-5.6_p1-x509-hpn-glue.patch
130 fi
131 if ! use X509 ; then
132 if [[ -n ${LDAP_PATCH} ]] && use ldap ; then
133 epatch "${DISTDIR}"/${LDAP_PATCH}
134 epatch "${FILESDIR}"/${PN}-5.2p1-ldap-stdargs.diff #266654
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.4_p1-openssl.patch
143 epatch "${FILESDIR}"/${PN}-4.7_p1-GSSAPI-dns.patch #165444 integrated into gsskex
144 if [[ -n ${HPN_PATCH} ]] && use hpn; then
145 epatch "${DISTDIR}"/${HPN_PATCH}
146 epatch "${FILESDIR}"/${P}-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 temporarily broken, and
151 # causes random hangs when combined with the -f switch of ssh.
152 # To avoid this, we change the internal table to use the non-multithread
153 # version for the meantime.
154 sed -i \
155 -e '/aes...-ctr.*SSH_CIPHER_SSH2/s,evp_aes_ctr_mt,evp_aes_128_ctr,' \
156 cipher.c || die
157 fi
158 epatch "${FILESDIR}"/${PN}-5.2_p1-autoconf.patch
159
160 sed -i "s:-lcrypto:$(pkg-config --libs openssl):" configure{,.ac} || die
161
162 # Disable PATH reset, trust what portage gives us. bug 254615
163 sed -i -e 's:^PATH=/:#PATH=/:' configure || die
164
165 # Now we can build a sane merged version.h
166 t="${T}"/version.h
167 m="${t}.merge" f="${t}.final"
168 cat version.h.{hpn,pristine,lpk} 2>/dev/null \
169 | sed '/^#define SSH_RELEASE/d' \
170 | sort | uniq >"${m}"
171 sed -n -r \
172 -e '/^\//p' \
173 <"${m}" >"${f}"
174 sed -n -r \
175 -e '/SSH_LPK/s,"lpk","-lpk",g' \
176 -e '/^#define/p' \
177 <"${m}" >>"${f}"
178 v="SSH_VERSION SSH_PORTABLE"
179 [[ -f version.h.hpn ]] && v="${v} SSH_HPN"
180 [[ -f version.h.lpk ]] && v="${v} SSH_LPK"
181 echo "#define SSH_RELEASE ${v}" >>"${f}"
182 cp "${f}" version.h
183
184 eautoreconf
185 }
186
187 static_use_with() {
188 local flag=$1
189 if use static && use ${flag} ; then
190 ewarn "Disabling '${flag}' support because of USE='static'"
191 # rebuild args so that we invert the first one (USE flag)
192 # but otherwise leave everything else working so we can
193 # just leverage use_with
194 shift
195 [[ -z $1 ]] && flag="${flag} ${flag}"
196 set -- !${flag} "$@"
197 fi
198 use_with "$@"
199 }
200
201 src_configure() {
202 addwrite /dev/ptmx
203 addpredict /etc/skey/skeykeys #skey configure code triggers this
204
205 use static && append-ldflags -static
206
207 econf \
208 --with-ldflags="${LDFLAGS}" \
209 --disable-strip \
210 --sysconfdir=/etc/ssh \
211 --libexecdir=/usr/$(get_libdir)/misc \
212 --datadir=/usr/share/openssh \
213 --with-privsep-path=/var/empty \
214 --with-privsep-user=sshd \
215 --with-md5-passwords \
216 --with-ssl-engine \
217 $(static_use_with pam) \
218 $(static_use_with kerberos kerberos5 /usr) \
219 ${LDAP_PATCH:+$(use X509 || ( use ldap && use_with ldap ))} \
220 $(use_with libedit) \
221 $(use_with selinux) \
222 $(use_with skey) \
223 $(use_with tcpd tcp-wrappers)
224 }
225
226 src_compile() {
227 emake || die
228 }
229
230 src_install() {
231 emake install-nokeys DESTDIR="${D}" || die
232 fperms 600 /etc/ssh/sshd_config
233 dobin contrib/ssh-copy-id
234 newinitd "${FILESDIR}"/sshd.rc6 sshd
235 newconfd "${FILESDIR}"/sshd.confd sshd
236 keepdir /var/empty
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 for t in ${tests} ; do
275 # Some tests read from stdin ...
276 emake -k -j1 ${t} </dev/null \
277 && passed="${passed}${t} " \
278 || failed="${failed}${t} "
279 done
280 einfo "Passed tests: ${passed}"
281 ewarn "Skipped tests: ${skipped}"
282 if [[ -n ${failed} ]] ; then
283 ewarn "Failed tests: ${failed}"
284 die "Some tests failed: ${failed}"
285 else
286 einfo "Failed tests: ${failed}"
287 return 0
288 fi
289 }
290
291 pkg_postinst() {
292 enewgroup sshd 22
293 enewuser sshd 22 -1 /var/empty sshd
294
295 ewarn "Remember to merge your config files in /etc/ssh/ and then"
296 ewarn "reload sshd: '/etc/init.d/sshd reload'."
297 if use pam ; then
298 echo
299 ewarn "Please be aware users need a valid shell in /etc/passwd"
300 ewarn "in order to be allowed to login."
301 fi
302 # This instruction is from the HPN webpage,
303 # Used for the server logging functionality
304 if [[ -n ${HPN_PATCH} ]] && use hpn; then
305 echo
306 einfo "For the HPN server logging patch, you must ensure that"
307 einfo "your syslog application also listens at /var/empty/dev/log."
308 fi
309 }