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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.17 - (show annotations) (download)
Wed Dec 29 01:19:00 2004 UTC (14 years, 8 months ago) by vapier
Branch: MAIN
CVS Tags: HEAD
Changes since 1.16: +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_p1.ebuild,v 1.16 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}+x509g4.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/x509g4/${X509_PATCH} )"
19
20 LICENSE="as-is"
21 SLOT="0"
22 KEYWORDS="x86 ~ppc sparc ~alpha mips 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}-kerberos.patch.bz2
48 epatch ${FILESDIR}/${P}-resolv_functions.patch.bz2
49
50 use selinux && epatch ${FILESDIR}/${SELINUX_PATCH}.bz2
51 use alpha && epatch ${FILESDIR}/${PN}-3.5_p1-gentoo-sshd-gcc3.patch.bz2
52 use X509 && epatch ${DISTDIR}/${X509_PATCH}
53
54 use skey && {
55 # prevent the conftest from violating the sandbox
56 epatch ${FILESDIR}/${P}-skey.patch.bz2
57
58 # updates to skey implementation.
59 epatch ${FILESDIR}/${PN}-skeychallenge-args.diff.bz2
60 }
61
62 # feature request bug #26615
63 use chroot && epatch ${FILESDIR}/${P}-chroot.patch.bz2
64 }
65
66 src_compile() {
67 # make sure .sbss is large enough
68 use skey && use alpha && append-ldflags -mlarge-data
69 use ldap && filter-flags -funroll-loops
70 use selinux && append-flags "-DWITH_SELINUX"
71 use static && append-ldflags -static
72 export LDFLAGS
73
74 autoconf
75
76 # Allow OpenSSH to detect mips systems
77 gnuconfig_update
78
79 local myconf="\
80 $( use_with tcpd tcp-wrappers ) \
81 $( use_with kerberos kerberos5 ) \
82 $( use_with pam ) \
83 $( use_with skey )"
84
85 use ipv6 || myconf="${myconf} --with-ipv4-default"
86
87 ./configure \
88 --prefix=/usr \
89 --sysconfdir=/etc/ssh \
90 --mandir=/usr/share/man \
91 --libexecdir=/usr/lib/misc \
92 --datadir=/usr/share/openssh \
93 --disable-suid-ssh \
94 --with-privsep-path=/var/empty \
95 --with-privsep-user=sshd \
96 --with-md5-passwords \
97 --host=${CHOST} \
98 ${myconf} \
99 || die "bad configure"
100
101 # use static && {
102 # # statically link to libcrypto -- good for the boot cd
103 # sed -i "s:-lcrypto:/usr/lib/libcrypto.a:g" Makefile
104 # }
105
106 emake || die "compile problem"
107 }
108
109 src_install() {
110 make install-files DESTDIR=${D} || die
111 chmod 600 ${D}/etc/ssh/sshd_config
112 dodoc ChangeLog CREDITS OVERVIEW README* TODO sshd_config
113 insinto /etc/pam.d ; newins ${FILESDIR}/sshd.pam sshd
114 exeinto /etc/init.d ; newexe ${FILESDIR}/sshd.rc6 sshd
115 keepdir /var/empty
116 dosed "/^#Protocol /s:.*:Protocol 2:" /etc/ssh/sshd_config
117 use pam && dosed "/^#UsePAM /s:.*:UsePAM yes:" /etc/ssh/sshd_config
118 }
119
120 pkg_postinst() {
121 enewgroup sshd 22
122 enewuser sshd 22 /bin/false /var/empty sshd
123
124 ewarn "Remember to merge your config files in /etc/ssh/ and then"
125 ewarn "restart sshd: '/etc/init.d/sshd restart'."
126 ewarn
127 einfo "As of version 3.4 the default is to enable the UsePrivelegeSeparation"
128 einfo "functionality, but please ensure that you do not explicitly disable"
129 einfo "this in your configuration as disabling it opens security holes"
130 einfo
131 einfo "This revision has removed your sshd user id and replaced it with a"
132 einfo "new one with UID 22. If you have any scripts or programs that"
133 einfo "that referenced the old UID directly, you will need to update them."
134 einfo
135 use pam >/dev/null 2>&1 && {
136 einfo "Please be aware users need a valid shell in /etc/passwd"
137 einfo "in order to be allowed to login."
138 einfo
139 }
140 }

  ViewVC Help
Powered by ViewVC 1.1.20