diff options
author | Jason Shoemaker <kutsuya@gentoo.org> | 2003-02-17 03:57:23 +0000 |
---|---|---|
committer | Jason Shoemaker <kutsuya@gentoo.org> | 2003-02-17 03:57:23 +0000 |
commit | afeff330e4c0d458dc87b1316ead023fce934ff3 (patch) | |
tree | 05a50aab6bc57d0ddf38c0b05f9a54efd4fd9747 /net-www/zope | |
parent | new version (diff) | |
download | gentoo-2-afeff330e4c0d458dc87b1316ead023fce934ff3.tar.gz gentoo-2-afeff330e4c0d458dc87b1316ead023fce934ff3.tar.bz2 gentoo-2-afeff330e4c0d458dc87b1316ead023fce934ff3.zip |
Added ~x86. having problems with repoman
Diffstat (limited to 'net-www/zope')
-rw-r--r-- | net-www/zope/ChangeLog | 24 | ||||
-rw-r--r-- | net-www/zope/files/2.6.0/DateTime.py.bz2 | bin | 0 -> 15046 bytes | |||
-rw-r--r-- | net-www/zope/files/2.6.0/zope-r1.initd | 174 | ||||
-rw-r--r-- | net-www/zope/files/2.6.0/zope.envd | 4 | ||||
-rw-r--r-- | net-www/zope/files/digest-zope-2.6.0-r2 | 1 | ||||
-rw-r--r-- | net-www/zope/zope-2.6.0-r2.ebuild | 125 |
6 files changed, 316 insertions, 12 deletions
diff --git a/net-www/zope/ChangeLog b/net-www/zope/ChangeLog index 52c916f721a9..843a5bfc958b 100644 --- a/net-www/zope/ChangeLog +++ b/net-www/zope/ChangeLog @@ -1,10 +1,18 @@ # ChangeLog for net-www/zope # Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-www/zope/ChangeLog,v 1.8 2003/02/12 08:54:15 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-www/zope/ChangeLog,v 1.9 2003/02/17 03:57:23 kutsuya Exp $ - 06 Dec 2002; Rodney Rees <manson@gentoo.org> : changed sparc ~sparc keywords - -*zope-2.6.1 (23 Nov 2002) +06 Dec 2002; Rodney Rees <manson@gentoo.org> : changed sparc ~sparc keywords + +*zope-2.6.0-r2 (16 Feb 2003) + + 16 Feb 2003; Jason Shoemaker <kutsuya@gentoo.org> : A major revison. + New rcscript (along with zope-config) makes it possible to have several zope + instances runing at the same time. Also has better PID management fixing + #14173. /etc/env.d/zope and /etc/conf.d/zope are now placed in + /etc/conf.d/zope-2_6_0. Also added a DateTime patch. Improved security. + +*zope-2.6.0-r1 (23 Nov 2002) 23 Nov 2002; Grant Goodyear <g2boojum@gentoo.org> zope-2.6.0-r1.ebuild : Added ebuild from Bug #10758 (thanks to Maurizio Disimino!) which should @@ -17,6 +25,7 @@ Security update. Ebuild contributed by Jason S <kutsuya1@yahoo.com> in #9474. *zope-2.5.1 (2 Jul 2002) + 2 Jul 2002; Jon Nelson <jnelson@gentoo.org> zope-2.5.1.ebuild: Use python 2.1.3 ebuild explicitly Thanks for Matt Behrens <matt@zigg.com> @@ -31,10 +40,5 @@ *zope-2.4.0-r6 (1 Feb 2002) - 1 Feb 2002; G.Bevin <gbevin@gentoo.org> ChangeLog : + 1 Feb 2002; G.Bevin <gbevin@gentoo.org> ChangeLog : Initial import. - Added initial ChangeLog which should be updated whenever the package is - updated in any way. This changelog is targetted to users. This means that the - comments should well explained and written in clean English. The details about - writing correct changelogs are explained in the skel.ChangeLog file which you - can find in the root directory of the portage repository. diff --git a/net-www/zope/files/2.6.0/DateTime.py.bz2 b/net-www/zope/files/2.6.0/DateTime.py.bz2 Binary files differnew file mode 100644 index 000000000000..e6f8331421d1 --- /dev/null +++ b/net-www/zope/files/2.6.0/DateTime.py.bz2 diff --git a/net-www/zope/files/2.6.0/zope-r1.initd b/net-www/zope/files/2.6.0/zope-r1.initd new file mode 100644 index 000000000000..1dca99afd10e --- /dev/null +++ b/net-www/zope/files/2.6.0/zope-r1.initd @@ -0,0 +1,174 @@ +#!/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-www/zope/files/2.6.0/zope-r1.initd,v 1.1 2003/02/17 03:57:23 kutsuya Exp $ + +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 ! is_zope_dead +} + +# 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 + env /usr/bin/python2.1 ${ZOPE_HOME}z2.py ${ZOPE_OPTS} & + 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-www/zope/files/2.6.0/zope.envd b/net-www/zope/files/2.6.0/zope.envd index 947139c625c3..0ab9e3fb0df0 100644 --- a/net-www/zope/files/2.6.0/zope.envd +++ b/net-www/zope/files/2.6.0/zope.envd @@ -70,8 +70,8 @@ #-- Esoteric -#Z_MAX_STACK_SIZE -#FORCE_PRODUCT_RELOAD +#Z_MAX_STACK_SIZE= +#FORCE_PRODUCT_RELOAD= diff --git a/net-www/zope/files/digest-zope-2.6.0-r2 b/net-www/zope/files/digest-zope-2.6.0-r2 new file mode 100644 index 000000000000..c2e2d34bcace --- /dev/null +++ b/net-www/zope/files/digest-zope-2.6.0-r2 @@ -0,0 +1 @@ +MD5 a0bb91ca1df775aebfc8ff8c46afa3a9 Zope-2.6.0-src.tgz 2291282 diff --git a/net-www/zope/zope-2.6.0-r2.ebuild b/net-www/zope/zope-2.6.0-r2.ebuild new file mode 100644 index 000000000000..53a49567f85a --- /dev/null +++ b/net-www/zope/zope-2.6.0-r2.ebuild @@ -0,0 +1,125 @@ +# Copyright 1999-2003 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-www/zope/zope-2.6.0-r2.ebuild,v 1.1 2003/02/17 03:57:23 kutsuya Exp $ + +S="${WORKDIR}/Zope-${PV}-src" + +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="2.6" + +KEYWORDS="~x86 ~sparc" + +RDEPEND="=dev-lang/python-2.1.3*" +DEPEND="virtual/glibc + >=sys-apps/sed-4.0.5 + app-admin/zope-config + app-admin/zprod-update + ${RDEPEND}" + +ZUID=zope +ZGID=$(echo ${P} |sed -e "s:\.:_:g") +ZSERVDIR="${DESTTREE}/share/zope/${PF}/" +ZINSTDIR=$"/var/lib/zope/${ZGID}" +CONFDIR="/etc/conf.d/" + +# 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 ! groupmod ${ZGID} > /dev/null 2>&1 ; then + groupadd ${ZGID} || die "Can not add ${ZGID} group!" + fi + if ! id ${ZUID} > /dev/null 2>&1 ; then + useradd -d ${ZSERVDIR} -c "Zope dedicatedr-user" ${ZUID} \ + || die "Can not add ${ZUID} user!" + fi +} + +src_unpack() +{ + unpack ${A} + # DateTime 2.6.0(only) rfc822 fix + einfo "Applying patches..." + bzcat ${FILESDIR}/${PV}/DateTime.py.bz2 \ + > ${S}/lib/python/DateTime/DateTime.py || die "Patch failed" +} + +src_compile() { + python2.1 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/* + + # 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 .templates + mv -f Extensions/ .templates/ + mv -f import/ .templates/ + mv -f var/ .templates/ + + # Add conf.d script. + dodir /etc/conf.d + echo "ZOPE_OPTS=\"-u zope\"" | \ + cat - ${FILESDIR}/${PV}/zope.envd > .templates/zope.confd + + # Fill in environmental variables + sed -i -e "/ZOPE_HOME=/ c\\ZOPE_HOME=${ZSERVDIR}\\ " \ + -e "/SOFTWARE_HOME=/ c\\SOFTWARE_HOME=${ZSERVDIR}/lib/python\\ " \ + .templates/zope.confd + + # Add rc-script. + cp ${FILESDIR}/${PV}/zope-r1.initd .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_config() +{ + install_help +} |