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

Contents of /net-misc/openssh/openssh-3.9_p1-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.15 - (show annotations) (download)
Thu Mar 17 01:09:21 2005 UTC (14 years, 7 months ago) by vapier
Branch: MAIN
CVS Tags: HEAD
Changes since 1.14: +1 -1 lines
FILE REMOVED
old

1 # Copyright 1999-2005 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.9_p1-r1.ebuild,v 1.14 2005/03/13 11:05:12 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 SFTPLOG_PATCH_VER="1.2"
12 X509_PATCH="${PARCH}+x509h.diff.gz"
13 SELINUX_PATCH="openssh-3.9_p1-selinux.diff"
14
15 S=${WORKDIR}/${PARCH}
16 DESCRIPTION="Port of OpenBSD's free SSH release"
17 HOMEPAGE="http://www.openssh.com/"
18 SRC_URI="mirror://openbsd/OpenSSH/portable/${PARCH}.tar.gz
19 X509? ( http://roumenpetrov.info/openssh/x509h/${X509_PATCH} )"
20
21 LICENSE="as-is"
22 SLOT="0"
23 KEYWORDS="alpha amd64 arm hppa ia64 mips ppc ppc64 s390 sh sparc x86"
24 IUSE="ipv6 static pam tcpd kerberos skey selinux chroot X509 ldap smartcard nocxx sftplogging"
25
26 RDEPEND="pam? ( >=sys-libs/pam-0.73 >=sys-apps/shadow-4.0.2-r2 )
27 kerberos? ( virtual/krb5 )
28 selinux? ( sys-libs/libselinux )
29 skey? ( >=app-admin/skey-1.1.5-r1 )
30 >=dev-libs/openssl-0.9.6d
31 >=sys-libs/zlib-1.1.4
32 smartcard? ( dev-libs/opensc )
33 tcpd? ( >=sys-apps/tcp-wrappers-7.6 )"
34 DEPEND="${RDEPEND}
35 virtual/os-headers
36 !nocxx? ( sys-apps/groff )
37 sys-devel/autoconf"
38 PROVIDE="virtual/ssh"
39
40 src_unpack() {
41 unpack ${PARCH}.tar.gz
42 cd "${S}"
43
44 epatch "${FILESDIR}"/${P}-pamfix.patch.bz2
45 epatch "${FILESDIR}"/${P}-largekey.patch.bz2
46 epatch "${FILESDIR}"/${P}-fix_suid.patch.bz2
47 epatch "${FILESDIR}"/${P}-infoleak.patch #59361
48 epatch "${FILESDIR}"/${P}-terminal_restore.patch.bz2
49 epatch "${FILESDIR}"/${P}-configure-openct.patch #78730
50 epatch "${FILESDIR}"/${P}-kerberos-detection.patch #80811
51
52 use sftplogging && epatch ${FILESDIR}/${P}-sftplogging-1.2-gentoo.patch.bz2
53 use alpha && epatch ${FILESDIR}/${PN}-3.5_p1-gentoo-sshd-gcc3.patch.bz2
54 use skey && epatch ${FILESDIR}/${P}-skey.patch.bz2
55 use chroot && epatch ${FILESDIR}/${P}-chroot.patch
56 use X509 && epatch ${DISTDIR}/${X509_PATCH}
57 use selinux && epatch ${FILESDIR}/${SELINUX_PATCH}.bz2
58 use smartcard && epatch ${FILESDIR}/${P}-opensc.patch.bz2
59
60 autoconf || die "autoconf failed"
61 }
62
63 src_compile() {
64 local myconf
65
66 addwrite /dev/ptmx
67 gnuconfig_update
68
69 # make sure .sbss is large enough
70 use skey && use alpha && append-ldflags -mlarge-data
71 use ldap && filter-flags -funroll-loops
72 use selinux && append-flags "-DWITH_SELINUX"
73
74 if use static ; then
75 append-ldflags -static
76 use pam && ewarn "Disabling pam support becuse of static flag"
77 myconf="${myconf} --without-pam"
78 else
79 myconf="${myconf} $(use_with pam)"
80 fi
81
82 use ipv6 || myconf="${myconf} --with-ipv4-default"
83
84 econf \
85 --sysconfdir=/etc/ssh \
86 --libexecdir=/usr/$(get_libdir)/misc \
87 --datadir=/usr/share/openssh \
88 --disable-suid-ssh \
89 --with-privsep-path=/var/empty \
90 --with-privsep-user=sshd \
91 --with-md5-passwords \
92 $(use_with kerberos kerberos5 /usr) \
93 $(use_with tcpd tcp-wrappers) \
94 $(use_with skey) \
95 $(use_with smartcard opensc) \
96 ${myconf} \
97 || die "bad configure"
98
99 emake || die "compile problem"
100 }
101
102 src_install() {
103 make install-files DESTDIR="${D}" || die
104 fperms 600 /etc/ssh/sshd_config
105 dodoc ChangeLog CREDITS OVERVIEW README* TODO sshd_config
106 newpamd "${FILESDIR}"/sshd.pam sshd
107 newinitd "${FILESDIR}"/sshd.rc6 sshd
108 keepdir /var/empty
109 dosed "/^#Protocol /s:.*:Protocol 2:" /etc/ssh/sshd_config
110 use pam \
111 && dosed "/^#UsePAM /s:.*:UsePAM yes:" /etc/ssh/sshd_config \
112 && dosed "/^#PasswordAuthentication /s:.*:PasswordAuthentication no:" /etc/ssh/sshd_config
113 }
114
115 pkg_postinst() {
116 enewgroup sshd 22
117 enewuser sshd 22 /bin/false /var/empty sshd
118
119 ewarn "Remember to merge your config files in /etc/ssh/ and then"
120 ewarn "restart sshd: '/etc/init.d/sshd restart'."
121 ewarn
122 einfo "As of version 3.4 the default is to enable the UsePrivelegeSeparation"
123 einfo "functionality, but please ensure that you do not explicitly disable"
124 einfo "this in your configuration as disabling it opens security holes"
125 einfo
126 einfo "This revision has removed your sshd user id and replaced it with a"
127 einfo "new one with UID 22. If you have any scripts or programs that"
128 einfo "that referenced the old UID directly, you will need to update them."
129 einfo
130 if use pam ; then
131 einfo "Please be aware users need a valid shell in /etc/passwd"
132 einfo "in order to be allowed to login."
133 einfo
134 fi
135 }

  ViewVC Help
Powered by ViewVC 1.1.20