Gentoo Archives: gentoo-commits

From: Martin Mokrejs <mmokrejs@×××××××××××××××.cz>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/sci:master commit in: sci-biology/gbrowse/files/, sci-biology/gbrowse/
Date: Sat, 30 Jul 2011 20:02:25
Message-Id: 85b7bd86f5737125ae7d6eeee78080bd8169dc0c.mmokrejs@gentoo
1 commit: 85b7bd86f5737125ae7d6eeee78080bd8169dc0c
2 Author: Martin Mokrejs <mmokrejs <AT> fold <DOT> natur <DOT> cuni <DOT> cz>
3 AuthorDate: Sat Jul 30 19:22:30 2011 +0000
4 Commit: Martin Mokrejs <mmokrejs <AT> fold <DOT> natur <DOT> cuni <DOT> cz>
5 CommitDate: Sat Jul 30 19:22:30 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=85b7bd86
7
8 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.
9
10 (Portage version: 2.1.10.7/git/Linux i686, unsigned Manifest commit)
11
12 ---
13 sci-biology/gbrowse/ChangeLog | 14 +++++
14 .../files/disable-gbrowse_metadb_config.pl.patch | 19 +++++++
15 .../gbrowse/files/gbrowse_metadb_config.pl.patch | 55 ++++++++++++++++++++
16 sci-biology/gbrowse/files/symlink.patch | 11 ++++
17 sci-biology/gbrowse/gbrowse-2.39.ebuild | 9 ++-
18 5 files changed, 105 insertions(+), 3 deletions(-)
19
20 diff --git a/sci-biology/gbrowse/ChangeLog b/sci-biology/gbrowse/ChangeLog
21 index a55fdce..b64e880 100644
22 --- a/sci-biology/gbrowse/ChangeLog
23 +++ b/sci-biology/gbrowse/ChangeLog
24 @@ -3,6 +3,20 @@
25 # $Header: /var/cvsroot/gentoo-x86/sci-biology/generic-genome-browser/ChangeLog,v 1.10 2007/07/29 17:07:38 phreak Exp $
26
27 30 Jul 2011; Martin Mokrejs <mmokrejs@×××××××××××××××.cz>
28 + gbrowse-2.39.ebuild, +files/disable-gbrowse_metadb_config.pl.patch,
29 + +files/gbrowse_metadb_config.pl.patch, +files/symlink.patch:
30 + Make sure portage does not run gbrowse_metadb_config.pl otherwise sandbox
31 + violation occurs when modifying /var/www/gbrowse2/databases/users.sqlite*
32 + file, maybe we could copy these during src_install to the {}, fix there and
33 + copy back to live filesystem? Improve error handling in
34 + gbrowse_metadb_config.pl. Fix symlink creation during install procedure.
35 + gbrowse-2.39.ebuild files/GBrowseInstall.pm-2.39.patch files/destdir.patch
36 + files/disable-gbrowse_metadb_config.pl.patch files/fix-PNG-export.patch
37 + files/gbrowse-slave.default files/gbrowse-slave.init.d
38 + files/gbrowse.conf.vhosts.d files/gbrowse_metadb_config.pl.patch
39 + files/symlink.patch
40 +
41 + 30 Jul 2011; Martin Mokrejs <mmokrejs@×××××××××××××××.cz>
42 gbrowse-2.39.ebuild, +files/fix-PNG-export.patch:
43 sci-biology/gbrowse: add missing brackets cause a perl error while exporting
44 a PNG image gbrowse-2.39.ebuild files/fix-PNG-export.patch
45
46 diff --git a/sci-biology/gbrowse/files/disable-gbrowse_metadb_config.pl.patch b/sci-biology/gbrowse/files/disable-gbrowse_metadb_config.pl.patch
47 new file mode 100644
48 index 0000000..1e96bb8
49 --- /dev/null
50 +++ b/sci-biology/gbrowse/files/disable-gbrowse_metadb_config.pl.patch
51 @@ -0,0 +1,19 @@
52 +--- install_util/GBrowseInstall.pm.ori 2011-07-30 20:42:02.000000000 +0200
53 ++++ install_util/GBrowseInstall.pm 2011-07-30 20:42:19.000000000 +0200
54 +@@ -486,11 +486,11 @@
55 + my $base = basename($self->install_path->{htdocs});
56 +
57 + # Configure the databases, if needed.
58 +- print STDERR "Updating user account database...\n";
59 +- my $metadb_script = File::Spec->catfile("bin", "gbrowse_metadb_config.pl");
60 +- my $perl = $self->perl;
61 +- my @inc = map{"-I$_"} split ':',$self->added_to_INC;
62 +- system $perl,@inc,$metadb_script;
63 ++# print STDERR "Updating user account database...\n";
64 ++# my $metadb_script = File::Spec->catfile("bin", "gbrowse_metadb_config.pl");
65 ++# my $perl = $self->perl;
66 ++# my @inc = map{"-I$_"} split ':',$self->added_to_INC;
67 ++# system $perl,@inc,$metadb_script;
68 + system 'sudo','chown','-R',"$uid.$gid",$destdir.$sessions,$destdir.$userdata;
69 +
70 + # if (Module::Build->y_n(
71
72 diff --git a/sci-biology/gbrowse/files/gbrowse_metadb_config.pl.patch b/sci-biology/gbrowse/files/gbrowse_metadb_config.pl.patch
73 new file mode 100644
74 index 0000000..0f7d5d3
75 --- /dev/null
76 +++ b/sci-biology/gbrowse/files/gbrowse_metadb_config.pl.patch
77 @@ -0,0 +1,55 @@
78 +--- bin/gbrowse_metadb_config.pl.ori 2011-07-30 19:57:33.000000000 +0200
79 ++++ bin/gbrowse_metadb_config.pl 2011-07-30 20:04:51.000000000 +0200
80 +@@ -703,9 +703,9 @@
81 + local $database->{AutoCommit} = 0;
82 + local $database->{RaiseError} = 1;
83 + eval {
84 +- $database->do("delete from $table");
85 +- $database->do("insert into $table (schema_version) values ($version)");
86 +- $database->commit();
87 ++ $database->do("delete from $table") or warn "delete from $table failed with: $database->errstr";
88 ++ $database->do("insert into $table (schema_version) values ($version)") or warn "insert into $table (schema_version) values ($version) failed with: $database->errstr";
89 ++ $database->commit() or warn "commitfailed with: $database->errstr";
90 + };
91 + if ($@) {
92 + warn "update failed due to $@. Rolling back";
93 +@@ -768,11 +768,11 @@
94 + $insert_user->finish;
95 + # rename the current users table
96 + $database->do('drop table users')
97 +- or die "Couldn't drop old users table";
98 ++ or die "Couldn't drop old users table: $database->errstr";
99 + $database->do('alter table users_new rename to users')
100 +- or die "Couldn't rename new users table";
101 ++ or die "Couldn't rename new users table: $database->errstr";
102 + $database->do('create index index_session on session(username)')
103 +- or die "Couldn't index sessions table";
104 ++ or die "Couldn't index sessions table: $database->errstr";
105 +
106 + # now do the uploads table
107 + # this upgrades to latest version 0
108 +@@ -808,9 +808,9 @@
109 + $insert->finish();
110 +
111 + $database->do('drop table uploads')
112 +- or die "Couldn't drop old uploads table";
113 ++ or die "Couldn't drop old uploads table: $database->errstr";
114 + $database->do('alter table uploads_new rename to uploads')
115 +- or die "Couldn't rename new uploads table";
116 ++ or die "Couldn't rename new uploads table: $database->errstr";
117 +
118 + # now do the openid_users table
119 + # this creates the new one
120 +@@ -916,10 +916,10 @@
121 + $select->finish;
122 + $insert->finish;
123 + $database->do('drop table users')
124 +- or die "Couldn't drop old users table";
125 ++ or die "Couldn't drop old users table: $database->errstr";
126 +
127 + $database->do('alter table users_new rename to users')
128 +- or die "Couldn't rename new users table";
129 ++ or die "Couldn't rename new users table: $database->errstr";
130 + $database->commit();
131 + };
132 +
133
134 diff --git a/sci-biology/gbrowse/files/symlink.patch b/sci-biology/gbrowse/files/symlink.patch
135 new file mode 100644
136 index 0000000..e6df771
137 --- /dev/null
138 +++ b/sci-biology/gbrowse/files/symlink.patch
139 @@ -0,0 +1,11 @@
140 +--- install_util/GBrowseInstall.pm.ori 2011-07-30 19:41:55.000000000 +0200
141 ++++ install_util/GBrowseInstall.pm 2011-07-30 19:42:31.000000000 +0200
142 +@@ -465,7 +465,7 @@
143 + chown $uid,-1,$destdir.$htdocs;
144 + {
145 + local $> = $uid;
146 +- symlink($images,$htdocs_i); # so symlinkifowner match works!
147 ++ symlink($images,$destdir.$htdocs_i) or warn "symlink($images,$destdir.$htdocs_i) failed: $!\n"; # so symlinkifowner match works!
148 + }
149 + chown $>,-1,$destdir.$self->install_path->{htdocs};
150 +
151
152 diff --git a/sci-biology/gbrowse/gbrowse-2.39.ebuild b/sci-biology/gbrowse/gbrowse-2.39.ebuild
153 index c0bcf25..d4cee63 100644
154 --- a/sci-biology/gbrowse/gbrowse-2.39.ebuild
155 +++ b/sci-biology/gbrowse/gbrowse-2.39.ebuild
156 @@ -28,7 +28,7 @@ SRC_URI="
157 LICENSE="Artistic"
158 # webapp ebuilds do not set SLOT
159 KEYWORDS="~x86 ~amd64"
160 -IUSE="cgi fastcgi minimal mysql postgres svg test" # lwp moby scf
161 +IUSE="cgi fastcgi minimal mysql pdf postgres svg test" # lwp moby scf
162
163 S="${WORKDIR}/${MY_P}"
164
165 @@ -48,6 +48,7 @@ DEPEND="
166 >=dev-perl/JSON-2.510.0
167 dev-perl/libwww-perl
168 svg? ( dev-perl/GD-SVG )
169 + pdf? ( media-gfx/inkscape )
170 mysql? ( dev-perl/DBD-mysql )
171 postgres? ( dev-perl/DBD-Pg )
172 sci-biology/ucsc-genome-browser" # that provides bigWig.h and jkweb.a, aka Jim Kent's src
173 @@ -92,6 +93,9 @@ src_prepare() {
174 epatch "${FILESDIR}"/GBrowseInstall.pm-"${PV}".patch || die "Failed to apply GBrowseInstall.pm-"${PV}".patch"
175 epatch "${FILESDIR}"/destdir.patch || die "Failed to apply destdir.patch"
176 epatch "${FILESDIR}"/fix-PNG-export.patch || die "Failed to apply fix-PNG-export.patch"
177 + epatch "${FILESDIR}"/symlink.patch || die "Failed to apply symlink.patch"
178 + epatch "${FILESDIR}"/gbrowse_metadb_config.pl.patch || die "Failed to apply gbrowse_metadb_config.pl.patch"
179 + epatch "${FILESDIR}"/disable-gbrowse_metadb_config.pl.patch || die "Failed to apply disable-gbrowse_metadb_config.pl.patch"
180 }
181
182 src_configure() {
183 @@ -145,8 +149,7 @@ src_install() {
184 pkg_postinst() {
185 webapp_pkg_postinst || die "webapp_pkg_postinst failed"
186
187 - einfo "Please run gbrowse_metadb_config.pl to update SQlite flatfiles or the live database"
188 - einfo "This was disabled by "${FILESDIR}"/GBrowseInstall.pm-disable-gbrowse_metadb_config.pl.pm.patch"
189 + einfo "Please run gbrowse_metadb_config.pl to update SQLite flatfiles of the live database."
190 }
191
192 src_test() {