[Fusionforge-commits] FusionForge branch master updated. 817c49c7fd08ca506e9a123a9fcaf7f7f4ad4bbd

Roland Mas lolando at fusionforge.org
Wed Nov 7 16:26:44 CET 2012


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".

The branch, master has been updated
       via  817c49c7fd08ca506e9a123a9fcaf7f7f4ad4bbd (commit)
       via  9276e4bae7b35dfa8a9cba823da49a3c7383f688 (commit)
       via  f57afcec66205073e7f7ec39e681b9c2e696af64 (commit)
       via  891f86f4ba1fc15a2e0aa40758dab64bcf3c8f9d (commit)
       via  17e7326f2f835f42b4e99c86ac4d7cf9396435e7 (commit)
       via  93be0290a42aa05616861b649a8b244d7cf929d2 (commit)
       via  47e8c8400ce5688cefa32db56a8cc688d65f7321 (commit)
       via  23670e26a31baf300199da94105a3e99cdc4717e (commit)
      from  2136ec74a4543e25f6e9a51ffc28c49ebe451827 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 817c49c7fd08ca506e9a123a9fcaf7f7f4ad4bbd
Author: Roland Mas <lolando at debian.org>
Date:   Wed Nov 7 16:24:17 2012 +0100

    Let's be quiet there

diff --git a/tests/func/PluginsScmBzr/bzrTest.php b/tests/func/PluginsScmBzr/bzrTest.php
index afeb13a..ebf89f5 100644
--- a/tests/func/PluginsScmBzr/bzrTest.php
+++ b/tests/func/PluginsScmBzr/bzrTest.php
@@ -60,17 +60,17 @@ class ScmBzrTest extends FForge_SeleniumTestCase
 		$p = preg_replace(",/branchname$,", "", $p);
 
 		// Create a local branch, push it to the repo
-		$t = system("mktemp -d /tmp/bzrTest.XXXXXX");
-		system("cd $t && bzr init trunk &>/dev/null", $ret);
+		$t = exec("mktemp -d /tmp/bzrTest.XXXXXX");
+		system("cd $t && bzr init --quiet trunk >/dev/null", $ret);
 		$this->assertEquals($ret, 0);
 
 		system("echo 'this is a simple text' > $t/trunk/mytext.txt");
-		system("cd $t/trunk && bzr add --quiet &>/dev/null && bzr commit -m'Adding file' --quiet &>/dev/null", $ret);
+		system("cd $t/trunk && bzr add --quiet && bzr commit -m'Adding file' --quiet", $ret);
 		system("echo 'another simple text' >> $t/trunk/mytext.txt");
-		system("cd $t/trunk && bzr add --quiet &>/dev/null && bzr commit -m'Modifying file' --quiet &>/dev/null", $ret);
+		system("cd $t/trunk && bzr add --quiet && bzr commit -m'Modifying file' --quiet", $ret);
 		$this->assertEquals($ret, 0);
 
-		system("cd $t/trunk && BZR_PROGRESS_BAR=none bzr push --quiet $p/trunk &>/dev/null", $ret);
+		system("cd $t/trunk && bzr push --quiet $p/trunk", $ret);
 		$this->assertEquals($ret, 0);
 
 		$this->open(ROOT.'/scm/loggerhead/projecta');

commit 9276e4bae7b35dfa8a9cba823da49a3c7383f688
Author: Roland Mas <lolando at debian.org>
Date:   Wed Nov 7 16:19:22 2012 +0100

    Adding file

diff --git a/tests/func/PluginsScmBzr/bzrTest.php b/tests/func/PluginsScmBzr/bzrTest.php
index 5479ceb..afeb13a 100644
--- a/tests/func/PluginsScmBzr/bzrTest.php
+++ b/tests/func/PluginsScmBzr/bzrTest.php
@@ -61,16 +61,16 @@ class ScmBzrTest extends FForge_SeleniumTestCase
 
 		// Create a local branch, push it to the repo
 		$t = system("mktemp -d /tmp/bzrTest.XXXXXX");
-		system("cd $t && bzr init trunk >/dev/null", $ret);
+		system("cd $t && bzr init trunk &>/dev/null", $ret);
 		$this->assertEquals($ret, 0);
 
 		system("echo 'this is a simple text' > $t/trunk/mytext.txt");
-		system("cd $t/trunk && bzr add && bzr commit -m'Adding file'", $ret);
+		system("cd $t/trunk && bzr add --quiet &>/dev/null && bzr commit -m'Adding file' --quiet &>/dev/null", $ret);
 		system("echo 'another simple text' >> $t/trunk/mytext.txt");
-		system("cd $t/trunk && bzr add && bzr commit -m'Modifying file'", $ret);
+		system("cd $t/trunk && bzr add --quiet &>/dev/null && bzr commit -m'Modifying file' --quiet &>/dev/null", $ret);
 		$this->assertEquals($ret, 0);
 
-		system("cd $t/trunk && bzr push $p/trunk", $ret);
+		system("cd $t/trunk && BZR_PROGRESS_BAR=none bzr push --quiet $p/trunk &>/dev/null", $ret);
 		$this->assertEquals($ret, 0);
 
 		$this->open(ROOT.'/scm/loggerhead/projecta');

commit f57afcec66205073e7f7ec39e681b9c2e696af64
Author: Roland Mas <lolando at debian.org>
Date:   Wed Nov 7 15:35:23 2012 +0100

    Added testsuite for scmbzr plugin and loggerhead

diff --git a/tests/DEBDebian60Tests.php b/tests/DEBDebian60Tests.php
index 6d46a4f..a9cc97f 100644
--- a/tests/DEBDebian60Tests.php
+++ b/tests/DEBDebian60Tests.php
@@ -30,6 +30,7 @@ class DEBDebian60Tests
 		$suite->addTestFiles(glob("func/Forums/*Test.php"));
 		$suite->addTestFiles(glob("func/News/*Test.php"));
 		$suite->addTestFiles(glob("func/PluginsBlocks/*Test.php"));
+		$suite->addTestFiles(glob("func/PluginsScmBzr/*Test.php"));
 		$suite->addTestFiles(glob("func/PluginsScmGit/*Test.php"));
 		$suite->addTestFiles(glob("func/RBAC/*Test.php"));
 		$suite->addTestFiles(glob("func/Surveys/*Test.php"));
diff --git a/tests/DEBDebian70Tests.php b/tests/DEBDebian70Tests.php
index 92f8b57..07c393f 100644
--- a/tests/DEBDebian70Tests.php
+++ b/tests/DEBDebian70Tests.php
@@ -33,6 +33,7 @@ class DEBDebian60Tests
 		$suite->addTestFiles(glob("func/PluginsMediawiki/*Test.php"));
 		$suite->addTestFiles(glob("func/PluginsMoinMoin/*Test.php"));
 //		$suite->addTestFiles(glob("func/PluginsOnlineHelp/*Test.php"));
+		$suite->addTestFiles(glob("func/PluginsScmBzr/*Test.php"));
 		$suite->addTestFiles(glob("func/PluginsScmGit/*Test.php"));
 //		$suite->addTestFiles(glob("func/PluginsSvnTracker/*Test.php"));
 		$suite->addTestFiles(glob("func/RBAC/*Test.php"));
diff --git a/tests/RPMCentosTests.php b/tests/RPMCentosTests.php
index 96ec41b..1c841a8 100644
--- a/tests/RPMCentosTests.php
+++ b/tests/RPMCentosTests.php
@@ -29,6 +29,7 @@ class RPMCentosTests
 //		$suite->addTestFiles(glob("func/PluginsMediawiki/*Test.php"));
 //		$suite->addTestFiles(glob("func/PluginsMoinMoin/*Test.php"));
 		$suite->addTestFiles(glob("func/PluginsOnlineHelp/*Test.php"));
+//		$suite->addTestFiles(glob("func/PluginsScmBzr/*Test.php"));
 //		$suite->addTestFiles(glob("func/PluginsScmGit/*Test.php"));
 //		$suite->addTestFiles(glob("func/PluginsSvnTracker/*Test.php"));
 		$suite->addTestFiles(glob("func/RBAC/*Test.php"));
diff --git a/tests/TarCentosTests.php b/tests/TarCentosTests.php
index b124146..6a8c4e9 100755
--- a/tests/TarCentosTests.php
+++ b/tests/TarCentosTests.php
@@ -29,6 +29,7 @@ class TarCentosTests
 //		$suite->addTestFiles(glob("func/PluginsMediawiki/*Test.php"));
 //		$suite->addTestFiles(glob("func/PluginsMoinMoin/*Test.php"));
 		$suite->addTestFiles(glob("func/PluginsOnlineHelp/*Test.php"));
+//		$suite->addTestFiles(glob("func/PluginsScmBzr/*Test.php"));
 //		$suite->addTestFiles(glob("func/PluginsScmGit/*Test.php"));
 //		$suite->addTestFiles(glob("func/PluginsSvnTracker/*Test.php"));
 		$suite->addTestFiles(glob("func/RBAC/*Test.php"));
diff --git a/tests/func/PluginsScmBzr/bzrTest.php b/tests/func/PluginsScmBzr/bzrTest.php
new file mode 100644
index 0000000..5479ceb
--- /dev/null
+++ b/tests/func/PluginsScmBzr/bzrTest.php
@@ -0,0 +1,89 @@
+<?php
+/*
+ * Copyright (C) 2012 Roland Mas
+ *
+ * This file is part of FusionForge.
+ *
+ * FusionForge is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published
+ * by the Free Software Foundation; either version 2 of the License,
+ * or (at your option) any later version.
+ *      
+ * FusionForge is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */             
+
+require_once dirname(dirname(__FILE__)).'/Testing/SeleniumGforge.php';
+
+class ScmBzrTest extends FForge_SeleniumTestCase
+{
+	function testScmBzr()
+	{
+		$this->activatePlugin('scmbzr');
+		$this->populateStandardTemplate('empty');
+		$this->init();
+
+		$this->open(ROOT);
+		$this->clickAndWait("link=ProjectA");
+		$this->clickAndWait("link=Admin");
+		$this->clickAndWait("link=Tools");
+		$this->clickAndWait("link=Source Code Admin");
+		$this->click("//input[@name='scmradio' and @value='scmbzr']");
+		$this->clickAndWait("submit");
+	    
+		// Run the cronjob to create repositories
+		$this->cron("create_scm_repos.php");
+
+		// Check that the repo is present and Loggerhead shows it (even if empty)
+		$this->open(ROOT);
+		$this->clickAndWait("link=ProjectA");
+		$this->clickAndWait("link=SCM");
+
+		$this->open(ROOT.'/scm/loggerhead/');
+		$this->assertTextPresent("Browsing (root)");
+		$this->clickAndWait("link=projecta");
+		$this->assertTextPresent("Browsing (root)/projecta");
+
+		// Get the address of the repo
+		$this->open(ROOT);
+		$this->clickAndWait("link=ProjectA");
+		$this->clickAndWait("link=SCM");
+		$p = $this->getText("//tt[contains(.,'bzr checkout bzr+ssh')]");
+		$p = preg_replace(",^bzr checkout ,", "", $p);
+		$p = preg_replace(",://.*@,", "://root@", $p);
+		$p = preg_replace(",/branchname$,", "", $p);
+
+		// Create a local branch, push it to the repo
+		$t = system("mktemp -d /tmp/bzrTest.XXXXXX");
+		system("cd $t && bzr init trunk >/dev/null", $ret);
+		$this->assertEquals($ret, 0);
+
+		system("echo 'this is a simple text' > $t/trunk/mytext.txt");
+		system("cd $t/trunk && bzr add && bzr commit -m'Adding file'", $ret);
+		system("echo 'another simple text' >> $t/trunk/mytext.txt");
+		system("cd $t/trunk && bzr add && bzr commit -m'Modifying file'", $ret);
+		$this->assertEquals($ret, 0);
+
+		system("cd $t/trunk && bzr push $p/trunk", $ret);
+		$this->assertEquals($ret, 0);
+
+		$this->open(ROOT.'/scm/loggerhead/projecta');
+		$this->assertTextPresent("Browsing (root)/projecta");
+		$this->assertTextPresent("trunk");
+		$this->clickAndWait("link=trunk");
+		$this->assertTextPresent("Modifying file");
+		$this->assertTextNotPresent("Adding file");
+		$this->clickAndWait("link=Changes");
+		$this->assertTextPresent("Modifying file");
+		$this->assertTextPresent("Adding file");
+
+		system("rm -fr $t");
+	}
+}
+?>

commit 891f86f4ba1fc15a2e0aa40758dab64bcf3c8f9d
Author: Roland Mas <lolando at debian.org>
Date:   Wed Nov 7 14:19:51 2012 +0100

    Fewer calls to forge_get_config, and in a better place

diff --git a/src/plugins/scmbzr/bin/install.sh b/src/plugins/scmbzr/bin/install.sh
index ca9829b..5aef04e 100644
--- a/src/plugins/scmbzr/bin/install.sh
+++ b/src/plugins/scmbzr/bin/install.sh
@@ -3,15 +3,6 @@
 # Configure Loggerhead for FusionForge
 # Roland Mas
 
-PATH=/usr/share/gforge/bin:/usr/share/fusionforge/bin:$PATH
-source_path=`forge_get_config source_path`
-log_path=`forge_get_config log_path`
-data_path=`forge_get_config data_path`
-repos_path=$(forge_get_config repos_path scmbzr)
-web_host=$(forge_get_config web_host)
-url_prefix=$(forge_get_config url_prefix)
-
-
 set -e
 
 if [ `id -u` != 0 ] ; then
@@ -24,6 +15,11 @@ cachedir=/var/cache/gforge/loggerhead
 
 case "$1" in
     configure)
+	PATH=/usr/share/gforge/bin:/usr/share/fusionforge/bin:$PATH
+	repos_path=$(forge_get_config repos_path scmbzr)
+	web_host=$(forge_get_config web_host)
+	url_prefix=$(forge_get_config url_prefix)
+
 	a2enmod wsgi
 	if [ ! -e $configfile ] ; then
 	    mkdir -p $(dirname $configfile)

commit 17e7326f2f835f42b4e99c86ac4d7cf9396435e7
Author: Roland Mas <lolando at debian.org>
Date:   Wed Nov 7 14:18:41 2012 +0100

    Prettify URLs

diff --git a/src/etc/httpd.conf.d/plugin-scmbzr.inc b/src/etc/httpd.conf.d/plugin-scmbzr.inc
index dabfc62..55d7433 100644
--- a/src/etc/httpd.conf.d/plugin-scmbzr.inc
+++ b/src/etc/httpd.conf.d/plugin-scmbzr.inc
@@ -1,10 +1,10 @@
-Alias {core/url_prefix}/scm/loggerhead/static /usr/share/loggerhead/static
+Alias {core/url_prefix}scm/loggerhead/static /usr/share/loggerhead/static
 RewriteEngine On
-RewriteRule ^{core/url_prefix}/scm/loggerhead$ {core/url_prefix}/scm/loggerhead/ [R]
+RewriteRule ^{core/url_prefix}scm/loggerhead$ {core/url_prefix}scm/loggerhead/ [R]
 
-WSGIScriptAlias {core/url_prefix}/scm/loggerhead /usr/bin/loggerhead.wsgi
+WSGIScriptAlias {core/url_prefix}scm/loggerhead /usr/bin/loggerhead.wsgi
 
-<Location {core/url_prefix}/scm/loggerhead>
+<Location {core/url_prefix}scm/loggerhead>
     WSGIProcessGroup fusionforge-plugin-scmbzr
     Order deny,allow
     Allow from all
diff --git a/src/plugins/scmbzr/bin/install.sh b/src/plugins/scmbzr/bin/install.sh
index a10d69c..ca9829b 100644
--- a/src/plugins/scmbzr/bin/install.sh
+++ b/src/plugins/scmbzr/bin/install.sh
@@ -30,10 +30,10 @@ case "$1" in
 	    cat > $configfile <<EOF
 # Directory to serve bzr branches from
 # Non-bzr directories under this path will also be visible in loggerhead
-http_root_dir = '$repos_path'
+http_root_dir = '${repos_path}'
 
 # The url prefix for the bzr branches.
-http_user_prefix = 'http://$web_host/$url_prefix/scm/loggerhead'
+http_user_prefix = 'http://${web_host}${url_prefix}scm/loggerhead'
 
 # Directory to put cache files in
 http_sql_dir = '/var/cache/gforge/loggerhead'

commit 93be0290a42aa05616861b649a8b244d7cf929d2
Author: Roland Mas <lolando at debian.org>
Date:   Wed Nov 7 14:01:03 2012 +0100

    Require python-pastedeploy for loggerhead

diff --git a/src/plugins/scmbzr/packaging/control/132plugin-scmbzr b/src/plugins/scmbzr/packaging/control/132plugin-scmbzr
index 73393b2..ada2cb8 100644
--- a/src/plugins/scmbzr/packaging/control/132plugin-scmbzr
+++ b/src/plugins/scmbzr/packaging/control/132plugin-scmbzr
@@ -1,6 +1,6 @@
 Package: @PACKAGE at -plugin-scmbzr
 Architecture: all
-Depends: @OLDPACKAGE at -common, @OLDPACKAGE at -db-postgresql | @OLDPACKAGE at -db, @OLDPACKAGE at -web-apache2 | @OLDPACKAGE at -web, @OLDPACKAGE at -shell-postgresql | @OLDPACKAGE at -shell, bzr, php5-cli, ${misc:Depends}, libapache2-mod-wsgi, loggerhead (>= 1.19~bzr477~)
+Depends: @OLDPACKAGE at -common, @OLDPACKAGE at -db-postgresql | @OLDPACKAGE at -db, @OLDPACKAGE at -web-apache2 | @OLDPACKAGE at -web, @OLDPACKAGE at -shell-postgresql | @OLDPACKAGE at -shell, bzr, php5-cli, ${misc:Depends}, libapache2-mod-wsgi, loggerhead (>= 1.19~bzr477~), python-pastedeploy
 Provides: @PACKAGE at -plugin-scm, @OLDPACKAGE at -plugin-scmbzr
 Conflicts: @OLDPACKAGE at -plugin-scmbzr
 Replaces: @OLDPACKAGE at -plugin-scmbzr

commit 47e8c8400ce5688cefa32db56a8cc688d65f7321
Author: Roland Mas <lolando at debian.org>
Date:   Wed Nov 7 14:00:50 2012 +0100

    Load wsgi module

diff --git a/src/plugins/scmbzr/bin/install.sh b/src/plugins/scmbzr/bin/install.sh
index b33b7aa..a10d69c 100644
--- a/src/plugins/scmbzr/bin/install.sh
+++ b/src/plugins/scmbzr/bin/install.sh
@@ -24,6 +24,7 @@ cachedir=/var/cache/gforge/loggerhead
 
 case "$1" in
     configure)
+	a2enmod wsgi
 	if [ ! -e $configfile ] ; then
 	    mkdir -p $(dirname $configfile)
 	    cat > $configfile <<EOF

commit 23670e26a31baf300199da94105a3e99cdc4717e
Author: Roland Mas <lolando at debian.org>
Date:   Wed Nov 7 12:11:26 2012 +0100

    Start using Loggerhead as WSGI rather than as a daemon

diff --git a/src/debian/dsf-in/plugin-scmbzr.init.d b/src/debian/dsf-in/plugin-scmbzr.init.d
deleted file mode 100644
index 358c16a..0000000
--- a/src/debian/dsf-in/plugin-scmbzr.init.d
+++ /dev/null
@@ -1,66 +0,0 @@
-#! /bin/sh
-### BEGIN INIT INFO
-# Provides:          @OLDPACKAGE at -plugin-scmbzr
-# Required-Start:    $local_fs $remote_fs $network
-# Required-Stop:     $local_fs $remote_fs $network
-# Default-Start:     2 3 4 5
-# Default-Stop:      0 1 6
-### END INIT INFO
-#
-# Init script for @OLDPACKAGE at -plugin-scmbzr Debian package.
-# Based on the script provided by loggerhead.
-
-PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
-DESC="Loggerhead Bazaar Branch Browser for @FORGENAME@"
-NAME=@OLDPACKAGE at -plugin-scmbzr
-PIDFILE=/var/run/$NAME.pid
-SCRIPTNAME=/etc/init.d/$NAME
-
-# Gracefully exit if the package has been removed.
-[ -x /usr/bin/serve-branches ] || exit 0
-
-# Check if configuration file is present
-[ ! -f @CONFIG_PATH@/plugins/scmbzr/serve-branches.conf ] && exit 0
-
-. @CONFIG_PATH@/plugins/scmbzr/serve-branches.conf
-
-#
-#	Function that starts the daemon/service.
-#
-d_start() {
-    start-stop-daemon -p $PIDFILE -S --startas /usr/bin/serve-branches --chuid loggerhead --make-pidfile --background --chdir $served_branches -- --prefix=$prefix --port=$port --log-folder /var/log/loggerhead 2>/dev/null
-}
-
-#
-#	Function that stops the daemon/service.
-#
-d_stop() {
-	start-stop-daemon -p $PIDFILE -K
-}
-
-
-case "$1" in
-  start)
-	echo -n "Starting $DESC: $NAME"
-	d_start
-	echo "."
-	;;
-  stop)
-	echo -n "Stopping $DESC: $NAME"
-	d_stop
-	echo "."
-	;;
-  restart|force-reload)
-	echo -n "Restarting $DESC: $NAME"
-	d_stop
-	sleep 1
-	d_start
-	echo "."
-	;;
-  *)
-	echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
-	exit 1
-	;;
-esac
-
-exit 0
diff --git a/src/etc/httpd.conf.d/50-wsgi-scmbzr.conf b/src/etc/httpd.conf.d/50-wsgi-scmbzr.conf
new file mode 100644
index 0000000..74eaaf6
--- /dev/null
+++ b/src/etc/httpd.conf.d/50-wsgi-scmbzr.conf
@@ -0,0 +1,3 @@
+<IfModule wsgi_module>
+  WSGIDaemonProcess fusionforge-plugin-scmbzr user=gforge group=gforge processes=4 maximum-requests=1000 display-name=fusionforge-plugin-scmbzr
+</IfModule>
diff --git a/src/etc/httpd.conf.d/plugin-scmbzr.inc b/src/etc/httpd.conf.d/plugin-scmbzr.inc
index b2bc8b3..dabfc62 100644
--- a/src/etc/httpd.conf.d/plugin-scmbzr.inc
+++ b/src/etc/httpd.conf.d/plugin-scmbzr.inc
@@ -1,8 +1,11 @@
-<Proxy http://127.0.0.1:8081/*>
-  Allow from all
-</Proxy>
+Alias {core/url_prefix}/scm/loggerhead/static /usr/share/loggerhead/static
+RewriteEngine On
+RewriteRule ^{core/url_prefix}/scm/loggerhead$ {core/url_prefix}/scm/loggerhead/ [R]
 
-<Location {core/url_prefix}scm/loggerhead/>
-  ProxyPass http://127.0.0.1:8081/
-  ProxyPassReverse http://127.0.0.1:8081/
+WSGIScriptAlias {core/url_prefix}/scm/loggerhead /usr/bin/loggerhead.wsgi
+
+<Location {core/url_prefix}/scm/loggerhead>
+    WSGIProcessGroup fusionforge-plugin-scmbzr
+    Order deny,allow
+    Allow from all
 </Location>
diff --git a/src/plugins/scmbzr/bin/install.sh b/src/plugins/scmbzr/bin/install.sh
new file mode 100644
index 0000000..b33b7aa
--- /dev/null
+++ b/src/plugins/scmbzr/bin/install.sh
@@ -0,0 +1,53 @@
+#! /bin/sh
+# 
+# Configure Loggerhead for FusionForge
+# Roland Mas
+
+PATH=/usr/share/gforge/bin:/usr/share/fusionforge/bin:$PATH
+source_path=`forge_get_config source_path`
+log_path=`forge_get_config log_path`
+data_path=`forge_get_config data_path`
+repos_path=$(forge_get_config repos_path scmbzr)
+web_host=$(forge_get_config web_host)
+url_prefix=$(forge_get_config url_prefix)
+
+
+set -e
+
+if [ `id -u` != 0 ] ; then
+    echo "You must be root to run this, please enter passwd"
+    exec su -c "$0 $1"
+fi
+
+configfile=~gforge/.bazaar/bazaar.conf
+cachedir=/var/cache/gforge/loggerhead
+
+case "$1" in
+    configure)
+	if [ ! -e $configfile ] ; then
+	    mkdir -p $(dirname $configfile)
+	    cat > $configfile <<EOF
+# Directory to serve bzr branches from
+# Non-bzr directories under this path will also be visible in loggerhead
+http_root_dir = '$repos_path'
+
+# The url prefix for the bzr branches.
+http_user_prefix = 'http://$web_host/$url_prefix/scm/loggerhead'
+
+# Directory to put cache files in
+http_sql_dir = '/var/cache/gforge/loggerhead'
+EOF
+	    mkdir -p $cachedir
+	    chown gforge $cachedir
+	fi
+        ;;
+
+    purge)
+	rm -rf $configfile $cachedir
+	rmdir $(dirname $configfile) || true
+        ;;
+
+    *)
+        echo "Usage: $0 {configure|purge}"
+        exit 1
+esac
diff --git a/src/plugins/scmbzr/packaging/control/132plugin-scmbzr b/src/plugins/scmbzr/packaging/control/132plugin-scmbzr
index a27d085..73393b2 100644
--- a/src/plugins/scmbzr/packaging/control/132plugin-scmbzr
+++ b/src/plugins/scmbzr/packaging/control/132plugin-scmbzr
@@ -1,6 +1,6 @@
 Package: @PACKAGE at -plugin-scmbzr
 Architecture: all
-Depends: @OLDPACKAGE at -common, @OLDPACKAGE at -db-postgresql | @OLDPACKAGE at -db, @OLDPACKAGE at -web-apache2 | @OLDPACKAGE at -web, @OLDPACKAGE at -shell-postgresql | @OLDPACKAGE at -shell, bzr, php5-cli, ${misc:Depends}
+Depends: @OLDPACKAGE at -common, @OLDPACKAGE at -db-postgresql | @OLDPACKAGE at -db, @OLDPACKAGE at -web-apache2 | @OLDPACKAGE at -web, @OLDPACKAGE at -shell-postgresql | @OLDPACKAGE at -shell, bzr, php5-cli, ${misc:Depends}, libapache2-mod-wsgi, loggerhead (>= 1.19~bzr477~)
 Provides: @PACKAGE at -plugin-scm, @OLDPACKAGE at -plugin-scmbzr
 Conflicts: @OLDPACKAGE at -plugin-scmbzr
 Replaces: @OLDPACKAGE at -plugin-scmbzr
diff --git a/src/plugins/scmbzr/packaging/install/plugin-scmbzr b/src/plugins/scmbzr/packaging/install/plugin-scmbzr
index 283e4da..798cfc1 100644
--- a/src/plugins/scmbzr/packaging/install/plugin-scmbzr
+++ b/src/plugins/scmbzr/packaging/install/plugin-scmbzr
@@ -1,3 +1,4 @@
+plugins/scmbzr/bin/*                 @PLUGIN_PATH@/scmbzr/bin/
 plugins/scmbzr/common/*              @PLUGIN_PATH@/scmbzr/common/
 plugins/scmbzr/etc/plugins/scmbzr/*  etc/gforge/plugins/scmbzr/
 plugins/scmbzr/etc/*.ini 	     etc/@PACKAGE@/config.ini.d/

-----------------------------------------------------------------------

Summary of changes:
 src/debian/dsf-in/plugin-scmbzr.init.d             |   66 ---------------
 src/etc/httpd.conf.d/50-wsgi-scmbzr.conf           |    3 +
 src/etc/httpd.conf.d/plugin-scmbzr.inc             |   15 ++--
 src/plugins/scmbzr/bin/install.sh                  |   50 +++++++++++
 .../scmbzr/packaging/control/132plugin-scmbzr      |    2 +-
 src/plugins/scmbzr/packaging/install/plugin-scmbzr |    1 +
 tests/DEBDebian60Tests.php                         |    1 +
 tests/DEBDebian70Tests.php                         |    1 +
 tests/RPMCentosTests.php                           |    1 +
 tests/TarCentosTests.php                           |    1 +
 tests/func/PluginsScmBzr/bzrTest.php               |   89 ++++++++++++++++++++
 11 files changed, 157 insertions(+), 73 deletions(-)
 delete mode 100644 src/debian/dsf-in/plugin-scmbzr.init.d
 create mode 100644 src/etc/httpd.conf.d/50-wsgi-scmbzr.conf
 create mode 100644 src/plugins/scmbzr/bin/install.sh
 create mode 100644 tests/func/PluginsScmBzr/bzrTest.php


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list