"Stefan Hornburg (Racke)" <[EMAIL PROTECTED]> écrivait (wrote) :
> I don't necessarily need a patch on the soap configuration, just a pointer
> to the places where I find it in Jean latest package.
debian/template :
Template: wwsympa/fastcgi
Type: boolean
Default: false
_Description: Do you want WWSympa to run with FastCGI?
FastCGI is an Apache module that makes WWSympa run much faster. This
option will be activated only if the `libapache-mod-fastcgi' package is
installed on your system. Please first make sure you installed this
package. You will need FastCGI if you plane tu use the sympa soap server.
Template: sympa/use_soap
Type: boolean
Default: false
_Description: Do you want the sympa SOAP server to be used?
Sympa SOAP server allows to access a Sympa service from within another
program, written in any programming language and on any computer. The SOAP
server provides a limited set of high level functions including login,
which,lists,subscribe,signoff. Other functions might be implemented in the
future.
.
The SOAP server uses libsoap-lite-perl package and a webserver like apache.
Template: sympa/soap_url
Type: string
_Description: Once installed, you will be able to access the SOAP server at the
following address.
Template: sympa/soap_configured
Type: boolean
Default: false
Description: internal use only
I choose false for the default value of fastcgi because it's in non-free
and sympa "can" run without it.
Upstream disagree.
debian/config :
# Ask for spool directories removal
db_input medium wwsympa/remove_spool || [ $? -eq 30 ]
db_go
if [ "$fastcgi" = "true" ]; then
# Ask for soap usage
db_input medium sympa/use_soap || [ $? -eq 30 ]
db_go
db_get sympa/use_soap
use_soap="$RET"
if [ use_soap="true" ]; then
soap_url="http://${host}/sympasoap"
if [ -f /etc/sympa/sympa.conf ]; then
# Get the soap url from sympa.conf
orig_soap_url=`perl -nle 'if (/^\s*soap_url\s+(\d)$/) {print $1;
}' /etc/sympa/sympa.conf`
if [ -z "$orig_soap_url" ]; then
db_get sympa/soap_url
orig_soap_url="$RET"
else
soap_url="$orig_soap_url";
fi
db_set sympa/soap_url "$soap_url"
db_input medium sympa/soap_url || [ $? -eq 30 ]
db_go
fi
fi
fi
debian/postinst :
if [ "$fastcgi" = "1" ]; then
db_get sympa/use_soap
use_soap="$RET"
# Use SOAP
if [ "$use_soap" = "true" ]; then
chown sympa:sympa /usr/lib/cgi-bin/sympa/sympa_soap_server.fcgi
chmod 6755 /usr/lib/cgi-bin/sympa/sympa_soap_server.fcgi
db_get sympa/soap_url
soap_url="$RET"
perl -i -pe "s%^(soap_url\s+).*%soap_url ${soap_url}%" /etc/sympa/sympa.c
onf
# Tell Debconf SOAP has been configured
db_set sympa/soap_configured true
fi
fi
# WebServer configuration
if [ "$use_soap" = "true" -o "$use_wwsympa" = "true" ]; then
[...]
# Check whether the Web server is installed
if [ -f /etc/$webserver/httpd.conf ]; then
echo "$webserver: installation seems OK ..."
else
webserver="none"
fi
if [ $webserver = "none" ]; then
echo "Not configuring Web server."
else
mkdir -p /etc/$webserver/conf.d
if [ "$use_wwsympa" = "true" ]; then
# Activate wwsympa
if [ ! -f /etc/$webserver/conf.d/sympa -a ! -h /etc/$webserver/conf.d
/sympa ]; then
ln -sf /etc/sympa/apache-wwsympa /etc/$webserver/conf.d/sympa
fi
fi
if [ "$use_soap" = "true" ]; then
# Activate soap
if [ ! -f /etc/$webserver/conf.d/sympa-soap -a ! -h /etc/$webserver/c
onf.d/sympa-soap ]; then
ln -s /etc/sympa/apache-soap /etc/$webserver/conf.d/sympa-soap
fi
fi
fi
fi
As you can see, I didn't choose the same heuristic as you for configuring the
webserver, I'm using links to conffile in /etc/sympa while you are using
conffile in /etc/$webserver/conf.d/
Both heuristic have their own problems.
debian/conf/sympa-soap :
# FastCgiServer /usr/lib/cgi-bin/sympa/sympa_soap_server.fcgi -processes 1
ScriptAlias /sympasoap /usr/lib/cgi-bin/sympa/sympa_soap_server.fcgi
<Location /sympasoap>
SetHandler fastcgi-script
</Location>
debian/postrm:
#!/bin/sh -e
. /usr/share/debconf/confmodule
# case "$1" in
# "remove")
# Check whether the syslog configuration file is present
# in case another system log daemon is used instead of syslog
[...]
[ executed for both remove and purge ]
# Don't fail here, the package might not be configured yet
db_get sympa/use_wwsympa || true
use_wwsympa="$RET"
db_get sympa/use_soap || true
use_soap="$RET"
if [ "$use_wwsympa" = "true" -o "$use_soap" = "true" ]; then
## Remove Web server configuration
db_get wwsympa/webserver_type
webserver="$RET"
case $webserver in
"Apache")
webserver="apache"
;;
"Apache-SSL")
webserver="apache-ssl"
;;
*)
webserver="none"
;;
esac
if [ $webserver != "none" ]; then
# Remove webserver configuration
if [ -L /etc/$webserver/conf.d/sympa ] &&
[ "$(readlink "/etc/$webserver/conf.d/sympa") = "/etc/sym
pa/apache-wwsympa" ]; then
rm -f /etc/$webserver/conf.d/sympa
fi
if [ -L /etc/$webserver/conf.d/sympa-soap ] &&
[ "$(readlink "/etc/$webserver/conf.d/sympa-soap") = "/et
c/sympa/apache-soap" ]; then
rm -f /etc/$webserver/conf.d/sympa-soap
fi
# Restarting web server if it was requested at configuration
time.
db_get wwsympa/webserver_restart
restart="$RET"
if [ "$restart" = "true" ]; then
if [ -x /etc/init.d/$webserver ]; then
/etc/init.d/$webserver restart
fi
# End up with debconf
db_stop
fi
fi
fi
# ;;
if [ $1 = "purge" ]; then
db_get sympa/use_wwsympa
use_wwsympa="$RET"
if [ "$use_wwsympa" = "true" ]; then
db_input high wwsympa/remove_spool || true
db_go
db_get wwsympa/remove_spool
remove_archives="$RET"
[...]
You will find those scripts, in situation, at :
http://ldap.u-picardie.fr/~delepine/APT/sympa/sympa_5.2.3-0.7.diff.gz
http://ldap.u-picardie.fr/~delepine/APT/sympa/sympa_5.2.3-0.7.dsc
If I find time I will try to adapt that to your tree. That should'nt be too
difficult. I you can do it that will be great.
For past etch we should give choice to the admin between using suidperl,
suexec, or the new sudo wrapper (recommanded by upstream).
There also libapache2-mod-fcgid which is free and can replace
libapache-mod-fastcgi but I have not yet tested it.
--
> R : Tu vois ! || Jean Charles Delépine - Université de Picardie
> > Q : Tu crois ?
> > > R : Ça casse l'ordre chronologique de l'échange.
> > > > Q : En quoi répondre au dessus est-il gênant ?