OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall
Root: /v/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src Date: 01-Mar-2006 15:10:00
Branch: HEAD Handle: 2006030114095900
Added files:
openpkg-src/sympa rc.sympa sympa-apache.conf sympa-setup.sh
sympa-wrapper.c sympa.patch sympa.spec
Log:
New Package: Sympa (Mailing List Manager)
Sponsored by: Fraunhofer Gesellschaft (FhG)
Institut für Informations- und Datenverarbeitung (IITB)
http://www.iitb.fraunhofer.de/
Summary:
Revision Changes Path
1.1 +77 -0 openpkg-src/sympa/rc.sympa
1.1 +18 -0 openpkg-src/sympa/sympa-apache.conf
1.1 +38 -0 openpkg-src/sympa/sympa-setup.sh
1.1 +14 -0 openpkg-src/sympa/sympa-wrapper.c
1.1 +349 -0 openpkg-src/sympa/sympa.patch
1.1 +343 -0 openpkg-src/sympa/sympa.spec
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/sympa/rc.sympa
============================================================================
$ cvs diff -u -r0 -r1.1 rc.sympa
--- /dev/null 2006-03-01 15:09:53 +0100
+++ rc.sympa 2006-03-01 15:09:59 +0100
@@ -0,0 +1,77 @@
[EMAIL PROTECTED]@/lib/openpkg/bash @l_prefix@/etc/rc
+##
+## rc.sympa -- Run-Commands
+##
+
+%config
+ sympa_enable="$openpkg_rc_def"
+ sympa_log_prolog="true"
+ sympa_log_epilog="true"
+ sympa_log_numfiles="10"
+ sympa_log_minsize="1M"
+ sympa_log_complevel="9"
+
+%common
+ sympa_start () {
+ for daemon in sympa archived bounced task_manager; do
+ @l_prefix@/sbin/$daemon.pl
+ done
+ }
+ sympa_signal () {
+ [ -f @l_prefix@/var/sympa/run/$1.pid ] && \
+ kill -$2 `cat @l_prefix@/var/sympa/run/$1.pid`
+ }
+ sympa_status () {
+ ( status=0
+ for daemon in sympa archived bounced task_manager; do
+ if sympa_signal $daemon 0; then
+ :
+ else
+ status=1
+ break
+ fi
+ done
+ exit $status )
+ }
+ sympa_stop () {
+ for daemon in sympa archived bounced task_manager; do
+ sympa_signal $daemon TERM
+ done
+ }
+
+%status -u @l_rusr@ -o
+ sympa_usable="unknown"
+ sympa_active="no"
+ rcService sympa enable yes && \
+ sympa_status && sympa_active="yes"
+ echo "sympa_enable=\"$sympa_enable\""
+ echo "sympa_usable=\"$sympa_usable\""
+ echo "sympa_active=\"$sympa_active\""
+
+%start -p 900 -u @l_rusr@
+ rcService sympa enable yes || exit 0
+ rcService sympa active yes && exit 0
+ sympa_start
+
+%stop -p 100 -u @l_rusr@
+ rcService sympa enable yes || exit 0
+ rcService sympa active no && exit 0
+ sympa_stop
+ sleep 2
+
+%restart -u @l_rusr@
+ rcService sympa enable yes || exit 0
+ rcService sympa active no && exit 0
+ sympa_stop
+ sleep 2
+ sympa_start
+
+%daily -u @l_susr@
+ rcService sympa enable yes || exit 0
+ shtool rotate -f \
+ -n ${sympa_log_numfiles} -s ${sympa_log_minsize} -d \
+ -z ${sympa_log_complevel} -m 664 -o @l_susr@ -g @l_mgrp@ \
+ -P "${sympa_log_prolog}" \
+ -E "${sympa_log_epilog}; rc sympa restart" \
+ @l_prefix@/var/sympa/run/sympa.log
+
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/sympa/sympa-apache.conf
============================================================================
$ cvs diff -u -r0 -r1.1 sympa-apache.conf
--- /dev/null 2006-03-01 15:09:53 +0100
+++ sympa-apache.conf 2006-03-01 15:09:59 +0100
@@ -0,0 +1,18 @@
+##
+## sympa-apache.conf -- Apache Configuration for Sympa
+##
+
+ScriptAlias /sympa @l_prefix@/cgi/wwsympa.cgi
+ScriptAlias /sympasoap @l_prefix@/cgi/sympa_soap_server.cgi
+
+<IfModule mod_fastcgi.c>
+ FastCgiServer @l_prefix@/cgi/wwsympa.cgi -processes 2
+ FastCgiServer @l_prefix@/cgi/sympa_soap_server.cgi -processes 1
+ <Location /sympa>
+ SetHandler fastcgi-script
+ </Location>
+ <Location /sympasoap>
+ SetHandler fastcgi-script
+ </Location>
+</IfModule>
+
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/sympa/sympa-setup.sh
============================================================================
$ cvs diff -u -r0 -r1.1 sympa-setup.sh
--- /dev/null 2006-03-01 15:09:53 +0100
+++ sympa-setup.sh 2006-03-01 15:09:59 +0100
@@ -0,0 +1,38 @@
+#!/bin/sh
+##
+## sympa-setup.sh -- Sympa MySQL Setup Utility
+##
+
+# determine MySQL root password
+mysql_password=`grep "^password" @l_prefix@/etc/mysql/my.pwd |\
+ sed -e 's;^password[^=]*= *;;' -e 's; *$;;'`
+
+# determine Sympa database password
+sympa_password=`grep "^db_passwd" @l_prefix@/etc/sympa/sympa.conf |\
+ sed -e 's;^db_passwd[ ]*;;' -e 's; *$;;'`
+
+cmd="${1:-'install'}"
+case "$cmd" in
+ install )
+ # create the default Sympa database schema
+ @l_prefix@/bin/mysql \
+ --user=root --password=$mysql_password \
+ mysql <@l_prefix@/share/sympa/script/create_db.mysql
+
+ # create a MySQL username/password for Sympa
+ @l_prefix@/bin/mysql \
+ --user=root --password=$mysql_password \
+ mysql <<EOF
+ GRANT ALL ON sympa.* TO [EMAIL PROTECTED] IDENTIFIED BY
'$sympa_password';
+ FLUSH PRIVILEGES;
+EOF
+ ;;
+ uninstall )
+ @l_prefix@/bin/mysql \
+ --user=root --password=$mysql_password \
+ mysql <<EOF
+ DROP DATABASE sympa;
+EOF
+ ;;
+esac
+
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/sympa/sympa-wrapper.c
============================================================================
$ cvs diff -u -r0 -r1.1 sympa-wrapper.c
--- /dev/null 2006-03-01 15:09:53 +0100
+++ sympa-wrapper.c 2006-03-01 15:09:59 +0100
@@ -0,0 +1,14 @@
+/*
+** sympa-wrapper.c -- Sympa SetUID Wrapper
+*/
+
+#include <unistd.h>
+
+int main(int argn, char **argv, char **envp)
+{
+ argv[0] = SCRIPT_PATH;
+ execve(argv[0], argv, envp);
+ /* not reached */
+ return 0;
+}
+
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/sympa/sympa.patch
============================================================================
$ cvs diff -u -r0 -r1.1 sympa.patch
--- /dev/null 2006-03-01 15:09:53 +0100
+++ sympa.patch 2006-03-01 15:10:00 +0100
@@ -0,0 +1,349 @@
+Index: soap/sympa_soap_server.fcgi
+--- soap/sympa_soap_server.fcgi.orig 2005-05-30 10:10:02.000000000 +0000
++++ soap/sympa_soap_server.fcgi 2005-11-20 13:13:59.992979738 +0000
+@@ -52,7 +52,7 @@
+ ## Open log
+ $wwsconf->{'log_facility'}||= $Conf{'syslog'};
+
+-&Log::do_openlog($wwsconf->{'log_facility'}, $Conf{'log_socket_type'},
'soap');
++&Log::do_openlog($wwsconf->{'log_facility'}, $Conf{'log_socket_type'},
'soap', $Conf{'logfile'});
+ &Log::do_log('info', 'SOAP server launched');
+
+ unless ($List::use_db = &List::probe_db()) {
+Index: src/Conf.pm
+--- src/Conf.pm.orig 2005-10-20 09:51:13.000000000 +0000
++++ src/Conf.pm 2005-11-20 13:13:59.994159654 +0000
+@@ -42,7 +42,7 @@
+ default_shared_quota default_archive_quota
default_list_priority distribution_mode edit_list email etc
+ global_remind home host domain lang listmaster
listmaster_email localedir log_socket_type log_level
+ logo_html_definition misaddressed_commands
misaddressed_commands_regexp max_size maxsmtp nrcpt
+- owner_priority pidfile pidfile_distribute
++ owner_priority logfile pidfile pidfile_distribute
+ spool queue queuedistribute queueauth queuetask
queuebounce queuedigest
+ queueexpire queuemod queuesubscribe queueoutgoing tmpdir
+ loop_command_max loop_command_sampling_delay
loop_command_decrease_factor
+@@ -87,6 +87,7 @@
+ 'host' => undef,
+ 'domain' => undef,
+ 'email' => 'sympa',
++ 'logfile' => '--PIDDIR--/sympa.log',
+ 'pidfile' => '--PIDDIR--/sympa.pid',
+ 'pidfile_distribute' => '--PIDDIR--/sympa-distribute.pid',
+ 'localedir' => '--LOCALEDIR--',
+Index: src/Language.pm
+--- src/Language.pm.orig 2005-10-20 09:51:13.000000000 +0000
++++ src/Language.pm 2005-11-20 13:13:59.994680321 +0000
+@@ -128,7 +128,7 @@
+ }
+
+ &Locale::Messages::textdomain("sympa");
+- &Locale::Messages::bindtextdomain('sympa','--DIR--/locale');
++ &Locale::Messages::bindtextdomain('sympa','--LOCALEDIR--');
+ &Locale::Messages::bind_textdomain_codeset('sympa',$recode) if $recode;
+ #bind_textdomain_codeset sympa => 'iso-8859-1';
+
+@@ -148,7 +148,7 @@
+ }
+ }
+ unless ($success) {
+- &do_log('err','Failed to setlocale(%s) ; you either have a problem
with the catalogue .mo files or you should extend available locales in your
/etc/locale.gen (or /etc/sysconfig/i18n) file', $locale);
++ # &do_log('err','Failed to setlocale(%s) ; you either have a
problem with the catalogue .mo files or you should extend available locales in
your /etc/locale.gen (or /etc/sysconfig/i18n) file', $locale);
+ return undef;
+ }
+ }
+Index: src/Log.pm
+--- src/Log.pm.orig 2005-01-26 14:09:33.000000000 +0000
++++ src/Log.pm 2005-11-20 13:13:59.995301071 +0000
+@@ -24,12 +24,13 @@
+ package Log;
+
+ require Exporter;
+-use Sys::Syslog;
++use IO::File;
+ use Carp;
+
+ @ISA = qw(Exporter);
+ @EXPORT = qw(fatal_err do_log do_openlog $log_level);
+
++my ($log_fh, $log_file);
+ my ($log_facility, $log_socket_type, $log_service);
+ local $log_level |= 0;
+
+@@ -37,8 +38,6 @@
+ my $m = shift;
+ my $errno = $!;
+
+- syslog('err', $m, @_);
+- syslog('err', "Exiting.");
+ $m =~ s/%m/$errno/g;
+
+ my $full_msg = sprintf $m,@_;
+@@ -69,9 +68,9 @@
+ # do not log if log level if too high regarding the log requested by
user
+ return if ($level > $log_level);
+
+- unless (syslog($fac, $m, @_)) {
++ unless (&do_write($fac, $level, $m, @_)) {
+ &do_connect();
+- syslog($fac, $m, @_);
++ &do_write($fac, $level, $m, @_);
+ }
+ if ($main::options{'foreground'}) {
+ if (!$main::options{'batch'}
+@@ -82,12 +81,24 @@
+ }
+ }
+
++sub do_write {
++ my ($fac, $level, $fmt, @args) = @_;
++ if (defined($log_fh)) {
++ my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
localtime(time());
++ my $date = sprintf("%b %2d %02d:%02d:%02d", $mon+1, $mday, $hour,
$min, $sec);
++ $log_fh->printf("%s %s[%d]: [%s.%s] $fmt\n", $date, $log_service,
$$, $fac, $level, @args);
++ return 1;
++ }
++ else {
++ return 0;
++ }
++}
+
+ sub do_openlog {
+- my ($fac, $socket_type, $service) = @_;
++ my ($fac, $socket_type, $service, $logfile) = @_;
+ $service ||= 'sympa';
+
+- ($log_facility, $log_socket_type, $log_service) = ($fac, $socket_type,
$service);
++ ($log_facility, $log_socket_type, $log_service, $log_file) = ($fac,
$socket_type, $service, $logfile);
+
+ # foreach my $k (keys %options) {
+ # printf "%s = %s\n", $k, $options{$k};
+@@ -97,12 +108,8 @@
+ }
+
+ sub do_connect {
+- if ($log_socket_type =~ /^(unix|inet)$/i) {
+- Sys::Syslog::setlogsock(lc($log_socket_type));
+- }
+- # close log may be usefull : if parent processus did open log child
process inherit the openlog with parameters from parent process
+- closelog ;
+- openlog("$log_service\[$$\]", 'ndelay', $log_facility);
++ $log_fh->close() if defined($log_fh);
++ $log_fh = new IO::File ">>$log_file";
+ }
+
+ 1;
+Index: src/alias_manager.pl
+--- src/alias_manager.pl.orig 2005-08-09 09:02:35.000000000 +0000
++++ src/alias_manager.pl 2005-11-20 13:15:57.888680709 +0000
+@@ -43,7 +43,7 @@
+ my $tmp_alias_file = $Conf{'tmpdir'}.'/sympa_aliases.'.time;
+
+
+-my $alias_wrapper = '--MAILERPROGDIR--/aliaswrapper';
++my $alias_wrapper = '--LIBEXECDIR--/aliaswrapper';
+ my $lock_file = '--EXPL_DIR--/alias_manager.lock';
+ my $default_domain;
+ my $path_to_queue = '--MAILERPROGDIR--/queue';
+Index: src/etc/script/mod2html.pl
+--- src/etc/script/mod2html.pl.orig 2004-06-23 13:19:32.000000000 +0000
++++ src/etc/script/mod2html.pl 2005-11-20 13:13:59.995673904 +0000
+@@ -12,7 +12,7 @@
+ unless (Conf::load('--CONFIG--')) {
+ die "Can't load Sympa configuration file";
+ }
+-&do_openlog($Conf{'syslog'}, $Conf{'log_socket_type'}, 'sympa');
++&do_openlog($Conf{'syslog'}, $Conf{'log_socket_type'}, 'sympa',
$Conf{'logfile'});
+
+ if ($Conf{'db_name'} and $Conf{'db_type'}) {
+ unless ($List::use_db = &List::probe_db()) {
+Index: src/etc/script/testlogs.pl
+--- src/etc/script/testlogs.pl.orig 2003-03-12 07:49:34.000000000 +0000
++++ src/etc/script/testlogs.pl 2005-11-20 13:13:59.996049654 +0000
+@@ -19,7 +19,7 @@
+
+
+ ## Open the syslog and say we're read out stuff.
+-do_openlog($Conf{'syslog'}, $Conf{'log_socket_type'}, 'sympa');
++do_openlog($Conf{'syslog'}, $Conf{'log_socket_type'}, 'sympa',
$Conf{'logfile'});
+
+ # setting log_level using conf unless it is set by calling option
+ if ($main::options{'log_level'}) {
+Index: src/sympa.pl
+--- src/sympa.pl.orig 2005-07-28 09:39:28.000000000 +0000
++++ src/sympa.pl 2005-11-20 13:13:59.997390238 +0000
+@@ -167,7 +167,7 @@
+ }
+
+ ## Open the syslog and say we're read out stuff.
+-do_openlog($Conf{'syslog'}, $Conf{'log_socket_type'}, 'sympa');
++do_openlog($Conf{'syslog'}, $Conf{'log_socket_type'}, 'sympa',
$Conf{'logfile'});
+
+ # setting log_level using conf unless it is set by calling option
+ if ($main::options{'log_level'}) {
+@@ -253,7 +253,7 @@
+ my $service = 'sympa';
+ $service .= '(message)' if ($main::daemon_usage eq 'message');
+ $service .= '(command)' if ($main::daemon_usage eq 'command');
+- do_openlog($Conf{'syslog'}, $Conf{'log_socket_type'}, $service);
++ do_openlog($Conf{'syslog'}, $Conf{'log_socket_type'}, $service,
$Conf{'logfile'});
+
+ do_log('debug', "Running server $$ with main::daemon_usage =
$main::daemon_usage ");
+ unless ($main::options{'batch'} ) {
+Index: src/sympa_wizard.pl
+--- src/sympa_wizard.pl.orig 2005-08-10 12:30:20.000000000 +0000
++++ src/sympa_wizard.pl 2005-11-20 13:13:59.998440988 +0000
+@@ -65,6 +65,12 @@
+ 'query' => 'Directory for configuration files ; it also contains
scenari/ and templates/ directories',
+ 'file' => 'sympa.conf'},
+
++ {'name' => 'logfile',
++ 'default' => '--PIDDIR--/sympa.log',
++ 'query' => 'File to which Sympa logs.',
++ 'file' => 'sympa.conf',
++ 'advice' =>'Sympa logs to this file instead of Syslog.'},
++
+ {'name' => 'pidfile',
+ 'default' => '--PIDDIR--/sympa.pid',
+ 'query' => 'File containing Sympa PID while running.',
+@@ -92,13 +98,13 @@
+ 'advice' =>''},
+
+ {'name' => 'arc_path',
+- 'default' => '--DIR--/arc',
++ 'default' => '--DIR--/var/sympa/store/arc',
+ 'query' => 'Where to store HTML archives',
+ 'file' => 'wwsympa.conf','edit' => '1',
+ 'advice' =>'Better if not in a critical partition'},
+
+ {'name' => 'bounce_path',
+- 'default' => '--DIR--/bounce',
++ 'default' => '--DIR--/var/sympa/store/bounce',
+ 'query' => 'Where to store bounces',
+ 'file' => 'wwsympa.conf',
+ 'advice' =>'Better if not in a critical partition'},
+@@ -154,13 +160,13 @@
+ {'title' => 'General definition'},
+
+ {'name' => 'domain',
+- 'default' => '--HOST--',
++ 'default' => 'example.com',
+ 'query' => 'Main robot hostname',
+ 'file' => 'sympa.conf',
+ 'advice' =>''},
+
+ {'name' => 'listmaster',
+- 'default' => '[EMAIL PROTECTED]',
++ 'default' => '[EMAIL PROTECTED]',
+ 'query' => 'Listmasters email list comma separated',
+ 'file' => 'sympa.conf','edit' => '1',
+ 'advice' =>'Sympa will associate listmaster privileges to these
email addresses (mail and web interfaces). Some error reports may also be sent
to these addresses.'},
+@@ -268,7 +274,7 @@
+ {'title' => 'MTA related'},
+
+ {'name' => 'sendmail',
+- 'default' => '/usr/sbin/sendmail',
++ 'default' => '--DIR--/sbin/sendmail',
+ 'query' => 'Path to the MTA (sendmail, postfix, exim or qmail)',
+ 'file' => 'sympa.conf','edit' => '1',
+ 'advice' => "should point to a sendmail-compatible binary (eg: a
binary named \'sendmail\' is distributed with Postfix)"},
+@@ -295,7 +301,7 @@
+ {'title' => 'Pluggin'},
+
+ {'name' => 'antivirus_path',
+- 'sample' => '/usr/local/uvscan/uvscan',
++ 'sample' => '--DIR--/bin/uvscan',
+ 'query' => 'Path to the antivirus scanner engine',
+ 'file' => 'sympa.conf','edit' => '1',
+ 'advice' =>'supported antivirus : McAfee/uvscan, Fsecure/fsav,
Sophos, AVP and Trend Micro/VirusWall'},
+@@ -308,14 +314,14 @@
+ 'advice' =>''},
+
+ {'name' => 'mhonarc',
+- 'default' => '/usr/bin/mhonarc',
++ 'default' => '--DIR--/bin/mhonarc',
+ 'query' => 'Path to MhOnarc mail2html pluggin',
+ 'file' => 'wwsympa.conf','edit' => '1',
+ 'advice' =>'This is required for HTML mail archiving'},
+
+ {'title' => 'S/MIME pluggin'},
+ {'name' => 'openssl',
+- 'sample' => '/usr/local/bin/openssl',
++ 'sample' => '--DIR--/bin/openssl',
+ 'query' => 'Path to OpenSSL',
+ 'file' => 'sympa.conf','edit' => '1',
+ 'advice' =>'Sympa knowns S/MIME if openssl is installed'},
+@@ -336,7 +342,7 @@
+ 'file' => 'sympa.conf'},
+
+ {'name' => 'key_passwd',
+- 'sample' => 'your_password',
++ 'sample' => 'sympa',
+ 'query' => 'Password used to crypt lists private keys',
+ 'file' => 'sympa.conf','edit' => '1',
+ 'advice' =>''},
+@@ -373,7 +379,7 @@
+ 'advice' =>''},
+
+ {'name' => 'db_passwd',
+- 'sample' => 'your_passwd',
++ 'sample' => 'sympa',
+ 'query' => 'Database password (associated to the db_user)',
+ 'file' => 'sympa.conf','edit' => '1',
+ 'advice' =>'What ever you use a password or not, you must
protect the SQL server (is it a not a public internet service ?)'},
+@@ -404,7 +410,7 @@
+ 'advice' =>'This module provide much faster web interface'},
+
+ {'name' => 'wwsympa_url',
+- 'default' => 'http://--HOST--/sympa',
++ 'default' => 'http://www.example.com/sympa',
+ 'query' => "Sympa\'s main page URL",
+ 'file' => 'sympa.conf','edit' => '1',
+ 'advice' =>''},
+Index: src/task_manager.pl
+--- src/task_manager.pl.orig 2005-10-28 14:39:33.000000000 +0000
++++ src/task_manager.pl 2005-11-20 13:13:59.999518238 +0000
+@@ -113,7 +113,7 @@
+ $log_level = $main::options{'log_level'} || $Conf{'log_level'};
+
+ $wwsconf->{'log_facility'}||= $Conf{'syslog'};
+-do_openlog($wwsconf->{'log_facility'}, $Conf{'log_socket_type'},
'task_manager');
++do_openlog($wwsconf->{'log_facility'}, $Conf{'log_socket_type'},
'task_manager', $Conf{'logfile'});
+
+ # setting log_level using conf unless it is set by calling option
+ if ($main::options{'log_level'}) {
+Index: wwsympa/archived.pl
+--- wwsympa/archived.pl.orig 2005-10-20 10:23:44.000000000 +0000
++++ wwsympa/archived.pl 2005-11-20 13:14:00.000065988 +0000
+@@ -111,7 +111,7 @@
+ $log_level = $main::options{'log_level'} || $Conf{'log_level'};
+
+ $wwsconf->{'log_facility'}||= $Conf{'syslog'};
+-do_openlog($wwsconf->{'log_facility'}, $Conf{'log_socket_type'},
'archived');
++do_openlog($wwsconf->{'log_facility'}, $Conf{'log_socket_type'},
'archived', $Conf{'logfile'});
+
+ ## Set the UserID & GroupID for the process
+ $( = $) = (getgrnam('--GROUP--'))[2];
+Index: wwsympa/bounced.pl
+--- wwsympa/bounced.pl.orig 2004-12-10 14:42:58.000000000 +0000
++++ wwsympa/bounced.pl 2005-11-20 13:14:00.000535988 +0000
+@@ -138,7 +138,7 @@
+ $log_level = $main::options{'log_level'} || $Conf{'log_level'};
+
+ $wwsconf->{'log_facility'}||= $Conf{'syslog'};
+-do_openlog($wwsconf->{'log_facility'}, $Conf{'log_socket_type'}, 'bounced');
++do_openlog($wwsconf->{'log_facility'}, $Conf{'log_socket_type'}, 'bounced',
$Conf{'logfile'});
+
+ ## Set the UserID & GroupID for the process
+ $( = $) = (getgrnam('--GROUP--'))[2];
+Index: wwsympa/wwsympa.fcgi
+--- wwsympa/wwsympa.fcgi.orig 2005-10-28 14:12:54.000000000 +0000
++++ wwsympa/wwsympa.fcgi 2005-11-20 13:14:00.009050821 +0000
+@@ -514,7 +514,7 @@
+ ## Open log
+ $wwsconf->{'log_facility'}||= $Conf{'syslog'};
+
+-&Log::do_openlog($wwsconf->{'log_facility'}, $Conf{'log_socket_type'},
'wwsympa');
++&Log::do_openlog($wwsconf->{'log_facility'}, $Conf{'log_socket_type'},
'wwsympa', $Conf{'logfile'});
+ &do_log('info', 'WWSympa started');
+
+ ## Set locale configuration
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/sympa/sympa.spec
============================================================================
$ cvs diff -u -r0 -r1.1 sympa.spec
--- /dev/null 2006-03-01 15:09:53 +0100
+++ sympa.spec 2006-03-01 15:10:00 +0100
@@ -0,0 +1,343 @@
+##
+## sympa.spec -- OpenPKG RPM Package Specification
+## Copyright (c) 2000-2006 OpenPKG Foundation e.V. <http://openpkg.net/>
+## Copyright (c) 2000-2006 Ralf S. Engelschall <http://engelschall.com/>
+##
+## Permission to use, copy, modify, and distribute this software for
+## any purpose with or without fee is hereby granted, provided that
+## the above copyright notice and this permission notice appear in all
+## copies.
+##
+## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+## SUCH DAMAGE.
+##
+
+# package information
+Name: sympa
+Summary: Mailing List Manager
+URL: http://www.sympa.org/
+Vendor: CRU
+Packager: OpenPKG
+Distribution: OpenPKG
+Class: EVAL
+Group: Mail
+License: GPL
+Version: 5.1.2
+Release: 20060301
+
+# list of sources
+Source0: http://www.sympa.org/distribution/sympa-%{version}.tar.gz
+Source1: sympa-wrapper.c
+Source2: sympa-setup.sh
+Source3: sympa-apache.conf
+Source4: rc.sympa
+Patch0: sympa.patch
+
+# build information
+Prefix: %{l_prefix}
+BuildRoot: %{l_buildroot}
+BuildPreReq: OpenPKG, openpkg >= 20040130
+PreReq: OpenPKG, openpkg >= 20040130
+BuildPreReq: openssl, mhonarc
+PreReq: openssl, mhonarc
+BuildPreReq: perl-crypto, perl-mail, perl-util, perl-www, perl-comp
+PreReq: perl-crypto, perl-mail, perl-util, perl-www, perl-comp
+BuildPreReq: perl-locale, perl-parse, perl-sys, perl-ldap
+PreReq: perl-locale, perl-parse, perl-sys, perl-ldap
+BuildPreReq: perl-db, perl-dbi, perl-dbi::with_dbd_mysql = yes
+PreReq: perl-db, perl-dbi, perl-dbi::with_dbd_mysql = yes
+BuildPreReq: perl-xml, perl-xml::with_libxml = yes
+PreReq: perl-xml, perl-xml::with_libxml = yes
+PreReq: apache, apache::with_mod_fastcgi = yes
+PreReq: MTA
+AutoReq: no
+AutoReqProv: no
+
+%description
+ Sympa is a rich open source mailing list software. Its design highly
+ focuses on customization possibilities and ease of administration.
+ Advanced features are: Bulk emailer, Internationalization, Service
+ messages and web pages defined by templates, Subscriber information
+ stored in a RDBMS, Web interface with user and admin features,
+ Different web authentication backends including Single Sign-on
+ systems, Web document repository for list members, S/MIME support
+ for both signature verification and mail encryption, Automatic
+ bounces management, External antiviral plugin, Virtual robots
+ management and SOAP ML service.
+
+%track
+ prog sympa = {
+ version = %{version}
+ url = http://www.sympa.org/distribution/
+ regex = sympa-(\d+\.\d+(\.\d+)*)\.tar\.gz
+ }
+
+%prep
+ %setup -q
+ %patch -p0
+
+%build
+ # disable interactive checks
+ %{l_shtool} subst \
+ -e 's;warning checkperl checkcpan \(sources man locale\);\1;' \
+ Makefile.in
+
+ # disable ownership enforcements
+ %{l_shtool} subst \
+ -e 's;chown;true;' \
+ -e 's;chgrp;true;' \
+ Makefile.in */Makefile */*/Makefile
+
+ # configure program
+ CC="%{l_cc}" \
+ CFLAGS="%{l_cflags -O}" \
+ CPPFLAGS="%{l_cppflags}" \
+ LDFLAGS="%{l_ldflags}" \
+ ./configure \
+ --prefix=%{l_prefix} \
+ --with-sbindir=%{l_prefix}/sbin \
+ --with-libexecdir=%{l_prefix}/libexec/sympa \
+ --with-cgidir=%{l_prefix}/libexec/sympa \
+ --with-confdir=%{l_prefix}/etc/sympa \
+ --with-iconsdir=%{l_prefix}/share/sympa/icons \
+ --with-datadir=%{l_prefix}/share/sympa \
+ --with-expldir=%{l_prefix}/var/sympa/expl \
+ --with-libdir=%{l_prefix}/lib/sympa \
+ --with-mandir=%{l_prefix}/man/man1 \
+ --with-docdir=%{l_prefix}/share/sympa/doc \
+ --with-initdir=%{l_prefix}/etc/sympa \
+ --with-lockdir=%{l_prefix}/var/sympa/run \
+ --with-piddir=%{l_prefix}/var/sympa/run \
+ --with-etcdir=%{l_prefix}/var/sympa/etc \
+ --with-localedir=%{l_prefix}/share/sympa/locale \
+ --with-scriptdir=%{l_prefix}/share/sympa/script \
+ --with-sampledir=%{l_prefix}/share/sympa/sample \
+ --with-spooldir=%{l_prefix}/var/sympa/spool \
+ --with-perl=%{l_prefix}/bin/perl \
+ --with-openssl=%{l_prefix}/bin/openssl \
+ --with-user=%{l_rusr} \
+ --with-group=%{l_rgrp} \
+ --with-sendmail_aliases=%{l_prefix}/var/sympa/mta/aliases \
+ --with-virtual_aliases=%{l_prefix}/var/sympa/mta/virtual \
+ --with-newaliases=`%{l_shtool} path -p
%{l_prefix}/bin:%{l_prefix}/sbin newaliases` \
+ --with-postmap=%{l_prefix}/sbin/postmap
+
+ # build program
+ %{l_make} %{l_mflags}
+
+ # build setuid wrappers
+ %{l_cc} %{l_cflags -O} %{l_ldflags} \
+ '-DSCRIPT_PATH="%{l_prefix}/libexec/sympa/wwsympa.fcgi"' \
+ -o wwsympa.cgi %{SOURCE sympa-wrapper.c}
+ %{l_cc} %{l_cflags -O} %{l_ldflags} \
+ '-DSCRIPT_PATH="%{l_prefix}/libexec/sympa/sympa_soap_server.fcgi"' \
+ -o sympa_soap_server.cgi %{SOURCE sympa-wrapper.c}
+
+%install
+ # install program
+ rm -rf $RPM_BUILD_ROOT
+ %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
+
+ # post-adjust installation
+ %{l_shtool} subst \
+ -e 's;^#\(db_type\);\1;' \
+ -e 's;^#\(db_name\);\1;' \
+ -e 's;^#\(db_host\);\1;' \
+ -e 's;^#\(db_user\);\1;' \
+ -e 's;^#\(db_passwd\);\1;' \
+ $RPM_BUILD_ROOT%{l_prefix}/etc/sympa/sympa.conf
+
+ # strip down installation
+ rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/sympa/sympa
+ chmod a-s $RPM_BUILD_ROOT%{l_prefix}/libexec/sympa/*.fcgi
+ strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
+
+ # install setuid wrappers
+ %{l_shtool} mkdir -f -p -m 755 \
+ $RPM_BUILD_ROOT%{l_prefix}/cgi
+ %{l_shtool} install -c -s -m 755 \
+ wwsympa.cgi sympa_soap_server.cgi \
+ $RPM_BUILD_ROOT%{l_prefix}/cgi/
+
+ # install setup script
+ %{l_shtool} install -c -m 755 %{l_value -s -a} \
+ %{SOURCE sympa-setup.sh} $RPM_BUILD_ROOT%{l_prefix}/sbin/sympa-setup
+
+ # install Apache configuration
+ %{l_shtool} install -c -m 644 %{l_value -s -a} \
+ %{SOURCE sympa-apache.conf} \
+ $RPM_BUILD_ROOT%{l_prefix}/etc/sympa/
+
+ # install run-command script
+ %{l_shtool} mkdir -f -p -m 755 \
+ $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
+ %{l_shtool} install -c -m 755 %{l_value -s -a} \
+ %{SOURCE rc.sympa} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
+
+ # create additional directories (Sympa missing)
+ %{l_shtool} mkdir -f -p -m 755 \
+ $RPM_BUILD_ROOT%{l_prefix}/var/sympa/spool/bounce \
+ $RPM_BUILD_ROOT%{l_prefix}/var/sympa/spool/subscribe \
+ $RPM_BUILD_ROOT%{l_prefix}/var/sympa/spool/distribute \
+ $RPM_BUILD_ROOT%{l_prefix}/var/sympa/spool/distribute/bad \
+ $RPM_BUILD_ROOT%{l_prefix}/var/sympa/spool/msg/bad
+
+ # create additional directories (OpenPKG specific)
+ %{l_shtool} mkdir -f -p -m 755 \
+ $RPM_BUILD_ROOT%{l_prefix}/var/sympa/store/arc \
+ $RPM_BUILD_ROOT%{l_prefix}/var/sympa/store/bounce \
+ $RPM_BUILD_ROOT%{l_prefix}/var/sympa/mta
+
+ # determine installation files
+ %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
+ %{l_files_std} \
+ '%config %{l_prefix}/etc/sympa/*' \
+ '%attr(6755,%{l_rusr},%{l_rgrp}) %{l_prefix}/bin/bouncequeue' \
+ '%attr(6755,%{l_rusr},%{l_rgrp}) %{l_prefix}/bin/queue' \
+ '%attr(6755,%{l_rusr},%{l_rgrp}) %{l_prefix}/cgi/wwsympa.cgi' \
+ '%attr(6755,%{l_rusr},%{l_rgrp})
%{l_prefix}/cgi/sympa_soap_server.cgi' \
+ '%attr(4755,%{l_susr},%{l_mgrp})
%{l_prefix}/libexec/sympa/aliaswrapper' \
+ '%attr(4755,%{l_susr},%{l_mgrp})
%{l_prefix}/libexec/sympa/virtualwrapper' \
+ '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/sympa' \
+ '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/sympa/*' \
+ '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/sympa/*/*' \
+ '%attr(-,%{l_susr},%{l_rgrp}) %{l_prefix}/var/sympa/mta' \
+ '%doc %{l_prefix}/share/sympa/doc/*/html' \
+ '%doc %{l_prefix}/share/sympa/doc/*'
+
+%files -f files
+
+%clean
+ rm -rf $RPM_BUILD_ROO
+
+%post
+ if [ $1 -eq 1 ]; then
+ # add hook to Apache configuration
+ apacheconf="$RPM_INSTALL_PREFIX/etc/apache/apache.conf"
+ if [ -f $apacheconf ]; then
+ ( echo "Include $RPM_INSTALL_PREFIX/etc/sympa/sympa-apache.conf"
+ ) | $RPM_INSTALL_PREFIX/lib/openpkg/rpmtool config \
+ -a -i "$RPM_INSTALL_PREFIX:sympa" $apacheconf
+ fi
+
+ # establish initial Sympa MTA glue files
+ touch $RPM_INSTALL_PREFIX/var/sympa/mta/aliases
+ touch $RPM_INSTALL_PREFIX/var/sympa/mta/virtual
+ chown %{l_rusr}:%{l_rgrp} $RPM_INSTALL_PREFIX/var/sympa/mta/*
+
+ # hook into MTA
+ mta_name=`$RPM_INSTALL_PREFIX/etc/rc --query MTA_name`
+ mta_aliases_file=`$RPM_INSTALL_PREFIX/etc/rc --query
MTA_aliases_file`
+ mta_update_command=`$RPM_INSTALL_PREFIX/etc/rc --query
MTA_aliases_update`
+ if [ ".$mta_aliases_file" != . ]; then
+ ( echo "# Sympa Static Aliases"
+ echo "listmaster: \"|$RPM_INSTALL_PREFIX/bin/queue
listmaster\""
+ echo "sympa: \"|$RPM_INSTALL_PREFIX/bin/queue sympa\""
+ echo "bounce+*: \"|$RPM_INSTALL_PREFIX/bin/bouncequeue
sympa\""
+ echo "sympa-request: postmaster"
+ echo "sympa-owner: postmaster"
+ ) |\
+ $RPM_INSTALL_PREFIX/lib/openpkg/rpmtool config \
+ -a -i "$RPM_INSTALL_PREFIX:sympa" $mta_aliases_file
+ fi
+ if [ ".$mta_update_command" != . ]; then
+ eval $mta_update_command >/dev/null 2>&1 || true
+ fi
+ case "$mta_name" in
+ sendmail )
+ ( echo "dnl # Sympa Dynamic Aliases"
+ echo "define(\`ALIAS_FILE',
ALIAS_FILE\`,$RPM_INSTALL_PREFIX/var/sympa/mta/aliases')"
+ ) |\
+ $RPM_INSTALL_PREFIX/lib/openpkg/rpmtool config \
+ -a -i "$RPM_INSTALL_PREFIX:sympa" -p "dnl "
$RPM_INSTALL_PREFIX/etc/sendmail/sendmail.m4
+ (cd $RPM_INSTALL_PREFIX/etc/sendmail && make) >/dev/null
2>&1 || true
+ ;;
+ postfix )
+ %{l_shtool} subst -b .orig \
+ -e "s;^\\(alias_maps[^=]*=.*\\);\\1,
hash:$RPM_INSTALL_PREFIX/var/sympa/mta/aliases;" \
+ -e "s;^\\(alias_database[^=]*=.*\\);\\1,
hash:$RPM_INSTALL_PREFIX/var/sympa/mta/aliases;" \
+ $RPM_INSTALL_PREFIX/etc/postfix/main.cf
+ (cd $RPM_INSTALL_PREFIX/etc/postfix && make) >/dev/null 2>&1
|| true
+ ;;
+ esac
+
+ # display final hints on initial installation
+ ( echo "To complete this installation of Sympa please perform:"
+ echo "1. optionally set a fresh random password for the Sympa"
+ echo " database by editing the \"db_password\", \"listmaster\""
+ echo " and \"domain\" entries in the configuration file:"
+ echo " \$ vi $RPM_INSTALL_PREFIX/etc/sympa/sympa.conf"
+ echo "2. start MySQL and initialize the Sympa database with:"
+ echo " \$ $RPM_INSTALL_PREFIX/etc/rc mysql start"
+ echo " \$ $RPM_INSTALL_PREFIX/sbin/sympa-setup install"
+ echo "3. start Apache and the Sympa daemons with:"
+ echo " \$ $RPM_INSTALL_PREFIX/etc/rc apache start"
+ echo " \$ $RPM_INSTALL_PREFIX/etc/rc sympa start"
+ echo "4. connect with a browser to Sympa for further
configuration:"
+ echo " http://127.0.0.1/sympa/"
+ echo "5. login with \"listmaster\" for Sympa administrative
access."
+ ) | %{l_rpmtool} msg -b -t notice
+ fi
+ if [ $1 -eq 2 ]; then
+ # after upgrade, restart service
+ eval `%{l_rc} sympa status 2>/dev/null`
+ [ ".$sympa_active" = .yes ] && %{l_rc} sympa restart
+ fi
+ exit 0
+
+%preun
+ if [ $1 -eq 0 ]; then
+ # remove hook from Apache configuration
+ apacheconf="$RPM_INSTALL_PREFIX/etc/apache/apache.conf"
+ if [ -f $apacheconf ]; then
+ $RPM_INSTALL_PREFIX/lib/openpkg/rpmtool config \
+ -r -i "$RPM_INSTALL_PREFIX:sympa" $apacheconf
+ fi
+
+ # unhook from MTA
+ mta_name=`$RPM_INSTALL_PREFIX/etc/rc --query MTA_name`
+ mta_aliases_file=`$RPM_INSTALL_PREFIX/etc/rc --query
MTA_aliases_file`
+ mta_update_command=`$RPM_INSTALL_PREFIX/etc/rc --query
MTA_aliases_update`
+ if [ ".$mta_aliases_file" != . ]; then
+ $RPM_INSTALL_PREFIX/lib/openpkg/rpmtool config \
+ -r -i "$RPM_INSTALL_PREFIX:sympa" $mta_aliases_file
+ fi
+ if [ ".$mta_update_command" != . ]; then
+ eval $mta_update_command >/dev/null 2>&1 || true
+ fi
+ case "$mta_name" in
+ sendmail )
+ $RPM_INSTALL_PREFIX/lib/openpkg/rpmtool config \
+ -r -i "$RPM_INSTALL_PREFIX:sympa" -p "dnl "
$RPM_INSTALL_PREFIX/etc/sendmail/sendmail.m4
+ (cd $RPM_INSTALL_PREFIX/etc/sendmail && make) >/dev/null
2>&1 || true
+ ;;
+ postfix )
+ %{l_shtool} subst -b .orig \
+ -e "s;^\\(alias_maps[^=]*=.*\\),
hash:$RPM_INSTALL_PREFIX/var/sympa/mta/aliases;\\1;" \
+ -e "s;^\\(alias_database[^=]*=.*\\),
hash:$RPM_INSTALL_PREFIX/var/sympa/mta/aliases;\\1;" \
+ $RPM_INSTALL_PREFIX/etc/postfix/main.cf
+ (cd $RPM_INSTALL_PREFIX/etc/postfix && make) >/dev/null 2>&1
|| true
+ ;;
+ esac
+
+ # before erase, stop service and remove log files
+ %{l_rc} sympa stop 2>/dev/null
+ rm -f $RPM_INSTALL_PREFIX/var/sympa/run/*.pid >/dev/null 2>&1
|| true
+ rm -f $RPM_INSTALL_PREFIX/var/sympa/run/sympa.log >/dev/null 2>&1
|| true
+ rm -f $RPM_INSTALL_PREFIX/var/sympa/spool/*/* >/dev/null 2>&1
|| true
+ rm -f $RPM_INSTALL_PREFIX/var/sympa/mta/* >/dev/null 2>&1
|| true
+ rm -rf $RPM_INSTALL_PREFIX/var/sympa/expl/* >/dev/null 2>&1
|| true
+ $RPM_INSTALL_PREFIX/sbin/sympa-setup uninstall >/dev/null 2>&1
|| true
+ fi
+ exit 0
+
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [email protected]