r932 - in /schooltool/trunk/debian: changelog control rules schooltool.conf.default schooltool.config schooltool.postinst schooltool.postrm schooltool.templates site.zcml ssl-cert.cnf

jinty-guest at users.alioth.debian.org jinty-guest at users.alioth.debian.org
Fri Jul 13 09:53:46 UTC 2007


Author: jinty-guest
Date: Fri Jul 13 09:53:46 2007
New Revision: 932

URL: http://svn.debian.org/wsvn/pkg-zope/?sc=1&rev=932
Log:
major work.

Removed:
    schooltool/trunk/debian/ssl-cert.cnf
Modified:
    schooltool/trunk/debian/changelog
    schooltool/trunk/debian/control
    schooltool/trunk/debian/rules
    schooltool/trunk/debian/schooltool.conf.default
    schooltool/trunk/debian/schooltool.config
    schooltool/trunk/debian/schooltool.postinst
    schooltool/trunk/debian/schooltool.postrm
    schooltool/trunk/debian/schooltool.templates
    schooltool/trunk/debian/site.zcml

Modified: schooltool/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-zope/schooltool/trunk/debian/changelog?rev=932&op=diff
==============================================================================
--- schooltool/trunk/debian/changelog (original)
+++ schooltool/trunk/debian/changelog Fri Jul 13 09:53:46 2007
@@ -1,10 +1,25 @@
-schooltool (2006.999-2007-alpha1-svn-r7010-1) UNRELEASED; urgency=low
+schooltool (2006.999-2007-alpha1-svn-r7010-3) unstable; urgency=low
+
+  * Add missing python-zope.html dependency.
+  * Dike out all ssl settings. people should use a proxy to get that
+    properly.
+
+ -- Brian Sutherland <brian at vanguardistas.net>  Fri, 13 Jul 2007 09:02:37 +0200
+
+schooltool (2006.999-2007-alpha1-svn-r7010-2) unstable; urgency=low
+
+  * Depend only on zope3 3.4.
+
+ -- Brian Sutherland <brian at vanguardistas.net>  Mon,  9 Jul 2007 06:10:24 +0200
+
+schooltool (2006.999-2007-alpha1-svn-r7010-1) unstable; urgency=low
 
   * (NOT RELEASED YET) New upstream release
   * Correct dependency to z3c.optionstorage from zope.optionstorage.
-  * Remove unused dependecy on z3c.javascript.mochikit. 
-
- -- Brian Sutherland <brian at vanguardistas.net>  Mon,  9 Jul 2007 01:24:06 +0200
+  * Remove unused dependecy on z3c.javascript.mochikit.
+  * Fix backwards compatibility in postinst.
+
+ -- Brian Sutherland <brian at vanguardistas.net>  Mon,  9 Jul 2007 02:45:19 +0200
 
 schooltool (2006.999-2007-alpha1-svn-r6947-1) unstable; urgency=low
 

Modified: schooltool/trunk/debian/control
URL: http://svn.debian.org/wsvn/pkg-zope/schooltool/trunk/debian/control?rev=932&op=diff
==============================================================================
--- schooltool/trunk/debian/control (original)
+++ schooltool/trunk/debian/control Fri Jul 13 09:53:46 2007
@@ -11,7 +11,7 @@
 Package: schooltool
 Section: web
 Architecture: all
-Depends: ${python:Depends}, adduser, ssl-cert, openssl, lsb-base, python-schooltool (= ${Source-Version}), ${misc:Depends}
+Depends: ${python:Depends}, adduser, lsb-base, python-schooltool (= ${Source-Version}), ${misc:Depends}
 XB-Python-Version: ${python:Versions}
 Description: common platform for school administration
  SchoolTool is an open source school management information system.  It is
@@ -41,7 +41,7 @@
 Package: python-schooltool
 Section: python
 Architecture: all
-Depends: ${python:Depends}, python-xml, python-libxml2, python-reportlab, zope3 (>= 3.3.0~b2-2), zope3 (<< 3.4), python-zc.resourcelibrary, python-zc.table, python-zc.datetimewidget, python-hurry.query, python-zope.ucol, python-zope.file, python-zope.mimetype, python-z3c.optionstorage, python-zope.wfmc, python-zope.app.wfmc, python-imaging, ${misc:Depends}
+Depends: ${python:Depends}, python-xml, python-libxml2, python-reportlab, zope3 (>= 3.4), zope3 (<< 3.5), python-zc.resourcelibrary, python-zc.table, python-zc.datetimewidget, python-hurry.query, python-zope.ucol, python-zope.file, python-zope.mimetype, python-z3c.optionstorage, python-zope.html, python-zope.wfmc, python-zope.app.wfmc, python-imaging, ${misc:Depends}
 Provides: ${python:Provides}
 Suggests: msttcorefonts
 Conflicts: schooltool-clients, libschooltool-clients, python2.4-schooltool (<< 2006)

Modified: schooltool/trunk/debian/rules
URL: http://svn.debian.org/wsvn/pkg-zope/schooltool/trunk/debian/rules?rev=932&op=diff
==============================================================================
--- schooltool/trunk/debian/rules (original)
+++ schooltool/trunk/debian/rules Fri Jul 13 09:53:46 2007
@@ -49,12 +49,11 @@
 	# Copy some debian specific stuff across
 	install -m 644 -D -p debian/$(SERVER).logrotate \
 	    debian/$(SERVER)/etc/logrotate.d/$(SERVER)
-	install -m 644 -D -p debian/ssl-cert.cnf \
-	    debian/$(SERVER)/etc/$(SERVER)/ssl-cert.cnf
 	install -m 644 -D -p debian/$(SERVER).conf.default \
 	    debian/$(SERVER)/usr/share/$(SERVER)/$(SERVER).conf.default
 	install -m 644 -D -p debian/site.zcml \
-	    debian/$(SERVER)/etc/$(SERVER)/site.zcml
+	    debian/usr/share/$(SERVER)/site.zcml.template
+	mkdir debian/$(SERVER)/etc/$(SERVER)/plugins
 	touch $@
 
 install-python%:

Modified: schooltool/trunk/debian/schooltool.conf.default
URL: http://svn.debian.org/wsvn/pkg-zope/schooltool/trunk/debian/schooltool.conf.default?rev=932&op=diff
==============================================================================
--- schooltool/trunk/debian/schooltool.conf.default (original)
+++ schooltool/trunk/debian/schooltool.conf.default Fri Jul 13 09:53:46 2007
@@ -3,7 +3,7 @@
 # Look at /usr/share/doc/schooltool/examples/schooltool.conf.in
 # for a detailed example with comments.
 
-# Site definition file:
+# Site definition file (Do not change unless you know what you're doing):
 site-definition /etc/schooltool/site.zcml
 
 
@@ -15,18 +15,6 @@
 
 # TCP port for the web HTTP interface to listen on
 # marker for web settings - Please don't change or delete this line.
-
-# TCP port for the RESTive HTTPS interface to listen on
-# marker for rest_ssl settings - Please don't change or delete this line.
-
-# TCP port for the web HTTPS interface to listen on
-# marker for web_ssl settings - Please don't change or delete this line.
-
-# Location of SSL certificate
-# running `DEBIAN_PRIORITY=low dpkg-reconfigure schooltool` will let you re-generate
-# or import a certificate (The location will be overwritten though)
-# marker for ssl_certificate settings - Please don't change or delete this line.
-
 
 
 ## The following settings can only be changed by editing this file

Modified: schooltool/trunk/debian/schooltool.config
URL: http://svn.debian.org/wsvn/pkg-zope/schooltool/trunk/debian/schooltool.config?rev=932&op=diff
==============================================================================
--- schooltool/trunk/debian/schooltool.config (original)
+++ schooltool/trunk/debian/schooltool.config Fri Jul 13 09:53:46 2007
@@ -31,7 +31,6 @@
 #Variables
 sourcepackage=schooltool
 package=$sourcepackage
-sslcert=/etc/$package/$package.privkey.pem
 config=/etc/$package/$package.conf
 
 # Setup Debconf
@@ -42,13 +41,11 @@
     # Get rid of previous values - config file is cannonical
     db_set $package/rest ""
     db_set $package/web ""
-    db_set $package/rest_ssl ""
-    db_set $package/web_ssl ""
     # Parse the config file
     exec 4<$config #stdin will mess up debconf!!!
     while read -u 4 x y z;do
         case "$x" in
-            rest|rest_ssl|web|web_ssl)
+            rest|web)
             db_get $package/$x
             if [ -z "$RET" ]; then
                 db_set $package/$x "$y"
@@ -64,14 +61,6 @@
                 db_set $package/rest "$y"
             else
                 db_set $package/rest "$RET $y"
-            fi
-            ;;
-            listen_ssl)
-            db_get $package/rest_ssl
-            if [ -z "$RET" ]; then
-                db_set $package/rest_ssl "$y"
-            else
-                db_set $package/rest_ssl "$RET $y"
             fi
             ;;
         esac
@@ -106,7 +95,7 @@
         exit 30
         ;;
 
-        rest|rest_ssl|web|web_ssl)
+        rest|web)
         # find out what interfaces the server should listen on
         if db_input medium $package/$state; then
             seen=true
@@ -121,127 +110,7 @@
                                 # here and in .postinst
                                 # until upstream supports it again or decides
                                 # not to. In which case it will be removed.
-                rest_ssl) state=web_ssl;;
-                web_ssl) state=create-cert;;
             esac
-        else
-            popstate
-        fi
-        ;;
-
-        create-cert)
-        # State to decide if we should create/regenerate the certificate
-        #Check if an SSL interface is defined
-        db_get $package/rest_ssl
-        if [ ! -z "$RET" ]; then
-            ssl=true
-        else
-            ssl=false
-        fi
-        db_get $package/web_ssl
-        if [ ! -z "$RET" ]; then
-            ssl=true
-        fi
-        # ask ze question if an SSL interface is defined and cert exists
-        if [ -f $sslcert ] && $ssl; then
-            if db_input medium $package/create-cert; then
-                seen=true
-            fi
-        else
-            if $ssl; then
-                #no cert, with SSL interface
-                db_set $package/create-cert true
-                db_fset $package/create-cert seen true
-            fi
-        fi
-        if db_go; then # this doesn't return the right exit code sometimes ???
-            if $seen;then              # http://issues.schooltool.org/issue122
-                pushstate $state
-            fi
-            db_get $package/create-cert
-            if [ "z$RET" == ztrue ] ;then
-                state=cert-type
-            else
-                state=end
-            fi
-        else
-            popstate
-        fi
-        ;;
-
-        cert-type)
-        # Find out what type of cetificate the user wants
-        if db_input low $package/cert-type; then
-            seen=true
-        fi
-        if db_go;then
-            if $seen;then
-                pushstate $state
-            fi
-            db_get $package/cert-type
-            case "$RET" in
-                Create*)
-                state=ssl-cert
-                ;;
-                Import*)
-                state=import-cert
-                ;;
-                *)
-                exit 1
-                ;;
-            esac
-        else
-            popstate
-        fi
-        ;;
-
-        import-cert)
-        #get the name of the certificate to import
-        if db_input high $package/import-cert;then
-            seen=true
-        fi
-        if db_go;then
-            db_get $package/import-cert
-            if [ -f "$RET" ];then
-                state=end
-            else
-                state=import-cert
-            fi
-        else
-            popstate
-        fi
-        ;;
-
-        ssl-cert)
-        # Get the certificate info
-        # We should get defaults from certificate if one exists. But we need openssl
-        # to read the cerificate and are not gaurenteed that it is installed. Other
-        # methods are available, but too hackish.
-        #
-        # We will use the templates from the ssl-cert packages with only a
-        # depends. This means that we have to be carefull because in some cases the
-        # templates will not be available (although in normal use cases they will be).
-        #
-        # The other way is to directly copy the templates at build time or manually,
-        # but this is hackish and high maintainence and means our templates will
-        # always be out of date with translations.
-        #
-        # See the thread starting at http://lists.debian.org/debian-devel/2004/10/msg00391.html
-        #
-        # Basically, for this to work, we have to fail gracefully if the templates
-        # are not available or out of date. Then the questions will be asked in the
-        # postinst when dependencies are gaurenteed to be fillfulled. Fortunately this
-        # is easy, we just don't ask the questions if none are available.
-        #
-        templates='countryname statename localityname organisationname ouname hostname email'
-        for template in $templates;do
-            # steal teplates from make-ssl-cert so I don't have to write/translate them
-            if db_register make-ssl-cert/$template $package/$template; then
-                db_input high $package/$template || true
-            fi
-        done
-        if db_go;then
-            state=end
         else
             popstate
         fi

Modified: schooltool/trunk/debian/schooltool.postinst
URL: http://svn.debian.org/wsvn/pkg-zope/schooltool/trunk/debian/schooltool.postinst?rev=932&op=diff
==============================================================================
--- schooltool/trunk/debian/schooltool.postinst (original)
+++ schooltool/trunk/debian/schooltool.postinst Fri Jul 13 09:53:46 2007
@@ -2,6 +2,7 @@
 # postinst script for server package
 
 set -e
+
 
 # summary of how this script can be called:
 #        * <postinst> `configure' <most-recently-configured-version>
@@ -22,10 +23,10 @@
 #     `abort-remove' or `abort-deconfigure'.
 
 package=schooltool
-sslcert=/etc/$package/$package.cert.pem
-sslkey=/etc/$package/$package.privkey.pem
-sslconf=/etc/$package/ssl-cert.cnf
 config=/etc/$package/$package.conf
+
+# which flavour of the schooltool config must we install on new installs
+flavour=stapp2007
 
 # Helper Functions
 set_simple () {
@@ -91,80 +92,27 @@
     set_simple rest "$RET"
     db_get $package/web
     set_simple web "$RET"
-    # XXX - SSL certificate generation is disabled. dee config for details
-    #db_get $package/listen_ssl
-    #set_simple listen_ssl "$RET"
-    #db_get $package/web_ssl
-    #set_simple web_ssl "$RET"
-
-    # XXX - SSL certificate generation is disabled. see .config for details
-    # Should we create an SSL cert?
-    #db_get $package/create-cert
-    #Create="$RET"
-    # re-set the default
-    #db_reset $package/create-cert
-    #if [ "z$Create" == ztrue ]; then
-    if false; then
-        db_get $package/cert-type
-        case "$RET" in
-
-            Create*)
-            #Ok, create the SSL certificate, overwriting if necessary
-            TMPFILE1=`mktemp` || exit 1
-            TMPFILE2=`mktemp` || exit 1
-            cp $sslconf $TMPFILE1
-            # Get the answers to the cert questions
-            for template in 'countryname' 'statename' 'localityname' \
-                'organisationname' 'ouname' 'hostname' 'email';do
-                db_get $package/$template
-                ans="$RET"
-                sed -e s#@"$template"@#"$ans"# $TMPFILE1 > $TMPFILE2
-                cp $TMPFILE2 $TMPFILE1
-            done
-            export RANDFILE=/dev/random
-            echo "Generating SSL Certificate... (might take a while)"
-            openssl req -config $TMPFILE1 -new -x509 -nodes -out $sslcert \
-                -keyout $sslkey
-            cat $sslcert >> $sslkey
-            rm -f $TMPFILE1 $TMPFILE2
-            ;;
-
-            Import*)
-            # Import it from a file
-            db_get $package/import-cert
-            cp "$RET" $sslkey
-            privkey=0
-            while read x;do
-                if [ `echo $x | grep -c -- '-----BEGIN.*PRIVATE KEY-----'` != 0 ] ;then
-                    privkey=1
-                fi
-                if [ $privkey == 0 ];then
-                    echo "$x"
-                fi
-                if [ `echo $x | grep -c -- '-----END.*PRIVATE KEY-----'` != 0 ] ;then
-                    privkey=0
-                fi
-            done <$sslkey >$sslcert
-            ;;
-        esac
-    fi
-    # If an SSL Certificate exists, give it the right permissions and add it to the
-    # Config file
-    if [ -f $sslkey ]; then
-        chown $package:$package $sslkey
-        chmod 600 $sslkey
-        set_simple ssl_certificate $sslkey
-    fi
     
     ############# UPGRADES ##############
 
-    if dpkg --compare-versions "$2" lt "2005.99999999";
+    if dpkg --compare-versions "$2" lt "2006.999";
     then
-        # Handle upgrades from pre-2006 version of schooltool
+        # Handle upgrades from pre-2007 version of schooltool
         rm -f /var/lib/$package/database_ver
-        set_simple site-definition /usr/share/schooltool/zcml/site.zcml
+        rm -f /etc/$package/$package.cert.pem
+        rm -f /etc/$package/$package.privkey.pem
+        rm -f /etc/$package/ssl-cert.cnf
+        set_simple site-definition /etc/schooltool/site.zcml
+        # use the 2005 flavour of schooltool
+        flavour=stapp2005
     fi 
     ;;
+
+    ### install the site.zcml
+
+    if [ ! -e /etc/$package/site.zcml ]; then
+        cat /usr/lib/$package/site.zcml.template | sed s/@@flavour@@/$flavour/g > /etc/$package/site.zcml
+    fi
 
     abort-upgrade|abort-remove|abort-deconfigure)
 

Modified: schooltool/trunk/debian/schooltool.postrm
URL: http://svn.debian.org/wsvn/pkg-zope/schooltool/trunk/debian/schooltool.postrm?rev=932&op=diff
==============================================================================
--- schooltool/trunk/debian/schooltool.postrm (original)
+++ schooltool/trunk/debian/schooltool.postrm Fri Jul 13 09:53:46 2007
@@ -29,18 +29,16 @@
 # configuration purging, Section 6.7).
 
 package=schooltool
-sslcert=/etc/$package/$package.cert.pem
-sslkey=/etc/$package/$package.privkey.pem
-config=/etc/$package/$package.conf
 
 . /usr/share/debconf/confmodule
 
 case "$1" in
     purge)
         # Clean up configuration
-        rm -f $config || true
-        rm -f $sslcert || true
-        rm -f $sslkey || true
+        rm -f /etc/$package/$package.cert.pem || true
+        rm -f /etc/$package/$package.privkey.pem || true
+        rm -f /etc/$package/$package.conf || true
+        rm -f /etc/$package/site.zcml || true
         # Clean up logs
         for i in error rest-access web-access app;do
             [ -e /var/log/$package/$i.log ] \

Modified: schooltool/trunk/debian/schooltool.templates
URL: http://svn.debian.org/wsvn/pkg-zope/schooltool/trunk/debian/schooltool.templates?rev=932&op=diff
==============================================================================
--- schooltool/trunk/debian/schooltool.templates (original)
+++ schooltool/trunk/debian/schooltool.templates Fri Jul 13 09:53:46 2007
@@ -19,59 +19,6 @@
  .
  The HTML interface provides access to SchoolTool via any standard web browser.
 
-Template: schooltool/rest_ssl
-Type: string
-Default:
-_Description: Network interfaces for SchoolTool XML web services (SSL):
- Please enter a space separated list of [address:]port values that you
- would like the server to listen on.
- .
- This interface is used by SchoolTool for communicating with non-HTML clients
- such as the SchoolTool and 3rd party clients (e.g. Mozilla Calendar). XML and
- iCalendar messages can be PUT or GET to this interface via HTTP allowing
- access to all SchoolTool functionality.
- .
- This is an SSL version of this interface and will only accept SSL
- connections.
-
-Template: schooltool/web_ssl
-Type: string
-Default:
-_Description: Network interfaces for the HTML browser interface (SSL)
- Please enter a space separated list of [address:]port values that you
- would like the server to listen on.
- .
- The web interface provides access to SchoolTool via any standard web browser.
- .
- This is an SSL version of this interface and will only accept SSL
- connections.
-
-Template: schooltool/cert-type
-Type: select
-__Choices: Create self-signed certificate, Import certificate
-Default: Create self-signed certificate
-_Description: Method for setting up the SSL certificate:
- You can create a self-signed root certificate that can be imported into
- web browsers. The certificate can be copied from
- /etc/schooltool/cert.pem.
- .
- You can also import a certificate, for instance a certificate signed
- by a certification authority (CA). The certificate must be in PEM
- format and contain the private key.
-
-Template: schooltool/create-cert
-Type: boolean
-Default: false
-_Description: Would you like to re-create the SSL certificate?
- A SSL certificate already exists. Please confirm whether you want
- to create a new certificate.
-
-Template: schooltool/import-cert
-Type: string
-Default: /
-_Description: PEM format SSL certificate:
- Please enter the file name of the SSL certificate you want to import.
-
 Template: schooltool/purge_db
 Type: boolean
 Default: true

Modified: schooltool/trunk/debian/site.zcml
URL: http://svn.debian.org/wsvn/pkg-zope/schooltool/trunk/debian/site.zcml?rev=932&op=diff
==============================================================================
--- schooltool/trunk/debian/site.zcml (original)
+++ schooltool/trunk/debian/site.zcml Fri Jul 13 09:53:46 2007
@@ -1,15 +1,9 @@
 <?xml version="1.0" encoding="utf-8"?>
 <configure xmlns="http://namespaces.zope.org/zope"
-           xmlns:browser="http://namespaces.zope.org/browser"
            i18n_domain="schooltool">
 
-  <include files="package-includes/*-meta.zcml" />
+  <include package="schooltool.@@flavour@@" />
 
-  <include package="schooltool" />
-
-  <include files="package-includes/*-configure.zcml" />
-
-  <!-- Provide local overrides of standard configurations-->
-  <includeOverrides files="package-includes/*-overrides.zcml" />
+  <include files="plugins/*.zcml" />
 
 </configure>




More information about the pkg-zope-commits mailing list