/[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.4 - (hide annotations) (download)
Thu Mar 24 23:14:14 2005 UTC (14 years, 10 months ago) by vapier
Branch: MAIN
Changes since 1.3: +7 -3 lines
install ssh-copy-id #86549
(Portage version: 2.0.51.19)

1 vapier 1.1 # Copyright 1999-2005 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 vapier 1.4 # $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/openssh-4.0_p1.ebuild,v 1.3 2005/03/17 01:09:02 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     --sysconfdir=/etc/ssh \
83     --libexecdir=/usr/$(get_libdir)/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     $(use_with kerberos kerberos5 /usr) \
90     $(use_with tcpd tcp-wrappers) \
91     $(use_with skey) \
92     $(use_with smartcard opensc) \
93     ${myconf} \
94     || die "bad configure"
95    
96     emake || die "compile problem"
97     }
98    
99     src_install() {
100 vapier 1.3 make install-nokeys DESTDIR="${D}" || die
101 vapier 1.1 fperms 600 /etc/ssh/sshd_config
102 vapier 1.4 dobin contrib/ssh-copy-id
103 vapier 1.1 newinitd "${FILESDIR}"/sshd.rc6 sshd
104     keepdir /var/empty
105 vapier 1.4
106     newpamd "${FILESDIR}"/sshd.pam sshd
107 vapier 1.1 dosed "/^#Protocol /s:.*:Protocol 2:" /etc/ssh/sshd_config
108     use pam \
109     && dosed "/^#UsePAM /s:.*:UsePAM yes:" /etc/ssh/sshd_config \
110     && dosed "/^#PasswordAuthentication /s:.*:PasswordAuthentication no:" /etc/ssh/sshd_config
111 vapier 1.4
112     doman contrib/ssh-copy-id.1
113     dodoc ChangeLog CREDITS OVERVIEW README* TODO sshd_config
114 vapier 1.1 }
115    
116     pkg_postinst() {
117     enewgroup sshd 22
118     enewuser sshd 22 /bin/false /var/empty sshd
119    
120     ewarn "Remember to merge your config files in /etc/ssh/ and then"
121     ewarn "restart sshd: '/etc/init.d/sshd restart'."
122     ewarn
123     einfo "As of version 3.4 the default is to enable the UsePrivelegeSeparation"
124     einfo "functionality, but please ensure that you do not explicitly disable"
125     einfo "this in your configuration as disabling it opens security holes"
126     einfo
127     einfo "This revision has removed your sshd user id and replaced it with a"
128     einfo "new one with UID 22. If you have any scripts or programs that"
129     einfo "that referenced the old UID directly, you will need to update them."
130     einfo
131     if use pam ; then
132     einfo "Please be aware users need a valid shell in /etc/passwd"
133     einfo "in order to be allowed to login."
134     einfo
135     fi
136     }

  ViewVC Help
Powered by ViewVC 1.1.20