Gentoo Archives: gentoo-commits

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