[Fusionforge-commits] FusionForge branch master updated. v6.0.5-1904-g4b322f6

Franck Villaume nerville at libremir.placard.fr.eu.org
Mon Jun 5 12:00:45 CEST 2017


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

The branch, master has been updated
       via  4b322f6998ae3959b4f507dc7ee932f77635a4cb (commit)
       via  0270f30a4a5da0c4d40a4167165ae7f5d0dd3757 (commit)
      from  b90ecf236abd21a6c3ce825c1e77cdc907fc6f10 (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=4b322f6998ae3959b4f507dc7ee932f77635a4cb

commit 4b322f6998ae3959b4f507dc7ee932f77635a4cb
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Mon Jun 5 10:00:39 2017 +0000

    scmsvn plugin: support specific ssh port if any

diff --git a/src/plugins/scmsvn/common/SVNPlugin.class.php b/src/plugins/scmsvn/common/SVNPlugin.class.php
index 15f1ce6..f2979d1 100644
--- a/src/plugins/scmsvn/common/SVNPlugin.class.php
+++ b/src/plugins/scmsvn/common/SVNPlugin.class.php
@@ -5,7 +5,7 @@
  * Copyright 2003-2010, Roland Mas, Franck Villaume
  * Copyright 2004, GForge, LLC
  * Copyright 2010, Alain Peyrat <aljeux at free.fr>
- * Copyright 2012-2014,2016, Franck Villaume - TrivialDev
+ * Copyright 2012-2014,2016-2017, Franck Villaume - TrivialDev
  * Copyright 2013, French Ministry of National Education
  *
  * This file is part of FusionForge.
@@ -38,6 +38,7 @@ forge_define_config_item('use_ssl', 'scmsvn', true);
 forge_set_config_item_bool('use_ssl', 'scmsvn');
 forge_define_config_item('anonsvn_login','scmsvn', 'anonsvn');
 forge_define_config_item('anonsvn_password','scmsvn', 'anonsvn');
+forge_define_config_item('ssh_port', 'core', 22);
 
 class SVNPlugin extends SCMPlugin {
 	function __construct() {
@@ -120,7 +121,11 @@ some control over it to the project's administrator.");
 		$b .= '<p>' ;
 		$module = $this->topModule($project);
 		if (forge_get_config('use_ssh', 'scmsvn')) {
-			$b .= '<span class="tt">svn checkout svn://'.forge_get_config('scm_host').$this->svn_root_fs.'/'.$project->getUnixName().$module.'</span><br />';
+			$ssh_port = '';
+			if (forge_get_config('ssh_port') != 22) {
+				$ssh_port = '--config-option="config:tunnels:ssh=ssh -p '.forge_get_config('ssh_port').'"';
+			}
+			$b .= '<span class="tt">svn '.$ssh_port.' checkout svn://'.forge_get_config('scm_host').$this->svn_root_fs.'/'.$project->getUnixName().$module.'</span><br />';
 		}
 		if (forge_get_config('use_dav', 'scmsvn')) {
 			$b .= '<p><span class="tt">svn checkout http'.((forge_get_config('use_ssl', 'scmsvn')) ? 's' : '').'://'. forge_get_config('scm_host'). '/anonscm/svn/'.$project->getUnixName().$module.'</span></p>' ;
@@ -155,7 +160,11 @@ some control over it to the project's administrator.");
 				$b .= ' ';
 				$b .= _('Enter your site password when prompted.');
 				$b .= '</p>';
-				$b .= '<p><span class="tt">svn checkout svn+ssh://'.$d.'@' . forge_get_config('scm_host') . $this->svn_root_fs .'/'. $project->getUnixName().$module.'</span></p>' ;
+				$ssh_port = '';
+				if (forge_get_config('ssh_port') != 22) {
+					$ssh_port = '--config-option="config:tunnels:ssh=ssh -p '.forge_get_config('ssh_port').'"';
+				}
+				$b .= '<p><span class="tt">svn '.$ssh_port.' checkout svn+ssh://'.$d.'@' . forge_get_config('scm_host') . $this->svn_root_fs .'/'. $project->getUnixName().$module.'</span></p>' ;
 				$b .= '</div>';
 			}
 			if (forge_get_config('use_dav', 'scmsvn')) {
@@ -176,8 +185,11 @@ some control over it to the project's administrator.");
 				$b .= ' ';
 				$b .= _('Enter your site password when prompted.');
 				$b .= '</p>';
-				$b .= '<p><span class="tt">svn checkout svn+ssh://<i>'._('developername').'</i>@' . forge_get_config('scm_host') . $this->svn_root_fs .'/'. $project->getUnixName().$module.'</span></p>' ;
-				$b .= '</div>';
+				$ssh_port = '';
+				if (forge_get_config('ssh_port') != 22) {
+					$ssh_port = '--config-option="config:tunnels:ssh=ssh -p '.forge_get_config('ssh_port').'"';
+				}
+				$b .= '<p><span class="tt">svn '.$ssh_port.' checkout svn+ssh://<i>'._('developername').'</i>@' . forge_get_config('scm_host') . $this->svn_root_fs .'/'. $project->getUnixName().$module.'</span></p>' ; $b .= '</div>';
 			}
 			if (forge_get_config('use_dav', 'scmsvn')) {
 				$b .= '<div id="tabber-dav" class="tabbertab" >';

https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=0270f30a4a5da0c4d40a4167165ae7f5d0dd3757

commit 0270f30a4a5da0c4d40a4167165ae7f5d0dd3757
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Mon Jun 5 09:58:49 2017 +0000

    docker: support environment variable for port mapping

diff --git a/docker/startpoint.sh b/docker/startpoint.sh
index 61ab381..1e659ad 100644
--- a/docker/startpoint.sh
+++ b/docker/startpoint.sh
@@ -26,6 +26,19 @@ __postinstall() {
 /usr/local/share/fusionforge/post-install.d/shell/shell.sh rawconfigure
 }
 
+__zzzzlocalini() {
+echo '[core]' > /etc/fusionforge/config.ini.d/zzzz-local.ini
+if [[ ! -z ${PORT_HTTP} ]]; then
+   echo 'http_port = '${PORT_HTTP} >> /etc/fusionforge/config.ini.d/zzzz-local.ini
+fi
+if [[ ! -z ${PORT_HTTPS} ]]; then
+   echo 'https_port = '${PORT_HTTPS} >> /etc/fusionforge/config.ini.d/zzzz-local.ini
+fi
+if [[ ! -z ${PORT_SSH} ]]; then
+   echo 'ssh_port = '${PORT_SSH} >> /etc/fusionforge/config.ini.d/zzzz-local.ini
+fi
+}
+
 __etchost() {
 echo "127.0.0.1  scm."`hostname -f` >> /etc/hosts
 }
@@ -36,5 +49,6 @@ supervisord -n
 
 # Call all functions
 __postinstall
+__zzzzlocalini
 __etchost
 __run_supervisor

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

Summary of changes:
 docker/startpoint.sh                          | 14 ++++++++++++++
 src/plugins/scmsvn/common/SVNPlugin.class.php | 22 +++++++++++++++++-----
 2 files changed, 31 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list