[Fusionforge-commits] FusionForge branch Branch_5_3 updated. fd3301d4d7a69182a2c85a5c053bad89afc57db6

Sylvain B beuc at fusionforge.org
Sun Apr 6 19:41:37 CEST 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".

The branch, Branch_5_3 has been updated
       via  fd3301d4d7a69182a2c85a5c053bad89afc57db6 (commit)
       via  2e290d8597f5370ec4341e5add1b85c1faac0c2f (commit)
       via  f0af9ad9cd38e7220b1d7b831f703dcb6f1fb3cf (commit)
       via  0b5045276eba6dc4ce4220602af453d66bc8ca7a (commit)
       via  3ee8ec387b3ce94f7cdf4bbe7e5b1affeedda469 (commit)
      from  89e6c7fc44783f943bffd6d9e487b5457789750c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit fd3301d4d7a69182a2c85a5c053bad89afc57db6
Author: Sylvain Beucler <beuc at beuc.net>
Date:   Sun Apr 6 19:41:03 2014 +0200

    packaging: drop Debian-specific DB upgrade scripts

diff --git a/src/plugins/authopenid/bin/db-delete.pl b/src/plugins/authopenid/bin/db-delete.pl
deleted file mode 100644
index 8090270..0000000
--- a/src/plugins/authopenid/bin/db-delete.pl
+++ /dev/null
@@ -1,186 +0,0 @@
-#!/usr/bin/perl -w
-#
-# Debian-specific script to delete plugin-specific tables
-# Roland Mas <lolando at debian.org>
-
-use strict ;
-use diagnostics ;
-
-use DBI ;
-use MIME::Base64 ;
-
-use vars qw/$dbh @reqlist $query/ ;
-use vars qw/$sys_default_domain $sys_cvs_host
-    $sys_shell_host $sys_users_host $sys_docs_host $sys_lists_host
-    $sys_dns1_host $sys_dns2_host $FTPINCOMING_DIR $FTPFILES_DIR
-    $sys_urlroot $sf_cache_dir $sys_name $sys_themeroot
-    $sys_news_group $sys_dbhost $sys_dbname $sys_dbuser $sys_dbpasswd
-    $sys_ldap_base_dn $sys_ldap_host $admin_login $admin_password
-    $domain_name
-    $skill_list/ ;
-use vars qw/$pluginname/ ;
-
-sub is_lesser ( $$ ) ;
-sub is_greater ( $$ ) ;
-sub debug ( $ ) ;
-sub parse_sql_file ( $ ) ;
-
-require ("/usr/share/gforge/lib/include.pl") ; # Include a few predefined functions 
-require ("/usr/share/gforge/lib/sqlparser.pm") ; # Our magic SQL parser
-
-debug "You'll see some debugging info during this installation." ;
-debug "Do not worry unless told otherwise." ;
-
-&db_connect ;
-
-# debug "Connected to the database OK." ;
-
-$pluginname = "authopenid" ;
-
-$dbh->{AutoCommit} = 0;
-$dbh->{RaiseError} = 1;
-eval {
-    my ($sth, @array, $version, $action, $path, $target, $rname) ;
-
-    my $pattern = "plugin_" . $pluginname . '_%' ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='v'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_view_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='r'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_table_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='i'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_index_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='s'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_sequence_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $dbh->commit ();
-
-
-    debug "It seems your database deletion went well and smoothly.  That's cool." ;
-    debug "Please enjoy using Debian GForge." ;
-
-    # There should be a commit at the end of every block above.
-    # If there is not, then it might be symptomatic of a problem.
-    # For safety, we roll back.
-    $dbh->rollback ();
-};
-
-if ($@) {
-    warn "Transaction aborted because $@" ;
-    debug "Transaction aborted because $@" ;
-    debug "Last SQL query was:\n$query\n(end of query)" ;
-    $dbh->rollback ;
-    debug "Please report this bug on the Debian bug-tracking system." ;
-    debug "Please include the previous messages as well to help debugging." ;
-    debug "You should not worry too much about this," ;
-    debug "your DB is still in a consistent state and should be usable." ;
-    exit 1 ;
-}
-
-$dbh->rollback ;
-$dbh->disconnect ;
-
-sub debug ( $ ) {
-    my $v = shift ;
-    chomp $v ;
-    print STDERR "$v\n" ;
-}
-
-sub drop_table_if_exists ( $ ) {
-    my $tname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$tname' AND relkind='r'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping table $tname" ;
-	$query = "DROP TABLE $tname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_sequence_if_exists ( $ ) {
-    my $sname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$sname' AND relkind='S'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping sequence $sname" ;
-	$query = "DROP SEQUENCE $sname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_index_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='i'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping index $iname" ;
-	$query = "DROP INDEX $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_view_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='v'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping view $iname" ;
-	$query = "DROP VIEW $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
diff --git a/src/plugins/authopenid/bin/db-upgrade.pl b/src/plugins/authopenid/bin/db-upgrade.pl
deleted file mode 100644
index d1ebe5a..0000000
--- a/src/plugins/authopenid/bin/db-upgrade.pl
+++ /dev/null
@@ -1,298 +0,0 @@
-#!/usr/bin/perl -w
-#
-# Debian-specific script to upgrade the database between releases
-# Roland Mas <lolando at debian.org>
-
-use strict ;
-use diagnostics ;
-
-use DBI ;
-use MIME::Base64 ;
-
-use vars qw/$dbh @reqlist $query/ ;
-use vars qw/$sys_default_domain $sys_cvs_host
-    $sys_shell_host $sys_users_host $sys_docs_host $sys_lists_host
-    $sys_dns1_host $sys_dns2_host $FTPINCOMING_DIR $FTPFILES_DIR
-    $sys_urlroot $sf_cache_dir $sys_name $sys_themeroot
-    $sys_news_group $sys_dbhost $sys_dbname $sys_dbuser $sys_dbpasswd
-    $sys_ldap_base_dn $sys_ldap_host $admin_login $admin_password
-    $domain_name
-    $skill_list/ ;
-use vars qw/$pluginname/ ;
-
-sub is_lesser ( $$ ) ;
-sub is_greater ( $$ ) ;
-sub debug ( $ ) ;
-sub parse_sql_file ( $ ) ;
-
-require ("/usr/share/gforge/lib/include.pl") ; # Include a few predefined functions 
-require ("/usr/share/gforge/lib/sqlparser.pm") ; # Our magic SQL parser
-
-debug "You'll see some debugging info during this installation." ;
-debug "Do not worry unless told otherwise." ;
-
-&db_connect ;
-
-# debug "Connected to the database OK." ;
-
-$pluginname = "authopenid" ;
-
-$dbh->{AutoCommit} = 0;
-$dbh->{RaiseError} = 1;
-eval {
-    my ($sth, @array, $version, $path, $target) ;
-
-    &create_metadata_table ("0") ;
-    
-    $version = &get_db_version ;
-    $target = "0.1" ;
-    if (is_lesser $version, $target) {
-	my @filelist = ( "/usr/share/gforge/plugins/$pluginname/db/$pluginname-init.sql" ) ;
-	
-	foreach my $file (@filelist) {
-	    debug "Processing $file" ;
-	    @reqlist = @{ &parse_sql_file ($file) } ;
-	    
-	    foreach my $s (@reqlist) {
-		$query = $s ;
-		# debug $query ;
-		$sth = $dbh->prepare ($query) ;
-		$sth->execute () ;
-		$sth->finish () ;
-	    }
-	}
-	@reqlist = () ;
-	
-	&update_db_version ($target) ;
-	debug "Committing." ;
-	$dbh->commit () ;
-    }
-    
-    
-#    $version = &get_db_version ;
-#    $target = "0.2" ;
-#    if (is_lesser $version, $target) {
-#     	my @filelist = ( "/usr/share/gforge/plugins/$pluginname/db/20101203-add_type_for_iframe.sql" ) ;
-	
-#     	foreach my $file (@filelist) {
-#     	    debug "Processing $file" ;
-#     	    @reqlist = @{ &parse_sql_file ($file) } ;
-	    
-#     	    foreach my $s (@reqlist) {
-#     		$query = $s ;
-#     		# debug $query ;
-#     		$sth = $dbh->prepare ($query) ;
-#     		$sth->execute () ;
-#     		$sth->finish () ;
-#     	    }
-#     	}
-#     	@reqlist = () ;
-	
-#     	&update_db_version ($target) ;
-#     	debug "Committing." ;
-#     	$dbh->commit () ;
-#     }
-
-    debug "It seems your database install/upgrade went well and smoothly.  That's cool." ;
-    debug "Please enjoy using Debian GForge." ;
-
-    # There should be a commit at the end of every block above.
-    # If there is not, then it might be symptomatic of a problem.
-    # For safety, we roll back.
-    $dbh->rollback ();
-};
-
-if ($@) {
-    warn "Transaction aborted because $@" ;
-    debug "Transaction aborted because $@" ;
-    debug "Last SQL query was:\n$query\n(end of query)" ;
-    $dbh->rollback ;
-    debug "Please report this bug on the Debian bug-tracking system." ;
-    debug "Please include the previous messages as well to help debugging." ;
-    debug "You should not worry too much about this," ;
-    debug "your DB is still in a consistent state and should be usable." ;
-    exit 1 ;
-}
-
-$dbh->rollback ;
-$dbh->disconnect ;
-
-sub is_lesser ( $$ ) {
-    my $v1 = shift || 0 ;
-    my $v2 = shift || 0 ;
-
-    my $rc = system "dpkg --compare-versions $v1 lt $v2" ;
-
-    return (! $rc) ;
-}
-
-sub is_greater ( $$ ) {
-    my $v1 = shift || 0 ;
-    my $v2 = shift || 0 ;
-
-    my $rc = system "dpkg --compare-versions $v1 gt $v2" ;
-
-    return (! $rc) ;
-}
-
-sub debug ( $ ) {
-    my $v = shift ;
-    chomp $v ;
-    print STDERR "$v\n" ;
-}
-
-sub create_metadata_table ( $ ) {
-    my $v = shift || "0" ;
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-    # Do we have the metadata table?
-
-    $query = "SELECT count(*) FROM pg_class WHERE relname = '$tablename' and relkind = 'r'";
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    # Let's create this table if we have it not
-
-    if ($array [0] == 0) {
-	debug "Creating $tablename table." ;
-	$query = "CREATE TABLE $tablename (key varchar primary key, value text not null)" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-
-    $query = "SELECT count(*) FROM $tablename WHERE key = 'db-version'";
-    # debug $query ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    # Empty table?  We'll have to fill it up a bit
-
-    if ($array [0] == 0) {
-	debug "Inserting first data into $tablename table." ;
-	$query = "INSERT INTO $tablename (key, value) VALUES ('db-version', '$v')" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub update_db_version ( $ ) {
-    my $v = shift or die "Not enough arguments" ;
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-
-    debug "Updating $tablename table." ;
-    $query = "UPDATE $tablename SET value = '$v' WHERE key = 'db-version'" ;
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    $sth->finish () ;
-}
-
-sub get_db_version () {
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-
-    $query = "SELECT value FROM $tablename WHERE key = 'db-version'" ;
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    my $version = $array [0] ;
-
-    return $version ;
-}
-
-sub drop_table_if_exists ( $ ) {
-    my $tname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$tname' AND relkind='r'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping table $tname" ;
-	$query = "DROP TABLE $tname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_sequence_if_exists ( $ ) {
-    my $sname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$sname' AND relkind='S'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping sequence $sname" ;
-	$query = "DROP SEQUENCE $sname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_index_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='i'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping index $iname" ;
-	$query = "DROP INDEX $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_view_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='v'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping view $iname" ;
-	$query = "DROP VIEW $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub bump_sequence_to ( $$ ) {
-    my ($sth, @array, $seqname, $targetvalue) ;
-
-    $seqname = shift ;
-    $targetvalue = shift ;
-
-    do {
-	$query = "select nextval ('$seqname')" ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	@array = $sth->fetchrow_array () ;
-	$sth->finish () ;
-    } until $array[0] >= $targetvalue ;
-}
diff --git a/src/plugins/authopenid/packaging/install/plugin-authopenid b/src/plugins/authopenid/packaging/install/plugin-authopenid
index 7c6da5b..bcfd52b 100644
--- a/src/plugins/authopenid/packaging/install/plugin-authopenid
+++ b/src/plugins/authopenid/packaging/install/plugin-authopenid
@@ -2,5 +2,3 @@ plugins/authopenid/include   @PLUGIN_PATH@/authopenid/
 plugins/authopenid/www       @PLUGIN_PATH@/authopenid/
 plugins/authopenid/etc/*.ini etc/@PACKAGE@/config.ini.d/
 plugins/authopenid/db/*      @PLUGIN_PATH@/authopenid/db/
-plugins/authopenid/bin/*	@PLUGIN_PATH@/authopenid/bin/
-
diff --git a/src/plugins/authwebid/bin/db-delete.pl b/src/plugins/authwebid/bin/db-delete.pl
deleted file mode 100644
index 040b2a4..0000000
--- a/src/plugins/authwebid/bin/db-delete.pl
+++ /dev/null
@@ -1,186 +0,0 @@
-#!/usr/bin/perl -w
-#
-# Debian-specific script to delete plugin-specific tables
-# Roland Mas <lolando at debian.org>
-
-use strict ;
-use diagnostics ;
-
-use DBI ;
-use MIME::Base64 ;
-
-use vars qw/$dbh @reqlist $query/ ;
-use vars qw/$sys_default_domain $sys_cvs_host $sys_download_host
-    $sys_shell_host $sys_users_host $sys_docs_host $sys_lists_host
-    $sys_dns1_host $sys_dns2_host $FTPINCOMING_DIR $FTPFILES_DIR
-    $sys_urlroot $sf_cache_dir $sys_name $sys_themeroot
-    $sys_news_group $sys_dbhost $sys_dbname $sys_dbuser $sys_dbpasswd
-    $sys_ldap_base_dn $sys_ldap_host $admin_login $admin_password
-    $domain_name $newsadmin_groupid $statsadmin_groupid
-    $skill_list/ ;
-use vars qw/$pluginname/ ;
-
-sub is_lesser ( $$ ) ;
-sub is_greater ( $$ ) ;
-sub debug ( $ ) ;
-sub parse_sql_file ( $ ) ;
-
-require ("/usr/share/gforge/lib/include.pl") ; # Include a few predefined functions 
-require ("/usr/share/gforge/lib/sqlparser.pm") ; # Our magic SQL parser
-
-debug "You'll see some debugging info during this installation." ;
-debug "Do not worry unless told otherwise." ;
-
-&db_connect ;
-
-# debug "Connected to the database OK." ;
-
-$pluginname = "authwebid" ;
-
-$dbh->{AutoCommit} = 0;
-$dbh->{RaiseError} = 1;
-eval {
-    my ($sth, @array, $version, $action, $path, $target, $rname) ;
-
-    my $pattern = "plugin_" . $pluginname . '_%' ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='v'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_view_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='r'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_table_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='i'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_index_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='s'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_sequence_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $dbh->commit ();
-
-
-    debug "It seems your database deletion went well and smoothly.  That's cool." ;
-    debug "Please enjoy using Debian GForge." ;
-
-    # There should be a commit at the end of every block above.
-    # If there is not, then it might be symptomatic of a problem.
-    # For safety, we roll back.
-    $dbh->rollback ();
-};
-
-if ($@) {
-    warn "Transaction aborted because $@" ;
-    debug "Transaction aborted because $@" ;
-    debug "Last SQL query was:\n$query\n(end of query)" ;
-    $dbh->rollback ;
-    debug "Please report this bug on the Debian bug-tracking system." ;
-    debug "Please include the previous messages as well to help debugging." ;
-    debug "You should not worry too much about this," ;
-    debug "your DB is still in a consistent state and should be usable." ;
-    exit 1 ;
-}
-
-$dbh->rollback ;
-$dbh->disconnect ;
-
-sub debug ( $ ) {
-    my $v = shift ;
-    chomp $v ;
-    print STDERR "$v\n" ;
-}
-
-sub drop_table_if_exists ( $ ) {
-    my $tname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$tname' AND relkind='r'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping table $tname" ;
-	$query = "DROP TABLE $tname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_sequence_if_exists ( $ ) {
-    my $sname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$sname' AND relkind='S'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping sequence $sname" ;
-	$query = "DROP SEQUENCE $sname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_index_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='i'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping index $iname" ;
-	$query = "DROP INDEX $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_view_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='v'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping view $iname" ;
-	$query = "DROP VIEW $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
diff --git a/src/plugins/authwebid/bin/db-upgrade.pl b/src/plugins/authwebid/bin/db-upgrade.pl
deleted file mode 100644
index 7cf7b82..0000000
--- a/src/plugins/authwebid/bin/db-upgrade.pl
+++ /dev/null
@@ -1,298 +0,0 @@
-#!/usr/bin/perl -w
-#
-# Debian-specific script to upgrade the database between releases
-# Roland Mas <lolando at debian.org>
-
-use strict ;
-use diagnostics ;
-
-use DBI ;
-use MIME::Base64 ;
-
-use vars qw/$dbh @reqlist $query/ ;
-use vars qw/$sys_default_domain $sys_cvs_host $sys_download_host
-    $sys_shell_host $sys_users_host $sys_docs_host $sys_lists_host
-    $sys_dns1_host $sys_dns2_host $FTPINCOMING_DIR $FTPFILES_DIR
-    $sys_urlroot $sf_cache_dir $sys_name $sys_themeroot
-    $sys_news_group $sys_dbhost $sys_dbname $sys_dbuser $sys_dbpasswd
-    $sys_ldap_base_dn $sys_ldap_host $admin_login $admin_password
-    $domain_name $newsadmin_groupid $statsadmin_groupid
-    $skill_list/ ;
-use vars qw/$pluginname/ ;
-
-sub is_lesser ( $$ ) ;
-sub is_greater ( $$ ) ;
-sub debug ( $ ) ;
-sub parse_sql_file ( $ ) ;
-
-require ("/usr/share/gforge/lib/include.pl") ; # Include a few predefined functions 
-require ("/usr/share/gforge/lib/sqlparser.pm") ; # Our magic SQL parser
-
-debug "You'll see some debugging info during this installation." ;
-debug "Do not worry unless told otherwise." ;
-
-&db_connect ;
-
-# debug "Connected to the database OK." ;
-
-$pluginname = "authwebid" ;
-
-$dbh->{AutoCommit} = 0;
-$dbh->{RaiseError} = 1;
-eval {
-    my ($sth, @array, $version, $path, $target) ;
-
-    &create_metadata_table ("0") ;
-    
-    $version = &get_db_version ;
-    $target = "0.1" ;
-    if (is_lesser $version, $target) {
-	my @filelist = ( "/usr/share/gforge/plugins/$pluginname/db/$pluginname-init.sql" ) ;
-	
-	foreach my $file (@filelist) {
-	    debug "Processing $file" ;
-	    @reqlist = @{ &parse_sql_file ($file) } ;
-	    
-	    foreach my $s (@reqlist) {
-		$query = $s ;
-		# debug $query ;
-		$sth = $dbh->prepare ($query) ;
-		$sth->execute () ;
-		$sth->finish () ;
-	    }
-	}
-	@reqlist = () ;
-	
-	&update_db_version ($target) ;
-	debug "Committing." ;
-	$dbh->commit () ;
-    }
-    
-    
-#    $version = &get_db_version ;
-#    $target = "0.2" ;
-#    if (is_lesser $version, $target) {
-#     	my @filelist = ( "/usr/share/gforge/plugins/$pluginname/db/20101203-add_type_for_iframe.sql" ) ;
-	
-#     	foreach my $file (@filelist) {
-#     	    debug "Processing $file" ;
-#     	    @reqlist = @{ &parse_sql_file ($file) } ;
-	    
-#     	    foreach my $s (@reqlist) {
-#     		$query = $s ;
-#     		# debug $query ;
-#     		$sth = $dbh->prepare ($query) ;
-#     		$sth->execute () ;
-#     		$sth->finish () ;
-#     	    }
-#     	}
-#     	@reqlist = () ;
-	
-#     	&update_db_version ($target) ;
-#     	debug "Committing." ;
-#     	$dbh->commit () ;
-#     }
-
-    debug "It seems your database install/upgrade went well and smoothly.  That's cool." ;
-    debug "Please enjoy using Debian GForge." ;
-
-    # There should be a commit at the end of every block above.
-    # If there is not, then it might be symptomatic of a problem.
-    # For safety, we roll back.
-    $dbh->rollback ();
-};
-
-if ($@) {
-    warn "Transaction aborted because $@" ;
-    debug "Transaction aborted because $@" ;
-    debug "Last SQL query was:\n$query\n(end of query)" ;
-    $dbh->rollback ;
-    debug "Please report this bug on the Debian bug-tracking system." ;
-    debug "Please include the previous messages as well to help debugging." ;
-    debug "You should not worry too much about this," ;
-    debug "your DB is still in a consistent state and should be usable." ;
-    exit 1 ;
-}
-
-$dbh->rollback ;
-$dbh->disconnect ;
-
-sub is_lesser ( $$ ) {
-    my $v1 = shift || 0 ;
-    my $v2 = shift || 0 ;
-
-    my $rc = system "dpkg --compare-versions $v1 lt $v2" ;
-
-    return (! $rc) ;
-}
-
-sub is_greater ( $$ ) {
-    my $v1 = shift || 0 ;
-    my $v2 = shift || 0 ;
-
-    my $rc = system "dpkg --compare-versions $v1 gt $v2" ;
-
-    return (! $rc) ;
-}
-
-sub debug ( $ ) {
-    my $v = shift ;
-    chomp $v ;
-    print STDERR "$v\n" ;
-}
-
-sub create_metadata_table ( $ ) {
-    my $v = shift || "0" ;
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-    # Do we have the metadata table?
-
-    $query = "SELECT count(*) FROM pg_class WHERE relname = '$tablename' and relkind = 'r'";
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    # Let's create this table if we have it not
-
-    if ($array [0] == 0) {
-	debug "Creating $tablename table." ;
-	$query = "CREATE TABLE $tablename (key varchar primary key, value text not null)" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-
-    $query = "SELECT count(*) FROM $tablename WHERE key = 'db-version'";
-    # debug $query ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    # Empty table?  We'll have to fill it up a bit
-
-    if ($array [0] == 0) {
-	debug "Inserting first data into $tablename table." ;
-	$query = "INSERT INTO $tablename (key, value) VALUES ('db-version', '$v')" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub update_db_version ( $ ) {
-    my $v = shift or die "Not enough arguments" ;
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-
-    debug "Updating $tablename table." ;
-    $query = "UPDATE $tablename SET value = '$v' WHERE key = 'db-version'" ;
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    $sth->finish () ;
-}
-
-sub get_db_version () {
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-
-    $query = "SELECT value FROM $tablename WHERE key = 'db-version'" ;
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    my $version = $array [0] ;
-
-    return $version ;
-}
-
-sub drop_table_if_exists ( $ ) {
-    my $tname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$tname' AND relkind='r'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping table $tname" ;
-	$query = "DROP TABLE $tname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_sequence_if_exists ( $ ) {
-    my $sname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$sname' AND relkind='S'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping sequence $sname" ;
-	$query = "DROP SEQUENCE $sname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_index_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='i'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping index $iname" ;
-	$query = "DROP INDEX $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_view_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='v'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping view $iname" ;
-	$query = "DROP VIEW $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub bump_sequence_to ( $$ ) {
-    my ($sth, @array, $seqname, $targetvalue) ;
-
-    $seqname = shift ;
-    $targetvalue = shift ;
-
-    do {
-	$query = "select nextval ('$seqname')" ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	@array = $sth->fetchrow_array () ;
-	$sth->finish () ;
-    } until $array[0] >= $targetvalue ;
-}
diff --git a/src/plugins/authwebid/packaging/install/plugin-authwebid b/src/plugins/authwebid/packaging/install/plugin-authwebid
index e7a3a12..cc4efd1 100644
--- a/src/plugins/authwebid/packaging/install/plugin-authwebid
+++ b/src/plugins/authwebid/packaging/install/plugin-authwebid
@@ -2,5 +2,3 @@ plugins/authwebid/include   @PLUGIN_PATH@/authwebid/
 plugins/authwebid/www       @PLUGIN_PATH@/authwebid/
 plugins/authwebid/etc/*.ini etc/@PACKAGE@/config.ini.d/
 plugins/authwebid/db/*      @PLUGIN_PATH@/authwebid/db/
-plugins/authwebid/bin/*	@PLUGIN_PATH@/authwebid/bin/
-
diff --git a/src/plugins/blocks/bin/db-delete.pl b/src/plugins/blocks/bin/db-delete.pl
deleted file mode 100755
index 564bc34..0000000
--- a/src/plugins/blocks/bin/db-delete.pl
+++ /dev/null
@@ -1,186 +0,0 @@
-#!/usr/bin/perl -w
-#
-# Debian-specific script to delete plugin-specific tables
-# Roland Mas <lolando at debian.org>
-
-use strict ;
-use diagnostics ;
-
-use DBI ;
-use MIME::Base64 ;
-
-use vars qw/$dbh @reqlist $query/ ;
-use vars qw/$sys_default_domain $sys_cvs_host
-    $sys_shell_host $sys_users_host $sys_docs_host $sys_lists_host
-    $sys_dns1_host $sys_dns2_host $FTPINCOMING_DIR $FTPFILES_DIR
-    $sys_urlroot $sf_cache_dir $sys_name $sys_themeroot
-    $sys_news_group $sys_dbhost $sys_dbname $sys_dbuser $sys_dbpasswd
-    $sys_ldap_base_dn $sys_ldap_host $admin_login $admin_password
-    $domain_name
-    $skill_list/ ;
-use vars qw/$pluginname/ ;
-
-sub is_lesser ( $$ ) ;
-sub is_greater ( $$ ) ;
-sub debug ( $ ) ;
-sub parse_sql_file ( $ ) ;
-
-require ("/usr/share/gforge/lib/include.pl") ; # Include a few predefined functions 
-require ("/usr/share/gforge/lib/sqlparser.pm") ; # Our magic SQL parser
-
-debug "You'll see some debugging info during this installation." ;
-debug "Do not worry unless told otherwise." ;
-
-&db_connect ;
-
-# debug "Connected to the database OK." ;
-
-$pluginname = "blocks" ;
-
-$dbh->{AutoCommit} = 0;
-$dbh->{RaiseError} = 1;
-eval {
-    my ($sth, @array, $version, $action, $path, $target, $rname) ;
-
-    my $pattern = "plugin_" . $pluginname . '_%' ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='v'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_view_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='r'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_table_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='i'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_index_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='S'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_sequence_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $dbh->commit ();
-
-
-    debug "It seems your database deletion went well and smoothly.  That's cool." ;
-    debug "Please enjoy using Debian GForge." ;
-
-    # There should be a commit at the end of every block above.
-    # If there is not, then it might be symptomatic of a problem.
-    # For safety, we roll back.
-    $dbh->rollback ();
-};
-
-if ($@) {
-    warn "Transaction aborted because $@" ;
-    debug "Transaction aborted because $@" ;
-    debug "Last SQL query was:\n$query\n(end of query)" ;
-    $dbh->rollback ;
-    debug "Please report this bug on the Debian bug-tracking system." ;
-    debug "Please include the previous messages as well to help debugging." ;
-    debug "You should not worry too much about this," ;
-    debug "your DB is still in a consistent state and should be usable." ;
-    exit 1 ;
-}
-
-$dbh->rollback ;
-$dbh->disconnect ;
-
-sub debug ( $ ) {
-    my $v = shift ;
-    chomp $v ;
-    print STDERR "$v\n" ;
-}
-
-sub drop_table_if_exists ( $ ) {
-    my $tname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$tname' AND relkind='r'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping table $tname" ;
-	$query = "DROP TABLE $tname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_sequence_if_exists ( $ ) {
-    my $sname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$sname' AND relkind='S'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping sequence $sname" ;
-	$query = "DROP SEQUENCE $sname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_index_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='i'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping index $iname" ;
-	$query = "DROP INDEX $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_view_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='v'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping view $iname" ;
-	$query = "DROP VIEW $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
diff --git a/src/plugins/blocks/bin/db-upgrade.pl b/src/plugins/blocks/bin/db-upgrade.pl
deleted file mode 100755
index f8148dd..0000000
--- a/src/plugins/blocks/bin/db-upgrade.pl
+++ /dev/null
@@ -1,273 +0,0 @@
-#!/usr/bin/perl -w
-#
-# Debian-specific script to upgrade the database between releases
-# Roland Mas <lolando at debian.org>
-
-use strict ;
-use diagnostics ;
-
-use DBI ;
-use MIME::Base64 ;
-
-use vars qw/$dbh @reqlist $query/ ;
-use vars qw/$sys_default_domain $sys_cvs_host
-    $sys_shell_host $sys_users_host $sys_docs_host $sys_lists_host
-    $sys_dns1_host $sys_dns2_host $FTPINCOMING_DIR $FTPFILES_DIR
-    $sys_urlroot $sf_cache_dir $sys_name $sys_themeroot
-    $sys_news_group $sys_dbhost $sys_dbname $sys_dbuser $sys_dbpasswd
-    $sys_ldap_base_dn $sys_ldap_host $admin_login $admin_password
-    $domain_name
-    $skill_list/ ;
-use vars qw/$pluginname/ ;
-
-sub is_lesser ( $$ ) ;
-sub is_greater ( $$ ) ;
-sub debug ( $ ) ;
-sub parse_sql_file ( $ ) ;
-
-require ("/usr/share/gforge/lib/include.pl") ; # Include a few predefined functions 
-require ("/usr/share/gforge/lib/sqlparser.pm") ; # Our magic SQL parser
-
-debug "You'll see some debugging info during this installation." ;
-debug "Do not worry unless told otherwise." ;
-
-&db_connect ;
-
-# debug "Connected to the database OK." ;
-
-$pluginname = "blocks" ;
-
-$dbh->{AutoCommit} = 0;
-$dbh->{RaiseError} = 1;
-eval {
-    my ($sth, @array, $version, $path, $target) ;
-
-    &create_metadata_table ("0") ;
-    
-    $version = &get_db_version ;
-    $target = "0.1" ;
-    if (is_lesser $version, $target) {
-	my @filelist = ( "/usr/share/gforge/plugins/$pluginname/db/$pluginname-init.sql" ) ;
-	
-	foreach my $file (@filelist) {
-	    debug "Processing $file" ;
-	    @reqlist = @{ &parse_sql_file ($file) } ;
-	    
-	    foreach my $s (@reqlist) {
-		$query = $s ;
-		# debug $query ;
-		$sth = $dbh->prepare ($query) ;
-		$sth->execute () ;
-		$sth->finish () ;
-	    }
-	}
-	@reqlist = () ;
-	
-	&update_db_version ($target) ;
-	debug "Committing." ;
-	$dbh->commit () ;
-    }
-    
-    debug "It seems your database install/upgrade went well and smoothly.  That's cool." ;
-    debug "Please enjoy using Debian GForge." ;
-
-    # There should be a commit at the end of every block above.
-    # If there is not, then it might be symptomatic of a problem.
-    # For safety, we roll back.
-    $dbh->rollback ();
-};
-
-if ($@) {
-    warn "Transaction aborted because $@" ;
-    debug "Transaction aborted because $@" ;
-    debug "Last SQL query was:\n$query\n(end of query)" ;
-    $dbh->rollback ;
-    debug "Please report this bug on the Debian bug-tracking system." ;
-    debug "Please include the previous messages as well to help debugging." ;
-    debug "You should not worry too much about this," ;
-    debug "your DB is still in a consistent state and should be usable." ;
-    exit 1 ;
-}
-
-$dbh->rollback ;
-$dbh->disconnect ;
-
-sub is_lesser ( $$ ) {
-    my $v1 = shift || 0 ;
-    my $v2 = shift || 0 ;
-
-    my $rc = system "dpkg --compare-versions $v1 lt $v2" ;
-
-    return (! $rc) ;
-}
-
-sub is_greater ( $$ ) {
-    my $v1 = shift || 0 ;
-    my $v2 = shift || 0 ;
-
-    my $rc = system "dpkg --compare-versions $v1 gt $v2" ;
-
-    return (! $rc) ;
-}
-
-sub debug ( $ ) {
-    my $v = shift ;
-    chomp $v ;
-    print STDERR "$v\n" ;
-}
-
-sub create_metadata_table ( $ ) {
-    my $v = shift || "0" ;
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-    # Do we have the metadata table?
-
-    $query = "SELECT count(*) FROM pg_class WHERE relname = '$tablename' and relkind = 'r'";
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    # Let's create this table if we have it not
-
-    if ($array [0] == 0) {
-	debug "Creating $tablename table." ;
-	$query = "CREATE TABLE $tablename (key varchar primary key, value text not null)" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-
-    $query = "SELECT count(*) FROM $tablename WHERE key = 'db-version'";
-    # debug $query ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    # Empty table?  We'll have to fill it up a bit
-
-    if ($array [0] == 0) {
-	debug "Inserting first data into $tablename table." ;
-	$query = "INSERT INTO $tablename (key, value) VALUES ('db-version', '$v')" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub update_db_version ( $ ) {
-    my $v = shift or die "Not enough arguments" ;
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-
-    debug "Updating $tablename table." ;
-    $query = "UPDATE $tablename SET value = '$v' WHERE key = 'db-version'" ;
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    $sth->finish () ;
-}
-
-sub get_db_version () {
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-
-    $query = "SELECT value FROM $tablename WHERE key = 'db-version'" ;
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    my $version = $array [0] ;
-
-    return $version ;
-}
-
-sub drop_table_if_exists ( $ ) {
-    my $tname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$tname' AND relkind='r'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping table $tname" ;
-	$query = "DROP TABLE $tname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_sequence_if_exists ( $ ) {
-    my $sname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$sname' AND relkind='S'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping sequence $sname" ;
-	$query = "DROP SEQUENCE $sname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_index_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='i'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping index $iname" ;
-	$query = "DROP INDEX $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_view_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='v'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping view $iname" ;
-	$query = "DROP VIEW $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub bump_sequence_to ( $$ ) {
-    my ($sth, @array, $seqname, $targetvalue) ;
-
-    $seqname = shift ;
-    $targetvalue = shift ;
-
-    do {
-	$query = "select nextval ('$seqname')" ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	@array = $sth->fetchrow_array () ;
-	$sth->finish () ;
-    } until $array[0] >= $targetvalue ;
-}
diff --git a/src/plugins/blocks/packaging/install/plugin-blocks b/src/plugins/blocks/packaging/install/plugin-blocks
index 041cb72..8892e5f 100644
--- a/src/plugins/blocks/packaging/install/plugin-blocks
+++ b/src/plugins/blocks/packaging/install/plugin-blocks
@@ -1,4 +1,3 @@
-plugins/blocks/bin/*		      @PLUGIN_PATH@/blocks/bin/
 plugins/blocks/common/*               @PLUGIN_PATH@/blocks/common/
 plugins/blocks/db/*                   @PLUGIN_PATH@/blocks/db/
 plugins/blocks/www/*                  @PLUGIN_PATH@/blocks/www/
diff --git a/src/plugins/contribtracker/bin/db-delete.pl b/src/plugins/contribtracker/bin/db-delete.pl
deleted file mode 100755
index 3fb0ed8..0000000
--- a/src/plugins/contribtracker/bin/db-delete.pl
+++ /dev/null
@@ -1,192 +0,0 @@
-#!/usr/bin/perl -w
-#
-# Debian-specific script to delete plugin-specific tables
-# Roland Mas <lolando at debian.org>
-
-use strict ;
-use diagnostics ;
-
-use DBI ;
-use MIME::Base64 ;
-
-use vars qw/$dbh @reqlist $query/ ;
-use vars qw/$sys_default_domain $sys_cvs_host
-    $sys_shell_host $sys_users_host $sys_docs_host $sys_lists_host
-    $sys_dns1_host $sys_dns2_host $FTPINCOMING_DIR $FTPFILES_DIR
-    $sys_urlroot $sf_cache_dir $sys_name $sys_themeroot
-    $sys_news_group $sys_dbhost $sys_dbname $sys_dbuser $sys_dbpasswd
-    $sys_ldap_base_dn $sys_ldap_host $admin_login $admin_password
-    $domain_name
-    $skill_list/ ;
-use vars qw/$pluginname/ ;
-
-sub is_lesser ( $$ ) ;
-sub is_greater ( $$ ) ;
-sub debug ( $ ) ;
-sub parse_sql_file ( $ ) ;
-
-require ("/usr/share/gforge/lib/include.pl") ; # Include a few predefined functions 
-require ("/usr/share/gforge/lib/sqlparser.pm") ; # Our magic SQL parser
-
-debug "You'll see some debugging info during this installation." ;
-debug "Do not worry unless told otherwise." ;
-
-&db_connect ;
-
-# debug "Connected to the database OK." ;
-
-$pluginname = "contribtracker" ;
-
-$dbh->{AutoCommit} = 0;
-$dbh->{RaiseError} = 1;
-eval {
-    my ($sth, @array, $version, $action, $path, $target, $rname) ;
-
-    # Inter-table dependencies require manual hinting for dropping order
-    foreach my $t (qw/participation actor/) {
-	my $table = "plugin_${pluginname}_$t" ;
-	&drop_table_if_exists ($table) ;
-    }
-
-    my $pattern = "plugin_" . $pluginname . '_%' ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='v'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_view_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='r'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_table_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='i'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_index_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='S'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_sequence_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $dbh->commit ();
-
-
-    debug "It seems your database deletion went well and smoothly.  That's cool." ;
-    debug "Please enjoy using Debian GForge." ;
-
-    # There should be a commit at the end of every block above.
-    # If there is not, then it might be symptomatic of a problem.
-    # For safety, we roll back.
-    $dbh->rollback ();
-};
-
-if ($@) {
-    warn "Transaction aborted because $@" ;
-    debug "Transaction aborted because $@" ;
-    debug "Last SQL query was:\n$query\n(end of query)" ;
-    $dbh->rollback ;
-    debug "Please report this bug on the Debian bug-tracking system." ;
-    debug "Please include the previous messages as well to help debugging." ;
-    debug "You should not worry too much about this," ;
-    debug "your DB is still in a consistent state and should be usable." ;
-    exit 1 ;
-}
-
-$dbh->rollback ;
-$dbh->disconnect ;
-
-sub debug ( $ ) {
-    my $v = shift ;
-    chomp $v ;
-    print STDERR "$v\n" ;
-}
-
-sub drop_table_if_exists ( $ ) {
-    my $tname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$tname' AND relkind='r'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping table $tname" ;
-	$query = "DROP TABLE $tname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_sequence_if_exists ( $ ) {
-    my $sname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$sname' AND relkind='S'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping sequence $sname" ;
-	$query = "DROP SEQUENCE $sname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_index_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='i'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping index $iname" ;
-	$query = "DROP INDEX $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_view_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='v'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping view $iname" ;
-	$query = "DROP VIEW $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
diff --git a/src/plugins/contribtracker/bin/db-upgrade.pl b/src/plugins/contribtracker/bin/db-upgrade.pl
deleted file mode 100755
index f26c657..0000000
--- a/src/plugins/contribtracker/bin/db-upgrade.pl
+++ /dev/null
@@ -1,273 +0,0 @@
-#!/usr/bin/perl -w
-#
-# Debian-specific script to upgrade the database between releases
-# Roland Mas <lolando at debian.org>
-
-use strict ;
-use diagnostics ;
-
-use DBI ;
-use MIME::Base64 ;
-
-use vars qw/$dbh @reqlist $query/ ;
-use vars qw/$sys_default_domain $sys_cvs_host
-    $sys_shell_host $sys_users_host $sys_docs_host $sys_lists_host
-    $sys_dns1_host $sys_dns2_host $FTPINCOMING_DIR $FTPFILES_DIR
-    $sys_urlroot $sf_cache_dir $sys_name $sys_themeroot
-    $sys_news_group $sys_dbhost $sys_dbname $sys_dbuser $sys_dbpasswd
-    $sys_ldap_base_dn $sys_ldap_host $admin_login $admin_password
-    $domain_name
-    $skill_list/ ;
-use vars qw/$pluginname/ ;
-
-sub is_lesser ( $$ ) ;
-sub is_greater ( $$ ) ;
-sub debug ( $ ) ;
-sub parse_sql_file ( $ ) ;
-
-require ("/usr/share/gforge/lib/include.pl") ; # Include a few predefined functions 
-require ("/usr/share/gforge/lib/sqlparser.pm") ; # Our magic SQL parser
-
-debug "You'll see some debugging info during this installation." ;
-debug "Do not worry unless told otherwise." ;
-
-&db_connect ;
-
-# debug "Connected to the database OK." ;
-
-$pluginname = "contribtracker" ;
-
-$dbh->{AutoCommit} = 0;
-$dbh->{RaiseError} = 1;
-eval {
-    my ($sth, @array, $version, $path, $target) ;
-
-    &create_metadata_table ("0") ;
-    
-    $version = &get_db_version ;
-    $target = "0.1" ;
-    if (is_lesser $version, $target) {
-	my @filelist = ( "/usr/share/gforge/plugins/$pluginname/db/$pluginname-init.sql" ) ;
-	
-	foreach my $file (@filelist) {
-	    debug "Processing $file" ;
-	    @reqlist = @{ &parse_sql_file ($file) } ;
-	    
-	    foreach my $s (@reqlist) {
-		$query = $s ;
-		# debug $query ;
-		$sth = $dbh->prepare ($query) ;
-		$sth->execute () ;
-		$sth->finish () ;
-	    }
-	}
-	@reqlist = () ;
-	
-	&update_db_version ($target) ;
-	debug "Committing." ;
-	$dbh->commit () ;
-    }
-    
-    debug "It seems your database install/upgrade went well and smoothly.  That's cool." ;
-    debug "Please enjoy using Debian GForge." ;
-
-    # There should be a commit at the end of every block above.
-    # If there is not, then it might be symptomatic of a problem.
-    # For safety, we roll back.
-    $dbh->rollback ();
-};
-
-if ($@) {
-    warn "Transaction aborted because $@" ;
-    debug "Transaction aborted because $@" ;
-    debug "Last SQL query was:\n$query\n(end of query)" ;
-    $dbh->rollback ;
-    debug "Please report this bug on the Debian bug-tracking system." ;
-    debug "Please include the previous messages as well to help debugging." ;
-    debug "You should not worry too much about this," ;
-    debug "your DB is still in a consistent state and should be usable." ;
-    exit 1 ;
-}
-
-$dbh->rollback ;
-$dbh->disconnect ;
-
-sub is_lesser ( $$ ) {
-    my $v1 = shift || 0 ;
-    my $v2 = shift || 0 ;
-
-    my $rc = system "dpkg --compare-versions $v1 lt $v2" ;
-
-    return (! $rc) ;
-}
-
-sub is_greater ( $$ ) {
-    my $v1 = shift || 0 ;
-    my $v2 = shift || 0 ;
-
-    my $rc = system "dpkg --compare-versions $v1 gt $v2" ;
-
-    return (! $rc) ;
-}
-
-sub debug ( $ ) {
-    my $v = shift ;
-    chomp $v ;
-    print STDERR "$v\n" ;
-}
-
-sub create_metadata_table ( $ ) {
-    my $v = shift || "0" ;
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-    # Do we have the metadata table?
-
-    $query = "SELECT count(*) FROM pg_class WHERE relname = '$tablename' and relkind = 'r'";
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    # Let's create this table if we have it not
-
-    if ($array [0] == 0) {
-	debug "Creating $tablename table." ;
-	$query = "CREATE TABLE $tablename (key varchar primary key, value text not null)" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-
-    $query = "SELECT count(*) FROM $tablename WHERE key = 'db-version'";
-    # debug $query ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    # Empty table?  We'll have to fill it up a bit
-
-    if ($array [0] == 0) {
-	debug "Inserting first data into $tablename table." ;
-	$query = "INSERT INTO $tablename (key, value) VALUES ('db-version', '$v')" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub update_db_version ( $ ) {
-    my $v = shift or die "Not enough arguments" ;
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-
-    debug "Updating $tablename table." ;
-    $query = "UPDATE $tablename SET value = '$v' WHERE key = 'db-version'" ;
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    $sth->finish () ;
-}
-
-sub get_db_version () {
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-
-    $query = "SELECT value FROM $tablename WHERE key = 'db-version'" ;
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    my $version = $array [0] ;
-
-    return $version ;
-}
-
-sub drop_table_if_exists ( $ ) {
-    my $tname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$tname' AND relkind='r'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping table $tname" ;
-	$query = "DROP TABLE $tname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_sequence_if_exists ( $ ) {
-    my $sname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$sname' AND relkind='S'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping sequence $sname" ;
-	$query = "DROP SEQUENCE $sname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_index_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='i'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping index $iname" ;
-	$query = "DROP INDEX $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_view_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='v'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping view $iname" ;
-	$query = "DROP VIEW $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub bump_sequence_to ( $$ ) {
-    my ($sth, @array, $seqname, $targetvalue) ;
-
-    $seqname = shift ;
-    $targetvalue = shift ;
-
-    do {
-	$query = "select nextval ('$seqname')" ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	@array = $sth->fetchrow_array () ;
-	$sth->finish () ;
-    } until $array[0] >= $targetvalue ;
-}
diff --git a/src/plugins/contribtracker/packaging/install/plugin-contribtracker b/src/plugins/contribtracker/packaging/install/plugin-contribtracker
index 49c1ca9..2c42dd2 100644
--- a/src/plugins/contribtracker/packaging/install/plugin-contribtracker
+++ b/src/plugins/contribtracker/packaging/install/plugin-contribtracker
@@ -1,4 +1,3 @@
-plugins/contribtracker/bin/* @PLUGIN_PATH@/contribtracker/bin/
 plugins/contribtracker/common/* @PLUGIN_PATH@/contribtracker/common/
 plugins/contribtracker/db/* @PLUGIN_PATH@/contribtracker/db/
 plugins/contribtracker/etc/*.ini @CONFIG_PATH@/config.ini.d/
diff --git a/src/plugins/externalsearch/bin/db-delete.pl b/src/plugins/externalsearch/bin/db-delete.pl
deleted file mode 100755
index d94445b..0000000
--- a/src/plugins/externalsearch/bin/db-delete.pl
+++ /dev/null
@@ -1,186 +0,0 @@
-#!/usr/bin/perl -w
-#
-# Debian-specific script to delete plugin-specific tables
-# Roland Mas <lolando at debian.org>
-
-use strict ;
-use diagnostics ;
-
-use DBI ;
-use MIME::Base64 ;
-
-use vars qw/$dbh @reqlist $query/ ;
-use vars qw/$sys_default_domain $sys_cvs_host
-    $sys_shell_host $sys_users_host $sys_docs_host $sys_lists_host
-    $sys_dns1_host $sys_dns2_host $FTPINCOMING_DIR $FTPFILES_DIR
-    $sys_urlroot $sf_cache_dir $sys_name $sys_themeroot
-    $sys_news_group $sys_dbhost $sys_dbname $sys_dbuser $sys_dbpasswd
-    $sys_ldap_base_dn $sys_ldap_host $admin_login $admin_password
-    $domain_name
-    $skill_list/ ;
-use vars qw/$pluginname/ ;
-
-sub is_lesser ( $$ ) ;
-sub is_greater ( $$ ) ;
-sub debug ( $ ) ;
-sub parse_sql_file ( $ ) ;
-
-require ("/usr/share/gforge/lib/include.pl") ; # Include a few predefined functions 
-require ("/usr/share/gforge/lib/sqlparser.pm") ; # Our magic SQL parser
-
-debug "You'll see some debugging info during this installation." ;
-debug "Do not worry unless told otherwise." ;
-
-&db_connect ;
-
-# debug "Connected to the database OK." ;
-
-$pluginname = "externalsearch" ;
-
-$dbh->{AutoCommit} = 0;
-$dbh->{RaiseError} = 1;
-eval {
-    my ($sth, @array, $version, $action, $path, $target, $rname) ;
-
-    my $pattern = "plugin_" . $pluginname . '_%' ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='v'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_view_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='r'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_table_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='i'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_index_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='s'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_sequence_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $dbh->commit ();
-
-
-    debug "It seems your database deletion went well and smoothly.  That's cool." ;
-    debug "Please enjoy using Debian GForge." ;
-
-    # There should be a commit at the end of every block above.
-    # If there is not, then it might be symptomatic of a problem.
-    # For safety, we roll back.
-    $dbh->rollback ();
-};
-
-if ($@) {
-    warn "Transaction aborted because $@" ;
-    debug "Transaction aborted because $@" ;
-    debug "Last SQL query was:\n$query\n(end of query)" ;
-    $dbh->rollback ;
-    debug "Please report this bug on the Debian bug-tracking system." ;
-    debug "Please include the previous messages as well to help debugging." ;
-    debug "You should not worry too much about this," ;
-    debug "your DB is still in a consistent state and should be usable." ;
-    exit 1 ;
-}
-
-$dbh->rollback ;
-$dbh->disconnect ;
-
-sub debug ( $ ) {
-    my $v = shift ;
-    chomp $v ;
-    print STDERR "$v\n" ;
-}
-
-sub drop_table_if_exists ( $ ) {
-    my $tname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$tname' AND relkind='r'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping table $tname" ;
-	$query = "DROP TABLE $tname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_sequence_if_exists ( $ ) {
-    my $sname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$sname' AND relkind='S'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping sequence $sname" ;
-	$query = "DROP SEQUENCE $sname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_index_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='i'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping index $iname" ;
-	$query = "DROP INDEX $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_view_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='v'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping view $iname" ;
-	$query = "DROP VIEW $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
diff --git a/src/plugins/externalsearch/bin/db-upgrade.pl b/src/plugins/externalsearch/bin/db-upgrade.pl
deleted file mode 100755
index 8be876f..0000000
--- a/src/plugins/externalsearch/bin/db-upgrade.pl
+++ /dev/null
@@ -1,298 +0,0 @@
-#!/usr/bin/perl -w
-#
-# Debian-specific script to upgrade the database between releases
-# Roland Mas <lolando at debian.org>
-
-use strict ;
-use diagnostics ;
-
-use DBI ;
-use MIME::Base64 ;
-
-use vars qw/$dbh @reqlist $query/ ;
-use vars qw/$sys_default_domain $sys_cvs_host
-    $sys_shell_host $sys_users_host $sys_docs_host $sys_lists_host
-    $sys_dns1_host $sys_dns2_host $FTPINCOMING_DIR $FTPFILES_DIR
-    $sys_urlroot $sf_cache_dir $sys_name $sys_themeroot
-    $sys_news_group $sys_dbhost $sys_dbname $sys_dbuser $sys_dbpasswd
-    $sys_ldap_base_dn $sys_ldap_host $admin_login $admin_password
-    $domain_name
-    $skill_list/ ;
-use vars qw/$pluginname/ ;
-
-sub is_lesser ( $$ ) ;
-sub is_greater ( $$ ) ;
-sub debug ( $ ) ;
-sub parse_sql_file ( $ ) ;
-
-require ("/usr/share/gforge/lib/include.pl") ; # Include a few predefined functions 
-require ("/usr/share/gforge/lib/sqlparser.pm") ; # Our magic SQL parser
-
-debug "You'll see some debugging info during this installation." ;
-debug "Do not worry unless told otherwise." ;
-
-&db_connect ;
-
-# debug "Connected to the database OK." ;
-
-$pluginname = "externalsearch" ;
-
-$dbh->{AutoCommit} = 0;
-$dbh->{RaiseError} = 1;
-eval {
-    my ($sth, @array, $version, $path, $target) ;
-
-    &create_metadata_table ("0") ;
-    
-    $version = &get_db_version ;
-    $target = "0.1" ;
-    if (is_lesser $version, $target) {
-	my @filelist = ( "/usr/share/gforge/plugins/$pluginname/lib/$pluginname-init.sql" ) ;
-	
-	foreach my $file (@filelist) {
-	    debug "Processing $file" ;
-	    @reqlist = @{ &parse_sql_file ($file) } ;
-	    
-	    foreach my $s (@reqlist) {
-		$query = $s ;
-		# debug $query ;
-		$sth = $dbh->prepare ($query) ;
-		$sth->execute () ;
-		$sth->finish () ;
-	    }
-	}
-	@reqlist = () ;
-	
-	&update_db_version ($target) ;
-	debug "Committing." ;
-	$dbh->commit () ;
-    }
-    
-    $version = &get_db_version ;
-    $target = "0.2" ;
-    if (is_lesser $version, $target) {
-	debug "Adding local data." ;
-	
-	my $ip_address = qx/host $domain_name | awk '{print \}'/ ;
-	
-	@reqlist = (
-		    "INSERT INTO plugin_".$pluginname."_sample_data (domain, ip_address) VALUES ('$domain_name', '$ip_address')",
-		    ) ;
-	
-	foreach my $s (@reqlist) {
-	    $query = $s ;
-	    # debug $query ;
-	    $sth = $dbh->prepare ($query) ;
-	    $sth->execute () ;
-	    $sth->finish () ;
-	}
-	@reqlist = () ;
-	
-	&update_db_version ($target) ;
-	debug "Committing." ;
-	$dbh->commit () ;
-    }
-
-    debug "It seems your database install/upgrade went well and smoothly.  That's cool." ;
-    debug "Please enjoy using Debian GForge." ;
-
-    # There should be a commit at the end of every block above.
-    # If there is not, then it might be symptomatic of a problem.
-    # For safety, we roll back.
-    $dbh->rollback ();
-};
-
-if ($@) {
-    warn "Transaction aborted because $@" ;
-    debug "Transaction aborted because $@" ;
-    debug "Last SQL query was:\n$query\n(end of query)" ;
-    $dbh->rollback ;
-    debug "Please report this bug on the Debian bug-tracking system." ;
-    debug "Please include the previous messages as well to help debugging." ;
-    debug "You should not worry too much about this," ;
-    debug "your DB is still in a consistent state and should be usable." ;
-    exit 1 ;
-}
-
-$dbh->rollback ;
-$dbh->disconnect ;
-
-sub is_lesser ( $$ ) {
-    my $v1 = shift || 0 ;
-    my $v2 = shift || 0 ;
-
-    my $rc = system "dpkg --compare-versions $v1 lt $v2" ;
-
-    return (! $rc) ;
-}
-
-sub is_greater ( $$ ) {
-    my $v1 = shift || 0 ;
-    my $v2 = shift || 0 ;
-
-    my $rc = system "dpkg --compare-versions $v1 gt $v2" ;
-
-    return (! $rc) ;
-}
-
-sub debug ( $ ) {
-    my $v = shift ;
-    chomp $v ;
-    print STDERR "$v\n" ;
-}
-
-sub create_metadata_table ( $ ) {
-    my $v = shift || "0" ;
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-    # Do we have the metadata table?
-
-    $query = "SELECT count(*) FROM pg_class WHERE relname = '$tablename' and relkind = 'r'";
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    # Let's create this table if we have it not
-
-    if ($array [0] == 0) {
-	debug "Creating $tablename table." ;
-	$query = "CREATE TABLE $tablename (key varchar primary key, value text not null)" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-
-    $query = "SELECT count(*) FROM $tablename WHERE key = 'db-version'";
-    # debug $query ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    # Empty table?  We'll have to fill it up a bit
-
-    if ($array [0] == 0) {
-	debug "Inserting first data into $tablename table." ;
-	$query = "INSERT INTO $tablename (key, value) VALUES ('db-version', '$v')" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub update_db_version ( $ ) {
-    my $v = shift or die "Not enough arguments" ;
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-
-    debug "Updating $tablename table." ;
-    $query = "UPDATE $tablename SET value = '$v' WHERE key = 'db-version'" ;
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    $sth->finish () ;
-}
-
-sub get_db_version () {
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-
-    $query = "SELECT value FROM $tablename WHERE key = 'db-version'" ;
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    my $version = $array [0] ;
-
-    return $version ;
-}
-
-sub drop_table_if_exists ( $ ) {
-    my $tname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$tname' AND relkind='r'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping table $tname" ;
-	$query = "DROP TABLE $tname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_sequence_if_exists ( $ ) {
-    my $sname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$sname' AND relkind='S'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping sequence $sname" ;
-	$query = "DROP SEQUENCE $sname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_index_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='i'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping index $iname" ;
-	$query = "DROP INDEX $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_view_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='v'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping view $iname" ;
-	$query = "DROP VIEW $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub bump_sequence_to ( $$ ) {
-    my ($sth, @array, $seqname, $targetvalue) ;
-
-    $seqname = shift ;
-    $targetvalue = shift ;
-
-    do {
-	$query = "select nextval ('$seqname')" ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	@array = $sth->fetchrow_array () ;
-	$sth->finish () ;
-    } until $array[0] >= $targetvalue ;
-}
diff --git a/src/plugins/extsubproj/bin/db-delete.pl b/src/plugins/extsubproj/bin/db-delete.pl
deleted file mode 100755
index 643f85c..0000000
--- a/src/plugins/extsubproj/bin/db-delete.pl
+++ /dev/null
@@ -1,186 +0,0 @@
-#!/usr/bin/perl -w
-#
-# Debian-specific script to delete plugin-specific tables
-# Roland Mas <lolando at debian.org>
-
-use strict ;
-use diagnostics ;
-
-use DBI ;
-use MIME::Base64 ;
-
-use vars qw/$dbh @reqlist $query/ ;
-use vars qw/$sys_default_domain $sys_cvs_host
-    $sys_shell_host $sys_users_host $sys_docs_host $sys_lists_host
-    $sys_dns1_host $sys_dns2_host $FTPINCOMING_DIR $FTPFILES_DIR
-    $sys_urlroot $sf_cache_dir $sys_name $sys_themeroot
-    $sys_news_group $sys_dbhost $sys_dbname $sys_dbuser $sys_dbpasswd
-    $sys_ldap_base_dn $sys_ldap_host $admin_login $admin_password
-    $server_admin $domain_name
-    $skill_list/ ;
-use vars qw/$pluginname/ ;
-
-sub is_lesser ( $$ ) ;
-sub is_greater ( $$ ) ;
-sub debug ( $ ) ;
-sub parse_sql_file ( $ ) ;
-
-require ("/usr/share/gforge/lib/include.pl") ; # Include a few predefined functions 
-require ("/usr/share/gforge/lib/sqlparser.pm") ; # Our magic SQL parser
-
-debug "You'll see some debugging info during this installation." ;
-debug "Do not worry unless told otherwise." ;
-
-&db_connect ;
-
-# debug "Connected to the database OK." ;
-
-$pluginname = "extsubproj" ;
-
-$dbh->{AutoCommit} = 0;
-$dbh->{RaiseError} = 1;
-eval {
-    my ($sth, @array, $version, $action, $path, $target, $rname) ;
-
-    my $pattern = "plugin_" . $pluginname . '_%' ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='v'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_view_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='r'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_table_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='i'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_index_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='s'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_sequence_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $dbh->commit ();
-
-
-    debug "It seems your database deletion went well and smoothly.  That's cool." ;
-    debug "Please enjoy using Debian FusionForge." ;
-
-    # There should be a commit at the end of every block above.
-    # If there is not, then it might be symptomatic of a problem.
-    # For safety, we roll back.
-    $dbh->rollback ();
-};
-
-if ($@) {
-    warn "Transaction aborted because $@" ;
-    debug "Transaction aborted because $@" ;
-    debug "Last SQL query was:\n$query\n(end of query)" ;
-    $dbh->rollback ;
-    debug "Please report this bug on the Debian bug-tracking system." ;
-    debug "Please include the previous messages as well to help debugging." ;
-    debug "You should not worry too much about this," ;
-    debug "your DB is still in a consistent state and should be usable." ;
-    exit 1 ;
-}
-
-$dbh->rollback ;
-$dbh->disconnect ;
-
-sub debug ( $ ) {
-    my $v = shift ;
-    chomp $v ;
-    print STDERR "$v\n" ;
-}
-
-sub drop_table_if_exists ( $ ) {
-    my $tname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$tname' AND relkind='r'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping table $tname" ;
-	$query = "DROP TABLE $tname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_sequence_if_exists ( $ ) {
-    my $sname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$sname' AND relkind='S'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping sequence $sname" ;
-	$query = "DROP SEQUENCE $sname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_index_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='i'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping index $iname" ;
-	$query = "DROP INDEX $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_view_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='v'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping view $iname" ;
-	$query = "DROP VIEW $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
diff --git a/src/plugins/extsubproj/bin/db-upgrade.pl b/src/plugins/extsubproj/bin/db-upgrade.pl
deleted file mode 100755
index f018be1..0000000
--- a/src/plugins/extsubproj/bin/db-upgrade.pl
+++ /dev/null
@@ -1,300 +0,0 @@
-#!/usr/bin/perl -w
-#
-# Debian-specific script to upgrade the database between releases
-# Roland Mas <lolando at debian.org>
-
-use strict ;
-use diagnostics ;
-
-use DBI ;
-use MIME::Base64 ;
-
-use vars qw/$dbh @reqlist $query/ ;
-use vars qw/$sys_default_domain $sys_cvs_host
-    $sys_shell_host $sys_users_host $sys_docs_host $sys_lists_host
-    $sys_dns1_host $sys_dns2_host $FTPINCOMING_DIR $FTPFILES_DIR
-    $sys_urlroot $sf_cache_dir $sys_name $sys_themeroot
-    $sys_news_group $sys_dbhost $sys_dbname $sys_dbuser $sys_dbpasswd
-    $sys_ldap_base_dn $sys_ldap_host $admin_login $admin_password
-    $server_admin $domain_name
-    $skill_list/ ;
-use vars qw/$pluginname/ ;
-
-sub is_lesser ( $$ ) ;
-sub is_greater ( $$ ) ;
-sub debug ( $ ) ;
-sub parse_sql_file ( $ ) ;
-
-require ("/usr/share/gforge/lib/include.pl") ; # Include a few predefined functions 
-require ("/usr/share/gforge/lib/sqlparser.pm") ; # Our magic SQL parser
-
-debug "You'll see some debugging info during this installation." ;
-debug "Do not worry unless told otherwise." ;
-
-&db_connect ;
-
-# debug "Connected to the database OK." ;
-
-$pluginname = "extsubproj" ;
-
-$dbh->{AutoCommit} = 0;
-$dbh->{RaiseError} = 1;
-eval {
-    my ($sth, @array, $version, $path, $target) ;
-
-    &create_metadata_table ("0") ;
-    
-    $version = &get_db_version ;
-    $target = "0.1" ;
-    if (is_lesser $version, $target) {
-	my @filelist = ( "/usr/share/gforge/plugins/$pluginname/db/$pluginname-init.sql" ) ;
-	
-	foreach my $file (@filelist) {
-	    debug "Processing $file" ;
-	    @reqlist = @{ &parse_sql_file ($file) } ;
-	    
-	    foreach my $s (@reqlist) {
-		$query = $s ;
-		# debug $query ;
-		$sth = $dbh->prepare ($query) ;
-		$sth->execute () ;
-		$sth->finish () ;
-	    }
-	}
-	@reqlist = () ;
-	
-	&update_db_version ($target) ;
-	debug "Committing." ;
-	$dbh->commit () ;
-    }
-    
-#    $version = &get_db_version ;
-#    $target = "0.2" ;
-#    if (is_lesser $version, $target) {
-#	debug "Adding local data." ;
-#	
-#	do "/etc/gforge/local.pl" or die "Cannot read /etc/gforge/local.pl" ;
-#	
-#	my $ip_address = qx/host $domain_name | awk '{print \}'/ ;
-#	
-#	@reqlist = (
-#		    "INSERT INTO plugin_".$pluginname."_sample_data (domain, ip_address) VALUES ('$domain_name', '$ip_address')",
-#		    ) ;
-#	
-#	foreach my $s (@reqlist) {
-#	    $query = $s ;
-#	    # debug $query ;
-#	    $sth = $dbh->prepare ($query) ;
-#	    $sth->execute () ;
-#	    $sth->finish () ;
-#	}
-#	@reqlist = () ;
-#	
-#	&update_db_version ($target) ;
-#	debug "Committing." ;
-#	$dbh->commit () ;
-#    }
-
-    debug "It seems your database install/upgrade went well and smoothly.  That's cool." ;
-    debug "Please enjoy using Debian FusionForge." ;
-
-    # There should be a commit at the end of every block above.
-    # If there is not, then it might be symptomatic of a problem.
-    # For safety, we roll back.
-    $dbh->rollback ();
-};
-
-if ($@) {
-    warn "Transaction aborted because $@" ;
-    debug "Transaction aborted because $@" ;
-    debug "Last SQL query was:\n$query\n(end of query)" ;
-    $dbh->rollback ;
-    debug "Please report this bug on the Debian bug-tracking system." ;
-    debug "Please include the previous messages as well to help debugging." ;
-    debug "You should not worry too much about this," ;
-    debug "your DB is still in a consistent state and should be usable." ;
-    exit 1 ;
-}
-
-$dbh->rollback ;
-$dbh->disconnect ;
-
-sub is_lesser ( $$ ) {
-    my $v1 = shift || 0 ;
-    my $v2 = shift || 0 ;
-
-    my $rc = system "dpkg --compare-versions $v1 lt $v2" ;
-
-    return (! $rc) ;
-}
-
-sub is_greater ( $$ ) {
-    my $v1 = shift || 0 ;
-    my $v2 = shift || 0 ;
-
-    my $rc = system "dpkg --compare-versions $v1 gt $v2" ;
-
-    return (! $rc) ;
-}
-
-sub debug ( $ ) {
-    my $v = shift ;
-    chomp $v ;
-    print STDERR "$v\n" ;
-}
-
-sub create_metadata_table ( $ ) {
-    my $v = shift || "0" ;
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-    # Do we have the metadata table?
-
-    $query = "SELECT count(*) FROM pg_class WHERE relname = '$tablename' and relkind = 'r'";
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    # Let's create this table if we have it not
-
-    if ($array [0] == 0) {
-	debug "Creating $tablename table." ;
-	$query = "CREATE TABLE $tablename (key varchar primary key, value text not null)" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-
-    $query = "SELECT count(*) FROM $tablename WHERE key = 'db-version'";
-    # debug $query ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    # Empty table?  We'll have to fill it up a bit
-
-    if ($array [0] == 0) {
-	debug "Inserting first data into $tablename table." ;
-	$query = "INSERT INTO $tablename (key, value) VALUES ('db-version', '$v')" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub update_db_version ( $ ) {
-    my $v = shift or die "Not enough arguments" ;
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-
-    debug "Updating $tablename table." ;
-    $query = "UPDATE $tablename SET value = '$v' WHERE key = 'db-version'" ;
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    $sth->finish () ;
-}
-
-sub get_db_version () {
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-
-    $query = "SELECT value FROM $tablename WHERE key = 'db-version'" ;
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    my $version = $array [0] ;
-
-    return $version ;
-}
-
-sub drop_table_if_exists ( $ ) {
-    my $tname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$tname' AND relkind='r'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping table $tname" ;
-	$query = "DROP TABLE $tname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_sequence_if_exists ( $ ) {
-    my $sname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$sname' AND relkind='S'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping sequence $sname" ;
-	$query = "DROP SEQUENCE $sname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_index_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='i'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping index $iname" ;
-	$query = "DROP INDEX $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_view_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='v'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping view $iname" ;
-	$query = "DROP VIEW $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub bump_sequence_to ( $$ ) {
-    my ($sth, @array, $seqname, $targetvalue) ;
-
-    $seqname = shift ;
-    $targetvalue = shift ;
-
-    do {
-	$query = "select nextval ('$seqname')" ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	@array = $sth->fetchrow_array () ;
-	$sth->finish () ;
-    } until $array[0] >= $targetvalue ;
-}
diff --git a/src/plugins/extsubproj/packaging/install/plugin-extsubproj b/src/plugins/extsubproj/packaging/install/plugin-extsubproj
index b3c6842..929b3b9 100644
--- a/src/plugins/extsubproj/packaging/install/plugin-extsubproj
+++ b/src/plugins/extsubproj/packaging/install/plugin-extsubproj
@@ -3,6 +3,5 @@ plugins/extsubproj/common/*                  @PLUGIN_PATH@/extsubproj/common/
 plugins/extsubproj/view/*                  @PLUGIN_PATH@/extsubproj/view/
 plugins/extsubproj/include/*                 @PLUGIN_PATH@/extsubproj/include/
 plugins/extsubproj/db/*                      @PLUGIN_PATH@/extsubproj/db/
-plugins/extsubproj/bin/*                     @PLUGIN_PATH@/extsubproj/bin/
 plugins/extsubproj/www/*                     @PLUGIN_PATH@/extsubproj/www/
 plugins/extsubproj/etc/extsubproj.ini	             etc/@PACKAGE@/config.ini.d/
diff --git a/src/plugins/forumml/bin/db-upgrade.pl b/src/plugins/forumml/bin/db-upgrade.pl
deleted file mode 100755
index e5fe6be..0000000
--- a/src/plugins/forumml/bin/db-upgrade.pl
+++ /dev/null
@@ -1,273 +0,0 @@
-#!/usr/bin/perl -w
-#
-# Debian-specific script to upgrade the database between releases
-# Roland Mas <lolando at debian.org>
-
-use strict ;
-use diagnostics ;
-
-use DBI ;
-use MIME::Base64 ;
-
-use vars qw/$dbh @reqlist $query/ ;
-use vars qw/$sys_default_domain $sys_cvs_host
-    $sys_shell_host $sys_users_host $sys_docs_host $sys_lists_host
-    $sys_dns1_host $sys_dns2_host $FTPINCOMING_DIR $FTPFILES_DIR
-    $sys_urlroot $sf_cache_dir $sys_name $sys_themeroot
-    $sys_news_group $sys_dbhost $sys_dbname $sys_dbuser $sys_dbpasswd
-    $sys_ldap_base_dn $sys_ldap_host $admin_login $admin_password
-    $domain_name
-    $skill_list/ ;
-use vars qw/$pluginname/ ;
-
-sub is_lesser ( $$ ) ;
-sub is_greater ( $$ ) ;
-sub debug ( $ ) ;
-sub parse_sql_file ( $ ) ;
-
-require ("/usr/share/gforge/lib/include.pl") ; # Include a few predefined functions 
-require ("/usr/share/gforge/lib/sqlparser.pm") ; # Our magic SQL parser
-
-debug "You'll see some debugging info during this installation." ;
-debug "Do not worry unless told otherwise." ;
-
-&db_connect ;
-
-# debug "Connected to the database OK." ;
-
-$pluginname = "forumml" ;
-
-$dbh->{AutoCommit} = 0;
-$dbh->{RaiseError} = 1;
-eval {
-    my ($sth, @array, $version, $path, $target) ;
-
-    &create_metadata_table ("0") ;
-    
-    $version = &get_db_version ;
-    $target = "0.1" ;
-    if (is_lesser $version, $target) {
-	my @filelist = ( "/usr/share/gforge/plugins/$pluginname/db/$pluginname-init.sql" ) ;
-	
-	foreach my $file (@filelist) {
-	    debug "Processing $file" ;
-	    @reqlist = @{ &parse_sql_file ($file) } ;
-	    
-	    foreach my $s (@reqlist) {
-		$query = $s ;
-		# debug $query ;
-		$sth = $dbh->prepare ($query) ;
-		$sth->execute () ;
-		$sth->finish () ;
-	    }
-	}
-	@reqlist = () ;
-	
-	&update_db_version ($target) ;
-	debug "Committing." ;
-	$dbh->commit () ;
-    }
-    
-    debug "It seems your database install/upgrade went well and smoothly.  That's cool." ;
-    debug "Please enjoy using Debian FusionForge." ;
-
-    # There should be a commit at the end of every block above.
-    # If there is not, then it might be symptomatic of a problem.
-    # For safety, we roll back.
-    $dbh->rollback ();
-};
-
-if ($@) {
-    warn "Transaction aborted because $@" ;
-    debug "Transaction aborted because $@" ;
-    debug "Last SQL query was:\n$query\n(end of query)" ;
-    $dbh->rollback ;
-    debug "Please report this bug on the Debian bug-tracking system." ;
-    debug "Please include the previous messages as well to help debugging." ;
-    debug "You should not worry too much about this," ;
-    debug "your DB is still in a consistent state and should be usable." ;
-    exit 1 ;
-}
-
-$dbh->rollback ;
-$dbh->disconnect ;
-
-sub is_lesser ( $$ ) {
-    my $v1 = shift || 0 ;
-    my $v2 = shift || 0 ;
-
-    my $rc = system "dpkg --compare-versions $v1 lt $v2" ;
-
-    return (! $rc) ;
-}
-
-sub is_greater ( $$ ) {
-    my $v1 = shift || 0 ;
-    my $v2 = shift || 0 ;
-
-    my $rc = system "dpkg --compare-versions $v1 gt $v2" ;
-
-    return (! $rc) ;
-}
-
-sub debug ( $ ) {
-    my $v = shift ;
-    chomp $v ;
-    print STDERR "$v\n" ;
-}
-
-sub create_metadata_table ( $ ) {
-    my $v = shift || "0" ;
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-    # Do we have the metadata table?
-
-    $query = "SELECT count(*) FROM pg_class WHERE relname = '$tablename' and relkind = 'r'";
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    # Let's create this table if we have it not
-
-    if ($array [0] == 0) {
-	debug "Creating $tablename table." ;
-	$query = "CREATE TABLE $tablename (key varchar primary key, value text not null)" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-
-    $query = "SELECT count(*) FROM $tablename WHERE key = 'db-version'";
-    # debug $query ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    # Empty table?  We'll have to fill it up a bit
-
-    if ($array [0] == 0) {
-	debug "Inserting first data into $tablename table." ;
-	$query = "INSERT INTO $tablename (key, value) VALUES ('db-version', '$v')" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub update_db_version ( $ ) {
-    my $v = shift or die "Not enough arguments" ;
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-
-    debug "Updating $tablename table." ;
-    $query = "UPDATE $tablename SET value = '$v' WHERE key = 'db-version'" ;
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    $sth->finish () ;
-}
-
-sub get_db_version () {
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-
-    $query = "SELECT value FROM $tablename WHERE key = 'db-version'" ;
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    my $version = $array [0] ;
-
-    return $version ;
-}
-
-sub drop_table_if_exists ( $ ) {
-    my $tname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$tname' AND relkind='r'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping table $tname" ;
-	$query = "DROP TABLE $tname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_sequence_if_exists ( $ ) {
-    my $sname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$sname' AND relkind='S'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping sequence $sname" ;
-	$query = "DROP SEQUENCE $sname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_index_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='i'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping index $iname" ;
-	$query = "DROP INDEX $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_view_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='v'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping view $iname" ;
-	$query = "DROP VIEW $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub bump_sequence_to ( $$ ) {
-    my ($sth, @array, $seqname, $targetvalue) ;
-
-    $seqname = shift ;
-    $targetvalue = shift ;
-
-    do {
-	$query = "select nextval ('$seqname')" ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	@array = $sth->fetchrow_array () ;
-	$sth->finish () ;
-    } until $array[0] >= $targetvalue ;
-}
diff --git a/src/plugins/globaldashboard/bin/db-delete.pl b/src/plugins/globaldashboard/bin/db-delete.pl
deleted file mode 100755
index e6ffb93..0000000
--- a/src/plugins/globaldashboard/bin/db-delete.pl
+++ /dev/null
@@ -1,186 +0,0 @@
-#!/usr/bin/perl -w
-#
-# Debian-specific script to delete plugin-specific tables
-# Roland Mas <lolando at debian.org>
-
-use strict ;
-use diagnostics ;
-
-use DBI ;
-use MIME::Base64 ;
-
-use vars qw/$dbh @reqlist $query/ ;
-use vars qw/$sys_default_domain $sys_cvs_host
-    $sys_shell_host $sys_users_host $sys_docs_host $sys_lists_host
-    $sys_dns1_host $sys_dns2_host $FTPINCOMING_DIR $FTPFILES_DIR
-    $sys_urlroot $sf_cache_dir $sys_name $sys_themeroot
-    $sys_news_group $sys_dbhost $sys_dbname $sys_dbuser $sys_dbpasswd
-    $sys_ldap_base_dn $sys_ldap_host $admin_login $admin_password
-    $server_admin $domain_name
-    $skill_list/ ;
-use vars qw/$pluginname/ ;
-
-sub is_lesser ( $$ ) ;
-sub is_greater ( $$ ) ;
-sub debug ( $ ) ;
-sub parse_sql_file ( $ ) ;
-
-require ("/usr/share/gforge/lib/include.pl") ; # Include a few predefined functions 
-require ("/usr/share/gforge/lib/sqlparser.pm") ; # Our magic SQL parser
-
-debug "You'll see some debugging info during this installation." ;
-debug "Do not worry unless told otherwise." ;
-
-&db_connect ;
-
-# debug "Connected to the database OK." ;
-
-$pluginname = "globaldashboard" ;
-
-$dbh->{AutoCommit} = 0;
-$dbh->{RaiseError} = 1;
-eval {
-    my ($sth, @array, $version, $action, $path, $target, $rname) ;
-
-    my $pattern = "plugin_" . $pluginname . '_%' ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='v'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_view_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='r'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_table_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='i'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_index_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='s'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_sequence_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $dbh->commit ();
-
-
-    debug "It seems your database deletion went well and smoothly.  That's cool." ;
-    debug "Please enjoy using Debian FusionForge." ;
-
-    # There should be a commit at the end of every block above.
-    # If there is not, then it might be symptomatic of a problem.
-    # For safety, we roll back.
-    $dbh->rollback ();
-};
-
-if ($@) {
-    warn "Transaction aborted because $@" ;
-    debug "Transaction aborted because $@" ;
-    debug "Last SQL query was:\n$query\n(end of query)" ;
-    $dbh->rollback ;
-    debug "Please report this bug on the Debian bug-tracking system." ;
-    debug "Please include the previous messages as well to help debugging." ;
-    debug "You should not worry too much about this," ;
-    debug "your DB is still in a consistent state and should be usable." ;
-    exit 1 ;
-}
-
-$dbh->rollback ;
-$dbh->disconnect ;
-
-sub debug ( $ ) {
-    my $v = shift ;
-    chomp $v ;
-    print STDERR "$v\n" ;
-}
-
-sub drop_table_if_exists ( $ ) {
-    my $tname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$tname' AND relkind='r'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping table $tname" ;
-	$query = "DROP TABLE $tname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_sequence_if_exists ( $ ) {
-    my $sname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$sname' AND relkind='S'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping sequence $sname" ;
-	$query = "DROP SEQUENCE $sname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_index_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='i'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping index $iname" ;
-	$query = "DROP INDEX $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_view_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='v'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping view $iname" ;
-	$query = "DROP VIEW $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
diff --git a/src/plugins/globaldashboard/bin/db-upgrade.pl b/src/plugins/globaldashboard/bin/db-upgrade.pl
deleted file mode 100755
index f3fb472..0000000
--- a/src/plugins/globaldashboard/bin/db-upgrade.pl
+++ /dev/null
@@ -1,300 +0,0 @@
-#!/usr/bin/perl -w
-#
-# Debian-specific script to upgrade the database between releases
-# Roland Mas <lolando at debian.org>
-
-use strict ;
-use diagnostics ;
-
-use DBI ;
-use MIME::Base64 ;
-
-use vars qw/$dbh @reqlist $query/ ;
-use vars qw/$sys_default_domain $sys_cvs_host
-    $sys_shell_host $sys_users_host $sys_docs_host $sys_lists_host
-    $sys_dns1_host $sys_dns2_host $FTPINCOMING_DIR $FTPFILES_DIR
-    $sys_urlroot $sf_cache_dir $sys_name $sys_themeroot
-    $sys_news_group $sys_dbhost $sys_dbname $sys_dbuser $sys_dbpasswd
-    $sys_ldap_base_dn $sys_ldap_host $admin_login $admin_password
-    $server_admin $domain_name
-    $skill_list/ ;
-use vars qw/$pluginname/ ;
-
-sub is_lesser ( $$ ) ;
-sub is_greater ( $$ ) ;
-sub debug ( $ ) ;
-sub parse_sql_file ( $ ) ;
-
-require ("/usr/share/gforge/lib/include.pl") ; # Include a few predefined functions 
-require ("/usr/share/gforge/lib/sqlparser.pm") ; # Our magic SQL parser
-
-debug "You'll see some debugging info during this installation." ;
-debug "Do not worry unless told otherwise." ;
-
-&db_connect ;
-
-# debug "Connected to the database OK." ;
-
-$pluginname = "globaldashboard" ;
-
-$dbh->{AutoCommit} = 0;
-$dbh->{RaiseError} = 1;
-eval {
-    my ($sth, @array, $version, $path, $target) ;
-
-    &create_metadata_table ("0") ;
-    
-    $version = &get_db_version ;
-    $target = "0.1" ;
-    if (is_lesser $version, $target) {
-	my @filelist = ( "/usr/share/gforge/plugins/$pluginname/db/$pluginname-init.sql" ) ;
-	
-	foreach my $file (@filelist) {
-	    debug "Processing $file" ;
-	    @reqlist = @{ &parse_sql_file ($file) } ;
-	    
-	    foreach my $s (@reqlist) {
-		$query = $s ;
-		# debug $query ;
-		$sth = $dbh->prepare ($query) ;
-		$sth->execute () ;
-		$sth->finish () ;
-	    }
-	}
-	@reqlist = () ;
-	
-	&update_db_version ($target) ;
-	debug "Committing." ;
-	$dbh->commit () ;
-    }
-    
-#    $version = &get_db_version ;
-#    $target = "0.2" ;
-#    if (is_lesser $version, $target) {
-#	debug "Adding local data." ;
-#	
-#	do "/etc/gforge/local.pl" or die "Cannot read /etc/gforge/local.pl" ;
-#	
-#	my $ip_address = qx/host $domain_name | awk '{print \}'/ ;
-#	
-#	@reqlist = (
-#		    "INSERT INTO plugin_".$pluginname."_sample_data (domain, ip_address) VALUES ('$domain_name', '$ip_address')",
-#		    ) ;
-#	
-#	foreach my $s (@reqlist) {
-#	    $query = $s ;
-#	    # debug $query ;
-#	    $sth = $dbh->prepare ($query) ;
-#	    $sth->execute () ;
-#	    $sth->finish () ;
-#	}
-#	@reqlist = () ;
-#	
-#	&update_db_version ($target) ;
-#	debug "Committing." ;
-#	$dbh->commit () ;
-#    }
-
-    debug "It seems your database install/upgrade went well and smoothly.  That's cool." ;
-    debug "Please enjoy using Debian FusionForge." ;
-
-    # There should be a commit at the end of every block above.
-    # If there is not, then it might be symptomatic of a problem.
-    # For safety, we roll back.
-    $dbh->rollback ();
-};
-
-if ($@) {
-    warn "Transaction aborted because $@" ;
-    debug "Transaction aborted because $@" ;
-    debug "Last SQL query was:\n$query\n(end of query)" ;
-    $dbh->rollback ;
-    debug "Please report this bug on the Debian bug-tracking system." ;
-    debug "Please include the previous messages as well to help debugging." ;
-    debug "You should not worry too much about this," ;
-    debug "your DB is still in a consistent state and should be usable." ;
-    exit 1 ;
-}
-
-$dbh->rollback ;
-$dbh->disconnect ;
-
-sub is_lesser ( $$ ) {
-    my $v1 = shift || 0 ;
-    my $v2 = shift || 0 ;
-
-    my $rc = system "dpkg --compare-versions $v1 lt $v2" ;
-
-    return (! $rc) ;
-}
-
-sub is_greater ( $$ ) {
-    my $v1 = shift || 0 ;
-    my $v2 = shift || 0 ;
-
-    my $rc = system "dpkg --compare-versions $v1 gt $v2" ;
-
-    return (! $rc) ;
-}
-
-sub debug ( $ ) {
-    my $v = shift ;
-    chomp $v ;
-    print STDERR "$v\n" ;
-}
-
-sub create_metadata_table ( $ ) {
-    my $v = shift || "0" ;
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-    # Do we have the metadata table?
-
-    $query = "SELECT count(*) FROM pg_class WHERE relname = '$tablename' and relkind = 'r'";
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    # Let's create this table if we have it not
-
-    if ($array [0] == 0) {
-	debug "Creating $tablename table." ;
-	$query = "CREATE TABLE $tablename (key varchar primary key, value text not null)" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-
-    $query = "SELECT count(*) FROM $tablename WHERE key = 'db-version'";
-    # debug $query ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    # Empty table?  We'll have to fill it up a bit
-
-    if ($array [0] == 0) {
-	debug "Inserting first data into $tablename table." ;
-	$query = "INSERT INTO $tablename (key, value) VALUES ('db-version', '$v')" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub update_db_version ( $ ) {
-    my $v = shift or die "Not enough arguments" ;
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-
-    debug "Updating $tablename table." ;
-    $query = "UPDATE $tablename SET value = '$v' WHERE key = 'db-version'" ;
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    $sth->finish () ;
-}
-
-sub get_db_version () {
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-
-    $query = "SELECT value FROM $tablename WHERE key = 'db-version'" ;
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    my $version = $array [0] ;
-
-    return $version ;
-}
-
-sub drop_table_if_exists ( $ ) {
-    my $tname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$tname' AND relkind='r'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping table $tname" ;
-	$query = "DROP TABLE $tname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_sequence_if_exists ( $ ) {
-    my $sname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$sname' AND relkind='S'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping sequence $sname" ;
-	$query = "DROP SEQUENCE $sname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_index_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='i'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping index $iname" ;
-	$query = "DROP INDEX $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_view_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='v'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping view $iname" ;
-	$query = "DROP VIEW $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub bump_sequence_to ( $$ ) {
-    my ($sth, @array, $seqname, $targetvalue) ;
-
-    $seqname = shift ;
-    $targetvalue = shift ;
-
-    do {
-	$query = "select nextval ('$seqname')" ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	@array = $sth->fetchrow_array () ;
-	$sth->finish () ;
-    } until $array[0] >= $targetvalue ;
-}
diff --git a/src/plugins/globaldashboard/packaging/install/plugin-globaldashboard b/src/plugins/globaldashboard/packaging/install/plugin-globaldashboard
index 6ecf315..3d28a27 100644
--- a/src/plugins/globaldashboard/packaging/install/plugin-globaldashboard
+++ b/src/plugins/globaldashboard/packaging/install/plugin-globaldashboard
@@ -1,7 +1,6 @@
 plugins/globaldashboard/common/*                  @PLUGIN_PATH@/globaldashboard/common/
 plugins/globaldashboard/include/*                 @PLUGIN_PATH@/globaldashboard/include/
 plugins/globaldashboard/db/*                      @PLUGIN_PATH@/globaldashboard/db/
-plugins/globaldashboard/bin/*                     @PLUGIN_PATH@/globaldashboard/bin/
 plugins/globaldashboard/www/*                     @PLUGIN_PATH@/globaldashboard/www/
 plugins/globaldashboard/cronjobs/*                @SOURCE_PATH@/cronjobs
 plugins/globaldashboard/etc/plugins/globaldashboard/*     @CONFIG_PATH@/plugins/globaldashboard/
diff --git a/src/plugins/globalsearch/bin/db-delete.pl b/src/plugins/globalsearch/bin/db-delete.pl
deleted file mode 100755
index e4a3204..0000000
--- a/src/plugins/globalsearch/bin/db-delete.pl
+++ /dev/null
@@ -1,117 +0,0 @@
-#!/usr/bin/perl -w
-#
-# $Id: db-delete.pl,v 1.1.1.1 2004/03/29 01:20:13 vjrj Exp $
-#
-# Debian-specific script to delete plugin-specific tables
-# Roland Mas <lolando at debian.org>
-
-use strict ;
-use diagnostics ;
-
-use DBI ;
-use MIME::Base64 ;
-
-use vars qw/$dbh @reqlist $query/ ;
-use vars qw/$sys_default_domain $sys_cvs_host
-    $sys_shell_host $sys_users_host $sys_docs_host $sys_lists_host
-    $sys_dns1_host $sys_dns2_host $FTPINCOMING_DIR $FTPFILES_DIR
-    $sys_urlroot $sf_cache_dir $sys_name $sys_themeroot
-    $sys_news_group $sys_dbhost $sys_dbname $sys_dbuser $sys_dbpasswd
-    $sys_ldap_base_dn $sys_ldap_host $admin_login $admin_password
-    $domain_name
-    $skill_list/ ;
-use vars qw/$pluginname/ ;
-
-sub is_lesser ( $$ ) ;
-sub is_greater ( $$ ) ;
-sub debug ( $ ) ;
-sub parse_sql_file ( $ ) ;
-
-require ("/usr/share/gforge/lib/include.pl") ; # Include a few predefined functions 
-require ("/usr/share/gforge/lib/sqlparser.pm") ; # Our magic SQL parser
-require ("/usr/share/gforge/lib/sqlhelper.pm") ; # A few SQL helper functions
-
-debug "You'll see some debugging info during this installation." ;
-debug "Do not worry unless told otherwise." ;
-
-&db_connect ;
-
-# debug "Connected to the database OK." ;
-
-$pluginname = "globalsearch" ;
-
-$dbh->{AutoCommit} = 0;
-$dbh->{RaiseError} = 1;
-eval {
-    my ($sth, @array, $version, $action, $path, $target, $rname) ;
-
-    # Drop a few tables in a specific order
-    &drop_table_if_exists ($dbh, "plugin_globalsearch_assoc_site_project") ;
-    &drop_table_if_exists ($dbh, "plugin_globalsearch_assoc_site") ;
-    &drop_table_if_exists ($dbh, "plugin_globalsearch_assoc_status") ;
-
-    # Then drop any remaining data structures
-    my $pattern = "plugin_" . $pluginname . '_%' ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='v'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-        $rname = $array [0] ;
-        &drop_view_if_exists ($dbh, $rname) ;
-    }
-    $sth->finish () ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='r'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-        $rname = $array [0] ;
-        &drop_table_if_exists ($dbh, $rname) ;
-    }
-    $sth->finish () ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='i'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-        $rname = $array [0] ;
-        &drop_index_if_exists ($dbh, $rname) ;
-    }
-    $sth->finish () ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='S'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-        $rname = $array [0] ;
-        &drop_sequence_if_exists ($dbh, $rname) ;
-    }
-    $sth->finish () ;
-
-    $dbh->commit ();
-
-
-    debug "It seems your database deletion went well and smoothly.  That's cool." ;
-    debug "Please enjoy using Debian GForge." ;
-
-    # There should be a commit at the end of every block above.
-    # If there is not, then it might be symptomatic of a problem.
-    # For safety, we roll back.
-    $dbh->rollback ();
-};
-
-if ($@) {
-    warn "Transaction aborted because $@" ;
-    debug "Transaction aborted because $@" ;
-    debug "Last SQL query was:\n$query\n(end of query)" ;
-    $dbh->rollback ;
-    debug "Please report this bug on the Debian bug-tracking system." ;
-    debug "Please include the previous messages as well to help debugging." ;
-    debug "You should not worry too much about this," ;
-    debug "your DB is still in a consistent state and should be usable." ;
-    exit 1 ;
-}
-
-$dbh->rollback ;
-$dbh->disconnect ;
diff --git a/src/plugins/globalsearch/bin/db-upgrade.pl b/src/plugins/globalsearch/bin/db-upgrade.pl
deleted file mode 100755
index cbde6ae..0000000
--- a/src/plugins/globalsearch/bin/db-upgrade.pl
+++ /dev/null
@@ -1,306 +0,0 @@
-#!/usr/bin/perl -w
-#
-# $Id: db-upgrade.pl,v 1.1.1.1 2004/03/29 01:20:13 vjrj Exp $
-#
-# Debian-specific script to upgrade the database between releases
-# Roland Mas <lolando at debian.org>
-
-use strict ;
-use diagnostics ;
-
-use DBI ;
-use MIME::Base64 ;
-use Socket;
-
-use vars qw/$dbh @reqlist $query/ ;
-use vars qw/$sys_default_domain $sys_cvs_host
-    $sys_shell_host $sys_users_host $sys_docs_host $sys_lists_host
-    $sys_dns1_host $sys_dns2_host $FTPINCOMING_DIR $FTPFILES_DIR
-    $sys_urlroot $sf_cache_dir $sys_name $sys_themeroot
-    $sys_news_group $sys_dbhost $sys_dbname $sys_dbuser $sys_dbpasswd
-    $sys_ldap_base_dn $sys_ldap_host $admin_login $admin_password
-    $domain_name
-    $skill_list/ ;
-use vars qw/$pluginname/ ;
-
-sub is_lesser ( $$ ) ;
-sub is_greater ( $$ ) ;
-sub debug ( $ ) ;
-sub parse_sql_file ( $ ) ;
-
-require ("/usr/share/gforge/lib/include.pl") ; # Include a few predefined functions 
-require ("/usr/share/gforge/lib/sqlparser.pm") ; # Our magic SQL parser
-chomp($domain_name=`forge_get_config web_host`);
-
-debug "You'll see some debugging info during this installation." ;
-debug "Do not worry unless told otherwise." ;
-
-&db_connect ;
-
-# debug "Connected to the database OK." ;
-
-$pluginname = "globalsearch" ;
-
-$dbh->{AutoCommit} = 0;
-$dbh->{RaiseError} = 1;
-eval {
-    my ($sth, @array, $version, $path, $target) ;
-
-    &create_metadata_table ("0") ;
-    
-    $version = &get_db_version ;
-    $target = "0.1" ;
-    if (is_lesser $version, $target) {
-        my @filelist = ( "/usr/share/gforge/plugins/$pluginname/db/$pluginname-init.sql" ) ;
-        
-        foreach my $file (@filelist) {
-            debug "Processing $file" ;
-            @reqlist = @{ &parse_sql_file ($file) } ;
-            
-            foreach my $s (@reqlist) {
-                $query = $s ;
-                # debug $query ;
-                $sth = $dbh->prepare ($query) ;
-                $sth->execute () ;
-                $sth->finish () ;
-            }
-        }
-        @reqlist = () ;
-        
-        &update_db_version ($target) ;
-        debug "Committing." ;
-        $dbh->commit () ;
-    }
-    
-    $version = &get_db_version ;
-    $target = "0.2" ;
-    if (is_lesser $version, $target) {
-    debug "Adding local data." ;
-        
-    my $packed_ip = gethostbyname("$domain_name");
-    my $ip_address ;
-    if (defined $packed_ip) {
-	$ip_address = inet_ntoa($packed_ip);
-    }
-    
-    @reqlist = (
-	#        "INSERT INTO plugin_".$pluginname."_sample_data (domain, ip_address) VALUES ('$domain_name', '$ip_address')",
-	) ;
-    
-    foreach my $s (@reqlist) {
-	$query = $s ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-    @reqlist = () ;
-    
-    &update_db_version ($target) ;
-    debug "Committing." ;
-    $dbh->commit () ;
-    }
-    
-    debug "It seems your database install/upgrade went well and smoothly.  That's cool." ;
-    debug "Please enjoy using Debian GForge." ;
-
-    # There should be a commit at the end of every block above.
-    # If there is not, then it might be symptomatic of a problem.
-    # For safety, we roll back.
-    $dbh->rollback ();
-};
-
-if ($@) {
-    warn "Transaction aborted because $@" ;
-    debug "Transaction aborted because $@" ;
-    debug "Last SQL query was:\n$query\n(end of query)" ;
-    $dbh->rollback ;
-    debug "Please report this bug on the Debian bug-tracking system." ;
-    debug "Please include the previous messages as well to help debugging." ;
-    debug "You should not worry too much about this," ;
-    debug "your DB is still in a consistent state and should be usable." ;
-    exit 1 ;
-}
-
-$dbh->rollback ;
-$dbh->disconnect ;
-
-sub is_lesser ( $$ ) {
-    my $v1 = shift || 0 ;
-    my $v2 = shift || 0 ;
-
-    my $rc = system "dpkg --compare-versions $v1 lt $v2" ;
-
-    return (! $rc) ;
-}
-
-sub is_greater ( $$ ) {
-    my $v1 = shift || 0 ;
-    my $v2 = shift || 0 ;
-
-    my $rc = system "dpkg --compare-versions $v1 gt $v2" ;
-
-    return (! $rc) ;
-}
-
-sub debug ( $ ) {
-    my $v = shift ;
-    chomp $v ;
-    print STDERR "$v\n" ;
-}
-
-sub create_metadata_table ( $ ) {
-    my $v = shift || "0" ;
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-    # Do we have the metadata table?
-
-    $query = "SELECT count(*) FROM pg_class WHERE relname = '$tablename' and relkind = 'r'";
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    # Let's create this table if we have it not
-
-    if ($array [0] == 0) {
-        debug "Creating $tablename table." ;
-        $query = "CREATE TABLE $tablename (key varchar primary key, value text not null)" ;
-        # debug $query ;
-        $sth = $dbh->prepare ($query) ;
-        $sth->execute () ;
-        $sth->finish () ;
-    }
-
-    $query = "SELECT count(*) FROM $tablename WHERE key = 'db-version'";
-    # debug $query ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    # Empty table?  We'll have to fill it up a bit
-
-    if ($array [0] == 0) {
-        debug "Inserting first data into $tablename table." ;
-        $query = "INSERT INTO $tablename (key, value) VALUES ('db-version', '$v')" ;
-        # debug $query ;
-        $sth = $dbh->prepare ($query) ;
-        $sth->execute () ;
-        $sth->finish () ;
-    }
-}
-
-sub update_db_version ( $ ) {
-    my $v = shift or die "Not enough arguments" ;
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-
-    debug "Updating $tablename table." ;
-    $query = "UPDATE $tablename SET value = '$v' WHERE key = 'db-version'" ;
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    $sth->finish () ;
-}
-
-sub get_db_version () {
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-
-    $query = "SELECT value FROM $tablename WHERE key = 'db-version'" ;
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    my $version = $array [0] ;
-
-    return $version ;
-}
-
-sub drop_table_if_exists ( $ ) {
-    my $tname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$tname' AND relkind='r'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-        # debug "Dropping table $tname" ;
-        $query = "DROP TABLE $tname" ;
-        # debug $query ;
-        $sth = $dbh->prepare ($query) ;
-        $sth->execute () ;
-        $sth->finish () ;
-    }
-}
-
-sub drop_sequence_if_exists ( $ ) {
-    my $sname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$sname' AND relkind='S'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-        # debug "Dropping sequence $sname" ;
-        $query = "DROP SEQUENCE $sname" ;
-        # debug $query ;
-        $sth = $dbh->prepare ($query) ;
-        $sth->execute () ;
-        $sth->finish () ;
-    }
-}
-
-sub drop_index_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='i'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-        # debug "Dropping index $iname" ;
-        $query = "DROP INDEX $iname" ;
-        # debug $query ;
-        $sth = $dbh->prepare ($query) ;
-        $sth->execute () ;
-        $sth->finish () ;
-    }
-}
-
-sub drop_view_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='v'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-        # debug "Dropping view $iname" ;
-        $query = "DROP VIEW $iname" ;
-        # debug $query ;
-        $sth = $dbh->prepare ($query) ;
-        $sth->execute () ;
-        $sth->finish () ;
-    }
-}
-
-sub bump_sequence_to ( $$ ) {
-    my ($sth, @array, $seqname, $targetvalue) ;
-
-    $seqname = shift ;
-    $targetvalue = shift ;
-
-    do {
-        $query = "select nextval ('$seqname')" ;
-        $sth = $dbh->prepare ($query) ;
-        $sth->execute () ;
-        @array = $sth->fetchrow_array () ;
-        $sth->finish () ;
-    } until $array[0] >= $targetvalue ;
-}
diff --git a/src/plugins/headermenu/bin/db-delete.pl b/src/plugins/headermenu/bin/db-delete.pl
deleted file mode 100755
index 45025c7..0000000
--- a/src/plugins/headermenu/bin/db-delete.pl
+++ /dev/null
@@ -1,188 +0,0 @@
-#!/usr/bin/perl -w
-#
-# $Id: db-delete.pl,v 1.1.1.1 2005/09/22 17:32:56 rhertzog Exp $
-#
-# Debian-specific script to delete plugin-specific tables
-# Roland Mas <lolando at debian.org>
-
-use strict ;
-use diagnostics ;
-
-use DBI ;
-use MIME::Base64 ;
-
-use vars qw/$dbh @reqlist $query/ ;
-use vars qw/$sys_default_domain $sys_cvs_host
-    $sys_shell_host $sys_users_host $sys_docs_host $sys_lists_host
-    $sys_dns1_host $sys_dns2_host $FTPINCOMING_DIR $FTPFILES_DIR
-    $sys_urlroot $sf_cache_dir $sys_name $sys_themeroot
-    $sys_news_group $sys_dbhost $sys_dbname $sys_dbuser $sys_dbpasswd
-    $sys_ldap_base_dn $sys_ldap_host $admin_login $admin_password
-    $domain_name
-    $skill_list/ ;
-use vars qw/$pluginname/ ;
-
-sub is_lesser ( $$ ) ;
-sub is_greater ( $$ ) ;
-sub debug ( $ ) ;
-sub parse_sql_file ( $ ) ;
-
-require ("/usr/share/gforge/lib/include.pl") ; # Include a few predefined functions 
-require ("/usr/share/gforge/lib/sqlparser.pm") ; # Our magic SQL parser
-
-debug "You'll see some debugging info during this installation." ;
-debug "Do not worry unless told otherwise." ;
-
-&db_connect ;
-
-# debug "Connected to the database OK." ;
-
-$pluginname = "headermenu" ;
-
-$dbh->{AutoCommit} = 0;
-$dbh->{RaiseError} = 1;
-eval {
-    my ($sth, @array, $version, $action, $path, $target, $rname) ;
-
-    my $pattern = "plugin_" . $pluginname . '_%' ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='v'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_view_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='r'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_table_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='i'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_index_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='s'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_sequence_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $dbh->commit ();
-
-
-    debug "It seems your database deletion went well and smoothly.  That's cool." ;
-    debug "Please enjoy using Debian GForge." ;
-
-    # There should be a commit at the end of every block above.
-    # If there is not, then it might be symptomatic of a problem.
-    # For safety, we roll back.
-    $dbh->rollback ();
-};
-
-if ($@) {
-    warn "Transaction aborted because $@" ;
-    debug "Transaction aborted because $@" ;
-    debug "Last SQL query was:\n$query\n(end of query)" ;
-    $dbh->rollback ;
-    debug "Please report this bug on the Debian bug-tracking system." ;
-    debug "Please include the previous messages as well to help debugging." ;
-    debug "You should not worry too much about this," ;
-    debug "your DB is still in a consistent state and should be usable." ;
-    exit 1 ;
-}
-
-$dbh->rollback ;
-$dbh->disconnect ;
-
-sub debug ( $ ) {
-    my $v = shift ;
-    chomp $v ;
-    print STDERR "$v\n" ;
-}
-
-sub drop_table_if_exists ( $ ) {
-    my $tname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$tname' AND relkind='r'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping table $tname" ;
-	$query = "DROP TABLE $tname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_sequence_if_exists ( $ ) {
-    my $sname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$sname' AND relkind='S'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping sequence $sname" ;
-	$query = "DROP SEQUENCE $sname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_index_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='i'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping index $iname" ;
-	$query = "DROP INDEX $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_view_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='v'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping view $iname" ;
-	$query = "DROP VIEW $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
diff --git a/src/plugins/headermenu/bin/db-upgrade.pl b/src/plugins/headermenu/bin/db-upgrade.pl
deleted file mode 100755
index 0d1fb3f..0000000
--- a/src/plugins/headermenu/bin/db-upgrade.pl
+++ /dev/null
@@ -1,282 +0,0 @@
-#!/usr/bin/perl -w
-#
-# $Id: db-upgrade.pl,v 1.1.1.1 2005/09/22 17:32:56 rhertzog Exp $
-#
-# Debian-specific script to upgrade the database between releases
-# Roland Mas <lolando at debian.org>
-#
-# Adapted by Raphael Hertzog <hertzog at debian.org> for extratabs
-
-use strict ;
-use diagnostics ;
-
-use DBI ;
-use MIME::Base64 ;
-
-use vars qw/$dbh @reqlist $query/ ;
-use vars qw/$sys_default_domain $sys_cvs_host
-    $sys_shell_host $sys_users_host $sys_docs_host $sys_lists_host
-    $sys_dns1_host $sys_dns2_host $FTPINCOMING_DIR $FTPFILES_DIR
-    $sys_urlroot $sf_cache_dir $sys_name $sys_themeroot
-    $sys_news_group $sys_dbhost $sys_dbname $sys_dbuser $sys_dbpasswd
-    $sys_ldap_base_dn $sys_ldap_host $admin_login $admin_password
-    $domain_name
-    $skill_list/ ;
-use vars qw/$pluginname/ ;
-
-sub is_lesser ( $$ ) ;
-sub is_greater ( $$ ) ;
-sub debug ( $ ) ;
-sub parse_sql_file ( $ ) ;
-
-require ("/usr/share/gforge/lib/include.pl") ; # Include a few predefined functions 
-require ("/usr/share/gforge/lib/sqlparser.pm") ; # Our magic SQL parser
-
-debug "You'll see some debugging info during this installation." ;
-debug "Do not worry unless told otherwise." ;
-
-&db_connect ;
-
-# debug "Connected to the database OK." ;
-
-$pluginname = "headermenu" ;
-
-$dbh->{AutoCommit} = 0;
-$dbh->{RaiseError} = 1;
-eval {
-    my ($sth, @array, $version, $path, $target) ;
-
-    &create_metadata_table ("0") ;
-    
-    $version = &get_db_version ;
-    $target = "0.1" ;
-    if (is_lesser $version, $target) {
-	my @filelist = ( "/usr/share/gforge/plugins/$pluginname/db/$pluginname-init.sql",
-			 "/usr/share/gforge/plugins/$pluginname/db/20120930-addoutermenusupport.sql",
-			 "/usr/share/gforge/plugins/$pluginname/db/20121231-reorderentry.sql",
-			 "/usr/share/gforge/plugins/$pluginname/db/20130120-addprojectcolumn.sql",
-	    ) ;
-	
-	foreach my $file (@filelist) {
-	    debug "Processing $file" ;
-	    @reqlist = @{ &parse_sql_file ($file) } ;
-	    
-	    foreach my $s (@reqlist) {
-		$query = $s ;
-		# debug $query ;
-		$sth = $dbh->prepare ($query) ;
-		$sth->execute () ;
-		$sth->finish () ;
-	    }
-	}
-	@reqlist = () ;
-	
-	&update_db_version ($target) ;
-	debug "Committing." ;
-	$dbh->commit () ;
-    }
-    
-    
-    debug "It seems your database install/upgrade went well and smoothly.  That's cool." ;
-    debug "Please enjoy using Debian GForge." ;
-
-    # There should be a commit at the end of every block above.
-    # If there is not, then it might be symptomatic of a problem.
-    # For safety, we roll back.
-    $dbh->rollback ();
-};
-
-if ($@) {
-    warn "Transaction aborted because $@" ;
-    debug "Transaction aborted because $@" ;
-    debug "Last SQL query was:\n$query\n(end of query)" ;
-    $dbh->rollback ;
-    debug "Please report this bug on the Debian bug-tracking system." ;
-    debug "Please include the previous messages as well to help debugging." ;
-    debug "You should not worry too much about this," ;
-    debug "your DB is still in a consistent state and should be usable." ;
-    exit 1 ;
-}
-
-$dbh->rollback ;
-$dbh->disconnect ;
-
-sub is_lesser ( $$ ) {
-    my $v1 = shift || 0 ;
-    my $v2 = shift || 0 ;
-
-    my $rc = system "dpkg --compare-versions $v1 lt $v2" ;
-
-    return (! $rc) ;
-}
-
-sub is_greater ( $$ ) {
-    my $v1 = shift || 0 ;
-    my $v2 = shift || 0 ;
-
-    my $rc = system "dpkg --compare-versions $v1 gt $v2" ;
-
-    return (! $rc) ;
-}
-
-sub debug ( $ ) {
-    my $v = shift ;
-    chomp $v ;
-    print STDERR "$v\n" ;
-}
-
-sub create_metadata_table ( $ ) {
-    my $v = shift || "0" ;
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-    # Do we have the metadata table?
-
-    $query = "SELECT count(*) FROM pg_class WHERE relname = '$tablename' and relkind = 'r'";
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    # Let's create this table if we have it not
-
-    if ($array [0] == 0) {
-	debug "Creating $tablename table." ;
-	$query = "CREATE TABLE $tablename (key varchar primary key, value text not null)" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-
-    $query = "SELECT count(*) FROM $tablename WHERE key = 'db-version'";
-    # debug $query ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    # Empty table?  We'll have to fill it up a bit
-
-    if ($array [0] == 0) {
-	debug "Inserting first data into $tablename table." ;
-	$query = "INSERT INTO $tablename (key, value) VALUES ('db-version', '$v')" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub update_db_version ( $ ) {
-    my $v = shift or die "Not enough arguments" ;
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-
-    debug "Updating $tablename table." ;
-    $query = "UPDATE $tablename SET value = '$v' WHERE key = 'db-version'" ;
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    $sth->finish () ;
-}
-
-sub get_db_version () {
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-
-    $query = "SELECT value FROM $tablename WHERE key = 'db-version'" ;
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    my $version = $array [0] ;
-
-    return $version ;
-}
-
-sub drop_table_if_exists ( $ ) {
-    my $tname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$tname' AND relkind='r'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping table $tname" ;
-	$query = "DROP TABLE $tname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_sequence_if_exists ( $ ) {
-    my $sname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$sname' AND relkind='S'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping sequence $sname" ;
-	$query = "DROP SEQUENCE $sname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_index_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='i'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping index $iname" ;
-	$query = "DROP INDEX $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_view_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='v'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping view $iname" ;
-	$query = "DROP VIEW $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub bump_sequence_to ( $$ ) {
-    my ($sth, @array, $seqname, $targetvalue) ;
-
-    $seqname = shift ;
-    $targetvalue = shift ;
-
-    do {
-	$query = "select nextval ('$seqname')" ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	@array = $sth->fetchrow_array () ;
-	$sth->finish () ;
-    } until $array[0] >= $targetvalue ;
-}
diff --git a/src/plugins/headermenu/packaging/install/plugin-headermenu b/src/plugins/headermenu/packaging/install/plugin-headermenu
index 5a54ffa..7b8a681 100644
--- a/src/plugins/headermenu/packaging/install/plugin-headermenu
+++ b/src/plugins/headermenu/packaging/install/plugin-headermenu
@@ -1,5 +1,4 @@
 plugins/headermenu/action/*	@PLUGIN_PATH@/headermenu/action/
-plugins/headermenu/bin/*	@PLUGIN_PATH@/headermenu/bin/
 plugins/headermenu/common/* @PLUGIN_PATH@/headermenu/common/
 plugins/headermenu/db/* @PLUGIN_PATH@/headermenu/db/
 plugins/headermenu/view/*	@PLUGIN_PATH@/headermenu/view/
diff --git a/src/plugins/helloworld/bin/db-delete.pl b/src/plugins/helloworld/bin/db-delete.pl
deleted file mode 100755
index 4215c54..0000000
--- a/src/plugins/helloworld/bin/db-delete.pl
+++ /dev/null
@@ -1,186 +0,0 @@
-#!/usr/bin/perl -w
-#
-# Debian-specific script to delete plugin-specific tables
-# Roland Mas <lolando at debian.org>
-
-use strict ;
-use diagnostics ;
-
-use DBI ;
-use MIME::Base64 ;
-
-use vars qw/$dbh @reqlist $query/ ;
-use vars qw/$sys_default_domain $sys_cvs_host
-    $sys_shell_host $sys_users_host $sys_docs_host $sys_lists_host
-    $sys_dns1_host $sys_dns2_host $FTPINCOMING_DIR $FTPFILES_DIR
-    $sys_urlroot $sf_cache_dir $sys_name $sys_themeroot
-    $sys_news_group $sys_dbhost $sys_dbname $sys_dbuser $sys_dbpasswd
-    $sys_ldap_base_dn $sys_ldap_host $admin_login $admin_password
-    $server_admin $domain_name
-    $skill_list/ ;
-use vars qw/$pluginname/ ;
-
-sub is_lesser ( $$ ) ;
-sub is_greater ( $$ ) ;
-sub debug ( $ ) ;
-sub parse_sql_file ( $ ) ;
-
-require ("/usr/share/gforge/lib/include.pl") ; # Include a few predefined functions 
-require ("/usr/share/gforge/lib/sqlparser.pm") ; # Our magic SQL parser
-
-debug "You'll see some debugging info during this installation." ;
-debug "Do not worry unless told otherwise." ;
-
-&db_connect ;
-
-# debug "Connected to the database OK." ;
-
-$pluginname = "helloworld" ;
-
-$dbh->{AutoCommit} = 0;
-$dbh->{RaiseError} = 1;
-eval {
-    my ($sth, @array, $version, $action, $path, $target, $rname) ;
-
-    my $pattern = "plugin_" . $pluginname . '_%' ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='v'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_view_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='r'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_table_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='i'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_index_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='s'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_sequence_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $dbh->commit ();
-
-
-    debug "It seems your database deletion went well and smoothly.  That's cool." ;
-    debug "Please enjoy using Debian FusionForge." ;
-
-    # There should be a commit at the end of every block above.
-    # If there is not, then it might be symptomatic of a problem.
-    # For safety, we roll back.
-    $dbh->rollback ();
-};
-
-if ($@) {
-    warn "Transaction aborted because $@" ;
-    debug "Transaction aborted because $@" ;
-    debug "Last SQL query was:\n$query\n(end of query)" ;
-    $dbh->rollback ;
-    debug "Please report this bug on the Debian bug-tracking system." ;
-    debug "Please include the previous messages as well to help debugging." ;
-    debug "You should not worry too much about this," ;
-    debug "your DB is still in a consistent state and should be usable." ;
-    exit 1 ;
-}
-
-$dbh->rollback ;
-$dbh->disconnect ;
-
-sub debug ( $ ) {
-    my $v = shift ;
-    chomp $v ;
-    print STDERR "$v\n" ;
-}
-
-sub drop_table_if_exists ( $ ) {
-    my $tname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$tname' AND relkind='r'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping table $tname" ;
-	$query = "DROP TABLE $tname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_sequence_if_exists ( $ ) {
-    my $sname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$sname' AND relkind='S'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping sequence $sname" ;
-	$query = "DROP SEQUENCE $sname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_index_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='i'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping index $iname" ;
-	$query = "DROP INDEX $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_view_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='v'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping view $iname" ;
-	$query = "DROP VIEW $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
diff --git a/src/plugins/helloworld/bin/db-upgrade.pl b/src/plugins/helloworld/bin/db-upgrade.pl
deleted file mode 100755
index 1a9c1e6..0000000
--- a/src/plugins/helloworld/bin/db-upgrade.pl
+++ /dev/null
@@ -1,300 +0,0 @@
-#!/usr/bin/perl -w
-#
-# Debian-specific script to upgrade the database between releases
-# Roland Mas <lolando at debian.org>
-
-use strict ;
-use diagnostics ;
-
-use DBI ;
-use MIME::Base64 ;
-
-use vars qw/$dbh @reqlist $query/ ;
-use vars qw/$sys_default_domain $sys_cvs_host
-    $sys_shell_host $sys_users_host $sys_docs_host $sys_lists_host
-    $sys_dns1_host $sys_dns2_host $FTPINCOMING_DIR $FTPFILES_DIR
-    $sys_urlroot $sf_cache_dir $sys_name $sys_themeroot
-    $sys_news_group $sys_dbhost $sys_dbname $sys_dbuser $sys_dbpasswd
-    $sys_ldap_base_dn $sys_ldap_host $admin_login $admin_password
-    $server_admin $domain_name
-    $skill_list/ ;
-use vars qw/$pluginname/ ;
-
-sub is_lesser ( $$ ) ;
-sub is_greater ( $$ ) ;
-sub debug ( $ ) ;
-sub parse_sql_file ( $ ) ;
-
-require ("/usr/share/gforge/lib/include.pl") ; # Include a few predefined functions 
-require ("/usr/share/gforge/lib/sqlparser.pm") ; # Our magic SQL parser
-
-debug "You'll see some debugging info during this installation." ;
-debug "Do not worry unless told otherwise." ;
-
-&db_connect ;
-
-# debug "Connected to the database OK." ;
-
-$pluginname = "helloworld" ;
-
-$dbh->{AutoCommit} = 0;
-$dbh->{RaiseError} = 1;
-eval {
-    my ($sth, @array, $version, $path, $target) ;
-
-    &create_metadata_table ("0") ;
-    
-    $version = &get_db_version ;
-    $target = "0.1" ;
-    if (is_lesser $version, $target) {
-	my @filelist = ( "/usr/share/gforge/plugins/$pluginname/db/$pluginname-init.sql" ) ;
-	
-	foreach my $file (@filelist) {
-	    debug "Processing $file" ;
-	    @reqlist = @{ &parse_sql_file ($file) } ;
-	    
-	    foreach my $s (@reqlist) {
-		$query = $s ;
-		# debug $query ;
-		$sth = $dbh->prepare ($query) ;
-		$sth->execute () ;
-		$sth->finish () ;
-	    }
-	}
-	@reqlist = () ;
-	
-	&update_db_version ($target) ;
-	debug "Committing." ;
-	$dbh->commit () ;
-    }
-    
-#    $version = &get_db_version ;
-#    $target = "0.2" ;
-#    if (is_lesser $version, $target) {
-#	debug "Adding local data." ;
-#	
-#	do "/etc/gforge/local.pl" or die "Cannot read /etc/gforge/local.pl" ;
-#	
-#	my $ip_address = qx/host $domain_name | awk '{print \}'/ ;
-#	
-#	@reqlist = (
-#		    "INSERT INTO plugin_".$pluginname."_sample_data (domain, ip_address) VALUES ('$domain_name', '$ip_address')",
-#		    ) ;
-#	
-#	foreach my $s (@reqlist) {
-#	    $query = $s ;
-#	    # debug $query ;
-#	    $sth = $dbh->prepare ($query) ;
-#	    $sth->execute () ;
-#	    $sth->finish () ;
-#	}
-#	@reqlist = () ;
-#	
-#	&update_db_version ($target) ;
-#	debug "Committing." ;
-#	$dbh->commit () ;
-#    }
-
-    debug "It seems your database install/upgrade went well and smoothly.  That's cool." ;
-    debug "Please enjoy using Debian FusionForge." ;
-
-    # There should be a commit at the end of every block above.
-    # If there is not, then it might be symptomatic of a problem.
-    # For safety, we roll back.
-    $dbh->rollback ();
-};
-
-if ($@) {
-    warn "Transaction aborted because $@" ;
-    debug "Transaction aborted because $@" ;
-    debug "Last SQL query was:\n$query\n(end of query)" ;
-    $dbh->rollback ;
-    debug "Please report this bug on the Debian bug-tracking system." ;
-    debug "Please include the previous messages as well to help debugging." ;
-    debug "You should not worry too much about this," ;
-    debug "your DB is still in a consistent state and should be usable." ;
-    exit 1 ;
-}
-
-$dbh->rollback ;
-$dbh->disconnect ;
-
-sub is_lesser ( $$ ) {
-    my $v1 = shift || 0 ;
-    my $v2 = shift || 0 ;
-
-    my $rc = system "dpkg --compare-versions $v1 lt $v2" ;
-
-    return (! $rc) ;
-}
-
-sub is_greater ( $$ ) {
-    my $v1 = shift || 0 ;
-    my $v2 = shift || 0 ;
-
-    my $rc = system "dpkg --compare-versions $v1 gt $v2" ;
-
-    return (! $rc) ;
-}
-
-sub debug ( $ ) {
-    my $v = shift ;
-    chomp $v ;
-    print STDERR "$v\n" ;
-}
-
-sub create_metadata_table ( $ ) {
-    my $v = shift || "0" ;
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-    # Do we have the metadata table?
-
-    $query = "SELECT count(*) FROM pg_class WHERE relname = '$tablename' and relkind = 'r'";
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    # Let's create this table if we have it not
-
-    if ($array [0] == 0) {
-	debug "Creating $tablename table." ;
-	$query = "CREATE TABLE $tablename (key varchar primary key, value text not null)" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-
-    $query = "SELECT count(*) FROM $tablename WHERE key = 'db-version'";
-    # debug $query ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    # Empty table?  We'll have to fill it up a bit
-
-    if ($array [0] == 0) {
-	debug "Inserting first data into $tablename table." ;
-	$query = "INSERT INTO $tablename (key, value) VALUES ('db-version', '$v')" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub update_db_version ( $ ) {
-    my $v = shift or die "Not enough arguments" ;
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-
-    debug "Updating $tablename table." ;
-    $query = "UPDATE $tablename SET value = '$v' WHERE key = 'db-version'" ;
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    $sth->finish () ;
-}
-
-sub get_db_version () {
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-
-    $query = "SELECT value FROM $tablename WHERE key = 'db-version'" ;
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    my $version = $array [0] ;
-
-    return $version ;
-}
-
-sub drop_table_if_exists ( $ ) {
-    my $tname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$tname' AND relkind='r'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping table $tname" ;
-	$query = "DROP TABLE $tname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_sequence_if_exists ( $ ) {
-    my $sname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$sname' AND relkind='S'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping sequence $sname" ;
-	$query = "DROP SEQUENCE $sname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_index_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='i'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping index $iname" ;
-	$query = "DROP INDEX $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_view_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='v'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping view $iname" ;
-	$query = "DROP VIEW $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub bump_sequence_to ( $$ ) {
-    my ($sth, @array, $seqname, $targetvalue) ;
-
-    $seqname = shift ;
-    $targetvalue = shift ;
-
-    do {
-	$query = "select nextval ('$seqname')" ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	@array = $sth->fetchrow_array () ;
-	$sth->finish () ;
-    } until $array[0] >= $targetvalue ;
-}
diff --git a/src/plugins/hudson/bin/db-delete.pl b/src/plugins/hudson/bin/db-delete.pl
deleted file mode 100755
index a2f50af..0000000
--- a/src/plugins/hudson/bin/db-delete.pl
+++ /dev/null
@@ -1,186 +0,0 @@
-#!/usr/bin/perl -w
-#
-# Debian-specific script to delete plugin-specific tables
-# Roland Mas <lolando at debian.org>
-
-use strict ;
-use diagnostics ;
-
-use DBI ;
-use MIME::Base64 ;
-
-use vars qw/$dbh @reqlist $query/ ;
-use vars qw/$sys_default_domain $sys_cvs_host
-    $sys_shell_host $sys_users_host $sys_docs_host $sys_lists_host
-    $sys_dns1_host $sys_dns2_host $FTPINCOMING_DIR $FTPFILES_DIR
-    $sys_urlroot $sf_cache_dir $sys_name $sys_themeroot
-    $sys_news_group $sys_dbhost $sys_dbname $sys_dbuser $sys_dbpasswd
-    $sys_ldap_base_dn $sys_ldap_host $admin_login $admin_password
-    $domain_name
-    $skill_list/ ;
-use vars qw/$pluginname/ ;
-
-sub is_lesser ( $$ ) ;
-sub is_greater ( $$ ) ;
-sub debug ( $ ) ;
-sub parse_sql_file ( $ ) ;
-
-require ("/usr/share/gforge/lib/include.pl") ; # Include a few predefined functions 
-require ("/usr/share/gforge/lib/sqlparser.pm") ; # Our magic SQL parser
-
-debug "You'll see some debugging info during this installation." ;
-debug "Do not worry unless told otherwise." ;
-
-&db_connect ;
-
-# debug "Connected to the database OK." ;
-
-$pluginname = "hudson" ;
-
-$dbh->{AutoCommit} = 0;
-$dbh->{RaiseError} = 1;
-eval {
-    my ($sth, @array, $version, $action, $path, $target, $rname) ;
-
-    my $pattern = "plugin_" . $pluginname . '_%' ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='v'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_view_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='r'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_table_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='i'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_index_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='s'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_sequence_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $dbh->commit ();
-
-
-    debug "It seems your database deletion went well and smoothly.  That's cool." ;
-    debug "Please enjoy using Debian FusionForge." ;
-
-    # There should be a commit at the end of every block above.
-    # If there is not, then it might be symptomatic of a problem.
-    # For safety, we roll back.
-    $dbh->rollback ();
-};
-
-if ($@) {
-    warn "Transaction aborted because $@" ;
-    debug "Transaction aborted because $@" ;
-    debug "Last SQL query was:\n$query\n(end of query)" ;
-    $dbh->rollback ;
-    debug "Please report this bug on the Debian bug-tracking system." ;
-    debug "Please include the previous messages as well to help debugging." ;
-    debug "You should not worry too much about this," ;
-    debug "your DB is still in a consistent state and should be usable." ;
-    exit 1 ;
-}
-
-$dbh->rollback ;
-$dbh->disconnect ;
-
-sub debug ( $ ) {
-    my $v = shift ;
-    chomp $v ;
-    print STDERR "$v\n" ;
-}
-
-sub drop_table_if_exists ( $ ) {
-    my $tname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$tname' AND relkind='r'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping table $tname" ;
-	$query = "DROP TABLE $tname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_sequence_if_exists ( $ ) {
-    my $sname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$sname' AND relkind='S'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping sequence $sname" ;
-	$query = "DROP SEQUENCE $sname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_index_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='i'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping index $iname" ;
-	$query = "DROP INDEX $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_view_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='v'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping view $iname" ;
-	$query = "DROP VIEW $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
diff --git a/src/plugins/hudson/bin/db-upgrade.pl b/src/plugins/hudson/bin/db-upgrade.pl
deleted file mode 100755
index 4461e6a..0000000
--- a/src/plugins/hudson/bin/db-upgrade.pl
+++ /dev/null
@@ -1,273 +0,0 @@
-#!/usr/bin/perl -w
-#
-# Debian-specific script to upgrade the database between releases
-# Roland Mas <lolando at debian.org>
-
-use strict ;
-use diagnostics ;
-
-use DBI ;
-use MIME::Base64 ;
-
-use vars qw/$dbh @reqlist $query/ ;
-use vars qw/$sys_default_domain $sys_cvs_host
-    $sys_shell_host $sys_users_host $sys_docs_host $sys_lists_host
-    $sys_dns1_host $sys_dns2_host $FTPINCOMING_DIR $FTPFILES_DIR
-    $sys_urlroot $sf_cache_dir $sys_name $sys_themeroot
-    $sys_news_group $sys_dbhost $sys_dbname $sys_dbuser $sys_dbpasswd
-    $sys_ldap_base_dn $sys_ldap_host $admin_login $admin_password
-    $domain_name
-    $skill_list/ ;
-use vars qw/$pluginname/ ;
-
-sub is_lesser ( $$ ) ;
-sub is_greater ( $$ ) ;
-sub debug ( $ ) ;
-sub parse_sql_file ( $ ) ;
-
-require ("/usr/share/gforge/lib/include.pl") ; # Include a few predefined functions 
-require ("/usr/share/gforge/lib/sqlparser.pm") ; # Our magic SQL parser
-
-debug "You'll see some debugging info during this installation." ;
-debug "Do not worry unless told otherwise." ;
-
-&db_connect ;
-
-# debug "Connected to the database OK." ;
-
-$pluginname = "hudson" ;
-
-$dbh->{AutoCommit} = 0;
-$dbh->{RaiseError} = 1;
-eval {
-    my ($sth, @array, $version, $path, $target) ;
-
-    &create_metadata_table ("0") ;
-    
-    $version = &get_db_version ;
-    $target = "0.1" ;
-    if (is_lesser $version, $target) {
-	my @filelist = ( "/usr/share/gforge/plugins/$pluginname/db/$pluginname-init.sql" ) ;
-	
-	foreach my $file (@filelist) {
-	    debug "Processing $file" ;
-	    @reqlist = @{ &parse_sql_file ($file) } ;
-	    
-	    foreach my $s (@reqlist) {
-		$query = $s ;
-		# debug $query ;
-		$sth = $dbh->prepare ($query) ;
-		$sth->execute () ;
-		$sth->finish () ;
-	    }
-	}
-	@reqlist = () ;
-	
-	&update_db_version ($target) ;
-	debug "Committing." ;
-	$dbh->commit () ;
-    }
-    
-    debug "It seems your database install/upgrade went well and smoothly.  That's cool." ;
-    debug "Please enjoy using Debian FusionForge." ;
-
-    # There should be a commit at the end of every block above.
-    # If there is not, then it might be symptomatic of a problem.
-    # For safety, we roll back.
-    $dbh->rollback ();
-};
-
-if ($@) {
-    warn "Transaction aborted because $@" ;
-    debug "Transaction aborted because $@" ;
-    debug "Last SQL query was:\n$query\n(end of query)" ;
-    $dbh->rollback ;
-    debug "Please report this bug on the Debian bug-tracking system." ;
-    debug "Please include the previous messages as well to help debugging." ;
-    debug "You should not worry too much about this," ;
-    debug "your DB is still in a consistent state and should be usable." ;
-    exit 1 ;
-}
-
-$dbh->rollback ;
-$dbh->disconnect ;
-
-sub is_lesser ( $$ ) {
-    my $v1 = shift || 0 ;
-    my $v2 = shift || 0 ;
-
-    my $rc = system "dpkg --compare-versions $v1 lt $v2" ;
-
-    return (! $rc) ;
-}
-
-sub is_greater ( $$ ) {
-    my $v1 = shift || 0 ;
-    my $v2 = shift || 0 ;
-
-    my $rc = system "dpkg --compare-versions $v1 gt $v2" ;
-
-    return (! $rc) ;
-}
-
-sub debug ( $ ) {
-    my $v = shift ;
-    chomp $v ;
-    print STDERR "$v\n" ;
-}
-
-sub create_metadata_table ( $ ) {
-    my $v = shift || "0" ;
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-    # Do we have the metadata table?
-
-    $query = "SELECT count(*) FROM pg_class WHERE relname = '$tablename' and relkind = 'r'";
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    # Let's create this table if we have it not
-
-    if ($array [0] == 0) {
-	debug "Creating $tablename table." ;
-	$query = "CREATE TABLE $tablename (key varchar primary key, value text not null)" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-
-    $query = "SELECT count(*) FROM $tablename WHERE key = 'db-version'";
-    # debug $query ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    # Empty table?  We'll have to fill it up a bit
-
-    if ($array [0] == 0) {
-	debug "Inserting first data into $tablename table." ;
-	$query = "INSERT INTO $tablename (key, value) VALUES ('db-version', '$v')" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub update_db_version ( $ ) {
-    my $v = shift or die "Not enough arguments" ;
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-
-    debug "Updating $tablename table." ;
-    $query = "UPDATE $tablename SET value = '$v' WHERE key = 'db-version'" ;
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    $sth->finish () ;
-}
-
-sub get_db_version () {
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-
-    $query = "SELECT value FROM $tablename WHERE key = 'db-version'" ;
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    my $version = $array [0] ;
-
-    return $version ;
-}
-
-sub drop_table_if_exists ( $ ) {
-    my $tname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$tname' AND relkind='r'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping table $tname" ;
-	$query = "DROP TABLE $tname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_sequence_if_exists ( $ ) {
-    my $sname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$sname' AND relkind='S'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping sequence $sname" ;
-	$query = "DROP SEQUENCE $sname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_index_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='i'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping index $iname" ;
-	$query = "DROP INDEX $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_view_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='v'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping view $iname" ;
-	$query = "DROP VIEW $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub bump_sequence_to ( $$ ) {
-    my ($sth, @array, $seqname, $targetvalue) ;
-
-    $seqname = shift ;
-    $targetvalue = shift ;
-
-    do {
-	$query = "select nextval ('$seqname')" ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	@array = $sth->fetchrow_array () ;
-	$sth->finish () ;
-    } until $array[0] >= $targetvalue ;
-}
diff --git a/src/plugins/hudson/packaging/control/222plugin-hudson b/src/plugins/hudson/packaging/control/222plugin-hudson
index 94d9185..5d84861 100644
--- a/src/plugins/hudson/packaging/control/222plugin-hudson
+++ b/src/plugins/hudson/packaging/control/222plugin-hudson
@@ -1,4 +1,4 @@
 Package: @PACKAGE at -plugin-hudson
 Architecture: all
-Depends: @OLDPACKAGE at -common, @OLDPACKAGE at -db-postgresql | @OLDPACKAGE at -db, @OLDPACKAGE at -web-apache2 | @OLDPACKAGE at -web, @OLDPACKAGE at -shell-postgresql | @OLDPACKAGE at -shell, php5-cli, ${misc:Depends}, libjs-scriptaculous
+Depends: @OLDPACKAGE at -common, @OLDPACKAGE at -db-postgresql | @OLDPACKAGE at -db, @OLDPACKAGE at -web-apache2 | @OLDPACKAGE at -web | @OLDPACKAGE at -shell, php5-cli, ${misc:Depends}
 Description: collaborative development tool - Hudson plugin
diff --git a/src/plugins/hudson/packaging/install/plugin-hudson b/src/plugins/hudson/packaging/install/plugin-hudson
index 476c595..ef2508b 100644
--- a/src/plugins/hudson/packaging/install/plugin-hudson
+++ b/src/plugins/hudson/packaging/install/plugin-hudson
@@ -1,7 +1,6 @@
 plugins/hudson/common/*                  @PLUGIN_PATH@/hudson/common/
 plugins/hudson/include/*                 @PLUGIN_PATH@/hudson/include/
 plugins/hudson/db/*                      @PLUGIN_PATH@/hudson/db/
-plugins/hudson/bin/*                     @PLUGIN_PATH@/hudson/bin/
 plugins/hudson/www/*                     @PLUGIN_PATH@/hudson/www/
 plugins/hudson/cronjobs/*                usr/share/gforge/cronjobs
 plugins/hudson/etc/plugins/hudson/*      etc/gforge/plugins/hudson/
diff --git a/src/plugins/mailman/bin/db-delete.pl b/src/plugins/mailman/bin/db-delete.pl
deleted file mode 100755
index d324b08..0000000
--- a/src/plugins/mailman/bin/db-delete.pl
+++ /dev/null
@@ -1,186 +0,0 @@
-#!/usr/bin/perl -w
-#
-# Debian-specific script to delete plugin-specific tables
-# Roland Mas <lolando at debian.org>
-
-use strict ;
-use diagnostics ;
-
-use DBI ;
-use MIME::Base64 ;
-
-use vars qw/$dbh @reqlist $query/ ;
-use vars qw/$sys_default_domain $sys_cvs_host
-    $sys_shell_host $sys_users_host $sys_docs_host $sys_lists_host
-    $sys_dns1_host $sys_dns2_host $FTPINCOMING_DIR $FTPFILES_DIR
-    $sys_urlroot $sf_cache_dir $sys_name $sys_themeroot
-    $sys_news_group $sys_dbhost $sys_dbname $sys_dbuser $sys_dbpasswd
-    $sys_ldap_base_dn $sys_ldap_host $admin_login $admin_password
-    $domain_name
-    $skill_list/ ;
-use vars qw/$pluginname/ ;
-
-sub is_lesser ( $$ ) ;
-sub is_greater ( $$ ) ;
-sub debug ( $ ) ;
-sub parse_sql_file ( $ ) ;
-
-require ("/usr/share/gforge/lib/include.pl") ; # Include a few predefined functions 
-require ("/usr/share/gforge/lib/sqlparser.pm") ; # Our magic SQL parser
-
-debug "You'll see some debugging info during this installation." ;
-debug "Do not worry unless told otherwise." ;
-
-&db_connect ;
-
-# debug "Connected to the database OK." ;
-
-$pluginname = "mailman" ;
-
-$dbh->{AutoCommit} = 0;
-$dbh->{RaiseError} = 1;
-eval {
-    my ($sth, @array, $version, $action, $path, $target, $rname) ;
-
-    my $pattern = "plugin_" . $pluginname . '_%' ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='v'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_view_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='r'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_table_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='i'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_index_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='s'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_sequence_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $dbh->commit ();
-
-
-    debug "It seems your database deletion went well and smoothly.  That's cool." ;
-    debug "Please enjoy using Debian FusionForge." ;
-
-    # There should be a commit at the end of every block above.
-    # If there is not, then it might be symptomatic of a problem.
-    # For safety, we roll back.
-    $dbh->rollback ();
-};
-
-if ($@) {
-    warn "Transaction aborted because $@" ;
-    debug "Transaction aborted because $@" ;
-    debug "Last SQL query was:\n$query\n(end of query)" ;
-    $dbh->rollback ;
-    debug "Please report this bug on the Debian bug-tracking system." ;
-    debug "Please include the previous messages as well to help debugging." ;
-    debug "You should not worry too much about this," ;
-    debug "your DB is still in a consistent state and should be usable." ;
-    exit 1 ;
-}
-
-$dbh->rollback ;
-$dbh->disconnect ;
-
-sub debug ( $ ) {
-    my $v = shift ;
-    chomp $v ;
-    print STDERR "$v\n" ;
-}
-
-sub drop_table_if_exists ( $ ) {
-    my $tname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$tname' AND relkind='r'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping table $tname" ;
-	$query = "DROP TABLE $tname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_sequence_if_exists ( $ ) {
-    my $sname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$sname' AND relkind='S'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping sequence $sname" ;
-	$query = "DROP SEQUENCE $sname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_index_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='i'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping index $iname" ;
-	$query = "DROP INDEX $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_view_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='v'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping view $iname" ;
-	$query = "DROP VIEW $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
diff --git a/src/plugins/mailman/bin/db-upgrade.pl b/src/plugins/mailman/bin/db-upgrade.pl
deleted file mode 100755
index 5790ad1..0000000
--- a/src/plugins/mailman/bin/db-upgrade.pl
+++ /dev/null
@@ -1,273 +0,0 @@
-#!/usr/bin/perl -w
-#
-# Debian-specific script to upgrade the database between releases
-# Roland Mas <lolando at debian.org>
-
-use strict ;
-use diagnostics ;
-
-use DBI ;
-use MIME::Base64 ;
-
-use vars qw/$dbh @reqlist $query/ ;
-use vars qw/$sys_default_domain $sys_cvs_host
-    $sys_shell_host $sys_users_host $sys_docs_host $sys_lists_host
-    $sys_dns1_host $sys_dns2_host $FTPINCOMING_DIR $FTPFILES_DIR
-    $sys_urlroot $sf_cache_dir $sys_name $sys_themeroot
-    $sys_news_group $sys_dbhost $sys_dbname $sys_dbuser $sys_dbpasswd
-    $sys_ldap_base_dn $sys_ldap_host $admin_login $admin_password
-    $domain_name
-    $skill_list/ ;
-use vars qw/$pluginname/ ;
-
-sub is_lesser ( $$ ) ;
-sub is_greater ( $$ ) ;
-sub debug ( $ ) ;
-sub parse_sql_file ( $ ) ;
-
-require ("/usr/share/gforge/lib/include.pl") ; # Include a few predefined functions 
-require ("/usr/share/gforge/lib/sqlparser.pm") ; # Our magic SQL parser
-
-debug "You'll see some debugging info during this installation." ;
-debug "Do not worry unless told otherwise." ;
-
-&db_connect ;
-
-# debug "Connected to the database OK." ;
-
-$pluginname = "mailman" ;
-
-$dbh->{AutoCommit} = 0;
-$dbh->{RaiseError} = 1;
-eval {
-    my ($sth, @array, $version, $path, $target) ;
-
-    &create_metadata_table ("0") ;
-    
-    $version = &get_db_version ;
-    $target = "0.1" ;
-    if (is_lesser $version, $target) {
-	my @filelist = ( "/usr/share/gforge/plugins/$pluginname/db/$pluginname-init.sql" ) ;
-	
-	foreach my $file (@filelist) {
-	    debug "Processing $file" ;
-	    @reqlist = @{ &parse_sql_file ($file) } ;
-	    
-	    foreach my $s (@reqlist) {
-		$query = $s ;
-		# debug $query ;
-		$sth = $dbh->prepare ($query) ;
-		$sth->execute () ;
-		$sth->finish () ;
-	    }
-	}
-	@reqlist = () ;
-	
-	&update_db_version ($target) ;
-	debug "Committing." ;
-	$dbh->commit () ;
-    }
-    
-    debug "It seems your database install/upgrade went well and smoothly.  That's cool." ;
-    debug "Please enjoy using Debian FusionForge." ;
-
-    # There should be a commit at the end of every block above.
-    # If there is not, then it might be symptomatic of a problem.
-    # For safety, we roll back.
-    $dbh->rollback ();
-};
-
-if ($@) {
-    warn "Transaction aborted because $@" ;
-    debug "Transaction aborted because $@" ;
-    debug "Last SQL query was:\n$query\n(end of query)" ;
-    $dbh->rollback ;
-    debug "Please report this bug on the Debian bug-tracking system." ;
-    debug "Please include the previous messages as well to help debugging." ;
-    debug "You should not worry too much about this," ;
-    debug "your DB is still in a consistent state and should be usable." ;
-    exit 1 ;
-}
-
-$dbh->rollback ;
-$dbh->disconnect ;
-
-sub is_lesser ( $$ ) {
-    my $v1 = shift || 0 ;
-    my $v2 = shift || 0 ;
-
-    my $rc = system "dpkg --compare-versions $v1 lt $v2" ;
-
-    return (! $rc) ;
-}
-
-sub is_greater ( $$ ) {
-    my $v1 = shift || 0 ;
-    my $v2 = shift || 0 ;
-
-    my $rc = system "dpkg --compare-versions $v1 gt $v2" ;
-
-    return (! $rc) ;
-}
-
-sub debug ( $ ) {
-    my $v = shift ;
-    chomp $v ;
-    print STDERR "$v\n" ;
-}
-
-sub create_metadata_table ( $ ) {
-    my $v = shift || "0" ;
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-    # Do we have the metadata table?
-
-    $query = "SELECT count(*) FROM pg_class WHERE relname = '$tablename' and relkind = 'r'";
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    # Let's create this table if we have it not
-
-    if ($array [0] == 0) {
-	debug "Creating $tablename table." ;
-	$query = "CREATE TABLE $tablename (key varchar primary key, value text not null)" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-
-    $query = "SELECT count(*) FROM $tablename WHERE key = 'db-version'";
-    # debug $query ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    # Empty table?  We'll have to fill it up a bit
-
-    if ($array [0] == 0) {
-	debug "Inserting first data into $tablename table." ;
-	$query = "INSERT INTO $tablename (key, value) VALUES ('db-version', '$v')" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub update_db_version ( $ ) {
-    my $v = shift or die "Not enough arguments" ;
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-
-    debug "Updating $tablename table." ;
-    $query = "UPDATE $tablename SET value = '$v' WHERE key = 'db-version'" ;
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    $sth->finish () ;
-}
-
-sub get_db_version () {
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-
-    $query = "SELECT value FROM $tablename WHERE key = 'db-version'" ;
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    my $version = $array [0] ;
-
-    return $version ;
-}
-
-sub drop_table_if_exists ( $ ) {
-    my $tname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$tname' AND relkind='r'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping table $tname" ;
-	$query = "DROP TABLE $tname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_sequence_if_exists ( $ ) {
-    my $sname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$sname' AND relkind='S'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping sequence $sname" ;
-	$query = "DROP SEQUENCE $sname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_index_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='i'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping index $iname" ;
-	$query = "DROP INDEX $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_view_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='v'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping view $iname" ;
-	$query = "DROP VIEW $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub bump_sequence_to ( $$ ) {
-    my ($sth, @array, $seqname, $targetvalue) ;
-
-    $seqname = shift ;
-    $targetvalue = shift ;
-
-    do {
-	$query = "select nextval ('$seqname')" ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	@array = $sth->fetchrow_array () ;
-	$sth->finish () ;
-    } until $array[0] >= $targetvalue ;
-}
diff --git a/src/plugins/mantisbt/bin/db-delete.pl b/src/plugins/mantisbt/bin/db-delete.pl
deleted file mode 100755
index 00d3f5e..0000000
--- a/src/plugins/mantisbt/bin/db-delete.pl
+++ /dev/null
@@ -1,188 +0,0 @@
-#!/usr/bin/perl -w
-#
-# $Id: db-delete.pl,v 1.1.1.1 2005/09/22 17:32:56 rhertzog Exp $
-#
-# Debian-specific script to delete plugin-specific tables
-# Roland Mas <lolando at debian.org>
-
-use strict ;
-use diagnostics ;
-
-use DBI ;
-use MIME::Base64 ;
-
-use vars qw/$dbh @reqlist $query/ ;
-use vars qw/$sys_default_domain $sys_cvs_host
-    $sys_shell_host $sys_users_host $sys_docs_host $sys_lists_host
-    $sys_dns1_host $sys_dns2_host $FTPINCOMING_DIR $FTPFILES_DIR
-    $sys_urlroot $sf_cache_dir $sys_name $sys_themeroot
-    $sys_news_group $sys_dbhost $sys_dbname $sys_dbuser $sys_dbpasswd
-    $sys_ldap_base_dn $sys_ldap_host $admin_login $admin_password
-    $domain_name
-    $skill_list/ ;
-use vars qw/$pluginname/ ;
-
-sub is_lesser ( $$ ) ;
-sub is_greater ( $$ ) ;
-sub debug ( $ ) ;
-sub parse_sql_file ( $ ) ;
-
-require ("/usr/share/gforge/lib/include.pl") ; # Include a few predefined functions 
-require ("/usr/share/gforge/lib/sqlparser.pm") ; # Our magic SQL parser
-
-debug "You'll see some debugging info during this installation." ;
-debug "Do not worry unless told otherwise." ;
-
-&db_connect ;
-
-# debug "Connected to the database OK." ;
-
-$pluginname = "mantisbt" ;
-
-$dbh->{AutoCommit} = 0;
-$dbh->{RaiseError} = 1;
-eval {
-    my ($sth, @array, $version, $action, $path, $target, $rname) ;
-
-    my $pattern = "plugin_" . $pluginname . '_%' ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='v'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_view_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='r'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_table_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='i'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_index_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='s'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_sequence_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $dbh->commit ();
-
-
-    debug "It seems your database deletion went well and smoothly.  That's cool." ;
-    debug "Please enjoy using Debian GForge." ;
-
-    # There should be a commit at the end of every block above.
-    # If there is not, then it might be symptomatic of a problem.
-    # For safety, we roll back.
-    $dbh->rollback ();
-};
-
-if ($@) {
-    warn "Transaction aborted because $@" ;
-    debug "Transaction aborted because $@" ;
-    debug "Last SQL query was:\n$query\n(end of query)" ;
-    $dbh->rollback ;
-    debug "Please report this bug on the Debian bug-tracking system." ;
-    debug "Please include the previous messages as well to help debugging." ;
-    debug "You should not worry too much about this," ;
-    debug "your DB is still in a consistent state and should be usable." ;
-    exit 1 ;
-}
-
-$dbh->rollback ;
-$dbh->disconnect ;
-
-sub debug ( $ ) {
-    my $v = shift ;
-    chomp $v ;
-    print STDERR "$v\n" ;
-}
-
-sub drop_table_if_exists ( $ ) {
-    my $tname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$tname' AND relkind='r'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping table $tname" ;
-	$query = "DROP TABLE $tname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_sequence_if_exists ( $ ) {
-    my $sname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$sname' AND relkind='S'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping sequence $sname" ;
-	$query = "DROP SEQUENCE $sname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_index_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='i'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping index $iname" ;
-	$query = "DROP INDEX $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_view_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='v'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping view $iname" ;
-	$query = "DROP VIEW $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
diff --git a/src/plugins/mantisbt/bin/db-upgrade.pl b/src/plugins/mantisbt/bin/db-upgrade.pl
deleted file mode 100755
index e491f1a..0000000
--- a/src/plugins/mantisbt/bin/db-upgrade.pl
+++ /dev/null
@@ -1,275 +0,0 @@
-#!/usr/bin/perl -w
-#
-# $Id: db-upgrade.pl,v 1.1.1.1 2005/09/22 17:32:56 rhertzog Exp $
-#
-# Debian-specific script to upgrade the database between releases
-# Roland Mas <lolando at debian.org>
-
-use strict ;
-use diagnostics ;
-
-use DBI ;
-use MIME::Base64 ;
-
-use vars qw/$dbh @reqlist $query/ ;
-use vars qw/$sys_default_domain $sys_cvs_host
-    $sys_shell_host $sys_users_host $sys_docs_host $sys_lists_host
-    $sys_dns1_host $sys_dns2_host $FTPINCOMING_DIR $FTPFILES_DIR
-    $sys_urlroot $sf_cache_dir $sys_name $sys_themeroot
-    $sys_news_group $sys_dbhost $sys_dbname $sys_dbuser $sys_dbpasswd
-    $sys_ldap_base_dn $sys_ldap_host $admin_login $admin_password
-    $domain_name
-    $skill_list/ ;
-use vars qw/$pluginname/ ;
-
-sub is_lesser ( $$ ) ;
-sub is_greater ( $$ ) ;
-sub debug ( $ ) ;
-sub parse_sql_file ( $ ) ;
-
-require ("/usr/share/gforge/lib/include.pl") ; # Include a few predefined functions 
-require ("/usr/share/gforge/lib/sqlparser.pm") ; # Our magic SQL parser
-
-debug "You'll see some debugging info during this installation." ;
-debug "Do not worry unless told otherwise." ;
-
-&db_connect ;
-
-# debug "Connected to the database OK." ;
-
-$pluginname = "mantisbt" ;
-
-$dbh->{AutoCommit} = 0;
-$dbh->{RaiseError} = 1;
-eval {
-    my ($sth, @array, $version, $path, $target) ;
-
-    &create_metadata_table ("0") ;
-    
-    $version = &get_db_version ;
-    $target = "0.1" ;
-    if (is_lesser $version, $target) {
-	my @filelist = ( "/usr/share/gforge/plugins/$pluginname/db/$pluginname-init.sql" ) ;
-	
-	foreach my $file (@filelist) {
-	    debug "Processing $file" ;
-	    @reqlist = @{ &parse_sql_file ($file) } ;
-	    
-	    foreach my $s (@reqlist) {
-		$query = $s ;
-		# debug $query ;
-		$sth = $dbh->prepare ($query) ;
-		$sth->execute () ;
-		$sth->finish () ;
-	    }
-	}
-	@reqlist = () ;
-	
-	&update_db_version ($target) ;
-	debug "Committing." ;
-	$dbh->commit () ;
-    }
-    
-    debug "It seems your database install/upgrade went well and smoothly.  That's cool." ;
-    debug "Please enjoy using Debian GForge." ;
-
-    # There should be a commit at the end of every block above.
-    # If there is not, then it might be symptomatic of a problem.
-    # For safety, we roll back.
-    $dbh->rollback ();
-};
-
-if ($@) {
-    warn "Transaction aborted because $@" ;
-    debug "Transaction aborted because $@" ;
-    debug "Last SQL query was:\n$query\n(end of query)" ;
-    $dbh->rollback ;
-    debug "Please report this bug on the Debian bug-tracking system." ;
-    debug "Please include the previous messages as well to help debugging." ;
-    debug "You should not worry too much about this," ;
-    debug "your DB is still in a consistent state and should be usable." ;
-    exit 1 ;
-}
-
-$dbh->rollback ;
-$dbh->disconnect ;
-
-sub is_lesser ( $$ ) {
-    my $v1 = shift || 0 ;
-    my $v2 = shift || 0 ;
-
-    my $rc = system "dpkg --compare-versions $v1 lt $v2" ;
-
-    return (! $rc) ;
-}
-
-sub is_greater ( $$ ) {
-    my $v1 = shift || 0 ;
-    my $v2 = shift || 0 ;
-
-    my $rc = system "dpkg --compare-versions $v1 gt $v2" ;
-
-    return (! $rc) ;
-}
-
-sub debug ( $ ) {
-    my $v = shift ;
-    chomp $v ;
-    print STDERR "$v\n" ;
-}
-
-sub create_metadata_table ( $ ) {
-    my $v = shift || "0" ;
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-    # Do we have the metadata table?
-
-    $query = "SELECT count(*) FROM pg_class WHERE relname = '$tablename' and relkind = 'r'";
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    # Let's create this table if we have it not
-
-    if ($array [0] == 0) {
-	debug "Creating $tablename table." ;
-	$query = "CREATE TABLE $tablename (key varchar primary key, value text not null)" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-
-    $query = "SELECT count(*) FROM $tablename WHERE key = 'db-version'";
-    # debug $query ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    # Empty table?  We'll have to fill it up a bit
-
-    if ($array [0] == 0) {
-	debug "Inserting first data into $tablename table." ;
-	$query = "INSERT INTO $tablename (key, value) VALUES ('db-version', '$v')" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub update_db_version ( $ ) {
-    my $v = shift or die "Not enough arguments" ;
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-
-    debug "Updating $tablename table." ;
-    $query = "UPDATE $tablename SET value = '$v' WHERE key = 'db-version'" ;
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    $sth->finish () ;
-}
-
-sub get_db_version () {
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-
-    $query = "SELECT value FROM $tablename WHERE key = 'db-version'" ;
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    my $version = $array [0] ;
-
-    return $version ;
-}
-
-sub drop_table_if_exists ( $ ) {
-    my $tname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$tname' AND relkind='r'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping table $tname" ;
-	$query = "DROP TABLE $tname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_sequence_if_exists ( $ ) {
-    my $sname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$sname' AND relkind='S'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping sequence $sname" ;
-	$query = "DROP SEQUENCE $sname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_index_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='i'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping index $iname" ;
-	$query = "DROP INDEX $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_view_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='v'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping view $iname" ;
-	$query = "DROP VIEW $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub bump_sequence_to ( $$ ) {
-    my ($sth, @array, $seqname, $targetvalue) ;
-
-    $seqname = shift ;
-    $targetvalue = shift ;
-
-    do {
-	$query = "select nextval ('$seqname')" ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	@array = $sth->fetchrow_array () ;
-	$sth->finish () ;
-    } until $array[0] >= $targetvalue ;
-}
diff --git a/src/plugins/mantisbt/packaging/install/plugin-mantisbt b/src/plugins/mantisbt/packaging/install/plugin-mantisbt
index cf31ab8..9cb6f96 100644
--- a/src/plugins/mantisbt/packaging/install/plugin-mantisbt
+++ b/src/plugins/mantisbt/packaging/install/plugin-mantisbt
@@ -1,4 +1,3 @@
-plugins/mantisbt/bin		@PLUGIN_PATH@/mantisbt/
 plugins/mantisbt/action		@PLUGIN_PATH@/mantisbt/
 plugins/mantisbt/common		@PLUGIN_PATH@/mantisbt/
 plugins/mantisbt/controler	@PLUGIN_PATH@/mantisbt/
diff --git a/src/plugins/mediawiki/bin/db-delete.pl b/src/plugins/mediawiki/bin/db-delete.pl
deleted file mode 100755
index dea17ad..0000000
--- a/src/plugins/mediawiki/bin/db-delete.pl
+++ /dev/null
@@ -1,188 +0,0 @@
-#!/usr/bin/perl -w
-#
-# $Id: db-delete.pl,v 1.1.1.1 2005/09/22 17:32:56 rhertzog Exp $
-#
-# Debian-specific script to delete plugin-specific tables
-# Roland Mas <lolando at debian.org>
-
-use strict ;
-use diagnostics ;
-
-use DBI ;
-use MIME::Base64 ;
-
-use vars qw/$dbh @reqlist $query/ ;
-use vars qw/$sys_default_domain $sys_cvs_host
-    $sys_shell_host $sys_users_host $sys_docs_host $sys_lists_host
-    $sys_dns1_host $sys_dns2_host $FTPINCOMING_DIR $FTPFILES_DIR
-    $sys_urlroot $sf_cache_dir $sys_name $sys_themeroot
-    $sys_news_group $sys_dbhost $sys_dbname $sys_dbuser $sys_dbpasswd
-    $sys_ldap_base_dn $sys_ldap_host $admin_login $admin_password
-    $domain_name
-    $skill_list/ ;
-use vars qw/$pluginname/ ;
-
-sub is_lesser ( $$ ) ;
-sub is_greater ( $$ ) ;
-sub debug ( $ ) ;
-sub parse_sql_file ( $ ) ;
-
-require ("/usr/share/gforge/lib/include.pl") ; # Include a few predefined functions 
-require ("/usr/share/gforge/lib/sqlparser.pm") ; # Our magic SQL parser
-
-debug "You'll see some debugging info during this installation." ;
-debug "Do not worry unless told otherwise." ;
-
-&db_connect ;
-
-# debug "Connected to the database OK." ;
-
-$pluginname = "mediawiki" ;
-
-$dbh->{AutoCommit} = 0;
-$dbh->{RaiseError} = 1;
-eval {
-    my ($sth, @array, $version, $action, $path, $target, $rname) ;
-
-    my $pattern = "plugin_" . $pluginname . '_%' ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='v'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_view_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='r'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_table_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='i'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_index_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='S'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_sequence_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $dbh->commit ();
-
-
-    debug "It seems your database deletion went well and smoothly.  That's cool." ;
-    debug "Please enjoy using Debian GForge." ;
-
-    # There should be a commit at the end of every block above.
-    # If there is not, then it might be symptomatic of a problem.
-    # For safety, we roll back.
-    $dbh->rollback ();
-};
-
-if ($@) {
-    warn "Transaction aborted because $@" ;
-    debug "Transaction aborted because $@" ;
-    debug "Last SQL query was:\n$query\n(end of query)" ;
-    $dbh->rollback ;
-    debug "Please report this bug on the Debian bug-tracking system." ;
-    debug "Please include the previous messages as well to help debugging." ;
-    debug "You should not worry too much about this," ;
-    debug "your DB is still in a consistent state and should be usable." ;
-    exit 1 ;
-}
-
-$dbh->rollback ;
-$dbh->disconnect ;
-
-sub debug ( $ ) {
-    my $v = shift ;
-    chomp $v ;
-    print STDERR "$v\n" ;
-}
-
-sub drop_table_if_exists ( $ ) {
-    my $tname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$tname' AND relkind='r'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping table $tname" ;
-	$query = "DROP TABLE $tname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_sequence_if_exists ( $ ) {
-    my $sname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$sname' AND relkind='S'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping sequence $sname" ;
-	$query = "DROP SEQUENCE $sname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_index_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='i'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping index $iname" ;
-	$query = "DROP INDEX $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_view_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='v'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping view $iname" ;
-	$query = "DROP VIEW $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
diff --git a/src/plugins/mediawiki/bin/db-upgrade.pl b/src/plugins/mediawiki/bin/db-upgrade.pl
deleted file mode 100755
index adb2ec8..0000000
--- a/src/plugins/mediawiki/bin/db-upgrade.pl
+++ /dev/null
@@ -1,275 +0,0 @@
-#!/usr/bin/perl -w
-#
-# $Id: db-upgrade.pl,v 1.1.1.1 2005/09/22 17:32:56 rhertzog Exp $
-#
-# Debian-specific script to upgrade the database between releases
-# Roland Mas <lolando at debian.org>
-
-use strict ;
-use diagnostics ;
-
-use DBI ;
-use MIME::Base64 ;
-
-use vars qw/$dbh @reqlist $query/ ;
-use vars qw/$sys_default_domain $sys_cvs_host
-    $sys_shell_host $sys_users_host $sys_docs_host $sys_lists_host
-    $sys_dns1_host $sys_dns2_host $FTPINCOMING_DIR $FTPFILES_DIR
-    $sys_urlroot $sf_cache_dir $sys_name $sys_themeroot
-    $sys_news_group $sys_dbhost $sys_dbname $sys_dbuser $sys_dbpasswd
-    $sys_ldap_base_dn $sys_ldap_host $admin_login $admin_password
-    $domain_name
-    $skill_list/ ;
-use vars qw/$pluginname/ ;
-
-sub is_lesser ( $$ ) ;
-sub is_greater ( $$ ) ;
-sub debug ( $ ) ;
-sub parse_sql_file ( $ ) ;
-
-require ("/usr/share/gforge/lib/include.pl") ; # Include a few predefined functions 
-require ("/usr/share/gforge/lib/sqlparser.pm") ; # Our magic SQL parser
-
-debug "You'll see some debugging info during this installation." ;
-debug "Do not worry unless told otherwise." ;
-
-&db_connect ;
-
-# debug "Connected to the database OK." ;
-
-$pluginname = "mediawiki" ;
-
-$dbh->{AutoCommit} = 0;
-$dbh->{RaiseError} = 1;
-eval {
-    my ($sth, @array, $version, $path, $target) ;
-
-    &create_metadata_table ("0") ;
-    
-    $version = &get_db_version ;
-    $target = "0.1" ;
-    if (is_lesser $version, $target) {
-	my @filelist = ( "/usr/share/gforge/plugins/$pluginname/lib/$pluginname-init.sql" ) ;
-	
-	foreach my $file (@filelist) {
-	    debug "Processing $file" ;
-	    @reqlist = @{ &parse_sql_file ($file) } ;
-	    
-	    foreach my $s (@reqlist) {
-		$query = $s ;
-		# debug $query ;
-		$sth = $dbh->prepare ($query) ;
-		$sth->execute () ;
-		$sth->finish () ;
-	    }
-	}
-	@reqlist = () ;
-	
-	&update_db_version ($target) ;
-	debug "Committing." ;
-	$dbh->commit () ;
-    }
-    
-    debug "It seems your database install/upgrade went well and smoothly.  That's cool." ;
-    debug "Please enjoy using Debian GForge." ;
-
-    # There should be a commit at the end of every block above.
-    # If there is not, then it might be symptomatic of a problem.
-    # For safety, we roll back.
-    $dbh->rollback ();
-};
-
-if ($@) {
-    warn "Transaction aborted because $@" ;
-    debug "Transaction aborted because $@" ;
-    debug "Last SQL query was:\n$query\n(end of query)" ;
-    $dbh->rollback ;
-    debug "Please report this bug on the Debian bug-tracking system." ;
-    debug "Please include the previous messages as well to help debugging." ;
-    debug "You should not worry too much about this," ;
-    debug "your DB is still in a consistent state and should be usable." ;
-    exit 1 ;
-}
-
-$dbh->rollback ;
-$dbh->disconnect ;
-
-sub is_lesser ( $$ ) {
-    my $v1 = shift || 0 ;
-    my $v2 = shift || 0 ;
-
-    my $rc = system "dpkg --compare-versions $v1 lt $v2" ;
-
-    return (! $rc) ;
-}
-
-sub is_greater ( $$ ) {
-    my $v1 = shift || 0 ;
-    my $v2 = shift || 0 ;
-
-    my $rc = system "dpkg --compare-versions $v1 gt $v2" ;
-
-    return (! $rc) ;
-}
-
-sub debug ( $ ) {
-    my $v = shift ;
-    chomp $v ;
-    print STDERR "$v\n" ;
-}
-
-sub create_metadata_table ( $ ) {
-    my $v = shift || "0" ;
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-    # Do we have the metadata table?
-
-    $query = "SELECT count(*) FROM pg_class WHERE relname = '$tablename' and relkind = 'r'";
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    # Let's create this table if we have it not
-
-    if ($array [0] == 0) {
-	debug "Creating $tablename table." ;
-	$query = "CREATE TABLE $tablename (key varchar primary key, value text not null)" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-
-    $query = "SELECT count(*) FROM $tablename WHERE key = 'db-version'";
-    # debug $query ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    # Empty table?  We'll have to fill it up a bit
-
-    if ($array [0] == 0) {
-	debug "Inserting first data into $tablename table." ;
-	$query = "INSERT INTO $tablename (key, value) VALUES ('db-version', '$v')" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub update_db_version ( $ ) {
-    my $v = shift or die "Not enough arguments" ;
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-
-    debug "Updating $tablename table." ;
-    $query = "UPDATE $tablename SET value = '$v' WHERE key = 'db-version'" ;
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    $sth->finish () ;
-}
-
-sub get_db_version () {
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-
-    $query = "SELECT value FROM $tablename WHERE key = 'db-version'" ;
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    my $version = $array [0] ;
-
-    return $version ;
-}
-
-sub drop_table_if_exists ( $ ) {
-    my $tname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$tname' AND relkind='r'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping table $tname" ;
-	$query = "DROP TABLE $tname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_sequence_if_exists ( $ ) {
-    my $sname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$sname' AND relkind='S'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping sequence $sname" ;
-	$query = "DROP SEQUENCE $sname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_index_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='i'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping index $iname" ;
-	$query = "DROP INDEX $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_view_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='v'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping view $iname" ;
-	$query = "DROP VIEW $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub bump_sequence_to ( $$ ) {
-    my ($sth, @array, $seqname, $targetvalue) ;
-
-    $seqname = shift ;
-    $targetvalue = shift ;
-
-    do {
-	$query = "select nextval ('$seqname')" ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	@array = $sth->fetchrow_array () ;
-	$sth->finish () ;
-    } until $array[0] >= $targetvalue ;
-}
diff --git a/src/plugins/oauthprovider/bin/db-delete.pl b/src/plugins/oauthprovider/bin/db-delete.pl
deleted file mode 100755
index d1d46e4..0000000
--- a/src/plugins/oauthprovider/bin/db-delete.pl
+++ /dev/null
@@ -1,186 +0,0 @@
-#!/usr/bin/perl -w
-#
-# Debian-specific script to delete plugin-specific tables
-# Roland Mas <lolando at debian.org>
-
-use strict ;
-use diagnostics ;
-
-use DBI ;
-use MIME::Base64 ;
-
-use vars qw/$dbh @reqlist $query/ ;
-use vars qw/$sys_default_domain $sys_cvs_host
-    $sys_shell_host $sys_users_host $sys_docs_host $sys_lists_host
-    $sys_dns1_host $sys_dns2_host $FTPINCOMING_DIR $FTPFILES_DIR
-    $sys_urlroot $sf_cache_dir $sys_name $sys_themeroot
-    $sys_news_group $sys_dbhost $sys_dbname $sys_dbuser $sys_dbpasswd
-    $sys_ldap_base_dn $sys_ldap_host $admin_login $admin_password
-    $domain_name
-    $skill_list/ ;
-use vars qw/$pluginname/ ;
-
-sub is_lesser ( $$ ) ;
-sub is_greater ( $$ ) ;
-sub debug ( $ ) ;
-sub parse_sql_file ( $ ) ;
-
-require ("/usr/share/gforge/lib/include.pl") ; # Include a few predefined functions 
-require ("/usr/share/gforge/lib/sqlparser.pm") ; # Our magic SQL parser
-
-debug "You'll see some debugging info during this installation." ;
-debug "Do not worry unless told otherwise." ;
-
-&db_connect ;
-
-# debug "Connected to the database OK." ;
-
-$pluginname = "oauthprovider" ;
-
-$dbh->{AutoCommit} = 0;
-$dbh->{RaiseError} = 1;
-eval {
-    my ($sth, @array, $version, $action, $path, $target, $rname) ;
-
-    my $pattern = "plugin_" . $pluginname . '_%' ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='v'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_view_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='r'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_table_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='i'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_index_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='s'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_sequence_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $dbh->commit ();
-
-
-    debug "It seems your database deletion went well and smoothly.  That's cool." ;
-    debug "Please enjoy using Debian FusionForge." ;
-
-    # There should be a commit at the end of every block above.
-    # If there is not, then it might be symptomatic of a problem.
-    # For safety, we roll back.
-    $dbh->rollback ();
-};
-
-if ($@) {
-    warn "Transaction aborted because $@" ;
-    debug "Transaction aborted because $@" ;
-    debug "Last SQL query was:\n$query\n(end of query)" ;
-    $dbh->rollback ;
-    debug "Please report this bug on the Debian bug-tracking system." ;
-    debug "Please include the previous messages as well to help debugging." ;
-    debug "You should not worry too much about this," ;
-    debug "your DB is still in a consistent state and should be usable." ;
-    exit 1 ;
-}
-
-$dbh->rollback ;
-$dbh->disconnect ;
-
-sub debug ( $ ) {
-    my $v = shift ;
-    chomp $v ;
-    print STDERR "$v\n" ;
-}
-
-sub drop_table_if_exists ( $ ) {
-    my $tname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$tname' AND relkind='r'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping table $tname" ;
-	$query = "DROP TABLE $tname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_sequence_if_exists ( $ ) {
-    my $sname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$sname' AND relkind='S'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping sequence $sname" ;
-	$query = "DROP SEQUENCE $sname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_index_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='i'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping index $iname" ;
-	$query = "DROP INDEX $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_view_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='v'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping view $iname" ;
-	$query = "DROP VIEW $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
diff --git a/src/plugins/oauthprovider/bin/db-upgrade.pl b/src/plugins/oauthprovider/bin/db-upgrade.pl
deleted file mode 100755
index 5656da7..0000000
--- a/src/plugins/oauthprovider/bin/db-upgrade.pl
+++ /dev/null
@@ -1,300 +0,0 @@
-#!/usr/bin/perl -w
-#
-# Debian-specific script to upgrade the database between releases
-# Roland Mas <lolando at debian.org>
-
-use strict ;
-use diagnostics ;
-
-use DBI ;
-use MIME::Base64 ;
-
-use vars qw/$dbh @reqlist $query/ ;
-use vars qw/$sys_default_domain $sys_cvs_host
-    $sys_shell_host $sys_users_host $sys_docs_host $sys_lists_host
-    $sys_dns1_host $sys_dns2_host $FTPINCOMING_DIR $FTPFILES_DIR
-    $sys_urlroot $sf_cache_dir $sys_name $sys_themeroot
-    $sys_news_group $sys_dbhost $sys_dbname $sys_dbuser $sys_dbpasswd
-    $sys_ldap_base_dn $sys_ldap_host $admin_login $admin_password
-    $domain_name
-    $skill_list/ ;
-use vars qw/$pluginname/ ;
-
-sub is_lesser ( $$ ) ;
-sub is_greater ( $$ ) ;
-sub debug ( $ ) ;
-sub parse_sql_file ( $ ) ;
-
-require ("/usr/share/gforge/lib/include.pl") ; # Include a few predefined functions 
-require ("/usr/share/gforge/lib/sqlparser.pm") ; # Our magic SQL parser
-
-debug "You'll see some debugging info during this installation." ;
-debug "Do not worry unless told otherwise." ;
-
-&db_connect ;
-
-# debug "Connected to the database OK." ;
-
-$pluginname = "oauthprovider" ;
-
-$dbh->{AutoCommit} = 0;
-$dbh->{RaiseError} = 1;
-eval {
-    my ($sth, @array, $version, $path, $target) ;
-
-    &create_metadata_table ("0") ;
-    
-    $version = &get_db_version ;
-    $target = "0.1" ;
-    if (is_lesser $version, $target) {
-	my @filelist = ( "/usr/share/gforge/plugins/$pluginname/db/$pluginname-init.sql" ) ;
-	
-	foreach my $file (@filelist) {
-	    debug "Processing $file" ;
-	    @reqlist = @{ &parse_sql_file ($file) } ;
-	    
-	    foreach my $s (@reqlist) {
-		$query = $s ;
-		# debug $query ;
-		$sth = $dbh->prepare ($query) ;
-		$sth->execute () ;
-		$sth->finish () ;
-	    }
-	}
-	@reqlist = () ;
-	
-	&update_db_version ($target) ;
-	debug "Committing." ;
-	$dbh->commit () ;
-    }
-    
-#    $version = &get_db_version ;
-#    $target = "0.2" ;
-#    if (is_lesser $version, $target) {
-#	debug "Adding local data." ;
-#	
-#	do "/etc/gforge/local.pl" or die "Cannot read /etc/gforge/local.pl" ;
-#	
-#	my $ip_address = qx/host $domain_name | awk '{print \}'/ ;
-#	
-#	@reqlist = (
-#		    "INSERT INTO plugin_".$pluginname."_sample_data (domain, ip_address) VALUES ('$domain_name', '$ip_address')",
-#		    ) ;
-#	
-#	foreach my $s (@reqlist) {
-#	    $query = $s ;
-#	    # debug $query ;
-#	    $sth = $dbh->prepare ($query) ;
-#	    $sth->execute () ;
-#	    $sth->finish () ;
-#	}
-#	@reqlist = () ;
-#	
-#	&update_db_version ($target) ;
-#	debug "Committing." ;
-#	$dbh->commit () ;
-#    }
-
-    debug "It seems your database install/upgrade went well and smoothly.  That's cool." ;
-    debug "Please enjoy using Debian FusionForge." ;
-
-    # There should be a commit at the end of every block above.
-    # If there is not, then it might be symptomatic of a problem.
-    # For safety, we roll back.
-    $dbh->rollback ();
-};
-
-if ($@) {
-    warn "Transaction aborted because $@" ;
-    debug "Transaction aborted because $@" ;
-    debug "Last SQL query was:\n$query\n(end of query)" ;
-    $dbh->rollback ;
-    debug "Please report this bug on the Debian bug-tracking system." ;
-    debug "Please include the previous messages as well to help debugging." ;
-    debug "You should not worry too much about this," ;
-    debug "your DB is still in a consistent state and should be usable." ;
-    exit 1 ;
-}
-
-$dbh->rollback ;
-$dbh->disconnect ;
-
-sub is_lesser ( $$ ) {
-    my $v1 = shift || 0 ;
-    my $v2 = shift || 0 ;
-
-    my $rc = system "dpkg --compare-versions $v1 lt $v2" ;
-
-    return (! $rc) ;
-}
-
-sub is_greater ( $$ ) {
-    my $v1 = shift || 0 ;
-    my $v2 = shift || 0 ;
-
-    my $rc = system "dpkg --compare-versions $v1 gt $v2" ;
-
-    return (! $rc) ;
-}
-
-sub debug ( $ ) {
-    my $v = shift ;
-    chomp $v ;
-    print STDERR "$v\n" ;
-}
-
-sub create_metadata_table ( $ ) {
-    my $v = shift || "0" ;
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-    # Do we have the metadata table?
-
-    $query = "SELECT count(*) FROM pg_class WHERE relname = '$tablename' and relkind = 'r'";
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    # Let's create this table if we have it not
-
-    if ($array [0] == 0) {
-	debug "Creating $tablename table." ;
-	$query = "CREATE TABLE $tablename (key varchar primary key, value text not null)" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-
-    $query = "SELECT count(*) FROM $tablename WHERE key = 'db-version'";
-    # debug $query ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    # Empty table?  We'll have to fill it up a bit
-
-    if ($array [0] == 0) {
-	debug "Inserting first data into $tablename table." ;
-	$query = "INSERT INTO $tablename (key, value) VALUES ('db-version', '$v')" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub update_db_version ( $ ) {
-    my $v = shift or die "Not enough arguments" ;
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-
-    debug "Updating $tablename table." ;
-    $query = "UPDATE $tablename SET value = '$v' WHERE key = 'db-version'" ;
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    $sth->finish () ;
-}
-
-sub get_db_version () {
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-
-    $query = "SELECT value FROM $tablename WHERE key = 'db-version'" ;
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    my $version = $array [0] ;
-
-    return $version ;
-}
-
-sub drop_table_if_exists ( $ ) {
-    my $tname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$tname' AND relkind='r'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping table $tname" ;
-	$query = "DROP TABLE $tname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_sequence_if_exists ( $ ) {
-    my $sname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$sname' AND relkind='S'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping sequence $sname" ;
-	$query = "DROP SEQUENCE $sname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_index_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='i'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping index $iname" ;
-	$query = "DROP INDEX $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_view_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='v'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping view $iname" ;
-	$query = "DROP VIEW $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub bump_sequence_to ( $$ ) {
-    my ($sth, @array, $seqname, $targetvalue) ;
-
-    $seqname = shift ;
-    $targetvalue = shift ;
-
-    do {
-	$query = "select nextval ('$seqname')" ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	@array = $sth->fetchrow_array () ;
-	$sth->finish () ;
-    } until $array[0] >= $targetvalue ;
-}
diff --git a/src/plugins/oauthprovider/packaging/install/plugin-oauthprovider b/src/plugins/oauthprovider/packaging/install/plugin-oauthprovider
index 1ab38b7..9bb91aa 100644
--- a/src/plugins/oauthprovider/packaging/install/plugin-oauthprovider
+++ b/src/plugins/oauthprovider/packaging/install/plugin-oauthprovider
@@ -1,7 +1,6 @@
 plugins/oauthprovider/common/*                  @PLUGIN_PATH@/oauthprovider/common/
 plugins/oauthprovider/include/*.php             @PLUGIN_PATH@/oauthprovider/include/
 plugins/oauthprovider/db/*                      @PLUGIN_PATH@/oauthprovider/db/
-plugins/oauthprovider/bin/*                     @PLUGIN_PATH@/oauthprovider/bin/
 plugins/oauthprovider/www/*                     @PLUGIN_PATH@/oauthprovider/www/
 plugins/oauthprovider/etc/plugins/oauthprovider/*     etc/gforge/plugins/oauthprovider/
 plugins/oauthprovider/etc/*.ini etc/@PACKAGE@/config.ini.d/
diff --git a/src/plugins/projectlabels/bin/db-delete.pl b/src/plugins/projectlabels/bin/db-delete.pl
deleted file mode 100755
index 541e0b2..0000000
--- a/src/plugins/projectlabels/bin/db-delete.pl
+++ /dev/null
@@ -1,188 +0,0 @@
-#!/usr/bin/perl -w
-#
-# $Id: db-delete.pl,v 1.1.1.1 2005/09/22 17:32:56 rhertzog Exp $
-#
-# Debian-specific script to delete plugin-specific tables
-# Roland Mas <lolando at debian.org>
-
-use strict ;
-use diagnostics ;
-
-use DBI ;
-use MIME::Base64 ;
-
-use vars qw/$dbh @reqlist $query/ ;
-use vars qw/$sys_default_domain $sys_cvs_host
-    $sys_shell_host $sys_users_host $sys_docs_host $sys_lists_host
-    $sys_dns1_host $sys_dns2_host $FTPINCOMING_DIR $FTPFILES_DIR
-    $sys_urlroot $sf_cache_dir $sys_name $sys_themeroot
-    $sys_news_group $sys_dbhost $sys_dbname $sys_dbuser $sys_dbpasswd
-    $sys_ldap_base_dn $sys_ldap_host $admin_login $admin_password
-    $domain_name
-    $skill_list/ ;
-use vars qw/$pluginname/ ;
-
-sub is_lesser ( $$ ) ;
-sub is_greater ( $$ ) ;
-sub debug ( $ ) ;
-sub parse_sql_file ( $ ) ;
-
-require ("/usr/share/gforge/lib/include.pl") ; # Include a few predefined functions 
-require ("/usr/share/gforge/lib/sqlparser.pm") ; # Our magic SQL parser
-
-debug "You'll see some debugging info during this installation." ;
-debug "Do not worry unless told otherwise." ;
-
-&db_connect ;
-
-# debug "Connected to the database OK." ;
-
-$pluginname = "projectlabels" ;
-
-$dbh->{AutoCommit} = 0;
-$dbh->{RaiseError} = 1;
-eval {
-    my ($sth, @array, $version, $action, $path, $target, $rname) ;
-
-    my $pattern = "plugin_" . $pluginname . '_%' ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='v'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_view_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='r'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_table_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='i'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_index_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='S'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_sequence_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $dbh->commit ();
-
-
-    debug "It seems your database deletion went well and smoothly.  That's cool." ;
-    debug "Please enjoy using Debian GForge." ;
-
-    # There should be a commit at the end of every block above.
-    # If there is not, then it might be symptomatic of a problem.
-    # For safety, we roll back.
-    $dbh->rollback ();
-};
-
-if ($@) {
-    warn "Transaction aborted because $@" ;
-    debug "Transaction aborted because $@" ;
-    debug "Last SQL query was:\n$query\n(end of query)" ;
-    $dbh->rollback ;
-    debug "Please report this bug on the Debian bug-tracking system." ;
-    debug "Please include the previous messages as well to help debugging." ;
-    debug "You should not worry too much about this," ;
-    debug "your DB is still in a consistent state and should be usable." ;
-    exit 1 ;
-}
-
-$dbh->rollback ;
-$dbh->disconnect ;
-
-sub debug ( $ ) {
-    my $v = shift ;
-    chomp $v ;
-    print STDERR "$v\n" ;
-}
-
-sub drop_table_if_exists ( $ ) {
-    my $tname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$tname' AND relkind='r'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping table $tname" ;
-	$query = "DROP TABLE $tname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_sequence_if_exists ( $ ) {
-    my $sname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$sname' AND relkind='S'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping sequence $sname" ;
-	$query = "DROP SEQUENCE $sname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_index_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='i'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping index $iname" ;
-	$query = "DROP INDEX $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_view_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='v'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping view $iname" ;
-	$query = "DROP VIEW $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
diff --git a/src/plugins/projectlabels/bin/db-upgrade.pl b/src/plugins/projectlabels/bin/db-upgrade.pl
deleted file mode 100755
index feb17f1..0000000
--- a/src/plugins/projectlabels/bin/db-upgrade.pl
+++ /dev/null
@@ -1,275 +0,0 @@
-#!/usr/bin/perl -w
-#
-# $Id: db-upgrade.pl,v 1.1.1.1 2005/09/22 17:32:56 rhertzog Exp $
-#
-# Debian-specific script to upgrade the database between releases
-# Roland Mas <lolando at debian.org>
-
-use strict ;
-use diagnostics ;
-
-use DBI ;
-use MIME::Base64 ;
-
-use vars qw/$dbh @reqlist $query/ ;
-use vars qw/$sys_default_domain $sys_cvs_host
-    $sys_shell_host $sys_users_host $sys_docs_host $sys_lists_host
-    $sys_dns1_host $sys_dns2_host $FTPINCOMING_DIR $FTPFILES_DIR
-    $sys_urlroot $sf_cache_dir $sys_name $sys_themeroot
-    $sys_news_group $sys_dbhost $sys_dbname $sys_dbuser $sys_dbpasswd
-    $sys_ldap_base_dn $sys_ldap_host $admin_login $admin_password
-    $domain_name
-    $skill_list/ ;
-use vars qw/$pluginname/ ;
-
-sub is_lesser ( $$ ) ;
-sub is_greater ( $$ ) ;
-sub debug ( $ ) ;
-sub parse_sql_file ( $ ) ;
-
-require ("/usr/share/gforge/lib/include.pl") ; # Include a few predefined functions 
-require ("/usr/share/gforge/lib/sqlparser.pm") ; # Our magic SQL parser
-
-debug "You'll see some debugging info during this installation." ;
-debug "Do not worry unless told otherwise." ;
-
-&db_connect ;
-
-# debug "Connected to the database OK." ;
-
-$pluginname = "projectlabels" ;
-
-$dbh->{AutoCommit} = 0;
-$dbh->{RaiseError} = 1;
-eval {
-    my ($sth, @array, $version, $path, $target) ;
-
-    &create_metadata_table ("0") ;
-    
-    $version = &get_db_version ;
-    $target = "0.1" ;
-    if (is_lesser $version, $target) {
-	my @filelist = ( "/usr/share/gforge/plugins/$pluginname/lib/$pluginname-init.sql" ) ;
-	
-	foreach my $file (@filelist) {
-	    debug "Processing $file" ;
-	    @reqlist = @{ &parse_sql_file ($file) } ;
-	    
-	    foreach my $s (@reqlist) {
-		$query = $s ;
-		# debug $query ;
-		$sth = $dbh->prepare ($query) ;
-		$sth->execute () ;
-		$sth->finish () ;
-	    }
-	}
-	@reqlist = () ;
-	
-	&update_db_version ($target) ;
-	debug "Committing." ;
-	$dbh->commit () ;
-    }
-    
-    debug "It seems your database install/upgrade went well and smoothly.  That's cool." ;
-    debug "Please enjoy using Debian GForge." ;
-
-    # There should be a commit at the end of every block above.
-    # If there is not, then it might be symptomatic of a problem.
-    # For safety, we roll back.
-    $dbh->rollback ();
-};
-
-if ($@) {
-    warn "Transaction aborted because $@" ;
-    debug "Transaction aborted because $@" ;
-    debug "Last SQL query was:\n$query\n(end of query)" ;
-    $dbh->rollback ;
-    debug "Please report this bug on the Debian bug-tracking system." ;
-    debug "Please include the previous messages as well to help debugging." ;
-    debug "You should not worry too much about this," ;
-    debug "your DB is still in a consistent state and should be usable." ;
-    exit 1 ;
-}
-
-$dbh->rollback ;
-$dbh->disconnect ;
-
-sub is_lesser ( $$ ) {
-    my $v1 = shift || 0 ;
-    my $v2 = shift || 0 ;
-
-    my $rc = system "dpkg --compare-versions $v1 lt $v2" ;
-
-    return (! $rc) ;
-}
-
-sub is_greater ( $$ ) {
-    my $v1 = shift || 0 ;
-    my $v2 = shift || 0 ;
-
-    my $rc = system "dpkg --compare-versions $v1 gt $v2" ;
-
-    return (! $rc) ;
-}
-
-sub debug ( $ ) {
-    my $v = shift ;
-    chomp $v ;
-    print STDERR "$v\n" ;
-}
-
-sub create_metadata_table ( $ ) {
-    my $v = shift || "0" ;
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-    # Do we have the metadata table?
-
-    $query = "SELECT count(*) FROM pg_class WHERE relname = '$tablename' and relkind = 'r'";
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    # Let's create this table if we have it not
-
-    if ($array [0] == 0) {
-	debug "Creating $tablename table." ;
-	$query = "CREATE TABLE $tablename (key varchar primary key, value text not null)" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-
-    $query = "SELECT count(*) FROM $tablename WHERE key = 'db-version'";
-    # debug $query ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    # Empty table?  We'll have to fill it up a bit
-
-    if ($array [0] == 0) {
-	debug "Inserting first data into $tablename table." ;
-	$query = "INSERT INTO $tablename (key, value) VALUES ('db-version', '$v')" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub update_db_version ( $ ) {
-    my $v = shift or die "Not enough arguments" ;
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-
-    debug "Updating $tablename table." ;
-    $query = "UPDATE $tablename SET value = '$v' WHERE key = 'db-version'" ;
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    $sth->finish () ;
-}
-
-sub get_db_version () {
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-
-    $query = "SELECT value FROM $tablename WHERE key = 'db-version'" ;
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    my $version = $array [0] ;
-
-    return $version ;
-}
-
-sub drop_table_if_exists ( $ ) {
-    my $tname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$tname' AND relkind='r'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping table $tname" ;
-	$query = "DROP TABLE $tname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_sequence_if_exists ( $ ) {
-    my $sname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$sname' AND relkind='S'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping sequence $sname" ;
-	$query = "DROP SEQUENCE $sname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_index_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='i'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping index $iname" ;
-	$query = "DROP INDEX $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_view_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='v'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping view $iname" ;
-	$query = "DROP VIEW $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub bump_sequence_to ( $$ ) {
-    my ($sth, @array, $seqname, $targetvalue) ;
-
-    $seqname = shift ;
-    $targetvalue = shift ;
-
-    do {
-	$query = "select nextval ('$seqname')" ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	@array = $sth->fetchrow_array () ;
-	$sth->finish () ;
-    } until $array[0] >= $targetvalue ;
-}
diff --git a/src/plugins/projectlabels/packaging/install/plugin-projectlabels b/src/plugins/projectlabels/packaging/install/plugin-projectlabels
index fb06027..6257d06 100644
--- a/src/plugins/projectlabels/packaging/install/plugin-projectlabels
+++ b/src/plugins/projectlabels/packaging/install/plugin-projectlabels
@@ -1,4 +1,3 @@
-plugins/projectlabels/bin/*	@PLUGIN_PATH@/projectlabels/bin/
 plugins/projectlabels/common/*	@PLUGIN_PATH@/projectlabels/common/
 plugins/projectlabels/db/*	@PLUGIN_PATH@/projectlabels/lib/
 plugins/projectlabels/www/*	@PLUGIN_PATH@/projectlabels/www/
diff --git a/src/plugins/projects-hierarchy/bin/db-delete.pl b/src/plugins/projects-hierarchy/bin/db-delete.pl
deleted file mode 100755
index 5687547..0000000
--- a/src/plugins/projects-hierarchy/bin/db-delete.pl
+++ /dev/null
@@ -1,186 +0,0 @@
-#!/usr/bin/perl -w
-#
-# Debian-specific script to delete plugin-specific tables
-# Roland Mas <lolando at debian.org>
-
-use strict ;
-use diagnostics ;
-
-use DBI ;
-use MIME::Base64 ;
-
-use vars qw/$dbh @reqlist $query/ ;
-use vars qw/$sys_default_domain $sys_cvs_host
-    $sys_shell_host $sys_users_host $sys_docs_host $sys_lists_host
-    $sys_dns1_host $sys_dns2_host $FTPINCOMING_DIR $FTPFILES_DIR
-    $sys_urlroot $sf_cache_dir $sys_name $sys_themeroot
-    $sys_news_group $sys_dbhost $sys_dbname $sys_dbuser $sys_dbpasswd
-    $sys_ldap_base_dn $sys_ldap_host $admin_login $admin_password
-    $domain_name
-    $skill_list/ ;
-use vars qw/$pluginname/ ;
-
-sub is_lesser ( $$ ) ;
-sub is_greater ( $$ ) ;
-sub debug ( $ ) ;
-sub parse_sql_file ( $ ) ;
-
-require ("/usr/share/gforge/lib/include.pl") ; # Include a few predefined functions 
-require ("/usr/share/gforge/lib/sqlparser.pm") ; # Our magic SQL parser
-
-debug "You'll see some debugging info during this installation." ;
-debug "Do not worry unless told otherwise." ;
-
-&db_connect ;
-
-# debug "Connected to the database OK." ;
-
-$pluginname = "projects_hierarchy" ;
-
-$dbh->{AutoCommit} = 0;
-$dbh->{RaiseError} = 1;
-eval {
-    my ($sth, @array, $version, $action, $path, $target, $rname) ;
-
-    my $pattern = "plugin_" . $pluginname . '_%' ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='v'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_view_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='r'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_table_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='i'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_index_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='s'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_sequence_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $dbh->commit ();
-
-
-    debug "It seems your database deletion went well and smoothly.  That's cool." ;
-    debug "Please enjoy using Debian FusionForge." ;
-
-    # There should be a commit at the end of every block above.
-    # If there is not, then it might be symptomatic of a problem.
-    # For safety, we roll back.
-    $dbh->rollback ();
-};
-
-if ($@) {
-    warn "Transaction aborted because $@" ;
-    debug "Transaction aborted because $@" ;
-    debug "Last SQL query was:\n$query\n(end of query)" ;
-    $dbh->rollback ;
-    debug "Please report this bug on the Debian bug-tracking system." ;
-    debug "Please include the previous messages as well to help debugging." ;
-    debug "You should not worry too much about this," ;
-    debug "your DB is still in a consistent state and should be usable." ;
-    exit 1 ;
-}
-
-$dbh->rollback ;
-$dbh->disconnect ;
-
-sub debug ( $ ) {
-    my $v = shift ;
-    chomp $v ;
-    print STDERR "$v\n" ;
-}
-
-sub drop_table_if_exists ( $ ) {
-    my $tname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$tname' AND relkind='r'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping table $tname" ;
-	$query = "DROP TABLE $tname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_sequence_if_exists ( $ ) {
-    my $sname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$sname' AND relkind='S'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping sequence $sname" ;
-	$query = "DROP SEQUENCE $sname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_index_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='i'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping index $iname" ;
-	$query = "DROP INDEX $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_view_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='v'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping view $iname" ;
-	$query = "DROP VIEW $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
diff --git a/src/plugins/projects-hierarchy/bin/db-upgrade.pl b/src/plugins/projects-hierarchy/bin/db-upgrade.pl
deleted file mode 100755
index ef1d34d..0000000
--- a/src/plugins/projects-hierarchy/bin/db-upgrade.pl
+++ /dev/null
@@ -1,300 +0,0 @@
-#!/usr/bin/perl -w
-#
-# Debian-specific script to upgrade the database between releases
-# Roland Mas <lolando at debian.org>
-
-use strict ;
-use diagnostics ;
-
-use DBI ;
-use MIME::Base64 ;
-
-use vars qw/$dbh @reqlist $query/ ;
-use vars qw/$sys_default_domain $sys_cvs_host
-    $sys_shell_host $sys_users_host $sys_docs_host $sys_lists_host
-    $sys_dns1_host $sys_dns2_host $FTPINCOMING_DIR $FTPFILES_DIR
-    $sys_urlroot $sf_cache_dir $sys_name $sys_themeroot
-    $sys_news_group $sys_dbhost $sys_dbname $sys_dbuser $sys_dbpasswd
-    $sys_ldap_base_dn $sys_ldap_host $admin_login $admin_password
-    $domain_name
-    $skill_list/ ;
-use vars qw/$pluginname/ ;
-
-sub is_lesser ( $$ ) ;
-sub is_greater ( $$ ) ;
-sub debug ( $ ) ;
-sub parse_sql_file ( $ ) ;
-
-require ("/usr/share/gforge/lib/include.pl") ; # Include a few predefined functions 
-require ("/usr/share/gforge/lib/sqlparser.pm") ; # Our magic SQL parser
-
-debug "You'll see some debugging info during this installation." ;
-debug "Do not worry unless told otherwise." ;
-
-&db_connect ;
-
-# debug "Connected to the database OK." ;
-
-$pluginname = "projects_hierarchy" ;
-
-$dbh->{AutoCommit} = 0;
-$dbh->{RaiseError} = 1;
-eval {
-    my ($sth, @array, $version, $path, $target) ;
-
-    &create_metadata_table ("0") ;
-    
-    $version = &get_db_version ;
-    $target = "0.1" ;
-    if (is_lesser $version, $target) {
-	my @filelist = ( "/usr/share/gforge/plugins/projects-hierarchy/db/projects-hierarchy-init.sql" ) ;
-	
-	foreach my $file (@filelist) {
-	    debug "Processing $file" ;
-	    @reqlist = @{ &parse_sql_file ($file) } ;
-	    
-	    foreach my $s (@reqlist) {
-		$query = $s ;
-		# debug $query ;
-		$sth = $dbh->prepare ($query) ;
-		$sth->execute () ;
-		$sth->finish () ;
-	    }
-	}
-	@reqlist = () ;
-	
-	&update_db_version ($target) ;
-	debug "Committing." ;
-	$dbh->commit () ;
-    }
-    
-#    $version = &get_db_version ;
-#    $target = "0.2" ;
-#    if (is_lesser $version, $target) {
-#	debug "Adding local data." ;
-#	
-#	do "/etc/gforge/local.pl" or die "Cannot read /etc/gforge/local.pl" ;
-#	
-#	my $ip_address = qx/host $domain_name | awk '{print \}'/ ;
-#	
-#	@reqlist = (
-#		    "INSERT INTO plugin_".$pluginname."_sample_data (domain, ip_address) VALUES ('$domain_name', '$ip_address')",
-#		    ) ;
-#	
-#	foreach my $s (@reqlist) {
-#	    $query = $s ;
-#	    # debug $query ;
-#	    $sth = $dbh->prepare ($query) ;
-#	    $sth->execute () ;
-#	    $sth->finish () ;
-#	}
-#	@reqlist = () ;
-#	
-#	&update_db_version ($target) ;
-#	debug "Committing." ;
-#	$dbh->commit () ;
-#    }
-
-    debug "It seems your database install/upgrade went well and smoothly.  That's cool." ;
-    debug "Please enjoy using Debian FusionForge." ;
-
-    # There should be a commit at the end of every block above.
-    # If there is not, then it might be symptomatic of a problem.
-    # For safety, we roll back.
-    $dbh->rollback ();
-};
-
-if ($@) {
-    warn "Transaction aborted because $@" ;
-    debug "Transaction aborted because $@" ;
-    debug "Last SQL query was:\n$query\n(end of query)" ;
-    $dbh->rollback ;
-    debug "Please report this bug on the Debian bug-tracking system." ;
-    debug "Please include the previous messages as well to help debugging." ;
-    debug "You should not worry too much about this," ;
-    debug "your DB is still in a consistent state and should be usable." ;
-    exit 1 ;
-}
-
-$dbh->rollback ;
-$dbh->disconnect ;
-
-sub is_lesser ( $$ ) {
-    my $v1 = shift || 0 ;
-    my $v2 = shift || 0 ;
-
-    my $rc = system "dpkg --compare-versions $v1 lt $v2" ;
-
-    return (! $rc) ;
-}
-
-sub is_greater ( $$ ) {
-    my $v1 = shift || 0 ;
-    my $v2 = shift || 0 ;
-
-    my $rc = system "dpkg --compare-versions $v1 gt $v2" ;
-
-    return (! $rc) ;
-}
-
-sub debug ( $ ) {
-    my $v = shift ;
-    chomp $v ;
-    print STDERR "$v\n" ;
-}
-
-sub create_metadata_table ( $ ) {
-    my $v = shift || "0" ;
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-    # Do we have the metadata table?
-
-    $query = "SELECT count(*) FROM pg_class WHERE relname = '$tablename' and relkind = 'r'";
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    # Let's create this table if we have it not
-
-    if ($array [0] == 0) {
-	debug "Creating $tablename table." ;
-	$query = "CREATE TABLE $tablename (key varchar primary key, value text not null)" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-
-    $query = "SELECT count(*) FROM $tablename WHERE key = 'db-version'";
-    # debug $query ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    # Empty table?  We'll have to fill it up a bit
-
-    if ($array [0] == 0) {
-	debug "Inserting first data into $tablename table." ;
-	$query = "INSERT INTO $tablename (key, value) VALUES ('db-version', '$v')" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub update_db_version ( $ ) {
-    my $v = shift or die "Not enough arguments" ;
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-
-    debug "Updating $tablename table." ;
-    $query = "UPDATE $tablename SET value = '$v' WHERE key = 'db-version'" ;
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    $sth->finish () ;
-}
-
-sub get_db_version () {
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-
-    $query = "SELECT value FROM $tablename WHERE key = 'db-version'" ;
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    my $version = $array [0] ;
-
-    return $version ;
-}
-
-sub drop_table_if_exists ( $ ) {
-    my $tname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$tname' AND relkind='r'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping table $tname" ;
-	$query = "DROP TABLE $tname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_sequence_if_exists ( $ ) {
-    my $sname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$sname' AND relkind='S'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping sequence $sname" ;
-	$query = "DROP SEQUENCE $sname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_index_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='i'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping index $iname" ;
-	$query = "DROP INDEX $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_view_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='v'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping view $iname" ;
-	$query = "DROP VIEW $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub bump_sequence_to ( $$ ) {
-    my ($sth, @array, $seqname, $targetvalue) ;
-
-    $seqname = shift ;
-    $targetvalue = shift ;
-
-    do {
-	$query = "select nextval ('$seqname')" ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	@array = $sth->fetchrow_array () ;
-	$sth->finish () ;
-    } until $array[0] >= $targetvalue ;
-}
diff --git a/src/plugins/projects-hierarchy/packaging/install/plugin-projects-hierarchy b/src/plugins/projects-hierarchy/packaging/install/plugin-projects-hierarchy
index c4e3061..338d4b2 100644
--- a/src/plugins/projects-hierarchy/packaging/install/plugin-projects-hierarchy
+++ b/src/plugins/projects-hierarchy/packaging/install/plugin-projects-hierarchy
@@ -5,4 +5,3 @@ plugins/projects-hierarchy/include/*                  @PLUGIN_PATH@/projects-hie
 plugins/projects-hierarchy/www/*                     @PLUGIN_PATH@/projects-hierarchy/www/
 plugins/projects-hierarchy/etc/*.ini 	   			etc/@PACKAGE@/config.ini.d/
 plugins/projects-hierarchy/db/*                      @PLUGIN_PATH@/projects-hierarchy/db/
-plugins/projects-hierarchy/bin/*                     @PLUGIN_PATH@/projects-hierarchy/bin/
diff --git a/src/plugins/scmdarcs/bin/db-delete.pl b/src/plugins/scmdarcs/bin/db-delete.pl
deleted file mode 100644
index 6eb509f..0000000
--- a/src/plugins/scmdarcs/bin/db-delete.pl
+++ /dev/null
@@ -1,188 +0,0 @@
-#!/usr/bin/perl -w
-#
-# $Id: db-delete.pl,v 1.1.1.1 2005/09/22 17:32:56 rhertzog Exp $
-#
-# Debian-specific script to delete plugin-specific tables
-# Roland Mas <lolando at debian.org>
-
-use strict ;
-use diagnostics ;
-
-use DBI ;
-use MIME::Base64 ;
-
-use vars qw/$dbh @reqlist $query/ ;
-use vars qw/$sys_default_domain $sys_cvs_host
-    $sys_shell_host $sys_users_host $sys_docs_host $sys_lists_host
-    $sys_dns1_host $sys_dns2_host $FTPINCOMING_DIR $FTPFILES_DIR
-    $sys_urlroot $sf_cache_dir $sys_name $sys_themeroot
-    $sys_news_group $sys_dbhost $sys_dbname $sys_dbuser $sys_dbpasswd
-    $sys_ldap_base_dn $sys_ldap_host $admin_login $admin_password
-    $domain_name
-    $skill_list/ ;
-use vars qw/$pluginname/ ;
-
-sub is_lesser ( $$ ) ;
-sub is_greater ( $$ ) ;
-sub debug ( $ ) ;
-sub parse_sql_file ( $ ) ;
-
-require ("/usr/share/gforge/lib/include.pl") ; # Include a few predefined functions 
-require ("/usr/share/gforge/lib/sqlparser.pm") ; # Our magic SQL parser
-
-debug "You'll see some debugging info during this installation." ;
-debug "Do not worry unless told otherwise." ;
-
-&db_connect ;
-
-# debug "Connected to the database OK." ;
-
-$pluginname = "scmdarcs" ;
-
-$dbh->{AutoCommit} = 0;
-$dbh->{RaiseError} = 1;
-eval {
-    my ($sth, @array, $version, $action, $path, $target, $rname) ;
-
-    my $pattern = "plugin_" . $pluginname . '_%' ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='v'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_view_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='r'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_table_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='i'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_index_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='s'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_sequence_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $dbh->commit ();
-
-
-    debug "It seems your database deletion went well and smoothly.  That's cool." ;
-    debug "Please enjoy using Debian GForge." ;
-
-    # There should be a commit at the end of every block above.
-    # If there is not, then it might be symptomatic of a problem.
-    # For safety, we roll back.
-    $dbh->rollback ();
-};
-
-if ($@) {
-    warn "Transaction aborted because $@" ;
-    debug "Transaction aborted because $@" ;
-    debug "Last SQL query was:\n$query\n(end of query)" ;
-    $dbh->rollback ;
-    debug "Please report this bug on the Debian bug-tracking system." ;
-    debug "Please include the previous messages as well to help debugging." ;
-    debug "You should not worry too much about this," ;
-    debug "your DB is still in a consistent state and should be usable." ;
-    exit 1 ;
-}
-
-$dbh->rollback ;
-$dbh->disconnect ;
-
-sub debug ( $ ) {
-    my $v = shift ;
-    chomp $v ;
-    print STDERR "$v\n" ;
-}
-
-sub drop_table_if_exists ( $ ) {
-    my $tname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$tname' AND relkind='r'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping table $tname" ;
-	$query = "DROP TABLE $tname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_sequence_if_exists ( $ ) {
-    my $sname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$sname' AND relkind='S'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping sequence $sname" ;
-	$query = "DROP SEQUENCE $sname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_index_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='i'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping index $iname" ;
-	$query = "DROP INDEX $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_view_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='v'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping view $iname" ;
-	$query = "DROP VIEW $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
diff --git a/src/plugins/scmdarcs/bin/db-upgrade.pl b/src/plugins/scmdarcs/bin/db-upgrade.pl
deleted file mode 100644
index c88c52b..0000000
--- a/src/plugins/scmdarcs/bin/db-upgrade.pl
+++ /dev/null
@@ -1,275 +0,0 @@
-#!/usr/bin/perl -w
-#
-# $Id: db-upgrade.pl,v 1.1.1.1 2005/09/22 17:32:56 rhertzog Exp $
-#
-# Debian-specific script to upgrade the database between releases
-# Roland Mas <lolando at debian.org>
-
-use strict ;
-use diagnostics ;
-
-use DBI ;
-use MIME::Base64 ;
-
-use vars qw/$dbh @reqlist $query/ ;
-use vars qw/$sys_default_domain $sys_cvs_host
-    $sys_shell_host $sys_users_host $sys_docs_host $sys_lists_host
-    $sys_dns1_host $sys_dns2_host $FTPINCOMING_DIR $FTPFILES_DIR
-    $sys_urlroot $sf_cache_dir $sys_name $sys_themeroot
-    $sys_news_group $sys_dbhost $sys_dbname $sys_dbuser $sys_dbpasswd
-    $sys_ldap_base_dn $sys_ldap_host $admin_login $admin_password
-    $domain_name
-    $skill_list/ ;
-use vars qw/$pluginname/ ;
-
-sub is_lesser ( $$ ) ;
-sub is_greater ( $$ ) ;
-sub debug ( $ ) ;
-sub parse_sql_file ( $ ) ;
-
-require ("/usr/share/gforge/lib/include.pl") ; # Include a few predefined functions 
-require ("/usr/share/gforge/lib/sqlparser.pm") ; # Our magic SQL parser
-
-debug "You'll see some debugging info during this installation." ;
-debug "Do not worry unless told otherwise." ;
-
-&db_connect ;
-
-# debug "Connected to the database OK." ;
-
-$pluginname = "scmdarcs" ;
-
-$dbh->{AutoCommit} = 0;
-$dbh->{RaiseError} = 1;
-eval {
-    my ($sth, @array, $version, $path, $target) ;
-
-    &create_metadata_table ("0") ;
-    
-    $version = &get_db_version ;
-    $target = "0.1" ;
-    if (is_lesser $version, $target) {
-	my @filelist = ( "/usr/share/gforge/plugins/$pluginname/lib/$pluginname-init.sql" ) ;
-	
-	foreach my $file (@filelist) {
-	    debug "Processing $file" ;
-	    @reqlist = @{ &parse_sql_file ($file) } ;
-	    
-	    foreach my $s (@reqlist) {
-		$query = $s ;
-		# debug $query ;
-		$sth = $dbh->prepare ($query) ;
-		$sth->execute () ;
-		$sth->finish () ;
-	    }
-	}
-	@reqlist = () ;
-	
-	&update_db_version ($target) ;
-	debug "Committing." ;
-	$dbh->commit () ;
-    }
-    
-    debug "It seems your database install/upgrade went well and smoothly.  That's cool." ;
-    debug "Please enjoy using Debian GForge." ;
-
-    # There should be a commit at the end of every block above.
-    # If there is not, then it might be symptomatic of a problem.
-    # For safety, we roll back.
-    $dbh->rollback ();
-};
-
-if ($@) {
-    warn "Transaction aborted because $@" ;
-    debug "Transaction aborted because $@" ;
-    debug "Last SQL query was:\n$query\n(end of query)" ;
-    $dbh->rollback ;
-    debug "Please report this bug on the Debian bug-tracking system." ;
-    debug "Please include the previous messages as well to help debugging." ;
-    debug "You should not worry too much about this," ;
-    debug "your DB is still in a consistent state and should be usable." ;
-    exit 1 ;
-}
-
-$dbh->rollback ;
-$dbh->disconnect ;
-
-sub is_lesser ( $$ ) {
-    my $v1 = shift || 0 ;
-    my $v2 = shift || 0 ;
-
-    my $rc = system "dpkg --compare-versions $v1 lt $v2" ;
-
-    return (! $rc) ;
-}
-
-sub is_greater ( $$ ) {
-    my $v1 = shift || 0 ;
-    my $v2 = shift || 0 ;
-
-    my $rc = system "dpkg --compare-versions $v1 gt $v2" ;
-
-    return (! $rc) ;
-}
-
-sub debug ( $ ) {
-    my $v = shift ;
-    chomp $v ;
-    print STDERR "$v\n" ;
-}
-
-sub create_metadata_table ( $ ) {
-    my $v = shift || "0" ;
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-    # Do we have the metadata table?
-
-    $query = "SELECT count(*) FROM pg_class WHERE relname = '$tablename' and relkind = 'r'";
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    # Let's create this table if we have it not
-
-    if ($array [0] == 0) {
-	debug "Creating $tablename table." ;
-	$query = "CREATE TABLE $tablename (key varchar primary key, value text not null)" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-
-    $query = "SELECT count(*) FROM $tablename WHERE key = 'db-version'";
-    # debug $query ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    # Empty table?  We'll have to fill it up a bit
-
-    if ($array [0] == 0) {
-	debug "Inserting first data into $tablename table." ;
-	$query = "INSERT INTO $tablename (key, value) VALUES ('db-version', '$v')" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub update_db_version ( $ ) {
-    my $v = shift or die "Not enough arguments" ;
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-
-    debug "Updating $tablename table." ;
-    $query = "UPDATE $tablename SET value = '$v' WHERE key = 'db-version'" ;
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    $sth->finish () ;
-}
-
-sub get_db_version () {
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-
-    $query = "SELECT value FROM $tablename WHERE key = 'db-version'" ;
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    my $version = $array [0] ;
-
-    return $version ;
-}
-
-sub drop_table_if_exists ( $ ) {
-    my $tname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$tname' AND relkind='r'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping table $tname" ;
-	$query = "DROP TABLE $tname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_sequence_if_exists ( $ ) {
-    my $sname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$sname' AND relkind='S'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping sequence $sname" ;
-	$query = "DROP SEQUENCE $sname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_index_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='i'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping index $iname" ;
-	$query = "DROP INDEX $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_view_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='v'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping view $iname" ;
-	$query = "DROP VIEW $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub bump_sequence_to ( $$ ) {
-    my ($sth, @array, $seqname, $targetvalue) ;
-
-    $seqname = shift ;
-    $targetvalue = shift ;
-
-    do {
-	$query = "select nextval ('$seqname')" ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	@array = $sth->fetchrow_array () ;
-	$sth->finish () ;
-    } until $array[0] >= $targetvalue ;
-}
diff --git a/src/plugins/scmdarcs/packaging/install/plugin-scmdarcs b/src/plugins/scmdarcs/packaging/install/plugin-scmdarcs
index 79fa24f..7657119 100644
--- a/src/plugins/scmdarcs/packaging/install/plugin-scmdarcs
+++ b/src/plugins/scmdarcs/packaging/install/plugin-scmdarcs
@@ -1,4 +1,3 @@
-plugins/scmdarcs/bin/*		@PLUGIN_PATH@/scmdarcs/bin/
 plugins/scmdarcs/common/*               @PLUGIN_PATH@/scmdarcs/common/
 plugins/scmdarcs/db/*		@PLUGIN_PATH@/scmdarcs/lib/
 plugins/scmdarcs/etc/*.ini 		etc/@PACKAGE@/config.ini.d/
diff --git a/src/plugins/scmgit/bin/db-delete.pl b/src/plugins/scmgit/bin/db-delete.pl
deleted file mode 100755
index 8025d8f..0000000
--- a/src/plugins/scmgit/bin/db-delete.pl
+++ /dev/null
@@ -1,188 +0,0 @@
-#!/usr/bin/perl -w
-#
-# $Id: db-delete.pl,v 1.1.1.1 2005/09/22 17:32:56 rhertzog Exp $
-#
-# Debian-specific script to delete plugin-specific tables
-# Roland Mas <lolando at debian.org>
-
-use strict ;
-use diagnostics ;
-
-use DBI ;
-use MIME::Base64 ;
-
-use vars qw/$dbh @reqlist $query/ ;
-use vars qw/$sys_default_domain $sys_cvs_host
-    $sys_shell_host $sys_users_host $sys_docs_host $sys_lists_host
-    $sys_dns1_host $sys_dns2_host $FTPINCOMING_DIR $FTPFILES_DIR
-    $sys_urlroot $sf_cache_dir $sys_name $sys_themeroot
-    $sys_news_group $sys_dbhost $sys_dbname $sys_dbuser $sys_dbpasswd
-    $sys_ldap_base_dn $sys_ldap_host $admin_login $admin_password
-    $domain_name
-    $skill_list/ ;
-use vars qw/$pluginname/ ;
-
-sub is_lesser ( $$ ) ;
-sub is_greater ( $$ ) ;
-sub debug ( $ ) ;
-sub parse_sql_file ( $ ) ;
-
-require ("/usr/share/gforge/lib/include.pl") ; # Include a few predefined functions 
-require ("/usr/share/gforge/lib/sqlparser.pm") ; # Our magic SQL parser
-
-debug "You'll see some debugging info during this installation." ;
-debug "Do not worry unless told otherwise." ;
-
-&db_connect ;
-
-# debug "Connected to the database OK." ;
-
-$pluginname = "scmgit" ;
-
-$dbh->{AutoCommit} = 0;
-$dbh->{RaiseError} = 1;
-eval {
-    my ($sth, @array, $version, $action, $path, $target, $rname) ;
-
-    my $pattern = "plugin_" . $pluginname . '_%' ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='v'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_view_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='r'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_table_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='i'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_index_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='s'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_sequence_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $dbh->commit ();
-
-
-    debug "It seems your database deletion went well and smoothly.  That's cool." ;
-    debug "Please enjoy using Debian GForge." ;
-
-    # There should be a commit at the end of every block above.
-    # If there is not, then it might be symptomatic of a problem.
-    # For safety, we roll back.
-    $dbh->rollback ();
-};
-
-if ($@) {
-    warn "Transaction aborted because $@" ;
-    debug "Transaction aborted because $@" ;
-    debug "Last SQL query was:\n$query\n(end of query)" ;
-    $dbh->rollback ;
-    debug "Please report this bug on the Debian bug-tracking system." ;
-    debug "Please include the previous messages as well to help debugging." ;
-    debug "You should not worry too much about this," ;
-    debug "your DB is still in a consistent state and should be usable." ;
-    exit 1 ;
-}
-
-$dbh->rollback ;
-$dbh->disconnect ;
-
-sub debug ( $ ) {
-    my $v = shift ;
-    chomp $v ;
-    print STDERR "$v\n" ;
-}
-
-sub drop_table_if_exists ( $ ) {
-    my $tname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$tname' AND relkind='r'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping table $tname" ;
-	$query = "DROP TABLE $tname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_sequence_if_exists ( $ ) {
-    my $sname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$sname' AND relkind='S'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping sequence $sname" ;
-	$query = "DROP SEQUENCE $sname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_index_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='i'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping index $iname" ;
-	$query = "DROP INDEX $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_view_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='v'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping view $iname" ;
-	$query = "DROP VIEW $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
diff --git a/src/plugins/scmgit/bin/db-upgrade.pl b/src/plugins/scmgit/bin/db-upgrade.pl
deleted file mode 100755
index 9177b1c..0000000
--- a/src/plugins/scmgit/bin/db-upgrade.pl
+++ /dev/null
@@ -1,303 +0,0 @@
-#!/usr/bin/perl -w
-#
-# $Id: db-upgrade.pl,v 1.1.1.1 2005/09/22 17:32:56 rhertzog Exp $
-#
-# Debian-specific script to upgrade the database between releases
-# Roland Mas <lolando at debian.org>
-
-use strict ;
-use diagnostics ;
-
-use DBI ;
-use MIME::Base64 ;
-
-use vars qw/$dbh @reqlist $query/ ;
-use vars qw/$sys_default_domain $sys_cvs_host
-    $sys_shell_host $sys_users_host $sys_docs_host $sys_lists_host
-    $sys_dns1_host $sys_dns2_host $FTPINCOMING_DIR $FTPFILES_DIR
-    $sys_urlroot $sf_cache_dir $sys_name $sys_themeroot
-    $sys_news_group $sys_dbhost $sys_dbname $sys_dbuser $sys_dbpasswd
-    $sys_ldap_base_dn $sys_ldap_host $admin_login $admin_password
-    $domain_name
-    $skill_list/ ;
-use vars qw/$pluginname/ ;
-
-sub is_lesser ( $$ ) ;
-sub is_greater ( $$ ) ;
-sub debug ( $ ) ;
-sub parse_sql_file ( $ ) ;
-
-require ("/usr/share/gforge/lib/include.pl") ; # Include a few predefined functions 
-require ("/usr/share/gforge/lib/sqlparser.pm") ; # Our magic SQL parser
-
-debug "You'll see some debugging info during this installation." ;
-debug "Do not worry unless told otherwise." ;
-
-&db_connect ;
-
-# debug "Connected to the database OK." ;
-
-$pluginname = "scmgit" ;
-
-$dbh->{AutoCommit} = 0;
-$dbh->{RaiseError} = 1;
-eval {
-    my ($sth, @array, $version, $path, $target) ;
-
-    &create_metadata_table ("0") ;
-    
-    $version = &get_db_version ;
-    $target = "0.1" ;
-    if (is_lesser $version, $target) {
-	my @filelist = ( "/usr/share/gforge/plugins/$pluginname/lib/$pluginname-init.sql" ) ;
-	
-	foreach my $file (@filelist) {
-	    debug "Processing $file" ;
-	    @reqlist = @{ &parse_sql_file ($file) } ;
-	    
-	    foreach my $s (@reqlist) {
-		$query = $s ;
-		# debug $query ;
-		$sth = $dbh->prepare ($query) ;
-		$sth->execute () ;
-		$sth->finish () ;
-	    }
-	}
-	@reqlist = () ;
-	
-	&update_db_version ($target) ;
-	debug "Committing." ;
-	$dbh->commit () ;
-    }
-    
-    &update_with_sql("/usr/share/gforge/plugins/$pluginname/lib/20121019-multiple-repos.sql","0.2");
-    &update_with_sql("/usr/share/gforge/plugins/$pluginname/lib/20121123-use-shared-table.sql","0.2.1");
-    &update_with_sql("/usr/share/gforge/plugins/$pluginname/lib/20121128-drop-old-tables.sql","0.3");
-
-    debug "It seems your database install/upgrade went well and smoothly.  That's cool." ;
-    debug "Please enjoy using Debian GForge." ;
-
-    # There should be a commit at the end of every block above.
-    # If there is not, then it might be symptomatic of a problem.
-    # For safety, we roll back.
-    $dbh->rollback ();
-};
-
-if ($@) {
-    warn "Transaction aborted because $@" ;
-    debug "Transaction aborted because $@" ;
-    debug "Last SQL query was:\n$query\n(end of query)" ;
-    $dbh->rollback ;
-    debug "Please report this bug on the Debian bug-tracking system." ;
-    debug "Please include the previous messages as well to help debugging." ;
-    debug "You should not worry too much about this," ;
-    debug "your DB is still in a consistent state and should be usable." ;
-    exit 1 ;
-}
-
-$dbh->rollback ;
-$dbh->disconnect ;
-
-sub is_lesser ( $$ ) {
-    my $v1 = shift || 0 ;
-    my $v2 = shift || 0 ;
-
-    my $rc = system "dpkg --compare-versions $v1 lt $v2" ;
-
-    return (! $rc) ;
-}
-
-sub is_greater ( $$ ) {
-    my $v1 = shift || 0 ;
-    my $v2 = shift || 0 ;
-
-    my $rc = system "dpkg --compare-versions $v1 gt $v2" ;
-
-    return (! $rc) ;
-}
-
-sub debug ( $ ) {
-    my $v = shift ;
-    chomp $v ;
-    print STDERR "$v\n" ;
-}
-
-sub create_metadata_table ( $ ) {
-    my $v = shift || "0" ;
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-    # Do we have the metadata table?
-
-    $query = "SELECT count(*) FROM pg_class WHERE relname = '$tablename' and relkind = 'r'";
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    # Let's create this table if we have it not
-
-    if ($array [0] == 0) {
-	debug "Creating $tablename table." ;
-	$query = "CREATE TABLE $tablename (key varchar primary key, value text not null)" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-
-    $query = "SELECT count(*) FROM $tablename WHERE key = 'db-version'";
-    # debug $query ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    # Empty table?  We'll have to fill it up a bit
-
-    if ($array [0] == 0) {
-	debug "Inserting first data into $tablename table." ;
-	$query = "INSERT INTO $tablename (key, value) VALUES ('db-version', '$v')" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub update_db_version ( $ ) {
-    my $v = shift or die "Not enough arguments" ;
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-
-    debug "Updating $tablename table." ;
-    $query = "UPDATE $tablename SET value = '$v' WHERE key = 'db-version'" ;
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    $sth->finish () ;
-}
-
-sub get_db_version () {
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-
-    $query = "SELECT value FROM $tablename WHERE key = 'db-version'" ;
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    my $version = $array [0] ;
-
-    return $version ;
-}
-
-sub drop_table_if_exists ( $ ) {
-    my $tname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$tname' AND relkind='r'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping table $tname" ;
-	$query = "DROP TABLE $tname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_sequence_if_exists ( $ ) {
-    my $sname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$sname' AND relkind='S'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping sequence $sname" ;
-	$query = "DROP SEQUENCE $sname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_index_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='i'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping index $iname" ;
-	$query = "DROP INDEX $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_view_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='v'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping view $iname" ;
-	$query = "DROP VIEW $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub bump_sequence_to ( $$ ) {
-    my ($sth, @array, $seqname, $targetvalue) ;
-
-    $seqname = shift ;
-    $targetvalue = shift ;
-
-    do {
-	$query = "select nextval ('$seqname')" ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	@array = $sth->fetchrow_array () ;
-	$sth->finish () ;
-    } until $array[0] >= $targetvalue ;
-}
-
-sub update_with_sql ( $$ ) {
-    my $sqlfile = shift or die "Not enough arguments" ;
-    my $target = shift or die "Not enough arguments" ;
-    $sqlfile =~ s/\.sql$//;
-    my $version = &get_db_version ;
-    if (&is_lesser ($version, $target)) {
-        &debug ("Upgrading database with $sqlfile.sql") ;
-
-        @reqlist = @{ &parse_sql_file ("$sqlfile.sql") } ;
-        foreach my $s (@reqlist) {
-            my $query = $s ;
-            # debug $query ;
-            my $sth = $dbh->prepare ($query) ;
-            $sth->execute () ;
-            $sth->finish () ;
-        }
-        @reqlist = () ;
-
-        &update_db_version ($target) ;
-        &debug ("...OK.") ;
-        $dbh->commit () ;
-    }
-}
diff --git a/src/plugins/scmgit/packaging/install/plugin-scmgit b/src/plugins/scmgit/packaging/install/plugin-scmgit
index 912389f..fd386ac 100644
--- a/src/plugins/scmgit/packaging/install/plugin-scmgit
+++ b/src/plugins/scmgit/packaging/install/plugin-scmgit
@@ -1,4 +1,3 @@
-plugins/scmgit/bin/*		@PLUGIN_PATH@/scmgit/bin/
 plugins/scmgit/common/*		@PLUGIN_PATH@/scmgit/common/
 plugins/scmgit/www/*            @PLUGIN_PATH@/scmgit/www/
 plugins/scmgit/db/*		@PLUGIN_PATH@/scmgit/lib/
diff --git a/src/plugins/scmhook/bin/db-delete.pl b/src/plugins/scmhook/bin/db-delete.pl
deleted file mode 100755
index b1e9946..0000000
--- a/src/plugins/scmhook/bin/db-delete.pl
+++ /dev/null
@@ -1,186 +0,0 @@
-#!/usr/bin/perl -w
-#
-# Debian-specific script to delete plugin-specific tables
-# Roland Mas <lolando at debian.org>
-
-use strict ;
-use diagnostics ;
-
-use DBI ;
-use MIME::Base64 ;
-
-use vars qw/$dbh @reqlist $query/ ;
-use vars qw/$sys_default_domain $sys_cvs_host
-    $sys_shell_host $sys_users_host $sys_docs_host $sys_lists_host
-    $sys_dns1_host $sys_dns2_host $FTPINCOMING_DIR $FTPFILES_DIR
-    $sys_urlroot $sf_cache_dir $sys_name $sys_themeroot
-    $sys_news_group $sys_dbhost $sys_dbname $sys_dbuser $sys_dbpasswd
-    $sys_ldap_base_dn $sys_ldap_host $admin_login $admin_password
-    $domain_name
-    $skill_list/ ;
-use vars qw/$pluginname/ ;
-
-sub is_lesser ( $$ ) ;
-sub is_greater ( $$ ) ;
-sub debug ( $ ) ;
-sub parse_sql_file ( $ ) ;
-
-require ("/usr/share/gforge/lib/include.pl") ; # Include a few predefined functions 
-require ("/usr/share/gforge/lib/sqlparser.pm") ; # Our magic SQL parser
-
-debug "You'll see some debugging info during this installation." ;
-debug "Do not worry unless told otherwise." ;
-
-&db_connect ;
-
-# debug "Connected to the database OK." ;
-
-$pluginname = "scmhook" ;
-
-$dbh->{AutoCommit} = 0;
-$dbh->{RaiseError} = 1;
-eval {
-    my ($sth, @array, $version, $action, $path, $target, $rname) ;
-
-    my $pattern = "plugin_" . $pluginname . '_%' ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='v'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_view_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='r'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_table_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='i'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_index_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='s'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_sequence_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $dbh->commit ();
-
-
-    debug "It seems your database deletion went well and smoothly.  That's cool." ;
-    debug "Please enjoy using Debian FusionForge." ;
-
-    # There should be a commit at the end of every block above.
-    # If there is not, then it might be symptomatic of a problem.
-    # For safety, we roll back.
-    $dbh->rollback ();
-};
-
-if ($@) {
-    warn "Transaction aborted because $@" ;
-    debug "Transaction aborted because $@" ;
-    debug "Last SQL query was:\n$query\n(end of query)" ;
-    $dbh->rollback ;
-    debug "Please report this bug on the Debian bug-tracking system." ;
-    debug "Please include the previous messages as well to help debugging." ;
-    debug "You should not worry too much about this," ;
-    debug "your DB is still in a consistent state and should be usable." ;
-    exit 1 ;
-}
-
-$dbh->rollback ;
-$dbh->disconnect ;
-
-sub debug ( $ ) {
-    my $v = shift ;
-    chomp $v ;
-    print STDERR "$v\n" ;
-}
-
-sub drop_table_if_exists ( $ ) {
-    my $tname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$tname' AND relkind='r'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping table $tname" ;
-	$query = "DROP TABLE $tname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_sequence_if_exists ( $ ) {
-    my $sname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$sname' AND relkind='S'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping sequence $sname" ;
-	$query = "DROP SEQUENCE $sname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_index_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='i'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping index $iname" ;
-	$query = "DROP INDEX $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_view_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='v'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping view $iname" ;
-	$query = "DROP VIEW $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
diff --git a/src/plugins/scmhook/bin/db-upgrade.pl b/src/plugins/scmhook/bin/db-upgrade.pl
deleted file mode 100755
index 588b637..0000000
--- a/src/plugins/scmhook/bin/db-upgrade.pl
+++ /dev/null
@@ -1,299 +0,0 @@
-#!/usr/bin/perl -w
-#
-# Debian-specific script to upgrade the database between releases
-# Roland Mas <lolando at debian.org>
-
-use strict ;
-use diagnostics ;
-
-use DBI ;
-use MIME::Base64 ;
-
-use vars qw/$dbh @reqlist $query/ ;
-use vars qw/$sys_default_domain $sys_cvs_host
-    $sys_shell_host $sys_users_host $sys_docs_host $sys_lists_host
-    $sys_dns1_host $sys_dns2_host $FTPINCOMING_DIR $FTPFILES_DIR
-    $sys_urlroot $sf_cache_dir $sys_name $sys_themeroot
-    $sys_news_group $sys_dbhost $sys_dbname $sys_dbuser $sys_dbpasswd
-    $sys_ldap_base_dn $sys_ldap_host $admin_login $admin_password
-    $domain_name
-    $skill_list/ ;
-use vars qw/$pluginname/ ;
-
-sub is_lesser ( $$ ) ;
-sub is_greater ( $$ ) ;
-sub debug ( $ ) ;
-sub parse_sql_file ( $ ) ;
-
-require ("/usr/share/gforge/lib/include.pl") ; # Include a few predefined functions 
-require ("/usr/share/gforge/lib/sqlparser.pm") ; # Our magic SQL parser
-
-debug "You'll see some debugging info during this installation." ;
-debug "Do not worry unless told otherwise." ;
-
-&db_connect ;
-
-# debug "Connected to the database OK." ;
-
-$pluginname = "scmhook" ;
-
-$dbh->{AutoCommit} = 0;
-$dbh->{RaiseError} = 1;
-eval {
-    my ($sth, @array, $version, $path, $target) ;
-
-    &create_metadata_table ("0") ;
-    
-    $version = &get_db_version ;
-    $target = "0.1" ;
-    if (is_lesser $version, $target) {
-	my @filelist = ( "/usr/share/gforge/plugins/$pluginname/db/$pluginname-init.sql" ) ;
-	
-	foreach my $file (@filelist) {
-	    debug "Processing $file" ;
-	    @reqlist = @{ &parse_sql_file ($file) } ;
-	    
-	    foreach my $s (@reqlist) {
-		$query = $s ;
-		# debug $query ;
-		$sth = $dbh->prepare ($query) ;
-		$sth->execute () ;
-		$sth->finish () ;
-	    }
-	}
-	@reqlist = () ;
-	
-	&update_db_version ($target) ;
-	debug "Committing." ;
-	$dbh->commit () ;
-    }
-
-    &update_with_sql("/usr/share/gforge/plugins/$pluginname/db/20130702-create_scmhook_git_committracker.sql","0.2");
-    
-    debug "It seems your database install/upgrade went well and smoothly.  That's cool." ;
-    debug "Please enjoy using Debian FusionForge." ;
-
-    # There should be a commit at the end of every block above.
-    # If there is not, then it might be symptomatic of a problem.
-    # For safety, we roll back.
-    $dbh->rollback ();
-};
-
-if ($@) {
-    warn "Transaction aborted because $@" ;
-    debug "Transaction aborted because $@" ;
-    debug "Last SQL query was:\n$query\n(end of query)" ;
-    $dbh->rollback ;
-    debug "Please report this bug on the Debian bug-tracking system." ;
-    debug "Please include the previous messages as well to help debugging." ;
-    debug "You should not worry too much about this," ;
-    debug "your DB is still in a consistent state and should be usable." ;
-    exit 1 ;
-}
-
-$dbh->rollback ;
-$dbh->disconnect ;
-
-sub is_lesser ( $$ ) {
-    my $v1 = shift || 0 ;
-    my $v2 = shift || 0 ;
-
-    my $rc = system "dpkg --compare-versions $v1 lt $v2" ;
-
-    return (! $rc) ;
-}
-
-sub is_greater ( $$ ) {
-    my $v1 = shift || 0 ;
-    my $v2 = shift || 0 ;
-
-    my $rc = system "dpkg --compare-versions $v1 gt $v2" ;
-
-    return (! $rc) ;
-}
-
-sub debug ( $ ) {
-    my $v = shift ;
-    chomp $v ;
-    print STDERR "$v\n" ;
-}
-
-sub create_metadata_table ( $ ) {
-    my $v = shift || "0" ;
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-    # Do we have the metadata table?
-
-    $query = "SELECT count(*) FROM pg_class WHERE relname = '$tablename' and relkind = 'r'";
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    # Let's create this table if we have it not
-
-    if ($array [0] == 0) {
-	debug "Creating $tablename table." ;
-	$query = "CREATE TABLE $tablename (key varchar primary key, value text not null)" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-
-    $query = "SELECT count(*) FROM $tablename WHERE key = 'db-version'";
-    # debug $query ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    # Empty table?  We'll have to fill it up a bit
-
-    if ($array [0] == 0) {
-	debug "Inserting first data into $tablename table." ;
-	$query = "INSERT INTO $tablename (key, value) VALUES ('db-version', '$v')" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub update_db_version ( $ ) {
-    my $v = shift or die "Not enough arguments" ;
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-
-    debug "Updating $tablename table." ;
-    $query = "UPDATE $tablename SET value = '$v' WHERE key = 'db-version'" ;
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    $sth->finish () ;
-}
-
-sub get_db_version () {
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-
-    $query = "SELECT value FROM $tablename WHERE key = 'db-version'" ;
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    my $version = $array [0] ;
-
-    return $version ;
-}
-
-sub drop_table_if_exists ( $ ) {
-    my $tname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$tname' AND relkind='r'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping table $tname" ;
-	$query = "DROP TABLE $tname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_sequence_if_exists ( $ ) {
-    my $sname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$sname' AND relkind='S'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping sequence $sname" ;
-	$query = "DROP SEQUENCE $sname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_index_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='i'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping index $iname" ;
-	$query = "DROP INDEX $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_view_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='v'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping view $iname" ;
-	$query = "DROP VIEW $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub bump_sequence_to ( $$ ) {
-    my ($sth, @array, $seqname, $targetvalue) ;
-
-    $seqname = shift ;
-    $targetvalue = shift ;
-
-    do {
-	$query = "select nextval ('$seqname')" ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	@array = $sth->fetchrow_array () ;
-	$sth->finish () ;
-    } until $array[0] >= $targetvalue ;
-}
-
-sub update_with_sql ( $$ ) {
-    my $sqlfile = shift or die "Not enough arguments" ;
-    my $target = shift or die "Not enough arguments" ;
-    $sqlfile =~ s/\.sql$//;
-    my $version = &get_db_version ;
-    if (&is_lesser ($version, $target)) {
-        &debug ("Upgrading database with $sqlfile.sql") ;
-
-        @reqlist = @{ &parse_sql_file ("$sqlfile.sql") } ;
-        foreach my $s (@reqlist) {
-            my $query = $s ;
-            # debug $query ;
-            my $sth = $dbh->prepare ($query) ;
-            $sth->execute () ;
-            $sth->finish () ;
-        }
-        @reqlist = () ;
-
-        &update_db_version ($target) ;
-        &debug ("...OK.") ;
-        $dbh->commit () ;
-    }
-}
diff --git a/src/plugins/scmhook/packaging/install/plugin-scmhook b/src/plugins/scmhook/packaging/install/plugin-scmhook
index cc7283f..af57dd4 100644
--- a/src/plugins/scmhook/packaging/install/plugin-scmhook
+++ b/src/plugins/scmhook/packaging/install/plugin-scmhook
@@ -1,7 +1,6 @@
 plugins/scmhook/common/*	@PLUGIN_PATH@/scmhook/common/
 plugins/scmhook/www/*		@PLUGIN_PATH@/scmhook/www/
 plugins/scmhook/db/*		@PLUGIN_PATH@/scmhook/db/
-plugins/scmhook/bin/*		@PLUGIN_PATH@/scmhook/bin/
 plugins/scmhook/library/*	@PLUGIN_PATH@/scmhook/library/
 plugins/scmhook/etc/*.ini	etc/@PACKAGE@/config.ini.d/
 plugins/scmhook/cronjobs/*	@PLUGIN_PATH@/scmhook/cronjobs/
diff --git a/src/plugins/soapadmin/bin/db-delete.pl b/src/plugins/soapadmin/bin/db-delete.pl
deleted file mode 100755
index 193b8cb..0000000
--- a/src/plugins/soapadmin/bin/db-delete.pl
+++ /dev/null
@@ -1,186 +0,0 @@
-#!/usr/bin/perl -w
-#
-# Debian-specific script to delete plugin-specific tables
-# Roland Mas <lolando at debian.org>
-
-use strict ;
-use diagnostics ;
-
-use DBI ;
-use MIME::Base64 ;
-
-use vars qw/$dbh @reqlist $query/ ;
-use vars qw/$sys_default_domain $sys_cvs_host
-    $sys_shell_host $sys_users_host $sys_docs_host $sys_lists_host
-    $sys_dns1_host $sys_dns2_host $FTPINCOMING_DIR $FTPFILES_DIR
-    $sys_urlroot $sf_cache_dir $sys_name $sys_themeroot
-    $sys_news_group $sys_dbhost $sys_dbname $sys_dbuser $sys_dbpasswd
-    $sys_ldap_base_dn $sys_ldap_host $admin_login $admin_password
-    $server_admin $domain_name
-    $skill_list/ ;
-use vars qw/$pluginname/ ;
-
-sub is_lesser ( $$ ) ;
-sub is_greater ( $$ ) ;
-sub debug ( $ ) ;
-sub parse_sql_file ( $ ) ;
-
-require ("/usr/share/gforge/lib/include.pl") ; # Include a few predefined functions 
-require ("/usr/share/gforge/lib/sqlparser.pm") ; # Our magic SQL parser
-
-debug "You'll see some debugging info during this installation." ;
-debug "Do not worry unless told otherwise." ;
-
-&db_connect ;
-
-# debug "Connected to the database OK." ;
-
-$pluginname = "soapadmin" ;
-
-$dbh->{AutoCommit} = 0;
-$dbh->{RaiseError} = 1;
-eval {
-    my ($sth, @array, $version, $action, $path, $target, $rname) ;
-
-    my $pattern = "plugin_" . $pluginname . '_%' ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='v'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_view_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='r'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_table_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='i'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_index_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='s'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    while (@array = $sth->fetchrow_array ()) {
-	$rname = $array [0] ;
-	&drop_sequence_if_exists ($rname) ;
-    }
-    $sth->finish () ;
-
-    $dbh->commit ();
-
-
-    debug "It seems your database deletion went well and smoothly.  That's cool." ;
-    debug "Please enjoy using Debian FusionForge." ;
-
-    # There should be a commit at the end of every block above.
-    # If there is not, then it might be symptomatic of a problem.
-    # For safety, we roll back.
-    $dbh->rollback ();
-};
-
-if ($@) {
-    warn "Transaction aborted because $@" ;
-    debug "Transaction aborted because $@" ;
-    debug "Last SQL query was:\n$query\n(end of query)" ;
-    $dbh->rollback ;
-    debug "Please report this bug on the Debian bug-tracking system." ;
-    debug "Please include the previous messages as well to help debugging." ;
-    debug "You should not worry too much about this," ;
-    debug "your DB is still in a consistent state and should be usable." ;
-    exit 1 ;
-}
-
-$dbh->rollback ;
-$dbh->disconnect ;
-
-sub debug ( $ ) {
-    my $v = shift ;
-    chomp $v ;
-    print STDERR "$v\n" ;
-}
-
-sub drop_table_if_exists ( $ ) {
-    my $tname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$tname' AND relkind='r'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping table $tname" ;
-	$query = "DROP TABLE $tname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_sequence_if_exists ( $ ) {
-    my $sname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$sname' AND relkind='S'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping sequence $sname" ;
-	$query = "DROP SEQUENCE $sname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_index_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='i'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping index $iname" ;
-	$query = "DROP INDEX $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_view_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='v'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping view $iname" ;
-	$query = "DROP VIEW $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
diff --git a/src/plugins/soapadmin/bin/db-upgrade.pl b/src/plugins/soapadmin/bin/db-upgrade.pl
deleted file mode 100755
index 9dc2d0e..0000000
--- a/src/plugins/soapadmin/bin/db-upgrade.pl
+++ /dev/null
@@ -1,300 +0,0 @@
-#!/usr/bin/perl -w
-#
-# Debian-specific script to upgrade the database between releases
-# Roland Mas <lolando at debian.org>
-
-use strict ;
-use diagnostics ;
-
-use DBI ;
-use MIME::Base64 ;
-
-use vars qw/$dbh @reqlist $query/ ;
-use vars qw/$sys_default_domain $sys_cvs_host
-    $sys_shell_host $sys_users_host $sys_docs_host $sys_lists_host
-    $sys_dns1_host $sys_dns2_host $FTPINCOMING_DIR $FTPFILES_DIR
-    $sys_urlroot $sf_cache_dir $sys_name $sys_themeroot
-    $sys_news_group $sys_dbhost $sys_dbname $sys_dbuser $sys_dbpasswd
-    $sys_ldap_base_dn $sys_ldap_host $admin_login $admin_password
-    $server_admin $domain_name
-    $skill_list/ ;
-use vars qw/$pluginname/ ;
-
-sub is_lesser ( $$ ) ;
-sub is_greater ( $$ ) ;
-sub debug ( $ ) ;
-sub parse_sql_file ( $ ) ;
-
-require ("/usr/share/gforge/lib/include.pl") ; # Include a few predefined functions 
-require ("/usr/share/gforge/lib/sqlparser.pm") ; # Our magic SQL parser
-
-debug "You'll see some debugging info during this installation." ;
-debug "Do not worry unless told otherwise." ;
-
-&db_connect ;
-
-# debug "Connected to the database OK." ;
-
-$pluginname = "soapadmin" ;
-
-$dbh->{AutoCommit} = 0;
-$dbh->{RaiseError} = 1;
-eval {
-    my ($sth, @array, $version, $path, $target) ;
-
-    &create_metadata_table ("0") ;
-    
-    $version = &get_db_version ;
-    $target = "0.1" ;
-    if (is_lesser $version, $target) {
-	my @filelist = ( "/usr/share/gforge/plugins/$pluginname/db/$pluginname-init.sql" ) ;
-	
-	foreach my $file (@filelist) {
-	    debug "Processing $file" ;
-	    @reqlist = @{ &parse_sql_file ($file) } ;
-	    
-	    foreach my $s (@reqlist) {
-		$query = $s ;
-		# debug $query ;
-		$sth = $dbh->prepare ($query) ;
-		$sth->execute () ;
-		$sth->finish () ;
-	    }
-	}
-	@reqlist = () ;
-	
-	&update_db_version ($target) ;
-	debug "Committing." ;
-	$dbh->commit () ;
-    }
-    
-#    $version = &get_db_version ;
-#    $target = "0.2" ;
-#    if (is_lesser $version, $target) {
-#	debug "Adding local data." ;
-#	
-#	do "/etc/gforge/local.pl" or die "Cannot read /etc/gforge/local.pl" ;
-#	
-#	my $ip_address = qx/host $domain_name | awk '{print \}'/ ;
-#	
-#	@reqlist = (
-#		    "INSERT INTO plugin_".$pluginname."_sample_data (domain, ip_address) VALUES ('$domain_name', '$ip_address')",
-#		    ) ;
-#	
-#	foreach my $s (@reqlist) {
-#	    $query = $s ;
-#	    # debug $query ;
-#	    $sth = $dbh->prepare ($query) ;
-#	    $sth->execute () ;
-#	    $sth->finish () ;
-#	}
-#	@reqlist = () ;
-#	
-#	&update_db_version ($target) ;
-#	debug "Committing." ;
-#	$dbh->commit () ;
-#    }
-
-    debug "It seems your database install/upgrade went well and smoothly.  That's cool." ;
-    debug "Please enjoy using Debian FusionForge." ;
-
-    # There should be a commit at the end of every block above.
-    # If there is not, then it might be symptomatic of a problem.
-    # For safety, we roll back.
-    $dbh->rollback ();
-};
-
-if ($@) {
-    warn "Transaction aborted because $@" ;
-    debug "Transaction aborted because $@" ;
-    debug "Last SQL query was:\n$query\n(end of query)" ;
-    $dbh->rollback ;
-    debug "Please report this bug on the Debian bug-tracking system." ;
-    debug "Please include the previous messages as well to help debugging." ;
-    debug "You should not worry too much about this," ;
-    debug "your DB is still in a consistent state and should be usable." ;
-    exit 1 ;
-}
-
-$dbh->rollback ;
-$dbh->disconnect ;
-
-sub is_lesser ( $$ ) {
-    my $v1 = shift || 0 ;
-    my $v2 = shift || 0 ;
-
-    my $rc = system "dpkg --compare-versions $v1 lt $v2" ;
-
-    return (! $rc) ;
-}
-
-sub is_greater ( $$ ) {
-    my $v1 = shift || 0 ;
-    my $v2 = shift || 0 ;
-
-    my $rc = system "dpkg --compare-versions $v1 gt $v2" ;
-
-    return (! $rc) ;
-}
-
-sub debug ( $ ) {
-    my $v = shift ;
-    chomp $v ;
-    print STDERR "$v\n" ;
-}
-
-sub create_metadata_table ( $ ) {
-    my $v = shift || "0" ;
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-    # Do we have the metadata table?
-
-    $query = "SELECT count(*) FROM pg_class WHERE relname = '$tablename' and relkind = 'r'";
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    # Let's create this table if we have it not
-
-    if ($array [0] == 0) {
-	debug "Creating $tablename table." ;
-	$query = "CREATE TABLE $tablename (key varchar primary key, value text not null)" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-
-    $query = "SELECT count(*) FROM $tablename WHERE key = 'db-version'";
-    # debug $query ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    # Empty table?  We'll have to fill it up a bit
-
-    if ($array [0] == 0) {
-	debug "Inserting first data into $tablename table." ;
-	$query = "INSERT INTO $tablename (key, value) VALUES ('db-version', '$v')" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub update_db_version ( $ ) {
-    my $v = shift or die "Not enough arguments" ;
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-
-    debug "Updating $tablename table." ;
-    $query = "UPDATE $tablename SET value = '$v' WHERE key = 'db-version'" ;
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    $sth->finish () ;
-}
-
-sub get_db_version () {
-    my $tablename = "plugin_" .$pluginname . "_meta_data" ;
-
-    $query = "SELECT value FROM $tablename WHERE key = 'db-version'" ;
-    # debug $query ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    my $version = $array [0] ;
-
-    return $version ;
-}
-
-sub drop_table_if_exists ( $ ) {
-    my $tname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$tname' AND relkind='r'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping table $tname" ;
-	$query = "DROP TABLE $tname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_sequence_if_exists ( $ ) {
-    my $sname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$sname' AND relkind='S'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping sequence $sname" ;
-	$query = "DROP SEQUENCE $sname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_index_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='i'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping index $iname" ;
-	$query = "DROP INDEX $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub drop_view_if_exists ( $ ) {
-    my $iname = shift or die  "Not enough arguments" ;
-    $query = "SELECT count(*) FROM pg_class WHERE relname='$iname' AND relkind='v'" ;
-    my $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    my @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array [0] != 0) {
-	# debug "Dropping view $iname" ;
-	$query = "DROP VIEW $iname" ;
-	# debug $query ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-    }
-}
-
-sub bump_sequence_to ( $$ ) {
-    my ($sth, @array, $seqname, $targetvalue) ;
-
-    $seqname = shift ;
-    $targetvalue = shift ;
-
-    do {
-	$query = "select nextval ('$seqname')" ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	@array = $sth->fetchrow_array () ;
-	$sth->finish () ;
-    } until $array[0] >= $targetvalue ;
-}

commit 2e290d8597f5370ec4341e5add1b85c1faac0c2f
Author: Sylvain Beucler <beuc at beuc.net>
Date:   Sun Apr 6 19:38:41 2014 +0200

    packaging: make upgrade-db.php handle unattented plugin activation

diff --git a/src/db/upgrade-db.php b/src/db/upgrade-db.php
index 4ba2eeb..027137e 100755
--- a/src/db/upgrade-db.php
+++ b/src/db/upgrade-db.php
@@ -79,16 +79,28 @@ if ($argc == 1 || $argv[1] == 'all') {
 	}
 }
 
-// Upgrade activated plugins.
 if ($argc == 2) {
-	require_once $gfcommon.'include/DatabaseInstaller.class.php';
-	$plugins = get_installed_plugins();
-	foreach ($plugins as $plugin) {
-		if ($argv[1] == 'all' || $argv[1] == $plugin) {
-			$di = new DatabaseInstaller($plugin, dirname($db_path) . '/plugins/' . $plugin . '/db');
-			echo $di->upgrade();
+        if ($argv[1] == 'all') {
+                // Upgrade activated plugins.
+                require_once $gfcommon.'include/DatabaseInstaller.class.php';
+                $plugins = get_installed_plugins();
+                foreach ($plugins as $plugin) {
+                        if ($argv[1] == 'all') {
+                                $di = new DatabaseInstaller($plugin, dirname($db_path) . '/plugins/' . $plugin . '/db');
+                                echo $di->upgrade();
+                        }
+                }
+        } else {
+		// Upgrade a specific plugin, activating it if necessary (useful for packaging)
+                $pluginname = $argv[1];
+                $pm = plugin_manager_get_object();
+                if (!$pm->PluginIsInstalled($pluginname)) {
+			$pm->activate($pluginname);
+			$pm->LoadPlugins();
 		}
-	}
+		$plugin = $pm->GetPluginObject($pluginname);
+		$plugin->installDatabase();  // and upgrade
+        }
 }
 
 function get_installed_plugins() {

commit f0af9ad9cd38e7220b1d7b831f703dcb6f1fb3cf
Author: Sylvain Beucler <beuc at beuc.net>
Date:   Sun Apr 6 19:37:23 2014 +0200

    packaging: convert Debian plugin upgrades tracking

diff --git a/src/db/20140406-convert-debian-plugin-upgrade.php b/src/db/20140406-convert-debian-plugin-upgrade.php
new file mode 100644
index 0000000..abb4ad9
--- /dev/null
+++ b/src/db/20140406-convert-debian-plugin-upgrade.php
@@ -0,0 +1,73 @@
+<?php
+/**
+ * Convert Debian plugin upgrades tracking
+ *
+ * Copyright (C) 2014  Sylvain Beucler
+ *
+ * This file is part of FusionForge. FusionForge is free software;
+ * you can redistribute it and/or modify it under the terms of the
+ * GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the Licence, or (at your option)
+ * any later version.
+ *
+ * FusionForge is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with FusionForge; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+// Debian used a plugin_$name_metadata table to track updates, with a schema version number
+// FusionForge 5.3 tracks updates with a $name:$script_name entry in database_changes
+
+require_once(dirname(__FILE__).'/../common/include/env.inc.php');
+require_once($gfcommon.'include/pre.php');
+
+function is_less_than($old, $new) {
+	return !exec("dpkg --compare-versions $old lt $new");
+}
+
+// Convert scmgit
+if (db_check_table_exists('plugin_scmgit_meta_data')) {
+	$res = db_query_params("SELECT value FROM plugin_scmgit_meta_data WHERE key=$1", array('db-version'));
+	$version = db_result($res, 0, 'value');
+	print "  Converting scmgit, db version $version\n";
+	if (is_less_than($version, '0.2'))
+		db_query_params("INSERT INTO database_changes VALUES ('scmgit:20121019-multiple-repos.sql')", array());
+	if (is_less_than($version, '0.2.1'))
+		db_query_params("INSERT INTO database_changes VALUES ('scmgit:20121123-use-shared-table.sql')", array());
+	if (is_less_than($version, '0.3'))
+		db_query_params("INSERT INTO database_changes VALUES ('scmgit:20121128-drop-old-tables.sql')", array());
+}
+
+// Convert scmhook
+if (db_check_table_exists('plugin_scmhook_meta_data')) {
+	$res = db_query_params("SELECT value FROM plugin_scmhook_meta_data WHERE key=$1", array('db-version'));
+	$version = db_result($res, 0, 'value');
+	print "  Converting scmhook, db version $version\n";
+	if (is_less_than($version, '0.2'))
+		db_query_params("INSERT INTO database_changes VALUES ('scmhook:20130702-create_scmhook_git_committracker.sql')", array());
+}
+
+// Convert headermenu
+if (db_check_table_exists('plugin_headermenu_meta_data')) {
+	print "  Converting headermenu, db version 0.1\n";
+	foreach(['headermenu:20120930-addoutermenusupport.sql',
+		 'headermenu:20121231-reorderentry.sql',
+		 'headermenu:20130120-addprojectcolumn.sql'] as $filename)
+		db_query_params("INSERT INTO database_changes VALUES ($1)", array($filename));
+}
+
+// Plugins 'block', 'cvstracker' and 'wiki' also have db upgrades, but
+// AFAICS the Debian packaging didn't apply them.
+
+
+// Drop old tables
+$res = db_query_params("SELECT relname FROM pg_class WHERE relname LIKE 'plugin_%_meta_data' AND relkind='r'", array());
+while($row = db_fetch_array($res)) {
+	print "  Dropping {$row['relname']}\n";
+	db_drop_table_if_exists($row['relname']);
+}

commit 0b5045276eba6dc4ce4220602af453d66bc8ca7a
Author: Sylvain Beucler <beuc at beuc.net>
Date:   Sun Apr 6 19:36:07 2014 +0200

    packaging: group triggers file(s) along with control/install/doc/etc.

diff --git a/src/plugins/mediawiki/packaging/triggers/plugin-mediawiki b/src/plugins/mediawiki/packaging/triggers/plugin-mediawiki
new file mode 100644
index 0000000..298d5c7
--- /dev/null
+++ b/src/plugins/mediawiki/packaging/triggers/plugin-mediawiki
@@ -0,0 +1,3 @@
+# Triggers for @PACKAGE at -plugin-mediawiki
+interest /usr/share/mediawiki
+interest /usr/share/mediawiki-extensions

commit 3ee8ec387b3ce94f7cdf4bbe7e5b1affeedda469
Author: Sylvain Beucler <beuc at beuc.net>
Date:   Sun Apr 6 19:33:13 2014 +0200

    packaging: add scmhook plugin to fusionforge-full

diff --git a/src/packaging/control/012meta-full b/src/packaging/control/012meta-full
index 0771117..a4bc74a 100644
--- a/src/packaging/control/012meta-full
+++ b/src/packaging/control/012meta-full
@@ -3,5 +3,5 @@ Architecture: all
 Conflicts: sourceforge, @OLDPACKAGE at -cvs, @OLDPACKAGE at -common (<< ${source:Version}), @OLDPACKAGE@
 Replaces: @OLDPACKAGE@
 Provides: @OLDPACKAGE@
-Depends: debconf (>= 1.0.32) | debconf-2.0, ucf, @OLDPACKAGE at -common (=${source:Version}), @OLDPACKAGE at -web-apache2 | @OLDPACKAGE at -web, @OLDPACKAGE at -web-apache2-vhosts, @OLDPACKAGE at -db-postgresql | @OLDPACKAGE at -db, @OLDPACKAGE at -mta-exim4 | @OLDPACKAGE at -mta, @OLDPACKAGE at -shell-postgresql | @OLDPACKAGE at -shell, @OLDPACKAGE at -lists-mailman | @OLDPACKAGE at -lists, @PACKAGE at -plugin-contribtracker, @PACKAGE at -plugin-headermenu, @PACKAGE at -plugin-globalsearch, @PACKAGE at -plugin-mediawiki, @PACKAGE at -plugin-moinmoin, @PACKAGE at -plugin-projectlabels, @PACKAGE at -plugin-scmarch, @PACKAGE at -plugin-scmbzr, @PACKAGE at -plugin-scmcvs, @PACKAGE at -plugin-scmdarcs, @PACKAGE at -plugin-scmgit, @PACKAGE at -plugin-scmhg, @PACKAGE at -plugin-scmsvn, @PACKAGE at -plugin-blocks, @PACKAGE at -plugin-hudson, ${misc:Depends}
+Depends: debconf (>= 1.0.32) | debconf-2.0, ucf, @OLDPACKAGE at -common (=${source:Version}), @OLDPACKAGE at -web-apache2 | @OLDPACKAGE at -web, @OLDPACKAGE at -web-apache2-vhosts, @OLDPACKAGE at -db-postgresql | @OLDPACKAGE at -db, @OLDPACKAGE at -mta-exim4 | @OLDPACKAGE at -mta, @OLDPACKAGE at -shell-postgresql | @OLDPACKAGE at -shell, @OLDPACKAGE at -lists-mailman | @OLDPACKAGE at -lists, @PACKAGE at -plugin-contribtracker, @PACKAGE at -plugin-headermenu, @PACKAGE at -plugin-globalsearch, @PACKAGE at -plugin-mediawiki, @PACKAGE at -plugin-moinmoin, @PACKAGE at -plugin-projectlabels, @PACKAGE at -plugin-scmarch, @PACKAGE at -plugin-scmbzr, @PACKAGE at -plugin-scmcvs, @PACKAGE at -plugin-scmdarcs, @PACKAGE at -plugin-scmgit, @PACKAGE at -plugin-scmhg, @PACKAGE at -plugin-scmsvn, @PACKAGE at -plugin-blocks, @PACKAGE at -plugin-hudson, @PACKAGE at -plugin-scmhook, ${misc:Depends}
 Description: FusionForge collaborative development tool - full metapackage

-----------------------------------------------------------------------

Summary of changes:
 src/db/20140406-convert-debian-plugin-upgrade.php  |   73 +++++
 src/db/upgrade-db.php                              |   28 +-
 src/packaging/control/012meta-full                 |    2 +-
 src/plugins/authopenid/bin/db-delete.pl            |  186 ------------
 src/plugins/authopenid/bin/db-upgrade.pl           |  298 -------------------
 .../authopenid/packaging/install/plugin-authopenid |    2 -
 src/plugins/authwebid/bin/db-delete.pl             |  186 ------------
 src/plugins/authwebid/bin/db-upgrade.pl            |  298 -------------------
 .../authwebid/packaging/install/plugin-authwebid   |    2 -
 src/plugins/blocks/bin/db-delete.pl                |  186 ------------
 src/plugins/blocks/bin/db-upgrade.pl               |  273 -----------------
 src/plugins/blocks/packaging/install/plugin-blocks |    1 -
 src/plugins/contribtracker/bin/db-delete.pl        |  192 ------------
 src/plugins/contribtracker/bin/db-upgrade.pl       |  273 -----------------
 .../packaging/install/plugin-contribtracker        |    1 -
 src/plugins/externalsearch/bin/db-delete.pl        |  186 ------------
 src/plugins/externalsearch/bin/db-upgrade.pl       |  298 -------------------
 src/plugins/extsubproj/bin/db-delete.pl            |  186 ------------
 src/plugins/extsubproj/bin/db-upgrade.pl           |  300 -------------------
 .../extsubproj/packaging/install/plugin-extsubproj |    1 -
 src/plugins/forumml/bin/db-upgrade.pl              |  273 -----------------
 src/plugins/globaldashboard/bin/db-delete.pl       |  186 ------------
 src/plugins/globaldashboard/bin/db-upgrade.pl      |  300 -------------------
 .../packaging/install/plugin-globaldashboard       |    1 -
 src/plugins/globalsearch/bin/db-delete.pl          |  117 --------
 src/plugins/globalsearch/bin/db-upgrade.pl         |  306 --------------------
 src/plugins/headermenu/bin/db-delete.pl            |  188 ------------
 src/plugins/headermenu/bin/db-upgrade.pl           |  282 ------------------
 .../headermenu/packaging/install/plugin-headermenu |    1 -
 src/plugins/helloworld/bin/db-delete.pl            |  186 ------------
 src/plugins/helloworld/bin/db-upgrade.pl           |  300 -------------------
 src/plugins/hudson/bin/db-delete.pl                |  186 ------------
 src/plugins/hudson/bin/db-upgrade.pl               |  273 -----------------
 .../hudson/packaging/control/222plugin-hudson      |    2 +-
 src/plugins/hudson/packaging/install/plugin-hudson |    1 -
 src/plugins/mailman/bin/db-delete.pl               |  186 ------------
 src/plugins/mailman/bin/db-upgrade.pl              |  273 -----------------
 src/plugins/mantisbt/bin/db-delete.pl              |  188 ------------
 src/plugins/mantisbt/bin/db-upgrade.pl             |  275 ------------------
 .../mantisbt/packaging/install/plugin-mantisbt     |    1 -
 src/plugins/mediawiki/bin/db-delete.pl             |  188 ------------
 src/plugins/mediawiki/bin/db-upgrade.pl            |  275 ------------------
 .../mediawiki/packaging/triggers/plugin-mediawiki  |    3 +
 src/plugins/oauthprovider/bin/db-delete.pl         |  186 ------------
 src/plugins/oauthprovider/bin/db-upgrade.pl        |  300 -------------------
 .../packaging/install/plugin-oauthprovider         |    1 -
 src/plugins/projectlabels/bin/db-delete.pl         |  188 ------------
 src/plugins/projectlabels/bin/db-upgrade.pl        |  275 ------------------
 .../packaging/install/plugin-projectlabels         |    1 -
 src/plugins/projects-hierarchy/bin/db-delete.pl    |  186 ------------
 src/plugins/projects-hierarchy/bin/db-upgrade.pl   |  300 -------------------
 .../packaging/install/plugin-projects-hierarchy    |    1 -
 src/plugins/scmdarcs/bin/db-delete.pl              |  188 ------------
 src/plugins/scmdarcs/bin/db-upgrade.pl             |  275 ------------------
 .../scmdarcs/packaging/install/plugin-scmdarcs     |    1 -
 src/plugins/scmgit/bin/db-delete.pl                |  188 ------------
 src/plugins/scmgit/bin/db-upgrade.pl               |  303 -------------------
 src/plugins/scmgit/packaging/install/plugin-scmgit |    1 -
 src/plugins/scmhook/bin/db-delete.pl               |  186 ------------
 src/plugins/scmhook/bin/db-upgrade.pl              |  299 -------------------
 .../scmhook/packaging/install/plugin-scmhook       |    1 -
 src/plugins/soapadmin/bin/db-delete.pl             |  186 ------------
 src/plugins/soapadmin/bin/db-upgrade.pl            |  300 -------------------
 63 files changed, 98 insertions(+), 10231 deletions(-)
 create mode 100644 src/db/20140406-convert-debian-plugin-upgrade.php
 delete mode 100644 src/plugins/authopenid/bin/db-delete.pl
 delete mode 100644 src/plugins/authopenid/bin/db-upgrade.pl
 delete mode 100644 src/plugins/authwebid/bin/db-delete.pl
 delete mode 100644 src/plugins/authwebid/bin/db-upgrade.pl
 delete mode 100755 src/plugins/blocks/bin/db-delete.pl
 delete mode 100755 src/plugins/blocks/bin/db-upgrade.pl
 delete mode 100755 src/plugins/contribtracker/bin/db-delete.pl
 delete mode 100755 src/plugins/contribtracker/bin/db-upgrade.pl
 delete mode 100755 src/plugins/externalsearch/bin/db-delete.pl
 delete mode 100755 src/plugins/externalsearch/bin/db-upgrade.pl
 delete mode 100755 src/plugins/extsubproj/bin/db-delete.pl
 delete mode 100755 src/plugins/extsubproj/bin/db-upgrade.pl
 delete mode 100755 src/plugins/forumml/bin/db-upgrade.pl
 delete mode 100755 src/plugins/globaldashboard/bin/db-delete.pl
 delete mode 100755 src/plugins/globaldashboard/bin/db-upgrade.pl
 delete mode 100755 src/plugins/globalsearch/bin/db-delete.pl
 delete mode 100755 src/plugins/globalsearch/bin/db-upgrade.pl
 delete mode 100755 src/plugins/headermenu/bin/db-delete.pl
 delete mode 100755 src/plugins/headermenu/bin/db-upgrade.pl
 delete mode 100755 src/plugins/helloworld/bin/db-delete.pl
 delete mode 100755 src/plugins/helloworld/bin/db-upgrade.pl
 delete mode 100755 src/plugins/hudson/bin/db-delete.pl
 delete mode 100755 src/plugins/hudson/bin/db-upgrade.pl
 delete mode 100755 src/plugins/mailman/bin/db-delete.pl
 delete mode 100755 src/plugins/mailman/bin/db-upgrade.pl
 delete mode 100755 src/plugins/mantisbt/bin/db-delete.pl
 delete mode 100755 src/plugins/mantisbt/bin/db-upgrade.pl
 delete mode 100755 src/plugins/mediawiki/bin/db-delete.pl
 delete mode 100755 src/plugins/mediawiki/bin/db-upgrade.pl
 create mode 100644 src/plugins/mediawiki/packaging/triggers/plugin-mediawiki
 delete mode 100755 src/plugins/oauthprovider/bin/db-delete.pl
 delete mode 100755 src/plugins/oauthprovider/bin/db-upgrade.pl
 delete mode 100755 src/plugins/projectlabels/bin/db-delete.pl
 delete mode 100755 src/plugins/projectlabels/bin/db-upgrade.pl
 delete mode 100755 src/plugins/projects-hierarchy/bin/db-delete.pl
 delete mode 100755 src/plugins/projects-hierarchy/bin/db-upgrade.pl
 delete mode 100644 src/plugins/scmdarcs/bin/db-delete.pl
 delete mode 100644 src/plugins/scmdarcs/bin/db-upgrade.pl
 delete mode 100755 src/plugins/scmgit/bin/db-delete.pl
 delete mode 100755 src/plugins/scmgit/bin/db-upgrade.pl
 delete mode 100755 src/plugins/scmhook/bin/db-delete.pl
 delete mode 100755 src/plugins/scmhook/bin/db-upgrade.pl
 delete mode 100755 src/plugins/soapadmin/bin/db-delete.pl
 delete mode 100755 src/plugins/soapadmin/bin/db-upgrade.pl


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list