[med-svn] r16469 - in trunk/packages/galaxy/trunk/debian: . apache-proxy-files apache-proxy-files/etc apache-proxy-files/etc/apache2 apache-proxy-files/etc/apache2/conf.d apache-proxy-files/etc/galaxy-server apache-proxy-files/usr apache-proxy-files/usr/share apache-proxy-files/usr/share/galaxy-server apache-proxy-files/usr/share/galaxy-server/logout apache-proxy-files/usr/share/galaxy-server/proxy config_override patches sbin source universe_wsgi.d
Timothy Booth
tbooth-guest at moszumanska.debian.org
Tue Mar 18 17:22:19 UTC 2014
Author: tbooth-guest
Date: 2014-03-18 17:22:19 +0000 (Tue, 18 Mar 2014)
New Revision: 16469
Added:
trunk/packages/galaxy/trunk/debian/README.apache2-setup
trunk/packages/galaxy/trunk/debian/README.postgres-setup
trunk/packages/galaxy/trunk/debian/README.source
trunk/packages/galaxy/trunk/debian/README.split-ini
trunk/packages/galaxy/trunk/debian/apache-proxy-files/
trunk/packages/galaxy/trunk/debian/apache-proxy-files/etc/
trunk/packages/galaxy/trunk/debian/apache-proxy-files/etc/apache2/
trunk/packages/galaxy/trunk/debian/apache-proxy-files/etc/apache2/conf.d/
trunk/packages/galaxy/trunk/debian/apache-proxy-files/etc/apache2/conf.d/galaxy
trunk/packages/galaxy/trunk/debian/apache-proxy-files/etc/apache2/conf.d/pwauth
trunk/packages/galaxy/trunk/debian/apache-proxy-files/etc/galaxy-server/
trunk/packages/galaxy/trunk/debian/apache-proxy-files/etc/galaxy-server/galaxy.htaccess
trunk/packages/galaxy/trunk/debian/apache-proxy-files/usr/
trunk/packages/galaxy/trunk/debian/apache-proxy-files/usr/share/
trunk/packages/galaxy/trunk/debian/apache-proxy-files/usr/share/galaxy-server/
trunk/packages/galaxy/trunk/debian/apache-proxy-files/usr/share/galaxy-server/logout/
trunk/packages/galaxy/trunk/debian/apache-proxy-files/usr/share/galaxy-server/logout/.htaccess
trunk/packages/galaxy/trunk/debian/apache-proxy-files/usr/share/galaxy-server/logout/.htpasswd
trunk/packages/galaxy/trunk/debian/apache-proxy-files/usr/share/galaxy-server/logout/logout.html
trunk/packages/galaxy/trunk/debian/apache-proxy-files/usr/share/galaxy-server/proxy/
trunk/packages/galaxy/trunk/debian/apache-proxy-files/usr/share/galaxy-server/proxy/.htaccess
trunk/packages/galaxy/trunk/debian/changelog
trunk/packages/galaxy/trunk/debian/compat
trunk/packages/galaxy/trunk/debian/config_override/
trunk/packages/galaxy/trunk/debian/config_override/README
trunk/packages/galaxy/trunk/debian/config_override/welcome.html
trunk/packages/galaxy/trunk/debian/control
trunk/packages/galaxy/trunk/debian/copy_sample_config.sh
trunk/packages/galaxy/trunk/debian/copyright
trunk/packages/galaxy/trunk/debian/galaxy-server-apache-proxy.docs
trunk/packages/galaxy/trunk/debian/galaxy-server-apache-proxy.install
trunk/packages/galaxy/trunk/debian/galaxy-server-apache-proxy.postinst
trunk/packages/galaxy/trunk/debian/galaxy-server-apache-proxy.postrm
trunk/packages/galaxy/trunk/debian/galaxy-server-pg-database.docs
trunk/packages/galaxy/trunk/debian/galaxy-server-pg-database.install
trunk/packages/galaxy/trunk/debian/galaxy-server-pg-database.postinst
trunk/packages/galaxy/trunk/debian/galaxy-server-pg-database.postrm
trunk/packages/galaxy/trunk/debian/galaxy-server-test.install
trunk/packages/galaxy/trunk/debian/galaxy-server.docs
trunk/packages/galaxy/trunk/debian/galaxy-server.install
trunk/packages/galaxy/trunk/debian/galaxy-server.postinst
trunk/packages/galaxy/trunk/debian/galaxy-server.postrm
trunk/packages/galaxy/trunk/debian/galaxy-server.prerm
trunk/packages/galaxy/trunk/debian/galaxy.conf
trunk/packages/galaxy/trunk/debian/galaxy.desktop
trunk/packages/galaxy/trunk/debian/galaxy_icon.png
trunk/packages/galaxy/trunk/debian/get-orig-source.sh
trunk/packages/galaxy/trunk/debian/goto_galaxy.sh
trunk/packages/galaxy/trunk/debian/link_configs_for_hacky_first_run.sh
trunk/packages/galaxy/trunk/debian/make_transfer_dirs.sh
trunk/packages/galaxy/trunk/debian/patches/
trunk/packages/galaxy/trunk/debian/patches/authenticate_via_pam
trunk/packages/galaxy/trunk/debian/patches/clustalw_not_clustalw2
trunk/packages/galaxy/trunk/debian/patches/drop_tmp_table_before_upgrade
trunk/packages/galaxy/trunk/debian/patches/fix_unit_test
trunk/packages/galaxy/trunk/debian/patches/force_use_of_bash_interpreter
trunk/packages/galaxy/trunk/debian/patches/keep_shed_tools_in_this_directory
trunk/packages/galaxy/trunk/debian/patches/misc_configuration_tweaks
trunk/packages/galaxy/trunk/debian/patches/relax_password_length_restriction
trunk/packages/galaxy/trunk/debian/patches/samtools_use_deb_package
trunk/packages/galaxy/trunk/debian/patches/series
trunk/packages/galaxy/trunk/debian/patches/tell_user_how_to_add_administrator
trunk/packages/galaxy/trunk/debian/patches/use_system_python_libs
trunk/packages/galaxy/trunk/debian/remove_obsolete_eggs.sh
trunk/packages/galaxy/trunk/debian/rules
trunk/packages/galaxy/trunk/debian/run.sh
trunk/packages/galaxy/trunk/debian/sbin/
trunk/packages/galaxy/trunk/debian/sbin/galaxy-add-administrator
trunk/packages/galaxy/trunk/debian/source/
trunk/packages/galaxy/trunk/debian/source/format
trunk/packages/galaxy/trunk/debian/source/include-binaries
trunk/packages/galaxy/trunk/debian/universe_wsgi.d/
trunk/packages/galaxy/trunk/debian/universe_wsgi.d/10_debian_defaults.ini
trunk/packages/galaxy/trunk/debian/universe_wsgi.d/31_apache-proxy.ini
trunk/packages/galaxy/trunk/debian/universe_wsgi.d/32_pg-database.ini
trunk/packages/galaxy/trunk/debian/universe_wsgi.ini.hacked
Log:
My work on the Galaxy server (galaxyproject.org)
This is way, way off something that could go into Debian, but at least it is progressing
in that direction.
Please don't hack on this now without talking to me (tbooth at ceh.ac.uk) but if you want to try and fix things
we need:
1) A startup script for Debian (I used Upstart which is only in Ubuntu)
2) Conversion of my manual PG setup to dbconfig-common
3) Integration with Nginx as an option instead of Apache
4) Elimination of eggs in favour of standard packages, and tests to pick up when this breaks
things.
5) Ditto for the .js bits
6) .. and more. See README files.
Added: trunk/packages/galaxy/trunk/debian/README.apache2-setup
===================================================================
--- trunk/packages/galaxy/trunk/debian/README.apache2-setup (rev 0)
+++ trunk/packages/galaxy/trunk/debian/README.apache2-setup 2014-03-18 17:22:19 UTC (rev 16469)
@@ -0,0 +1,235 @@
+Configuring Galaxy to use Apache2 on Bio-Linux
+==============================================
+
+The page -
+http://wiki.galaxyproject.org/Admin/Config/Apache%20Proxy
+outlines why one would want to use Apache as a proxy to Galaxy and how to go
+about setting it up. This document gives specific instructions for Bio-Linux,
+where the location of the galaxy server and the Apache2 configuration files are
+not in the locations assumed by the official Wiki.
+
+This document also explains how Apache2 proxying and PAM authentication are set up
+by the galaxy-server-apache-proxy package. "PAM authentication" just means that
+each user logs in with their regular system user name and password, rather than
+making an account on Galaxy against their e-mail address. A consequence of this
+is that users will also be able to transfer their files securely into Galaxy
+without using the web upload form.
+
+The galaxy-server-apache-proxy package activates both these
+features at once but you may want to enable proxying while still using internal
+authentication in Galaxy or you may have reconfigured your Apache server in a way
+that conflicts with the default settings. If this is the case, you should ignore
+the package and set things up manually as described here.
+
+Security warning!!
+==================
+
+The galaxy-server-apache-proxy package does not (yet) activate HTTPS on the
+Apache server, so anyone logging into Galaxy from outside the local server
+will end up sending their password in the clear over the network. For a
+closed local network this may be acceptable, but you should consider better
+security. See the section on "Secure Connections" below.
+
+Prerequisites
+=============
+
+You should have Apache2 installed and running from the regular apache2 package,
+so that your configuration fragments can be added to /etc/apache2/conf.d. This
+is the default on Bio-Linux. Visit http://localhost in a web browser to check
+iApache is running and you can see the standard test page displayed.
+
+In addition, assuming you want PAM authentication, install the following packages:
+
+ libapache2-mod-authnz-external
+ libapache2-mod-authz-unixgroup
+ pwauth
+
+Configuring the Apache Proxy
+============================
+
+We're going to set things up so Galaxy appears at http://your.machinename/galaxy.
+
+The Galaxy package on Bio-Linux is already configured to use a /galaxy prefix
+for the URLs, but if for some reason you decide to use some other prefix you will
+need to edit /etc/galaxy-server/universe_wsgi.ini and change the lines that say
+"prefix = /galaxy" and "cookie_path = /galaxy" and ensure that
+"filter-with = proxy-prefix" is also set appropriately.
+
+Now for Apache.
+
+ % sudo -i ## Will give you a root shell, represented here by a hash (#)
+ # a2enmod proxy proxy_http rewrite
+
+Put the following lines into a file named /etc/apache2/conf.d/galaxy:
+
+! Note: These are essentially equivalent to the ones listed in the Wiki page
+! but for those to work on BL they would need to be placed within the <VirtualHost>
+! tags in /etc/apache2/sites-enabled/default whereas this variant can be put
+! into conf.d without editing any existing files. Order of rules is very important.
+! Also the use of the proxy directory allows us to avoid costly auth calls for every
+! static file requested.
+
+Alias /galaxy /usr/share/galaxy-server
+<Directory /usr/share/galaxy-server>
+Options -Indexes
+RewriteEngine on
+RewriteBase /galaxy
+RewriteRule ^static/style/(.*) static/june_2007_style/blue/$1 [L]
+RewriteRule ^static/scripts/packed/ - [L]
+RewriteRule ^static/scripts/(.*) static/scripts/packed/$1 [L]
+RewriteRule ^(static|test-data)/ - [L]
+RewriteRule ^(favicon.ico|robots.txt) static/$1 [L]
+RewriteRule (.*) proxy/$1
+</Directory>
+<Directory /usr/share/galaxy-server/proxy>
+Options -Indexes
+AllowOverride AuthConfig FileInfo
+RewriteEngine on
+RewriteBase /galaxy/proxy
+RewriteRule (.*) http://localhost:8080/$1 [P,E=RU:%{REMOTE_USER}]
+</Directory>
+
+Ensure the proxy directory exists:
+
+ # mkdir -p /usr/share/galaxy-server/proxy
+
+And tell Apache to restart and activate this new config like so:
+
+ # service apache2 restart
+
+If you have a firewall installed, which is also default on Bio-Linux, you can
+use the firewall settings to control which machines can connect to your web
+server on port 80. If you only want to connect from the local machine (or via
+a proxied connection as outlined below) you can disallow all external connections
+on port 80 (default on BL) and just connect to the server via the loopback
+interface - ie: typing http://localhost/galaxy in a browser on the machine.
+
+You will also still be able to access Galaxy directly at http://localhost:8080 on
+the local machine and this will bypass Apache completely, but of course PAM
+authentication won't work if you do this.
+
+It is also possible to control which hosts can connect through Apache "allow" and "deny"
+directives, but I'm assuming if you want to do that you can work it out for yourself.
+
+Configuring PAM Authentication in Apache
+========================================
+
+We're going to make a system group called "galaxy" and only members of this group
+will be able to log in. You don't have to do this - you could allow any user to
+access Galaxy or you could use an existing group like "ssh" to say that anyone with
+remote shell login access can also access galaxy.
+
+ # groupadd galaxy
+ # usermod -aG galaxy user1
+ # usermod -aG galaxy user2
+
+(Where user1 and user2 are existing accounts on the system)
+
+Enable the three relevant Apache modules:
+
+ # a2enmod authnz_external authz_unixgroup headers
+
+Add the following lines to /etc/apache2/conf.d/pwauth:
+
+AddExternalAuth pwauth /usr/sbin/pwauth
+SetExternalAuthMethod pwauth pipe
+
+Add the following lines to /usr/share/galaxy-server/proxy/.htaccess:
+
+! Note the "Require group" line means only users in the galaxy group get access.
+
+AuthBasicProvider external
+AuthExternal pwauth
+AuthType Basic
+AuthName Galaxy_Server
+AuthzUnixgroup on
+Require group galaxy
+RequestHeader set REMOTE_USER %{RU}e env=RU
+RequestHeader unset Authorization env=RU
+
+And restart Apache once more:
+
+ # service apache2 restart
+
+! Note: The Wiki page gives a slightly more complicated way of dealing with the REMOTE_USER
+! variable which doesn't actually work for the setup described here. Looking on Google there
+! are various discussions of the issue but no explanations of the underlying problem, so I
+! had to experiment. The final RewriteRule in conf.d/galaxy above passes REMOTE_USER to the Proxy
+! module before it disappears from scope, and the RequestHeader line in .htaccess then adds
+! it to the proxied request. Passing the variable in the RewriteRule has no effect without
+! the RequestHeader directive so there is no reason not to have it there even if you are not
+! using Apache for authentication.
+! Also, the Authorization header has the password embedded in it, so I scrub this out before
+! proxying. Galaxy doesn't need this info and the less that login passwords are passed around
+! the better.
+
+Finally, tell Galaxy to defer user authentication to Apache. Edit /etc/galaxy-server/universe_wsgi.ini
+and find and modify these settings:
+
+use_remote_user = True
+remote_user_maildomain = localhost
+
+And restart Galaxy:
+
+ # service galaxy restart
+
+#### TODO - see if I can make logout work as per the last suggestion here:
+http://stackoverflow.com/questions/4163122/http-basic-authentication-log-out ###
+
+Enabling Efficient File Transfers
+=================================
+
+The Galaxy start-up script on Bio-Linux has a feature that it will scan for users in
+the galaxy group and for each user it will make a directory called eg. "user1 at localhost" under
+/var/lib/galaxy-server/transfer and set appropriate permissions so that users can place files
+there for upload with the Upload File feature of Galaxy.
+
+To enable this feature set the ftp_upload_dir option in /etc/galaxy-server/universe_wsgi.d to
+/var/lib/galaxy-server/transfer, and also set ftp_upload_site to the name of your server.
+
+Users likely want to make a symlink to their transfer area in their home directory - eg:
+
+ $ ln -s /var/lib/galaxy-server/transfer/$USER at localhost ~/galaxy_transfer
+
+! Note1 - galaxy-server-apache-proxy package will enable file transfers as described here, but
+! will not add symlinks to user home dirs. Each user has to do that themselves.
+! Note2 - users with a personal umask of 007 or 077 will need to ensure that the files they
+! put in their transfer directory are world-readable (o+r) so the Galaxy server can see them.
+! This will not make the files visible to other users as users cannot see into other transfer
+! directories at all.
+
+It is also possible to have things the other way round, replacing the user1 at localhost directory with
+a symlink to some folder in the user's home dir. The user will need to "chmod a+x ~" and the
+sysadmin will need to put the link in place. This could be useful if your /home
+and /var partitions are on different disks and you want to avoid moving files around.
+
+Secure Connections
+==================
+
+If you are using Galaxy on the local machine, connecting via "http://localhost/galaxy" there
+is no problem with network security as no passwords go over the wire. On a local ethernet
+segment it is arguably over-paranoid to worry about password sniffing, but on a WAN or any
+sort of wireless connection youa really want to encrypt traffic.
+
+Option 1: Use FreeNX or X2Go or SSH with X11 forwarding to run a web browser on the Bio-Linux
+machine displayed on your own PC. This is secure but can be slow, makes file transfers and
+printing complicated, and rather defeats the object of doing your analysis in the web browser.
+
+Option 2: Get SSH to do secure port forwarding. If your PC is Linux or MacOS, on the command
+line:
+ ssh -L8090:127.0.0.1:80 myserver.neasden.ac.uk
+
+Then so long as the SSH connection is active, you can point a web browser at
+"http://localhost:8090/galaxy" to get to Galaxy on the server, with the connection
+encrypted by SSH. There is no need to open port 80 on the server firewall. On Windows use
+PuTTY, and under the Tunnels option and add a local port forwarding rule.
+
+Option 3: Install and configure the libapache2-mod-gnutls package to switch Apache to serving
+secure HTTP requests. Setting up mod-gnutls is beyond the scope of this doc but is explained
+in detail elsewhere.
+
+More Help
+=========
+
+Please ask any questions specifically relating to Galaxy on Bio-Linux on the community
+mailing list bio-linux at nebc.nerc.ac.uk.
Added: trunk/packages/galaxy/trunk/debian/README.postgres-setup
===================================================================
--- trunk/packages/galaxy/trunk/debian/README.postgres-setup (rev 0)
+++ trunk/packages/galaxy/trunk/debian/README.postgres-setup 2014-03-18 17:22:19 UTC (rev 16469)
@@ -0,0 +1,150 @@
+Setting up Galaxy to use PostgreSQL on Bio-Linux
+================================================
+
+The Galaxy system keeps operational data within a SQL database, which by default
+is the simple SQLite system. For any serious use of Galaxy, you will want to
+use a dedicated database server. See
+http://wiki.galaxyproject.org/Admin/Config/Performance/ProductionServer
+for more details.
+
+Bio-Linux already comes with both PostgreSQL and MySQL. Furthermore, a
+convenience package called galaxy-server-pg-database can help you set this up to
+work with Galaxy. In the simplest case:
+
+ $ sudo apt-get install galaxy-server-pg-database
+
+will give you a secure and ready-to-use set-up.
+
+This document is therefore useful if you want to:
+
+a. Understand what is actually set up by installing galaxy-server-pg-database.
+b. Manually set up the database when the above fails.
+c. Install an alternative database configuration.
+d. Implement effective back-ups and migrate data when PostgreSQL is upgraded.
+
+This document does not deal with:
+
+a. Migration of existing data from SQLite to PostgreSQL. The Galaxy Wiki states
+ that "free conversion tools are available on the web, [but] this process is
+ non-trivial".
+b. The fundementals of relational databases or PostgreSQL database
+ administration. A starting point is here:
+ http://www.postgresql.org/docs/9.2/static/index.html
+ (see especially chapter 18).
+
+Checking the PostgreSQL set-up on Bio-Linux
+===========================================
+
+(( NB: You will not find any information about PostgreSQL "clusters" in the
+regular PostgreSQL documentation because they are a specific feature of Debian
+(inherited by Ubuntu and thus Bio-Linux) - see
+http://nebc.nerc.ac.uk/tools/bio-linux/other-bl-docs/sql-databases-on-bio-linux
+and /usr/share/doc/postgresql-common/README.Debian.gz. ))
+
+Run the command "pg_lsclusters". You should see output something like this:
+
+Version Cluster Port Status Owner Data directory Log file
+8.4 main 5433 online postgres /var/lib/postgresql/8.4/main /var/log...
+9.1 main 5432 online postgres /var/lib/postgresql/9.1/main /var/log...
+
+On a newly-installed system you should see just one line, but on a system that
+has been upgraded from a previous release of Bio-Linux you may well see two
+lines as above. Here, two instances of PosgreSQL are running, and the default
+instance is whichever one runs on port 5432. Hopefully the newest instance is
+also the default! If you see two instances like this and want to clean up the
+redundant one you can either stop it like so:
+
+ $ sudo /etc/init.d/postgresql stop
+ $ sudo nano /etc/postgresql/8.4/main/start.conf
+ ### change setting from auto to "manual" or "disabled"
+ $ sudo /etc/init.d/postgresql start
+
+or permanently delete it:
+
+ $ sudo pg_dropcluster --stop 8.4 main
+
+Each cluster being a separate running instance of PostgreSQL may have many
+databases. To check what databases were hosted in the 8.4 cluster, prior to
+shutting it down, I could have done:
+
+ $ sudo -u postgres psql -l -p 5433
+
+Note that running "sudo -u postgres psql" is the recommended standard way to
+administer PostgreSQL databases on Bio-Linux. You should not need to set a
+password for either the postgres system user or the postgres database role in
+order to perform standard administration.
+
+What the galaxy-server-pg-database package does
+===============================================
+
+The automated set-up will aim to create a role and database for Galaxy within
+the default PostgreSQL cluster - ie. whichever cluster is named "main" and
+running on port 5432. If there is no such cluster it will fail. Also, if there
+are multiple running clusters named "main" the script will scan for an existing
+Galaxy database in any older "main" clusters. If it finds one in an older
+cluster but not in the default one, it will assume that you probably want to
+upgrade your old database and will bail out with an error. In this case, you
+will need to do the upgrade by running pg_upgradecluster (see the docs linked
+above), or you can just stop the old cluster before installing the package - the
+script will then ignore it and proceed to create the new database.
+
+Once these check are passed, the script will do the following:
+
+sudo -Hi -u postgres createuser -w Debian-galaxy -DRS
+sudo -Hi -u postgres createdb -w Debian-galaxy -E UTF8 -O Debian-galaxy
+
+/etc/galaxy-server/universe_wsgi.ini will be modified to access the new database
+and options recommended for PostgreSQL will be activated:
+
+database_connection = postgresql:///Debian-galaxy
+
+database_engine_option_server_side_cursors = True
+database_engine_option_strategy = threadlocal
+
+What the galaxy-server-pg-database package doesn't do
+=====================================================
+
+As mentioned above, the package does not automate migration of the database when
+PostgreSQL is upgraded, as this will generally be done for the whole server at
+once, and there may be other databases installed.
+
+The package does not modify the pg_hba.conf or any other configuration files
+related to the PostgreSQL server. No password is set for the Debian-galaxy user
+in PostgreSQL as it is assumed that peer authentication is enabled (this is the
+default) so this is not needed.
+
+The package does not directly populate the new database. This is done by
+restarting Galaxy, which will see that the database is empty and will
+automatically repopulate it. Updated versions of Galaxy should also look after
+adding their own modifications to the Galaxy schema.
+
+The package doesn't add any cron jobs to clean out stale data (I may look at
+adding this).
+
+The package does not purge the database when it is removed, but it will try to
+re-set the configuration in universe_wsgi.ini.
+
+Things you might want to set up manually
+========================================
+
+If you're reading this you are likely having issues with the database setup, in
+which case the best option is probably to remove the galaxy-server-pg-database
+package and sort things out yourself. There is no reason not to do this - the
+package is just a convenience.
+
+You can use any name you like for the database user and the database, but you
+will need to ensure that Galaxy can connect and modify all tables within the
+database. The Galaxy server runs in the account Debian-galaxy so having a
+matching user name in PostgreSQL allows simple user-based authentication to
+work.
+
+If you want to keep your database on a different remote server then you may need
+to use password authentication and embed the password into universe_wsgi.ini.
+In this case it is strongly recommended to choose a long, randomly generated
+password token and to limit database connections on the server by host IP.
+
+Here's one way to get a nicely randomised password token:
+
+ $ head -c 21 /dev/urandom| base64
+
+
Added: trunk/packages/galaxy/trunk/debian/README.source
===================================================================
--- trunk/packages/galaxy/trunk/debian/README.source (rev 0)
+++ trunk/packages/galaxy/trunk/debian/README.source 2014-03-18 17:22:19 UTC (rev 16469)
@@ -0,0 +1,30 @@
+Had a crack at packaging on 23/03/2012, having done all the dependencies.
+
+I've tried to move files to the right Debian-esque locations. The Galaxy server
+expects a single directory heirarchy so I put that in /usr/lib/galaxy-server
+and made symlinks out from there.
+
+Major issue in terms of making a reasonable Debian package is the number of eggs
+needed by the server. These should all really be Debian dependencies but I don't
+know if the Debian versions of Python packages will satisfy Galaxy or not.
+
+If using the eggs, fetching needs to be done before build stage as fetching
+remote files during the build is a definite no-no.
+
+Strategy is therefore:
+
+1) Make a package which includes amd64 eggs in the .orig.tar.gz and therefore is
+broken but at least we can build it quickly.
+2) Look to wean Galaxy off the Eggs one by one, replacing them with Debian
+package dependencies.
+3) When this is done, the package can be moved from amd64-only to build on
+any architecture.
+
+(2) is in progress with the use_system_python_libs patch.
+
+I've also added two convenience packages that modify the Galaxy installation by
+setting it to work on PostgreSQL and Apache2 respectively. The idea is that
+anyone wanting these options can just install the packages and it will just work,
+but since the packages rely on a few assumptions and some cunning scripting they
+will not suit everyone.
+
Added: trunk/packages/galaxy/trunk/debian/README.split-ini
===================================================================
--- trunk/packages/galaxy/trunk/debian/README.split-ini (rev 0)
+++ trunk/packages/galaxy/trunk/debian/README.split-ini 2014-03-18 17:22:19 UTC (rev 16469)
@@ -0,0 +1,27 @@
+Galaxy ships with a script called scripts/build_universe_config.py that can
+construct universe_wsgi.ini from config fragment files. As I'm dropping in
+modular configuration bits I need to use this, so it has been incorporated into the
+Galaxy start-up script.
+
+The package provides a /etc/galaxy-server/universe_wsgi.d directory containing:
+
+00_upstream.ini - A copy of universe_wsgi.ini from upstream.
+
+10_debian_defaults.ini - Settings overridden in the basic DEB package.
+
+31_apache-proxy.ini - Added by galaxy-server-apache-proxy if you install that.
+
+32_pg-database.ini - Added by galaxy-server-pg-database if you install that.
+
+Users are advised not to edit any of these but to make new files with
+a higher priority and modify the contents. Eg. to change the Apache settings:
+
+$ cd /etc/galaxy-server/universe-wsgi.d
+$ sudo cp 31_apache-proxy.ini 50_local.ini
+$ sudo nano 50_local.ini
+
+The scripts/build_universe_config.py script will be used to create a
+config file under /tmp each time Galaxy is started, and there will be no
+universe_wsgi.ini in the package. If you do supply tour own universe-wsgi.ini
+file then it will be used in preference to the dynamic one, but there should
+be no reason to do this.
Added: trunk/packages/galaxy/trunk/debian/apache-proxy-files/etc/apache2/conf.d/galaxy
===================================================================
--- trunk/packages/galaxy/trunk/debian/apache-proxy-files/etc/apache2/conf.d/galaxy (rev 0)
+++ trunk/packages/galaxy/trunk/debian/apache-proxy-files/etc/apache2/conf.d/galaxy 2014-03-18 17:22:19 UTC (rev 16469)
@@ -0,0 +1,36 @@
+# Note: These rules are essentially equivalent to the ones listed in the Wiki page
+# but for those to work on BL they would need to be placed within the <VirtualHost>
+# tags in /etc/apache2/sites-enabled/default whereas this variant can be put
+# into conf.d without editing any existing files. Order of rules is very important.
+
+# The proxy directory holds the .htaccess file which activates pwauth authentication.
+# If I put the .htaccess file in the top-level directory then pwauth ends up being run
+# for every static file and it is slow, slow, slow.
+
+Alias /galaxy /usr/share/galaxy-server
+<Directory /usr/share/galaxy-server>
+Options -Indexes
+RewriteEngine on
+RewriteBase /galaxy
+RewriteRule ^(logout\..*) logout/$1 [L]
+RewriteRule ^logout/ - [L]
+RewriteRule ^static/style/(.*) static/june_2007_style/blue/$1 [L]
+RewriteRule ^static/scripts/packed/ - [L]
+RewriteRule ^static/scripts/(.*) static/scripts/packed/$1 [L]
+RewriteRule ^(static|test-data)/ - [L]
+RewriteRule ^(favicon.ico|robots.txt) static/$1 [L]
+RewriteRule (.*) proxy/$1
+</Directory>
+
+<Directory /usr/share/galaxy-server/logout>
+Options -Indexes
+AllowOverride AuthConfig FileInfo
+</Directory>
+
+<Directory /usr/share/galaxy-server/proxy>
+Options -Indexes
+AllowOverride AuthConfig FileInfo
+RewriteEngine on
+RewriteBase /galaxy/proxy
+RewriteRule (.*) http://localhost:8080/$1 [P,E=RU:%{REMOTE_USER}]
+</Directory>
Added: trunk/packages/galaxy/trunk/debian/apache-proxy-files/etc/apache2/conf.d/pwauth
===================================================================
--- trunk/packages/galaxy/trunk/debian/apache-proxy-files/etc/apache2/conf.d/pwauth (rev 0)
+++ trunk/packages/galaxy/trunk/debian/apache-proxy-files/etc/apache2/conf.d/pwauth 2014-03-18 17:22:19 UTC (rev 16469)
@@ -0,0 +1,4 @@
+#Added by the galaxy-server-apache-proxy package to enable users
+#to log into galaxy with their regular passwords.
+AddExternalAuth pwauth /usr/sbin/pwauth
+SetExternalAuthMethod pwauth pipe
Added: trunk/packages/galaxy/trunk/debian/apache-proxy-files/etc/galaxy-server/galaxy.htaccess
===================================================================
--- trunk/packages/galaxy/trunk/debian/apache-proxy-files/etc/galaxy-server/galaxy.htaccess (rev 0)
+++ trunk/packages/galaxy/trunk/debian/apache-proxy-files/etc/galaxy-server/galaxy.htaccess 2014-03-18 17:22:19 UTC (rev 16469)
@@ -0,0 +1,39 @@
+# This file is seen by Apache2 via the symlink
+# /usr/share/galaxy-server/.htaccess
+
+# Security settings for Galaxy proxied via Apache. Note the actual proxy config
+# is under /etc/apache2/conf.d/galaxy. If for some reason you wanted Apache proxy
+# with internal Galaxy authentication then you could remove this file and Apache
+# would no longer insist on authentication.
+AuthBasicProvider external
+AuthExternal pwauth
+AuthType Basic
+AuthName Galaxy_Server
+
+#I'd like to do this, but it upsets Firefox. Use ErrorDocument instead.
+# AuthName "Galaxy Server: \
+# Log in with regular username and password. \
+# Users need to be in the galaxy system group."
+
+ErrorDocument 401 "<html>\
+<title>401 Authorization Required</title>\
+<h1>Log-in to Galaxy failed</h1>\
+<p>You should have been prompted to log into the Galaxy server. \
+You need to give your regular system username and password. \
+Please reload this page to try again.</p>\
+<p>If this fails, check that you are a member of the galaxy system group, by \
+running <code>groups</code> on the command line.</p>\
+<p>To add a user, eg. user1, to this group, you may use the command:</p>\
+<ul><li><code>sudo usermod -aG galaxy user1</code></ul></li>\
+</html>"
+
+# You may want to comment these 2 lines out or to
+# change the group required, but users still need to
+# be in the galaxy group for SFTP uploads to work properly.
+AuthzUnixgroup on
+Require group galaxy
+
+# This is needed to tell Galaxy about the remote
+# user.
+RequestHeader set REMOTE_USER %{RU}e env=RU
+RequestHeader unset Authorization env=RU
Added: trunk/packages/galaxy/trunk/debian/apache-proxy-files/usr/share/galaxy-server/logout/.htaccess
===================================================================
--- trunk/packages/galaxy/trunk/debian/apache-proxy-files/usr/share/galaxy-server/logout/.htaccess (rev 0)
+++ trunk/packages/galaxy/trunk/debian/apache-proxy-files/usr/share/galaxy-server/logout/.htaccess 2014-03-18 17:22:19 UTC (rev 16469)
@@ -0,0 +1,8 @@
+# HaCk based on http://stackoverflow.com/questions/4163122/http-basic-authentication-log-out
+# Authname must match the one in ../proxy/.htaccess
+
+AuthType Basic
+AuthName Galaxy_Server
+
+AuthUserFile /usr/share/galaxy-server/logout/.htpasswd
+Require user logout
Added: trunk/packages/galaxy/trunk/debian/apache-proxy-files/usr/share/galaxy-server/logout/.htpasswd
===================================================================
--- trunk/packages/galaxy/trunk/debian/apache-proxy-files/usr/share/galaxy-server/logout/.htpasswd (rev 0)
+++ trunk/packages/galaxy/trunk/debian/apache-proxy-files/usr/share/galaxy-server/logout/.htpasswd 2014-03-18 17:22:19 UTC (rev 16469)
@@ -0,0 +1,2 @@
+#Password is logout, in case you wondered.
+logout:$apr1$0eB1iURY$kwqa0c8tXksbjPQLYqr6s.
Added: trunk/packages/galaxy/trunk/debian/apache-proxy-files/usr/share/galaxy-server/logout/logout.html
===================================================================
--- trunk/packages/galaxy/trunk/debian/apache-proxy-files/usr/share/galaxy-server/logout/logout.html (rev 0)
+++ trunk/packages/galaxy/trunk/debian/apache-proxy-files/usr/share/galaxy-server/logout/logout.html 2014-03-18 17:22:19 UTC (rev 16469)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <link rel="stylesheet" href="static/style/base.css" type="text/css" />
+ <title>Logged out</title>
+</head>
+<body>
+ <div class="document">
+ <div class="donemessagelarge">
+ <strong>You logged out.</strong>
+ <hr>
+ But if you really want to be sure, close down the browser too.
+ </div>
+ <br/>
+</body>
+</html>
Added: trunk/packages/galaxy/trunk/debian/apache-proxy-files/usr/share/galaxy-server/proxy/.htaccess
===================================================================
--- trunk/packages/galaxy/trunk/debian/apache-proxy-files/usr/share/galaxy-server/proxy/.htaccess (rev 0)
+++ trunk/packages/galaxy/trunk/debian/apache-proxy-files/usr/share/galaxy-server/proxy/.htaccess 2014-03-18 17:22:19 UTC (rev 16469)
@@ -0,0 +1 @@
+link /etc/galaxy-server/galaxy.htaccess
\ No newline at end of file
Property changes on: trunk/packages/galaxy/trunk/debian/apache-proxy-files/usr/share/galaxy-server/proxy/.htaccess
___________________________________________________________________
Added: svn:special
+ *
Added: trunk/packages/galaxy/trunk/debian/changelog
===================================================================
--- trunk/packages/galaxy/trunk/debian/changelog (rev 0)
+++ trunk/packages/galaxy/trunk/debian/changelog 2014-03-18 17:22:19 UTC (rev 16469)
@@ -0,0 +1,167 @@
+galaxy (1.bl.py27.20140210-0biolinux1) precise; urgency=low
+
+ * Updated Galaxy since previous version seems to have fundamental
+ issues installing from tool shed.
+ * Moved shed-tool-conf.xml to writable location in /var
+ * Note there is now a galaxy-tools-bl package to restore the
+ missing tools in one go
+
+ -- Tim Booth <tbooth at ceh.ac.uk> Tue, 18 Mar 2014 16:46:14 +0000
+
+galaxy (1.bl.py27.20130926-0biolinux6) precise; urgency=low
+
+ * Re-do control files yet again. I now believe invoke-rc.d is
+ THE way to stop and start services in packages, and not service
+ or start or initctl.
+ * To make this work, add symlink in /etc/init.d
+ * Fix problem where transfer dir ownership is broken on upgrade
+ * Add README files into /usr/share/doc
+
+ -- Tim Booth <tbooth at ceh.ac.uk> Wed, 26 Feb 2014 13:56:29 +0000
+
+galaxy (1.bl.py27.20130926-0biolinux4) precise; urgency=low
+
+ * Now realised that Galaxy will use local libs if it finds the
+ local version is just right. And it won't fetch those eggs.
+ Oh. Why does it have to be so "clever"?
+ For now, just ensure this is built on a machine without
+ python-migrate installed.
+ * Reduced use_system_python_libs to just localise psycopg for now,
+ as the static version doesn't work properly with socket
+ connections.
+ * Don't set cookie_path at all as it causes issues.
+ * Finish the apache-proxy module, including SFTP uploads and
+ a working (ish) logout. Authentication via system user/pw and
+ membership of system galaxy group.
+ * Split config into multiple files and worked out how to allow
+ it to be reconstructed under /tmp
+ * Remove old universe_wsgi.ini on upgrade
+ * Fix and improve galaxy-add-administrator script
+ * Be more careful with initctl restart in scripts as it only works
+ when the service was already running.
+ * Ensure cleanup on purge.
+ * Added Simon W. Credit to welcome.html
+ * Ensure binary versions match for pg and apache pkgs
+ * Only use adm group for logs.
+ * Clean out compiled_templates on start
+ * Patch to stop upgrade of SQLite database failing
+
+ -- Tim Booth <tbooth at ceh.ac.uk> Fri, 06 Dec 2013 16:54:43 +0000
+
+galaxy (1.bl.py27.20130926-0biolinux1) precise; urgency=low
+
+ * New upstream and try to get uploads to work again.
+
+ -- Tim Booth <tbooth at ceh.ac.uk> Mon, 07 Oct 2013 12:21:41 +0100
+
+galaxy (1.bl.py27.20130812-0biolinux3) precise; urgency=low
+
+ * Reverted use_system_python_libs patch for now due to crazy
+ database corruption issue.
+ * Included psycopg3 egg in debian-galaxy to get pg-database
+ working.
+ * Add some debhelper tokens
+
+ -- Tim Booth <tbooth at ceh.ac.uk> Thu, 03 Oct 2013 12:55:28 +0100
+
+galaxy (1.bl.py27.20130812-0biolinux2) precise; urgency=low
+
+ * Added galaxy-server-pg-database package to set up PG
+ * Fixed dep on Bowtie2
+ * Dropped patch dont_fetch_eggs in favour of custom run script
+ * This upgrades the database before running Galaxy - otherwise
+ in tests I got unexpected failures. Less hassle for users but
+ maybe more issues as upgrade will be forced without warning the
+ admin to back up. (HINT - Back up regularly anyway!)
+
+ -- Tim Booth <tbooth at ceh.ac.uk> Fri, 06 Sep 2013 15:54:43 +0100
+
+galaxy (1.bl.py27.20130812-0biolinux1) precise; urgency=low
+
+ * Another new upstream
+ * Clean up as many Lintian warnings as I can
+ * Tighten up dependencies
+
+ -- Tim Booth <tbooth at ceh.ac.uk> Fri, 23 Aug 2013 15:59:48 +0100
+
+galaxy (1.bl.py27.20130702-1) precise; urgency=low
+
+ * New upstream, and more
+ * Refreshed patches
+ * Forced Galaxy to accept using LOCAL libs instead of its own
+ eggs.
+
+ -- Tim Booth <tbooth at ceh.ac.uk> Thu, 18 Jul 2013 13:39:01 +0100
+
+galaxy (1.bl.py27.20120718-5) precise; urgency=low
+
+ * Fix postinst script to not crash if no log file needs moving.
+ How the heck didn't this get noticed before??
+
+ -- Tim Booth <tbooth at ceh.ac.uk> Tue, 11 Dec 2012 15:20:41 +0000
+
+galaxy (1.bl.py27.20120718-4) precise; urgency=low
+
+ * Various patches to address issues reported by SW
+ * Increase database pool size
+ * Make default configuration more sensible for a BL setting
+ * Help setting up admin user accounts
+ * Try to make picard-tools work with the Debian package
+ * Also, relax restrictions on user names and passwords
+
+ -- Tim Booth <tbooth at ceh.ac.uk> Fri, 09 Nov 2012 10:10:40 +0000
+
+galaxy (1.bl.py27.20120718-2) precise; urgency=low
+
+ * Patch and permissions changes to get run_unit_tests.sh
+ to work.
+ * Moved logs to new location and allowed update script to
+ shift them if necessary.
+
+ -- Tim Booth <tbooth at ceh.ac.uk> Fri, 12 Oct 2012 17:41:41 +0100
+
+galaxy (1.bl.py27.20120718-1) precise; urgency=low
+
+ * Rebuild from latest release
+ * Re-munge for Python 2.7
+ * Enable python2 debhelper
+
+ -- Tim Booth <tbooth at ceh.ac.uk> Wed, 29 Aug 2012 17:53:41 +0100
+
+galaxy (1.bl.20120509-lucid1) lucid; urgency=low
+
+ * New upstream version
+ * Stop overwriting integrated_tool_panel.xml on update
+ * Remove the hacky_first_run as Galaxy now seems to work without it.
+ * Why the heck wasn't it working before?
+
+ -- Tim Booth <tbooth at ceh.ac.uk> Thu, 12 Jul 2012 17:52:31 +0100
+
+galaxy (1.bl.20120307-lucid9) lucid; urgency=low
+
+ * Added patch to fix calling clustalw
+ * Fixed [pre/post]rm scripts to stop server before trying to
+ update or to purge the user account.
+
+ -- Tim Booth <tbooth at ceh.ac.uk> Tue, 08 May 2012 17:50:01 +0100
+
+galaxy (1.bl.20120307-lucid7) lucid; urgency=low
+
+ * Added icon and script for people to click on
+ * Fixed issues with egg cache (must be writeable even after first run)
+ * Fixed location of shed_tools and added to package
+ * Fixed symlinks to /usr/share/galaxy-server
+ * Tidied up logging and moved log file init to galaxy.conf
+ * Customised welcome.html
+ * Set arch on all packages to amd64 so as not to upset PPA build
+ * Modified init script to set environment
+ * Changed dependencies of (-all) to match Soon's latest list
+
+ -- Tim Booth <tbooth at ceh.ac.uk> Thu, 03 May 2012 18:19:57 +0100
+
+galaxy (1.bl.20120307-lucid1) lucid; urgency=low
+
+ * Initial release.
+ * Worked on by Soon and Tim. This is not a pretty package :-(
+
+ -- Tim Booth <tbooth at ceh.ac.uk> Fri, 27 Apr 2012 15:54:14 +0100
Added: trunk/packages/galaxy/trunk/debian/compat
===================================================================
--- trunk/packages/galaxy/trunk/debian/compat (rev 0)
+++ trunk/packages/galaxy/trunk/debian/compat 2014-03-18 17:22:19 UTC (rev 16469)
@@ -0,0 +1 @@
+8
Added: trunk/packages/galaxy/trunk/debian/config_override/README
===================================================================
--- trunk/packages/galaxy/trunk/debian/config_override/README (rev 0)
+++ trunk/packages/galaxy/trunk/debian/config_override/README 2014-03-18 17:22:19 UTC (rev 16469)
@@ -0,0 +1,2 @@
+Galaxy comes with various sample configs that all get copied into /etc/galaxy.
+If an alternative is found in here it will be used instead.
Added: trunk/packages/galaxy/trunk/debian/config_override/welcome.html
===================================================================
--- trunk/packages/galaxy/trunk/debian/config_override/welcome.html (rev 0)
+++ trunk/packages/galaxy/trunk/debian/config_override/welcome.html 2014-03-18 17:22:19 UTC (rev 16469)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <link rel="stylesheet" href="style/base.css" type="text/css" />
+</head>
+<body>
+ <div class="document">
+ <div class="donemessagelarge">
+ <strong>This is the Galaxy server, packaged for Bio-Linux.</strong>
+ <hr>
+ To customize this page edit <code>/etc/galaxy/static/welcome.html</code> then <code>sudo restart galaxy</code>.
+ </div>
+ <br/>
+ To find out more about Galaxy, <a target="_blank" href="http://wiki.g2.bx.psu.edu/Learn"/>start here.
+ <br/>
+ <img src="images/noodles.png" alt="WWFSMD?" style="display: block; margin-left: auto; margin-right: auto;" /></a>
+ <hr/>
+ This project is supported in part by <a target="_blank" class="reference" href="http://www.nsf.gov">NSF</a>, <a target="_blank" class="reference" href="http://www.genome.gov">NHGRI</a>, and <a target="_blank" class="reference" href="http://www.huck.psu.edu">the Huck Institutes of the Life Sciences</a>.
+ <br/> <br/>
+ The core Galaxy server and
+ dependencies were packaged for Bio-Linux by the <a target="_blank" href="http://nebc.nerc.ac.uk">NEBC Team</a> as part of a project
+ under the <a target="_blank" href="http://nbaf.nerc.ac.uk/nbaf-wallingford">NERC Biomolecular Analysis Facility</a> in collaboration
+ with the <a target="_blank" href="http://bergmanlab.smith.man.ac.uk/">Bergman Lab at the University of Manchester</a> and with
+ <a target="_blank" href="http://www.lstmliverpool.ac.uk/research/departments/staff-profiles/simon-wagstaff">
+ Simon Wagstaff at the Liverpool School of Tropical Medicine Bioinformatics Unit</a>.
+ </div>
+</body>
+</html>
Added: trunk/packages/galaxy/trunk/debian/control
===================================================================
--- trunk/packages/galaxy/trunk/debian/control (rev 0)
+++ trunk/packages/galaxy/trunk/debian/control 2014-03-18 17:22:19 UTC (rev 16469)
@@ -0,0 +1,113 @@
+Source: galaxy
+Priority: optional
+Section: science
+Maintainer: Tim Booth <tbooth at ceh.ac.uk>
+Uploaders: H. Soon Gweon <soonio at gmail.com>
+Build-depends: xmlstarlet, python, quilt (>= 0.46-7~), debhelper (>= 8)
+Standards-Version: 3.9.3
+Homepage: http://galaxy.psu.edu/
+
+Package: galaxy-server
+Architecture: amd64
+Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}, adduser,
+ python-pycryptopp,
+ python-pysqlite2,
+ python-simplejson
+Recommends: sqlite3, netcat-openbsd, zenity
+Description: Web-based analysis environment for bioinformatics
+ This package contains the core code to run the Galaxy server,
+ but most of the functionality is supported by external
+ applications, so you need to install those too or install
+ galaxy-server-all to get them all.
+
+Package: galaxy-server-test
+Architecture: amd64
+Depends: ${misc:Depends}, galaxy-server (= ${binary:Version}), ${python:Depends}
+Description: Test and demo data for Galaxy server
+ This data comes in the main download and is useful for testing
+ but isn't needed to run a regular Galaxy server.
+
+Package: galaxy-server-all
+Architecture: amd64
+Recommends: galaxy-server-test, ucsc-tools-non-free, laj, seqan-dev, mothur
+Depends: ${misc:Depends},
+ galaxy-server,
+ beam2,
+ bowtie2 (>=2.1.0),
+ bwa (>=0.6.1),
+ clustalw (>> 2.0),
+ cufflinks (>=1.2.1),
+ cython (>=0.15.1),
+ hyphy (>=2.1),
+ lastz (>=1.02),
+ macs14,
+ meme,
+ natefoo-add-scores (>=0.1),
+ natefoo-taxonomy (>=0.1),
+ ncbi-blast+ (>=2.2.25),
+ pass2 (>=0.1),
+ perm (>=0.3.9),
+ picard-tools (>=1.46),
+ python-gnuplot,
+ python-numpy,
+ python-rpy,
+ python-tables,
+ r-cran-prettyr,
+ r-cran-leaps,
+ r-cran-tcltk2,
+ r-cran-qvalue,
+ r-cran-rwave,
+ r-cran-wavethresh,
+ r-cran-waveslim,
+ r-cran-bitops,
+ samtools (>=0.1.18),
+ seqan-apps,
+ sift,
+ sputnik-mononucleotide (>=0.1),
+ tophat (>= 1.3),
+ velvet (>=1.1),
+ weblogo (>=3.1)
+Description: Galaxy server with all recommended tools
+ This meta-package installs the full Galaxy environment including many
+ third party tools (see wiki.g2.bx.psu.edu/Admin/Tools/Tool%20Dependencies).
+ Exceptions are currently:
+ LAJ - no source available
+ UCSC tools - license restricts redistribution outside academia
+
+Package: galaxy-server-pg-database
+Architecture: amd64
+Depends: galaxy-server (= ${binary:Version}), python-psycopg2
+Pre-Depends: postgresql | postgresql-8.4
+Description: Activates PostgreSQL database back-end for Galaxy
+ This is a convenience package that attempts to set up Galaxy to use a
+ PostgreSQL back-end database. This is recommeded for any Galaxy installation
+ that needs to support concurrent users or complex pipelines. The package will
+ create a user and database named 'Debian-galaxy' within the default PostgreSQL
+ cluster. Galaxy will be configured to use this database and restarted.
+ .
+ The configuration created by this module does not rely on any shared secret
+ passwords, so it will not work if you have disabled peer/ident authentication
+ in pg_hba.conf.
+ If the setup fails, or if you need a different configuration, you should not
+ install this package but do the set-up manually. With galaxy-server installed,
+ instructions are in /usr/share/doc/galaxy-server/README.postgres-setup.
+ .
+ Note - this package will not work properly with the psycopg egg supplied by
+ Galaxy and so depends on having the system version installed.
+
+Package: galaxy-server-apache-proxy
+Architecture: amd64
+Pre-Depends: apache2
+Depends: galaxy-server (= ${binary:Version}), libapache2-mod-authnz-external, libapache2-mod-authz-unixgroup, pwauth
+Description: Activates Apache2 proxy for Galaxy server, and PAM authentication
+ This is a convenience package that sets up the Galaxy server to proxy via
+ Apache2 and changes the authentication to validate users with their regular
+ log-in names and passwords.
+ .
+ All users will need to be added to the galaxy group in order to access Galaxy.
+ .
+ This type of configuration should suit a typical lab where a single server
+ is used by several users. It is not suitable if you want to run a public
+ server instance or allow Galaxy to be used anonymously.
+ If you want to do the configuration manually, see the file
+ /usr/share/doc/galaxy-server/README.apache2-setup.
Added: trunk/packages/galaxy/trunk/debian/copy_sample_config.sh
===================================================================
--- trunk/packages/galaxy/trunk/debian/copy_sample_config.sh (rev 0)
+++ trunk/packages/galaxy/trunk/debian/copy_sample_config.sh 2014-03-18 17:22:19 UTC (rev 16469)
@@ -0,0 +1,65 @@
+#!/bin/bash
+
+# The original run.sh copies sample config files before running.
+# We want to do this at the packaging stage.
+# Also, support putting our own stuff in config_override
+
+# This script needs to be run in debian/tmp
+
+# Plus special handling for universe_wsgi.ini which goes to
+# universe-wsgi.d/00_upstream.ini along with all the stuff from
+# debian/universe-wsgi.d
+
+# Also for shed_tool_conf.xml.sample which needs to go into /var
+# as it gets rewritten as tools are added.
+
+SAMPLES="
+ datatypes_conf.xml.sample
+ external_service_types_conf.xml.sample
+ migrated_tools_conf.xml.sample
+ reports_wsgi.ini.sample
+ shed_tool_data_table_conf.xml.sample
+ tool_conf.xml.sample
+ tool_data_table_conf.xml.sample
+ tool_sheds_conf.xml.sample
+ tool-data/shared/*/*.sample
+ tool-data/*.sample
+ static/*.sample
+"
+
+#Expand globs in correct directory
+SAMPLES=`( cd usr/lib/galaxy-server ; echo $SAMPLES )`
+
+# Create all the config files
+for sample in $SAMPLES; do
+ file=`echo $sample | sed -e 's/\.sample$//'`
+ filebase=`basename $file`
+ if [ -e "../config_override/$filebase" ] ; then
+ echo "Initializing /etc/galaxy-server/$file from config_override/$filebase"
+ mkdir -p etc/galaxy-server/`dirname $file`
+ cp "../config_override/$filebase" etc/galaxy-server/$file
+ ln -s /etc/galaxy-server/$file usr/lib/galaxy-server/$file
+ else
+ echo "Initializing /etc/galaxy-server/$file from `basename $sample`"
+ mkdir -p etc/galaxy-server/`dirname $file`
+ cp usr/lib/galaxy-server/$sample etc/galaxy-server/$file
+ ln -s /etc/galaxy-server/$file usr/lib/galaxy-server/$file
+ fi
+ #And remove the .sample versions
+ rm usr/lib/galaxy-server/$sample
+done
+
+# Deal with universe_wsgi.d
+d=etc/galaxy-server/universe_wsgi.d
+mkdir -p "$d"
+ln -s /"$d" usr/lib/galaxy-server/
+
+echo "Putting default universe_wsgi.ini into $d"
+mv usr/lib/galaxy-server/universe_wsgi.ini.sample "$d"/00_upstream.ini
+cp ../universe_wsgi.d/1* "$d"
+
+# Deal with shed_tool_conf.xml
+stc=shed_tool_conf.xml
+echo "Initialising /var/lib/galaxy-server/${stc} from ${stc}.sample"
+mv usr/lib/galaxy-server/${stc}.sample var/lib/galaxy-server/shed-tools/${stc}
+ln -s /var/lib/galaxy-server/shed-tools/${stc} usr/lib/galaxy-server/${stc}
Property changes on: trunk/packages/galaxy/trunk/debian/copy_sample_config.sh
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/packages/galaxy/trunk/debian/copyright
===================================================================
--- trunk/packages/galaxy/trunk/debian/copyright (rev 0)
+++ trunk/packages/galaxy/trunk/debian/copyright 2014-03-18 17:22:19 UTC (rev 16469)
@@ -0,0 +1,195 @@
+Format: http://dep.debian.net/deps/dep5/
+Upstream-Name: Galaxy
+Upstream-Contact: Galaxy Devs <galaxy-dev at lists.bx.psu.edu>
+Source: https://bitbucket.org/galaxy/galaxy-dist
+
+Files: *
+Upstream Authors:
+ Many
+Copyright:
+ Copyright (c) 2005-2013 Pennsylvania State University
+License:
+ Academic Free License version 3.0
+
+ 1) Grant of Copyright License. Licensor grants You a worldwide, royalty-free,
+ non-exclusive, sublicensable license, for the duration of the copyright, to
+ do the following:
+
+ a) to reproduce the Original Work in copies, either alone or as part of a
+ collective work;
+
+ b) to translate, adapt, alter, transform, modify, or arrange the Original
+ Work, thereby creating derivative works ("Derivative Works") based upon
+ the Original Work;
+
+ c) to distribute or communicate copies of the Original Work and Derivative
+ Works to the public, under any license of your choice that does not
+ contradict the terms and conditions, including Licensor's reserved
+ rights and remedies, in this Academic Free License;
+
+ d) to perform the Original Work publicly; and
+
+ e) to display the Original Work publicly.
+
+ 2) Grant of Patent License. Licensor grants You a worldwide, royalty-free,
+ non-exclusive, sublicensable license, under patent claims owned or
+ controlled by the Licensor that are embodied in the Original Work as
+ furnished by the Licensor, for the duration of the patents, to make, use,
+ sell, offer for sale, have made, and import the Original Work and
+ Derivative Works.
+
+ 3) Grant of Source Code License. The term "Source Code" means the preferred
+ form of the Original Work for making modifications to it and all available
+ documentation describing how to modify the Original Work. Licensor agrees
+ to provide a machine-readable copy of the Source Code of the Original Work
+ along with each copy of the Original Work that Licensor distributes.
+ Licensor reserves the right to satisfy this obligation by placing a
+ machine-readable copy of the Source Code in an information repository
+ reasonably calculated to permit inexpensive and convenient access by You
+ for as long as Licensor continues to distribute the Original Work.
+
+ 4) Exclusions From License Grant. Neither the names of Licensor, nor the
+ names of any contributors to the Original Work, nor any of their
+ trademarks or service marks, may be used to endorse or promote products
+ derived from this Original Work without express prior permission of the
+ Licensor. Except as expressly stated herein, nothing in this License
+ grants any license to Licensor's trademarks, copyrights, patents, trade
+ secrets or any other intellectual property. No patent license is granted
+ to make, use, sell, offer for sale, have made, or import embodiments of
+ any patent claims other than the licensed claims defined in Section 2.
+ No license is granted to the trademarks of Licensor even if such marks
+ are included in the Original Work. Nothing in this License shall be
+ interpreted to prohibit Licensor from licensing under terms different
+ from this License any Original Work that Licensor otherwise would have a
+ right to license.
+
+ 5) External Deployment. The term "External Deployment" means the use,
+ distribution, or communication of the Original Work or Derivative Works
+ in any way such that the Original Work or Derivative Works may be used by
+ anyone other than You, whether those works are distributed or
+ communicated to those persons or made available as an application
+ intended for use over a network. As an express condition for the grants
+ of license hereunder, You must treat any External Deployment by You of
+ the Original Work or a Derivative Work as a distribution under
+ section 1(c).
+
+ 6) Attribution Rights. You must retain, in the Source Code of any Derivative
+ Works that You create, all copyright, patent, or trademark notices from
+ the Source Code of the Original Work, as well as any notices of licensing
+ and any descriptive text identified therein as an "Attribution Notice."
+ You must cause the Source Code for any Derivative Works that You create
+ to carry a prominent Attribution Notice reasonably calculated to inform
+ recipients that You have modified the Original Work.
+
+ 7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that
+ the copyright in and to the Original Work and the patent rights granted
+ herein by Licensor are owned by the Licensor or are sublicensed to You
+ under the terms of this License with the permission of the contributor(s)
+ of those copyrights and patent rights. Except as expressly stated in the
+ immediately preceding sentence, the Original Work is provided under this
+ License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or
+ implied, including, without limitation, the warranties of
+ non-infringement, merchantability or fitness for a particular purpose.
+ THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This
+ DISCLAIMER OF WARRANTY constitutes an essential part of this License.
+ No license to the Original Work is granted by this License except under
+ this disclaimer.
+
+ 8) Limitation of Liability. Under no circumstances and under no legal
+ theory, whether in tort (including negligence), contract, or otherwise,
+ shall the Licensor be liable to anyone for any indirect, special,
+ incidental, or consequential damages of any character arising as a result
+ of this License or the use of the Original Work including, without
+ limitation, damages for loss of goodwill, work stoppage, computer failure
+ or malfunction, or any and all other commercial damages or losses. This
+ limitation of liability shall not apply to the extent applicable law
+ prohibits such limitation.
+
+ 9) Acceptance and Termination. If, at any time, You expressly assented to
+ this License, that assent indicates your clear and irrevocable acceptance
+ of this License and all of its terms and conditions. If You distribute or
+ communicate copies of the Original Work or a Derivative Work, You must
+ make a reasonable effort under the circumstances to obtain the express
+ assent of recipients to the terms of this License. This License
+ conditions your rights to undertake the activities listed in Section 1,
+ including your right to create Derivative Works based upon the Original
+ Work, and doing so without honoring these terms and conditions is
+ prohibited by copyright law and international treaty. Nothing in this
+ License is intended to affect copyright exceptions and limitations
+ (including "fair use" or "fair dealing"). This License shall terminate
+ immediately and You may no longer exercise any of the rights granted to
+ You by this License upon your failure to honor the conditions in
+ Section 1(c).
+
+10) Termination for Patent Action. This License shall terminate
+ automatically and You may no longer exercise any of the rights granted
+ to You by this License as of the date You commence an action, including
+ a cross-claim or counterclaim, against Licensor or any licensee alleging
+ that the Original Work infringes a patent. This termination provision
+ shall not apply for an action alleging patent infringement by
+ combinations of the Original Work with other software or hardware.
+
+11) Jurisdiction, Venue and Governing Law. Any action or suit relating to
+ this License may be brought only in the courts of a jurisdiction wherein
+ the Licensor resides or in which Licensor conducts its primary business,
+ and under the laws of that jurisdiction excluding its conflict-of-law
+ provisions. The application of the United Nations Convention on
+ Contracts for the International Sale of Goods is expressly excluded. Any
+ use of the Original Work outside the scope of this License or after its
+ termination shall be subject to the requirements and penalties of
+ copyright or patent law in the appropriate jurisdiction. This section
+ shall survive the termination of this License.
+
+12) Attorneys' Fees. In any action to enforce the terms of this License or
+ seeking damages relating thereto, the prevailing party shall be entitled
+ to recover its costs and expenses, including, without limitation,
+ reasonable attorneys' fees and costs incurred in connection with such
+ action, including any appeal of such action. This section shall survive
+ the termination of this License.
+
+13) Miscellaneous. If any provision of this License is held to be
+ unenforceable, such provision shall be reformed only to the extent
+ necessary to make it enforceable.
+
+14) Definition of "You" in This License. "You" throughout this License,
+ whether in upper or lower case, means an individual or a legal entity
+ exercising rights under, and complying with all of the terms of, this
+ License. For legal entities, "You" includes any entity that controls, is
+ controlled by, or is under common control with you. For purposes of this
+ definition, "control" means (i) the power, direct or indirect, to cause
+ the direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+15) Right to Use. You may use the Original Work in all ways not otherwise
+ restricted or conditioned by this License or by law, and Licensor
+ promises not to interfere with or be responsible for such uses by You.
+
+16) Modification of This License. This License is Copyright © 2005 Lawrence
+ Rosen. Permission is granted to copy, distribute, or communicate this
+ License without modification. Nothing in this License permits You to
+ modify this License as applied to the Original Work or to Derivative
+ Works. However, You may modify the text of this License and copy,
+ distribute or communicate your modified version (the "Modified
+ License") and apply it to other original works of authorship subject to
+ the following conditions: (i) You may not indicate in any way that your
+ Modified License is the "Academic Free License" or "AFL" and you may not
+ use those names in the name of your Modified License; (ii) You must
+ replace the notice specified in the first paragraph above with the
+ notice "Licensed under <insert your license name here>" or with a notice
+ of your own that is not confusingly similar to the notice in this
+ License; and (iii) You may not claim that your original works are open
+ source software unless your Modified License has been approved by Open
+ Source Initiative (OSI) and You comply with its license review and
+ certification process.
+
+
+Some icons found in Galaxy are from the Silk Icons set, available under
+the Creative Commons Attribution 2.5 License, from:
+
+http://www.famfamfam.com/lab/icons/silk/
+
+
+Other images and documentation are licensed under the Creative Commons Attribution 3.0 (CC BY 3.0) License. See
+
+http://creativecommons.org/licenses/by/3.0/
Added: trunk/packages/galaxy/trunk/debian/galaxy-server-apache-proxy.docs
===================================================================
--- trunk/packages/galaxy/trunk/debian/galaxy-server-apache-proxy.docs (rev 0)
+++ trunk/packages/galaxy/trunk/debian/galaxy-server-apache-proxy.docs 2014-03-18 17:22:19 UTC (rev 16469)
@@ -0,0 +1 @@
+debian/README.apache2-setup
Added: trunk/packages/galaxy/trunk/debian/galaxy-server-apache-proxy.install
===================================================================
--- trunk/packages/galaxy/trunk/debian/galaxy-server-apache-proxy.install (rev 0)
+++ trunk/packages/galaxy/trunk/debian/galaxy-server-apache-proxy.install 2014-03-18 17:22:19 UTC (rev 16469)
@@ -0,0 +1,2 @@
+debian/universe_wsgi.d/31* /etc/galaxy-server/universe_wsgi.d
+debian/apache-proxy-files/* /
Added: trunk/packages/galaxy/trunk/debian/galaxy-server-apache-proxy.postinst
===================================================================
--- trunk/packages/galaxy/trunk/debian/galaxy-server-apache-proxy.postinst (rev 0)
+++ trunk/packages/galaxy/trunk/debian/galaxy-server-apache-proxy.postinst 2014-03-18 17:22:19 UTC (rev 16469)
@@ -0,0 +1,47 @@
+#!/bin/sh
+set -e
+set -u
+
+# This script will attempt to make Galaxy work with Apache2 without further user
+# interaction. There are various stages. If these fail, install should fail, so that
+# the user is obliged to remove this package or fix the issue and try again.
+# 1 - Enable modules needed in Apache2
+# 2 - Make a group for Galaxy users
+# 3 - Set settings in Galaxy
+# 4 - Reload Apache2 config and Galaxy
+#
+
+# DEBHELPER #
+
+# TODO - on failure, show error via Debconf rather than dumping to terminal.
+
+if [ -n "$1" -a "$1" != "configure" ] ; then
+ #Nowt to do.
+ #I don't care about abort-deconfigure right now.
+ exit 0
+fi
+
+# 1 - Note these won't be disabled when you remove the package, as I have
+# no way of knowing if you want them disabled or not.
+if ! a2enmod proxy proxy_http rewrite ; then
+ echo "Failed to activate modules needed for Apache2 proxying."
+ exit 1
+fi
+if ! a2enmod authnz_external authz_unixgroup headers ; then
+ echo "Failed to activate modules needed for Apache2 authentication."
+ exit 1
+fi
+
+# 2
+getent group galaxy >/dev/null || addgroup galaxy
+
+# 3
+# Already done by installation of config fragment
+
+# 4 - Bounce Apache2 and Galaxy, if it's running. If it is running but won't
+# restart we get upset.
+service apache2 reload
+if initctl status galaxy | grep -q 'start/running' ; then
+ invoke-rc.d galaxy stop || true
+ invoke-rc.d galaxy start
+fi
Added: trunk/packages/galaxy/trunk/debian/galaxy-server-apache-proxy.postrm
===================================================================
--- trunk/packages/galaxy/trunk/debian/galaxy-server-apache-proxy.postrm (rev 0)
+++ trunk/packages/galaxy/trunk/debian/galaxy-server-apache-proxy.postrm 2014-03-18 17:22:19 UTC (rev 16469)
@@ -0,0 +1,23 @@
+#!/bin/sh
+set -e
+set -u
+
+# I can't deactivate the Apache modules as I have no way to know if the user
+# wanted them anyway. But I will remove the galaxy group if it is unused.
+
+# Handy members function.
+members(){
+ g_line=`getent group "$1"`
+ [ -n "$g_line" ] || { echo "No such group $1." >&2 ; return 1 ; }
+ getent passwd | awk -F: '$4 == "'`echo "$g_line" | cut -d: -f3`'" { printf("%s ",$1) }'
+ echo "$g_line" | cut -d: -f4 | tr , ' '
+}
+
+# 2
+[ -n "`members galaxy`" ] || groupdel galaxy || true
+
+# 3
+# Already done by installation of config fragment
+
+# 4 - Bounce Apache2 and Galaxy, if it's running
+invoke-rc.d galaxy restart || true
Added: trunk/packages/galaxy/trunk/debian/galaxy-server-pg-database.docs
===================================================================
--- trunk/packages/galaxy/trunk/debian/galaxy-server-pg-database.docs (rev 0)
+++ trunk/packages/galaxy/trunk/debian/galaxy-server-pg-database.docs 2014-03-18 17:22:19 UTC (rev 16469)
@@ -0,0 +1 @@
+debian/README.postgres-setup
Added: trunk/packages/galaxy/trunk/debian/galaxy-server-pg-database.install
===================================================================
--- trunk/packages/galaxy/trunk/debian/galaxy-server-pg-database.install (rev 0)
+++ trunk/packages/galaxy/trunk/debian/galaxy-server-pg-database.install 2014-03-18 17:22:19 UTC (rev 16469)
@@ -0,0 +1 @@
+debian/universe_wsgi.d/32* /etc/galaxy-server/universe_wsgi.d
Added: trunk/packages/galaxy/trunk/debian/galaxy-server-pg-database.postinst
===================================================================
--- trunk/packages/galaxy/trunk/debian/galaxy-server-pg-database.postinst (rev 0)
+++ trunk/packages/galaxy/trunk/debian/galaxy-server-pg-database.postinst 2014-03-18 17:22:19 UTC (rev 16469)
@@ -0,0 +1,159 @@
+#!/usr/bin/perl
+use strict;
+
+# This script will attempt to make Galaxy work with PostgreSQL without further user
+# interaction. There are various stages. If these fail, install should fail, so that
+# the user is obliged to remove this package or fix the issue and try again.
+# 1- Check PG server set-up
+# 2- Check there is no database already
+# 3- Install role and database
+# 4- Modify Galaxy configuration
+# 5- Restart Galaxy
+
+# No hook for debhelper - this is a Perl script!
+
+# And I don't know if this could be done with dbconfig-common but I'm pretty sure
+# how I want to handle things.
+
+# TODO - on failure, show error via Debconf rather than dumping to terminal.
+
+# Script written in Perl since I'm faster hacking Perl than Python.
+my $USERNAME = 'Debian-galaxy';
+my $DBNAME = $USERNAME;
+# Note if you do change this you also need to edit 32_pg-database.ini
+
+if( $ARGV[0] && $ARGV[0] ne "configure")
+{
+ #Nowt to do.
+ #I don't care about abort-deconfigure right now.
+ exit 0;
+}
+
+my @pg_lsc;
+{
+ local $ENV{LANG} = "C";
+
+ @pg_lsc = `/usr/bin/pg_lsclusters`;
+ (shift @pg_lsc) =~ /^Version / or die "Unexpected output from pg_lsclusters. Aborting.";
+}
+
+# Inspect running instances of PostgreSQL
+my $port_5432;
+my %port_to_ver;
+if(@pg_lsc)
+{
+ for(@pg_lsc)
+ {
+ chomp;
+ my @cluster = split(/\s+/, $_);
+
+ if($cluster[2] eq '5432')
+ {
+ $port_5432 = [ $cluster[0], $cluster[1], $cluster[3] ];
+ }
+ elsif($cluster[1] eq 'main' && $cluster[3] eq 'online')
+ {
+ $port_to_ver{$cluster[2]} = $cluster[0];
+ }
+ }
+}
+else
+{
+ #There are no clusters at all? I'm going to go ahead and make one!
+ warn "No clusters found - creating a default one.\n";
+
+ my @pg_versions = sort { $b <=> $a } grep {/^[0-9]+\.[0-9]+/} map {/.*\/(.*)/} </usr/lib/postgresql/*>;
+ @pg_versions or die "No default PG version found.";
+
+ my $cc_res = `pg_createcluster --start-conf=auto --start --port=5432 $pg_versions[0] main`;
+
+ $port_5432 = [ $pg_versions[0], 'main', 'online' ];
+}
+
+# Is there a "main" on "5432"?
+if(!$port_5432 or $port_5432->[1] ne 'main')
+{
+ die "There is no cluster named 'main' set to run on port 5432. Aborting.";
+}
+elsif($port_5432->[2] ne 'online')
+{
+ die "The default cluster is not running. You need to ensure it starts automatically. Aborting.";
+}
+
+# Is the database in there already? If so, check connection and we're done, and just
+# need to fix the config.
+# As the role is created before the database, there should be no situation where the
+# database is there but the role still needs creating, so if the connection fails
+# just abort.
+if(is_database_in_cluster($DBNAME))
+{
+ check_connection($USERNAME) or die "Database already exists but connection failed. Aborting.";
+
+ warn "Database OK.\n";
+}
+else
+{
+
+ # So we probably need to create the DB, but first check -
+ # Are there other mains?
+ for(keys %port_to_ver)
+ {
+ if(is_database_in_cluster($DBNAME, $_))
+ {
+ die "There is already a $DBNAME database in the version $port_to_ver{$_} cluster.\n".
+ "You most likely want to migrate this into the current version of PostgreSQL,\n".
+ "for example by using pg_upgradecluster. If not, turn off this cluster using\n".
+ "pg_ctlcluster and retry installation of this package. Aborting.";
+ }
+ }
+
+ # OK, create the role and database. It's possible if this was half-installed that the role is
+ # already set up. Rather than error-checking the results of createuser and createdb just test
+ # the connection at the end.
+
+ my $cu_res = `sudo -Hi -u postgres createuser -w $USERNAME -DRS`;
+
+ my $cd_res = `sudo -Hi -u postgres createdb -w $DBNAME -E UTF8 -O $DBNAME`;
+
+ if(!check_connection($USERNAME))
+ {
+ die "The new database should have been created, but testing the connection failed.\n".
+ "You will need to investigate. Aborting.";
+ }
+ warn "Database $DBNAME created.\n";
+}
+
+# At this point I used to edit the configuration file, but I've now moved to a modular
+# config, which is much saner.
+
+# And that should be that. Restart Galaxy.
+# Note - if you install this and the main Galaxy package at once, Galaxy will fail to
+# start because the config file points to the DB but the DB is missing. This is fine,
+# but means we want to start Galaxy whether it was running or not.
+system("invoke-rc.d galaxy restart || invoke-rc.d galaxy start");
+
+### Utility functions...
+
+#See if a given user can connect to a given database
+sub check_connection
+{
+ my $user = $_[0];
+ my $db = $_[1] || $_[0];
+
+ my $res = `cd /tmp; sudo -u $user /usr/bin/psql -d $db -qt -c 'select 1234'`;
+
+ $res =~ /1234/;
+}
+
+#See if a server hosts a database with a given name
+sub is_database_in_cluster
+{
+ my $db = $_[0];
+ my $port = $_[1] ? "-p $_[1]" : "";
+
+ my @db_list = `sudo -Hi -u postgres /usr/bin/psql $port -l`;
+
+ grep { /^[[:space:]]*$db[[:space:]|]/ } @db_list;
+}
+
+1;
Added: trunk/packages/galaxy/trunk/debian/galaxy-server-pg-database.postrm
===================================================================
--- trunk/packages/galaxy/trunk/debian/galaxy-server-pg-database.postrm (rev 0)
+++ trunk/packages/galaxy/trunk/debian/galaxy-server-pg-database.postrm 2014-03-18 17:22:19 UTC (rev 16469)
@@ -0,0 +1,10 @@
+#!/bin/sh
+set -e
+
+# This script used to remove lines from universe_wsgi.ini but now I'm using the modular
+# config it just restarts the server.
+
+# This script will not touch the database at all. You need to drop that yourself.
+if [ "$1" = purge -o "$1" = remove ] ; then
+ invoke-rc.d galaxy restart || true
+fi
Added: trunk/packages/galaxy/trunk/debian/galaxy-server-test.install
===================================================================
--- trunk/packages/galaxy/trunk/debian/galaxy-server-test.install (rev 0)
+++ trunk/packages/galaxy/trunk/debian/galaxy-server-test.install 2014-03-18 17:22:19 UTC (rev 16469)
@@ -0,0 +1,5 @@
+#Things needed for the Galaxy testing?
+/usr/lib/galaxy-server/run_*_tests.sh
+/usr/lib/galaxy-server/run_reports.sh
+/usr/share/galaxy-server/test/
+/usr/share/galaxy-server/test-data/
Added: trunk/packages/galaxy/trunk/debian/galaxy-server.docs
===================================================================
--- trunk/packages/galaxy/trunk/debian/galaxy-server.docs (rev 0)
+++ trunk/packages/galaxy/trunk/debian/galaxy-server.docs 2014-03-18 17:22:19 UTC (rev 16469)
@@ -0,0 +1,2 @@
+README.txt
+debian/README.split-ini
Added: trunk/packages/galaxy/trunk/debian/galaxy-server.install
===================================================================
--- trunk/packages/galaxy/trunk/debian/galaxy-server.install (rev 0)
+++ trunk/packages/galaxy/trunk/debian/galaxy-server.install 2014-03-18 17:22:19 UTC (rev 16469)
@@ -0,0 +1,41 @@
+/etc
+/var/lib/galaxy-server/
+/usr/lib/galaxy-server/buildbot_setup.sh
+/usr/lib/galaxy-server/create_db.sh*
+/usr/lib/galaxy-server/cron/
+/usr/lib/galaxy-server/display_applications/
+/usr/lib/galaxy-server/dist-eggs.ini
+/usr/lib/galaxy-server/eggs/
+/usr/lib/galaxy-server/eggs.ini
+/usr/lib/galaxy-server/external_service_types/
+/usr/lib/galaxy-server/extract_dataset_parts.sh*
+debian/goto_galaxy.sh /usr/lib/galaxy-server/
+/usr/lib/galaxy-server/lib/
+/usr/lib/galaxy-server/locale/
+debian/make_transfer_dirs.sh /usr/lib/galaxy-server/
+/usr/lib/galaxy-server/manage_db.sh*
+/usr/lib/galaxy-server/manage_tools.sh
+/usr/lib/galaxy-server/run_demo_sequencer.sh
+/usr/lib/galaxy-server/run_galaxy_listener.sh
+/usr/lib/galaxy-server/run_tool_shed.sh
+debian/run.sh /usr/lib/galaxy-server/
+/usr/lib/galaxy-server/scripts/
+/usr/lib/galaxy-server/set_metadata.sh*
+/usr/lib/galaxy-server/setup_rabbitmq.sh
+/usr/lib/galaxy-server/tool_conf.xml.main
+/usr/lib/galaxy-server/tool-data/
+/usr/lib/galaxy-server/tool_list.py
+/usr/lib/galaxy-server/tools/
+/usr/share/galaxy-server/static/
+/usr/share/galaxy-server/templates/
+### I've taken all the .sample files out, as they are copied in /etc
+### and protected by debconf.
+/usr/lib/galaxy-server/universe_wsgi.d
+
+###Build script creates links to files in /etc/
+/etc/galaxy-server/universe_wsgi.d/00*
+/etc/galaxy-server/universe_wsgi.d/10*
+/usr/lib/galaxy-server/*.xml
+
+###Custom scripts
+debian/sbin /usr
Added: trunk/packages/galaxy/trunk/debian/galaxy-server.postinst
===================================================================
--- trunk/packages/galaxy/trunk/debian/galaxy-server.postinst (rev 0)
+++ trunk/packages/galaxy/trunk/debian/galaxy-server.postinst 2014-03-18 17:22:19 UTC (rev 16469)
@@ -0,0 +1,72 @@
+#!/bin/sh
+
+set -e
+cd /tmp
+
+#Only deal with configuration right now
+[ "$1" = configure ] || exit 0
+
+#Handy function
+globmatch() { test -e "$1" -o "`echo $1`" != "$1" ; }
+
+stop galaxy || true
+
+# Set up the galaxy user if it doesn't exist
+# We now need a special group too, in order to allow the server process
+# to see into the transfer directories
+if ! getent group Debian-galaxy >/dev/null ; then
+ addgroup --system Debian-galaxy
+fi
+
+if ! id Debian-galaxy >/dev/null 2>&1 ; then
+ adduser --no-create-home --system --ingroup Debian-galaxy --disabled-password --disabled-login --home /var/lib/galaxy-server/database Debian-galaxy
+fi
+
+# Account for the fact that old packages put Debian-galaxy in the daemon group
+if ! groups Debian-galaxy | sed 's/.*://' | grep -q Debian-galaxy ; then
+ usermod -g Debian-galaxy Debian-galaxy
+fi
+
+#DEBHELPER#
+
+touch /usr/lib/galaxy-server/database/integrated_tool_panel.xml
+#Ensure /var area is writeable
+for d in /var/lib/galaxy-server/* ; do
+ if [ "`basename $d`" != transfer ] ; then
+ chown -R Debian-galaxy $d
+ chgrp Debian-galaxy $d
+ #but this stuff, especially the database, must not be world-readable
+ chmod o-rwx $d
+ fi
+done
+
+#I moved the log files, so handle that, even though the startup script
+#also creates the log dir if needed.
+if ! globmatch '/var/log/galaxy/*' ; then
+ mkdir -p /var/log/galaxy
+ chown Debian-galaxy:adm /var/log/galaxy
+ chmod 1775 /var/log/galaxy
+
+ ( cd /var/log ; [ ! -e galaxy.log ] || mv galaxy.log galaxy )
+ ( cd /var/log ; [ ! -e galaxy.out ] || mv galaxy.out galaxy )
+fi
+
+#If the server is being upgraded from < 1.bl.py27.20130926 then get shot of the old
+#universe_wsgi.ini.
+if dpkg --compare-versions "$2" lt 1.bl.py27.20130926 ; then
+ mv /etc/galaxy-server/universe_wsgi.ini /etc/galaxy-server/universe_wsgi.ini.dpkg_old || true
+fi
+
+#Remove stuff from /var/lib/galaxy-server/database/compiled_templates which can be
+#incompatible with the new server.
+rm -rf /var/lib/galaxy-server/database/compiled_templates/*
+
+#The server should start, but not if being installed in a chroot. How best to detect this?
+#I had the idea of looking for /var/log/boot.log but then realised, I already aliased
+#invoke-rc.d to /bin/true in the chroot so this is redundant.
+
+# Oh, and don't fail the install if the server won't start. It could be that the pg-database
+# package is partially installed. Maybe I should detect this explicitly -TODO.
+invoke-rc.d galaxy start || true
+
+true
Added: trunk/packages/galaxy/trunk/debian/galaxy-server.postrm
===================================================================
--- trunk/packages/galaxy/trunk/debian/galaxy-server.postrm (rev 0)
+++ trunk/packages/galaxy/trunk/debian/galaxy-server.postrm 2014-03-18 17:22:19 UTC (rev 16469)
@@ -0,0 +1,20 @@
+#!/bin/bash
+set -e
+
+# Kill off the special user that was created in postinst,
+# and scrub the databases and configs.
+if [ "$1" = purge ] ; then
+
+ # killall generates a Lintian warning but killall -u is fine
+ # Debian-galaxy should be the only member of Debian-galaxy
+ ka=/usr/bin/killall
+ $ka -u Debian-galaxy || true
+ ! id -u Debian-galaxy || userdel Debian-galaxy
+ ! getent group Debian-galaxy || groupdel Debian-galaxy
+ rm -rf /var/lib/galaxy-server
+ rm -rf /etc/galaxy-server
+fi
+
+#DEBHELPER#
+
+true
Added: trunk/packages/galaxy/trunk/debian/galaxy-server.prerm
===================================================================
--- trunk/packages/galaxy/trunk/debian/galaxy-server.prerm (rev 0)
+++ trunk/packages/galaxy/trunk/debian/galaxy-server.prerm 2014-03-18 17:22:19 UTC (rev 16469)
@@ -0,0 +1,13 @@
+#!/bin/bash
+# I need to do this to keep Lintian happy, but I certainly don't want to abort just
+#because the server won't stop.
+set -e
+
+# Stop it.
+invoke-rc.d galaxy stop || true
+
+#DEBHELPER#
+
+# TODO - this doesn't seem to clean out all .pyc files. Need to do that manually?
+
+true
Added: trunk/packages/galaxy/trunk/debian/galaxy.conf
===================================================================
--- trunk/packages/galaxy/trunk/debian/galaxy.conf (rev 0)
+++ trunk/packages/galaxy/trunk/debian/galaxy.conf 2014-03-18 17:22:19 UTC (rev 16469)
@@ -0,0 +1,28 @@
+# galaxy script
+# this script will start/stop galaxy server
+
+# By default the server will start on boot. Comment
+# out the next line below to prevent this
+
+start on filesystem and net-device-up IFACE=lo
+stop on runlevel [!2345]
+
+description "Galaxy Server"
+version "1.1"
+author "Tim Booth, H. Soon Gweon"
+
+pre-start script
+ #Ensure log files are available for Galaxy, and directory
+ #is readable/writeable to adm user.
+ mkdir -p /var/log/galaxy
+ ( cd /var/log/galaxy ; umask 0027 ; touch galaxy-server.log galaxy-server.out )
+ chmod 1775 /var/log/galaxy
+ chown Debian-galaxy:adm /var/log/galaxy/*
+ # sort out transfer directories - has to be done as root
+ /usr/lib/galaxy-server/make_transfer_dirs.sh
+end script
+
+# start galaxy and send standard output and error to /var/log/galaxy.out
+exec sudo -u Debian-galaxy -H \
+ /usr/lib/galaxy-server/run.sh --log-file /var/log/galaxy/galaxy-server.log \
+ >/var/log/galaxy/galaxy-server.out 2>&1
Added: trunk/packages/galaxy/trunk/debian/galaxy.desktop
===================================================================
--- trunk/packages/galaxy/trunk/debian/galaxy.desktop (rev 0)
+++ trunk/packages/galaxy/trunk/debian/galaxy.desktop 2014-03-18 17:22:19 UTC (rev 16469)
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Version=1.0
+Terminal=false
+Icon=/usr/share/galaxy-server/static/galaxy_icon.png
+Exec=/usr/lib/galaxy-server/goto_galaxy.sh
+Name=Galaxy
+GenericName=Galaxy
+Comment=Open the Galaxy Server interface in a browser
+Type=Application
+Categories=Biology;Science;Education;Bioinformatics;
Added: trunk/packages/galaxy/trunk/debian/galaxy_icon.png
===================================================================
(Binary files differ)
Property changes on: trunk/packages/galaxy/trunk/debian/galaxy_icon.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/packages/galaxy/trunk/debian/get-orig-source.sh
===================================================================
--- trunk/packages/galaxy/trunk/debian/get-orig-source.sh (rev 0)
+++ trunk/packages/galaxy/trunk/debian/get-orig-source.sh 2014-03-18 17:22:19 UTC (rev 16469)
@@ -0,0 +1,75 @@
+#!/bin/bash
+set -u
+
+# Galaxy is a pain as:
+# 1 - it has no proper version numbers
+# 2 - it needs to download various Python eggs on first run, and at the
+# moment various bugs appear if you try to use the system versions of libs
+
+# Ensure we have the commands we need
+for cmd in xmlstarlet wget ; do
+ if ! which "$cmd" > /dev/null ; then
+ echo "The $cmd command is not found."
+ exit 1
+ fi
+done
+
+# First off, make a tarballs directory...
+[ -d ../debian ] && cd ..
+[ -d debian ] && cd ..
+[ ! -d tarballs ] && mkdir tarballs
+pushd tarballs
+
+LATEST_TARBALL=`ls galaxy-tip_*.tar.bz2 2>/dev/null | egrep -o '[0-9]{8}' | sort -n | head -n 1`
+
+# This gets a revision number out of the local repo but apparently these
+# are not stable across branches.
+#GALAXY_VERSION=1.`hg heads -a -r tip | grep changeset | tr -d ' ' | cut -d: -f2`
+
+# This one gets a version from the RSS feed directly, based on the date:
+REMOTE_VERSION="`wget -q -O- https://bitbucket.org/galaxy/galaxy-dist/rss | xmlstarlet sel -t -m //pubDate -v . -n - | head -n1`"
+REMOTE_VERSION=`date '+%Y%m%d' -d"$REMOTE_VERSION"`
+echo "REMOTE_VERSION=$REMOTE_VERSION"
+
+# Find out the current local python version
+PY="py"`python --version |& grep -o '[0-9.]*' | cut -c1,3`
+REPACK_VERSION="$PY.$REMOTE_VERSION"
+
+# Clean up any old working directory
+rm -rvf galaxy-dist galaxy-galaxy-dist* tip.tar.bz2*
+
+if [ "$LATEST_TARBALL" = "$REMOTE_VERSION" ] ; then
+ if [ -e "galaxy-repack_$REPACK_VERSION.tar.xz" ] ; then
+ echo "Latest upstream $LATEST_TARBALL is up-to-date."
+ exit 0
+ else
+ echo "Download version $LATEST_TARBALL is up-to-date but seems to need repacking."
+ fi
+else
+ wget https://bitbucket.org/galaxy/galaxy-dist/get/tip.tar.bz2
+ mv tip.tar.bz2 "galaxy-tip_$REMOTE_VERSION.tar.bz2"
+fi
+
+GALAXY_VERSION="1.bl.$REPACK_VERSION"
+
+# Now we have to repack the tarball with all eggs.
+echo "Unpacking galaxy-tip_$REMOTE_VERSION.tar.bz2"
+tar -xvjf "galaxy-tip_$REMOTE_VERSION.tar.bz2"
+
+# Work on the tarball...
+# Sort out the directory name
+mv -v galaxy-galaxy-dist-* galaxy-dist
+# Download all the eggs, including psychopg2
+pushd galaxy-dist
+ python ./scripts/fetch_eggs.py -c universe_wsgi.ini.sample
+ python ./scripts/fetch_eggs.py -c universe_wsgi.ini.sample -e psycopg2
+ python ./scripts/fetch_eggs.py -c universe_wsgi.ini.sample -e sqlalchemy-migrate
+popd
+
+echo "Repacking galaxy-repack_$REPACK_VERSION.tar.xz"
+tar -cvJf "galaxy-repack_$REPACK_VERSION.tar.xz" galaxy-dist
+rm -rf galaxy-dist
+
+popd
+ln -sf tarballs/"galaxy-repack_$REPACK_VERSION.tar.xz" "galaxy_$GALAXY_VERSION.orig.tar.xz"
+echo "Done - downloaded and linked galaxy_$GALAXY_VERSION.orig.tar.xz"
Property changes on: trunk/packages/galaxy/trunk/debian/get-orig-source.sh
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/packages/galaxy/trunk/debian/goto_galaxy.sh
===================================================================
--- trunk/packages/galaxy/trunk/debian/goto_galaxy.sh (rev 0)
+++ trunk/packages/galaxy/trunk/debian/goto_galaxy.sh 2014-03-18 17:22:19 UTC (rev 16469)
@@ -0,0 +1,56 @@
+#!/bin/sh
+
+# This script will pop the local Galaxy instance up in their web browser.
+# Infer the port by inspecting the conf file, but failing that assume 8080
+GPORT=8080
+GPATH=
+GPROT=http
+
+if [ -r /etc/apache2/conf.d/galaxy ] ; then
+ #Galaxy is proxied via Apache, we assume. Port is probably 80, and if
+ #not the user will need to override GALAXY_PORT and maybe GALAXY_PROTO.
+ GPORT=80
+ GPATH=`awk '$1 == "Alias" && $3 == "/usr/share/galaxy-server" {print $2}' /etc/apache2/conf.d/galaxy`
+else
+ # The .ini file can have many sections. The logic here is to ensure we get the port= line from
+ # within the [server:main] section.
+ # If the file is split, combine it and search that.
+ UWSGI=/usr/lib/galaxy-server/universe_wsgi.ini
+ if [ -r "$UWSGI" ] ; then
+ UWSGI="cat '$UWSGI'"
+ else
+ UWSGI="( cd `dirname $UWSGI` ; python ./scripts/build_universe_config.py universe_wsgi.d/ /dev/stdout )"
+ fi
+
+ portline=`eval "$UWSGI" | grep -E '^\[|^port[[:space:]]*=[[:space:]]*[[:digit:]]+' \
+ | grep -E -A 1 '^\[server:main\]' \
+ | grep -E '^port'`
+
+ if [ -n "$portline" ] ; then
+ GPORT=`echo "$portline" | grep -Eo '[[:digit:]]+'`
+ fi
+fi
+
+# Now allow the port and extension to be overridden, just in case
+GPORT=${GALAXY_PORT:-$GPORT}
+GPATH=${GALAXY_PATH:-$GPATH}
+GPROT=${GALAXY_PROTO:-$GPROT}
+
+# Now see if the server looks to be running. We can do this just by using netcat.
+if [ "$GPROT" != "http" ] || \
+ echo "HEAD $GPATH/xxx HTTP/1.1\nHost: localhost\nUser-Agent: telnet\n" \
+ | nc -q3 localhost "$GPORT" | grep -qi galaxy
+then
+ #Open the thing in the favoured browser
+ exec gnome-open "$GPROT://localhost:$GPORT$GPATH"
+else
+ xargs -0i <<END zenity --error --no-wrap --title="Galaxy Not Running" --text="{}"
+The Galaxy server doesn't seem to be running on your machine.
+You may need to start it with the command:
+
+ sudo start galaxy
+
+Or else Galaxy may still be starting up (it takes a couple
+of minutes to get going on the first run).
+END
+fi
Property changes on: trunk/packages/galaxy/trunk/debian/goto_galaxy.sh
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/packages/galaxy/trunk/debian/link_configs_for_hacky_first_run.sh
===================================================================
--- trunk/packages/galaxy/trunk/debian/link_configs_for_hacky_first_run.sh (rev 0)
+++ trunk/packages/galaxy/trunk/debian/link_configs_for_hacky_first_run.sh 2014-03-18 17:22:19 UTC (rev 16469)
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+# This gives us temporary config files
+# for use during the build, and then cleans them up.
+
+if [ $1 == "clean" ] ; then
+ #Since there should be no symlinks at this point I can be lazy with the cleanup,
+ #but just to be sure, don't touch the debian directory.
+ find -path ./debian -prune -or -type l -exec rm '{}' ';'
+ exit $?
+fi
+
+SAMPLES="
+ community_wsgi.ini.sample
+ datatypes_conf.xml.sample
+ external_service_types_conf.xml.sample
+ migrated_tools_conf.xml.sample
+ reports_wsgi.ini.sample
+ shed_tool_conf.xml.sample
+ tool_conf.xml.sample
+ tool_data_table_conf.xml.sample
+ tool_sheds_conf.xml.sample
+ universe_wsgi.ini.sample
+ tool-data/shared/*/*.sample
+ tool-data/*.sample
+ static/*.sample
+"
+
+#Expand globs in correct directory
+SAMPLES=`( cd . ; echo $SAMPLES )`
+
+# Create any missing config/location files
+for sample in $SAMPLES; do
+ file=`echo $sample | sed -e 's/\.sample$//'`
+ echo "Linking $file to `basename $sample`"
+ ln -sv $sample $file
+done
+
Property changes on: trunk/packages/galaxy/trunk/debian/link_configs_for_hacky_first_run.sh
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/packages/galaxy/trunk/debian/make_transfer_dirs.sh
===================================================================
--- trunk/packages/galaxy/trunk/debian/make_transfer_dirs.sh (rev 0)
+++ trunk/packages/galaxy/trunk/debian/make_transfer_dirs.sh 2014-03-18 17:22:19 UTC (rev 16469)
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+if [ "`id -u`" != 0 ] ; then
+ echo "This script needs to be run as root, since it needs to set file ownerships."
+ exit 1
+fi
+
+#If users are added to the "galaxy" group, give them a place to upload files
+#directly to the server. There is a "members" command to find group members
+#but I'd need to add it as a package dep and it seems a bit pointless. So...
+members(){
+ g_line=`getent group "$1"`
+ [ -n "$g_line" ] || { echo "No such group $1." >&2 ; return 1 ; }
+ getent passwd | awk -F: '$4 == "'`echo "$g_line" | cut -d: -f3`'" { printf("%s ",$1) }'
+ echo "$g_line" | cut -d: -f4 | tr , ' '
+}
+
+#Note that "galaxy" is the group that identifies Galaxy users, but "Debian-galaxy"
+#is the system group used to permit the Galaxy server process to get at the
+#transferred files in directories owned by the user. Got it?
+
+#If there is no galaxy group this won't do anything other than print a warning.
+#If -apache-proxy is installed but no users then we need to make the transfer dir anyway,
+#otherwise Galaxy gets upset that the folder is missing.
+grep -q 'ftp_upload_dir[[:space:]]*=[[:space:]]*/var/lib/galaxy-server/transfer' \
+ /etc/galaxy-server/universe_wsgi.d/* && install -d /var/lib/galaxy-server/transfer
+for m in `members galaxy` ; do
+ folder=/var/lib/galaxy-server/transfer/$m at localhost
+ [ -e "$folder" ] && break
+ install -o $m -g Debian-galaxy -m 770 -d "$folder"
+done
Property changes on: trunk/packages/galaxy/trunk/debian/make_transfer_dirs.sh
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/packages/galaxy/trunk/debian/patches/authenticate_via_pam
===================================================================
--- trunk/packages/galaxy/trunk/debian/patches/authenticate_via_pam (rev 0)
+++ trunk/packages/galaxy/trunk/debian/patches/authenticate_via_pam 2014-03-18 17:22:19 UTC (rev 16469)
@@ -0,0 +1,24 @@
+--- a/lib/galaxy/model/__init__.py
++++ b/lib/galaxy/model/__init__.py
+@@ -97,6 +97,11 @@
+ """
+ Check if `cleartext` matches user password when hashed.
+ """
++ if self.password == 'PAM':
++ #TODO - check cleartext by calling to validator service
++ if cleartext = 'password':
++ return True
++
+ return galaxy.security.passwords.check_password( cleartext, self.password )
+
+ def all_roles( self ):
+--- a/lib/galaxy/webapps/galaxy/controllers/user.py
++++ b/lib/galaxy/webapps/galaxy/controllers/user.py
+@@ -474,6 +474,7 @@
+ success = False
+ user = trans.sa_session.query( trans.app.model.User ).filter( trans.app.model.User.table.c.email==email ).first()
+ if not user:
++ #TODO - if system logins are allowed, see about auto-adding the user
+ message = "No such user (please note that login is case sensitive)"
+ status = 'error'
+ elif user.deleted:
Added: trunk/packages/galaxy/trunk/debian/patches/clustalw_not_clustalw2
===================================================================
--- trunk/packages/galaxy/trunk/debian/patches/clustalw_not_clustalw2 (rev 0)
+++ trunk/packages/galaxy/trunk/debian/patches/clustalw_not_clustalw2 2014-03-18 17:22:19 UTC (rev 16469)
@@ -0,0 +1,11 @@
+--- a/tools/rgenetics/rgClustalw.py
++++ b/tools/rgenetics/rgClustalw.py
+@@ -18,7 +18,7 @@
+
+ def run(self):
+ tlf = open(self.opts.outlog,'w')
+- cl = ['clustalw2 -INFILE=%s -OUTFILE=%s -OUTORDER=%s -TYPE=%s -OUTPUT=%s' % (self.iname,self.opts.output,self.opts.out_order,self.opts.dnarna,self.opts.outform)]
++ cl = ['clustalw -INFILE=%s -OUTFILE=%s -OUTORDER=%s -TYPE=%s -OUTPUT=%s' % (self.iname,self.opts.output,self.opts.out_order,self.opts.dnarna,self.opts.outform)]
+ if self.opts.seq_range_end <> None and self.opts.seq_range_start <> None:
+ cl.append('-RANGE=%s,%s' % (self.opts.seq_range_start,self.opts.seq_range_end))
+ if self.opts.outform=='CLUSTAL' and self.opts.outseqnos <> None:
Added: trunk/packages/galaxy/trunk/debian/patches/drop_tmp_table_before_upgrade
===================================================================
--- trunk/packages/galaxy/trunk/debian/patches/drop_tmp_table_before_upgrade (rev 0)
+++ trunk/packages/galaxy/trunk/debian/patches/drop_tmp_table_before_upgrade 2014-03-18 17:22:19 UTC (rev 16469)
@@ -0,0 +1,25 @@
+--- a/eggs/sqlalchemy_migrate-0.7.2-py2.7.egg/migrate/changeset/databases/sqlite.py
++++ b/eggs/sqlalchemy_migrate-0.7.2-py2.7.egg/migrate/changeset/databases/sqlite.py
+@@ -7,6 +7,7 @@
+ from copy import copy
+
+ from sqlalchemy.databases import sqlite as sa_base
++from sqlalchemy.exc import OperationalError
+
+ from migrate import exceptions
+ from migrate.changeset import ansisql
+@@ -32,6 +33,14 @@
+ for index in table.indexes:
+ index.drop()
+
++ # Drop table first as it might already exist. The lack of error
++ # handling in this module is shocking.
++ try:
++ self.append('DROP TABLE migration_tmp')
++ self.execute()
++ except OperationalError:
++ pass
++
+ self.append('ALTER TABLE %s RENAME TO migration_tmp' % table_name)
+ self.execute()
+
Added: trunk/packages/galaxy/trunk/debian/patches/fix_unit_test
===================================================================
--- trunk/packages/galaxy/trunk/debian/patches/fix_unit_test (rev 0)
+++ trunk/packages/galaxy/trunk/debian/patches/fix_unit_test 2014-03-18 17:22:19 UTC (rev 16469)
@@ -0,0 +1,25 @@
+--- a/run_unit_tests.sh
++++ b/run_unit_tests.sh
+@@ -2,6 +2,11 @@
+
+ ## Excluding controllers due to the problematic genetrack dependency
+ ## Excluding job runners due to various external dependencies
++if [ ! -w /var/log/galaxy ] ; then
++ echo "You need write permissions to /var/log/galaxy, which is owned by group" \
++ `stat -c %G /var/log/galaxy`.
++ exit 1
++fi
+
+ COVERAGE=`which coverage`
+ COVERAGE_ARG=""
+@@ -11,6 +16,9 @@
+
+ python ./scripts/nosetests.py -v \
+ $COVERAGE_ARG \
+- --with-nosehtml --html-report-file run_unit_tests.html \
++ --with-nosehtml --html-report-file /var/log/galaxy/run_unit_tests.html \
+ --with-doctest --exclude=functional --exclude="^get" \
+ --exclude=controllers --exclude=runners lib test/unit
++
++# Clean up a random temporary file
++rm "`readlink -f lib/galaxy/datatypes/test/temp.txt`"
Added: trunk/packages/galaxy/trunk/debian/patches/force_use_of_bash_interpreter
===================================================================
--- trunk/packages/galaxy/trunk/debian/patches/force_use_of_bash_interpreter (rev 0)
+++ trunk/packages/galaxy/trunk/debian/patches/force_use_of_bash_interpreter 2014-03-18 17:22:19 UTC (rev 16469)
@@ -0,0 +1,32 @@
+--- a/buildbot_setup.sh
++++ b/buildbot_setup.sh
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+
+ cd `dirname $0`
+
+--- a/install_and_test_tool_shed_repositories.sh
++++ b/install_and_test_tool_shed_repositories.sh
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+
+ # A good place to look for nose info: http://somethingaboutorange.com/mrl/projects/nose/
+
+--- a/run_functional_tests.sh
++++ b/run_functional_tests.sh
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+
+ # A good place to look for nose info: http://somethingaboutorange.com/mrl/projects/nose/
+ rm -f run_functional_tests.log
+--- a/tools/solid_tools/qualsolid_boxplot_graph.sh
++++ b/tools/solid_tools/qualsolid_boxplot_graph.sh
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+
+ # Modified fastq_quality_boxplot_graph.sh from FASTX-toolkit - FASTA/FASTQ preprocessing tools.
+ # Copyright (C) 2009 A. Gordon (gordon at cshl.edu)
Added: trunk/packages/galaxy/trunk/debian/patches/keep_shed_tools_in_this_directory
===================================================================
--- trunk/packages/galaxy/trunk/debian/patches/keep_shed_tools_in_this_directory (rev 0)
+++ trunk/packages/galaxy/trunk/debian/patches/keep_shed_tools_in_this_directory 2014-03-18 17:22:19 UTC (rev 16469)
@@ -0,0 +1,16 @@
+--- a/migrated_tools_conf.xml.sample
++++ b/migrated_tools_conf.xml.sample
+@@ -1,3 +1,3 @@
+ <?xml version="1.0"?>
+-<toolbox tool_path="../shed_tools">
+-</toolbox>
+\ No newline at end of file
++<toolbox tool_path="shed_tools">
++</toolbox>
+--- a/shed_tool_conf.xml.sample
++++ b/shed_tool_conf.xml.sample
+@@ -1,3 +1,3 @@
+ <?xml version="1.0"?>
+-<toolbox tool_path="../shed_tools">
++<toolbox tool_path="shed_tools">
+ </toolbox>
Added: trunk/packages/galaxy/trunk/debian/patches/misc_configuration_tweaks
===================================================================
--- trunk/packages/galaxy/trunk/debian/patches/misc_configuration_tweaks (rev 0)
+++ trunk/packages/galaxy/trunk/debian/patches/misc_configuration_tweaks 2014-03-18 17:22:19 UTC (rev 16469)
@@ -0,0 +1,52 @@
+Simon suggested some more appropriate default configurations for a standalone
+server - see +bug/1064920
+Also I want to make it easy for people to proxy Galaxy through Apache and
+it doesn't seem to hurt to activate proxy-prefix by defualt.
+--- a/universe_wsgi.ini.sample
++++ b/universe_wsgi.ini.sample
+@@ -78,13 +78,14 @@
+ # If running behind a proxy server and Galaxy is served from a subdirectory,
+ # enable the proxy-prefix filter and set the prefix in the
+ # [filter:proxy-prefix] section above.
+-#filter-with = proxy-prefix
++filter-with = proxy-prefix
+
+ # If proxy-prefix is enabled and you're running more than one Galaxy instance
+ # behind one hostname, you will want to set this to the same path as the prefix
+ # in the filter above. This value becomes the "path" attribute set in the
+ # cookie so the cookies from each instance will not clobber each other.
+-#cookie_path = None
++# Note - DO NOT include any / in this path
++cookie_path = galaxy
+
+ # -- Database
+
+@@ -439,7 +440,9 @@
+ # added to a library. Set to True to enable. Please note the security
+ # implication that this will give Galaxy Admins access to anything your Galaxy
+ # user has access to.
+-#allow_library_path_paste = False
++# This should be fine on BL as Galaxy has an unprivileged account, and I'd assume
++# that anyone having Galaxy admin access also has some shell access.
++allow_library_path_paste = True
+
+ # Users may choose to download multiple files from a library in an archive. By
+ # default, Galaxy allows users to select from a few different archive formats
+@@ -506,7 +509,7 @@
+ #allow_user_creation = True
+
+ # Allow administrators to delete accounts.
+-#allow_user_deletion = False
++allow_user_deletion = True
+
+ # Allow administrators to log in as other users (useful for debugging)
+ #allow_user_impersonation = False
+@@ -514,7 +517,7 @@
+ # Allow users to remove their datasets from disk immediately (otherwise,
+ # datasets will be removed after a time period specified by an administrator in
+ # the cleanup scripts run via cron)
+-#allow_user_dataset_purge = False
++allow_user_dataset_purge = True
+
+ # By default, users' data will be public, but setting this to True will cause
+ # it to be private. Does not affect existing users and data, only ones created
Added: trunk/packages/galaxy/trunk/debian/patches/relax_password_length_restriction
===================================================================
--- trunk/packages/galaxy/trunk/debian/patches/relax_password_length_restriction (rev 0)
+++ trunk/packages/galaxy/trunk/debian/patches/relax_password_length_restriction 2014-03-18 17:22:19 UTC (rev 16469)
@@ -0,0 +1,57 @@
+# The Galaxy server comes with hard-coded restrictions on user account names
+# and passwords that are sensible for a globally available public server but
+# annoying for small-time users. This patch relaxes restrictions on password
+# length, user name length and validation of e-mail addresses.
+--- a/lib/galaxy/security/validate_user_input.py
++++ b/lib/galaxy/security/validate_user_input.py
+@@ -3,7 +3,8 @@
+ VALID_PUBLICNAME_RE = re.compile( "^[a-z0-9\-]+$" )
+ VALID_PUBLICNAME_SUB = re.compile( "[^a-z0-9\-]" )
+ # Basic regular expression to check email validity.
+-VALID_EMAIL_RE = re.compile( "[^@]+@[^@]+\.[^@]+" )
++# Restriction relaxed by Bio-Linux patch
++VALID_EMAIL_RE = re.compile( "[^@]+@[^@]+" )
+ FILL_CHAR = '-'
+
+ def validate_email( trans, email, user=None, check_dup=True ):
+@@ -32,12 +33,8 @@
+ return ''
+ if user and user.username == publicname:
+ return ''
+- if trans.webapp.name == 'tool_shed':
+- if len( publicname ) < 3:
+- return "Public name must be at least 3 characters in length"
+- else:
+- if len( publicname ) < 4:
+- return "Public name must be at least 4 characters in length"
++ if len( publicname ) < 2:
++ return "Public name must be at least 2 characters in length"
+ if len( publicname ) > 255:
+ return "Public name cannot be more than 255 characters in length"
+ if not( VALID_PUBLICNAME_RE.match( publicname ) ):
+@@ -61,8 +58,8 @@
+ return ''
+
+ def validate_password( trans, password, confirm ):
+- if len( password ) < 6:
+- return "Use a password of at least 6 characters"
++ if len( password ) < 3:
++ return "Use a password of at least 3 characters"
+ elif password != confirm:
+ return "Passwords do not match"
+- return ''
+\ No newline at end of file
++ return ''
+--- a/lib/galaxy/web/base/controllers/admin.py
++++ b/lib/galaxy/web/base/controllers/admin.py
+@@ -720,8 +720,8 @@
+ user = get_user( trans, user_id )
+ password = kwd.get( 'password', None )
+ confirm = kwd.get( 'confirm' , None )
+- if len( password ) < 6:
+- message = "Use a password of at least 6 characters."
++ if len( password ) < 3:
++ message = "Use a password of at least 3 characters."
+ status = 'error'
+ break
+ elif password != confirm:
Added: trunk/packages/galaxy/trunk/debian/patches/samtools_use_deb_package
===================================================================
--- trunk/packages/galaxy/trunk/debian/patches/samtools_use_deb_package (rev 0)
+++ trunk/packages/galaxy/trunk/debian/patches/samtools_use_deb_package 2014-03-18 17:22:19 UTC (rev 16469)
@@ -0,0 +1,11 @@
+--- a/tools/samtools/sam_merge.xml
++++ b/tools/samtools/sam_merge.xml
+@@ -4,7 +4,7 @@
+ <requirement type="package">picard</requirement>
+ </requirements>
+ <command>
+-java -Xmx2G -jar ${GALAXY_DATA_INDEX_DIR}/shared/jars/picard/MergeSamFiles.jar MSD=$mergeSD VALIDATION_STRINGENCY=LENIENT O=$output1 I=$input1 I=$input2 TMP_DIR=$__new_file_path__
++/usr/bin/picard-tools MergeSamFiles MSD=$mergeSD VALIDATION_STRINGENCY=LENIENT O=$output1 I=$input1 I=$input2 TMP_DIR=$__new_file_path__
+ #for $i in $inputs
+ I=${i.input}
+ #end for
Added: trunk/packages/galaxy/trunk/debian/patches/series
===================================================================
--- trunk/packages/galaxy/trunk/debian/patches/series (rev 0)
+++ trunk/packages/galaxy/trunk/debian/patches/series 2014-03-18 17:22:19 UTC (rev 16469)
@@ -0,0 +1,7 @@
+keep_shed_tools_in_this_directory
+fix_unit_test
+relax_password_length_restriction
+tell_user_how_to_add_administrator
+use_system_python_libs
+force_use_of_bash_interpreter
+drop_tmp_table_before_upgrade
Added: trunk/packages/galaxy/trunk/debian/patches/tell_user_how_to_add_administrator
===================================================================
--- trunk/packages/galaxy/trunk/debian/patches/tell_user_how_to_add_administrator (rev 0)
+++ trunk/packages/galaxy/trunk/debian/patches/tell_user_how_to_add_administrator 2014-03-18 17:22:19 UTC (rev 16469)
@@ -0,0 +1,12 @@
+--- a/lib/galaxy/webapps/galaxy/controllers/user.py
++++ b/lib/galaxy/webapps/galaxy/controllers/user.py
+@@ -767,6 +767,9 @@
+ success = False
+ else: # User activation is OFF, proceed without sending the activation email.
+ message = 'Now logged in as %s.<br><a target="_top" href="%s">Return to the home page.</a>' % ( user.email, url_for( '/' ) )
++
++ message += '''<br><br><i>If you want this user to be an administrator in Galaxy, you need to run the command </i>
++ <b>sudo galaxy-add-administrator "%s"</b><i> on the server.</i>''' % (user.email)
+ success = True
+ return ( message, status, user, success )
+
Added: trunk/packages/galaxy/trunk/debian/patches/use_system_python_libs
===================================================================
--- trunk/packages/galaxy/trunk/debian/patches/use_system_python_libs (rev 0)
+++ trunk/packages/galaxy/trunk/debian/patches/use_system_python_libs 2014-03-18 17:22:19 UTC (rev 16469)
@@ -0,0 +1,71 @@
+--- a/eggs.ini
++++ b/eggs.ini
+@@ -11,6 +11,11 @@
+ ; these eggs must be scrambled for your local environment
+ no_auto = pbs_python DRMAA_python
+
++; A version of "LOCAL" means use whatever is on the system.
++; It is assumed that these are tracked by an external package manager (eg. Dpkg)
++; or that you know what you are doing and are prepared to FACE THE CONSEQUENCES.
++; Local psycopg2 is needed, I think, or else connection fails.
++
+ [eggs:platform]
+ bx_python = 0.7.1
+ Cheetah = 2.2.2
+@@ -21,8 +26,8 @@
+ PyRods = 3.2.4
+ numpy = 1.6.0
+ pbs_python = 4.3.5
+-psycopg2 = 2.5.1
+-pycrypto = 2.5
++psycopg2 = LOCAL ; was 2.5.1
++pycrypto = LOCAL ; was 2.5
+ pysam = 0.4.2
+ pysqlite = 2.5.6
+ python_lzo = 1.08_2.03_static
+--- a/lib/galaxy/eggs/__init__.py
++++ b/lib/galaxy/eggs/__init__.py
+@@ -32,6 +32,16 @@
+ def http_error_default( *args ):
+ urllib.URLopener.http_error_default( *args )
+
++# Added by Tim as a way to use local objects
++class LocalEgg( object ):
++ def __init__( self, name=None ):
++ self.name = name
++ self.distribution = pkg_resources.Distribution('LOCAL',None,None,'0');
++ def require( self ):
++ return True
++ def fetch( self, installer=None ):
++ return self.distribution
++
+ class Egg( object ):
+ """
+ Contains information about locating and downloading eggs.
+@@ -266,14 +276,18 @@
+ self.parse_egg_section( self.config.items( 'eggs:noplatform' ), self.config.items( 'tags' ) )
+ def parse_egg_section( self, eggs, tags, full_platform=False, egg_class=Egg ):
+ for name, version in eggs:
+- tag = dict( tags ).get( name, '' )
+- url = '/'.join( ( self.repo, name ) )
+- if full_platform:
+- platform = self.platform or '-'.join( ( py, pkg_resources.get_platform() ) )
+- else:
+- platform = self.py_platform or py
+- egg = egg_class( name=name, version=version, tag=tag, url=url, platform=platform, crate=self )
+- self.eggs[name] = egg
++ if version == 'LOCAL' :
++ #Added by Tim as a way to force using local modules.
++ self.eggs[name] = LocalEgg( name=name )
++ else :
++ tag = dict( tags ).get( name, '' )
++ url = '/'.join( ( self.repo, name ) )
++ if full_platform:
++ platform = self.platform or '-'.join( ( py, pkg_resources.get_platform() ) )
++ else:
++ platform = self.py_platform or py
++ egg = egg_class( name=name, version=version, tag=tag, url=url, platform=platform, crate=self )
++ self.eggs[name] = egg
+ @property
+ def config_missing( self ):
+ """
Added: trunk/packages/galaxy/trunk/debian/remove_obsolete_eggs.sh
===================================================================
--- trunk/packages/galaxy/trunk/debian/remove_obsolete_eggs.sh (rev 0)
+++ trunk/packages/galaxy/trunk/debian/remove_obsolete_eggs.sh 2014-03-18 17:22:19 UTC (rev 16469)
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+# Scrub out the Python modules that I no longer have to leave in the package thanks
+# to the use_system_python_libs patch.
+cd eggs
+
+rm -rf pycrypto-*.egg
+rm -rf pysqlite-*.egg
+rm -rf simplejson-*.egg
+# rm -rf SQLAlchemy-*.egg
+# rm -rf sqlalchemy_migrate-*.egg
Property changes on: trunk/packages/galaxy/trunk/debian/remove_obsolete_eggs.sh
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/packages/galaxy/trunk/debian/rules
===================================================================
--- trunk/packages/galaxy/trunk/debian/rules (rev 0)
+++ trunk/packages/galaxy/trunk/debian/rules 2014-03-18 17:22:19 UTC (rev 16469)
@@ -0,0 +1,101 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# A big messy build for a big messy system.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+# No, Python, you can't squirrel files away in the home dir!
+export PYTHON_EGG_CACHE=$(CURDIR)/eggs
+
+# And no you can't connect to the net and fetch random files!
+export http_proxy=http://0.0.0.0:0
+export ftp_proxy=http://0.0.0.0:0
+
+%:
+ dh $@ --with python2
+
+override_dh_auto_clean:
+ #Man there is a lot of crud in here...
+ dh_auto_clean
+ find . -name "*.pyc" -exec rm '{}' ';'
+ # Maybe have to remove .so? - no just a few that got unpacked
+ rm -rf eggs/*.egg-tmp
+ find . \( -name "._*" -or -name '.DS_Store' -or -name '.gitignore' \) -exec rm '{}' ';'
+ rm -f database/universe.sqlite
+ rm -f integrated_tool_panel.xml database/integrated_tool_panel.xml
+ rm -f logging
+ rm -f hacky_first_run.log
+ rm -rf database/tmp
+ rm -f lib/galaxy/datatypes/test/temp.txt
+ #debian/link_configs_for_hacky_first_run.sh clean
+ #./debian/remove_obsolete_eggs.sh
+
+override_dh_auto_build:
+ chmod a-x tool-data/*.loc.sample
+ # The following is no longer needed but may yet be useful as it results in
+ # a package that starts faster first time. On the other hand it also results
+ # in a package that overwrites the database on updates, which is very much a bad
+ # thing. Leaving it in in case I need to resurrect it.
+ #debian/link_configs_for_hacky_first_run.sh
+ #bash -c '( echo $$BASHPID ; python ./scripts/paster.py serve debian/universe_wsgi.ini.hacked 2>&1 ) \
+ # | tee `tty -s && tty` ./hacky_first_run.log \
+ # | ( SS=`head -n 1` ; grep -ql ^socket.gaierror && kill -TERM `ps -o pid --ppid $$SS --no-headers` )'
+ #This needs to move as it is written to by the server
+ #touch database/integrated_tool_panel.xml
+ #debian/link_configs_for_hacky_first_run.sh clean
+
+# Custom manual install to debian/tmp. Sorry - long winded.
+override_dh_auto_install:
+ #Split into usr, var and etc
+ mkdir -p debian/tmp/usr/lib/galaxy-server
+ mkdir -p debian/tmp/usr/share/galaxy-server
+ mkdir -p debian/tmp/etc/galaxy-server
+ mkdir -p debian/tmp/var/lib/galaxy-server/egg-cache
+ mkdir -p debian/tmp/var/lib/galaxy-server/shed_tools
+ mkdir -p debian/tmp/var/lib/galaxy-server/genetrack_plots
+ cp -r * debian/tmp/usr/lib/galaxy-server || true
+ ( cd ./debian/tmp ; ../copy_sample_config.sh )
+ mv debian/tmp/usr/lib/galaxy-server/database debian/tmp/var/lib/galaxy-server
+ mv debian/tmp/usr/lib/galaxy-server/static debian/tmp/usr/share/galaxy-server
+ mv debian/tmp/usr/lib/galaxy-server/templates debian/tmp/usr/share/galaxy-server
+ mv debian/tmp/usr/lib/galaxy-server/test debian/tmp/usr/share/galaxy-server
+ mv debian/tmp/usr/lib/galaxy-server/test-data debian/tmp/usr/share/galaxy-server
+ mv debian/tmp/usr/lib/galaxy-server/eggs/*.egg-tmp debian/tmp/var/lib/galaxy-server/egg-cache || true
+ find debian/tmp/usr/share -type f -exec chmod a-x '{}' ';'
+ chmod a+x debian/tmp/usr/lib/galaxy-server/*.sh
+ cp debian/galaxy_icon.png debian/tmp/usr/share/galaxy-server/static
+ #Things that I previously did by running the server once as root
+ mkdir -p debian/tmp/usr/lib/galaxy-server/tool-data/shared/jars
+ #And some permissions fixes
+ find -type f -name '*.xml' -exec chmod a-x '{}' ';'
+ #And scrub out build-time files from static/style
+ # ( cd debian/tmp/usr/share/galaxy-server/static/style ; \
+ # rm -rf *.tmpl *.less *.ini Makefile *.py bootstrap fontawesome shared_images )
+ ( cd debian/tmp/usr/share/galaxy-server/static && \
+ rm june_2007_style && mkdir june_2007_style && mv style/blue june_2007_style && \
+ rm -r style )
+ #Execute permissions are set apparently randomly. So, erm, maybe this...
+ find debian/tmp/usr \( -name '*.py' -or -name '*.pl' -or -name '*.sh' \) -exec \
+ sh -c 'if [ "`head -c 2 "{}"`" = "#!" ] ; then chmod a+x "{}" ; else chmod a-x "{}" ; fi' \;
+ #And interpreters are a bit random too, so:
+ find debian/tmp/usr -name '*.py' -exec sed -i -e '1s/#! \?.*python[0-9.]*/#!\/usr\/bin\/python/' '{}' \;
+
+override_dh_install:
+ dh_install
+ #Make a load of symlinks to allow Galaxy to write to various directories, but only in /var/lib/galaxy-server
+ dh_link -pgalaxy-server /var/lib/galaxy-server/database /usr/lib/galaxy-server/database
+ dh_link -pgalaxy-server /var/lib/galaxy-server/shed_tools /usr/lib/galaxy-server/shed_tools
+ dh_link -pgalaxy-server /usr/share/galaxy-server/static /usr/lib/galaxy-server/static
+ dh_link -pgalaxy-server /usr/share/galaxy-server/templates /usr/lib/galaxy-server/templates
+ dh_link -pgalaxy-server /var/lib/galaxy-server/genetrack_plots /usr/share/galaxy-server/static/genetrack/plots
+ dh_link -pgalaxy-server-test /usr/share/galaxy-server/test /usr/lib/galaxy-server/test
+ dh_link -pgalaxy-server-test /usr/share/galaxy-server/test-data /usr/lib/galaxy-server/test-data
+ #Server expects to write to these files, the dangling symlink is intentional
+ dh_link -pgalaxy-server /var/lib/galaxy-server/database/integrated_tool_panel.xml /usr/lib/galaxy-server/integrated_tool_panel.xml
+ dh_link -pgalaxy-server-test /var/lib/galaxy-server/test/temp.txt /usr/lib/galaxy-server/lib/galaxy/datatypes/test/temp.txt
+ chmod g+w debian/galaxy-server-test/var/lib/galaxy-server/test || true
+ #Startup files and links
+ dh_install -pgalaxy-server debian/galaxy.conf /etc/init
+ dh_link -pgalaxy-server /lib/init/upstart-job /etc/init.d/galaxy
+ dh_install -pgalaxy-server debian/galaxy.desktop /usr/share/applications
Property changes on: trunk/packages/galaxy/trunk/debian/rules
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/packages/galaxy/trunk/debian/run.sh
===================================================================
--- trunk/packages/galaxy/trunk/debian/run.sh (rev 0)
+++ trunk/packages/galaxy/trunk/debian/run.sh 2014-03-18 17:22:19 UTC (rev 16469)
@@ -0,0 +1,39 @@
+#!/bin/bash
+set -e
+
+cd `dirname $0`
+
+python ./scripts/check_python.py
+
+#For Deb package we don't need most of the regular startup script
+#Galaxy does expect somewhere to unpack 'eggs'
+export PYTHON_EGG_CACHE=/var/lib/galaxy-server/egg-cache
+
+#This script would normally be called from by upstart from /etc/init/galaxy.conf
+#You can run it manually but be sure to run it as the right user.
+RIGHT_USER=`stat -c%U "$PYTHON_EGG_CACHE"`
+if ! [ `id -un` = $RIGHT_USER ] ; then
+ echo "You should start Galaxy as $RIGHT_USER."
+ echo "Try: sudo -u $RIGHT_USER $0"
+ exit 1
+fi
+
+# Make universe_wsgi.ini on-the-fly unless it already exists.
+# Hint - you most probably don't ever want to make a monolithic UWINI
+# unless you are are doing it for testing purposes.
+UWINI=universe_wsgi.ini
+
+if [ ! -e $UWINI ] ; then
+ UWINI=`mktemp --tmpdir universe_wsgi_XXXX.ini`
+ python ./scripts/build_universe_config.py universe_wsgi.d/ "$UWINI"
+fi
+
+#For some reason I seem to be having issues initialising the database when it's
+#done by Galaxy, but I can't reproduce it when I do it manually. So just update
+#the database here.
+echo "Ensuring the database is set up and the version is right."
+./manage_db.sh -c "$UWINI" version_control 2>/dev/null || true
+./manage_db.sh -c "$UWINI" upgrade
+
+exec python ./scripts/paster.py serve "$UWINI" "$@"
+
Property changes on: trunk/packages/galaxy/trunk/debian/run.sh
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/packages/galaxy/trunk/debian/sbin/galaxy-add-administrator
===================================================================
--- trunk/packages/galaxy/trunk/debian/sbin/galaxy-add-administrator (rev 0)
+++ trunk/packages/galaxy/trunk/debian/sbin/galaxy-add-administrator 2014-03-18 17:22:19 UTC (rev 16469)
@@ -0,0 +1,190 @@
+#!/usr/bin/perl
+use strict; use warnings;
+
+# Script added for the Bio-Linux package by Tim Booth
+# This script may be freely redistributed under the same terms as galaxy itself.
+
+# This script used to edit /etc/galaxy-server/universe_wsgi.ini but now
+# it writes to /etc/galaxy-server/universe_wsgi.d/11_admin_users.ini
+
+#my $ini="/etc/galaxy-server/universe_wsgi.ini";
+my $ini="/etc/galaxy-server/universe_wsgi.d/11_admin_users.ini";
+my $create_ini = 1;
+
+#TODO - get this from config so user can change it and still add users by
+# short name.
+my $maildomain="localhost";
+
+# A helper script to set Galaxy administrators
+my $mode = 'show';
+my $user_to_add = 'None';
+if($ARGV[0])
+{
+ if($ARGV[0] eq '--del')
+ {
+ $mode = 'del';
+ $user_to_add = $ARGV[1] or usage();
+ }
+ else
+ {
+ $mode = 'add';
+ $user_to_add = $ARGV[0];
+ }
+}
+
+if ( $mode ne 'show' )
+{
+ $user_to_add =~ /@/ or $user_to_add = "$user_to_add\@$maildomain";
+ $user_to_add =~ /. at ./ or usage();
+ $user_to_add =~ /[^\w.@~]/ and usage();
+}
+
+#Quick load from ini file
+my $fh;
+my @ini_all;
+if(open $fh, "<$ini")
+{
+ $create_ini = 0;
+
+ # Slurp it!
+ @ini_all = <$fh>;
+}
+else
+{
+ $create_ini or die
+ "Can't open the file $ini for reading.\n";
+
+ @ini_all = new_ini();
+}
+undef $fh;
+
+my( @admusers, @admcomments );
+my $nn = 0;
+for( @ini_all )
+{
+ /^\s*admin_users\s*=/ && push(@admusers, $nn);
+ /^\s*#\s*admin_users\s*=/ && push(@admcomments, $nn);
+ $nn++;
+}
+
+my $line_to_process = undef;
+my $line_contents;
+
+# Now, being fairly paranoid, sort the config
+if( @admusers > 1 )
+{
+ die "You seem to have multiple 'admin_users' lines in the config file.\n" .
+ "Unable to process it. You should edit $ini manually.\n";
+}
+elsif( @admusers == 1 )
+{
+ $line_to_process = $admusers[0];
+ $line_contents = $ini_all[$line_to_process];
+}
+else
+{
+ if(!@admcomments)
+ {
+ die "Can't find the right location to insert an 'admin_users' line in the config file.\n" .
+ "Unable to process it. You should edit $ini manually.\n";
+ }
+ else
+ {
+ $line_to_process = $admcomments[0];
+ $line_contents = "admin_users=";
+ }
+}
+
+#Now process the line
+# extract current users
+my @curusers = split /,/, join("", $line_contents =~ /[^=]+=(.*)/);
+map { s/^\s+//, s/\s+$// } @curusers;
+ at curusers = grep { $_ and lc($_) ne 'none' } @curusers;
+
+if(@curusers)
+{
+ print "These " . @curusers ." users are currently administrators:\n";
+ print "$_\n" for @curusers;
+}
+elsif( $create_ini && $mode eq 'show' )
+{
+ print "The file $ini was not found. If you add an administrator with this\n".
+ "script it will be created for you.\n";
+ usage();
+}
+else
+{
+ print "There are currently no administrative users set up in Galaxy.\n";
+}
+
+# look for user required
+(my $match) = grep { $_ eq $user_to_add } @curusers;
+
+if($mode eq 'add')
+{
+ # add to list
+ $match && die "Error: $user_to_add is already listed as an admin user.\n";
+
+ push @curusers, $user_to_add;
+}
+elsif($mode eq 'del')
+{
+ $match || die "Error: $user_to_add is not listed as an admin user.\n";
+
+ @curusers = grep { $_ ne $user_to_add } @curusers;
+ @curusers or @curusers = ('None');
+}
+
+#And finally, save the result.
+if($mode ne 'show')
+{
+ $ini_all[$line_to_process] = "admin_users = " . join(',', @curusers) . "\n";
+
+ my $newfile = sprintf("%s.new.%x", $ini, time());
+
+ open $fh, ">$newfile" or die
+ "Unable to write changes to $newfile
+You should run this script with root privileges using \"sudo\".\n";
+ print $fh @ini_all;
+ undef $fh;
+
+ rename $newfile, $ini or die
+ "Unable to copy changes from $newfile to $ini
+You should run this script with root privileges using \"sudo\".\n";
+
+}
+
+if($mode eq 'add')
+{
+ print "\nUser $user_to_add was added. Restarting Galaxy - this will take about 30 seconds.\n";
+ system("initctl restart galaxy || initctl start galaxy");
+}
+elsif($mode eq 'del')
+{
+ print "\nUser $user_to_add removed. Restarting Galaxy - this will take about 30 seconds.\n";
+ system("initctl restart galaxy || initctl start galaxy");
+}
+
+sub new_ini
+{
+ map {/[\s]*(.*\n)/} split /(?<=\n)/,
+ "# Administrative users on the Galaxy server.
+ # This file was created by the galaxy-add-administrator script. You can use
+ # that script to modify the list of admins or you can just edit this file
+ # yourself, but don't forget you need to restart the server for the changes
+ # to take effect.
+
+ [app:main]
+ # admin_users=
+ ";
+}
+
+sub usage
+{
+ die
+"Usage: galaxy-add-administrator [ [--del] <username> ]
+
+Where <username> must be a valid e-mail address that has been
+set up as a user in Galaxy.
+";
+}
Property changes on: trunk/packages/galaxy/trunk/debian/sbin/galaxy-add-administrator
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/packages/galaxy/trunk/debian/source/format
===================================================================
--- trunk/packages/galaxy/trunk/debian/source/format (rev 0)
+++ trunk/packages/galaxy/trunk/debian/source/format 2014-03-18 17:22:19 UTC (rev 16469)
@@ -0,0 +1 @@
+3.0 (quilt)
Added: trunk/packages/galaxy/trunk/debian/source/include-binaries
===================================================================
--- trunk/packages/galaxy/trunk/debian/source/include-binaries (rev 0)
+++ trunk/packages/galaxy/trunk/debian/source/include-binaries 2014-03-18 17:22:19 UTC (rev 16469)
@@ -0,0 +1 @@
+debian/galaxy_icon.png
Added: trunk/packages/galaxy/trunk/debian/universe_wsgi.d/10_debian_defaults.ini
===================================================================
--- trunk/packages/galaxy/trunk/debian/universe_wsgi.d/10_debian_defaults.ini (rev 0)
+++ trunk/packages/galaxy/trunk/debian/universe_wsgi.d/10_debian_defaults.ini 2014-03-18 17:22:19 UTC (rev 16469)
@@ -0,0 +1,49 @@
+# General configuration overrides for Galaxy in Debian/Bio-Linux.
+# Simon suggested some more appropriate default configurations for a standalone
+# server - see +bug/1064920
+
+# To set your own settings, you are urged not to edit this file but
+# to to put the settings into /etc/galaxy-server/universe_wsgi.d/50_local.ini
+# Settings found in any higher numbered file will override anything
+# in here.
+
+[app:main]
+
+# This is necessary if you want to assemble the temporary config file outside the
+# base Galaxy directory, which I do.
+here = /usr/lib/galaxy-server
+
+# I want to make it easy for people to proxy Galaxy through Apache and
+# it doesn't seem to hurt to activate proxy-prefix by defualt, even though
+# the other config stuff is in the galaxy-server-apache-proxy package.
+# Enable the proxy-prefix filter
+filter-with = proxy-prefix
+
+# Also the cookie path.
+# Setting this seems to cause various problems - failed uploads, failed
+# logins. So leave it as default for now.
+#cookie_path = galaxy
+
+# This should be fine on BL as Galaxy has an unprivileged account, and I'd assume
+# that anyone having Galaxy admin access also has some shell access.
+allow_library_path_paste = True
+
+# Allow administrators to delete accounts.
+allow_user_deletion = True
+
+# Allow administrators to log in as other users (useful for debugging)
+allow_user_impersonation = False
+
+# Allow users to remove their datasets from disk immediately (otherwise,
+# datasets will be removed after a time period specified by an administrator in
+# the cleanup scripts run via cron)
+allow_user_dataset_purge = True
+
+# By default, users' data will be public, but setting this to True will cause
+# it to be private. Does not affect existing users and data, only ones created
+# after this option is set. Users may still change their default back to
+# public.
+new_user_dataset_access_role_default_private = True
+
+# And no debugging, ta.
+debug = False
Added: trunk/packages/galaxy/trunk/debian/universe_wsgi.d/31_apache-proxy.ini
===================================================================
--- trunk/packages/galaxy/trunk/debian/universe_wsgi.d/31_apache-proxy.ini (rev 0)
+++ trunk/packages/galaxy/trunk/debian/universe_wsgi.d/31_apache-proxy.ini 2014-03-18 17:22:19 UTC (rev 16469)
@@ -0,0 +1,17 @@
+# Settings added by debian-galaxy-apache-proxy to switch Galaxy over to
+# authenticating by real user accounts and also permitting uploads.
+
+[app:main]
+
+# Other scripts assume that maildomain is localhsot, so you can't just
+# change the setting below and expect everythig to work.
+use_remote_user = True
+remote_user_maildomain = localhost
+
+# Users may copy files here directly or upload via SFTP/SCP
+ftp_upload_dir = /var/lib/galaxy-server/transfer
+ftp_upload_site = *** Transfer files via SCP or SFTP to /var/lib/galaxy-server/transfer/... ***
+
+# There is no neat way to log out a user with Basic Auth, but here is a non-neat way.
+# Not yet tested on IE.
+remote_user_logout_href = javascript:var r=new XMLHttpRequest();r.onreadystatechange=function(){if(r.readyState==4)window.location.replace('logout.html')};r.open('get','logout.html',true,'logout','logout');r.send();
Added: trunk/packages/galaxy/trunk/debian/universe_wsgi.d/32_pg-database.ini
===================================================================
--- trunk/packages/galaxy/trunk/debian/universe_wsgi.d/32_pg-database.ini (rev 0)
+++ trunk/packages/galaxy/trunk/debian/universe_wsgi.d/32_pg-database.ini 2014-03-18 17:22:19 UTC (rev 16469)
@@ -0,0 +1,8 @@
+# Configuration fragments added by galaxy-server-apache-proxy
+
+[app:main]
+
+database_connection = postgresql:///Debian-galaxy
+base_engine_option_server_side_cursors = True
+database_engine_option_strategy = threadlocal
+
Added: trunk/packages/galaxy/trunk/debian/universe_wsgi.ini.hacked
===================================================================
--- trunk/packages/galaxy/trunk/debian/universe_wsgi.ini.hacked (rev 0)
+++ trunk/packages/galaxy/trunk/debian/universe_wsgi.ini.hacked 2014-03-18 17:22:19 UTC (rev 16469)
@@ -0,0 +1,681 @@
+#
+# Galaxy is configured by default to be useable in a single-user development
+# environment. To tune the application for a multi-user production
+# environment, see the documentation at:
+#
+# http://wiki.g2.bx.psu.edu/Admin/Config/Performance/Production%20Server
+#
+
+# Throughout this sample configuration file, except where stated otherwise,
+# uncommented values override the default if left unset, whereas commented
+# values are set to the default value.
+# Examples of many of these options are explained in more detail in the wiki:
+#
+# http://wiki.g2.bx.psu.edu/Admin/Config
+#
+# Config hackers are encouraged to check there before asking for help.
+
+# ---- HTTP Server ----------------------------------------------------------
+
+# Configuration of the internal HTTP server.
+
+[server:main]
+
+# The internal HTTP server to use. Currently only Paste is provided. This
+# option is required.
+use = egg:Paste#http
+
+# The port on which to listen.
+port = -1
+
+# The address on which to listen. By default, only listen to localhost (Galaxy
+# will not be accessible over the network). Use '0.0.0.0' to listen on all
+# available network interfaces.
+host = 999.999.999.999
+
+# Use a threadpool for the web server instead of creating a thread for each
+# request.
+use_threadpool = False
+
+# Number of threads in the web server thread pool.
+#threadpool_workers = 10
+
+# ---- Filters --------------------------------------------------------------
+
+# Filters sit between Galaxy and the HTTP server.
+
+# These filters are disabled by default. They can be enabled with
+# 'filter-with' in the [app:main] section below.
+
+# Define the gzip filter.
+[filter:gzip]
+use = egg:Paste#xxx
+
+# Define the proxy-prefix filter.
+[filter:proxy-prefix]
+use = egg:PasteDeploy#prefix
+prefix = /galaxy
+
+# ---- Galaxy ---------------------------------------------------------------
+
+# Configuration of the Galaxy application.
+
+[app:main]
+
+# -- Application and filtering
+
+# The factory for the WSGI application. This should not be changed.
+paste.app_factory = galaxy.web.buildapp:app_factory
+
+# If not running behind a proxy server, you may want to enable gzip compression
+# to decrease the size of data transferred over the network. If using a proxy
+# server, please enable gzip compression there instead.
+#filter-with = gzip
+
+# If running behind a proxy server and Galaxy is served from a subdirectory,
+# enable the proxy-prefix filter and set the prefix in the
+# [filter:proxy-prefix] section above.
+#filter-with = proxy-prefix
+
+# If proxy-prefix is enabled and you're running more than one Galaxy instance
+# behind one hostname, you will want to set this to the same path as the prefix
+# in the filter above. This value becomes the "path" attribute set in the
+# cookie so the cookies from each instance will not clobber each other.
+#cookie_path = None
+
+# -- Database
+
+# By default, Galaxy uses a SQLite database at 'database/universe.sqlite'. You
+# may use a SQLAlchemy connection string to specify an external database
+# instead. This string takes many options which are explained in detail in the
+# config file documentation.
+#database_connection = sqlite:///./database/universe.sqlite?isolation_level=IMMEDIATE
+
+# If the server logs errors about not having enough database pool connections,
+# you will want to increase these values, or consider running more Galaxy
+# processes.
+#database_engine_option_pool_size = 5
+#database_engine_option_max_overflow = 10
+
+# If using MySQL and the server logs the error "MySQL server has gone away",
+# you will want to set this to some positive value (7200 should work).
+#database_engine_option_pool_recycle = -1
+
+# If large database query results are causing memory or response time issues in
+# the Galaxy process, leave the result on the server instead. This option is
+# only available for PostgreSQL and is highly recommended.
+#database_engine_option_server_side_cursors = False
+
+# Create only one connection to the database per thread, to reduce the
+# connection overhead. Recommended when not using SQLite:
+#database_engine_option_strategy = threadlocal
+
+# Log all database transactions, can be useful for debugging and performance
+# profiling. Logging is done via Python's 'logging' module under the qualname
+# 'galaxy.model.orm.logging_connection_proxy'
+#database_query_profiling_proxy = False
+
+# -- Files and directories
+
+# Dataset files are stored in this directory.
+#file_path = database/files
+
+# Temporary files are stored in this directory.
+#new_file_path = database/tmp
+
+# Tool config files, defines what tools are available in Galaxy.
+# Tools can be locally developed or installed from Galaxy tool sheds.
+#tool_config_file = tool_conf.xml,shed_tool_conf.xml
+
+# Default path to the directory containing the tools defined in tool_conf.xml.
+# Other tool config files must include the tool_path as an attribute in the <toolbox> tag.
+#tool_path = tools
+
+# Path to the directory in which managed tool dependencies are placed. To use
+# the dependency system, see the documentation at:
+# http://wiki.g2.bx.psu.edu/Admin/Config/Tool%20Dependencies
+#tool_dependency_dir = None
+
+# Enable automatic polling of relative tool sheds to see if any updates
+# are available for installed repositories. Ideally only one Galaxy
+# server process should be able to check for repository updates. The
+# setting for hours_between_check should be an integer between 1 and 24.
+#enable_tool_shed_check = False
+#hours_between_check = 12
+
+# Directory where data used by tools is located, see the samples in that
+# directory and the wiki for help:
+# http://wiki.g2.bx.psu.edu/Admin/Data%20Integration
+#tool_data_path = tool-data
+
+# Directory where chrom len files are kept, currently mainly used by trackster
+#len_file_path = tool-data/shared/ucsc/chrom
+
+
+# Datatypes config file, defines what data (file) types are available in
+# Galaxy.
+#datatypes_config_file = datatypes_conf.xml
+
+# Each job is given a unique empty directory as its current working directory.
+# This option defines in what parent directory those directories will be
+# created.
+#job_working_directory = database/job_working_directory
+
+# If using a cluster, Galaxy will write job scripts and stdout/stderr to this
+# directory.
+#cluster_files_directory = database/pbs
+
+# External service types config file, defines what types of external_services configurations
+# are available in Galaxy.
+#external_service_type_config_file = external_service_types_conf.xml
+
+# Path to the directory containing the external_service_types defined in the config.
+#external_service_type_path = external_service_types
+
+# -- Mail and notification
+
+# Galaxy sends mail for various things: Subscribing users to the mailing list
+# if they request it, emailing password resets, notification from the Galaxy
+# Sample Tracking system, and reporting dataset errors. To do this, it needs
+# to send mail through an SMTP server, which you may define here (host:port).
+# Galaxy will automatically try STARTTLS but will continue upon failure.
+#smtp_server = None
+
+# If your SMTP server requires a username and password, you can provide them
+# here (password in cleartext here, but if your server supports STARTTLS it
+# will be sent over the network encrypted).
+#smtp_username = None
+#smtp_password = None
+
+# On the user registration form, users may choose to join the mailing list.
+# This is the address of the list they'll be subscribed to.
+#mailing_join_addr = galaxy-announce-join at bx.psu.edu
+
+# Datasets in an error state include a link to report the error. Those reports
+# will be sent to this address. Error reports are disabled if no address is set.
+#error_email_to = None
+
+# -- Display sites
+
+# Galaxy can display data at various external browsers. These options specify
+# which browsers should be available. URLs and builds available at these
+# browsers are defined in the specifield files.
+
+# UCSC browsers: tool-data/shared/ucsc/ucsc_build_sites.txt
+#ucsc_display_sites = main,test,archaea,ucla
+
+# GBrowse servers: tool-data/shared/gbrowse/gbrowse_build_sites.txt
+#gbrowse_display_sites = wormbase,tair,modencode_worm,modencode_fly,yeast_sgd
+
+# GeneTrack servers: tool-data/shared/genetrack/genetrack_sites.txt
+#genetrack_display_sites = main,test
+
+# -- Next gen LIMS interface on top of existing Galaxy Sample/Request management code.
+
+use_nglims = False
+nglims_config_file = tool-data/nglims.yaml
+
+# -- UI Localization
+
+# Append "/{brand}" to the "Galaxy" text in the masthead.
+#brand = None
+
+# The URL linked by the "Galaxy/brand" text.
+#logo_url = /
+
+# The URL linked by the "Galaxy Wiki" link in the "Help" menu.
+#wiki_url = http://wiki.g2.bx.psu.edu/
+
+# The URL linked by the "Support" link in the "Help" menu.
+#support_url = http://wiki.g2.bx.psu.edu/Support
+
+# The URL linked by the "How to Cite..." link in the "Help" menu.
+#citation_url = http://wiki.g2.bx.psu.edu/Citing%20Galaxy
+
+# Serve static content, which must be enabled if you're not serving it via a
+# proxy server. These options should be self explanatory and so are not
+# documented individually. You can use these paths (or ones in the proxy
+# server) to point to your own styles.
+static_enabled = True
+static_cache_time = 360
+static_dir = %(here)s/static/
+static_images_dir = %(here)s/static/images
+static_favicon_dir = %(here)s/static/favicon.ico
+static_scripts_dir = %(here)s/static/scripts/
+static_style_dir = %(here)s/static/june_2007_style/blue
+static_robots_txt = %(here)s/static/robots.txt
+
+# Pack javascript at launch (/static/scripts/*.js)
+# This only happens if the modified timestamp of the source .js is newer
+# than the version (if it exists) in /static/scripts/packed/
+# Note that this requires java > 1.4 for executing yuicompressor.jar
+#pack_scripts = False
+
+# Enable Cloud Launch
+
+#enable_cloud_launch = False
+
+# -- Advanced proxy features
+
+# For help on configuring the Advanced proxy features, see:
+# http://usegalaxy.org/production
+
+# Apache can handle file downloads (Galaxy-to-user) via mod_xsendfile. Set
+# this to True to inform Galaxy that mod_xsendfile is enabled upstream.
+#apache_xsendfile = False
+
+# The same download handling can be done by nginx using X-Accel-Redirect. This
+# should be set to the path defined in the nginx config as an internal redirect
+# with access to Galaxy's data files (see documentation linked above).
+#nginx_x_accel_redirect_base = False
+
+# nginx can make use of mod_zip to create zip files containing multiple library
+# files. If using X-Accel-Redirect, this can be the same value as that option.
+#nginx_x_archive_files_base = False
+
+# If using compression in the upstream proxy server, use this option to disable
+# gzipping of library .tar.gz and .zip archives, since the proxy server will do
+# it faster on the fly.
+#upstream_gzip = False
+
+# nginx can also handle file uploads (user-to-Galaxy) via nginx_upload_module.
+# Configuration for this is complex and explained in detail in the
+# documentation linked above. The upload store is a temporary directory in
+# which files uploaded by the upload module will be placed.
+#nginx_upload_store = False
+
+# This value overrides the action set on the file upload form, e.g. the web
+# path where the nginx_upload_module has been configured to intercept upload
+# requests.
+#nginx_upload_path = False
+
+# -- Logging and Debugging
+
+# Verbosity of console log messages. Acceptable values can be found here:
+# http://docs.python.org/library/logging.html#logging-levels
+#log_level = DEBUG
+
+# Print database operations to the server log (warning, quite verbose!).
+#database_engine_option_echo = False
+
+# Print database pool operations to the server log (warning, quite verbose!).
+#database_engine_option_echo_pool = False
+
+# Turn on logging of application events and some user events to the database.
+#log_events = True
+
+# Turn on logging of user actions to the database. Actions currently logged are
+# grid views, tool searches, and use of "recently" used tools menu. The
+# log_events and log_actions functionality will eventually be merged.
+#log_actions = True
+
+# Sanitize All HTML Tool Output
+# By default, all tool output served as 'text/html' will be sanitized
+# thoroughly. This can be disabled if you have special tools that require
+# unaltered output.
+#sanitize_all_html = True
+
+# Debug enables access to various config options useful for development and
+# debugging: use_lint, use_profile, use_printdebug and use_interactive. It
+# also causes the files used by PBS/SGE (submission script, output, and error)
+# to remain on disk after the job is complete. Debug mode is disabled if
+# commented, but is uncommented by default in the sample config.
+debug = True
+
+# Check for WSGI compliance.
+#use_lint = False
+
+# Run the Python profiler on each request.
+#use_profile = False
+
+# Intercept print statements and show them on the returned page.
+#use_printdebug = True
+
+# Enable live debugging in your browser. This should NEVER be enabled on a
+# public site. Enabled in the sample config for development.
+use_interactive = True
+
+# Write thread status periodically to 'heartbeat.log', (careful, uses disk
+# space rapidly!). Useful to determine why your processes may be consuming a
+# lot of CPU.
+#use_heartbeat = False
+
+# Enable the memory debugging interface (careful, negatively impacts server
+# performance).
+#use_memdump = False
+
+# -- Data Libraries
+
+# These library upload options are described in much more detail in the wiki:
+# http://wiki.g2.bx.psu.edu/Admin/Data%20Libraries/Uploading%20Library%20Files
+
+# Add an option to the library upload form which allows administrators to
+# upload a directory of files.
+#library_import_dir = None
+
+# Add an option to the library upload form which allows authorized
+# non-administrators to upload a directory of files. The configured directory
+# must contain sub-directories named the same as the non-admin user's Galaxy
+# login ( email ). The non-admin user is restricted to uploading files or
+# sub-directories of files contained in their directory.
+#user_library_import_dir = None
+
+# Add an option to the admin library upload tool allowing admins to paste
+# filesystem paths to files and directories in a box, and these paths will be
+# added to a library. Set to True to enable. Please note the security
+# implication that this will give Galaxy Admins access to anything your Galaxy
+# user has access to.
+#allow_library_path_paste = False
+
+# Users may choose to download multiple files from a library in an archive. By
+# default, Galaxy allows users to select from a few different archive formats
+# if testing shows that Galaxy is able to create files using these formats.
+# Specific formats can be disabled with this option, separate more than one
+# format with commas. Available formats are currently 'zip', 'gz', and 'bz2'.
+#disable_library_comptypes =
+
+# Some sequencer integration features in beta allow you to automatically
+# transfer datasets. This is done using a lightweight transfer manager which
+# runs outside of Galaxy (but is spawned by it automatically). Galaxy will
+# communicate with this manager over the port specified here.
+#transfer_manager_port = 8163
+
+# Search data libraries with whoosh
+#enable_whoosh_library_search = True
+# Whoosh indexes are stored in this directory.
+#whoosh_index_dir = database/whoosh_indexes
+
+# Search data libraries with lucene
+#enable_lucene_library_search = False
+# maxiumum file size to index for searching, in MB
+#fulltext_max_size = 500
+#fulltext_noindex_filetypes=bam,sam,wig,bigwig,fasta,fastq,fastqsolexa,fastqillumina,fastqsanger
+# base URL of server providing search functionality using lucene
+#fulltext_url = http://localhost:8081
+
+# -- Users and Security
+
+# Galaxy encodes various internal values when these values will be output in
+# some format (for example, in a URL or cookie). You should set a key to be
+# used by the algorithm that encodes and decodes these values. It can be any
+# string. If left unchanged, anyone could construct a cookie that would grant
+# them access to others' sessions.
+#id_secret = USING THE DEFAULT IS NOT SECURE!
+
+# User authentication can be delegated to an upstream proxy server (usually
+# Apache). The upstream proxy should set a REMOTE_USER header in the request.
+# Enabling remote user disables regular logins. For more information, see:
+# http://wiki.g2.bx.psu.edu/Admin/Config/Apache%20Proxy
+#use_remote_user = False
+
+# If use_remote_user is enabled and your external authentication
+# method just returns bare usernames, set a default mail domain to be appended
+# to usernames, to become your Galaxy usernames (email addresses).
+#remote_user_maildomain = None
+
+# If use_remote_user is enabled, you can set this to a URL that will log your
+# users out.
+#remote_user_logout_href = None
+
+# Administrative users - set this to a comma-separated list of valid Galaxy
+# users (email addresses). These users will have access to the Admin section
+# of the server, and will have access to create users, groups, roles,
+# libraries, and more. For more information, see:
+# http://wiki.g2.bx.psu.edu/Admin/Interface
+#admin_users = None
+
+# Force everyone to log in (disable anonymous access).
+#require_login = False
+
+# Allow unregistered users to create new accounts (otherwise, they will have to
+# be created by an admin).
+#allow_user_creation = True
+
+# Allow administrators to delete accounts.
+#allow_user_deletion = False
+
+# Allow administrators to log in as other users (useful for debugging)
+#allow_user_impersonation = False
+
+# Allow users to remove their datasets from disk immediately (otherwise,
+# datasets will be removed after a time period specified by an administrator in
+# the cleanup scripts run via cron)
+#allow_user_dataset_purge = False
+
+# By default, users' data will be public, but setting this to True will cause
+# it to be private. Does not affect existing users and data, only ones created
+# after this option is set. Users may still change their default back to
+# public.
+#new_user_dataset_access_role_default_private = False
+
+# -- Beta features
+
+# Object store mode (valid options are: disk, s3, distributed, hierarchical)
+#object_store = disk
+#aws_access_key = <AWS access key>
+#aws_secret_key = <AWS secret key>
+#s3_bucket = <name of an existing S3 bucket>
+#use_reduced_redundancy = True
+
+# Size (in GB) that the cache used by object store should be limited to.
+# If the value is not specified, the cache size will be limited only by the file
+# system size.
+#object_store_cache_size = 100
+
+# Configuration file for the distributed object store, if object_store =
+# distributed. See the sample at distributed_object_store_conf.xml.sample
+#distributed_object_store_config_file = None
+
+# Enable Galaxy to communicate directly with a sequencer
+#enable_sequencer_communication = False
+
+# Enable Galaxy's built-in visualization module, Trackster.
+#enable_tracks = True
+
+# Enable Galaxy Pages. Pages are custom webpages that include embedded Galaxy items,
+# such as datasets, histories, workflows, and visualizations; pages are useful for
+# documenting and sharing multiple analyses or workflows. Pages are created using a
+# WYSIWYG editor that is very similar to a word processor.
+#enable_pages = True
+
+# Enable authentication via OpenID. Allows users to log in to their Galaxy
+# account by authenticating with an OpenID provider.
+#enable_openid = False
+
+# Enable the (experimental! beta!) Web API. Documentation forthcoming.
+#enable_api = False
+
+# Optional list of email addresses of API users who can make calls on behalf of
+# other users
+#api_allow_run_as = None
+
+# Enable tool tags (associating tools with tags). This has its own option
+# since its implementation has a few performance implications on startup for
+# large servers.
+#enable_tool_tags = False
+
+# Enable a feature when running workflows. When enabled, default datasets
+# are selected for "Set at Runtime" inputs from the history such that the
+# same input will not be selected twice, unless there are more inputs than
+# compatible datasets in the history.
+# When False, the most recently added compatible item in the history will
+# be used for each "Set at Runtime" input, independent of others in the Workflow
+#enable_unique_workflow_defaults = False
+
+# Enable Galaxy's "Upload via FTP" interface. You'll need to install and
+# configure an FTP server (we've used ProFTPd since it can use Galaxy's
+# database for authentication) and set the following two options.
+
+# This should point to a directory containing subdirectories matching users'
+# email addresses, where Galaxy will look for files.
+#ftp_upload_dir = None
+
+# This should be the hostname of your FTP server, which will be provided to
+# users in the help text.
+#ftp_upload_site = None
+
+# Enable enforcement of quotas. Quotas can be set from the Admin interface.
+#enable_quotas = False
+
+# Enable a feature when running workflows. When enabled, default datasets
+# are selected for "Set at Runtime" inputs from the history such that the
+# same input will not be selected twice, unless there are more inputs than
+# compatible datasets in the history.
+# When False, the most recently added compatible item in the history will
+# be used for each "Set at Runtime" input, independent of others in the Workflow
+#enable_unique_workflow_defaults = False
+
+# -- Job Execution
+
+# If running multiple Galaxy processes, one can be designated as the job
+# runner. For more information, see:
+# http://wiki.g2.bx.psu.edu/Admin/Config/Performance/Web%20Application%20Scaling
+#enable_job_running = True
+
+# Should jobs be tracked through the database, rather than in memory.
+# Necessary if you're running the load balanced setup.
+#track_jobs_in_database = False
+
+# This enables splitting of jobs into tasks, if specified by the particular tool config.
+# This is a new feature and not recommended for production servers yet.
+#use_tasked_jobs = False
+#local_task_queue_workers = 2
+
+# Enable job recovery (if Galaxy is restarted while cluster jobs are running,
+# it can "recover" them when it starts). This is not safe to use if you are
+# running more than one Galaxy server using the same database.
+#enable_job_recovery = True
+
+# Setting metadata on job outputs to in a separate process (or if using a
+# cluster, on the cluster). Thanks to Python's Global Interpreter Lock and the
+# hefty expense that setting metadata incurs, your Galaxy process may become
+# unresponsive when this operation occurs internally.
+#set_metadata_externally = False
+
+# Although it is fairly reliable, setting metadata can occasionally fail. In
+# these instances, you can choose to retry setting it internally or leave it in
+# a failed state (since retrying internally may cause the Galaxy process to be
+# unresponsive). If this option is set to False, the user will be given the
+# option to retry externally, or set metadata manually (when possible).
+#retry_metadata_internally = True
+
+# If (for example) you run on a cluster and your datasets (by default,
+# database/files/) are mounted read-only, this option will override tool output
+# paths to write outputs to the working directory instead, and the job manager
+# will move the outputs to their proper place in the dataset directory on the
+# Galaxy server after the job completes.
+#outputs_to_working_directory = False
+
+# If your network filesystem's caching prevents the Galaxy server from seeing
+# the job's stdout and stderr files when it completes, you can retry reading
+# these files. The job runner will retry the number of times specified below,
+# waiting 1 second between tries. For NFS, you may want to try the -noac mount
+# option (Linux) or -actimeo=0 (Solaris).
+#retry_job_output_collection = 0
+
+# Clean up various bits of jobs left on the filesystem after completion. These
+# bits include the job working directory, external metadata temporary files,
+# and DRM stdout and stderr files (if using a DRM). Possible values are:
+# always, onsuccess, never
+#cleanup_job = always
+
+# Number of concurrent jobs to run (local job runner)
+#local_job_queue_workers = 5
+
+# Jobs can be killed after a certain amount of execution time. Format is in
+# hh:mm:ss. Currently only implemented for PBS.
+#job_walltime = None
+
+# Jobs can be killed if any of their outputs grow over a certain size (in
+# bytes). 0 for no limit.
+#output_size_limit = 0
+
+# Clustering Galaxy is not a straightforward process and requires some
+# pre-configuration. See the the wiki before attempting to set any of these
+# options:
+# http://wiki.g2.bx.psu.edu/Admin/Config/Performance/Cluster
+
+# Comma-separated list of job runners to start. local is always started. If
+# left commented, no jobs will be run on the cluster, even if a cluster URL is
+# explicitly defined in the [galaxy:tool_runners] section below. The runners
+# currently available are 'pbs' and 'drmaa'.
+#start_job_runners = None
+
+# For sites where all users in Galaxy match users on the system on which Galaxy
+# runs, the DRMAA job runner can be configured to submit jobs to the DRM as the
+# actual user instead of as the user running the Galaxy server process. For
+# details on these options, see the documentation at:
+#
+# http://galaxyproject.org/wiki/Admin/Config/Performance/Cluster
+#
+#drmaa_external_runjob_script = scripts/drmaa_external_runner.py
+#drmaa_external_killjob_script = scripts/drmaa_external_killer.py
+#external_chown_script = scripts/external_chown_script.py
+
+# File to source to set up the environment when running jobs. By default, the
+# environment in which the Galaxy server starts is used when running jobs
+# locally, and the environment set up per the DRM's submission method and
+# policy is used when running jobs on a cluster (try testing with `qsub` on the
+# command line). environment_setup_file can be set to the path of a file on
+# the cluster that should be sourced by the user to set up the environment
+# prior to running tools. This can be especially useful for running jobs as
+# the actual user, to remove the need to configure each user's environment
+# individually. This only affects cluster jobs, not local jobs.
+#environment_setup_file = None
+
+# The URL for the default runner to use when a tool doesn't explicitly define a
+# runner below.
+#default_cluster_job_runner = local:///
+
+# The cluster runners have their own thread pools used to prepare and finish
+# jobs (so that these sometimes lengthy operations do not block normal queue
+# operation). The value here is the number of worker threads available to each
+# started runner.
+#cluster_job_queue_workers = 3
+
+# These options are only used when using file staging with PBS.
+#pbs_application_server =
+#pbs_stage_path =
+#pbs_dataset_server =
+
+# ---- Tool Job Runners -----------------------------------------------------
+
+# Individual per-tool job runner overrides. Parameters can be included to define
+# multiple runners per tool. E.g. to run Cufflinks jobs initiated from Trackster
+# differently than standard Cufflinks jobs:
+# cufflinks = local:///
+# cufflinks[source at trackster] = local:///
+# If not listed here, a tool will run with the runner defined with
+# default_cluster_job_runner.
+
+[galaxy:tool_runners]
+
+biomart = local:///
+encode_db1 = local:///
+hbvar = local:///
+microbial_import1 = local:///
+ucsc_table_direct1 = local:///
+ucsc_table_direct_archaea1 = local:///
+ucsc_table_direct_test1 = local:///
+upload1 = local:///
+
+# ---- Galaxy Message Queue -------------------------------------------------
+
+# Galaxy uses AMQ protocol to receive messages from external sources like
+# bar code scanners. Galaxy has been tested against RabbitMQ AMQP implementation.
+# For Galaxy to receive messages from a message queue the RabbitMQ server has
+# to be set up with a user account and other parameters listed below. The 'host'
+# and 'port' fields should point to where the RabbitMQ server is running.
+
+[galaxy_amqp]
+
+#host = 127.0.0.1
+#port = 5672
+#userid = galaxy
+#password = galaxy
+#virtual_host = galaxy_messaging_engine
+#queue = galaxy_queue
+#exchange = galaxy_exchange
+#routing_key = bar_code_scanner
+#rabbitmqctl_path = /path/to/rabbitmqctl
+
More information about the debian-med-commit
mailing list