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.3_p1.ebuild
Date: Sat, 03 Oct 2009 07:41:41
Message-Id: E1MtzFK-00024K-T6@stork.gentoo.org
1 vapier 09/10/03 07:41:38
2
3 Modified: ChangeLog
4 Added: openssh-5.3_p1.ebuild
5 Log:
6 Version bump.
7 (Portage version: 2.2_rc42/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.359 net-misc/openssh/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/openssh/ChangeLog?rev=1.359&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/openssh/ChangeLog?rev=1.359&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/openssh/ChangeLog?r1=1.358&r2=1.359
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/net-misc/openssh/ChangeLog,v
19 retrieving revision 1.358
20 retrieving revision 1.359
21 diff -u -r1.358 -r1.359
22 --- ChangeLog 23 Aug 2009 10:37:47 -0000 1.358
23 +++ ChangeLog 3 Oct 2009 07:41:38 -0000 1.359
24 @@ -1,6 +1,11 @@
25 # ChangeLog for net-misc/openssh
26 # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/ChangeLog,v 1.358 2009/08/23 10:37:47 vapier Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/ChangeLog,v 1.359 2009/10/03 07:41:38 vapier Exp $
29 +
30 +*openssh-5.3_p1 (03 Oct 2009)
31 +
32 + 03 Oct 2009; Mike Frysinger <vapier@g.o> +openssh-5.3_p1.ebuild:
33 + Version bump.
34
35 *openssh-5.2_p1-r3 (23 Aug 2009)
36
37
38
39
40 1.1 net-misc/openssh/openssh-5.3_p1.ebuild
41
42 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/openssh/openssh-5.3_p1.ebuild?rev=1.1&view=markup
43 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/openssh/openssh-5.3_p1.ebuild?rev=1.1&content-type=text/plain
44
45 Index: openssh-5.3_p1.ebuild
46 ===================================================================
47 # Copyright 1999-2009 Gentoo Foundation
48 # Distributed under the terms of the GNU General Public License v2
49 # $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/openssh-5.3_p1.ebuild,v 1.1 2009/10/03 07:41:38 vapier Exp $
50
51 inherit eutils flag-o-matic multilib autotools pam
52
53 # Make it more portable between straight releases
54 # and _p? releases.
55 PARCH=${P/_/}
56
57 #HPN_PATCH="${PARCH}-hpn13v6.diff.gz"
58 #LDAP_PATCH="${PARCH/openssh/openssh-lpk}-0.3.11.patch.gz"
59 PKCS11_PATCH="${PARCH/3p1/2}pkcs11-0.26.tar.bz2"
60 X509_VER="6.2.1" X509_PATCH="${PARCH}+x509-${X509_VER}.diff.gz"
61
62 DESCRIPTION="Port of OpenBSD's free SSH release"
63 HOMEPAGE="http://www.openssh.org/"
64 SRC_URI="mirror://openbsd/OpenSSH/portable/${PARCH}.tar.gz
65 ${HPN_PATCH:+hpn? ( http://www.psc.edu/networking/projects/hpn-ssh/${HPN_PATCH} )}
66 ${LDAP_PATCH:+ldap? ( mirror://gentoo/${LDAP_PATCH} )}
67 ${PKCS11_PATCH:+pkcs11? ( http://alon.barlev.googlepages.com/${PKCS11_PATCH} )}
68 ${X509_PATCH:+X509? ( http://roumenpetrov.info/openssh/x509-${X509_VER}/${X509_PATCH} )}"
69
70 LICENSE="as-is"
71 SLOT="0"
72 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
73 IUSE="hpn kerberos ldap libedit pam pkcs11 selinux skey smartcard static tcpd X X509"
74
75 RDEPEND="pam? ( virtual/pam )
76 kerberos? ( virtual/krb5 )
77 selinux? ( >=sys-libs/libselinux-1.28 )
78 skey? ( >=sys-auth/skey-1.1.5-r1 )
79 ldap? ( net-nds/openldap )
80 libedit? ( dev-libs/libedit )
81 >=dev-libs/openssl-0.9.6d
82 >=sys-libs/zlib-1.2.3
83 smartcard? ( dev-libs/opensc )
84 pkcs11? ( dev-libs/pkcs11-helper )
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} ]] && use ${1} && echo ${1} ; }
102 local fail="
103 $(maybe_fail ldap LDAP_PATCH)
104 $(maybe_fail pkcs11 PKCS11_PATCH)
105 $(maybe_fail X509 X509_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_unpack() {
118 unpack ${PARCH}.tar.gz
119 cd "${S}"
120
121 sed -i \
122 -e '/_PATH_XAUTH/s:/usr/X11R6/bin/xauth:/usr/bin/xauth:' \
123 pathnames.h || die
124
125 if use pkcs11 ; then
126 cd "${WORKDIR}"
127 unpack "${PKCS11_PATCH}"
128 cd "${S}"
129 EPATCH_OPTS="-p1" epatch "${WORKDIR}"/*pkcs11*/{1,2,4}*
130 use X509 && EPATCH_OPTS="-R" epatch "${WORKDIR}"/*pkcs11*/1000_all_log.patch
131 fi
132 use X509 && epatch "${DISTDIR}"/${X509_PATCH} "${FILESDIR}"/${PN}-5.2_p1-x509-hpn-glue.patch
133 use smartcard && epatch "${FILESDIR}"/openssh-3.9_p1-opensc.patch
134 if ! use X509 ; then
135 if [[ -n ${LDAP_PATCH} ]] && use ldap ; then
136 # The patch for bug 210110 64-bit stuff is now included.
137 epatch "${DISTDIR}"/${LDAP_PATCH}
138 epatch "${FILESDIR}"/${PN}-5.2p1-ldap-stdargs.diff #266654
139 fi
140 #epatch "${DISTDIR}"/openssh-5.2p1-gsskex-all-20090726.patch #115553 #216932 #279488
141 #epatch "${FILESDIR}"/${P}-gsskex-fix.patch
142 else
143 use ldap && ewarn "Sorry, X509 and ldap don't get along, disabling ldap"
144 fi
145 epatch "${FILESDIR}"/${PN}-4.7_p1-GSSAPI-dns.patch #165444 integrated into gsskex
146 [[ -n ${HPN_PATCH} ]] && use hpn && epatch "${DISTDIR}"/${HPN_PATCH}
147 epatch "${FILESDIR}"/${PN}-4.7p1-selinux.diff #191665
148 epatch "${FILESDIR}"/${PN}-5.2_p1-autoconf.patch
149
150 # in 5.2p1, 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
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 eautoreconf
164 }
165
166 static_use_with() {
167 local flag=$1
168 if use static && use ${flag} ; then
169 ewarn "Disabling '${flag}' support because of USE='static'"
170 # rebuild args so that we invert the first one (USE flag)
171 # but otherwise leave everything else working so we can
172 # just leverage use_with
173 [[ -z $1 ]] && flag="${flag} ${flag}"
174 shift
175 set -- !${flag} "$@"
176 fi
177 use_with "$@"
178 }
179
180 src_compile() {
181 addwrite /dev/ptmx
182 addpredict /etc/skey/skeykeys #skey configure code triggers this
183
184 local myconf=""
185 use static && append-ldflags -static
186
187 econf \
188 --with-ldflags="${LDFLAGS}" \
189 --disable-strip \
190 --sysconfdir=/etc/ssh \
191 --libexecdir=/usr/$(get_libdir)/misc \
192 --datadir=/usr/share/openssh \
193 --with-privsep-path=/var/empty \
194 --with-privsep-user=sshd \
195 --with-md5-passwords \
196 --with-ssl-engine \
197 $(static_use_with pam) \
198 $(static_use_with kerberos kerberos5 /usr) \
199 ${LDAP_PATCH:+$(use ldap && use_with ldap)} \
200 $(use_with libedit) \
201 ${PKCS11_PATCH:+$(use pkcs11 && static_use_with pkcs11)} \
202 $(use_with selinux) \
203 $(use_with skey) \
204 $(use_with smartcard opensc) \
205 $(use_with tcpd tcp-wrappers) \
206 ${myconf} \
207 || die "bad configure"
208 emake || die "compile problem"
209 }
210
211 src_install() {
212 emake install-nokeys DESTDIR="${D}" || die
213 fperms 600 /etc/ssh/sshd_config
214 dobin contrib/ssh-copy-id
215 newinitd "${FILESDIR}"/sshd.rc6 sshd
216 newconfd "${FILESDIR}"/sshd.confd sshd
217 keepdir /var/empty
218
219 newpamd "${FILESDIR}"/sshd.pam_include.2 sshd
220 if use pam ; then
221 sed -i \
222 -e "/^#UsePAM /s:.*:UsePAM yes:" \
223 -e "/^#PasswordAuthentication /s:.*:PasswordAuthentication no:" \
224 -e "/^#PrintMotd /s:.*:PrintMotd no:" \
225 -e "/^#PrintLastLog /s:.*:PrintLastLog no:" \
226 "${D}"/etc/ssh/sshd_config || die "sed of configuration file failed"
227 fi
228
229 # This instruction is from the HPN webpage,
230 # Used for the server logging functionality
231 if [[ -n ${HPN_PATCH} ]] && use hpn; then
232 keepdir /var/empty/dev
233 fi
234
235 doman contrib/ssh-copy-id.1
236 dodoc ChangeLog CREDITS OVERVIEW README* TODO sshd_config
237
238 diropts -m 0700
239 dodir /etc/skel/.ssh
240 }
241
242 src_test() {
243 local t tests skipped failed passed shell
244 tests="interop-tests compat-tests"
245 skipped=""
246 shell=$(getent passwd ${UID} | cut -d: -f7)
247 if [[ ${shell} == */nologin ]] || [[ ${shell} == */false ]] ; then
248 elog "Running the full OpenSSH testsuite"
249 elog "requires a usable shell for the 'portage'"
250 elog "user, so we will run a subset only."
251 skipped="${skipped} tests"
252 else
253 tests="${tests} tests"
254 fi
255 for t in ${tests} ; do
256 # Some tests read from stdin ...
257 emake -k -j1 ${t} </dev/null \
258 && passed="${passed}${t} " \
259 || failed="${failed}${t} "
260 done
261 einfo "Passed tests: ${passed}"
262 ewarn "Skipped tests: ${skipped}"
263 if [[ -n ${failed} ]] ; then
264 ewarn "Failed tests: ${failed}"
265 die "Some tests failed: ${failed}"
266 else
267 einfo "Failed tests: ${failed}"
268 return 0
269 fi
270 }
271
272 pkg_postinst() {
273 enewgroup sshd 22
274 enewuser sshd 22 -1 /var/empty sshd
275
276 # help fix broken perms caused by older ebuilds.
277 # can probably cut this after the next stage release.
278 chmod u+x "${ROOT}"/etc/skel/.ssh >& /dev/null
279
280 ewarn "Remember to merge your config files in /etc/ssh/ and then"
281 ewarn "reload sshd: '/etc/init.d/sshd reload'."
282 if use pam ; then
283 echo
284 ewarn "Please be aware users need a valid shell in /etc/passwd"
285 ewarn "in order to be allowed to login."
286 fi
287 if use pkcs11 ; then
288 echo
289 einfo "For PKCS#11 you should also emerge one of the askpass softwares"
290 einfo "Example: net-misc/x11-ssh-askpass"
291 fi
292 # This instruction is from the HPN webpage,
293 # Used for the server logging functionality
294 if [[ -n ${HPN_PATCH} ]] && use hpn; then
295 echo
296 einfo "For the HPN server logging patch, you must ensure that"
297 einfo "your syslog application also listens at /var/empty/dev/log."
298 fi
299 }