summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJodok Batlogg <batlogg@gentoo.org>2004-07-24 22:26:25 +0000
committerJodok Batlogg <batlogg@gentoo.org>2004-07-24 22:26:25 +0000
commitae7a0c010dbc7a926d734355ddcf91239b44aef0 (patch)
tree866e35d1e81d01f43766345f4ac232a60e7b1d06 /net-zope/zope
parentzope-config-0.4-r1 uses same file dir as zope-config-0.4 (Manifest recommit) (diff)
downloadgentoo-2-ae7a0c010dbc7a926d734355ddcf91239b44aef0.tar.gz
gentoo-2-ae7a0c010dbc7a926d734355ddcf91239b44aef0.tar.bz2
gentoo-2-ae7a0c010dbc7a926d734355ddcf91239b44aef0.zip
cleaning up
Diffstat (limited to 'net-zope/zope')
-rw-r--r--net-zope/zope/files/2.6.1/zope.envd79
-rw-r--r--net-zope/zope/files/2.6.1/zope.initd174
-rw-r--r--net-zope/zope/files/custom_zodb.py7
-rw-r--r--net-zope/zope/files/digest-zope-2.4.0-r62
-rw-r--r--net-zope/zope/files/digest-zope-2.5.12
-rw-r--r--net-zope/zope/files/digest-zope-2.6.41
-rw-r--r--net-zope/zope/files/zctl.py331
-rw-r--r--net-zope/zope/files/zope200
-rw-r--r--net-zope/zope/files/zope.conf21
-rw-r--r--net-zope/zope/files/zope.rc6202
-rw-r--r--net-zope/zope/zope-2.4.0-r6.ebuild117
-rw-r--r--net-zope/zope/zope-2.5.1.ebuild116
-rw-r--r--net-zope/zope/zope-2.6.4.ebuild157
13 files changed, 0 insertions, 1409 deletions
diff --git a/net-zope/zope/files/2.6.1/zope.envd b/net-zope/zope/files/2.6.1/zope.envd
deleted file mode 100644
index 6caea5172fcf..000000000000
--- a/net-zope/zope/files/2.6.1/zope.envd
+++ /dev/null
@@ -1,79 +0,0 @@
-#-- 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.1/zope.initd b/net-zope/zope/files/2.6.1/zope.initd
deleted file mode 100644
index 550d52519f4e..000000000000
--- a/net-zope/zope/files/2.6.1/zope.initd
+++ /dev/null
@@ -1,174 +0,0 @@
-#!/sbin/runscript
-# 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/files/2.6.1/zope.initd,v 1.4 2004/07/18 04:31:00 dragonheart 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
- env /usr/bin/${python} ${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-zope/zope/files/custom_zodb.py b/net-zope/zope/files/custom_zodb.py
deleted file mode 100644
index 1fd2532d8719..000000000000
--- a/net-zope/zope/files/custom_zodb.py
+++ /dev/null
@@ -1,7 +0,0 @@
-import ZEO.ClientStorage, os, string
-
-host=os.environ.get('ZEO_SERVER_NAME', '')
-port=string.atoi(os.environ['ZEO_SERVER_PORT'])
-
-Storage=ZEO.ClientStorage.ClientStorage(
- (host, port), name='ZEO Demo')
diff --git a/net-zope/zope/files/digest-zope-2.4.0-r6 b/net-zope/zope/files/digest-zope-2.4.0-r6
deleted file mode 100644
index 176552c69287..000000000000
--- a/net-zope/zope/files/digest-zope-2.4.0-r6
+++ /dev/null
@@ -1,2 +0,0 @@
-MD5 1a41e096a80411bccf61cd862bc3cc20 Zope-2.4.0-src.tgz 1968422
-MD5 f9477321903f2127abf897d74c3a1457 ZEO-1.0b3.tgz 38077
diff --git a/net-zope/zope/files/digest-zope-2.5.1 b/net-zope/zope/files/digest-zope-2.5.1
deleted file mode 100644
index 96e862d6ce6c..000000000000
--- a/net-zope/zope/files/digest-zope-2.5.1
+++ /dev/null
@@ -1,2 +0,0 @@
-MD5 65d502b2acf986693576decad6b837cf Zope-2.5.1-src.tgz 2165141
-MD5 ba57ebf203f77b7d92510bc06f9d0c0d ZEO-1.0.tgz 44203
diff --git a/net-zope/zope/files/digest-zope-2.6.4 b/net-zope/zope/files/digest-zope-2.6.4
deleted file mode 100644
index 2c61819a6cef..000000000000
--- a/net-zope/zope/files/digest-zope-2.6.4
+++ /dev/null
@@ -1 +0,0 @@
-MD5 4ad8ca2a1ba278881e55312d385f39f1 Zope-2.6.4-src.tgz 2401115
diff --git a/net-zope/zope/files/zctl.py b/net-zope/zope/files/zctl.py
deleted file mode 100644
index adc971c93673..000000000000
--- a/net-zope/zope/files/zctl.py
+++ /dev/null
@@ -1,331 +0,0 @@
-#!/usr/bin/env python
-# -*- python -*-
-
-"""Control Zope and ZEO server if it's configured
-
-Usage:
-
- zctl.py start [confname ...] [--zeo -arg ... [--zope]] -arg ...
-
- zctl.py stop [confname ...]
-
- zctl.py stop_all
-
- zctl.py start_zeo
-
- zctl.py stop_zeo
-
- zctl.py status [confname ...]
-
- zctl.py make_cgi [filename]
-
- zctl.py debug
-
- zctl.py test filename
-
- zctl.py do [-i] [-f filename]* commands
-
- zctl.py script filename
-
-The file 'zope.conf' must exist in the INSTANCE_HOME where 'zctl.py' lives.
-It contains configuration information for Zope, and optionally for ZEO.
-Additional Zope configurations may be defined by creating subdirectories
-of the INSTANCE_HOME containing 'conf.py'. If you specify the name of
-one or more of these subdirectories in a 'zctl.py start' or 'zctl.py stop',
-that configuration will be started or stopped instead of the default.
-
-'zctl.py make_cgi' will write PCGI settings to the file you specify, or to
-'Zope.cgi' if the name is omitted.
-
-'zctl.py debug' will launch an interactive Python session with the Zope
-application object loaded as 'app'.
-
-'zctl.py script filename' will run the Python file in the same type of
-context as provided by 'zctl.py debug'.
-
-
-"""
-
-import sys, os, socket, time, string
-from os.path import isfile, isdir, abspath
-pjoin = os.path.join
-psplit = os.path.split
-env = os.environ
-run = os.system
-
-# Find out where we are, and where Python is.
-if not sys.argv[0]: HERE = '.'
-else: HERE = psplit(sys.argv[0])[0]
-HERE = abspath(HERE)
-PYTHON = '"%s"' % sys.executable
-ZOPE_ENV = {}
-ZEO = {} # ZEO is off by default
-
-# Set INSTANCE_HOME
-INSTANCE_HOME = env['INSTANCE_HOME'] = HERE
-
-# Load configuration data into global variables
-ZOPE_CONFIG = pjoin(HERE, 'zope.conf')
-if not isfile(ZOPE_CONFIG):
- print 'Zope configuration file "zope.conf" not found.'
- sys.exit(1)
-execfile(ZOPE_CONFIG, globals())
-
-# set PYTHONHOME
-env['PYTHONHOME'] = ZOPE_HOME = abspath(ZOPE_HOME)
-
-# add ZEO stuff to environment
-for k, v in ZEO.items():
- env[k] = str(v)
-
-# Commands
-
-def test(args):
- print PYTHON
- print HERE
- print ZOPE_HOME
- print ZEO
-
-def start(args):
- """Start Zope when ZEO is reachable, starting ZEO first if necessary."""
- clients = []
- zeo_args = []
- zope_args = []
- while args and args[0][:1] != '-':
- clients.append(args.pop(0))
- while args:
- if args[0] == '--zeo':
- args.pop(0)
- while args and args[0][:2] != '--':
- zeo_args.append(args.pop(0))
- else:
- if args[0] == '--zope':
- args.pop(0)
- while args and args[0][:2] != '--':
- zope_args.append(args.pop(0))
- if not clients:
- clients.append('default')
-
- cmd = '%s "%s/z2.py" %%s' % (PYTHON, ZOPE_HOME)
- global ZOPE_PORT, ZOPE_LOG, ZOPE_OPTS, ZOPE_ENV, CLIENT_HOME
- for client in clients:
- args = list(zope_args)
- if client != 'default':
- ZOPE_PORT = ZOPE_LOG = ZOPE_OPTS = ''
- CLIENT_HOME = pjoin(HERE, client)
- conf = pjoin(CLIENT_HOME, 'conf.py')
- if not (isdir(CLIENT_HOME) and isfile(conf)):
- print 'Client configuration file "%s" was not found.' % conf
- continue
- execfile(conf, globals())
- args.append('"CLIENT_HOME=%s"' % CLIENT_HOME)
- if ZOPE_OPTS:
- args.insert(0, ZOPE_OPTS)
- if ZOPE_PORT:
- args.insert(0, '-P %s' % ZOPE_PORT)
- if ZOPE_LOG:
- args.append('"STUPID_LOG_FILE=%s"' % ZOPE_LOG)
- for k,v in ZOPE_ENV.items():
- env[k] = str(v)
- if ZEO:
- start_zeo(zeo_args)
- print 'Starting %s Zope...' % client
- run(cmd % string.join(args))
-
-def start_zeo(args):
- """Try to start ZEO."""
- host = ZEO.get('ZEO_SERVER_NAME', 'localhost')
- port = ZEO['ZEO_SERVER_PORT']
- storagearg = ''
- storages = ZEO.get('ZEO_STORAGES', None)
- if storages:
- for id in ZEO['ZEO_STORAGES'].keys():
- storagearg = storagearg + "-S%s=%s " % (id, storages[id])
- if host == 'localhost' and not _check_for_service(host, port):
- stop_zeo(None)
- print "Starting ZEO server on", port
- cmd = '%s %s/lib/python/ZEO/start.py -p %s %s %s &' % (
- PYTHON, ZOPE_HOME, port, storagearg, string.join(args)
- )
- print cmd
- run(cmd)
- count = 0
- while not _check_for_service(host, port):
- count = count + 1
- if count > ZEO_WAIT_BAILOUT:
- print ("ZEO connect failure, on port %s after %d seconds"
- % (port, ZEO_WAIT_BAILOUT))
- sys.exit(1)
- print "waiting for ZEO server to start %d/%d" % (count,
- ZEO_WAIT_BAILOUT)
- time.sleep(1)
- #print "ZEO server ready."
-
-def stop_zeo(args):
- """Stop the ZEO server."""
- try:
- pids = open('%s/var/ZEO_SERVER.pid' % HERE, 'r').read()
- except:
- return
- print "Stopping ZEO pid: %s" % pids
- run('kill %s' % pids)
-
-def stop(args):
- """Stop client(s)."""
- if not args:
- args = ['var']
- for client in args:
- pidf = pjoin(HERE, client, 'Z2.pid')
- if not isfile(pidf):
- print '"%s" was not found' % pidf
- continue
- pids=open(pidf).read()
- print 'Stopping Zope process %s' % pids
- run('kill %s' % open(pidf, 'r').read())
- return
-
-def stop_all(args):
- "Stop clients and ZEO server"
- stop(args)
- stop_zeo(args)
- return
-
-def status(args):
- """Print status."""
- print "NAME\tPORT\tPIDS"
- if ZEO:
- host = ZEO.get('ZEO_SERVER_NAME', 'localhost')
- port = ZEO['ZEO_SERVER_PORT']
- pids = ''
- if _check_for_service(host, port):
- if host == 'localhost':
- pids = open('%s/var/ZEO_SERVER.pid' % HERE, 'r').read()
- else:
- pids = 'unknown'
- print "ZEO\t%s\t%s" % (port, pids)
- if not args:
- import glob
- for client in glob.glob('%s/*/conf.py' % HERE):
- args.append(psplit(psplit(client)[0])[1])
- for client in args:
- pidf = pjoin(HERE, client, 'Z2.pid')
- if isfile(pidf):
- pids = open(pidf, 'r').read()
- else:
- pids = 'not found'
- print '%s\t%s\t%s' % (client, '', pids)
-
-def make_cgi(args):
- """Create a PCGI parameter file."""
- if args:
- fname = args.pop(0)
- else:
- fname = 'Zope.cgi'
- write = open(fname, 'w').write
- write('''\
-#!%(ZOPE_HOME)s/pcgi/pcgi-wrapper
-PCGI_NAME=Zope
-PCGI_MODULE_PATH=%(ZOPE_HOME)s/lib/python/Zope
-PCGI_PUBLISHER=%(ZOPE_HOME)s/pcgi/pcgi_publisher.py
-PCGI_EXE=%(PYTHON)s
-PCGI_SOCKET_FILE=%(HERE)s/var/pcgi.soc
-PCGI_PID_FILE=%(HERE)s/var/pcgi.pid
-PCGI_ERROR_LOG=%(HERE)s/var/pcgi.log
-PCGI_DISPLAY_ERRORS=1
-BOBO_REALM=Zope
-BOBO_DEBUG_MODE=1
-INSTANCE_HOME=%(HERE)s
-''' % globals())
-
-def script(args):
- """Execute a Python script"""
- if ZEO:
- start_zeo([])
- for k,v in ZOPE_ENV.items():
- env[k] = str(v)
- os.chdir(pjoin(ZOPE_HOME, 'lib', 'python'))
- options = "-c"
- script_name = os.path.join(HERE, args[0])
- cmd = ("%s %s 'import Zope; HERE=\"%s\"; app=Zope.app(); execfile(\"%s\")'"
- % (PYTHON, options, HERE, script_name))
- #print cmd
- run(cmd)
-
-
-def do(args):
- """Execute python commands"""
- if ZEO:
- start_zeo([])
- for k,v in ZOPE_ENV.items():
- env[k] = str(v)
- os.chdir(pjoin(ZOPE_HOME, 'lib', 'python'))
- msg = """
- Zope debugging session for %s
- The root application object is bound to name 'app'.
- To let other people see your changes, you must:
- get_transaction().commit()
- To see other people's changes, you must:
- app._p_jar.sync()""" % HERE
- options = "-c"
- if not args or '-i' in args:
- options = '-i ' + options
- if args:
- args.remove('-i')
- print msg
- while '-f' in args:
- fpos = args.index('-f')
- args.pop(fpos)
- args[fpos] = 'execfile("%s");' % args[fpos]
- cmd = ("%s %s 'import Zope; app=Zope.app(); %s'"
- % (PYTHON, options, string.join(args, " ")))
- run(cmd)
-
-def debug(args):
- """Start an interactive debugging session"""
- args.insert(0, '-i')
- do(args)
-
-def test(args):
- """Run tests"""
- args[0] = os.path.abspath(args[0])
- args.insert(0, '-f')
- do(args)
-
-# Internal helper functions
-
-def _check_for_service(host, port):
- """Return 1 if server is found at (host, port), 0 otherwise."""
- s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
- try:
- s.connect((host, int(port)))
- return 1
- except socket.error:
- return 0
-
-def _dispatch():
- """Dispatch command line invocation."""
- if len(sys.argv) == 1:
- print """\
- start [confname ...] [--zeo -arg ... [--zope]] -arg ...
- stop [confname ...]
- stop_all
- start_zeo
- stop_zeo
- status [confname ...]
- make_cgi [filename]
- debug
- test filename
- do [-i] [-f filename]* commands
- script filename
-"""
- args = string.split(raw_input('command: '))
- else:
- args = sys.argv[1:]
- action = string.lower(args.pop(0))
- if action[:1] == '_':
- print 'Invalid action "%s"' % action
- sys.exit(1)
- globals()[action](args)
-
-if __name__ == "__main__":
- _dispatch()
diff --git a/net-zope/zope/files/zope b/net-zope/zope/files/zope
deleted file mode 100644
index e35c1f9f1e3b..000000000000
--- a/net-zope/zope/files/zope
+++ /dev/null
@@ -1,200 +0,0 @@
-#!/bin/sh
-# Copyright (c) 1995-1998 SuSE GmbH Nuernberg, Germany.
-#
-# Author: Vojtech Bubnik <bubnikv@suse.cz>
-# Based on script from: Jeff Rush <jrush@taupro.com>
-# modified for gentoo linux by Holger Brueckner <darks@gentoo.org>
-#RCUPDATE:3 4:99
-
-. /etc/rc.d/config/functions
-
-USEZEO="`/usr/lib/portage/bin/use zeo`"
-
-SERVICE=zope
-opts="start stop restart status"
-
-export INSTANCE_HOME=/var/lib/zope
-export INSTANCE_NAME=`basename ${INSTANCE_HOME}`
-export ZOPE_HOME=/usr/share/zope
-export ZOPE_PORT=80
-export ZOPE_LOG="/var/log/zope"
-export ZEO_SERVER_PORT=5800
-export ZEO_SERVER_NAME="localhost"
-
-ZOPE_PCGI="no"
-
-# Logging to a remote server using syslogd can
-# be done by using ZSYSLOG_SERVER instead if ZYSLOG. If you do not define
-# either of the ZSYSLOG* env vars, logging goes to the file specified by
-# the -l <file> command argument instead.
-
-# Note: For syslog logging to work from the ZServer/medusa subsystem, the
-# ZSYSLOG variable must now contain the name of the socket to log to,
-# usually /dev/log on Unix machines.
-
-#export ZSYSLOG="/dev/log"
-#export ZSYSLOG_SERVER="localhost:514"
-
-start_zope() {
-
- cd ${INSTANCE_HOME}
- if [ $ZOPE_PCGI = "yes" ] ; then
- /usr/bin/env python z2.py \
- -p $INSTANCE_HOME/Zope.cgi \
- -u nobody \
- -z $ZOPE_HOME \
- -Z /var/run/zwatchdog.pid \
- -w '' \
- -f 8021 \
- -m '' \
- -l $ZOPE_LOG \
- 2>&1 >> /var/log/zope \
- &
- else
- if [ $USEZEO ]; then
- export PYTHONPATH=/usr/lib/python2.1/:/usr/lib/python2.1/lib-dynload/
- /usr/bin/env python zctl.py start_zeo
- unset PYTHONPATH
- /usr/bin/env python z2.py \
- -u nobody \
- -p - \
- -z $ZOPE_HOME \
- -Z /var/run/zwatchdog.pid \
- -w $ZOPE_PORT \
- -f 8021 \
- -W 8023 \
- -m '' \
- -l $ZOPE_LOG \
- -D \
- 2>&1 >> /var/log/zope \
- &
- else
- /usr/bin/env python z2.py \
- -u nobody \
- -p - \
- -z $ZOPE_HOME \
- -Z /var/run/zwatchdog.pid \
- -w $ZOPE_PORT \
- -f 8021 \
- -W 8023 \
- -m '' \
- -l $ZOPE_LOG \
- -D \
- 2>&1 >> /var/log/zope \
- &
- fi
- fi
-
-}
-
-# A function to find the pid of a program. We cannot use checkproc,
-# because we are handling scripts.
-pidofproc() {
- # First try the "$INSTANCE_HOME/var/Z2.pid" file
- if [ -f ${INSTANCE_HOME}/var/Z2.pid ] ; then
- if [ "$1" = "zwatchdog" ] ; then
- pid=`sed -e 's/^\([0-9]\+\) [0-9]\+/\1/' ${INSTANCE_HOME}/var/Z2.pid`
- else
- if [ "$1" = "zserver" ] ; then
- pid=`sed -e 's/^[0-9]\+ \([0-9]\+\)/\1/' ${INSTANCE_HOME}/var/Z2.pid`
- fi
- fi
-
- if [ "$pid" != "" ] ; then
- echo $pid
- return 0
- fi
- fi
-
- # Next try "/var/run/*.pid" files
- if [ -f /var/run/$1.pid ] ; then
- pid=`head -n1 /var/run/$1.pid`
- if [ "$pid" != "" ] ; then
- echo $pid
- return 0
- fi
- fi
-
- # Next try "pidof"
- pid=`pidof -o $$ -o $PPID -o %PPID -x $1`
- if [ "$pid" != "" ] ; then
- echo $pid
- return 0
- fi
-}
-
-# Extracted from 'functions' to fix a tiny bug where it uses 'pidof'
-# but should be using 'pidofproc'.
-chkstatus() {
- # First try "pidofproc"
- pid=`pidofproc $1`
- if [ "$pid" != "" ] && ps h $pid >/dev/null 2>&1 ; then
- echo "$1 (pid $pid) is running..."
- return 0
- else
- pid=`pidof -o $$ -o $PPID -o %PPID -x $1`
- if [ "$pid" != "" ] ; then
- echo "$1 (pid $pid) is running..."
- return 0
- fi
- fi
-
- # Next try "/var/run/*.pid" files
- if [ -f /var/run/$1.pid ] ; then
- pid=`head -n 1 /var/run/$1.pid`
- if [ "$pid" != "" ] ; then
- echo "$1 dead but pid file exists"
- return 1
- fi
- fi
-
- # See if /var/lock/subsys/$1 exists
- if [ -f /var/lock/subsys/$1 ]; then
- echo "$1 dead but subsys locked"
- return 2
- fi
- echo "$1 is stopped"
- return 3
-}
-
-start() {
- ebegin "Starting zope"
- # See if it's already running.
- zw_pid=`pidofproc zwatchdog`
- zs_pid=`pidofproc zserver`
- if ( [ -z "$zw_pid" ] || ! ps h $zw_pid >/dev/null 2>&1 ) && \
- ( [ -z "$zs_pid" ] || ! ps h $zs_pid >/dev/null 2>&1 ) ; then
- rm -f ${INSTANCE_HOME}/var/Z2.pid
- start_zope
- ret=$?
- fi
- eend $ret "Error starting $SERVICE"
- }
-stop(){
- ebegin "Shutting down zope"
- pid=`pidofproc zwatchdog`
- [ -n "$pid" ] && (kill $pid 2>&1 >/dev/null)
- pid=`pidofproc zserver`
- [ -n "$pid" ] && (kill $pid 2>&1 >/dev/null)
- rm -f ${INSTANCE_HOME}/var/Z2.pid /var/run/zwatchdog.pid
- if [ $USEZEO ]; then
- /usr/bin/env python ${INSTANCE_HOME}/zctl.py stop_zeo
- fi
- eend $? "Error stopping $SERVICE"
- }
-
-restart(){
- stop
- start
- }
-
-status(){
- echo "Checking for zope: "
- chkstatus zwatchdog
- chkstatus zserver
- if [ $USEZEO ]; then
- /usr/bin/env python ${INSTANCE_HOME}/zctl.py status
- fi
- }
-
-doservice ${@}
diff --git a/net-zope/zope/files/zope.conf b/net-zope/zope/files/zope.conf
deleted file mode 100644
index 52a967c4a6ec..000000000000
--- a/net-zope/zope/files/zope.conf
+++ /dev/null
@@ -1,21 +0,0 @@
-"""zope.conf - zctl.py Zope/ZEO startup settings
-This is execfile'd in the context of the zctl.py script.
-Here are a few handy python var settings (see 'zctl.py for more):
-HERE - the absoluted path of zctl.py's working directory
-pjoin - os.path.join
-"""
-## Zope ##
-ZOPE_HOME = env['ZOPE_HOME']
-ZOPE_OPTS = '-p - -f -'
-ZOPE_PORT = env['ZOPE_PORT']
-ZOPE_LOG = env['ZOPE_LOG']
-ZOPE_ENV['PRODUCTS_PATH'] = ("%(SOFTWARE_PRODUCTS)s:"
- + pjoin(HERE, '..', 'OtherProducts')
- + ":%(INSTANCE_PRODUCTS)s")
-## ZEO ##
-# 'localhost' will be used if ZEO_SERVER_NAME has no setting.
-ZEO['ZEO_SERVER_NAME'] = env['ZEO_SERVER_NAME']
-# You must specify a ZEO_SERVER_PORT.
-ZEO['ZEO_SERVER_PORT'] = env['ZEO_SERVER_PORT']
-ZEO['STUPID_LOG_FILE'] = pjoin(HERE, 'var', 'ZEO_Server.log')
-ZEO_WAIT_BAILOUT = 200 # Don't try for more than num seconds
diff --git a/net-zope/zope/files/zope.rc6 b/net-zope/zope/files/zope.rc6
deleted file mode 100644
index a437b190bafa..000000000000
--- a/net-zope/zope/files/zope.rc6
+++ /dev/null
@@ -1,202 +0,0 @@
-#!/bin/sh
-# Copyright (c) 1995-1998 SuSE GmbH Nuernberg, Germany.
-#
-# Author: Vojtech Bubnik <bubnikv@suse.cz>
-# Based on script from: Jeff Rush <jrush@taupro.com>
-# modified for gentoo linux by Holger Brueckner <darks@gentoo.org>
-#RCUPDATE:3 4:99
-
-depend() {
- need net
-}
-
-USEZEO="`/usr/lib/portage/bin/use zeo`"
-
-SERVICE=zope
-opts="start stop restart status"
-
-export INSTANCE_HOME=/var/lib/zope
-export INSTANCE_NAME=`basename ${INSTANCE_HOME}`
-export ZOPE_HOME=/usr/share/zope
-export ZOPE_PORT=80
-export ZOPE_LOG="/var/log/zope"
-export ZEO_SERVER_PORT=5800
-export ZEO_SERVER_NAME="localhost"
-
-ZOPE_PCGI="no"
-
-# Logging to a remote server using syslogd can
-# be done by using ZSYSLOG_SERVER instead if ZYSLOG. If you do not define
-# either of the ZSYSLOG* env vars, logging goes to the file specified by
-# the -l <file> command argument instead.
-
-# Note: For syslog logging to work from the ZServer/medusa subsystem, the
-# ZSYSLOG variable must now contain the name of the socket to log to,
-# usually /dev/log on Unix machines.
-
-#export ZSYSLOG="/dev/log"
-#export ZSYSLOG_SERVER="localhost:514"
-
-start_zope() {
-
- cd ${INSTANCE_HOME}
- if [ $ZOPE_PCGI = "yes" ] ; then
- /usr/bin/env python z2.py \
- -p $INSTANCE_HOME/Zope.cgi \
- -u nobody \
- -z $ZOPE_HOME \
- -Z /var/run/zwatchdog.pid \
- -w '' \
- -f 8021 \
- -m '' \
- -l $ZOPE_LOG \
- 2>&1 >> /var/log/zope \
- &
- else
- if [ $USEZEO ]; then
- export PYTHONPATH=/usr/lib/python2.1/:/usr/lib/python2.1/lib-dynload/
- /usr/bin/env python zctl.py start_zeo
- unset PYTHONPATH
- /usr/bin/env python z2.py \
- -u nobody \
- -p - \
- -z $ZOPE_HOME \
- -Z /var/run/zwatchdog.pid \
- -w $ZOPE_PORT \
- -f 8021 \
- -W 8023 \
- -m '' \
- -l $ZOPE_LOG \
- -D \
- 2>&1 >> /var/log/zope \
- &
- else
- /usr/bin/env python z2.py \
- -u nobody \
- -p - \
- -z $ZOPE_HOME \
- -Z /var/run/zwatchdog.pid \
- -w $ZOPE_PORT \
- -f 8021 \
- -W 8023 \
- -m '' \
- -l $ZOPE_LOG \
- -D \
- 2>&1 >> /var/log/zope \
- &
- fi
- fi
-
-}
-
-# A function to find the pid of a program. We cannot use checkproc,
-# because we are handling scripts.
-pidofproc() {
- # First try the "$INSTANCE_HOME/var/Z2.pid" file
- if [ -f ${INSTANCE_HOME}/var/Z2.pid ] ; then
- if [ "$1" = "zwatchdog" ] ; then
- pid=`sed -e 's/^\([0-9]\+\) [0-9]\+/\1/' ${INSTANCE_HOME}/var/Z2.pid`
- else
- if [ "$1" = "zserver" ] ; then
- pid=`sed -e 's/^[0-9]\+ \([0-9]\+\)/\1/' ${INSTANCE_HOME}/var/Z2.pid`
- fi
- fi
-
- if [ "$pid" != "" ] ; then
- echo $pid
- return 0
- fi
- fi
-
- # Next try "/var/run/*.pid" files
- if [ -f /var/run/$1.pid ] ; then
- pid=`head -n1 /var/run/$1.pid`
- if [ "$pid" != "" ] ; then
- echo $pid
- return 0
- fi
- fi
-
- # Next try "pidof"
- pid=`pidof -o $$ -o $PPID -o %PPID -x $1`
- if [ "$pid" != "" ] ; then
- echo $pid
- return 0
- fi
-}
-
-# Extracted from 'functions' to fix a tiny bug where it uses 'pidof'
-# but should be using 'pidofproc'.
-chkstatus() {
- # First try "pidofproc"
- pid=`pidofproc $1`
- if [ "$pid" != "" ] && ps h $pid >/dev/null 2>&1 ; then
- echo "$1 (pid $pid) is running..."
- return 0
- else
- pid=`pidof -o $$ -o $PPID -o %PPID -x $1`
- if [ "$pid" != "" ] ; then
- echo "$1 (pid $pid) is running..."
- return 0
- fi
- fi
-
- # Next try "/var/run/*.pid" files
- if [ -f /var/run/$1.pid ] ; then
- pid=`head -n 1 /var/run/$1.pid`
- if [ "$pid" != "" ] ; then
- echo "$1 dead but pid file exists"
- return 1
- fi
- fi
-
- # See if /var/lock/subsys/$1 exists
- if [ -f /var/lock/subsys/$1 ]; then
- echo "$1 dead but subsys locked"
- return 2
- fi
- echo "$1 is stopped"
- return 3
-}
-
-start() {
- ebegin "Starting zope"
- # See if it's already running.
- zw_pid=`pidofproc zwatchdog`
- zs_pid=`pidofproc zserver`
- if ( [ -z "$zw_pid" ] || ! ps h $zw_pid >/dev/null 2>&1 ) && \
- ( [ -z "$zs_pid" ] || ! ps h $zs_pid >/dev/null 2>&1 ) ; then
- rm -f ${INSTANCE_HOME}/var/Z2.pid
- start_zope
- ret=$?
- fi
- eend $ret "Error starting $SERVICE"
- }
-stop(){
- ebegin "Shutting down zope"
- pid=`pidofproc zwatchdog`
- [ -n "$pid" ] && (kill $pid 2>&1 >/dev/null)
- pid=`pidofproc zserver`
- [ -n "$pid" ] && (kill $pid 2>&1 >/dev/null)
- rm -f ${INSTANCE_HOME}/var/Z2.pid /var/run/zwatchdog.pid
- if [ $USEZEO ]; then
- /usr/bin/env python ${INSTANCE_HOME}/zctl.py stop_zeo
- fi
- eend $? "Error stopping $SERVICE"
- }
-
-restart(){
- stop
- start
- }
-
-status(){
- echo "Checking for zope: "
- chkstatus zwatchdog
- chkstatus zserver
- if [ $USEZEO ]; then
- /usr/bin/env python ${INSTANCE_HOME}/zctl.py status
- fi
- }
-
-
diff --git a/net-zope/zope/zope-2.4.0-r6.ebuild b/net-zope/zope/zope-2.4.0-r6.ebuild
deleted file mode 100644
index 32f74e8510f6..000000000000
--- a/net-zope/zope/zope-2.4.0-r6.ebuild
+++ /dev/null
@@ -1,117 +0,0 @@
-# Copyright 1999-2004 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-zope/zope/zope-2.4.0-r6.ebuild,v 1.11 2004/07/13 23:55:01 batlogg Exp $
-
-S=${WORKDIR}/Zope-${PV}-src
-DESCRIPTION="Zope is web application platform used for building high-performance, dynamic web sites."
-SRC_URI="http://www.zope.org/Products/Zope/${PV}/Zope-${PV}-src.tgz
- http://www.zope.org/Products/ZEO/ZEO-1.0b3.tgz"
-HOMEPAGE="http://www.zope.org"
-
-DEPEND="virtual/libc
- =dev-lang/python-2.1*"
-RDEPEND="=dev-lang/python-2.1*"
-KEYWORDS="x86 sparc "
-SLOT="${PV}"
-LICENSE="as-is"
-IUSE=""
-
-src_unpack() {
-
- unpack Zope-${PV}-src.tgz
-
- if use zeo; then
- cd ${S}/lib/python
- unpack ZEO-1.0b3.tgz
- mv ZEO-1.0b3/ZEO ${S}/lib/python
- rm -rf ZEO-1.0b3
- fi
-}
-
-src_compile() {
- python2.1 w_pcgi.py || die
-}
-
-src_install () {
-
- ZDIR=/usr/share/zope
- ZVAR=/var/lib/zope
-
-
- dodir ${ZDIR}/var
- insinto ${ZDIR}
- doins w_pcgi.py wo_pcgi.py
-
- dodir ${ZDIR}/lib
- cp -a lib/* ${D}${ZDIR}/lib/
- cp -a ZServer utilities ${D}${ZDIR}
- rm ${D}${ZDIR}/ZServer/*.txt
- exeinto ${ZDIR}/pcgi
- doexe pcgi/pcgi-wrapper pcgi/pcgi_publisher.py
-
- dodir ${ZDIR}/inst
- cp -a inst/* ${D}${ZDIR}/inst
-
- dodir ${ZDIR}/pcgi
- cp -a pcgi/* ${D}${ZDIR}/pcgi
-
- cd ${S}
- fperms a+x ${ZDIR}/lib/python/zdaemon.py
- fperms a+x ${ZDIR}/lib/python/StructuredText/StructuredText.py
- fperms a+x ${ZDIR}/lib/python/ZPublisher/Client.py
-
- dodir ${ZVAR}
- insinto ${ZVAR}
- doins z2.py
- insinto ${ZVAR}/var
- insopts -m644
- doins var/Data.fs.in
- dodir ${ZVAR}/Extensions
- dodir ${ZVAR}/import
- dodir ${ZVAR}/Products
-
- if use zeo; then
- insinto ${ZVAR}
- doins ${FILESDIR}/zctl.py ${FILESDIR}/zope ${FILESDIR}/zope.conf ${FILESDIR}/custom_zodb.py
- fi
-
- exeinto ${ZDIR}
- doexe zpasswd.py Zope.cgi
-
- cd ${D}${ZDIR}
- sed -e "s:${WORKDIR}:${ZDIR}:g" Zope.cgi > Zope.cgi.tmp
- mv Zope.cgi.tmp Zope.cgi
- sed -e "s:${WORKDIR}:${ZVAR}:g" stop > stop.tmp
- mv stop.tmp stop
-
- dodir /etc/init.d
- exeinto /etc/init.d
- newexe ${FILESDIR}/zope.rc6 zope
- chown nobody:users ${ZVAR}/var/*
-}
-
-pkg_postinst() {
- if [ ! -f ${ROOT}/var/lib/zope/var/Data.fs ]
- then
- echo "Installing Data.fs from template..."
- cd ${ROOT}/var/lib/zope/var
- cp Data.fs.in Data.fs
- echo
- echo "Fixing permissions..."
- chown nobody:nogroup -R ${ROOT}/var/lib/zope/var
- chmod 600 ${ROOT}/var/lib/zope/var/Data.fs
- echo
- fi
- if [ ! -f ${ROOT}/var/lib/zope/access ]
- then
- echo "You must run"
- echo
- echo /usr/share/zope/zpasswd.py /var/lib/zope/inituser
- if use zeo; then
- echo and edit /var/lib/zope/zope.conf
- fi
-
- echo
- echo before you can start zope
- fi
-}
diff --git a/net-zope/zope/zope-2.5.1.ebuild b/net-zope/zope/zope-2.5.1.ebuild
deleted file mode 100644
index 04152ce1dfa7..000000000000
--- a/net-zope/zope/zope-2.5.1.ebuild
+++ /dev/null
@@ -1,116 +0,0 @@
-# Copyright 1999-2004 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-zope/zope/zope-2.5.1.ebuild,v 1.11 2004/07/13 23:55:01 batlogg Exp $
-
-S=${WORKDIR}/Zope-${PV}-src
-DESCRIPTION="Zope is web application platform used for building high-performance, dynamic web sites."
-SRC_URI="http://www.zope.org/Products/Zope/${PV}/Zope-${PV}-src.tgz
- http://www.zope.org/Products/ZEO/ZEO-1.0.tgz"
-HOMEPAGE="http://www.zope.org"
-
-DEPEND="virtual/libc
- =dev-lang/python-2.1.3*"
-SLOT="${PV}"
-LICENSE="as-is"
-KEYWORDS="x86 sparc "
-IUSE=""
-
-src_unpack() {
-
- unpack Zope-${PV}-src.tgz
-
- if use zeo; then
- cd ${S}/lib/python
- unpack ZEO-1.0.tgz
- mv ZEO-1.0/ZEO ${S}/lib/python
- rm -rf ZEO-1.0
- fi
-}
-
-src_compile() {
- python2.1 w_pcgi.py || die
-}
-
-src_install () {
-
- ZDIR=/usr/share/zope
- ZVAR=/var/lib/zope
-
-
- dodir ${ZDIR}/var
- insinto ${ZDIR}
- doins w_pcgi.py wo_pcgi.py
-
- dodir ${ZDIR}/lib
- cp -a lib/* ${D}${ZDIR}/lib/
- cp -a ZServer utilities ${D}${ZDIR}
- rm ${D}${ZDIR}/ZServer/*.txt
- exeinto ${ZDIR}/pcgi
- doexe pcgi/pcgi-wrapper pcgi/pcgi_publisher.py
-
- dodir ${ZDIR}/inst
- cp -a inst/* ${D}${ZDIR}/inst
-
- dodir ${ZDIR}/pcgi
- cp -a pcgi/* ${D}${ZDIR}/pcgi
-
- cd ${S}
- fperms a+x ${ZDIR}/lib/python/zdaemon.py
- fperms a+x ${ZDIR}/lib/python/StructuredText/StructuredText.py
- fperms a+x ${ZDIR}/lib/python/ZPublisher/Client.py
-
- dodir ${ZVAR}
- insinto ${ZVAR}
- doins z2.py
- insinto ${ZVAR}/var
- insopts -m644
- doins var/Data.fs.in
- dodir ${ZVAR}/Extensions
- dodir ${ZVAR}/import
- dodir ${ZVAR}/Products
-
- if use zeo; then
- insinto ${ZVAR}
- doins ${FILESDIR}/zctl.py ${FILESDIR}/zope ${FILESDIR}/zope.conf ${FILESDIR}/custom_zodb.py
- fi
-
- exeinto ${ZDIR}
- doexe zpasswd.py Zope.cgi
-
- cd ${D}${ZDIR}
- sed -e "s:${WORKDIR}:${ZDIR}:g" Zope.cgi > Zope.cgi.tmp
- mv Zope.cgi.tmp Zope.cgi
- sed -e "s:${WORKDIR}:${ZVAR}:g" stop > stop.tmp
- mv stop.tmp stop
-
- dodir /etc/init.d
- exeinto /etc/init.d
- newexe ${FILESDIR}/zope.rc6 zope
- chown nobody:users ${D}/${ZVAR}/var/*
-}
-
-pkg_postinst() {
- if [ ! -f ${ROOT}/var/lib/zope/var/Data.fs ]
- then
- echo "Installing Data.fs from template..."
- cd ${ROOT}/var/lib/zope/var
- cp Data.fs.in Data.fs
- echo
- echo "Fixing permissions..."
- chown nobody:nogroup -R ${ROOT}/var/lib/zope/var
- chmod 600 ${ROOT}/var/lib/zope/var/Data.fs
- echo
- fi
- if [ ! -f ${ROOT}/var/lib/zope/access ]
- then
- echo "You must run"
- echo
- echo /usr/share/zope/zpasswd.py /var/lib/zope/inituser
- if use zeo; then
- echo and edit /var/lib/zope/zope.conf
- fi
-
- echo
- echo before you can start zope
- fi
-}
diff --git a/net-zope/zope/zope-2.6.4.ebuild b/net-zope/zope/zope-2.6.4.ebuild
deleted file mode 100644
index 17f300a05982..000000000000
--- a/net-zope/zope/zope-2.6.4.ebuild
+++ /dev/null
@@ -1,157 +0,0 @@
-# Copyright 1999-2004 Gentoo Foundation
-# 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.7 2004/07/13 23:55:01 batlogg Exp $
-
-inherit eutils
-
-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="${PV}"
-IUSE=""
-
-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
-# 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/libc
- >=sys-apps/sed-4.0.5
- >=app-admin/zope-config-0.3"
-
-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}
-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."
- ewarn "Python-2.3 is known NOT to work."
- 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/*
-
- # 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}/2.6.1/zope.envd .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 rc-script.
- #!! TODO: fill in $python in zope-r2.initd
- sed -e "/python=/ c\\python=\"${python}\"\\ " ${FILESDIR}/2.6.1/${RCNAME} \
- > .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
-}