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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (hide annotations) (download)
Mon May 2 21:54:35 2005 UTC (14 years, 8 months ago) by vapier
Branch: MAIN
Changes since 1.4: +2 -1 lines
let portage handle stripping #88908
(Portage version: 2.0.51.21)

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

  ViewVC Help
Powered by ViewVC 1.1.20