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

Contents of /net-misc/openssh/openssh-3.4_p1-r3.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.14 - (show annotations) (download)
Thu May 15 22:10:48 2003 UTC (16 years, 5 months ago) by mholzer
Branch: MAIN
CVS Tags: HEAD
Changes since 1.13: +1 -1 lines
FILE REMOVED
cleanup

1 # Copyright 1999-2003 Gentoo Technologies, Inc.
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /home/cvsroot/gentoo-x86/net-misc/openssh/openssh-3.4_p1-r3.ebuild,v 1.13 2003/03/11 21:11:46 seemant Exp $
4
5 IUSE="ipv6 static pam tcpd"
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 >=dev-libs/openssl-0.9.6d
20 sys-libs/zlib"
21
22 DEPEND="${RDEPEND}
23 dev-lang/perl
24 sys-apps/groff
25 tcpd? ( >=sys-apps/tcp-wrappers-7.6 )"
26
27
28 SLOT="0"
29 LICENSE="as-is"
30 KEYWORDS="x86 ppc sparc alpha"
31
32 src_compile() {
33 local myconf
34 use tcpd || myconf="${myconf} --without-tcp-wrappers"
35 use tcpd && myconf="${myconf} --with-tcp-wrappers"
36 use pam || myconf="${myconf} --without-pam"
37 use pam && myconf="${myconf} --with-pam"
38 use ipv6 || myconf="${myconf} --with-ipv4-default"
39
40 ./configure \
41 --prefix=/usr \
42 --sysconfdir=/etc/ssh \
43 --mandir=/usr/share/man \
44 --libexecdir=/usr/lib/misc \
45 --datadir=/usr/share/openssh \
46 --disable-suid-ssh \
47 --with-privsep-path=/var/empty \
48 --with-privsep-user=sshd \
49 --with-md5-passwords \
50 --host=${CHOST} ${myconf} || die "bad configure"
51
52 if [ "`use static`" ]
53 then
54 # statically link to libcrypto -- good for the boot cd
55 perl -pi -e "s|-lcrypto|/usr/lib/libcrypto.a|g" Makefile
56 fi
57
58 make || die " compile problem"
59 }
60
61 src_install() {
62 make install-files DESTDIR=${D} || die
63 chmod 600 ${D}/etc/ssh/sshd_config
64 dodoc ChangeLog CREDITS OVERVIEW README* TODO sshd_config
65 insinto /etc/pam.d ; newins ${FILESDIR}/sshd.pam sshd
66 exeinto /etc/init.d ; newexe ${FILESDIR}/sshd.rc6 sshd
67 touch ${D}/var/empty/.keep
68 }
69
70 pkg_preinst() {
71
72 userdel sshd 2> /dev/null
73 if ! groupmod sshd; then
74 groupadd -g 90 sshd 2> /dev/null || \
75 die "Failed to create sshd group"
76 fi
77 useradd -u 22 -g sshd -s /dev/null -d /var/empty -c "sshd" sshd || \
78 die "Failed to create sshd user"
79
80 }
81
82 pkg_postinst() {
83
84 # empty dir for the new priv separation auth chroot..
85 install -d -m0755 -o root -g root ${ROOT}/var/empty
86
87 einfo
88 einfo "Remember to merge your config files in /etc/ssh!"
89 einfo "As of version 3.4 the default is to enable the UsePrivelegeSeparation"
90 einfo "functionality, but please ensure that you do not explicitly disable"
91 einfo "this in your configuration as disabling it opens security holes"
92 einfo
93 einfo "This revision has removed your sshd user id and replaced it with a"
94 einfo "new one with UID 22. If you have any scripts or programs that"
95 einfo "that referenced the old UID directly, you will need to update them."
96 einfo
97 if use pam; then
98 einfo "Please be aware users need a valid shell in /etc/passwd"
99 einfo "in order to be allowed to login."
100 einfo
101 fi
102 }

  ViewVC Help
Powered by ViewVC 1.1.20