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-6.8_p1-r5.ebuild ChangeLog
Date: Tue, 28 Apr 2015 14:48:42
Message-Id: 20150428043936.D085699F@oystercatcher.gentoo.org
1 vapier 15/04/28 04:39:35
2
3 Modified: ChangeLog
4 Added: openssh-6.8_p1-r5.ebuild
5 Log:
6 Add fix from upstream for old TeraTerm clients #547944 by William Hubbs. Pull in some upstream hpn updates.
7
8 (Portage version: 2.2.18/cvs/Linux x86_64, signed Manifest commit with key D2E96200)
9
10 Revision Changes Path
11 1.560 net-misc/openssh/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/openssh/ChangeLog?rev=1.560&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/openssh/ChangeLog?rev=1.560&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/openssh/ChangeLog?r1=1.559&r2=1.560
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/net-misc/openssh/ChangeLog,v
20 retrieving revision 1.559
21 retrieving revision 1.560
22 diff -u -r1.559 -r1.560
23 --- ChangeLog 13 Apr 2015 05:12:11 -0000 1.559
24 +++ ChangeLog 28 Apr 2015 04:39:35 -0000 1.560
25 @@ -1,6 +1,14 @@
26 # ChangeLog for net-misc/openssh
27 # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/ChangeLog,v 1.559 2015/04/13 05:12:11 vapier Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/ChangeLog,v 1.560 2015/04/28 04:39:35 vapier Exp $
30 +
31 +*openssh-6.8_p1-r5 (28 Apr 2015)
32 +
33 + 28 Apr 2015; Mike Frysinger <vapier@g.o>
34 + +files/openssh-6.8_p1-teraterm-hpn-glue.patch,
35 + +files/openssh-6.8_p1-teraterm.patch, +openssh-6.8_p1-r5.ebuild:
36 + Add fix from upstream for old TeraTerm clients #547944 by William Hubbs. Pull
37 + in some upstream hpn updates.
38
39 13 Apr 2015; Mike Frysinger <vapier@g.o> files/sshd.rc6.4:
40 Use SSHD_CONFIG everywhere #546008 by Alexander Sulfrian.
41
42
43
44 1.1 net-misc/openssh/openssh-6.8_p1-r5.ebuild
45
46 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/openssh/openssh-6.8_p1-r5.ebuild?rev=1.1&view=markup
47 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/openssh/openssh-6.8_p1-r5.ebuild?rev=1.1&content-type=text/plain
48
49 Index: openssh-6.8_p1-r5.ebuild
50 ===================================================================
51 # Copyright 1999-2015 Gentoo Foundation
52 # Distributed under the terms of the GNU General Public License v2
53 # $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/openssh-6.8_p1-r5.ebuild,v 1.1 2015/04/28 04:39:35 vapier Exp $
54
55 EAPI="4"
56 inherit eutils user flag-o-matic multilib autotools pam systemd versionator
57
58 # Make it more portable between straight releases
59 # and _p? releases.
60 PARCH=${P/_}
61
62 HPN_PATCH="${PN}-6.8p1-r5-hpnssh14v5.tar.xz"
63 LDAP_PATCH="${PN}-lpk-6.8p1-0.3.14.patch.xz"
64 X509_VER="8.3.1" 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 mirror://gentoo/${P}-sctp.patch.xz
70 ${HPN_PATCH:+hpn? (
71 mirror://gentoo/${HPN_PATCH}
72 http://dev.gentoo.org/~vapier/dist/${HPN_PATCH}
73 mirror://sourceforge/hpnssh/${HPN_PATCH}
74 )}
75 ${LDAP_PATCH:+ldap? ( mirror://gentoo/${LDAP_PATCH} )}
76 ${X509_PATCH:+X509? (
77 http://roumenpetrov.info/openssh/x509-${X509_VER}/${X509_PATCH}
78 mirror://gentoo/${P}-x509-${X509_VER}-glue.patch.xz
79 )}
80 "
81
82 LICENSE="BSD GPL-2"
83 SLOT="0"
84 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~arm-linux ~x86-linux"
85 # Probably want to drop ssh1/ssl defaulting to on in a future version.
86 IUSE="bindist debug ${HPN_PATCH:++}hpn kerberos kernel_linux ldap ldns libedit pam +pie sctp selinux skey +ssh1 +ssl static X X509"
87 REQUIRED_USE="pie? ( !static )
88 ssh1? ( ssl )
89 static? ( !kerberos !pam )
90 X509? ( !ldap ssl )"
91
92 LIB_DEPEND="sctp? ( net-misc/lksctp-tools[static-libs(+)] )
93 selinux? ( >=sys-libs/libselinux-1.28[static-libs(+)] )
94 skey? ( >=sys-auth/skey-1.1.5-r1[static-libs(+)] )
95 libedit? ( dev-libs/libedit[static-libs(+)] )
96 ssl? (
97 >=dev-libs/openssl-0.9.6d:0[bindist=]
98 dev-libs/openssl[static-libs(+)]
99 )
100 >=sys-libs/zlib-1.2.3[static-libs(+)]"
101 RDEPEND="
102 !static? (
103 ${LIB_DEPEND//\[static-libs(+)]}
104 ldns? (
105 !bindist? ( net-libs/ldns[ecdsa,ssl] )
106 bindist? ( net-libs/ldns[-ecdsa,ssl] )
107 )
108 )
109 pam? ( virtual/pam )
110 kerberos? ( virtual/krb5 )
111 ldap? ( net-nds/openldap )"
112 DEPEND="${RDEPEND}
113 static? (
114 ${LIB_DEPEND}
115 ldns? (
116 !bindist? ( net-libs/ldns[ecdsa,ssl,static-libs(+)] )
117 bindist? ( net-libs/ldns[-ecdsa,ssl,static-libs(+)] )
118 )
119 )
120 virtual/pkgconfig
121 virtual/os-headers
122 sys-devel/autoconf"
123 RDEPEND="${RDEPEND}
124 pam? ( >=sys-auth/pambase-20081028 )
125 userland_GNU? ( virtual/shadow )
126 X? ( x11-apps/xauth )"
127
128 S=${WORKDIR}/${PARCH}
129
130 pkg_setup() {
131 # this sucks, but i'd rather have people unable to `emerge -u openssh`
132 # than not be able to log in to their server any more
133 maybe_fail() { [[ -z ${!2} ]] && echo "$1" ; }
134 local fail="
135 $(use X509 && maybe_fail X509 X509_PATCH)
136 $(use ldap && maybe_fail ldap LDAP_PATCH)
137 $(use hpn && maybe_fail hpn HPN_PATCH)
138 "
139 fail=$(echo ${fail})
140 if [[ -n ${fail} ]] ; then
141 eerror "Sorry, but this version does not yet support features"
142 eerror "that you requested: ${fail}"
143 eerror "Please mask ${PF} for now and check back later:"
144 eerror " # echo '=${CATEGORY}/${PF}' >> /etc/portage/package.mask"
145 die "booooo"
146 fi
147
148 # Make sure people who are using tcp wrappers are notified of its removal. #531156
149 if grep -qs '^ *sshd *:' "${EROOT}"/etc/hosts.{allow,deny} ; then
150 eerror "Sorry, but openssh no longer supports tcp-wrappers, and it seems like"
151 eerror "you're trying to use it. Update your ${EROOT}etc/hosts.{allow,deny} please."
152 die "USE=tcpd no longer works"
153 fi
154 }
155
156 save_version() {
157 # version.h patch conflict avoidence
158 mv version.h version.h.$1
159 cp -f version.h.pristine version.h
160 }
161
162 src_prepare() {
163 sed -i \
164 -e "/_PATH_XAUTH/s:/usr/X11R6/bin/xauth:${EPREFIX}/usr/bin/xauth:" \
165 pathnames.h || die
166 # keep this as we need it to avoid the conflict between LPK and HPN changing
167 # this file.
168 cp version.h version.h.pristine
169
170 # don't break .ssh/authorized_keys2 for fun
171 sed -i '/^AuthorizedKeysFile/s:^:#:' sshd_config || die
172
173 epatch "${FILESDIR}"/${PN}-6.8_p1-sshd-gssapi-multihomed.patch #378361
174 if use X509 ; then
175 pushd .. >/dev/null
176 epatch "${WORKDIR}"/${P}-x509-${X509_VER}-glue.patch
177 epatch "${FILESDIR}"/${P}-sctp-x509-glue.patch
178 popd >/dev/null
179 epatch "${WORKDIR}"/${X509_PATCH%.*}
180 epatch "${FILESDIR}"/${PN}-6.3_p1-x509-hpn14v2-glue.patch
181 save_version X509
182 fi
183 if use ldap ; then
184 epatch "${WORKDIR}"/${LDAP_PATCH%.*}
185 save_version LPK
186 fi
187 epatch "${FILESDIR}"/${PN}-4.7_p1-GSSAPI-dns.patch #165444 integrated into gsskex
188 epatch "${FILESDIR}"/${PN}-6.7_p1-openssl-ignore-status.patch
189 epatch "${FILESDIR}"/${PN}-6.8_p1-ssh-keygen-no-ssh1.patch #544078
190 epatch "${FILESDIR}"/${PN}-6.8_p1-teraterm.patch #547944
191 # The X509 patchset fixes this independently.
192 use X509 || epatch "${FILESDIR}"/${PN}-6.8_p1-ssl-engine-configure.patch
193 epatch "${WORKDIR}"/${P}-sctp.patch
194 if use hpn ; then
195 # The teraterm patch pulled in an upstream update.
196 pushd "${WORKDIR}"/${HPN_PATCH%.*.*} >/dev/null
197 epatch "${FILESDIR}"/${PN}-6.8_p1-teraterm-hpn-glue.patch
198 popd >/dev/null
199 EPATCH_FORCE="yes" EPATCH_SUFFIX="patch" \
200 EPATCH_MULTI_MSG="Applying HPN patchset ..." \
201 epatch "${WORKDIR}"/${HPN_PATCH%.*.*}
202 save_version HPN
203 fi
204
205 tc-export PKG_CONFIG
206 local sed_args=(
207 -e "s:-lcrypto:$(${PKG_CONFIG} --libs openssl):"
208 # Disable PATH reset, trust what portage gives us #254615
209 -e 's:^PATH=/:#PATH=/:'
210 # Disable fortify flags ... our gcc does this for us
211 -e 's:-D_FORTIFY_SOURCE=2::'
212 )
213 # The -ftrapv flag ICEs on hppa #505182
214 use hppa && sed_args+=(
215 -e '/CFLAGS/s:-ftrapv:-fdisable-this-test:'
216 -e '/OSSH_CHECK_CFLAG_LINK.*-ftrapv/d'
217 )
218 sed -i "${sed_args[@]}" configure{.ac,} || die
219
220 epatch_user #473004
221
222 # Now we can build a sane merged version.h
223 (
224 sed '/^#define SSH_RELEASE/d' version.h.* | sort -u
225 macros=()
226 for p in HPN LPK X509 ; do [ -e version.h.${p} ] && macros+=( SSH_${p} ) ; done
227 printf '#define SSH_RELEASE SSH_VERSION SSH_PORTABLE %s\n' "${macros}"
228 ) > version.h
229
230 eautoreconf
231 }
232
233 src_configure() {
234 addwrite /dev/ptmx
235 addpredict /etc/skey/skeykeys # skey configure code triggers this
236
237 use debug && append-cppflags -DSANDBOX_SECCOMP_FILTER_DEBUG
238 use static && append-ldflags -static
239
240 local myconf=(
241 --with-ldflags="${LDFLAGS}"
242 --disable-strip
243 --with-pid-dir="${EPREFIX}"$(usex kernel_linux '' '/var')/run
244 --sysconfdir="${EPREFIX}"/etc/ssh
245 --libexecdir="${EPREFIX}"/usr/$(get_libdir)/misc
246 --datadir="${EPREFIX}"/usr/share/openssh
247 --with-privsep-path="${EPREFIX}"/var/empty
248 --with-privsep-user=sshd
249 $(use_with kerberos kerberos5 "${EPREFIX}"/usr)
250 # We apply the ldap patch conditionally, so can't pass --without-ldap
251 # unconditionally else we get unknown flag warnings.
252 $(use ldap && use_with ldap)
253 $(use_with ldns)
254 $(use_with libedit)
255 $(use_with pam)
256 $(use_with pie)
257 $(use_with sctp)
258 $(use_with selinux)
259 $(use_with skey)
260 $(use_with ssh1)
261 # The X509 patch deletes this option entirely.
262 $(use X509 || use_with ssl openssl)
263 $(use_with ssl md5-passwords)
264 $(use_with ssl ssl-engine)
265 )
266
267 # Special settings for Gentoo/FreeBSD 9.0 or later (see bug #391011)
268 if use elibc_FreeBSD && version_is_at_least 9.0 "$(uname -r|sed 's/\(.\..\).*/\1/')" ; then
269 myconf+=( --disable-utmp --disable-wtmp --disable-wtmpx )
270 append-ldflags -lutil
271 fi
272
273 econf "${myconf[@]}"
274 }
275
276 src_install() {
277 emake install-nokeys DESTDIR="${D}"
278 fperms 600 /etc/ssh/sshd_config
279 dobin contrib/ssh-copy-id
280 newinitd "${FILESDIR}"/sshd.rc6.4 sshd
281 newconfd "${FILESDIR}"/sshd.confd sshd
282 keepdir /var/empty
283
284 newpamd "${FILESDIR}"/sshd.pam_include.2 sshd
285 if use pam ; then
286 sed -i \
287 -e "/^#UsePAM /s:.*:UsePAM yes:" \
288 -e "/^#PasswordAuthentication /s:.*:PasswordAuthentication no:" \
289 -e "/^#PrintMotd /s:.*:PrintMotd no:" \
290 -e "/^#PrintLastLog /s:.*:PrintLastLog no:" \
291 "${ED}"/etc/ssh/sshd_config || die
292 fi
293
294 # Gentoo tweaks to default config files
295 cat <<-EOF >> "${ED}"/etc/ssh/sshd_config
296
297 # Allow client to pass locale environment variables #367017
298 AcceptEnv LANG LC_*
299 EOF
300 cat <<-EOF >> "${ED}"/etc/ssh/ssh_config
301
302 # Send locale environment variables #367017
303 SendEnv LANG LC_*
304 EOF
305
306 # This instruction is from the HPN webpage,
307 # Used for the server logging functionality
308 if [[ -n ${HPN_PATCH} ]] && use hpn ; then
309 keepdir /var/empty/dev
310 fi
311
312 if ! use X509 && [[ -n ${LDAP_PATCH} ]] && use ldap ; then
313 insinto /etc/openldap/schema/
314 newins openssh-lpk_openldap.schema openssh-lpk.schema
315 fi
316
317 doman contrib/ssh-copy-id.1
318 dodoc ChangeLog CREDITS OVERVIEW README* TODO sshd_config
319
320 diropts -m 0700
321 dodir /etc/skel/.ssh
322
323 systemd_dounit "${FILESDIR}"/sshd.{service,socket}
324 systemd_newunit "${FILESDIR}"/sshd_at.service 'sshd@.service'
325 }
326
327 src_test() {
328 local t tests skipped failed passed shell
329 tests="interop-tests compat-tests"
330 skipped=""
331 shell=$(egetshell ${UID})
332 if [[ ${shell} == */nologin ]] || [[ ${shell} == */false ]] ; then
333 elog "Running the full OpenSSH testsuite"
334 elog "requires a usable shell for the 'portage'"
335 elog "user, so we will run a subset only."
336 skipped="${skipped} tests"
337 else
338 tests="${tests} tests"
339 fi
340 # It will also attempt to write to the homedir .ssh
341 local sshhome=${T}/homedir
342 mkdir -p "${sshhome}"/.ssh
343 for t in ${tests} ; do
344 # Some tests read from stdin ...
345 HOMEDIR="${sshhome}" \
346 emake -k -j1 ${t} </dev/null \
347 && passed="${passed}${t} " \
348 || failed="${failed}${t} "
349 done
350 einfo "Passed tests: ${passed}"
351 ewarn "Skipped tests: ${skipped}"
352 if [[ -n ${failed} ]] ; then
353 ewarn "Failed tests: ${failed}"
354 die "Some tests failed: ${failed}"
355 else
356 einfo "Failed tests: ${failed}"
357 return 0
358 fi
359 }
360
361 pkg_preinst() {
362 enewgroup sshd 22
363 enewuser sshd 22 -1 /var/empty sshd
364 }
365
366 pkg_postinst() {
367 if has_version "<${CATEGORY}/${PN}-5.8_p1" ; then
368 elog "Starting with openssh-5.8p1, the server will default to a newer key"
369 elog "algorithm (ECDSA). You are encouraged to manually update your stored"
370 elog "keys list as servers update theirs. See ssh-keyscan(1) for more info."
371 fi
372 ewarn "Remember to merge your config files in /etc/ssh/ and then"
373 ewarn "reload sshd: '/etc/init.d/sshd reload'."
374 # This instruction is from the HPN webpage,
375 # Used for the server logging functionality
376 if [[ -n ${HPN_PATCH} ]] && use hpn ; then
377 einfo "For the HPN server logging patch, you must ensure that"
378 einfo "your syslog application also listens at /var/empty/dev/log."
379 fi
380 elog "Note: openssh-6.7 versions no longer support USE=tcpd as upstream has"
381 elog " dropped it. Make sure to update any configs that you might have."
382 }