/[gentoo-x86]/net-misc/openssh/openssh-4.3_p2-r5.ebuild
Gentoo

Contents of /net-misc/openssh/openssh-4.3_p2-r5.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.14 - (show annotations) (download)
Sat Aug 25 17:41:37 2007 UTC (12 years, 1 month ago) by vapier
Branch: MAIN
CVS Tags: HEAD
Changes since 1.13: +1 -1 lines
FILE REMOVED
old

1 # Copyright 1999-2007 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/openssh-4.3_p2-r5.ebuild,v 1.13 2007/08/06 02:29:41 vapier Exp $
4
5 WANT_AUTOCONF="latest"
6 WANT_AUTOMAKE="latest"
7 inherit eutils flag-o-matic ccc pam multilib autotools
8
9 # Make it more portable between straight releases
10 # and _p? releases.
11 PARCH=${P/_/}
12
13 X509_PATCH="${PARCH}+x509-5.5.diff.gz"
14 SECURID_PATCH="${PARCH}+SecurID_v1.3.2.patch"
15 LDAP_PATCH="${PARCH/-4.3p2/-lpk-4.3p1}-0.3.7.patch"
16 HPN_PATCH="${PARCH}-hpn12-gentoo.patch.bz2"
17
18 DESCRIPTION="Port of OpenBSD's free SSH release"
19 HOMEPAGE="http://www.openssh.com/"
20 SRC_URI="mirror://openbsd/OpenSSH/portable/${PARCH}.tar.gz
21 hpn? ( mirror://gentoo/${HPN_PATCH} http://www.psc.edu/networking/projects/hpn-ssh/${HPN_PATCH} )
22 X509? ( http://roumenpetrov.info/openssh/x509-5.5/${X509_PATCH} )
23 smartcard? ( http://www.omniti.com/~jesus/projects/${SECURID_PATCH} )
24 ldap? ( http://www.opendarwin.org/projects/openssh-lpk/files/${LDAP_PATCH} )"
25
26 LICENSE="as-is"
27 SLOT="0"
28 KEYWORDS="alpha amd64 arm hppa ia64 m68k mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd"
29 IUSE="ipv6 static pam tcpd kerberos skey selinux chroot X509 ldap smartcard sftplogging hpn libedit X"
30
31 RDEPEND="pam? ( virtual/pam )
32 kerberos? ( virtual/krb5 )
33 selinux? ( >=sys-libs/libselinux-1.28 )
34 skey? ( >=app-admin/skey-1.1.5-r1 )
35 ldap? ( net-nds/openldap )
36 libedit? ( dev-libs/libedit )
37 >=dev-libs/openssl-0.9.6d
38 >=sys-libs/zlib-1.2.3
39 smartcard? ( dev-libs/opensc )
40 tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
41 X? ( x11-apps/xauth )
42 userland_GNU? ( sys-apps/shadow )"
43 DEPEND="${RDEPEND}
44 dev-util/pkgconfig
45 virtual/os-headers
46 sys-devel/autoconf"
47
48 PROVIDE="virtual/ssh"
49
50 S=${WORKDIR}/${PARCH}
51
52 src_unpack() {
53 unpack ${PARCH}.tar.gz
54 cd "${S}"
55
56 sed -i \
57 -e '/_PATH_XAUTH/s:/usr/X11R6/bin/xauth:/usr/bin/xauth:' \
58 pathnames.h || die
59
60 epatch "${FILESDIR}"/openssh-4.3_p2-identical-simple-dos-2.patch #148228
61 epatch "${FILESDIR}"/openssh-4.3_p2-configure.patch #137921
62 epatch "${FILESDIR}"/openssh-4.3_p1-krb5-typos.patch #124494
63 epatch "${FILESDIR}"/openssh-4.3_p2-opensc-libs.patch #148538
64 use X509 && epatch "${DISTDIR}"/${X509_PATCH} "${FILESDIR}"/${P}-x509-hpn-glue.patch
65 use sftplogging && epatch "${FILESDIR}"/openssh-4.2_p1-sftplogging-1.4-gentoo.patch.bz2
66 use chroot && epatch "${FILESDIR}"/openssh-4.3_p1-chroot.patch
67 if use X509 ; then
68 cp "${FILESDIR}"/openssh-4.3_p2-selinux.patch .
69 epatch "${FILESDIR}"/openssh-4.3_p2-selinux.patch.glue ./openssh-4.3_p2-selinux.patch
70 else
71 epatch "${FILESDIR}"/openssh-4.3_p2-selinux.patch
72 fi
73 use smartcard && epatch "${FILESDIR}"/openssh-3.9_p1-opensc.patch
74 if ! use X509 ; then
75 if [[ -n ${SECURID_PATCH} ]] && use smartcard ; then
76 epatch \
77 "${DISTDIR}"/${SECURID_PATCH} \
78 "${FILESDIR}"/${P}-securid-updates.patch \
79 "${FILESDIR}"/${P}-securid-hpn-glue.patch
80 use ldap && epatch "${FILESDIR}"/openssh-4.0_p1-smartcard-ldap-happy.patch
81 fi
82 if use ldap ; then
83 use sftplogging \
84 && ewarn "Sorry, sftplogging and ldap don't get along, disabling ldap" \
85 || epatch "${DISTDIR}"/${LDAP_PATCH} "${FILESDIR}"/${P}-ldap-updates.patch
86 fi
87 elif [[ -n ${SECURID_PATCH} ]] && use smartcard || use ldap ; then
88 ewarn "Sorry, x509 and smartcard/ldap don't get along, disabling smartcard/ldap"
89 fi
90 [[ -n ${HPN_PATCH} ]] && use hpn && epatch "${DISTDIR}"/${HPN_PATCH}
91
92 sed -i "s:-lcrypto:$(pkg-config --libs openssl):" configure{,.ac} || die
93
94 eautoreconf
95 }
96
97 src_compile() {
98 addwrite /dev/ptmx
99 addpredict /etc/skey/skeykeys #skey configure code triggers this
100
101 local myconf=""
102 if use static ; then
103 append-ldflags -static
104 use pam && ewarn "Disabling pam support becuse of static flag"
105 myconf="${myconf} --without-pam"
106 else
107 myconf="${myconf} $(use_with pam)"
108 fi
109
110 use ipv6 || myconf="${myconf} --with-ipv4-default"
111
112 econf \
113 --with-ldflags="${LDFLAGS}" \
114 --disable-strip \
115 --sysconfdir=/etc/ssh \
116 --libexecdir=/usr/$(get_libdir)/misc \
117 --datadir=/usr/share/openssh \
118 --disable-suid-ssh \
119 --with-privsep-path=/var/empty \
120 --with-privsep-user=sshd \
121 --with-md5-passwords \
122 $(use_with ldap) \
123 $(use_with libedit) \
124 $(use_with kerberos kerberos5 /usr) \
125 $(use_with tcpd tcp-wrappers) \
126 $(use_with selinux) \
127 $(use_with skey) \
128 $(use_with smartcard opensc) \
129 ${myconf} \
130 || die "bad configure"
131 emake || die "compile problem"
132 }
133
134 src_install() {
135 make install-nokeys DESTDIR="${D}" || die
136 fperms 600 /etc/ssh/sshd_config
137 dobin contrib/ssh-copy-id
138 newinitd "${FILESDIR}"/sshd.rc6 sshd
139 newconfd "${FILESDIR}"/sshd.confd sshd
140 keepdir /var/empty
141
142 newpamd "${FILESDIR}"/sshd.pam_include sshd
143 dosed "/^#Protocol /s:.*:Protocol 2:" /etc/ssh/sshd_config
144 use pam \
145 && dosed "/^#UsePAM /s:.*:UsePAM yes:" /etc/ssh/sshd_config \
146 && dosed "/^#PasswordAuthentication /s:.*:PasswordAuthentication no:" /etc/ssh/sshd_config
147
148 doman contrib/ssh-copy-id.1
149 dodoc ChangeLog CREDITS OVERVIEW README* TODO sshd_config
150 }
151
152 pkg_postinst() {
153 enewgroup sshd 22
154 enewuser sshd 22 -1 /var/empty sshd
155
156 ewarn "Remember to merge your config files in /etc/ssh/ and then"
157 ewarn "restart sshd: '/etc/init.d/sshd restart'."
158 ewarn
159 einfo "As of version 3.4 the default is to enable the UsePrivelegeSeparation"
160 einfo "functionality, but please ensure that you do not explicitly disable"
161 einfo "this in your configuration as disabling it opens security holes"
162 einfo
163 einfo "This revision has removed your sshd user id and replaced it with a"
164 einfo "new one with UID 22. If you have any scripts or programs that"
165 einfo "that referenced the old UID directly, you will need to update them."
166 einfo
167 if use pam ; then
168 einfo "Please be aware users need a valid shell in /etc/passwd"
169 einfo "in order to be allowed to login."
170 einfo
171 fi
172 }

  ViewVC Help
Powered by ViewVC 1.1.20