[evolvis-commits] r15315: Initial code for building & testing RPM packaging

mirabilos at evolvis.org mirabilos at evolvis.org
Mon Feb 28 23:55:03 CET 2011


Author: mirabilos
Date: 2011-02-28 23:55:03 +0100 (Mon, 28 Feb 2011)
New Revision: 15315

Added:
   trunk/gforge_base/evolvisforge-5.1/gforge/rpm-specific/dag-rpmforge.repo
   trunk/gforge_base/evolvisforge-5.1/gforge/rpm-specific/fusionforge.repo
   trunk/gforge_base/evolvisforge-5.1/gforge/rpm-specific/patches/LocalSettings.php
   trunk/gforge_base/evolvisforge-5.1/gforge/rpm-specific/patches/README.mediawiki.jlbond
   trunk/gforge_base/evolvisforge-5.1/gforge/rpm-specific/patches/fusionforge-4.8.3-ereg_preg.patch
   trunk/gforge_base/evolvisforge-5.1/gforge/rpm-specific/patches/fusionforge-4.8.3-mediawiki.patch
   trunk/gforge_base/evolvisforge-5.1/gforge/rpm-specific/patches/fusionforge-4.8.3-misc_fixes.patch
   trunk/gforge_base/evolvisforge-5.1/gforge/rpm-specific/patches/fusionforge-4.8.3-register_globals.patch
   trunk/gforge_base/evolvisforge-5.1/gforge/rpm-specific/patches/fusionforge-4.8.3-webcalendar.patch
   trunk/gforge_base/evolvisforge-5.1/tests/RPMCentos52Tests.php
   trunk/gforge_base/evolvisforge-5.1/tests/func/Testing/RPMSeleniumRemoteSuite.php
   trunk/gforge_base/evolvisforge-5.1/tests/func/Testing/TarSeleniumRemoteSuite.php
Removed:
   trunk/gforge_base/evolvisforge-5.1/gforge/docs/phpdoc/makedoc.sh
   trunk/gforge_base/evolvisforge-5.1/gforge/docs/phpdoc/phpDocumentor.ini.patch
Modified:
   trunk/gforge_base/evolvisforge-5.1/Makefile
   trunk/gforge_base/evolvisforge-5.1/Makefile.rh
   trunk/gforge_base/evolvisforge-5.1/gforge/cronjobs/auth_unix.php
   trunk/gforge_base/evolvisforge-5.1/gforge/cronjobs/create_scm_repos.php
   trunk/gforge_base/evolvisforge-5.1/gforge/cronjobs/ftp_create_group_access.php
   trunk/gforge_base/evolvisforge-5.1/gforge/cronjobs/get_news_notapproved.pl
   trunk/gforge_base/evolvisforge-5.1/gforge/cronjobs/gforge-db-backup.sh
   trunk/gforge_base/evolvisforge-5.1/gforge/cronjobs/homedirs.php
   trunk/gforge_base/evolvisforge-5.1/gforge/etc/gforge-httpd.conf.example
   trunk/gforge_base/evolvisforge-5.1/gforge/fusionforge.spec
   trunk/gforge_base/evolvisforge-5.1/gforge/install.sh
   trunk/gforge_base/evolvisforge-5.1/gforge/packaging/cron.d/cron.fusionforge
   trunk/gforge_base/evolvisforge-5.1/gforge/packaging/cron.d/fusionforge
   trunk/gforge_base/evolvisforge-5.1/tests/TarCentos52Tests.php
   trunk/gforge_base/evolvisforge-5.1/tests/func/Testing/SeleniumRemoteSuite.php
   trunk/gforge_base/evolvisforge-5.1/tests/scripts/start_vz.sh
   trunk/gforge_base/evolvisforge-5.1/tools/simulate_cron.pl
Log:
Initial code for building & testing RPM packaging

Modified: trunk/gforge_base/evolvisforge-5.1/Makefile
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/Makefile	2011-02-28 22:54:58 UTC (rev 15314)
+++ trunk/gforge_base/evolvisforge-5.1/Makefile	2011-02-28 22:55:03 UTC (rev 15315)
@@ -27,8 +27,10 @@
 	TAG=$(shell LANG=C svn log $(URL) -r $(ID) -l 1 2>/dev/null | awk '{ if ($$1=="Tag-Release") print $$1}')
 endif
 ifeq ($(TAG),)
+	VERSION_ID=$(VER)-$(ID)
 	VERSION=fusionforge-$(VER)-$(ID)
 else
+	VERSION_ID=$(VER)
 	VERSION=fusionforge-$(VER)
 endif
 

Modified: trunk/gforge_base/evolvisforge-5.1/Makefile.rh
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/Makefile.rh	2011-02-28 22:54:58 UTC (rev 15314)
+++ trunk/gforge_base/evolvisforge-5.1/Makefile.rh	2011-02-28 22:55:03 UTC (rev 15315)
@@ -4,6 +4,28 @@
 # TODO : document the role of this Makefile
 #
 
+RPM_TMP=~/rpmbuild
+BUILDRESULT=~/fusionforge_repo
+
+HTMLPURIFIER_VERSION=4.1.1
+
+VER=$(shell LANG=C grep '>software_version' gforge/common/include/FusionForge.class.php | cut -d\' -f2)
+in_svn_repo:= $(wildcard .svn/)
+ifeq ($(strip $(in_svn_repo)),)
+	ID=unknown
+	URL=unknown
+	TAG=unknown
+else
+	ID=$(shell LANG=C svnversion)
+	URL=$(shell LANG=C svn info | grep 'Root:' | awk '{print $$3}')
+	TAG=$(shell LANG=C svn log $(URL) -r $(ID) -l 1 2>/dev/null | awk '{ if ($$1=="Tag-Release") print $$1}')
+endif
+ifeq ($(TAG),)
+	version=$(VER).$(ID)
+else
+	version=$(VER)
+endif
+
 list:
 	@echo ======================================================================================
 	@echo '=                    Available target are listed below                               ='
@@ -11,65 +33,17 @@
 	@echo ======================================================================================
 	@cat Makefile.rh | grep '^.*:.*#$$' | sed 's/^\(.*:\).*#\(.*\)#$$/\1		\2/'
 
-#Do it all
-all: fusionforge allplugins allmodules allexternals dist          # Build fusionforge and plugins #
-clean: cleanff cleanplugins   # Clean fusionforge and plugins #
+all: fusionforge externals dist
 
-#GForge
-fusionforge: build          # Build fusionforge #
+externals : htmlpurifier php-jpgraph
 
-#Plugins 
-#allplugins: cvsplugin cvstrackerplugin ldapextauthplugin
-allplugins: cvsplugin svnplugin
-#cleanplugins: cleancvs cleansvn cleancvstracker cleanldapextauth cleanexternalsearch
-cleanplugins: cleancvs
-
-cvsplugin: buildcvs  # package cvs plugin #
-svnplugin: cleansvn buildsvn  # package svn plugin #
-#cvstrackerplugin: cleancvstracker buildcvstracker  # package cvstracker plugin #
-#ldapextauthplugin: cleanldapextauth buildldapextauth  # package ldapextauth plugin #
-#externalsearchplugin: cleanexternalsearch buildexternalsearch  # package externalsearch plugin #
-
-#Modules
-allmodules : libnsspgsql
-
-#Exterals
-allexternals : htmlpurifier php-jpgraph
-
-libnsspgsql : buildlibnsspgsql
-
-RPM_TMP=~/rpmbuild
-BUILDRESULT=~/fusionforge_repo
-
-# build a custom rpmmacro file and rpmrc to point to it for rpmbuild
-#rpmrc:
-#	echo 'include: /usr/lib/rpm/rpmrc' > ./rpmrc
-
-#rpmmacro:
-#	echo '$(shell rpmbuild --showrc | grep '^macrofiles'):./rpmmacros' >> ./rpmrc
-#	echo '%_topdir $(RPM_TMP)' > ./rpmmacros
-#	echo '%_rpmtopdir %{_topdir}' >> ./rpmmacros
-#	echo '%_builddir %{_rpmtopdir}/BUILD' >> ./rpmmacros
-#	echo '%_rpmdir %{_rpmtopdir}/RPMS' >> ./rpmmacros
-#	echo '%_sourcedir %{_rpmtopdir}/SOURCE' >> ./rpmmacros
-#	echo '%_specdir %{_rpmtopdir}/SPEC' >> ./rpmmacros
-#	echo '%_srcrpmdir %{_rpmtopdir}/SRPMS' >> ./rpmmacros
-#	echo '%_tmppath %{_rpmtopdir}/TMP' >> ./rpmmacros
-#	echo '%_buildroot %{_tmppath}/%{name}-root' >> ./rpmmacros
-
-#rpmprep: rpmrc rpmmacro
-#	-mkdir -p $(RPM_TMP)/BUILD $(RPM_TMP)/RPMS $(RPM_TMP)/SOURCE $(RPM_TMP)/SPEC $(RPM_TMP)/SRPMS $(RPM_TMP)/TMP 2> /dev/null
-
-#dist: rpmprep
-#	-mkdir ./dist 2> /dev/null
-#	mv ./*.bz2 $(RPM_TMP)/SRPMS/*.rpm ./dist
-
 rpmprep:
 	-rm -Rf $(RPM_TMP)/*
 	-rm -Rf ~/.rpmmacros
 	sh tools/rpmdev-setuptree
 	echo '%_tmppath %{_topdir}/TMP' >> ~/.rpmmacros
 	echo '%_buildroot %{_tmppath}/%{name}-root' >> ~/.rpmmacros
+	echo '%_sysconfdir /etc' >> ~/.rpmmacros
 	mkdir $(RPM_TMP)/TMP
 
 dist:
@@ -78,119 +52,25 @@
 	cp $(RPM_TMP)/RPMS/noarch/*.rpm  $(BUILDRESULT)
 	createrepo $(BUILDRESULT)
 
-#
-# FUSIONFORGE
-#
-target cleanff build : override version=$(shell grep '^Version:' gforge/fusionforge.spec | sed 's/.*:\s*\(.*\)/\1/')
+clean:		# Clean files of fusionforge build                         #
+	cd $(RPM_TMP)/SOURCES/; rm -rf fusionforge-$(version).tar.bz2 fusionforge-$(version)
 
-cleanff:		# Clean files of fusionforge build                         #
-	@cd $(RPM_TMP)/SOURCES/; rm -rf fusionforge-$(version).tar.bz2 fusionforge-$(version)
-	@echo cleanff Done
-
-build: rpmprep		# Build rpm fusionforge packages                               #
-	cd gforge; find . -type f | grep -v '/CVS/' | grep -v '/.svn/' | grep -v '/contrib/' | grep -v '/debian/' | grep -v docs/phpdoc/docs | cpio -pdumB --quiet $(RPM_TMP)/SOURCES/fusionforge-$(version)
-	cd $(RPM_TMP)/SOURCES/fusionforge-$(version); mv plugins ../;mkdir ../utils;mv utils/install-nsspgsql.sh ../utils/;mv utils/fusionforge-shell-postgresql.spec ../utils/
-	cd $(RPM_TMP)/SOURCES/fusionforge-$(version)/;  utils/manage-translations.sh build
-	cd $(RPM_TMP)/SOURCES/; cp fusionforge-$(version)/rpm-specific/patches/gforge-4.0-deb_rpm.patch .
+fusionforge: rpmprep		# Build rpm fusionforge packages                               #
+	cd gforge; find . -type f -or -type l | grep -v '/.svn/' | grep -v '/debian/' | cpio -pdumB --quiet $(RPM_TMP)/SOURCES/fusionforge-$(version)
+	cd $(RPM_TMP)/SOURCES/fusionforge-$(version)/; utils/manage-translations.sh build
+	rm -f $(RPM_TMP)/SOURCES/fusionforge-$(version)/utils/fusionforge-shell-postgresql.spec
+	cd $(RPM_TMP)/SOURCES/; cp fusionforge-$(version)/rpm-specific/patches/* .
 	cd $(RPM_TMP)/SOURCES/; tar cjf fusionforge-$(version).tar.bz2 fusionforge-$(version)
-	cd $(RPM_TMP)/SOURCES/; rpmbuild -ts --nodeps fusionforge-$(version).tar.bz2
+	sed -e 's/@@VERSION@@/$(version)/g' < gforge/fusionforge.spec > $(RPM_TMP)/TMP/fusionforge.spec
+	rpmbuild -bb $(RPM_TMP)/TMP/fusionforge.spec
 
 #
-# CVS PLUGIN
+# Building RPM for external components
 #
-target cleancvs buildcvs : override version=$(shell grep '^Version:' gforge/plugins/scmcvs/fusionforge-plugin-scmcvs.spec | sed 's/.*:\s*\(.*\)/\1/')
-
-cleancvs:               # Clean files of gforge-plugin-scmcvs build           #
-	@cd $(RPM_TMP)/SOURCES/; rm -rf fusionforge-plugin-scmcvs-$(version).tar.bz2 fusionforge-plugin-scmcvs-$(version)
-	@echo cleancvs Done
-
-buildcvs:               # Build rpm fusionforge-plugin-scmcvs package                  #
-	cd gforge/plugins/scmcvs; find . -type f | grep -v '/CVS/' | grep -v '/.svn/' | grep -v '/contrib/' | grep -v '/debian/' | cpio -pdumB --quiet $(RPM_TMP)/SOURCES/fusionforge-plugin-scmcvs-$(version)
-	cd $(RPM_TMP)/SOURCES; tar cjf fusionforge-plugin-scmcvs-$(version).tar.bz2 fusionforge-plugin-scmcvs-$(version)
-	cd $(RPM_TMP)/SOURCES; rpmbuild -ts --nodeps fusionforge-plugin-scmcvs-$(version).tar.bz2
-
-#
-# SVN PLUGIN
-#
-target cleansvn buildsvn : override version=$(shell grep '^Version:' gforge/plugins/scmsvn/fusionforge-plugin-scmsvn.spec | sed 's/.*:\s*\(.*\)/\1/')
-
-cleansvn:               # Clean files of gforge-plugin-scmcvs build           #
-	@cd $(RPM_TMP)/SOURCES/; rm -rf fusionforge-plugin-scmsvn-$(version).tar.bz2 fusionforge-plugin-scmsvn-$(version)
-	@echo cleansvn Done
-
-buildsvn:               # Build rpm gforge-plugin-scmsvn package                  #
-	cd gforge/plugins/scmsvn; find . -type f | grep -v '/CVS/' | grep -v '/.svn/' | grep -v contrib | grep -v '/debian/' | cpio -pdumvB --quiet $(RPM_TMP)/SOURCES/fusionforge-plugin-scmsvn-$(version)
-	mkdir -p $(RPM_TMP)/SOURCES/fusionforge-plugin-scmsvn-$(version)/bin
-	cp -rp gforge/rpm-specific/scripts/install-svn.sh $(RPM_TMP)/SOURCES/fusionforge-plugin-scmsvn-$(version)/bin
-	cd $(RPM_TMP)/SOURCES; tar cjf fusionforge-plugin-scmsvn-$(version).tar.bz2 fusionforge-plugin-scmsvn-$(version)
-	cd $(RPM_TMP)/SOURCES; rpmbuild -ta fusionforge-plugin-scmsvn-$(version).tar.bz2
-
-#
-# CVSTRACKER PLUGIN
-#
-#versioncvstracker:
-#override version=$(shell grep '^Version:' gforge-plugin-cvstracker/gforge-plugin-cvstracker.spec | sed 's/.*:\s*\(.*\)/\1/')
-
-#cleancvstracker: versioncvstracker               # Clean files of gforge-plugin-cvstracker build           #
-#	@rm -rf gforge-plugin-cvstracker-$(version).tar.bz2 gforge-plugin-cvstracker-$(version)
-#	@echo cleantracker Done
-#buildcvstracker: rpmprep versioncvstracker               # Build rpm gforge-plugin-cvstracker package                  #
-#	cd gforge-plugin-cvstracker ; find . -type f | grep -v '/CVS/' | grep -v contrib | grep -v debian | cpio -pdumvB ../gforge-plugin-cvstracker-$(version)
-#	tar cjf gforge-plugin-cvstracker-$(version).tar.bz2 gforge-plugin-cvstracker-$(version)
-#	rpmbuild -ta --rcfile rpmrc gforge-plugin-cvstracker-$(version).tar.bz2
-
-#
-# LDAPAUTH PLUGIN
-#
-#versionldapextauth:
-#override version=$(shell grep '^Version:' gforge-plugin-ldapextauth/gforge-plugin-ldapextauth.spec | sed 's/.*:\s*\(.*\)/\1/')
-
-#cleanldapextauth: versionldapextauth               # Clean files of gforge-plugin-ldapextauth build           #
-#	@rm -rf gforge-plugin-ldapextauth-$(version).tar.bz2 gforge-plugin-ldapextauth-$(version)
-#	@echo cleanldapextauth Done
-#buildldapextauth: rpmprep versionldapextauth               # Build rpm gforge-plugin-ldapextauth package                  #
-#	cd gforge-plugin-ldapextauth ; find . -type f | grep -v '/CVS/' | grep -v contrib | grep -v debian | cpio -pdumvB ../gforge-plugin-ldapextauth-$(version)
-#	tar cjf gforge-plugin-ldapextauth-$(version).tar.bz2 gforge-plugin-ldapextauth-$(version)
-#	rpmbuild -ta --rcfile rpmrc gforge-plugin-ldapextauth-$(version).tar.bz2
-
-#
-# EXTERNALSEARCH PLUGIN
-#
-#versionexternalsearch:
-#override version=$(shell grep '^Version:' gforge-plugin-externalsearch/gforge-plugin-externalsearch.spec | sed 's/.*:\s*\(.*\)/\1/')
-
-#cleanexternalsearch: versionexternalsearch               # Clean files of gforge-plugin-externalsearch build           #
-#	@rm -rf gforge-plugin-externalsearch-$(version).tar.bz2 gforge-plugin-externalsearch-$(version)
-#	@echo cleanexternalsearch Done
-#buildexternalsearch: rpmprep versionexternalsearch               # Build rpm gforge-plugin-externalsearch package                  #
-#	cd gforge-plugin-externalsearch ; find . -type f | grep -v '/CVS/' | grep -v contrib | grep -v debian | cpio -pdumvB ../gforge-plugin-externalsearch-$(version)
-#	tar cjf gforge-plugin-externalsearch-$(version).tar.bz2 gforge-plugin-externalsearch-$(version)
-#	rpmbuild -ta --rcfile rpmrc gforge-plugin-externalsearch-$(version).tar.bz2
-
-
-#
-# LIBNSS-PGSQL MODULE
-#
-target cleanlibnsspgsql buildlibnsspgsql : override version=$(shell grep '^Version:' gforge/utils/fusionforge-shell-postgresql.spec | sed 's/.*:\s*\(.*\)/\1/')
-
-cleanlibnsspgsql:               # Clean files of fusionforge-shell-postgresql          #
-	@cd $(RPM_TMP)/SOURCES/; rm -rf fusionforge-shell-postgresql-$(version).tar.bz2 fusionforge-shell-postgresql-$(version)
-	@echo cleanlibnsspgsql Done
-
-buildlibnsspgsql:               # Build rpm fusionforge-shell-postgresql package                  #
-	cd gforge/utils; find . -type f | grep -v '/CVS/' | grep -v '/.svn/' | grep -v '/contrib/' | grep -v '/debian/' | cpio -pdumB --quiet $(RPM_TMP)/SOURCES/fusionforge-shell-postgresql-$(version)
-	cd $(RPM_TMP)/SOURCES; tar cjf fusionforge-shell-postgresql-$(version).tar.bz2 fusionforge-shell-postgresql-$(version)
-	cd $(RPM_TMP)/SOURCES/; rpmbuild -ts --nodeps fusionforge-shell-postgresql-$(version).tar.bz2
-
-#
-# Building RPM for third party plugins
-#
-HTMLPURIFIER_VERSION=4.1.1
 htmlpurifier: rpmprep depot/htmlpurifier-$(HTMLPURIFIER_VERSION).tar.gz
 	cp depot/htmlpurifier-$(HTMLPURIFIER_VERSION).tar.gz $(RPM_TMP)/SOURCES/
 	rpmbuild --quiet --clean -ba 3rd-party/htmlpurifier/htmlpurifier.spec
 
-
 php-jpgraph: rpmprep
 	cp 3rd-party/php-jpgraph/libphp-jpgraph_1.5.2.orig.tar.gz $(RPM_TMP)/SOURCES/jpgraph-1.5.2.tar.gz
 	zcat 3rd-party/php-jpgraph/libphp-jpgraph_1.5.2-12.diff.gz > $(RPM_TMP)/SOURCES/libphp-jpgraph_1.5.2-12.diff


Property changes on: trunk/gforge_base/evolvisforge-5.1/gforge/cronjobs/auth_unix.php
___________________________________________________________________
Added: svn:executable
   + *


Property changes on: trunk/gforge_base/evolvisforge-5.1/gforge/cronjobs/create_scm_repos.php
___________________________________________________________________
Added: svn:executable
   + *


Property changes on: trunk/gforge_base/evolvisforge-5.1/gforge/cronjobs/ftp_create_group_access.php
___________________________________________________________________
Added: svn:executable
   + *


Property changes on: trunk/gforge_base/evolvisforge-5.1/gforge/cronjobs/get_news_notapproved.pl
___________________________________________________________________
Added: svn:executable
   + *


Property changes on: trunk/gforge_base/evolvisforge-5.1/gforge/cronjobs/gforge-db-backup.sh
___________________________________________________________________
Added: svn:executable
   + *


Property changes on: trunk/gforge_base/evolvisforge-5.1/gforge/cronjobs/homedirs.php
___________________________________________________________________
Added: svn:executable
   + *

Deleted: trunk/gforge_base/evolvisforge-5.1/gforge/docs/phpdoc/makedoc.sh
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/gforge/docs/phpdoc/makedoc.sh	2011-02-28 22:54:58 UTC (rev 15314)
+++ trunk/gforge_base/evolvisforge-5.1/gforge/docs/phpdoc/makedoc.sh	2011-02-28 22:55:03 UTC (rev 15315)
@@ -1,93 +0,0 @@
-#!/bin/bash
-
-#/**
-#  * makedoc - PHPDocumentor script to save your settings
-#  * 
-#  * Put this file inside your PHP project homedir, edit its variables and run whenever you wants to
-#  * re/make your project documentation.
-#  * 
-#  * The version of this file is the version of PHPDocumentor it is compatible.
-#  * 
-#  * It simples run phpdoc with the parameters you set in this file.
-#  * NOTE: Do not add spaces after bash variables.
-#  *
-#  * @copyright         makedoc.sh is part of PHPDocumentor project {@link http://freshmeat.net/projects/phpdocu/} and its LGPL
-#  * @author            Roberto Berto <darkelder (inside) users (dot) sourceforge (dot) net>
-#  * @version           Release-1.1.0
-#  */
-
-
-##############################
-# should be edited
-##############################
-
-#/**
-#  * title of generated documentation, default is 'Generated Documentation'
-#  * 
-#  * @var               string TITLE
-#  */
-TITLE="FusionForge PHP Documentation"
-
-#/** 
-#  * name to use for the default package. If not specified, uses 'default'
-#  *
-#  * @var               string PACKAGES
-#  */
-PACKAGES="FusionForge"
-
-#/** 
-#  * name of a directory(s) to parse directory1,directory2
-#  * $PWD is the directory where makedoc.sh 
-#  *
-#  * @var               string PATH_PROJECT
-#  */
-PATH_PROJECT=$PWD/../..
-
-#/**
-#  * path of PHPDoc executable
-#  *
-#  * @var               string PATH_PHPDOC
-#  */
-PATH_PHPDOC=/tmp/PhpDocumentor-1.4.3/phpdoc
-
-#/**
-#  * where documentation will be put
-#  *
-#  * @var               string PATH_DOCS
-#  */
-PATH_DOCS=$PWD/docs
-
-#/**
-#  * what outputformat to use (html/pdf)
-#  *
-#  * @var               string OUTPUTFORMAT
-#  */
-OUTPUTFORMAT=HTML
-
-#/** 
-#  * converter to be used
-#  *
-#  * @var               string CONVERTER
-#  */
-CONVERTER=Smarty
-
-#/**
-#  * template to use
-#  *
-#  * @var               string TEMPLATE
-#  */
-TEMPLATE=default
-
-#/**
-#  * parse elements marked as private
-#  *
-#  * @var               bool (on/off)           PRIVATE
-#  */
-PRIVATE=off
-
-# make documentation
-$PATH_PHPDOC -d $PATH_PROJECT -t $PATH_DOCS -ti "$TITLE" -dn $PACKAGES \
--o $OUTPUTFORMAT:$CONVERTER:$TEMPLATE -pp $PRIVATE
-
-
-# vim: set expandtab :

Deleted: trunk/gforge_base/evolvisforge-5.1/gforge/docs/phpdoc/phpDocumentor.ini.patch
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/gforge/docs/phpdoc/phpDocumentor.ini.patch	2011-02-28 22:54:58 UTC (rev 15314)
+++ trunk/gforge_base/evolvisforge-5.1/gforge/docs/phpdoc/phpDocumentor.ini.patch	2011-02-28 22:55:03 UTC (rev 15315)
@@ -1,19 +0,0 @@
---- phpDocumentor.ini.orig	2010-02-25 11:48:58.918048044 +0100
-+++ phpDocumentor.ini	2010-02-25 11:49:19.668076615 +0100
-@@ -22,7 +22,7 @@
- 
- ;; set max memory usage size to be very high, to avoid it crashing it the middle of its run
- ;; due to using a boatload of memory
--;;memory_limit = 512M
-+memory_limit = 1536M
- 
- [_phpDocumentor_phpfile_exts]
- php
-@@ -30,6 +30,7 @@
- php4
- phtml
- inc
-+class
- 
- ;; deprecated in 1.2
- ;; this list is informational only - the following tags will be parsed as

Modified: trunk/gforge_base/evolvisforge-5.1/gforge/etc/gforge-httpd.conf.example
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/gforge/etc/gforge-httpd.conf.example	2011-02-28 22:54:58 UTC (rev 15314)
+++ trunk/gforge_base/evolvisforge-5.1/gforge/etc/gforge-httpd.conf.example	2011-02-28 22:55:03 UTC (rev 15315)
@@ -1,7 +1,3 @@
-LoadModule dav_module         modules/mod_dav.so
-LoadModule dav_svn_module     modules/mod_dav_svn.so
-LoadModule authz_svn_module   modules/mod_authz_svn.so
-
 <VirtualHost _default_:80>
 	ServerName	gforge.company.com
 	DocumentRoot	/opt/gforge/www

Modified: trunk/gforge_base/evolvisforge-5.1/gforge/fusionforge.spec
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/gforge/fusionforge.spec	2011-02-28 22:54:58 UTC (rev 15314)
+++ trunk/gforge_base/evolvisforge-5.1/gforge/fusionforge.spec	2011-02-28 22:55:03 UTC (rev 15315)
@@ -1,41 +1,58 @@
-#%define dbhost			localhost
+#
+# RPM spec file for FusionForge
+#
+# Developed for 4.8 by JL Bond Consulting
+# Reworked for 5.1 by Alain Peyrat <aljeux at free.fr>
+#
+
+# Global Definitions
 %define dbname			gforge
 %define dbuser			gforge
 
-%if %{?hostname:0}%{!?hostname:1}
-	%define hostname `hostname`
-%endif
-%if %{?sitename:0}%{!?sitename:1}
-	%define sitename MyForge
-%endif
-%if %{?adminemail:0}%{!?adminemail:1}
-	%if "%hostname" == "localhost"
-		%define adminemail root at localhost.localdomain
-	%else
-		%define adminemail root@%hostname
-	%endif
-%endif
-%{!?release:%define release 1}
-
 %define gfuser			gforge
 %define gfgroup			gforge
 
+%define httpduser		apache
+%define httpdgroup		apache
+
+%define fforge_admin		fforgeadmin
+%define fforge_passwd		fforgeadmin
+
+%define GFORGE_DIR		%{_datadir}/gforge
+%define GFORGE_CONF_DIR		%{_sysconfdir}/gforge
+%define GFORGE_LANG_DIR         %{_datadir}/locale
+%define GFORGE_VAR_LIB		%{_var}/lib/gforge
+
+#%define reloadhttpd() /sbin/service httpd reload >/dev/null 2>&1
+%define reloadhttpd() /etc/init.d/httpd httpd reload >/dev/null 2>&1
+
+# RPM spec preamble
 Summary: FusionForge Collaborative Development Environment
 Name: fusionforge
-Version: 4.8.2
-Release: %{release}
+Version: @@VERSION@@
+Release: 1%{?dist}
 BuildArch: noarch
 License: GPL
 Group: Development/Tools
 Source0: %{name}-%{version}.tar.bz2
-URL: http://www.gforge.org/
+Source1: README.mediawiki.jlbond
+Source2: LocalSettings.php
+Patch0: fusionforge-4.8.3-ereg_preg.patch
+Patch1: fusionforge-4.8.3-webcalendar.patch
+Patch2: fusionforge-4.8.3-mediawiki.patch
+Patch3: fusionforge-4.8.3-register_globals.patch
+Patch4: fusionforge-4.8.3-misc_fixes.patch
+URL: http://www.fusionforge.org/
 BuildRoot: %{_tmppath}/%{name}-%{version}-root
+Packager: Alain Peyrat <aljeux at free.fr>
 
-Patch1000: gforge-4.0-deb_rpm.patch
+# requirements as derived from fusionforge-install-1-deps.php script
+Requires: httpd, mod_dav_svn, mod_ssl, php, php-pgsql, php-gd, php-mbstring, mailman, cvs, subversion
+Requires: postgresql, postgresql-libs, postgresql-server, postgresql-contrib
+Requires: postfix, rcs, wget, openssh, inetd, which, liberation-fonts
 
-AutoReqProv: off
 Requires: /bin/sh, /bin/bash
-Requires: perl, perl-DBI, perl-HTML-Parser, perl-Text-Autoformat, perl-Mail-Sendmail
+Requires: perl, perl-DBI, perl-HTML-Parser, perl-Text-Autoformat, perl-Mail-Sendmail, perl-Sort-Versions
 Requires: cronolog
 Requires: php-jpgraph php-gd
 #update sys_path_to_jpgraph in gforge.conf if you remove this line
@@ -43,73 +60,15 @@
 #Requires: libnss-pgsql >= 1.4
 Requires: mailman
 Requires: gettext
+Requires: htmlpurifier >= 4.0.0
+Requires: sed
+Requires: coreutils
+Requires: /usr/bin/newaliases
  
-BuildRequires: perl
+# BuildRequires: sed, perl
 
-# RedHat specific - distribution specific (fc = Fedora Core (or RHEL4 and Centos 4) - rh9 = RHL 9 - el3 = RHEL 3 or CentOS 3)
-%if "%{_vendor}" == "redhat"
-	%if %{?dist:0}%{!?dist:1}
-		%define dist fc
-	%endif
-	
-	%define httpduser		apache
-	%define httpdgroup		apache
-	%define httpddir		httpd
+Provides: gforge = %{version}
 
-Requires: httpd
-Requires: perl-DBD-Pg, php-pgsql
-	
-	%if "%{dist}" == "fc" 
-Requires: php-mbstring
-	%endif
-	%if "%{dist}" == "el3"
-Requires: rh-postgresql, rh-postgresql-server
-		%define postgresqlservice rhdb
-	%else
-Requires: postgresql, postgresql-server
-		%define postgresqlservice postgresql
-	%endif
-	
-	%define startpostgresql() service %postgresqlservice status | grep '(pid' >/dev/null 2>&1 || service %postgresqlservice start
-	%define reloadpostgresql() service %postgresqlservice reload
-	%define gracefulhttpd() service httpd graceful >/dev/null 2>&1
-%endif
-
-# SuSE specific
-%if "%{_vendor}" == "suse"
-	%define httpduser		wwwrun
-	%define httpdgroup		www
-	%define httpddir		apache2
-	
-Requires: postgresql, postgresql-server
-Requires: pgperl, jpeg
-Requires: php5
-Requires: php5-pgsql, php5-mbstring
-
-		# Start the postgresql service if needed
-		%define startpostgresql() /etc/init.d/postgresql status | grep 'running' >/dev/null 2>&1 || /etc/init.d/postgresql start
-		%define reloadpostgresql() /etc/init.d/postgresql reload >/dev/null 2>&1
-		%define gracefulhttpd() /etc/init.d/httpd graceful >/dev/null 2>&1
-%endif
-
-# Mandrake specific
-%if "%{_vendor}" == "MandrakeSoft"
-	%define httpduser		apache
-	%define httpdgroup		apache
-	%define httpddir		httpd
-	%define postgresqlservice postgresql
-	
-Requires: php-mbstring, webserver
-Requires: postgresql, postgresql-server
-Requires: perl-DBD-Pg, php-pgsql
-
-	%define startpostgresql() service %postgresqlservice status | grep '(pid' >/dev/null 2>&1 || service %postgresqlservice start
-	%define reloadpostgresql() service %postgresqlservice reload
-	%define gracefulhttpd() service httpd graceful >/dev/null 2>&1
-%endif
-
-Provides: gforge = %{Version}
-
 %description
 FusionForge provides many tools to aid collaboration in a
 development project, such as bug-tracking, task management,
@@ -117,297 +76,841 @@
 web/FTP hosting, release management, etc. All these services are
 integrated into one web site and managed through a web interface.
 
-# Macro for generating an environment variable (%1) with %2 random characters
-%define randstr() %1=`perl -e 'for ($i = 0, $bit = "!", $key = ""; $i < %2; $i++) {while ($bit !~ /^[0-9A-Za-z]$/) { $bit = chr(rand(90) + 32); } $key .= $bit; $bit = "!"; } print "$key";'`
+%package aselectextauth
+Summary: A-select external authentication for FusionForge
+Group: Development/Tools
+Requires: %{name} >= %{version}, php, postgresql
+%description aselectextauth
+A system for authenticating users in fusionforge. A-Select is a framework
+where users can be authenticated by several means with Authentication
+Service Providers.
 
-# Change password for admin user
-%define changepassword() echo "UPDATE users SET user_pw='%1', email='%{adminemail}' WHERE user_name='admin'" | su -l postgres -s /bin/sh -c "psql %dbname" >/dev/null 2>&1
+%package cvssyncmail
+Summary: Provides email notifications of changes to CVS repositories
+Group: Development/Tools
+Requires: %{name} >= %{version}, %{name}-scmcvs, python, php
+%description cvssyncmail
+This plugin adds the capability to notify users of changes to CVS repositories
+in FusionForge.
 
-%define GFORGE_DIR		%{_datadir}/gforge
-%define GFORGE_CONF_DIR		%{_sysconfdir}/gforge
-%define GFORGE_LANG_DIR         %{_datadir}/locale
-%define GFORGE_LIB_DIR		%{GFORGE_DIR}/lib
-%define GFORGE_DB_DIR		%{GFORGE_DIR}/db
-%define GFORGE_BIN_DIR		%{GFORGE_DIR}/bin
-%define PLUGINS_LIB_DIR		%{GFORGE_DIR}/plugins
-%define PLUGINS_CONF_DIR	%{GFORGE_CONF_DIR}/plugins
-#%define CACHE_DIR		/var/cache/gforge
-%define UPLOAD_DIR		/var/lib/gforge/upload
-%define SCM_TARBALLS_DIR	/var/lib/gforge/scmtarballs
-%define SCM_SNAPSHOTS_DIR	/var/lib/gforge/scmsnapshots
-%define CROND_DIR		/%{_sysconfdir}/cron.d
-%define HTTPD_CONF_DIR		/%{_sysconfdir}/%{httpddir}
-%define SBIN_DIR		%{_sbindir}
+%package cvstracker
+Summary: Links CVS log messages to trackers and tasks.
+Group: Development/Tools
+Requires: %{name} >= %[version}, %{name}-scmcvs, php, postgresql
+%description cvstracker
+This is a fusionforge plugin that allows linking CVS log messages to
+trackers and tasks. It will review all commits in a project and search for
+specific string to know which task or tracker is related.
 
+%package externalsearch
+Summary: external search plugin for FusionForge
+Group: Development/Tools
+Requires: %{name} >= %{version}, php
+%description externalsearch
+This plugin adds a new search engine to your FusionForge site. It allows
+your users to search your FusionForge site through external search engines
+which have indexed it. You can define search engines you want to use in
+the configuration file.
+
+%package fckeditor
+Summary: FCKEditor plugin for FusionForge
+Group: Development/Tools
+Requires: %{name} >= %{version}, php
+%description fckeditor
+FCKEditor is a text editor that displays within a web browser.
+
+#%package helloworld
+#Summary: Hello World sample FusionForge plugin
+#Group: Development/Tools
+#Requires: %{name} >= %{version}, php
+#%description helloworld
+#Helloworld plugin is just a sample FusionForge plugin to aid developers.
+
+%package ldapextauth
+Summary: external LDAP authentication for FusionForge plugin
+Group: Development/Tools
+Requires: %{name} >= %{version}, php
+%description ldapextauth
+This plugin provides LDAP authentication capability for FusionForge.
+
+%package mantis
+Summary: MantisBT plugin for FusionForge
+Group: Development/Tools
+Requires: %{name} >= %{version}, php
+%description mantis
+A plugin to use the MantisBT web-based bug tracking system with FusionForge.
+
+%package mediawiki
+Summary: Mediawiki plugin for FusionForge
+Group: Development/Tools
+Requires: %{name} >= %{version}, php, mediawiki
+%description mediawiki
+This is a plugin to integrate MediaWiki within FusionForge.
+
+%package online_help
+Summary: online_help plugin for FusionForge
+Group: Development/Tools
+Requires: %{name} >= %{version}, php
+%description online_help
+This is a online_help plugin within FusionForge.
+
+%package projects_hierarchy
+Summary: projects_hierarchy plugin for FusionForge
+Group: Development/Tools
+Requires: %{name} >= %{version}, php
+%description projects_hierarchy
+This is a projects_hierarchy plugin within FusionForge.
+
+%package quota_management
+Summary: quota_management plugin for FusionForge
+Group: Development/Tools
+Requires: %{name} >= %{version}, php
+%description quota_management
+This is a quota_management plugin within FusionForge.
+
+%package scmarch
+Summary: Arch version control plugin for FusionForge
+Group: Development/Tools
+Requires: %{name} >= %{version}, php, arch
+%description scmarch
+This is a plugin to integrate Arch version control system with FusionForge
+
+%package scmbzr
+Summary: Bazaar version control plugin for FusionForge
+Group: Development/Tools
+Requires: %{name} >= %{version}, php, bazaar
+%description scmbzr
+This is a plugin to integrate Bazaar version control system with FusionForge
+
+%package scmdarcs
+Summary: DARCS version control plugin for FusionForge
+Group: Development/Tools
+Requires: %{name} >= %{version}, php, darcs
+%description scmdarcs
+This is a plugin to integrate DARCS version control system with FusionForge
+
+%package scmgit
+Summary: Bazaar version control plugin for FusionForge
+Group: Development/Tools
+Requires: %{name} >= %{version}, php, git
+%description scmgit
+This is a plugin to integrate Bazaar version control system with FusionForge
+
+%package scmhg
+Summary: Mercurial (hg) version control plugin for FusionForge
+Group: Development/Tools
+Requires: %{name} >= %{version}, php, hg
+%description scmhg
+This is a plugin to integrate Mercurial (hg) version control system with FusionForge
+
+%package scmccase
+Summary: Clear Case plugin for FusionForge
+Group: Development/Tools
+Requires: %{name} >= %{version}, php
+%description scmccase
+This is the Clear Case plugin for FusionForge. It creats Clear Case repositories
+for projects within FusionForge.
+
+%package scmcvs
+Summary: CVS plugin for FusionForge
+Group: Development/Tools
+Requires: %{name} >= %{version}, php, cvs
+%description scmcvs
+FusionForge is a web-based Collaborative Development Environment offering
+easy access to CVS, mailing lists, bug tracking, message
+boards/forums, task management, permanent file archival, and total
+web-based administration.
+
+This RPM installs SCM CVS plugin for FusionForge and provides CVS support
+to FusionForge.
+
+It also provides a specific version of CVSWeb wrapped in FusionForge.
+
+%package scmsvn
+Summary: Subversion plugin for FusionForge
+Group: Development/Tools
+Requires: %{name} >= %{version}, php, subversion
+%description scmsvn
+This RPM installs SCM SVN plugin for FusionForge and provides svn support
+to FusionForge.
+
+%package svncommitemail
+Summary: subversion commit email plugin for FusionForge
+Group: Development/Tools
+Requires: %{name} >= %{version}, php, subversion, perl
+%description svncommitemail
+This RPM installs subversion commit email notification plugin for FusionForge.
+
+%package svntracker
+Summary: SVNTracker plugin for FusionForge
+Group: Development/Tools
+Requires: %{name} >= %{version}, php, subversion, perl, postgresql
+%description svntracker
+SVNTracker plugin allows linking SVN log messages to Trackers and tasks.
+It will review all commits in a project and search for a specific string
+to know which task or tracker is related.
+
+%package webcalendar
+Summary: webcalendar plugin for FusionForge
+Group: Development/Tools
+Requires: %{name} >= %{version}, php, postgresql
+%description webcalendar
+WebCalendar plugin for FusionForge.
+
+%package blocks
+Summary: Blocks plugin for FusionForge
+Group: Development/Tools
+Requires: %{name} >= %{version}
+%description blocks
+HTML blocks plugin for FusionForge. 
+
+%package extratabs
+Summary: extratabs plugin for FusionForge
+Group: Development/Tools
+Requires: %{name} >= %{version}
+%description extratabs
+HTML extratabs plugin for FusionForge. 
+
+%package wiki
+Summary: Wiki plugin for FusionForge
+Group: Development/Tools
+Requires: %{name} >= %{version}, php, postgresql
+%description wiki
+Wiki plugin for FusionForge. Allows for one wiki per project, integrated search,
+page edits displayed on activity tab, and multi-project wiki preferences.
+
+%package projectlabels
+Summary: Labels plugin for FusionForge
+Group: Development/Tools
+Requires: %{name} >= %{version}, php, postgresql
+%description projectlabels
+Project Labels plugin for FusionForge. 
+
+%package contribtracker
+Summary: contribtracker plugin for FusionForge
+Group: Development/Tools
+Requires: %{name} >= %{version}, php, postgresql
+%description contribtracker
+contribtracker plugin for FusionForge. 
+
+%package globalsearch
+Summary: globalsearch plugin for FusionForge
+Group: Development/Tools
+Requires: %{name} >= %{version}, php, postgresql
+%description globalsearch
+globalsearch plugin for FusionForge. 
+
+%package mantisbt
+Summary: mantisbt plugin for FusionForge
+Group: Development/Tools
+Requires: %{name} >= %{version}, php, postgresql
+%description mantisbt
+mantisbt plugin for FusionForge. 
+
 %prep
 %setup
-%patch1000 -p1
+#%patch0 -p1
+#%patch1 -p1
+#%patch2 -p1
+#%patch3 -p1
+#%patch4 -p1
 
 %build
+# empty build section
 
 %install
-# cleaning build environment
-[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
+%{__rm} -rf $RPM_BUILD_ROOT
 
 # creating required directories
-install -m 755 -d $RPM_BUILD_ROOT/%{GFORGE_DIR}
-install -m 755 -d $RPM_BUILD_ROOT/%{GFORGE_CONF_DIR}
-install -m 755 -d $RPM_BUILD_ROOT/%{GFORGE_LANG_DIR}
-install -m 755 -d $RPM_BUILD_ROOT/%{GFORGE_BIN_DIR}
-install -m 755 -d $RPM_BUILD_ROOT/%{GFORGE_LIB_DIR}
-install -m 755 -d $RPM_BUILD_ROOT/%{UPLOAD_DIR}
-#install -m 755 -d $RPM_BUILD_ROOT/%{CACHE_DIR}
-install -m 755 -d $RPM_BUILD_ROOT/%{SCM_TARBALLS_DIR}
-install -m 755 -d $RPM_BUILD_ROOT/%{SCM_SNAPSHOTS_DIR}
-install -m 755 -d $RPM_BUILD_ROOT/%{PLUGINS_LIB_DIR}
-install -m 755 -d $RPM_BUILD_ROOT/%{SBIN_DIR}
-install -m 755 -d $RPM_BUILD_ROOT/%{HTTPD_CONF_DIR}/conf.d
-install -m 755 -d $RPM_BUILD_ROOT/%{CROND_DIR}
+%{__install} -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d
+%{__install} -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/cron.d
+%{__install} -m 755 -d $RPM_BUILD_ROOT/bin
+%{__install} -m 755 -d $RPM_BUILD_ROOT%{GFORGE_DIR}
+%{__install} -m 755 -d $RPM_BUILD_ROOT%{GFORGE_DIR}/lib
+%{__install} -m 755 -d $RPM_BUILD_ROOT%{GFORGE_CONF_DIR}
+%{__install} -m 755 -d $RPM_BUILD_ROOT%{GFORGE_CONF_DIR}/{httpd.d,plugins}
+%{__install} -m 755 -d $RPM_BUILD_ROOT%{GFORGE_LANG_DIR}
+%{__install} -m 755 -d $RPM_BUILD_ROOT%{GFORGE_VAR_LIB}
+%{__install} -m 755 -d $RPM_BUILD_ROOT%{GFORGE_VAR_LIB}/{upload,scmtarballs,scmsnapshots}
+%{__install} -m 755 -d $RPM_BUILD_ROOT%{GFORGE_VAR_LIB}/{homedirs,svnroot,cvsroot,dumps}
+%{__install} -m 755 -d $RPM_BUILD_ROOT/home/groups
+# mock mediawiki directory because we symlink GForge skin to Monobook
+%{__install} -m 755 -d $RPM_BUILD_ROOT/usr/share/mediawiki/skins
 
+# we define a search and replace function, we'll be using this a lot
+# to fix several parts of the installation
+search_and_replace()
+{
+    for i in `/usr/bin/find . -type f`
+    do
+	if $(grep -q ${1} $i) ; then
+	    %{__sed} -i -e "s+${1}+${2}+g" $i
+	fi
+    done
+}
+
+# we need to fix up the fusionforge-install-3-db.php script to ref %{GFORGE_DIR}
+search_and_replace "/opt/gforge" "/usr/share/gforge"
+
 # installing gforge
-for i in common cronjobs etc rpm-specific utils www ; do
-	cp -rp $i $RPM_BUILD_ROOT/%{GFORGE_DIR}/
-done
-#create a repository to link the plugins web pages
-install -m 755 -d $RPM_BUILD_ROOT/%{GFORGE_DIR}/www/plugins
+%{__cp} -a * $RPM_BUILD_ROOT/%{GFORGE_DIR}/
 
-install -m 750 setup $RPM_BUILD_ROOT/%{GFORGE_DIR}/
-chmod 755 $RPM_BUILD_ROOT/%{GFORGE_DIR}/utils/fill-in-the-blanks.pl
-chmod 755 $RPM_BUILD_ROOT/%{GFORGE_DIR}/www/scm/viewvc/bin/cgi/viewvc.cgi
+# create project vhost space symlink
+%{__ln_s} /home/groups $RPM_BUILD_ROOT/%{GFORGE_VAR_LIB}/homedirs/groups
+# create SVN repo default location symlink
+%{__ln_s} %{GFORGE_VAR_LIB}/svnroot $RPM_BUILD_ROOT/svnroot
+# create CVS repo default location symlink
+%{__ln_s} %{GFORGE_VAR_LIB}/cvsroot $RPM_BUILD_ROOT/cvsroot
+# install restricted shell for cvs accounts
+%{__cp} -a plugins/scmcvs/bin/cvssh.pl $RPM_BUILD_ROOT/bin/
 
-cp -rp db/. $RPM_BUILD_ROOT/%{GFORGE_DB_DIR}/
-cp -p deb-specific/sf-2.6-complete.sql $RPM_BUILD_ROOT/%{GFORGE_DB_DIR}/
+# copy over configuration files
+# - main configuration file
+## fix up local.inc.example before we use it
+### - replace apacheuser / apachegroup with %{httpduser} and %{httpdgroup}
+%{__sed} -i -e "s/apacheuser/%{httpduser}/g" etc/local.inc.example
+%{__sed} -i -e "s/apachegroup/%{httpdgroup}/g" etc/local.inc.example
+%{__sed} -i -e "s!/path/to/gforge!%{GFORGE_DIR}!g" etc/local.inc.example
 
-for i in deb-specific/sqlhelper.pm deb-specific/sqlparser.pm utils/include.pl ; do
-	cp -p $i $RPM_BUILD_ROOT/%{GFORGE_LIB_DIR}/
-done
-for i in db-upgrade.pl register-plugin unregister-plugin register-theme unregister-theme install-db.sh; do
-	install -m 755 deb-specific/$i $RPM_BUILD_ROOT/%{GFORGE_BIN_DIR}/
-done
+### - replace sys_dbname and sys_dbuser with %{dbname} and %{dbuser}
+### - fix various sys_* variables
+%{__cp} -a etc/local.inc.example $RPM_BUILD_ROOT/%{GFORGE_CONF_DIR}/local.inc
+%{__sed} -i -e "s/\$sys_dbname=.*/\$sys_dbname='%{dbname}';/g" $RPM_BUILD_ROOT%{GFORGE_CONF_DIR}/local.inc
+%{__sed} -i -e "s/\$sys_dbuser=.*/\$sys_dbuser='%{dbuser}';/g" $RPM_BUILD_ROOT%{GFORGE_CONF_DIR}/local.inc
+%{__sed} -i -e "s|\$sys_plugins_path=.*|\$sys_plugins_path=\"%{GFORGE_DIR}/plugins\";|g" $RPM_BUILD_ROOT%{GFORGE_CONF_DIR}/local.inc
+%{__sed} -i -e "s|\$sys_upload_dir=.*|\$sys_upload_dir=\"\$sys_var_path/upload\";|g" $RPM_BUILD_ROOT%{GFORGE_CONF_DIR}/local.inc
+%{__sed} -i -e "s|\$sys_urlroot=.*|\$sys_urlroot=\"%{GFORGE_DIR}/www\";|g" $RPM_BUILD_ROOT%{GFORGE_CONF_DIR}/local.inc
+### - replace sys_localinc, sys_gfdbname, sys_gfdbuser
+%{__cp} -a etc/httpd.secrets.example $RPM_BUILD_ROOT%{GFORGE_CONF_DIR}/httpd.secrets
+%{__sed} -i -e "s|sys_localinc.*$|sys_localinc %{GFORGE_CONF_DIR}/local.inc|g" $RPM_BUILD_ROOT%{GFORGE_CONF_DIR}/httpd.secrets
+%{__sed} -i -e "s|sys_gfdbname.*$|sys_gfdbname %{dbname}|g" $RPM_BUILD_ROOT%{GFORGE_CONF_DIR}/httpd.secrets
+%{__sed} -i -e "s|sys_gfdbuser.*$|sys_gfdbname %{dbuser}|g" $RPM_BUILD_ROOT%{GFORGE_CONF_DIR}/httpd.secrets
+# - apache configuration file
+%{__cp} -a etc/gforge-httpd.conf.example $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/gforge.conf
+%{__sed} -i -e 's|.*php_value[[:space:]]*include_path.*$|\tphp_value\tinclude_path ".:/usr/share/gforge/www/include:/usr/share/gforge:/etc/gforge:/usr/share/gforge/common:/usr/share/gforge/www:/usr/share/gforge/plugins"|' $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/gforge.conf
+# install fusionforge crontab
+%{__install} -m 644 packaging/cron.d/cron.fusionforge $RPM_BUILD_ROOT%{_sysconfdir}/cron.d/%{name}
 
-# configuring apache
-## use post install setup script instead
-install -m 644 rpm-specific/httpd.d/gforge.conf $RPM_BUILD_ROOT/%{HTTPD_CONF_DIR}/conf.d/gforge.conf
+%{__install} -m 644 deb-specific/sqlhelper.pm $RPM_BUILD_ROOT%{GFORGE_DIR}/lib/sqlhelper.pm
 
-# configuring GForge
-install -m 600 rpm-specific/conf/gforge.conf $RPM_BUILD_ROOT/%{GFORGE_CONF_DIR}/
-install -m 750 rpm-specific/scripts/gforge-config $RPM_BUILD_ROOT/%{SBIN_DIR}/
+# Install locale files in Redhat standard location
+%{__cp} -a locales/* $RPM_BUILD_ROOT/%{GFORGE_LANG_DIR}/
 
-#install *.mo
-cp -rp locales/* $RPM_BUILD_ROOT/%{GFORGE_LANG_DIR}/
+# create symlink for jpgraph
+%{__ln_s} /usr/share/jpgraph $RPM_BUILD_ROOT%{GFORGE_DIR}/jpgraph
 
-# setting crontab
-install -m 664 packaging/cron.d/fusionforge $RPM_BUILD_ROOT/%{CROND_DIR}/
+%{__rm} -f $RPM_BUILD_ROOT%{GFORGE_DIR}/utils/fusionforge-shell-postgresql.spec
+%{__rm} -f $RPM_BUILD_ROOT/%{GFORGE_DIR}/www/plugins/helloworld
+%{__rm} -f $RPM_BUILD_ROOT/%{GFORGE_DIR}/www/plugins/mailman
 
-%pre
-%startpostgresql
-if ! id -u %gfuser >/dev/null 2>&1; then
-	groupadd -r %{gfgroup}
-	useradd -r -g %{gfgroup} -d %{GFORGE_DIR} -s /bin/bash -c "GForge User" %{gfuser}
-fi
+%{__rm} -fr $RPM_BUILD_ROOT/%{GFORGE_DIR}/packaging
+%{__rm} -fr $RPM_BUILD_ROOT/%{GFORGE_DIR}/deb-specific
+%{__rm} -fr $RPM_BUILD_ROOT/%{GFORGE_DIR}/rpm-specific
+%{__rm} -fr $RPM_BUILD_ROOT/%{GFORGE_DIR}/plugins/*/packaging
+%{__rm} -fr $RPM_BUILD_ROOT/%{GFORGE_DIR}/plugins/*/*.spec
+%{__rm} -fr $RPM_BUILD_ROOT/%{GFORGE_DIR}/plugins/tinderbox
+%{__rm} -fr $RPM_BUILD_ROOT/%{GFORGE_DIR}/plugins/viewcvs
 
-%post
-if [ "$1" -eq "1" ]; then
+### Plugin setup ###
+%{__cp} $RPM_BUILD_ROOT%{GFORGE_DIR}/plugins/*/etc/*.ini $RPM_BUILD_ROOT%{GFORGE_CONF_DIR}/
+%{__cp} $RPM_BUILD_ROOT%{GFORGE_DIR}/plugins/*/etc/cron.d/* $RPM_BUILD_ROOT%{_sysconfdir}/cron.d/
 
-	# TODO : USE install-db.sh
-	# creating the database
-	%startpostgresql
-	su -l postgres -s /bin/sh -c "createdb -E UNICODE %{dbname} >/dev/null 2>&1"
-	su -l postgres -s /bin/sh -c "createlang plpgsql %{dbname} >/dev/null 2>&1"
+# plugin: aselectextauth
 
-	# generating and updating site admin password
-	%randstr SITEADMIN_PASSWORD 8
-	
-	# updating admin_password in gforge.conf
-	perl -pi -e "
-		s#^admin_password=.*#admin_password="$SITEADMIN_PASSWORD"#g" %{GFORGE_CONF_DIR}/gforge.conf
-	
-	SITEADMIN_PASSWORD=`echo -n $SITEADMIN_PASSWORD | md5sum | awk '{print $1}'`
+# plugin: cvssyncmail
 
-	# creating gforge database user
-	%randstr GFORGEDATABASE_PASSWORD 8
+# plugin: cvstracker
+# delete stuff that is clearly outdated/obsolete so we don't package this and confuse others
+%{__rm} -f $RPM_BUILD_ROOT%{GFORGE_DIR}/plugins/cvstracker/httpd.conf
+%{__rm} -f $RPM_BUILD_ROOT%{GFORGE_DIR}/plugins/cvstracker/Makefile
+%{__rm} -rf $RPM_BUILD_ROOT%{GFORGE_DIR}/plugins/cvstracker/rpm-specific
+# this is pre-activated, so create the config symlink
+%{__ln_s} %{GFORGE_DIR}/plugins/cvstracker/etc/plugins/cvstracker $RPM_BUILD_ROOT%{GFORGE_CONF_DIR}/plugins/cvstracker
 
-	su -l postgres -c "psql -c \"CREATE USER %{dbuser} WITH PASSWORD '$GFORGEDATABASE_PASSWORD' NOCREATEUSER\" %{dbname} >/dev/null 2>&1"
-	su -l postgres -c "psql -c \"CREATE USER gforge_nss WITH PASSWORD '$GFORGEDATABASE_PASSWORD' NOCREATEUSER\" %{dbname} >/dev/null 2>&1"
-	su -l postgres -c "psql -c \"CREATE USER gforge_mta WITH PASSWORD '$GFORGEDATABASE_PASSWORD' NOCREATEUSER\" %{dbname} >/dev/null 2>&1"
-	
-	# replacing variables in configuration files
-        perl -pi -e "
-                s/DB_HOST/"%{dbhost}"/g;
-                s/DB_NAME/"%{dbname}"/g;
-                s/DB_USER/"%{dbuser}"/g;
-                s/DB_PASSWORD/"$GFORGEDATABASE_PASSWORD"/g;
-                s/SYSTEM_NAME/"%{sitename}"/g;
-                s/RANDOM_ID/"$SESSID"/g;
-                s/HOST_NAME/"%{hostname}"/g" %{GFORGE_CONF_DIR}/gforge.conf
+# plugin: eirc
+# obsolete, deleting completely
+%{__rm} -rf $RPM_BUILD_ROOT%{GFORGE_DIR}/plugins/eirc
+%{__rm} -f $RPM_BUILD_ROOT%{GFORGE_DIR}/www/plugins/eirc
 
-        #admin email
-        adminemail=$(echo "%{adminemail}"| sed 's|@|\\\@|g')
-        perl -pi -e "
-                s/SERVER_ADMIN/"$adminemail"/g" %{GFORGE_CONF_DIR}/gforge.conf
-	
-	# updating PostgreSQL configuration
-	#if ! grep -i '^ *host.*%{dbname}.*' /var/lib/pgsql/data/pg_hba.conf >/dev/null 2>&1; then
-	#	echo 'host %{dbname} %{dbuser} 127.0.0.1 255.255.255.255 md5' >> /var/lib/pgsql/data/pg_hba.conf
- 	#	echo 'local %{dbname} gforge_mta md5md5md5md5md5' >> /var/lib/pgsql/data/pg_hba.conf
-	#	echo 'local %{dbname} gforge_nss trust' >> /var/lib/pgsql/data/pg_hba.conf
-	#	%reloadpostgresql
-	#fi
+# plugin: externalsearch
 
-	%{GFORGE_BIN_DIR}/install-db.sh configure-files
-        mv /var/lib/pgsql/data/pg_hba.conf /var/lib/pgsql/data/pg_hba.conf-orig
-        mv /var/lib/pgsql/data/pg_hba.conf.gforge-new /var/lib/pgsql/data/pg_hba.conf
-        %reloadpostgresql
+# plugin: fckeditor
 
-	# adding "noreply" alias
-	for i in /etc/postfix/aliases /etc/mail/aliases /etc/aliases ; do
-		if [ -f $i ]; then
-			if ! grep -i '^ *noreply:' $i >/dev/null 2>&1; then
-				echo 'noreply: /dev/null' >> $i
-				newaliases
-			fi
-			break
-		fi
-	done
+# plugin: helloworld
+# this is pre-activated, so create the config symlink
+#%{__mv} $RPM_BUILD_ROOT/plugins/helloworld $RPM_BUILD_ROOT%{GFORGE_DIR}
+#%{__ln_s} %{GFORGE_DIR}/plugins/helloworld/etc/plugins/helloworld $RPM_BUILD_ROOT%{GFORGE_CONF_DIR}/plugins/helloworld
 
-	# generating random session ID
-	%randstr SESSID 32
+# plugin: ldapextauth
+%{__rm} -rf $RPM_BUILD_ROOT%{GFORGE_DIR}/plugins/ldapextauth/rpm-specific
 
- 	#path of jpgraph.php
- 	path_jpgraph=$(rpm -ql php-jpgraph | grep jpgraph.php | sed 's/\(.*\)jpgraph.php/\1/')
- 	perl -pi -e "
-		s#^sys_path_to_jpgraph=.*#sys_path_to_jpgraph=$path_jpgraph#g" %{GFORGE_CONF_DIR}/gforge.conf
- 	
- 	#wrong 20list http template for mailman on rpm
- 	rm -f %{GFORGE_CONF_DIR}/httpd.d/20list
- 	
- 	perl -pi -e "
- 		s#^GFORGE_CONF_DIR=.*#GFORGE_CONF_DIR="%{GFORGE_CONF_DIR}"#g" %{SBIN_DIR}/gforge-config
- 
- 	## plugins installs apache templates in GFORGE_CONF_DIR
- 	ln -s %{GFORGE_DIR}/etc/httpd.d %{GFORGE_CONF_DIR}/httpd.d
-	
-	# initializing configuration
-	%{SBIN_DIR}/gforge-config
-	
-	# creating the database
-	su -l %{gfuser} -c "%{GFORGE_BIN_DIR}/db-upgrade.pl 2>&1" | grep -v ^NOTICE
-	su -l postgres -c "psql -c 'UPDATE groups SET register_time=EXTRACT(EPOCH FROM NOW());' %{dbname} >/dev/null 2>&1"
-	%changepassword $SITEADMIN_PASSWORD
-	
-	%gracefulhttpd
-	
-	if ! id -u anonymous >/dev/null 2>&1; then
- 		useradd -m -s /bin/false anonymous
- 	fi
- 
- 	CHROOT=`grep '^gforge_chroot=' %{GFORGE_CONF_DIR}/gforge.conf | sed 's/.*=\s*\(.*\)/\1/'`
- 	if [ ! -d $CHROOT ] ; then
-		mkdir -p $CHROOT
-	fi
-	
-	GROUPS_DIR=`grep '^groupdir=' %{GFORGE_CONF_DIR}/gforge.conf | sed 's/.*=\s*\(.*\)/\1/'`
-	if [ ! -d ${CHROOT}${GROUPS_DIR} ] ; then
-                mkdir -p ${CHROOT}${GROUPS_DIR}
-        fi	
+# plugin: mantis
 
-	ln -s %{GFORGE_DIR}/www/env.inc.php %{PLUGINS_LIB_DIR}/env.inc.php
-	
-	#creation of scm-gforge user
-	adduser --home-dir /var/lib/gforge/chroot/ scm-gforge
-else
-	# upgrading database
-	su -l %{gfuser} -c "%{GFORGE_BIN_DIR}/db-upgrade.pl 2>&1" | grep -v ^NOTICE
+# plugin: mediawiki
+# create symlink for apache configuration for mediawiki plugin
+## first, delete the php_admin_value include_path
+%{__sed} -i -e "/^.*php_admin_value[[:space:]]*include_path.*/d" $RPM_BUILD_ROOT%{GFORGE_DIR}/plugins/mediawiki/etc/httpd.d/61plugin-mediawiki
+%{__ln_s} %{GFORGE_DIR}/plugins/mediawiki/etc/httpd.d/61plugin-mediawiki $RPM_BUILD_ROOT%{GFORGE_CONF_DIR}/httpd.d/03mediawiki.conf
+# this is pre-activated, so create the config symlink
+#%{__ln_s} %{GFORGE_DIR}/plugins/mediawiki/etc/plugins/mediawiki $RPM_BUILD_ROOT%{GFORGE_CONF_DIR}/plugins/mediawiki
+# create symlinks to use MonoBook as the GForge skin
+%{__ln_s} monobook $RPM_BUILD_ROOT/usr/share/mediawiki/skins/gforge
+%{__ln_s} MonoBook.deps.php $RPM_BUILD_ROOT/usr/share/mediawiki/skins/GForge.deps.php
+%{__ln_s} MonoBook.php $RPM_BUILD_ROOT/usr/share/mediawiki/skins/GForge.php
+# sort out the GForge skin files and remove obsolete code
+%{__rm} -rf $RPM_BUILD_ROOT%{GFORGE_DIR}/plugins/mediawiki/mediawiki-skin
+%{__rm} -rf $RPM_BUILD_ROOT%{GFORGE_DIR}/plugins/mediawiki/usr/share/gforge
+%{__rm} -rf $RPM_BUILD_ROOT%{GFORGE_DIR}/plugins/mediawiki/usr/share/mediawiki/skins
+# insert our own LocalSettings.php
+#%{__cp} -f %{SOURCE2} $RPM_BUILD_ROOT%{GFORGE_DIR}/plugins/mediawiki/usr/share/mediawiki/LocalSettings.php
+# insert our own README file
+%{__cp} -f %{SOURCE1} $RPM_BUILD_ROOT%{GFORGE_DIR}/plugins/mediawiki/README.jlbond
 
-	# updating configuration
-	%{SBIN_DIR}/gforge-config || :
-	
+# plugin: online_help
+
+# plugin: projects_hierarchy
+
+# plugin: quota_management
+
+# plugin: scmarch
+
+# plugin: scmbzr
+
+# plugin: scmccase
+
+# plugin: scmcvs
+%{__ln_s} ../../plugins/scmcvs $RPM_BUILD_ROOT%{GFORGE_DIR}/www/plugins/scmcvs
+%{__install} -m 644 plugins/scmcvs/cron.d/%{name}-plugin-scmcvs $RPM_BUILD_ROOT%{_sysconfdir}/cron.d
+
+# plugin: scmdarcs
+
+# plugin: scmsvn
+# this is pre-activated, so create the config symlink
+%{__ln_s} ../../plugins/scmsvn $RPM_BUILD_ROOT%{GFORGE_DIR}/www/plugins/scmsvn
+
+# plugin: scmgit
+%{__ln_s} ../../plugins/scmgit $RPM_BUILD_ROOT%{GFORGE_DIR}/www/plugins/scmgit
+
+# plugin: scmhg
+
+# plugin: svncommitemail
+
+# plugin: svntracker
+# install crontab
+%{__install} -m 644 plugins/svntracker/rpm-specific/cron.d/gforge-plugin-svntracker $RPM_BUILD_ROOT%{_sysconfdir}/cron.d
+
+# plugin: webcalendar
+
+# plugin: blocks
+%{__ln_s} ../../plugins/blocks/www/ $RPM_BUILD_ROOT%{GFORGE_DIR}/www/plugins/blocks
+
+# plugin: extratabs
+%{__ln_s} ../../plugins/extratabs/www/ $RPM_BUILD_ROOT%{GFORGE_DIR}/www/plugins/extratabs
+
+# plugin: wiki
+%{__ln_s} ../../plugins/wiki/www/ $RPM_BUILD_ROOT%{GFORGE_DIR}/www/wiki
+
+# plugin: projectlabels
+%{__ln_s} ../../plugins/projectlabels/www/ $RPM_BUILD_ROOT%{GFORGE_DIR}/www/plugins/projectlabels
+
+# plugin: contribtracker
+%{__ln_s} ../../plugins/contribtracker/www/ $RPM_BUILD_ROOT%{GFORGE_DIR}/www/plugins/contribtracker
+
+# plugin: globalsearch
+%{__ln_s} ../../plugins/globalsearch/www/ $RPM_BUILD_ROOT%{GFORGE_DIR}/www/plugins/globalsearch
+
+# plugin: mantisbt
+%{__ln_s} ../../plugins/mantisbt/www/ $RPM_BUILD_ROOT%{GFORGE_DIR}/www/plugins/mantisbt
+
+### END OF PLUGIN SETUP ###
+
+%pre
+# we will need postgresql to be running. we start it, even if it already is running
+# this won't hurt anything, just ensure we have a running database
+/sbin/service postgresql start >>/var/log/%{name}-install.log 2>&1
+
+# setup user/group for gforge
+if [ `/usr/bin/getent passwd | /bin/cut -d: -f1 | /bin/grep -c %{gfuser}` -eq 0 ] ; then
+    echo "Did not find existing fusionforge user. Adding fusionforge group and user..." >>/var/log/%{name}-install.log 2>&1
+    /usr/sbin/groupadd -r %{gfgroup}
+    /usr/sbin/useradd -r -g %{gfgroup} -d %{GFORGE_DIR} -s /bin/bash -c "FusionForge User" %{gfuser}
 fi
 
+%post
+# check to see if the database already exists. if not, we proceed to create it.
+# if so, we print a warning message.
+echo "\q" | su - postgres -c "/usr/bin/psql %{dbname}" 1>/dev/null 2>&1
+ret=$?
+if [ $ret -ne 0 ] ; then
+    FFORGE_DB=%{dbname}
+    FFORGE_USER=%{dbuser}
+    FFORGE_ADMIN_USER=%{fforge_admin}
+    FFORGE_ADMIN_PASSWORD=%{fforge_passwd}
+    export FFORGE_DB FFORGE_USER FFORGE_ADMIN_USER FFORGE_ADMIN_PASSWORD
+    /usr/bin/php %{GFORGE_DIR}/fusionforge-install-3-db.php >>/var/log/%{name}-install.log 2>&1
+else
+    echo "Database %{dbname} already exists. Will not proceed with database setup."
+    echo "Please see %{GFORGE_DIR}/fusionforge-install-3-db.php and run it manually"
+    echo "if deemed necessary."
+fi
+
+/usr/bin/php %{GFORGE_DIR}/db/upgrade-db.php >>/var/log/%{name}-install.log 2>&1
+
+HOSTNAME=`hostname -f`
+%{__sed} -i -e "s!gforge.company.com!$HOSTNAME!g" %{GFORGE_CONF_DIR}/local.inc
+%{__sed} -i -e "s!gforge.company.com!$HOSTNAME!g" /etc/httpd/conf.d/gforge.conf
+
+/etc/init.d/httpd restart >/dev/null 2>&1
+
+# generate random hash for session_key
+HASH=$(/bin/dd if=/dev/urandom bs=1024 count=100 2>/dev/null | /usr/bin/sha1sum | cut -c1-40)
+%{__sed} -i -e "s/sys_session_key = 'foobar'/sys_session_key = '$HASH'/g" %{GFORGE_CONF_DIR}/local.inc
+
+# add noreply mail alias
+echo "noreply: /dev/null" >> /etc/aliases
+/usr/bin/newaliases >/dev/null 2>&1
+
+# display message about default admin account
+echo ""
+echo "You can now connect to your FusionForge installation using:"
+echo ""
+echo "   http://$HOSTNAME/"
+echo ""
+echo "The default fusionforge administrator account and password is:"
+echo ""
+echo "Account Name = %{fforge_admin}"
+echo "Password = %{fforge_passwd}"
+#echo "Please change it to something appropriate upon initial login."
+# give user a few seconds to read the message
+sleep 10
+
 %preun
 
 %postun
-if [ "$1" -eq "0" ]; then
-	# dropping gforge users
-	su -l postgres -s /bin/sh -c "dropuser %{dbuser} >/dev/null 2>&1 ; dropuser gforge_nss >/dev/null 2>&1 ; dropuser gforge_mta >/dev/null 2>&1"
-	
-	for file in local.pl httpd.secrets local.inc httpd.conf httpd.vhosts database.inc ; do
-		rm -f %{GFORGE_CONF_DIR}/$file
-	done
-	# Remove PostgreSQL access
-	if grep -i '^ *host.*%{dbname}.*' /var/lib/pgsql/data/pg_hba.conf >/dev/null 2>&1; then
-		perl -ni -e 'm@^ *host.*%{dbname}.*@ or print;' /var/lib/pgsql/data/pg_hba.conf >/dev/null 2>&1
-		perl -ni -e 'm@^ *local.*%{dbname}.*@ or print;' /var/lib/pgsql/data/pg_hba.conf >/dev/null 2>&1
-	fi
-	# Remove user/group
-	if id -u %{gfuser} >/dev/null 2>&1; then
-		userdel %{gfuser} >/dev/null 2>&1
-		groupdel %{gfgroup} >/dev/null 2>&1
-	fi
-	
-	if ! id -u anonymous >/dev/null 2>&1; then
- 		userdel anonymous 2>/dev/null || :
- 	fi
- 
+# Remove user/group
+if [ `/usr/bin/getent passwd | /bin/cut -d: -f1 | /bin/grep -c %{gfuser}` -ne 0 ] ; then
+    echo "Removing fusionforge user..."
+    /usr/sbin/userdel %{gfuser}
 fi
 
+if [ `/usr/bin/getent group | /bin/cut -d: -f1 | /bin/grep -c %{gfuser}` -ne 0 ] ; then
+    echo "Removing fusionforge group..."
+    /usr/sbin/groupdel %{gfgroup}
+fi
+
+%post aselectextauth
+/usr/bin/psql -U %{dbuser} %{dbname} -f %{GFORGE_DIR}/plugins/aselectextauth/db/install_aselectextauth.psql
+
+%preun aselectextauth
+/usr/bin/psql -U %{dbuser} %{dbname} -f %{GFORGE_DIR}/plugins/aselectextauth/db/uninstall_aselectextauth.psql
+
 %clean
-[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
+[ "$RPM_BUILD_ROOT" != "/" ] && %{__rm} -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(-, root, root)
-%doc AUTHORS AUTHORS.sourceforge COPYING ChangeLog INSTALL* README*
+%doc AUTHORS AUTHORS.gforge AUTHORS.sourceforge COPYING ChangeLog INSTALL* README* CHANGES NEWS
 %doc docs/*
-%attr(0660, %{httpduser}, gforge) %config(noreplace) %{GFORGE_CONF_DIR}/gforge.conf
-%attr(0750, root, root) %{SBIN_DIR}/gforge-config
-%attr(0640, %{httpduser}, %{httpdgroup}) %config(noreplace) %{HTTPD_CONF_DIR}/conf.d/gforge.conf
-%attr(0644, root, root) %{CROND_DIR}/fusionforge
-%attr(0775, %{httpduser}, %{httpdgroup}) %dir %{UPLOAD_DIR}
-#%attr(0775, %{httpduser}, %{httpdgroup}) %dir %{CACHE_DIR}
-%{GFORGE_DIR}
+%attr(0660, %{httpduser}, gforge) %config(noreplace) %{GFORGE_CONF_DIR}/local.inc
+%attr(0640, %{httpduser}, %{httpdgroup}) %config(noreplace) %{_sysconfdir}/httpd/conf.d/gforge.conf
+%attr(0644, root, root) %{_sysconfdir}/cron.d/%{name}
+%attr(0775, %{httpduser}, %{httpdgroup}) %dir %{GFORGE_VAR_LIB}/upload
+%attr(755, root, %{httpdgroup}) %dir %{GFORGE_DIR}
+# Files under %{GFORGE_DIR}
+%{GFORGE_DIR}/AUTHORS*
+%{GFORGE_DIR}/CHANGES
+%{GFORGE_DIR}/COPYING
+%{GFORGE_DIR}/ChangeLog
+%{GFORGE_DIR}/INSTALL*
+%{GFORGE_DIR}/NEWS
+%{GFORGE_DIR}/README*
+%{GFORGE_DIR}/fusionforge.spec
+%{GFORGE_DIR}/fusionforge-install*
+%{GFORGE_DIR}/gforge-restricted.sh
+%{GFORGE_DIR}/install.sh
+%{GFORGE_DIR}/jpgraph
+# Directories under %{GFORGE_DIR}
+%{GFORGE_DIR}/backend
+%{GFORGE_DIR}/common
+%{GFORGE_DIR}/contrib
+%{GFORGE_DIR}/cronjobs
+%{GFORGE_DIR}/db
+%{GFORGE_DIR}/docs
+%{GFORGE_DIR}/etc
+%{GFORGE_DIR}/image-sources
+%{GFORGE_DIR}/lib
+%{GFORGE_DIR}/locales
+%{GFORGE_DIR}/monitor
+%{GFORGE_DIR}/translations
+%{GFORGE_DIR}/utils
+%{GFORGE_DIR}/setup
+%dir %{GFORGE_DIR}/www
+# files under %{GFORGE_DIR}/www
+%{GFORGE_DIR}/www/*.php
+%{GFORGE_DIR}/www/users
+%{GFORGE_DIR}/www/favicon.ico
+%{GFORGE_DIR}/www/projects
+# directories under %{GFORGE_DIR}/www
+%{GFORGE_DIR}/www/account
+%{GFORGE_DIR}/www/activity
+%{GFORGE_DIR}/www/admin
+%{GFORGE_DIR}/www/developer
+%{GFORGE_DIR}/www/docman
+%{GFORGE_DIR}/www/export
+%{GFORGE_DIR}/www/forum
+%{GFORGE_DIR}/www/frs
+%{GFORGE_DIR}/www/help
+%{GFORGE_DIR}/www/images
+%{GFORGE_DIR}/www/include
+%{GFORGE_DIR}/www/jscook
+%{GFORGE_DIR}/www/js
+%{GFORGE_DIR}/www/mail
+%{GFORGE_DIR}/www/my
+%{GFORGE_DIR}/www/new
+%{GFORGE_DIR}/www/news
+%{GFORGE_DIR}/www/people
+%{GFORGE_DIR}/www/pm
+%{GFORGE_DIR}/www/project
+%{GFORGE_DIR}/www/register
+%{GFORGE_DIR}/www/reporting
+%{GFORGE_DIR}/www/scm
+%{GFORGE_DIR}/www/scripts
+%{GFORGE_DIR}/www/search
+%{GFORGE_DIR}/www/snippet
+%{GFORGE_DIR}/www/soap
+%{GFORGE_DIR}/www/softwaremap
+%{GFORGE_DIR}/www/squal
+%{GFORGE_DIR}/www/stats
+%{GFORGE_DIR}/www/survey
+%{GFORGE_DIR}/www/tabber
+%{GFORGE_DIR}/www/themes
+%{GFORGE_DIR}/www/top
+%{GFORGE_DIR}/www/tracker
+%{GFORGE_DIR}/www/trove
+%{GFORGE_DIR}/www/widgets
+%{GFORGE_DIR}/www/plugins
+#%{GFORGE_DIR}/www/plugins/online_help
+#%{GFORGE_DIR}/www/plugins/projects_hierarchy
+#%{GFORGE_DIR}/www/plugins/quota_management
+%dir %{GFORGE_DIR}/plugins
+%{GFORGE_DIR}/plugins/env.inc.php
+#%{GFORGE_DIR}/plugins/online_help
+#%{GFORGE_DIR}/plugins/projects_hierarchy
+#%{GFORGE_DIR}/plugins/quota_management
 %{GFORGE_LANG_DIR}
-%{GFORGE_CONF_DIR}
-%{SCM_TARBALLS_DIR}
-%{SCM_SNAPSHOTS_DIR}
+%dir %{GFORGE_CONF_DIR}
+%config(noreplace) %{GFORGE_CONF_DIR}/httpd.secrets
+%dir %{GFORGE_CONF_DIR}/httpd.d
+%dir %attr(0775,root,%{httpdgroup}) %{GFORGE_CONF_DIR}/plugins
+%dir %{GFORGE_VAR_LIB}/scmtarballs
+%dir %{GFORGE_VAR_LIB}/scmsnapshots
+%dir %{GFORGE_VAR_LIB}/svnroot
+/svnroot
+%dir %{GFORGE_VAR_LIB}/cvsroot
+/cvsroot
+%dir %{GFORGE_VAR_LIB}/dumps
+%{GFORGE_VAR_LIB}/homedirs
+/home/groups
+/bin/cvssh.pl
 
+%files aselectextauth
+%defattr(-, root, root)
+%dir %{GFORGE_DIR}/plugins/aselectextauth
+%{GFORGE_DIR}/plugins/aselectextauth/INSTALL
+%{GFORGE_DIR}/plugins/aselectextauth/UNINSTALL
+%{GFORGE_DIR}/plugins/aselectextauth/ChangeLog
+%{GFORGE_DIR}/plugins/aselectextauth/db/
+%{GFORGE_DIR}/plugins/aselectextauth/include/
+
+%files cvssyncmail
+%defattr(-,root,root)
+%dir %{GFORGE_DIR}/plugins/cvssyncmail
+%{GFORGE_DIR}/plugins/cvssyncmail/INSTALL
+%{GFORGE_DIR}/plugins/cvssyncmail/bin
+%{GFORGE_DIR}/plugins/cvssyncmail/common
+%{GFORGE_DIR}/plugins/cvssyncmail/include
+
+%files cvstracker
+%defattr(-,root,root)
+%config(noreplace) %{GFORGE_DIR}/plugins/cvstracker/etc/plugins/cvstracker/config.php
+%dir %{GFORGE_DIR}/plugins/cvstracker
+%{GFORGE_DIR}/plugins/cvstracker/README
+%{GFORGE_DIR}/plugins/cvstracker/AUTHORS
+%{GFORGE_DIR}/plugins/cvstracker/COPYING
+%{GFORGE_DIR}/plugins/cvstracker/bin
+%{GFORGE_DIR}/plugins/cvstracker/common
+%{GFORGE_DIR}/plugins/cvstracker/db
+%{GFORGE_DIR}/plugins/cvstracker/www
+%{GFORGE_DIR}/www/plugins/cvstracker
+%attr(-,%{httpduser},%{httpdgroup}) %{GFORGE_CONF_DIR}/plugins/cvstracker
+
+%files externalsearch
+%config(noreplace) %{GFORGE_CONF_DIR}/externalsearch.ini
+%{GFORGE_DIR}/plugins/externalsearch
+
+%files fckeditor
+%{GFORGE_DIR}/plugins/fckeditor
+%{GFORGE_DIR}/www/plugins/fckeditor
+
+
+#%files helloworld
+#%attr(-,%{httpduser},%{httpdgroup}) %{GFORGE_CONF_DIR}/plugins/helloworld
+#%config(noreplace) %{GFORGE_DIR}/plugins/helloworld/etc/plugins/helloworld/config.php
+#%{GFORGE_DIR}/plugins/helloworld/httpd.conf
+#%{GFORGE_DIR}/plugins/helloworld/INSTALL
+#%{GFORGE_DIR}/plugins/helloworld/bin
+#%{GFORGE_DIR}/plugins/helloworld/common
+#%{GFORGE_DIR}/plugins/helloworld/db
+#%{GFORGE_DIR}/plugins/helloworld/www
+#%{GFORGE_DIR}/www/plugins/helloworld
+
+%files ldapextauth
+#%{GFORGE_CONF_DIR}/plugins/ldapextauth
+%config(noreplace) %{GFORGE_DIR}/plugins/ldapextauth/etc/plugins/ldapextauth/config.php
+%config(noreplace) %{GFORGE_DIR}/plugins/ldapextauth/etc/plugins/ldapextauth/mapping.php
+%{GFORGE_DIR}/plugins/ldapextauth/README
+%{GFORGE_DIR}/plugins/ldapextauth/db
+%{GFORGE_DIR}/plugins/ldapextauth/bin
+%{GFORGE_DIR}/plugins/ldapextauth/include
+
+%files mantis
+%config(noreplace) %{GFORGE_CONF_DIR}/mantis.ini
+%{GFORGE_DIR}/plugins/mantis
+%{GFORGE_DIR}/www/plugins/mantis
+
+%files mediawiki
+%config(noreplace) %{GFORGE_CONF_DIR}/mediawiki.ini
+%{GFORGE_CONF_DIR}/httpd.d/03mediawiki.conf
+%{GFORGE_DIR}/plugins/mediawiki/README
+%{GFORGE_DIR}/plugins/mediawiki/README.jlbond
+%{GFORGE_DIR}/plugins/mediawiki/bin
+%{GFORGE_DIR}/plugins/mediawiki/common
+%{GFORGE_DIR}/plugins/mediawiki/cronjobs
+%{GFORGE_DIR}/plugins/mediawiki/etc
+#%{GFORGE_DIR}/plugins/mediawiki/mediawiki-skin
+%{GFORGE_DIR}/plugins/mediawiki/www
+/usr/share/mediawiki/skins/gforge
+/usr/share/mediawiki/skins/GForge.deps.php
+/usr/share/mediawiki/skins/GForge.php
+%{GFORGE_DIR}/www/plugins/mediawiki
+
+%files online_help
+%{GFORGE_DIR}/plugins/online_help
+%{GFORGE_DIR}/www/plugins/online_help
+
+%files projects_hierarchy
+%{GFORGE_DIR}/plugins/projects_hierarchy
+%{GFORGE_DIR}/www/plugins/projects_hierarchy
+
+%files quota_management
+%{GFORGE_DIR}/plugins/quota_management
+%{GFORGE_DIR}/www/plugins/quota_management
+
+%files scmarch
+%config(noreplace) %{GFORGE_CONF_DIR}/scmarch.ini
+%{GFORGE_DIR}/plugins/scmarch
+
+%files scmbzr
+%config(noreplace) %{GFORGE_CONF_DIR}/scmbzr.ini
+%{GFORGE_DIR}/plugins/scmbzr
+
+%files scmdarcs
+%config(noreplace) %{GFORGE_CONF_DIR}/scmdarcs.ini
+%{GFORGE_DIR}/plugins/scmdarcs
+
+%files scmgit
+%config(noreplace) %{GFORGE_CONF_DIR}/scmgit.ini
+%{GFORGE_DIR}/plugins/scmgit
+%{GFORGE_DIR}/www/plugins/scmgit
+
+%files scmhg
+%config(noreplace) %{GFORGE_CONF_DIR}/scmhg.ini
+%{GFORGE_DIR}/plugins/scmhg
+
+%files scmccase
+%config(noreplace) %{GFORGE_CONF_DIR}/scmccase.ini
+%{GFORGE_DIR}/plugins/scmccase
+
+%files scmcvs
+%config(noreplace) %{GFORGE_CONF_DIR}/scmcvs.ini
+%{_sysconfdir}/cron.d/%{name}-plugin-scmcvs
+%{GFORGE_DIR}/plugins/scmcvs
+%{GFORGE_DIR}/www/plugins/scmcvs
+
+%files scmsvn
+%config(noreplace) %{GFORGE_CONF_DIR}/scmsvn.ini
+%{GFORGE_DIR}/plugins/scmsvn
+%{GFORGE_DIR}/www/plugins/scmsvn
+
+%files svncommitemail
+%{GFORGE_DIR}/plugins/svncommitemail
+
+%files svntracker
+%{_sysconfdir}/cron.d/gforge-plugin-svntracker
+%config(noreplace) %{GFORGE_DIR}/plugins/svntracker/etc/plugins/svntracker/config.php
+%{GFORGE_DIR}/plugins/svntracker/AUTHORS
+%{GFORGE_DIR}/plugins/svntracker/COPYING
+%{GFORGE_DIR}/plugins/svntracker/README
+%{GFORGE_DIR}/plugins/svntracker/httpd.conf
+%{GFORGE_DIR}/plugins/svntracker/postcommit.example
+%{GFORGE_DIR}/plugins/svntracker/bin
+%{GFORGE_DIR}/plugins/svntracker/common
+%{GFORGE_DIR}/plugins/svntracker/db
+%{GFORGE_DIR}/plugins/svntracker/rpm-specific
+%{GFORGE_DIR}/plugins/svntracker/www
+%{GFORGE_DIR}/www/plugins/svntracker
+
+%files webcalendar
+%{GFORGE_DIR}/plugins/webcalendar
+%{GFORGE_DIR}/www/plugins/webcalendar
+
+%files blocks
+%config(noreplace) %{GFORGE_CONF_DIR}/blocks.ini
+%{GFORGE_DIR}/plugins/blocks
+%{GFORGE_DIR}/www/plugins/blocks
+
+%files extratabs
+%{GFORGE_DIR}/plugins/extratabs
+%{GFORGE_DIR}/www/plugins/extratabs
+
+%files wiki
+%{_sysconfdir}/cron.d/cron.wiki
+%{GFORGE_DIR}/plugins/wiki
+%{GFORGE_DIR}/www/wiki
+
+%files projectlabels
+%{GFORGE_DIR}/plugins/projectlabels
+%{GFORGE_DIR}/www/plugins/projectlabels
+
+%files contribtracker
+%{GFORGE_DIR}/plugins/contribtracker
+%{GFORGE_DIR}/www/plugins/contribtracker
+
+%files globalsearch
+%{GFORGE_DIR}/plugins/globalsearch
+%{GFORGE_DIR}/www/plugins/globalsearch
+
+%files mantisbt
+%{GFORGE_DIR}/plugins/mantisbt
+%{GFORGE_DIR}/www/plugins/mantisbt
+
 %changelog
-* Wed Jun 29 2005 Open Wide <guillaume.smet at openwide.fr>
-- fixed Xavier's patch
-- added Mandrake support based on patch [#1194] by Kevin R. Bulgrien
-* Wed Apr 27 2005 Rameau Xavier <xrameau at gmail.com> (for e-LaSer : http://www.e-laser.fr)
-- Adding specification for SuSE Linux Enterprise Server 9 (in .spec)
-- Moving all static definitions to global variables (in .spec)
-* Thu Mar 03 2005 Guillaume Smet <guillaume-gforge at smet.org>
-- removed useless stuff thanks to Christian's work on db-upgrade.pl
-- s/refresh.sh/gforge-config to improve consistency with debian packaging
-- it's better to display the output of db-upgrade.pl
-* Sun Feb 20 2005 Guillaume Smet <guillaume-gforge at smet.org>
-- added a dependency on gforge-lib-jpgraph
-- added gforge-4.1-project_task_sql.patch
-* Sat Feb 19 2005 Guillaume Smet <guillaume-gforge at smet.org>
-- 4.1
-- forced the vhost on port 80
-- modified the db-upgrade.pl patch to keep nss stuff
-- detects if tcpip_socket is set to true before installing the RPM
-- fixed dependencies problem for RH9 and RHEL3
-- creates gforge_nss and gforge_mta postgresql users
-- drops created postgresql users on uninstall
-- replaced -f test with ls
-* Fri Jan 28 2005 Thales Information Systems <guillaume.smet at openwide.fr>
-- fixed default values for release, sitename and hostname
-- fixed remaining issues on upgrade
-* Thu Jan 27 2005 Thales Information Systems <guillaume.smet at openwide.fr>
-- it's now possible to add custom stuff in /etc/gforge/custom/
-* Thu Dec 30 2004 Guillaume Smet <guillaume-gforge at smet.org>
-- added Allow from all in vhost config
-* Wed Dec 29 2004 Guillaume Smet <guillaume-gforge at smet.org>
-- added the magic_quotes_gpc On in vhost as the default value for FC3 is now Off
-* Sat Dec 25 2004 Guillaume Smet <guillaume-gforge at smet.org>
-- it's now possible to add specific language files in the RPM
-* Fri Dec 03 2004 Dassault Aviation <guillaume.smet at openwide.fr>
-- fixed the vhost configuration
-- fixed the default crontab
-- the crontab is now a config file and is not replaced on update
-- added refresh.sh in /etc/gforge/ to refresh the configuration easily
-* Wed Nov 03 2004 Guillaume Smet <guillaume-gforge at smet.org>
-- new RPM packaging
+* Fri May 28 2010 - Alain Peyrat <aljeux at free.fr> - 5.0.50-1
+- ported to 5.1 tree.
+- reworked logic with rights on configuration files.
+- adapted to changes like scm refactoring.
+- adapted to changes to .ini configuration file.
+- lots of new plugins added.
+
+* Tue May 13 2010 - Bond Masuda <bond.masuda at JLBond.com> - 4.8.3-2
+- fixed plugin symlinks and plugin directory permissions
+- patched mediawiki, webcalendar plugins
+- patch to fix various references to global variables
+- add symlinks to use mediawiki Monobook skin as GForge
+- patch to replace ereg_replace() with preg_replace()
+- added jpgraph symlink
+- setup httpd.secrets
+- delete obsolete mediawiki plugin code
+
+* Fri Apr 16 2010 - Bond Masuda <bond.masuda at JLBond.com> - 4.8.3-1
+- My first packaging of fusionforge 4.8.3-1 and plugins

Modified: trunk/gforge_base/evolvisforge-5.1/gforge/install.sh
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/gforge/install.sh	2011-02-28 22:54:58 UTC (rev 15314)
+++ trunk/gforge_base/evolvisforge-5.1/gforge/install.sh	2011-02-28 22:55:03 UTC (rev 15315)
@@ -80,7 +80,6 @@
 
 		# Post installation fixes.
 		perl -spi -e "s/^#ServerName (.*):80/ServerName $hostname:80/" /etc/httpd/conf/httpd.conf
-		perl -spi -e 's/^LoadModule/#LoadModule/g' /etc/gforge/httpd.conf
 
 		chkconfig httpd on
 		chkconfig postgresql on
@@ -109,7 +108,6 @@
 
 		# Post installation fixes.
 		#perl -spi -e "s/^#ServerName (.*):80/ServerName $hostname:80/" /etc/apache2/httpd.conf
-		perl -spi -e 's/^LoadModule/#LoadModule/g' /etc/gforge/httpd.conf
 
 		chkconfig -s apache2 on
 		chkconfig -s postgresql on

Modified: trunk/gforge_base/evolvisforge-5.1/gforge/packaging/cron.d/cron.fusionforge
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/gforge/packaging/cron.d/cron.fusionforge	2011-02-28 22:54:58 UTC (rev 15314)
+++ trunk/gforge_base/evolvisforge-5.1/gforge/packaging/cron.d/cron.fusionforge	2011-02-28 22:55:03 UTC (rev 15315)
@@ -1,16 +1,6 @@
-#
-# GForge
-# Copyright 1999-2001 (c) VA Linux Systems
-# Copyright 2002-2004 (c) GForge, LLC, Ognyan Kulev
-# http://gforge.org/
-#
-# YOUR php.ini FOR PHP CLI MUST HAVE APPROPRIATE include_path
+FFCRON="/opt/gforge/cronjobs"
 FFUSER=gforge
 
-# Change path to the GForge directory.
-GFORGE="/opt/gforge"
-FFCRON="/opt/gforge/cronjobs"
-
 # You may need to change the pathname to php CLI (command line interface)
 PHP="/usr/bin/php -f"
 
@@ -64,10 +54,10 @@
 0 * * * * root $PHP $FFCRON/create_scm_repos.php
 
 # Gather commit stats from SCM repositories
-2 * * * * root $PHP $FFCRON/gather_scm_stats.php
+0 2 * * * root $PHP $FFCRON/gather_scm_stats.php
 
 # Generate snapshots and tarballs from SCM repositories
-3 * * * * root $PHP $FFCRON/generate_scm_snapshots.php
+0 3 * * * root $PHP $FFCRON/generate_scm_snapshots.php
 
 # this cronjob analyse the apache log and instert them in the db table stats_subd_pages
 # this is not used in fusionforge IHM.
@@ -76,13 +66,13 @@
 
 # this cronjob send a mail to the admin with all news that have been posted less than 30 days and that have not be validated.
 # Daily mail for not approved news
-30 17 * * * root $FFCRON/get_news_notapproved.pl
+#30 17 * * * root $FFCRON/get_news_notapproved.pl
 
 # Daily site backup
 0 2 * * *  root $PHP $FFCRON/backup_site.php
 
 #
-#	IMPORTANT!! READ THE INSTALL file before continuing!
+# IMPORTANT!! READ THE README.root file before continuing!
 #
 
 # Create the new mailing lists
@@ -95,10 +85,8 @@
 #30 5 * * 1,2,3,4,5 root $PHP $FFCRON/daily_task_email.php
 
 # Create the /etc/* files needed for CVS
-10 * * * * root $PHP $GFORGE/plugins/scmcvs/cronjobs/usergroup.php
+10 * * * * root $PHP $FFCRON/plugins/scmcvs/cronjobs/usergroup.php
 
 # Upload the SSH key files needed for CVS
-15 * * * * root $PHP $GFORGE/plugins/scmcvs/cronjobs/ssh_create.php
+15 * * * * root $PHP $FFCRON/plugins/scmcvs/cronjobs/ssh_create.php
 
-# Create SVN tarballs
-5 3 * * * root $PHP $GFORGE/plugins/scmsvn/cronjobs/tarballs.php

Modified: trunk/gforge_base/evolvisforge-5.1/gforge/packaging/cron.d/fusionforge
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/gforge/packaging/cron.d/fusionforge	2011-02-28 22:54:58 UTC (rev 15314)
+++ trunk/gforge_base/evolvisforge-5.1/gforge/packaging/cron.d/fusionforge	2011-02-28 22:55:03 UTC (rev 15315)
@@ -1,5 +1,6 @@
 # THIS FILE IS GENERATED, PLEASE DON'T EDIT, RATHER USE Makefile
-FFCRON="/usr/share/gforge/cronjobs"
+FFDIR=/usr/share/gforge
+FFCRON=$FFDIR/cronjobs
 FFUSER=gforge
 
 # You may need to change the pathname to php CLI (command line interface)
@@ -49,11 +50,17 @@
 48 * * * * root $PHP $FFCRON/massmail.php
 
 # Weekly db vacuum (should be done after ALL OTHER JOBS)
-50 2 * * Mon $FFUSER $PHP $FFCRON/vacuum.php
+50 2 * * 1 $FFUSER $PHP $FFCRON/vacuum.php
 
 # Create SCM repositories
 0 * * * * root $PHP $FFCRON/create_scm_repos.php
 
+# Gather commit stats from SCM repositories
+0 2 * * * root $PHP $FFCRON/gather_scm_stats.php
+
+# Generate snapshots and tarballs from SCM repositories
+0 3 * * * root $PHP $FFCRON/generate_scm_snapshots.php
+
 # this cronjob analyse the apache log and instert them in the db table stats_subd_pages
 # this is not used in fusionforge IHM.
 # Daily sweep of the HTTP log files for project activity

Added: trunk/gforge_base/evolvisforge-5.1/gforge/rpm-specific/dag-rpmforge.repo
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/gforge/rpm-specific/dag-rpmforge.repo	                        (rev 0)
+++ trunk/gforge_base/evolvisforge-5.1/gforge/rpm-specific/dag-rpmforge.repo	2011-02-28 22:55:03 UTC (rev 15315)
@@ -0,0 +1,9 @@
+# Name: RPMforge RPM Repository for Red Hat Enterprise 5 - dag
+# URL: http://rpmforge.net/
+[dag-rpmforge]
+name = Red Hat Enterprise $releasever - RPMforge.net - dag
+baseurl = http://apt.sw.be/redhat/el5/en/$basearch/dag
+#mirrorlist = http://apt.sw.be/redhat/el5/en/mirrors-rpmforge
+enabled = 1
+protect = 0
+gpgcheck = 0

Added: trunk/gforge_base/evolvisforge-5.1/gforge/rpm-specific/fusionforge.repo
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/gforge/rpm-specific/fusionforge.repo	                        (rev 0)
+++ trunk/gforge_base/evolvisforge-5.1/gforge/rpm-specific/fusionforge.repo	2011-02-28 22:55:03 UTC (rev 15315)
@@ -0,0 +1,8 @@
+# Name: FusionForge RPM Repository
+# URL: http://fusionforge.org/
+[fusionforge]
+name = Red Hat Enterprise $releasever - fusionforge.org
+baseurl = file:///root/fusionforge_repo/
+enabled = 1
+protect = 0
+gpgcheck = 0

Added: trunk/gforge_base/evolvisforge-5.1/gforge/rpm-specific/patches/LocalSettings.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/gforge/rpm-specific/patches/LocalSettings.php	                        (rev 0)
+++ trunk/gforge_base/evolvisforge-5.1/gforge/rpm-specific/patches/LocalSettings.php	2011-02-28 22:55:03 UTC (rev 15315)
@@ -0,0 +1,159 @@
+<?php
+
+# This file was automatically generated by the MediaWiki installer.
+# If you make manual changes, please keep track in case you need to
+# recreate them later.
+#
+# See includes/DefaultSettings.php for all configurable settings
+# and their default values, but don't forget to make changes in _this_
+# file, not there.
+#
+# Further documentation for configuration settings may be found at:
+# http://www.mediawiki.org/wiki/Manual:Configuration_settings
+
+# If you customize your file layout, set $IP to the directory that contains
+# the other MediaWiki files. It will be used as a base to locate files.
+if( defined( 'MW_INSTALL_PATH' ) ) {
+	$IP = MW_INSTALL_PATH;
+} else {
+	$IP = dirname( __FILE__ );
+}
+
+$path = array( $IP, "$IP/includes", "$IP/languages", "/usr/share/gforge", "/etc/gforge/", "/usr/share/gforge/plugins/mediawiki/usr/share/mediawiki" );
+set_include_path( implode( PATH_SEPARATOR, $path ) . PATH_SEPARATOR . get_include_path() );
+
+require_once( "$IP/includes/DefaultSettings.php" );
+
+GLOBAL $gfplugins;
+
+# If PHP's memory limit is very low, some operations may fail.
+ini_set( 'memory_limit', '30M' );
+
+if ( $wgCommandLineMode ) {
+	if ( isset( $_SERVER ) && array_key_exists( 'REQUEST_METHOD', $_SERVER ) ) {
+		die( "This script must be run from the command line\n" );
+	}
+}
+## Uncomment this to disable output compression
+# $wgDisableOutputCompression = true;
+
+$wgSitename         = "GForge";
+
+## The URL base path to the directory containing the wiki;
+## defaults for all runtime URL paths are based off of this.
+## For more information on customizing the URLs please see:
+## http://www.mediawiki.org/wiki/Manual:Short_URL
+$wgScriptPath       = "/mediawiki";
+$wgScript           = "$wgScriptPath/index.php";
+$wgRedirectScript   = "$wgScriptPath/redirect.php";
+
+## For more information on customizing the URLs please see:
+## http://meta.wikimedia.org/wiki/Eliminating_index.php_from_the_url
+## If using PHP as a CGI module, the ?title= style usually must be used.
+$wgArticlePath      = "$wgScript/$1";
+# $wgArticlePath      = "$wgScript?title=$1";
+
+$wgStylePath        = "$wgScriptPath/skins";
+$wgStyleDirectory   = "$IP/skins";
+$wgLogo             = "$wgStylePath/common/images/wiki.png";
+
+$wgUploadPath       = "$wgScriptPath/upload";
+$wgUploadDirectory  = "$IP/upload";
+
+## UPO means: this is also a user preference option
+
+$wgEnableEmail      = true;
+$wgEnableUserEmail  = true; # UPO
+
+$wgEmergencyContact = "root at localhost";
+$wgPasswordSender = "root at localhost";
+
+$wgEnotifUserTalk = true; # UPO
+$wgEnotifWatchlist = true; # UPO
+$wgEmailAuthentication = true;
+
+## Database settings
+$wgDBtype           = "postgres";
+$wgDBserver         = "localhost";
+$wgDBname           = "wikidb";
+$wgDBuser           = "wikiuser";
+$wgDBpassword       = getenv('sys_gfdbpasswd');
+$wgDBprefix         = "";
+$wgDBport           = "5432";
+
+# Postgres specific settings
+$wgDBmwschema       = "mediawiki";
+$wgDBts2schema      = "public";
+
+## Shared memory settings
+$wgMainCacheType = CACHE_NONE;
+$wgMemCachedServers = array();
+
+## To enable image uploads, make sure the 'images' directory
+## is writable, then set this to true:
+$wgEnableUploads		= true;
+$wgUseImageResize		= true;
+$wgUseImageMagick		= true;
+$wgImageMagickConvertCommand = "/usr/bin/convert";
+
+## If you use ImageMagick (or any other shell command) on a
+## Linux server, this will need to be set to the name of an
+## available UTF-8 locale
+$wgShellLocale = "en_US.utf8";
+
+## If you want to use image uploads under safe mode,
+## create the directories images/archive, images/thumb and
+## images/temp, and make them all writable. Then uncomment
+## this, if it's not already uncommented:
+# $wgHashedUploadDirectory = false;
+
+## If you have the appropriate support software installed
+## you can enable inline LaTeX equations:
+$wgUseTeX           = false;
+
+$wgLocalInterwiki   = strtolower( $wgSitename );
+
+$wgLanguageCode = "en";
+
+$wgSecretKey = "4bf858500e0459a409627b549125510f6ba406818b5adf60d2c608c78fab0b00";
+
+## Default skin: you can change the default skin. Use the internal symbolic
+## names, ie 'standard', 'nostalgia', 'cologneblue', 'monobook':
+$wgDefaultSkin = 'gforge';
+$wgSkipSkins = array('standard','nostalgia','cologneblue','monobook','simple','chick','myskin','modern');
+
+## For attaching licensing metadata to pages, and displaying an
+## appropriate copyright notice / icon. GNU Free Documentation
+## License and Creative Commons licenses are supported so far.
+# $wgEnableCreativeCommonsRdf = true;
+$wgRightsPage = ""; # Set to the title of a wiki page that describes your license/copyright
+$wgRightsUrl = "";
+$wgRightsText = "";
+$wgRightsIcon = "";
+# $wgRightsCode = ""; # Not yet used
+
+$wgDiff3 = "/usr/bin/diff3";
+
+# When you make changes to this configuration file, this will make
+# sure that cached pages are cleared.
+$wgCacheEpoch = max( $wgCacheEpoch, gmdate( 'YmdHis', @filemtime( __FILE__ ) ) );
+
+$wgShowIPinHeader=false;
+require_once $gfplugins.'mediawiki/usr/share/mediawiki/includes/GForgeAuthentication.php';
+$wgAuth = new GForgeAuthenticationPlugin();
+# 'AutoAuthenticate': called to authenticate users on external/environmental means
+# $user: writes user object to this parameter
+$wgHooks['AutoAuthenticate'][] = array($wgAuth, 'getGForgeUserSession',array());
+
+# Client-side caching:
+/** Allow client-side caching of pages */
+//$wgCachePages       = false;
+/**
+ * Set this to current time to invalidate all prior cached pages. Affects both
+ * client- and server-side caching.
+ * You can get the current date on your server by using the command:
+ *   date +%Y%m%d%H%M%S
+ */
+//$wgCacheEpoch = 'date +%Y%m%d%H%M%S';
+
+?>

Added: trunk/gforge_base/evolvisforge-5.1/gforge/rpm-specific/patches/README.mediawiki.jlbond
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/gforge/rpm-specific/patches/README.mediawiki.jlbond	                        (rev 0)
+++ trunk/gforge_base/evolvisforge-5.1/gforge/rpm-specific/patches/README.mediawiki.jlbond	2011-02-28 22:55:03 UTC (rev 15315)
@@ -0,0 +1,100 @@
+#
+# This documentation is written to explain how to get the
+# mediawiki plugin for FusionForge to work.
+#
+# Author: Bond Masuda <bond.masuda at jlbond.com>
+#	  Consultant, JL Bond Consulting
+#
+
+This README file is meant to add clarification to the existing
+README file, so please read that first.
+
+This mediawiki plugin has been patched by JL Bond Consulting, and
+is not the same code that is included in the Fusionforge 4.8.3
+release. The patch files is included in the source RPM.
+
+** HOW TO GET THINGS WORKING **
+
+The following steps assume that you have already installed
+fusionforge, mediawiki, and the mediawiki plugin via 
+JL Bond Consulting provided RPM files.
+
+Step 1) Initialize mediawiki
+Mediawiki must be initialized by running the config script which
+sets up the wiki database and LocalSettings.php.
+
+To create the Wiki database, open http://hostname/mediawiki/config
+in a web browser. 
+
+Wiki name:	Gforge
+Contact e-mail:	root at localhost (or change to admin's email)
+Admin username: wikigod
+Password:	(some relatively strong password)
+Database type:	PostgreSQL
+Database host:	localhost
+Database name:	wikidb
+Database user:	wikiuser
+
+Use the superuser account to create the database
+Superuser name:	postgres
+
+Database port:	5432
+Schema:		mediawiki
+tsearch2 schema: public
+
+After clicking 'Install MediaWiki' at the bottom of the page, you 
+will see an error that tsearch is not installed. Fix this by 
+running the following command as root:
+
+'psql -U postgres wikidb < /usr/share/pgsql/contrib/tsearch2.sql'
+
+Fix the character set for tsearch2:
+shell$ psql -U postgres wikidb -c "UPDATE pg_ts_cfg SET locale='en_US.UTF-8' WHERE ts_name='default'";
+
+Back in your web browser, refresh the page. It should now finish cleanly.
+
+Step 2) FusionForge integration with Mediawiki
+Copy the plugin provided LocalSettings.php to /usr/share/mediawiki. 
+This file provides integration to the FusionForge authentication code.
+
+Copy the "$wgSecretKey" from /usr/share/mediawiki/config/LocalSettings.php 
+to the /usr/share/mediawiki/LocalSettings.php file. 
+
+Finally, disable the configuration script with the following command:
+
+shell# chmod 000 /usr/share/mediawiki/config
+
+Step 3) The mediawiki plugin should work at this point.
+
+** HOW IT IS SUPPOSE TO WORK **
+
+The mediawiki plugin interacts with Mediawiki in two ways:
+
+A) It enables automatic authentication via the Mediawiki hook
+'AutoAuthentication'. This is tied into Mediawiki via the
+LocalSettings.php configuration file of Mediawiki by including 
+the following lines of code at the end of LocalSettings.php:
+
+$wgShowIPinHeader=false;
+require_once( 'includes/GForgeAuthentication.php' );
+$wgAuth = new GForgeAuthenticationPlugin();
+# 'AutoAuthenticate': called to authenticate users on external/environmental means
+# $user: writes user object to this parameter
+$wgHooks['AutoAuthenticate'][] = array($wgAuth, 'getGForgeUserSession',array());
+
+The above require_once() line is the entry point into all the
+GForge authentication code included in this plugin, which are
+located at:
+
+$GFORGE/plugins/mediawiki/usr/share/mediawiki/includes
+
+B) It provides a mediawiki "skin" named "GForge" that controls
+how the mediawiki appears within the FusionForge plugin frame.
+
+However, the original GForge skin code does not work well. Instead,
+we have chosen to symbolically link the "GForge" skin to the 
+"Monobook" skin since that is what it was originally based on. To
+this end, there are symlinks in /usr/share/mediawiki/skins that
+connect the GForge skin to the Monobook skin.
+
+=EOF=

Added: trunk/gforge_base/evolvisforge-5.1/gforge/rpm-specific/patches/fusionforge-4.8.3-ereg_preg.patch
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/gforge/rpm-specific/patches/fusionforge-4.8.3-ereg_preg.patch	                        (rev 0)
+++ trunk/gforge_base/evolvisforge-5.1/gforge/rpm-specific/patches/fusionforge-4.8.3-ereg_preg.patch	2011-02-28 22:55:03 UTC (rev 15315)
@@ -0,0 +1,1485 @@
+diff -ruN fusionforge-4.8.3-original/common/docman/Parsedata.class.php fusionforge-4.8.3-ereg_preg/common/docman/Parsedata.class.php
+--- fusionforge-4.8.3-original/common/docman/Parsedata.class.php	2009-06-07 10:49:31.000000000 -0700
++++ fusionforge-4.8.3-ereg_preg/common/docman/Parsedata.class.php	2010-05-06 04:49:35.260351176 -0700
+@@ -78,7 +78,7 @@
+ 		$cmd = $this->p_path.$this->parsers["text/plain"];
+ 		$cmd = "$cmd $filename";
+ 		$rep1 = shell_exec ($cmd);
+-		return ereg_replace ("\n", " ", "$rep $rep1");
++		return preg_replace("/\n/", " ", "$rep $rep1");
+ 	}
+ 	
+ 	
+diff -ruN fusionforge-4.8.3-original/common/frs/FRSPackage.class.php fusionforge-4.8.3-ereg_preg/common/frs/FRSPackage.class.php
+--- fusionforge-4.8.3-original/common/frs/FRSPackage.class.php	2009-09-20 11:46:33.000000000 -0700
++++ fusionforge-4.8.3-ereg_preg/common/frs/FRSPackage.class.php	2010-05-06 04:52:44.433027838 -0700
+@@ -239,7 +239,7 @@
+ 	 *  @return string  The name of this package.
+ 	 */
+ 	function getFileName() {
+-		return eregi_replace("[^-A-Z0-9_\.]",'',$this->data_array['name']);
++		return preg_replace("/[^-A-Z0-9_\.]/i",'',$this->data_array['name']);
+ 	}
+ 
+ 	/**
+diff -ruN fusionforge-4.8.3-original/common/frs/FRSRelease.class.php fusionforge-4.8.3-ereg_preg/common/frs/FRSRelease.class.php
+--- fusionforge-4.8.3-original/common/frs/FRSRelease.class.php	2009-06-07 10:49:32.000000000 -0700
++++ fusionforge-4.8.3-ereg_preg/common/frs/FRSRelease.class.php	2010-05-06 04:53:11.773415277 -0700
+@@ -226,7 +226,7 @@
+ 	 *  @return string  The filename of this release.
+ 	 */
+ 	function getFileName() {
+-		return eregi_replace("[^-A-Z0-9_\.]",'',$this->data_array['name']);
++		return preg_replace("/[^-A-Z0-9_\.]/i",'',$this->data_array['name']);
+ 	}
+ 
+ 	/**
+diff -ruN fusionforge-4.8.3-original/common/include/account.php fusionforge-4.8.3-ereg_preg/common/include/account.php
+--- fusionforge-4.8.3-original/common/include/account.php	2009-09-20 11:46:33.000000000 -0700
++++ fusionforge-4.8.3-ereg_preg/common/include/account.php	2010-05-06 05:11:16.838900496 -0700
+@@ -61,15 +61,16 @@
+ 		return 0;
+ 	}
+ 
+-	if (!ereg('^[a-z][-a-z0-9_]+$', $name)) {
++	if (!preg_match('/^[a-z][-a-z0-9_]+$/', $name)) {
+ 		$GLOBALS['register_error'] = _('Illegal character in name.');
+ 		return 0;
+ 	}
+ 
+ 	// illegal names
+-	if (eregi("^((root)|(bin)|(daemon)|(adm)|(lp)|(sync)|(shutdown)|(halt)|(mail)|(news)"
+-		. "|(uucp)|(operator)|(games)|(mysql)|(httpd)|(nobody)|(dummy)"
+-		. "|(www)|(cvs)|(shell)|(ftp)|(irc)|(debian)|(ns)|(download))$",$name)) {
++	$regExpReservedNames = "^(root|bin|daemon|adm|lp|sync|shutdown|halt|mail|news|"
++		. "uucp|operator|games|mysql|httpd|nobody|dummy|www|cvs|shell|ftp|irc|"
++		. "debian|ns|download)$";
++	if( preg_match("/$regExpReservedNames/i", $name) ) {
+ 		$GLOBALS['register_error'] = _('Name is reserved.');
+ 		return 0;
+ 	}
+@@ -83,7 +84,7 @@
+ 			return 0;
+ 		}
+ 	}
+-	if (eregi("^(anoncvs_)",$name)) {
++	if (preg_match("/^(anoncvs_)/i",$name)) {
+ 		$GLOBALS['register_error'] = _('Name is reserved for CVS.');
+ 		return 0;
+ 	}
+@@ -102,14 +103,16 @@
+ 	if (!account_namevalid($name)) return 0;
+ 	
+ 	// illegal names
+-	if (eregi("^((www[0-9]?)|(cvs[0-9]?)|(shell[0-9]?)|(ftp[0-9]?)|(irc[0-9]?)|(news[0-9]?)"
+-		. "|(mail[0-9]?)|(ns[0-9]?)|(download[0-9]?)|(pub)|(users)|(compile)|(lists)"
+-		. "|(slayer)|(orbital)|(tokyojoe)|(webdev)|(projects)|(cvs)|(slayer)|(monitor)|(mirrors?))$",$name)) {
++	$regExpReservedGroupNames = "^(www[0-9]?|cvs[0-9]?|shell[0-9]?|ftp[0-9]?|"
++		. "irc[0-9]?|news[0-9]?|mail[0-9]?|ns[0-9]?|download[0-9]?|pub|users|"
++		. "compile|lists|slayer|orbital|tokyojoe|webdev|projects|cvs|monitor|"
++		. "mirrors?)$";
++	if(preg_match("/$regExpReservedGroupNames/i",$name)) {
+ 		$GLOBALS['register_error'] = _('Name is reserved for DNS purposes.');
+ 		return 0;
+ 	}
+ 
+-	if (eregi("_",$name)) {
++	if(preg_match("/_/",$name)) {
+ 		$GLOBALS['register_error'] = _('Group name cannot contain underscore for DNS reasons.');
+ 		return 0;
+ 	}
+@@ -215,7 +218,7 @@
+ 		if ($current == $this_shell) {
+ 			echo "<option selected value=$this_shell>$this_shell</option>\n";
+ 		} else {
+-			if (! ereg("^#",$this_shell)){
++			if (!preg_match("/^#/",$this_shell)){
+ 				echo "<option value=$this_shell>$this_shell</option>\n";
+ 			}
+ 		}
+diff -ruN fusionforge-4.8.3-original/common/include/MailParser.class.php fusionforge-4.8.3-ereg_preg/common/include/MailParser.class.php
+--- fusionforge-4.8.3-original/common/include/MailParser.class.php	2009-06-07 10:49:32.000000000 -0700
++++ fusionforge-4.8.3-ereg_preg/common/include/MailParser.class.php	2010-05-06 05:11:54.229437549 -0700
+@@ -64,7 +64,7 @@
+ 					//
+ 					//	See if line starts with tab, if so ignore it for now
+ 					//
+-					if (!ereg('^[A-z]',$lines[$i])) {
++					if (!preg_match('/^[A-z]/',$lines[$i])) {
+ 						$header[$lastheader] = $header[$lastheader]."\n".$lines[$i];
+ 					} else {
+ 						$pos = (strpos($lines[$i],':'));
+diff -ruN fusionforge-4.8.3-original/common/include/system/LDAP.class.php fusionforge-4.8.3-ereg_preg/common/include/system/LDAP.class.php
+--- fusionforge-4.8.3-original/common/include/system/LDAP.class.php	2009-06-07 10:49:31.000000000 -0700
++++ fusionforge-4.8.3-ereg_preg/common/include/system/LDAP.class.php	2010-05-06 05:13:18.300645854 -0700
+@@ -55,7 +55,7 @@
+ 			return '?';
+ 		}
+ 	
+-		return ereg_replace("[\x80-\xff]","?",$str);
++		return preg_replace("/[\x80-\xff]/","?",$str);
+ 	}
+ 
+ 	/*
+diff -ruN fusionforge-4.8.3-original/common/include/User.class.php fusionforge-4.8.3-ereg_preg/common/include/User.class.php
+--- fusionforge-4.8.3-original/common/include/User.class.php	2009-09-20 11:46:33.000000000 -0700
++++ fusionforge-4.8.3-ereg_preg/common/include/User.class.php	2010-05-06 05:16:54.433756892 -0700
+@@ -1071,7 +1071,7 @@
+ 	 *	@return	string	This user's SSH authorized (public) keys.
+ 	 */
+ 	function getAuthorizedKeys() {
+-		return ereg_replace("###", "\n", $this->data_array['authorized_keys']);
++		return preg_replace("/###/", "\n", $this->data_array['authorized_keys']);
+ 	}
+ 
+ 	/**
+@@ -1082,9 +1082,9 @@
+ 	 */
+ 	function setAuthorizedKeys($keys) {
+ 		$keys = trim($keys);
+-		$keys = ereg_replace("\r\n", "\n", $keys); // Convert to Unix EOL
+-		$keys = ereg_replace("\n+", "\n", $keys); // Remove empty lines
+-		$keys = ereg_replace("\n", "###", $keys); // Convert EOL to marker
++		$keys = preg_replace("/\r\n/", "\n", $keys); // Convert to Unix EOL
++		$keys = preg_replace("/\n+/", "\n", $keys); // Remove empty lines
++		$keys = preg_replace("/\n/", "###", $keys); // Convert EOL to marker
+ 
+ 		$res = db_query_params ('UPDATE users SET authorized_keys=$1 WHERE user_id=$2',
+ 					array ($keys,
+diff -ruN fusionforge-4.8.3-original/common/include/utils.php fusionforge-4.8.3-ereg_preg/common/include/utils.php
+--- fusionforge-4.8.3-original/common/include/utils.php	2009-11-30 11:28:18.000000000 -0800
++++ fusionforge-4.8.3-ereg_preg/common/include/utils.php	2010-05-12 20:52:07.741780378 -0700
+@@ -470,9 +470,14 @@
+ 		// angle brackets in the URL
+ 		// (RFC2396; http://www.w3.org/Addressing/URL/5.1_Wrappers.html)
+ 		$line = str_replace('>', "\1", $line);
+-		$line = eregi_replace("([ \t]|^)www\."," http://www.",$line);
+-		$text = eregi_replace("([[:alnum:]]+)://([^[:space:]<\1]*)([[:alnum:]#?/&=])", "<a href=\"\\1://\\2\\3\" target=\"_new\">\\1://\\2\\3</a>", $line);
+-		$text = eregi_replace("([[:space:]]|^)(([a-z0-9_]|\\-|\\.)+@([^[:space:]]*)([[:alnum:]-]))", "\\1<a href=\"mailto:\\2\" target=\"_new\">\\2</a>", $text);
++		$line = preg_replace( "/([ \t]|^)www\./i", " http://www.", $line);
++		$text = preg_replace( "/([[:alnum:]]+):\/\/([^[:space:]<\1]*)([[:alnum:]#?\/&=])/i", 
++			"<a href=\"\\1://\\2\\3\" target=\"_new\">\\1://\\2\\3</a>", $line);
++		$text = preg_replace( 
++			"/([[:space:]]|^)(([a-z0-9_]|\\-|\\.)+@([^[:space:]]*)([[:alnum:]-]))/i", 
++			"\\1<a href=\"mailto:\\2\" target=\"_new\">\\2</a>", 
++			$text
++			);
+ 		$text = str_replace("\1", '>', $text);
+ 		$newText .= $text;
+ 	}
+@@ -755,7 +760,9 @@
+  *
+  */
+ function validate_email ($address) {
+-	return (ereg('^[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+'. '@'. '[-!#$%&\'*+\\/0-9=?A-Z^_`a-z{|}~]+\.' . '[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+$', $address) !== false);
++	return ( preg_match( 
++	    "/^[-!#$%&\'*+\\.\/0-9=?A-Z^_`a-z{|}~]+@[-!#$%&\'*+\\/0-9=?A-Z^_`a-z{|}~]+\.[-!#$%&\'*+\\.\/0-9=?A-Z^_`a-z{|}~]+$/", 
++	    $address) );
+ }
+ 
+ /**
+@@ -791,7 +798,7 @@
+  */
+ function util_is_valid_filename ($file) {
+ 	//bad char test
+-	$invalidchars = eregi_replace("[-A-Z0-9+_\.]","",$file);
++	$invalidchars = preg_replace("/[-A-Z0-9+_\.]/i","",$file);
+ 
+ 	if (!empty($invalidchars)) {
+ 		return false;
+@@ -814,14 +821,16 @@
+ function valid_hostname ($hostname = "xyz") {
+ 
+ 	//bad char test
+-	$invalidchars = eregi_replace("[-A-Z0-9\.]","",$hostname);
++	$invalidchars = preg_replace("/[-A-Z0-9\.]/i","",$hostname);
+ 
+ 	if (!empty($invalidchars)) {
+ 		return false;
+ 	}
+ 
+ 	//double dot, starts with a . or -
+-	if (ereg("\.\.",$hostname) || ereg("^\.",$hostname) || ereg("^\-",$hostname)) {
++	if ( preg_match("/\.\./",$hostname) || 
++	     preg_match("/^\./",$hostname)  || 
++	     preg_match("/^\-/",$hostname) ) {
+ 		return false;
+ 	}
+ 
+@@ -944,7 +953,7 @@
+ 	$url .= $GLOBALS['sys_default_domain'] ;
+ 	$url .= $GLOBALS['sys_urlprefix'] ;
+ 	$url .= "/" ;
+-	$path = ereg_replace ("^/", "", $path) ;
++	$path = preg_replace ("/^\//", "", $path) ;
+ 	$url .= $path ;
+ 	return $url ;
+ }
+diff -ruN fusionforge-4.8.3-original/cronjobs/forum_gateway.php fusionforge-4.8.3-ereg_preg/cronjobs/forum_gateway.php
+--- fusionforge-4.8.3-original/cronjobs/forum_gateway.php	2009-06-07 10:48:56.000000000 -0700
++++ fusionforge-4.8.3-ereg_preg/cronjobs/forum_gateway.php	2010-05-06 05:24:45.070793885 -0700
+@@ -155,7 +155,7 @@
+ 			$this->Subject = addslashes(substr($subj,$parent_end+3));
+ 		}
+ */
+-		if (ereg('(\[)([0-9]*)(\])',$subj,$arr)) {
++		if (preg_match('/(\[)([0-9]*)(\])/',$subj,$arr)) {
+ 			$this->Parent=$arr[2];
+ 			$parent_end=(strpos($subj,'['.$arr[2].']')) + strlen('['.$arr[2].']');
+ 			$this->Subject = addslashes(substr($subj,$parent_end));
+diff -ruN fusionforge-4.8.3-original/cronjobs/tracker_gateway.php fusionforge-4.8.3-ereg_preg/cronjobs/tracker_gateway.php
+--- fusionforge-4.8.3-original/cronjobs/tracker_gateway.php	2009-06-07 10:48:56.000000000 -0700
++++ fusionforge-4.8.3-ereg_preg/cronjobs/tracker_gateway.php	2010-05-06 05:25:18.481303159 -0700
+@@ -129,7 +129,7 @@
+ 		//we parse that ID to get the artifact that this should post to
+ 		//
+ 		$subj = $mp->getSubject();
+-		if (ereg('(\[)([0-9]*)(\])',$subj,$arr)) {
++		if (preg_match('/(\[)([0-9]*)(\])/',$subj,$arr)) {
+ 		        $this->ArtifactId=$arr[2];
+ 			$artifactid_end=(strpos($subj,'['.$arr[2].']')) + strlen('['.$arr[2].']');
+ 			$this->Subject = addslashes(substr($subj,$artifactid_end));
+diff -ruN fusionforge-4.8.3-original/plugins/fckeditor/www/editor/filemanager/browser/default/connectors/php/connector.php fusionforge-4.8.3-ereg_preg/plugins/fckeditor/www/editor/filemanager/browser/default/connectors/php/connector.php
+--- fusionforge-4.8.3-original/plugins/fckeditor/www/editor/filemanager/browser/default/connectors/php/connector.php	2009-06-07 10:49:31.000000000 -0700
++++ fusionforge-4.8.3-ereg_preg/plugins/fckeditor/www/editor/filemanager/browser/default/connectors/php/connector.php	2010-05-06 05:38:46.383427134 -0700
+@@ -37,14 +37,14 @@
+ else
+ 	$GLOBALS["UserFilesPath"] = '/UserFiles/' ;
+ 
+-if ( ! ereg( '/$', $GLOBALS["UserFilesPath"] ) )
++if ( ! preg_match( '/\/$/', $GLOBALS["UserFilesPath"] ) )
+ 	$GLOBALS["UserFilesPath"] .= '/' ;
+ 
+ if ( strlen( $Config['UserFilesAbsolutePath'] ) > 0 ) 
+ {
+ 	$GLOBALS["UserFilesDirectory"] = $Config['UserFilesAbsolutePath'] ;
+ 
+-	if ( ! ereg( '/$', $GLOBALS["UserFilesDirectory"] ) )
++	if ( ! preg_match( '/\/$/', $GLOBALS["UserFilesDirectory"] ) )
+ 		$GLOBALS["UserFilesDirectory"] .= '/' ;
+ }
+ else
+@@ -70,7 +70,7 @@
+ 		return ;
+ 
+ 	// Check the current folder syntax (must begin and start with a slash).
+-	if ( ! ereg( '/$', $sCurrentFolder ) ) $sCurrentFolder .= '/' ;
++	if ( ! preg_match( '/\/$/', $sCurrentFolder ) ) $sCurrentFolder .= '/' ;
+ 	if ( strpos( $sCurrentFolder, '/' ) !== 0 ) $sCurrentFolder = '/' . $sCurrentFolder ;
+ 	
+ 	// Check for invalid folder paths (..)
+diff -ruN fusionforge-4.8.3-original/plugins/fckeditor/www/editor/filemanager/browser/mcpuk/connectors/php/Commands/GetFoldersAndFiles.php fusionforge-4.8.3-ereg_preg/plugins/fckeditor/www/editor/filemanager/browser/mcpuk/connectors/php/Commands/GetFoldersAndFiles.php
+--- fusionforge-4.8.3-original/plugins/fckeditor/www/editor/filemanager/browser/mcpuk/connectors/php/Commands/GetFoldersAndFiles.php	2009-06-07 10:49:30.000000000 -0700
++++ fusionforge-4.8.3-ereg_preg/plugins/fckeditor/www/editor/filemanager/browser/mcpuk/connectors/php/Commands/GetFoldersAndFiles.php	2010-05-06 05:41:32.615719394 -0700
+@@ -75,7 +75,7 @@
+ 							//check if$fckphp_configured not to show this folder
+ 							$hide=false;
+ 							for($i=0;$i<sizeof($this->fckphp_config['ResourceAreas'][$this->type]['HideFolders']);$i++) 
+-								$hide=(ereg($this->fckphp_config['ResourceAreas'][$this->type]['HideFolders'][$i],$filename)?true:$hide);
++								$hide=(preg_match("/$this->fckphp_config['ResourceAreas'][$this->type]['HideFolders'][$i]/",$filename)?true:$hide);
+ 							
+ 							if (!$hide) echo "\t\t<Folder name=\"$filename\" />\n";
+ 							
+@@ -99,7 +99,7 @@
+ 					//check if$fckphp_configured not to show this file
+ 					$editable=$hide=false;
+ 					for($j=0;$j<sizeof($this->fckphp_config['ResourceAreas'][$this->type]['HideFiles']);$j++) 
+-						$hide=(ereg($this->fckphp_config['ResourceAreas'][$this->type]['HideFiles'][$j],$files[$i])?true:$hide);
++						$hide=(preg_match("/$this->fckphp_config['ResourceAreas'][$this->type]['HideFiles'][$j]/",$files[$i])?true:$hide);
+ 					
+ 					if (!$hide) {
+ 						if ($this->fckphp_config['ResourceAreas'][$this->type]['AllowImageEditing']) 
+diff -ruN fusionforge-4.8.3-original/plugins/fckeditor/www/editor/filemanager/browser/mcpuk/connectors/php/Commands/GetFolders.php fusionforge-4.8.3-ereg_preg/plugins/fckeditor/www/editor/filemanager/browser/mcpuk/connectors/php/Commands/GetFolders.php
+--- fusionforge-4.8.3-original/plugins/fckeditor/www/editor/filemanager/browser/mcpuk/connectors/php/Commands/GetFolders.php	2009-06-07 10:49:30.000000000 -0700
++++ fusionforge-4.8.3-ereg_preg/plugins/fckeditor/www/editor/filemanager/browser/mcpuk/connectors/php/Commands/GetFolders.php	2010-05-06 05:47:07.170355828 -0700
+@@ -48,7 +48,7 @@
+ 							//check if$fckphp_configured not to show this folder
+ 							$hide=false;
+ 							for($i=0;$i<sizeof($this->fckphp_config['ResourceAreas'][$this->type]['HideFolders']);$i++) 
+-								$hide=(ereg($this->fckphp_config['ResourceAreas'][$this->type]['HideFolders'][$i],$filename)?true:$hide);
++								$hide=(preg_match("/$this->fckphp_config['ResourceAreas'][$this->type]['HideFolders'][$i]/",$filename)?true:$hide);
+ 							
+ 							if (!$hide) echo "<Folder name=\"$filename\" />\n";
+ 						}
+diff -ruN fusionforge-4.8.3-original/plugins/mediawiki/usr/share/mediawiki/includes/GForgePre.php fusionforge-4.8.3-ereg_preg/plugins/mediawiki/usr/share/mediawiki/includes/GForgePre.php
+--- fusionforge-4.8.3-original/plugins/mediawiki/usr/share/mediawiki/includes/GForgePre.php	2009-06-07 10:49:05.000000000 -0700
++++ fusionforge-4.8.3-ereg_preg/plugins/mediawiki/usr/share/mediawiki/includes/GForgePre.php	2010-05-06 05:47:45.830893510 -0700
+@@ -137,7 +137,7 @@
+         if (getStringFromServer('REQUEST_URI')!='/' && $expl_pathinfo[1]!='account' && $expl_pathinfo[1]!='export' ) exit_not_logged_in();
+ 	// Show proj* export even if not logged in when force login
+ 	// If not default web project page would be broken
+-	if ($expl_pathinfo[1]=='export' && !ereg("^proj", $expl_pathinfo[2])) exit_not_logged_in();
++	if ($expl_pathinfo[1]=='export' && !preg_match("/^proj/", $expl_pathinfo[2])) exit_not_logged_in();
+ }
+ 
+ //insert this page view into the database
+diff -ruN fusionforge-4.8.3-original/plugins/scmccase/common/CCasePlugin.class.php fusionforge-4.8.3-ereg_preg/plugins/scmccase/common/CCasePlugin.class.php
+--- fusionforge-4.8.3-original/plugins/scmccase/common/CCasePlugin.class.php	2009-06-07 10:49:02.000000000 -0700
++++ fusionforge-4.8.3-ereg_preg/plugins/scmccase/common/CCasePlugin.class.php	2010-05-06 05:48:23.971424328 -0700
+@@ -80,7 +80,7 @@
+ 		$project =& group_get_object($group_id);
+ 		
+ 		if ($project->usesPlugin ("scmccase")) {
+-			$vob_tag = ereg_replace ("GROUPNAME", $project->getUnixName (), $this->tag_pattern) ;
++			$vob_tag = preg_replace("/GROUPNAME/", $project->getUnixName (), $this->tag_pattern) ;
+ 	
+ 			print '<h2>ClearCase</h2>
+ 		                <p>Documentation for ClearCase is probably available somewhere.
+diff -ruN fusionforge-4.8.3-original/plugins/scmsvn/cronjobs/svn-stats.php fusionforge-4.8.3-ereg_preg/plugins/scmsvn/cronjobs/svn-stats.php
+--- fusionforge-4.8.3-original/plugins/scmsvn/cronjobs/svn-stats.php	2009-06-07 10:49:27.000000000 -0700
++++ fusionforge-4.8.3-ereg_preg/plugins/scmsvn/cronjobs/svn-stats.php	2010-05-06 05:48:59.191914843 -0700
+@@ -75,7 +75,7 @@
+ 			$end_time, $time_ok, $date_key, $user_list;
+ 	switch ($last_tag) {
+ 		case "AUTHOR":
+-			$last_user = ereg_replace ('[^a-z0-9_-]', '', 
++			$last_user = preg_replace('/[^a-z0-9_-]/', '', 
+ 						   strtolower (trim ($chars))) ;
+ 			// We can save time by looking up users and caching them
+ 			if (!array_key_exists($last_user, $user_list)) {
+diff -ruN fusionforge-4.8.3-original/plugins/webcalendar/www/includes/functions.php fusionforge-4.8.3-ereg_preg/plugins/webcalendar/www/includes/functions.php
+--- fusionforge-4.8.3-original/plugins/webcalendar/www/includes/functions.php	2009-06-07 10:49:24.000000000 -0700
++++ fusionforge-4.8.3-ereg_preg/plugins/webcalendar/www/includes/functions.php	2010-05-06 05:44:33.338220213 -0700
+@@ -472,11 +472,11 @@
+  * @ignore
+  */
+ function get_web_browser () {
+-  if ( ereg ( "MSIE [0-9]", getenv ( "HTTP_USER_AGENT" ) ) )
++  if ( preg_match( "/MSIE [0-9]/", getenv ( "HTTP_USER_AGENT" ) ) )
+     return "MSIE";
+-  if ( ereg ( "Mozilla/[234]", getenv ( "HTTP_USER_AGENT" ) ) )
++  if ( preg_match( "/Mozilla\/[234]/", getenv ( "HTTP_USER_AGENT" ) ) )
+     return "Netscape";
+-  if ( ereg ( "Mozilla/[5678]", getenv ( "HTTP_USER_AGENT" ) ) )
++  if ( preg_match( "/Mozilla\/[5678]/", getenv ( "HTTP_USER_AGENT" ) ) )
+     return "Mozilla";
+   return "Unknown";
+ }
+@@ -1026,7 +1026,7 @@
+   } else {
+     $langs = explode ( ",", $HTTP_ACCEPT_LANGUAGE );
+     for ( $i = 0; $i < count ( $langs ); $i++ ) {
+-     $l = strtolower ( trim ( ereg_replace(';.*', '', $langs[$i] ) ) );
++     $l = strtolower ( trim ( preg_replace('/;.*/', '', $langs[$i] ) ) );
+       $ret .= "\"$l\" ";
+       if ( ! empty ( $browser_languages[$l] ) ) {
+         return $browser_languages[$l];
+@@ -3413,10 +3413,10 @@
+  *                (http or https)
+  */
+ function activate_urls ( $text ) {
+-  $str = eregi_replace ( "(http://[^[:space:]$]+)",
+-    "<a href=\"\\1\">\\1</a>", $text );
+-  $str = eregi_replace ( "(https://[^[:space:]$]+)",
+-    "<a href=\"\\1\">\\1</a>", $str );
++  $str = preg_replace( "/(http:\/\/[^[:space:]$]+)/i",
++	"<a href=\"\\1\">\\1</a>", $text );
++  $str = preg_replace( "/(https:\/\/[^[:space:]$]+)/i",
++	"<a href=\"\\1\">\\1</a>", $str );
+   return $str;
+ }
+ 
+diff -ruN fusionforge-4.8.3-original/plugins/webcalendar/www/includes/translate.php fusionforge-4.8.3-ereg_preg/plugins/webcalendar/www/includes/translate.php
+--- fusionforge-4.8.3-original/plugins/webcalendar/www/includes/translate.php	2009-06-07 10:49:24.000000000 -0700
++++ fusionforge-4.8.3-ereg_preg/plugins/webcalendar/www/includes/translate.php	2010-05-06 05:45:41.839170429 -0700
+@@ -174,8 +174,8 @@
+  */
+ function tooltip ( $str ) {
+   $ret = translate ( $str );
+-  $ret = eregi_replace ( "<[^>]+>", "", $ret );
+-  $ret = eregi_replace ( "\"", "'", $ret );
++  $ret = preg_replace( "/<[^>]+>/i", "", $ret );
++  $ret = preg_replace( "/\"/", "'", $ret );
+   return $ret;
+ }
+ 
+diff -ruN fusionforge-4.8.3-original/plugins/wiki/www/lib/FileFinder.php fusionforge-4.8.3-ereg_preg/plugins/wiki/www/lib/FileFinder.php
+--- fusionforge-4.8.3-original/plugins/wiki/www/lib/FileFinder.php	2009-06-07 10:49:22.000000000 -0700
++++ fusionforge-4.8.3-ereg_preg/plugins/wiki/www/lib/FileFinder.php	2010-05-06 05:52:13.264623168 -0700
+@@ -156,8 +156,8 @@
+      * @return bool True if path is absolute. 
+      */
+     function _is_abs($path) {
+-        if (ereg('^/', $path)) return true;
+-        elseif (isWindows() and (eregi('^[a-z]:[/\\]', $path))) return true;
++        if (preg_match('/^\//', $path)) return true;
++        elseif (isWindows() and (preg_match('%^[a-z]:[/\\]%i', $path))) return true;
+         else return false;
+     }
+ 
+@@ -664,4 +664,4 @@
+ // c-hanging-comment-ender-p: nil
+ // indent-tabs-mode: nil
+ // End:
+-?>
+\ No newline at end of file
++?>
+diff -ruN fusionforge-4.8.3-original/plugins/wiki/www/lib/IniConfig.php fusionforge-4.8.3-ereg_preg/plugins/wiki/www/lib/IniConfig.php
+--- fusionforge-4.8.3-original/plugins/wiki/www/lib/IniConfig.php	2009-06-07 10:49:22.000000000 -0700
++++ fusionforge-4.8.3-ereg_preg/plugins/wiki/www/lib/IniConfig.php	2010-05-06 05:52:45.845078725 -0700
+@@ -897,7 +897,7 @@
+                 define('USE_PATH_INFO', false);
+                 break;
+             default:
+-                define('USE_PATH_INFO', ereg('\.(php3?|cgi)$', SCRIPT_NAME));
++                define('USE_PATH_INFO', preg_match('/\.(php3?|cgi)$/', SCRIPT_NAME));
+                 break;
+             }
+         }
+diff -ruN fusionforge-4.8.3-original/plugins/wiki/www/lib/loadsave.php fusionforge-4.8.3-ereg_preg/plugins/wiki/www/lib/loadsave.php
+--- fusionforge-4.8.3-original/plugins/wiki/www/lib/loadsave.php	2009-06-07 10:49:22.000000000 -0700
++++ fusionforge-4.8.3-ereg_preg/plugins/wiki/www/lib/loadsave.php	2010-05-06 05:53:11.175433086 -0700
+@@ -53,7 +53,7 @@
+     $tmpl = Template('html', array('TITLE' => $title,
+                                    'HEADER' => $title,
+                                    'CONTENT' => $html ? $html : '%BODY%'));
+-    echo ereg_replace('%BODY%.*', '', $tmpl->getExpansion($html));
++    echo preg_replace('/%BODY%.*/', '', $tmpl->getExpansion($html));
+     $request->chunkOutput();
+     
+     // set marker for sendPageChangeNotification()
+diff -ruN fusionforge-4.8.3-original/plugins/wiki/www/lib/nusoap/nusoap.php fusionforge-4.8.3-ereg_preg/plugins/wiki/www/lib/nusoap/nusoap.php
+--- fusionforge-4.8.3-original/plugins/wiki/www/lib/nusoap/nusoap.php	2009-06-07 10:49:20.000000000 -0700
++++ fusionforge-4.8.3-ereg_preg/plugins/wiki/www/lib/nusoap/nusoap.php	2010-05-06 10:56:48.463896187 -0700
+@@ -277,7 +277,7 @@
+                     break;
+                 }
+             }
+-            if($valueType=='arraySimple' || ereg('^ArrayOf',$type)){
++            if($valueType=='arraySimple' || preg_match('/^ArrayOf/',$type)){
+                 $i = 0;
+                 if(is_array($val) && count($val)> 0){
+                     foreach($val as $v){
+@@ -441,7 +441,7 @@
+ function timestamp_to_iso8601($timestamp,$utc=true){
+     $datestr = date('Y-m-d\TH:i:sO',$timestamp);
+     if($utc){
+-        $eregStr =
++        $pregStr =
+             '([0-9]{4})-'.	// centuries & years CCYY-
+             '([0-9]{2})-'.	// months MM-
+             '([0-9]{2})'.	// days DD
+@@ -451,7 +451,7 @@
+             '([0-9]{2})(\.[0-9]*)?'. // seconds ss.ss...
+             '(Z|[+\-][0-9]{2}:?[0-9]{2})?'; // Z to indicate UTC, -/+HH:MM:SS.SS... for local tz's
+         
+-        if(ereg($eregStr,$datestr,$regs)){
++        if(preg_match("/$pregStr/",$datestr,$regs)){
+             return sprintf('%04d-%02d-%02dT%02d:%02d:%02dZ',$regs[1],$regs[2],$regs[3],$regs[4],$regs[5],$regs[6]);
+         }
+         return false;
+@@ -467,7 +467,7 @@
+ * @access   public
+ */
+ function iso8601_to_timestamp($datestr){
+-    $eregStr =
++    $pregStr =
+ 	'([0-9]{4})-'.	// centuries & years CCYY-
+ 	'([0-9]{2})-'.	// months MM-
+ 	'([0-9]{2})'.	// days DD
+@@ -476,7 +476,7 @@
+ 	'([0-9]{2}):'.	// minutes mm:
+ 	'([0-9]{2})(\.[0-9]+)?'. // seconds ss.ss...
+ 	'(Z|[+\-][0-9]{2}:?[0-9]{2})?'; // Z to indicate UTC, -/+HH:MM:SS.SS... for local tz's
+-    if(ereg($eregStr,$datestr,$regs)){
++    if(preg_match("/$pregStr/",$datestr,$regs)){
+         // not utc
+         if($regs[8] != 'Z'){
+             $op = substr($regs[8],0,1);
+@@ -708,7 +708,7 @@
+             if(count($attrs) > 0){
+                 foreach($attrs as $k => $v){
+                     // if ns declarations, add to class level array of valid namespaces
+-                    if(ereg("^xmlns",$k)){
++                    if(preg_match("/^xmlns/",$k)){
+                 	//$this->xdebug("$k: $v");
+                 	//$this->xdebug('ns_prefix: '.$this->getPrefix($k));
+                 	if($ns_prefix = substr(strrchr($k,':'),1)){
+@@ -783,7 +783,7 @@
+                     $this->currentComplexType = $attrs['name'];
+                     $this->complexTypes[$this->currentComplexType] = $attrs;
+                     $this->complexTypes[$this->currentComplexType]['typeClass'] = 'complexType';
+-                    if(isset($attrs['base']) && ereg(':Array$',$attrs['base'])){
++                    if(isset($attrs['base']) && preg_match('/:Array$/',$attrs['base'])){
+                         $this->complexTypes[$this->currentComplexType]['phpType'] = 'array';
+                     } else {
+                         $this->complexTypes[$this->currentComplexType]['phpType'] = 'struct';
+@@ -952,7 +952,7 @@
+ 	*/
+ 	function expandQname($qname){
+             // get element prefix
+-            if(strpos($qname,':') && !ereg('^http://',$qname)){
++            if(strpos($qname,':') && !preg_match('%^http://%',$qname)){
+                 // get unqualified name
+                 $name = substr(strstr($qname,':'),1);
+                 // get ns prefix
+@@ -1430,7 +1430,7 @@
+         $data = $this->incoming_payload."\r\n\r\n\r\n\r\n";
+ 		
+         // remove 100 header
+-        if(ereg('^HTTP/1.1 100',$data)){
++        if(preg_match('%^HTTP/1.1 100%',$data)){
+             if($pos = strpos($data,"\r\n\r\n") ){
+                 $data = ltrim(substr($data,$pos));
+             } elseif($pos = strpos($data,"\n\n") ){
+@@ -1604,7 +1604,7 @@
+         //$t->setMarker('closed curl');
+ 		
+         // remove 100 header
+-        if(ereg('^HTTP/1.1 100',$data)){
++        if(preg_match('%^HTTP/1.1 100%',$data)){
+             if($pos = strpos($data,"\r\n\r\n") ){
+                 $data = ltrim(substr($data,$pos));
+             } elseif($pos = strpos($data,"\n\n") ){
+@@ -1838,7 +1838,7 @@
+             $qs = $QUERY_STRING;
+         }
+         // gen wsdl
+-        if(isset($qs) && ereg('wsdl', $qs) ){
++        if(isset($qs) && preg_match('/wsdl/', $qs) ){
+             if($this->externalWSDLURL){
+                 header('Location: '.$this->externalWSDLURL);
+                 exit();
+@@ -1908,7 +1908,7 @@
+             // get the character encoding of the incoming request
+             if(strpos($this->headers['Content-Type'],'=')){
+                 $enc = str_replace('"','',substr(strstr($this->headers["Content-Type"],'='),1));
+-                if(eregi('^(ISO-8859-1|US-ASCII|UTF-8)$',$enc)){
++                if(preg_match('/^(ISO-8859-1|US-ASCII|UTF-8)$/i',$enc)){
+                     $this->xml_encoding = $enc;
+                 } else {
+                     $this->xml_encoding = 'us-ascii';
+@@ -2527,7 +2527,7 @@
+      */
+     function start_element($parser, $name, $attrs)
+     {
+-        if ($this->status == 'schema' || ereg('schema$', $name)) {
++        if ($this->status == 'schema' || preg_match('/schema$/', $name)) {
+             // $this->debug("startElement for $name ($attrs[name]). status = $this->status (".$this->getLocalPart($name).")");
+             $this->status = 'schema';
+             $this->schemaStartElement($parser, $name, $attrs);
+@@ -2539,7 +2539,7 @@
+             $this->depth_array[$depth] = $pos;
+             $this->message[$pos] = array('cdata' => ''); 
+             // get element prefix
+-            if (ereg(':', $name)) {
++            if (preg_match('/:/', $name)) {
+                 // get ns prefix
+                 $prefix = substr($name, 0, strpos($name, ':')); 
+                 // get ns
+@@ -2551,7 +2551,7 @@
+             if (count($attrs) > 0) {
+                 foreach($attrs as $k => $v) {
+                     // if ns declarations, add to class level array of valid namespaces
+-                    if (ereg("^xmlns", $k)) {
++                    if (preg_match("/^xmlns/", $k)) {
+                         if ($ns_prefix = substr(strrchr($k, ':'), 1)) {
+                             $this->namespaces[$ns_prefix] = $v;
+                         } else {
+@@ -2720,7 +2720,7 @@
+      */
+     function end_element($parser, $name){ 
+         // unset schema status
+-        if (ereg('types$', $name) || ereg('schema$', $name)) {
++        if (preg_match('/types$/', $name) || preg_match('/schema$/', $name)) {
+             $this->status = "";
+         } 
+         if ($this->status == 'schema') {
+@@ -3344,7 +3344,7 @@
+ 			$key_localpart = $this->getLocalPart($key);
+ 			// if ns declarations, add to class level array of valid namespaces
+             if($key_prefix == 'xmlns'){
+-				if(ereg('^http://www.w3.org/[0-9]{4}/XMLSchema$',$value)){
++				if(preg_match('#^http://www.w3.org/[0-9]{4}/XMLSchema$#',$value)){
+ 					$this->XMLSchemaVersion = $value;
+ 					$this->namespaces['xsd'] = $this->XMLSchemaVersion;
+ 					$this->namespaces['xsi'] = $this->XMLSchemaVersion.'-instance';
+@@ -3368,7 +3368,7 @@
+ 				// should do something here with the namespace of specified type?
+ 			} elseif($key_localpart == 'arrayType'){
+ 				$this->message[$pos]['type'] = 'array';
+-				/* do arrayType ereg here
++				/* do arrayType preg here
+ 				[1]    arrayTypeValue    ::=    atype asize
+ 				[2]    atype    ::=    QName rank*
+ 				[3]    rank    ::=    '[' (',')* ']'
+@@ -3377,7 +3377,7 @@
+ 				[6]    nextDimension    ::=    Digit+ ','
+ 				*/
+ 				$expr = '([A-Za-z0-9_]+):([A-Za-z]+[A-Za-z0-9_]+)\[([0-9]+),?([0-9]*)\]';
+-				if(ereg($expr,$value,$regs)){
++				if(preg_match("/$expr/",$value,$regs)){
+ 					$this->message[$pos]['typePrefix'] = $regs[1];
+ 					$this->message[$pos]['arraySize'] = $regs[3];
+ 					$this->message[$pos]['arrayCols'] = $regs[4];
+@@ -3847,7 +3847,7 @@
+ 		// detect transport
+ 		switch(true){
+ 			// http(s)
+-			case ereg('^http',$this->endpoint):
++			case preg_match('/^http/',$this->endpoint):
+ 				$this->debug('transporting via HTTP');
+ 				if($this->persistentConnection && is_object($this->persistentConnection)){
+ 					$http =& $this->persistentConnection;
+@@ -3867,10 +3867,10 @@
+ 					$http->setEncoding($this->http_encoding);
+ 				}
+ 				$this->debug('sending message, length: '.strlen($msg));
+-				if(ereg('^http:',$this->endpoint)){
++				if(preg_match('/^http:/',$this->endpoint)){
+ 				//if(strpos($this->endpoint,'http:')){
+ 					$response = $http->send($msg,$timeout);
+-				} elseif(ereg('^https',$this->endpoint)){
++				} elseif(preg_match('/^https:/',$this->endpoint)){
+ 				//} elseif(strpos($this->endpoint,'https:')){
+ 					//if(phpversion() == '4.3.0-dev'){
+ 						//$response = $http->send($msg,$timeout);
+diff -ruN fusionforge-4.8.3-original/plugins/wiki/www/lib/pear/DB/ifx.php fusionforge-4.8.3-ereg_preg/plugins/wiki/www/lib/pear/DB/ifx.php
+--- fusionforge-4.8.3-original/plugins/wiki/www/lib/pear/DB/ifx.php	2009-06-07 10:49:18.000000000 -0700
++++ fusionforge-4.8.3-ereg_preg/plugins/wiki/www/lib/pear/DB/ifx.php	2010-05-06 11:09:26.545037337 -0700
+@@ -416,7 +416,7 @@
+      */
+     function errorCode($nativecode)
+     {
+-        if (ereg('SQLCODE=(.*)]', $nativecode, $match)) {
++        if (preg_match('/SQLCODE=(.*)]/', $nativecode, $match)) {
+             $code = $match[1];
+             if (isset($this->errorcode_map[$code])) {
+                 return $this->errorcode_map[$code];
+diff -ruN fusionforge-4.8.3-original/plugins/wiki/www/lib/pear/DB/ldap.php fusionforge-4.8.3-ereg_preg/plugins/wiki/www/lib/pear/DB/ldap.php
+--- fusionforge-4.8.3-original/plugins/wiki/www/lib/pear/DB/ldap.php	2009-06-07 10:49:18.000000000 -0700
++++ fusionforge-4.8.3-ereg_preg/plugins/wiki/www/lib/pear/DB/ldap.php	2010-05-06 11:29:02.347949859 -0700
+@@ -867,7 +867,7 @@
+     function createSequence($seq_name)
+     {
+         // Extract $seq_id from DN
+-        ereg("^([^,]*),", $seq_name, $regs);
++        preg_match("/^([^,]*),/", $seq_name, $regs);
+         $seq_id = $regs[1];
+ 
+         // Create the sequence entry
+diff -ruN fusionforge-4.8.3-original/plugins/wiki/www/lib/plugin/HtmlConverter.php fusionforge-4.8.3-ereg_preg/plugins/wiki/www/lib/plugin/HtmlConverter.php
+--- fusionforge-4.8.3-original/plugins/wiki/www/lib/plugin/HtmlConverter.php	2009-06-07 10:49:20.000000000 -0700
++++ fusionforge-4.8.3-ereg_preg/plugins/wiki/www/lib/plugin/HtmlConverter.php	2010-05-06 14:21:34.766151630 -0700
+@@ -98,10 +98,15 @@
+ 
+ 	function _processA(&$file) {
+ 
+-	    $file = eregi_replace(
+-	    "<a([[:space:]]+)href([[:space:]]*)=([[:space:]]*)\"([-/.a-zA-Z0-9_~#@%$?&=:\200-\377\(\)[:space:]]+)\"([^>]*)>", "{{\\4}}", $file);
+-	
+-		$file = eregi_replace("{{([-/a-zA-Z0-9._~#@%$?&=:\200-\377\(\)[:space:]]+)}}([^<]+)</a>", "[ \\2 | \\1 ]", $file);
++	    // $file = eregi_replace(
++	    // "<a([[:space:]]+)href([[:space:]]*)=([[:space:]]*)\"([-/.a-zA-Z0-9_~#@%$?&=:\200-\377\(\)[:space:]]+)\"([^>]*)>", "{{\\4}}", $file);
++
++	    $pRegEx = "<a(\s+)href(\s*)=(\s*)\"([-/\.a-zA-Z0-9_~#@%$?&=:\200-\377\(\)\s]+)\"([^>]*)>";
++	    $file = preg_replace( "|$pRegEx|i", "{{\\4}}", $file );
++
++	    // $file = eregi_replace("{{([-/a-zA-Z0-9._~#@%$?&=:\200-\377\(\)[:space:]]+)}}([^<]+)</a>", "[ \\2 | \\1 ]", $file);
++	    $pRegEx = "{{([-/a-zA-Z0-9\._~#@%$?&=:\200-\377\(\)\s]+)}}([^<]+)</a>";
++	    $file = preg_replace( "|$pRegEx|i", "[ \\2 | \\1 ]", $file );
+ 	}
+ 
+ 	function _processIMG(&$file) {
+@@ -145,29 +150,41 @@
+ 		
+ 		$file = str_replace ("\r\n", "\n", $file);
+ 		
+-		$file = eregi_replace ("<h1[[:space:]]?[^>]*>", "\n\n!!!!", $file);
++		// $file = eregi_replace ("<h1[[:space:]]?[^>]*>", "\n\n!!!!", $file);
++		$file = preg_replace("|<h1[\s]?[^>]*>|i", "\n\n!!!!", $file);
+ 		
+-		$file = eregi_replace ("<h2[[:space:]]?[^>]*>", "\n\n!!!", $file);
++		// $file = eregi_replace ("<h2[[:space:]]?[^>]*>", "\n\n!!!", $file);
++		$file = preg_replace("|<h2[\s]?[^>]*>|i", "\n\n!!!", $file);
+ 		
+-		$file = eregi_replace ("<h3[[:space:]]?[^>]*>", "\n\n!!", $file);
++		// $file = eregi_replace ("<h3[[:space:]]?[^>]*>", "\n\n!!", $file);
++		$file = preg_replace("|<h3[\s]?[^>]*>|i", "\n\n!!", $file);
+ 		
+-		$file = eregi_replace ("<h4[[:space:]]?[^>]*>", "\n\n!", $file);
++		// $file = eregi_replace ("<h4[[:space:]]?[^>]*>", "\n\n!", $file);
++		$file = preg_replace("|<h4[\s]?[^>]*>|i", "\n\n!", $file);
+ 		
+-		$file = eregi_replace ("<h5[[:space:]]?[^>]*>", "\n\n__", $file);
++		// $file = eregi_replace ("<h5[[:space:]]?[^>]*>", "\n\n__", $file);
++		$file = preg_replace("|<h5[\s]?[^>]*>|i", "\n\n__", $file);
+ 		
+-		$file = eregi_replace ("</h1>", "\n\n", $file);
++		// $file = eregi_replace ("</h1>", "\n\n", $file);
++		$file = preg_replace("|</h1>|i", "\n\n", $file);
+ 		
+-		$file = eregi_replace ("</h2>", "\n\n", $file);
++		// $file = eregi_replace ("</h2>", "\n\n", $file);
++		$file = preg_replace("|</h2>|i", "\n\n", $file);
+ 		
+-		$file = eregi_replace ("</h3>", "\n\n", $file);
++		// $file = eregi_replace ("</h3>", "\n\n", $file);
++		$file = preg_replace("|</h3>|i", "\n\n", $file);
+ 		
+-		$file = eregi_replace ("</h4>", "\n\n", $file);
++		// $file = eregi_replace ("</h4>", "\n\n", $file);
++		$file = preg_replace("|</h4>|i", "\n\n", $file);
+ 		
+-		$file = eregi_replace ("</h5>", "__\n\n", $file);
++		// $file = eregi_replace ("</h5>", "__\n\n", $file);
++		$file = preg_replace("|</h5>|i", "__\n\n", $file);
+ 		
+-		$file = eregi_replace ("<hr[[:space:]]?[^>]*>", "\n----\n", $file);
++		// $file = eregi_replace ("<hr[[:space:]]?[^>]*>", "\n----\n", $file);
++		$file = preg_replace("|<hr[\s]?[^>]*>|i", "\n----\n", $file);
+ 	
+-		$file = eregi_replace ("<li[[:space:]]?[^>]*>", "* ", $file);
++		// $file = eregi_replace ("<li[[:space:]]?[^>]*>", "* ", $file);
++		$file = preg_replace("|<li[\s]?[^>]*>|i", "* ", $file);
+ 
+ 		// strip all tags, except for <pre>, which is supported by wiki
+ 		// and <p>'s which will be converted after compression.		
+diff -ruN fusionforge-4.8.3-original/plugins/wiki/www/lib/Request.php fusionforge-4.8.3-ereg_preg/plugins/wiki/www/lib/Request.php
+--- fusionforge-4.8.3-original/plugins/wiki/www/lib/Request.php	2009-06-07 10:49:22.000000000 -0700
++++ fusionforge-4.8.3-ereg_preg/plugins/wiki/www/lib/Request.php	2010-05-06 14:22:48.337132224 -0700
+@@ -739,7 +739,7 @@
+                 }
+                 $tmp_file .= '/' . basename($fileinfo['tmp_name']);
+                 /* ending slash in php.ini upload_tmp_dir is required. */
+-                if (realpath(ereg_replace('/+', '/', $tmp_file)) != realpath($fileinfo['tmp_name'])) {
++                if (realpath(preg_replace('|/+|', '/', $tmp_file)) != realpath($fileinfo['tmp_name'])) {
+                     trigger_error(sprintf("Uploaded tmpfile illegal: %s != %s.",$tmp_file, $fileinfo['tmp_name']).
+                     	          "\n".
+                     	          "Probably illegal TEMP environment or upload_tmp_dir setting. ".
+diff -ruN fusionforge-4.8.3-original/plugins/wiki/www/lib/WikiDB/adodb/drivers/adodb-sybase.inc.php fusionforge-4.8.3-ereg_preg/plugins/wiki/www/lib/WikiDB/adodb/drivers/adodb-sybase.inc.php
+--- fusionforge-4.8.3-original/plugins/wiki/www/lib/WikiDB/adodb/drivers/adodb-sybase.inc.php	2009-06-07 10:49:22.000000000 -0700
++++ fusionforge-4.8.3-ereg_preg/plugins/wiki/www/lib/WikiDB/adodb/drivers/adodb-sybase.inc.php	2010-05-06 14:26:39.560344264 -0700
+@@ -363,7 +363,7 @@
+ 	global $ADODB_sybase_mths;
+ 	
+ 		//Dec 30 2000 12:00AM
+-		if (!ereg( "([A-Za-z]{3})[-/\. ]+([0-9]{1,2})[-/\. ]+([0-9]{4})"
++		if (!preg_match( "|([A-Za-z]{3})[-/\. ]+([0-9]{1,2})[-/\. ]+([0-9]{4})|"
+ 			,$v, $rr)) return parent::UnixDate($v);
+ 			
+ 		if ($rr[3] <= TIMESTAMP_FIRST_YEAR) return 0;
+@@ -380,7 +380,7 @@
+ 	global $ADODB_sybase_mths;
+ 		//11.02.2001 Toni Tunkkari toni.tunkkari at finebyte.com
+ 		//Changed [0-9] to [0-9 ] in day conversion
+-		if (!ereg( "([A-Za-z]{3})[-/\. ]([0-9 ]{1,2})[-/\. ]([0-9]{4}) +([0-9]{1,2}):([0-9]{1,2}) *([apAP]{0,1})"
++		if (!preg_match( "|([A-Za-z]{3})[-/\. ]([0-9 ]{1,2})[-/\. ]([0-9]{4}) +([0-9]{1,2}):([0-9]{1,2}) *([apAP]{0,1})|"
+ 			,$v, $rr)) return parent::UnixTimeStamp($v);
+ 		if ($rr[3] <= TIMESTAMP_FIRST_YEAR) return 0;
+ 		
+diff -ruN fusionforge-4.8.3-original/plugins/wiki/www/lib/WikiDB/backend/cvs.php fusionforge-4.8.3-ereg_preg/plugins/wiki/www/lib/WikiDB/backend/cvs.php
+--- fusionforge-4.8.3-original/plugins/wiki/www/lib/WikiDB/backend/cvs.php	2009-06-07 10:49:21.000000000 -0700
++++ fusionforge-4.8.3-ereg_preg/plugins/wiki/www/lib/WikiDB/backend/cvs.php	2010-05-06 14:29:53.733668313 -0700
+@@ -97,7 +97,7 @@
+             $this->_mkdir( $this->_repository, 0775 );
+     
+             // assume that the repository is a local directory, prefix :local:
+-            if ( !ereg( "^:local:", $this->_repository ) ) {
++            if ( !preg_match( "/^:local:/", $this->_repository ) ) {
+                 $this->_repository = ":local:" . $this->_repository;
+             }
+             
+@@ -288,7 +288,7 @@
+ 
+         // shift log data until we get to the 'revision X.X' line
+         // FIXME: ensure that we don't enter an endless loop here
+-        while ( !ereg( "^revision 1.([0-9]+)$", $logdata[0], $revInfo ) ) {
++        while ( !preg_match( "/^revision 1.([0-9]+)$/", $logdata[0], $revInfo ) ) {
+             array_shift( $logdata );
+         }
+ 
+@@ -563,7 +563,7 @@
+ 
+     function _strip_leading_underscore( &$item ) 
+     {
+-        $item = ereg_replace( "^_", "", $item );
++        $item = preg_replace( "/^_/", "", $item );
+     }
+ 
+     /**
+@@ -645,7 +645,7 @@
+ 
+         $cmdOutput = implode( "\n", $cmdOutput );
+         $revInfo = array();
+-        ereg( "\nnew revision: 1[.]([0-9]+); previous revision: ", $cmdOutput,
++        preg_match( "/\nnew revision: 1[.]([0-9]+); previous revision: /", $cmdOutput,
+               $revInfo );
+ 
+         $this->_cvsDebug( "CP: revInfo 0: $revInfo[0]" );
+@@ -654,7 +654,7 @@
+             $this->_cvsDebug( "CP: got revision information" );
+             return $revInfo[1];
+         } else {
+-            ereg( "\ninitial revision: 1[.]([0-9]+)", $cmdOutput, $revInfo );
++            preg_match( "/\ninitial revision: 1[.]([0-9]+)/", $cmdOutput, $revInfo );
+             if ( isset( $revInfo[1] ) ) {
+                 $this->_cvsDebug( "CP: is initial release" );
+                 return 1;
+@@ -909,7 +909,7 @@
+      */
+     function _strip_newlines( &$item, $key )
+     {
+-        $item = ereg_replace( "\n$", "", $item );
++        $item = preg_replace( "/\n$/", "", $item );
+     }
+ 
+ } /* End of WikiDB_backend_cvs class */
+@@ -1008,7 +1008,7 @@
+     {
+         do {
+             $pageName = Cvs_Backend_Array_Iterator::next();
+-        } while ( !eregi( $this->_searchString, $pageName ) );
++        } while ( !preg_match( "|$this->_searchString|i", $pageName ) );
+ 
+         return $pageName;
+     }
+diff -ruN fusionforge-4.8.3-original/plugins/wiki/www/lib/WikiUserNew.php fusionforge-4.8.3-ereg_preg/plugins/wiki/www/lib/WikiUserNew.php
+--- fusionforge-4.8.3-original/plugins/wiki/www/lib/WikiUserNew.php	2009-06-07 10:49:22.000000000 -0700
++++ fusionforge-4.8.3-ereg_preg/plugins/wiki/www/lib/WikiUserNew.php	2010-05-06 14:31:02.954898677 -0700
+@@ -1842,7 +1842,7 @@
+     }
+     $Connect = @fsockopen ( $ConnectAddress, 25 );
+     if ($Connect) {
+-        if (ereg("^220", $Out = fgets($Connect, 1024))) {
++        if (preg_match("/^220/", $Out = fgets($Connect, 1024))) {
+             fputs ($Connect, "HELO $HTTP_HOST\r\n");
+             $Out = fgets ( $Connect, 1024 );
+             fputs ($Connect, "MAIL FROM: <".$email.">\r\n");
+@@ -1851,12 +1851,12 @@
+             $To = fgets ($Connect, 1024);
+             fputs ($Connect, "QUIT\r\n");
+             fclose($Connect);
+-            if (!ereg ("^250", $From)) {
++            if (!preg_match("/^250/", $From)) {
+                 $result[0]=false;
+                 $result[1]="Server rejected address: ". $From;
+                 return $result;
+             }
+-            if (!ereg ( "^250", $To )) {
++            if (!preg_match( "/^250/", $To )) {
+                 $result[0]=false;
+                 $result[1]="Server rejected address: ". $To;
+                 return $result;
+diff -ruN fusionforge-4.8.3-original/www/admin/admin_table.php fusionforge-4.8.3-ereg_preg/www/admin/admin_table.php
+--- fusionforge-4.8.3-original/www/admin/admin_table.php	2009-06-07 10:48:51.000000000 -0700
++++ fusionforge-4.8.3-ereg_preg/www/admin/admin_table.php	2010-05-06 05:32:36.727976815 -0700
+@@ -218,7 +218,7 @@
+ 			$sql .= "$var='". htmlspecialchars($val) ."', ";
+ 		}
+ 	}
+-	$sql = ereg_replace(', $', ' ', $sql);
++	$sql = preg_replace('/, $/', ' ', $sql);
+ 	$sql .= "WHERE $primary_key=$id";
+ 
+ 	if (db_query($sql)) {
+diff -ruN fusionforge-4.8.3-original/www/docman/include/vtemplate.class.php fusionforge-4.8.3-ereg_preg/www/docman/include/vtemplate.class.php
+--- fusionforge-4.8.3-original/www/docman/include/vtemplate.class.php	2009-06-07 10:48:52.000000000 -0700
++++ fusionforge-4.8.3-ereg_preg/www/docman/include/vtemplate.class.php	2010-05-06 05:30:42.766242522 -0700
+@@ -206,7 +206,7 @@
+ // pour débogage
+ function message ($text)
+ {
+-	$t = ereg_replace("\n", "", $text);
++	$t = preg_replace("/\n/", "", $text);
+   if (defined("FICHIER_MESSAGES_DEBUG"))
+ 	{
+ 	  $fichier = FICHIER_MESSAGES_DEBUG;
+diff -ruN fusionforge-4.8.3-original/www/docman/search.php fusionforge-4.8.3-ereg_preg/www/docman/search.php
+--- fusionforge-4.8.3-original/www/docman/search.php	2009-09-20 11:46:26.000000000 -0700
++++ fusionforge-4.8.3-ereg_preg/www/docman/search.php	2010-05-06 05:31:51.757292535 -0700
+@@ -238,13 +238,13 @@
+ 	
+ 	$rep = $text; 
+ 	$rep = utf8_decode($rep);
+-	$rep = ereg_replace ("é", "e", $rep);
+-	$rep = ereg_replace ("è", "e", $rep);
+-	$rep = ereg_replace ("ê", "e", $rep);
+-	$rep = ereg_replace ("à", "a", $rep);
+-	$rep = ereg_replace ("ù", "u", $rep);
+-	$rep = ereg_replace ("ç", "c", $rep);
+-	$rep = ereg_replace ("é", "e", $rep);
++	$rep = preg_replace ("/é/", "e", $rep);
++	$rep = preg_replace ("/è/", "e", $rep);
++	$rep = preg_replace ("/ê/", "e", $rep);
++	$rep = preg_replace ("/à/", "a", $rep);
++	$rep = preg_replace ("/ù/", "u", $rep);
++	$rep = preg_replace ("/ç/", "c", $rep);
++	$rep = preg_replace ("/é/", "e", $rep);
+ 	$rep = strtolower ($rep);
+ 	return $rep;
+ }
+diff -ruN fusionforge-4.8.3-original/www/forum/include/ForumHTML.class.php fusionforge-4.8.3-ereg_preg/www/forum/include/ForumHTML.class.php
+--- fusionforge-4.8.3-original/www/forum/include/ForumHTML.class.php	2009-06-07 10:48:51.000000000 -0700
++++ fusionforge-4.8.3-ereg_preg/www/forum/include/ForumHTML.class.php	2010-05-06 05:33:43.268989103 -0700
+@@ -531,7 +531,7 @@
+ 	if ($this->Forum->userCanPost()) {
+ 		if ($subject) {
+ 			//if this is a followup, put a RE: before it if needed
+-			if (!eregi('RE:',$subject,$test)) {
++			if (!preg_match('/RE:/i',$subject,$test)) {
+ 				$subject ='RE: '.$subject;
+ 			}
+ 		}
+diff -ruN fusionforge-4.8.3-original/www/include/browser.php fusionforge-4.8.3-ereg_preg/www/include/browser.php
+--- fusionforge-4.8.3-original/www/include/browser.php	2009-06-07 10:48:51.000000000 -0700
++++ fusionforge-4.8.3-ereg_preg/www/include/browser.php	2010-05-06 03:45:50.518734144 -0700
+@@ -61,13 +61,13 @@
+ */
+ 
+ 
+-if (ereg( 'MSIE ([0-9].[0-9]{1,2})',getStringFromServer('HTTP_USER_AGENT'),$log_version)) {
++if (preg_match( '/MSIE ([0-9].[0-9]{1,2})/',getStringFromServer('HTTP_USER_AGENT'),$log_version)) {
+ 	$GLOBALS['BROWSER_VER']=$log_version[1];
+ 	$GLOBALS['BROWSER_AGENT']='IE';
+-} elseif (ereg( 'Opera ([0-9].[0-9]{1,2})',getStringFromServer('HTTP_USER_AGENT'),$log_version)) {
++} elseif (preg_match( '/Opera ([0-9].[0-9]{1,2})/',getStringFromServer('HTTP_USER_AGENT'),$log_version)) {
+ 	$GLOBALS['BROWSER_VER']=$log_version[1];
+ 	$GLOBALS['BROWSER_AGENT']='OPERA';
+-} elseif (ereg( 'Mozilla/([0-9].[0-9]{1,2})',getStringFromServer('HTTP_USER_AGENT'),$log_version)) {
++} elseif (preg_match( '/Mozilla\/([0-9].[0-9]{1,2})/',getStringFromServer('HTTP_USER_AGENT'),$log_version)) {
+ 	$GLOBALS['BROWSER_VER']=$log_version[1];
+ 	$GLOBALS['BROWSER_AGENT']='MOZILLA';
+ } else {
+diff -ruN fusionforge-4.8.3-original/www/include/filechecks.php fusionforge-4.8.3-ereg_preg/www/include/filechecks.php
+--- fusionforge-4.8.3-original/www/include/filechecks.php	2009-06-07 10:48:51.000000000 -0700
++++ fusionforge-4.8.3-ereg_preg/www/include/filechecks.php	2010-05-06 03:52:55.604759001 -0700
+@@ -27,7 +27,7 @@
+ 		return 0;
+ 	}
+ 
+-	if (ereg('^\.',$filename)) {
++	if (preg_match('/^\./',$filename)) {
+ 		return 0;
+ 	}
+ 
+@@ -73,82 +73,82 @@
+ 
+ 	$filename = chop($filename);
+ 
+-	if (ereg(".diff$",$filename)) {
++	if (preg_match("/\.diff$/",$filename)) {
+ 		$filetype = "diff";
+ 	}
+-	elseif (ereg(".diff.gz$",$filename)) {
++	elseif (preg_match("/\.diff.gz$/",$filename)) {
+ 		$filetype = "diff/gz";
+ 		filechecks_gz($filename);
+ 	}
+-	elseif (ereg(".asc$",$filename)) {
++	elseif (preg_match("/\.asc$/",$filename)) {
+ 		$filetype = "asc";
+ 	}
+-	elseif (ereg(".bin$",$filename)) {
++	elseif (preg_match("/\.bin$/",$filename)) {
+ 		$filetype = "bin";
+ 	}
+-	elseif (ereg(".exe$",$filename)) {
++	elseif (preg_match("/\.exe$/",$filename)) {
+ 		$filetype = "exe";
+ 	}
+-	elseif (ereg(".jar$",$filename)) {
++	elseif (preg_match("/\.jar$/",$filename)) {
+ 		$filetype = "jar";
+ 	}
+-	elseif (ereg(".lsm$",$filename)) {
++	elseif (preg_match("/\.lsm$/",$filename)) {
+ 		$filetype = "lsm";
+ 	}
+-	elseif (ereg(".pdb$",$filename)) {
++	elseif (preg_match("/\.pdb$/",$filename)) {
+ 		$filetype = "pilot";
+ 	}
+-	elseif (ereg(".pl$",$filename)) {
++	elseif (preg_match("/\.pl$/",$filename)) {
+ 		$filetype = "perl";
+ 	}
+-	elseif (ereg(".py$",$filename)) {
++	elseif (preg_match("/\.py$/",$filename)) {
+ 		$filetype = "python";
+ 	}
+-	elseif (ereg(".prc$",$filename)) {
++	elseif (preg_match("/\.prc$/",$filename)) {
+ 		$filetype = "pilot";
+ 	}
+-	elseif (ereg(".sig$",$filename)) {
++	elseif (preg_match("/\.sig$/",$filename)) {
+ 		$filetype = "sig";
+ 	}
+-	elseif (ereg(".tar.bz2$",$filename)) {
++	elseif (preg_match("/\.tar.bz2$/",$filename)) {
+ 		$filetype = "tar/bz2";
+ 	}
+-	elseif (ereg(".tar.gz$",$filename)) {
++	elseif (preg_match("/\.tar.gz$/",$filename)) {
+ 		$filetype = "tar/gz";
+ 		filechecks_targz($filename);
+ 	}
+-	elseif (ereg(".tgz$",$filename)) {
++	elseif (preg_match("/\.tgz$/",$filename)) {
+ 		$filetype = "tgz";
+ 	}
+-	elseif (ereg(".zip$",$filename)) {
++	elseif (preg_match("/\.zip$/",$filename)) {
+ 		$filetype = "zip";
+ 	}
+-	elseif (ereg(".shar.gz$",$filename)) {
++	elseif (preg_match("/\.shar.gz$/",$filename)) {
+ 		$filetype = "shar/gz";
+ 	}
+-	elseif (ereg(".bz2$",$filename)) {
++	elseif (preg_match("/\.bz2$/",$filename)) {
+ 		$filetype = "bz2";
+ 	}
+-	elseif (ereg(".gz$",$filename)) {
++	elseif (preg_match("/\.gz$/",$filename)) {
+ 		$filetype = "gz";
+ 		filechecks_gz($filename);
+ 	}
+-	elseif (ereg(".i386.rpm$",$filename)) {
++	elseif (preg_match("/\.i386.rpm$/",$filename)) {
+ 		$filetype = "i386 rpm";
+ 	}
+-	elseif (ereg(".alpha.rpm$",$filename)) {
++	elseif (preg_match("/\.alpha.rpm$/",$filename)) {
+ 		$filetype = "alpha rpm";
+ 	}
+-	elseif (ereg(".src.rpm$",$filename)) {
++	elseif (preg_match("/\.src.rpm$/",$filename)) {
+ 		$filetype = "src rpm";
+ 	}
+-	elseif (ereg(".rpm$",$filename)) {
++	elseif (preg_match("/\.rpm$/",$filename)) {
+ 		$filetype = "rpm";
+ 	}
+-	elseif (ereg(".deb$",$filename)) {
++	elseif (preg_match("/\.deb$/",$filename)) {
+ 		$filetype = "deb";
+ 	}
+-	elseif (ereg("\.([a-zA-Z]+)$",$filename,$regs)) {
++	elseif (preg_match("/\.([a-zA-Z]+)$/",$filename,$regs)) {
+ 		$filetype = $regs[1];		
+ 	} 
+ 
+diff -ruN fusionforge-4.8.3-original/www/include/HTML_Graphs.php fusionforge-4.8.3-ereg_preg/www/include/HTML_Graphs.php
+--- fusionforge-4.8.3-original/www/include/HTML_Graphs.php	2009-06-07 10:48:51.000000000 -0700
++++ fusionforge-4.8.3-ereg_preg/www/include/HTML_Graphs.php	2010-05-06 05:28:39.284362472 -0700
+@@ -474,7 +474,7 @@
+ 	echo ">";
+ 
+         // Decide if the value in bar is a color code or image.
+-        if (ereg("^#", $bars[$i]))
++        if (preg_match("/^#/", $bars[$i]))
+            {
+ ?>
+ 
+@@ -611,13 +611,13 @@
+ <?php
+         // Set background to a color if it starts with # or
+         // an image otherwise.
+-        if (ereg("^#", $dbars[$i])) { print 'style="background-color:' . $dbars[$i] . '">'; }
++        if (preg_match("/^#/", $dbars[$i])) { print 'style="background-color:' . $dbars[$i] . '">'; }
+         else { print 'background="' . $dbars[$i] . '">'; }
+ ?>
+            <nowrap>
+ <?php
+         // Decide if the value in bar is a color code or image.
+-        if (ereg("^#", $bars[$i]))
++        if (preg_match("/^#/", $bars[$i]))
+            {
+ ?>
+             <table align="left" cellpadding="0" cellspacing="0"
+diff -ruN fusionforge-4.8.3-original/www/include/logger.php fusionforge-4.8.3-ereg_preg/www/include/logger.php
+--- fusionforge-4.8.3-original/www/include/logger.php	2009-09-20 11:46:25.000000000 -0700
++++ fusionforge-4.8.3-ereg_preg/www/include/logger.php	2010-05-12 16:28:51.761957334 -0700
+@@ -32,7 +32,9 @@
+ 	//
+ 	//
+ 	if ( $GLOBALS['sys_urlprefix'] != '' ) {
+-		$pathwithoutprefix=ereg_replace($GLOBALS['sys_urlprefix'],'',getStringFromServer('REQUEST_URI'));
++		$pathwithoutprefix=preg_replace( 
++			'/$GLOBALS[\'sys_urlprefix\']/','',
++			getStringFromServer('REQUEST_URI') );
+ 	} else {
+ 		$pathwithoutprefix=getStringFromServer('REQUEST_URI');
+ 	}
+diff -ruN fusionforge-4.8.3-original/www/include/pre.php fusionforge-4.8.3-ereg_preg/www/include/pre.php
+--- fusionforge-4.8.3-original/www/include/pre.php	2009-11-30 11:28:15.000000000 -0800
++++ fusionforge-4.8.3-ereg_preg/www/include/pre.php	2010-05-06 03:29:50.485277078 -0700
+@@ -117,10 +117,15 @@
+ //mandatory login
+ if (!session_loggedin() && $sys_force_login == 1 ) {
+ 	$expl_pathinfo = explode('/',getStringFromServer('REQUEST_URI'));
+-        if (getStringFromServer('REQUEST_URI')!='/' && $expl_pathinfo[1]!='account' && $expl_pathinfo[1]!='export' ) exit_not_logged_in();
++        if ( getStringFromServer('REQUEST_URI')!='/' && 
++	     $expl_pathinfo[1]!='account' && 
++	     $expl_pathinfo[1]!='export' ) 
++		exit_not_logged_in();
+ 	// Show proj* export even if not logged in when force login
+ 	// If not default web project page would be broken
+-	if ($expl_pathinfo[1]=='export' && !ereg("^proj", $expl_pathinfo[2])) exit_not_logged_in();
++	if ( $expl_pathinfo[1]=='export' && 
++	     !preg_match("/^proj/", $expl_pathinfo[2]) ) 
++		exit_not_logged_in();
+ }
+ 
+ //insert this page view into the database
+diff -ruN fusionforge-4.8.3-original/www/news/submit.php fusionforge-4.8.3-ereg_preg/www/news/submit.php
+--- fusionforge-4.8.3-original/www/news/submit.php	2009-06-07 10:48:49.000000000 -0700
++++ fusionforge-4.8.3-ereg_preg/www/news/submit.php	2010-05-06 05:29:49.995439181 -0700
+@@ -65,7 +65,7 @@
+ 
+ 				db_begin();
+ 				$f=new Forum(group_get_object($sys_news_group));
+-				if (!$f->create(ereg_replace('[^_\.0-9a-z-]','-', strtolower($summary)),$details,1,'',0,0)) {
++				if (!$f->create(preg_replace('/[^_\.0-9a-z-]/','-', strtolower($summary)),$details,1,'',0,0)) {
+ 					db_rollback();
+ 					exit_error('Error',$f->getErrorMessage());
+ 				}
+diff -ruN fusionforge-4.8.3-original/www/project/admin/project_admin_utils.php fusionforge-4.8.3-ereg_preg/www/project/admin/project_admin_utils.php
+--- fusionforge-4.8.3-original/www/project/admin/project_admin_utils.php	2009-06-07 10:48:48.000000000 -0700
++++ fusionforge-4.8.3-ereg_preg/www/project/admin/project_admin_utils.php	2010-05-06 05:36:14.811293587 -0700
+@@ -171,7 +171,7 @@
+ 			<tr '. $GLOBALS['HTML']->boxGetAltRowStyle($i) .'><td>'.$field.'</td><td>';
+ 			
+ 			if (is_numeric(db_result($result, $i, 'old_value'))) {
+-				if (ereg("user|User", $field)) {
++				if (preg_match("/[Uu]ser/", $field)) {
+ 					echo user_getname(db_result($result, $i, 'old_value'));
+ 				} else {
+ 					echo db_result($result, $i, 'old_value');
+diff -ruN fusionforge-4.8.3-original/www/project/admin/roleedit.php fusionforge-4.8.3-ereg_preg/www/project/admin/roleedit.php
+--- fusionforge-4.8.3-original/www/project/admin/roleedit.php	2009-06-07 10:48:48.000000000 -0700
++++ fusionforge-4.8.3-ereg_preg/www/project/admin/roleedit.php	2010-05-06 05:35:20.270464342 -0700
+@@ -133,12 +133,12 @@
+ $j = 0;
+ $keys = array_keys($role->role_values);
+ for ($i=0; $i<count($keys); $i++) {
+-        if ((!$group->usesForum() && ereg("forum", $keys[$i])) ||
+-                (!$group->usesTracker() && ereg("tracker", $keys[$i])) ||
+-                (!$group->usesPM() && ereg("pm", $keys[$i])) ||
+-                (!$group->usesFRS() && ereg("frs", $keys[$i])) ||
+-                (!$group->usesSCM() && ereg("scm", $keys[$i])) ||
+-                (!$group->usesDocman() && ereg("docman", $keys[$i]))) {
++        if ((!$group->usesForum() && preg_match("/forum/", $keys[$i])) ||
++                (!$group->usesTracker() && preg_match("/tracker/", $keys[$i])) ||
++                (!$group->usesPM() && preg_match("/pm/", $keys[$i])) ||
++                (!$group->usesFRS() && preg_match("/frs/", $keys[$i])) ||
++                (!$group->usesSCM() && preg_match("/scm/", $keys[$i])) ||
++                (!$group->usesDocman() && preg("/docman/", $keys[$i]))) {
+ 
+                 //We don't display modules not used
+ 
+diff -ruN fusionforge-4.8.3-original/www/scm/viewvc.php fusionforge-4.8.3-ereg_preg/www/scm/viewvc.php
+--- fusionforge-4.8.3-original/www/scm/viewvc.php	2009-06-07 10:48:50.000000000 -0700
++++ fusionforge-4.8.3-ereg_preg/www/scm/viewvc.php	2010-05-06 04:42:47.604534565 -0700
+@@ -37,7 +37,7 @@
+ 	}
+ }
+ // Remove eventual leading /root/ or root/
+-$projectName = ereg_replace('^..[^/]*/','', $projectName);
++$projectName = preg_replace('%^..[^/]*/%','', $projectName);
+ if (!$projectName) {
+ 	exit_no_group();
+ }
+diff -ruN fusionforge-4.8.3-original/www/sendmessage.php fusionforge-4.8.3-ereg_preg/www/sendmessage.php
+--- fusionforge-4.8.3-original/www/sendmessage.php	2009-06-07 10:48:52.000000000 -0700
++++ fusionforge-4.8.3-ereg_preg/www/sendmessage.php	2010-05-13 00:33:05.987544961 -0700
+@@ -44,7 +44,7 @@
+ 	}
+ }
+ 
+-if ($toaddress && !eregi($GLOBALS['sys_default_domain'],$toaddress)) {
++if ($toaddress && !preg_match('/$GLOBALS[\'sys_default_domain\']/i',$toaddress)) {
+ 	exit_error(_('Error'),sprintf(_('You can only send to addresses @<em>%1$s</em>.'),$GLOBALS['sys_default_domain']));
+ }
+ 
+@@ -77,7 +77,7 @@
+ 		/*
+ 			send it to the toaddress
+ 		*/
+-		$to=eregi_replace('_maillink_','@',$toaddress);
++		$to=preg_replace('/_maillink_/i','@',$toaddress);
+ 		$to = util_remove_CRLF($to);
+ 		util_send_message($to,stripslashes($subject),stripslashes($body),$email,'',$name);
+ 		$HTML->header(array('title'=>$GLOBALS['sys_name'].' ' ._('Contact')   ));
+diff -ruN fusionforge-4.8.3-original/www/soap/nusoap.php fusionforge-4.8.3-ereg_preg/www/soap/nusoap.php
+--- fusionforge-4.8.3-original/www/soap/nusoap.php	2009-11-30 11:28:17.000000000 -0800
++++ fusionforge-4.8.3-ereg_preg/www/soap/nusoap.php	2010-05-06 04:23:29.987853912 -0700
+@@ -562,7 +562,7 @@
+ 			case (is_array($val) || $type):
+ 				// detect if struct or array
+ 				$valueType = $this->isArraySimpleOrStruct($val);
+-                if($valueType=='arraySimple' || ereg('^ArrayOf',$type)){
++                if($valueType=='arraySimple' || preg_match('/^ArrayOf/',$type)){
+ 			   		$this->debug("serialize_val: serialize array");
+ 					$i = 0;
+ 					if(is_array($val) && count($val)> 0){
+@@ -765,7 +765,7 @@
+ 	*/
+ 	function expandQname($qname){
+ 		// get element prefix
+-		if(strpos($qname,':') && !ereg('^http://',$qname)){
++		if(strpos($qname,':') && !preg_match('/^http:\/\//',$qname)){
+ 			// get unqualified name
+ 			$name = substr(strstr($qname,':'),1);
+ 			// get ns prefix
+@@ -904,7 +904,7 @@
+ function timestamp_to_iso8601($timestamp,$utc=true){
+ 	$datestr = date('Y-m-d\TH:i:sO',$timestamp);
+ 	if($utc){
+-		$eregStr =
++		$pregStr =
+ 		'([0-9]{4})-'.	// centuries & years CCYY-
+ 		'([0-9]{2})-'.	// months MM-
+ 		'([0-9]{2})'.	// days DD
+@@ -914,7 +914,7 @@
+ 		'([0-9]{2})(\.[0-9]*)?'. // seconds ss.ss...
+ 		'(Z|[+\-][0-9]{2}:?[0-9]{2})?'; // Z to indicate UTC, -/+HH:MM:SS.SS... for local tz's
+ 
+-		if(ereg($eregStr,$datestr,$regs)){
++		if(preg_match("/$pregStr/",$datestr,$regs)){
+ 			return sprintf('%04d-%02d-%02dT%02d:%02d:%02dZ',$regs[1],$regs[2],$regs[3],$regs[4],$regs[5],$regs[6]);
+ 		}
+ 		return false;
+@@ -930,7 +930,7 @@
+ * @access   public
+ */
+ function iso8601_to_timestamp($datestr){
+-	$eregStr =
++	$pregStr =
+ 	'([0-9]{4})-'.	// centuries & years CCYY-
+ 	'([0-9]{2})-'.	// months MM-
+ 	'([0-9]{2})'.	// days DD
+@@ -939,7 +939,7 @@
+ 	'([0-9]{2}):'.	// minutes mm:
+ 	'([0-9]{2})(\.[0-9]+)?'. // seconds ss.ss...
+ 	'(Z|[+\-][0-9]{2}:?[0-9]{2})?'; // Z to indicate UTC, -/+HH:MM:SS.SS... for local tz's
+-	if(ereg($eregStr,$datestr,$regs)){
++	if(preg_match("/$pregStr/",$datestr,$regs)){
+ 		// not utc
+ 		if($regs[8] != 'Z'){
+ 			$op = substr($regs[8],0,1);
+@@ -1267,7 +1267,7 @@
+         if(count($attrs) > 0){
+         	foreach($attrs as $k => $v){
+                 // if ns declarations, add to class level array of valid namespaces
+-				if(ereg("^xmlns",$k)){
++				if(preg_match("/^xmlns/",$k)){
+                 	//$this->xdebug("$k: $v");
+                 	//$this->xdebug('ns_prefix: '.$this->getPrefix($k));
+                 	if($ns_prefix = substr(strrchr($k,':'),1)){
+@@ -1379,7 +1379,7 @@
+ 					//                        minOccurs="0" maxOccurs="unbounded" />
+ 					//                </sequence>
+ 					//            </complexType>
+-					if(isset($attrs['base']) && ereg(':Array$',$attrs['base'])){
++					if(isset($attrs['base']) && preg_match('/:Array$/',$attrs['base'])){
+ 						$this->xdebug('complexType is unusual array');
+ 						$this->complexTypes[$this->currentComplexType]['phpType'] = 'array';
+ 					} else {
+@@ -1399,7 +1399,7 @@
+ 					//                        minOccurs="0" maxOccurs="unbounded" />
+ 					//                </sequence>
+ 					//            </complexType>
+-					if(isset($attrs['base']) && ereg(':Array$',$attrs['base'])){
++					if(isset($attrs['base']) && preg_match('/:Array$/',$attrs['base'])){
+ 						$this->xdebug('complexType is unusual array');
+ 						$this->complexTypes[$this->currentComplexType]['phpType'] = 'array';
+ 					} else {
+@@ -1809,7 +1809,7 @@
+ 		} elseif(isset($this->attributes[$type])){
+ 			$this->xdebug("in getTypeDef, found attribute $type");
+ 			return $this->attributes[$type];
+-		} elseif (ereg('_ContainedType$', $type)) {
++		} elseif (preg_match('/_ContainedType$/', $type)) {
+ 			$this->xdebug("in getTypeDef, have an untyped element $type");
+ 			$typeDef['typeClass'] = 'simpleType';
+ 			$typeDef['phpType'] = 'scalar';
+@@ -2173,7 +2173,7 @@
+ 			$this->ch_options = $curl_options;
+ 		}
+ 		$this->use_curl = $use_curl;
+-		ereg('\$Revisio' . 'n: ([^ ]+)', $this->revision, $rev);
++		preg_match('/\$Revisio/' . 'n: ([^ ]+)', $this->revision, $rev);
+ 		$this->setHeader('User-Agent', $this->title.'/'.$this->version.' ('.$rev[1].')');
+ 	}
+ 
+@@ -2936,7 +2936,7 @@
+ 				}
+ 			}
+ 			// remove 100 headers
+-			if (isset($lb) && ereg('^HTTP/1.1 100',$data)) {
++			if (isset($lb) && preg_match('/^HTTP\/1.1 100/',$data)) {
+ 				unset($lb);
+ 				$data = '';
+ 			}//
+@@ -3102,7 +3102,7 @@
+ 		if ($data == '') {
+ 			// have nothing left; just remove 100 header(s)
+ 			$data = $savedata;
+-			while (ereg('^HTTP/1.1 100',$data)) {
++			while (preg_match('/^HTTP\/1.1 100/',$data)) {
+ 				if ($pos = strpos($data,"\r\n\r\n")) {
+ 					$data = ltrim(substr($data,$pos));
+ 				} elseif($pos = strpos($data,"\n\n") ) {
+@@ -3654,7 +3654,7 @@
+ 		}
+ 		$this->debug("In service, query string=$qs");
+ 
+-		if (ereg('wsdl', $qs) ){
++		if (preg_match('/wsdl/', $qs) ){
+ 			$this->debug("In service, this is a request for WSDL");
+ 			if($this->externalWSDLURL){
+               if (strpos($this->externalWSDLURL,"://")!==false) { // assume URL
+@@ -3725,7 +3725,7 @@
+ 			// get the character encoding of the incoming request
+ 			if(isset($this->headers['content-type']) && strpos($this->headers['content-type'],'=')){
+ 				$enc = str_replace('"','',substr(strstr($this->headers["content-type"],'='),1));
+-				if(eregi('^(ISO-8859-1|US-ASCII|UTF-8)$',$enc)){
++				if(preg_match('/^(ISO-8859-1|US-ASCII|UTF-8)$/i',$enc)){
+ 					$this->xml_encoding = strtoupper($enc);
+ 				} else {
+ 					$this->xml_encoding = 'US-ASCII';
+@@ -3754,7 +3754,7 @@
+ 						$enc = substr(strstr($v, '='), 1);
+ 						$enc = str_replace('"', '', $enc);
+ 						$enc = str_replace('\\', '', $enc);
+-						if (eregi('^(ISO-8859-1|US-ASCII|UTF-8)$', $enc)) {
++						if (preg_match('/^(ISO-8859-1|US-ASCII|UTF-8)$/i', $enc)) {
+ 							$this->xml_encoding = strtoupper($enc);
+ 						} else {
+ 							$this->xml_encoding = 'US-ASCII';
+@@ -3788,7 +3788,7 @@
+ 						$enc = substr(strstr($v, '='), 1);
+ 						$enc = str_replace('"', '', $enc);
+ 						$enc = str_replace('\\', '', $enc);
+-						if (eregi('^(ISO-8859-1|US-ASCII|UTF-8)$', $enc)) {
++						if (preg_match('/^(ISO-8859-1|US-ASCII|UTF-8)$/i', $enc)) {
+ 							$this->xml_encoding = strtoupper($enc);
+ 						} else {
+ 							$this->xml_encoding = 'US-ASCII';
+@@ -4126,7 +4126,7 @@
+         	$payload .= $this->getDebugAsXMLComment();
+         }
+ 		$this->outgoing_headers[] = "Server: $this->title Server v$this->version";
+-		ereg('\$Revisio' . 'n: ([^ ]+)', $this->revision, $rev);
++		preg_match('/\$Revision: ([^ ]+)/', $this->revision, $rev);
+ 		$this->outgoing_headers[] = "X-SOAP-Server: $this->title/$this->version (".$rev[1].")";
+ 		// Let the Web server decide about this
+ 		//$this->outgoing_headers[] = "Connection: Close\r\n";
+@@ -4214,7 +4214,7 @@
+ 		if (strpos($headers['content-type'], '=')) {
+ 			$enc = str_replace('"', '', substr(strstr($headers["content-type"], '='), 1));
+ 			$this->debug('Got response encoding: ' . $enc);
+-			if(eregi('^(ISO-8859-1|US-ASCII|UTF-8)$',$enc)){
++			if(preg_match('/^(ISO-8859-1|US-ASCII|UTF-8)$/i',$enc)){
+ 				$this->xml_encoding = strtoupper($enc);
+ 			} else {
+ 				$this->xml_encoding = 'US-ASCII';
+@@ -4781,7 +4781,7 @@
+             $this->currentSchema->schemaStartElement($parser, $name, $attrs);
+             $this->appendDebug($this->currentSchema->getDebug());
+             $this->currentSchema->clearDebug();
+-        } elseif (ereg('schema$', $name)) {
++        } elseif (preg_match('/schema$/', $name)) {
+         	$this->debug('Parsing WSDL schema');
+             // $this->debug("startElement for $name ($attrs[name]). status = $this->status (".$this->getLocalPart($name).")");
+             $this->status = 'schema';
+@@ -4800,7 +4800,7 @@
+             if (count($attrs) > 0) {
+ 				// register namespace declarations
+                 foreach($attrs as $k => $v) {
+-                    if (ereg("^xmlns", $k)) {
++                    if (preg_match("/^xmlns/", $k)) {
+                         if ($ns_prefix = substr(strrchr($k, ':'), 1)) {
+                             $this->namespaces[$ns_prefix] = $v;
+                         } else {
+@@ -4825,7 +4825,7 @@
+                 $attrs = array();
+             } 
+             // get element prefix, namespace and name
+-            if (ereg(':', $name)) {
++            if (preg_match('/:/', $name)) {
+                 // get ns prefix
+                 $prefix = substr($name, 0, strpos($name, ':')); 
+                 // get ns
+@@ -4990,7 +4990,7 @@
+ 	*/
+ 	function end_element($parser, $name){ 
+ 		// unset schema status
+-		if (/*ereg('types$', $name) ||*/ ereg('schema$', $name)) {
++		if (/*ereg('types$', $name) ||*/ preg_match('/schema$/', $name)) {
+ 			$this->status = "";
+             $this->appendDebug($this->currentSchema->getDebug());
+             $this->currentSchema->clearDebug();
+@@ -6587,7 +6587,7 @@
+ 			$key_localpart = $this->getLocalPart($key);
+ 			// if ns declarations, add to class level array of valid namespaces
+             if($key_prefix == 'xmlns'){
+-				if(ereg('^http://www.w3.org/[0-9]{4}/XMLSchema$',$value)){
++				if(preg_match('/^http:\/\/www.w3.org\/[0-9]{4}\/XMLSchema$/',$value)){
+ 					$this->XMLSchemaVersion = $value;
+ 					$this->namespaces['xsd'] = $this->XMLSchemaVersion;
+ 					$this->namespaces['xsi'] = $this->XMLSchemaVersion.'-instance';
+@@ -6615,7 +6615,7 @@
+ 				}
+ 			} elseif($key_localpart == 'arrayType'){
+ 				$this->message[$pos]['type'] = 'array';
+-				/* do arrayType ereg here
++				/* do arrayType preg here
+ 				[1]    arrayTypeValue    ::=    atype asize
+ 				[2]    atype    ::=    QName rank*
+ 				[3]    rank    ::=    '[' (',')* ']'
+@@ -6624,7 +6624,7 @@
+ 				[6]    nextDimension    ::=    Digit+ ','
+ 				*/
+ 				$expr = '([A-Za-z0-9_]+):([A-Za-z]+[A-Za-z0-9_]+)\[([0-9]+),?([0-9]*)\]';
+-				if(ereg($expr,$value,$regs)){
++				if(preg_match("/$expr/",$value,$regs)){
+ 					$this->message[$pos]['typePrefix'] = $regs[1];
+ 					$this->message[$pos]['arrayTypePrefix'] = $regs[1];
+ 	                if (isset($this->namespaces[$regs[1]])) {
+@@ -7422,7 +7422,7 @@
+ 		// detect transport
+ 		switch(true){
+ 			// http(s)
+-			case ereg('^http',$this->endpoint):
++			case preg_match('/^http/',$this->endpoint):
+ 				$this->debug('transporting via HTTP');
+ 				if($this->persistentConnection == true && is_object($this->persistentConnection)){
+ 					$http =& $this->persistentConnection;
+@@ -7444,10 +7444,10 @@
+ 					$http->setEncoding($this->http_encoding);
+ 				}
+ 				$this->debug('sending message, length='.strlen($msg));
+-				if(ereg('^http:',$this->endpoint)){
++				if(preg_match('/^http:/',$this->endpoint)){
+ 				//if(strpos($this->endpoint,'http:')){
+ 					$this->responseData = $http->send($msg,$timeout,$response_timeout,$this->cookies);
+-				} elseif(ereg('^https',$this->endpoint)){
++				} elseif(preg_match('/^https/',$this->endpoint)){
+ 				//} elseif(strpos($this->endpoint,'https:')){
+ 					//if(phpversion() == '4.3.0-dev'){
+ 						//$response = $http->send($msg,$timeout,$response_timeout);
+@@ -7506,7 +7506,7 @@
+ 		if (strpos($headers['content-type'], '=')) {
+ 			$enc = str_replace('"', '', substr(strstr($headers["content-type"], '='), 1));
+ 			$this->debug('Got response encoding: ' . $enc);
+-			if(eregi('^(ISO-8859-1|US-ASCII|UTF-8)$',$enc)){
++			if(preg_match('/^(ISO-8859-1|US-ASCII|UTF-8)$/i',$enc)){
+ 				$this->xml_encoding = strtoupper($enc);
+ 			} else {
+ 				$this->xml_encoding = 'US-ASCII';
+diff -ruN fusionforge-4.8.3-original/www/survey/admin/show_results_csv.php fusionforge-4.8.3-ereg_preg/www/survey/admin/show_results_csv.php
+--- fusionforge-4.8.3-original/www/survey/admin/show_results_csv.php	2009-06-07 10:48:52.000000000 -0700
++++ fusionforge-4.8.3-ereg_preg/www/survey/admin/show_results_csv.php	2010-05-06 03:57:42.299088944 -0700
+@@ -37,7 +37,7 @@
+ }
+ 
+ function strip_commas($string) {
+-	return ereg_replace(",","",$string);
++	return preg_replace("/,/","",$string);
+ }
+ 
+ /*

Added: trunk/gforge_base/evolvisforge-5.1/gforge/rpm-specific/patches/fusionforge-4.8.3-mediawiki.patch
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/gforge/rpm-specific/patches/fusionforge-4.8.3-mediawiki.patch	                        (rev 0)
+++ trunk/gforge_base/evolvisforge-5.1/gforge/rpm-specific/patches/fusionforge-4.8.3-mediawiki.patch	2011-02-28 22:55:03 UTC (rev 15315)
@@ -0,0 +1,327 @@
+diff -ruN fusionforge-4.8.3-original/plugins/mediawiki/common/MediaWikiPlugin.class.php fusionforge-4.8.3-mediawiki/plugins/mediawiki/common/MediaWikiPlugin.class.php
+--- fusionforge-4.8.3-original/plugins/mediawiki/common/MediaWikiPlugin.class.php	2009-06-07 10:49:05.000000000 -0700
++++ fusionforge-4.8.3-mediawiki/plugins/mediawiki/common/MediaWikiPlugin.class.php	2010-05-11 18:36:23.411346109 -0700
+@@ -34,7 +34,7 @@
+ 		$this->hooks[] = "groupisactivecheckboxpost" ; //
+ 		$this->hooks[] = "userisactivecheckbox" ; // The "use ..." checkbox in user account
+ 		$this->hooks[] = "userisactivecheckboxpost" ; //
+-		$this->hooks[] = "project_admin_plugins"; // to show up in the admin page for group
++		// $this->hooks[] = "project_admin_plugins"; // to show up in the admin page for group
+ 	}
+ 
+ 	function CallHook ($hookname, $params) {
+@@ -47,14 +47,19 @@
+ 		} else {
+ 			$group_id=null;
+ 		}
++
+ 		if ($hookname == "outermenu") {
+ 			$params['TITLES'][] = 'MediaWiki';
+ 			$params['DIRS'][] = '/mediawiki';
+ 		} elseif ($hookname == "usermenu") {
+ 			$text = $this->text; // this is what shows in the tab
+ 			if ($G_SESSION->usesPlugin("mediawiki")) {
+-				echo ' | ' . $HTML->PrintSubMenu (array ($text),
+-						  array ('/mediawiki/index.php?title=User:' . $G_SESSION->getUnixName() ));				
++				echo ' | ' . $HTML->PrintSubMenu(
++				    array ($text),
++				    array ('/plugins/mediawiki/index.php?type=user&id='
++					. $G_SESSION->getID()
++					. '&pluginname=' . $this->name)
++				    );				
+ 			}
+ 		} elseif ($hookname == "groupmenu") {
+ 			$project = &group_get_object($group_id);
+@@ -69,12 +74,14 @@
+ 			}
+ 			if ( $project->usesPlugin ( $this->name ) ) {
+ 				$params['TITLES'][]=$this->text;
+-				$params['DIRS'][]='/plugins/mediawiki/index.php?group_id=' . $project->getID(); 
++				$params['DIRS'][]='/plugins/mediawiki/index.php?type=group&id='
++					. $project->getID() . '&pluginname=' . $this->name; 
+ 			}
+ 			(($params['toptab'] == $this->name) ? $params['selected']=(count($params['TITLES'])-1) : '' );
+ 		} elseif ($hookname == "groupisactivecheckbox") {
+ 			//Check if the group is active
+-			// this code creates the checkbox in the project edit public info page to activate/deactivate the plugin
++			// this code creates the checkbox in the project edit public 
++			// info page to activate/deactivate the plugin
+ 			$group = &group_get_object($group_id);
+ 			echo "<tr>";
+ 			echo "<td>";
+@@ -90,7 +97,8 @@
+ 			echo "</td>";
+ 			echo "</tr>";
+ 		} elseif ($hookname == "groupisactivecheckboxpost") {
+-			// this code actually activates/deactivates the plugin after the form was submitted in the project edit public info page
++			// this code actually activates/deactivates the plugin after 
++			// the form was submitted in the project edit public info page
+ 			$group = &group_get_object($group_id);
+ 			$use_mediawikiplugin = getStringFromRequest('use_mediawikiplugin');
+ 			if ( $use_mediawikiplugin == 1 ) {
+@@ -100,7 +108,8 @@
+ 			}
+ 		} elseif ($hookname == "userisactivecheckbox") {
+ 			//check if user is active
+-			// this code creates the checkbox in the user account manteinance page to activate/deactivate the plugin
++			// this code creates the checkbox in the user account manteinance
++			// page to activate/deactivate the plugin
+ 			$user = $params['user'];
+ 			echo "<tr>";
+ 			echo "<td>";
+@@ -113,7 +122,8 @@
+ 			echo "</td>";
+ 			echo "</tr>";
+ 		} elseif ($hookname == "userisactivecheckboxpost") {
+-			// this code actually activates/deactivates the plugin after the form was submitted in the user account manteinance page
++			// this code actually activates/deactivates the plugin after the
++			// form was submitted in the user account manteinance page
+ 			$user = $params['user'];
+ 			$use_mediawikiplugin = getStringFromRequest('use_mediawikiplugin');
+ 			if ( $use_mediawikiplugin == 1 ) {
+@@ -132,26 +142,29 @@
+ 			echo "</td>";
+ 			echo "</tr>";
+ 		} elseif ($hookname == "user_personal_links") {
+-			// this displays the link in the user's profile page to it's personal MediaWiki (if you want other sto access it, youll have to change the permissions in the index.php
++			// this displays the link in the user's profile page to it's
++			// personal MediaWiki (if you want other sto access it, youll
++			// have to change the permissions in the index.php
+ 			$userid = $params['user_id'];
+ 			$user = user_get_object($userid);
+-			$text = $params['text'];
++
+ 			//check if the user has the plugin activated
+ 			if ($user->usesPlugin($this->name)) {
+ 				echo '	<p>' ;
+-				echo util_make_link ("/plugins/helloworld/index.php?id=$userid&type=user&pluginname=".$this->name,
+-						     _('View Personal MediaWiki')
+-					);
++				echo util_make_link("/plugins/mediawiki/index.php?id=$userid&type=user&pluginname="
++				    . $this->name, _('View Personal MediaWiki'));
+ 				echo '</p>';
+ 			}
+ 		} elseif ($hookname == "project_admin_plugins") {
+-			// this displays the link in the project admin options page to it's  MediaWiki administration
++			// this displays the link in the project admin options page to
++			// it's  MediaWiki administration
+ 			$group_id = $params['group_id'];
+ 			$group = &group_get_object($group_id);
+ 			if ( $group->usesPlugin ( $this->name ) ) {
+-				echo util_make_link ("/plugins/projects_hierarchy/index.php?id=".$group->getID().'&type=admin&pluginname='.$this->name,
+-						     _('View the MediaWiki Administration'));
+-				echo '</p>';
++				echo util_make_link("/plugins/mediawiki/index.php?id="
++				    . $group->getID() . '&type=admin&pluginname=' . $this->name,
++				    _('View the MediaWiki Administration'));
++				echo '<br>';
+ 			}
+ 		}												    
+ 		elseif ($hookname == "blahblahblah") {
+diff -ruN fusionforge-4.8.3-original/plugins/mediawiki/etc/httpd.d/03mediawiki fusionforge-4.8.3-mediawiki/plugins/mediawiki/etc/httpd.d/03mediawiki
+--- fusionforge-4.8.3-original/plugins/mediawiki/etc/httpd.d/03mediawiki	2009-06-07 10:49:05.000000000 -0700
++++ fusionforge-4.8.3-mediawiki/plugins/mediawiki/etc/httpd.d/03mediawiki	2010-05-06 14:58:54.151457193 -0700
+@@ -1,6 +1,6 @@
+-Alias /mediawiki /var/lib/mediawiki
++Alias /mediawiki /usr/share/mediawiki
+ 
+-<Directory /var/lib/mediawiki/>
++<Directory /usr/share/mediawiki/>
+ 	Options +FollowSymLinks
+ 	AllowOverride All
+ 	order allow,deny
+@@ -11,11 +11,11 @@
+ </Directory>
+ 
+ # some directories must be protected
+-<Directory /var/lib/mediawiki/config>
++<Directory /usr/share/mediawiki/config>
+ 	Options -FollowSymLinks
+ 	AllowOverride None
+ </Directory>
+-<Directory /var/lib/mediawiki/upload>
++<Directory /usr/share/mediawiki/upload>
+ 	Options -FollowSymLinks
+ 	AllowOverride None
+ </Directory>
+diff -ruN fusionforge-4.8.3-original/plugins/mediawiki/usr/share/mediawiki/includes/GForgeAuthentication.php fusionforge-4.8.3-mediawiki/plugins/mediawiki/usr/share/mediawiki/includes/GForgeAuthentication.php
+--- fusionforge-4.8.3-original/plugins/mediawiki/usr/share/mediawiki/includes/GForgeAuthentication.php	2009-06-07 10:49:05.000000000 -0700
++++ fusionforge-4.8.3-mediawiki/plugins/mediawiki/usr/share/mediawiki/includes/GForgeAuthentication.php	2010-05-13 12:29:21.989093845 -0700
+@@ -64,7 +64,7 @@
+ 		return;
+ 	}
+ 	// Do nothing if session is valid
+-	$wgUser = User::loadFromSession();
++	$wgUser->newFromSession();
+ 	if ($wgUser->isLoggedIn()) {
+ 		return;
+ 	}
+@@ -85,7 +85,7 @@
+ 		return;
+ 	}
+ 	// Ok, now we need to create a user.
+-	include 'includes/SpecialUserlogin.php';
++	// include 'includes/specials/SpecialUserlogin.php';
+ 	$form = new LoginForm( $wgRequest );
+ 	$form->initUser( $wgUser );
+ 	$wgUser->saveSettings();
+diff -ruN fusionforge-4.8.3-original/plugins/mediawiki/usr/share/mediawiki/includes/GForgePre.php fusionforge-4.8.3-mediawiki/plugins/mediawiki/usr/share/mediawiki/includes/GForgePre.php
+--- fusionforge-4.8.3-original/plugins/mediawiki/usr/share/mediawiki/includes/GForgePre.php	2009-06-07 10:49:05.000000000 -0700
++++ fusionforge-4.8.3-mediawiki/plugins/mediawiki/usr/share/mediawiki/includes/GForgePre.php	2010-05-13 12:13:49.497368285 -0700
+@@ -8,6 +8,8 @@
+  *
+  */
+ 
++global $gfwww, $gfcommon, $gfconfig, $gfconn;
++
+ // escaping lib
+ require_once $gfcommon.'include/escapingUtils.php';
+ 
+@@ -49,7 +51,7 @@
+ require_once $gfwww.'include/Layout.class.php';
+ 
+ //various html utilities
+-//require_once('common/include/utils.php');
++require_once $gfcommon.'include/utils.php';
+ 
+ //database abstraction
+ require_once $gfcommon.'include/database-'.$sys_database_type.'.php';
+@@ -81,11 +83,11 @@
+ 
+ //user functions like get_name, logged_in, etc
+ //require_once('common/include/User.class.php');
+-require_once 'includes/GFUser.class.php.php';
++require_once 'includes/GFUser.class.php';
+ 
+ //group functions like get_name, etc
+ //require_once('common/include/Group.class.php');
+-require_once 'includes/GFProject.class.php.php';
++require_once 'includes/GFProject.class.php';
+ 
+ //permission functions
+ require_once $gfcommon.'include/Permission.class.php';
+@@ -105,7 +107,7 @@
+ // #### Connect to db
+ db_connect();
+ 
+-if (!$conn) {
++if (!$gfconn) {
+ 	print "$sys_name Could Not Connect to Database: ".db_error();
+ 	exit;
+ }
+diff -ruN fusionforge-4.8.3-original/plugins/mediawiki/www/index.php fusionforge-4.8.3-mediawiki/plugins/mediawiki/www/index.php
+--- fusionforge-4.8.3-original/plugins/mediawiki/www/index.php	2009-06-07 10:49:04.000000000 -0700
++++ fusionforge-4.8.3-mediawiki/plugins/mediawiki/www/index.php	2010-05-13 01:44:33.154462731 -0700
+@@ -3,9 +3,9 @@
+ /*
+  * MediaWiki plugin
+  *
+- * Daniel Perez <danielperez.arg at gmail.com>
++ * Bond Masuda <bond.masuda at JLBond.com>
+  *
+- * This is an example to watch things in action. You can obviously modify things and logic as you see fit
++ * This is a modified mediawiki plugin
+  */
+ 
+ require_once('../../env.inc.php');
+@@ -41,12 +41,13 @@
+ 	// exit_error("Invalid User", "Cannot Process your request for this user.");
+ }
+ 
+-$type = 'group' ;
+-$id = getStringFromRequest('group_id');
+-$pluginname = 'mediawiki' ;
++$type = getStringFromRequest('type');
++$id = getStringFromRequest('id');
++$pluginname = getStringFromRequest('pluginname');
+ 	
+ 	if (!$type) {
+-		exit_error("Cannot Process your request","No TYPE specified"); // you can create items in Base.tab and customize this messages
++		// you can create items in Base.tab and customize this messages
++		exit_error("Cannot Process your request","No TYPE specified");
+ 	} elseif (!$id) {
+ 		exit_error("Cannot Process your request","No ID specified");
+ 	} else {
+@@ -55,47 +56,69 @@
+ 			if ( !$group) {
+ 				exit_error("Invalid Project", "Inexistent Project");
+ 			}
+-			if ( ! ($group->usesPlugin ( $pluginname )) ) {//check if the group has the MediaWiki plugin active
++			//check if the group has the MediaWiki plugin active
++			if ( !($group->usesPlugin($pluginname)) ) {
+ 				exit_error("Error", "First activate the $pluginname plugin through the Project's Admin Interface");			
+ 			}
+-			$userperm = $group->getPermission($user);//we'll check if the user belongs to the group (optional)
++			//we'll check if the user belongs to the group (optional)
++			$userperm = $group->getPermission($user);
+ 			if ( !$userperm->IsMember()) {
+ 				// exit_error("Access Denied", "You are not a member of this project");
+ 			}
+ 			// other perms checks here...
+-			mediawiki_Project_Header(array('title'=>$pluginname . ' Project Plugin!','pagename'=>"$pluginname",'sectionvals'=>array(group_getname($id))));    
++			mediawiki_Project_Header(
++				array(	'title'=>$pluginname . ' Project Plugin!',
++					'pagename'=>"$pluginname",
++					'sectionvals'=>array( group_getname($id) )
++				)
++			);    
+ 			// DO THE STUFF FOR THE PROJECT PART HERE
+ 			// echo "We are in the Project MediaWiki plugin <br>";
+ 			// echo "Greetings from planet " . $world; // $world comes from the config file in /etc
+ 
+-			echo '<iframe src="'.util_make_url('/mediawiki/index.php?title='.$group->getUnixName()).'" frameborder="no" width=100% height=700></iframe>' ;
++			echo '<iframe src="'.util_make_url('/mediawiki/index.php?title='.$group->getUnixName())
++			    .'" frameborder="no" width=100% height=700></iframe>';
+ 		} elseif ($type == 'user') {
+-			$realuser = user_get_object($id);// 
++			$realuser = user_get_object($id);
+ 			if (!($realuser) || !($realuser->usesPlugin($pluginname))) {
+ 				exit_error("Error", "First activate the User's $pluginname plugin through Account Manteinance Page");
+ 			}
+-			if ( (!$user) || ($user->getID() != $id)) { // if someone else tried to access the private MediaWiki part of this user
++			// if someone else tried to access the private MediaWiki part of this user
++			if ( (!$realuser) || ($realuser->getID() != $id)) {
+ 				exit_error("Access Denied", "You cannot access other user's personal $pluginname");
+ 			}
+-			mediawiki_User_Header(array('title'=>'My '.$pluginname,'pagename'=>"$pluginname",'sectionvals'=>array($realuser->getUnixName())));    
++			mediawiki_User_Header(
++				array(	'title'=>'My '.$pluginname,
++					'pagename'=>"$pluginname",
++					'sectionvals'=>array( $realuser->getUnixName() )
++				)
++			);    
+ 			// DO THE STUFF FOR THE USER PART HERE
+-			echo "We are in the User MediaWiki plugin <br>";
+-			echo "Greetings from planet " . $world; // $world comes from the config file in /etc
++			echo '<iframe src="' . util_make_url('/mediawiki/index.php?title=User:')
++				. $realuser->getUnixName()
++				. '" frameborder="no" width=100% height=700></iframe>';
+ 		} elseif ($type == 'admin') {
+ 			$group = group_get_object($id);
+-			if ( !$group) {
++			if (!$group) {
+ 				exit_error("Invalid Project", "Inexistent Project");
+ 			}
+-			if ( ! ($group->usesPlugin ( $pluginname )) ) {//check if the group has the MediaWiki plugin active
++			//check if the group has the MediaWiki plugin active
++			if ( !($group->usesPlugin( $pluginname )) ) {
+ 				exit_error("Error", "First activate the $pluginname plugin through the Project's Admin Interface");			
+ 			}
+-			$userperm = $group->getPermission($user);//we'll check if the user belongs to the group
++			//we'll check if the user belongs to the group
++			$userperm = $group->getPermission($user);
+ 			if ( !$userperm->IsMember()) {
+ 				exit_error("Access Denied", "You are not a member of this project");
+ 			}
+ 			//only project admin can access here
+ 			if ( $userperm->isAdmin() ) {
+-				mediawiki_Project_Header(array('title'=>$pluginname . ' Project Plugin!','pagename'=>"$pluginname",'sectionvals'=>array(group_getname($id))));    
++				mediawiki_Project_Header(
++					array(	'title'=>$pluginname . ' Project Plugin!',
++						'pagename'=>"$pluginname",
++						'sectionvals'=>array( group_getname($id) )
++					)
++				);    
+ 				// DO THE STUFF FOR THE PROJECT ADMINISTRATION PART HERE
+ 				echo "We are in the Project MediaWiki plugin <font color=\"#ff0000\">ADMINISTRATION</font> <br>";
+ 				echo "Greetings from planet " . $world; // $world comes from the config file in /etc

Added: trunk/gforge_base/evolvisforge-5.1/gforge/rpm-specific/patches/fusionforge-4.8.3-misc_fixes.patch
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/gforge/rpm-specific/patches/fusionforge-4.8.3-misc_fixes.patch	                        (rev 0)
+++ trunk/gforge_base/evolvisforge-5.1/gforge/rpm-specific/patches/fusionforge-4.8.3-misc_fixes.patch	2011-02-28 22:55:03 UTC (rev 15315)
@@ -0,0 +1,12 @@
+diff -ruN fusionforge-4.8.3-original/www/project/request.php fusionforge-4.8.3-misc_fixes/www/project/request.php
+--- fusionforge-4.8.3-original/www/project/request.php	2010-01-16 06:27:30.000000000 -0800
++++ fusionforge-4.8.3-misc_fixes/www/project/request.php	2010-05-13 17:38:56.475699662 -0700
+@@ -48,7 +48,7 @@
+ 	if (!$gjr->create($usr->getId(),$comments)) {
+ 		exit_error('Error',$gjr->getErrorMessage());
+ 	} else {
+-		$feedback .= _('Your request has been submitted.');
++		$feedback = _('Your request has been submitted.');
+ 	}
+ }
+ 

Added: trunk/gforge_base/evolvisforge-5.1/gforge/rpm-specific/patches/fusionforge-4.8.3-register_globals.patch
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/gforge/rpm-specific/patches/fusionforge-4.8.3-register_globals.patch	                        (rev 0)
+++ trunk/gforge_base/evolvisforge-5.1/gforge/rpm-specific/patches/fusionforge-4.8.3-register_globals.patch	2011-02-28 22:55:03 UTC (rev 15315)
@@ -0,0 +1,58 @@
+diff -ruN fusionforge-4.8.3-original/common/include/account.php fusionforge-4.8.3-register_globals/common/include/account.php
+--- fusionforge-4.8.3-original/common/include/account.php	2009-09-20 11:46:33.000000000 -0700
++++ fusionforge-4.8.3-register_globals/common/include/account.php	2010-05-13 17:07:54.949101797 -0700
+@@ -73,7 +73,7 @@
+ 		$GLOBALS['register_error'] = _('Name is reserved.');
+ 		return 0;
+ 	}
+-	if ($sys_use_shell) {
++	if ($GLOBALS['sys_use_shell']) {
+ 		if ( exec("getent passwd $name") != "" ){
+ 			$GLOBALS['register_error'] = _('That username already exists.');
+ 			return 0;
+diff -ruN fusionforge-4.8.3-original/www/account/index.php fusionforge-4.8.3-register_globals/www/account/index.php
+--- fusionforge-4.8.3-original/www/account/index.php	2010-02-10 11:20:06.000000000 -0800
++++ fusionforge-4.8.3-register_globals/www/account/index.php	2010-05-13 17:14:33.904513771 -0700
+@@ -252,7 +252,7 @@
+ 
+ // ############################### Shell Account
+ 
+-if (($u->getUnixStatus() == 'A') && ($sys_use_shell)) {
++if (($u->getUnixStatus() == 'A') && ($GLOBALS['sys_use_shell'])) {
+ 	echo $HTML->boxTop(_('Shell Account Information')."");
+ 	print ' 
+ <br />'._('Shell box').': <strong>'.$u->getUnixBox().'</strong>
+diff -ruN fusionforge-4.8.3-original/www/admin/useredit.php fusionforge-4.8.3-register_globals/www/admin/useredit.php
+--- fusionforge-4.8.3-original/www/admin/useredit.php	2009-06-07 10:48:51.000000000 -0700
++++ fusionforge-4.8.3-register_globals/www/admin/useredit.php	2010-05-13 17:13:42.883770988 -0700
+@@ -60,7 +60,7 @@
+ 
+     //XXX use_shell
+ 	if (!$u->setEmail($email)
+-		|| ($sys_use_shell && !$u->setShell($shell))
++		|| ($GLOBALS['sys_use_shell'] && !$u->setShell($shell))
+ 		|| !$u->setStatus($status)) {
+ 		exit_error(
+ 			_('Could Not Complete Operation'),
+@@ -149,9 +149,7 @@
+ </tr>
+ 
+ <?php 
+-	global $sys_use_shell;
+-
+-	if ($sys_use_shell) {
++	if ($GLOBALS['sys_use_shell']) {
+ ?>    
+ <tr>
+ 	<td>
+@@ -207,9 +205,7 @@
+ </p>
+ 
+ <?php 
+-	global $sys_use_shell;
+-
+-	if ($sys_use_shell) {
++	if ($GLOBALS['sys_use_shell']) {
+ ?>    
+ <p>
+ <sup>2</sup><?php echo _('Unix status updated mirroring web status, unless it has value \'No unix account (N)\''); ?>

Added: trunk/gforge_base/evolvisforge-5.1/gforge/rpm-specific/patches/fusionforge-4.8.3-webcalendar.patch
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/gforge/rpm-specific/patches/fusionforge-4.8.3-webcalendar.patch	                        (rev 0)
+++ trunk/gforge_base/evolvisforge-5.1/gforge/rpm-specific/patches/fusionforge-4.8.3-webcalendar.patch	2011-02-28 22:55:03 UTC (rev 15315)
@@ -0,0 +1,11 @@
+diff -ruN fusionforge-4.8.3-original/plugins/webcalendar/www/login.php fusionforge-4.8.3-webcalendar/plugins/webcalendar/www/login.php
+--- fusionforge-4.8.3-original/plugins/webcalendar/www/login.php	2009-06-07 10:49:27.000000000 -0700
++++ fusionforge-4.8.3-webcalendar/plugins/webcalendar/www/login.php	2010-05-05 13:21:05.565048641 -0700
+@@ -1,6 +1,6 @@
+ <?php
+ include "../../env.inc.php";
+-include "pre.php";
++include "include/pre.php";
+ include "./includes/config.php";
+ include "./includes/php-dbi.php";
+ include "./includes/functions.php";

Added: trunk/gforge_base/evolvisforge-5.1/tests/RPMCentos52Tests.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/tests/RPMCentos52Tests.php	                        (rev 0)
+++ trunk/gforge_base/evolvisforge-5.1/tests/RPMCentos52Tests.php	2011-02-28 22:55:03 UTC (rev 15315)
@@ -0,0 +1,36 @@
+<?php
+if (!defined('PHPUnit_MAIN_METHOD')) {
+	define('PHPUnit_MAIN_METHOD', 'AllTests::main');
+}
+
+require_once 'PHPUnit/Framework.php';
+require_once 'PHPUnit/TextUI/TestRunner.php';
+require_once 'func/Testing/RPMSeleniumRemoteSuite.php';
+
+class RPMCentos52Tests
+{
+	public static function main()
+	{
+		PHPUnit_TextUI_TestRunner::run(self::suite());
+	}
+
+	public static function suite()
+	{
+		$suite = new RPMSeleniumRemoteSuite('PHPUnit');
+
+		// Selenium tests
+		$suite->addTestFiles(glob("func/Site/*Test.php"));
+		$suite->addTestFiles(glob("func/Trackers/*Test.php"));
+		$suite->addTestFiles(glob("func/Tasks/*Test.php"));
+		$suite->addTestFiles(glob("func/Forums/*Test.php"));
+		$suite->addTestFiles(glob("func/News/*Test.php"));
+		$suite->addTestFiles(glob("func/PluginsBlocks/*Test.php"));
+		
+		return $suite;
+	}
+}
+
+if (PHPUnit_MAIN_METHOD == 'AllTests::main') {
+	AllTests::main();
+}
+?>

Modified: trunk/gforge_base/evolvisforge-5.1/tests/TarCentos52Tests.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/tests/TarCentos52Tests.php	2011-02-28 22:54:58 UTC (rev 15314)
+++ trunk/gforge_base/evolvisforge-5.1/tests/TarCentos52Tests.php	2011-02-28 22:55:03 UTC (rev 15315)
@@ -5,7 +5,7 @@
 
 require_once 'PHPUnit/Framework.php';
 require_once 'PHPUnit/TextUI/TestRunner.php';
-require_once 'func/Testing/SeleniumRemoteSuite.php';
+require_once 'func/Testing/TarSeleniumRemoteSuite.php';
 
 class TarCentos52Tests
 {
@@ -16,7 +16,7 @@
 
 	public static function suite()
 	{
-		$suite = new SeleniumRemoteSuite('PHPUnit');
+		$suite = new TarSeleniumRemoteSuite('PHPUnit');
 
 		// Selenium tests
 		$suite->addTestFiles(glob("func/Site/*Test.php"));

Added: trunk/gforge_base/evolvisforge-5.1/tests/func/Testing/RPMSeleniumRemoteSuite.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/tests/func/Testing/RPMSeleniumRemoteSuite.php	                        (rev 0)
+++ trunk/gforge_base/evolvisforge-5.1/tests/func/Testing/RPMSeleniumRemoteSuite.php	2011-02-28 22:55:03 UTC (rev 15315)
@@ -0,0 +1,30 @@
+<?php
+
+require dirname(__FILE__).'/SeleniumRemoteSuite.php';
+
+class RPMSeleniumRemoteSuite extends SeleniumRemoteSuite
+{
+	protected function setUp()
+	{
+		parent::setUp();
+
+		system("scp -r ../tests root@".HOST.":/usr/share");
+		
+		system("scp -rp ~/fusionforge_repo root@".HOST.":");
+		system("scp -rp ".dirname(__FILE__)."/../../../gforge/rpm-specific/*.repo root@".HOST.":/etc/yum.repos.d/");
+
+		# Prefill yum cache to reduce real downloads.
+		//system("scp -rp ~/yum-cache-prefill/* root@".HOST.":/var/cache/yum/");
+		
+		# Enable yum cache to get back the cache for next run.
+		//sed -i 's/keepcache=0/keepcache=1/' /var/lib/vz/private/$i/etc/yum.conf 
+
+		sleep(5);
+		
+		system("ssh root@".HOST." 'yum install -y fusionforge fusionforge-scmsvn fusionforge-online_help fusionforge-extratabs fusionforge-ldapextauth fusionforge-scmgit fusionforge-blocks'");
+
+		//cp -rp /var/lib/vz/private/$i/var/cache/yum/* ~/yum-cache-prefill
+		//rm -fr ~/yum-cache-prefill/fusionforge
+	}
+}
+?>

Modified: trunk/gforge_base/evolvisforge-5.1/tests/func/Testing/SeleniumRemoteSuite.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/tests/func/Testing/SeleniumRemoteSuite.php	2011-02-28 22:54:58 UTC (rev 15314)
+++ trunk/gforge_base/evolvisforge-5.1/tests/func/Testing/SeleniumRemoteSuite.php	2011-02-28 22:55:03 UTC (rev 15315)
@@ -4,15 +4,10 @@
 {
 	protected function setUp()
 	{
-		system("cd scripts; ./start_vm.sh centos52.local");
-		system("scp ../../build/packages/fusionforge-*.tar.bz2 root at centos52:");
-		system("ssh root at centos52 'tar jxf fusionforge-*.tar.bz2'");
-		system("ssh root at centos52 'cd fusionforge-*; FFORGE_RPM_REPO=http://buildbot.fusionforge.org/job/fusionforge-trunk-build-rpm/ws/build/packages/ FFORGE_DB=fforge FFORGE_USER=gforge FFORGE_ADMIN_USER=ffadmin FFORGE_ADMIN_PASSWORD=ffadmin ./install.sh centos52.local'");
+		system("cd scripts; ./start_vm.sh ".HOST);
 
-		system("scp -r ../tests root at centos52:/opt");
-
-		system("scp /usr/share/php/PHPUnit/Extensions/SeleniumTestCase/*pend.php root at centos52:/opt/tests");
-		system("scp /usr/share/php/PHPUnit/Extensions/SeleniumTestCase/phpunit_coverage.php root at centos52:/opt/gforge/www");
+		//system("scp /usr/share/php/PHPUnit/Extensions/SeleniumTestCase/*pend.php root at centos52:/opt/tests");
+		//system("scp /usr/share/php/PHPUnit/Extensions/SeleniumTestCase/phpunit_coverage.php root at centos52:/opt/gforge/www");
 		//system("ssh root at centos52 'perl -spi -e \'s!^auto_prepend_file.*!auto_prepend_file=/opt/tests/prepend.php!\' /etc/php.ini');
 		//system("ssh root at centos52 'perl -spi -e \'s!^auto_append_file.*!auto_append_file=/opt/tests/append.php!\' /etc/php.ini');
 
@@ -20,9 +15,9 @@
 
 	protected function tearDown()
 	{
-		system("scp root at centos52:/var/log/httpd/error_log /tmp/centos52_error_log");
-		system("scp root at centos52:/var/log/httpd/access_log /tmp/centos52_access_log");
-		system("cd scripts; ./stop_vm.sh centos52.local");
+		system("scp root@".HOST.":/var/log/httpd/error_log /tmp/centos52_error_log");
+		system("scp root@".HOST.":/var/log/httpd/access_log /tmp/centos52_access_log");
+		system("cd scripts; ./stop_vm.sh ".HOST);
 	}
 }
 ?>

Added: trunk/gforge_base/evolvisforge-5.1/tests/func/Testing/TarSeleniumRemoteSuite.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/tests/func/Testing/TarSeleniumRemoteSuite.php	                        (rev 0)
+++ trunk/gforge_base/evolvisforge-5.1/tests/func/Testing/TarSeleniumRemoteSuite.php	2011-02-28 22:55:03 UTC (rev 15315)
@@ -0,0 +1,19 @@
+<?php
+ 
+require dirname(__FILE__).'/SeleniumRemoteSuite.php';
+
+class RPMSeleniumRemoteSuite extends SeleniumRemoteSuite
+{
+	protected function setUp()
+	{
+		parent::setUp();
+
+		system("scp -r ../tests root@".HOST.":/opt");
+
+		system("scp ../../build/packages/fusionforge-*.tar.bz2 root at centos52:");
+		system("ssh root at centos52 'tar jxf fusionforge-*.tar.bz2'");
+		system("ssh root at centos52 'cd fusionforge-*; FFORGE_RPM_REPO=http://buildbot.fusionforge.org/job/fusionforge-trunk-build-rpm/ws/build/packages/ FFORGE_DB=fforge FFORGE_USER=gforge FFORGE_ADMIN_USER=ffadmin FFORGE_ADMIN_PASSWORD=ffadmin ./install.sh centos52.local'");
+
+	}
+}
+?>

Modified: trunk/gforge_base/evolvisforge-5.1/tests/scripts/start_vz.sh
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/tests/scripts/start_vz.sh	2011-02-28 22:54:58 UTC (rev 15314)
+++ trunk/gforge_base/evolvisforge-5.1/tests/scripts/start_vz.sh	2011-02-28 22:55:03 UTC (rev 15315)
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-sudo /root/start_vz.sh centos-5-i386-default-5.2-20081107 "$1"
+sudo /root/start_vz.sh centos-5-x86 "$1"
 
 ssh -o 'StrictHostKeyChecking=no' "root@$1" uname -a
 ret=$?

Modified: trunk/gforge_base/evolvisforge-5.1/tools/simulate_cron.pl
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/tools/simulate_cron.pl	2011-02-28 22:54:58 UTC (rev 15314)
+++ trunk/gforge_base/evolvisforge-5.1/tools/simulate_cron.pl	2011-02-28 22:55:03 UTC (rev 15315)
@@ -16,7 +16,13 @@
  if (/^([A-Z]+)="(.*)"/) {
   $ENV{$1}=$2;
   print "Loading $1=$2\n";
+  next;
  }
+ if (/^([A-Z]+)=(.*)/) {
+  $ENV{$1}=$2;
+  print "Loading $1=$2\n";
+  next;
+ }
  if (/\S+\s+\S+\s+\S+\s+\S+\s+\S+\s+root\s+(.*)/) {
   print "Running $1 (as root)\n";
   system($1);



More information about the evolvis-commits mailing list