[Fusionforge-commits] FusionForge branch GUM updated. ba8cf0fc49beff7f3d301c77a77e87d94bbc4826

Sylvain Beucler beuc-inria at fusionforge.org
Tue Aug 26 20:18:26 CEST 2014


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, GUM has been updated
       via  ba8cf0fc49beff7f3d301c77a77e87d94bbc4826 (commit)
       via  14f18bde982de6b5e1ecefc7bdbe22492abeaf9c (commit)
       via  e5396bdb61708301a7c63a813b07f27a6d2991b4 (commit)
       via  0da0cb90a0fc6e03f14b6f70514097735fc7892d (commit)
      from  c884fd624dcfc77ecb05738add16e7244aceeb4a (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 ba8cf0fc49beff7f3d301c77a77e87d94bbc4826
Author: Sylvain Beucler <sylvain.beucler at inria.fr>
Date:   Tue Aug 26 20:13:34 2014 +0200

    install: lots of structural changes to get plugin-scmbzr and rpms to better pass the testsuite

diff --git a/src/GNUmakefile b/src/GNUmakefile
index ded53cc..24e57e4 100644
--- a/src/GNUmakefile
+++ b/src/GNUmakefile
@@ -83,9 +83,6 @@ install-plugin-%: plugins/% install-base-dirs
 	if [ -d plugins/$*/etc/plugins/$* ]; then \
 		$(CP_R) --no-clobber plugins/$*/etc/plugins/$* $(DESTDIR)$(config_path)/plugins/; \
 	fi
-	if [ -d plugins/$*/etc/httpd.conf.d ]; then \
-		$(CP_R) --no-clobber plugins/$*/etc/httpd.conf.d/* $(DESTDIR)$(config_path)/httpd.conf.d/; \
-	fi
 	if [ -d plugins/$*/etc/cron.d ]; then \
 		$(CP_R) --no-clobber plugins/$*/etc/cron.d/* $(DESTDIR)$(sysconfdir)/cron.d/; \
 	fi
@@ -112,7 +109,7 @@ PLUGINS_INSTALLED:=$(shell ls $(fgc_source_path)/plugins 2>/dev/null)
 PLUGINS_POST_INSTALL_TARGETS=$(addprefix post-install-plugin-,$(PLUGINS_INSTALLED))
 post-install-plugins: $(PLUGINS_POST_INSTALL_TARGETS)
 post-install-plugin-%: $(fgc_source_path)/plugins/%/
-	$(fgc_source_path)/post-install.d/common/plugin.sh $*
+	$(fgc_source_path)/post-install.d/common/plugin.sh $* configure
 
 
 ## TODO: make uninstall? make purge?
diff --git a/src/common/include/env.inc.php b/src/common/include/env.inc.php
index b92d83c..dbcb917 100644
--- a/src/common/include/env.inc.php
+++ b/src/common/include/env.inc.php
@@ -100,6 +100,7 @@ $include_path = join(PATH_SEPARATOR,
 		$fusionforge_basedir.'/vendor',
 		'.',
 		'/usr/share/php',
+		'/usr/share/php/htmlpurifier',
 		'/usr/share/pear'
 	)
 );
diff --git a/src/debian/control b/src/debian/control
index 1afd4c7..48ac916 100644
--- a/src/debian/control
+++ b/src/debian/control
@@ -12,9 +12,9 @@ Vcs-Browser: https://fusionforge.org/scm/browser.php?group_id=9
 
 Package: fusionforge
 Architecture: all
-Depends: fusionforge-common (=${source:Version}), fusionforge-web, ${misc:Depends}
+Depends: fusionforge-common (=${source:Version}), fusionforge-db-local, fusionforge-web, ${misc:Depends}
 Recommends: fusionforge-shell, fusionforge-plugin-scmsvn
-Suggests: fusionforge-plugin-mediawiki
+Suggests: fusionforge-plugin-mediawiki, fusionforge-plugin-moinmoin
 Description: FusionForge collaborative development tool - standard metapackage
  FusionForge provides many tools to aid collaboration in a
  development project, such as bug-tracking, task management,
@@ -28,7 +28,7 @@ Description: FusionForge collaborative development tool - standard metapackage
 
 Package: fusionforge-common
 Architecture: all
-Depends: php5-cli, php5-pgsql, php-htmlpurifier, perl, ${misc:Depends}
+Depends: php5-cli, php5-pgsql, php-htmlpurifier, cron, perl, ${misc:Depends}
 Description: collaborative development tool - shared files
  FusionForge provides many tools to aid collaboration in a
  development project, such as bug-tracking, task management,
@@ -40,7 +40,7 @@ Description: collaborative development tool - shared files
  subpackages.
 
 
-Package: fusionforge-db
+Package: fusionforge-db-local
 Architecture: all
 Depends: fusionforge-common (=${source:Version}), postgresql, php5-cli, ${misc:Depends}
 Description: collaborative development tool - database (using PostgreSQL)
@@ -102,7 +102,7 @@ Description: collaborative development tool - shell accounts (using PostgreSQL)
 
 Package: fusionforge-plugin-authhttpd
 Architecture: all
-Depends: fusionforge-web, ${misc:Depends}
+Depends: fusionforge-web (=${source:Version}), ${misc:Depends}
 Description: collaborative development tool - HTTPD authentication plugin
  FusionForge provides many tools to aid collaboration in a
  development project, such as bug-tracking, task management,
@@ -115,9 +115,39 @@ Description: collaborative development tool - HTTPD authentication plugin
  FusionForge, for instance where Kerberos is used.
 
 
+Package: fusionforge-plugin-scmsvn
+Architecture: all
+Depends: fusionforge-web (=${source:Version}), subversion, subversion-tools, php5-cli, openbsd-inetd | inet-superserver, update-inetd, ${misc:Depends}
+Description: collaborative development tool - Subversion plugin
+ FusionForge provides many tools to aid collaboration in a
+ development project, such as bug-tracking, task management,
+ mailing-lists, SCM repository, forums, support request helper,
+ web/FTP hosting, release management, etc. All these services are
+ integrated into one web site and managed through a web interface.
+ .
+ This plugin contains the Subversion subsystem of FusionForge. It allows
+ each FusionForge project to have its own Subversion repository, and gives
+ some control over it to the project's administrator.
+
+
+Package: fusionforge-plugin-scmbzr
+Architecture: all
+Depends: fusionforge-web (=${source:Version}), bzr, php5-cli, libapache2-mod-wsgi, loggerhead (>= 1.19~bzr477~), python-pastedeploy, ${misc:Depends}
+Description: collaborative development tool - Bazaar plugin
+ FusionForge provides many tools to aid collaboration in a
+ development project, such as bug-tracking, task management,
+ mailing-lists, SCM repository, forums, support request helper,
+ web/FTP hosting, release management, etc. All these services are
+ integrated into one web site and managed through a web interface.
+ .
+ This plugin contains the Bazaar subsystem of FusionForge. It allows each
+ FusionForge project to have its own Bazaar repository, and gives some control
+ over it to the project's administrator.
+
+
 Package: fusionforge-plugin-mediawiki
 Architecture: all
-Depends: fusionforge-web, mediawiki (>= 1:1.19.1-2~exp2), php5-cli, ${misc:Depends}
+Depends: fusionforge-web (=${source:Version}), mediawiki (>= 1:1.19.1-2~exp2), php5-cli, ${misc:Depends}
 Description: collaborative development tool - Mediawiki plugin
  FusionForge provides many tools to aid collaboration in a
  development project, such as bug-tracking, task management,
@@ -128,16 +158,14 @@ Description: collaborative development tool - Mediawiki plugin
  This plugin allows each project to embed Mediawiki under a tab.
 
 
-Package: fusionforge-plugin-scmsvn
+Package: fusionforge-plugin-moinmoin
 Architecture: all
-Depends: fusionforge-web, subversion, subversion-tools, php5-cli, openbsd-inetd | inet-superserver, update-inetd, ${misc:Depends}
-Description: collaborative development tool - Subversion plugin
+Depends: fusionforge-web (=${source:Version}), python-moinmoin, python-psycopg2, libapache2-mod-wsgi, ${misc:Depends}
+Description: collaborative development tool - MoinMoinWiki plugin
  FusionForge provides many tools to aid collaboration in a
  development project, such as bug-tracking, task management,
  mailing-lists, SCM repository, forums, support request helper,
  web/FTP hosting, release management, etc. All these services are
  integrated into one web site and managed through a web interface.
  .
- This plugin contains the Subversion subsystem of FusionForge. It allows
- each FusionForge project to have its own Subversion repository, and gives
- some control over it to the project's administrator.
+ This plugin allows each project to embed MoinMoinWiki under a tab.
diff --git a/src/debian/fusionforge-common.postinst b/src/debian/fusionforge-common.postinst
index 346c379..3959636 100644
--- a/src/debian/fusionforge-common.postinst
+++ b/src/debian/fusionforge-common.postinst
@@ -20,7 +20,7 @@ set -e
 
 case "$1" in
     configure)
-        $(forge_get_config source_path)/post-install.d/common/ini.sh
+        $(forge_get_config source_path)/post-install.d/common/common.sh
     ;;
 
     abort-upgrade|abort-remove|abort-deconfigure)
diff --git a/src/debian/fusionforge-db.postinst b/src/debian/fusionforge-db-local.postinst
similarity index 100%
copy from src/debian/fusionforge-db.postinst
copy to src/debian/fusionforge-db-local.postinst
diff --git a/src/debian/fusionforge-db.postinst b/src/debian/fusionforge-plugin-scmbzr.postinst
similarity index 91%
rename from src/debian/fusionforge-db.postinst
rename to src/debian/fusionforge-plugin-scmbzr.postinst
index 54797d7..3410bda 100644
--- a/src/debian/fusionforge-db.postinst
+++ b/src/debian/fusionforge-plugin-scmbzr.postinst
@@ -20,7 +20,7 @@ set -e
 
 case "$1" in
     configure)
-        $(forge_get_config source_path)/post-install.d/db/db.sh
+        $(forge_get_config source_path)/post-install.d/common/plugin.sh scmbzr configure
     ;;
 
     abort-upgrade|abort-remove|abort-deconfigure)
diff --git a/src/debian/fusionforge-plugin-scmbzr.prerm b/src/debian/fusionforge-plugin-scmbzr.prerm
new file mode 100644
index 0000000..03fa917
--- /dev/null
+++ b/src/debian/fusionforge-plugin-scmbzr.prerm
@@ -0,0 +1,42 @@
+#!/bin/sh
+# prerm script for fusionforge
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <prerm> `remove'
+#        * <old-prerm> `upgrade' <new-version>
+#        * <new-prerm> `failed-upgrade' <old-version>
+#        * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
+#        * <deconfigured's-prerm> `deconfigure' `in-favour'
+#          <package-being-installed> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+    remove)
+        $(forge_get_config source_path)/post-install.d/common/plugin.sh scmbzr remove
+    ;;
+
+    upgrade|deconfigure)
+    ;;
+
+    failed-upgrade)
+    ;;
+
+    *)
+        echo "prerm called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
diff --git a/src/debian/rules b/src/debian/rules
index aa38aa7..b09b1b5 100755
--- a/src/debian/rules
+++ b/src/debian/rules
@@ -23,9 +23,10 @@ include /usr/share/dpkg/default.mk
 
 override_dh_auto_install:
 	make install-common prefix=/usr DESTDIR=$(CURDIR)/debian/fusionforge-common
-	make install-db     prefix=/usr DESTDIR=$(CURDIR)/debian/fusionforge-db
+	make install-db     prefix=/usr DESTDIR=$(CURDIR)/debian/fusionforge-db-local
 	make install-shell  prefix=/usr DESTDIR=$(CURDIR)/debian/fusionforge-shell
 	make install-web    prefix=/usr DESTDIR=$(CURDIR)/debian/fusionforge-web
 	make install-plugin-authhttpd prefix=/usr DESTDIR=$(CURDIR)/debian/fusionforge-plugin-authhttpd
 	make install-plugin-mediawiki prefix=/usr DESTDIR=$(CURDIR)/debian/fusionforge-plugin-mediawiki
 	make install-plugin-scmsvn    prefix=/usr DESTDIR=$(CURDIR)/debian/fusionforge-plugin-scmsvn
+	make install-plugin-scmbzr    prefix=/usr DESTDIR=$(CURDIR)/debian/fusionforge-plugin-scmbzr
diff --git a/src/etc/config.ini.d/defaults.ini b/src/etc/config.ini.d/defaults.ini
index 8f704d6..8f92a16 100644
--- a/src/etc/config.ini.d/defaults.ini
+++ b/src/etc/config.ini.d/defaults.ini
@@ -86,3 +86,4 @@ use_webdav = no
 user_default_shell = "/bin/bash"
 
 scm_single_host = yes
+system_user=fusionforge
diff --git a/src/fusionforge.spec b/src/fusionforge.spec
index 2b795eb..bbb47b3 100644
--- a/src/fusionforge.spec
+++ b/src/fusionforge.spec
@@ -8,7 +8,7 @@ BuildArch: noarch
 License: GPLv2+
 URL: http://www.fusionforge.org/
 Source0: http://fusionforge.org/frs/download.php/file/XX/%{name}-%{version}.tar.bz2
-Requires: %{name}-standard
+Requires: %{name}-db-local = %{version}  %{name}-web = %{version}
 
 %description
 FusionForge provides many tools to aid collaboration in a
@@ -16,6 +16,8 @@ development project, such as bug-tracking, task management,
 mailing-lists, SCM repository, forums, support request helper,
 web/FTP hosting, release management, etc. All these services are
 integrated into one web site and managed through a web interface.
+
+This metapackage installs a stand-alone FusionForge site.
 %files
 
 
@@ -49,35 +51,25 @@ install_listfiles common
 (cd %{buildroot} && \
     find .%{_sysconfdir}/%{name} .%{_datadir}/%{name} -type d \
     | sed -e 's,^.,%dir ,'
-    echo %dir %{_localstatedir}/lib/%{name} ) >> common.rpmfiles
+    echo %dir %{_localstatedir}/lib/%{name}  # avoid duplicate dir in all package
+    echo %dir %{_localstatedir}/log/%{name}  # only exists in -common, warning otherwise
+) >> common.rpmfiles
 %find_lang %{name}
 # Install plugins
 install_listfiles db
 install_listfiles shell
 install_listfiles web
 install_listfiles plugin-authhttpd
-install_listfiles plugin-mediawiki
 install_listfiles plugin-scmsvn
+install_listfiles plugin-scmbzr
+install_listfiles plugin-mediawiki
+install_listfiles plugin-moinmoin
 
 
 
-%package standard
-Summary: FusionForge collaborative development tool - standard metapackage
-Requires: %{name}-db %{name}-web
-%description standard
-FusionForge provides many tools to aid collaboration in a
-development project, such as bug-tracking, task management,
-mailing-lists, SCM repository, forums, support request helper,
-web/FTP hosting, release management, etc. All these services are
-integrated into one web site and managed through a web interface.
-
-This metapackage installs a standard FusionForge site.
-%files standard
-
-
 %package common
 Summary: collaborative development tool - shared files
-Requires: php-cli
+Requires: php-cli php-pgsql php-htmlpurifier-htmlpurifier cronie
 %description common
 FusionForge provides many tools to aid collaboration in a
 development project, such as bug-tracking, task management,
@@ -91,13 +83,13 @@ subpackages.
 %doc AUTHORS* CHANGES COPYING INSTALL.TXT NEWS README
 %doc docs/*
 %post common
-%{_datadir}/%{name}/post-install.d/common/ini.sh
+%{_datadir}/%{name}/post-install.d/common/common.sh
 
 
-%package db
+%package db-local
 Summary: collaborative development tool - database (using PostgreSQL)
-Requires: %{name}-common >= %{version} postgresql-server php-pgsql
-%description db
+Requires: %{name}-common = %{version} postgresql-server
+%description db-local
 FusionForge provides many tools to aid collaboration in a
 development project, such as bug-tracking, task management,
 mailing-lists, SCM repository, forums, support request helper,
@@ -106,8 +98,8 @@ integrated into one web site and managed through a web interface.
 
 This package installs, configures and maintains the FusionForge
 database.
-%files db -f db.rpmfiles
-%post db
+%files db-local -f db.rpmfiles
+%post db-local
 %{_datadir}/%{name}/post-install.d/db/db.sh
 
 
@@ -130,7 +122,7 @@ installs (e.g. plugins activation requires a populated db).
 
 %package shell
 Summary: collaborative development tool - shell accounts (using PostgreSQL)
-Requires: %{name}-common >= %{version} php openssh-server nscd
+Requires: %{name}-common = %{version} php openssh-server nscd
 #Requires: libnss-pgsql  # Fedora-only?
 %description shell
 FusionForge provides many tools to aid collaboration in a
@@ -153,7 +145,7 @@ fi
 
 %package web
 Summary: collaborative development tool - web part (using Apache)
-Requires: %{name}-common >= %{version} %{name}-db >= %{version} httpd mod_ssl php php-pgsql
+Requires: %{name}-common = %{version} %{name}-db = %{version} httpd mod_ssl php php-pgsql
 %description web
 FusionForge provides many tools to aid collaboration in a
 development project, such as bug-tracking, task management,
@@ -171,7 +163,7 @@ FusionForge on an Apache webserver.
 %package plugin-authhttpd
 Summary: collaborative development tool - HTTPD authentication plugin
 Group: Development/Tools
-Requires: %{name}-web >= %{version}
+Requires: %{name}-web = %{version}
 %description plugin-authhttpd
 FusionForge provides many tools to aid collaboration in a
 development project, such as bug-tracking, task management,
@@ -184,13 +176,15 @@ FusionForge. It allows Apache authentication to be reused for
 FusionForge, for instance where Kerberos is used.
 %files plugin-authhttpd -f plugin-authhttpd.rpmfiles
 %post plugin-authhttpd
-%{_datadir}/%{name}/post-install.d/plugin.sh authhttpd
+%{_datadir}/%{name}/post-install.d/common/plugin.sh authhttpd configure
+%preun plugin-authhttpd
+%{_datadir}/%{name}/post-install.d/common/plugin.sh authhttpd remove
 
 
 %package plugin-mediawiki
 Summary: collaborative development tool - Mediawiki plugin
 Group: Development/Tools
-Requires: %{name}-web >= %{version} mediawiki
+Requires: %{name}-web = %{version} mediawiki
 %description plugin-mediawiki
 FusionForge provides many tools to aid collaboration in a
 development project, such as bug-tracking, task management,
@@ -201,13 +195,15 @@ integrated into one web site and managed through a web interface.
 This plugin allows each project to embed Mediawiki under a tab.
 %files plugin-mediawiki -f plugin-mediawiki.rpmfiles
 %post plugin-mediawiki
-%{_datadir}/%{name}/post-install.d/plugin.sh mediawiki
+%{_datadir}/%{name}/post-install.d/common/plugin.sh mediawiki configure
+%preun plugin-mediawiki
+%{_datadir}/%{name}/post-install.d/common/plugin.sh mediawiki remove
 
 
 %package plugin-scmsvn
 Summary: collaborative development tool - Subversion plugin
 Group: Development/Tools
-Requires: %{name}-web >= %{version} subversion
+Requires: %{name}-web = %{version} subversion
 %description plugin-scmsvn
 FusionForge provides many tools to aid collaboration in a
 development project, such as bug-tracking, task management,
@@ -220,7 +216,49 @@ each FusionForge project to have its own Subversion repository, and gives
 some control over it to the project's administrator.
 %files plugin-scmsvn -f plugin-scmsvn.rpmfiles
 %post plugin-scmsvn
-%{_datadir}/%{name}/post-install.d/plugin.sh scmsvn
+%{_datadir}/%{name}/post-install.d/common/plugin.sh scmsvn configure
+%preun plugin-scmsvn
+%{_datadir}/%{name}/post-install.d/common/plugin.sh scmsvn remove
+
+
+%package plugin-scmbzr
+Summary: collaborative development tool - Bazaar plugin
+Group: Development/Tools
+Requires: %{name}-web = %{version} bazaar mod_wsgi loggerhead
+%description plugin-scmbzr
+FusionForge provides many tools to aid collaboration in a
+development project, such as bug-tracking, task management,
+mailing-lists, SCM repository, forums, support request helper,
+web/FTP hosting, release management, etc. All these services are
+integrated into one web site and managed through a web interface.
+
+This plugin contains the Bazaar subsystem of FusionForge. It allows each
+FusionForge project to have its own Bazaar repository, and gives some control
+over it to the project's administrator.
+%files plugin-scmbzr -f plugin-scmbzr.rpmfiles
+%post plugin-scmbzr
+%{_datadir}/%{name}/post-install.d/common/plugin.sh scmbzr configure
+%preun plugin-scmbzr
+%{_datadir}/%{name}/post-install.d/common/plugin.sh scmbzr remove
+
+
+%package plugin-moinmoin
+Summary: collaborative development tool - Bazaar plugin
+Group: Development/Tools
+Requires: %{name}-web = %{version} moin mod_wsgi python-psycopg2
+%description plugin-moinmoin
+FusionForge provides many tools to aid collaboration in a
+development project, such as bug-tracking, task management,
+mailing-lists, SCM repository, forums, support request helper,
+web/FTP hosting, release management, etc. All these services are
+integrated into one web site and managed through a web interface.
+
+This plugin allows each project to embed MoinMoinWiki under a tab.
+%files plugin-moinmoin -f plugin-moinmoin.rpmfiles
+%post plugin-moinmoin
+%{_datadir}/%{name}/post-install.d/common/plugin.sh moinmoin configure
+%preun plugin-moinmoin
+%{_datadir}/%{name}/post-install.d/common/plugin.sh moinmoin remove
 
 
 %changelog
diff --git a/src/plugins/moinmoin/bin/install.sh b/src/plugins/moinmoin/bin/install.sh
index 9bd361e..1fe60a3 100755
--- a/src/plugins/moinmoin/bin/install.sh
+++ b/src/plugins/moinmoin/bin/install.sh
@@ -1,20 +1,22 @@
 #! /bin/sh
 
+config_path=$(forge_get_config config_path)
 data_path=$(forge_get_config data_path)
 prefix=$data_path/plugins/moinmoin/wikidata
+moinmoin_user=$(forge_get_config moinmoin_user moinmoin)
 
 case "$1" in
     configure)
 	for i in data underlay ; do
 	    if ! [ -e $prefix/$i ] ; then
 		cp -r /usr/share/moin/$i $prefix/
-		chown -R gforge:gforge $prefix/$i
+		chown -R $moinmoin_user: $prefix/$i
 	    fi
 	done
-	chown gforge $(forge_get_config config_path)/config.ini.d/debian-install-secrets.ini
+	chown $moinmoin_user $config_path/config.ini.d/post-install-secrets.ini  # Ewww...
 	if ! [ -e $dataprefix/moinmoin.log ] ; then
 	    touch $dataprefix/moinmoin.log
-	    chown gforge $dataprefix/moinmoin.log
+	    chown $moinmoin_user $dataprefix/moinmoin.log
 	fi
 	;;
     purge)
diff --git a/src/plugins/moinmoin/etc/moinmoin.ini b/src/plugins/moinmoin/etc/moinmoin.ini
index b7534c9..c8f86fa 100644
--- a/src/plugins/moinmoin/etc/moinmoin.ini
+++ b/src/plugins/moinmoin/etc/moinmoin.ini
@@ -4,3 +4,4 @@ wiki_data_path = "$core/data_path/plugins/moinmoin/wikidata"
 use_frame = yes
 
 plugin_status = valid
+moinmoin_user="$core/system_user"
diff --git a/src/plugins/scmbzr/bin/install.sh b/src/plugins/scmbzr/bin/install.sh
old mode 100644
new mode 100755
index 2fc3ccc..069aedb
--- a/src/plugins/scmbzr/bin/install.sh
+++ b/src/plugins/scmbzr/bin/install.sh
@@ -2,6 +2,7 @@
 # 
 # Configure Loggerhead for FusionForge
 # Roland Mas
+# Inria (Sylvain Beucler)
 
 set -e
 
@@ -10,12 +11,14 @@ if [ `id -u` != 0 ] ; then
     exec su -c "$0 $1"
 fi
 
-configfile=~gforge/.bazaar/bazaar.conf
-cachedir=/var/cache/gforge/loggerhead
+cachedir=/var/cache/fusionforge/loggerhead
+loggerhead_user=$(forge_get_config loggerhead_user scmbzr)
+loggerhead_group=$(forge_get_config loggerhead_group scmbzr)
+# loggerhead.wsgi requires configuration file in ~/.bazaar ..
+configfile=$(getent passwd $loggerhead_user | cut -d: -f6)/.bazaar/bazaar.conf
 
 case "$1" in
     configure)
-	PATH=$(forge_get_config binary_path):$PATH
 	repos_path=$(forge_get_config repos_path scmbzr)
 	web_host=$(forge_get_config web_host)
 	url_prefix=$(forge_get_config url_prefix)
@@ -38,19 +41,19 @@ http_root_dir = '${repos_path}'
 http_user_prefix = '${http_user_prefix}'
 
 # Directory to put cache files in
-http_sql_dir = '/var/cache/gforge/loggerhead'
+http_sql_dir = '/var/cache/fusionforge/loggerhead'
 EOF
 	    mkdir -p $cachedir
-	    chown gforge $cachedir
+	    chown $loggerhead_user $cachedir
 	fi
         ;;
 
-    purge)
+    remove)
 	rm -rf $configfile $cachedir
 	rmdir $(dirname $configfile) || true
         ;;
 
     *)
-        echo "Usage: $0 {configure|purge}"
+        echo "Usage: $0 {configure|remove}"
         exit 1
 esac
diff --git a/src/plugins/scmbzr/etc/httpd.conf.d/50-wsgi-scmbzr.conf b/src/plugins/scmbzr/etc/httpd.conf.d/50-wsgi-scmbzr.conf
index 74eaaf6..fbbf7c1 100644
--- a/src/plugins/scmbzr/etc/httpd.conf.d/50-wsgi-scmbzr.conf
+++ b/src/plugins/scmbzr/etc/httpd.conf.d/50-wsgi-scmbzr.conf
@@ -1,3 +1,4 @@
 <IfModule wsgi_module>
-  WSGIDaemonProcess fusionforge-plugin-scmbzr user=gforge group=gforge processes=4 maximum-requests=1000 display-name=fusionforge-plugin-scmbzr
+  # Loggerhead requires a dedicated user, cf. install.sh
+  WSGIDaemonProcess fusionforge-plugin-scmbzr user={scmbzr/loggerhead_user} group={scmbzr/loggerhead_group} processes=4 maximum-requests=1000 display-name=fusionforge-plugin-scmbzr
 </IfModule>
diff --git a/src/plugins/scmbzr/etc/scmbzr.ini b/src/plugins/scmbzr/etc/scmbzr.ini
index 966381e..0943607 100644
--- a/src/plugins/scmbzr/etc/scmbzr.ini
+++ b/src/plugins/scmbzr/etc/scmbzr.ini
@@ -9,3 +9,5 @@ plugin_status = valid
 
 default_server = "$core/web_host"
 repos_path = "$core/chroot/scmrepos/bzr"
+loggerhead_user = "$core/system_user"
+loggerhead_group = "$core/system_user"
diff --git a/src/post-install.d/README b/src/post-install.d/README
new file mode 100644
index 0000000..4d948c0
--- /dev/null
+++ b/src/post-install.d/README
@@ -0,0 +1,4 @@
+Post-install scripts.
+Can be called from 'make post-install', or by distro packages hooks.
+
+Scripts are "idempotent", aka can safely be run multiple times (Puppet slang)
diff --git a/src/post-install.d/common/common.sh b/src/post-install.d/common/common.sh
new file mode 100755
index 0000000..d7e2a88
--- /dev/null
+++ b/src/post-install.d/common/common.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+# Call all common post-install scripts in order
+
+source_path=$(forge_get_config source_path)
+
+$source_path/post-install.d/common/ini.sh
+$source_path/post-install.d/common/user.sh
diff --git a/src/post-install.d/common/plugin.sh b/src/post-install.d/common/plugin.sh
index aa4bdae..928423f 100755
--- a/src/post-install.d/common/plugin.sh
+++ b/src/post-install.d/common/plugin.sh
@@ -1,40 +1,53 @@
 #!/bin/bash -e
 source_path=$(forge_get_config source_path)
 config_path=$(forge_get_config config_path)
-# No way to detect Apache's distro integration, so let's hard-code:
-httpd_service=$(if [ -e /etc/redhat-release ]; then echo 'httpd'; else echo 'apache2'; fi)
+apache_service=$(forge_get_config apache_service)
 
-if [ -z "$1" ]; then
-    print "Usage: $0 plugin_name"
+if [ ! -d $source_path/plugins/$1 ]; then
+    echo "Unknown plugin '$1'"
     exit 1
 fi
 
+case "$2" in
+    configure)
+	# Run plugin-specific DB install/upgrade
+	# TODO: don't automatically enable the plugin, esp. for non-packaged installs
+	$source_path/bin/upgrade-db.php $1
+	
+	# Restart apache if there is some change in config
+	(
+	    if [ ! -e $source_path/plugins/$1/etc/httpd.conf.d/ ]; then exit; fi
+	    cd $source_path/plugins/$1/etc/
+	    for i in $(ls httpd.conf.d/*); do
+		if [ ! -e $config_path/$i ]; then
+		    $source_path/post-install.d/web/expand-conf.php $i $config_path/$i
+		fi
+		case $i in
+		    *secrets*) chmod 600 $config_path/$i;;
+		esac
+	    done
+	    # Hard-coded detection of distro-specific Apache conf layout
+	    service $apache_service reload >/dev/null || true
+	)
 
-# Run plugin-specific DB install/upgrade
-# TODO: don't automatically enable the plugin, esp. for non-packaged installs
-$source_path/bin/upgrade-db.php $1
+	# Run plugin-specific install
+	if [ -x $source_path/plugins/$1/bin/install.sh ]; then
+	    echo "Running $source_path/plugins/$1/bin/install.sh configure"
+	    $source_path/plugins/$1/bin/install.sh configure
+	fi
+	;;
 
+    remove)
+	# TODO: httpd.conf.d ?
 
-# Restart apache if there is some change in config
-(
-if [ ! -e $source_path/plugins/$1/etc/httpd.conf.d/ ]; then exit; fi
-cd $source_path/plugins/$1/etc/
-for i in $(ls httpd.conf.d/*); do
-    if [ ! -e $config_path/$i ]; then
-	$source_path/post-install.d/httpd-expand-conf.php $i $config_path/$i
-    fi
-    case $i in
-	*secrets*) chmod 600 $config_path/$i;;
-    esac
-done
-# Hard-coded detection of distro-specific Apache conf layout
-httpd_service=$(if [ -e /etc/redhat-release ]; then echo 'httpd'; else echo 'apache2'; fi)
-service $httpd_service reload >/dev/null || true
-)
+	# Run plugin-specific remove
+	if [ -x $source_path/plugins/$1/bin/install.sh ]; then
+	    echo "Running $source_path/plugins/$1/bin/install.sh remove"
+	    $source_path/plugins/$1/bin/install.sh remove
+	fi
+	;;
 
-
-# Run plugin-specific install
-if [ -x $source_path/plugins/$1/bin/install.sh ]; then
-    echo "Running $source_path/plugins/$1/bin/install.sh configure"
-    $source_path/plugins/$1/bin/install.sh configure
-fi
+    *)
+	echo "Usage: $0 plugin_name configure|remove"
+	exit 1
+esac
diff --git a/src/post-install.d/common/user.sh b/src/post-install.d/common/user.sh
new file mode 100755
index 0000000..0561571
--- /dev/null
+++ b/src/post-install.d/common/user.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+# Create to-be-specified 'fusionforge' user
+
+# TODO: specify the role of this user and its permissions
+# Currently used in: plugin-scmbzr, plugin-moinmoin, ???
+
+system_user=$(forge_get_config system_user)
+data_path=$(forge_get_config data_path)
+if ! getent passwd $system_user >/dev/null; then useradd $system_user -s /bin/false -d $data_path; fi
diff --git a/src/post-install.d/core.sh b/src/post-install.d/core.sh
index b7d0fdf..c2b6a50 100755
--- a/src/post-install.d/core.sh
+++ b/src/post-install.d/core.sh
@@ -1,22 +1,8 @@
 #!/bin/bash -x
-# Call the post-install scripts
-# Distro packages will usually call each post-install script directly
-# Scripts is "idempotent", aka can safely be run multiple times (Puppet slang)
+# Call the post-install scripts for common+db+web
 
 source_path=$(forge_get_config source_path)
 
-# Forge system user
-# TODO: make this a configuration option, or ditch the user
-# TODO: move me out of this script
-#data_path=$(forge_get_config data_path)
-#user=gforge
-#if ! getent passwd $user >/dev/null; then useradd $user -s /bin/false -d $data_path; fi
-
-# Post-install .ini configuration
-$source_path/post-install.d/common/ini.sh
-
-# Database
+$source_path/post-install.d/common/common.sh
 $source_path/post-install.d/db/db.sh
-
-# Apache
 $source_path/post-install.d/web/configure.sh
diff --git a/src/post-install.d/db/db.sh b/src/post-install.d/db/db.sh
index 80d6e40..418e15a 100755
--- a/src/post-install.d/db/db.sh
+++ b/src/post-install.d/db/db.sh
@@ -1,4 +1,4 @@
-#!/bin/bash -x
+#!/bin/bash
 # Call all DB post-install scripts in order
 
 source_path=$(forge_get_config source_path)
diff --git a/src/post-install.d/shell/shell.sh b/src/post-install.d/shell/shell.sh
index 6dfc063..110732a 100755
--- a/src/post-install.d/shell/shell.sh
+++ b/src/post-install.d/shell/shell.sh
@@ -83,11 +83,20 @@ remove_nsswitch()
     sed -i -e 's/#Comment by GForge install#//' /etc/nsswitch.conf
 }
 
+configure_nscd()
+{
+    if [ -e /etc/redhat-release ]; then
+	chkconfig nscd on
+	service nscd start
+    fi
+}
+
 # Main
 case "$1" in
     configure)
 	configure_libnss_pgsql
 	configure_nsswitch
+	configure_nscd
 	;;
     remove)
 	remove_nsswitch
diff --git a/src/templates/httpd.conf.d/02-config-main.conf b/src/templates/httpd.conf.d/02-config-main.conf
index 0a81e0c..e031b83 100644
--- a/src/templates/httpd.conf.d/02-config-main.conf
+++ b/src/templates/httpd.conf.d/02-config-main.conf
@@ -12,7 +12,7 @@
   # PHP settings
   #
   
-  php_admin_value include_path "{core/source_path}:{core/source_path}/www/include:{core/source_path}/common/include:{core/source_path}/plugins:{core/source_path}/vendor:/usr/share/php:/usr/share/pear:."
+  php_admin_value include_path "{core/source_path}:{core/source_path}/www/include:{core/source_path}/common/include:{core/source_path}/plugins:{core/source_path}/vendor:/usr/share/php:/usr/share/php/htmlpurifier:/usr/share/pear:."
   php_admin_value default_charset "UTF-8"
   php_flag register_globals "off"
   php_flag magic_quotes_gpc "off"
diff --git a/tests/func/Testing/SeleniumForge.php b/tests/func/Testing/SeleniumForge.php
index 7650fa0..ffd100e 100644
--- a/tests/func/Testing/SeleniumForge.php
+++ b/tests/func/Testing/SeleniumForge.php
@@ -134,7 +134,7 @@ class FForge_SeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase
 
 	protected function reload_nscd()
 	{
-		$this->runCommand("nscd -i all >/dev/null");
+		$this->runCommand("(nscd -i passwd && nscd -i group) >/dev/null");
 	}
 
 	protected function init() {
diff --git a/tests/func/db_reload.sh b/tests/func/db_reload.sh
index 65eef8c..8d354b8 100755
--- a/tests/func/db_reload.sh
+++ b/tests/func/db_reload.sh
@@ -167,4 +167,4 @@ start_database
 start_apache
 
 echo "Flushing/restarting nscd"
-nscd -i all
+nscd -i passwd && nscd -i group
diff --git a/tests/func/vncxstartsuite.sh b/tests/func/vncxstartsuite.sh
index 5ff44c9..b99e832 100755
--- a/tests/func/vncxstartsuite.sh
+++ b/tests/func/vncxstartsuite.sh
@@ -1,27 +1,12 @@
 #! /bin/sh
 
-TEST_ENV="$1"
-# Test arg
-if [ -z "$TEST_ENV" ]
-then
-	echo "Usage: $0 script"
-	exit 1
-fi
-
-INSTALL_METHOD=${TEST_ENV%/*}
-INSTALL_OS=${TEST_ENV#*/}
-
-# Find $TEST_HOME
-relativescriptpath=`dirname $0`
-TEST_HOME=$(cd $relativescriptpath/..;pwd)
-
 # Check vncserver
 if ! type vncserver 2>/dev/null
 then
-	echo "vncserver is missing"
+	echo "Installing vncserver"
 	if type yum 2>/dev/null
 	then
-		yum install -y vnc-server
+		yum install -y tigervnc-server
 	fi
 	if type apt-get 2>/dev/null
 	then
@@ -55,7 +40,7 @@ if ! [ -e .ssh/config ] || ! grep -q StrictHostKeyChecking .ssh/config ; then
 fi
 
 vncserver :1
-DISPLAY=:1 INSTALL_METHOD=$INSTALL_METHOD INSTALL_OS=$INSTALL_OS $@
+DISPLAY=:1 $@
 retcode=$?
 vncserver -kill :1 || retcode=$?
 
diff --git a/tests/scripts/deb/install.sh b/tests/scripts/deb/install.sh
index d9f8118..5389bad 100755
--- a/tests/scripts/deb/install.sh
+++ b/tests/scripts/deb/install.sh
@@ -1,16 +1,11 @@
 #! /bin/sh
-
+# Install FusionForge packages from build.sh + dependencies
 
 # Authors :
 #  Roland Mas
 #  Olivier BERGER <olivier.berger at it-sudparis.eu>
 #  Sylvain Beucler
 
-# This script will install the Debian packages to be tested which have been build inside the VM
-
-# Prerequisite : running 'build.sh' and its prerequisites
-
-
 #set -x
 set -e
 export DEBIAN_FRONTEND=noninteractive
@@ -33,7 +28,7 @@ fi
 
 # Install FusionForge packages
 apt-get update
-if dpkg -l fusionforge | grep -q ^ii ; then
+if dpkg-query -s fusionforge >/dev/null 2>&1; then
     # Already installed, upgrading
     UCF_FORCE_CONFFNEW=yes LANG=C DEBIAN_FRONTEND=noninteractive apt-get -y dist-upgrade
 else
@@ -42,15 +37,15 @@ else
 
     # Initial configuration
     forge_set_password admin myadmin
-    a2dissite default
-    invoke-rc.d apache2 restart
 
-    # Backup the DB, so that it can be restored for the test suite to run
+    # Backup the DB, so that it can be restored for the test suite
     su - postgres -c "pg_dumpall" > /root/dump
-    invoke-rc.d postgresql stop
-    if [ -d /var/lib/postgresql.backup ]; then
-        rm -fr /var/lib/postgresql.backup
+    service postgresql stop
+    pgdir=/var/lib/postgresql
+    if [ -e /etc/redhat-release ]; then pgdir=/var/lib/pgsql; fi
+    if [ -d $pgdir.backup ]; then
+        rm -fr $pgdir.backup
     fi
-    cp -a --reflink=auto /var/lib/postgresql /var/lib/postgresql.backup
-    invoke-rc.d postgresql start
+    cp -a --reflink=auto $pgdir $pgdir.backup
+    service postgresql start
 fi
diff --git a/tests/scripts/deb/run-testsuite.sh b/tests/scripts/deb/run-testsuite.sh
index d7aa133..23d5cdf 100755
--- a/tests/scripts/deb/run-testsuite.sh
+++ b/tests/scripts/deb/run-testsuite.sh
@@ -4,19 +4,25 @@
 # and Selenium, which will test the Web interface of FusionForge in a
 # controlled Firefox browser.
 
+set -e
+export DEBIAN_FRONTEND=noninteractive
+
 # Build an unofficial package for selenium and install it
 if ! dpkg-query -s selenium >/dev/null 2>&1 ; then
     version=2.35.0
     mkdir -p /usr/share/selenium/
+    apt-get install -y wget
     wget -c http://selenium.googlecode.com/files/selenium-server-standalone-$version.jar \
 	-O /usr/share/selenium/selenium-server.jar
 
     # Selenium dependencies
     apt-get -y install default-jre iceweasel
-
 fi
 
-invoke-rc.d cron stop
+# Ensure tested components are installed
+UCF_FORCE_CONFFNEW=yes apt-get install -y fusionforge fusionforge-shell fusionforge-plugin-scmsvn fusionforge-plugin-scmbzr fusionforge-plugin-mediawiki fusionforge-plugin-moinmoin
+
+service cron stop
 
 config_path=$(forge_get_config config_path)
 (echo [mediawiki]; echo unbreak_frames=yes) > $config_path/config.ini.d/zzz-buildbot.ini
diff --git a/tests/scripts/fusionforge-build-and-test-deb.sh b/tests/scripts/fusionforge-build-and-test-deb.sh
index 0dbdf8c..368ac201 100755
--- a/tests/scripts/fusionforge-build-and-test-deb.sh
+++ b/tests/scripts/fusionforge-build-and-test-deb.sh
@@ -7,6 +7,10 @@ set -e
 get_config
 
 export HOST=$1
+if [ -z "$HOST" ]; then
+    echo "Usage: $0 vm_hostname"
+    exit 1
+fi
 case $HOST in
     debian7.local)
 	export DIST=wheezy
@@ -37,11 +41,10 @@ ssh root@$HOST "apt-get update"
 # Transfer preseeding
 #cat tests/preseed/* | sed s/@FORGE_ADMIN_PASSWORD@/$FORGE_ADMIN_PASSWORD/ | ssh root@$HOST "LANG=C debconf-set-selections"
 
-ssh root@$HOST "apt-get install rsync"
+ssh root@$HOST "apt-get install -y rsync"
 rsync -av --delete src tests root@$HOST:/usr/src/fusionforge/
 ssh root@$HOST "/usr/src/fusionforge/tests/scripts/deb/build.sh"
 ssh root@$HOST "/usr/src/fusionforge/tests/scripts/deb/install.sh"
-ssh root@$HOST "apt-get install -y fusionforge-shell fusionforge-plugin-mediawiki"
 
 # Run tests
 retcode=0
@@ -50,6 +53,7 @@ ssh root@$HOST "/usr/src/fusionforge/tests/func/vncxstartsuite.sh /usr/src/fusio
 
 rsync -av root@$HOST:/var/log/ ~/reports/
 
-lxc-stop -k -n $HOST
-lxc-destroy -n $HOST
+#stop_vm_if_not_keeped -t $VM $@
+#sudo lxc-stop -k -n $HOST
+#sudo lxc-destroy -n $HOST
 exit $retcode
diff --git a/tests/scripts/fusionforge-build-and-test-rpm.sh b/tests/scripts/fusionforge-build-and-test-rpm.sh
index 3dc9349..ac0dd94 100755
--- a/tests/scripts/fusionforge-build-and-test-rpm.sh
+++ b/tests/scripts/fusionforge-build-and-test-rpm.sh
@@ -4,15 +4,12 @@
 
 get_config
 
-export FORGE_HOME=/usr/share/gforge
 export HOST=$1
-
-export FILTER="rpm/centos"
-
+if [ -z "$HOST" ]; then
+    echo "Usage: $0 vm_hostname"
+    exit 1
+fi
 case $HOST in
-    centos5.local)
-	VM=centos5
-	;;
     centos6.local)
 	VM=centos6
 	;;
@@ -21,77 +18,21 @@ case $HOST in
 	;;
 esac	
 
-prepare_workspace
-destroy_vm -t $VM $HOST
-start_vm_if_not_keeped -t $VM $HOST
-
-setup_redhat_3rdparty_repo
-
-# BUILD FUSIONFORGE REPO
-echo "Build FUSIONFORGE REPO in $BUILDRESULT"
-make -f Makefile.rh BUILDRESULT=$BUILDRESULT RPM_TMP=$RPM_TMP fusionforge dist
-
-# TRANSFER FUSIONFORGE REPO
-rsync -a --delete $BUILDRESULT/ root@$HOST:/root/fusionforge_repo/
-
-# SETUP FUSIONFORGE REPO
-echo "Installing FUSIONFORGE REPO"
-ssh root@$HOST "cat > /etc/yum.repos.d/FusionForge.repo" <<-EOF
-[FusionForge]
-name = Red Hat Enterprise \$releasever - fusionforge.org
-baseurl = file:///root/fusionforge_repo/noarch/
-enabled = 1
-protect = 0
-gpgcheck = 0
-EOF
-
-setup_dag_repo $@
-if [ $VM = centos6 ] ; then
-    setup_epel_repo $@
-fi
-
-sleep 5
-if [ $VM = centos6 ] ; then
-    ssh root@$HOST "yum -y --enablerepo=epel install cronolog"
-fi
-ssh root@$HOST "FFORGE_DB=$DB_NAME FFORGE_USER=gforge FFORGE_ADMIN_USER=$FORGE_ADMIN_USERNAME FFORGE_ADMIN_PASSWORD=$FORGE_ADMIN_PASSWORD export FFORGE_DB FFORGE_USER FFORGE_ADMIN_USER FFORGE_ADMIN_PASSWORD; yum install -y --skip-broken fusionforge fusionforge-plugin-scmsvn fusionforge-plugin-online_help fusionforge-plugin-extratabs fusionforge-plugin-authldap fusionforge-plugin-scmgit fusionforge-plugin-blocks"
-
-config_path=$(ssh root@$HOST forge_get_config config_path)
-
-ssh root@$HOST "(echo [core];echo use_ssl=no) > $config_path/config.ini.d/zzz-buildbot.ini"
-ssh root@$HOST "(echo [moinmoin];echo use_frame=no) >> $config_path/config.ini.d/zzz-buildbot.ini"
-ssh root@$HOST "(echo [mediawiki];echo unbreak_frames=yes) >> $config_path/config.ini.d/zzz-buildbot.ini"
-ssh root@$HOST "su - postgres -c \"pg_dumpall\" > /root/dump"
-# Install a fake sendmail to catch all outgoing emails.
-ssh root@$HOST "perl -spi -e s#/usr/sbin/sendmail#$FORGE_HOME/tests/scripts/catch_mail.php# $config_path/config.ini.d/defaults.ini"
-
-echo "Stop cron daemon"
-ssh root@$HOST "service crond stop" || true
+tests/scripts/start_vm -t $VM $HOST
 
-if [ $VM = centos6 ] ; then
-    ssh root@$HOST "yum -y --enablerepo=epel install php-phpunit-PHPUnit-Selenium"
-fi
-
-# Install selenium
-ssh root@$HOST "yum -y install selenium"
-
-# Install selenium tests
-ssh root@$HOST "[ -d $FORGE_HOME ] || mkdir -p $FORGE_HOME"
-rsync -a --delete tests/ root@$HOST:$FORGE_HOME/tests/
-
-# Transfer hudson config
-ssh root@$HOST "cat > $FORGE_HOME/tests/config/phpunit" <<-EOF
-HUDSON_URL=$HUDSON_URL
-JOB_NAME=$JOB_NAME
-EOF
+ssh root@$HOST "yum install -y rsync"
+rsync -av --delete src tests root@$HOST:/usr/src/fusionforge/
+ssh root@$HOST "/usr/src/fusionforge/tests/scripts/rpm/build.sh"
+ssh root@$HOST "/usr/src/fusionforge/tests/scripts/rpm/install.sh"
 
 # Run tests
 retcode=0
 echo "Run phpunit test on $HOST in $FORGE_HOME"
-ssh root@$HOST "$FORGE_HOME/tests/func/vncxstartsuite.sh rpm/centos"
-retcode=$?
-rsync -av root@$HOST:/var/log/ $WORKSPACE/reports/
-scp root@$HOST:/tmp/gforge-*.log $WORKSPACE/reports/
+ssh root@$HOST "/usr/src/fusionforge/tests/func/vncxstartsuite.sh /usr/src/fusionforge/tests/scripts/rpm/run-testsuite.sh" || retcode=$?
+
+rsync -av root@$HOST:/var/log/ ~/reports/
 
-stop_vm_if_not_keeped -t $VM $@
+#stop_vm_if_not_keeped -t $VM $@
+#sudo lxc-stop -k -n $HOST
+#sudo lxc-destroy -n $HOST
 exit $retcode
diff --git a/tests/scripts/phpunit.sh b/tests/scripts/phpunit.sh
index 3de3cf1..5c6f652 100755
--- a/tests/scripts/phpunit.sh
+++ b/tests/scripts/phpunit.sh
@@ -1,6 +1,15 @@
 #! /bin/sh
 
-INSTALL_METHOD=$INSTALL_METHOD INSTALL_OS=$INSTALL_OS 
+TEST_ENV="$1"
+# Test arg
+if [ -z "$TEST_ENV" ]
+then
+	echo "Usage: $0 script"
+	exit 1
+fi
+
+INSTALL_METHOD=${TEST_ENV%/*}
+INSTALL_OS=${TEST_ENV#*/}
 
 if [ -z "$INSTALL_METHOD" ] || [ -z "$INSTALL_OS" ] ; then
     echo INSTALL_METHOD and INSTALL_OS required
@@ -114,10 +123,11 @@ retcode=0
 cd tests
 phpunit --verbose --debug --stop-on-failure --log-junit $SELENIUM_RC_DIR/phpunit-selenium.xml $@ Testsuite.php || retcode=$?
 cd ..
+kill $pid
 # on debian
 killall -9 firefox-bin
 # on centos
 killall -9 firefox
 # kill java stuffs
-killall -QUIT java
+killall -9 java
 exit $retcode
diff --git a/tests/scripts/rpm/build.sh b/tests/scripts/rpm/build.sh
index 355c080..9793626 100755
--- a/tests/scripts/rpm/build.sh
+++ b/tests/scripts/rpm/build.sh
@@ -7,7 +7,7 @@ yum install -y gettext tar bzip2 rpm-build  createrepo
 
 # Build package
 cd /usr/src/fusionforge/src/
-mkdir -p ../build/SOURCES/
+mkdir -p ../build/SOURCES/ ../build/SPECS/
 TAR_PREFIX=fusionforge-$(make version)
 make dist && mv $TAR_PREFIX.tar.bz2 ..
 ln -nfs ../../$TAR_PREFIX.tar.bz2 ../build/SOURCES/
diff --git a/tests/scripts/rpm/install.sh b/tests/scripts/rpm/install.sh
index 11efd7f..f65875a 100755
--- a/tests/scripts/rpm/install.sh
+++ b/tests/scripts/rpm/install.sh
@@ -6,21 +6,27 @@
 # get_news_notapproved.pl:
 # perl perl-DBI perl-Text-Autoformat perl-Mail-Sendmail
 
+# php-htmlpurifier-htmlpurifier  # fedora
 # htmlpurifier  # pear
 #   pear channel-discover htmlpurifier.org
 #   pear install hp/HTMLPurifier
-#   Note: htmlpurifier requires in -common: group->forum->textsanitizer->htmlpurifier
+#   Note: htmlpurifier required in -common: group->forum->textsanitizer->htmlpurifier
 # arc           # vendor/
 # graphite      # vendor/
 # php-pear-CAS  # epel
 # php-simplepie # epel or common/rss/simplepie.inc
 
-# EPEL6
-# rpm -ivh http://mirror.ibcp.fr/pub/epel/6/i386/epel-release-6-8.noarch.rpm
+# Fedora/RHEL/CentOS version:
+os_version=$(rpm -q --qf "%{VERSION}" $(rpm -q --whatprovides redhat-release))
 
-# moin: no available package for RHEL; though 'moin' is available in Fedora
-# libnss-pgsql: id., plus http://yum.postgresql.org/8.4/redhat/rhel-5-x86_64/
-cat <<'EOF' > /etc/yum.repos.d/fedora-source.repo
+if ! rpm -q fedora-release >/dev/null; then
+    # EPEL - http://download.fedoraproject.org/pub/epel/6/i386/repoview/epel-release.html
+    if ! rpm -q epel-release >/dev/null; then
+	rpm -ivh http://fr2.rpmfind.net/linux/epel/6/i386/epel-release-6-8.noarch.rpm
+    fi
+
+    # Prepare manual backports
+    cat <<'EOF' > /etc/yum.repos.d/fedora-source.repo
 [fedora]
 name=Fedora 20
 failovermethod=priority
@@ -34,24 +40,64 @@ metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-source-20&arch=$
 enabled=0
 gpgcheck=0
 EOF
-yum install -y yum-utils  # yumdownloader
+    yum install -y yum-utils  # yumdownloader
+fi
 
-yumdownloader --enablerepo=fedora --source libnss-pgsql
-DEPS="python-devel"
-yum install -y $DEPS
-rpmbuild --rebuild moin-*.src.rpm
-yum remove -y $DEPS
-rpm -ivh ~/rpmbuild/RPMS/noarch/moin-1.9.7-2.el6.noarch.rpm
+if yum list libnss-pgsql >/dev/null 2>&1; then
+    yum install -y libnss-pgsql
+else
+    # libnss-pgsql: id., plus http://yum.postgresql.org/8.4/redhat/rhel-5-x86_64/
+    yumdownloader --enablerepo=fedora --source libnss-pgsql
+    DEPS="gcc postgresql-devel xmlto"
+    yum install -y $DEPS
+    rpmbuild --rebuild libnss-pgsql-*.src.rpm
+    yum remove -y $DEPS
+    rpm -ivh ~/rpmbuild/RPMS/x86_64/libnss-pgsql-*.x86_64.rpm
+fi
 
-yumdownloader --enablerepo=fedora --source libnss-pgsql
-DEPS="gcc postgresql-devel xmlto"
-yum install -y $DEPS
-rpmbuild --rebuild libnss-pgsql-*.src.rpm
-yum remove -y $DEPS
-rpm -ivh ~/rpmbuild/RPMS/x86_64/libnss-pgsql-1.5.0-0.9.beta.el6.x86_64.rpm
+if yum list moin >/dev/null 2>&1; then
+    yum install -y moin
+else
+    # moin: no available package for RHEL; though 'moin' is available in Fedora
+    yumdownloader --enablerepo=fedora --source moin
+    DEPS="python-devel"
+    yum install -y $DEPS
+    rpmbuild --rebuild moin-*.src.rpm
+    yum remove -y $DEPS
+    rpm -ivh ~/rpmbuild/RPMS/noarch/moin-*.noarch.rpm
+fi
 
+if yum list php-htmlpurifier-htmlpurifier >/dev/null 2>&1; then
+    yum install -y php-htmlpurifier-htmlpurifier
+else
+    # moin: no available package for RHEL; though 'moin' is available in Fedora
+    yumdownloader --enablerepo=fedora --source php-htmlpurifier-htmlpurifier
+    DEPS="php-channel-htmlpurifier"  # for v4.3.0-6.fc20
+    yum install -y $DEPS
+    rpmbuild --rebuild php-htmlpurifier-htmlpurifier-*.src.rpm
+    yum remove -y $DEPS
+    yum install -y ~/rpmbuild/RPMS/noarch/php-htmlpurifier-htmlpurifier-*.noarch.rpm
+fi
 
 # mediawiki (provided by mediawiki119): EPEL
 
+if rpm -q fusionforge >/dev/null ; then
+    yum upgrade -y
+else
+    yum install -y fusionforge
+    # -common fusionforge-db fusionforge-plugin-mediawiki fusionforge-web fusionforge-shell
+
+    # Initial configuration
+    forge_set_password admin myadmin
 
-yum install fusionforge-common fusionforge-db fusionforge-plugin-mediawiki fusionforge-web fusionforge-shell
+    # Backup the DB, so that it can be restored for the test suite
+    su - postgres -c "pg_dumpall" > /root/dump
+    service postgresql stop
+    pgdir=/var/lib/postgresql
+    if [ -e /etc/redhat-release ]; then pgdir=/var/lib/pgsql; fi
+    if [ -d $pgdir.backup ]; then
+        rm -fr $pgdir.backup
+    fi
+    cp -a --reflink=auto $pgdir $pgdir.backup
+    service postgresql start
+fi
diff --git a/tests/scripts/rpm/run-testsuite.sh b/tests/scripts/rpm/run-testsuite.sh
new file mode 100755
index 0000000..e2451e9
--- /dev/null
+++ b/tests/scripts/rpm/run-testsuite.sh
@@ -0,0 +1,35 @@
+#!/bin/bash -x
+
+set -e
+
+# Build an unofficial package for selenium and install it
+if ! rpm -q selenium >/dev/null ; then
+    version=2.35.0
+    mkdir -p /usr/share/selenium/
+    yum install -y wget
+    wget -c http://selenium.googlecode.com/files/selenium-server-standalone-$version.jar \
+	-O /usr/share/selenium/selenium-server.jar
+
+    # Selenium dependencies
+    yum -y install firefox java-1.6.0
+fi
+
+# Ensure tested components are installed
+yum install -y fusionforge fusionforge-shell fusionforge-plugin-scmsvn fusionforge-plugin-mediawiki
+# fusionforge-plugin-online_help fusionforge-plugin-extratabs fusionforge-plugin-authldap fusionforge-plugin-scmgit fusionforge-plugin-blocks
+
+service crond stop
+
+config_path=$(forge_get_config config_path)
+(echo [mediawiki]; echo unbreak_frames=yes) > $config_path/config.ini.d/zzz-buildbot.ini
+#(echo [core];echo use_ssl=no) > $config_path/config.ini.d/zzz-buildbot.ini
+#(echo [moinmoin];echo use_frame=no) >> $config_path/config.ini.d/zzz-buildbot.ini
+
+# Test dependencies (EPEL)
+yum install -y php-phpunit-PHPUnit php-phpunit-PHPUnit-Selenium
+
+# Install a fake sendmail to catch all outgoing emails.
+#perl -spi -e s#/usr/sbin/sendmail#$FORGE_HOME/tests/scripts/catch_mail.php# $config_path/config.ini.d/defaults.ini
+
+# Now, start the functionnal test suite using phpunit and selenium
+/usr/src/fusionforge/tests/scripts/phpunit.sh rpm/centos
diff --git a/tests/scripts/rpm/uninstall.sh b/tests/scripts/rpm/uninstall.sh
index b851753..4a9f31d 100755
--- a/tests/scripts/rpm/uninstall.sh
+++ b/tests/scripts/rpm/uninstall.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
 # Aggressive desinstall for testing a clean re-install
 yum remove -y 'fusionforge*'
+service postgresql stop
 rm -rf /var/lib/pgsql/ /usr/share/fusionforge/ /etc/fusionforge/ /var/lib/fusionforge/

commit 14f18bde982de6b5e1ecefc7bdbe22492abeaf9c
Author: Sylvain Beucler <sylvain.beucler at inria.fr>
Date:   Tue Aug 26 12:24:30 2014 +0200

    cronjobs: fix paths now that we sort them in subdirectories

diff --git a/src/cronjobs/db/calculate_user_metric.php b/src/cronjobs/db/calculate_user_metric.php
index d6f14fb..70c6774 100755
--- a/src/cronjobs/db/calculate_user_metric.php
+++ b/src/cronjobs/db/calculate_user_metric.php
@@ -57,7 +57,7 @@ ON user_metric_history(month,day,user_id);
 		what we want - a list of the top users on the site.
 
 */
-require dirname(__FILE__).'/../www/env.inc.php';
+require dirname(__FILE__).'/../../common/include/env.inc.php';
 require_once $gfcommon.'include/pre.php';
 require $gfcommon.'include/cron_utils.php';
 
diff --git a/src/cronjobs/db/check_stale_tracker_items.php b/src/cronjobs/db/check_stale_tracker_items.php
index 00edfea..bf89dd4 100755
--- a/src/cronjobs/db/check_stale_tracker_items.php
+++ b/src/cronjobs/db/check_stale_tracker_items.php
@@ -28,7 +28,7 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-require dirname(__FILE__).'/../www/env.inc.php';
+require dirname(__FILE__).'/../../common/include/env.inc.php';
 require_once $gfcommon.'include/pre.php';
 require $gfcommon.'include/cron_utils.php';
 
diff --git a/src/cronjobs/db/daily_task_email.php b/src/cronjobs/db/daily_task_email.php
index 21e1748..da043d2 100755
--- a/src/cronjobs/db/daily_task_email.php
+++ b/src/cronjobs/db/daily_task_email.php
@@ -22,7 +22,7 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-require dirname(__FILE__).'/../www/env.inc.php';
+require dirname(__FILE__).'/../../common/include/env.inc.php';
 require_once $gfcommon.'include/pre.php';
 require_once $gfcommon.'pm/ProjectTasksForUser.class.php';
 require_once $gfcommon.'include/cron_utils.php';
diff --git a/src/cronjobs/db/db_project_sums.php b/src/cronjobs/db/db_project_sums.php
index 66099e6..b058a8e 100755
--- a/src/cronjobs/db/db_project_sums.php
+++ b/src/cronjobs/db/db_project_sums.php
@@ -22,7 +22,7 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-require (dirname(__FILE__).'/../www/env.inc.php');
+require dirname(__FILE__).'/../../common/include/env.inc.php';
 require_once $gfcommon.'include/pre.php';
 require $gfcommon.'include/cron_utils.php';
 
diff --git a/src/cronjobs/db/db_stats_agg.php b/src/cronjobs/db/db_stats_agg.php
index e68ffef..7cfb05e 100755
--- a/src/cronjobs/db/db_stats_agg.php
+++ b/src/cronjobs/db/db_stats_agg.php
@@ -21,7 +21,7 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-require dirname(__FILE__).'/../www/env.inc.php';
+require dirname(__FILE__).'/../../common/include/env.inc.php';
 require_once $gfcommon.'include/pre.php';
 require $gfcommon.'include/cron_utils.php';
 
diff --git a/src/cronjobs/db/db_trove_maint.php b/src/cronjobs/db/db_trove_maint.php
index fc6fbd3..f6d87eb 100755
--- a/src/cronjobs/db/db_trove_maint.php
+++ b/src/cronjobs/db/db_trove_maint.php
@@ -20,7 +20,7 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-require (dirname(__FILE__).'/../www/env.inc.php');
+require dirname(__FILE__).'/../../common/include/env.inc.php';
 require_once $gfcommon.'include/pre.php';
 require $gfcommon.'include/cron_utils.php';
 
diff --git a/src/cronjobs/db/massmail.php b/src/cronjobs/db/massmail.php
index 469bdce..65fc79b 100755
--- a/src/cronjobs/db/massmail.php
+++ b/src/cronjobs/db/massmail.php
@@ -28,7 +28,7 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-require dirname(__FILE__).'/../www/env.inc.php';
+require dirname(__FILE__).'/../../common/include/env.inc.php';
 require_once $gfcommon.'include/pre.php';
 require $gfcommon.'include/cron_utils.php';
 
diff --git a/src/cronjobs/db/project_cleanup.php b/src/cronjobs/db/project_cleanup.php
index f75a05a..ae0d42a 100755
--- a/src/cronjobs/db/project_cleanup.php
+++ b/src/cronjobs/db/project_cleanup.php
@@ -20,7 +20,7 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-require dirname(__FILE__).'/../www/env.inc.php';
+require dirname(__FILE__).'/../../common/include/env.inc.php';
 require_once $gfcommon.'include/pre.php';
 require $gfcommon.'include/cron_utils.php';
 
diff --git a/src/cronjobs/db/project_weekly_metric.php b/src/cronjobs/db/project_weekly_metric.php
index c7502d3..8d79605 100755
--- a/src/cronjobs/db/project_weekly_metric.php
+++ b/src/cronjobs/db/project_weekly_metric.php
@@ -20,7 +20,7 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-require (dirname(__FILE__).'/../www/env.inc.php');
+require dirname(__FILE__).'/../../common/include/env.inc.php';
 require_once $gfcommon.'include/pre.php';
 require $gfcommon.'include/cron_utils.php';
 
diff --git a/src/cronjobs/db/rating_stats.php b/src/cronjobs/db/rating_stats.php
index 0d1dc0b..8004ff5 100755
--- a/src/cronjobs/db/rating_stats.php
+++ b/src/cronjobs/db/rating_stats.php
@@ -19,7 +19,7 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-require (dirname(__FILE__).'/../www/env.inc.php');
+require dirname(__FILE__).'/../../common/include/env.inc.php';
 require_once $gfcommon.'include/pre.php';
 require $gfcommon.'include/cron_utils.php';
 
diff --git a/src/cronjobs/db/reporting_cron.php b/src/cronjobs/db/reporting_cron.php
index 1814171..1c0282d 100755
--- a/src/cronjobs/db/reporting_cron.php
+++ b/src/cronjobs/db/reporting_cron.php
@@ -24,7 +24,7 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-require dirname(__FILE__).'/../www/env.inc.php';
+require dirname(__FILE__).'/../../common/include/env.inc.php';
 require_once $gfcommon.'include/pre.php';
 require $gfcommon.'include/cron_utils.php';
 require $gfcommon.'reporting/ReportSetup.class.php';
diff --git a/src/cronjobs/db/rotate_activity.php b/src/cronjobs/db/rotate_activity.php
index 21cdad1..5daae07 100755
--- a/src/cronjobs/db/rotate_activity.php
+++ b/src/cronjobs/db/rotate_activity.php
@@ -19,7 +19,7 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-require (dirname(__FILE__).'/../www/env.inc.php');
+require dirname(__FILE__).'/../../common/include/env.inc.php';
 require_once $gfcommon.'include/pre.php';
 require_once $gfcommon.'include/cron_utils.php';
 
diff --git a/src/cronjobs/db/site_stats.php b/src/cronjobs/db/site_stats.php
index c94dd03..19000d4 100755
--- a/src/cronjobs/db/site_stats.php
+++ b/src/cronjobs/db/site_stats.php
@@ -20,7 +20,7 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-require dirname(__FILE__).'/../www/env.inc.php';
+require dirname(__FILE__).'/../../common/include/env.inc.php';
 require_once $gfcommon.'include/pre.php';
 require $gfcommon.'include/cron_utils.php';
 
diff --git a/src/cronjobs/db/stats_projects-backfill.php b/src/cronjobs/db/stats_projects-backfill.php
index 4afc741..9a459a1 100755
--- a/src/cronjobs/db/stats_projects-backfill.php
+++ b/src/cronjobs/db/stats_projects-backfill.php
@@ -19,7 +19,7 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-require dirname(__FILE__).'/../www/env.inc.php';
+require dirname(__FILE__).'/../../common/include/env.inc.php';
 require_once $gfcommon.'include/pre.php';
 require_once 'cronjobs/stats_projects.inc';
 
diff --git a/src/cronjobs/db/update_docdata_dataword.php b/src/cronjobs/db/update_docdata_dataword.php
index fa52ab8..55c11d6 100755
--- a/src/cronjobs/db/update_docdata_dataword.php
+++ b/src/cronjobs/db/update_docdata_dataword.php
@@ -24,7 +24,7 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-require dirname(__FILE__).'/../www/env.inc.php';
+require dirname(__FILE__).'/../../common/include/env.inc.php';
 require_once $gfcommon.'include/pre.php';
 require_once $gfcommon.'docman/Parsedata.class.php';
 require_once $gfcommon.'docman/Document.class.php';
diff --git a/src/cronjobs/db/vacuum.php b/src/cronjobs/db/vacuum.php
index baa93a7..ebdde73 100755
--- a/src/cronjobs/db/vacuum.php
+++ b/src/cronjobs/db/vacuum.php
@@ -21,7 +21,7 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-require dirname(__FILE__).'/../www/env.inc.php';
+require dirname(__FILE__).'/../../common/include/env.inc.php';
 require_once $gfcommon.'include/pre.php';
 require $gfcommon.'include/cron_utils.php';
 
diff --git a/src/cronjobs/mail/forum_gateway.php b/src/cronjobs/mail/forum_gateway.php
index cd47f3f..31f1bc0 100755
--- a/src/cronjobs/mail/forum_gateway.php
+++ b/src/cronjobs/mail/forum_gateway.php
@@ -24,7 +24,7 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-require dirname(__FILE__).'/../www/env.inc.php';
+require dirname(__FILE__).'/../../common/include/env.inc.php';
 require_once $gfcommon.'include/pre.php';
 require_once $gfcommon.'include/Group.class.php';
 require_once $gfcommon.'include/MailParser.class.php';
diff --git a/src/cronjobs/mail/mailaliases.php b/src/cronjobs/mail/mailaliases.php
index cadb202..01dee75 100755
--- a/src/cronjobs/mail/mailaliases.php
+++ b/src/cronjobs/mail/mailaliases.php
@@ -22,7 +22,7 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-require dirname(__FILE__).'/../../www/env.inc.php';
+require dirname(__FILE__).'/../../common/include/env.inc.php';
 require_once $gfcommon.'include/pre.php';
 require $gfcommon.'include/cron_utils.php';
 
diff --git a/src/cronjobs/mail/mailing_lists_create.php b/src/cronjobs/mail/mailing_lists_create.php
index 0187ad2..9eb9c31 100755
--- a/src/cronjobs/mail/mailing_lists_create.php
+++ b/src/cronjobs/mail/mailing_lists_create.php
@@ -31,7 +31,7 @@
 //	The @DATA_PATH@/dumps/mailman-aliases file will then be read by the mailaliases.php file
 //
 
-require dirname(__FILE__).'/../../www/env.inc.php';
+require dirname(__FILE__).'/../../common/include/env.inc.php';
 require_once $gfcommon.'include/pre.php';
 require $gfcommon.'include/cron_utils.php';
 
diff --git a/src/cronjobs/mail/tracker_gateway.php b/src/cronjobs/mail/tracker_gateway.php
index 814ba4e..476bcc0 100755
--- a/src/cronjobs/mail/tracker_gateway.php
+++ b/src/cronjobs/mail/tracker_gateway.php
@@ -28,7 +28,7 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-require dirname(__FILE__).'/../www/env.inc.php';
+require dirname(__FILE__).'/../../common/include/env.inc.php';
 require_once $gfcommon.'include/pre.php';
 require_once $gfcommon.'include/Group.class.php';
 require_once $gfcommon.'include/MailParser.class.php';
diff --git a/src/cronjobs/scm/create_scm_repos.php b/src/cronjobs/scm/create_scm_repos.php
index 0121df1..c023ba7 100755
--- a/src/cronjobs/scm/create_scm_repos.php
+++ b/src/cronjobs/scm/create_scm_repos.php
@@ -21,7 +21,7 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-require dirname(__FILE__).'/../common/include/env.inc.php';
+require dirname(__FILE__).'/../../common/include/env.inc.php';
 require_once $gfcommon.'include/pre.php';
 require_once $gfcommon.'include/cron_utils.php';
 
diff --git a/src/cronjobs/scm/gather_scm_stats.php b/src/cronjobs/scm/gather_scm_stats.php
index 24c3802..01643cc 100755
--- a/src/cronjobs/scm/gather_scm_stats.php
+++ b/src/cronjobs/scm/gather_scm_stats.php
@@ -22,7 +22,7 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-require (dirname(__FILE__).'/../www/env.inc.php');
+require dirname(__FILE__).'/../../common/include/env.inc.php';
 require_once $gfcommon.'include/pre.php';
 require_once $gfcommon.'include/cron_utils.php';
 
diff --git a/src/cronjobs/scm/generate_scm_snapshots.php b/src/cronjobs/scm/generate_scm_snapshots.php
index e8ec54e..d135d7d 100755
--- a/src/cronjobs/scm/generate_scm_snapshots.php
+++ b/src/cronjobs/scm/generate_scm_snapshots.php
@@ -21,7 +21,7 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-require (dirname(__FILE__).'/../www/env.inc.php');
+require dirname(__FILE__).'/../../common/include/env.inc.php';
 require_once $gfcommon.'include/pre.php';
 require_once $gfcommon.'include/cron_utils.php';
 
diff --git a/src/cronjobs/shell/homedirs.php b/src/cronjobs/shell/homedirs.php
index 54097ed..4573a71 100755
--- a/src/cronjobs/shell/homedirs.php
+++ b/src/cronjobs/shell/homedirs.php
@@ -54,7 +54,7 @@
 
 */
 
-require dirname(__FILE__).'/../common/include/env.inc.php';
+require dirname(__FILE__).'/../../common/include/env.inc.php';
 require_once $gfcommon.'include/pre.php';
 require $gfcommon.'include/cron_utils.php';
 
@@ -103,7 +103,7 @@ if (forge_get_config('use_ftp_uploads')) {
 
 /* read in the group home template file */
 $contents = '';
-if (($fo = fopen(dirname(__FILE__) . '/../templates/default_page.php', 'r'))) {
+if (($fo = fopen(dirname(__FILE__) . '/../../templates/default_page.php', 'r'))) {
 	while (!feof($fo)) {
 		$contents .= fread($fo, 8192);
 	}
diff --git a/src/cronjobs/shell/ssh_create.php b/src/cronjobs/shell/ssh_create.php
index 06a8bd7..cd1386d 100755
--- a/src/cronjobs/shell/ssh_create.php
+++ b/src/cronjobs/shell/ssh_create.php
@@ -27,7 +27,7 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-require dirname(__FILE__).'/../common/include/env.inc.php';
+require dirname(__FILE__).'/../../common/include/env.inc.php';
 require_once $gfcommon.'include/pre.php';
 require $gfcommon.'include/cron_utils.php';
 
diff --git a/tests/func/10_Site/topTest.php b/tests/func/10_Site/topTest.php
index 156452e..d07682a 100644
--- a/tests/func/10_Site/topTest.php
+++ b/tests/func/10_Site/topTest.php
@@ -59,7 +59,7 @@ class TopTester extends FForge_SeleniumTestCase
 	    $this->clickAndWait("submit");
 	    $this->assertTextPresent("Message Posted Successfully");
 
-	    $this->cron("project_weekly_metric.php");
+	    $this->cron("db/project_weekly_metric.php");
 
 	    // Test that from the main page we access the most active this week.
 	    $this->clickAndWait("link=Home");
diff --git a/tests/func/40_SSH/sshTest.php b/tests/func/40_SSH/sshTest.php
index fe97600..146b1c9 100644
--- a/tests/func/40_SSH/sshTest.php
+++ b/tests/func/40_SSH/sshTest.php
@@ -34,8 +34,8 @@ class SSHTest extends FForge_SeleniumTestCase
 	    
 		// Run the cronjobs
 		$this->reload_nscd();
-		$this->cron("homedirs.php");
-		$this->cron("ssh_create.php");
+		$this->cron("shell/homedirs.php");
+		$this->cron("shell/ssh_create.php");
 
 		$verbose = 0;
 		$v = '';
diff --git a/tests/func/50_PluginsScmBzr/bzrTest.php b/tests/func/50_PluginsScmBzr/bzrTest.php
index d290009..84a5391 100644
--- a/tests/func/50_PluginsScmBzr/bzrTest.php
+++ b/tests/func/50_PluginsScmBzr/bzrTest.php
@@ -41,7 +41,7 @@ class ScmBzrTest extends FForge_SeleniumTestCase
 		$this->clickAndWait("submit");
 	    
 		// Run the cronjob to create repositories
-		$this->cron("create_scm_repos.php");
+		$this->cron("scm/create_scm_repos.php");
 
 		// Check that the repo is present and Loggerhead shows it (even if empty)
 		$this->open(ROOT);
diff --git a/tests/func/50_PluginsScmGit/gitSSHTest.php b/tests/func/50_PluginsScmGit/gitSSHTest.php
index f282dde..a38c284 100644
--- a/tests/func/50_PluginsScmGit/gitSSHTest.php
+++ b/tests/func/50_PluginsScmGit/gitSSHTest.php
@@ -44,9 +44,9 @@ class ScmGitSSHTest extends FForge_SeleniumTestCase
 	    
 		// Run the cronjob to create repositories
 		$this->reload_nscd();
-		$this->cron("create_scm_repos.php");
-		$this->cron("homedirs.php");
-		$this->cron("ssh_create.php");
+		$this->cron("scm/create_scm_repos.php");
+		$this->cron("shell/homedirs.php");
+		$this->cron("shell/ssh_create.php");
 
 		// Get the address of the repo
 		$this->open(ROOT);
diff --git a/tests/func/50_PluginsScmGit/gitWUITest.php b/tests/func/50_PluginsScmGit/gitWUITest.php
index d30b86c..6881893 100644
--- a/tests/func/50_PluginsScmGit/gitWUITest.php
+++ b/tests/func/50_PluginsScmGit/gitWUITest.php
@@ -55,7 +55,7 @@ class ScmGitWUITest extends FForge_SeleniumTestCase
 		$this->assertTextPresent("You have now requested a personal Git repository");
 
 		// Run the cronjob to create repositories
-		$this->cron("create_scm_repos.php");
+		$this->cron("scm/create_scm_repos.php");
 
 		$this->clickAndWait("link=SCM");
 		$this->assertTextPresent("Access to your personal repository");
@@ -76,7 +76,7 @@ class ScmGitWUITest extends FForge_SeleniumTestCase
 		$this->assertTextPresent("Repository other-repo is marked for deletion");
 
 		// Run the cronjob to create repositories
-		$this->cron("create_scm_repos.php");
+		$this->cron("scm/create_scm_repos.php");
 
 		$this->open(ROOT.'/plugins/scmgit/cgi-bin/gitweb.cgi?a=project_list;pf=projecta');
 		$this->waitForPageToLoad();
diff --git a/tests/func/50_PluginsScmSvn/svnSSHTest.php b/tests/func/50_PluginsScmSvn/svnSSHTest.php
index e45b9ff..519fce6 100644
--- a/tests/func/50_PluginsScmSvn/svnSSHTest.php
+++ b/tests/func/50_PluginsScmSvn/svnSSHTest.php
@@ -44,9 +44,9 @@ class ScmSvnSSHTest extends FForge_SeleniumTestCase
 	    
 		// Run the cronjob to create repositories
 		$this->reload_nscd();
-		$this->cron("create_scm_repos.php");
-		$this->cron("homedirs.php");
-		$this->cron("ssh_create.php");
+		$this->cron("scm/create_scm_repos.php");
+		$this->cron("shell/homedirs.php");
+		$this->cron("shell/ssh_create.php");
 
 		// Get the address of the repo
 		$this->open(ROOT);
diff --git a/tests/func/50_PluginsScmSvn/svnWUITest.php b/tests/func/50_PluginsScmSvn/svnWUITest.php
index 8c96459..8776fcc 100644
--- a/tests/func/50_PluginsScmSvn/svnWUITest.php
+++ b/tests/func/50_PluginsScmSvn/svnWUITest.php
@@ -38,7 +38,7 @@ class ScmSvnWUITest extends FForge_SeleniumTestCase
 		$this->clickAndWait("submit");
 	    
 		// Run the cronjob to create repositories
-		$this->cron("create_scm_repos.php");
+		$this->cron("scm/create_scm_repos.php");
 
 		$this->open(ROOT);
 		$this->clickAndWait("link=ProjectA");
diff --git a/tests/func/Testing/SeleniumForge.php b/tests/func/Testing/SeleniumForge.php
index 3195918..7650fa0 100644
--- a/tests/func/Testing/SeleniumForge.php
+++ b/tests/func/Testing/SeleniumForge.php
@@ -294,7 +294,7 @@ class FForge_SeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase
 		$this->init($project, $user);
 
 		// Run manually the cron for creating the svn structure.
-		$this->cron("create_scm_repos.php");
+		$this->cron("scm/create_scm_repos.php");
 	}
 
 	protected function login($username)

commit e5396bdb61708301a7c63a813b07f27a6d2991b4
Author: Sylvain Beucler <sylvain.beucler at inria.fr>
Date:   Tue Aug 26 11:16:26 2014 +0200

    install: package scmsvn

diff --git a/src/debian/control b/src/debian/control
index 3307716..1afd4c7 100644
--- a/src/debian/control
+++ b/src/debian/control
@@ -13,7 +13,7 @@ Vcs-Browser: https://fusionforge.org/scm/browser.php?group_id=9
 Package: fusionforge
 Architecture: all
 Depends: fusionforge-common (=${source:Version}), fusionforge-web, ${misc:Depends}
-Recommends: fusionforge-shell
+Recommends: fusionforge-shell, fusionforge-plugin-scmsvn
 Suggests: fusionforge-plugin-mediawiki
 Description: FusionForge collaborative development tool - standard metapackage
  FusionForge provides many tools to aid collaboration in a
@@ -118,7 +118,7 @@ Description: collaborative development tool - HTTPD authentication plugin
 Package: fusionforge-plugin-mediawiki
 Architecture: all
 Depends: fusionforge-web, mediawiki (>= 1:1.19.1-2~exp2), php5-cli, ${misc:Depends}
-Description: Mediawiki plugin for FusionForge
+Description: collaborative development tool - Mediawiki plugin
  FusionForge provides many tools to aid collaboration in a
  development project, such as bug-tracking, task management,
  mailing-lists, SCM repository, forums, support request helper,
@@ -126,3 +126,18 @@ Description: Mediawiki plugin for FusionForge
  integrated into one web site and managed through a web interface.
  .
  This plugin allows each project to embed Mediawiki under a tab.
+
+
+Package: fusionforge-plugin-scmsvn
+Architecture: all
+Depends: fusionforge-web, subversion, subversion-tools, php5-cli, openbsd-inetd | inet-superserver, update-inetd, ${misc:Depends}
+Description: collaborative development tool - Subversion plugin
+ FusionForge provides many tools to aid collaboration in a
+ development project, such as bug-tracking, task management,
+ mailing-lists, SCM repository, forums, support request helper,
+ web/FTP hosting, release management, etc. All these services are
+ integrated into one web site and managed through a web interface.
+ .
+ This plugin contains the Subversion subsystem of FusionForge. It allows
+ each FusionForge project to have its own Subversion repository, and gives
+ some control over it to the project's administrator.
diff --git a/src/debian/rules b/src/debian/rules
index 08c4faf..aa38aa7 100755
--- a/src/debian/rules
+++ b/src/debian/rules
@@ -28,3 +28,4 @@ override_dh_auto_install:
 	make install-web    prefix=/usr DESTDIR=$(CURDIR)/debian/fusionforge-web
 	make install-plugin-authhttpd prefix=/usr DESTDIR=$(CURDIR)/debian/fusionforge-plugin-authhttpd
 	make install-plugin-mediawiki prefix=/usr DESTDIR=$(CURDIR)/debian/fusionforge-plugin-mediawiki
+	make install-plugin-scmsvn    prefix=/usr DESTDIR=$(CURDIR)/debian/fusionforge-plugin-scmsvn
diff --git a/src/fusionforge.spec b/src/fusionforge.spec
index b159387a..2b795eb 100644
--- a/src/fusionforge.spec
+++ b/src/fusionforge.spec
@@ -57,6 +57,7 @@ install_listfiles shell
 install_listfiles web
 install_listfiles plugin-authhttpd
 install_listfiles plugin-mediawiki
+install_listfiles plugin-scmsvn
 
 
 
@@ -187,7 +188,7 @@ FusionForge, for instance where Kerberos is used.
 
 
 %package plugin-mediawiki
-Summary: Mediawiki plugin for FusionForge
+Summary: collaborative development tool - Mediawiki plugin
 Group: Development/Tools
 Requires: %{name}-web >= %{version} mediawiki
 %description plugin-mediawiki
@@ -203,6 +204,25 @@ This plugin allows each project to embed Mediawiki under a tab.
 %{_datadir}/%{name}/post-install.d/plugin.sh mediawiki
 
 
+%package plugin-scmsvn
+Summary: collaborative development tool - Subversion plugin
+Group: Development/Tools
+Requires: %{name}-web >= %{version} subversion
+%description plugin-scmsvn
+FusionForge provides many tools to aid collaboration in a
+development project, such as bug-tracking, task management,
+mailing-lists, SCM repository, forums, support request helper,
+web/FTP hosting, release management, etc. All these services are
+integrated into one web site and managed through a web interface.
+
+This plugin contains the Subversion subsystem of FusionForge. It allows
+each FusionForge project to have its own Subversion repository, and gives
+some control over it to the project's administrator.
+%files plugin-scmsvn -f plugin-scmsvn.rpmfiles
+%post plugin-scmsvn
+%{_datadir}/%{name}/post-install.d/plugin.sh scmsvn
+
+
 %changelog
 * Tue Aug 19 2014 Sylvain Beucler <sylvain.beucler at inria.fr> - 5.3.50
 - Revamp packaging

commit 0da0cb90a0fc6e03f14b6f70514097735fc7892d
Author: Sylvain Beucler <sylvain.beucler at inria.fr>
Date:   Tue Aug 26 11:16:01 2014 +0200

    install: web: fix double NameVirtualHost warning

diff --git a/src/post-install.d/web/configure.sh b/src/post-install.d/web/configure.sh
index 70fd3d6..b172834 100755
--- a/src/post-install.d/web/configure.sh
+++ b/src/post-install.d/web/configure.sh
@@ -63,7 +63,10 @@ fi
 if [ -x /usr/sbin/a2dissite ]; then
     a2dissite default
 fi
-
+# Prevent double NameVirtualHost warning
+if [ -e /etc/apache2/ports.conf ]; then
+    sed -i 's/^NameVirtualHost \*:80/#&/' /etc/apache2/ports.conf
+fi
 # Start web server on boot
 if [ -e /etc/redhat-release ]; then
     chkconfig httpd on

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

Summary of changes:
 src/GNUmakefile                                    |    5 +-
 src/common/include/env.inc.php                     |    1 +
 src/cronjobs/db/calculate_user_metric.php          |    2 +-
 src/cronjobs/db/check_stale_tracker_items.php      |    2 +-
 src/cronjobs/db/daily_task_email.php               |    2 +-
 src/cronjobs/db/db_project_sums.php                |    2 +-
 src/cronjobs/db/db_stats_agg.php                   |    2 +-
 src/cronjobs/db/db_trove_maint.php                 |    2 +-
 src/cronjobs/db/massmail.php                       |    2 +-
 src/cronjobs/db/project_cleanup.php                |    2 +-
 src/cronjobs/db/project_weekly_metric.php          |    2 +-
 src/cronjobs/db/rating_stats.php                   |    2 +-
 src/cronjobs/db/reporting_cron.php                 |    2 +-
 src/cronjobs/db/rotate_activity.php                |    2 +-
 src/cronjobs/db/site_stats.php                     |    2 +-
 src/cronjobs/db/stats_projects-backfill.php        |    2 +-
 src/cronjobs/db/update_docdata_dataword.php        |    2 +-
 src/cronjobs/db/vacuum.php                         |    2 +-
 src/cronjobs/mail/forum_gateway.php                |    2 +-
 src/cronjobs/mail/mailaliases.php                  |    2 +-
 src/cronjobs/mail/mailing_lists_create.php         |    2 +-
 src/cronjobs/mail/tracker_gateway.php              |    2 +-
 src/cronjobs/scm/create_scm_repos.php              |    2 +-
 src/cronjobs/scm/gather_scm_stats.php              |    2 +-
 src/cronjobs/scm/generate_scm_snapshots.php        |    2 +-
 src/cronjobs/shell/homedirs.php                    |    4 +-
 src/cronjobs/shell/ssh_create.php                  |    2 +-
 src/debian/control                                 |   59 ++++++++--
 src/debian/fusionforge-common.postinst             |    2 +-
 ...e-db.postinst => fusionforge-db-local.postinst} |    0
 ...postinst => fusionforge-plugin-scmbzr.postinst} |    2 +-
 ...shell.prerm => fusionforge-plugin-scmbzr.prerm} |    2 +-
 src/debian/rules                                   |    4 +-
 src/etc/config.ini.d/defaults.ini                  |    1 +
 src/fusionforge.spec                               |  118 +++++++++++++++-----
 src/plugins/moinmoin/bin/install.sh                |    8 +-
 src/plugins/moinmoin/etc/moinmoin.ini              |    1 +
 src/plugins/scmbzr/bin/install.sh                  |   17 +--
 .../scmbzr/etc/httpd.conf.d/50-wsgi-scmbzr.conf    |    3 +-
 src/plugins/scmbzr/etc/scmbzr.ini                  |    2 +
 src/post-install.d/README                          |    4 +
 src/post-install.d/common/common.sh                |    7 ++
 src/post-install.d/common/plugin.sh                |   71 +++++++-----
 src/post-install.d/common/user.sh                  |    9 ++
 src/post-install.d/core.sh                         |   18 +--
 src/post-install.d/db/db.sh                        |    2 +-
 src/post-install.d/shell/shell.sh                  |    9 ++
 src/post-install.d/web/configure.sh                |    5 +-
 src/templates/httpd.conf.d/02-config-main.conf     |    2 +-
 tests/func/10_Site/topTest.php                     |    2 +-
 tests/func/40_SSH/sshTest.php                      |    4 +-
 tests/func/50_PluginsScmBzr/bzrTest.php            |    2 +-
 tests/func/50_PluginsScmGit/gitSSHTest.php         |    6 +-
 tests/func/50_PluginsScmGit/gitWUITest.php         |    4 +-
 tests/func/50_PluginsScmSvn/svnSSHTest.php         |    6 +-
 tests/func/50_PluginsScmSvn/svnWUITest.php         |    2 +-
 tests/func/Testing/SeleniumForge.php               |    4 +-
 tests/func/db_reload.sh                            |    2 +-
 tests/func/vncxstartsuite.sh                       |   21 +---
 tests/scripts/deb/install.sh                       |   25 ++---
 tests/scripts/deb/run-testsuite.sh                 |   10 +-
 tests/scripts/fusionforge-build-and-test-deb.sh    |   12 +-
 tests/scripts/fusionforge-build-and-test-rpm.sh    |   89 +++------------
 tests/scripts/phpunit.sh                           |   14 ++-
 tests/scripts/rpm/build.sh                         |    2 +-
 tests/scripts/rpm/install.sh                       |   86 ++++++++++----
 tests/scripts/rpm/run-testsuite.sh                 |   35 ++++++
 tests/scripts/rpm/uninstall.sh                     |    1 +
 68 files changed, 448 insertions(+), 283 deletions(-)
 rename src/debian/{fusionforge-db.postinst => fusionforge-db-local.postinst} (100%)
 copy src/debian/{fusionforge-common.postinst => fusionforge-plugin-scmbzr.postinst} (91%)
 copy src/debian/{fusionforge-shell.prerm => fusionforge-plugin-scmbzr.prerm} (91%)
 mode change 100644 => 100755 src/plugins/scmbzr/bin/install.sh
 create mode 100644 src/post-install.d/README
 create mode 100755 src/post-install.d/common/common.sh
 create mode 100755 src/post-install.d/common/user.sh
 create mode 100755 tests/scripts/rpm/run-testsuite.sh


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list