summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeinrich Wendel <lanius@gentoo.org>2004-03-14 12:32:15 +0000
committerHeinrich Wendel <lanius@gentoo.org>2004-03-14 12:32:15 +0000
commit94c3842adc253901296bab4314416afdc1a742f0 (patch)
tree6aca8b5cf2042936bf31e09651b3bc91757d8970 /net-zope
parentbug 44613 (Manifest recommit) (diff)
downloadgentoo-2-94c3842adc253901296bab4314416afdc1a742f0.tar.gz
gentoo-2-94c3842adc253901296bab4314416afdc1a742f0.tar.bz2
gentoo-2-94c3842adc253901296bab4314416afdc1a742f0.zip
some fixes from solution2u.net, bug #4211
Diffstat (limited to 'net-zope')
-rw-r--r--net-zope/zope/ChangeLog8
-rw-r--r--net-zope/zope/Manifest20
-rw-r--r--net-zope/zope/files/2.6.4/zope.confd77
-rw-r--r--net-zope/zope/files/2.6.4/zope.initd178
-rw-r--r--net-zope/zope/files/digest-zope-2.6.4-r11
-rw-r--r--net-zope/zope/zope-2.6.4-r1.ebuild183
-rw-r--r--net-zope/zope/zope-2.6.4.ebuild4
7 files changed, 460 insertions, 11 deletions
diff --git a/net-zope/zope/ChangeLog b/net-zope/zope/ChangeLog
index e567dbf2808c..07540cc3c279 100644
--- a/net-zope/zope/ChangeLog
+++ b/net-zope/zope/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for net-zope/zope
# Copyright 2002-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-zope/zope/ChangeLog,v 1.17 2004/03/05 10:29:14 dholm Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-zope/zope/ChangeLog,v 1.18 2004/03/14 12:32:15 lanius Exp $
+
+*zope-2.6.4-r1 (14 Mar 2004)
+
+ 14 Mar 2004; Heinrich Wendel <lanius@gentoo.org> zope-2.6.4-r1.ebuild,
+ files/2.6.4/zope.confd, files/2.6.4/zope.initd:
+ some fixes from solution2u.net, bug #42111
05 Mar 2004; David Holm <dholm@gentoo.org> zope-2.6.4.ebuild:
Added to ~ppc.
diff --git a/net-zope/zope/Manifest b/net-zope/zope/Manifest
index ad782ce2ad29..ac1a97d87bb1 100644
--- a/net-zope/zope/Manifest
+++ b/net-zope/zope/Manifest
@@ -1,18 +1,22 @@
-MD5 5aee34b58a9506b0ceed6f39a9bb5ba9 ChangeLog 4792
-MD5 7890d88c5c6d189fbe6b187a3ebb6532 metadata.xml 161
MD5 445c27d961897aadd719c7d7d55abae8 zope-2.4.0-r6.ebuild 2653
MD5 fe113b568060f9089f69b75e4848f897 zope-2.5.1.ebuild 2617
-MD5 dcc157ad792206e2d516ab9b18aa72fe zope-2.6.3.ebuild 4360
MD5 f0154f7b6c1f8b81c443899aed40a980 zope-2.6.4.ebuild 4385
-MD5 c8f695d11a964dd2410a3b200a71cf2f files/custom_zodb.py 219
+MD5 611f3d8243d796136035c56986e168b9 zope-2.6.4-r1.ebuild 5345
+MD5 5aee34b58a9506b0ceed6f39a9bb5ba9 ChangeLog 4792
+MD5 7890d88c5c6d189fbe6b187a3ebb6532 metadata.xml 161
+MD5 dcc157ad792206e2d516ab9b18aa72fe zope-2.6.3.ebuild 4360
+MD5 e13da78ee330353cc967bea9589d1043 files/zope 5577
+MD5 111f2aacb074731c923a5eb93a53f6af files/zctl.py 9455
+MD5 ddde0a17fff53b39fee88852f3a5e2d7 files/zope.rc6 5559
MD5 24d816c631ba0677864f4f72264bb8de files/digest-zope-2.4.0-r6 121
+MD5 ddddbf81a9803fef7474cb22df00a924 files/digest-zope-2.6.4-r1 64
MD5 45724a3c339e9be0f9c0dec39b477c38 files/digest-zope-2.5.1 119
MD5 42924c033cd81e7759ef4c08fc41fbbb files/digest-zope-2.6.3 64
MD5 ddddbf81a9803fef7474cb22df00a924 files/digest-zope-2.6.4 64
+MD5 c8f695d11a964dd2410a3b200a71cf2f files/custom_zodb.py 219
MD5 037cf91a5b4d60efe166f90210c837ed files/i18n-1.0.0.patch 8080
-MD5 111f2aacb074731c923a5eb93a53f6af files/zctl.py 9455
-MD5 e13da78ee330353cc967bea9589d1043 files/zope 5577
MD5 841ff9ee1831723a25c4ea88e5708c55 files/zope.conf 850
-MD5 ddde0a17fff53b39fee88852f3a5e2d7 files/zope.rc6 5559
+MD5 9d6deba42b198e5b59ef86a21d446214 files/2.6.1/zope.initd 3624
MD5 e2bc676da913a7fe562407b9c7f622f0 files/2.6.1/zope.envd 922
-MD5 aa5133eb433964c63cf4644b743afeec files/2.6.1/zope.initd 3662
+MD5 a18ddd3f2cdcb815cf86f4b9c4bdd6fe files/2.6.4/zope.confd 950
+MD5 6400fddce805c685d0be5c30e9052dcf files/2.6.4/zope.initd 3783
diff --git a/net-zope/zope/files/2.6.4/zope.confd b/net-zope/zope/files/2.6.4/zope.confd
new file mode 100644
index 000000000000..58204174555c
--- /dev/null
+++ b/net-zope/zope/files/2.6.4/zope.confd
@@ -0,0 +1,77 @@
+#-- startup options
+
+#ZOPE_OPTS=
+
+#-- Zope installation
+
+#INSTANCE_HOME=
+#SOFTWARE_HOME=
+#ZOPE_HOME=
+#FORCE_PRODUCT_LOAD=
+
+#-- Profiling
+
+#PROFILE_PUBLISHER=
+
+#-- SiteAccess
+
+#SUPPRESS_ACCESSRULE=
+#SUPPRESS_SITEROOT=
+
+#-- ZEO
+
+#CLIENT_HOME=
+#ZEO_CLIENT=
+
+#-- Debugging and Logging
+
+#EVENT_LOG_FORMAT=
+#EVENT_LOG_FILE=
+#EVENT_LOG_SEVERITY=
+#ZSYSLOG=
+#ZSYSLOG_FACILITY=
+#ZSYSLOG_SERVER=
+#ZSYSLOG_ACCESS=
+#ZSYSLOG_ACCESS_FACILITY=
+#ZSYSLOG_ACCESS_SERVER=
+#Z_DEBUG_MODE=
+
+#-- Misc.
+
+#Z_REALM
+
+#-- Security related
+
+#NO_SECURITY=
+#ZOPE_SECURITY_POLICY=
+#ZSP_OWNEROUS_SKIP=
+#ZSP_AUTHENTICATED_SKIP=
+#DISALLOW_LOCAL_PRODUCTS=
+
+#-- ZODB related
+
+#ZOPE_DATABASE_QUOTA=
+#ZOPE_READ_ONLY=
+
+#-- Session related
+
+#ZSESSION_ADD_NOTIFY=
+#ZSESSION_DEL_NOTIFY=
+#ZSESSION_TIMEOUT_MINS=
+#ZSESSION_OBJECT_LIMIT=
+
+#-- WebDAV
+
+#WEBDAV_SOURCE_PORT_CLIENTS=
+
+#-- Structured Text
+
+#STX_DEFAULT_LEVEL=
+
+#-- DTML
+
+#ZOPE_DTML_REQUEST_AUTOQUOTE=
+
+#-- Esoteric
+
+#Z_MAX_STACK_SIZE=
diff --git a/net-zope/zope/files/2.6.4/zope.initd b/net-zope/zope/files/2.6.4/zope.initd
new file mode 100644
index 000000000000..355211f43f69
--- /dev/null
+++ b/net-zope/zope/files/2.6.4/zope.initd
@@ -0,0 +1,178 @@
+#!/sbin/runscript
+# Zope rc-script for Gentoo Linux
+# Copyright 2002-2003 by Jason Shoemaker
+# Distributed under the terms of the GNU General Public License, v2 or later.
+# $Header: /var/cvsroot/gentoo-x86/net-zope/zope/files/2.6.4/zope.initd,v 1.1 2004/03/14 12:32:15 lanius Exp $
+
+python=
+
+depend()
+{
+ need net
+}
+
+# Since zope doesn't delete its .pid file when done, we have to determine its
+# status. Zope can be shutdown from a browser...this bypasses init.d.
+
+# Need to export these conf.d variables so that (env) can use them
+
+setup_exports()
+{
+local EXPORT_LST="INSTANCE_HOME SOFTWARE_HOME ZOPE_HOME FORCE_PRODUCT_LOAD \
+PROFILE_PUBLISHER SUPPRESS_ACCESSRULE SUPPRESS_SITEROOT CLIENT_HOME \
+ZEO_CLIENT EVENT_LOG_FORMAT EVENT_LOG_FILE EVENT_LOG_SEVERITY ZSYSLOG \
+ZSYSLOG_FACILITY ZSYSLOG_SERVER ZSYSLOG_ACCESS ZSYSLOG_ACCESS_FACILITY \
+ZSYSLOG_ACCESS_SERVER Z_DEBUG_MODE Z_REALM NO_SECURITY ZOPE_SECURITY_POLICY \
+ZSP_OWNEROUS_SKIP ZSP_AUTHENTICATED_SKIP DISALLOW_LOCAL_PRODUCTS \
+ZOPE_DATABASE_QUOTA ZOPE_READ_ONLY ZSESSION_ADD_NOTIFY ZSESSION_DEL_NOTIFY \
+ZSESSION_TIMEOUT_MINS ZSESSION_OBJECT_LIMIT WEBDAV_SOURCE_PORT_CLIENTS \
+STX_DEFAULT_LEVEL ZOPE_DTML_REQUEST_AUTOQUOTE Z_MAX_STACK_SIZE \
+FORCE_PRODUCT_RELOAD"
+
+for N in $EXPORT_LST ; do
+ if [ -n "${N}" ] ; then export ${N} ; fi
+done
+}
+
+# Check if the file exist. then send file to stdout.
+# Parameters:
+# $1 = /path/to/pid.file
+# Outputs:
+
+read_pid()
+{
+ if [ -f "${1}" ] ; then
+ cat ${1}
+ fi
+}
+
+# Check if we have a living PID, if not delete the PID FILE
+# Parameters:
+# $1 = /path/to/pid.file
+# Returns:
+# 0 if alive pid file remains
+# 1 if dead pid file removed
+# 2 if no pid file found
+
+check_pid_status()
+{
+ local RESULT=2 # assume no pid file will be found
+ local PID=$(read_pid ${1})
+
+ if [ -n "${PID}" ] ; then
+ ps --no-headers ${PID} > /dev/null 2>&1
+ if [ "${?}" -eq 0 ] ; then
+ RESULT=0
+ else
+ rm -f ${1}
+ RESULT=1
+ fi
+ fi
+
+ return ${RESULT}
+}
+
+# Parameters:
+# None
+# Returns:
+# 0 true
+# 1 false and echos /pathname/to/pid/file
+
+is_zope_dead()
+{
+ local RESULT=
+
+ if [ -n "${INSTANCE_HOME}" ] ; then
+ loc=${INSTANCE_HOME}
+ else
+ loc=${ZOPE_HOME}
+ fi
+
+ check_pid_status ${loc}/var/Z2.pid
+ RESULT=${?}
+ if [ "${RESULT}" -eq 0 ] ; then
+ echo "${loc}"
+ RESULT=10
+ break # found a live pid
+ fi
+
+ if [ "${RESULT}" -eq 10 ] ; then
+ RESULT=1
+ else
+ RESULT=0
+ fi
+
+ return ${RESULT}
+}
+
+status()
+{
+
+ if is_zope_dead ; then
+ eerror "--> Zope is dead."
+ else
+ einfo "--> Zope is alive."
+ fi
+
+ return ${?}
+}
+
+# If Zope is dead, remove PID file and start zope.
+# The idea with 'env' is that a environment snapshot
+# (current vars + /etc/conf.d/zope?) is created for zope to use.
+
+start_zope()
+{
+ local RESULT=
+
+ is_zope_dead >/dev/null
+ RESULT=${?}
+ if [ "${RESULT}" -eq 0 ] ; then
+ setup_exports
+ umask 077 # Recommended by Zope
+ # "normal" logfile: e.g. /var/log/zope/zope-2_6_1,
+ # startup log: /var/log/zope/zope-2_6_1.log
+ env /usr/bin/${python} ${ZOPE_HOME}z2.py ${ZOPE_OPTS} > \
+ ${EVENT_LOG_FILE}.log 2>&1 &
+ RESULT=${?}
+ else
+ echo 'Zope is running independant of RC management.'
+ echo 'We are going to try and kill it.'
+ stop_zope
+ if [ "${?}" -eq 0 ] ; then
+ echo 'Successfully killed zope. Try to start zope again'
+ fi
+ fi
+
+ return ${RESULT}
+}
+
+# If Zope is alive, kill it.
+
+stop_zope()
+{
+ local PID=$(is_zope_dead)
+
+ if [ -n "${PID}" ] ; then
+ kill $(cat ${PID}/var/Z2.pid) # Not sure if kill always succeeds, so not removeing .pid file.
+ fi
+ return $?
+}
+
+#
+
+start()
+{
+ ebegin "Starting zope"
+ start_zope
+ eend $? "Failed to start zope"
+}
+
+#
+
+stop()
+{
+ ebegin "Stopping zope"
+ stop_zope
+ eend $? "Failed to stop zope"
+}
diff --git a/net-zope/zope/files/digest-zope-2.6.4-r1 b/net-zope/zope/files/digest-zope-2.6.4-r1
new file mode 100644
index 000000000000..2c61819a6cef
--- /dev/null
+++ b/net-zope/zope/files/digest-zope-2.6.4-r1
@@ -0,0 +1 @@
+MD5 4ad8ca2a1ba278881e55312d385f39f1 Zope-2.6.4-src.tgz 2401115
diff --git a/net-zope/zope/zope-2.6.4-r1.ebuild b/net-zope/zope/zope-2.6.4-r1.ebuild
new file mode 100644
index 000000000000..fa200edb8891
--- /dev/null
+++ b/net-zope/zope/zope-2.6.4-r1.ebuild
@@ -0,0 +1,183 @@
+# Copyright 1999-2004 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-zope/zope/zope-2.6.4-r1.ebuild,v 1.1 2004/03/14 12:32:15 lanius Exp $
+
+inherit eutils
+
+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}-src.tgz"
+LICENSE="ZPL"
+SLOT="${PV}"
+
+KEYWORDS="~x86 ~sparc"
+IUSE="utf8"
+
+# This is for developers that wish to test Zope with virtual/python.
+# If this is a problem, let me know right away. --kutsuya@gentoo.org
+# I wondering if we need a USE flag for this. But I'm planning to have
+# a private environmental variable called PYTHON_SLOT_VERSION set in
+# ebuilds to build extensions for python2.1.
+
+if [ "${PYTHON_SLOT_VERSION}" = 'VIRTUAL' ] ; then
+RDEPEND="virtual/python"
+python='python'
+elif [ "${PYTHON_SLOT_VERSION}" != '' ] ; then
+RDEPEND="=dev-lang/python-${PYTHON_SLOT_VERSION}*"
+python="python${PYTHON_SLOT_VERSION}"
+else
+RDEPEND="=dev-lang/python-2.1.3*"
+python='python2.1'
+fi
+
+RDEPEND="${RDEPEND}
+!net-zope/verbosesecurity"
+
+DEPEND="${RDEPEND}
+virtual/glibc
+>=sys-apps/sed-4.0.5
+>=app-admin/zope-config-0.3"
+
+S="${WORKDIR}/Zope-${PV}-src"
+
+ZUID=zope
+ZGID=$(echo ${P} |sed -e "s:\.:_:g")
+ZS_DIR=${ROOT}/usr/share/zope/
+ZI_DIR=${ROOT}/var/lib/zope/
+ZSERVDIR=${ZS_DIR}/${PF}/
+ZINSTDIR=${ZI_DIR}/${ZGID}
+ZOPEOPTS="\"-u zope\""
+CONFDIR=${ROOT}/etc/conf.d/
+RCNAME=zope.initd
+
+# 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's should not have any access to ${ZSERVDIR},
+# because they can work through the Zope web interface.
+# This should protect our code/data better.
+
+# Parameters:
+# $1 = instance directory
+# $2 = group
+
+setup_security() {
+ chown -R ${ZUID}:${2} ${1}
+ chmod -R g+u ${1}
+ chmod -R o-rwx ${1}
+}
+
+install_help() {
+ einfo "Need to setup an inituser (admin) before executing zope:"
+ einfo "\tzope-config --zpasswd"
+ einfo "To execute default Zope instance:"
+ einfo "\t/etc/init.d/${ZGID} start"
+}
+
+pkg_setup() {
+ if [ "${PYTHON_SLOT_VERSION}" != '' ] ; then
+ ewarn "WARNING: You set PYTHON_SLOT_VERSION=${PYTHON_SLOT_VERSION}."
+ if [ "${PYTHON_SLOT_VERSION}" = 'VIRTUAL' ] ; then
+ ewarn "So this ebuild will use virtual/python."
+ else
+ ewarn "So this ebuild will use python-${PYTHON_SLOT_VERSION}*."
+ fi
+ ewarn "Zope Corp. only recommends using python-2.1.3 "
+ ewarn "with this version of zope. Emerge at your own risk."
+ sleep 12
+ fi
+ enewgroup ${ZGID}
+ enewuser ${ZUID} 261 /bin/bash ${ZS_DIR} ${ZGID}
+}
+
+src_compile() {
+ $python wo_pcgi.py || die "Failed to compile."
+}
+
+src_install() {
+ dodoc LICENSE.txt README.txt
+ docinto doc ; dodoc doc/*.txt
+ docinto doc/PLATFORMS ; dodoc doc/PLATFORMS/*
+ docinto doc/changenotes ; dodoc doc/changenotes/*
+
+ # Patched StructuredText will accept source text formatted in utf-8 encoding,
+ # apply all formattings and output utf-8 encoded text.
+ # if you want to use this option you need to set your
+ # system python encoding to utf-8 (create the file sitecusomize.py inside
+ # your site-packages, add the following lines
+ # import sys
+ # sys.setdefaultencoding('utf-8')
+ # If this is a problem, let me know right away. --batlogg@solution2u.net
+ # I wondering if we need a USE flag for this and wheter we can set the
+ # sys.encoding automtically
+ # so i defined a use flag utf-8
+
+ if use utf8; then
+ einfo "Patching structured text"
+ einfo "make sure you have set the system pythong encoding to utf-8"
+ einfo "create the file sitecusomize.py inside your site-packages"
+ einfo "import sys"
+ einfo "sys.setdefaultencoding('utf8')"
+ cd ${S}/lib/python/StructuredText/
+ epatch ${FILESDIR}/i18n-1.0.0.patch
+ cd ${S}
+ fi
+
+
+ # using '/etc/init.d/zope'
+ rm -Rf start stop LICENSE.txt README.txt doc/
+
+ # Need to rip out the zinstance stuff out
+ # but save as templates
+ mkdir -p .templates/import
+ cp import/README.txt .templates/import/
+ mv -f Extensions/ .templates/
+ mv -f var/ .templates/
+
+ # Add conf.d script.
+ dodir /etc/conf.d
+ cp ${FILESDIR}/${PV}/zope.confd .templates/zope.confd
+
+ # Fill in environmental variables
+ sed -i \
+ -e "/ZOPE_OPTS=/ c\\ZOPE_OPTS=${ZOPEOPTS}\\ " \
+ -e "/ZOPE_HOME=/ c\\ZOPE_HOME=${ZSERVDIR}\\ " \
+ -e "/SOFTWARE_HOME=/ c\\SOFTWARE_HOME=${ZSERVDIR}/lib/python\\ " \
+ .templates/zope.confd
+
+ # Add conf.d script.
+ dodir /etc/init.d
+ cp ${FILESDIR}/${PV}/zope.initd .templates/zope.initd
+ # Fill in rc-script.
+ sed -i -e "/python=/ c\\python=\"${python}\"\\ " \
+ .templates/zope.initd
+
+ # Copy the remaining contents of ${S} into the ${D}.
+ dodir ${ZSERVDIR}
+ cp -a . ${D}${ZSERVDIR}
+
+ setup_security ${D}${ZSERVDIR} ${ZGID}
+}
+
+pkg_postinst() {
+ # Here we add our default zope instance.
+ /usr/sbin/zope-config --zserv=${ZSERVDIR} --zinst=${ZINSTDIR} \
+ --zgid=${ZGID}
+ install_help
+}
+
+pkg_postrm() {
+ # rcscripts and conf.d files will remain. i.e. /etc protection.
+
+ # Delete .default if this ebuild is the default. zprod-manager will
+ # have to handle a missing default;
+ local VERSION_DEF="$(zope-config --zidef-get)"
+ if [ "${ZGID}" = "$VERSION_DEF" ] ; then
+ rm -f ${ZI_DIR}/.default
+ fi
+}
+
+pkg_config() {
+ install_help
+}
diff --git a/net-zope/zope/zope-2.6.4.ebuild b/net-zope/zope/zope-2.6.4.ebuild
index a639fa330747..9dcc86bae387 100644
--- a/net-zope/zope/zope-2.6.4.ebuild
+++ b/net-zope/zope/zope-2.6.4.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-zope/zope/zope-2.6.4.ebuild,v 1.3 2004/03/05 10:29:14 dholm Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-zope/zope/zope-2.6.4.ebuild,v 1.4 2004/03/14 12:32:15 lanius Exp $
inherit eutils
@@ -12,7 +12,7 @@ SRC_URI="http://www.zope.org/Products/Zope/${PV}/Zope-${PV}-src.tgz"
LICENSE="ZPL"
SLOT="${PV}"
-KEYWORDS="x86 ~sparc ~ppc"
+KEYWORDS="x86 ~sparc"
# This is for developers that wish to test Zope with virtual/python.
# If this is a problem, let me know right away. --kutsuya@gentoo.org