/[gentoo-x86]/net-misc/openssh/openssh-3.5_p1-r1.ebuild
Gentoo

Contents of /net-misc/openssh/openssh-3.5_p1-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Mon Jan 20 15:06:00 2003 UTC (17 years ago) by raker
Branch: MAIN
Added kerberos v5 support

1 # Copyright 1999-2002 Gentoo Technologies, Inc.
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /space/gentoo/cvsroot/gentoo-x86/net-misc/openssh/openssh-3.5_p1.ebuild,v 1.12 2003/01/19 20:09:14 tuxus Exp $
4
5 IUSE="ipv6 static pam tcpd kerberos"
6
7 # Make it more portable between straight releases
8 # and _p? releases.
9 PARCH=${P/_/}
10 S=${WORKDIR}/${PARCH}
11 DESCRIPTION="Port of OpenBSD's free SSH release"
12 HOMEPAGE="http://www.openssh.com/"
13 SRC_URI="ftp://ftp.openbsd.org/pub/unix/OpenBSD/OpenSSH/portable/${PARCH}.tar.gz"
14
15 # openssh recognizes when openssl has been slightly upgraded and refuses to run.
16 # This new rev will use the new openssl.
17 RDEPEND="virtual/glibc
18 pam? ( >=sys-libs/pam-0.73 >=sys-apps/shadow-4.0.2-r2 )
19 kerberos? ( virtual/krb5 )
20 >=dev-libs/openssl-0.9.6d
21 sys-libs/zlib"
22
23 DEPEND="${RDEPEND}
24 sys-devel/perl
25 sys-apps/groff
26 tcpd? ( >=sys-apps/tcp-wrappers-7.6 )"
27
28
29 SLOT="0"
30 LICENSE="as-is"
31 KEYWORDS="~x86 ~ppc ~sparc ~alpha ~mips"
32
33 src_unpack() {
34 unpack ${A}
35 cd ${S}
36 if [ `use alpha` ]; then
37 patch < ${FILESDIR}/${P}-gentoo-sshd-gcc3.patch || die
38 fi
39 }
40
41 src_compile() {
42 local myconf
43 use tcpd || myconf="${myconf} --without-tcp-wrappers"
44 use tcpd && myconf="${myconf} --with-tcp-wrappers"
45 use pam || myconf="${myconf} --without-pam"
46 use pam && myconf="${myconf} --with-pam"
47 use ipv6 || myconf="${myconf} --with-ipv4-default"
48 use kerberos && myconf="${myconf} --with-kerberos5"
49
50 ./configure \
51 --prefix=/usr \
52 --sysconfdir=/etc/ssh \
53 --mandir=/usr/share/man \
54 --libexecdir=/usr/lib/misc \
55 --datadir=/usr/share/openssh \
56 --disable-suid-ssh \
57 --with-privsep-path=/var/empty \
58 --with-privsep-user=sshd \
59 --with-md5-passwords \
60 --host=${CHOST} ${myconf} || die "bad configure"
61
62 if [ "`use static`" ]
63 then
64 # statically link to libcrypto -- good for the boot cd
65 perl -pi -e "s|-lcrypto|/usr/lib/libcrypto.a|g" Makefile
66 fi
67
68 make || die " compile problem"
69 }
70
71 src_install() {
72 make install-files DESTDIR=${D} || die
73 chmod 600 ${D}/etc/ssh/sshd_config
74 dodoc ChangeLog CREDITS OVERVIEW README* TODO sshd_config
75 insinto /etc/pam.d ; newins ${FILESDIR}/sshd.pam sshd
76 exeinto /etc/init.d ; newexe ${FILESDIR}/sshd.rc6 sshd
77 touch ${D}/var/empty/.keep
78 }
79
80 pkg_preinst() {
81
82 userdel sshd 2> /dev/null
83 if ! groupmod sshd; then
84 groupadd -g 90 sshd 2> /dev/null || \
85 die "Failed to create sshd group"
86 fi
87 useradd -u 22 -g sshd -s /dev/null -d /var/empty -c "sshd" sshd || \
88 die "Failed to create sshd user"
89
90 }
91
92 pkg_postinst() {
93
94 # empty dir for the new priv separation auth chroot..
95 install -d -m0755 -o root -g root ${ROOT}/var/empty
96
97 einfo
98 einfo "Remember to merge your config files in /etc/ssh!"
99 einfo "As of version 3.4 the default is to enable the UsePrivelegeSeparation"
100 einfo "functionality, but please ensure that you do not explicitly disable"
101 einfo "this in your configuration as disabling it opens security holes"
102 einfo
103 einfo "This revision has removed your sshd user id and replaced it with a"
104 einfo "new one with UID 22. If you have any scripts or programs that"
105 einfo "that referenced the old UID directly, you will need to update them."
106 einfo
107 if use pam >/dev/null 2>&1; then
108 einfo "Please be aware users need a valid shell in /etc/passwd"
109 einfo "in order to be allowed to login."
110 einfo
111 fi
112 }

  ViewVC Help
Powered by ViewVC 1.1.20