tags 498144 + patch
thanks

I've reproduced this bug by installing sympa in an etch environment,
with a mysql database configuration, then upgrading to testing. The
exact errors that are produced are:

Setting up sympa (5.3.4-5.2) ...
Starting Sympa mailing list manager: sympaPrototype mismatch: sub Lock::LOCK_SH 
() vs none at /usr/lib/sympa/bin/Lock.pm line 38.
Constant subroutine LOCK_SH redefined at /usr/lib/sympa/bin/Lock.pm line 38.
Prototype mismatch: sub Lock::LOCK_EX () vs none at /usr/lib/sympa/bin/Lock.pm 
line 39.
Constant subroutine LOCK_EX redefined at /usr/lib/sympa/bin/Lock.pm line 39.
Prototype mismatch: sub Lock::LOCK_NB () vs none at /usr/lib/sympa/bin/Lock.pm 
line 40.
Constant subroutine LOCK_NB redefined at /usr/lib/sympa/bin/Lock.pm line 40.
$* is no longer supported at /usr/lib/sympa/bin/sympa.pl line 162.
error : data structure was not updated ; you should run sympa.pl --upgrade to 
run the upgrade process.
.
Starting Sympa mailing list archive manager: archivedPrototype mismatch: sub 
Lock::LOCK_SH () vs none at /usr/lib/sympa/bin/Lock.pm line 38.
Constant subroutine LOCK_SH redefined at /usr/lib/sympa/bin/Lock.pm line 38.
Prototype mismatch: sub Lock::LOCK_EX () vs none at /usr/lib/sympa/bin/Lock.pm 
line 39.
Constant subroutine LOCK_EX redefined at /usr/lib/sympa/bin/Lock.pm line 39.
Prototype mismatch: sub Lock::LOCK_NB () vs none at /usr/lib/sympa/bin/Lock.pm 
line 40.
Constant subroutine LOCK_NB redefined at /usr/lib/sympa/bin/Lock.pm line 40.
.
Starting Sympa task manager: task_managerPrototype mismatch: sub Lock::LOCK_SH 
() vs none at /usr/lib/sympa/bin/Lock.pm line 38.
Constant subroutine LOCK_SH redefined at /usr/lib/sympa/bin/Lock.pm line 38.
Prototype mismatch: sub Lock::LOCK_EX () vs none at /usr/lib/sympa/bin/Lock.pm 
line 39.
Constant subroutine LOCK_EX redefined at /usr/lib/sympa/bin/Lock.pm line 39.
Prototype mismatch: sub Lock::LOCK_NB () vs none at /usr/lib/sympa/bin/Lock.pm 
line 40.
Constant subroutine LOCK_NB redefined at /usr/lib/sympa/bin/Lock.pm line 40.
$* is no longer supported at /usr/lib/sympa/bin/parser.pl line 63.
error : data structure was not updated ; you should run sympa.pl to run the 
upgrade process.
.
Starting Sympa bounce manager: bouncedPrototype mismatch: sub Lock::LOCK_SH () 
vs none at /usr/lib/sympa/bin/Lock.pm line 38.
Constant subroutine LOCK_SH redefined at /usr/lib/sympa/bin/Lock.pm line 38.
Prototype mismatch: sub Lock::LOCK_EX () vs none at /usr/lib/sympa/bin/Lock.pm 
line 39.
Constant subroutine LOCK_EX redefined at /usr/lib/sympa/bin/Lock.pm line 39.
Prototype mismatch: sub Lock::LOCK_NB () vs none at /usr/lib/sympa/bin/Lock.pm 
line 40.
Constant subroutine LOCK_NB redefined at /usr/lib/sympa/bin/Lock.pm line 40.
.

I did *not* see an attempt to reinstall the database, as the original
reporter mentioned, and when I looked closer at where exactly this
particular error was being reported, I found that its not part of the
package installation at all, but these are reported when the sympa
initscript is run. This is why we see "Starting Sympa mailing list
manager:" before the error is reported. Running /etc/init.d/sympa start
again manually provides the error again.

So, the bug seems to be that to upgrade sympa, sympa.pl --upgrade needs
to be run to do the appropriate things to make an existing sympa work
for the newer version (including updating the database table structure).

Personally, as someone who runs sympa, I would prefer that the package
did not automatically run this upgrade procedure on package upgrade,
because on my list system that runs sympa, this upgrade procedure would
take hours. I would rather do it manually and have a medium-priority
debconf question that asked me if I wanted the package to automatically
handle these upgrades, or if I want to do them manually. However, at
this point, the RC bug is that the package is rendered unusable on
upgrade, until you run sympa.pl --upgrade.

I looked at how upgrades were handled in the past, and it doesn't look
like this sympa.pl --upgrade procedure was used in the past (it perhaps
didn't exist in the older versions). However, database structures were
upgraded in the past, but only by installing database upgrade scripts,
in debian/rules:

rules:  install -m 0755 $(DB)/upgrade-pg-db.pl
$(SYMPA)/usr/share/sympa/db/upgrade-pg-db
rules:  install -m 0755 $(DB)/upgrade-mysql-db.pl
$(SYMPA)/usr/share/sympa/db/upgrade-mysql-db

These upgrade scripts are only migrating from 3.4.3 to 4.0, so these are
not useful to be installed any longer. 

Probably the correct solution for this particular problem is to run
sympa.pl --upgrade in the postinst. The attached patch does this. I will
be uploading this to the delayed queue so that there is a chance to
respond to this issue. 

On a side note, these other errors I've reported another bug about.
reverted:
--- sympa-5.3.4/src/tools.pl
+++ sympa-5.3.4.orig/src/tools.pl
@@ -585,7 +585,7 @@
     ## first step is the msg signing OK ; /tmp/sympa-smime.$$ is created
     ## to store the signer certificat for step two. I known, that's durty.
 
+    my $temporary_file = "/tmp/smime-sender.".$$ ;
-    my $temporary_file = $Conf{'tmpdir'}."/".'smime-sender.'.$$ ;
     my $trusted_ca_options = '';
     $trusted_ca_options = "-CAfile $Conf{'cafile'} " if ($Conf{'cafile'});
     $trusted_ca_options .= "-CApath $Conf{'capath'} " if ($Conf{'capath'});
diff -u sympa-5.3.4/debian/postinst sympa-5.3.4/debian/postinst
--- sympa-5.3.4/debian/postinst
+++ sympa-5.3.4/debian/postinst
@@ -481,8 +481,4 @@
 db_stop
 
-## Upgrade sympa from previous version(s) if necessary. The upgrade script is smart enough to know 
-## if it needs to do anything or not
-/usr/lib/sympa/bin/sympa.pl --upgrade
-
 ## Other jobs
 #DEBHELPER#
diff -u sympa-5.3.4/debian/changelog sympa-5.3.4/debian/changelog
--- sympa-5.3.4/debian/changelog
+++ sympa-5.3.4/debian/changelog
@@ -1,13 +1,3 @@
-sympa (5.3.4-5.3) unstable; urgency=low
-
-  * Non-maintainer upload.
-  * Fix insecure use of /tmp in sympa scripts by applying upstream
-    patch to tools.pl (Closes: #496520)
-  * Add the sympa.pl --upgrade procedure to the debian/postinst 
-    to migrate existing installs (Closes: #498144)
-
- -- Micah Anderson <[EMAIL PROTECTED]>  Sat, 04 Oct 2008 14:03:54 -0400
-
 sympa (5.3.4-5.2) unstable; urgency=low
 
   * Non-maintainer upload.

Attachment: signature.asc
Description: Digital signature

Reply via email to