You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by br...@apache.org on 2014/04/09 17:22:08 UTC
svn commit: r1585990 [2/2] - in /subversion/branches/remote-only-status: ./
subversion/include/ subversion/include/private/ subversion/libsvn_client/
subversion/libsvn_fs/ subversion/libsvn_fs_base/ subversion/libsvn_fs_fs/
subversion/libsvn_fs_x/ subv...
Modified: subversion/branches/remote-only-status/subversion/svnserve/svnserve.c
URL: http://svn.apache.org/viewvc/subversion/branches/remote-only-status/subversion/svnserve/svnserve.c?rev=1585990&r1=1585989&r2=1585990&view=diff
==============================================================================
--- subversion/branches/remote-only-status/subversion/svnserve/svnserve.c (original)
+++ subversion/branches/remote-only-status/subversion/svnserve/svnserve.c Wed Apr 9 15:22:07 2014
@@ -207,6 +207,8 @@ void winservice_notify_stop(void)
#define SVNSERVE_OPT_SINGLE_CONN 268
#define SVNSERVE_OPT_CLIENT_SPEED 269
#define SVNSERVE_OPT_VIRTUAL_HOST 270
+#define SVNSERVE_OPT_MIN_THREADS 271
+#define SVNSERVE_OPT_MAX_THREADS 272
static const apr_getopt_option_t svnserve__options[] =
{
@@ -268,7 +270,7 @@ static const apr_getopt_option_t svnserv
" "
"Default is 16.\n"
" "
- "[used for FSFS repositories only]")},
+ "[used for FSFS and FSX repositories only]")},
{"cache-txdeltas", SVNSERVE_OPT_CACHE_TXDELTAS, 1,
N_("enable or disable caching of deltas between older\n"
" "
@@ -276,13 +278,13 @@ static const apr_getopt_option_t svnserv
" "
"Default is yes.\n"
" "
- "[used for FSFS repositories only]")},
+ "[used for FSFS and FSX repositories only]")},
{"cache-fulltexts", SVNSERVE_OPT_CACHE_FULLTEXTS, 1,
N_("enable or disable caching of file contents\n"
" "
"Default is yes.\n"
" "
- "[used for FSFS repositories only]")},
+ "[used for FSFS and FSX repositories only]")},
{"cache-revprops", SVNSERVE_OPT_CACHE_REVPROPS, 1,
N_("enable or disable caching of revision properties.\n"
" "
@@ -290,7 +292,7 @@ static const apr_getopt_option_t svnserv
" "
"Default is no.\n"
" "
- "[used for FSFS repositories only]")},
+ "[used for FSFS and FSX repositories only]")},
{"client-speed", SVNSERVE_OPT_CLIENT_SPEED, 1,
N_("Optimize network handling based on the assumption\n"
" "
@@ -304,15 +306,42 @@ static const apr_getopt_option_t svnserv
* ### this option never exists when --service exists. */
{"threads", 'T', 0, N_("use threads instead of fork "
"[mode: daemon]")},
+ {"min-threads", SVNSERVE_OPT_MIN_THREADS, 1,
+ N_("Minimum number of server threads, even if idle.\n"
+ " "
+ "Caped to max-threads; minimum value is 0.\n"
+ " "
+ "Default is 1.\n"
+ " "
+ "[used only with --threads]")},
+#if (APR_SIZEOF_VOIDP <= 4)
+ {"max-threads", SVNSERVE_OPT_MAX_THREADS, 1,
+ N_("Maximum number of server threads, even if there\n"
+ " "
+ "are more connections. Minimum value is 1.\n"
+ " "
+ "Default is 64.\n"
+ " "
+ "[used only with --threads]")},
+#else
+ {"max-threads", SVNSERVE_OPT_MAX_THREADS, 1,
+ N_("Maximum number of server threads, even if there\n"
+ " "
+ "are more connections. Minimum value is 1.\n"
+ " "
+ "Default is 256.\n"
+ " "
+ "[used only with --threads]")},
+#endif
#endif
{"foreground", SVNSERVE_OPT_FOREGROUND, 0,
N_("run in foreground (useful for debugging)\n"
" "
"[mode: daemon]")},
{"single-thread", SVNSERVE_OPT_SINGLE_CONN, 0,
- N_("handle one connection at a time in the parent process\n"
+ N_("handle one connection at a time in the parent\n"
" "
- "(useful for debugging)")},
+ "process (useful for debugging)")},
{"log-file", SVNSERVE_OPT_LOG_FILE, 1,
N_("svnserve log file")},
{"pid-file", SVNSERVE_OPT_PID_FILE, 1,
@@ -656,7 +685,8 @@ sub_main(int *exit_code, int argc, const
const char *pid_filename = NULL;
const char *log_filename = NULL;
svn_node_kind_t kind;
-
+ apr_size_t min_thread_count = THREADPOOL_MIN_SIZE;
+ apr_size_t max_thread_count = THREADPOOL_MAX_SIZE;
#ifdef SVN_HAVE_SASL
SVN_ERR(cyrus_init(pool));
#endif
@@ -844,6 +874,14 @@ sub_main(int *exit_code, int argc, const
}
break;
+ case SVNSERVE_OPT_MIN_THREADS:
+ min_thread_count = (apr_size_t)apr_strtoi64(arg, NULL, 0);
+ break;
+
+ case SVNSERVE_OPT_MAX_THREADS:
+ max_thread_count = (apr_size_t)apr_strtoi64(arg, NULL, 0);
+ break;
+
#ifdef WIN32
case SVNSERVE_OPT_SERVICE:
if (run_mode != run_mode_service)
@@ -1181,10 +1219,15 @@ sub_main(int *exit_code, int argc, const
if (handling_mode == connection_mode_thread)
{
- /* create the thread pool */
+ /* create the thread pool with a valid range of threads */
+ if (max_thread_count < 1)
+ max_thread_count = 1;
+ if (min_thread_count > max_thread_count)
+ min_thread_count = max_thread_count;
+
status = apr_thread_pool_create(&threads,
- THREADPOOL_MIN_SIZE,
- THREADPOOL_MAX_SIZE,
+ min_thread_count,
+ max_thread_count,
pool);
if (status)
{
Propchange: subversion/branches/remote-only-status/subversion/tests/cmdline/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed Apr 9 15:22:07 2014
@@ -9,3 +9,4 @@ entries-dump
atomic-ra-revprop-change
.libs
.davautocheck.sh.stop
+lock-helper
Modified: subversion/branches/remote-only-status/subversion/tests/cmdline/commit_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/remote-only-status/subversion/tests/cmdline/commit_tests.py?rev=1585990&r1=1585989&r2=1585990&view=diff
==============================================================================
--- subversion/branches/remote-only-status/subversion/tests/cmdline/commit_tests.py (original)
+++ subversion/branches/remote-only-status/subversion/tests/cmdline/commit_tests.py Wed Apr 9 15:22:07 2014
@@ -1394,14 +1394,8 @@ def failed_commit(sbox):
'commit', '-m', 'log', other_wc_dir)
# Now list the txns in the repo. The list should be empty.
- exit_code, output, errput = svntest.main.run_svnadmin('lstxns',
- sbox.repo_dir)
- svntest.verify.compare_and_display_lines(
- "Error running 'svnadmin lstxns'.",
- 'STDERR', [], errput)
- svntest.verify.compare_and_display_lines(
- "Output of 'svnadmin lstxns' is unexpected.",
- 'STDOUT', [], output)
+ svntest.actions.run_and_verify_svnadmin(None, [], [],
+ 'lstxns', sbox.repo_dir)
#----------------------------------------------------------------------
@@ -2546,14 +2540,8 @@ def start_commit_hook_test(sbox):
expected_stderr, actual_stderr)
# Now list the txns in the repo. The list should be empty.
- exit_code, output, errput = svntest.main.run_svnadmin('lstxns',
- sbox.repo_dir)
- svntest.verify.compare_and_display_lines(
- "Error running 'svnadmin lstxns'.",
- 'STDERR', [], errput)
- svntest.verify.compare_and_display_lines(
- "Output of 'svnadmin lstxns' is unexpected.",
- 'STDOUT', [], output)
+ svntest.actions.run_and_verify_svnadmin(None, [], [],
+ 'lstxns', sbox.repo_dir)
#----------------------------------------------------------------------
@Issue(3553)
Modified: subversion/branches/remote-only-status/subversion/tests/cmdline/lock_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/remote-only-status/subversion/tests/cmdline/lock_tests.py?rev=1585990&r1=1585989&r2=1585990&view=diff
==============================================================================
--- subversion/branches/remote-only-status/subversion/tests/cmdline/lock_tests.py (original)
+++ subversion/branches/remote-only-status/subversion/tests/cmdline/lock_tests.py Wed Apr 9 15:22:07 2014
@@ -2230,6 +2230,47 @@ def many_locks_hooks(sbox):
+@Issue(3515)
+@SkipUnless(svntest.main.is_ra_type_dav)
+def dav_lock_refresh(sbox):
+ "refresh timeout of DAV lock"
+
+ import httplib
+ from urlparse import urlparse
+ import base64
+
+ sbox.build(create_wc = False)
+
+ # Acquire lock on 'iota'
+ svntest.actions.run_and_verify_svn(None, ".*locked by user", [], 'lock',
+ sbox.repo_url + '/iota')
+
+ # Try to refresh lock using 'If' header
+ loc = urlparse(sbox.repo_url)
+
+ if loc.scheme == 'http':
+ h = httplib.HTTPConnection(loc.hostname, loc.port)
+ else:
+ h = httplib.HTTPSConnection(loc.hostname, loc.port)
+
+ lock_token = svntest.actions.run_and_parse_info(sbox.repo_url + '/iota')[0]['Lock Token']
+
+ lock_headers = {
+ 'Authorization': 'Basic ' + base64.b64encode('jrandom:rayjandom'),
+ 'If': '(<' + lock_token + '>)',
+ 'Timeout': 'Second-7200'
+ }
+
+ # Enabling the following line makes this test easier to debug
+ h.set_debuglevel(9)
+
+ h.request('LOCK', sbox.repo_url + '/iota', '', lock_headers)
+
+ # XFAIL Refreshing of DAV lock fails with error '412 Precondition Failed'
+ r = h.getresponse()
+ if r.status != httplib.OK:
+ raise svntest.Failure('Lock refresh failed: %d %s' % (r.status, r.reason))
+
########################################################################
# Run the tests
@@ -2291,6 +2332,7 @@ test_list = [ None,
create_dav_lock_timeout,
non_root_locks,
many_locks_hooks,
+ dav_lock_refresh,
]
if __name__ == '__main__':
Modified: subversion/branches/remote-only-status/subversion/tests/cmdline/svnadmin_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/remote-only-status/subversion/tests/cmdline/svnadmin_tests.py?rev=1585990&r1=1585989&r2=1585990&view=diff
==============================================================================
--- subversion/branches/remote-only-status/subversion/tests/cmdline/svnadmin_tests.py (original)
+++ subversion/branches/remote-only-status/subversion/tests/cmdline/svnadmin_tests.py Wed Apr 9 15:22:07 2014
@@ -2397,6 +2397,21 @@ def verify_packed(sbox):
svntest.actions.run_and_verify_svnadmin(None, expected_output, [],
"verify", sbox.repo_dir)
+# Test that 'svnadmin freeze' is nestable. (For example, this ensures it
+# won't take system-global locks, only repository-scoped ones.)
+#
+# This could be useful to easily freeze a small number of repositories at once.
+#
+# ### We don't actually test that freeze takes a write lock anywhere (not even
+# ### in C tests.)
+def freeze_freeze(sbox):
+ "svnadmin freeze svnadmin freeze (some-cmd)"
+ sbox.build(create_wc=False, read_only=True)
+ second_repo_dir, _ = sbox.add_repo_path('backup')
+ svntest.main.run_svnadmin('freeze', '--', sbox.repo_dir,
+ svntest.main.svnadmin_binary, 'freeze', '--', second_repo_dir,
+ sys.executable, '-c', 'True')
+
########################################################################
# Run the tests
@@ -2442,6 +2457,7 @@ test_list = [ None,
load_ignore_dates,
fsfs_hotcopy_old_with_propchanges,
verify_packed,
+ freeze_freeze,
]
if __name__ == '__main__':
Modified: subversion/branches/remote-only-status/subversion/tests/cmdline/svntest/actions.py
URL: http://svn.apache.org/viewvc/subversion/branches/remote-only-status/subversion/tests/cmdline/svntest/actions.py?rev=1585990&r1=1585989&r2=1585990&view=diff
==============================================================================
--- subversion/branches/remote-only-status/subversion/tests/cmdline/svntest/actions.py (original)
+++ subversion/branches/remote-only-status/subversion/tests/cmdline/svntest/actions.py Wed Apr 9 15:22:07 2014
@@ -160,6 +160,8 @@ def guarantee_greek_repository(path, min
# make the repos world-writeable, for mod_dav_svn's sake.
main.chmod_tree(path, 0666, 0666)
+ # give the repository a unique UUID
+ run_and_verify_svnadmin("could not set uuid", [], [], 'setuuid', path)
def run_and_verify_atomic_ra_revprop_change(message,
expected_stdout,
Modified: subversion/branches/remote-only-status/subversion/tests/cmdline/svntest/main.py
URL: http://svn.apache.org/viewvc/subversion/branches/remote-only-status/subversion/tests/cmdline/svntest/main.py?rev=1585990&r1=1585989&r2=1585990&view=diff
==============================================================================
--- subversion/branches/remote-only-status/subversion/tests/cmdline/svntest/main.py (original)
+++ subversion/branches/remote-only-status/subversion/tests/cmdline/svntest/main.py Wed Apr 9 15:22:07 2014
@@ -1486,7 +1486,7 @@ class TestSpawningThread(threading.Threa
if options.exclusive_wc_locks:
args.append('--exclusive-wc-locks')
if options.memcached_server:
- args.append('--memcached-server' + options.memcached_server)
+ args.append('--memcached-server=' + options.memcached_server)
result, stdout_lines, stderr_lines = spawn_process(command, 0, False, None,
*args)
Modified: subversion/branches/remote-only-status/subversion/tests/libsvn_fs/locks-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/remote-only-status/subversion/tests/libsvn_fs/locks-test.c?rev=1585990&r1=1585989&r2=1585990&view=diff
==============================================================================
--- subversion/branches/remote-only-status/subversion/tests/libsvn_fs/locks-test.c (original)
+++ subversion/branches/remote-only-status/subversion/tests/libsvn_fs/locks-test.c Wed Apr 9 15:22:07 2014
@@ -888,7 +888,7 @@ lock_multiple_paths(const svn_test_opts_
const char *conflict;
svn_revnum_t newrev;
svn_fs_access_t *access;
- svn_fs_lock_target_t target;
+ svn_fs_lock_target_t *target;
struct lock_many_baton_t baton;
apr_hash_t *lock_paths, *unlock_paths;
apr_hash_index_t *hi;
@@ -910,18 +910,17 @@ lock_multiple_paths(const svn_test_opts_
baton.pool = pool;
lock_paths = apr_hash_make(pool);
unlock_paths = apr_hash_make(pool);
- target.token = NULL;
- target.current_rev = newrev;
+ target = svn_fs_lock_target_create(NULL, newrev, pool);
- svn_hash_sets(lock_paths, "/A/B/E/alpha", &target);
- svn_hash_sets(lock_paths, "/A/B/E/beta", &target);
- svn_hash_sets(lock_paths, "/A/B/E/zulu", &target);
- svn_hash_sets(lock_paths, "/A/BB/mu", &target);
- svn_hash_sets(lock_paths, "/A/BBB/mu", &target);
- svn_hash_sets(lock_paths, "/A/D/G/pi", &target);
- svn_hash_sets(lock_paths, "/A/D/G/rho", &target);
- svn_hash_sets(lock_paths, "/A/mu", &target);
- svn_hash_sets(lock_paths, "/X/zulu", &target);
+ svn_hash_sets(lock_paths, "/A/B/E/alpha", target);
+ svn_hash_sets(lock_paths, "/A/B/E/beta", target);
+ svn_hash_sets(lock_paths, "/A/B/E/zulu", target);
+ svn_hash_sets(lock_paths, "/A/BB/mu", target);
+ svn_hash_sets(lock_paths, "/A/BBB/mu", target);
+ svn_hash_sets(lock_paths, "/A/D/G/pi", target);
+ svn_hash_sets(lock_paths, "/A/D/G/rho", target);
+ svn_hash_sets(lock_paths, "/A/mu", target);
+ svn_hash_sets(lock_paths, "/X/zulu", target);
/* Lock some paths. */
apr_hash_clear(baton.results);
Modified: subversion/branches/remote-only-status/subversion/tests/libsvn_repos/repos-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/remote-only-status/subversion/tests/libsvn_repos/repos-test.c?rev=1585990&r1=1585989&r2=1585990&view=diff
==============================================================================
--- subversion/branches/remote-only-status/subversion/tests/libsvn_repos/repos-test.c (original)
+++ subversion/branches/remote-only-status/subversion/tests/libsvn_repos/repos-test.c Wed Apr 9 15:22:07 2014
@@ -3538,65 +3538,6 @@ test_repos_fs_type(const svn_test_opts_t
return SVN_NO_ERROR;
}
-/* Notification receiver for test_dump_bad_mergeinfo(). This does not
- need to do anything, it just needs to exist.
- */
-static void
-dump_r0_mergeinfo_notifier(void *baton,
- const svn_repos_notify_t *notify,
- apr_pool_t *scratch_pool)
-{
-}
-
-/* Regression test for part the 'dump' part of issue #4476 "Mergeinfo
- containing r0 makes svnsync and svnadmin dump fail". */
-static svn_error_t *
-test_dump_r0_mergeinfo(const svn_test_opts_t *opts,
- apr_pool_t *pool)
-{
- svn_repos_t *repos;
- svn_fs_t *fs;
- svn_fs_txn_t *txn;
- svn_fs_root_t *txn_root;
- svn_revnum_t youngest_rev = 0;
- const svn_string_t *bad_mergeinfo = svn_string_create("/foo:0", pool);
-
- SVN_ERR(svn_test__create_repos(&repos, "test-repo-dump-r0-mergeinfo",
- opts, pool));
- fs = svn_repos_fs(repos);
-
- /* Revision 1: Any commit will do, here */
- SVN_ERR(svn_fs_begin_txn(&txn, fs, youngest_rev, pool));
- SVN_ERR(svn_fs_txn_root(&txn_root, txn, pool));
- SVN_ERR(svn_fs_make_dir(txn_root, "/bar", pool));
- SVN_ERR(svn_repos_fs_commit_txn(NULL, repos, &youngest_rev, txn, pool));
- SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
-
- /* Revision 2: Add bad mergeinfo */
- SVN_ERR(svn_fs_begin_txn(&txn, fs, youngest_rev, pool));
- SVN_ERR(svn_fs_txn_root(&txn_root, txn, pool));
- SVN_ERR(svn_fs_change_node_prop(txn_root, "/bar", "svn:mergeinfo", bad_mergeinfo, pool));
- SVN_ERR(svn_repos_fs_commit_txn(NULL, repos, &youngest_rev, txn, pool));
- SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
-
- /* Test that a dump completes without error. In order to exercise the
- functionality under test -- that is, in order for the dump to try to
- parse the mergeinfo it is dumping -- the dump must start from a
- revision greater than 1 and must take a notification callback. */
- {
- svn_stringbuf_t *stringbuf = svn_stringbuf_create_empty(pool);
- svn_stream_t *stream = svn_stream_from_stringbuf(stringbuf, pool);
-
- SVN_ERR(svn_repos_dump_fs3(repos, stream, 2, SVN_INVALID_REVNUM,
- FALSE, FALSE,
- dump_r0_mergeinfo_notifier, NULL,
- NULL, NULL,
- pool));
- }
-
- return SVN_NO_ERROR;
-}
-
/* The test table. */
static int max_threads = 4;
@@ -3650,8 +3591,6 @@ static struct svn_test_descriptor_t test
"test svn_repos__config_pool_*"),
SVN_TEST_OPTS_PASS(test_repos_fs_type,
"test test_repos_fs_type"),
- SVN_TEST_OPTS_PASS(test_dump_r0_mergeinfo,
- "test dumping with r0 mergeinfo"),
SVN_TEST_NULL
};
Modified: subversion/branches/remote-only-status/tools/buildbot/slaves/bb-openbsd/svncheck.sh
URL: http://svn.apache.org/viewvc/subversion/branches/remote-only-status/tools/buildbot/slaves/bb-openbsd/svncheck.sh?rev=1585990&r1=1585989&r2=1585990&view=diff
==============================================================================
--- subversion/branches/remote-only-status/tools/buildbot/slaves/bb-openbsd/svncheck.sh (original)
+++ subversion/branches/remote-only-status/tools/buildbot/slaves/bb-openbsd/svncheck.sh Wed Apr 9 15:22:07 2014
@@ -25,6 +25,8 @@ set -x
branch="$(basename $(svn info . | grep ^URL | cut -d' ' -f2))"
export MALLOC_OPTIONS=S
(cd .. && gmake BRANCH="$branch" PARALLEL="" THREADING="no" \
+ MEMCACHED_SERVER="127.0.0.1:11211" \
+ EXCLUSIVE_WC_LOCKS=1 \
svn-check-local \
svn-check-svn \
svn-check-neon \
Modified: subversion/branches/remote-only-status/tools/dev/unix-build/Makefile.svn
URL: http://svn.apache.org/viewvc/subversion/branches/remote-only-status/tools/dev/unix-build/Makefile.svn?rev=1585990&r1=1585989&r2=1585990&view=diff
==============================================================================
--- subversion/branches/remote-only-status/tools/dev/unix-build/Makefile.svn (original)
+++ subversion/branches/remote-only-status/tools/dev/unix-build/Makefile.svn Wed Apr 9 15:22:07 2014
@@ -68,16 +68,16 @@ OBJDIR = $(PWD)/objdir
BDB_MAJOR_VER = 4.7
BDB_VER = $(BDB_MAJOR_VER).25
-APR_VER = 1.4.8
+APR_VER = 1.5.0
APR_ICONV_VER = 1.2.1
GNU_ICONV_VER = 1.14
-APR_UTIL_VER = 1.4.1
+APR_UTIL_VER = 1.5.3
HTTPD_VER = 2.2.26
NEON_VER = 0.29.6
SERF_VER = 1.3.4
SERF_OLD_VER = 0.3.1
CYRUS_SASL_VER = 2.1.25
-SQLITE_VER = 3080200
+SQLITE_VER = 3080403
LIBMAGIC_VER = 5.17
RUBY_VER = 1.8.7-p358
BZ2_VER = 1.0.6
@@ -85,6 +85,7 @@ PYTHON_VER = 2.7.3
JUNIT_VER = 4.10
GETTEXT_VER = 0.18.3.1
+APR_1_5_PATCH = apr-1.5.0-out-of-tree-build.patch
BDB_DIST = db-$(BDB_VER).tar.gz
APR_ICONV_DIST = apr-iconv-$(APR_ICONV_VER).tar.gz
GNU_ICONV_DIST = libiconv-$(GNU_ICONV_VER).tar.gz
@@ -118,6 +119,7 @@ FETCH_CMD = wget -c
SUBVERSION_REPOS_URL = https://svn.apache.org/repos/asf/subversion
BDB_URL = http://ftp2.de.freebsd.org/pub/FreeBSD/distfiles/bdb/$(BDB_DIST)
APR_URL = http://svn.apache.org/repos/asf/apr/apr
+APR_PATCHES_URL = http://www.apache.org/dist/apr/patches
APR_ICONV_URL = http://www.apache.org/dist/apr/$(APR_ICONV_DIST)
GNU_ICONV_URL = http://ftp.gnu.org/pub/gnu/libiconv/$(GNU_ICONV_DIST)
APR_UTIL_URL = http://svn.apache.org/repos/asf/apr/apr-util
@@ -126,7 +128,7 @@ NEON_URL = http://webdav.org/neon/$(NEON
#SERF_URL = http://serf.googlecode.com/files/$(SERF_DIST)
SERF_URL = http://serf.googlecode.com/svn/tags/$(SERF_VER)
SERF_OLD_URL = http://serf.googlecode.com/svn/tags/$(SERF_OLD_VER)
-SQLITE_URL = http://www.sqlite.org/2013/$(SQLITE_DIST)
+SQLITE_URL = http://www.sqlite.org/2014/$(SQLITE_DIST)
CYRUS_SASL_URL = ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/$(CYRUS_SASL_DIST)
LIBMAGIC_URL = ftp://ftp.astron.com/pub/file/$(LIBMAGIC_DIST)
RUBY_URL = http://ftp.ruby-lang.org/pub/ruby/1.8/$(RUBY_DIST)
@@ -309,6 +311,9 @@ $(APR_OBJDIR)/.retrieved:
if [ ! -d $(APR_SRCDIR) ]; then \
svn export $(APR_URL)/tags/$(APR_VER)/ $(APR_SRCDIR); \
fi
+ -(cd $(APR_SRCDIR) && \
+ $(FETCH_CMD) $(APR_PATCHES_URL)/$(APR_1_5_PATCH) && \
+ patch -N -p1 < $(APR_1_5_PATCH))
touch $@
ifeq ($(THREADING),yes)
@@ -319,6 +324,10 @@ endif
ifdef POOL_DEBUG
POOL_DEBUG_FLAG=--enable-pool-debug=all
+else
+# Map apr_palloc()/apr_pool_{clear,destroy}() to malloc()/free().
+# This also puts poison bytes into freed memory to help detect use after free.
+POOL_DEBUG_FLAG=--enable-pool-debug=yes
endif
# configure apr
@@ -372,7 +381,8 @@ $(APR_ICONV_OBJDIR)/.retrieved: $(DISTDI
$(APR_ICONV_OBJDIR)/.configured: $(APR_ICONV_OBJDIR)/.retrieved \
$(APR_OBJDIR)/.installed
cd $(APR_ICONV_OBJDIR) \
- && env CFLAGS="-g $(PROFILE_CFLAGS)" GREP="`which grep`" \
+ && env CFLAGS="-g $(PROFILE_CFLAGS) -DAPR_POOL_DEBUG" \
+ GREP="`which grep`" \
$(APR_ICONV_SRCDIR)/configure \
--prefix=$(PREFIX)/apr \
--with-apr=$(PREFIX)/apr
@@ -525,7 +535,7 @@ $(APR_UTIL_OBJDIR)/.configured: $(APR_UT
cd $(APR_UTIL_SRCDIR) && ./buildconf --with-apr=$(APR_SRCDIR)
cd $(APR_UTIL_OBJDIR) \
&& env LD_LIBRARY_PATH=$(PREFIX)/bdb/lib \
- CFLAGS="-O0 -g $(PROFILE_CFLAGS)" \
+ CFLAGS="-O0 -g $(PROFILE_CFLAGS) -DAPR_POOL_DEBUG" \
GREP="`which grep`" \
$(APR_UTIL_SRCDIR)/configure \
--prefix=$(PREFIX)/apr \
@@ -575,7 +585,8 @@ $(HTTPD_OBJDIR)/.retrieved: $(DISTDIR)/$
$(HTTPD_OBJDIR)/.configured: $(HTTPD_OBJDIR)/.retrieved \
$(APR_UTIL_OBJDIR)/.installed
cd $(HTTPD_OBJDIR) \
- && env CFLAGS="-g $(PROFILE_CFLAGS)" GREP="`which grep`" \
+ && env CFLAGS="-g $(PROFILE_CFLAGS) -DAPR_POOL_DEBUG" \
+ GREP="`which grep`" \
$(HTTPD_SRCDIR)/configure \
--prefix=$(PREFIX)/httpd \
--enable-maintainer-mode \
@@ -727,7 +738,8 @@ $(SERF_OBJDIR)/.retrieved:
$(SERF_OBJDIR)/.compiled: $(SERF_OBJDIR)/.retrieved \
$(APR_UTIL_OBJDIR)/.installed
cd $(SERF_SRCDIR) && \
- scons DEBUG=1 CFLAGS="-O0 -g $(PROFILE_CFLAGS)" \
+ scons DEBUG=1 \
+ CFLAGS="-O0 -g $(PROFILE_CFLAGS) -DAPR_POOL_DEBUG" \
APR=$(PREFIX)/apr \
APU=$(PREFIX)/apr \
PREFIX=$(PREFIX)/serf
@@ -770,7 +782,7 @@ $(SERF_OLD_OBJDIR)/.retrieved:
$(SERF_OLD_OBJDIR)/.compiled: $(SERF_OLD_OBJDIR)/.retrieved \
$(APR_UTIL_OBJDIR)/.installed
cd $(SERF_OLD_SRCDIR) && \
- env CFLAGS="-O0 -g $(PROFILE_CFLAGS)" \
+ env CFLAGS="-O0 -g $(PROFILE_CFLAGS) -DAPR_POOL_DEBUG" \
./serfmake --with-apr=$(PREFIX)/apr \
--prefix=$(PREFIX)/serf-old \
build
@@ -1231,6 +1243,7 @@ SERF_FLAG=--with-serf="$(PREFIX)/serf"
SERF_LDFLAG=-Wl,-rpath,$(PREFIX)/serf/lib -Wl,-rpath,$(PREFIX)/bdb/lib
MOD_DAV_SVN=modules/svn-$(WC)/mod_dav_svn.so
MOD_AUTHZ_SVN=modules/svn-$(WC)/mod_authz_svn.so
+MOD_DONTDOTHAT=modules/svn-$(WC)/mod_dontdothat.so
LIBMAGIC_FLAG=--with-libmagic=$(PREFIX)/libmagic
NEON_FLAG=--with-neon="$(PREFIX)/neon"
JAVAHL_CHECK_TARGET=check-javahl
@@ -1240,6 +1253,7 @@ SERF_FLAG=--with-serf="$(PREFIX)/serf"
SERF_LDFLAG=-Wl,-rpath,$(PREFIX)/serf/lib -Wl,-rpath,$(PREFIX)/bdb/lib
MOD_DAV_SVN=modules/svn-$(WC)/mod_dav_svn.so
MOD_AUTHZ_SVN=modules/svn-$(WC)/mod_authz_svn.so
+MOD_DONTDOTHAT=modules/svn-$(WC)/mod_dontdothat.so
W_NO_SYSTEM_HEADERS=-Wno-system-headers
NEON_FLAG=--with-neon="$(PREFIX)/neon"
JAVAHL_CHECK_TARGET=check-javahl
@@ -1248,6 +1262,7 @@ BDB_FLAG=$(PREFIX)/bdb
SERF_FLAG=--with-serf="$(PREFIX)/serf-old"
MOD_DAV_SVN=modules/mod_dav_svn.so
MOD_AUTHZ_SVN=modules/mod_authz_svn.so
+MOD_DONTDOTHAT=modules/mod_dontdothat.so
DISABLE_NEON_VERSION_CHECK=--disable-neon-version-check
W_NO_SYSTEM_HEADERS=-Wno-system-headers
NEON_FLAG=--with-neon="$(PREFIX)/neon"
@@ -1260,6 +1275,7 @@ SERF_FLAG=--with-serf="$(PREFIX)/serf"
SERF_LDFLAG=-Wl,-rpath,$(PREFIX)/serf/lib -Wl,-rpath,$(PREFIX)/bdb/lib
MOD_DAV_SVN=modules/svn-$(WC)/mod_dav_svn.so
MOD_AUTHZ_SVN=modules/svn-$(WC)/mod_authz_svn.so
+MOD_DONTDOTHAT=modules/svn-$(WC)/mod_dontdothat.so
LIBMAGIC_FLAG=--with-libmagic=$(PREFIX)/libmagic
JAVAHL_CHECK_TARGET=check-all-javahl
endif
@@ -1290,7 +1306,7 @@ $(SVN_OBJDIR)/.configured: $(SVN_OBJDIR)
cd $(SVN_SRCDIR) && ./autogen.sh
cd $(svn_builddir) && \
env LDFLAGS="-L$(PREFIX)/neon/lib -L$(PREFIX)/apr/lib $(SERF_LDFLAG) -L$(PREFIX)/gettext/lib -L$(PREFIX)/iconv/lib" \
- CFLAGS="-I$(PREFIX)/gettext/include" \
+ CFLAGS="-I$(PREFIX)/gettext/include -DAPR_POOL_DEBUG" \
LD_LIBRARY_PATH="$(LD_LIBRARY_PATH):$$LD_LIBRARY_PATH" \
GREP="`which grep`" \
PATH=$(PREFIX)/ruby/bin:$(PREFIX)/python/bin:$(PREFIX)/gettext/bin:$$PATH \
@@ -1323,7 +1339,7 @@ $(SVN_OBJDIR)/.compiled: $(SVN_OBJDIR)/.
# install svn
$(SVN_OBJDIR)/.installed: $(SVN_OBJDIR)/.compiled
cd $(svn_builddir) \
- && env MAKEFLAGS= make install
+ && env MAKEFLAGS= make install install-tools
touch $@
# SWIG 1.x and 2.x are not compatible. If SWIG 2.x is used to generated .swg
@@ -1378,6 +1394,13 @@ $(SVN_OBJDIR)/.bindings-installed: $(SVN
HTTPD_CHECK_CONF=$(PREFIX)/httpd/conf/httpd-svn-check-$(WC).conf
HTTPD_CHECK_USERS=$(PREFIX)/httpd/conf/httpd-svn-check-users
HTTPD_CHECK_PORT=8081
+MOD_DONTDOTHAT_CONF=$(PREFIX)/httpd/conf/dontdothat
+
+$(MOD_DONTDOTHAT_CONF):
+ mkdir -p $(dir $@)
+ echo > $@.tmp '[recursive-actions]'
+ echo >>$@.tmp '/ = deny'
+ mv -f $@.tmp $@
$(HTTPD_CHECK_USERS):
mkdir -p $(dir $@)
@@ -1385,12 +1408,13 @@ $(HTTPD_CHECK_USERS):
echo >>$@.tmp 'jconstant:xCGl35kV9oWCY'
mv -f $@.tmp $@
-$(HTTPD_CHECK_CONF): $(HTTPD_CHECK_USERS)
+$(HTTPD_CHECK_CONF): $(HTTPD_CHECK_USERS) $(MOD_DONTDOTHAT_CONF)
echo > $@.tmp '# httpd config for make check'
echo >>$@.tmp 'ServerRoot "$(PREFIX)/httpd"'
echo >>$@.tmp 'Listen localhost:$(HTTPD_CHECK_PORT)'
echo >>$@.tmp 'LoadModule dav_svn_module $(MOD_DAV_SVN)'
echo >>$@.tmp 'LoadModule authz_svn_module $(MOD_AUTHZ_SVN)'
+ echo >>$@.tmp 'LoadModule dontdothat_module $(MOD_DONTDOTHAT)'
echo >>$@.tmp 'DocumentRoot "$(PREFIX)/httpd/htdocs"'
echo >>$@.tmp '# These two Locations are used for "make check"'
echo >>$@.tmp '<Directory />'
@@ -1435,12 +1459,27 @@ endif
echo >>$@.tmp ' SVNParentPath /tmp'
echo >>$@.tmp ' Allow from all'
ifeq ($(USE_HTTPV1),yes)
- echo >>$@.tmp ' SVNAdvertiseV2Protocol off'
+ echo >> $@.tmp ' SVNAdvertiseV2Protocol off'
endif
ifeq ($(USE_AUTHZ_SHORT_CIRCUIT),yes)
- echo >>$@.tmp ' SVNPathAuthz short_circuit'
+ echo >> $@.tmp ' SVNPathAuthz short_circuit'
endif
echo >>$@.tmp '</Location>'
+ echo >>$@.tmp '# Location for tests using mod_dontdothat'
+ echo >>$@.tmp '<Location /ddt-test-work/repositories>'
+ echo >> $@.tmp 'DAV svn'
+ echo >> $@.tmp 'SVNParentPath "$(SVN_WC)/subversion/tests/cmdline/svn-test-work/repositories"'
+ echo >> $@.tmp 'AuthzSVNAccessFile "$(SVN_WC)/subversion/tests/cmdline/svn-test-work/authz"'
+ echo >> $@.tmp 'AuthType Basic'
+ echo >> $@.tmp 'AuthName "Subversion Repository"'
+ echo >> $@.tmp 'AuthzSVNAccessFile $(SVN_WC)/subversion/tests/cmdline/svn-test-work/authz'
+ echo >> $@.tmp 'AuthUserFile $(HTTPD_CHECK_USERS)'
+ echo >> $@.tmp 'Require valid-user'
+ifeq ($(USE_HTTPV1),yes)
+ echo >> $@.tmp ' SVNAdvertiseV2Protocol off'
+endif
+ echo >> $@.tmp 'DontDoThatConfigFile "$(MOD_DONTDOTHAT_CONF)"'
+ echo >> $@.tmp '</Location>'
echo >>$@.tmp 'RedirectMatch permanent ^/svn-test-work/repositories/REDIRECT-PERM-(.*)$$ /svn-test-work/repositories/$$1'
echo >>$@.tmp 'RedirectMatch ^/svn-test-work/repositories/REDIRECT-TEMP-(.*)$$ /svn-test-work/repositories/$$1'
echo >>$@.tmp 'Include "conf/$(SVN_REL_WC)*-custom.conf"'
@@ -1510,7 +1549,8 @@ define do_check
test -d "$(RAMDISK)/tmp" && export TMPDIR="$(RAMDISK)/tmp"; \
env LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) $(LIB_PTHREAD_HACK) \
env MAKEFLAGS= make check PARALLEL=$(PARALLEL) CLEANUP=$(CLEANUP) \
- EXCLUSIVE_WC_LOCKS=$(EXCLUSIVE_WC_LOCKS) $1 FS_TYPE=$$fs; \
+ EXCLUSIVE_WC_LOCKS=$(EXCLUSIVE_WC_LOCKS) \
+ MEMCACHED_SERVER=$(MEMCACHED_SERVER) $1 FS_TYPE=$$fs; \
for log in tests.log fails.log; do \
test -f $$log && mv -f $$log $$log.$@-$$fs; \
done; \