/[gentoo-x86]/net-misc/openssh/openssh-3.9_p1-r3.ebuild
Gentoo

Contents of /net-misc/openssh/openssh-3.9_p1-r3.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, 2 months ago) by vapier
Branch: MAIN
CVS Tags: HEAD
Changes since 1.13: +1 -1 lines
FILE REMOVED
old

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

  ViewVC Help
Powered by ViewVC 1.1.20