diff options
author | Martin Mokrejs <mmokrejs@fold.natur.cuni.cz> | 2011-07-30 21:22:30 +0200 |
---|---|---|
committer | Martin Mokrejs <mmokrejs@fold.natur.cuni.cz> | 2011-07-30 21:22:30 +0200 |
commit | 85b7bd86f5737125ae7d6eeee78080bd8169dc0c (patch) | |
tree | bdce85bb9248c6039ce00061439bea5049708a41 /sci-biology/gbrowse/files | |
parent | sci-biology/gbrowse: add missing brackets cause a perl error while exporting ... (diff) | |
download | sci-85b7bd86f5737125ae7d6eeee78080bd8169dc0c.tar.gz sci-85b7bd86f5737125ae7d6eeee78080bd8169dc0c.tar.bz2 sci-85b7bd86f5737125ae7d6eeee78080bd8169dc0c.zip |
Make sure portage does not run gbrowse_metadb_config.pl otherwise sandbox violation occurs when modifying /var/www/gbrowse2/databases/users.sqlite* file, maybe we could copy these during src_install to the {}, fix there and copy back to live filesystem? Improve error handling in gbrowse_metadb_config.pl. Fix symlink creation during install procedure.
(Portage version: 2.1.10.7/git/Linux i686, unsigned Manifest commit)
Diffstat (limited to 'sci-biology/gbrowse/files')
-rw-r--r-- | sci-biology/gbrowse/files/disable-gbrowse_metadb_config.pl.patch | 19 | ||||
-rw-r--r-- | sci-biology/gbrowse/files/gbrowse_metadb_config.pl.patch | 55 | ||||
-rw-r--r-- | sci-biology/gbrowse/files/symlink.patch | 11 |
3 files changed, 85 insertions, 0 deletions
diff --git a/sci-biology/gbrowse/files/disable-gbrowse_metadb_config.pl.patch b/sci-biology/gbrowse/files/disable-gbrowse_metadb_config.pl.patch new file mode 100644 index 000000000..1e96bb8c6 --- /dev/null +++ b/sci-biology/gbrowse/files/disable-gbrowse_metadb_config.pl.patch @@ -0,0 +1,19 @@ +--- install_util/GBrowseInstall.pm.ori 2011-07-30 20:42:02.000000000 +0200 ++++ install_util/GBrowseInstall.pm 2011-07-30 20:42:19.000000000 +0200 +@@ -486,11 +486,11 @@ + my $base = basename($self->install_path->{htdocs}); + + # Configure the databases, if needed. +- print STDERR "Updating user account database...\n"; +- my $metadb_script = File::Spec->catfile("bin", "gbrowse_metadb_config.pl"); +- my $perl = $self->perl; +- my @inc = map{"-I$_"} split ':',$self->added_to_INC; +- system $perl,@inc,$metadb_script; ++# print STDERR "Updating user account database...\n"; ++# my $metadb_script = File::Spec->catfile("bin", "gbrowse_metadb_config.pl"); ++# my $perl = $self->perl; ++# my @inc = map{"-I$_"} split ':',$self->added_to_INC; ++# system $perl,@inc,$metadb_script; + system 'sudo','chown','-R',"$uid.$gid",$destdir.$sessions,$destdir.$userdata; + + # if (Module::Build->y_n( diff --git a/sci-biology/gbrowse/files/gbrowse_metadb_config.pl.patch b/sci-biology/gbrowse/files/gbrowse_metadb_config.pl.patch new file mode 100644 index 000000000..0f7d5d373 --- /dev/null +++ b/sci-biology/gbrowse/files/gbrowse_metadb_config.pl.patch @@ -0,0 +1,55 @@ +--- bin/gbrowse_metadb_config.pl.ori 2011-07-30 19:57:33.000000000 +0200 ++++ bin/gbrowse_metadb_config.pl 2011-07-30 20:04:51.000000000 +0200 +@@ -703,9 +703,9 @@ + local $database->{AutoCommit} = 0; + local $database->{RaiseError} = 1; + eval { +- $database->do("delete from $table"); +- $database->do("insert into $table (schema_version) values ($version)"); +- $database->commit(); ++ $database->do("delete from $table") or warn "delete from $table failed with: $database->errstr"; ++ $database->do("insert into $table (schema_version) values ($version)") or warn "insert into $table (schema_version) values ($version) failed with: $database->errstr"; ++ $database->commit() or warn "commitfailed with: $database->errstr"; + }; + if ($@) { + warn "update failed due to $@. Rolling back"; +@@ -768,11 +768,11 @@ + $insert_user->finish; + # rename the current users table + $database->do('drop table users') +- or die "Couldn't drop old users table"; ++ or die "Couldn't drop old users table: $database->errstr"; + $database->do('alter table users_new rename to users') +- or die "Couldn't rename new users table"; ++ or die "Couldn't rename new users table: $database->errstr"; + $database->do('create index index_session on session(username)') +- or die "Couldn't index sessions table"; ++ or die "Couldn't index sessions table: $database->errstr"; + + # now do the uploads table + # this upgrades to latest version 0 +@@ -808,9 +808,9 @@ + $insert->finish(); + + $database->do('drop table uploads') +- or die "Couldn't drop old uploads table"; ++ or die "Couldn't drop old uploads table: $database->errstr"; + $database->do('alter table uploads_new rename to uploads') +- or die "Couldn't rename new uploads table"; ++ or die "Couldn't rename new uploads table: $database->errstr"; + + # now do the openid_users table + # this creates the new one +@@ -916,10 +916,10 @@ + $select->finish; + $insert->finish; + $database->do('drop table users') +- or die "Couldn't drop old users table"; ++ or die "Couldn't drop old users table: $database->errstr"; + + $database->do('alter table users_new rename to users') +- or die "Couldn't rename new users table"; ++ or die "Couldn't rename new users table: $database->errstr"; + $database->commit(); + }; + diff --git a/sci-biology/gbrowse/files/symlink.patch b/sci-biology/gbrowse/files/symlink.patch new file mode 100644 index 000000000..e6df771ee --- /dev/null +++ b/sci-biology/gbrowse/files/symlink.patch @@ -0,0 +1,11 @@ +--- install_util/GBrowseInstall.pm.ori 2011-07-30 19:41:55.000000000 +0200 ++++ install_util/GBrowseInstall.pm 2011-07-30 19:42:31.000000000 +0200 +@@ -465,7 +465,7 @@ + chown $uid,-1,$destdir.$htdocs; + { + local $> = $uid; +- symlink($images,$htdocs_i); # so symlinkifowner match works! ++ symlink($images,$destdir.$htdocs_i) or warn "symlink($images,$destdir.$htdocs_i) failed: $!\n"; # so symlinkifowner match works! + } + chown $>,-1,$destdir.$self->install_path->{htdocs}; + |