From: "Martin Mokrejs" <mmokrejs@fold.natur.cuni.cz>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/sci:master commit in: sci-biology/gbrowse/files/, sci-biology/gbrowse/
Date: Sat, 30 Jul 2011 19:22:44 +0000 (UTC) [thread overview]
Message-ID: <85b7bd86f5737125ae7d6eeee78080bd8169dc0c.mmokrejs@gentoo> (raw)
commit: 85b7bd86f5737125ae7d6eeee78080bd8169dc0c
Author: Martin Mokrejs <mmokrejs <AT> fold <DOT> natur <DOT> cuni <DOT> cz>
AuthorDate: Sat Jul 30 19:22:30 2011 +0000
Commit: Martin Mokrejs <mmokrejs <AT> fold <DOT> natur <DOT> cuni <DOT> cz>
CommitDate: Sat Jul 30 19:22:30 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=85b7bd86
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)
---
sci-biology/gbrowse/ChangeLog | 14 +++++
.../files/disable-gbrowse_metadb_config.pl.patch | 19 +++++++
.../gbrowse/files/gbrowse_metadb_config.pl.patch | 55 ++++++++++++++++++++
sci-biology/gbrowse/files/symlink.patch | 11 ++++
sci-biology/gbrowse/gbrowse-2.39.ebuild | 9 ++-
5 files changed, 105 insertions(+), 3 deletions(-)
diff --git a/sci-biology/gbrowse/ChangeLog b/sci-biology/gbrowse/ChangeLog
index a55fdce..b64e880 100644
--- a/sci-biology/gbrowse/ChangeLog
+++ b/sci-biology/gbrowse/ChangeLog
@@ -3,6 +3,20 @@
# $Header: /var/cvsroot/gentoo-x86/sci-biology/generic-genome-browser/ChangeLog,v 1.10 2007/07/29 17:07:38 phreak Exp $
30 Jul 2011; Martin Mokrejs <mmokrejs@fold.natur.cuni.cz>
+ gbrowse-2.39.ebuild, +files/disable-gbrowse_metadb_config.pl.patch,
+ +files/gbrowse_metadb_config.pl.patch, +files/symlink.patch:
+ 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.
+ gbrowse-2.39.ebuild files/GBrowseInstall.pm-2.39.patch files/destdir.patch
+ files/disable-gbrowse_metadb_config.pl.patch files/fix-PNG-export.patch
+ files/gbrowse-slave.default files/gbrowse-slave.init.d
+ files/gbrowse.conf.vhosts.d files/gbrowse_metadb_config.pl.patch
+ files/symlink.patch
+
+ 30 Jul 2011; Martin Mokrejs <mmokrejs@fold.natur.cuni.cz>
gbrowse-2.39.ebuild, +files/fix-PNG-export.patch:
sci-biology/gbrowse: add missing brackets cause a perl error while exporting
a PNG image gbrowse-2.39.ebuild files/fix-PNG-export.patch
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 0000000..1e96bb8
--- /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 0000000..0f7d5d3
--- /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 0000000..e6df771
--- /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};
+
diff --git a/sci-biology/gbrowse/gbrowse-2.39.ebuild b/sci-biology/gbrowse/gbrowse-2.39.ebuild
index c0bcf25..d4cee63 100644
--- a/sci-biology/gbrowse/gbrowse-2.39.ebuild
+++ b/sci-biology/gbrowse/gbrowse-2.39.ebuild
@@ -28,7 +28,7 @@ SRC_URI="
LICENSE="Artistic"
# webapp ebuilds do not set SLOT
KEYWORDS="~x86 ~amd64"
-IUSE="cgi fastcgi minimal mysql postgres svg test" # lwp moby scf
+IUSE="cgi fastcgi minimal mysql pdf postgres svg test" # lwp moby scf
S="${WORKDIR}/${MY_P}"
@@ -48,6 +48,7 @@ DEPEND="
>=dev-perl/JSON-2.510.0
dev-perl/libwww-perl
svg? ( dev-perl/GD-SVG )
+ pdf? ( media-gfx/inkscape )
mysql? ( dev-perl/DBD-mysql )
postgres? ( dev-perl/DBD-Pg )
sci-biology/ucsc-genome-browser" # that provides bigWig.h and jkweb.a, aka Jim Kent's src
@@ -92,6 +93,9 @@ src_prepare() {
epatch "${FILESDIR}"/GBrowseInstall.pm-"${PV}".patch || die "Failed to apply GBrowseInstall.pm-"${PV}".patch"
epatch "${FILESDIR}"/destdir.patch || die "Failed to apply destdir.patch"
epatch "${FILESDIR}"/fix-PNG-export.patch || die "Failed to apply fix-PNG-export.patch"
+ epatch "${FILESDIR}"/symlink.patch || die "Failed to apply symlink.patch"
+ epatch "${FILESDIR}"/gbrowse_metadb_config.pl.patch || die "Failed to apply gbrowse_metadb_config.pl.patch"
+ epatch "${FILESDIR}"/disable-gbrowse_metadb_config.pl.patch || die "Failed to apply disable-gbrowse_metadb_config.pl.patch"
}
src_configure() {
@@ -145,8 +149,7 @@ src_install() {
pkg_postinst() {
webapp_pkg_postinst || die "webapp_pkg_postinst failed"
- einfo "Please run gbrowse_metadb_config.pl to update SQlite flatfiles or the live database"
- einfo "This was disabled by "${FILESDIR}"/GBrowseInstall.pm-disable-gbrowse_metadb_config.pl.pm.patch"
+ einfo "Please run gbrowse_metadb_config.pl to update SQLite flatfiles of the live database."
}
src_test() {
next reply other threads:[~2011-07-30 20:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-30 19:22 Martin Mokrejs [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-01-17 18:11 [gentoo-commits] proj/sci:master commit in: sci-biology/gbrowse/files/, sci-biology/gbrowse/ Martin Mokrejs
2011-07-30 15:43 Martin Mokrejs
2011-07-30 14:45 Martin Mokrejs
2011-07-30 10:46 Martin Mokrejs
2011-06-28 17:15 Justin Lecher
2011-05-11 8:59 Martin Mokrejs
2011-02-14 15:48 Martin Mokrejs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=85b7bd86f5737125ae7d6eeee78080bd8169dc0c.mmokrejs@gentoo \
--to=mmokrejs@fold.natur.cuni.cz \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox