public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/sci:master commit in: sci-biology/gbrowse/files/, sci-biology/gbrowse/
@ 2011-07-30 10:46 Martin Mokrejs
  0 siblings, 0 replies; 8+ messages in thread
From: Martin Mokrejs @ 2011-07-30 10:46 UTC (permalink / raw
  To: gentoo-commits

commit:     9f07546c0a41c51798aeca2c26010741db03535c
Author:     Martin Mokrejs <mmokrejs <AT> fold <DOT> natur <DOT> cuni <DOT> cz>
AuthorDate: Sat Jul 30 10:40:38 2011 +0000
Commit:     Martin Mokrejs <mmokrejs <AT> fold <DOT> natur <DOT> cuni <DOT> cz>
CommitDate: Sat Jul 30 10:40:38 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=9f07546c

version bump but still need to rewrite upstream's install procedure to prevent 'mkdir /var/lib/gbrowse2' from happening

(Portage version: 2.1.10.7/git/Linux i686, unsigned Manifest commit)

---
 sci-biology/gbrowse/ChangeLog                      |   14 ++++++++++++
 ....pm-2.38.patch => GBrowseInstall.pm-2.39.patch} |    0
 .../{gbrowse-2.38.ebuild => gbrowse-2.39.ebuild}   |   22 ++++++++++----------
 3 files changed, 25 insertions(+), 11 deletions(-)

diff --git a/sci-biology/gbrowse/ChangeLog b/sci-biology/gbrowse/ChangeLog
index eaa41a4..b8780b1 100644
--- a/sci-biology/gbrowse/ChangeLog
+++ b/sci-biology/gbrowse/ChangeLog
@@ -2,6 +2,20 @@
 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
 # $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.38.ebuild, -files/GBrowseInstall.pm-2.38.patch,
+  +gbrowse-2.39.ebuild, +files/GBrowseInstall.pm-2.39.patch:
+  version bump but still need to rewrite upstream's install procedure to
+  prevent 'mkdir /var/lib/gbrowse2' from happening
+
+*gbrowse-2.39 (30 Jul 2011)
+
+  30 Jul 2011; Martin Mokrejs <mmokrejs@fold.natur.cuni.cz>
+  -gbrowse-2.38.ebuild, -files/GBrowseInstall.pm-2.38.patch,
+  +gbrowse-2.39.ebuild, +files/GBrowseInstall.pm-2.39.patch:
+  version bump but still need to rewrite upstream's install procedure to
+  prevent 'mkdir /var/lib/gbrowse2' from happening
+
   08 Jul 2011; Martin Mokrejs <mmokrejs@fold.natur.cuni.cz>
   gbrowse-2.38.ebuild:
   Added dependency on >=perl-gcpan/Text-ParseWords-3.27, documented requirement

diff --git a/sci-biology/gbrowse/files/GBrowseInstall.pm-2.38.patch b/sci-biology/gbrowse/files/GBrowseInstall.pm-2.39.patch
similarity index 100%
rename from sci-biology/gbrowse/files/GBrowseInstall.pm-2.38.patch
rename to sci-biology/gbrowse/files/GBrowseInstall.pm-2.39.patch

diff --git a/sci-biology/gbrowse/gbrowse-2.38.ebuild b/sci-biology/gbrowse/gbrowse-2.39.ebuild
similarity index 92%
rename from sci-biology/gbrowse/gbrowse-2.38.ebuild
rename to sci-biology/gbrowse/gbrowse-2.39.ebuild
index ea981ca..426ee4b 100644
--- a/sci-biology/gbrowse/gbrowse-2.38.ebuild
+++ b/sci-biology/gbrowse/gbrowse-2.39.ebuild
@@ -28,17 +28,17 @@ SRC_URI="
 LICENSE="Artistic"
 # webapp ebuilds do not set SLOT
 KEYWORDS="~x86 ~amd64"
-IUSE="-minimal svg test" # lwp moby scf
+IUSE="cgi fastcgi minimal mysql postgres svg test" # lwp moby scf
 
 S="${WORKDIR}/${MY_P}"
 
 # TODO: dev-perl/MOBY, dev-perl/Bio-SCF, dev-perl/Safe-World (not compatible w/perl-5.10)
-# TODO: make sure www-servers/apache +cgi
+# how about mod_fcgi and dev-libs/fcgi and mod_scgi?
 DEPEND="
 	>=perl-core/Module-Build-0.380.0
 	>=dev-lang/perl-5.8.8
 	dev-perl/Capture-Tiny
-	>=sci-biology/bioperl-1.6
+	>=sci-biology/bioperl-1.6.901
 	>=dev-perl/GD-2.07
 	dev-perl/IO-String
 	virtual/perl-Digest-MD5
@@ -47,20 +47,17 @@ DEPEND="
 	>=dev-perl/Bio-Graphics-1.97
 	>=dev-perl/JSON-2.510.0
 	dev-perl/libwww-perl
-	svg? ( dev-perl/GD-SVG )"
+	svg? ( dev-perl/GD-SVG )
+	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
 
 # TODO: based on the following message in apache/error_log the list of deps should be longer
 # GBROWSE NOTICE: To enable PDF generation, please enter the directory "/home/httpd" and run the commands: "sudo mkdir .inkscape .gnome2" and "sudo chown apache .inkscape .gnome2".  To turn off this message add "generate pdf = 0" to the [GENERAL] section of your GBrowse.conf configuration file., referer: http://127.0.0.1/gbrowse/cgi-bin/gbrowse_details/yeast?ref=chrII;start=90739;end=92028;name=YBL069W;class=Sequence;feature_id=881;db_id=annotations%3Adatabase
 
-# TODO: implement ebuild checks for these version of packages
-#    !  Bio::Root::Version (1.006001) is installed, but we need version >= 1.0069
-#    *  Bio::DB::BigFile is not installed
-#    *  Bio::DB::Sam is not installed, install http://cpansearch.perl.org/src/LDS/Bio-SamTools-1.29
-#    *  DBD::Pg is not installed
-#    >=perl-gcpan/Text-ParseWords-3.27
-
 RDEPEND="${DEPEND}
 	>=www-servers/apache-2.0.47
+	fastcgi? ( dev-libs/fcgi )
 	www-apache/mod_fastcgi
 	dev-perl/DBI
 	|| ( dev-perl/DBD-Pg dev-perl/DBD-mysql )
@@ -84,6 +81,9 @@ RDEPEND="${DEPEND}
 		dev-perl/XML-Parser
 		dev-perl/Bio-Das
 		dev-perl/Text-Shellwords
+		postgres? ( >=dev-perl/Bio-DB-Das-Chado-0.32 )
+		>=dev-perl/Bio-SamTools-1.29
+		>=dev-perl/Bio-BigFile-1.06
 	)"
 
 src_prepare() {



^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [gentoo-commits] proj/sci:master commit in: sci-biology/gbrowse/files/, sci-biology/gbrowse/
@ 2012-01-17 18:11 Martin Mokrejs
  0 siblings, 0 replies; 8+ messages in thread
From: Martin Mokrejs @ 2012-01-17 18:11 UTC (permalink / raw
  To: gentoo-commits

commit:     bfc8451b06a8727456543751d139d29706473c03
Author:     Martin Mokrejs <mmokrejs <AT> fold <DOT> natur <DOT> cuni <DOT> cz>
AuthorDate: Tue Jan 17 18:11:07 2012 +0000
Commit:     Martin Mokrejs <mmokrejs <AT> fold <DOT> natur <DOT> cuni <DOT> cz>
CommitDate: Tue Jan 17 18:11:07 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=bfc8451b

version bump and some fixes so that it works with webappconfig again?

(Portage version: 2.1.10.44/git/Linux i686, unsigned Manifest commit)

---
 sci-biology/gbrowse/ChangeLog                      |    6 +
 .../gbrowse/files/GBrowseInstall.pm-2.45.patch     |   32 +++
 sci-biology/gbrowse/gbrowse-2.45.ebuild            |  199 ++++++++++++++++++++
 3 files changed, 237 insertions(+), 0 deletions(-)

diff --git a/sci-biology/gbrowse/ChangeLog b/sci-biology/gbrowse/ChangeLog
index c63914a..41e2334 100644
--- a/sci-biology/gbrowse/ChangeLog
+++ b/sci-biology/gbrowse/ChangeLog
@@ -2,6 +2,12 @@
 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
 # $Header: /var/cvsroot/gentoo-x86/sci-biology/generic-genome-browser/ChangeLog,v 1.10 2007/07/29 17:07:38 phreak Exp $
 
+*gbrowse-2.45 (17 Jan 2012)
+
+  17 Jan 2012; Martin Mokrejs <mmokrejs@fold.natur.cuni.cz>
+  +gbrowse-2.45.ebuild, +files/GBrowseInstall.pm-2.45.patch:
+  version bump and some fixes so that it works with webappconfig again?
+
   17 Jan 2012; Martin Mokrejs <mmokrejs@fold.natur.cuni.cz>
   gbrowse-2.39.ebuild:
   added dev-perl/TermReadKey to dependencies

diff --git a/sci-biology/gbrowse/files/GBrowseInstall.pm-2.45.patch b/sci-biology/gbrowse/files/GBrowseInstall.pm-2.45.patch
new file mode 100644
index 0000000..e91fe16
--- /dev/null
+++ b/sci-biology/gbrowse/files/GBrowseInstall.pm-2.45.patch
@@ -0,0 +1,32 @@
+--- install_util/GBrowseInstall.pm.ori	2010-11-27 12:01:58.000000000 +0100
++++ install_util/GBrowseInstall.pm	2010-11-27 12:02:15.000000000 +0100
+@@ -436,8 +436,8 @@
+ 	$self->ownership_warning($databases,$user);
+     }
+ 
+-    chmod 0755,File::Spec->catfile($self->install_path->{'etc'},'init.d','gbrowse-slave');
+-    $self->fix_selinux;
++    # chmod 0755,File::Spec->catfile($self->install_path->{'etc'},'init.d','gbrowse-slave');
++    # $self->fix_selinux;
+ 
+     my $base = basename($self->install_path->{htdocs});
+ 
+--- install_util/GBrowseInstall.pm.ori	2011-02-14 13:50:41.000000000 +0100
++++ install_util/GBrowseInstall.pm	2011-02-14 13:51:46.000000000 +0100
+@@ -470,11 +470,11 @@
+     my @inc           = map{"-I$_"} split ':',$self->added_to_INC;
+     system $perl,@inc,$metadb_script;
+ 
+-    if (Module::Build->y_n(
+-	    "It is recommended that you restart Apache. Shall I try this for you?",'y'
+-	)) {
+-	system "sudo /etc/init.d/apache2 restart";
+-    }
++#    if (Module::Build->y_n(
++#	    "It is recommended that you restart Apache. Shall I try this for you?",'y'
++#	)) {
++#	system "sudo /etc/init.d/apache2 restart";
++#    }
+     
+     print STDERR "\n***INSTALLATION COMPLETE***\n";
+     print STDERR "Load http://localhost/$base for demo and documentation.\n";

diff --git a/sci-biology/gbrowse/gbrowse-2.45.ebuild b/sci-biology/gbrowse/gbrowse-2.45.ebuild
new file mode 100644
index 0000000..f914844
--- /dev/null
+++ b/sci-biology/gbrowse/gbrowse-2.45.ebuild
@@ -0,0 +1,199 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+EAPI="2"
+
+inherit perl-module webapp
+
+MY_P="GBrowse-${PV}"
+
+DESCRIPTION="Display of genomic annotations on interactive web pages"
+HOMEPAGE="http://gmod.org/"
+# mirror://sourceforge/gmod/${MY_P}.tar.gz
+# mirror://cpan/authors/id/L/LD/LDS/GBrowse-2.33.tar.gz
+SRC_URI="
+	mirror://cpan/authors/id/L/LD/LDS/${MY_P}.tar.gz
+	test? (
+		http://sourceforge.net/projects/gmod/files/Generic%20Genome%20Browser/Sample%20Data%20Files/saccharomyces_cerevisiae.gff.bz2
+		http://sourceforge.net/projects/gmod/files/Generic%20Genome%20Browser/Sample%20Data%20Files/Refseq_Genome_TBLASTX.tar.gz
+		http://sourceforge.net/projects/gmod/files/Generic%20Genome%20Browser/Sample%20Data%20Files/README-gff-files
+		http://sourceforge.net/projects/gmod/files/Generic%20Genome%20Browser/Sample%20Data%20Files/human.gff.tar.gz
+		http://sourceforge.net/projects/gmod/files/Generic%20Genome%20Browser/Sample%20Data%20Files/yeast.fasta.gz
+		http://sourceforge.net/projects/gmod/files/Generic%20Genome%20Browser/Sample%20Data%20Files/yeast.gff.gz
+		http://sourceforge.net/projects/gmod/files/Generic%20Genome%20Browser/Sample%20Data%20Files/worm.fasta.gz
+		http://sourceforge.net/projects/gmod/files/Generic%20Genome%20Browser/Sample%20Data%20Files/worm.gff.gz
+		http://sourceforge.net/projects/gmod/files/Generic%20Genome%20Browser/Sample%20Data%20Files/fly.fasta.gz
+		http://sourceforge.net/projects/gmod/files/Generic%20Genome%20Browser/Sample%20Data%20Files/fly.gff.gz )"
+
+LICENSE="Artistic"
+# webapp ebuilds do not set SLOT
+KEYWORDS="~x86 ~amd64"
+IUSE="cgi fastcgi minimal mysql pdf postgres svg test" # lwp moby scf
+
+S="${WORKDIR}/${MY_P}"
+
+# TODO: dev-perl/MOBY, dev-perl/Bio-SCF, dev-perl/Safe-World (not compatible w/perl-5.10)
+# how about mod_fcgi and dev-libs/fcgi and mod_scgi?
+DEPEND="!!sci-biology/GBrowse
+	>=perl-core/Module-Build-0.380.0
+	>=dev-lang/perl-5.8.8
+	dev-perl/Capture-Tiny
+	>=sci-biology/bioperl-1.6.901
+	>=dev-perl/GD-2.07
+	dev-perl/IO-String
+	virtual/perl-Digest-MD5
+	>=dev-perl/CGI-Session-4.03
+	dev-perl/Statistics-Descriptive
+	>=dev-perl/Bio-Graphics-1.97
+	>=dev-perl/JSON-2.510.0
+	dev-perl/TermReadKey
+	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
+
+# TODO: based on the following message in apache/error_log the list of deps should be longer
+# GBROWSE NOTICE: To enable PDF generation, please enter the directory "/home/httpd" and run the commands: "sudo mkdir .inkscape .gnome2" and "sudo chown apache .inkscape .gnome2".  To turn off this message add "generate pdf = 0" to the [GENERAL] section of your GBrowse.conf configuration file., referer: http://127.0.0.1/gbrowse/cgi-bin/gbrowse_details/yeast?ref=chrII;start=90739;end=92028;name=YBL069W;class=Sequence;feature_id=881;db_id=annotations%3Adatabase
+
+RDEPEND="${DEPEND}
+	>=www-servers/apache-2.0.47
+	fastcgi? ( dev-libs/fcgi )
+	www-apache/mod_fastcgi
+	dev-perl/DBI
+	|| ( dev-perl/DBD-Pg dev-perl/DBD-mysql )
+	!minimal? (
+		dev-perl/File-NFSLock
+		dev-perl/FCGI
+		perl-core/Math-BigInt
+		perl-core/Math-BigInt-FastCalc
+		dev-perl/Math-BigInt-GMP
+		dev-perl/Digest-SHA1
+		dev-perl/Crypt-SSLeay
+		dev-perl/Net-SMTP-SSL
+		dev-perl/Net-OpenID-Consumer
+		virtual/perl-DB_File
+		dev-perl/DB_File-Lock
+		dev-perl/GD-SVG
+		dev-perl/Text-Shellwords
+		dev-perl/XML-Twig
+		dev-perl/XML-DOM
+		dev-perl/XML-Writer
+		dev-perl/XML-Parser
+		dev-perl/Bio-Das
+		dev-perl/Text-Shellwords
+		postgres? ( >=dev-perl/Bio-DB-Das-Chado-0.32 )
+		>=dev-perl/Bio-SamTools-1.29
+		>=dev-perl/Bio-BigFile-1.06
+	)"
+
+src_prepare() {
+	sed -i 's/return unless -t STDIN/return/' install_util/GBrowseInstall.pm || die "Failed to kill the interactive behavior of install_util/GBrowseInstall.pm"
+	sed -i 's/process_/bp_process_/g' INSTALL || die "Failed to prepend bp_ prefix to INSTALL file"
+	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"
+	for f in conf/synteny/wild_rice_synteny.conf conf/synteny/rice_synteny.conf conf/GBrowse.conf \
+			htdocs/tutorial/tutorial.html htdocs/index.html lib/Bio/Graphics/Browser2/Action.pm \
+			Changes; do
+		sed -i 's#/var/lib/gbrowse2#/var/db/gbrowse2#' $f || die "Failed to rewrite /var/lib/gbrowse2 to /var/db/gbrowse2 in $f"
+	done
+	for f in htdocs/index.html; do
+		sed -i 's#/usr/lib/cgi-bin/gb2#/usr/share/webapps/gbrowse/"${PV}"/htdocs/cgi-bin#' $f || die "Failed to rewrite /usr/lib/cgi-bin/gb2 to /usr/share/webapps/gbrowse/"${PV}"/htdocs/cgi-bin in $f"
+	done
+}
+
+src_configure() {
+	# GBROWSE_ROOT is the root path in SRC_URI to be prepended
+	# /usr/share/webapps/gbrowse/2.03/htdocs/etc/gbrowse/GBrowse.conf
+	webapp_src_preinst
+	perl Makefile.PL \
+		HTDOCS="${MY_HTDOCSDIR}" \
+		CGIBIN="${MY_HTDOCSDIR}"/cgi-bin \
+		CONF="${MY_HTDOCSDIR}"/etc/gbrowse \
+		PACKAGE_DIR="${D}" \
+		INSTALLDIRS=vendor \
+		GBROWSE_ROOT="gbrowse" \
+		DESTDIR="${D}" \
+		DATABASES="/var/db/gbrowse2/databases" \
+		PERSISTENT="/var/db/gbrowse2" \
+		TMP="/var/tmp/gbrowse2" \
+		INSTALLETC="n" \
+		INSTALLCONF="n" \
+		WWWUSER="apache" \
+		DO_XS=1 \
+		NONROOT=1 \
+		|| die
+}
+
+src_install() {
+	mydoc="Changes README TODO INSTALL"
+	perl-module_src_install
+
+	# TODO: write our own readme
+	webapp_postinst_txt en "${S}"/INSTALL
+	webapp_src_install || die "Failed running webapp_src_install"
+
+	# should create a /etc/init.d/ startup script based on this
+	# /var/tmp/portage/sci-biology/gbrowse-2.03/work/GBrowse-2.03/etc/init.d/gbrowse-slave
+
+	mkdir -p "${D}"/var/tmp/gbrowse2/images
+	chown -R apache.apache "${D}"/var/tmp/gbrowse2
+
+	# mkdir -p "${D}"/var/www/localhost/htdocs/gbrowse || die
+	# ln -s "${D}"/var/tmp/gbrowse2/images "${D}"/usr/share/webapps/gbrowse/"${PV}"/htdocs/i || die
+
+	# whole "${D}"/var/db/gbrowse2 has to be owned by apache.apache otherwise:
+	#  1. you hit an error that /var/db/gbrowse2/sessions/cgisess.db.lck
+	#		[no, it is not enough chown -R apache.apache /var/db/gbrowse2/sessions, the parent dir has to be apapche.apache as well]
+	# 2. even if you set /var/db/gbrowse2 to apache.apache still it is not enough, you will get
+	# 		[Tue Jan 17 14:59:40 2012] [error] [client 127.0.0.1] Use of uninitialized value $label in lc at /usr/lib/perl5/vendor_perl/5.12.4/i686-linux-thread-multi/Bio/Graphics/Browser2/AuthorizedFeatureFile.pm line 34., referer: http://127.0.0.1/gbrowse/cgi-bin/gbrowse/yeast/
+
+	mkdir -p "${D}"/var/db/gbrowse2
+	mkdir -p "${D}"/var/db/gbrowse2/databases
+	mkdir -p "${D}"/var/db/gbrowse2/sessions "${D}"/var/db/gbrowse2/userdata
+	chown -R apache.apache "${D}"/var/db/gbrowse2 # it has to be owned by apache.apache otherwise /var/db/gbrowse2/sessions/cgisess.db.lck cannot be created although /var/db/gbrowse2/sessions is owner by apache.apache
+
+	einfo "Dropping trailing 'databases' from db_variable in conf/GBrowse.conf"
+	sed -i 's#/var/db/gbrowse2/databases#/var/db/gbrowse2#' conf/GBrowse.conf || die "Failed to dropping trailing 'databases' from db_variable in conf/GBrowse.conf"
+
+	einfo "Probably you want to install a cron job to remove the generated temporary images:"
+	einfo "find /var/tmp/gbrowse2/images -type f -atime +20 -print -exec rm {}"
+
+	einfo "Make sure you compiled apache with +cgi and do"
+	einfo "cp -i ${FILESDIR}/gbrowse.conf.vhosts.d /etc/apache2/vhosts.d/gbrowse.conf"
+
+	sed -i "s#"${D}"##g" "${S}"/install_util/GBrowseInstall.pm || die
+	sed -i "s#"${D}"##" "${S}"/blib/conf/GBrowse.conf*
+	sed -i 's#DBI:SQLite:'${D}'/var/lib/gbrowse2/databases/#DBI:SQLite:/var/db/gbrowse2/databases/#' "${S}"/install_util/GBrowseInstall.pm || die
+}
+
+pkg_postinst() {
+	webapp_pkg_postinst || die "webapp_pkg_postinst failed"
+
+	einfo "Please run gbrowse_metadb_config.pl to update SQLite flatfiles of the live database."
+	einfo "d='/usr/share/webapps/gbrowse/${PV}/htdocs/etc/gbrowse'; for f in \$d/*.conf.new; do \ "
+	einfo "		mv -i \$f \$d/\`basename \$f .new\`; done"
+
+	einfo "Fix also the other copy of the file:"
+	einfo "d='/var/www/localhost/htdocs/gbrowse/etc/gbrowse'; for f in \$d/*.conf.new; do \ "
+	einfo "     mv -i \$f \$d/\`basename \$f .new\`; done"
+}
+
+src_test() {
+	mysql -uroot -p password -e 'create database yeast'
+	mysql -uroot -p password -e 'grant all privileges on yeast.* to gbrowse@localhost'
+	mysql -uroot -p password -e 'grant file on *.* to gbrowse@localhost'
+	mysql -uroot -p password -e 'grant select on yeast.* to nobody@localhost'
+
+	cd /usr/portage/distfiles || die
+	gzip -d yeast.fasta.gz || die
+	gzip -d yeast.gff.gz || die
+	#gzip -d fly.fasta.gz
+	#gzip -d fly.gff.gz
+	bp_bulk_load_gff.pl -d yeast -fasta yeast.fasta yeast.gff || die
+}



^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [gentoo-commits] proj/sci:master commit in: sci-biology/gbrowse/files/, sci-biology/gbrowse/
@ 2011-07-30 19:22 Martin Mokrejs
  0 siblings, 0 replies; 8+ messages in thread
From: Martin Mokrejs @ 2011-07-30 19:22 UTC (permalink / raw
  To: gentoo-commits

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() {



^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [gentoo-commits] proj/sci:master commit in: sci-biology/gbrowse/files/, sci-biology/gbrowse/
@ 2011-07-30 15:43 Martin Mokrejs
  0 siblings, 0 replies; 8+ messages in thread
From: Martin Mokrejs @ 2011-07-30 15:43 UTC (permalink / raw
  To: gentoo-commits

commit:     f67b7b7711a847bed69fcec066f3aa4d3b42427d
Author:     Martin Mokrejs <mmokrejs <AT> fold <DOT> natur <DOT> cuni <DOT> cz>
AuthorDate: Sat Jul 30 15:43:31 2011 +0000
Commit:     Martin Mokrejs <mmokrejs <AT> fold <DOT> natur <DOT> cuni <DOT> cz>
CommitDate: Sat Jul 30 15:43:31 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=f67b7b77

sci-biology/gbrowse: add missing brackets cause a perl error while exporting a PNG image

(Portage version: 2.1.10.7/git/Linux i686, unsigned Manifest commit)

---
 sci-biology/gbrowse/ChangeLog                  |    5 +++++
 sci-biology/gbrowse/files/fix-PNG-export.patch |   11 +++++++++++
 sci-biology/gbrowse/gbrowse-2.39.ebuild        |    3 ++-
 3 files changed, 18 insertions(+), 1 deletions(-)

diff --git a/sci-biology/gbrowse/ChangeLog b/sci-biology/gbrowse/ChangeLog
index 5c2bd3e..a55fdce 100644
--- a/sci-biology/gbrowse/ChangeLog
+++ b/sci-biology/gbrowse/ChangeLog
@@ -3,6 +3,11 @@
 # $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/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
+
+  30 Jul 2011; Martin Mokrejs <mmokrejs@fold.natur.cuni.cz>
   gbrowse-2.39.ebuild, +files/destdir.patch:
   added support for --destdir, patch sent to upstream gbrowse-2.39.ebuild
 

diff --git a/sci-biology/gbrowse/files/fix-PNG-export.patch b/sci-biology/gbrowse/files/fix-PNG-export.patch
new file mode 100644
index 0000000..469f752
--- /dev/null
+++ b/sci-biology/gbrowse/files/fix-PNG-export.patch
@@ -0,0 +1,11 @@
+--- lib/Bio/Graphics/Browser2/AuthorizedFeatureFile.pm.ori  2011-07-30 17:14:28.000000000 +0200
++++ lib/Bio/Graphics/Browser2/AuthorizedFeatureFile.pm      2011-07-30 17:13:13.000000000 +0200
+@@ -30,7 +30,7 @@
+ sub setting {
+   my $self = shift;
+   my ($label,$option,@rest) = @_ >= 2 ? @_ : ('general',@_);
+-  $label = 'general' if lc $label eq 'general';  # buglet
++  $label = 'general' if lc($label) eq 'general';  # buglet
+   $self->SUPER::setting($label,$option,@rest);
+ }
+ 

diff --git a/sci-biology/gbrowse/gbrowse-2.39.ebuild b/sci-biology/gbrowse/gbrowse-2.39.ebuild
index 35af68f..c0bcf25 100644
--- a/sci-biology/gbrowse/gbrowse-2.39.ebuild
+++ b/sci-biology/gbrowse/gbrowse-2.39.ebuild
@@ -90,7 +90,8 @@ src_prepare() {
 	sed -i 's/return unless -t STDIN/return/' install_util/GBrowseInstall.pm || die
 	sed -i 's/process_/bp_process_/g' INSTALL || die
 	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}"/destdir.patch || die "Failed to apply destdir.patch"
+	epatch "${FILESDIR}"/fix-PNG-export.patch || die "Failed to apply fix-PNG-export.patch"
 }
 
 src_configure() {



^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [gentoo-commits] proj/sci:master commit in: sci-biology/gbrowse/files/, sci-biology/gbrowse/
@ 2011-07-30 14:45 Martin Mokrejs
  0 siblings, 0 replies; 8+ messages in thread
From: Martin Mokrejs @ 2011-07-30 14:45 UTC (permalink / raw
  To: gentoo-commits

commit:     fa7a65b1a985d0cd4c830b8cac8e63ce2e576c28
Author:     Martin Mokrejs <mmokrejs <AT> fold <DOT> natur <DOT> cuni <DOT> cz>
AuthorDate: Sat Jul 30 14:45:25 2011 +0000
Commit:     Martin Mokrejs <mmokrejs <AT> fold <DOT> natur <DOT> cuni <DOT> cz>
CommitDate: Sat Jul 30 14:45:25 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=fa7a65b1

sci-biology/gbrowse: added support for --destdir, patch sent to upstream

(Portage version: 2.1.10.7/git/Linux i686, unsigned Manifest commit)

---
 sci-biology/gbrowse/ChangeLog           |    8 +++
 sci-biology/gbrowse/files/destdir.patch |   92 +++++++++++++++++++++++++++++++
 sci-biology/gbrowse/gbrowse-2.39.ebuild |    3 +-
 3 files changed, 102 insertions(+), 1 deletions(-)

diff --git a/sci-biology/gbrowse/ChangeLog b/sci-biology/gbrowse/ChangeLog
index b8780b1..5c2bd3e 100644
--- a/sci-biology/gbrowse/ChangeLog
+++ b/sci-biology/gbrowse/ChangeLog
@@ -3,6 +3,14 @@
 # $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/destdir.patch:
+  added support for --destdir, patch sent to upstream gbrowse-2.39.ebuild
+
+  30 Jul 2011; Martin Mokrejs <mmokrejs@fold.natur.cuni.cz>
+  gbrowse-2.39.ebuild, +files/destdir.patch:
+  added support for --destdir, patch sent to upstream
+
+  30 Jul 2011; Martin Mokrejs <mmokrejs@fold.natur.cuni.cz>
   -gbrowse-2.38.ebuild, -files/GBrowseInstall.pm-2.38.patch,
   +gbrowse-2.39.ebuild, +files/GBrowseInstall.pm-2.39.patch:
   version bump but still need to rewrite upstream's install procedure to

diff --git a/sci-biology/gbrowse/files/destdir.patch b/sci-biology/gbrowse/files/destdir.patch
new file mode 100644
index 0000000..655158c
--- /dev/null
+++ b/sci-biology/gbrowse/files/destdir.patch
@@ -0,0 +1,92 @@
+--- install_util/GBrowseInstall.pm.ori	2011-07-30 16:06:18.000000000 +0200
++++ install_util/GBrowseInstall.pm	2011-07-30 16:06:28.000000000 +0200
+@@ -419,6 +419,7 @@
+ sub ACTION_install {
+     my $self = shift;
+     my $prefix = $self->install_base || $self->prefix || '';
++    my $destdir = $self->destdir || '';
+     GBrowseGuessDirectories->prefix($prefix);
+ 
+     $self->depends_on('config_data');
+@@ -445,7 +446,7 @@
+ 
+     # fix some directories so that www user can write into them
+     my $tmp = $self->config_data('tmp') || GBrowseGuessDirectories->tmp;
+-    mkpath($tmp);
++    mkpath($destdir.$tmp);
+     my ($uid,$gid) = (getpwnam($user))[2,3];
+ 
+     # taint check issues
+@@ -454,29 +455,29 @@
+     $gid =~ /^(\d+)$/;
+     $gid = $1;
+     
+-    unless (chown $uid,$gid,$tmp) {
++    unless (chown $uid,$gid,$destdir.$tmp) {
+ 	$self->ownership_warning($tmp,$user);
+     }
+ 
+     my $htdocs_i = File::Spec->catfile($self->install_path->{htdocs},'i');
+     my $images   = File::Spec->catfile($tmp,'images');
+     my $htdocs = $self->install_path->{htdocs};
+-    chown $uid,-1,$htdocs;
++    chown $uid,-1,$destdir.$htdocs;
+     {
+ 	local $> = $uid;
+ 	symlink($images,$htdocs_i);  # so symlinkifowner match works!
+     }
+-    chown $>,-1,$self->install_path->{htdocs};
++    chown $>,-1,$destdir.$self->install_path->{htdocs};
+ 
+     my $persistent = $self->install_path->{'persistent'};
+     my $sessions   = File::Spec->catfile($persistent,'sessions');
+     my $userdata   = File::Spec->catfile($persistent,'userdata');
+-    mkpath([$sessions,$userdata],0711);
++    mkpath([$destdir.$sessions,$destdir.$userdata],0711);
+ 
+     my $databases = $self->install_path->{'databases'};
+     
+-    unless (chown $uid,$gid,glob(File::Spec->catfile($databases,'').'*')) {
+-	$self->ownership_warning($databases,$user);
++    unless (chown $uid,$gid,glob($destdir.File::Spec->catfile($databases,'').'*')) {
++	$self->ownership_warning($destdir.$databases,$user);
+     }
+ 
+     # chmod 0755,File::Spec->catfile($self->install_path->{'etc'},'init.d','gbrowse-slave');
+@@ -490,7 +491,7 @@
+     my $perl          = $self->perl;
+     my @inc           = map{"-I$_"} split ':',$self->added_to_INC;
+     system $perl,@inc,$metadb_script;
+-    system 'sudo','chown','-R',"$uid.$gid",$sessions,$userdata;
++    system 'sudo','chown','-R',"$uid.$gid",$destdir.$sessions,$destdir.$userdata;
+ 
+ #    if (Module::Build->y_n(
+ #	    "It is recommended that you restart Apache. Shall I try this for you?",'y'
+@@ -600,6 +601,7 @@
+     my $self = shift;
+ 
+     my $prefix = $self->install_base || $self->prefix || '';
++    my $destdir = $self->destdir || '';
+     GBrowseGuessDirectories->prefix($prefix);
+     my $install_path = GBrowseGuessDirectories->etc;
+ 
+@@ -647,7 +649,7 @@
+ 	if ($self->config_data('installconf') =~ /^[yY]/ && !-e "${includes}/$file") {
+ 	    warn "Creating include file for Apache config: $target\n";
+ 	    my $dir = dirname($target);
+-	    mkpath([$dir]);
++	    mkpath([$destdir.$dir]);
+ 	    if (my $f = IO::File->new("blib${includes}/$file",'>')) {
+ 		$f->print($self->apache_conf);
+ 		$f->close;
+@@ -935,8 +937,9 @@
+ sub ownership_warning {
+     my $self = shift;
+     my ($path,$owner) = @_;
++    my $destdir = $self->destdir || '';
+     warn "*** WARNING: Using sudo to change ownership of $path to '$owner'. You may be prompted for your login password ***\n";
+-    system "sudo chown -R $owner $path";
++    system "sudo chown -R $owner $destdir.$path";
+ }
+ 
+ sub cgiurl {

diff --git a/sci-biology/gbrowse/gbrowse-2.39.ebuild b/sci-biology/gbrowse/gbrowse-2.39.ebuild
index 426ee4b..0acd25a 100644
--- a/sci-biology/gbrowse/gbrowse-2.39.ebuild
+++ b/sci-biology/gbrowse/gbrowse-2.39.ebuild
@@ -89,7 +89,8 @@ RDEPEND="${DEPEND}
 src_prepare() {
 	sed -i 's/return unless -t STDIN/return/' install_util/GBrowseInstall.pm || die
 	sed -i 's/process_/bp_process_/g' INSTALL || die
-	epatch "${FILESDIR}"/GBrowseInstall.pm-"${PV}".patch || die "Failed to patch"
+	epatch "${FILESDIR}"/GBrowseInstall.pm-"${PV}".patch || die "Failed to apply GBrowseInstall.pm-"${PV}".patch"
+	epatch "${FILESDIR}"/destdir.patch || die "Failed to apply destdir.patch "
 }
 
 src_configure() {



^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [gentoo-commits] proj/sci:master commit in: sci-biology/gbrowse/files/, sci-biology/gbrowse/
@ 2011-06-28 17:15 Justin Lecher
  0 siblings, 0 replies; 8+ messages in thread
From: Justin Lecher @ 2011-06-28 17:15 UTC (permalink / raw
  To: gentoo-commits

commit:     a50c105c259094c0b358fb024a326dccc3751247
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 26 08:02:44 2011 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Sun Jun 26 08:02:44 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=a50c105c

Version Bump

(Portage version: 2.2.0_alpha41/git/Linux x86_64, signed Manifest commit with key 70EB7916)

---
 sci-biology/gbrowse/ChangeLog                      |    9 +
 .../gbrowse/files/GBrowseInstall.pm-2.26.patch     |   72 --------
 ....pm-2.33.patch => GBrowseInstall.pm-2.38.patch} |    0
 ...-disable-gbrowse_metadb_config.pl.pm-2.26.patch |   21 ---
 sci-biology/gbrowse/gbrowse-2.26.ebuild            |  170 --------------------
 .../{gbrowse-2.33.ebuild => gbrowse-2.38.ebuild}   |    0
 6 files changed, 9 insertions(+), 263 deletions(-)

diff --git a/sci-biology/gbrowse/ChangeLog b/sci-biology/gbrowse/ChangeLog
index b66d69a..e36ad47 100644
--- a/sci-biology/gbrowse/ChangeLog
+++ b/sci-biology/gbrowse/ChangeLog
@@ -2,6 +2,15 @@
 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
 # $Header: /var/cvsroot/gentoo-x86/sci-biology/generic-genome-browser/ChangeLog,v 1.10 2007/07/29 17:07:38 phreak Exp $
 
+*gbrowse-2.38 (26 Jun 2011)
+
+  26 Jun 2011; Justin Lecher <jlec@gentoo.org> -gbrowse-2.26.ebuild,
+  -files/GBrowseInstall.pm-2.26.patch,
+  -files/GBrowseInstall.pm-disable-gbrowse_metadb_config.pl.pm-2.26.patch,
+  -gbrowse-2.33.ebuild, -files/GBrowseInstall.pm-2.33.patch,
+  +gbrowse-2.38.ebuild, +files/GBrowseInstall.pm-2.38.patch:
+  Version Bump
+
   25 Jun 2011; Justin Lecher <jlec@gentoo.org> -gbrowse-1.70.ebuild,
   -gbrowse-2.00.ebuild, gbrowse-2.26.ebuild, gbrowse-2.33.ebuild:
   Cleaned ebuild, 'http://search.cpan.org/CPAN' found in thirdpartymirrors

diff --git a/sci-biology/gbrowse/files/GBrowseInstall.pm-2.26.patch b/sci-biology/gbrowse/files/GBrowseInstall.pm-2.26.patch
deleted file mode 100644
index 4c17f8d..0000000
--- a/sci-biology/gbrowse/files/GBrowseInstall.pm-2.26.patch
+++ /dev/null
@@ -1,72 +0,0 @@
---- install_util/GBrowseInstall.pm.ori	2010-11-27 12:01:58.000000000 +0100
-+++ install_util/GBrowseInstall.pm	2010-11-27 12:02:15.000000000 +0100
-@@ -436,8 +436,8 @@
- 	$self->ownership_warning($databases,$user);
-     }
- 
--    chmod 0755,File::Spec->catfile($self->install_path->{'etc'},'init.d','gbrowse-slave');
--    $self->fix_selinux;
-+    # chmod 0755,File::Spec->catfile($self->install_path->{'etc'},'init.d','gbrowse-slave');
-+    # $self->fix_selinux;
- 
-     my $base = basename($self->install_path->{htdocs});
- 
---- install_util/GBrowseInstall.pm.ori	2011-02-14 13:39:46.000000000 +0100
-+++ install_util/GBrowseInstall.pm	2011-02-14 13:41:50.000000000 +0100
-@@ -438,25 +438,25 @@
-     $gid =~ /^(\d+)$/;
-     $gid = $1;
-     
--    unless (chown $uid,$gid,$tmp) {
--	$self->ownership_warning($tmp,$user);
--    }
-+#   unless (chown $uid,$gid,$tmp) {
-+#	$self->ownership_warning($tmp,$user);
-+#   }
- 
-     my $htdocs_i = File::Spec->catfile($self->install_path->{htdocs},'i');
-     my $images   = File::Spec->catfile($tmp,'images');
-     my $htdocs = $self->install_path->{htdocs};
--    chown $uid,-1,$htdocs;
--    {
--	local $> = $uid;
--	symlink($images,$htdocs_i);  # so symlinkifowner match works!
--    }
--    chown $>,-1,$self->install_path->{htdocs};
-+#    chown $uid,-1,$htdocs;
-+#    {
-+#	local $> = $uid;
-+#	symlink($images,$htdocs_i);  # so symlinkifowner match works!
-+#    }
-+#    chown $>,-1,$self->install_path->{htdocs};
- 
-     my $databases = $self->install_path->{'databases'};
-     
--    unless (chown $uid,$gid,glob(File::Spec->catfile($databases,'').'*')) {
--	$self->ownership_warning($databases,$user);
--    }
-+#    unless (chown $uid,$gid,glob(File::Spec->catfile($databases,'').'*')) {
-+#	$self->ownership_warning($databases,$user);
-+#    }
- 
-     # chmod 0755,File::Spec->catfile($self->install_path->{'etc'},'init.d','gbrowse-slave');
-     # $self->fix_selinux;
---- install_util/GBrowseInstall.pm.ori	2011-02-14 13:50:41.000000000 +0100
-+++ install_util/GBrowseInstall.pm	2011-02-14 13:51:46.000000000 +0100
-@@ -470,11 +470,11 @@
-     my @inc           = map{"-I$_"} split ':',$self->added_to_INC;
-     system $perl,@inc,$metadb_script;
- 
--    if (Module::Build->y_n(
--	    "It is recommended that you restart Apache. Shall I try this for you?",'y'
--	)) {
--	system "sudo /etc/init.d/apache2 restart";
--    }
-+#    if (Module::Build->y_n(
-+#	    "It is recommended that you restart Apache. Shall I try this for you?",'y'
-+#	)) {
-+#	system "sudo /etc/init.d/apache2 restart";
-+#    }
-     
-     print STDERR "\n***INSTALLATION COMPLETE***\n";
-     print STDERR "Load http://localhost/$base for demo and documentation.\n";

diff --git a/sci-biology/gbrowse/files/GBrowseInstall.pm-2.33.patch b/sci-biology/gbrowse/files/GBrowseInstall.pm-2.38.patch
similarity index 100%
rename from sci-biology/gbrowse/files/GBrowseInstall.pm-2.33.patch
rename to sci-biology/gbrowse/files/GBrowseInstall.pm-2.38.patch

diff --git a/sci-biology/gbrowse/files/GBrowseInstall.pm-disable-gbrowse_metadb_config.pl.pm-2.26.patch b/sci-biology/gbrowse/files/GBrowseInstall.pm-disable-gbrowse_metadb_config.pl.pm-2.26.patch
deleted file mode 100644
index 0dde704..0000000
--- a/sci-biology/gbrowse/files/GBrowseInstall.pm-disable-gbrowse_metadb_config.pl.pm-2.26.patch
+++ /dev/null
@@ -1,21 +0,0 @@
---- install_util/GBrowseInstall.pm.ori	2011-05-11 04:10:08.000000000 +0200
-+++ install_util/GBrowseInstall.pm	2011-05-11 04:10:26.000000000 +0200
-@@ -463,12 +463,12 @@
- 
-     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;
-+#    # 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;
- 
- #    if (Module::Build->y_n(
- #	    "It is recommended that you restart Apache. Shall I try this for you?",'y'

diff --git a/sci-biology/gbrowse/gbrowse-2.26.ebuild b/sci-biology/gbrowse/gbrowse-2.26.ebuild
deleted file mode 100644
index 363d18d..0000000
--- a/sci-biology/gbrowse/gbrowse-2.26.ebuild
+++ /dev/null
@@ -1,170 +0,0 @@
-# Copyright 1999-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: $
-EAPI="2"
-
-inherit perl-module webapp
-
-MY_P="GBrowse-${PV}"
-
-DESCRIPTION="Display of genomic annotations on interactive web pages"
-HOMEPAGE="http://gmod.org/"
-SRC_URI="
-	mirror://sourceforge/gmod/${MY_P}.tar.gz
-	test? (
-		http://sourceforge.net/projects/gmod/files/Generic%20Genome%20Browser/Sample%20Data%20Files/saccharomyces_cerevisiae.gff.bz2
-		http://sourceforge.net/projects/gmod/files/Generic%20Genome%20Browser/Sample%20Data%20Files/Refseq_Genome_TBLASTX.tar.gz
-		http://sourceforge.net/projects/gmod/files/Generic%20Genome%20Browser/Sample%20Data%20Files/README-gff-files
-		http://sourceforge.net/projects/gmod/files/Generic%20Genome%20Browser/Sample%20Data%20Files/human.gff.tar.gz
-		http://sourceforge.net/projects/gmod/files/Generic%20Genome%20Browser/Sample%20Data%20Files/yeast.fasta.gz
-		http://sourceforge.net/projects/gmod/files/Generic%20Genome%20Browser/Sample%20Data%20Files/yeast.gff.gz
-		http://sourceforge.net/projects/gmod/files/Generic%20Genome%20Browser/Sample%20Data%20Files/worm.fasta.gz
-		http://sourceforge.net/projects/gmod/files/Generic%20Genome%20Browser/Sample%20Data%20Files/worm.gff.gz
-		http://sourceforge.net/projects/gmod/files/Generic%20Genome%20Browser/Sample%20Data%20Files/fly.fasta.gz
-		http://sourceforge.net/projects/gmod/files/Generic%20Genome%20Browser/Sample%20Data%20Files/fly.gff.gz )"
-
-LICENSE="Artistic"
-# webapp ebuilds do not set SLOT
-KEYWORDS="~x86 ~amd64"
-IUSE="-minimal svg test" # lwp moby scf
-
-S="${WORKDIR}/${MY_P}"
-
-# TODO: dev-perl/MOBY, dev-perl/Bio-SCF, dev-perl/Safe-World (not compatible w/perl-5.10)
-# TODO: make sure www-servers/apache +cgi
-DEPEND="
-	>=dev-lang/perl-5.8.8
-	dev-perl/Capture-Tiny
-	>=sci-biology/bioperl-1.6
-	>=dev-perl/GD-2.07
-	dev-perl/IO-String
-	virtual/perl-Digest-MD5
-	>=dev-perl/CGI-Session-4.03
-	dev-perl/Statistics-Descriptive
-	>=dev-perl/Bio-Graphics-1.97
-	dev-perl/JSON
-	dev-perl/libwww-perl
-	svg? ( dev-perl/GD-SVG )"
-
-# TODO: based on the following message in apache/error_log the list of deps should be longer
-# GBROWSE NOTICE: To enable PDF generation, please enter the directory "/home/httpd" and run the commands: "sudo mkdir .inkscape .gnome2" and "sudo chown apache .inkscape .gnome2".  To turn off this message add "generate pdf = 0" to the [GENERAL] section of your GBrowse.conf configuration file., referer: http://127.0.0.1/gbrowse/cgi-bin/gbrowse_details/yeast?ref=chrII;start=90739;end=92028;name=YBL069W;class=Sequence;feature_id=881;db_id=annotations%3Adatabase
-
-#    *  Bio::DB::BigFile is not installed
-#    *  Bio::DB::Sam is not installed
-#    *  DBD::Pg is not installed
-
-RDEPEND="${DEPEND}
-	>=www-servers/apache-2.0.47
-	www-apache/mod_fastcgi
-	dev-perl/DBI
-	|| ( dev-perl/DBD-Pg dev-perl/DBD-mysql )
-	!minimal? (
-		dev-perl/File-NFSLock
-		dev-perl/FCGI
-		perl-core/Math-BigInt
-		perl-core/Math-BigInt-FastCalc
-		dev-perl/Math-BigInt-GMP
-		dev-perl/Digest-SHA1
-		dev-perl/Crypt-SSLeay
-		dev-perl/Net-SMTP-SSL
-		dev-perl/Net-OpenID-Consumer
-		virtual/perl-DB_File
-		dev-perl/DB_File-Lock
-		dev-perl/GD-SVG
-		dev-perl/Text-Shellwords
-		dev-perl/XML-Twig
-		dev-perl/XML-DOM
-		dev-perl/XML-Writer
-		dev-perl/XML-Parser
-		dev-perl/Bio-Das
-		dev-perl/Text-Shellwords
-	)"
-
-src_prepare() {
-	sed -i 's/return unless -t STDIN/return/' install_util/GBrowseInstall.pm || die
-	sed -i 's/process_/bp_process_/g' INSTALL || die
-	epatch "${FILESDIR}"/GBrowseInstall.pm-"${PV}".patch || die "Failed to patch"
-	epatch "${FILESDIR}"/GBrowseInstall.pm-disable-gbrowse_metadb_config.pl"${PV}".pm.patch || die "Failed to patch"
-}
-
-src_configure() {
-	# GBROWSE_ROOT is the root path in SRC_URI to be prepended
-	# /usr/share/webapps/gbrowse/2.03/htdocs/etc/gbrowse/GBrowse.conf
-
-	# if we use CONF="${D}${MY_HTDOCSDIR}"/etc/gbrowse the the install process
-	# will not find currently installed config files and therefore place *.conf
-	# files into "{$S}"/blib/conf/*.conf instead of creating "{$S}"/blib/conf/*.conf.new
-	webapp_src_preinst
-	perl Makefile.PL \
-		HTDOCS="${MY_HTDOCSDIR}" \
-		CGIBIN="${MY_HTDOCSDIR}"/cgi-bin \
-		CONF="${MY_HTDOCSDIR}"/etc/gbrowse \
-		PACKAGE_DIR="${D}" \
-		INSTALLDIRS=vendor \
-		GBROWSE_ROOT="gbrowse" \
-		DESTDIR="${D}" \
-		DATABASES="/var/www/gbrowse2/databases/" \
-		TMP="/var/tmp/gbrowse2" \
-		INSTALLETC="n" \
-		INSTALLCONF="n" \
-		WWWUSER="apache" \
-		DO_XS=1 \
-		NONROOT=1 \
-		|| die
-
-	#sed -i 's#DBI:SQLite:#DBI:SQLite:'${D}'#' "${S}"/install_util/GBrowseInstall.pm || die
-	#sed -i 's#DBI:SQLite:#DBI:SQLite:'${D}'#' "${S}"/conf/GBrowse.conf || die
-	#sed -i 's#/var/www/gbrowse2/databases/#'${D}'/var/www/gbrowse2/databases/#' "${S}"/_build/build_params
-	#sed -i 's#/var/www/gbrowse2/databases/#'${D}'/var/www/gbrowse2/databases/#' "${S}"/_build/config_data
-	#sed -i 's#/var/www/gbrowse2/databases/#'${D}'/var/www/gbrowse2/databases/#' "${S}"/_build/runtime_params
-}
-
-src_install() {
-	mydoc="Changes README TODO INSTALL"
-	perl-module_src_install
-
-	# TODO: write our own readme
-	webapp_src_preinst
-	webapp_postinst_txt en "${S}"/INSTALL || die
-	webapp_src_install
-
-	# should create a /etc/init.d/ startup script based on this
-	# /var/tmp/portage/sci-biology/gbrowse-2.03/work/GBrowse-2.03/etc/init.d/gbrowse-slave
-
-	# pre-create the directory so we can force its owner later on
-	mkdir -p "${D}"/var/www/gbrowse2/databases || die
-	chown -R apache.apache "${D}"/var/www/gbrowse2/databases || die
-	mkdir -p "${D}"/var/www/localhost/htdocs/gbrowse || die
-
-	ln -s "${D}"/var/tmp/gbrowse2/images "${D}"/var/www/localhost/htdocs/gbrowse/i || die
-
-	einfo "Probably you want to install a cron job to remove the generated temporary images:"
-	einfo "find /var/tmp/gbrowse2/images -type f -atime +20 -print -exec rm {}"
-
-	einfo "Make sure you compiled apache with +cgi and copy ${FILESDIR}/gbrowse.conf.vhosts.d to /etc/apache2/vhosts.d/"
-
-	sed -i "s#"${D}"##g" "${S}"/install_util/GBrowseInstall.pm || die
-	sed -i "s#"${D}"##" "${S}"/blib/conf/GBrowse.conf*
-	sed -i 's#DBI:SQLite:'${D}'/var/www/gbrowse2/databases/#DBI:SQLite:/var/www/gbrowse2/databases/#' "${S}"/install_util/GBrowseInstall.pm || die
-}
-
-pkg_postinst() {
-	webapp_pkg_postinst || die "webapp_pkg_postinst failed"
-
-	einfo "Please run gbrowse_metadb_config.pl to upate SQlite flatfiles or the live database"
-	einfo "This was disabled by "${FILESDIR}"/GBrowseInstall.pm-disable-gbrowse_metadb_config.pl.pm.patch"
-}
-
-src_test() {
-	mysql -uroot -p password -e 'create database yeast'
-	mysql -uroot -p password -e 'grant all privileges on yeast.* to gbrowse@localhost'
-	mysql -uroot -p password -e 'grant file on *.* to gbrowse@localhost'
-	mysql -uroot -p password -e 'grant select on yeast.* to nobody@localhost'
-
-	cd /usr/portage/distfiles || die
-	gzip -d yeast.fasta.gz || die
-	gzip -d yeast.gff.gz || die
-	#gzip -d fly.fasta.gz
-	#gzip -d fly.gff.gz
-	bp_bulk_load_gff.pl -d yeast -fasta yeast.fasta yeast.gff || die
-}

diff --git a/sci-biology/gbrowse/gbrowse-2.33.ebuild b/sci-biology/gbrowse/gbrowse-2.38.ebuild
similarity index 100%
rename from sci-biology/gbrowse/gbrowse-2.33.ebuild
rename to sci-biology/gbrowse/gbrowse-2.38.ebuild



^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [gentoo-commits] proj/sci:master commit in: sci-biology/gbrowse/files/, sci-biology/gbrowse/
@ 2011-05-11  8:59 Martin Mokrejs
  0 siblings, 0 replies; 8+ messages in thread
From: Martin Mokrejs @ 2011-05-11  8:59 UTC (permalink / raw
  To: gentoo-commits

commit:     46b6d2ba846a0e8ea47e0de6da3946d673aa7c79
Author:     Martin Mokrejs <mmokrejs <AT> fold <DOT> natur <DOT> cuni <DOT> cz>
AuthorDate: Wed May 11 08:58:07 2011 +0000
Commit:     Martin Mokrejs <mmokrejs <AT> fold <DOT> natur <DOT> cuni <DOT> cz>
CommitDate: Wed May 11 08:58:07 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=46b6d2ba

sci-biology/gbrowse-2.26: fixed sanbox violation but webap-config bug pops up afterwards (happens later during install)

(Portage version: 2.1.9.43/git/Linux i686, unsigned Manifest commit)

---
 ...stall.pm.patch => GBrowseInstall.pm-2.26.patch} |   12 ++++----
 .../gbrowse/files/GBrowseInstall.pm-2.33.patch     |   32 ++++++++++++++++++++
 ...-disable-gbrowse_metadb_config.pl.pm-2.26.patch |   21 +++++++++++++
 sci-biology/gbrowse/gbrowse-2.26.ebuild            |   30 +++++++++++++++---
 .../{gbrowse-2.26.ebuild => gbrowse-2.33.ebuild}   |   19 +++++++++--
 5 files changed, 99 insertions(+), 15 deletions(-)

diff --git a/sci-biology/gbrowse/files/GBrowseInstall.pm.patch b/sci-biology/gbrowse/files/GBrowseInstall.pm-2.26.patch
similarity index 81%
rename from sci-biology/gbrowse/files/GBrowseInstall.pm.patch
rename to sci-biology/gbrowse/files/GBrowseInstall.pm-2.26.patch
index 863930e..4c17f8d 100644
--- a/sci-biology/gbrowse/files/GBrowseInstall.pm.patch
+++ b/sci-biology/gbrowse/files/GBrowseInstall.pm-2.26.patch
@@ -1,5 +1,5 @@
---- GBrowse-2.26/install_util/GBrowseInstall.pm.ori	2010-11-27 12:01:58.000000000 +0100
-+++ GBrowse-2.26/install_util/GBrowseInstall.pm	2010-11-27 12:02:15.000000000 +0100
+--- install_util/GBrowseInstall.pm.ori	2010-11-27 12:01:58.000000000 +0100
++++ install_util/GBrowseInstall.pm	2010-11-27 12:02:15.000000000 +0100
 @@ -436,8 +436,8 @@
  	$self->ownership_warning($databases,$user);
      }
@@ -11,8 +11,8 @@
  
      my $base = basename($self->install_path->{htdocs});
  
---- GBrowse-2.26/install_util/GBrowseInstall.pm.ori	2011-02-14 13:39:46.000000000 +0100
-+++ GBrowse-2.26/install_util/GBrowseInstall.pm	2011-02-14 13:41:50.000000000 +0100
+--- install_util/GBrowseInstall.pm.ori	2011-02-14 13:39:46.000000000 +0100
++++ install_util/GBrowseInstall.pm	2011-02-14 13:41:50.000000000 +0100
 @@ -438,25 +438,25 @@
      $gid =~ /^(\d+)$/;
      $gid = $1;
@@ -51,8 +51,8 @@
  
      # chmod 0755,File::Spec->catfile($self->install_path->{'etc'},'init.d','gbrowse-slave');
      # $self->fix_selinux;
---- GBrowse-2.26/install_util/GBrowseInstall.pm.ori	2011-02-14 13:50:41.000000000 +0100
-+++ GBrowse-2.26/install_util/GBrowseInstall.pm	2011-02-14 13:51:46.000000000 +0100
+--- install_util/GBrowseInstall.pm.ori	2011-02-14 13:50:41.000000000 +0100
++++ install_util/GBrowseInstall.pm	2011-02-14 13:51:46.000000000 +0100
 @@ -470,11 +470,11 @@
      my @inc           = map{"-I$_"} split ':',$self->added_to_INC;
      system $perl,@inc,$metadb_script;

diff --git a/sci-biology/gbrowse/files/GBrowseInstall.pm-2.33.patch b/sci-biology/gbrowse/files/GBrowseInstall.pm-2.33.patch
new file mode 100644
index 0000000..e91fe16
--- /dev/null
+++ b/sci-biology/gbrowse/files/GBrowseInstall.pm-2.33.patch
@@ -0,0 +1,32 @@
+--- install_util/GBrowseInstall.pm.ori	2010-11-27 12:01:58.000000000 +0100
++++ install_util/GBrowseInstall.pm	2010-11-27 12:02:15.000000000 +0100
+@@ -436,8 +436,8 @@
+ 	$self->ownership_warning($databases,$user);
+     }
+ 
+-    chmod 0755,File::Spec->catfile($self->install_path->{'etc'},'init.d','gbrowse-slave');
+-    $self->fix_selinux;
++    # chmod 0755,File::Spec->catfile($self->install_path->{'etc'},'init.d','gbrowse-slave');
++    # $self->fix_selinux;
+ 
+     my $base = basename($self->install_path->{htdocs});
+ 
+--- install_util/GBrowseInstall.pm.ori	2011-02-14 13:50:41.000000000 +0100
++++ install_util/GBrowseInstall.pm	2011-02-14 13:51:46.000000000 +0100
+@@ -470,11 +470,11 @@
+     my @inc           = map{"-I$_"} split ':',$self->added_to_INC;
+     system $perl,@inc,$metadb_script;
+ 
+-    if (Module::Build->y_n(
+-	    "It is recommended that you restart Apache. Shall I try this for you?",'y'
+-	)) {
+-	system "sudo /etc/init.d/apache2 restart";
+-    }
++#    if (Module::Build->y_n(
++#	    "It is recommended that you restart Apache. Shall I try this for you?",'y'
++#	)) {
++#	system "sudo /etc/init.d/apache2 restart";
++#    }
+     
+     print STDERR "\n***INSTALLATION COMPLETE***\n";
+     print STDERR "Load http://localhost/$base for demo and documentation.\n";

diff --git a/sci-biology/gbrowse/files/GBrowseInstall.pm-disable-gbrowse_metadb_config.pl.pm-2.26.patch b/sci-biology/gbrowse/files/GBrowseInstall.pm-disable-gbrowse_metadb_config.pl.pm-2.26.patch
new file mode 100644
index 0000000..0dde704
--- /dev/null
+++ b/sci-biology/gbrowse/files/GBrowseInstall.pm-disable-gbrowse_metadb_config.pl.pm-2.26.patch
@@ -0,0 +1,21 @@
+--- install_util/GBrowseInstall.pm.ori	2011-05-11 04:10:08.000000000 +0200
++++ install_util/GBrowseInstall.pm	2011-05-11 04:10:26.000000000 +0200
+@@ -463,12 +463,12 @@
+ 
+     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;
++#    # 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;
+ 
+ #    if (Module::Build->y_n(
+ #	    "It is recommended that you restart Apache. Shall I try this for you?",'y'

diff --git a/sci-biology/gbrowse/gbrowse-2.26.ebuild b/sci-biology/gbrowse/gbrowse-2.26.ebuild
index b525bcc..89000cf 100644
--- a/sci-biology/gbrowse/gbrowse-2.26.ebuild
+++ b/sci-biology/gbrowse/gbrowse-2.26.ebuild
@@ -50,7 +50,6 @@ DEPEND=">=dev-lang/perl-5.8.8
 #    *  Bio::DB::Sam is not installed
 #    *  DBD::Pg is not installed
 
-
 RDEPEND="${DEPEND}
 	>=www-servers/apache-2.0.47
 	www-apache/mod_fastcgi
@@ -81,12 +80,17 @@ RDEPEND="${DEPEND}
 src_prepare() {
 	sed -i 's/return unless -t STDIN/return/' install_util/GBrowseInstall.pm || die
 	sed -i 's/process_/bp_process_/g' INSTALL || die
-	epatch "${FILESDIR}"/GBrowseInstall.pm.patch || die "Failed to patch"
+	epatch "${FILESDIR}"/GBrowseInstall.pm-"${PV}".patch || die "Failed to patch"
+	epatch "${FILESDIR}"/GBrowseInstall.pm-disable-gbrowse_metadb_config.pl"${PV}".pm.patch || die "Failed to patch"
 }
 
 src_configure() {
 	# GBROWSE_ROOT is the root path in SRC_URI to be prepended
 	# /usr/share/webapps/gbrowse/2.03/htdocs/etc/gbrowse/GBrowse.conf
+
+	# if we use CONF="${D}${MY_HTDOCSDIR}"/etc/gbrowse the the install process
+	# will not find currently installed config files and therefore place *.conf
+	# files into "{$S}"/blib/conf/*.conf instead of creating "{$S}"/blib/conf/*.conf.new
 	webapp_src_preinst
 	perl Makefile.PL \
 		HTDOCS="${MY_HTDOCSDIR}" \
@@ -104,6 +108,12 @@ src_configure() {
 		DO_XS=1 \
 		NONROOT=1 \
 		|| die
+
+	#sed -i 's#DBI:SQLite:#DBI:SQLite:'${D}'#' "${S}"/install_util/GBrowseInstall.pm || die
+	#sed -i 's#DBI:SQLite:#DBI:SQLite:'${D}'#' "${S}"/conf/GBrowse.conf || die
+	#sed -i 's#/var/www/gbrowse2/databases/#'${D}'/var/www/gbrowse2/databases/#' "${S}"/_build/build_params
+	#sed -i 's#/var/www/gbrowse2/databases/#'${D}'/var/www/gbrowse2/databases/#' "${S}"/_build/config_data
+	#sed -i 's#/var/www/gbrowse2/databases/#'${D}'/var/www/gbrowse2/databases/#' "${S}"/_build/runtime_params
 }
 
 src_install() {
@@ -111,25 +121,35 @@ src_install() {
 	perl-module_src_install
 
 	# TODO: write our own readme
-	webapp_postinst_txt en "${S}"/INSTALL
-	webapp_src_install || die "Failed running webapp_src_install"
+	webapp_src_preinst
+	webapp_postinst_txt en "${S}"/INSTALL || die
+	webapp_src_install
 
 	# should create a /etc/init.d/ startup script based on this
 	# /var/tmp/portage/sci-biology/gbrowse-2.03/work/GBrowse-2.03/etc/init.d/gbrowse-slave
 
+	# pre-create the directory so we can force its owner later on
+	mkdir -p "${D}"/var/www/gbrowse2/databases || die
 	chown -R apache.apache "${D}"/var/www/gbrowse2/databases || die
-
 	mkdir -p "${D}"/var/www/localhost/htdocs/gbrowse || die
+
 	ln -s "${D}"/var/tmp/gbrowse2/images "${D}"/var/www/localhost/htdocs/gbrowse/i || die
 
 	einfo "Probably you want to install a cron job to remove the generated temporary images:"
 	einfo "find /var/tmp/gbrowse2/images -type f -atime +20 -print -exec rm {}"
 
 	einfo "Make sure you compiled apache with +cgi and copy ${FILESDIR}/gbrowse.conf.vhosts.d to /etc/apache2/vhosts.d/"
+
+	sed -i "s#"${D}"##g" "${S}"/install_util/GBrowseInstall.pm || die
+	sed -i "s#"${D}"##" "${S}"/blib/conf/GBrowse.conf*
+	sed -i 's#DBI:SQLite:'${D}'/var/www/gbrowse2/databases/#DBI:SQLite:/var/www/gbrowse2/databases/#' "${S}"/install_util/GBrowseInstall.pm || die
 }
 
 pkg_postinst() {
 	webapp_pkg_postinst || die "webapp_pkg_postinst failed"
+
+	einfo "Please run gbrowse_metadb_config.pl to upate SQlite flatfiles or the live database"
+	einfo "This was disabled by "${FILESDIR}"/GBrowseInstall.pm-disable-gbrowse_metadb_config.pl.pm.patch"
 }
 
 src_test() {

diff --git a/sci-biology/gbrowse/gbrowse-2.26.ebuild b/sci-biology/gbrowse/gbrowse-2.33.ebuild
similarity index 86%
copy from sci-biology/gbrowse/gbrowse-2.26.ebuild
copy to sci-biology/gbrowse/gbrowse-2.33.ebuild
index b525bcc..e2bcfc3 100644
--- a/sci-biology/gbrowse/gbrowse-2.26.ebuild
+++ b/sci-biology/gbrowse/gbrowse-2.33.ebuild
@@ -9,7 +9,9 @@ MY_P="GBrowse-${PV}"
 
 DESCRIPTION="The generic genome browser provides a display of genomic annotations on interactive web pages"
 HOMEPAGE="http://gmod.org"
-SRC_URI="mirror://sourceforge/gmod/${MY_P}.tar.gz
+# mirror://sourceforge/gmod/${MY_P}.tar.gz
+# http://search.cpan.org/CPAN/authors/id/L/LD/LDS/GBrowse-2.33.tar.gz
+SRC_URI="http://search.cpan.org/CPAN/authors/id/L/LD/LDS/${MY_P}.tar.gz
 	test? ( http://sourceforge.net/projects/gmod/files/Generic%20Genome%20Browser/Sample%20Data%20Files/saccharomyces_cerevisiae.gff.bz2
 			http://sourceforge.net/projects/gmod/files/Generic%20Genome%20Browser/Sample%20Data%20Files/Refseq_Genome_TBLASTX.tar.gz
 			http://sourceforge.net/projects/gmod/files/Generic%20Genome%20Browser/Sample%20Data%20Files/README-gff-files
@@ -30,7 +32,9 @@ S="${WORKDIR}/${MY_P}"
 
 # TODO: dev-perl/MOBY, dev-perl/Bio-SCF, dev-perl/Safe-World (not compatible w/perl-5.10)
 # TODO: make sure www-servers/apache +cgi
-DEPEND=">=dev-lang/perl-5.8.8
+DEPEND="
+	>=perl-core/Module-Build-0.380.0
+	>=dev-lang/perl-5.8.8
 	dev-perl/Capture-Tiny
 	>=sci-biology/bioperl-1.6
 	>=dev-perl/GD-2.07
@@ -39,7 +43,7 @@ DEPEND=">=dev-lang/perl-5.8.8
 	>=dev-perl/CGI-Session-4.03
 	dev-perl/Statistics-Descriptive
 	>=dev-perl/Bio-Graphics-1.97
-	dev-perl/JSON
+	>=dev-perl/JSON-2.510.0
 	dev-perl/libwww-perl
 	svg? ( dev-perl/GD-SVG )"
 
@@ -81,7 +85,7 @@ RDEPEND="${DEPEND}
 src_prepare() {
 	sed -i 's/return unless -t STDIN/return/' install_util/GBrowseInstall.pm || die
 	sed -i 's/process_/bp_process_/g' INSTALL || die
-	epatch "${FILESDIR}"/GBrowseInstall.pm.patch || die "Failed to patch"
+	epatch "${FILESDIR}"/GBrowseInstall.pm-"${PV}".patch || die "Failed to patch"
 }
 
 src_configure() {
@@ -126,10 +130,17 @@ src_install() {
 	einfo "find /var/tmp/gbrowse2/images -type f -atime +20 -print -exec rm {}"
 
 	einfo "Make sure you compiled apache with +cgi and copy ${FILESDIR}/gbrowse.conf.vhosts.d to /etc/apache2/vhosts.d/"
+
+	sed -i "s#"${D}"##g" "${S}"/install_util/GBrowseInstall.pm || die
+	sed -i "s#"${D}"##" "${S}"/blib/conf/GBrowse.conf*
+	sed -i 's#DBI:SQLite:'${D}'/var/www/gbrowse2/databases/#DBI:SQLite:/var/www/gbrowse2/databases/#' "${S}"/install_util/GBrowseInstall.pm || die
 }
 
 pkg_postinst() {
 	webapp_pkg_postinst || die "webapp_pkg_postinst failed"
+
+	einfo "Please run gbrowse_metadb_config.pl to upate SQlite flatfiles or the live database"
+	einfo "This was disabled by "${FILESDIR}"/GBrowseInstall.pm-disable-gbrowse_metadb_config.pl.pm.patch"
 }
 
 src_test() {



^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [gentoo-commits] proj/sci:master commit in: sci-biology/gbrowse/files/, sci-biology/gbrowse/
@ 2011-02-14 15:48 Martin Mokrejs
  0 siblings, 0 replies; 8+ messages in thread
From: Martin Mokrejs @ 2011-02-14 15:48 UTC (permalink / raw
  To: gentoo-commits

commit:     2cd3f93dfd0672f228900dd9584f57f573fbdc46
Author:     Martin Mokrejs <mmokrejs <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 14 15:30:31 2011 +0000
Commit:     Martin Mokrejs <mmokrejs <AT> fold <DOT> natur <DOT> cuni <DOT> cz>
CommitDate: Mon Feb 14 15:30:31 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=2cd3f93d

sci-biology/gbrowse: version bump, more DEPS added, tiny webappconfig improvement

(Portage version: 2.1.9.28/git/Linux i686, unsigned Manifest commit)

---
 sci-biology/gbrowse/files/GBrowseInstall.pm.patch  |   63 +++++++++++++++++++-
 .../{gbrowse-2.03.ebuild => gbrowse-2.26.ebuild}   |   16 +++++-
 2 files changed, 76 insertions(+), 3 deletions(-)

diff --git a/sci-biology/gbrowse/files/GBrowseInstall.pm.patch b/sci-biology/gbrowse/files/GBrowseInstall.pm.patch
index e6163a7..863930e 100644
--- a/sci-biology/gbrowse/files/GBrowseInstall.pm.patch
+++ b/sci-biology/gbrowse/files/GBrowseInstall.pm.patch
@@ -1,5 +1,5 @@
---- GBrowse-2.03/install_util/GBrowseInstall.pm.ori	2010-11-27 12:01:58.000000000 +0100
-+++ GBrowse-2.03/install_util/GBrowseInstall.pm	2010-11-27 12:02:15.000000000 +0100
+--- GBrowse-2.26/install_util/GBrowseInstall.pm.ori	2010-11-27 12:01:58.000000000 +0100
++++ GBrowse-2.26/install_util/GBrowseInstall.pm	2010-11-27 12:02:15.000000000 +0100
 @@ -436,8 +436,8 @@
  	$self->ownership_warning($databases,$user);
      }
@@ -11,3 +11,62 @@
  
      my $base = basename($self->install_path->{htdocs});
  
+--- GBrowse-2.26/install_util/GBrowseInstall.pm.ori	2011-02-14 13:39:46.000000000 +0100
++++ GBrowse-2.26/install_util/GBrowseInstall.pm	2011-02-14 13:41:50.000000000 +0100
+@@ -438,25 +438,25 @@
+     $gid =~ /^(\d+)$/;
+     $gid = $1;
+     
+-    unless (chown $uid,$gid,$tmp) {
+-	$self->ownership_warning($tmp,$user);
+-    }
++#   unless (chown $uid,$gid,$tmp) {
++#	$self->ownership_warning($tmp,$user);
++#   }
+ 
+     my $htdocs_i = File::Spec->catfile($self->install_path->{htdocs},'i');
+     my $images   = File::Spec->catfile($tmp,'images');
+     my $htdocs = $self->install_path->{htdocs};
+-    chown $uid,-1,$htdocs;
+-    {
+-	local $> = $uid;
+-	symlink($images,$htdocs_i);  # so symlinkifowner match works!
+-    }
+-    chown $>,-1,$self->install_path->{htdocs};
++#    chown $uid,-1,$htdocs;
++#    {
++#	local $> = $uid;
++#	symlink($images,$htdocs_i);  # so symlinkifowner match works!
++#    }
++#    chown $>,-1,$self->install_path->{htdocs};
+ 
+     my $databases = $self->install_path->{'databases'};
+     
+-    unless (chown $uid,$gid,glob(File::Spec->catfile($databases,'').'*')) {
+-	$self->ownership_warning($databases,$user);
+-    }
++#    unless (chown $uid,$gid,glob(File::Spec->catfile($databases,'').'*')) {
++#	$self->ownership_warning($databases,$user);
++#    }
+ 
+     # chmod 0755,File::Spec->catfile($self->install_path->{'etc'},'init.d','gbrowse-slave');
+     # $self->fix_selinux;
+--- GBrowse-2.26/install_util/GBrowseInstall.pm.ori	2011-02-14 13:50:41.000000000 +0100
++++ GBrowse-2.26/install_util/GBrowseInstall.pm	2011-02-14 13:51:46.000000000 +0100
+@@ -470,11 +470,11 @@
+     my @inc           = map{"-I$_"} split ':',$self->added_to_INC;
+     system $perl,@inc,$metadb_script;
+ 
+-    if (Module::Build->y_n(
+-	    "It is recommended that you restart Apache. Shall I try this for you?",'y'
+-	)) {
+-	system "sudo /etc/init.d/apache2 restart";
+-    }
++#    if (Module::Build->y_n(
++#	    "It is recommended that you restart Apache. Shall I try this for you?",'y'
++#	)) {
++#	system "sudo /etc/init.d/apache2 restart";
++#    }
+     
+     print STDERR "\n***INSTALLATION COMPLETE***\n";
+     print STDERR "Load http://localhost/$base for demo and documentation.\n";

diff --git a/sci-biology/gbrowse/gbrowse-2.03.ebuild b/sci-biology/gbrowse/gbrowse-2.26.ebuild
similarity index 93%
rename from sci-biology/gbrowse/gbrowse-2.03.ebuild
rename to sci-biology/gbrowse/gbrowse-2.26.ebuild
index 9fc872b..b525bcc 100644
--- a/sci-biology/gbrowse/gbrowse-2.03.ebuild
+++ b/sci-biology/gbrowse/gbrowse-2.26.ebuild
@@ -31,6 +31,7 @@ S="${WORKDIR}/${MY_P}"
 # TODO: dev-perl/MOBY, dev-perl/Bio-SCF, dev-perl/Safe-World (not compatible w/perl-5.10)
 # TODO: make sure www-servers/apache +cgi
 DEPEND=">=dev-lang/perl-5.8.8
+	dev-perl/Capture-Tiny
 	>=sci-biology/bioperl-1.6
 	>=dev-perl/GD-2.07
 	dev-perl/IO-String
@@ -45,6 +46,11 @@ DEPEND=">=dev-lang/perl-5.8.8
 # TODO: based on the following message in apache/error_log the list of deps should be longer
 # GBROWSE NOTICE: To enable PDF generation, please enter the directory "/home/httpd" and run the commands: "sudo mkdir .inkscape .gnome2" and "sudo chown apache .inkscape .gnome2".  To turn off this message add "generate pdf = 0" to the [GENERAL] section of your GBrowse.conf configuration file., referer: http://127.0.0.1/gbrowse/cgi-bin/gbrowse_details/yeast?ref=chrII;start=90739;end=92028;name=YBL069W;class=Sequence;feature_id=881;db_id=annotations%3Adatabase
 
+#    *  Bio::DB::BigFile is not installed
+#    *  Bio::DB::Sam is not installed
+#    *  DBD::Pg is not installed
+
+
 RDEPEND="${DEPEND}
 	>=www-servers/apache-2.0.47
 	www-apache/mod_fastcgi
@@ -54,6 +60,8 @@ RDEPEND="${DEPEND}
 		dev-perl/File-NFSLock
 		dev-perl/FCGI
 		perl-core/Math-BigInt
+		perl-core/Math-BigInt-FastCalc
+		dev-perl/Math-BigInt-GMP
 		dev-perl/Digest-SHA1
 		dev-perl/Crypt-SSLeay
 		dev-perl/Net-SMTP-SSL
@@ -67,6 +75,7 @@ RDEPEND="${DEPEND}
 		dev-perl/XML-Writer
 		dev-perl/XML-Parser
 		dev-perl/Bio-Das
+		dev-perl/Text-Shellwords
 	)"
 
 src_prepare() {
@@ -93,6 +102,7 @@ src_configure() {
 		INSTALLCONF="n" \
 		WWWUSER="apache" \
 		DO_XS=1 \
+		NONROOT=1 \
 		|| die
 }
 
@@ -102,7 +112,7 @@ src_install() {
 
 	# TODO: write our own readme
 	webapp_postinst_txt en "${S}"/INSTALL
-	webapp_src_install
+	webapp_src_install || die "Failed running webapp_src_install"
 
 	# should create a /etc/init.d/ startup script based on this
 	# /var/tmp/portage/sci-biology/gbrowse-2.03/work/GBrowse-2.03/etc/init.d/gbrowse-slave
@@ -118,6 +128,10 @@ src_install() {
 	einfo "Make sure you compiled apache with +cgi and copy ${FILESDIR}/gbrowse.conf.vhosts.d to /etc/apache2/vhosts.d/"
 }
 
+pkg_postinst() {
+	webapp_pkg_postinst || die "webapp_pkg_postinst failed"
+}
+
 src_test() {
 	mysql -uroot -p password -e 'create database yeast'
 	mysql -uroot -p password -e 'grant all privileges on yeast.* to gbrowse@localhost'



^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-01-17 18:11 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-30 10:46 [gentoo-commits] proj/sci:master commit in: sci-biology/gbrowse/files/, sci-biology/gbrowse/ Martin Mokrejs
  -- strict thread matches above, loose matches on Subject: below --
2012-01-17 18:11 Martin Mokrejs
2011-07-30 19:22 Martin Mokrejs
2011-07-30 15:43 Martin Mokrejs
2011-07-30 14:45 Martin Mokrejs
2011-06-28 17:15 Justin Lecher
2011-05-11  8:59 Martin Mokrejs
2011-02-14 15:48 Martin Mokrejs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox