[Fusionforge-commits] FusionForge branch feature/no-itk created. af339e1289b18990865d370d297c63b395423b95
Roland Mas
lolando at fusionforge.org
Thu Dec 18 19:06:36 CET 2014
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".
The branch, feature/no-itk has been created
at af339e1289b18990865d370d297c63b395423b95 (commit)
- Log -----------------------------------------------------------------
commit af339e1289b18990865d370d297c63b395423b95
Author: Roland Mas <lolando at debian.org>
Date: Thu Dec 18 19:06:09 2014 +0100
New feature/no-itk branch, starting with a revert of the feature/concurrent-ssh-http-for-scm merge
diff --git a/autoinstall/common-backports b/autoinstall/common-backports
index bb2cd20..19967f2 100644
--- a/autoinstall/common-backports
+++ b/autoinstall/common-backports
@@ -46,108 +46,29 @@ function backports_deb {
fi
}
-function backport_rpm_from_fedora_updates {
- rebuild_one_rpm --enablefedora --enablefedoraupdates $*
-}
-
function backport_rpm_from_fedora {
- rebuild_one_rpm --enablefedora $*
-}
-
-function rebuild_rpm_from_centos {
- rebuild_one_rpm --rebuild $*
-}
-
-function rebuild_one_rpm {
- enablefedsrc=
- enablefed=
- if [ "$1" = "--enablefedora" ] ; then
- enablefedsrc="--enablerepo=fedora-source"
- enablefed="--enablerepo=fedora"
- shift
- fi
-
- if [ "$1" = "--enablefedoraupdates" ] ; then
- enablefedsrc="--enablerepo=fedora-updates-source"
- enablefed="--enablerepo=fedora-updates"
- shift
- fi
-
- rebuild=no
- if [ "$1" = "--rebuild" ] ; then
- rebuild=yes
- shift
- fi
-
- src=
- if [ "$1" = "--source-package" ] ; then
- src=$2
- shift
- shift
- fi
-
- force=
- if [ "$1" = "--force" ] ; then
- force=$1
- shift
- fi
-
target=$1
- shift
- others="$*"
-
- src=${src:-$target}
- rebuild_needed=no
- if [ $rebuild = yes ] ; then
- rebuild_needed=yes
+ if yum list $target >/dev/null 2>&1; then
+ yum install -y $target
else
- for i in $target $others ; do
- if ! yum list $i >/dev/null 2>&1; then
- rebuild_needed=yes
- break
- fi
- done
- fi
-
- if [ $rebuild_needed = yes ] ; then
- yumdownloader $enablefedsrc --source $src
-
+ yumdownloader --enablerepo=fedora --source $target
for DEP in $DEPS ; do
if ! yum install -y $DEP ; then
- yumdownloader $enablefed $DEP
- if [ -e $DEP-*.noarch.rpm ] ; then
- yum install -y $DEP-*.noarch.rpm
- else
- yum install -y $DEP-*.x86_64.rpm
- fi
+ yumdownloader --enablerepo=fedora $DEP
+ yum install -y $DEP-*.noarch.rpm
fi
done
-
- for i in $src-*.src.rpm ; do
- if [ $rebuild = yes ] || [ ! -e "$i.done" ] ; then
- rpmbuild --rebuild $src-*.src.rpm
- fi
- mv -f "$i" "$i.done"
- done
+ rpmbuild --rebuild $target-*.src.rpm
if [ -n "$REMOVEDEPS" ] ; then
- : yum remove -y $REMOVEDEPS
+ yum remove -y $REMOVEDEPS
fi
-
- for i in $target $others ; do
- yum remove -y $i
- done
- for i in $target $others ; do
- yum install -y ~/rpmbuild/RPMS/*/$i-[0-9]*.*.rpm || rpm -i $force ~/rpmbuild/RPMS/*/$i-[0-9]*.*.rpm
- done
- else
- yum install -y $target $others
+ yum install -y ~/rpmbuild/RPMS/*/$target-[0-9]*.*.rpm
fi
}
-function backports_rpm {
- set -ex
+function backports_rpm {
# Fedora/RHEL/CentOS version:
os_version=$(rpm -q --qf "%{VERSION}" $(rpm -q --whatprovides redhat-release))
@@ -172,24 +93,12 @@ failovermethod=priority
metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-20&arch=$basearch
enabled=0
gpgcheck=0
-[fedora-updates]
-name=Fedora 20 Updates
-failovermethod=priority
-metalink=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f20&arch=$basearch
-enabled=0
-gpgcheck=0
[fedora-source]
name=Fedora 20 - Source
failovermethod=priority
metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-source-20&arch=$basearch
enabled=0
gpgcheck=0
-[fedora-updates-source]
-name=Fedora 20 Updates - Source
-failovermethod=priority
-metalink=https://mirrors.fedoraproject.org/metalink?repo=updates-released-source-f20&arch=$basearch
-enabled=0
-gpgcheck=0
EOF
yum install -y yum-utils # yumdownloader
if [ ! -e /usr/bin/rpmbuild ] ; then
@@ -197,86 +106,38 @@ EOF
fi
fi
- yum install -y gcc gcc-c++ postgresql-devel python-devel libpng-devel sqlite-devel autoconf libtool systemd-devel freetype-devel
-
- DEPS="xmlto"
+ DEPS="gcc postgresql-devel xmlto"
REMOVEDEPS=$DEPS
backport_rpm_from_fedora libnss-pgsql
- DEPS=""
+ DEPS="python-devel"
REMOVEDEPS=$DEPS
backport_rpm_from_fedora moin
+ DEPS="php-channel-htmlpurifier"
+ REMOVEDEPS=""
+ backport_rpm_from_fedora php-htmlpurifier-htmlpurifier
+
+ DEPS="dos2unix"
+ REMOVEDEPS=$DEPS
+ backport_rpm_from_fedora php-nusoap
+
case $os_version in
7)
- DEPS="gd-devel byacc libjpeg-devel flex"
+ DEPS="gcc gd-devel byacc freetype-devel libpng-devel libjpeg-devel"
REMOVEDEPS=$DEPS
backport_rpm_from_fedora cvsgraph
-
- DEPS="python-pygments"
+
+ DEPS="python-devel python-pygments"
REMOVEDEPS=$DEPS
backport_rpm_from_fedora viewvc
-
- # Backport httpd-itk from Fedora 20
- # until https://bugzilla.redhat.com/show_bug.cgi?id=1059143 is fixed
- # …yes, it requires pulling in a lot of stuff :-(
- #
- #
- DEPS="libuuid-devel lksctp-tools-devel"
- REMOVEDEPS=$DEPS
- backport_rpm_from_fedora_updates --source-package apr apr-1.5.1 apr-devel-1.5.1
-
- DEPS="jasper-devel"
- REMOVEDEPS=$DEPS
- backport_rpm_from_fedora libicns libicns-utils
-
- DEPS="kde-filesystem hardlink"
- REMOVEDEPS=$DEPS
- backport_rpm_from_fedora_updates --source-package generic-logos --force generic-logos-httpd
-
- DEPS="xmlto libselinux-devel lua-devel pcre-devel openssl-devel libxml2-devel apr-util-devel"
- REMOVEDEPS=$DEPS
- backport_rpm_from_fedora_updates --source-package httpd httpd-tools-2.4.10 httpd-2.4.10 httpd-devel-2.4.10 mod_ssl-2.4.10
-
+
DEPS=""
REMOVEDEPS=$DEPS
- backport_rpm_from_fedora_updates --source-package httpd-itk httpd-itk-2.4.7.01
-
- DEPS=""
- REMOVEDEPS=$DEPS
- rebuild_rpm_from_centos mod_wsgi
-
- if ! rpm -qR php | grep -q httpd.*2.4.10 ; then
- if rpm -qi mariadb-libs | grep -q 5\.5\. && ! rpm -qi mariadb-libs | grep -q 5\.5\.37 ; then
- yum downgrade -y mariadb-libs
- fi
-
- DEPS="bzip2-devel curl-devel pam-devel libstdc++-devel libedit-devel libtool-ltdl-devel libzip-devel systemtap-sdt-devel firebird-devel net-snmp-devel libxslt-devel t1lib-devel libvpx-devel gmp-devel tokyocabinet-devel libmcrypt-devel libtidy-devel freetds-devel aspell-devel recode-devel libicu-devel enchant-devel libc-client-devel openldap-devel unixODBC-devel mariadb-devel-5.5.37 exim"
- REMOVEDEPS=$DEPS
- rebuild_rpm_from_centos --source-package php php-common php-cli php php-pdo php-pgsql php-process php-ldap php-gd
-
- if rpm -qi mariadb-libs | grep -q 5\.5\.37 ; then
- yum upgrade -y mariadb-libs
- fi
- fi
- #
- #
- # End of backport for httpd-itk + related packages
+ backport_rpm_from_fedora mediawiki
;;
esac
- DEPS="dos2unix"
- REMOVEDEPS=$DEPS
- backport_rpm_from_fedora php-nusoap
-
- DEPS="php-channel-htmlpurifier"
- REMOVEDEPS=""
- backport_rpm_from_fedora php-htmlpurifier-htmlpurifier
-
- DEPS=""
- REMOVEDEPS=$DEPS
- backport_rpm_from_fedora mediawiki
-
# TODO: postfix: rebuild from RHEL/CentOS sources with pgsql enabled,
# so we can test mta-postfix
}
diff --git a/autoinstall/debian-backports-itk2.4.sh b/autoinstall/debian-backports-itk2.4.sh
deleted file mode 100755
index a7df62e..0000000
--- a/autoinstall/debian-backports-itk2.4.sh
+++ /dev/null
@@ -1,236 +0,0 @@
-#!/bin/bash
-# Backports Apache 2.4 and dependent modules for Debian Wheezy
-
-# Based on my
-# https://wiki.debian.org/BuildingFormalBackports#Self-contained_example_for_Apache_2.4
-# Takes ~1h
-
-set -e
-
-# Prepare local repo
-mkdir -p /usr/src/backports/wheezy/
-touch /usr/src/backports/wheezy/Packages
-cat <<'EOF' > /usr/src/backports/wheezy/D70results
-#!/bin/bash
-# Make sure local repo is updated before building
-cd /usr/src/backports/wheezy/
-dpkg-scanpackages . /dev/null > Packages
-# It would be better to sign but that's complex in the context of pbuilder
-# Also 'pbuilder --allow-untrusted' only works with the default satisfydepends
-echo 'APT::Get::AllowUnauthenticated "true";' > /etc/apt/apt.conf.d/99AllowUnauthenticated
-apt-get update
-EOF
-chmod 755 /usr/src/backports/wheezy/D70results
-
-# Create initial environment
-if [ ! -e /var/cache/pbuilder/base-wheezy-bpo.tar.gz ]; then
- sudo pbuilder --create --basetgz /var/cache/pbuilder/base-wheezy-bpo.tar.gz \
- --distribution wheezy \
- --othermirror "deb http://security.debian.org/ wheezy/updates main|deb http://ftp.fr.debian.org/debian wheezy-backports main|deb file:///usr/src/backports/wheezy ./" \
- --bindmounts /usr/src/backports/wheezy/
-fi
-# Update regularly:
-# sudo pbuilder --update --basetgz /var/cache/pbuilder/base-wheezy-bpo.tar.gz --bindmounts /usr/src/backports/wheezy/
-
-# Setup identity
-export DEBEMAIL="fusionforge-general at lists.fusionforge.org"
-export DEBFULLNAME="FusionForge Hackers"
-
-# Configure build
-export DEB_BUILD_OPTIONS="parallel=$(nproc) nocheck"
-#export DEB_BUILD_OPTIONS="parallel=$(nproc)"
-
-# Add source for 'apt-get source'
-echo "deb-src http://ftp.fr.debian.org/debian/ jessie main" \
- | sudo tee /etc/apt/sources.list.d/jessie-src.list
-sudo apt-get update
-
-# Dependencies to add in our local repo
-apt-get source apr/jessie
-(
- cd apr-1.5.1/
- dch --bpo "No changes."
- sed -i '1 s/~bpo/~ff/' debian/changelog
- pdebuild --debbuildopts '-v1.4.6-3+deb7u1' \
- --use-pdebuild-internal --buildresult /usr/src/backports/wheezy/ \
- --pbuildersatisfydepends /usr/lib/pbuilder/pbuilder-satisfydepends-experimental \
- -- --basetgz /var/cache/pbuilder/base-wheezy-bpo.tar.gz \
- --bindmounts /usr/src/backports/wheezy/ \
- --hookdir /usr/src/backports/wheezy/
-)
-apt-get source apr-util/jessie
-(
- cd apr-util-1.5.3/
- dch --bpo "No changes."
- sed -i '1 s/~bpo/~ff/' debian/changelog
- pdebuild --debbuildopts '-v1.4.1-3' \
- --use-pdebuild-internal --buildresult /usr/src/backports/wheezy/ \
- --pbuildersatisfydepends /usr/lib/pbuilder/pbuilder-satisfydepends-experimental \
- -- --basetgz /var/cache/pbuilder/base-wheezy-bpo.tar.gz \
- --bindmounts /usr/src/backports/wheezy/ \
- --hookdir /usr/src/backports/wheezy/
-)
-
-# Apache 2.4 itself
-apt-get source apache2/jessie
-(
- cd apache2-2.4.10/
- dch --bpo "Note: depends on backported libapr."
- sed -i '1 s/~bpo/~ff/' debian/changelog
- pdebuild --debbuildopts '-v2.2.22-13+deb7u3' \
- --use-pdebuild-internal --buildresult /usr/src/backports/wheezy/ \
- --pbuildersatisfydepends /usr/lib/pbuilder/pbuilder-satisfydepends-experimental \
- -- --basetgz /var/cache/pbuilder/base-wheezy-bpo.tar.gz \
- --bindmounts /usr/src/backports/wheezy/ \
- --hookdir /usr/src/backports/wheezy/
-)
-
-#####
-
-# PHP 5.6 dependency
-apt-get source libgd2/jessie
-(
- cd libgd2-2.1.0/
- dch --bpo "No changes."
- sed -i '1 s/~bpo/~ff/' debian/changelog
- pdebuild --debbuildopts '-v2.0.36~rc1~dfsg-6.1' \
- --use-pdebuild-internal --buildresult /usr/src/backports/wheezy/ \
- --pbuildersatisfydepends /usr/lib/pbuilder/pbuilder-satisfydepends-experimental \
- -- --basetgz /var/cache/pbuilder/base-wheezy-bpo.tar.gz \
- --bindmounts /usr/src/backports/wheezy/ \
- --hookdir /usr/src/backports/wheezy/
-)
-
-# PHP 5.6 for Apache 2.4
-apt-get source php5/jessie
-(
- cd php5-5.6.0+dfsg/
- dch --bpo "Note: libapache2-mod-php5 rebuilt against Apache 2.4."
- sed -i '1 s/~bpo/~ff/' debian/changelog
- pdebuild --debbuildopts '-v5.4.4-14+deb7u14' \
- --use-pdebuild-internal --buildresult /usr/src/backports/wheezy/ \
- --pbuildersatisfydepends /usr/lib/pbuilder/pbuilder-satisfydepends-experimental \
- -- --basetgz /var/cache/pbuilder/base-wheezy-bpo.tar.gz \
- --bindmounts /usr/src/backports/wheezy/ \
- --hookdir /usr/src/backports/wheezy/
-)
-
-# Run-time dependency for libapache2-mod-php5
-apt-get source dh-php5/jessie
-(
- cd dh-php5-0.2/
- dch --bpo "No changes."
- sed -i '1 s/~bpo/~ff/' debian/changelog
- pdebuild --debbuildopts '-v0' \
- --use-pdebuild-internal --buildresult /usr/src/backports/wheezy/ \
- --pbuildersatisfydepends /usr/lib/pbuilder/pbuilder-satisfydepends-experimental \
- -- --basetgz /var/cache/pbuilder/base-wheezy-bpo.tar.gz \
- --bindmounts /usr/src/backports/wheezy/ \
- --hookdir /usr/src/backports/wheezy/
-)
-apt-get source php-json/jessie
-(
- cd php-json-1.3.6/
- dch --bpo "No changes."
- pdebuild --debbuildopts '-v0~0' \
- --use-pdebuild-internal --buildresult /usr/src/backports/wheezy/ \
- --pbuildersatisfydepends /usr/lib/pbuilder/pbuilder-satisfydepends-experimental \
- -- --basetgz /var/cache/pbuilder/base-wheezy-bpo.tar.gz \
- --bindmounts /usr/src/backports/wheezy/ \
- --hookdir /usr/src/backports/wheezy/
-)
-
-# PHPUnit indirect dependency - rebuilt against PHP 5.6
-apt-get source xdebug/jessie
-(
- cd xdebug-2.2.5/
- dch --bpo "Note: rebuilt against PHP 5.6."
- sed -i '1 s/~bpo/~ff/' debian/changelog
- pdebuild --debbuildopts '-v2.2.1-2' \
- --use-pdebuild-internal --buildresult /usr/src/backports/wheezy/ \
- --pbuildersatisfydepends /usr/lib/pbuilder/pbuilder-satisfydepends-experimental \
- -- --basetgz /var/cache/pbuilder/base-wheezy-bpo.tar.gz \
- --bindmounts /usr/src/backports/wheezy/ \
- --hookdir /usr/src/backports/wheezy/
-)
-
-# mpm_itk - separate package in Jessie
-apt-get source mpm-itk/jessie
-(
- cd mpm-itk-2.4.7-02/
- dch --bpo "Note: compiled against Apache 2.4."
- sed -i '1 s/~bpo/~ff/' debian/changelog
- pdebuild --debbuildopts '-v0' \
- --use-pdebuild-internal --buildresult /usr/src/backports/wheezy/ \
- --pbuildersatisfydepends /usr/lib/pbuilder/pbuilder-satisfydepends-experimental \
- -- --basetgz /var/cache/pbuilder/base-wheezy-bpo.tar.gz \
- --bindmounts /usr/src/backports/wheezy/ \
- --hookdir /usr/src/backports/wheezy/
-)
-
-# mod_dav_svn for Apache 2.4
-apt-get source subversion/jessie
-(
- cd subversion-1.8.10/
- sed -i -e 's/db5.3/db5.1/' debian/control
- dch --bpo "Use libdb5.1 instead of 5.3."
- patch -p1 <<'EOF'
-diff -u subversion-1.8.10/debian/ruby-svn.install subversion-1.8.10/debian/ruby-svn.install
---- subversion-1.8.10/debian/ruby-svn.install
-+++ subversion-1.8.10/debian/ruby-svn.install
-@@ -1,3 +1,2 @@
- debian/tmp/usr/lib/*/libsvn_swig_ruby*.so.*
--debian/tmp/usr/lib/*/ruby
- debian/tmp/usr/lib/ruby
-diff -u subversion-1.8.10/debian/rules subversion-1.8.10/debian/rules
---- subversion-1.8.10/debian/rules
-+++ subversion-1.8.10/debian/rules
-@@ -357,7 +357,7 @@
- ifdef DEB_OPT_WITH_RUBY
- $(MAKE_B) install-swig-rb $(rb_defs) \
- DESTDIR=$(CURDIR)/debian/tmp
-- find debian/tmp/$(libdir)/ruby \( -name \*.a -o -name \*.la \) -exec $(RM) {} +
-+ find debian/tmp/usr/lib/ruby \( -name \*.a -o -name \*.la \) -exec $(RM) {} +
- endif
-
- cd debian/tmp/$(libdir); for lib in ra fs auth swig; do \
-EOF
- dch -a "Adapt ruby libdir as it's not multiarched in wheezy."
- dch -a "Note: compiled against Apache 2.4."
- sed -i '1 s/~bpo/~ff/' debian/changelog
- pdebuild --debbuildopts '-v1.6.17dfsg-4+deb7u6' \
- --use-pdebuild-internal --buildresult /usr/src/backports/wheezy/ \
- --pbuildersatisfydepends /usr/lib/pbuilder/pbuilder-satisfydepends-experimental \
- -- --basetgz /var/cache/pbuilder/base-wheezy-bpo.tar.gz \
- --bindmounts /usr/src/backports/wheezy/ \
- --hookdir /usr/src/backports/wheezy/
-)
-
-# mod_wsgi for Apache 2.4
-apt-get source mod-wsgi/jessie
-(
- cd mod-wsgi-4.2.7/
- dch --bpo "Note: compiled against Apache 2.4."
- sed -i '1 s/~bpo/~ff/' debian/changelog
- pdebuild --debbuildopts '-v3.3-4+deb7u1' \
- --use-pdebuild-internal --buildresult /usr/src/backports/wheezy/ \
- --pbuildersatisfydepends /usr/lib/pbuilder/pbuilder-satisfydepends-experimental \
- -- --basetgz /var/cache/pbuilder/base-wheezy-bpo.tar.gz \
- --bindmounts /usr/src/backports/wheezy/ \
- --hookdir /usr/src/backports/wheezy/
-)
-
-
-# Sadly there's no hook to do that *after* the packages are installed in --buildresult
-(cd /usr/src/backports/wheezy && dpkg-scanpackages . /dev/null > Packages)
-
-#If something goes wrong and you need to test manually:
-#{{{
-#sudo pbuilder --login --basetgz /var/cache/pbuilder/base-wheezy-bpo.tar.gz --bindmounts /usr/src/backports
-#apt-get update
-#echo 'APT::Get::AllowUnauthenticated "true";' > /etc/apt/apt.conf.d/99AllowUnauthenticated
-#cd /usr/src/backports/sources/apache2-2.4.10/
-#apt-get install pbuilder devscripts fakeroot
-#/usr/lib/pbuilder/pbuilder-satisfydepends-experimental
-#debuild ...
-#}}}
diff --git a/autoinstall/install-src.sh b/autoinstall/install-src.sh
index 73549ed..595c666 100755
--- a/autoinstall/install-src.sh
+++ b/autoinstall/install-src.sh
@@ -30,7 +30,6 @@ if [ -e /etc/debian_version ]; then
backports_deb
apt-get update
apt-get install -y make gettext php5-cli php5-pgsql php-htmlpurifier \
- libapache2-mpm-itk libapache2-mod-svn \
apache2 postgresql libnss-pgsql2 unscd \
subversion augeas-tools viewvc git \
mediawiki \
@@ -43,7 +42,7 @@ else
yum install -y make tar
backports_rpm
yum install -y gettext php-cli php-pgsql php-process php-mbstring \
- httpd httpd-itk mod_dav_svn mod_ssl postgresql-server nscd \
+ httpd mod_ssl postgresql-server nscd \
subversion augeas viewvc git gitweb \
mediawiki119 \
moin mod_wsgi python-psycopg2 \
diff --git a/src/GNUmakefile.defaults b/src/GNUmakefile.defaults
index cfa6e1f..e930d20 100644
--- a/src/GNUmakefile.defaults
+++ b/src/GNUmakefile.defaults
@@ -41,7 +41,6 @@ log_path=$(localstatedir)/log/fusionforge
# Tools
INSTALL=install
CP_R=cp -r --preserve=timestamps
-LN_S=ln -s
# Hard-coded detection of distro-specific Apache configuration
apache_user=$(shell if [ -e /etc/redhat-release ]; then echo 'apache'; elif [ -e /etc/SuSE-release ]; then echo 'wwwrun'; else echo 'www-data'; fi)
diff --git a/src/debian/control.in b/src/debian/control.in
index 4150757..2104008 100644
--- a/src/debian/control.in
+++ b/src/debian/control.in
@@ -73,7 +73,7 @@ Description: collaborative development tool - database (remote)
Package: fusionforge-web
Architecture: all
-Depends: fusionforge-common (=${source:Version}), fusionforge-db, libapache2-mpm-itk | apache2-mpm-itk, php5-cli, libapache2-mod-php5, libphp-simplepie, php-http, php-http-webdav-server, libjs-jquery-livequery, python, ucf, unoconv, poppler-utils, ${misc:Depends}
+Depends: fusionforge-common (=${source:Version}), fusionforge-db, php5-cli, libapache2-mod-php5, libphp-simplepie, php-http, php-http-webdav-server, libjs-jquery-livequery, python, ucf, unoconv, poppler-utils, ${misc:Depends}
Recommends: locales-all
Description: collaborative development tool - web part (using Apache)
FusionForge provides many tools to aid collaboration in a
diff --git a/src/debian/plugins b/src/debian/plugins
index f93d36b..3e1cc85 100644
--- a/src/debian/plugins
+++ b/src/debian/plugins
@@ -2,7 +2,7 @@ Package: fusionforge-plugin-scmgit
Depends: git
Package: fusionforge-plugin-scmsvn
-Depends: subversion, subversion-tools, viewvc, openbsd-inetd | inet-superserver, update-inetd, augeas-tools, libapache2-mod-svn
+Depends: subversion, subversion-tools, viewvc, openbsd-inetd | inet-superserver, update-inetd, augeas-tools
Package: fusionforge-plugin-scmbzr
Depends: bzr, libapache2-mod-wsgi, loggerhead (>= 1.19~bzr477~), python-pastedeploy
diff --git a/src/plugins/scmgit/GNUmakefile b/src/plugins/scmgit/GNUmakefile
deleted file mode 100644
index 4196fc2..0000000
--- a/src/plugins/scmgit/GNUmakefile
+++ /dev/null
@@ -1,11 +0,0 @@
-include ../../GNUmakefile.defaults
-
-# Detection of distro-specific libexecdir for git-http-backend
-gitlibexecdir=$(shell if [ -e /etc/redhat-release ]; then echo '/usr/libexec'; else echo '/usr/lib'; fi)
-
-all:
- @echo "No default action"
-
-install:
- install -d -m 755 $(DESTDIR)$(pkgdatadir)/plugins/scmgit/libexec/
- $(LN_S) $(gitlibexecdir)/git-core/git-http-backend $(DESTDIR)$(pkgdatadir)/plugins/scmgit/libexec/
diff --git a/src/plugins/scmgit/common/GitPlugin.class.php b/src/plugins/scmgit/common/GitPlugin.class.php
index 872db6a..563f0b6 100644
--- a/src/plugins/scmgit/common/GitPlugin.class.php
+++ b/src/plugins/scmgit/common/GitPlugin.class.php
@@ -102,14 +102,6 @@ control over it to the project's administrator.");
for ($i=0; $i<$rows; $i++) {
$repo_list[] = db_result($result,$i,'repo_name');
}
- $clone_commands = array();
- foreach ($repo_list as $repo_name) {
- $clone_commands[] = 'git clone '.util_make_url('/anonscm/git/'.$project->getUnixName().'/'.$repo_name.'.git');
- if (forge_get_config('use_smarthttp', 'scmgit')) {
- $protocol = forge_get_config('use_ssl', 'scmgit')? 'https' : 'http';
- $clone_commands[] = 'git clone '.$protocol.'://'.$this->getBoxForProject($project).'/anonscm/git/'.$project->getUnixName().'/'.$repo_name.'.git';
- }
- }
$b = html_e('h2', array(),
ngettext('Anonymous Access to the Git repository',
@@ -122,8 +114,8 @@ control over it to the project's administrator.");
count($repo_list)));
$htmlRepo = '';
- foreach ($clone_commands as $cmd) {
- $htmlRepo .= html_e('tt', array(), $cmd).html_e('br');;
+ foreach ($repo_list as $repo_name) {
+ $htmlRepo .= html_e('tt', array(), 'git clone '.$protocol.'://'.$this->getBoxForProject($project).'/anonscm/git/'.$project->getUnixName().'/'.$repo_name.'.git').html_e('br');;
}
$b .= html_e('p', array(), $htmlRepo);
@@ -168,12 +160,11 @@ control over it to the project's administrator.");
$repo_list[] = db_result($result,$i,'repo_name');
}
- $b = '';
if (session_loggedin()) {
$u = user_get_object(user_getid());
$d = $u->getUnixName();
if (forge_get_config('use_ssh', 'scmgit')) {
- $b .= html_e('h2', array(),
+ $b = html_e('h2', array(),
ngettext('Developer Access to the Git repository via SSH',
'Developer Access to the Git repositories via SSH',
count($repo_list)));
@@ -185,29 +176,10 @@ control over it to the project's administrator.");
' '. _('Enter your site password when prompted.'));
$htmlRepo = '';
foreach ($repo_list as $repo_name) {
- $htmlRepo .= html_e('tt', array(), 'git clone git+ssh://'.$d.'@' . $this->getBoxForProject($project) . '/'. forge_get_config('repos_path', 'scmgit') .'/'. $project->getUnixName() .'/'. $repo_name .'.git').html_e('br');
+ $b .= html_e('tt', array(), 'git clone git+ssh://'.$d.'@' . $this->getBoxForProject($project) . '/'. forge_get_config('repos_path', 'scmgit') .'/'. $project->getUnixName() .'/'. $repo_name .'.git').html_e('br');
}
$b .= html_e('p', array(), $htmlRepo);
- }
- if (forge_get_config('use_smarthttp', 'scmgit')) {
- $b .= html_e('h2', array(),
- ngettext('Developer Access to the Git repository via "smart HTTP"',
- 'Developer Access to the Git repositories via "smart HTTP"',
- count($repo_list)));
- $b .= html_e('p', array(),
- ngettext('Only project developers can access the Git repository via this method.',
- 'Only project developers can access the Git repositories via this method.',
- count($repo_list)).
- ' '. _('Enter your site password when prompted.'));
- $htmlRepo = '';
-
- $protocol = forge_get_config('use_ssl', 'scmgit')? 'https' : 'http';
- foreach ($repo_list as $repo_name) {
- $htmlRepo .= '<p><tt>git clone '.$protocol.'://'.$d.'@' . forge_get_config('scm_host').'/authscm/'.$d.'/git/'.$project->getUnixName() .'/'. $repo_name .'.git</tt></p>';
- }
- $b .= html_e('p', array(), $htmlRepo);
- }
- if (forge_get_config('use_dav', 'scmgit')) {
+ } elseif (forge_get_config('use_dav', 'scmgit')) {
$protocol = forge_get_config('use_ssl', 'scmgit')? 'https' : 'http';
$b = html_e('h2', array(),
ngettext('Developer Access to the Git repository via HTTP',
@@ -241,25 +213,8 @@ control over it to the project's administrator.");
foreach ($repo_list as $repo_name) {
$htmlRepo .= html_e('tt', array(), 'git clone git+ssh://'.html_e('i', array(), _('developername')).'@' . $this->getBoxForProject($project) . '/'. forge_get_config('repos_path', 'scmgit') .'/'. $project->getUnixName() .'/'. $repo_name .'.git').html_e('br');
}
- }
- if (forge_get_config('use_smarthttp', 'scmgit')) {
- $protocol = forge_get_config('use_ssl', 'scmgit')? 'https' : 'http';
- $b .= html_e('h2', array(),
- ngettext('Developer Access to the Git repository via "smart HTTP"',
- 'Developer Access to the Git repositories via "smart HTTP"',
- count($repo_list)));
- $b .= html_e('p', array(),
- ngettext('Only project developers can access the Git repository via this method.',
- 'Only project developers can access the Git repositories via this method.',
- count($repo_list)).
- ' '. _('Enter your site password when prompted.'));
- $htmlRepo = '';
- foreach ($repo_list as $repo_name) {
- $b .= '<p><tt>git clone '.$protocol.'://<i>'._('developername').'</i>@' . forge_get_config('scm_host').'/authscm/<i>'._('developername').'</i>/git/'.$project->getUnixName() .'/'. $repo_name .'.git</tt></p>';
- }
$b .= html_e('p', array(), $htmlRepo);
- }
- if (forge_get_config('use_dav', 'scmgit')) {
+ } elseif (forge_get_config('use_dav', 'scmgit')) {
$protocol = forge_get_config('use_ssl', 'scmgit')? 'https' : 'http';
$b = html_e('h2', array(),
ngettext('Developer Access to the Git repository via HTTP',
@@ -278,12 +233,12 @@ control over it to the project's administrator.");
}
}
- if ($b == '') {
+ if (!isset($b)) {
$b = html_e('h2', array(), _('Developer Git Access'));
- $b .= $HTML->error_msg(_('Error')._(': ')._('No access protocol has been allowed for the Git plugin in scmgit.ini: use_ssh, use_smarthttp and use_dav are disabled'));
+ $b .= $HTML->error_msg(_('Error')._(': ')._('No access protocol has been allowed for the Git plugin in scmgit.ini: : use_ssh and use_dav are disabled'));
}
- if (session_loggedin()) {
+ if (session_loggedin() && forge_get_config('use_ssh', 'scmgit')) {
$u = user_get_object(user_getid());
if ($u->getUnixStatus() == 'A') {
$result = db_query_params('SELECT * FROM scm_personal_repos p WHERE p.group_id=$1 AND p.user_id=$2 AND plugin_id=$3',
@@ -293,14 +248,8 @@ control over it to the project's administrator.");
if ($result && db_numrows($result) > 0) {
$b .= html_e('h2', array(), _('Access to your personal repository'));
$b .= html_e('p', array(), _('You have a personal repository for this project, accessible through SSH with the following method. Enter your site password when prompted.'));
- if (forge_get_config('use_ssh', 'scmgit')) {
- $b .= html_e('p', array(),
- html_e('tt', array(), 'git clone git+ssh://'.$u->getUnixName().'@' . $this->getBoxForProject($project) . '/'. forge_get_config('repos_path', 'scmgit') .'/'. $project->getUnixName() .'/users/'. $u->getUnixName() .'.git'));
- }
- if (forge_get_config('use_smarthttp', 'scmgit')) {
- $b .= html_e('p', array(),
- html_e('tt', array(), 'git clone '.$protocol.'://'.$u->getUnixName().'@' . forge_get_config('scm_host').'/authscm/'.$u->getUnixName().'/git/'.$project->getUnixName() .'/users/'. $u->getUnixName() .'.git'));
- }
+ $b .= html_e('p', array(),
+ html_e('tt', array(), 'git clone git+ssh://'.$u->getUnixName().'@' . $this->getBoxForProject($project) . '/'. forge_get_config('repos_path', 'scmgit') .'/'. $project->getUnixName() .'/users/'. $u->getUnixName() .'.git'));
} else {
$glist = $u->getGroups();
foreach ($glist as $g) {
@@ -414,7 +363,6 @@ control over it to the project's administrator.");
// 'cd $root' because git will abort if e.g. we're in a 0700 /root after setuid
system("cd $root; LC_ALL=C git clone --bare --quiet --no-hardlinks $main_repo $repodir 2>&1 >/dev/null | grep -v 'warning: You appear to have cloned an empty repository.' >&2");
system("GIT_DIR=\"$repodir\" git update-server-info");
- system("GIT_DIR=\"$repodir\" git config http.receivepack true");
if (is_file("$repodir/hooks/post-update.sample")) {
rename("$repodir/hooks/post-update.sample",
"$repodir/hooks/post-update");
@@ -468,7 +416,6 @@ control over it to the project's administrator.");
$output .= join("<br />", $result);
$result = '';
exec("GIT_DIR=\"$tmp_repo\" git update-server-info", $result);
- exec("GIT_DIR=\"$tmp_repo\" git config http.receivepack true", $result);
$output .= join("<br />", $result);
if (is_file("$tmp_repo/hooks/post-update.sample")) {
rename("$tmp_repo/hooks/post-update.sample",
@@ -560,7 +507,6 @@ control over it to the project's administrator.");
system("GIT_DIR=\"$repodir\" git init --quiet --bare --shared=group");
}
system("GIT_DIR=\"$repodir\" git update-server-info");
- system("GIT_DIR=\"$repodir\" git config http.receivepack true");
if (is_file("$repodir/hooks/post-update.sample")) {
rename("$repodir/hooks/post-update.sample",
"$repodir/hooks/post-update");
@@ -658,25 +604,26 @@ control over it to the project's administrator.");
mkdir($config_dir, 0755, true);
}
$fname = $config_dir . '/gitweb.conf';
- $f = fopen($fname.'.new', 'w');
+ $config_f = fopen($fname.'.new', 'w');
$rootdir = forge_get_config('repos_path', 'scmgit');
- fwrite($f, "\$projectroot = '$rootdir';\n");
- fwrite($f, "\$projects_list = '$config_dir/gitweb.list';\n");
- fwrite($f, "@git_base_url_list = ('". util_make_url('/anonscm/git') . "');\n");
- fwrite($f, "\$logo = '". util_make_url('/plugins/scmgit/git-logo.png') . "';\n");
- fwrite($f, "\$favicon = '". util_make_url('/plugins/scmgit/git-favicon.png')."';\n");
- fwrite($f, "\$stylesheet = '". util_make_url('/plugins/scmgit/gitweb.css')."';\n");
- fwrite($f, "\$javascript = '". util_make_url('/plugins/scmgit/gitweb.js')."';\n");
- fwrite($f, "\$prevent_xss = 'true';\n");
- fwrite($f, "\$feature{'actions'}{'default'} = [('project home', '" .
- util_make_url('/plugins/scmgit/?func=grouppage/%n') .
- "', 'summary')];\n");
- fclose($f);
+ fwrite($config_f, "\$projectroot = '$rootdir';\n");
+ fwrite($config_f, "\$projects_list = '$config_dir/gitweb.list';\n");
+ fwrite($config_f, "@git_base_url_list = ('". util_make_url('/anonscm/git') . "');\n");
+ fwrite($config_f, "\$logo = '". util_make_url('/plugins/scmgit/git-logo.png') . "';\n");
+ fwrite($config_f, "\$favicon = '". util_make_url('/plugins/scmgit/git-favicon.png')."';\n");
+ fwrite($config_f, "\$stylesheet = '". util_make_url('/plugins/scmgit/gitweb.css')."';\n");
+ fwrite($config_f, "\$javascript = '". util_make_url('/plugins/scmgit/gitweb.js')."';\n");
+ fwrite($config_f, "\$prevent_xss = 'true';\n");
+ fwrite($config_f, "\$feature{'actions'}{'default'} = [('project home', '" .
+ util_make_url('/plugins/scmgit/?func=grouppage/%n') .
+ "', 'summary')];\n");
+ fclose($config_f);
chmod($fname.'.new', 0644);
rename($fname.'.new', $fname);
$fname = $config_dir . '/gitweb.list';
$f = fopen($fname.'.new', 'w');
+
$engine = RBACEngine::getInstance();
foreach ($list as $project) {
$repos = $this->getRepositories($rootdir . "/" . $project->getUnixName());
@@ -700,72 +647,6 @@ control over it to the project's administrator.");
fclose($f);
chmod($fname.'.new', 0644);
rename($fname.'.new', $fname);
-
- if (forge_get_config('use_smarthttp', 'scmgit')) {
- $gitusers = array();
-
- $config_fname = forge_get_config('data_path').'/scmgit-auth.inc';
- $config_f = fopen($config_fname.'.new', 'w');
-
- $user_fname = forge_get_config('data_path').'/scmgit-userfile';
- $user_f = fopen($user_fname.'.new', 'w');
-
- $group_fname = forge_get_config('data_path').'/scmgit-groupfile';
- $group_f = fopen($group_fname.'.new', 'w');
-
- foreach ($groups as $project) {
- if ( !$project->isActive()) {
- continue;
- }
- if ( !$project->usesSCM()) {
- continue;
- }
- $rusers = $engine->getUsersByAllowedAction('scm',$project->getID(),'read');
- fwrite($group_f, $project->getUnixName().':');
- foreach ($rusers as $user) {
- $gitusers[$user->getID()] = $user;
- fwrite($group_f, ' '.$user->getUnixName());
- }
- fwrite($group_f, "\n");
-
- $wusers = $engine->getUsersByAllowedAction('scm',$project->getID(),'write');
- fwrite($group_f, 'scm_'.$project->getUnixName().':');
- foreach ($wusers as $user) {
- fwrite($group_f, ' '.$user->getUnixName());
- }
- fwrite($group_f, "\n");
-
-
- if ($project->enableAnonSCM()) {
- fwrite($config_f, 'Use ScmgitProjectWithAnon '.$project->getUnixName().'
-');
- } else {
- fwrite($config_f, 'Use ScmgitProjectWithoutAnon '.$project->getUnixName().'
-');
- }
-
- fwrite($config_f, "\n");
- }
- $password_data = '';
- foreach ($gitusers as $user) {
- $password_data .= $user->getUnixName().':'.$user->getUnixPasswd()."\n";
- fwrite($config_f, 'Use ScmgitUser '.$user->getUnixName().'
-');
- }
- fwrite($user_f, $password_data);
-
- fclose($config_f);
- chmod($config_fname.'.new', 0644);
- rename($config_fname.'.new', $config_fname);
-
- fclose($group_f);
- chmod($group_fname.'.new', 0644);
- rename($group_fname.'.new', $group_fname);
-
- fclose($user_f);
- chmod($user_fname.'.new', 0644);
- rename($user_fname.'.new', $user_fname);
- }
}
function getRepositories($path) {
diff --git a/src/plugins/scmgit/etc/httpd.conf.d/05-config-macros-scmgit.conf b/src/plugins/scmgit/etc/httpd.conf.d/05-config-macros-scmgit.conf
deleted file mode 100644
index 8b640a8..0000000
--- a/src/plugins/scmgit/etc/httpd.conf.d/05-config-macros-scmgit.conf
+++ /dev/null
@@ -1,31 +0,0 @@
-<Macro ScmgitProjectWithAnon $project>
-<LocationMatch "^/anonscm/git/$project/">
- Require all granted
-</LocationMatch>
-
-<LocationMatch "^/authscm/[^/]+/git/$project/">
- Require valid-user
-</LocationMatch>
-</Macro>
-
-<Macro ScmgitProjectWithoutAnon $project>
-<LocationMatch "^/authscm/[^/]+/git/$project/">
- Require group scm_$project
-</LocationMatch>
-
-<LocationMatch "^/authscm/[^/]+/git/$project/.*/git-receive-pack$">
- AuthMerging And
- Require group scm_$project
-</LocationMatch>
-</Macro>
-
-<Macro ScmgitUser $user>
-<LocationMatch "^/authscm/$user/git/">
- Require user $user
-</LocationMatch>
-
-<LocationMatch "^/authscm/[^/]/git/[^/]users/$user/git-receive-pack$">
- AuthMerging And
- Require user $user
-</LocationMatch>
-</Macro>
diff --git a/src/plugins/scmgit/etc/httpd.conf.d/plugin-scmgit.inc b/src/plugins/scmgit/etc/httpd.conf.d/plugin-scmgit.inc
index 5922f13..e3be6e9 100644
--- a/src/plugins/scmgit/etc/httpd.conf.d/plugin-scmgit.inc
+++ b/src/plugins/scmgit/etc/httpd.conf.d/plugin-scmgit.inc
@@ -8,16 +8,3 @@
allow from all
</IfVersion>
</Directory>
-
-SetEnv GIT_PROJECT_ROOT {scmgit/repos_path}
-SetEnv GIT_HTTP_EXPORT_ALL
-
-ScriptAlias /anonscm/git/ {core/source_path}/plugins/scmgit/libexec/git-http-backend/
-ScriptAliasMatch ^/authscm/[^/]+/git/(.*) {core/source_path}/plugins/scmgit/libexec/git-http-backend/$1
-
-<LocationMatch "^/authscm/[^/]+/git/">
- AuthType Basic
- AuthName "SCM for {core/forge_name}"
- AuthUserFile {core/data_path}/scmgit-userfile
- AuthGroupFile {core/data_path}/scmgit-groupfile
-</LocationMatch>
diff --git a/src/plugins/scmgit/etc/httpd.conf.d/vhost-scm-plugin-scmgit.inc b/src/plugins/scmgit/etc/httpd.conf.d/vhost-scm-plugin-scmgit.inc
deleted file mode 100644
index a6a6d94..0000000
--- a/src/plugins/scmgit/etc/httpd.conf.d/vhost-scm-plugin-scmgit.inc
+++ /dev/null
@@ -1,2 +0,0 @@
-SetEnvIf Request_URI ^/authscm/([^/]+)/git/ ITKUID=$1
-SetEnvIf Request_URI ^/authscm/([^/]+)/git/([^/]+)/ ITKGID=$2
diff --git a/src/plugins/scmgit/etc/scmgit.ini b/src/plugins/scmgit/etc/scmgit.ini
index a13967a..3406791 100644
--- a/src/plugins/scmgit/etc/scmgit.ini
+++ b/src/plugins/scmgit/etc/scmgit.ini
@@ -17,8 +17,7 @@ scm_root = "scmrepos/git"
; this value is used when dav is set to yes. To reload httpd configuration
httpd_reload_cmd = "service $core/apache_service reload"
-; use_dav or use_ssh/use_smarthttp is exclusive. you cannot enable dav with ssh, or ssh with dav
+; use_dav or use_ssh is exclusive. you cannot enable dav with ssh, or ssh with dav
use_dav = no
use_ssh = yes
-use_smarthttp = yes
use_ssl = "$core/use_ssl"
diff --git a/src/plugins/scmsvn/bin/install.sh b/src/plugins/scmsvn/bin/install.sh
index f96e2c1..fa90e99 100755
--- a/src/plugins/scmsvn/bin/install.sh
+++ b/src/plugins/scmsvn/bin/install.sh
@@ -19,12 +19,6 @@ case "$1" in
echo "TODO: xinetd support"
fi
- # Enable required modules
- if [ -x /usr/sbin/a2enmod ]; then
- a2enmod dav_svn
- fi
- # else: Apache modules already enabled in CentOS
-
# Work-around memory leak in mod_dav_svn
for conf in /etc/apache2/apache2.conf /etc/httpd/conf/httpd.conf \
/etc/apache2/server-tuning.conf; do
diff --git a/src/plugins/scmsvn/common/SVNPlugin.class.php b/src/plugins/scmsvn/common/SVNPlugin.class.php
index a4dc7f8..a81aed0 100644
--- a/src/plugins/scmsvn/common/SVNPlugin.class.php
+++ b/src/plugins/scmsvn/common/SVNPlugin.class.php
@@ -122,7 +122,8 @@ some control over it to the project's administrator.");
$b .= '<tt>svn checkout svn://'.$this->getBoxForProject($project).$this->svn_root_fs.'/'.$project->getUnixName().$module.'</tt><br />';
}
if (forge_get_config('use_dav', 'scmsvn')) {
- $b .= '<p><tt>svn checkout http'.((forge_get_config('use_ssl', 'scmsvn')) ? 's' : '').'://'. forge_get_config('scm_host'). '/anonscm/svn/'.$project->getUnixName().$module.'</tt></p>' ;
+ $b .= '<tt>svn checkout --username '.forge_get_config('anonsvn_login', 'scmsvn').' http'.((forge_get_config('use_ssl', 'scmsvn')) ? 's' : '').'://' . $this->getBoxForProject($project). $this->svn_root_dav .'/'. $project->getUnixName() .$module.'</tt><br />';
+ $b .= _('The password is ').forge_get_config('anonsvn_password', 'scmsvn').'<br />';
}
$b .= '</p>';
return $b;
@@ -158,7 +159,7 @@ some control over it to the project's administrator.");
$b .= ' ';
$b .= _('Enter your site password when prompted.');
$b .= '</p>';
- $b .= '<p><tt>svn checkout --username '.$d.' http'.((forge_get_config('use_ssl', 'scmsvn')) ? 's' : '').'://'. forge_get_config('scm_host'). '/authscm/'.$d.'/svn/'.$project->getUnixName().$module.'</tt></p>' ;
+ $b .= '<p><tt>svn checkout --username '.$d.' http'.((forge_get_config('use_ssl', 'scmsvn')) ? 's' : '').'://'. $this->getBoxForProject($project) . $this->svn_root_dav .'/'.$project->getUnixName().$module.'</tt></p>' ;
}
} else {
if (forge_get_config('use_ssh', 'scmsvn')) {
@@ -187,7 +188,7 @@ some control over it to the project's administrator.");
$b .= ' ';
$b .= _('Enter your site password when prompted.');
$b .= '</p>';
- $b .= '<p><tt>svn checkout --username <i>'._('developername').'</i> http'.((forge_get_config('use_ssl', 'scmsvn')) ? 's' : '').'://'. forge_get_config('scm_host'). '/authscm/<i>'._('developername').'</i>/svn/'.$project->getUnixName().$module.'</tt></p>' ;
+ $b .= '<p><tt>svn checkout --username <i>'._('developername').'</i> http'.((forge_get_config('use_ssl', 'scmsvn')) ? 's' : '').'://'. $this->getBoxForProject($project) . $this->svn_root_dav .'/'.$project->getUnixName().$module.'</tt></p>' ;
}
}
return $b;
@@ -344,9 +345,6 @@ some control over it to the project's administrator.");
return true;
}
- $config_fname = forge_get_config('data_path').'/scmsvn-auth.inc';
- $config_f = fopen($config_fname.'.new', 'w');
-
$access_data = '';
$password_data = '';
$engine = RBACEngine::getInstance() ;
@@ -389,19 +387,10 @@ some control over it to the project's administrator.");
$access_data .= "\n";
$engine->invalidateRoleCaches(); // caching all roles takes ~1GB RAM for 5K projects/15K users
-
- if ($project->enableAnonSCM()) {
- fwrite($config_f, 'Use ScmsvnProjectWithAnon '.$project->getUnixName().'
-');
- }
-
- fwrite($config_f, "\n");
}
foreach ($svnusers as $user_id => $user) {
$password_data .= $user->getUnixName().':'.$user->getUnixPasswd()."\n";
- fwrite($config_f, 'Use ScmsvnUser '.$user->getUnixName().'
-');
}
$password_data .= forge_get_config('anonsvn_login', 'scmsvn').":".htpasswd_apr1_md5(forge_get_config('anonsvn_password', 'scmsvn'))."\n";
@@ -418,10 +407,6 @@ some control over it to the project's administrator.");
fclose($f);
chmod($fname.'.new', 0644);
rename($fname.'.new', $fname);
-
- fclose($config_f);
- chmod($config_fname.'.new', 0644);
- rename($config_fname.'.new', $config_fname);
}
function gatherStats($params) {
diff --git a/src/plugins/scmsvn/etc/httpd.conf.d/05-config-macros-scmsvn.conf b/src/plugins/scmsvn/etc/httpd.conf.d/05-config-macros-scmsvn.conf
deleted file mode 100644
index 8f1d725..0000000
--- a/src/plugins/scmsvn/etc/httpd.conf.d/05-config-macros-scmsvn.conf
+++ /dev/null
@@ -1,25 +0,0 @@
-<Macro ScmsvnProjectWithAnon $project>
-<Location /anonscm/svn/$project>
- DAV svn
- SVNPath {scmsvn/repos_path}/$project
- # allow read-only browsing
- <LimitExcept GET PROPFIND OPTIONS REPORT>
- </LimitExcept>
-</Location>
-</Macro>
-
-<Macro ScmsvnUser $user>
-<Location /authscm/$user/svn>
- DAV svn
- SVNParentPath {scmsvn/repos_path}
-
- # how to authenticate a user
- AuthzSVNAccessFile {core/data_path}/svnroot-access
- AuthType Basic
- AuthName "SCM for {core/forge_name}"
- AuthUserFile {core/data_path}/svnroot-authfile
-
- # only authenticated users may access the repository
- Require user $user
-</Location>
-</Macro>
diff --git a/src/plugins/scmsvn/etc/httpd.conf.d/vhost-scm-plugin-scmsvn.inc b/src/plugins/scmsvn/etc/httpd.conf.d/vhost-scm-plugin-scmsvn.inc
deleted file mode 100644
index e0e1c96..0000000
--- a/src/plugins/scmsvn/etc/httpd.conf.d/vhost-scm-plugin-scmsvn.inc
+++ /dev/null
@@ -1,2 +0,0 @@
-SetEnvIf Request_URI ^/authscm/([^/]+)/svn/ ITKUID=$1
-SetEnvIf Request_URI ^/authscm/([^/]+)/svn/([^/]+)/ ITKGID=$2
diff --git a/src/plugins/scmsvn/etc/scmsvn.ini b/src/plugins/scmsvn/etc/scmsvn.ini
index 962b0c6..54dedff 100644
--- a/src/plugins/scmsvn/etc/scmsvn.ini
+++ b/src/plugins/scmsvn/etc/scmsvn.ini
@@ -7,7 +7,7 @@
; is available in installation_environment = development only.
plugin_status = valid
-use_dav = yes
+use_dav = no
use_ssl = "$core/use_ssl"
use_ssh = yes
anonsvn_login = anonsvn
diff --git a/src/post-install.d/web/web.sh b/src/post-install.d/web/web.sh
index 36086d8..778b187 100755
--- a/src/post-install.d/web/web.sh
+++ b/src/post-install.d/web/web.sh
@@ -60,8 +60,7 @@ case "$1" in
echo "*** Note: please install $config_path/httpd.conf in your Apache configuration"
fi
- # Generate SSL certs if needed
- web_host=$(forge_get_config web_host)
+ # Generate SSL cert if needed
cert=$config_path/ssl-cert.pem
key=$config_path/ssl-cert.key
if [ ! -e $key ] ; then
@@ -69,13 +68,7 @@ case "$1" in
chmod 600 $key
fi
if [ ! -e $cert ] ; then
- openssl req -x509 -days 3650 -new -nodes -batch -text -key $key -subj "/CN=$web_host" -out $cert
- fi
-
- scm_host=$(forge_get_config scm_host)
- scmcert=$config_path/ssl-cert-scm.pem
- if [ ! -e $scmcert ] ; then
- openssl req -x509 -days 3650 -new -nodes -batch -text -key $key -subj "/CN=$scm_host" -out $scmcert
+ openssl req -x509 -days 3650 -new -nodes -batch -text -key $key -out $cert
fi
# Setup Docman/FRS/Forum/Tracker/RSS attachments
@@ -103,18 +96,9 @@ case "$1" in
a2enmod cgi # ViewVC bootstrap, gitweb, mailman
#a2enmod proxy
#a2enmod proxy_http
- a2enmod macro
- a2enmod authz_groupfile
- a2enmod dav
fi
# else: Apache modules already enabled in CentOS
- # Enable mpm-itk on RH/CentOS
- if [ -e /etc/httpd/conf.modules.d/00-mpm-itk.conf ] \
- && ! grep -q ^LoadModule.mpm_itk_module /etc/httpd/conf.modules.d/00-mpm-itk.conf ; then
- sed -i -e s/^#LoadModule/LoadModule/ /etc/httpd/conf.modules.d/00-mpm-itk.conf
- fi
-
if [ -x /usr/sbin/a2dissite ]; then
a2dissite 000-default
fi
diff --git a/src/rpm/fusionforge.spec.in b/src/rpm/fusionforge.spec.in
index 9842abc..02e2c47 100644
--- a/src/rpm/fusionforge.spec.in
+++ b/src/rpm/fusionforge.spec.in
@@ -167,7 +167,7 @@ fi
%package web
Summary: Collaborative development tool - web part (using Apache)
-Requires: %{name}-common = %{version}-%{release}, %{name}-db = %{version}-%{release}, httpd, mod_ssl, php, php-pgsql, php-simplepie, php-pear-HTTP, php-nusoap, php-mbstring, httpd-itk, mod_dav_svn, unoconv, poppler-utils
+Requires: %{name}-common = %{version}-%{release}, %{name}-db = %{version}-%{release}, httpd, mod_ssl, php, php-pgsql, php-simplepie, php-pear-HTTP, php-nusoap, php-mbstring, unoconv, poppler-utils
%description web
FusionForge provides many tools to aid collaboration in a
development project, such as bug-tracking, task management,
diff --git a/src/templates/httpd.conf.d/20-vhosts-scm.conf b/src/templates/httpd.conf.d/20-vhosts-scm.conf
deleted file mode 100644
index 7b7579b..0000000
--- a/src/templates/httpd.conf.d/20-vhosts-scm.conf
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Main host
-#
-
-# Used if you have a scm.$web_host domain
-# (serving SCM repos without the main web interface installed)
-
-<VirtualHost *:80>
- Include {core/config_path}/httpd.conf.d/vhost-scm.inc
- Include {core/config_path}/httpd.conf.d/block-trace.inc
- Include {core/config_path}/httpd.conf.d/log.inc
- Include {core/config_path}/httpd.conf.d/ssl-off.inc
-</VirtualHost>
-<VirtualHost *:443>
- Include {core/config_path}/httpd.conf.d/vhost-scm.inc
- Include {core/config_path}/httpd.conf.d/block-trace.inc
- Include {core/config_path}/httpd.conf.d/log.inc
- Include {core/config_path}/httpd.conf.d/ssl-on-scm.inc
-</VirtualHost>
diff --git a/src/templates/httpd.conf.d/ssl-on-scm.inc b/src/templates/httpd.conf.d/ssl-on-scm.inc
deleted file mode 100644
index 0ae2322..0000000
--- a/src/templates/httpd.conf.d/ssl-on-scm.inc
+++ /dev/null
@@ -1,25 +0,0 @@
-# Not using IfModule: the name changes between distros
-# and user can disable SSL in ssl-on.inc
-#<IfModule mod_ssl.c>
- SSLEngine on
-
- SSLCertificateFile {core/config_path}/ssl-cert-scm.pem
- SSLCertificateKeyFile {core/config_path}/ssl-cert.key
- # Add extra SSL configuration (e.g. SSLCACertificatePath) here
-
- <Files ~ "\.(cgi|shtml)$">
- SSLOptions +StdEnvVars
- </Files>
-
- <Directory "/usr/lib/cgi-bin">
- SSLOptions +StdEnvVars
- </Directory>
-
- SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
-#</IfModule>
-
-<IfModule apache_ssl.c>
- SSLEnable
-
- SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
-</IfModule>
diff --git a/src/templates/httpd.conf.d/vhost-scm.inc b/src/templates/httpd.conf.d/vhost-scm.inc
index d8d5e09..0d2064e 100644
--- a/src/templates/httpd.conf.d/vhost-scm.inc
+++ b/src/templates/httpd.conf.d/vhost-scm.inc
@@ -1,18 +1,8 @@
ServerName {core/scm_host}
-SetEnvIf Request_URI . ITKUID=www-data
-SetEnvIf Request_URI . ITKGID=www-data
-
<IfVersion >= 2.3>
IncludeOptional {core/config_path}/httpd.conf.d/plugin-scm*.inc
- IncludeOptional {core/config_path}/httpd.conf.d/vhost-scm-plugin-scm*.inc
- IncludeOptional {core/data_path}/scm*-auth*.inc
</IfVersion>
<IfVersion < 2.3>
Include {core/config_path}/httpd.conf.d/plugin-scm*.inc
- Include {core/config_path}/httpd.conf.d/vhost-scm-plugin-scm*.inc
- Include {core/data_path}/scm*-auth*.inc
</IfVersion>
-
-AssignUserIDExpr %{reqenv:ITKUID}
-AssignGroupIDExpr %{reqenv:ITKGID}
diff --git a/tests/func/50_PluginsScmGit/gitSmartHTTPTest.php b/tests/func/50_PluginsScmGit/gitSmartHTTPTest.php
deleted file mode 100644
index 60ca355..0000000
--- a/tests/func/50_PluginsScmGit/gitSmartHTTPTest.php
+++ /dev/null
@@ -1,108 +0,0 @@
-<?php
-/*
- * Copyright (C) 2012 Roland Mas
- *
- * This file is part of FusionForge.
- *
- * FusionForge is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published
- * by the Free Software Foundation; either version 2 of the License,
- * or (at your option) any later version.
- *
- * FusionForge is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-require_once dirname(dirname(__FILE__)).'/Testing/SeleniumForge.php';
-
-class ScmGitSmartHTTPTest extends FForge_SeleniumTestCase
-{
- function testScmGitSmartHTTP()
- {
-
- $this->changeConfig("[core]\nuse_ssl = no\n");
-
- $this->activatePlugin('scmgit');
- $this->populateStandardTemplate('empty');
- $this->init();
-
- $this->open(ROOT);
- $this->clickAndWait("link=ProjectA");
- $this->clickAndWait("link=Admin");
- $this->clickAndWait("link=Tools");
- $this->clickAndWait("link=Source Code Admin");
- $this->click("//input[@name='scmengine[]' and @value='scmgit']");
- $this->clickAndWait("submit");
-
- // Run the cronjob to create repositories
- $this->cron("scm/create_scm_repos.php");
- $this->cron("shell/homedirs.php");
- $this->reload_apache();
- $this->reload_nscd();
-
- // Get the address of the repo
- $this->open(ROOT);
- $this->clickAndWait("link=ProjectA");
- $this->clickAndWait("link=SCM");
- $p = $this->getText("//tt[contains(.,'git clone http') and contains(.,'".FORGE_ADMIN_USERNAME."@')]");
- $p = preg_replace(",^git clone ,", "", $p);
- $p = preg_replace(",@,", ":".FORGE_ADMIN_PASSWORD."@", $p);
- $log = "2> /var/log/git.stderr > /var/log/git.stdout";
- $timeout = "timeout 15s";
-
- // Create a local clone, add stuff, push it to the repo
- $t = exec("mktemp -d /tmp/gitTest.XXXXXX");
- system("cd $t && GIT_SSL_NO_VERIFY=true $timeout git clone --quiet $p $log", $ret);
- if ($ret >= 120) {
- system("cd $t && GIT_SSL_NO_VERIFY=true $timeout git clone --quiet $p $log", $ret);
- }
- $this->assertEquals($ret, 0);
-
- system("echo 'this is a simple text' > $t/projecta/mytext.txt");
- system("cd $t/projecta && $timeout git add mytext.txt $log && $timeout git commit --quiet -a -m'Adding file' $log", $ret);
- system("echo 'another simple text' >> $t/projecta/mytext.txt");
- system("cd $t/projecta && git commit --quiet -a -m'Modifying file' $log", $ret);
- $this->assertEquals($ret, 0);
-
- system("cd $t/projecta && GIT_SSL_NO_VERIFY=true $timeout git push --quiet --all $log", $ret);
- if ($ret >= 120) {
- system("cd $t/projecta && GIT_SSL_NO_VERIFY=true $timeout git push --quiet --all $log", $ret);
- }
- $this->assertEquals($ret, 0);
-
- // Check that the changes appear in gitweb
- $this->open(ROOT);
- $this->clickAndWait("link=ProjectA");
- $this->clickAndWait("link=SCM");
- $this->clickAndWait("link=Browse Git Repository");
- $this->selectFrame("id=scmgit_iframe");
- $this->assertElementPresent("//.[@class='page_footer']");
- $this->assertTextPresent("projecta.git");
- $this->clickAndWait("link=projecta.git");
- $this->assertTextPresent("Modifying file");
- $this->assertTextPresent("Adding file");
-
- system("rm -fr $t");
- }
-
- /**
- * Method that is called after Selenium actions.
- *
- * @param string $action
- */
- protected function defaultAssertions($action)
- {
- if ($action == 'waitForPageToLoad') {
- $this->assertTrue($this->isElementPresent("//h1")
- || $this->isElementPresent("//.[@class='page_footer']"));
- }
- }
-
-}
-?>
diff --git a/tests/func/50_PluginsScmSvn/svnWebDAVTest.php b/tests/func/50_PluginsScmSvn/svnWebDAVTest.php
deleted file mode 100644
index 5d1115e..0000000
--- a/tests/func/50_PluginsScmSvn/svnWebDAVTest.php
+++ /dev/null
@@ -1,108 +0,0 @@
-<?php
-/*
- * Copyright (C) 2012 Roland Mas
- *
- * This file is part of FusionForge.
- *
- * FusionForge is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published
- * by the Free Software Foundation; either version 2 of the License,
- * or (at your option) any later version.
- *
- * FusionForge is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-require_once dirname(dirname(__FILE__)).'/Testing/SeleniumForge.php';
-
-class ScmSvnWebDAVTest extends FForge_SeleniumTestCase
-{
- function testScmSvnWebDAV()
- {
- $this->changeConfig("[scmsvn]\nuse_ssl = no\n");
-
- $this->activatePlugin('scmsvn');
- $this->populateStandardTemplate('empty');
- $this->init();
-
- $this->open(ROOT);
- $this->clickAndWait("link=ProjectA");
- $this->clickAndWait("link=Admin");
- $this->clickAndWait("link=Tools");
- $this->clickAndWait("link=Source Code Admin");
- $this->click("//input[@name='scmengine[]' and @value='scmsvn']");
- $this->clickAndWait("submit");
-
- // Run the cronjob to create repositories
- $this->cron("scm/create_scm_repos.php");
- $this->cron("shell/homedirs.php");
- $this->reload_apache();
- $this->reload_nscd();
-
- // Get the address of the repo
- $this->open(ROOT);
- $this->clickAndWait("link=ProjectA");
- $this->clickAndWait("link=SCM");
- $p = $this->getText("//tt[contains(.,'svn checkout --username ".FORGE_ADMIN_USERNAME." http')]");
- $p = preg_replace(",^svn checkout --username ".FORGE_ADMIN_USERNAME." ,", "", $p);
-
- // Create a local clone, add stuff, push it to the repo
- $t = exec("mktemp -d /tmp/svnTest.XXXXXX");
- $auth = "--username ".FORGE_ADMIN_USERNAME." --password ".FORGE_ADMIN_PASSWORD;
- $globalopts = "--trust-server-cert --non-interactive";
- $log = "2> /var/log/svn.stderr > /var/log/svn.stdout";
- $timeout = "timeout 15s";
- system("cd $t && $timeout svn checkout $globalopts $auth $p projecta $log", $ret);
- if ($ret > 120) {
- system("cd $t && $timeout svn checkout $globalopts $auth $p projecta $log", $ret);
- }
- $this->assertEquals($ret, 0);
- sleep(2);
- system("echo 'this is a simple text' > $t/projecta/mytext.txt");
- system("cd $t/projecta && $timeout svn add mytext.txt $log && $timeout svn commit $globalopts $auth -m'Adding file' $log", $ret);
- if ($ret > 120) {
- system("cd $t/projecta && $timeout svn add mytext.txt $log && $timeout svn commit $globalopts $auth -m'Adding file' $log", $ret);
- }
- $this->assertEquals($ret, 0);
- sleep(2);
- system("echo 'another simple text' >> $t/projecta/mytext.txt");
- system("cd $t/projecta && $timeout svn commit $globalopts $auth -m'Modifying file' $log", $ret);
- if ($ret > 120) {
- system("cd $t/projecta && $timeout svn commit $globalopts $auth -m'Modifying file' $log", $ret);
- }
- $this->assertEquals($ret, 0);
- sleep(2);
-
- // Check that the changes appear in svnweb
- $this->open(ROOT);
- $this->clickAndWait("link=ProjectA");
- $this->clickAndWait("link=SCM");
- $this->clickAndWait("link=Browse Subversion Repository");
- $this->selectFrame("id=scmsvn_iframe");
- $this->assertTextPresent("Modifying file");
- $this->assertTextNotPresent("Adding file");
-
- system("rm -fr $t");
- }
-
- /**
- * Method that is called after Selenium actions.
- *
- * @param string $action
- */
- protected function defaultAssertions($action)
- {
- if ($action == 'waitForPageToLoad') {
- $this->assertTrue($this->isElementPresent("//h1")
- || $this->isElementPresent("//.[@class='page_footer']"));
- }
- }
-
-}
-?>
diff --git a/tests/func/Testing/SeleniumForge.php b/tests/func/Testing/SeleniumForge.php
index f0135cf..1786085 100644
--- a/tests/func/Testing/SeleniumForge.php
+++ b/tests/func/Testing/SeleniumForge.php
@@ -140,13 +140,7 @@ class FForge_SeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase
protected function reload_apache()
{
$this->runCommand("service apache2 reload > /dev/null 2>&1 || service httpd reload > /dev/null 2>&1");
- sleep (5); // Give it some time to become available again
- }
-
- protected function reload_nscd()
- {
- $this->runCommand("service unscd restart > /dev/null 2>&1 || service nscd restart > /dev/null 2>&1 || true");
- sleep (5); // Give it some time to wake up
+ sleep (3); // Give it some time to become available again
}
protected function init() {
-----------------------------------------------------------------------
hooks/post-receive
--
FusionForge
More information about the Fusionforge-commits
mailing list