[DRE-commits] [redmine] 01/01: make example config for apache2-passenger-alias actually work

Antonio Terceiro terceiro at moszumanska.debian.org
Fri Jan 30 16:11:04 UTC 2015


This is an automated email from the git hooks/post-receive script.

terceiro pushed a commit to branch master
in repository redmine.

commit cedb8c676bac47c52c9bcec7de3dbe51c68b8ef6
Author: Antonio Terceiro <terceiro at debian.org>
Date:   Fri Jan 30 13:40:31 2015 -0200

    make example config for apache2-passenger-alias actually work
---
 debian/changelog                                 |  9 ++++++++
 debian/doc/examples/apache2-passenger-alias.conf |  4 ++++
 debian/tests/control                             | 10 ++++++---
 debian/tests/smoke-test                          | 26 +++++++-----------------
 4 files changed, 27 insertions(+), 22 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index f36fe0c..6bad6fb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+redmine (3.0~20140825-4) unstable; urgency=medium
+
+  * debian/doc/examples/apache2-passenger-alias.conf: updated example
+    configuration for Passenger setups under a sub-uri (e.g. /redmine) so that
+    it actually works.
+  * debian/tests/* also test apache2-passenger-alias case.
+
+ -- Antonio Terceiro <terceiro at debian.org>  Fri, 30 Jan 2015 14:04:38 -0200
+
 redmine (3.0~20140825-3) unstable; urgency=medium
 
   * debian/patches/avoid-crash-on-issues.diff: apply upstream patch to avoid
diff --git a/debian/doc/examples/apache2-passenger-alias.conf b/debian/doc/examples/apache2-passenger-alias.conf
index 91b7bab..3911794 100644
--- a/debian/doc/examples/apache2-passenger-alias.conf
+++ b/debian/doc/examples/apache2-passenger-alias.conf
@@ -10,6 +10,10 @@
     # apache2 serves public files
     Alias "/redmine/plugin_assets/" /var/cache/redmine/default/plugin_assets/
     Alias "/redmine" /usr/share/redmine/public
+    <Location /redmine>
+        PassengerBaseURI /redmine
+        PassengerAppRoot /usr/share/redmine
+    </Location>
     <Directory "/usr/share/redmine/public">
         Allow from all
         Options -MultiViews
diff --git a/debian/tests/control b/debian/tests/control
index 1e94396..a0aaddf 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -1,11 +1,15 @@
-Test-Command: debian/tests/smoke-test sqlite3
+Test-Command: debian/tests/smoke-test sqlite3 apache2-passenger-host /
 Depends: redmine-sqlite, redmine, apache2, libapache2-mod-passenger, curl
 Restrictions: needs-root
 
-Test-Command: debian/tests/smoke-test postgresql
+Test-Command: debian/tests/smoke-test postgresql apache2-passenger-host /
 Depends: postgresql, redmine-pgsql, redmine, apache2, libapache2-mod-passenger, curl
 Restrictions: needs-root
 
-Test-Command: debian/tests/smoke-test mysql2
+Test-Command: debian/tests/smoke-test mysql2 apache2-passenger-host /
 Depends: mysql-server, redmine-mysql, redmine, apache2, libapache2-mod-passenger, curl
 Restrictions: needs-root
+
+Test-Command: debian/tests/smoke-test sqlite3 apache2-passenger-alias /redmine
+Depends: redmine-sqlite, redmine, apache2, libapache2-mod-passenger, curl
+Restrictions: needs-root
diff --git a/debian/tests/smoke-test b/debian/tests/smoke-test
index 1110061..2e9e8e4 100755
--- a/debian/tests/smoke-test
+++ b/debian/tests/smoke-test
@@ -1,30 +1,18 @@
 #!/bin/sh
 
 dbadapter="${1:-sqlite3}"
-webserver="${2:-apache2-passenger}"
+setup="${2:-apache2-passenger-host}"
+uri="${3:-/}"
 
 exec 2>&1
 set -eux
 
 grep "adapter:[[:space:]]*$dbadapter" /etc/redmine/default/database.yml
 
-setup_apache2() {
-  sed -e '/<VirtualHost/ a ServerName localhost' /usr/share/doc/redmine/examples/$webserver-host.conf > /etc/apache2/sites-enabled/redmine.conf
-  service apache2 restart
-}
+a2enmod rewrite
 
-case "$webserver" in
-  apache2)
-    a2enmod rewrite
-    setup_apache2
-    ;;
-  apache2-passenger)
-    setup_apache2
-    ;;
-  *)
-    set +x
-    echo "Testing under $webserver not supported yet"
-    exit 1
-esac
+sed -e '/<VirtualHost/ a ServerName localhost' /usr/share/doc/redmine/examples/${setup}.conf > /etc/apache2/sites-enabled/redmine.conf
 
-curl -s http://localhost/ | grep 'meta.*name="description".*content="Redmine"'
+service apache2 restart
+
+curl -s http://localhost${uri} | grep 'meta.*name="description".*content="Redmine"'

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/redmine.git



More information about the Pkg-ruby-extras-commits mailing list