blob: 7ca107f6e846f3c9e64fbfb34be801f6ed8a5a4b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-zope/zope/zope-2.9.10-r1.ebuild,v 1.6 2009/09/11 19:12:11 maekke Exp $
EAPI=2
inherit eutils multilib
DESCRIPTION="Zope is a web application platform used for building high-performance, dynamic web sites"
HOMEPAGE="http://www.zope.org"
SRC_URI="http://www.zope.org/Products/Zope/${PV}/Zope-${PV}-final.tgz"
LICENSE="ZPL"
SLOT="${PV}"
KEYWORDS="alpha amd64 ppc sparc x86"
IUSE=""
DEPEND="=dev-lang/python-2.4*"
S="${WORKDIR}/Zope-${PV}-final"
ZUID=zope
ZGID=zope
ZS_DIR=${ROOT%/}/usr/$(get_libdir)
ZSERVDIR=${ZS_DIR}/${P}
# Narrow the scope of ownership/permissions.
# Security plan:
# * ZUID is the superuser for all zope instances.
# * ZGID is for a single instance's administration.
# * Other' should not have any access to ${ZSERVDIR},
# because they can work through the Zope web interface.
# This should protect our code/data better.
#
# UPDATE: ${ZSERVDIR} is a lib directory and should be world readable
# like e.g /usr/lib/python we do not store any user data there,
# currently removed all custom permission stuff, for ${ZSERVDIR}
src_prepare() {
epatch "${FILESDIR}"/CVE-2009-0668+0669.patch
}
src_configure() {
./configure --prefix="${D}${ZSERVDIR}" --with-python=/usr/bin/python2.4 || die "Failed to execute ./configure ..."
}
src_install() {
dodoc README.txt
dodoc Zope/doc/*.txt
docinto PLATFORMS ; dodoc Zope/doc/PLATFORMS/*
docinto ZEO ; dodoc Zope/doc/ZEO/*
make install prefix="${D}"${ZSERVDIR} || die "Failed to install into ${D}${ZSERVDIR}"
rm -rf "${D}"${ZSERVDIR}/doc
dosym ../../share/doc/${PF} ${ZSERVDIR}/doc
# copy the init script skeleton to skel directory of our installation
cp "${FILESDIR}"/zope.initd "${D}"/${ZSERVDIR}/skel/zope.initd
}
src_test() {
einfo "Tests disabled by Gentoo team."
}
pkg_postinst() {
# create the zope user and group for backward compatibility
enewgroup ${ZGID} 261
usermod -g ${ZGID} ${ZUID} 2>&1 >/dev/null || \
enewuser ${ZUID} 261 -1 /var/$(get_libdir)/zope ${ZGID}
einfo "Be warned that you need at least one zope instance to run zope."
einfo "Please emerge zope-config for futher instance management."
}
pkg_prerm() {
#Remove old compiled code
rm ${ZSERVDIR}/bin/copyzopeskel.pyc
#need to remove this symlink because portage keeps links to
#existing targets
rm ${ZSERVDIR}/bin/python
}
|