Author: brane
Date: Thu Nov 20 05:36:56 2014
New Revision: 1640680

URL: http://svn.apache.org/r1640680
Log:
On the svn-auth-x509 branch: Synced with trunk up to r1640679.

Added:
    subversion/branches/svn-auth-x509/tools/examples/ExampleAuthn.java
      - copied unchanged from r1640679, 
subversion/trunk/tools/examples/ExampleAuthn.java
    subversion/branches/svn-auth-x509/tools/examples/ExampleAuthnOld.java
      - copied unchanged from r1640679, 
subversion/trunk/tools/examples/ExampleAuthnOld.java
    subversion/branches/svn-auth-x509/tools/examples/ExampleAuthnVeryOld.java
      - copied unchanged from r1640679, 
subversion/trunk/tools/examples/ExampleAuthnVeryOld.java
Modified:
    subversion/branches/svn-auth-x509/   (props changed)
    subversion/branches/svn-auth-x509/Makefile.in
    subversion/branches/svn-auth-x509/build/ac-macros/apache.m4
    subversion/branches/svn-auth-x509/build/run_tests.py
    subversion/branches/svn-auth-x509/subversion/include/svn_fs.h
    subversion/branches/svn-auth-x509/subversion/libsvn_fs_fs/cached_data.c
    subversion/branches/svn-auth-x509/subversion/libsvn_fs_fs/fs.c
    subversion/branches/svn-auth-x509/subversion/libsvn_fs_fs/verify.c
    subversion/branches/svn-auth-x509/subversion/libsvn_fs_x/   (props changed)
    subversion/branches/svn-auth-x509/subversion/libsvn_fs_x/cached_data.c
    subversion/branches/svn-auth-x509/subversion/libsvn_subr/stream.c
    subversion/branches/svn-auth-x509/subversion/svnadmin/svnadmin.c
    subversion/branches/svn-auth-x509/subversion/svnfsfs/svnfsfs.c
    subversion/branches/svn-auth-x509/subversion/tests/cmdline/davautocheck.sh
    subversion/branches/svn-auth-x509/subversion/tests/cmdline/svntest/main.py
    
subversion/branches/svn-auth-x509/subversion/tests/templates/greek-fsfs-v6.zip
    
subversion/branches/svn-auth-x509/tools/buildbot/slaves/svn-x64-macosx/mkramdisk.sh
    
subversion/branches/svn-auth-x509/tools/buildbot/slaves/svn-x64-macosx/svncheck.sh

Propchange: subversion/branches/svn-auth-x509/
------------------------------------------------------------------------------
  Merged /subversion/trunk:r1639628-1640679

Modified: subversion/branches/svn-auth-x509/Makefile.in
URL: 
http://svn.apache.org/viewvc/subversion/branches/svn-auth-x509/Makefile.in?rev=1640680&r1=1640679&r2=1640680&view=diff
==============================================================================
--- subversion/branches/svn-auth-x509/Makefile.in (original)
+++ subversion/branches/svn-auth-x509/Makefile.in Thu Nov 20 05:36:56 2014
@@ -370,6 +370,7 @@ INSTALL_EXTRA_SWIG_RB=\
   done
 
 APXS = @APXS@
+HTTPD_VERSION = @HTTPD_VERSION@
 
 PYTHON = @PYTHON@
 PERL = @PERL@
@@ -534,6 +535,9 @@ check: bin @TRANSFORM_LIBTOOL_SCRIPTS@ $
          if test "$(HTTP_LIBRARY)" != ""; then                              \
            flags="--http-library $(HTTP_LIBRARY) $$flags";                  \
          fi;                                                                \
+         if test "$(HTTPD_VERSION)" != ""; then                             \
+            flags="--httpd-version $(HTTPD_VERSION) $$flags";               \
+         fi;                                                                \
          if test "$(SERVER_MINOR_VERSION)" != ""; then                      \
            flags="--server-minor-version $(SERVER_MINOR_VERSION) $$flags";  \
          fi;                                                                \

Modified: subversion/branches/svn-auth-x509/build/ac-macros/apache.m4
URL: 
http://svn.apache.org/viewvc/subversion/branches/svn-auth-x509/build/ac-macros/apache.m4?rev=1640680&r1=1640679&r2=1640680&view=diff
==============================================================================
--- subversion/branches/svn-auth-x509/build/ac-macros/apache.m4 (original)
+++ subversion/branches/svn-auth-x509/build/ac-macros/apache.m4 Thu Nov 20 
05:36:56 2014
@@ -162,6 +162,11 @@ if test -n "$APXS" && test "$APXS" != "n
     BUILD_APACHE_RULE=apache-mod
     INSTALL_APACHE_RULE=install-mods-shared
     INSTALL_APACHE_MODS=true
+    HTTPD="`$APXS -q sbindir`/`$APXS -q PROGNAME`"
+    if ! test -e $HTTPD ; then
+      HTTPD="`$APXS -q bindir`/`$APXS -q PROGNAME`"
+    fi
+    HTTPD_VERSION=["`$HTTPD -v | $SED -e 's@^.*/\([0-9.]*\)\(.*$\)@\1@ ; 1q'`"]
 
     case $host in
       *-*-cygwin*)
@@ -180,6 +185,7 @@ AC_SUBST(APACHE_LDFLAGS)
 AC_SUBST(APACHE_INCLUDES)
 AC_SUBST(APACHE_LIBEXECDIR)
 AC_SUBST(INSTALL_APACHE_MODS)
+AC_SUBST(HTTPD_VERSION)
 
 # there aren't any flags that interest us ...
 #if test -n "$APXS" && test "$APXS" != "no"; then

Modified: subversion/branches/svn-auth-x509/build/run_tests.py
URL: 
http://svn.apache.org/viewvc/subversion/branches/svn-auth-x509/build/run_tests.py?rev=1640680&r1=1640679&r2=1640680&view=diff
==============================================================================
--- subversion/branches/svn-auth-x509/build/run_tests.py (original)
+++ subversion/branches/svn-auth-x509/build/run_tests.py Thu Nov 20 05:36:56 
2014
@@ -29,6 +29,7 @@
             [--fs-type=<fs-type>] [--fsfs-packing] [--fsfs-sharding=<n>]
             [--list] [--milestone-filter=<regex>] [--mode-filter=<type>]
             [--server-minor-version=<version>] [--http-proxy=<host>:<port>]
+            [--httpd-version=<version>]
             [--config-file=<file>] [--ssl-cert=<file>]
             [--exclusive-wc-locks] [--memcached-server=<url:port>]
             <abs_srcdir> <abs_builddir>
@@ -127,7 +128,8 @@ class TestHarness:
                list_tests=None, svn_bin=None, mode_filter=None,
                milestone_filter=None, set_log_level=None, ssl_cert=None,
                http_proxy=None, http_proxy_username=None,
-               http_proxy_password=None, exclusive_wc_locks=None,
+               http_proxy_password=None, httpd_version=None,
+               exclusive_wc_locks=None,
                memcached_server=None, skip_c_tests=None):
     '''Construct a TestHarness instance.
 
@@ -185,6 +187,7 @@ class TestHarness:
     self.http_proxy = http_proxy
     self.http_proxy_username = http_proxy_username
     self.http_proxy_password = http_proxy_password
+    self.httpd_version = httpd_version
     self.exclusive_wc_locks = exclusive_wc_locks
     self.memcached_server = memcached_server
     if not sys.stdout.isatty() or sys.platform == 'win32':
@@ -527,6 +530,8 @@ class TestHarness:
           svntest.main.options.http_proxy_username = self.http_proxy_username
     if self.http_proxy_password is not None:
         svntest.main.options.http_proxy_password = self.http_proxy_password
+    if self.httpd_version is not None:
+        svntest.main.options.httpd_version = self.httpd_version
     if self.exclusive_wc_locks is not None:
       svntest.main.options.exclusive_wc_locks = self.exclusive_wc_locks
     if self.memcached_server is not None:
@@ -700,7 +705,8 @@ def main():
                             'log-to-stdout', 'list', 'milestone-filter=',
                             'mode-filter=', 'set-log-level=', 'ssl-cert=',
                             'http-proxy=', 'http-proxy-username=',
-                            'http-proxy-password=','exclusive-wc-locks',
+                            'http-proxy-password=', 'httpd-version=',
+                            'exclusive-wc-locks',
                             'memcached-server='])
   except getopt.GetoptError:
     args = []
@@ -713,11 +719,11 @@ def main():
     http_library, server_minor_version, fsfs_sharding, fsfs_packing, \
     parallel, config_file, log_to_stdout, list_tests, mode_filter, \
     milestone_filter, set_log_level, ssl_cert, http_proxy, \
-    http_proxy_username, http_proxy_password, exclusive_wc_locks, \
-    memcached_server = \
+    http_proxy_username, http_proxy_password, httpd_version, \
+    exclusive_wc_locks, memcached_server = \
             None, None, None, None, None, None, None, None, None, None, \
             None, None, None, None, None, None, None, None, None, None, \
-            None, None, None
+            None, None, None, None,
   for opt, val in opts:
     if opt in ['-u', '--url']:
       base_url = val
@@ -761,6 +767,8 @@ def main():
       http_proxy_username = val
     elif opt in ['--http-proxy-password']:
       http_proxy_password = val
+    elif opt in ['--httpd-version']:
+      httpd_version = val
     elif opt in ['--exclusive-wc-locks']:
       exclusive_wc_locks = 1
     elif opt in ['--memcached-server']:
@@ -784,6 +792,7 @@ def main():
                    http_proxy=http_proxy,
                    http_proxy_username=http_proxy_username,
                    http_proxy_password=http_proxy_password,
+                   httpd_version=httpd_version,
                    exclusive_wc_locks=exclusive_wc_locks,
                    memcached_server=memcached_server,
                    skip_c_tests=skip_c_tests)

Modified: subversion/branches/svn-auth-x509/subversion/include/svn_fs.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/svn-auth-x509/subversion/include/svn_fs.h?rev=1640680&r1=1640679&r2=1640680&view=diff
==============================================================================
--- subversion/branches/svn-auth-x509/subversion/include/svn_fs.h (original)
+++ subversion/branches/svn-auth-x509/subversion/include/svn_fs.h Thu Nov 20 
05:36:56 2014
@@ -3035,6 +3035,9 @@ typedef struct svn_fs_fsfs_info_t {
    * @note Zero (0) if (but not iff) the format does not support packing. */
   svn_revnum_t min_unpacked_rev;
 
+  /* TRUE if logical addressing is enabled for this repository.
+   * FALSE if repository uses physical addressing. */
+  svn_boolean_t log_addressing;
   /* ### TODO: information about fsfs.conf? rep-cache.db? write locks? */
 
   /* If you add fields here, check whether you need to extend svn_fs_info()

Modified: 
subversion/branches/svn-auth-x509/subversion/libsvn_fs_fs/cached_data.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/svn-auth-x509/subversion/libsvn_fs_fs/cached_data.c?rev=1640680&r1=1640679&r2=1640680&view=diff
==============================================================================
--- subversion/branches/svn-auth-x509/subversion/libsvn_fs_fs/cached_data.c 
(original)
+++ subversion/branches/svn-auth-x509/subversion/libsvn_fs_fs/cached_data.c Thu 
Nov 20 05:36:56 2014
@@ -925,10 +925,20 @@ svn_fs_fs__check_rep(representation_t *r
     {
       apr_off_t offset;
       svn_fs_fs__p2l_entry_t *entry;
+      svn_fs_fs__revision_file_t *rev_file = NULL;
 
-      svn_fs_fs__revision_file_t *rev_file;
-      SVN_ERR(svn_fs_fs__open_pack_or_rev_file(&rev_file, fs, rep->revision,
-                                               scratch_pool, scratch_pool));
+      /* Reuse the revision file provided by *HINT, if it is given and
+       * actually the rev / pack file that we want. */
+      svn_revnum_t start_rev = svn_fs_fs__packed_base_rev(fs, rep->revision);
+      if (hint)
+        rev_file = *(svn_fs_fs__revision_file_t **)hint;
+
+      if (rev_file == NULL || rev_file->start_revision != start_rev)
+        SVN_ERR(svn_fs_fs__open_pack_or_rev_file(&rev_file, fs, rep->revision,
+                                                 scratch_pool, scratch_pool));
+
+      if (hint)
+        *hint = rev_file;
 
       /* This will auto-retry if there was a background pack. */
       SVN_ERR(svn_fs_fs__item_offset(&offset, fs, rev_file, rep->revision,
@@ -951,8 +961,6 @@ svn_fs_fs__check_rep(representation_t *r
                                               "%" APR_UINT64_T_FMT,
                                               rep->item_index),
                                  rep->revision);
-
-      SVN_ERR(svn_fs_fs__close_revision_file(rev_file));
     }
   else
     {

Modified: subversion/branches/svn-auth-x509/subversion/libsvn_fs_fs/fs.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/svn-auth-x509/subversion/libsvn_fs_fs/fs.c?rev=1640680&r1=1640679&r2=1640680&view=diff
==============================================================================
--- subversion/branches/svn-auth-x509/subversion/libsvn_fs_fs/fs.c (original)
+++ subversion/branches/svn-auth-x509/subversion/libsvn_fs_fs/fs.c Thu Nov 20 
05:36:56 2014
@@ -214,6 +214,7 @@ fs_info(const void **fsfs_info,
   info->fs_type = SVN_FS_TYPE_FSFS;
   info->shard_size = ffd->max_files_per_dir;
   info->min_unpacked_rev = ffd->min_unpacked_rev;
+  info->log_addressing = ffd->use_log_addressing;
   *fsfs_info = info;
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/svn-auth-x509/subversion/libsvn_fs_fs/verify.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/svn-auth-x509/subversion/libsvn_fs_fs/verify.c?rev=1640680&r1=1640679&r2=1640680&view=diff
==============================================================================
--- subversion/branches/svn-auth-x509/subversion/libsvn_fs_fs/verify.c 
(original)
+++ subversion/branches/svn-auth-x509/subversion/libsvn_fs_fs/verify.c Thu Nov 
20 05:36:56 2014
@@ -22,6 +22,7 @@
 
 #include "svn_sorts.h"
 #include "svn_checksum.h"
+#include "svn_time.h"
 #include "private/svn_subr_private.h"
 
 #include "verify.h"
@@ -702,6 +703,49 @@ compare_p2l_to_rev(svn_fs_t *fs,
   return SVN_NO_ERROR;
 }
 
+/* Verify that the revprops of the revisions START to END in FS can be
+ * accessed.  Invoke CANCEL_FUNC with CANCEL_BATON at regular intervals.
+ *
+ * The values of START and END have already been auto-selected and
+ * verified.
+ */
+static svn_error_t *
+verify_revprops(svn_fs_t *fs,
+                svn_revnum_t start,
+                svn_revnum_t end,
+                svn_cancel_func_t cancel_func,
+                void *cancel_baton,
+                apr_pool_t *pool)
+{
+  svn_revnum_t revision;
+  apr_pool_t *iterpool = svn_pool_create(pool);
+
+  for (revision = start; revision < end; ++revision)
+    {
+      svn_string_t *date;
+      apr_time_t timetemp;
+
+      svn_pool_clear(iterpool);
+
+      /* Access the svn:date revprop.
+       * This implies parsing all revprops for that revision. */
+      SVN_ERR(svn_fs_fs__revision_prop(&date, fs, revision,
+                                       SVN_PROP_REVISION_DATE, iterpool));
+
+      /* The time stamp is the only revprop that, if given, needs to
+       * have a valid content. */
+      if (date)
+        SVN_ERR(svn_time_from_cstring(&timetemp, date->data, iterpool));
+
+      if (cancel_func)
+        SVN_ERR(cancel_func(cancel_baton));
+    }
+
+  svn_pool_destroy(iterpool);
+
+  return SVN_NO_ERROR;
+}
+
 static svn_revnum_t
 pack_size(svn_fs_t *fs, svn_revnum_t rev)
 {
@@ -710,22 +754,24 @@ pack_size(svn_fs_t *fs, svn_revnum_t rev
   return rev < ffd->min_unpacked_rev ? ffd->max_files_per_dir : 1;
 }
 
-/* Verify that the log-to-phys indexes and phys-to-log indexes are
- * consistent with each other.  The function signature is similar to
- * svn_fs_fs__verify.
+/* Verify that on-disk representation has not been tempered with (in a way
+ * that leaves the repository in a corrupted state).  This compares log-to-
+ * phys with phys-to-log indexes, verifies the low-level checksums and
+ * checks that all revprops are available.  The function signature is
+ * similar to svn_fs_fs__verify.
  *
  * The values of START and END have already been auto-selected and
  * verified.  You may call this for format7 or higher repos.
  */
 static svn_error_t *
-verify_index_consistency(svn_fs_t *fs,
-                         svn_revnum_t start,
-                         svn_revnum_t end,
-                         svn_fs_progress_notify_func_t notify_func,
-                         void *notify_baton,
-                         svn_cancel_func_t cancel_func,
-                         void *cancel_baton,
-                         apr_pool_t *pool)
+verify_f7_metadata_consistency(svn_fs_t *fs,
+                               svn_revnum_t start,
+                               svn_revnum_t end,
+                               svn_fs_progress_notify_func_t notify_func,
+                               void *notify_baton,
+                               svn_cancel_func_t cancel_func,
+                               void *cancel_baton,
+                               apr_pool_t *pool)
 {
   fs_fs_data_t *ffd = fs->fsap_data;
   svn_revnum_t revision, next_revision;
@@ -761,6 +807,11 @@ verify_index_consistency(svn_fs_t *fs,
         err = compare_p2l_to_rev(fs, pack_start, pack_end - pack_start,
                                  cancel_func, cancel_baton, iterpool);
 
+      /* ensure that revprops are available and accessible */
+      if (!err)
+        err = verify_revprops(fs, pack_start, pack_end,
+                              cancel_func, cancel_baton, iterpool);
+
       /* concurrent packing is one of the reasons why verification may fail.
          Make sure, we operate on up-to-date information. */
       if (err)
@@ -812,10 +863,9 @@ svn_fs_fs__verify(svn_fs_t *fs,
   /* log/phys index consistency.  We need to check them first to make
      sure we can access the rev / pack files in format7. */
   if (svn_fs_fs__use_log_addressing(fs))
-    SVN_ERR(verify_index_consistency(fs,
-                                     start,
-                                     end, notify_func, notify_baton,
-                                     cancel_func, cancel_baton, pool));
+    SVN_ERR(verify_f7_metadata_consistency(fs, start, end,
+                                           notify_func, notify_baton,
+                                           cancel_func, cancel_baton, pool));
 
   /* rep cache consistency */
   if (ffd->format >= SVN_FS_FS__MIN_REP_SHARING_FORMAT)

Propchange: subversion/branches/svn-auth-x509/subversion/libsvn_fs_x/
------------------------------------------------------------------------------
  Merged /subversion/trunk/subversion/libsvn_fs_x:r1639628-1640679

Modified: subversion/branches/svn-auth-x509/subversion/libsvn_fs_x/cached_data.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/svn-auth-x509/subversion/libsvn_fs_x/cached_data.c?rev=1640680&r1=1640679&r2=1640680&view=diff
==============================================================================
--- subversion/branches/svn-auth-x509/subversion/libsvn_fs_x/cached_data.c 
(original)
+++ subversion/branches/svn-auth-x509/subversion/libsvn_fs_x/cached_data.c Thu 
Nov 20 05:36:56 2014
@@ -684,7 +684,6 @@ create_rep_state_body(rep_state_t **rep_
     {
       /* we will need the on-disk location for non-txn reps */
       apr_off_t offset;
-      apr_uint32_t sub_item;
       svn_boolean_t in_container = TRUE;
 
       /* ensure file is open and navigate to the start of rep header */
@@ -693,7 +692,6 @@ create_rep_state_body(rep_state_t **rep_
           /* ... we can re-use the same, already open file object.
            * This implies that we don't read from a txn.
            */
-          SVN_ERR_ASSERT(sub_item == 0);
           rs->sfile = *shared_file;
           SVN_ERR(auto_open_shared_file(rs->sfile));
         }
@@ -708,6 +706,8 @@ create_rep_state_body(rep_state_t **rep_
 
       if (SVN_IS_VALID_REVNUM(revision))
         {
+          apr_uint32_t sub_item;
+
           SVN_ERR(svn_fs_x__item_offset(&offset, &sub_item, fs,
                                         rs->sfile->rfile, &rep->id,
                                         scratch_pool));

Modified: subversion/branches/svn-auth-x509/subversion/libsvn_subr/stream.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/svn-auth-x509/subversion/libsvn_subr/stream.c?rev=1640680&r1=1640679&r2=1640680&view=diff
==============================================================================
--- subversion/branches/svn-auth-x509/subversion/libsvn_subr/stream.c (original)
+++ subversion/branches/svn-auth-x509/subversion/libsvn_subr/stream.c Thu Nov 
20 05:36:56 2014
@@ -78,17 +78,8 @@ svn_stream_create(void *baton, apr_pool_
 {
   svn_stream_t *stream;
 
-  stream = apr_palloc(pool, sizeof(*stream));
+  stream = apr_pcalloc(pool, sizeof(*stream));
   stream->baton = baton;
-  stream->read_fn = NULL;
-  stream->skip_fn = NULL;
-  stream->write_fn = NULL;
-  stream->close_fn = NULL;
-  stream->mark_fn = NULL;
-  stream->seek_fn = NULL;
-  stream->data_available_fn = NULL;
-  stream->is_buffered_fn = NULL;
-  stream->file = NULL;
   return stream;
 }
 

Modified: subversion/branches/svn-auth-x509/subversion/svnadmin/svnadmin.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/svn-auth-x509/subversion/svnadmin/svnadmin.c?rev=1640680&r1=1640679&r2=1640680&view=diff
==============================================================================
--- subversion/branches/svn-auth-x509/subversion/svnadmin/svnadmin.c (original)
+++ subversion/branches/svn-auth-x509/subversion/svnadmin/svnadmin.c Thu Nov 20 
05:36:56 2014
@@ -2027,6 +2027,11 @@ subcommand_info(apr_getopt_t *os, void *
             SVN_ERR(svn_cmdline_printf(pool, _("FSFS Shards Packed: 
%ld/%ld\n"),
                                        shards_packed, shards_full));
           }
+
+        if (fsfs_info->log_addressing)
+          SVN_ERR(svn_cmdline_printf(pool, _("FSFS Logical Addressing: 
yes\n")));
+        else
+          SVN_ERR(svn_cmdline_printf(pool, _("FSFS Logical Addressing: 
no\n")));
       }
   }
 

Modified: subversion/branches/svn-auth-x509/subversion/svnfsfs/svnfsfs.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/svn-auth-x509/subversion/svnfsfs/svnfsfs.c?rev=1640680&r1=1640679&r2=1640680&view=diff
==============================================================================
--- subversion/branches/svn-auth-x509/subversion/svnfsfs/svnfsfs.c (original)
+++ subversion/branches/svn-auth-x509/subversion/svnfsfs/svnfsfs.c Thu Nov 20 
05:36:56 2014
@@ -479,7 +479,7 @@ sub_main(int *exit_code, int argc, const
   apr_signal(SIGXFSZ, SIG_IGN);
 #endif
 
-  /* Configure FSFS caches for maximum efficiency with svnadmin.
+  /* Configure FSFS caches for maximum efficiency with svnfsfs.
    * Also, apply the respective command line parameters, if given. */
   {
     svn_cache_config_t settings = *svn_cache_config_get();
@@ -500,7 +500,7 @@ sub_main(int *exit_code, int argc, const
           || err->apr_err == SVN_ERR_CL_ARG_PARSING_ERROR)
         {
           err = svn_error_quick_wrap(err,
-                                     _("Try 'svnadmin help' for more info"));
+                                     _("Try 'svnfsfs help' for more info"));
         }
       return err;
     }
@@ -516,7 +516,7 @@ main(int argc, const char *argv[])
   svn_error_t *err;
 
   /* Initialize the app. */
-  if (svn_cmdline_init("svnadmin", stderr) != EXIT_SUCCESS)
+  if (svn_cmdline_init("svnfsfs", stderr) != EXIT_SUCCESS)
     return EXIT_FAILURE;
 
   /* Create our top-level pool.  Use a separate mutexless allocator,

Modified: 
subversion/branches/svn-auth-x509/subversion/tests/cmdline/davautocheck.sh
URL: 
http://svn.apache.org/viewvc/subversion/branches/svn-auth-x509/subversion/tests/cmdline/davautocheck.sh?rev=1640680&r1=1640679&r2=1640680&view=diff
==============================================================================
--- subversion/branches/svn-auth-x509/subversion/tests/cmdline/davautocheck.sh 
(original)
+++ subversion/branches/svn-auth-x509/subversion/tests/cmdline/davautocheck.sh 
Thu Nov 20 05:36:56 2014
@@ -264,11 +264,6 @@ HTTPD=$(get_prog_name $httpd) || fail "H
 "$HTTPD" -v 1>/dev/null 2>&1 \
   || fail "HTTPD '$HTTPD' doesn't start properly"
 
-SVNTEST_HTTPD_VERSION="`$HTTPD -v | head -1 | sed -e 
's@^.*/\([0-9.]*\).*$@\1@'`"
-
-say "Using '$HTTPD', version $SVNTEST_HTTPD_VERSION..."
-export SVNTEST_HTTPD_VERSION
-
 HTPASSWD=$(get_prog_name htpasswd htpasswd2) \
   || fail "Could not find htpasswd or htpasswd2"
 [ -x $HTPASSWD ] \

Modified: 
subversion/branches/svn-auth-x509/subversion/tests/cmdline/svntest/main.py
URL: 
http://svn.apache.org/viewvc/subversion/branches/svn-auth-x509/subversion/tests/cmdline/svntest/main.py?rev=1640680&r1=1640679&r2=1640680&view=diff
==============================================================================
--- subversion/branches/svn-auth-x509/subversion/tests/cmdline/svntest/main.py 
(original)
+++ subversion/branches/svn-auth-x509/subversion/tests/cmdline/svntest/main.py 
Thu Nov 20 05:36:56 2014
@@ -908,68 +908,10 @@ def file_substitute(path, contents, new_
   fcontent = open(path, 'r').read().replace(contents, new_contents)
   open(path, 'w').write(fcontent)
 
-def _unpack_precooked_repos(path, template):
-  testdir = os.path.dirname(os.path.abspath(os.path.dirname(__file__)))
-  repozip = os.path.join(os.path.dirname(testdir), "templates", template)
-  zipfile.ZipFile(repozip, 'r').extractall(path)
-
-# For creating new, pre-cooked greek repositories
-def unpack_greek_repos(path):
-  template = "greek-fsfs-v%d.zip" % options.fsfs_version
-  _unpack_precooked_repos(path, template)
-
-# For creating blank new repositories
-def create_repos(path, minor_version = None):
-  """Create a brand-new SVN repository at PATH.  If PATH does not yet
-  exist, create it."""
-
-  if not os.path.exists(path):
-    os.makedirs(path) # this creates all the intermediate dirs, if necessary
-
-  if options.fsfs_version is None:
-    if options.fs_type == "bdb":
-      opts = ("--bdb-txn-nosync",)
-    else:
-      opts = ()
-    if minor_version is None or minor_version > options.server_minor_version:
-      minor_version = options.server_minor_version
-    opts += ("--compatible-version=1.%d" % (minor_version),)
-    if options.fs_type is not None:
-      opts += ("--fs-type=" + options.fs_type,)
-    exit_code, stdout, stderr = run_command(svnadmin_binary, 1, False,
-                                            "create", path, *opts)
-  else:
-    # Copy a pre-cooked FSFS repository
-    assert options.fs_type == "fsfs"
-    template = "empty-fsfs-v%d.zip" % options.fsfs_version
-    _unpack_precooked_repos(path, template)
-    exit_code, stdout, stderr = run_command(svnadmin_binary, 1, False,
-                                            "setuuid", path)
-
-  # Skip tests if we can't create the repository.
-  if stderr:
-    stderr_lines = 0
-    not_using_fsfs_backend = (options.fs_type != "fsfs")
-    backend_deprecation_warning = False
-    for line in stderr:
-      stderr_lines += 1
-      if line.find('Unknown FS type') != -1:
-        raise Skip
-      if not_using_fsfs_backend:
-        if 0 < line.find('repository back-end is deprecated, consider using'):
-          backend_deprecation_warning = True
-
-    # Creating BDB repositories will cause svnadmin to print a warning
-    # which should be ignored.
-    if (stderr_lines == 1
-        and not_using_fsfs_backend
-        and backend_deprecation_warning):
-      pass
-    else:
-      # If the FS type is known and we noticed more than just the
-      # BDB-specific warning, assume the repos couldn't be created
-      # (e.g. due to a missing 'svnadmin' binary).
-      raise SVNRepositoryCreateFailure("".join(stderr).rstrip())
+# For setting up authz and hooks in existing repos
+def _post_create_repos(path, minor_version = None):
+  """Set default access right configurations for svnserve and mod_dav
+  as well as hooks etc. in the SVN repository at PATH."""
 
   # Require authentication to write to the repos, for ra_svn testing.
   file_write(get_svnserve_conf_file_path(path),
@@ -1039,6 +981,73 @@ def create_repos(path, minor_version = N
   # make the repos world-writeable, for mod_dav_svn's sake.
   chmod_tree(path, 0666, 0666)
 
+def _unpack_precooked_repos(path, template):
+  testdir = os.path.dirname(os.path.abspath(os.path.dirname(__file__)))
+  repozip = os.path.join(os.path.dirname(testdir), "templates", template)
+  zipfile.ZipFile(repozip, 'r').extractall(path)
+
+# For creating new, pre-cooked greek repositories
+def unpack_greek_repos(path):
+  template = "greek-fsfs-v%d.zip" % options.fsfs_version
+  _unpack_precooked_repos(path, template)
+  _post_create_repos(path, options.server_minor_version)
+
+# For creating blank new repositories
+def create_repos(path, minor_version = None):
+  """Create a brand-new SVN repository at PATH.  If PATH does not yet
+  exist, create it."""
+
+  if not os.path.exists(path):
+    os.makedirs(path) # this creates all the intermediate dirs, if necessary
+
+  if options.fsfs_version is None:
+    if options.fs_type == "bdb":
+      opts = ("--bdb-txn-nosync",)
+    else:
+      opts = ()
+    if minor_version is None or minor_version > options.server_minor_version:
+      minor_version = options.server_minor_version
+    opts += ("--compatible-version=1.%d" % (minor_version),)
+    if options.fs_type is not None:
+      opts += ("--fs-type=" + options.fs_type,)
+    exit_code, stdout, stderr = run_command(svnadmin_binary, 1, False,
+                                            "create", path, *opts)
+  else:
+    # Copy a pre-cooked FSFS repository
+    assert options.fs_type == "fsfs"
+    template = "empty-fsfs-v%d.zip" % options.fsfs_version
+    _unpack_precooked_repos(path, template)
+    exit_code, stdout, stderr = run_command(svnadmin_binary, 1, False,
+                                            "setuuid", path)
+
+  # Skip tests if we can't create the repository.
+  if stderr:
+    stderr_lines = 0
+    not_using_fsfs_backend = (options.fs_type != "fsfs")
+    backend_deprecation_warning = False
+    for line in stderr:
+      stderr_lines += 1
+      if line.find('Unknown FS type') != -1:
+        raise Skip
+      if not_using_fsfs_backend:
+        if 0 < line.find('repository back-end is deprecated, consider using'):
+          backend_deprecation_warning = True
+
+    # Creating BDB repositories will cause svnadmin to print a warning
+    # which should be ignored.
+    if (stderr_lines == 1
+        and not_using_fsfs_backend
+        and backend_deprecation_warning):
+      pass
+    else:
+      # If the FS type is known and we noticed more than just the
+      # BDB-specific warning, assume the repos couldn't be created
+      # (e.g. due to a missing 'svnadmin' binary).
+      raise SVNRepositoryCreateFailure("".join(stderr).rstrip())
+
+  # Configure the new repository.
+  _post_create_repos(path, minor_version)
+
 # For copying a repository
 def copy_repos(src_path, dst_path, head_revision, ignore_uuid = 1,
                minor_version = None):
@@ -1473,8 +1482,7 @@ __mod_dav_url_quoting_broken_versions = 
 ])
 def is_mod_dav_url_quoting_broken():
     if is_ra_type_dav():
-        httpd_version = os.environ.get('SVNTEST_HTTPD_VERSION')
-        return (httpd_version in __mod_dav_url_quoting_broken_versions)
+        return (options.httpd_version in __mod_dav_url_quoting_broken_versions)
     return None
 
 ######################################################################
@@ -1538,6 +1546,8 @@ class TestSpawningThread(threading.Threa
       args.append('--http-proxy-username=' + options.http_proxy_username)
     if options.http_proxy_password:
       args.append('--http-proxy-password=' + options.http_proxy_password)
+    if options.httpd_version:
+      args.append('--httpd-version=' + options.httpd_version)
     if options.exclusive_wc_locks:
       args.append('--exclusive-wc-locks')
     if options.memcached_server:
@@ -1899,6 +1909,8 @@ def _create_parser():
                     help='Username for the HTTP Proxy.')
   parser.add_option('--http-proxy-password', action='store',
                     help='Password for the HTTP Proxy.')
+  parser.add_option('--httpd-version', action='store',
+                    help='Assume HTTPD is this version.')
   parser.add_option('--tools-bin', action='store', dest='tools_bin',
                     help='Use the svn tools installed in this path')
   parser.add_option('--exclusive-wc-locks', action='store_true',

Modified: 
subversion/branches/svn-auth-x509/subversion/tests/templates/greek-fsfs-v6.zip
URL: 
http://svn.apache.org/viewvc/subversion/branches/svn-auth-x509/subversion/tests/templates/greek-fsfs-v6.zip?rev=1640680&r1=1640679&r2=1640680&view=diff
==============================================================================
Binary files - no diff available.

Modified: 
subversion/branches/svn-auth-x509/tools/buildbot/slaves/svn-x64-macosx/mkramdisk.sh
URL: 
http://svn.apache.org/viewvc/subversion/branches/svn-auth-x509/tools/buildbot/slaves/svn-x64-macosx/mkramdisk.sh?rev=1640680&r1=1640679&r2=1640680&view=diff
==============================================================================
--- 
subversion/branches/svn-auth-x509/tools/buildbot/slaves/svn-x64-macosx/mkramdisk.sh
 (original)
+++ 
subversion/branches/svn-auth-x509/tools/buildbot/slaves/svn-x64-macosx/mkramdisk.sh
 Thu Nov 20 05:36:56 2014
@@ -30,7 +30,7 @@ mount | fgrep "on ${volume} " >/dev/null
     set -e
     # Make sure we strip trailing spaces from the result of older
     # versions of hduitil.
-    device=$(echo $(hdiutil attach -nomount ram://1000000))
+    device=$(echo $(hdiutil attach -nomount ram://900000))
     newfs_hfs -M 0700 -v "$1" "${device}"
     hdiutil mountvol "${device}"
 }

Modified: 
subversion/branches/svn-auth-x509/tools/buildbot/slaves/svn-x64-macosx/svncheck.sh
URL: 
http://svn.apache.org/viewvc/subversion/branches/svn-auth-x509/tools/buildbot/slaves/svn-x64-macosx/svncheck.sh?rev=1640680&r1=1640679&r2=1640680&view=diff
==============================================================================
--- 
subversion/branches/svn-auth-x509/tools/buildbot/slaves/svn-x64-macosx/svncheck.sh
 (original)
+++ 
subversion/branches/svn-auth-x509/tools/buildbot/slaves/svn-x64-macosx/svncheck.sh
 Thu Nov 20 05:36:56 2014
@@ -38,6 +38,10 @@ run_tests() {
     test -f tests.log && mv tests.log 
"${abssrc}/.test-logs/tests-${ra}-${fs}.log"
     test -f fails.log && mv fails.log 
"${abssrc}/.test-logs/fails-${ra}-${fs}.log"
 
+    # Remove the test working directory to make space on the RAM disk
+    # for more tests.
+    rm -fr subversion/tests/cmdline/svn-test-work
+
     ${ok} || exit 1
 }
 
@@ -75,7 +79,7 @@ while [ ! -z "$1" ]; do
         dav)     check_dav=true;;
         fsfs)    check_fsfs=true;;
         fsfs-v6) check_fsfs_v6=true;;
-        fsfs-v4) check_fsfs_v6=true;;
+        fsfs-v4) check_fsfs_v4=true;;
         fsx)     check_fsx=true;;
         bdb)     check_bdb=true;;
         *)       exit 1;;


Reply via email to