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: openssh-5.8_p1.ebuild ChangeLog
Date: Sat, 05 Feb 2011 19:08:50
Message-Id: 20110205190837.0332020054@flycatcher.gentoo.org
1 vapier 11/02/05 19:08:36
2
3 Modified: ChangeLog
4 Added: openssh-5.8_p1.ebuild
5 Log:
6 Version bump #353673. Default HPN to on when available #347193 by Jeremy Olexa.
7
8 (Portage version: 2.2.0_alpha20/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.403 net-misc/openssh/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/openssh/ChangeLog?rev=1.403&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/openssh/ChangeLog?rev=1.403&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/openssh/ChangeLog?r1=1.402&r2=1.403
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/net-misc/openssh/ChangeLog,v
20 retrieving revision 1.402
21 retrieving revision 1.403
22 diff -u -r1.402 -r1.403
23 --- ChangeLog 25 Jan 2011 06:40:20 -0000 1.402
24 +++ ChangeLog 5 Feb 2011 19:08:36 -0000 1.403
25 @@ -1,6 +1,13 @@
26 # ChangeLog for net-misc/openssh
27 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/ChangeLog,v 1.402 2011/01/25 06:40:20 vapier Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/ChangeLog,v 1.403 2011/02/05 19:08:36 vapier Exp $
30 +
31 +*openssh-5.8_p1 (05 Feb 2011)
32 +
33 + 05 Feb 2011; Mike Frysinger <vapier@g.o> +openssh-5.8_p1.ebuild,
34 + +files/openssh-5.8_p1-x509-hpn-glue.patch:
35 + Version bump #353673. Default HPN to on when available #347193 by Jeremy
36 + Olexa.
37
38 *openssh-5.7_p1-r1 (25 Jan 2011)
39
40
41
42
43 1.1 net-misc/openssh/openssh-5.8_p1.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/openssh/openssh-5.8_p1.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/openssh/openssh-5.8_p1.ebuild?rev=1.1&content-type=text/plain
47
48 Index: openssh-5.8_p1.ebuild
49 ===================================================================
50 # Copyright 1999-2011 Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/openssh-5.8_p1.ebuild,v 1.1 2011/02/05 19:08:36 vapier Exp $
53
54 EAPI="2"
55 inherit eutils flag-o-matic multilib autotools pam
56
57 # Make it more portable between straight releases
58 # and _p? releases.
59 PARCH=${P/_/}
60
61 HPN_PATCH="${PARCH}-hpn13v10.diff.bz2"
62 LDAP_PATCH="${PARCH/-5.8/-lpk-5.7}-0.3.13.patch.gz"
63 X509_VER="6.2.4" X509_PATCH="${PARCH}+x509-${X509_VER}.diff.gz"
64
65 DESCRIPTION="Port of OpenBSD's free SSH release"
66 HOMEPAGE="http://www.openssh.org/"
67 SRC_URI="mirror://openbsd/OpenSSH/portable/${PARCH}.tar.gz
68 ${HPN_PATCH:+hpn? ( http://www.psc.edu/networking/projects/hpn-ssh/${HPN_PATCH} mirror://gentoo/${HPN_PATCH} )}
69 ${LDAP_PATCH:+ldap? ( mirror://gentoo/${LDAP_PATCH} )}
70 ${X509_PATCH:+X509? ( http://roumenpetrov.info/openssh/x509-${X509_VER}/${X509_PATCH} )}
71 "
72
73 LICENSE="as-is"
74 SLOT="0"
75 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
76 IUSE="${HPN_PATCH:++}hpn kerberos ldap libedit pam selinux skey static tcpd X X509"
77
78 RDEPEND="pam? ( virtual/pam )
79 kerberos? ( virtual/krb5 )
80 selinux? ( >=sys-libs/libselinux-1.28 )
81 skey? ( >=sys-auth/skey-1.1.5-r1 )
82 ldap? ( net-nds/openldap )
83 libedit? ( dev-libs/libedit )
84 >=dev-libs/openssl-0.9.6d
85 >=sys-libs/zlib-1.2.3
86 tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
87 X? ( x11-apps/xauth )
88 userland_GNU? ( sys-apps/shadow )"
89 DEPEND="${RDEPEND}
90 dev-util/pkgconfig
91 virtual/os-headers
92 sys-devel/autoconf"
93 RDEPEND="${RDEPEND}
94 pam? ( >=sys-auth/pambase-20081028 )"
95 PROVIDE="virtual/ssh"
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 if use X509 ; then
127 epatch "${WORKDIR}"/${X509_PATCH%.*}
128 epatch "${FILESDIR}"/${PN}-5.8_p1-x509-hpn-glue.patch
129 fi
130 if ! use X509 ; then
131 if [[ -n ${LDAP_PATCH} ]] && use ldap ; then
132 epatch "${WORKDIR}"/${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 "${WORKDIR}"/${HPN_PATCH%.*}
145 epatch "${FILESDIR}"/${PN}-5.6_p1-hpn-progressmeter.patch
146 # version.h patch conflict avoidence
147 mv version.h version.h.hpn
148 cp -f version.h.pristine version.h
149 fi
150
151 sed -i "s:-lcrypto:$(pkg-config --libs openssl):" configure{,.ac} || die
152
153 # Disable PATH reset, trust what portage gives us. bug 254615
154 sed -i -e 's:^PATH=/:#PATH=/:' configure || die
155
156 # Now we can build a sane merged version.h
157 (
158 sed '/^#define SSH_RELEASE/d' version.h.* | sort -u
159 printf '#define SSH_RELEASE SSH_VERSION SSH_PORTABLE %s %s\n' \
160 "$([ -e version.h.hpn ] && echo SSH_HPN)" \
161 "$([ -e version.h.lpk ] && echo SSH_LPK)"
162 ) > version.h
163
164 eautoreconf
165 }
166
167 static_use_with() {
168 local flag=$1
169 if use static && use ${flag} ; then
170 ewarn "Disabling '${flag}' support because of USE='static'"
171 # rebuild args so that we invert the first one (USE flag)
172 # but otherwise leave everything else working so we can
173 # just leverage use_with
174 shift
175 [[ -z $1 ]] && flag="${flag} ${flag}"
176 set -- !${flag} "$@"
177 fi
178 use_with "$@"
179 }
180
181 src_configure() {
182 addwrite /dev/ptmx
183 addpredict /etc/skey/skeykeys #skey configure code triggers this
184
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 X509 || ( use ldap && use_with ldap ))} \
200 $(use_with libedit) \
201 $(use_with selinux) \
202 $(use_with skey) \
203 $(use_with tcpd tcp-wrappers)
204 }
205
206 src_install() {
207 emake install-nokeys DESTDIR="${D}" || die
208 fperms 600 /etc/ssh/sshd_config
209 dobin contrib/ssh-copy-id || die
210 newinitd "${FILESDIR}"/sshd.rc6.2 sshd
211 newconfd "${FILESDIR}"/sshd.confd sshd
212 keepdir /var/empty
213
214 # not all openssl installs support ecc, or are functional #352645
215 if ! grep -q '#define OPENSSL_HAS_ECC 1' config.h ; then
216 dosed 's:&& gen_key ecdsa::' /etc/init.d/sshd || die
217 fi
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 ewarn "Remember to merge your config files in /etc/ssh/ and then"
277 ewarn "reload sshd: '/etc/init.d/sshd reload'."
278 if use pam ; then
279 echo
280 ewarn "Please be aware users need a valid shell in /etc/passwd"
281 ewarn "in order to be allowed to login."
282 fi
283 # This instruction is from the HPN webpage,
284 # Used for the server logging functionality
285 if [[ -n ${HPN_PATCH} ]] && use hpn ; then
286 echo
287 einfo "For the HPN server logging patch, you must ensure that"
288 einfo "your syslog application also listens at /var/empty/dev/log."
289 fi
290 }