Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 59217
Collapse All | Expand All

(-)/usr/portage/net-zope/zope/zope-2.7.2.ebuild (-16 / +25 lines)
Lines 10-16 Link Here
10
LICENSE="ZPL"
10
LICENSE="ZPL"
11
SLOT="${PV}"
11
SLOT="${PV}"
12
12
13
KEYWORDS="~x86 ~sparc ~ppc ~alpha ~amd64"
13
KEYWORDS="x86 ~sparc ~ppc ~alpha ~amd64"
14
IUSE="unicode"
14
IUSE="unicode"
15
15
16
RDEPEND="=dev-lang/python-2.3*"
16
RDEPEND="=dev-lang/python-2.3*"
Lines 26-35 Link Here
26
ZUID=zope
26
ZUID=zope
27
ZGID=zope
27
ZGID=zope
28
ZGID_INST="$(echo ${PN}-${PV} | sed -e 's/\./_/g' )"
28
ZGID_INST="$(echo ${PN}-${PV} | sed -e 's/\./_/g' )"
29
ZS_DIR=${ROOT}/usr/lib/
29
ZS_DIR=${ROOT%/}/usr/lib/
30
ZI_DIR=${ROOT}/var/lib/zope/
30
ZI_DIR=${ROOT%/}/var/lib/zope/
31
ZSERVDIR=${ZS_DIR}${PN}-${PV}/
31
ZSERVDIR=${ZS_DIR}${PN}-${PV}/
32
ZINSTDIR=${ZI_DIR}${PN}-${PV}
32
ZINSTDIR=${ZI_DIR}${PN}-${PV}/
33
33
34
RCNAME=zope.initd
34
RCNAME=zope.initd
35
35
Lines 44-50 Link Here
44
# Parameters:
44
# Parameters:
45
#  $1 = instance directory
45
#  $1 = instance directory
46
#  $2 = group
46
#  $2 = group
47
48
setup_security() {
47
setup_security() {
49
	# The old version made everything owned by zope:${DEFAULT_INSTANCE_GID},
48
	# The old version made everything owned by zope:${DEFAULT_INSTANCE_GID},
50
	# and group-writable. This is like making everything in net-www/apache2 
49
	# and group-writable. This is like making everything in net-www/apache2 
Lines 53-58 Link Here
53
	# by the zope group, of which the zope user is a member, so that running
52
	# by the zope group, of which the zope user is a member, so that running
54
	# zope instances will be able to read everything.
53
	# zope instances will be able to read everything.
55
	# -- Andy Dustman
54
	# -- Andy Dustman
55
56
	chown -R root:${2} ${1}
56
	chown -R root:${2} ${1}
57
	chmod -R g+r,g-w,o-rwx ${1}
57
	chmod -R g+r,g-w,o-rwx ${1}
58
}
58
}
Lines 62-72 Link Here
62
	if [ -d ${ZINSTDIR} ] ; then
62
	if [ -d ${ZINSTDIR} ] ; then
63
		die "Default instance directory (${ZINSTDIR} already exists!"
63
		die "Default instance directory (${ZINSTDIR} already exists!"
64
	fi
64
	fi
65
	if [ -f ${ZI_DIR}/.default ] ; then
65
	if [ -f ${ZI_DIR}.default ] ; then
66
		def_instance=`cat ${ZI_DIR}/.default`
66
		def_instance=`cat ${ZI_DIR}.default`
67
		die "Default instance file (${ZI_DIR}/.default already exists -> $def_instance"
67
		die "Default instance file (${ZI_DIR}.default already exists -> $def_instance"
68
	fi
68
	fi
69
	einfo "Creting default zope instance at ${ZINSTDIR} with command:"
69
	einfo "Creating default zope instance at ${ZINSTDIR} with command:"
70
	einfo "/usr/sbin/zope-config --zserv=${ZSERVDIR} --zinst=${ZINSTDIR} --zgid=${ZGID_INST} --zinituser"
70
	einfo "/usr/sbin/zope-config --zserv=${ZSERVDIR} --zinst=${ZINSTDIR} --zgid=${ZGID_INST} --zinituser"
71
	ewarn "Default admin user created with password admin. Please change it."
71
	ewarn "Default admin user created with password admin. Please change it."
72
	/usr/sbin/zope-config --zserv=${ZSERVDIR} --zinst=${ZINSTDIR} --zgid=${ZGID_INST} --zinituser
72
	/usr/sbin/zope-config --zserv=${ZSERVDIR} --zinst=${ZINSTDIR} --zgid=${ZGID_INST} --zinituser
Lines 77-82 Link Here
77
	enewgroup ${ZGID} 261
77
	enewgroup ${ZGID} 261
78
	usermod -g ${ZGID} ${ZUID} 2>&1 >/dev/null || \
78
	usermod -g ${ZGID} ${ZUID} 2>&1 >/dev/null || \
79
	enewuser ${ZUID} 261 /bin/bash ${ZS_DIR} ${ZGID}
79
	enewuser ${ZUID} 261 /bin/bash ${ZS_DIR} ${ZGID}
80
81
        #[cs] Moved setup_security here to fix Bug #59217
82
        setup_security ${D}${ZSERVDIR} ${ZGID}
80
}
83
}
81
84
82
src_unpack() {
85
src_unpack() {
Lines 87-92 Link Here
87
}
90
}
88
91
89
src_compile() {
92
src_compile() {
93
        #[cs] TODO: ZOPE_DIR should be something else....
90
	./configure --ignore-largefile --prefix=${ZOPE_DIR} || die "Failed to configure."
94
	./configure --ignore-largefile --prefix=${ZOPE_DIR} || die "Failed to configure."
91
	emake || die "Failed to compile."
95
	emake || die "Failed to compile."
92
}
96
}
Lines 119-133 Link Here
119
		cd ${S}
123
		cd ${S}
120
	fi
124
	fi
121
125
122
	make install PREFIX=${D}/${ZSERVDIR}
126
	make install PREFIX=${D}${ZSERVDIR}
123
	rm -rf ${D}${ZSERVDIR}/doc
127
	rm -rf ${D}${ZSERVDIR}doc
124
	dosym ${DOCDESTTREE} ${D}${ZSERVDIR}/doc
128
	dosym ${DOCDESTTREE} ${D}${ZSERVDIR}doc
125
129
126
	skel=${D}${ZSERVDIR}/skel
130
	skel=${D}${ZSERVDIR}skel
127
	dodir /etc/init.d
131
	dodir /etc/init.d
128
	cp ${FILESDIR}/${PV}/zope.initd ${skel}/zope.initd
132
	cp ${FILESDIR}/${PV}/zope.initd ${skel}/zope.initd
129
130
	setup_security ${D}${ZSERVDIR} ${ZGID}
131
}
133
}
132
134
133
pkg_postinst() {
135
pkg_postinst() {
Lines 142-149 Link Here
142
144
143
	# Delete .default if this ebuild is the default. zprod-manager will
145
	# Delete .default if this ebuild is the default. zprod-manager will
144
	# have to handle a missing default;
146
	# have to handle a missing default;
145
	# TODO: this should be checked
147
        # TODO: this should be checked
146
	rm -f ${ZI_DIR}/.default
148
	rm -f ${ZI_DIR}/.default
149
150
        # TODO: Verify this is right.
151
        #if [ -e ${ZI_DIR}.default ]; then
152
        #        if [ "$(cat ${ZI_DIR}.default)" = "${PN}-${PV}" ]; then
153
        #        	rm -f ${ZI_DIR}.default
154
        #        fi
155
        #fi
147
}
156
}
148
157
149
pkg_config() {
158
pkg_config() {

Return to bug 59217