/[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.2 - (hide annotations) (download)
Tue Jan 21 07:57:18 2003 UTC (17 years ago) by raker
Branch: MAIN
Changes since 1.1: +11 -2 lines
Fixed kerberos stuff.

1 raker 1.1 # Copyright 1999-2002 Gentoo Technologies, Inc.
2     # Distributed under the terms of the GNU General Public License v2
3 raker 1.2 # $Header: /space/gentoo/cvsroot/gentoo-x86/net-misc/openssh/openssh-3.5_p1-r1.ebuild,v 1.1 2003/01/20 15:06:00 raker Exp $
4 raker 1.1
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 raker 1.2 kerberos? ( app-crypt/krb5 )
20 raker 1.1 >=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 raker 1.2
49     # app-crypt/krb5
50 raker 1.1 use kerberos && myconf="${myconf} --with-kerberos5"
51    
52 raker 1.2 # app-crypt/kth-krb
53     # KTH's implementation of kerberos IV
54     # KTH_KRB="yes" emerge openssh-3.5_p1-r1.ebuild
55     if [ ! -z $KTH_KRB ]; then
56     myconf="${myconf} --with-kerberos4=/usr/athena"
57     fi
58    
59 raker 1.1 ./configure \
60     --prefix=/usr \
61     --sysconfdir=/etc/ssh \
62     --mandir=/usr/share/man \
63     --libexecdir=/usr/lib/misc \
64     --datadir=/usr/share/openssh \
65     --disable-suid-ssh \
66     --with-privsep-path=/var/empty \
67     --with-privsep-user=sshd \
68     --with-md5-passwords \
69     --host=${CHOST} ${myconf} || die "bad configure"
70    
71     if [ "`use static`" ]
72     then
73     # statically link to libcrypto -- good for the boot cd
74     perl -pi -e "s|-lcrypto|/usr/lib/libcrypto.a|g" Makefile
75     fi
76    
77     make || die " compile problem"
78     }
79    
80     src_install() {
81     make install-files DESTDIR=${D} || die
82     chmod 600 ${D}/etc/ssh/sshd_config
83     dodoc ChangeLog CREDITS OVERVIEW README* TODO sshd_config
84     insinto /etc/pam.d ; newins ${FILESDIR}/sshd.pam sshd
85     exeinto /etc/init.d ; newexe ${FILESDIR}/sshd.rc6 sshd
86     touch ${D}/var/empty/.keep
87     }
88    
89     pkg_preinst() {
90    
91     userdel sshd 2> /dev/null
92     if ! groupmod sshd; then
93     groupadd -g 90 sshd 2> /dev/null || \
94     die "Failed to create sshd group"
95     fi
96     useradd -u 22 -g sshd -s /dev/null -d /var/empty -c "sshd" sshd || \
97     die "Failed to create sshd user"
98    
99     }
100    
101     pkg_postinst() {
102    
103     # empty dir for the new priv separation auth chroot..
104     install -d -m0755 -o root -g root ${ROOT}/var/empty
105    
106     einfo
107     einfo "Remember to merge your config files in /etc/ssh!"
108     einfo "As of version 3.4 the default is to enable the UsePrivelegeSeparation"
109     einfo "functionality, but please ensure that you do not explicitly disable"
110     einfo "this in your configuration as disabling it opens security holes"
111     einfo
112     einfo "This revision has removed your sshd user id and replaced it with a"
113     einfo "new one with UID 22. If you have any scripts or programs that"
114     einfo "that referenced the old UID directly, you will need to update them."
115     einfo
116     if use pam >/dev/null 2>&1; then
117     einfo "Please be aware users need a valid shell in /etc/passwd"
118     einfo "in order to be allowed to login."
119     einfo
120     fi
121     }

  ViewVC Help
Powered by ViewVC 1.1.20