Package: sympa
Version: 4.1.5-2
Severity: important

In the postinst /usr/share/sympa/db/prepare_db is called. In prepare_db 
you set OPTS to "-w $RET $OPTS" to use the debconf sympa/db_user. You
then call /usr/share/sympa/db/install-mysql-db to setup the database.
it doesn't use -w.

However install-mysql-db doesn't understand -w.

Patch is

Index: debian/db/install-mysql-db.pl
===================================================================
--- debian/db/install-mysql-db.pl       (revision 4)
+++ debian/db/install-mysql-db.pl       (working copy)
@@ -10,10 +10,10 @@
 use Getopt::Std;
 use DBI;
 
-use vars qw/$opt_a $opt_d $opt_u $opt_h $opt_p $opt_o/;
-getopts('a:d:u:h:p:o:') or die "$0: [EMAIL PROTECTED]";
+use vars qw/$opt_a $opt_d $opt_u $opt_h $opt_p $opt_o $opt_w/;
+getopts('a:d:u:h:p:o:w:') or die "$0: [EMAIL PROTECTED]";
 
-my ($adminpass, $userpass);
+my ($adminpass, $userpass, $user);
 
 if ($opt_a && -f $opt_a) {
        open(PWD, $opt_a) || die "$0: Couldn't open file $opt_a: $!\n";
@@ -35,6 +35,7 @@
 my $host = $opt_h;
 my $port = $opt_p;
 my $options = $opt_o;
+my $user = $opt_w;
 
 usage() if ($database eq "");
 
@@ -76,7 +77,7 @@
 }
 
 # Create user sympa
-my $command="GRANT ALL on $database.* TO [EMAIL PROTECTED]";
+my $command="GRANT ALL on $database.* TO [EMAIL PROTECTED]";
 if ($userpass ne "") {
     $command .= " IDENTIFIED BY '$userpass'";
 }
@@ -84,6 +85,6 @@
 $dbh->disconnect();
 
 sub usage {
-    die "Usage: install-mysql-db.pl -d <database> [-a <adminpass>] [-u 
<userpass>] [-h <hostname>] [-p <port>]\n";
+    die "Usage: install-mysql-db.pl -d <database> [-a <adminpass>] [-u 
<userpass>] [-h <hostname>] [-p <port>] [-w <user>]\n";
 }
 


-- System Information:
Debian Release: 3.1
Architecture: i386 (i686)
Kernel: Linux 2.6.8-2-686-smp
Locale: LANG=en_AU, LC_CTYPE=en_AU (charmap=ISO-8859-1)


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to