[Pkg-sympa-commits] [sympa] 04/28: Refresh patches

Emmanuel Bouthenot kolter at moszumanska.debian.org
Wed Jun 11 21:52:57 UTC 2014


This is an automated email from the git hooks/post-receive script.

kolter pushed a commit to branch master
in repository sympa.

commit 22e1deb19a74107fa460eeeaf624573a0f74a63e
Author: Emmanuel Bouthenot <kolter at openics.org>
Date:   Sat Mar 22 08:59:00 2014 +0100

    Refresh patches
---
 .../1002_mysql_default_charset_engine.patch        |   6 +-
 ...004_wizard_support_batch_and_display_mode.patch |   8 +-
 ...05_wizard_emit_cmd_and_newline_when_dying.patch |   8 +-
 ...rd_add_soap_url_and_archive_default_index.patch |  32 ---
 ..._wizard_probe_currently_supported_locales.patch |   4 +-
 debian/patches/1009_postfix_virtual_aliases.patch  | 260 ---------------------
 debian/patches/1010_db_port.patch                  |  17 --
 debian/patches/1011_fix_sqlite_db_upgrade          | 196 ----------------
 debian/patches/1011_fix_sqlite_support             |  15 ++
 debian/patches/1012_fix_manpages_issues.patch      |  72 +++---
 .../1013_fix_wording_sympa_wizard_manpage.patch    |  36 ---
 ...nown_parameter_ldap_force_canonical_email.patch |  14 --
 debian/patches/1015_locales_fallback.path          |   2 +-
 .../patches/2001_ca_bundle_check_as_warning.patch  |   2 +-
 debian/patches/2002_wizard_drop_localedir.patch    |  18 --
 debian/patches/2003_sanitize_make_all.patch        |  41 ----
 .../2006_disable_cssupdated_email_on_update.patch  |   2 +-
 debian/patches/2991_sanitize_make_all.patch        |  15 --
 debian/patches/series                              |  10 +-
 19 files changed, 73 insertions(+), 685 deletions(-)

diff --git a/debian/patches/1002_mysql_default_charset_engine.patch b/debian/patches/1002_mysql_default_charset_engine.patch
index 2411aa6..94208fb 100644
--- a/debian/patches/1002_mysql_default_charset_engine.patch
+++ b/debian/patches/1002_mysql_default_charset_engine.patch
@@ -94,7 +94,7 @@ Last-Update: 2013-06-15
  
  
  -- --------------------------------------------------------
-@@ -191,7 +191,7 @@
+@@ -193,7 +193,7 @@
  	 robot_session 	 varchar(80), 
  	 start_date_session 	 int(11) NOT NULL, 
  	 PRIMARY KEY (id_session) 
@@ -103,7 +103,7 @@ Last-Update: 2013-06-15
  
  
  -- --------------------------------------------------------
-@@ -221,7 +221,7 @@
+@@ -223,7 +223,7 @@
  	 visibility_subscriber 	 varchar(20), 
  	 PRIMARY KEY (robot_subscriber, list_subscriber, user_subscriber), 
   	 INDEX subscriber_user_index ( user_subscriber ) 
@@ -112,7 +112,7 @@ Last-Update: 2013-06-15
  
  
  -- --------------------------------------------------------
-@@ -241,4 +241,4 @@
+@@ -243,4 +243,4 @@
  	 password_user 	 varchar(40), 
  	 wrong_login_count_user 	 int(11), 
  	 PRIMARY KEY (email_user) 
diff --git a/debian/patches/1004_wizard_support_batch_and_display_mode.patch b/debian/patches/1004_wizard_support_batch_and_display_mode.patch
index 02adeb4..e8b66ec 100644
--- a/debian/patches/1004_wizard_support_batch_and_display_mode.patch
+++ b/debian/patches/1004_wizard_support_batch_and_display_mode.patch
@@ -3,7 +3,7 @@ Author: Stefan Hornburg (Racke) <racke at linuxia.de>
 Last-Update: 2010-01-19
 --- a/src/sympa_wizard.pl.in
 +++ b/src/sympa_wizard.pl.in
-@@ -72,10 +72,22 @@
+@@ -82,10 +82,22 @@
      \%options, 
      'target=s',
      'create=s',
@@ -26,7 +26,7 @@ Last-Update: 2010-01-19
  if ($options{help}) {
      pod2usage();
  } elsif ($options{create}) {
-@@ -165,6 +177,30 @@
+@@ -175,6 +187,30 @@
          die("Unable to load sympa config file $sympa_conf");
      }
  
@@ -57,7 +57,7 @@ Last-Update: 2010-01-19
      my (@new_wwsympa_conf, @new_sympa_conf);
  
      ## Edition mode
-@@ -173,7 +209,9 @@
+@@ -183,7 +219,9 @@
  
          if ($param->{'title'}) {
              my $title = $param->{'title'};
@@ -68,7 +68,7 @@ Last-Update: 2010-01-19
  
              ## write to conf file
              push @new_wwsympa_conf,
-@@ -198,7 +236,13 @@
+@@ -208,7 +246,13 @@
              next;
          }
          my $new_value;
diff --git a/debian/patches/1005_wizard_emit_cmd_and_newline_when_dying.patch b/debian/patches/1005_wizard_emit_cmd_and_newline_when_dying.patch
index 42c0d6e..f8d6cb2 100644
--- a/debian/patches/1005_wizard_emit_cmd_and_newline_when_dying.patch
+++ b/debian/patches/1005_wizard_emit_cmd_and_newline_when_dying.patch
@@ -3,7 +3,7 @@ Author: Stefan Hornburg (Racke) <racke at linuxia.de>
 Last-Update: 2011-05-07
 --- a/src/sympa_wizard.pl.in
 +++ b/src/sympa_wizard.pl.in
-@@ -84,7 +84,7 @@
+@@ -94,7 +94,7 @@
      if (/^([\w]+)+=(.+)/) {
          $user_param{$1} = $2;
      } else {
@@ -12,7 +12,7 @@ Last-Update: 2011-05-07
      }
  }
  
-@@ -119,7 +119,7 @@
+@@ -129,7 +129,7 @@
      }
  
      unless (open (NEWF,"> $conf")){
@@ -21,7 +21,7 @@ Last-Update: 2011-05-07
      };
  
      if ($options{create} eq 'sympa.conf') {
-@@ -169,12 +169,12 @@
+@@ -179,12 +179,12 @@
  
      ## Load config 
      unless ($wwsconf = wwslib::load_config($wwsympa_conf)) {
@@ -36,7 +36,7 @@ Last-Update: 2011-05-07
      }
  
      if ($options{display}) {
-@@ -309,13 +309,13 @@
+@@ -319,13 +319,13 @@
  
          ## Write new config files
          unless (open (WWSYMPA,"> $wwsympa_conf")){
diff --git a/debian/patches/1006_wizard_add_soap_url_and_archive_default_index.patch b/debian/patches/1006_wizard_add_soap_url_and_archive_default_index.patch
deleted file mode 100644
index df88720..0000000
--- a/debian/patches/1006_wizard_add_soap_url_and_archive_default_index.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-Description: add soap_url and archive_default_index support to sympa_wizard.pl
-Author: Stefan Hornburg (Racke) <racke at linuxia.de>
-Last-Update: 2010-01-19
---- a/src/lib/confdef.pm
-+++ b/src/lib/confdef.pm
-@@ -901,6 +901,13 @@
-         edit    => '1',
-     },
-     {
-+        name    => 'soap_url',
-+        default => 'http://--HOST--/sympasoap',
-+        query   => 'SOAP service URL',
-+        file    => 'sympa.conf',
-+        edit    => '1',
-+    },
-+    {
-         name    => 'title',
-         default => 'Mailing lists service',
-         query   => 'Title of main web page',
-@@ -917,6 +924,12 @@
-         edit   => '1',
-     },
-     {
-+        name    => 'archive_default_index',
-+        default => 'thrd',
-+        query   => 'Default index organization (thrd | mail)',
-+        file    => 'wwsympa.conf',
-+    },
-+    {
-         name  => 'default_shared_quota',
-         query => 'Default disk quota for shared repository',
- 	vhost   => '1',
diff --git a/debian/patches/1007_wizard_probe_currently_supported_locales.patch b/debian/patches/1007_wizard_probe_currently_supported_locales.patch
index 5fc828f..6d62e49 100644
--- a/debian/patches/1007_wizard_probe_currently_supported_locales.patch
+++ b/debian/patches/1007_wizard_probe_currently_supported_locales.patch
@@ -3,7 +3,7 @@ Author: Stefan Hornburg (Racke) <racke at linuxia.de>
 Last-Update: 2010-01-19
 --- a/src/sympa_wizard.pl.in
 +++ b/src/sympa_wizard.pl.in
-@@ -131,6 +131,8 @@
+@@ -141,6 +141,8 @@
  #EOF
      }
  
@@ -12,7 +12,7 @@ Last-Update: 2010-01-19
      foreach my $param (@confdef::params) {
  
          if ($param->{'title'}) {
-@@ -775,3 +777,46 @@
+@@ -759,3 +761,46 @@
      $ENV{'LANG'} = $lang if (defined $lang);
  
  }
diff --git a/debian/patches/1009_postfix_virtual_aliases.patch b/debian/patches/1009_postfix_virtual_aliases.patch
deleted file mode 100644
index 54f5853..0000000
--- a/debian/patches/1009_postfix_virtual_aliases.patch
+++ /dev/null
@@ -1,260 +0,0 @@
-Description: Modify to deal with Postfix virtual domain alias files
-Author: Elwyn Davies <elwynd at folly.org.uk>
-Origin: http://www.folly.org.uk/sympa/
-Last-Update: 2010-01-19
-diff --git a/src/Conf.pm b/src/Conf.pm
---- a/src/Conf.pm
-+++ b/src/Conf.pm
-@@ -21,6 +21,9 @@
- 
- ## This module handles the configuration file for Sympa.
- 
-+## Modified to deal with Postfix virtual domain alias files
-+## Elwyn Davies 4 April 2008
-+
- package Conf;
- 
- use strict "vars";
-@@ -74,7 +77,7 @@ my @valid_options = qw(
- 		       ldap_export_name ldap_export_host ldap_export_suffix ldap_export_password
- 		       ldap_export_dnmanager ldap_export_connection_timeout update_db_field_types urlize_min_size
- 		       list_check_smtp list_check_suffixes filesystem_encoding spam_protection web_archive_spam_protection soap_url
--		       use_blacklist
-+		       use_blacklist virtual_aliases virtual_domain postmap
- );
- 
- my %old_options = ('trusted_ca_options' => 'capath,cafile',
-@@ -272,7 +275,10 @@ my %Default_Conf =
-      'cache_list_config' => 'none', ## none | binary_file
-      'lock_method' => 'flock', ## flock | nfs
-      'ignore_x_no_archive_header_feature' => 'off',
--     'alias_manager' => '--SBINDIR--/alias_manager.pl'
-+     'alias_manager' => '--SBINDIR--/alias_manager.pl',
-+     'virtual_aliases' => '/etc/mail/sympa_virtual_regexp', # Overidden per robot
-+     'virtual_domain' => '0',
-+     'postmap' => '/usr/sbin/postmap' # For generating new Postfix databases
-      );
-    
- 
-@@ -602,6 +608,8 @@ sub load_robots {
- 				  verp_rate => 1,
- 				  loop_prevention_regex => 1,
- 				  max_size => 1,
-+				  virtual_aliases => 1,
-+				  virtual_domain => 1,
- 				  );
- 
-     ## Load wwsympa.conf
-@@ -688,6 +696,7 @@ sub load_robots {
- 	$robot_conf->{$robot}{'pictures_url'} ||= $robot_conf->{$robot}{'static_content_url'}.'/pictures/';
- 	$robot_conf->{$robot}{'pictures_path'} ||= $robot_conf->{$robot}{'static_content_path'}.'/pictures/';
- 	$robot_conf->{$robot}{'pictures_feature'} ||= $Conf{'pictures_feature'};
-+	$robot_conf->{$robot}{'virtual_aliases'} ||= $Conf{'virtual_aliases'}.'_'.$robot;
- 
- 	# split action list for blacklist usage
- 	foreach my $action (split(/,/, $Conf{'use_blacklist'})) {
-@@ -966,6 +975,31 @@ sub checkfiles {
- 	&List::send_notify_to_listmaster('css_updated',  $Conf{'host'}, ["Static CSS files have been updated ; check log file for details"]);
-     }
- 
-+    #  Create virtual aliases file for robot of doesn't exist
-+    foreach my $robot (keys %{$Conf{'robots'}}) {
-+        if (&get_robot_conf($robot, 'virtual_domain') ne 0) {
-+	    my $virtual_aliases_file = &get_robot_conf($robot, 'virtual_aliases');
-+	    unless (-f $virtual_aliases_file) {
-+		unless (open ALIASES, ">$virtual_aliases_file") {
-+		    &do_log('err',"Failed to create virtual aliases file %s", $virtual_aliases_file);
-+		    printf STDERR "Failed to create virtual aliases file %s", $virtual_aliases_file;
-+		    return undef;
-+		}
-+
-+		print ALIASES sprintf("## This virtual aliases file for domain %s is dedicated to Sympa Mailing List Manager\n", $robot);
-+		print ALIASES "## You should edit your Postfix main.cf file to declare it\n";
-+		my $robotescaped = "/^".$robot."\$/            xxx\n";
-+		$robotescaped =~ s/\./\\\./g;
-+		print ALIASES $robotescaped;
-+		close ALIASES;
-+		&do_log('notice', "Created missing file %s", $virtual_aliases_file);
-+		`chown sympa $virtual_aliases_file`;
-+		`chgrp sympa $virtual_aliases_file`;
-+		chmod 0644, $virtual_aliases_file;
-+		
-+	    }
-+	}
-+    }    		
- 
-     return undef if ($config_err);
-     return 1;
-diff --git a/src/alias_manager.pl b/src/alias_manager.pl
---- a/src/alias_manager.pl
-+++ b/src/alias_manager.pl
-@@ -27,6 +27,9 @@
- # along with this program; if not, write to the Free Software
- # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- 
-+# Modified to generate virtual alias files for Postfix virtual alias domains
-+# Elwyn Davies 4 April 2008
-+
- $ENV{'PATH'} = '';
- 
- ## Load Sympa.conf
-@@ -46,6 +49,7 @@ my $tmp_alias_file = $Conf{'tmpdir'}.'/sympa_aliases.'.time;
- 
- 
- my $alias_wrapper = '--MAILERPROGDIR--/aliaswrapper';
-+my $postmap = $Conf{'postmap'};
- my $lock_file = '--EXPL_DIR--/alias_manager.lock';
- my $default_domain;
- my $path_to_queue = '--MAILERPROGDIR--/queue';
-@@ -63,7 +67,14 @@ if (($operation !~ /^(add)|(del)$/) || ($#ARGV < 2)) {
- $default_domain = $Conf{'domain'};
- 
- my $alias_file;
--$alias_file = $Conf{'sendmail_aliases'} || '--SENDMAIL_ALIASES--';
-+my $pt; # pattern type for alias matching
-+if ($virtual_domain != 0) {
-+    $alias_file = $virtual_aliases_file;
-+    $pt = 1;
-+} else {
-+    $alias_file = $Conf{'sendmail_aliases'} || '--SENDMAIL_ALIASES--';
-+    $pt = 0;
-+}
- $alias_file = $file if ($file);
- 
- unless (-w "$alias_file") {
-@@ -76,12 +87,14 @@ $data{'date'} =  &POSIX::strftime("%d %b %Y", localtime(time));
- 
- 
- $data{'list'}{'domain'} = $data{'robot'} = $domain;
-+$data{'list'}{'domainescaped'} = $domain;
-+$data{'list'}{'domainescaped'} =~ s/\./\\\./g;
- $data{'list'}{'name'} = $listname;
- $data{'default_domain'} = $default_domain;
- $data{'is_default_domain'} = 1 if ($domain eq $default_domain);
-+$data{'is_virtual_domain'} = 1 if ($virtual_domain != 0);
- $data{'return_path_suffix'} = &Conf::get_robot_conf($domain, 'return_path_suffix');
- 
--
- my @aliases ;
- 
- my $tt2_include_path = &tools::make_tt2_include_path($domain,'',,);
-@@ -105,7 +118,7 @@ if ($operation eq 'add') {
-     flock LF, 2;
- 
-     ## Check existing aliases
--    if (&already_defined(@aliases)) {
-+    if (&already_defined($pt, @aliases)) {
- 	printf STDERR "some alias already exist\n";
- 	exit(13);
-     }
-@@ -120,12 +133,19 @@ if ($operation eq 'add') {
-     }
-     close ALIAS;
- 
--    ## Newaliases
-+    ## Newaliases and postmap unless specifying file on command line
-     unless ($file) {
- 	unless (system($alias_wrapper) == 0) {
- 	    print STDERR "Failed to execute newaliases: $!\n";
- 	    exit(6)
-+	}
-+	## Postmap if doing a virtual domain
-+	if ($virtual_domain != 0) {
-+	    unless(system($postmap, $virtual_aliases_file) == 0) {
-+	        print STDERR "Failed to execute postmap for $virtual_aliases_file: $!\n";
-+		exit(7);
- 	    }
-+	}
-     }
- 
-     ## Unlock
-@@ -151,11 +171,16 @@ if ($operation eq 'add') {
-     my @deleted_lines;
-     while (my $alias = <ALIAS>) {
- 	my $left_side = '';
--	$left_side = $1 if ($alias =~ /^([^:]+):/);
-+	if ($pt == 0) {
-+	    $left_side = $1 if ($alias =~ /^([^:]+):/);
-+	} else {
-+	    $left_side = $1 if ($alias =~ /^([^\t ]+)[ \t]/);
-+	}
- 
- 	my $to_be_deleted = 0;
- 	foreach my $new_alias (@aliases) {
--	    next unless ($new_alias =~ /^([^:]+):/);
-+	    next unless ((($pt == 0) && ($new_alias =~ /^([^:]+):/)) ||
-+	                 (($pt == 1) && ($new_alias =~ /^([^\t ]+)[ \t]/)));
- 	    my $new_left_side = $1;
- 	    
- 	    if ($left_side eq  $new_left_side) {
-@@ -191,12 +216,19 @@ if ($operation eq 'add') {
-     close NEWALIAS;
-     unlink $tmp_alias_file;
- 
--    ## Newaliases
-+    ## Newaliases and postmap unless specifying file on command line
-     unless ($file) {
- 	unless (system($alias_wrapper) == 0) {
- 	    print STDERR "Failed to execute newaliases: $!\n";
- 	exit (6);
- 	}
-+	## Postmap if doing a virtual domain
-+	if ($virtual_domain != 0) {
-+	    unless(system($postmap, $virtual_aliases_file) == 0) {
-+	        print STDERR "Failed to execute postmap for $virtual_aliases_file: $!\n";
-+		exit(7);
-+	    }
-+	}
-     }
-     ## Unlock
-     flock LF, 8;
-@@ -211,22 +243,31 @@ exit 0;
- 
- ## Check if an alias is already defined  
- sub already_defined {
--    my @aliases = @_;
-+    # pt is 'pattern type' - 0 for ordinary aliases, 1 for virtual regexp aliases
-+    my ($pt, @aliases) = @_;
-     
-     unless (open  ALIAS, "$alias_file") {
- 	printf STDERR "Could not read $alias_file\n";
- 	exit (7);
-     }
- 
-+    my $left_side = '';
-+    my $new_left_side = '';
-     while (my $alias = <ALIAS>) {
- 	# skip comment
- 	next if $alias =~ /^#/ ; 
--	$alias =~ /^([^:]+):/;
--	my $left_side = $1;
-+	if ($pt == 0) {
-+	    $alias =~ /^([^:]+):/;
-+	    $left_side = $1;
-+	} else {
-+	    $alias =~ /^([^\t ]+)[ \t]/;
-+	    $left_side = $1;
-+	}
- 	next unless ($left_side);
- 	foreach (@aliases) {
--	    next unless ($_ =~ /^([^:]+):/); 
--	    my $new_left_side = $1;
-+	    next unless ((($pt == 0) && ($_ =~ /^([^:]+):/)) || 
-+	                 (($pt == 1) && ($_ =~ /^([^\t ]+)[ \t]/))); 
-+	    $new_left_side = $1;
- 	    if ($left_side eq  $new_left_side) {
- 		print STDERR "Alias already defined : $left_side\n";
- 		return 1;
-diff --git a/src/etc/list_aliases.tt2 b/src/etc/list_aliases.tt2
---- a/src/etc/list_aliases.tt2
-+++ b/src/etc/list_aliases.tt2
-@@ -6,6 +6,9 @@
- #[% list.name %]-subscribe: "| --MAILERPROGDIR--/queue [% list.name %]-subscribe@[% list.domain %]"
- [% list.name %]-unsubscribe: "| --MAILERPROGDIR--/queue [% list.name %]-unsubscribe@[% list.domain %]"
- [% list.name %][% return_path_suffix %]: "| --MAILERPROGDIR--/bouncequeue [% list.name %]@[% list.domain %]"
-+[% ELSIF is_virtual_domain -%]
-+/^([% list.name %])-(request|editor|owner|subscribe|unsubscribe)\@[% list.domainescaped %]$/    $1+[% list.domain %]@sympa$2.
-+/^([% list.name %])\@[% list.domainescaped %]$/    $1+[% list.domain %]@sympalist.
- [% ELSE -%]
- [% list.domain %]-[% list.name %]: "| --MAILERPROGDIR--/queue [% list.name %]@[% list.domain %]"
- [% list.domain %]-[% list.name %]-request: "| --MAILERPROGDIR--/queue [% list.name %]-request@[% list.domain %]"
diff --git a/debian/patches/1010_db_port.patch b/debian/patches/1010_db_port.patch
deleted file mode 100644
index 40fe925..0000000
--- a/debian/patches/1010_db_port.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Description: Disable MySQL default port.
-Author: Stefan Hornburg (Racke) <racke at linuxia.de>
-Last-Update: 2010-04-11
---- a/src/lib/confdef.pm
-+++ b/src/lib/confdef.pm
-@@ -831,9 +831,10 @@
-     },
-     {
-         name   => 'db_port',
--        default => '3306',
-+        default => undef,
-         query  => 'The database port',
-         file   => 'sympa.conf',
-+        optional => '1',
-     },
-     {
-         name   => 'db_user',
diff --git a/debian/patches/1011_fix_sqlite_db_upgrade b/debian/patches/1011_fix_sqlite_db_upgrade
deleted file mode 100644
index 052f66f..0000000
--- a/debian/patches/1011_fix_sqlite_db_upgrade
+++ /dev/null
@@ -1,196 +0,0 @@
-Description: Fix SQLite DB schema upgrade
-Author: Emmanuel Bouthenot <kolter at debian.org>
-Bug-Debian: http://bugs.debian.org/642464
-Last-Update: 2013-06-15
---- a/src/lib/Upgrade.pm
-+++ b/src/lib/Upgrade.pm
-@@ -1149,7 +1149,27 @@
- 	    $t =~ s/^"main"\.//; # needed for SQLite 3
- 	    $t =~ s/^.*\"([^"]+)\"$/$1/;
-  	}
--	
-+
-+    ## Check required tables
-+    foreach my $t1 (keys %{$db_struct{'SQLite'}}) {
-+        my $found;
-+        foreach my $t2 (@tables) {
-+        $found = 1 if ($t1 eq $t2);
-+        }
-+        unless ($found) {
-+        unless ($dbh->do("CREATE TABLE $t1 (temporary integer)")) {
-+            &do_log('err', 'Could not create table %s in database %s : %s', $t1, $Conf::Conf{'db_name'}, $dbh->errstr);
-+            next;
-+        }
-+        
-+        push @report, sprintf('Table %s created in database %s', $t1, $Conf::Conf{'db_name'});
-+        &do_log('notice', 'Table %s created in database %s', $t1, $Conf::Conf{'db_name'});
-+        push @tables, $t1;
-+        $real_struct{$t1} = {};
-+        }
-+    }
-+
-+    ## Get fields
- 	foreach my $t (@tables) {
- 	    next unless (defined $db_struct{$Conf::Conf{'db_type'}}{$t});
- 	    
-@@ -1270,6 +1290,7 @@
- 		    &do_log('info', 'Field %s added to table %s', $f, $t);
- 		    $added_fields{$f} = 1;
- 		    
-+            if ($Conf::Conf{'db_type'} eq 'mysql') {
- 		    ## Remove temporary DB field
- 		    if ($real_struct{$t}{'temporary'}) {
- 			unless ($dbh->do("ALTER TABLE $t DROP temporary")) {
-@@ -1277,43 +1298,93 @@
- 			}
- 			delete $real_struct{$t}{'temporary'};
- 		    }
-+            }
- 		    
- 		    next;
- 		}
- 		
- 		## Change DB types if different and if update_db_types enabled
--		if ($Conf::Conf{'update_db_field_types'} eq 'auto' && $Conf::Conf{'db_type'} ne 'SQLite') {
--		    unless (&check_db_field_type(effective_format => $real_struct{$t}{$f},
--						 required_format => $db_struct{$Conf::Conf{'db_type'}}{$t}{$f})) {
--			push @report, sprintf('Field \'%s\'  (table \'%s\' ; database \'%s\') does NOT have awaited type (%s). Attempting to change it...', 
--					      $f, $t, $Conf::Conf{'db_name'}, $db_struct{$Conf::Conf{'db_type'}}{$t}{$f});
--			&do_log('notice', 'Field \'%s\'  (table \'%s\' ; database \'%s\') does NOT have awaited type (%s). Attempting to change it...', 
--				$f, $t, $Conf::Conf{'db_name'}, $db_struct{$Conf::Conf{'db_type'}}{$t}{$f});
--			
--			my $options;
--			if ($not_null{$f}) {
--			    $options .= 'NOT NULL';
-+		if ($Conf::Conf{'update_db_field_types'} eq 'auto') {
-+			if (grep $_ eq $Conf::Conf{'db_type'}, qw(SQLite mysql)) {
-+				unless (&check_db_field_type(effective_format => $real_struct{$t}{$f},
-+							required_format => $db_struct{$Conf::Conf{'db_type'}}{$t}{$f})) {
-+					push @report, sprintf('Field \'%s\'  (table \'%s\' ; database \'%s\') does NOT have awaited type (%s). Attempting to change it...', 
-+							$f, $t, $Conf::Conf{'db_name'}, $db_struct{$Conf::Conf{'db_type'}}{$t}{$f});
-+					&do_log('notice', 'Field \'%s\'  (table \'%s\' ; database \'%s\') does NOT have awaited type (%s). Attempting to change it...', 
-+							$f, $t, $Conf::Conf{'db_name'}, $db_struct{$Conf::Conf{'db_type'}}{$t}{$f});
-+				
-+					my $options;
-+					if ($not_null{$f}) {
-+						$options .= 'NOT NULL';
-+					}
-+				
-+					if ($Conf::Conf{'db_type'} eq 'mysql') {
-+						push @report, sprintf("ALTER TABLE $t CHANGE $f $f $db_struct{$Conf::Conf{'db_type'}}{$t}{$f} $options");
-+						&do_log('notice', "ALTER TABLE $t CHANGE $f $f $db_struct{$Conf::Conf{'db_type'}}{$t}{$f} $options");
-+						unless ($dbh->do("ALTER TABLE $t CHANGE $f $f $db_struct{$Conf::Conf{'db_type'}}{$t}{$f} $options")) {
-+							&do_log('err', 'Could not change field \'%s\' in table\'%s\'.', $f, $t);
-+							&do_log('err', 'Sympa\'s database structure may have change since last update ; please check RELEASE_NOTES');
-+							return undef;
-+						}
-+					
-+					}
-+					if ($Conf::Conf{'db_type'} eq 'SQLite') {
-+						my @oldfields = ();
-+						foreach my $oldfield (keys %{$real_struct{$t}}) {
-+							if (defined $db_struct{$Conf::Conf{'db_type'}}{${t}}{$oldfield}) {
-+								push(@oldfields, $oldfield);
-+							}
-+						}
-+						my $sqloldfields = join(", ", @oldfields);
-+						my $sqlnewfieldstype = join(", ", map { "$_ $db_struct{$Conf::Conf{'db_type'}}{${t}}{$_}" } keys $db_struct{$Conf::Conf{'db_type'}}{${t}});
-+
-+						# SQLite doesn't support changes on columns types hence we use a dirty workaround here:
-+						# we create a temporary table (a clone of the table containing the field to update)
-+						# we dump all the data into it
-+						# we create a new table with the right schema
-+						# we copy all the data from the temporary table into the new one
-+						# we delete the temporay table
-+						# see: http://www.sqlite.org/faq.html#q11
-+						&do_log('notice', 'Using a dirty trick to change SQLite data type see http://www.sqlite.org/faq.html#q11');
-+						my $sqlcode = "DROP TABLE IF EXISTS ${t}_backup;";
-+						push @report, $sqlcode;
-+						&do_log('notice', $sqlcode);
-+						$dbh->do($sqlcode);
-+						$sqlcode = "CREATE TEMPORARY TABLE ${t}_backup(${sqloldfields});";
-+						push @report, $sqlcode;
-+						&do_log('notice', $sqlcode);
-+						$dbh->do($sqlcode);
-+						$sqlcode = "INSERT INTO ${t}_backup SELECT ${sqloldfields} FROM ${t};";
-+						push @report, $sqlcode;
-+						&do_log('notice', $sqlcode);
-+						$dbh->do($sqlcode);
-+						$sqlcode = "DROP TABLE ${t};";
-+						push @report, $sqlcode;
-+						&do_log('notice', $sqlcode);
-+						$dbh->do($sqlcode);
-+						$sqlcode = "CREATE TABLE ${t}(${sqlnewfieldstype});";
-+						push @report, $sqlcode;
-+						&do_log('notice', $sqlcode);
-+						$dbh->do($sqlcode);
-+						$sqlcode = "INSERT INTO ${t} (${sqloldfields}) SELECT ${sqloldfields} FROM ${t}_backup;";
-+						push @report, $sqlcode;
-+						&do_log('notice', $sqlcode);
-+						my $toto = $dbh->do($sqlcode);
-+						$sqlcode = "DROP TABLE ${t}_backup;";
-+						push @report, $sqlcode;
-+						&do_log('notice', $sqlcode);
-+						$dbh->do($sqlcode);
-+						# Update real structure
-+						foreach my $newfield (sort keys $db_struct{$Conf::Conf{'db_type'}}{${t}}) {
-+							$real_struct{$t}{$newfield} = $db_struct{$Conf::Conf{'db_type'}}{${t}}{$newfield};
-+						}
-+					}
-+					push @report, sprintf('Field %s in table %s, structure updated', $f, $t);
-+					&do_log('info', 'Field %s in table %s, structure updated', $f, $t);
-+				}
- 			}
--			
--			push @report, sprintf("ALTER TABLE $t CHANGE $f $f $db_struct{$Conf::Conf{'db_type'}}{$t}{$f} $options");
--			&do_log('notice', "ALTER TABLE $t CHANGE $f $f $db_struct{$Conf::Conf{'db_type'}}{$t}{$f} $options");
--			unless ($dbh->do("ALTER TABLE $t CHANGE $f $f $db_struct{$Conf::Conf{'db_type'}}{$t}{$f} $options")) {
--			    &do_log('err', 'Could not change field \'%s\' in table\'%s\'.', $f, $t);
--			    &do_log('err', 'Sympa\'s database structure may have change since last update ; please check RELEASE_NOTES');
--			    return undef;
--			}
--			
--			push @report, sprintf('Field %s in table %s, structure updated', $f, $t);
--			&do_log('info', 'Field %s in table %s, structure updated', $f, $t);
--		    }
--		}else {
--		    unless ($real_struct{$t}{$f} eq $db_struct{$Conf::Conf{'db_type'}}{$t}{$f}) {
--			&do_log('err', 'Field \'%s\'  (table \'%s\' ; database \'%s\') does NOT have awaited type (%s).', $f, $t, $Conf::Conf{'db_name'}, $db_struct{$Conf::Conf{'db_type'}}{$t}{$f});
--			&do_log('err', 'Sympa\'s database structure may have change since last update ; please check RELEASE_NOTES');
--			return undef;
--		    }
- 		}
--	    }
-+		}
- 	    if ($Conf::Conf{'db_type'} eq 'mysql') {
- 		## Check that primary key has the right structure.
- 		my $should_update;
-@@ -1452,7 +1523,7 @@
- 		    ## drop previous index
- 		    my $success;
- 		    foreach my $field (@{$primary{$t}}) {
--			unless ($dbh->do("DROP INDEX $field")) {
-+			unless ($dbh->do("DROP INDEX IF EXISTS $field")) {
- 			    next;
- 			}
- 			$success = 1; last;
-@@ -1466,7 +1537,7 @@
- 		    }
- 		    
- 		    ## Add INDEX
--		    unless ($dbh->do("CREATE INDEX IF NOT EXIST $t\_index ON $t ($fields)")) {
-+		    unless ($dbh->do("CREATE INDEX IF NOT EXISTS $t\_index ON $t ($fields)")) {
- 			&do_log('err', 'Could not set INDEX on field \'%s\', table\'%s\'.', $fields, $t);
- 			return undef;
- 		    }
---- a/src/etc/script/create_db.SQLite
-+++ b/src/etc/script/create_db.SQLite
-@@ -112,7 +112,7 @@
- 	 status_list 	text, 
- 	 subject_list 	text, 
- 	 topics_list 	text, 
--	 web_archive_list 	integer, 
-+	 web_archive_list 	numeric, 
- 	 PRIMARY KEY (name_list, robot_list) 
-  );
- 
diff --git a/debian/patches/1011_fix_sqlite_support b/debian/patches/1011_fix_sqlite_support
new file mode 100644
index 0000000..19da712
--- /dev/null
+++ b/debian/patches/1011_fix_sqlite_support
@@ -0,0 +1,15 @@
+Description: Fix SQLite DB schema upgrade
+Author: Emmanuel Bouthenot <kolter at debian.org>
+Bug-Debian: http://bugs.debian.org/642464
+Last-Update: 2013-06-15
+--- a/src/etc/script/create_db.SQLite
++++ b/src/etc/script/create_db.SQLite
+@@ -112,7 +112,7 @@
+ 	 status_list 	text, 
+ 	 subject_list 	text, 
+ 	 topics_list 	text, 
+-	 web_archive_list 	integer, 
++	 web_archive_list 	numeric, 
+ 	 PRIMARY KEY (name_list, robot_list) 
+  );
+ 
diff --git a/debian/patches/1012_fix_manpages_issues.patch b/debian/patches/1012_fix_manpages_issues.patch
index c130c8f..c059260 100644
--- a/debian/patches/1012_fix_manpages_issues.patch
+++ b/debian/patches/1012_fix_manpages_issues.patch
@@ -3,28 +3,20 @@ Author: Emmanuel Bouthenot <kolter at debian.org>
 Last-Update: 2012-05-10
 --- a/doc/man8/alias_manager.pod.in
 +++ b/doc/man8/alias_manager.pod.in
-@@ -1,6 +1,8 @@
+@@ -1,3 +1,5 @@
 +=encoding utf8
 +
  =head1 NAME
  
--alias_manager (or alias_manager.pl) - manage Sympa aliases
-+alias_manager, alias_manager.pl - manage Sympa aliases
- 
- =head1 SYNOPSYS
- 
+ alias_manager, alias_manager.pl - manage Sympa aliases
 --- a/doc/man8/archived.pod.in
 +++ b/doc/man8/archived.pod.in
-@@ -1,6 +1,8 @@
+@@ -1,3 +1,5 @@
 +=encoding utf8
 +
  =head1 NAME
  
--archived (or archived.pl) - Mailing List Archiving Daemon for WWSympa
-+archived, archived.pl - Mailing List Archiving Daemon for WWSympa
- 
- =head1 SYNOPSYS
- 
+ archived, archived.pl - Mailing List Archiving Daemon for WWSympa
 @@ -40,7 +42,7 @@
  
  F<--spooldir--/outgoing/> outgoing Sympa directory.
@@ -32,40 +24,58 @@ Last-Update: 2012-05-10
 -F<--defaultdir--/mhonarc-ressources> mhonarc ressource file
 +F<--defaultdir--/mhonarc-ressources> mhonarc resource file
  
- F<--sysconfdir--/wwsympa.conf> WWSympa configuration file.
+ F<--WWSCONFIG--> WWSympa configuration file.
  
 --- a/doc/man8/bounced.pod.in
 +++ b/doc/man8/bounced.pod.in
-@@ -1,6 +1,8 @@
+@@ -1,3 +1,5 @@
 +=encoding utf8
 +
  =head1 NAME
  
--bounced (or bounced.pl) - Mailing List Bounce Processing Daemon for WWSympa
-+bounced, bounced.pl - Mailing List Bounce Processing Daemon for WWSympa
- 
- =head1 SYNOPSYS
- 
---- a/doc/man8/sympa.pod
-+++ b/doc/man8/sympa.pod
-@@ -1,6 +1,8 @@
+ bounced, bounced.pl - Mailing List Bounce Processing Daemon for WWSympa
+--- a/doc/man8/sympa.pod.in
++++ b/doc/man8/sympa.pod.in
+@@ -1,3 +1,5 @@
 +=encoding utf8
 +
  =head1 NAME
  
--sympa (or sympa.pl) - A Modern Mailing List Manager
-+sympa, sympa.pl - A Modern Mailing List Manager
- 
- =head1 SYNOPSIS
- 
+ sympa, sympa.pl - A Modern Mailing List Manager
 --- a/src/sympa_wizard.pl.in
 +++ b/src/sympa_wizard.pl.in
-@@ -17,6 +17,8 @@
- # along with this program; if not, write to the Free Software
- # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+@@ -21,27 +21,29 @@
+ # You should have received a copy of the GNU General Public License
+ # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
 +=encoding utf8
 +
  =head1 NAME
  
- sympa_wizard.pl - help perform sympa initial setup
+-sympa_wizard.pl - help perform sympa initial setup
++sympa_wizard, sympa_wizard.pl - help perform sympa initial setup
+ 
+ =head1 SYNOPSIS
+ 
+ =over
+ 
+-=item sympa_wizard.pl
++=item sympa_wizard
+ 
+ Edit current sympa configuration
+ 
+-=item sympa_wizard.pl [--target file] --create <sympa.conf|wwsympa.conf>
++=item sympa_wizard [--target file] --create <sympa.conf|wwsympa.conf>
+ 
+ Creates a new sympa or wwsympa configuration file
+ 
+-=item sympa_wizard.pl --check
++=item sympa_wizard --check
+ 
+ check CPAN modules needed for running sympa
+ 
+-=item sympa_wizard.pl --help
++=item sympa_wizard --help
+ 
+ Display usage instructions
+ 
diff --git a/debian/patches/1013_fix_wording_sympa_wizard_manpage.patch b/debian/patches/1013_fix_wording_sympa_wizard_manpage.patch
deleted file mode 100644
index b076022..0000000
--- a/debian/patches/1013_fix_wording_sympa_wizard_manpage.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-Description: Fix some wording in sympa_wizard manpage
-Author: Emmanuel Bouthenot <kolter at debian.org>
-Last-Update: 2012-05-10
---- a/src/sympa_wizard.pl.in
-+++ b/src/sympa_wizard.pl.in
-@@ -19,25 +19,25 @@
- 
- =head1 NAME
- 
--sympa_wizard.pl - help perform sympa initial setup
-+sympa_wizard, sympa_wizard.pl - help perform sympa initial setup
- 
- =head1 SYNOPSIS
- 
- =over
- 
--=item sympa_wizard.pl
-+=item sympa_wizard
- 
- Edit current sympa configuration
- 
--=item sympa_wizard.pl [--target file] --create <sympa.conf|wwsympa.conf>
-+=item sympa_wizard [--target file] --create <sympa.conf|wwsympa.conf>
- 
- Creates a new sympa or wwsympa configuration file
- 
--=item sympa_wizard.pl --check
-+=item sympa_wizard --check
- 
- check CPAN modules needed for running sympa
- 
--=item sympa_wizard.pl --help
-+=item sympa_wizard --help
- 
- Display usage instructions
- 
diff --git a/debian/patches/1014_fix_unknown_parameter_ldap_force_canonical_email.patch b/debian/patches/1014_fix_unknown_parameter_ldap_force_canonical_email.patch
deleted file mode 100644
index 9970a14..0000000
--- a/debian/patches/1014_fix_unknown_parameter_ldap_force_canonical_email.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-Description: Fix warnings in logs about 'Unknown parameter ldap_force_canonical_email'
-Author: Emmanuel Bouthenot <kolter at debian.org>
-Bug-Debian: http://bugs.debian.org/638320
-Last-Update: 2012-05-15
---- a/wwsympa/wwslib.pm
-+++ b/wwsympa/wwslib.pm
-@@ -155,6 +155,7 @@
- 			robots => '',
- 			password_case => 'sensitive',
- 			htmlarea_url => '',
-+			ldap_force_canonical_email => 1,
- 			);
- 
-     my $conf = \%default_conf;
diff --git a/debian/patches/1015_locales_fallback.path b/debian/patches/1015_locales_fallback.path
index dc03a6d..87705ae 100644
--- a/debian/patches/1015_locales_fallback.path
+++ b/debian/patches/1015_locales_fallback.path
@@ -5,7 +5,7 @@ Last-Update: 2013-06-15
 This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
 --- a/src/lib/Language.pm
 +++ b/src/lib/Language.pm
-@@ -171,7 +171,8 @@
+@@ -173,7 +173,8 @@
  			 $locale.'.UTF-8',  ## UpperCase required for FreeBSD
  			 $locale_dashless, ## Required on HPUX
  			 $locale,
diff --git a/debian/patches/2001_ca_bundle_check_as_warning.patch b/debian/patches/2001_ca_bundle_check_as_warning.patch
index b45c490..855c3e4 100644
--- a/debian/patches/2001_ca_bundle_check_as_warning.patch
+++ b/debian/patches/2001_ca_bundle_check_as_warning.patch
@@ -35,7 +35,7 @@ Last-Update: 2013-07-02
 This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
 --- a/src/lib/Conf.pm
 +++ b/src/lib/Conf.pm
-@@ -920,7 +920,11 @@
+@@ -938,7 +938,11 @@
  
      ## Check cafile and capath access
      if (defined $Conf{'cafile'} && $Conf{'cafile'}) {
diff --git a/debian/patches/2002_wizard_drop_localedir.patch b/debian/patches/2002_wizard_drop_localedir.patch
deleted file mode 100644
index 1388b2b..0000000
--- a/debian/patches/2002_wizard_drop_localedir.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Description: drop localedir support in sympa_wizard.pl
-Author: Stefan Hornburg (Racke) <racke at linuxia.de>
-Last-Update: 2010-01-19
---- a/src/lib/confdef.pm
-+++ b/src/lib/confdef.pm
-@@ -113,12 +113,6 @@
-         advice  => 'Better if not in a critical partition',
-     },
-     {
--        name    => 'localedir',
--        default => Sympa::Constants::LOCALEDIR,
--        query   => 'Directory containing available NLS catalogues (Message internationalization)',
--        file    => 'sympa.conf',
--    },
--    {
-         name    => 'spool',
-         default => Sympa::Constants::SPOOLDIR,
-         query   => 'The main spool containing various specialized spools',
diff --git a/debian/patches/2003_sanitize_make_all.patch b/debian/patches/2003_sanitize_make_all.patch
deleted file mode 100644
index 779c020..0000000
--- a/debian/patches/2003_sanitize_make_all.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-Description: sanitize "make all" to not try connect to CPAN
-Author: Stefan Hornburg (Racke) <racke at linuxia.de>
-Last-Update: 2010-01-19
-diff --git a/Makefile.am b/Makefile.am
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -160,7 +160,7 @@ main_SRC	=	AUTHORS COPYING ChangeLog INSTALL KNOWNBUGS NEWS README
- LOG_SOCKET_TYPE	=	unix
- #endif
- 
--all:	warning checkperl checkcpan sources wrapper soap_wrapper man locale
-+all:	checkperl checkcpan sources wrapper soap_wrapper man locale
- 
- rpm: build_rh_rpm build_mdk_rpm
- 
-diff --git a/check_perl_modules.pl b/check_perl_modules.pl
---- a/check_perl_modules.pl
-+++ b/check_perl_modules.pl
-@@ -67,7 +67,7 @@ use CPAN;
- 	     'Archive::Zip' => 'Archive-Zip',
- 	     'LWP' => 'libwww-perl',
-              'XML::LibXML' => 'XML-LibXML',
--	     'MHonArc::UTF8' => 'MHonArc',
-+#	     'MHonArc::UTF8' => 'MHonArc',
- 	     'FCGI' => 'FCGI',
- 	     'DBI' => 'DBI',
- 	     'DBD::mysql' => 'Msql-Mysql-modules',
-@@ -186,6 +186,13 @@ sub install_module {
- 
-     my $default = $options->{'default'};
- 
-+    if ($default =~ /^y$/i) {
-+	print "Error: CPAN access not allowed during package build.\n";
-+	exit 1;
-+    } else {
-+	return
-+    }
-+
-     unless ($ENV{'FTP_PASSIVE'} eq 1) {
- 	$ENV{'FTP_PASSIVE'} = 1;
- 	print "Setting FTP Passive mode\n";
diff --git a/debian/patches/2006_disable_cssupdated_email_on_update.patch b/debian/patches/2006_disable_cssupdated_email_on_update.patch
index b1c3b48..7cb83dd 100644
--- a/debian/patches/2006_disable_cssupdated_email_on_update.patch
+++ b/debian/patches/2006_disable_cssupdated_email_on_update.patch
@@ -6,7 +6,7 @@ Bug-Debian: http://bugs.debian.org/601662
 Last-Update: 2012-05-19
 --- a/src/lib/Conf.pm
 +++ b/src/lib/Conf.pm
-@@ -1052,10 +1052,10 @@
+@@ -1070,10 +1070,10 @@
  	    }	    
  	}
      }
diff --git a/debian/patches/2991_sanitize_make_all.patch b/debian/patches/2991_sanitize_make_all.patch
deleted file mode 100644
index e5660d4..0000000
--- a/debian/patches/2991_sanitize_make_all.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Description: sanitize "make all" to not try connect to CPAN [autobuilt files]
-Author: Stefan Hornburg (Racke) <racke at linuxia.de>
-Last-Update: 2010-01-19
-diff --git a/Makefile.in b/Makefile.in
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -508,7 +508,7 @@ ChangeLog:
- 	@CVS2CL@
- #endif
- 
--all:	warning checkperl checkcpan sources wrapper soap_wrapper man locale
-+all:	checkperl checkcpan sources wrapper soap_wrapper man locale
- 
- rpm: build_rh_rpm build_mdk_rpm
- 
diff --git a/debian/patches/series b/debian/patches/series
index 8a8f715..97b96f1 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,18 +1,10 @@
 1002_mysql_default_charset_engine.patch
 1004_wizard_support_batch_and_display_mode.patch
 1005_wizard_emit_cmd_and_newline_when_dying.patch
-1006_wizard_add_soap_url_and_archive_default_index.patch
 1007_wizard_probe_currently_supported_locales.patch
-#1009_postfix_virtual_aliases.patch
-1010_db_port.patch
-1011_fix_sqlite_db_upgrade
+1011_fix_sqlite_support
 1012_fix_manpages_issues.patch
-1013_fix_wording_sympa_wizard_manpage.patch
-1014_fix_unknown_parameter_ldap_force_canonical_email.patch
 1015_locales_fallback.path
 2001_ca_bundle_check_as_warning.patch
-2002_wizard_drop_localedir.patch
-#2003_sanitize_make_all.patch
 2005_disable_build_non_dfsg_po_files.patch
-#2991_sanitize_make_all.patch
 2006_disable_cssupdated_email_on_update.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/sympa.git



More information about the Pkg-sympa-commits mailing list