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-4.7_p1-r6.ebuild
Date: Tue, 01 Apr 2008 18:44:03
Message-Id: E1JglSi-00060y-Fe@stork.gentoo.org
1 vapier 08/04/01 18:44:00
2
3 Modified: ChangeLog
4 Added: openssh-4.7_p1-r6.ebuild
5 Log:
6 Fix for ForceCommand bypass #215702.
7 (Portage version: 2.2_pre5)
8
9 Revision Changes Path
10 1.297 net-misc/openssh/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/openssh/ChangeLog?rev=1.297&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/openssh/ChangeLog?rev=1.297&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/openssh/ChangeLog?r1=1.296&r2=1.297
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/net-misc/openssh/ChangeLog,v
19 retrieving revision 1.296
20 retrieving revision 1.297
21 diff -u -r1.296 -r1.297
22 --- ChangeLog 1 Apr 2008 15:51:43 -0000 1.296
23 +++ ChangeLog 1 Apr 2008 18:43:59 -0000 1.297
24 @@ -1,6 +1,12 @@
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.296 2008/04/01 15:51:43 vapier Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/ChangeLog,v 1.297 2008/04/01 18:43:59 vapier Exp $
29 +
30 +*openssh-4.7_p1-r6 (01 Apr 2008)
31 +
32 + 01 Apr 2008; Mike Frysinger <vapier@g.o>
33 + +files/openssh-4.7_p1-ForceCommand.patch, +openssh-4.7_p1-r6.ebuild:
34 + Fix for ForceCommand bypass #215702.
35
36 *openssh-4.9_p1 (01 Apr 2008)
37
38
39
40
41 1.1 net-misc/openssh/openssh-4.7_p1-r6.ebuild
42
43 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/openssh/openssh-4.7_p1-r6.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/openssh/openssh-4.7_p1-r6.ebuild?rev=1.1&content-type=text/plain
45
46 Index: openssh-4.7_p1-r6.ebuild
47 ===================================================================
48 # Copyright 1999-2008 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/openssh-4.7_p1-r6.ebuild,v 1.1 2008/04/01 18:43:59 vapier Exp $
51
52 inherit eutils flag-o-matic ccc multilib autotools pam
53
54 # Make it more portable between straight releases
55 # and _p? releases.
56 PARCH=${P/_/}
57
58 X509_PATCH="${PARCH}+x509-6.1.diff.gz"
59 LDAP_PATCH="${PARCH/openssh-4.7/openssh-lpk-4.6}-0.3.9.patch"
60 HPN_PATCH="${PARCH}-hpn13v1.diff.gz"
61
62 DESCRIPTION="Port of OpenBSD's free SSH release"
63 HOMEPAGE="http://www.openssh.org/"
64 SRC_URI="mirror://openbsd/OpenSSH/portable/${PARCH}.tar.gz
65 http://www.sxw.org.uk/computing/patches/openssh-4.7p1-gsskex-20070927.patch
66 ldap? ( http://dev.inversepath.com/openssh-lpk/${LDAP_PATCH} )
67 X509? ( http://roumenpetrov.info/openssh/x509-6.1/${X509_PATCH} )
68 hpn? ( http://www.psc.edu/networking/projects/hpn-ssh/${HPN_PATCH} )"
69
70 LICENSE="as-is"
71 SLOT="0"
72 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
73 IUSE="static pam tcpd kerberos skey selinux chroot X509 ldap smartcard hpn libedit X"
74
75 RDEPEND="pam? ( virtual/pam )
76 kerberos? ( virtual/krb5 )
77 selinux? ( >=sys-libs/libselinux-1.28 )
78 skey? ( >=app-admin/skey-1.1.5-r1 )
79 ldap? ( net-nds/openldap )
80 libedit? ( dev-libs/libedit )
81 >=dev-libs/openssl-0.9.6d
82 >=sys-libs/zlib-1.2.3
83 smartcard? ( dev-libs/opensc )
84 tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
85 X? ( x11-apps/xauth )
86 userland_GNU? ( sys-apps/shadow )"
87 DEPEND="${RDEPEND}
88 dev-util/pkgconfig
89 virtual/os-headers
90 sys-devel/autoconf"
91 PROVIDE="virtual/ssh"
92
93 S=${WORKDIR}/${PARCH}
94
95 pkg_setup() {
96 # this sucks, but i'd rather have people unable to `emerge -u openssh`
97 # than not be able to log in to their server any more
98 maybe_fail() { [[ -z ${!2} ]] && use ${1} && echo ${1} ; }
99 local fail="
100 $(maybe_fail X509 X509_PATCH)
101 $(maybe_fail ldap LDAP_PATCH)
102 "
103 fail=$(echo ${fail})
104 if [[ -n ${fail} ]] ; then
105 eerror "Sorry, but this version does not yet support features"
106 eerror "that you requested: ${fail}"
107 eerror "Please mask ${PF} for now and check back later:"
108 eerror " # echo '=${CATEGORY}/${PF}' >> /etc/portage/package.mask"
109 die "booooo"
110 fi
111 }
112
113 src_unpack() {
114 unpack ${PARCH}.tar.gz
115 cd "${S}"
116
117 sed -i \
118 -e '/_PATH_XAUTH/s:/usr/X11R6/bin/xauth:/usr/bin/xauth:' \
119 pathnames.h || die
120
121 use X509 && epatch "${DISTDIR}"/${X509_PATCH} "${FILESDIR}"/${PN}-4.7_p1-x509-hpn-glue.patch
122 use chroot && epatch "${FILESDIR}"/openssh-4.3_p1-chroot.patch
123 use smartcard && epatch "${FILESDIR}"/openssh-3.9_p1-opensc.patch
124 if ! use X509 ; then
125 if [[ -n ${LDAP_PATCH} ]] && use ldap ; then
126 epatch "${DISTDIR}"/${LDAP_PATCH} "${FILESDIR}"/${PN}-4.4_p1-ldap-hpn-glue.patch
127 epatch "${FILESDIR}"/${P}-lpk-64bit.patch #210110
128 fi
129 epatch "${DISTDIR}"/openssh-4.7p1-gsskex-20070927.patch #115553
130 else
131 use ldap && ewarn "Sorry, X509 and ldap don't get along, disabling ldap"
132 epatch "${FILESDIR}"/${P}-GSSAPI-dns.patch #165444 integrated into gsskex
133 fi
134 [[ -n ${HPN_PATCH} ]] && use hpn && epatch "${DISTDIR}"/${HPN_PATCH}
135 epatch "${FILESDIR}"/${P}-CVE-2008-1483.patch #214985
136 epatch "${FILESDIR}"/${P}-packet-size.patch #212433
137 epatch "${FILESDIR}"/${P}-ForceCommand.patch #215702
138
139 sed -i "s:-lcrypto:$(pkg-config --libs openssl):" configure{,.ac} || die
140
141 # fix #191665
142 epatch "${FILESDIR}"/openssh-4.7p1-selinux.diff
143
144 eautoreconf
145 }
146
147 src_compile() {
148 addwrite /dev/ptmx
149 addpredict /etc/skey/skeykeys #skey configure code triggers this
150
151 local myconf=""
152 if use static ; then
153 append-ldflags -static
154 use pam && ewarn "Disabling pam support becuse of static flag"
155 myconf="${myconf} --without-pam"
156 else
157 myconf="${myconf} $(use_with pam)"
158 fi
159
160 econf \
161 --with-ldflags="${LDFLAGS}" \
162 --disable-strip \
163 --sysconfdir=/etc/ssh \
164 --libexecdir=/usr/$(get_libdir)/misc \
165 --datadir=/usr/share/openssh \
166 --disable-suid-ssh \
167 --with-privsep-path=/var/empty \
168 --with-privsep-user=sshd \
169 --with-md5-passwords \
170 --with-ssl-engine \
171 $(use_with ldap) \
172 $(use_with libedit) \
173 $(use_with kerberos kerberos5 /usr) \
174 $(use_with tcpd tcp-wrappers) \
175 $(use_with selinux) \
176 $(use_with skey) \
177 $(use_with smartcard opensc) \
178 ${myconf} \
179 || die "bad configure"
180 emake || die "compile problem"
181 }
182
183 src_install() {
184 emake install-nokeys DESTDIR="${D}" || die
185 fperms 600 /etc/ssh/sshd_config
186 dobin contrib/ssh-copy-id
187 newinitd "${FILESDIR}"/sshd.rc6 sshd
188 newconfd "${FILESDIR}"/sshd.confd sshd
189 keepdir /var/empty
190
191 newpamd "${FILESDIR}"/sshd.pam_include.1 sshd
192 use pam \
193 && dosed "/^#UsePAM /s:.*:UsePAM yes:" /etc/ssh/sshd_config \
194 && dosed "/^#PasswordAuthentication /s:.*:PasswordAuthentication no:" /etc/ssh/sshd_config
195
196 doman contrib/ssh-copy-id.1
197 dodoc ChangeLog CREDITS OVERVIEW README* TODO sshd_config
198
199 diropts -m 0700
200 dodir /etc/skel/.ssh
201 }
202
203 pkg_postinst() {
204 enewgroup sshd 22
205 enewuser sshd 22 -1 /var/empty sshd
206
207 # help fix broken perms caused by older ebuilds.
208 # can probably cut this after the next stage release.
209 chmod u+x "${ROOT}"/etc/skel/.ssh >& /dev/null
210
211 ewarn "Remember to merge your config files in /etc/ssh/ and then"
212 ewarn "restart sshd: '/etc/init.d/sshd restart'."
213 if use pam ; then
214 echo
215 ewarn "Please be aware users need a valid shell in /etc/passwd"
216 ewarn "in order to be allowed to login."
217 fi
218 }
219
220
221
222 --
223 gentoo-commits@l.g.o mailing list