]> git.pld-linux.org Git - packages/Zope.git/commitdiff
- Zope 2.7.0 merged from DEVEL (2.6.2 won't work with python from HEAD anyway)
authorJacek Konieczny <jajcus@pld-linux.org>
Sun, 16 Nov 2003 09:10:22 +0000 (09:10 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    Zope-http-virtual-cache.patch -> 1.3
    Zope-python-2.3.2.patch -> 1.2
    Zope-start.sh -> 1.4
    Zope.init -> 1.11
    Zope.instance -> 1.4
    Zope.logrotate -> 1.3
    Zope.sysconfig -> 1.2

Zope-http-virtual-cache.patch [deleted file]
Zope-python-2.3.2.patch [new file with mode: 0644]
Zope-start.sh [deleted file]
Zope.init
Zope.instance [deleted file]
Zope.logrotate
Zope.sysconfig

diff --git a/Zope-http-virtual-cache.patch b/Zope-http-virtual-cache.patch
deleted file mode 100644 (file)
index 82e9307..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
---- Zope-2.6.2b5-src.orig/lib/python/Products/StandardCacheManagers/AcceleratedHTTPCacheManager.py 2002-08-14 18:25:12.000000000 -0400
-+++ Zope-2.6.2b5-src/lib/python/Products/StandardCacheManagers/AcceleratedHTTPCacheManager.py 2003-02-27 16:26:02.000000000 -0500
-@@ -45,7 +45,7 @@
-         phys_path = ob.getPhysicalPath()
-         if self.hit_counts.has_key(phys_path):
-             del self.hit_counts[phys_path]
--        ob_path = quote('/'.join(phys_path))
-+        ob_path = '/'+ob.absolute_url(relative=1)
-         results = []
-         for url in self.notify_urls:
-             if not url:
-@@ -57,6 +57,8 @@
-                 u = 'http://' + url
-             (scheme, host, path, params, query, fragment
-              ) = urlparse.urlparse(u)
-+            if path[:8].lower() == '/http://':
-+                path = path[1:]
-             if path[-1:] == '/':
-                 p = path[:-1] + ob_path
-             else:
-@@ -67,6 +69,12 @@
-             errcode, errmsg, headers = h.getreply()
-             h.getfile().read()  # Mandatory for httplib?
-             results.append('%s %s' % (errcode, errmsg))
-+            if p[-11:]=='/index_html':
-+                h.putrequest('PURGE',p[:-10])
-+                h.endheaders()
-+                errcode, errmsg, headers = h.getreply()
-+                h.getfile().read()  # Mandatory for httplib?
-+                results.append('%s %s' % (errcode, errmsg))
-         return 'Server response(s): ' + ';'.join(results)
-
-     def ZCache_get(self, ob, view_name, keywords, mtime_func, default):
diff --git a/Zope-python-2.3.2.patch b/Zope-python-2.3.2.patch
new file mode 100644 (file)
index 0000000..920db6c
--- /dev/null
@@ -0,0 +1,32 @@
+diff -durN Zope-2.7.0-b2.orig/configure Zope-2.7.0-b2/configure
+--- Zope-2.7.0-b2.orig/configure       Fri Aug 22 16:07:55 2003
++++ Zope-2.7.0-b2/configure    Wed Nov 12 17:42:58 2003
+@@ -19,7 +19,7 @@
+ # sys.version) below in "best" to "worst" order, not including the
+ # target version.  Up to six acceptable python versions are allowed.
+ # Do not include the target version number in this list!
+-ACCEPTABLE="2.2.2 2.3 2.3b1 2.3a1 2.3a0"
++ACCEPTABLE="2.2.2 2.3 2.3b1 2.3a1 2.3a0 2.3.2"
+ # provide the executable names for all the acceptable versions
+ # (and the target version) below
+@@ -113,7 +113,8 @@
+         out ""
+         out "  The optimimum Python version ($TARGET) was found at $FOUND."
+     elif [ -z "$FOUND1" ] && [ -z "$FOUND2" ] && [ -z "$FOUND3" ] &&
+-         [ -z "$FOUND4" ] && [ -z "$FOUND5" ] && [ -z "$FOUND6" ] ; then
++         [ -z "$FOUND4" ] && [ -z "$FOUND5" ] && [ -z "$FOUND6" ] &&
++       [ -z "$FOUND7" ] ; then
+         out ""
+         out "  No suitable Python version found.  You should install"
+         out "  Python version $TARGET before continuing.  Versions"
+@@ -138,6 +139,9 @@
+         elif [ -n "$FOUND6" ]; then
+             FOUND=$FOUND6
+             FOUNDVERSION=$FOUNDVERSION6
++        elif [ -n "$FOUND7" ]; then
++            FOUND=$FOUND7
++            FOUNDVERSION=$FOUNDVERSION7
+         fi
+         out ""
+         out "  !! WARNING !! "
diff --git a/Zope-start.sh b/Zope-start.sh
deleted file mode 100644 (file)
index 3e8eea2..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-#! /bin/sh
-
-# This is Zope ZServer startscript for PLD Linux
-#
-
-ZOPE_BASE=/usr/lib/zope
-CLIENT_HOME=$INSTANCE_HOME/var
-
-# prepare directories
-
-if [ "x$ZOPE_USER" = "x" ]; then
-    ZOPE_USER="zope"
-fi
-
-ZOPE_GROUP=`id -ng $ZOPE_USER`
-
-if [ ! -d $INSTANCE_HOME ]; then
-    mkdir $INSTANCE_HOME
-fi
-
-chmod 1701 $INSTANCE_HOME
-chown root:$ZOPE_GROUP $INSTANCE_HOME
-
-if [ ! -d $INSTANCE_HOME/var ]; then
-    mkdir $INSTANCE_HOME/var
-fi
-
-chown root:$ZOPE_GROUP $INSTANCE_HOME/var
-chmod 1701 $INSTANCE_HOME/var
-
-if [ ! -d /var/log/zope ]; then
-    mkdir /var/log/zope
-    chmod o-rwx /var/log/zope
-    chown root:root /var/log/zope
-fi
-
-# prepare parameters
-
-if [ "$WATCHDOG" = "0" ]; then
-    manager=
-else
-    manager="-Z 1"
-fi
-
-if [ "x$CGIBIN_BASE" = "x" ]; then
-    p_string=" "
-else
-    p_string="-p $CGIBIN_FILE"
-fi
-
-if [ "x$DEBUG_MODE" = "xyes" -o "x$DEBUG_MODE" = "x1" ]; then
-    debugging="-D 1"
-else
-    debugging=
-fi
-
-if [ "x$LOG_FILE" = "x" -o "x$LOG_FILE" = "x0" ]; then
-    LOG_FILE=/var/log/zope/$INSTANCE_NAME.log
-fi
-
-if [ "x$DETAILED_LOG_FILE" = "x" -o "x$DETAILED_LOG_FILE" = "x0" ]; then
-    details=
-else
-    if [ "x$DETAILED_LOG_FILE" = "xyes" -o "x$DETAILED_LOG_FILE" = "x1" ]; then
-       details="-M /var/log/zope/$INSTANCE_NAME-detailed.log"
-    else
-       details="-M $DETAILED_LOG_FILE"
-    fi
-fi
-
-if [ "x$LOC" != "x" ]; then
-    locale="-L $LOC"
-else
-    locale=
-fi
-
-if [ "x$ICP_PORT" = "x" -o "x$ICP_PORT" = "x0" ]; then
-    icpstr=" "
-else
-    icpstr="--icp $ICP_PORT"
-fi
-
-if [ "x$IP_ADDRESS" = "x" -o "x$IP_ADDRESS" = "x0" ]; then
-    ipstr=" "
-else
-    ipstr="-a '$IP_ADDRESS'"
-fi
-
-# show what we're going to do
-
-if [ "x$debugging" != "x" ]; then
-cat <<EE | ( while read line; do echo "zope-start: $line"; done ) >>$LOG_FILE
-`date`
-Instance name: $INSTANCE_NAME
-Executing:
-exec python $ZOPE_BASE/z2.py
-    -z $INSTANCE_HOME
-    -t $NUMBER_OF_THREADS
-    -u $ZOPE_USER 
-    -w $HTTP_PORT
-    -f $FTP_PORT
-    -l $LOG_FILE
-    $ipstr
-    $icpstr
-    $manager
-    $locale
-    $debugging
-    $p_string
-    $details
->> $LOG_FILE 2>&1
-EE
-fi
-
-# call server
-
-exec python $ZOPE_BASE/z2.py \
--z "$INSTANCE_HOME"  \
--t "$NUMBER_OF_THREADS" \
--u "$ZOPE_USER"  \
--w "$HTTP_PORT"  \
--f "$FTP_PORT"   \
--W "$WEBDAV_PORT"   \
--l "$LOG_FILE"   \
-$ipstr \
-$icpstr  \
-$manager \
-$locale  \
-$debugging \
-$p_string  \
-$details   \
->> $LOG_FILE 2>&1 \
-&
index cc632840b4a94f3e6c3a82713abea58bdd7e8cd3..730c1375b7f2e986919fc0bfc5b847dcb92e08df 100644 (file)
--- a/Zope.init
+++ b/Zope.init
@@ -27,143 +27,101 @@ else
 fi
 
 # Zope settings.
-. /etc/sysconfig/zope
+INSTANCES="main"
+[ -f /etc/sysconfig/zope ] && . /etc/sysconfig/zope
 
 
-# functions
-
-unset_vars()
-{
-    unset INSTANCE_NAME INSTANCE_HOME INST_HOME CGIBIN_BASE LOG_FILE
-    unset ZOPE_BASE ZOPE_USER NUMBER_OF_THREADS ZOPE_HOME
-    unset IP_ADDRESS HTTP_PORT FTP_PORT WEBDAV_PORT WATCHDOG
-    unset IPC_PORT LOC DEBUG_MODE DETAILED_LOG_FILE
-
-    # by default disable any access
-    HTTP_PORT="-"
-    ICP_PORT="-"
-    FTP_PORT="-"
-    WEBDAV_PORT="-"
-}
-
-start_instance()
-{
-    msg_starting "$z_name"
-
-    INST_HOME="$INSTANCE_HOME"
-    ZOPE_HOME="$INSTANCE_HOME"
-
-    export INSTANCE_NAME INSTANCE_HOME INST_HOME CGIBIN_BASE LOG_FILE
-    export ZOPE_BASE ZOPE_USER NUMBER_OF_THREADS ZOPE_HOME
-    export IP_ADDRESS HTTP_PORT FTP_PORT WEBDAV_PORT WATCHDOG
-    export IPC_PORT LOC DEBUG_MODE DETAILED_LOG_FILE
-
-    daemon zope-start
-    RETVAL=$?
-    [ $RETVAL -eq 0 ] && touch /var/lock/subsys/zope
-    sleep 5
-}
-
 start_instances()
 {
-    for i in /etc/zope/instances/*
+    RETVAL=1
+    for INSTANCE_NAME in $INSTANCES
     do
-       unset_vars
-       INSTANCE_NAME=`basename $i`
-       echo "$INSTANCE_NAME" | egrep -q "rpmsave|rpmorig" && continue
-       . $i
-       PIDFILE=$INSTANCE_HOME/var/Z2.pid
-       if [ "x$INSTANCE_NAME" = "xmain" ]; then
-           z_name="Zope"
-       else
-           z_name="Zope ($INSTANCE_NAME)"
+       INSTANCE_HOME="/var/lib/zope/$INSTANCE_NAME"
+
+       if [ -f /var/lock/subsys/"zope-$INSTANCE_NAME" ]; then
+               msg_already_running "Zope instance $INSTANCE_NAME"
+               continue        
        fi
-       if [ -f $PIDFILE ]; then
-           if ps -p `cat $PIDFILE` >/dev/null; then
-                   RETVAL=$?
-                   msg_already_running "$z_name"
-                   continue
-           else
-               rm -f $PIDFILE
-           fi
+
+       run_cmd "Starting Zope instance $INSTANCE_NAME" "$INSTANCE_HOME"/bin/zopectl start
+       RET=$?
+       if [ $RET -eq 0 ]; then
+               touch /var/lock/subsys/"zope-$INSTANCE_NAME"
+               RETVAL=0
        fi
-       start_instance
     done
+    return $RETVAL
 }
 
 stop_instances()
 {
-    for i in /etc/zope/instances/*
+    RETVAL=1
+    for INSTANCE_NAME in $INSTANCES
     do
-       unset_vars
-       . $i
-       PIDFILE=$INSTANCE_HOME/var/Z2.pid
-       INSTANCE_NAME=`basename $i`
-       if [ "x$INSTANCE_NAME" = "xmain" ]; then
-           z_name="Zope"
-       else
-           z_name="Zope ($INSTANCE_NAME)"
+       INSTANCE_HOME="/var/lib/zope/$INSTANCE_NAME"
+
+       if [ ! -f /var/lock/subsys/"zope-$INSTANCE_NAME" ]; then
+               msg_not_running "Zope instance $INSTANCE_NAME"
+               continue        
        fi
        
-       if [ -f $PIDFILE ]; then
-           msg_stopping "$z_name"
-           busy
-           kill `cat $PIDFILE` 2>/dev/null
-           RET=$?
-           sleep 1
-           if [ $RET -eq 0 ]; then
-               ok
-           else
-               sleep 5
-               kill -9 `cat $PIDFILE` 2>/dev/null
-               RET=$?
-               [ $RET -eq 0 ] && ok || died
-           fi
-           rm -f $PIDFILE
-       else
-           msg_not_running "$z_name"
+       run_cmd "Stopping Zope instance $INSTANCE_NAME" "$INSTANCE_HOME"/bin/zopectl stop
+       RET=$?
+       if [ $RET -eq 0 ]; then
+               RETVAL=0
        fi
+       rm -f /var/lock/subsys/"zope-$INSTANCE_NAME"
     done
+    return $RETVAL
 }
 
 stat_instances()
 {
-    for i in /etc/zope/instances/*
+    for INSTANCE_NAME in $INSTANCES
     do
-       unset_vars
-       . $i
+       INSTANCE_HOME=/var/lib/zope/$INSTANCE_NAME
        PIDFILE=$INSTANCE_HOME/var/Z2.pid
-       INSTANCE_NAME=`basename $i`
-       if [ "x$INSTANCE_NAME" = "xmain" ]; then
-           z_name="Zope"
-       else
-           z_name="Zope ($INSTANCE_NAME)"
-       fi
-       if [ -f $PIDFILE ]; then
-           if ps -p `cat $PIDFILE` >/dev/null; then
-               RETVAL=$?
-               nls "%s (pid %s) is running..." "$z_name" "`cat $PIDFILE`"
-           else
-               nls "%s dead but pid file exists" "$z_name"
-               RETVAL=1
-           fi
-       else
-           nls "%s is stopped" "$z_name"
-           RETVAL=2
-       fi
+       $INSTANCE_HOME/bin/zopectl status
     done
 }
 
 # See how we were called.
 case "$1" in
   start)
+               msg_starting "Zope"
+               started
                start_instances
+               RETVAL=$?
+               if [ "$RETVAL" = 0 ] ; then
+                       msg_starting "Zope"
+                       ok
+                       touch /var/lock/subsys/zope
+               else
+                       msg_starting "Zope"
+                       fail
+               fi
        ;;
   stop)
+       if [ -f /var/lock/subsys/named ]; then
+               msg_stopping "Zope"
+               started
                stop_instances
+               RETVAL=$?
+               if [ "$RETVAL" = 0 ] ; then
+                       msg_stopping "Zope"
+                       ok
+               else
+                       msg_stopping "Zope"
+                       fail
+               fi
+               rm -f /var/lock/subsys/zope >/dev/null 2>&1
+        else
+               msg_not_running "Zope"
+                exit 1
+        fi
        ;;
   status)
-               stat_instances
+       stat_instances
        ;;
   restart|force-reload)
        $0 stop
diff --git a/Zope.instance b/Zope.instance
deleted file mode 100644 (file)
index ab5264a..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-# This is Zope instance file for PLD Linux
-#
-# To create new instance just copy this
-# file under new name in the current directory
-# and setup options according to your needs.
-#
-# Note, that you may also use virtual hosts
-# handled just by one Zope instance.
-#
-
-# Zope database directory
-INSTANCE_HOME=/var/lib/zope/main
-
-# user to run Zope
-# note: you should create a dedicated default group
-#       for this user; zope prefers group-based security
-#       while accessing its log and database files
-ZOPE_USER=zope
-
-# ip address to bind to (e.g.: "127.0.0.1")
-# empty means to listen on all interfaces
-IP_ADDRESS=
-
-# ports to listen on (unset or "-" means disabled)
-HTTP_PORT=80
-FTP_PORT=21
-IPC_PORT=80
-#WEBDAV_PORT=9800
-
-# number of the initial threads to run
-NUMBER_OF_THREADS=4
-
-# cgi-bin base (empty means to not use)
-# CGIBIN_FILE=/home/services/httpd/cgi-bin/zope-main.cgi
-
-# internationalization
-# LOC='pl_PL'
-
-# shoulg we use watchdog? it restarts Zope in case of failure
-WATCHDOG=no
-
-# DEBUG_MODE
-DEBUG_MODE=0
-
-# log filename path (empty defaults to: /var/log/zope/INSTANCE_NAME.log)
-LOG_FILE=
-
-# detailed log filename path
-# (empty means no detailed logging)
-# ('yes' means /var/log/zope/INSTANCE_NAME-detailed.log)
-DETAILED_LOG_FILE=yes
index ddaef077ff892c78070c7e8bb3f3fc416653eabd..0b3c54fa390d2a1f4119b5e774780d8daded1a56 100644 (file)
@@ -1,10 +1,4 @@
-/var/log/zope/main.log {
-       postrotate
-               /etc/rc.d/init.d/zope reload >/dev/null 2>&1
-       endscript
-}
-
-/var/log/zope/main-detailed.log {
+/var/log/zope/*/*.log {
        postrotate
                /etc/rc.d/init.d/zope reload >/dev/null 2>&1
        endscript
index 4f70b32d50fc55c73a23e39f1826634bc48ac237..6547f266ce6cbf91f885cd0fcd0975143b061f9e 100644 (file)
@@ -3,3 +3,8 @@
 # Define nice level for Zope Server
 SERVICE_RUN_NICE_LEVEL="+5"
 
+# Instances to automatically start
+INSTANCES="main"
+
+# Instances for which all products should be automatically installed
+AUTO_INSTALL_PRODUCTS="main"
This page took 0.095286 seconds and 4 git commands to generate.