Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 28567 | Differences between
and this patch

Collapse All | Expand All

(-)openssh-3.6.1_p2-r3.ebuild (-1 / +38 lines)
Lines 12-18 Link Here
12
S=${WORKDIR}/${PARCH}
12
S=${WORKDIR}/${PARCH}
13
DESCRIPTION="Port of OpenBSD's free SSH release"
13
DESCRIPTION="Port of OpenBSD's free SSH release"
14
HOMEPAGE="http://www.openssh.com/"
14
HOMEPAGE="http://www.openssh.com/"
15
IUSE="ipv6 static pam tcpd kerberos selinux X509 skey"
15
IUSE="ipv6 static pam tcpd kerberos selinux X509 skey daemontools"
16
SRC_URI="ftp://ftp.openbsd.org/pub/unix/OpenBSD/OpenSSH/portable/${PARCH}.tar.gz
16
SRC_URI="ftp://ftp.openbsd.org/pub/unix/OpenBSD/OpenSSH/portable/${PARCH}.tar.gz
17
	selinux? http://lostlogicx.com/gentoo/openssh_3.6p1-5.se1.diff.bz2
17
	selinux? http://lostlogicx.com/gentoo/openssh_3.6p1-5.se1.diff.bz2
18
	X509? http://roumenpetrov.info/openssh/x509g2/${X509_PATCH}"
18
	X509? http://roumenpetrov.info/openssh/x509g2/${X509_PATCH}"
Lines 23-28 Link Here
23
	pam? ( >=sys-libs/pam-0.73
23
	pam? ( >=sys-libs/pam-0.73
24
		>=sys-apps/shadow-4.0.2-r2 )
24
		>=sys-apps/shadow-4.0.2-r2 )
25
	kerberos? ( app-crypt/mit-krb5 )
25
	kerberos? ( app-crypt/mit-krb5 )
26
	daemontools? ( >=sys-apps/daemontools-0.76 )
26
	selinux? ( sys-apps/selinux-small )
27
	selinux? ( sys-apps/selinux-small )
27
	afs? ( net-fs/openafs
28
	afs? ( net-fs/openafs
28
		app-crypt/kth-krb ) :
29
		app-crypt/kth-krb ) :
Lines 41-46 Link Here
41
LICENSE="as-is"
42
LICENSE="as-is"
42
KEYWORDS="~x86 ~alpha"
43
KEYWORDS="~x86 ~alpha"
43
44
45
pkg_setup() {
46
	if use daemontools ; then
47
		if ! grep -q ^sshlog /etc/group ; then
48
			groupadd sshlog || die "Failed to add group: sshlog"
49
		fi
50
    
51
		if ! grep -q ^sshlog /etc/passwd ; then
52
			useradd -g sshlog -d /dev/null -s /dev/null sshlog || die "Failed to add user: sshlog"
53
		fi
54
	fi 
55
}
56
44
src_unpack() {
57
src_unpack() {
45
	unpack ${PARCH}.tar.gz ; cd ${S}
58
	unpack ${PARCH}.tar.gz ; cd ${S}
46
59
Lines 112-117 Link Here
112
	dodoc ChangeLog CREDITS OVERVIEW README* TODO sshd_config
125
	dodoc ChangeLog CREDITS OVERVIEW README* TODO sshd_config
113
	insinto /etc/pam.d  ; newins ${FILESDIR}/sshd.pam sshd
126
	insinto /etc/pam.d  ; newins ${FILESDIR}/sshd.pam sshd
114
	exeinto /etc/init.d ; newexe ${FILESDIR}/sshd.rc6 sshd
127
	exeinto /etc/init.d ; newexe ${FILESDIR}/sshd.rc6 sshd
128
	if use daemontools && [ ! -d /etc/ssh/supervise ] ; then
129
		diropts -m 755 -o root
130
		dodir /etc/ssh/supervise /etc/ssh/supervise/log
131
		exeinto /etc/ssh/supervise ; newexe ${FILESDIR}/sshd.supervise.run run
132
		exeinto /etc/ssh/supervise/log ; newexe ${FILESDIR}/sshd.supervise.log run
133
134
		diropts -m 755 -o sshlog -g sshlog
135
		dodir /var/log/sshd
136
		keepdir /var/log/sshd
137
	fi
138
115
	touch ${D}/var/empty/.keep
139
	touch ${D}/var/empty/.keep
116
}
140
}
117
141
Lines 129-134 Link Here
129
	# empty dir for the new priv separation auth chroot..
153
	# empty dir for the new priv separation auth chroot..
130
	install -d -m0755 -o root -g root ${ROOT}/var/empty
154
	install -d -m0755 -o root -g root ${ROOT}/var/empty
131
155
156
	if [ ! -e /etc/ssh/ssh_host_key ] ; then
157
		einfo "Generating Hostkey..."
158
		/usr/bin/ssh-keygen -t rsa1 -b 1024 -f /etc/ssh/ssh_host_key -N ''
159
	fi
160
	if [ ! -e /etc/ssh/ssh_host_dsa_key ] ; then
161
		einfo "Generating DSA-Hostkey..."
162
		/usr/bin/ssh-keygen -d -f /etc/ssh/ssh_host_dsa_key -N ''
163
	fi
164
	if [ ! -e /etc/ssh/ssh_host_rsa_key ] ; then
165
		einfo "Generating RSA-Hostkey..."
166
		/usr/bin/ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N ''
167
	fi
168
132
	einfo
169
	einfo
133
	einfo "Remember to merge your config files in /etc/ssh!"
170
	einfo "Remember to merge your config files in /etc/ssh!"
134
	einfo "As of version 3.4 the default is to enable the UsePrivelegeSeparation"
171
	einfo "As of version 3.4 the default is to enable the UsePrivelegeSeparation"

Return to bug 28567