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, 6.0 has been updated
via d7c8e79a388fd07c9807d0da5af53f16f89442a3 (commit)
via 1374529f96024e704354369732983162dfe50ae6 (commit)
via 61e37846fe6e85cbdac7e91a029901901625531e (commit)
via 954449d70cd3d54453d20a16e738880afd33874d (commit)
via 4adb35a6080d2b7aaea18a1bbd0079e8e2bab3b1 (commit)
from f291cf78f456fa8e4a23f34fe484e7564bc07f17 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=d7c8e79a388fd07c9807d0da5af53f16f89442a3
commit d7c8e79a388fd07c9807d0da5af53f16f89442a3
Author: Roland Mas <[email protected]>
Date: Thu Oct 13 12:56:53 2016 +0200
Added a testsuite for scmcvs plugin
diff --git a/autoinstall/install-src.sh b/autoinstall/install-src.sh
index d807c15..3dac20b 100755
--- a/autoinstall/install-src.sh
+++ b/autoinstall/install-src.sh
@@ -33,7 +33,7 @@ if [ -e /etc/debian_version ]; then
libapache2-mpm-itk libapache2-mod-svn \
libapache2-mod-php5 \
apache2 postgresql libnss-pgsql2 unscd \
- subversion viewvc python-pycurl git xinetd \
+ cvs subversion viewvc python-pycurl git xinetd \
python-moinmoin libapache2-mod-wsgi python-psycopg2 \
unoconv poppler-utils dpkg-dev
if ! dpkg-vendor --is Ubuntu; then
@@ -45,7 +45,7 @@ else
yum --enablerepo=epel install -y httpd-itk
yum install -y gettext php-cli php-pgsql php-process php-mbstring
php-pear-HTTP \
httpd mod_dav_svn mod_ssl postgresql-server nscd \
- subversion viewvc python-pycurl git gitweb xinetd \
+ cvs subversion viewvc python-pycurl git gitweb xinetd \
moin mod_wsgi python-psycopg2 \
unoconv poppler-utils
fi
@@ -54,7 +54,7 @@ fi
cd $(dirname $0)/../src/
make
make install-base install-shell install-scm \
- install-plugin-scmsvn install-plugin-scmgit \
+ install-plugin-scmcvs install-plugin-scmsvn install-plugin-scmgit \
install-plugin-blocks install-plugin-moinmoin \
install-plugin-online_help install-plugin-taskboard
install-plugin-message
make post-install
diff --git a/autoinstall/install.sh b/autoinstall/install.sh
index 9603f7a..1156123 100755
--- a/autoinstall/install.sh
+++ b/autoinstall/install.sh
@@ -40,7 +40,7 @@ if [ -e /etc/debian_version ]; then
# Additional components for testsuite
$APT install fusionforge-shell fusionforge-scm \
- fusionforge-plugin-scmgit fusionforge-plugin-scmsvn
fusionforge-plugin-scmbzr \
+ fusionforge-plugin-scmcvs fusionforge-plugin-scmsvn
fusionforge-plugin-scmgit fusionforge-plugin-scmbzr \
fusionforge-plugin-moinmoin \
fusionforge-plugin-blocks fusionforge-plugin-taskboard \
fusionforge-plugin-message
@@ -57,7 +57,7 @@ else
else
# Initial installation
yum --enablerepo=epel install -y fusionforge fusionforge-shell
fusionforge-scm \
- fusionforge-plugin-scmgit fusionforge-plugin-scmsvn \
+ fusionforge-plugin-scmcvs fusionforge-plugin-scmsvn
fusionforge-plugin-scmgit \
fusionforge-plugin-blocks fusionforge-plugin-online_help
fusionforge-plugin-taskboard \
fusionforge-plugin-message
fi
diff --git a/tests/func/50_PluginsScmCVS/cvsTest.php
b/tests/func/50_PluginsScmCVS/cvsTest.php
new file mode 100644
index 0000000..3dff005
--- /dev/null
+++ b/tests/func/50_PluginsScmCVS/cvsTest.php
@@ -0,0 +1,99 @@
+<?php
+/**
+ * Copyright (C) 2012,2016 Roland Mas
+ * Copyright (C) 2015 Inria (Sylvain Beucler)
+ *
+ * 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__)).'/SeleniumForge.php';
+
+class ScmCvsSSHTest extends FForge_SeleniumTestCase
+{
+ public $fixture = 'projecta';
+
+ function testScmCvs()
+ {
+ $this->loadAndCacheFixture();
+
+ $this->activatePlugin('scmcvs');
+
+ $this->createProject('ProjectB','scmcvs');
+
+ $this->open(ROOT);
+ $this->clickAndWait("link=ProjectB");
+ $this->clickAndWait("link=Admin");
+ $this->clickAndWait("link=Tools");
+ $this->clickAndWait("link=Source Code Admin");
+ $this->check("//input[@name='scmengine[]' and
@value='scmcvs']");
+ $this->clickAndWait("submit");
+
+ $this->uploadSshKey();
+
+ // Run the cronjob to create repositories
+ $this->waitSystasks();
+
+ // Get the address of the repo
+ $this->open(ROOT);
+ $this->clickAndWait("link=ProjectB");
+ $this->clickAndWait("link=SCM");
+ $p = $this->getText("//tt[contains(.,'cvs -d :ext:')]");
+ $p = preg_replace(",^cvs -d ,", "", $p);
+ $p = preg_replace(", checkout.*,", "", $p);
+
+ // Create a local checkout, commit stuff
+ $t = exec("mktemp -d /tmp/cvsTest.XXXXXX");
+ system("echo cvs -d $p checkout .", $ret);
+ system("cd $t && cvs -d $p checkout .", $ret);
+ $this->assertEquals(0, $ret);
+
+ system("echo 'this is a simple text' > $t/mytext.txt");
+ system("cd $t && cvs add mytext.txt && cvs commit -m'Adding
file'", $ret);
+ system("echo 'another simple text' >> $t/mytext.txt");
+ system("cd $t && cvs commit -m'Modifying file'", $ret);
+ $this->assertEquals(0, $ret);
+
+ // Check that the changes appear in cvsweb
+ $this->open(ROOT);
+ $this->clickAndWait("link=ProjectB");
+ $this->clickAndWait("link=SCM");
+ $this->clickAndWait("link=Browse CVS Repository");
+ $this->selectFrame("id=scmcvs_iframe");
+ $this->assertTextPresent("Modifying file");
+ $this->assertTextNotPresent("Adding file");
+ $this->selectFrame("relative=top");
+
+ // Get the address of the repo
+ $this->open(ROOT);
+ $this->clickAndWait("link=ProjectB");
+ $this->clickAndWait("link=SCM");
+ $p = $this->getText("//tt[contains(.,' login')]");
+ $p = preg_replace(",^cvs -d ,", "", $p);
+ $p = preg_replace(", login.*,", "", $p);
+
+ // Create a local checkout, commit stuff
+ $t = exec("mktemp -d /tmp/cvsTest.XXXXXX");
+ system("echo cvs -d $p checkout .", $ret);
+ system("cd $t && cvs -d $p checkout .", $ret);
+ $this->assertEquals(0, $ret);
+
+ system("grep 'simple text' $t/mytext.txt");
+ $this->assertEquals(0, $ret);
+
+ system("rm -fr $t");
+ }
+}
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=1374529f96024e704354369732983162dfe50ae6
commit 1374529f96024e704354369732983162dfe50ae6
Author: Roland Mas <[email protected]>
Date: Thu Oct 13 18:43:44 2016 +0200
Fixed CVS repository browser
diff --git a/src/www/scm/viewvc.php b/src/www/scm/viewvc.php
index 0c7ba80..3633821 100644
--- a/src/www/scm/viewvc.php
+++ b/src/www/scm/viewvc.php
@@ -84,7 +84,7 @@ if (!forge_check_perm('scm', $Group->getID(), 'read')) {
$unix_name = $Group->getUnixName();
$u = session_get_user();
-if ($external_scm) {
+if ($external_scm && !$Group->usesPlugin('scmcvs')) {
if ($Group->enableAnonSCM())
$server_script = '/anonscm/viewvc';
else
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=61e37846fe6e85cbdac7e91a029901901625531e
commit 61e37846fe6e85cbdac7e91a029901901625531e
Author: Roland Mas <[email protected]>
Date: Thu Oct 13 13:24:49 2016 +0200
Create CVS repository path if needed
diff --git a/src/plugins/scmcvs/common/CVSPlugin.class.php
b/src/plugins/scmcvs/common/CVSPlugin.class.php
index 09d53c7..3a66c8c 100644
--- a/src/plugins/scmcvs/common/CVSPlugin.class.php
+++ b/src/plugins/scmcvs/common/CVSPlugin.class.php
@@ -228,8 +228,13 @@ over it to the project's administrator.");
return false;
}
- $repo = forge_get_config('repos_path', 'scmcvs') . '/' .
$project->getUnixName() ;
- $locks_dir = forge_get_config('repos_path', 'scmcvs') .
'/cvs-locks/' . $project->getUnixName() ;
+ $repo_prefix = forge_get_config('repos_path', 'scmcvs');
+ if (!is_dir($repo_prefix) && !mkdir($repo_prefix, 0755, true)) {
+ return false;
+ }
+
+ $repo = $repo_prefix . '/' . $project->getUnixName() ;
+ $locks_dir = $repo_prefix . '/cvs-locks/' .
$project->getUnixName() ;
$repo_exists = false ;
if (is_dir ($repo) && is_dir ("$repo/CVSROOT")) {
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=954449d70cd3d54453d20a16e738880afd33874d
commit 954449d70cd3d54453d20a16e738880afd33874d
Author: Roland Mas <[email protected]>
Date: Thu Oct 13 18:43:21 2016 +0200
Fixed anonymous access for scmcvs
diff --git a/src/plugins/scmcvs/common/CVSPlugin.class.php
b/src/plugins/scmcvs/common/CVSPlugin.class.php
index 422051c..09d53c7 100644
--- a/src/plugins/scmcvs/common/CVSPlugin.class.php
+++ b/src/plugins/scmcvs/common/CVSPlugin.class.php
@@ -212,10 +212,9 @@ over it to the project's administrator.");
return;
}
- if ($project->usesPlugin ($this->name)) {
- if ($this->browserDisplayable ($project)) {
-
session_redirect("/scm/viewvc.php/?root=".$project->getUnixName());
- }
+ if ($project->usesPlugin($this->name)) {
+ $iframe_src =
'/scm/viewvc.php?root='.$project->getUnixName();
+ htmlIframe($iframe_src, array('id'=>'scmcvs_iframe'));
}
}
@@ -237,11 +236,8 @@ over it to the project's administrator.");
$repo_exists = true ;
}
- if (forge_get_config('use_shell')) {
- $unix_group = 'scm_' . $project->getUnixName() ;
- } else {
- $unix_group = forge_get_config ('apache_user') ;
- }
+ $rw_unix_group = $project->getUnixName() . '_scmrw';
+ $ro_unix_group = $project->getUnixName() . '_scmro';
if (!$repo_exists) {
if (!@mkdir($repo, 0700)) {
@@ -256,41 +252,34 @@ over it to the project's administrator.");
system ("chgrp $unix_group $locks_dir") ;
system ("chmod 3777 $locks_dir") ;
- if (forge_get_config('use_shell')) {
- $cvs_binary_version = get_cvs_binary_version();
- if ($cvs_binary_version == '1.12') {
-
util_create_file_with_contents("$repo/CVSROOT/config",
"SystemAuth=no\nLockDir=$locks_dir\nUseNewInfoFmtStrings=yes\n");
- }
- if ($cvs_binary_version == '1.11') {
-
util_create_file_with_contents("$repo/CVSROOT/config",
"SystemAuth=no\nLockDir=$locks_dir\n");
- }
- if ($project->enableAnonSCM()) {
- util_create_file_with_contents
("$repo/CVSROOT/readers", "anonymous\n");
- util_create_file_with_contents
("$repo/CVSROOT/passwd", "anonymous:\n");
- system ("chmod -R g+rwXs,o+rX-w $repo")
;
- } else {
- util_create_file_with_contents
("$repo/CVSROOT/readers", "\n");
- util_create_file_with_contents
("$repo/CVSROOT/passwd", "\n");
- system ("chmod -R g+rwXs,o-rwx $repo") ;
- }
- system ("chgrp -R $unix_group $repo") ;
- } else {
- $unix_user = forge_get_config ('apache_user') ;
- system ("chmod -R g-rwx,o-rwx $repo") ;
- system ("chown -R $unix_user:$unix_group
$repo") ;
+ $cvs_binary_version = get_cvs_binary_version();
+ if ($cvs_binary_version == '1.12') {
+
util_create_file_with_contents("$repo/CVSROOT/config",
"SystemAuth=no\nLockDir=$locks_dir\nUseNewInfoFmtStrings=yes\n");
}
- }
-
- if (forge_get_config('use_shell')) {
+ if ($cvs_binary_version == '1.11') {
+
util_create_file_with_contents("$repo/CVSROOT/config",
"SystemAuth=no\nLockDir=$locks_dir\n");
+ }
+ system ("chmod -R g+rwXs,o+rX-w $repo") ;
+ $apache_user = forge_get_config('apache_user');
if ($project->enableAnonSCM()) {
util_create_file_with_contents
("$repo/CVSROOT/readers", "anonymous\n");
- util_create_file_with_contents
("$repo/CVSROOT/passwd", "anonymous:\n");
- system ("chmod g+rwXs,o+rX-w $repo") ;
+ util_create_file_with_contents
("$repo/CVSROOT/passwd", "anonymous::$apache_user\n");
} else {
util_create_file_with_contents
("$repo/CVSROOT/readers", "\n");
util_create_file_with_contents
("$repo/CVSROOT/passwd", "\n");
- system ("chmod g+rwXs,o-rwx $repo") ;
}
+ system ("chgrp -R $rw_unix_group $repo") ;
+ system ("chgrp $ro_unix_group $repo");
+ }
+
+ if ($project->enableAnonSCM()) {
+ util_create_file_with_contents
("$repo/CVSROOT/readers", "anonymous\n");
+ util_create_file_with_contents ("$repo/CVSROOT/passwd",
"anonymous::$apache_user\n");
+ system ("chmod g+rwXs,o+rX-w $repo") ;
+ } else {
+ util_create_file_with_contents
("$repo/CVSROOT/readers", "\n");
+ util_create_file_with_contents ("$repo/CVSROOT/passwd",
"\n");
+ system ("chmod g+rwXs,o-rwx $repo") ;
}
}
diff --git a/src/plugins/scmcvs/sbin/cvs-pserver
b/src/plugins/scmcvs/sbin/cvs-pserver
index 28b7505..c2795d5 100755
--- a/src/plugins/scmcvs/sbin/cvs-pserver
+++ b/src/plugins/scmcvs/sbin/cvs-pserver
@@ -1,17 +1,13 @@
#!/bin/sh
-# $Debian: cvs/debian/cvs-pserver,v 1.1 2001/04/20 16:00:54 epg Exp $
-
-CHROOTDIR=$(forge_get_config chroot)
-CVSROOT=cvsroot # without leading "/"!
+CVSROOT=$(forge_get_config repos_path scmcvs)
CVSREADONLYFS=yes
export CVSREADONLYFS
# Execute pserver
-cd $CHROOTDIR
CVS_PSERV_REPOS=$(find $CVSROOT -mindepth 1 -maxdepth 1 -type d)
-allow_root_opts="--allow-root=/$(echo $CVS_PSERV_REPOS | sed 's: :
--allow-root=/:g')"
+allow_root_opts="--allow-root=$(echo $CVS_PSERV_REPOS | sed 's: :
--allow-root=/:g')"
-exec /usr/sbin/chroot $CHROOTDIR /usr/bin/cvs -f ${allow_root_opts} pserver
+exec /usr/bin/cvs -f ${allow_root_opts} pserver
# End of file.
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=4adb35a6080d2b7aaea18a1bbd0079e8e2bab3b1
commit 4adb35a6080d2b7aaea18a1bbd0079e8e2bab3b1
Author: Roland Mas <[email protected]>
Date: Thu Oct 13 12:56:22 2016 +0200
Convert scmcvs plugin from inetd to xinetd
diff --git a/src/plugins/scmcvs/bin/install.sh
b/src/plugins/scmcvs/bin/install.sh
index cff00ee..50fc986 100755
--- a/src/plugins/scmcvs/bin/install.sh
+++ b/src/plugins/scmcvs/bin/install.sh
@@ -23,20 +23,27 @@ fi
case "$1" in
configure)
- echo "Modifying inetd for cvs server"
- echo "CVS usual config is changed for gforge one"
- # First, dedupe the commented lines
- update-inetd --remove "cvspserver stream tcp nowait.400
root /usr/sbin/tcpd $source_path/bin/cvs-pserver"
- update-inetd --remove "cvspserver stream tcp nowait.400
root /usr/sbin/tcpd $source_path/plugins/scmcvs/bin/cvs-pserver"
- update-inetd --remove "cvspserver stream tcp nowait.400
root /usr/sbin/tcpd $source_path/plugins/scmcvs/bin/cvs-pserver"
- update-inetd --comment-chars "#SF_WAS_HERE#" --enable cvspserver
- # Then, insinuate ourselves
- update-inetd --comment-chars "#SF_WAS_HERE#" --disable cvspserver
- update-inetd --add "cvspserver stream tcp nowait.400 root
/usr/sbin/tcpd $source_path/plugins/scmcvs/sbin/cvs-pserver"
+ scmcvs_repos_path=$(forge_get_config repos_path scmcvs)
+ source_path=$(forge_get_config source_path)
+
+ echo "Modifying xinetd for CVS server"
+ if [ ! -e /etc/xinetd.d/fusionforge-plugin-scmcvs ]; then
+ cat > /etc/xinetd.d/fusionforge-plugin-scmcvs <<-EOF
+ service cvspserver
+ {
+ port = 2401
+ socket_type = stream
+ wait = no
+ user = root
+ server =
$source_path/plugins/scmcvs/sbin/cvs-pserver
+ }
+ EOF
+ fi
+ service xinetd restart
rm -f $data_path/dumps/*cvs*dump
- if [ ! -e $data_path/chroot/cvs ] ; then
+ if [ -e $data_path/chroot/cvsroot ] && [ ! -e $data_path/chroot/cvs ] ;
then
cd $data_path/chroot
ln -s cvsroot cvs
fi
@@ -46,14 +53,11 @@ case "$1" in
[ -d /etc/ssh-nonfree ] && invoke-rc.d ssh-nonfree restart || true
;;
- purge)
- echo "Purging inetd for cvs server"
- # echo "You should dpkg-reconfigure cvs to use std install"
- update-inetd --remove "cvspserver stream tcp nowait.400
root /usr/sbin/tcpd $source_path/plugins/scmcvs/sbin/cvs-pserver"
- update-inetd --comment-chars "#SF_WAS_HERE#" --enable cvspserver
+ remove)
+ rm -f /etc/xinetd.d/fusionforge-plugin-scmgit
;;
*)
- echo "Usage: $0 {configure|purge}"
+ echo "Usage: $0 {configure|remove}"
exit 1
esac
-----------------------------------------------------------------------
Summary of changes:
autoinstall/install-src.sh | 6 +-
autoinstall/install.sh | 4 +-
src/plugins/scmcvs/bin/install.sh | 38 +++++++-----
src/plugins/scmcvs/common/CVSPlugin.class.php | 72 ++++++++++------------
src/plugins/scmcvs/sbin/cvs-pserver | 10 +--
src/www/scm/viewvc.php | 2 +-
.../cvsTest.php} | 61 +++++++++++-------
7 files changed, 103 insertions(+), 90 deletions(-)
copy tests/func/{50_PluginsScmSvn/svnSSHTest.php =>
50_PluginsScmCVS/cvsTest.php} (50%)
hooks/post-receive
--
FusionForge
_______________________________________________
Fusionforge-commits mailing list
[email protected]
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits