[med-svn] r6529 - in trunk/packages/gbrowse/trunk/debian: . patches

olivier sallou osallou-guest at alioth.debian.org
Tue Apr 12 11:23:47 UTC 2011


Author: osallou-guest
Date: 2011-04-12 11:23:30 +0000 (Tue, 12 Apr 2011)
New Revision: 6529

Modified:
   trunk/packages/gbrowse/trunk/debian/gbrowse-data.install
   trunk/packages/gbrowse/trunk/debian/gbrowse-data.postinst
   trunk/packages/gbrowse/trunk/debian/gbrowse.dirs
   trunk/packages/gbrowse/trunk/debian/patches/debian-packaging-patch
   trunk/packages/gbrowse/trunk/debian/postinst
   trunk/packages/gbrowse/trunk/debian/rules
Log:
move db related to /var/lib, restart slave process for gbrowse-data install

Modified: trunk/packages/gbrowse/trunk/debian/gbrowse-data.install
===================================================================
--- trunk/packages/gbrowse/trunk/debian/gbrowse-data.install	2011-04-12 08:39:38 UTC (rev 6528)
+++ trunk/packages/gbrowse/trunk/debian/gbrowse-data.install	2011-04-12 11:23:30 UTC (rev 6529)
@@ -1 +1 @@
-sample_data/*  usr/share/gbrowse/databases/
+sample_data/*  var/lib/gbrowse/databases/

Modified: trunk/packages/gbrowse/trunk/debian/gbrowse-data.postinst
===================================================================
--- trunk/packages/gbrowse/trunk/debian/gbrowse-data.postinst	2011-04-12 08:39:38 UTC (rev 6528)
+++ trunk/packages/gbrowse/trunk/debian/gbrowse-data.postinst	2011-04-12 11:23:30 UTC (rev 6529)
@@ -4,8 +4,11 @@
 
 case "$1" in
     configure)
-        chown -R root:www-data /usr/share/gbrowse/databases
-        chmod -R 770 /usr/share/gbrowse/databases
+        chown -R root:www-data /var/lib/gbrowse/databases
+        chmod -R 770 /var/lib/gbrowse/databases
+	if [ -e /etc/init.d/gbrowse-slave ] ; then
+	/etc/init.d/gbrowse-slave restart
+	fi
     ;;
 
     abort-upgrade|abort-remove|abort-deconfigure)

Modified: trunk/packages/gbrowse/trunk/debian/gbrowse.dirs
===================================================================
--- trunk/packages/gbrowse/trunk/debian/gbrowse.dirs	2011-04-12 08:39:38 UTC (rev 6528)
+++ trunk/packages/gbrowse/trunk/debian/gbrowse.dirs	2011-04-12 11:23:30 UTC (rev 6529)
@@ -1,3 +1,4 @@
 etc/gbrowse
 usr/share/perl5
 var/cache/gbrowse/sessions
+var/lib/gbrowse/databases

Modified: trunk/packages/gbrowse/trunk/debian/patches/debian-packaging-patch
===================================================================
--- trunk/packages/gbrowse/trunk/debian/patches/debian-packaging-patch	2011-04-12 08:39:38 UTC (rev 6528)
+++ trunk/packages/gbrowse/trunk/debian/patches/debian-packaging-patch	2011-04-12 11:23:30 UTC (rev 6529)
@@ -1,8 +1,99 @@
 Patch to fit debian packaging - Olivier Sallou - February 2011
-Index: gbrowse-2.26~dfsg.orig/install_util/GBrowseInstall.pm
-===================================================================
---- gbrowse-2.26~dfsg.orig.orig/install_util/GBrowseInstall.pm  2011-04-10 18:12:34.000000000 +0900
-+++ gbrowse-2.26~dfsg.orig/install_util/GBrowseInstall.pm       2011-04-10 18:25:03.000000000 +0900
+--- a/etc/init.d/gbrowse-slave
++++ b/etc/init.d/gbrowse-slave
+@@ -1,10 +1,10 @@
+ #!/bin/sh
+ ### BEGIN INIT INFO
+ # Provides:          gbrowse_slave
+-# Required-Start:    $local_fs
+-# Required-Stop:     $local_fs
+-# Default-Start:     28
+-# Default-Stop:      S
++# Required-Start:    $remote_fs $syslog
++# Required-Stop:     $remote_fs $syslog
++# Default-Start:     2 3 4 5
++# Default-Stop:      0 1 6
+ # Short-Description: Start/Stop the gbrowse_slave rendering server.
+ ### END INIT INFO
+ 
+@@ -13,7 +13,7 @@
+ NAME="gbrowse-slave"
+ DESC="GBrowse slave track rendering server"
+ 
+-test -x $DAEMON || exit 0
++#test -x $DAEMON || exit 0
+ set -e
+ 
+ USER=$WWWUSER
+--- a/etc/default/gbrowse-slave
++++ b/etc/default/gbrowse-slave
+@@ -2,9 +2,9 @@
+ 
+ export PERL5LIB=$PERL5LIB
+ 
+-DAEMON=$INSTALLSCRIPT/gbrowse_slave
+-USER=$WWWUSER
+-PRELOAD=$CONF/slave_preload.conf
++DAEMON=/usr/bin/gbrowse_slave
++USER=www-data
++PRELOAD=/etc/gbrowse/slave_preload.conf
+ RUNDIR=/var/run/gbrowse
+ LOGDIR=/var/log/gbrowse
+ PORT="8101 8102 8103"
+--- a/bin/gbrowse_metadb_config.pl
++++ b/bin/gbrowse_metadb_config.pl
+@@ -21,7 +21,10 @@
+ my @argv = @ARGV;
+ 
+ my ($dsn, $admin);
++my $new=0;
++
+ GetOptions('dsn=s'         => \$dsn,
++           'new'           => \$new,
+            'admin=s'       => \$admin) or die <<EOF;
+ Usage: $0 [options] <optional path to GBrowse.conf>
+ 
+@@ -169,10 +172,12 @@
+ check_table("uploads",          $uploads_columns);
+ check_table("sharing",          $sharing_columns);
+ 
++if($new==0) {
+ check_sessions();
+ check_uploads_ids();
+ check_all_files();
+ check_data_sources();
++}
+ fix_sqlite_permissions() if $type =~ /sqlite/i;
+ 
+ $database->disconnect;
+--- a/htdocs/index.html
++++ b/htdocs/index.html
+@@ -24,7 +24,7 @@
+   <dd><a href="example_scripts">$HTDOCS/example_scripts</a></dd>
+ </dl>
+ 
+-<h2>Example Databases</h2>
++<h2>Example Databases (requires gbrowse-data package)</h2>
+ 
+ <p>
+ 
+@@ -56,12 +56,11 @@
+ <li><a href="/gb2/gbrowse/yeast">http://your.host/gb2/gbrowse/yeast</a></li>
+ <li><a href="/gb2/gbrowse/yeast_advanced">http://your.host/gb2/gbrowse/yeast_advanced</a></li>
+ <li><a href="/gb2/gbrowse/yeast_renderfarm">http://your.host/gb2/gbrowse/yeast_renderfarm</a></li>
+-<li><a href="/gb2/gbrowse/pop_demo">http://your.host/gb2/gbrowse/pop_demo</a> (demo of embedded population allele frequency maps -- requires Template module to be installed)</li>
+ </ul>
+ 
+ <h3>Accelerated Demos</h3>
+-
+-If you have FastCGI and/or ModPerl installed, you will have access to
++By default, FastCGI and ModPerl are not set by gbrowse installation,
++However, if you have FastCGI and/or ModPerl installed, you will have access to
+ accelerated versions of gbrowse a these URLs:
+ 
+ <ul>
+--- a/install_util/GBrowseInstall.pm
++++ b/install_util/GBrowseInstall.pm
 @@ -28,6 +28,7 @@
  		wwwuser       => 'User account under which Apache daemon runs?',
  		installconf   => 'Automatically update Apache config files to run GBrowse?',
@@ -11,7 +102,7 @@
      );
  my %OK_PROPS = @OK_PROPS;
  
-@@ -403,6 +404,84 @@
+@@ -403,6 +404,83 @@
  END
  }
  
@@ -68,7 +159,6 @@
 +    }
 +
 +    my $databases = $self->install_path->{'databases'};
-+   
 +
 +    #chmod 0755,File::Spec->catfile($self->install_path->{'etc'},'init.d','gbrowse-slave');
 +    #$self->fix_selinux;
@@ -76,11 +166,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, at inc,$metadb_script,"--dsn=DBI:SQLite:debian/gbrowse/usr/share/gbrowse/databases/users.sqlite";
++    #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, at inc,$metadb_script,"--dsn=DBI:SQLite:debian/gbrowse/var/lib/gbrowse/users.sqlite";
 +
 +}
 +
@@ -96,95 +186,30 @@
  sub ACTION_install {
      my $self = shift;
      my $prefix = $self->install_base || $self->prefix || '';
-Index: gbrowse-2.26~dfsg.orig/etc/init.d/gbrowse-slave
-===================================================================
---- gbrowse-2.26~dfsg.orig.orig/etc/init.d/gbrowse-slave	2011-04-10 18:12:23.000000000 +0900
-+++ gbrowse-2.26~dfsg.orig/etc/init.d/gbrowse-slave	2011-04-10 18:12:26.000000000 +0900
-@@ -1,10 +1,10 @@
- #!/bin/sh
- ### BEGIN INIT INFO
- # Provides:          gbrowse_slave
--# Required-Start:    $local_fs
--# Required-Stop:     $local_fs
--# Default-Start:     28
--# Default-Stop:      S
-+# Required-Start:    $remote_fs $syslog
-+# Required-Stop:     $remote_fs $syslog
-+# Default-Start:     2 3 4 5
-+# Default-Stop:      0 1 6
- # Short-Description: Start/Stop the gbrowse_slave rendering server.
- ### END INIT INFO
+@@ -717,8 +795,9 @@
+ sub guess_user_account_db {
+     my $self = shift;
+     if (eval "require DBD::SQLite; 1") {
+-	my $databases = $self->config_data('databases');
+-	return "DBI:SQLite:$databases/users.sqlite";
++	#my $databases = $self->config_data('databases');
++	#return "DBI:SQLite:$databases/users.sqlite";
++	return "DBI:SQLite:/var/lib/gbrowse/users.sqlite";
+     } elsif (eval "require DBD::mysql; 1") {
+ 	return 'DBI:mysql:gbrowse_login;user=gbrowse;password=gbrowse';
+     } else {
+--- a/conf/GBrowse.conf
++++ b/conf/GBrowse.conf
+@@ -158,9 +158,9 @@
+ # "user_accounts" is true, then GBrowse
+ # will attempt to use its internal user accounts database
+ # to authenticate and/or register users.
+-user_accounts               = $CAN_USER_ACCOUNTS
+-user_accounts_registration  = $CAN_USER_ACCOUNTS_REG
+-user_accounts_openid        = $CAN_USER_ACCOUNTS_OPENID
++user_accounts               = 0
++user_accounts_registration  = 0
++user_accounts_openid        = 0
  
-Index: gbrowse-2.26~dfsg.orig/etc/default/gbrowse-slave
-===================================================================
---- gbrowse-2.26~dfsg.orig.orig/etc/default/gbrowse-slave	2011-04-10 18:12:23.000000000 +0900
-+++ gbrowse-2.26~dfsg.orig/etc/default/gbrowse-slave	2011-04-10 18:12:26.000000000 +0900
-@@ -2,9 +2,9 @@
- 
- export PERL5LIB=$PERL5LIB
- 
--DAEMON=$INSTALLSCRIPT/gbrowse_slave
--USER=$WWWUSER
--PRELOAD=$CONF/slave_preload.conf
-+DAEMON=/usr/bin/gbrowse_slave
-+USER=www-data
-+PRELOAD=/etc/gbrowse/slave_preload.conf
- RUNDIR=/var/run/gbrowse
- LOGDIR=/var/log/gbrowse
- PORT="8101 8102 8103"
-Index: gbrowse-2.26~dfsg.orig/bin/gbrowse_metadb_config.pl
-===================================================================
---- gbrowse-2.26~dfsg.orig.orig/bin/gbrowse_metadb_config.pl	2011-04-10 18:12:23.000000000 +0900
-+++ gbrowse-2.26~dfsg.orig/bin/gbrowse_metadb_config.pl	2011-04-10 18:12:26.000000000 +0900
-@@ -21,7 +21,10 @@
- my @argv = @ARGV;
- 
- my ($dsn, $admin);
-+my $new=0;
-+
- GetOptions('dsn=s'         => \$dsn,
-+           'new'           => \$new,
-            'admin=s'       => \$admin) or die <<EOF;
- Usage: $0 [options] <optional path to GBrowse.conf>
- 
-@@ -169,10 +172,12 @@
- check_table("uploads",          $uploads_columns);
- check_table("sharing",          $sharing_columns);
- 
-+if($new==0) {
- check_sessions();
- check_uploads_ids();
- check_all_files();
- check_data_sources();
-+}
- fix_sqlite_permissions() if $type =~ /sqlite/i;
- 
- $database->disconnect;
-Index: gbrowse-2.26~dfsg.orig/htdocs/index.html
-===================================================================
---- gbrowse-2.26~dfsg.orig.orig/htdocs/index.html	2011-04-10 18:12:23.000000000 +0900
-+++ gbrowse-2.26~dfsg.orig/htdocs/index.html	2011-04-10 18:12:26.000000000 +0900
-@@ -24,7 +24,7 @@
-   <dd><a href="example_scripts">$HTDOCS/example_scripts</a></dd>
- </dl>
- 
--<h2>Example Databases</h2>
-+<h2>Example Databases (requires gbrowse-data package)</h2>
- 
- <p>
- 
-@@ -56,12 +56,11 @@
- <li><a href="/gb2/gbrowse/yeast">http://your.host/gb2/gbrowse/yeast</a></li>
- <li><a href="/gb2/gbrowse/yeast_advanced">http://your.host/gb2/gbrowse/yeast_advanced</a></li>
- <li><a href="/gb2/gbrowse/yeast_renderfarm">http://your.host/gb2/gbrowse/yeast_renderfarm</a></li>
--<li><a href="/gb2/gbrowse/pop_demo">http://your.host/gb2/gbrowse/pop_demo</a> (demo of embedded population allele frequency maps -- requires Template module to be installed)</li>
- </ul>
- 
- <h3>Accelerated Demos</h3>
--
--If you have FastCGI and/or ModPerl installed, you will have access to
-+By default, FastCGI and ModPerl are not set by gbrowse installation,
-+However, if you have FastCGI and/or ModPerl installed, you will have access to
- accelerated versions of gbrowse a these URLs:
- 
- <ul>
+ # Path to the database -- you will need to create this database and grant all
+ # privileges on it to the indicated user.

Modified: trunk/packages/gbrowse/trunk/debian/postinst
===================================================================
--- trunk/packages/gbrowse/trunk/debian/postinst	2011-04-12 08:39:38 UTC (rev 6528)
+++ trunk/packages/gbrowse/trunk/debian/postinst	2011-04-12 11:23:30 UTC (rev 6529)
@@ -8,14 +8,14 @@
             mkdir -p /var/cache/gbrowse
         fi
         
-        chown -R root:www-data /usr/share/gbrowse/databases
-        chmod -R 770 /usr/share/gbrowse/databases
+        chown -R root:www-data /var/lib/gbrowse/databases
+        chmod -R 770 /var/lib/gbrowse/databases
         chown -R root:www-data /var/cache/gbrowse
         chmod -R 770 /var/cache/gbrowse
         # Initialize account database
         # perl /usr/bin/gbrowse_metadb_config
         chown -R www-data:www-data /var/cache/gbrowse/sessions
-        chown www-data:www-data /usr/share/gbrowse/databases/users.sqlite
+        #chown www-data:www-data /var/lib/gbrowse/users.sqlite
         
         update-rc.d gbrowse-slave defaults
     ;;

Modified: trunk/packages/gbrowse/trunk/debian/rules
===================================================================
--- trunk/packages/gbrowse/trunk/debian/rules	2011-04-12 08:39:38 UTC (rev 6528)
+++ trunk/packages/gbrowse/trunk/debian/rules	2011-04-12 11:23:30 UTC (rev 6529)
@@ -1,6 +1,6 @@
 #!/usr/bin/make -f
 
-GBROWSE_BUILD_OPTIONS = --conf=/etc/gbrowse --htdocs=/usr/share/gbrowse/htdocs --tmp=/var/cache/gbrowse --databases=/usr/share/gbrowse/databases --cgibin=/usr/lib/cgi-bin/gbrowse --www-user=www-data --registration_done=1
+GBROWSE_BUILD_OPTIONS = --conf=/etc/gbrowse --htdocs=/usr/share/gbrowse/htdocs --tmp=/var/cache/gbrowse --databases=/var/lib/gbrowse/databases --cgibin=/usr/lib/cgi-bin/gbrowse --www-user=www-data --registration_done=1
 
 %: 
 	dh $@
@@ -26,14 +26,11 @@
 	rm -f debian/gbrowse/usr/share/gbrowse/htdocs/js/scriptaculous.js
 	chmod 644 debian/gbrowse/etc/gbrowse/MobyServices/text_xml_renderer.pm
 	chmod 644 debian/gbrowse/etc/gbrowse/synteny/oryza.synconf.disabled
+	#Remove database (kept as separate package)
+	rm -rf debian/gbrowse/var/lib/gbrowse/databases/*
 	#Rename pl scripts in bin
 	rename 's/\.pl//' debian/gbrowse/bin/*.pl
 	mv debian/gbrowse/bin debian/gbrowse/usr/bin
-	# Remove databases, keep it as additional package
-	touch debian/gbrowse/usr/share/gbrowse/databases/users.sqlite
-	cp debian/gbrowse/usr/share/gbrowse/databases/users.sqlite debian/gbrowse/usr/share/gbrowse/
-	rm -rf debian/gbrowse/usr/share/gbrowse/databases/*
-	mv debian/gbrowse/usr/share/gbrowse/users.sqlite debian/gbrowse/usr/share/gbrowse/databases/
 	# Activate configuration files.
 	find $(CURDIR)/debian/gbrowse/etc -name '*.new' | xargs rename 's/.new//' 
 




More information about the debian-med-commit mailing list