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