Gentoo Archives: gentoo-commits

From: "Robin H. Johnson (robbat2)" <robbat2@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-misc/openssh: ChangeLog openssh-5.2_p1-r1.ebuild
Date: Tue, 24 Feb 2009 21:56:11
Message-Id: E1Lc5G5-00030S-4a@stork.gentoo.org
1 robbat2 09/02/24 21:56:09
2
3 Modified: ChangeLog
4 Added: openssh-5.2_p1-r1.ebuild
5 Log:
6 LPK patch updated for new OpenSSH release.
7 (Portage version: 2.2_rc23/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.339 net-misc/openssh/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/openssh/ChangeLog?rev=1.339&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/openssh/ChangeLog?rev=1.339&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/openssh/ChangeLog?r1=1.338&r2=1.339
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/net-misc/openssh/ChangeLog,v
19 retrieving revision 1.338
20 retrieving revision 1.339
21 diff -p -w -b -B -u -u -r1.338 -r1.339
22 --- ChangeLog 24 Feb 2009 19:11:25 -0000 1.338
23 +++ ChangeLog 24 Feb 2009 21:56:09 -0000 1.339
24 @@ -1,6 +1,12 @@
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.338 2009/02/24 19:11:25 vapier Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/ChangeLog,v 1.339 2009/02/24 21:56:09 robbat2 Exp $
29 +
30 +*openssh-5.2_p1-r1 (24 Feb 2009)
31 +
32 + 24 Feb 2009; Robin H. Johnson <robbat2@g.o>
33 + +openssh-5.2_p1-r1.ebuild:
34 + LPK patch updated for new OpenSSH release.
35
36 24 Feb 2009; Mike Frysinger <vapier@g.o> openssh-5.2_p1.ebuild:
37 Fix X509 patching #260163 by Daniel J.
38
39
40
41 1.1 net-misc/openssh/openssh-5.2_p1-r1.ebuild
42
43 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/openssh/openssh-5.2_p1-r1.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/openssh/openssh-5.2_p1-r1.ebuild?rev=1.1&content-type=text/plain
45
46 Index: openssh-5.2_p1-r1.ebuild
47 ===================================================================
48 # Copyright 1999-2009 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/openssh-5.2_p1-r1.ebuild,v 1.1 2009/02/24 21:56:09 robbat2 Exp $
51
52 inherit eutils flag-o-matic multilib autotools pam
53
54 # Make it more portable between straight releases
55 # and _p? releases.
56 PARCH=${P/_/}
57
58 #HPN_PATCH="${PARCH/2/1}-hpn13v5.diff.gz"
59 LDAP_PATCH="${PARCH/openssh/openssh-lpk}-0.3.11.patch.gz"
60 #PKCS11_PATCH="${PARCH/2p1/1}pkcs11-0.26.tar.bz2"
61 X509_VER="6.2" X509_PATCH="${PARCH}+x509-${X509_VER}.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 ${HPN_PATCH:+hpn? ( http://www.psc.edu/networking/projects/hpn-ssh/${HPN_PATCH} )}
68 ${LDAP_PATCH:+ldap? ( mirror://gentoo/${LDAP_PATCH} )}
69 ${PKCS11_PATCH:+pkcs11? ( http://alon.barlev.googlepages.com/${PKCS11_PATCH} )}
70 ${X509_PATCH:+X509? ( http://roumenpetrov.info/openssh/x509-${X509_VER}/${X509_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="hpn kerberos ldap libedit pam pkcs11 selinux skey smartcard static tcpd X X509"
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 pkcs11? ( dev-libs/pkcs11-helper )
87 tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
88 X? ( x11-apps/xauth )
89 userland_GNU? ( sys-apps/shadow )"
90 DEPEND="${RDEPEND}
91 dev-util/pkgconfig
92 virtual/os-headers
93 sys-devel/autoconf"
94 RDEPEND="${RDEPEND}
95 pam? ( >=sys-auth/pambase-20081028 )"
96 PROVIDE="virtual/ssh"
97
98 S=${WORKDIR}/${PARCH}
99
100 pkg_setup() {
101 # this sucks, but i'd rather have people unable to `emerge -u openssh`
102 # than not be able to log in to their server any more
103 maybe_fail() { [[ -z ${!2} ]] && use ${1} && echo ${1} ; }
104 local fail="
105 $(maybe_fail ldap LDAP_PATCH)
106 $(maybe_fail pkcs11 PKCS11_PATCH)
107 $(maybe_fail X509 X509_PATCH)
108 "
109 fail=$(echo ${fail})
110 if [[ -n ${fail} ]] ; then
111 eerror "Sorry, but this version does not yet support features"
112 eerror "that you requested: ${fail}"
113 eerror "Please mask ${PF} for now and check back later:"
114 eerror " # echo '=${CATEGORY}/${PF}' >> /etc/portage/package.mask"
115 die "booooo"
116 fi
117 }
118
119 src_unpack() {
120 unpack ${PARCH}.tar.gz
121 cd "${S}"
122
123 sed -i \
124 -e '/_PATH_XAUTH/s:/usr/X11R6/bin/xauth:/usr/bin/xauth:' \
125 pathnames.h || die
126
127 if use pkcs11 ; then
128 cd "${WORKDIR}"
129 unpack "${PKCS11_PATCH}"
130 cd "${S}"
131 EPATCH_OPTS="-p1" epatch "${WORKDIR}"/*pkcs11*/{1,2,4}*
132 use X509 && EPATCH_OPTS="-R" epatch "${WORKDIR}"/*pkcs11*/1000_all_log.patch
133 fi
134 use X509 && epatch "${DISTDIR}"/${X509_PATCH}
135 use smartcard && epatch "${FILESDIR}"/openssh-3.9_p1-opensc.patch
136 if ! use X509 ; then
137 if [[ -n ${LDAP_PATCH} ]] && use ldap ; then
138 # The patch for bug 210110 64-bit stuff is now included.
139 epatch "${DISTDIR}"/${LDAP_PATCH}
140 # Not needed anymore of 0.3.11. Merged into the main patch.
141 #epatch "${FILESDIR}"/${PN}-5.1_p1-ldap-hpn-glue.patch
142 fi
143 #epatch "${DISTDIR}"/openssh-5.0p1-gsskex-20080404.patch #115553 #216932
144 else
145 use ldap && ewarn "Sorry, X509 and ldap don't get along, disabling ldap"
146 fi
147 epatch "${FILESDIR}"/${PN}-4.7_p1-GSSAPI-dns.patch #165444 integrated into gsskex
148 [[ -n ${HPN_PATCH} ]] && use hpn && epatch "${DISTDIR}"/${HPN_PATCH}
149 epatch "${FILESDIR}"/${PN}-4.7p1-selinux.diff #191665
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 eautoreconf
157 }
158
159 src_compile() {
160 addwrite /dev/ptmx
161 addpredict /etc/skey/skeykeys #skey configure code triggers this
162
163 local myconf=""
164 if use static ; then
165 append-ldflags -static
166 use pam && ewarn "Disabling pam support becuse of static flag"
167 myconf="${myconf} --without-pam"
168 else
169 myconf="${myconf} $(use_with pam)"
170 fi
171
172 econf \
173 --with-ldflags="${LDFLAGS}" \
174 --disable-strip \
175 --sysconfdir=/etc/ssh \
176 --libexecdir=/usr/$(get_libdir)/misc \
177 --datadir=/usr/share/openssh \
178 --with-privsep-path=/var/empty \
179 --with-privsep-user=sshd \
180 --with-md5-passwords \
181 --with-ssl-engine \
182 $(use_with kerberos kerberos5 /usr) \
183 ${LDAP_PATCH:+$(use ldap && use_with ldap)} \
184 $(use_with libedit) \
185 ${PKCS11_PATCH:+$(use pkcs11 && use_with pkcs11)} \
186 $(use_with selinux) \
187 $(use_with skey) \
188 $(use_with smartcard opensc) \
189 $(use_with tcpd tcp-wrappers) \
190 ${myconf} \
191 || die "bad configure"
192 emake || die "compile problem"
193 }
194
195 src_install() {
196 emake install-nokeys DESTDIR="${D}" || die
197 fperms 600 /etc/ssh/sshd_config
198 dobin contrib/ssh-copy-id
199 newinitd "${FILESDIR}"/sshd.rc6 sshd
200 newconfd "${FILESDIR}"/sshd.confd sshd
201 keepdir /var/empty
202
203 newpamd "${FILESDIR}"/sshd.pam_include.2 sshd
204 if use pam ; then
205 sed -i \
206 -e "/^#UsePAM /s:.*:UsePAM yes:" \
207 -e "/^#PasswordAuthentication /s:.*:PasswordAuthentication no:" \
208 -e "/^#PrintMotd /s:.*:PrintMotd no:" \
209 -e "/^#PrintLastLog /s:.*:PrintLastLog no:" \
210 "${D}"/etc/ssh/sshd_config || die "sed of configuration file failed"
211 fi
212
213 doman contrib/ssh-copy-id.1
214 dodoc ChangeLog CREDITS OVERVIEW README* TODO sshd_config
215
216 diropts -m 0700
217 dodir /etc/skel/.ssh
218 }
219
220 pkg_postinst() {
221 enewgroup sshd 22
222 enewuser sshd 22 -1 /var/empty sshd
223
224 # help fix broken perms caused by older ebuilds.
225 # can probably cut this after the next stage release.
226 chmod u+x "${ROOT}"/etc/skel/.ssh >& /dev/null
227
228 ewarn "Remember to merge your config files in /etc/ssh/ and then"
229 ewarn "restart sshd: '/etc/init.d/sshd restart'."
230 if use pam ; then
231 echo
232 ewarn "Please be aware users need a valid shell in /etc/passwd"
233 ewarn "in order to be allowed to login."
234 fi
235 if use pkcs11 ; then
236 echo
237 einfo "For PKCS#11 you should also emerge one of the askpass softwares"
238 einfo "Example: net-misc/x11-ssh-askpass"
239 fi
240 }