[Fusionforge-commits] FusionForge branch 6.0 updated. f2b1a2e4e55cd16b891eeca6ce034e7bd6f1882c

Sylvain Beucler beuc-inria at fusionforge.org
Wed Feb 11 19:50:19 CET 2015


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  f2b1a2e4e55cd16b891eeca6ce034e7bd6f1882c (commit)
       via  c19760c740e09f5f9882f2e748c44b5814872d4e (commit)
      from  3cbd19e461e05ed7f52314a8afb1222f81e16e14 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit f2b1a2e4e55cd16b891eeca6ce034e7bd6f1882c
Author: Sylvain Beucler <sylvain.beucler at inria.fr>
Date:   Wed Feb 11 19:49:50 2015 +0100

    scmsvn: redirect to old URLs to new itk-style URLs

diff --git a/src/plugins/scmsvn/etc/httpd.conf.d/plugin-scmsvn.inc b/src/plugins/scmsvn/etc/httpd.conf.d/plugin-scmsvn.inc
index 18541b2..f65cd35 100644
--- a/src/plugins/scmsvn/etc/httpd.conf.d/plugin-scmsvn.inc
+++ b/src/plugins/scmsvn/etc/httpd.conf.d/plugin-scmsvn.inc
@@ -1,22 +1,6 @@
-<Location /svn>
-  <IfModule mod_dav_svn.c>
-    DAV svn
-    SVNParentPath {scmsvn/repos_path}
-
-    <IfModule mod_authz_svn.c>
-      # how to authenticate a user
-      AuthzSVNAccessFile {core/data_path}/svnroot-access
-      AuthType Basic
-      AuthName "Document repository"
-      AuthUserFile {core/data_path}/svnroot-authfile
-
-      # only authenticated users may access the repository
-      Require valid-user
-    </IfModule>
-    <IfModule !mod_authz_svn.c>
-      # allow read-only browsing
-      <LimitExcept GET PROPFIND OPTIONS REPORT>
-      </LimitExcept>
-    </IfModule>
-  </IfModule>
-</Location>
+<IfModule mod_authz_svn.c>
+  Alias /svn {core/plugins_path}/scmsvn/common/redirect-to-itk.php
+</IfModule>
+<IfModule !mod_authz_svn.c>
+  Redirect permanent /svn /anonscm/svn/
+</IfModule>
diff --git a/src/plugins/scmsvn/www/redirect-to-itk.php b/src/plugins/scmsvn/www/redirect-to-itk.php
new file mode 100644
index 0000000..0458a3f
--- /dev/null
+++ b/src/plugins/scmsvn/www/redirect-to-itk.php
@@ -0,0 +1,45 @@
+<?php
+/**
+ * Redirect authenticated URL to new ITK scheme
+ *
+ * Copyright 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.
+ */
+
+// - SVN allows automatically relocating the working copy but is VERY picky:
+//   - doesn't automatically relocate on temporary redirects (302), only permanent (301)
+//   - doesn't automatically relocate if there are more than 2 redirects
+//   - doesn't automatically relocate if the redirect is on PROPFIND (2nd request), only on OPTIONS (1st request)
+
+// Don't try to connect to the DB, just redirecting SVN URL
+putenv('FUSIONFORGE_NO_DB=true');
+
+require_once '../../../www/env.inc.php';
+require_once $gfcommon.'include/pre.php';
+
+# Force authentication so we get the username
+$auth = $_SERVER['PHP_AUTH_USER'];
+if (empty($auth)) {
+	header('WWW-Authenticate: Basic realm="Document repository"');
+	header('HTTP/1.0 401 Unauthorized');
+	echo 'Authorization required [this text ignored by SVN]';
+	exit;
+}
+
+header('Location: https://' . forge_get_config('scm_host') . '/authscm/'
+	. $_SERVER['PHP_AUTH_USER'] . $_SERVER['REQUEST_URI'], true, 301);

commit c19760c740e09f5f9882f2e748c44b5814872d4e
Author: Sylvain Beucler <sylvain.beucler at inria.fr>
Date:   Wed Feb 11 19:47:56 2015 +0100

    Fix apache configuration (bad copy/paste)

diff --git a/src/templates/httpd.conf.d/vhost-main.inc b/src/templates/httpd.conf.d/vhost-main.inc
index 11e8730..bacacfa 100644
--- a/src/templates/httpd.conf.d/vhost-main.inc
+++ b/src/templates/httpd.conf.d/vhost-main.inc
@@ -34,7 +34,7 @@ SetEnv FORGE_CONFIG_PATH "{core/config_path}"
 
 Alias /images/ {core/source_path}/www/images/
 Alias /scripts/coolfieldset/ {core/source_path}/vendor/coolfieldset/
-Alias /scripts/iframe-resizer/ /usr/local/share/fusionforge/vendor/iframe-resizer/                       |
+Alias /scripts/iframe-resizer/ /usr/local/share/fusionforge/vendor/iframe-resizer/
 Alias /scripts/jquery/ {core/source_path}/vendor/jquery/
 Alias /scripts/jquery-ui/ {core/source_path}/vendor/jquery-ui/
 Alias /scripts/jquery-storage/ {core/source_path}/vendor/jquery-storage/

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

Summary of changes:
 .../scmsvn/etc/httpd.conf.d/plugin-scmsvn.inc      |   28 +++---------
 src/plugins/scmsvn/www/redirect-to-itk.php         |   45 ++++++++++++++++++++
 src/templates/httpd.conf.d/vhost-main.inc          |    2 +-
 3 files changed, 52 insertions(+), 23 deletions(-)
 create mode 100644 src/plugins/scmsvn/www/redirect-to-itk.php


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list