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.1_p1-r2.ebuild
Date: Mon, 03 Nov 2008 08:47:44
Message-Id: E1Kwv66-0005SA-8W@stork.gentoo.org
1 vapier 08/11/03 08:47:42
2
3 Modified: ChangeLog
4 Added: openssh-5.1_p1-r2.ebuild
5 Log:
6 Fix some issues with printing of banners #244222 by Michał Górny.
7 (Portage version: 2.2_rc13/cvs/Linux 2.6.27.4 x86_64)
8
9 Revision Changes Path
10 1.322 net-misc/openssh/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/openssh/ChangeLog?rev=1.322&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/openssh/ChangeLog?rev=1.322&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/openssh/ChangeLog?r1=1.321&r2=1.322
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/net-misc/openssh/ChangeLog,v
19 retrieving revision 1.321
20 retrieving revision 1.322
21 diff -u -r1.321 -r1.322
22 --- ChangeLog 1 Nov 2008 10:36:37 -0000 1.321
23 +++ ChangeLog 3 Nov 2008 08:47:42 -0000 1.322
24 @@ -1,6 +1,13 @@
25 # ChangeLog for net-misc/openssh
26 # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/ChangeLog,v 1.321 2008/11/01 10:36:37 robbat2 Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/ChangeLog,v 1.322 2008/11/03 08:47:42 vapier Exp $
29 +
30 +*openssh-5.1_p1-r2 (03 Nov 2008)
31 +
32 + 03 Nov 2008; Mike Frysinger <vapier@g.o>
33 + +files/openssh-5.1_p1-escaped-banner.patch,
34 + +files/openssh-5.1_p1-null-banner.patch, +openssh-5.1_p1-r2.ebuild:
35 + Fix some issues with printing of banners #244222 by Michał Górny.
36
37 01 Nov 2008; Robin H. Johnson <robbat2@g.o> openssh-5.1_p1.ebuild,
38 openssh-5.1_p1-r1.ebuild:
39
40
41
42 1.1 net-misc/openssh/openssh-5.1_p1-r2.ebuild
43
44 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/openssh/openssh-5.1_p1-r2.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/openssh/openssh-5.1_p1-r2.ebuild?rev=1.1&content-type=text/plain
46
47 Index: openssh-5.1_p1-r2.ebuild
48 ===================================================================
49 # Copyright 1999-2008 Gentoo Foundation
50 # Distributed under the terms of the GNU General Public License v2
51 # $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/openssh-5.1_p1-r2.ebuild,v 1.1 2008/11/03 08:47:42 vapier Exp $
52
53 inherit eutils flag-o-matic ccc multilib autotools pam
54
55 # Make it more portable between straight releases
56 # and _p? releases.
57 PARCH=${P/_/}
58
59 X509_PATCH="${PARCH}+x509-6.1.1.diff.gz"
60 LDAP_PATCH="${PARCH/openssh/openssh-lpk}-0.3.10.patch.gz"
61 HPN_PATCH="${PARCH}-hpn13v5.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 http://www.sxw.org.uk/computing/patches/openssh-5.0p1-gsskex-20080404.patch
67 ${LDAP_PATCH:+ldap? ( mirror://gentoo/${LDAP_PATCH} )}
68 ${X509_PATCH:+X509? ( http://roumenpetrov.info/openssh/x509-6.1.1/${X509_PATCH} )}
69 ${HPN_PATCH:+hpn? ( http://www.psc.edu/networking/projects/hpn-ssh/${HPN_PATCH} )}"
70 #${LDAP_PATCH:+ldap? ( http://dev.inversepath.com/openssh-lpk/${LDAP_PATCH} )}
71
72 LICENSE="as-is"
73 SLOT="0"
74 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
75 IUSE="static pam tcpd kerberos skey selinux X509 ldap smartcard hpn libedit X"
76
77 RDEPEND="pam? ( virtual/pam )
78 kerberos? ( virtual/krb5 )
79 selinux? ( >=sys-libs/libselinux-1.28 )
80 skey? ( >=sys-auth/skey-1.1.5-r1 )
81 ldap? ( net-nds/openldap )
82 libedit? ( dev-libs/libedit )
83 >=dev-libs/openssl-0.9.6d
84 >=sys-libs/zlib-1.2.3
85 smartcard? ( dev-libs/opensc )
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 )"
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} ]] && use ${1} && echo ${1} ; }
103 local fail="
104 $(maybe_fail X509 X509_PATCH)
105 $(maybe_fail ldap LDAP_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 use X509 && epatch "${DISTDIR}"/${X509_PATCH} "${FILESDIR}"/${PN}-5.1_p1-x509-hpn-glue.patch
126 use smartcard && epatch "${FILESDIR}"/openssh-3.9_p1-opensc.patch
127 if ! use X509 ; then
128 if [[ -n ${LDAP_PATCH} ]] && use ldap ; then
129 # The patch for bug 210110 64-bit stuff is now included.
130 epatch "${DISTDIR}"/${LDAP_PATCH}
131 epatch "${FILESDIR}"/${PN}-5.1_p1-ldap-hpn-glue.patch
132 fi
133 #epatch "${DISTDIR}"/openssh-5.0p1-gsskex-20080404.patch #115553 #216932
134 else
135 use ldap && ewarn "Sorry, X509 and ldap don't get along, disabling ldap"
136 fi
137 epatch "${FILESDIR}"/${PN}-4.7_p1-GSSAPI-dns.patch #165444 integrated into gsskex
138 [[ -n ${HPN_PATCH} ]] && use hpn && epatch "${DISTDIR}"/${HPN_PATCH}
139 epatch "${FILESDIR}"/${PN}-4.7p1-selinux.diff #191665
140
141 sed -i "s:-lcrypto:$(pkg-config --libs openssl):" configure{,.ac} || die
142
143 epatch "${FILESDIR}"/${P}-null-banner.patch #244222
144 epatch "${FILESDIR}"/${P}-escaped-banner.patch #244222
145
146 eautoreconf
147 }
148
149 src_compile() {
150 addwrite /dev/ptmx
151 addpredict /etc/skey/skeykeys #skey configure code triggers this
152
153 local myconf=""
154 if use static ; then
155 append-ldflags -static
156 use pam && ewarn "Disabling pam support becuse of static flag"
157 myconf="${myconf} --without-pam"
158 else
159 myconf="${myconf} $(use_with pam)"
160 fi
161
162 econf \
163 --with-ldflags="${LDFLAGS}" \
164 --disable-strip \
165 --sysconfdir=/etc/ssh \
166 --libexecdir=/usr/$(get_libdir)/misc \
167 --datadir=/usr/share/openssh \
168 --with-privsep-path=/var/empty \
169 --with-privsep-user=sshd \
170 --with-md5-passwords \
171 --with-ssl-engine \
172 $(use ldap && [ -n "${LDAP_PATCH}" ] && use_with ldap) \
173 $(use_with libedit) \
174 $(use_with kerberos kerberos5 /usr) \
175 $(use_with tcpd tcp-wrappers) \
176 $(use_with selinux) \
177 $(use_with skey) \
178 $(use_with smartcard opensc) \
179 ${myconf} \
180 || die "bad configure"
181 emake || die "compile problem"
182 }
183
184 src_install() {
185 emake install-nokeys DESTDIR="${D}" || die
186 fperms 600 /etc/ssh/sshd_config
187 dobin contrib/ssh-copy-id
188 newinitd "${FILESDIR}"/sshd.rc6 sshd
189 newconfd "${FILESDIR}"/sshd.confd sshd
190 keepdir /var/empty
191
192 newpamd "${FILESDIR}"/sshd.pam_include.2 sshd
193 use pam \
194 && dosed "/^#UsePAM /s:.*:UsePAM yes:" /etc/ssh/sshd_config \
195 && dosed "/^#PasswordAuthentication /s:.*:PasswordAuthentication no:" /etc/ssh/sshd_config
196
197 doman contrib/ssh-copy-id.1
198 dodoc ChangeLog CREDITS OVERVIEW README* TODO sshd_config
199
200 diropts -m 0700
201 dodir /etc/skel/.ssh
202 }
203
204 pkg_postinst() {
205 enewgroup sshd 22
206 enewuser sshd 22 -1 /var/empty sshd
207
208 # help fix broken perms caused by older ebuilds.
209 # can probably cut this after the next stage release.
210 chmod u+x "${ROOT}"/etc/skel/.ssh >& /dev/null
211
212 ewarn "Remember to merge your config files in /etc/ssh/ and then"
213 ewarn "restart sshd: '/etc/init.d/sshd restart'."
214 if use pam ; then
215 echo
216 ewarn "Please be aware users need a valid shell in /etc/passwd"
217 ewarn "in order to be allowed to login."
218 fi
219 }