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

Contents of /net-misc/openssh/openssh-3.8.1_p1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.15 - (show annotations) (download)
Wed Dec 29 01:19:00 2004 UTC (14 years, 9 months ago) by vapier
Branch: MAIN
CVS Tags: HEAD
Changes since 1.14: +1 -1 lines
FILE REMOVED
remove older ebuilds

1 # Copyright 1999-2004 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.8.1_p1.ebuild,v 1.14 2004/11/04 02:49:52 vapier Exp $
4
5 inherit eutils flag-o-matic ccc gnuconfig
6
7 # Make it more portable between straight releases
8 # and _p? releases.
9 PARCH=${P/_/}
10
11 X509_PATCH="${PARCH}+x509h.diff.gz"
12 SELINUX_PATCH="openssh-3.7.1_p1-selinux.diff"
13
14 S=${WORKDIR}/${PARCH}
15 DESCRIPTION="Port of OpenBSD's free SSH release"
16 HOMEPAGE="http://www.openssh.com/"
17 SRC_URI="mirror://openbsd/OpenSSH/portable/${PARCH}.tar.gz
18 X509? ( http://roumenpetrov.info/openssh/x509h/${X509_PATCH} )"
19
20 LICENSE="as-is"
21 SLOT="0"
22 KEYWORDS="~x86 ppc ~sparc ~mips alpha arm hppa ~amd64 ~ia64 ~ppc64 s390"
23 IUSE="ipv6 static pam tcpd kerberos skey selinux chroot X509 ldap"
24
25 # openssh recognizes when openssl has been slightly upgraded and refuses to run.
26 # This new rev will use the new openssl.
27 RDEPEND="virtual/libc
28 pam? ( >=sys-libs/pam-0.73
29 >=sys-apps/shadow-4.0.2-r2 )
30 !mips? ( kerberos? ( virtual/krb5 ) )
31 selinux? ( sys-libs/libselinux )
32 !ppc64? ( skey? ( >=app-admin/skey-1.1.5-r1 ) )
33 >=dev-libs/openssl-0.9.6d
34 >=sys-libs/zlib-1.1.4
35 !ppc64? ( tcpd? ( >=sys-apps/tcp-wrappers-7.6 ) )"
36 DEPEND="${RDEPEND}
37 virtual/os-headers
38 dev-lang/perl
39 sys-apps/groff
40 >=sys-apps/sed-4
41 sys-devel/autoconf"
42 PROVIDE="virtual/ssh"
43
44 src_unpack() {
45 unpack ${PARCH}.tar.gz ; cd ${S}
46
47 epatch ${FILESDIR}/${P}-resolv_functions.patch.bz2
48
49 use selinux && epatch ${FILESDIR}/${SELINUX_PATCH}.bz2
50 use alpha && epatch ${FILESDIR}/${PN}-3.5_p1-gentoo-sshd-gcc3.patch.bz2
51 use skey && epatch ${FILESDIR}/${P}-skey.patch.bz2
52 use chroot && epatch ${FILESDIR}/${P}-chroot.patch.bz2
53 use X509 && epatch ${DISTDIR}/${X509_PATCH}
54 }
55
56 src_compile() {
57 gnuconfig_update
58
59 # make sure .sbss is large enough
60 use skey && use alpha && append-ldflags -mlarge-data
61 use ldap && filter-flags -funroll-loops
62 use selinux && append-flags "-DWITH_SELINUX"
63 use static && append-ldflags -static
64 export LDFLAGS
65
66 autoconf
67
68 local myconf="\
69 $( use_with tcpd tcp-wrappers ) \
70 $( use_with pam ) \
71 $( use_with skey )"
72
73 use ipv6 || myconf="${myconf} --with-ipv4-default"
74 use kerberos && myconf="${myconf} --with-kerberos5=/usr" || \
75 myconf="${myconf} --without-kerberos5"
76
77 echo ${myconf}
78
79 ./configure \
80 --prefix=/usr \
81 --sysconfdir=/etc/ssh \
82 --mandir=/usr/share/man \
83 --libexecdir=/usr/lib/misc \
84 --datadir=/usr/share/openssh \
85 --disable-suid-ssh \
86 --with-privsep-path=/var/empty \
87 --with-privsep-user=sshd \
88 --with-md5-passwords \
89 --host=${CHOST} \
90 ${myconf} \
91 || die "bad configure"
92
93 # use static && {
94 # # statically link to libcrypto -- good for the boot cd
95 # sed -i "s:-lcrypto:/usr/lib/libcrypto.a:g" Makefile
96 # }
97
98 emake || die "compile problem"
99 }
100
101 src_install() {
102 make install-files DESTDIR=${D} || die
103 chmod 600 ${D}/etc/ssh/sshd_config
104 dodoc ChangeLog CREDITS OVERVIEW README* TODO sshd_config
105 insinto /etc/pam.d ; newins ${FILESDIR}/sshd.pam sshd
106 exeinto /etc/init.d ; newexe ${FILESDIR}/sshd.rc6 sshd
107 keepdir /var/empty
108 dosed "/^#Protocol /s:.*:Protocol 2:" /etc/ssh/sshd_config
109 use pam && dosed "/^#UsePAM /s:.*:UsePAM yes:" /etc/ssh/sshd_config
110 }
111
112 pkg_postinst() {
113 enewgroup sshd 22
114 enewuser sshd 22 /bin/false /var/empty sshd
115
116 ewarn "Remember to merge your config files in /etc/ssh/ and then"
117 ewarn "restart sshd: '/etc/init.d/sshd restart'."
118 ewarn
119 einfo "As of version 3.4 the default is to enable the UsePrivelegeSeparation"
120 einfo "functionality, but please ensure that you do not explicitly disable"
121 einfo "this in your configuration as disabling it opens security holes"
122 einfo
123 einfo "This revision has removed your sshd user id and replaced it with a"
124 einfo "new one with UID 22. If you have any scripts or programs that"
125 einfo "that referenced the old UID directly, you will need to update them."
126 einfo
127 use pam >/dev/null 2>&1 && {
128 einfo "Please be aware users need a valid shell in /etc/passwd"
129 einfo "in order to be allowed to login."
130 einfo
131 }
132 }

  ViewVC Help
Powered by ViewVC 1.1.20