/[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.11 - (hide annotations) (download)
Sun Mar 30 22:15:22 2003 UTC (16 years, 10 months ago) by method
Branch: MAIN
Changes since 1.10: +10 -1 lines
selinux compile opts

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

  ViewVC Help
Powered by ViewVC 1.1.20