From: Eric Wong <e@80x24.org>
To: spew@80x24.org
Subject: [PATCH 3/3] t/lib-git-svn: adjust config to apache 2.4
Date: Sat, 23 Jul 2016 00:55:17 +0000 [thread overview]
Message-ID: <20160723005517.5288-3-e@80x24.org> (raw)
In-Reply-To: <20160723005517.5288-1-e@80x24.org>
From: Michael J Gruber <git@drmicha.warpmail.net>
Apache 2.4 requires several config changes and enabling
authentication to start.
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Eric Wong <e@80x24.org>
---
t/lib-git-svn.sh | 33 ++++++++++++++++++++++++++++++++-
t/t9118-git-svn-funky-branch-names.sh | 11 ++++++-----
2 files changed, 38 insertions(+), 6 deletions(-)
diff --git a/t/lib-git-svn.sh b/t/lib-git-svn.sh
index 206f0d4..095957e 100644
--- a/t/lib-git-svn.sh
+++ b/t/lib-git-svn.sh
@@ -114,13 +114,35 @@ ServerName "git svn test"
ServerRoot "$GIT_DIR"
DocumentRoot "$GIT_DIR"
PidFile "$GIT_DIR/httpd.pid"
-LockFile logs/accept.lock
Listen 127.0.0.1:$SVN_HTTPD_PORT
LoadModule dav_module $SVN_HTTPD_MODULE_PATH/mod_dav.so
LoadModule dav_svn_module $SVN_HTTPD_MODULE_PATH/mod_dav_svn.so
+<IfModule !mod_version.c>
+ LoadModule version_module $SVN_HTTPD_MODULE_PATH/mod_version.so
+</IfModule>
+<IfVersion < 2.4>
+LockFile logs/accept.lock
+</IfVersion>
+<IfVersion >= 2.4>
+Mutex default
+<IfModule !mod_prefork_module.c>
+ LoadModule mpm_prefork_module $SVN_HTTPD_MODULE_PATH/mod_mpm_prefork.so
+</IfModule>
+<IfModule !authz_core_module.c>
+ LoadModule authz_core_module $SVN_HTTPD_MODULE_PATH/mod_authz_core.so
+</IfModule>
+<IfModule !authz_user_module.c>
+ LoadModule authz_user_module $SVN_HTTPD_MODULE_PATH/mod_authz_user.so
+</IfModule>
+</IfVersion>
<Location /$repo_base_path>
DAV svn
SVNPath "$rawsvnrepo"
+ <IfVersion >= 2.4>
+ <Limit NEVER$$>
+ Require valid-user
+ </Limit>
+ </IfVersion>
</Location>
EOF
}
@@ -141,7 +163,16 @@ start_httpd () {
stop_httpd () {
test -z "$SVN_HTTPD_PORT" && return
test ! -f "$GIT_DIR/httpd.conf" && return
+ httpd_pid=$(cat "$GIT_DIR"/httpd.pid)
"$SVN_HTTPD_PATH" -f "$GIT_DIR"/httpd.conf -k stop
+ if test -n "$httpd_pid" && test "$httpd_pid" -gt 0
+ then
+ while kill -0 $httpd_pid 2>/dev/null
+ do
+ say "# waiting for httpd PID:$httpd_pid to exit"
+ sleep 1
+ done
+ fi
}
convert_to_rev_db () {
diff --git a/t/t9118-git-svn-funky-branch-names.sh b/t/t9118-git-svn-funky-branch-names.sh
index ecb1fed..d5e236c 100755
--- a/t/t9118-git-svn-funky-branch-names.sh
+++ b/t/t9118-git-svn-funky-branch-names.sh
@@ -32,15 +32,16 @@ test_expect_success 'setup svnrepo' '
"$svnrepo/pr ject/branches/trailing_dotlock.lock" &&
svn_cmd cp -m "reflog" "$svnrepo/pr ject/trunk" \
"$svnrepo/pr ject/branches/not-a@{0}reflog@" &&
+ # SVN 1.7 will truncate "not-a%40{0]" to just "not-a".
+ # Look at what SVN wound up naming the branch and use that.
+ # Be sure to escape the @ if it shows up.
+ non_reflog=$(svn_cmd ls "$svnrepo/pr ject/branches" | \
+ grep not-a | sed "s/\///" | sed "s/@/%40/") &&
start_httpd
'
-# SVN 1.7 will truncate "not-a%40{0]" to just "not-a".
-# Look at what SVN wound up naming the branch and use that.
-# Be sure to escape the @ if it shows up.
-non_reflog=$(svn_cmd ls "$svnrepo/pr ject/branches" | grep not-a | sed 's/\///' | sed 's/@/%40/')
-
test_expect_success 'test clone with funky branch names' '
+ test -n "$non_reflog" &&
git svn clone -s "$svnrepo/pr ject" project &&
(
cd project &&
--
EW
prev parent reply other threads:[~2016-07-23 0:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-23 0:55 [PATCH 1/3] t/lib-git-svn: check same httpd module dirs as lib-httpd Eric Wong
2016-07-23 0:55 ` [PATCH 2/3] t/t91*: do not say how to avoid the tests Eric Wong
2016-07-23 0:55 ` Eric Wong [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160723005517.5288-3-e@80x24.org \
--to=e@80x24.org \
--cc=spew@80x24.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).