[Scodoc-devel] [SVN] Scolar : [1270] SocDoc 7: fix update script, and begin removing unused files.

eviennet at lipn.univ-paris13.fr eviennet at lipn.univ-paris13.fr
Ven 4 Oct 18:02:12 CEST 2013


Une pièce jointe HTML a été nettoyée...
URL: <https://www-rt.iutv.univ-paris13.fr/pipermail/scodoc-devel/attachments/20131004/de7c9b35/attachment-0001.html>
-------------- section suivante --------------
Deleted: branches/ScoDoc7/config/install_debian5.sh
===================================================================
--- branches/ScoDoc7/config/install_debian5.sh	2013-10-03 19:50:19 UTC (rev 1269)
+++ branches/ScoDoc7/config/install_debian5.sh	2013-10-04 16:02:12 UTC (rev 1270)
@@ -1,247 +0,0 @@
-#!/bin/bash
-
-#
-# ScoDoc: install third-party software necessary for our installation
-# starting for a minimal Debian (Lenny, 5.0) install.
-#
-# E. Viennet, Jun 2008, Apr 2009
-#
-
-source config.sh
-source utils.sh
-
-check_uid_root $0
-
-# ------------ VERIFIE VERSIONS POSTGRESQL
-if [ ! -z "$(dpkg -l | grep postgresql-7.4)" ]
-then
-   echo
-   echo "Attention:  postgresql-7.4 est deja installe"
-   echo "ScoDoc va installer et utiliser postgresql-8.3"
-   echo "Verifiez les ports dans postgresql.conf (5432 ou 5433)"
-   echo "et dans ScoDoc: config.sh et sco_utils.py"
-   echo
-   echo -n "continuer ? (y/n) [y] "
-   read ans
-   if [ "$(norm_ans "$ans")" = 'N' ]
-   then
-     exit 1
-   fi
-   echo
-   echo "Il est recommande de ne pas installer postgresql 7.4 et 8.1 en meme temps,"
-   echo "sauf si vous avez deja des donn\xE9es sous postgres 7.4 (auquel cas vous devrez"
-   echo "gerer votre configuration vous m\xEAme)."
-   echo 
-   echo -n "Puis-je desinstaller postgresql 7.4 (recommande) ? (y/n) [n] "
-   read ans
-   if [ "$(norm_ans "$ans")" = 'Y' ]
-   then
-       apt-get --yes remove postgresql-7.4 postgresql-client-7.4
-   fi
-fi
-
-# ------------ LOCALES
-echo 
-echo '---- Configuration des locales...'
-echo
-
-if [ ! -e /etc/locale.gen ]
-then
-touch /etc/locale.gen
-fi
-
-
-for locname in en_US.ISO-8859-15 en_US.ISO-8859-1
-do
-  outname=$(echo ${locname//-/} | tr '[A-Z]' '[a-z]')
-  if [ $(locale -a | egrep ^${outname}$ | wc -l) -le 1 ]
-  then
-    echo adding $locname
-    echo "$locname ${locname##*.}" >> /etc/locale.gen
-  fi
-done
-
-/usr/sbin/locale-gen --keep-existing 
-
-
-if [ "$LANG" != "en_US.iso88591" ]
-then
-   # ceci est necessaire a cause de postgresql 8.3 qui 
-   # cree son cluster lors de l'install avec la locale par defaut !
-   echo "Attention: changement de la locale par defaut"
-   mv /etc/default/locale /etc/default/locale.orig
-   echo "LANG=\"en_US.iso88591\"" > /etc/default/locale
-   export LANG=en_US.iso88591
-   if [ ! -z "$(dpkg -l | grep postgresql-8.3)" ]
-   then
-     # souvent cree avec mauvaise locale (utf-8): fait le menage
-     echo "Attention: postgresql etatit deja installe !"
-     echo " si vous n'avez pas d'autre base de donnees, il est"
-     echo " preferable de le desinstaller et de le reconfigurer"
-     echo " (ceci efface vos eventuelles bases de donnees !)"
-     echo " Puis-je desinstaller postgresql (recommande) ? (y/n) [n] "
-     read ans
-     if [ "$(norm_ans "$ans")" = 'Y' ]
-     then
-       apt-get --yes --purge remove  postgresql-8.3 postgresql-common postgresql-client-common postgresql-client-8.3
-     fi
-   fi
-fi
-echo 'Done.'
-
-
-# ------------ AJOUT DES PAQUETS NECESSAIRES
-apt-get update
-apt-get -y install subversion curl cracklib-runtime firehol
-apt-get -y install apache2 ssl-cert postgresql-8.3 postgresql-client-8.3
-apt-get -y install python2.4 python-jaxml python-psycopg python-pyrss2gen python-imaging python-reportlab python-crack python-pyparsing graphviz
-
-SVNVERSION=$(cd ..; svnversion)
-SVERSION=$(curl --silent http://notes.iutv.univ-paris13.fr/scodoc-installmgr/version?mode=install\&svn=$SVNVERSION)
-echo $SVERSION > "${SCODOC_DIR}"/config/scodoc.sn
-
-# python-pydot is currently bugged in Debian 5: install our 0.9.10
-echo '\nInstallation de pydot\n'
-(cd /tmp; tar xfz "${SCODOC_DIR}"/config/softs/pydot-0.9.10.tar.gz)
-(cd /tmp/pydot-0.9.10;  /usr/bin/python2.4 setup.py install)
-
-# ------------ PYEXCELERATOR
-echo
-echo 'Installation de pyExcelerator'
-echo
-
-(cd /tmp; tar xfz "${SCODOC_DIR}"/config/softs/pyExcelerator-0.6.3a.patched.tgz)
-(cd /tmp/pyExcelerator-0.6.3a.patched; /usr/bin/python2.4 setup.py install)
-
-echo 'Done.'
-
-# ------------ POSTFIX
-echo 
-echo "ScoDoc a besoin de pouvoir envoyer des messages par mail."
-echo -n "Voulez vous configurer la messagerie (tres recommande) ? (y/n) [y] "
-read ans
-if [ "$(norm_ans "$ans")" != 'N' ]
-then
-    apt-get install postfix
-fi
-
-# ------------ CONFIG FIREWALL
-echo 
-echo "Le firewall aide a proteger votre serveur d'intrusions indesirables."
-echo -n "Voulez vous installer un firewall minimal ? (y/n) [n] "
-read ans
-if [ "$(norm_ans "$ans")" = 'Y' ]
-then
-    echo 'Installation du firewall IP (voir /etc/firehol/firehol.conf)'
-    echo "Attention: suppose que l'interface reseau vers Internet est eth0"
-    echo "  si ce n'est pas le cas, editer /etc/firehol/firehol.conf"
-    echo "  et relancer: /etc/init.d/firehol restart"
-    echo
-    cp "${SCODOC_DIR}"/config/etc/firehol.conf /etc/firehol/
-    mv /etc/default/firehol /etc/default/firehol.orig
-    cat /etc/default/firehol.orig | sed 's/START_FIREHOL=NO/START_FIREHOL=YES/' > /tmp/firehol && mv /tmp/firehol /etc/default/firehol
-fi
-
-# Nota: after this point, the network may be unreachable 
-# (if firewall config is wrong)
-
-# ------------ CONFIG APACHE
-a2enmod ssl
-a2enmod proxy
-a2enmod proxy_http
-a2enmod rewrite
-
-echo 
-echo "La configuration du serveur web va modifier votre installation Apache pour supporter ScoDoc."
-echo -n "Voulez vous configurer le serveur web Apache maintenant ? (y/n) [y] "
-read ans
-if [ "$(norm_ans "$ans")" != 'N' ]
-then
-    echo "Configuration d'Apache"
-    server_name=""
-    while [ -z $server_name ]
-    do
-        echo "Le nom de votre serveur doit normalement etre connu dans le DNS."
-	echo -n "Nom complet de votre serveur (exemple: notes.univ.fr): "
-	read server_name
-    done
-    # --- CERTIFICATS AUTO-SIGNES
-    echo 
-    echo "Il est possible d'utiliser des certificats cryptographiques"
-    echo "auto-signes, qui ne seront pas reconnus comme de confiance"
-    echo "par les navigateurs, mais offrent une certaine securite."
-    echo -n 'Voulez vous generer des certificats ssl auto-signes ? (y/n) [n] '
-    read ans
-    if [ "$(norm_ans "$ans")" = 'Y' ]
-    then
-        # attention: utilise dans scodoc-site-ssl.orig
-	ssl_dir=/etc/apache2/scodoc-ssl 
-	if [ ! -e $ssl_dir ]
-	then
-          mkdir $ssl_dir
-	fi
-	/usr/sbin/make-ssl-cert /usr/share/ssl-cert/ssleay.cnf $ssl_dir/apache.pem
-    fi
-    # ---
-    echo 'generation de /etc/apache2/sites-available/scodoc-site-ssl'
-    cat "${SCODOC_DIR}"/config/etc/scodoc-site-ssl.orig | sed -e "s:YOUR\.FULL\.HOST\.NAME:$server_name:g" > /etc/apache2/sites-available/scodoc-site-ssl
-    echo 'activation du site...'
-    a2ensite scodoc-site-ssl
-
-    echo 'Remplacement du site Apache par defaut (sic ! old saved as .bak)'
-    fn=/etc/apache2/sites-available/default
-    if [ -e $fn ]
-    then
-       mv $fn $fn.bak
-    fi
-    cp "${SCODOC_DIR}"/config/etc/scodoc-site.orig $fn
-
-    if [ -z "$(grep Listen /etc/apache2/ports.conf | grep 443)" ]
-    then
-      echo 'adding port 443'
-      echo 'Listen 443' >> /etc/apache2/ports.conf
-    fi
-
-    echo 'configuring Apache proxy'
-    mv /etc/apache2/mods-available/proxy.conf /etc/apache2/mods-available/proxy.conf.bak
-    cat > /etc/apache2/mods-available/proxy.conf <<EOF
-<IfModule mod_proxy.c>
-# Proxy config for ScoDoc default installation
-ProxyRequests Off
-  <ProxyMatch http://localhost:8080>
-          Order deny,allow
-          Allow from all
-  </ProxyMatch>
-</IfModule>
-EOF
-
-    /etc/init.d/apache2 restart
-fi
-
-
-# ------------ CONFIG SERVICE SCODOC
-echo 
-echo "Installer le service scodoc permet de lancer automatiquement le serveur au demarrage."
-echo -n "Voulez vous installer le service scodoc ? (y/n) [y] "
-read ans
-if [ "$(norm_ans "$ans")" != 'N' ]
-then
-    echo 'Installation du demarrage automatique de ScoDoc'
-    cp "${SCODOC_DIR}"/config/etc/scodoc /etc/init.d/
-    update-rc.d scodoc defaults
-fi
-
-# ----------------  check permissions
-# ScoDoc must be able to write to this directory:
-chgrp -R www-data "${SCODOC_DIR}"/static/photos
-chmod -R g+w "${SCODOC_DIR}"/static/photos
-
-# ------------ THE END
-echo
-echo "Installation terminee."
-echo
-echo "Vous pouvez maintenant creer la base d'utilisateurs avec ./create_user_db.sh"
-echo "puis creer un departement avec  ./create_dept.sh"
-echo
-
-

Deleted: branches/ScoDoc7/config/install_debian6.sh
===================================================================
--- branches/ScoDoc7/config/install_debian6.sh	2013-10-03 19:50:19 UTC (rev 1269)
+++ branches/ScoDoc7/config/install_debian6.sh	2013-10-04 16:02:12 UTC (rev 1270)
@@ -1,284 +0,0 @@
-#!/bin/bash
-
-#
-# ScoDoc: install third-party software necessary for our installation
-# starting for a minimal Debian (Squeeze, 6.0) install.
-#
-# E. Viennet, Jun 2008, Apr 2009, Sept 2011
-#
-
-source config.sh
-source utils.sh
-
-check_uid_root $0
-
-# ------------ VERIFIE VERSIONS POSTGRESQL
-if [ ! -z "$(dpkg -l | grep postgresql-7.4)" ]
-then
-   echo
-   echo "Attention:  postgresql-7.4 est deja installe"
-   echo "ScoDoc va installer et utiliser postgresql-8.4"
-   echo "Verifiez les ports dans postgresql.conf (5432 ou 5433)"
-   echo "et dans ScoDoc: config.sh et sco_utils.py"
-   echo
-   echo -n "continuer ? (y/n) [y] "
-   read ans
-   if [ "$(norm_ans "$ans")" = 'N' ]
-   then
-     exit 1
-   fi
-   echo
-   echo "Il est recommande de ne pas installer postgresql 7.4 et 8 en meme temps,"
-   echo "sauf si vous avez deja des donn\xE9es sous postgres 7.4 (auquel cas vous devrez"
-   echo "gerer votre configuration vous m\xEAme)."
-   echo 
-   echo -n "Puis-je desinstaller postgresql 7.4 (recommande) ? (y/n) [n] "
-   read ans
-   if [ "$(norm_ans "$ans")" = 'Y' ]
-   then
-       apt-get --yes remove postgresql-7.4 postgresql-client-7.4
-   fi
-fi
-
-# ------------ LOCALES
-echo 
-echo '---- Configuration des locales...'
-echo
-
-if [ ! -e /etc/locale.gen ]
-then
-touch /etc/locale.gen
-fi
-
-
-for locname in en_US.ISO-8859-15 en_US.ISO-8859-1
-do
-  outname=$(echo ${locname//-/} | tr '[A-Z]' '[a-z]')
-  if [ $(locale -a | egrep ^${outname}$ | wc -l) -le 1 ]
-  then
-    echo adding $locname
-    echo "$locname ${locname##*.}" >> /etc/locale.gen
-  fi
-done
-
-/usr/sbin/locale-gen --keep-existing 
-
-
-if [ "$LANG" != "en_US.iso88591" ]
-then
-   # ceci est necessaire a cause de postgresql 8.3 qui 
-   # cree son cluster lors de l'install avec la locale par defaut !
-   echo "Attention: changement de la locale par defaut"
-   mv /etc/default/locale /etc/default/locale.orig
-   echo "LANG=\"en_US.iso88591\"" > /etc/default/locale
-   export LANG=en_US.iso88591
-fi
-echo 'Done.'
-
-
-# ------------ AJOUT DES PAQUETS NECESSAIRES
-apt-get update
-apt-get -y install subversion curl cracklib-runtime firehol
-apt-get -y install apache2 ssl-cert postgresql-8.4 postgresql-client-8.4
-apt-get -y install graphviz
-
-# ------------ INSTALL DE PYTHON2.4
-# apt-get -y install python2.4 python-jaxml python-psycopg python-pyrss2gen python-imaging python-reportlab python-crack python-pyparsing
-
-SOFTS="$SCODOC_DIR/config/softs"
-apt-get install -y build-essential g++ libpq-dev
-
-echo Installing Python2.4
-cd /tmp
-tar xvfz "$SOFTS/Python-2.4.6-config.tgz" # sources avec module zlib active
-cd Python-2.4.6
-./configure && make && make install
-ln -s /usr/local/bin/python2.4 /usr/bin/python2.4
-
-PYTHON=/usr/local/bin/python2.4
-
-# Python packages used by Zope and ScoDoc:
-echo Installing jaxml
-(cd $SOFTS/jaxml-3.01; $PYTHON setup.py install)
-
-echo Installing mx-base
-(cd /tmp; tar xfz "$SOFTS/egenix-mx-base-3.2.1.tar.gz"; cd egenix-mx-base-3.2.1; $PYTHON setup.py install)
-
-echo Installing psycopg
-cd /tmp
- tar xfz "$SOFTS/psycopg-1.1.21.tar.gz"
- cd psycopg-1.1.21
-   ./configure --with-python-version=2.4 --with-python=$PYTHON --with-postgres-includes=/usr/include/postgresql  --with-mxdatetime-includes=/usr/local/lib/python2.4/site-packages/mx/DateTime/mxDateTime
-   make install
-cd "$SOFTS"
-
-echo Installing PyRSS2Gen
-(cd /tmp; tar xfz "$SOFTS/PyRSS2Gen-1.0.0.tar.gz"; cd PyRSS2Gen-1.0.0; $PYTHON setup.py install)
-
-echo Installing PIL
-apt-get install -y libjpeg62-dev zlib1g-dev libfreetype6-dev liblcms1-dev
-(cd /tmp; tar xfz "$SOFTS/Imaging-1.1.7.tar.gz"; cd Imaging-1.1.7; $PYTHON setup.py install)
-
-echo Installing Reportlab
-apt-get -y install libfreetype6 libfreetype6-dev
-(cd  /tmp; tar xfz "$SOFTS/reportlab-2.5.tar.gz"; cd reportlab-2.5; $PYTHON setup.py install)
-
-echo Installing python-crack
-apt-get -y install libcrack2-dev libcrack2 cracklib-runtime
-(cd  /tmp; tar xfz "$SOFTS/setuptools-0.6c11.tar.gz"; cd setuptools-0.6c11; $PYTHON setup.py install)
-(cd  /tmp; tar xfz "$SOFTS/cracklib-2.8.15.tar.gz"; cd cracklib-2.8.15; $PYTHON setup.py install)
-
-echo Installing pyparsing
-(cd /tmp; tar xfz "$SOFTS/pyparsing-1.5.6.tgz"; cd pyparsing-1.5.6;  $PYTHON setup.py install)
-
-cd "$SOFTS"/..
-./install_simplejson.sh
-
-# ------------
-SVNVERSION=$(cd ..; svnversion)
-SVERSION=$(curl --silent http://notes.iutv.univ-paris13.fr/scodoc-installmgr/version?mode=install\&svn=$SVNVERSION)
-echo $SVERSION > $SCODOC_DIR/config/scodoc.sn
-
-# python-pydot is currently bugged in Debian 5: install our 0.9.10
-# Le probleme: pydot v > 1 a change l'API : resultat de get_node est une liste. Resolu par sco_utils.pydot_get_node
-# pydot 1.0.25 bug avec python 2.4 (get_node_list() renvoie toujours [])
-#       1.0.3 idem (voir misc/testpydot.py)
-echo '\nInstallation de pydot\n'
-(cd /tmp; tar xfz $SCODOC_DIR/config/softs/pydot-0.9.10.tar.gz)
-(cd /tmp/pydot-0.9.10;  $PYTHON setup.py install)
-
-# ------------ PYEXCELERATOR
-echo
-echo 'Installation de pyExcelerator'
-echo
-
-(cd /tmp; tar xfz $SCODOC_DIR/config/softs/pyExcelerator-0.6.3a.patched.tgz)
-(cd /tmp/pyExcelerator-0.6.3a.patched; $PYTHON setup.py install)
-
-echo 'Done.'
-
-# ------------ POSTFIX
-echo 
-echo "ScoDoc a besoin de pouvoir envoyer des messages par mail."
-echo -n "Voulez vous configurer la messagerie (tres recommande) ? (y/n) [y] "
-read ans
-if [ "$(norm_ans "$ans")" != 'N' ]
-then
-    apt-get -y install postfix
-fi
-
-# ------------ CONFIG FIREWALL
-echo 
-echo "Le firewall aide a proteger votre serveur d'intrusions indesirables."
-echo -n "Voulez vous installer un firewall minimal ? (y/n) [n] "
-read ans
-if [ "$(norm_ans "$ans")" = 'Y' ]
-then
-    echo 'Installation du firewall IP (voir /etc/firehol/firehol.conf)'
-    echo "Attention: suppose que l'interface reseau vers Internet est eth0"
-    echo "  si ce n'est pas le cas, editer /etc/firehol/firehol.conf"
-    echo "  et relancer: /etc/init.d/firehol restart"
-    echo
-    cp $SCODOC_DIR/config/etc/firehol.conf /etc/firehol/
-    mv /etc/default/firehol /etc/default/firehol.orig
-    cat /etc/default/firehol.orig | sed 's/START_FIREHOL=NO/START_FIREHOL=YES/' > /tmp/firehol && mv /tmp/firehol /etc/default/firehol
-fi
-
-# Nota: after this point, the network may be unreachable 
-# (if firewall config is wrong)
-
-# ------------ CONFIG APACHE
-a2enmod ssl
-a2enmod proxy
-a2enmod proxy_http
-a2enmod rewrite
-
-echo 
-echo "La configuration du serveur web va modifier votre installation Apache pour supporter ScoDoc."
-echo -n "Voulez vous configurer le serveur web Apache maintenant ? (y/n) [y] "
-read ans
-if [ "$(norm_ans "$ans")" != 'N' ]
-then
-    echo "Configuration d'Apache"
-    server_name=""
-    while [ -z $server_name ]
-    do
-        echo "Le nom de votre serveur doit normalement etre connu dans le DNS."
-	echo -n "Nom complet de votre serveur (exemple: notes.univ.fr): "
-	read server_name
-    done
-    # --- CERTIFICATS AUTO-SIGNES
-    echo 
-    echo "Il est possible d'utiliser des certificats cryptographiques"
-    echo "auto-signes, qui ne seront pas reconnus comme de confiance"
-    echo "par les navigateurs, mais offrent une certaine securite."
-    echo -n 'Voulez vous generer des certificats ssl auto-signes ? (y/n) [y] '
-    read ans
-    if [ "$(norm_ans "$ans")" != 'N' ]
-    then
-        # attention: utilise dans scodoc-site-ssl.orig
-	ssl_dir=/etc/apache2/scodoc-ssl 
-	if [ ! -e $ssl_dir ]
-	then
-          mkdir $ssl_dir
-	fi
-	/usr/sbin/make-ssl-cert /usr/share/ssl-cert/ssleay.cnf $ssl_dir/apache.pem
-    fi
-    # ---
-    echo 'generation de /etc/apache2/sites-available/scodoc-site-ssl'
-    cat $SCODOC_DIR/config/etc/scodoc-site-ssl.orig | sed -e "s:YOUR\.FULL\.HOST\.NAME:$server_name:g" > /etc/apache2/sites-available/scodoc-site-ssl
-    echo 'activation du site...'
-    a2ensite scodoc-site-ssl
-
-    echo 'Remplacement du site Apache par defaut (sic ! old saved as .bak)'
-    fn=/etc/apache2/sites-available/default
-    if [ -e $fn ]
-    then
-       mv $fn $fn.bak
-    fi
-    cp $SCODOC_DIR/config/etc/scodoc-site.orig $fn
-
-    if [ -z "$(grep Listen /etc/apache2/ports.conf | grep 443)" ]
-    then
-      echo 'adding port 443'
-      echo 'Listen 443' >> /etc/apache2/ports.conf
-    fi
-
-    echo 'configuring Apache proxy'
-    mv /etc/apache2/mods-available/proxy.conf /etc/apache2/mods-available/proxy.conf.bak
-    cat > /etc/apache2/mods-available/proxy.conf <<EOF
-<IfModule mod_proxy.c>
-# Proxy config for ScoDoc default installation
-ProxyRequests Off
-  <ProxyMatch http://localhost:8080>
-          Order deny,allow
-          Allow from all
-  </ProxyMatch>
-</IfModule>
-EOF
-
-    /etc/init.d/apache2 restart
-fi
-
-
-# ------------ CONFIG SERVICE SCODOC
-echo 
-echo "Installer le service scodoc permet de lancer automatiquement le serveur au demarrage."
-echo -n "Voulez vous installer le service scodoc ? (y/n) [y] "
-read ans
-if [ "$(norm_ans "$ans")" != 'N' ]
-then
-    echo 'Installation du demarrage automatique de ScoDoc'
-    cp $SCODOC_DIR/config/etc/scodoc /etc/init.d/
-    insserv scodoc
-fi
-
-# ------------ THE END
-echo
-echo "Installation terminee."
-echo
-echo "Vous pouvez maintenant creer la base d'utilisateurs avec ./create_user_db.sh"
-echo "puis creer un departement avec  ./create_dept.sh"
-echo
-
-

Modified: branches/ScoDoc7/config/install_debian7.sh
===================================================================
--- branches/ScoDoc7/config/install_debian7.sh	2013-10-03 19:50:19 UTC (rev 1269)
+++ branches/ScoDoc7/config/install_debian7.sh	2013-10-04 16:02:12 UTC (rev 1270)
@@ -32,6 +32,9 @@
 chgrp www-data $SCODOC_DIR $SCODOC_DIR/ZopeProducts/*
 chmod g+w $SCODOC_DIR $SCODOC_DIR/ZopeProducts/*
 
+chgrp -R www-data "${SCODOC_DIR}"/static/photos
+chmod -R g+w "${SCODOC_DIR}"/static/photos
+
 # ------------ LOCALES
 echo 
 echo '---- Configuration des locales...'

Modified: branches/ScoDoc7/config/install_psycopg2.sh
===================================================================
--- branches/ScoDoc7/config/install_psycopg2.sh	2013-10-03 19:50:19 UTC (rev 1269)
+++ branches/ScoDoc7/config/install_psycopg2.sh	2013-10-04 16:02:12 UTC (rev 1270)
@@ -4,8 +4,11 @@
 
 # This script installs from shipped archive
 
-PYTHON=python2.4
+# Nota: for now ScoDoc 7 uses Debian's python-psycopg2 package (shipping 2.4.5)
+# and this scipt is not used 
 
+PYTHON=/opt/zope213/bin/python
+
 SRC_ARCHIVE="/opt/scodoc/instance/Products/ScoDoc/config/softs/psycopg2-2.4.6.tar.gz"
 
 # Test if psycopg2 installed

Deleted: branches/ScoDoc7/config/install_reportlab23.sh
===================================================================
--- branches/ScoDoc7/config/install_reportlab23.sh	2013-10-03 19:50:19 UTC (rev 1269)
+++ branches/ScoDoc7/config/install_reportlab23.sh	2013-10-04 16:02:12 UTC (rev 1270)
@@ -1,32 +0,0 @@
-#!/bin/bash
-
-# Debian 5 '(lenny) is shipped with Reportlab 2.1
-# We need 2.3 to use the new <img> tag (in PDF bulletins)
-
-# This script checks the installed version and try to install the 2.3 from sources.
-# Internet access (web) is required.
-
-PYTHON=python2.4
-REPORTLAB_ARCHIVE=reportlab-2.3.tar.gz # subject to change in the future
-REPORTLAB_SRC_URL="http://www.reportlab.com/ftp/$REPORTLAB_ARCHIVE"
-
-REPORTLAB_VERSION=$($PYTHON -c "import reportlab; print reportlab.Version")
-if [ -z "${REPORTLAB_VERSION}" -o "${REPORTLAB_VERSION}" == "2.1" ]
-then
- echo "Trying to install reportlab version 2.3"
- apt-get -y install wget
- pushd /tmp
- wget $REPORTLAB_SRC_URL
- if [ $? != 0 ]
- then
-   echo "Error: cannot download reportlab sources"
-   echo "from url" $REPORTLAB_SRC_URL
-   exit 1
- fi
- tar xfz "$REPORTLAB_ARCHIVE"
- apt-get -y install gcc python2.4-dev
- apt-get -y remove python-reportlab
- cd ReportLab_2_3
- python2.4 setup.py install
- popd
-fi

Deleted: branches/ScoDoc7/config/install_simplejson.sh
===================================================================
--- branches/ScoDoc7/config/install_simplejson.sh	2013-10-03 19:50:19 UTC (rev 1269)
+++ branches/ScoDoc7/config/install_simplejson.sh	2013-10-04 16:02:12 UTC (rev 1270)
@@ -1,36 +0,0 @@
-#!/bin/bash
-
-# UNUSED IN ScoDoc 7 (uses standard json module)
-
-# ScoDoc 6 use Zope which runs only on Python2.4
-# and Python2.4 does not include json module in std libs
-# -> we must install an old simplejson 2.1 ourself (from python egg)
-
-PYTHON=python2.4
-
-$PYTHON -c "import simplejson" &> /dev/null
-if [ $? -eq 0 ] 
-then
-  echo "simplejson is installed"
-  exit 0
-fi
-
-SRCFILE=/opt/scodoc/instance/Products/ScoDoc/config/softs/simplejson-2.1.0.tar.gz
-
-cd /tmp
-tar xfz $SRCFILE
-cd simplejson-2.1.0
-$PYTHON setup.py install
-# nb: needs gcc, already installed by install_reportlab23.sh (or install script on Debian 6)
-
-# Configure Zope tmp egg directory
-ZC=/opt/scodoc/instance/bin/zopectl
-if [ $(grep -c PYTHON_EGG_CACHE $ZC) -lt 1 ]
-then 
-  mv $ZC $ZC.before_json
-  cat $ZC.before_json | sed 's/^exec/export PYTHON_EGG_CACHE=\/tmp\/.egg_cache\nexec/' > $ZC
-  chmod a+x $ZC
-fi
-
-echo 'simplejson installed'
-

Modified: branches/ScoDoc7/config/postupgrade-db.py
===================================================================
--- branches/ScoDoc7/config/postupgrade-db.py	2013-10-03 19:50:19 UTC (rev 1269)
+++ branches/ScoDoc7/config/postupgrade-db.py	2013-10-04 16:02:12 UTC (rev 1270)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2.4
+#!/opt/zope213/bin/python
 
 """
 ScoDoc post-upgrade script: databases housekeeping
@@ -19,7 +19,7 @@
 for dept in get_depts():
     log('\nChecking database for dept %s' % dept)
     try:
-        cnx = psycopg.connect( get_dept_cnx_str(dept) )
+        cnx = psycopg2.connect( get_dept_cnx_str(dept) )
     except:
         log('\n*** Error: departement %s not upgraded ! ***\n' % dept)
         continue
@@ -376,7 +376,7 @@
 
 # Base utilisateurs:
 log('\nChecking users database')
-cnx = psycopg.connect( get_users_cnx_str() )
+cnx = psycopg2.connect( get_users_cnx_str() )
 cursor = cnx.cursor()
 check_field(cnx, 'sco_users', 'passwd_temp',
             ['alter table sco_users add column passwd_temp int default 0',

Modified: branches/ScoDoc7/config/scodocutils.py
===================================================================
--- branches/ScoDoc7/config/scodocutils.py	2013-10-03 19:50:19 UTC (rev 1269)
+++ branches/ScoDoc7/config/scodocutils.py	2013-10-04 16:02:12 UTC (rev 1270)
@@ -1,7 +1,7 @@
 """
     Some utilities used by upgrade scripts
 """
-import sys, os, psycopg, glob, subprocess, traceback, time
+import sys, os, psycopg2, glob, subprocess, traceback, time
 
 sys.path.append('..')
 

Deleted: branches/ScoDoc7/config/softs/Python-2.4.6-config.tgz
===================================================================
(Binary files differ)

Deleted: branches/ScoDoc7/config/softs/reportlab-2.5.tar.gz
===================================================================
(Binary files differ)

Deleted: branches/ScoDoc7/config/softs/simplejson-2.1.0.tar.gz
===================================================================
(Binary files differ)

Modified: branches/ScoDoc7/config/upgrade.sh
===================================================================
--- branches/ScoDoc7/config/upgrade.sh	2013-10-03 19:50:19 UTC (rev 1269)
+++ branches/ScoDoc7/config/upgrade.sh	2013-10-04 16:02:12 UTC (rev 1270)
@@ -4,17 +4,16 @@
 #   SVN must be properly configured and have read access to ScoDoc repository
 # This script STOP and RESTART ScoDoc and should be runned as root
 #
-# E. Viennet, june 2008
+# Script pour ScoDoc 7
+#
+# E. Viennet, septembre 2013
 
 source config.sh
 source utils.sh
 
 check_uid_root $0
 
-if [ ! -e /usr/bin/curl ]; then
-  apt-get update
-  apt-get -y install curl # now necessary
-fi
+apt-get update
 
 echo "Stopping ScoDoc..."
 /etc/init.d/scodoc stop
@@ -68,36 +67,6 @@
 chgrp -R www-data "${SCODOC_DIR}"/ZopeProducts
 chmod -R g+w "${SCODOC_DIR}"/ZopeProducts
 
-# check and upgrade reportlab
-./install_reportlab23.sh
-
-# check and install simplejson
-./install_simplejson.sh
-export PYTHON_EGG_CACHE=/tmp/.egg_cache
-
-# check and install psycopg2
-./install_psycopg2.sh 
-
-# check symlinks to our customized Zope products
-for P in exUserFolder ZPsycopgDA
-do
-  if [ ! -h $SCODOC_DIR/../$P ]
-  then
-     dest=$SCODOC_DIR/../../Attic
-     if [ ! -e "$dest" ]
-     then
-       mkdir $dest
-     fi
-     if [ -e $SCODOC_DIR/../$P ]
-     then
-       echo "Moving old product $P to $dest"
-       mv "$SCODOC_DIR/../$P" "$dest"
-     fi
-     echo "creating symlink to product $P"
-     (cd $SCODOC_DIR/..; ln -s ScoDoc/ZopeProducts/$P)
-  fi
-done
-
 # post-upgrade scripts
 echo "Executing post-upgrade script..."
 "$SCODOC_DIR"/config/postupgrade.py

Modified: branches/ScoDoc7/sco_utils.py
===================================================================
--- branches/ScoDoc7/sco_utils.py	2013-10-03 19:50:19 UTC (rev 1269)
+++ branches/ScoDoc7/sco_utils.py	2013-10-04 16:02:12 UTC (rev 1270)
@@ -49,7 +49,7 @@
 
 # XML generation package (apt-get install jaxml)
 import jaxml
-# import simplejson as json # Attention: ceci pour Python 2.4 (ou 2.5)
+
 import json
 from SuppressAccents import suppression_diacritics
 from sco_exceptions import *


Plus d'informations sur la liste de diffusion Scodoc-devel