]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - contrib/subversion/INSTALL
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / contrib / subversion / INSTALL
1                ======================================
2                       INSTALLING SUBVERSION
3                           A Quick Guide
4                ======================================
5
6 $LastChangedDate: 2013-06-05 04:00:25 +0000 (Wed, 05 Jun 2013) $
7
8
9 Contents:
10
11      I. INTRODUCTION
12        A. Audience
13        B. Dependency Overview
14        C. Dependencies in Detail
15        D. Documentation
16
17     II. INSTALLATION
18        A. Building from a Tarball or RPM
19        B. Building the Latest Source under Unix
20        C. Building under Unix in Different Directories
21        D. Installing from a Zip or Installer File under Windows
22        E. Building the Latest Source under Windows
23
24    III. BUILDING A SUBVERSION SERVER
25        A. Setting Up Apache
26        B. Making and Installing the Subversion Server
27        C. Configuring Apache for Subversion
28        D. Running and Testing
29        E. Alternative:  'svnserve' and ra_svn
30
31     IV. PLATFORM-SPECIFIC ISSUES
32        A. Windows XP
33        B. Mac OS X
34
35      V. PROGRAMMING LANGUAGE BINDINGS (PYTHON, PERL, RUBY, JAVA)
36
37
38 \f
39 I.    INTRODUCTION
40       ============
41
42   A. Audience
43
44       This document is written for people who intend to build
45       Subversion from source code.  Normally, the only people who do
46       this are Subversion developers and package maintainers.
47
48       If neither of these labels fits you, we recommend you find an
49       appropriate binary package of Subversion and install that.
50       While the Subversion project doesn't officially release binary
51       packages, a number of volunteers have made such packages
52       available for different operating systems.  Most Linux and BSD
53       distributions already have Subversion packages ready to go via
54       standard packaging channels, and other volunteers have built
55       'installers' for both Windows and OS X.  Visit this page for
56       package links:
57
58          http://subversion.apache.org/packages.html
59
60       For those of you who still wish to build from source, Subversion
61       follows the Unix convention of "./configure && make", but it has
62       a number of dependencies.
63
64
65   B. Dependency Overview
66
67       You'll need the following build tools to compile Subversion:
68
69       * autoconf 2.59 or later (Unix only)
70       * libtool 1.4 or later (Unix only)
71       * a reasonable C compiler (gcc, Visual Studio, etc.)
72
73
74       Subversion also depends on the following third-party libraries:
75
76       * libapr and libapr-util (REQUIRED for client and server)
77
78          The Apache Portable Runtime (APR) library provides an
79          abstraction of operating-system level services such as file
80          and network I/O, memory management, and so on.  It also
81          provides convenience routines for things like hashtables,
82          checksums, and argument processing.  While it was originally
83          developed for the Apache HTTP server, APR is a standalone
84          library used by Subversion and other products.  It is a
85          critical dependency for all of Subversion; it's the layer
86          that allows Subversion clients and servers to run on
87          different operating systems.
88
89       * SQLite  (REQUIRED for client and server)
90
91          Subversion uses SQLite to manage some internal databases.
92
93       * libz  (REQUIRED for client and server)
94
95          Subversion uses zlib for compressing binary differences.
96          These diff streams are used everywhere -- over the network,
97          in the repository, and in the client's working copy.
98
99       * libserf  (OPTIONAL for client)
100
101          The Serf library allows the Subversion client to send HTTP
102          requests.  This is necessary if you want your client to access
103          a repository served by the Apache HTTP server.  There is an
104          alternate 'svnserve' server as well, though, and clients
105          automatically know how to speak the svnserve protocol.
106          Thus it's not strictly necessary for your client to be able
107          to speak HTTP... though we still recommend that your client
108          be built to speak both HTTP and svnserve protocols.
109
110       * OpenSSL (OPTIONAL for client and server)
111
112          OpenSSL enables your client to access SSL-encrypted https://
113          URLs (using libserf) in addition to unencrypted http:// URLs.
114          To use SSL with Subversion's WebDAV server, Apache needs to be
115          compiled with OpenSSL as well.
116
117       * Berkeley DB (OPTIONAL for client and server)
118
119          There are two different repository 'back-end'
120          implementations.  One implementation stores data in a flat
121          filesystem (known as FSFS); the other implementation stores
122          data in a Berkeley DB database (known as BDB).  When you
123          create a repository, you have the option of specifying a
124          storage back-end.  The Berkeley DB back-end will only be
125          available if the BDB libraries are discovered at compile
126          time.
127
128       * libsasl (OPTIONAL for client and server)
129
130          If the Cyrus SASL library is detected at compile time, then
131          the svn client (and svnserve server) will be able to utilize
132          SASL to do various forms of authentication when speaking the
133          svnserve protocol.
134
135       * Python, Perl, Java, Ruby  (OPTIONAL)
136
137          Subversion is mostly a collection of C libraries with
138          well-defined APIs, with a small collection of programs that
139          use the APIs.  If you want to build Subversion API bindings
140          for other languages, you need to have those languages
141          available at build time.
142
143       * KDELibs, GNOME Keyring  (OPTIONAL for client)
144
145          Subversion contains optional support for storing passwords in
146          KWallet (KDE 4) or GNOME Keyring.
147
148       * libmagic
149
150          If the libmagic library is detected at compile time,
151          it will be used to determine mime-types of binary files
152          which are added to version control. Note that mime-types
153          configured via auto-props or the mime-types-file option
154          take precedence.
155
156   C. Dependencies in Detail
157
158       Subversion depends on a number of third party tools and libraries.
159       Some of them are only required to run a Subversion server; others
160       are necessary just for a Subversion client.  This section explains
161       what other tools and libraries will be required so that Subversion
162       can be built with the set of features you want.
163
164       On Unix systems, the './configure' script will tell you if you are
165       missing the correct version of any of the required libraries or
166       tools, so if you are in a real hurry to get building, you can skip
167       straight to section II.  If you want to gather the pieces you will
168       need before starting out, however, you should read the following.
169
170       If you're just installing a Subversion client, the Subversion
171       team has created a script that downloads the minimal prerequisite
172       libraries (Apache Portable Runtime, Sqlite, and Zlib).  The script,
173       'get-deps.sh', is available in the same directory as this file.
174       When run, it will place 'apr', 'apr-util', 'serf', 'zlib', and
175       'sqlite-amalgamation' directories directly into your unpacked Subversion
176       distribution.  With the exception of sqlite-amalgamation, they will
177       still need to be configured, built and installed explicitly, and
178       Subversion's own configure script may need to be told where to find
179       them, if they were not installed in standard system locations.
180
181       Note: there are optional dependencies (such as openssl, swig, and httpd)
182       which get-deps.sh does not download.
183
184       Note: Because previous builds of Subversion may have installed older
185       versions of these libraries, you may want to run some of the cleanup
186       commands described in section II.B before installing the following.
187
188
189       1.  Apache Portable Runtime 0.9.7 or 1.X.X  (REQUIRED)
190
191       Whenever you want to build any part of Subversion, you need the
192       Apache Portable Runtime (APR) and the APR Utility (APR-util)
193       libraries.
194
195
196         ****************************************************************
197         **       IMPORTANT ISSUE ABOUT APR VERSIONS:  READ THIS.      **
198         **                                                            **
199         ****************************************************************
200         |                                                              |
201         | APR 0.9.X and 1.X are binary-incompatible.                   |
202         |                                                              |
203         | This means:                                                  |
204         |                                                              |
205         |   - if you are already using Subversion with APR 0.9.X, and  |
206         |     then upgrade your libapr to 1.X without rebuilding       |
207         |     Subversion, things will break and segfault.              |
208         |                                                              |
209         |   - if your Subversion server libraries are linked to one    |
210         |     version of APR, but your Apache server is linked to a    |
211         |     different version, things will break and segfault.       |
212         |                                                              |
213         | Subversion distribution dependencies:                        |
214         | -------------------------------------                        |
215         |                                                              |
216         | For a long time, Subversion's main distribution contained    |
217         | APR and APR-UTIL (both 0.9.x), plus a few other things that  |
218         | we couldn't count on the installation system having.  But    |
219         | nowadays, Subversion's requirements are no longer exotic,    |
220         | and so our main distribution contains just the Subversion    |
221         | source code itself -- people compiling Subversion are        |
222         | expected to either have the APR libraries already installed  |
223         | on their system, or to be capable of fetching them easily.   |
224         |                                                              |
225         | Note that it's *perfectly* safe to use APR 1.X from the      |
226         | beginning.  In fact, we recommend it.  If you're building    |
227         | Subversion for the first time, there's no compatibility      |
228         | issue to worry about, so grab the latest version of APR.     |
229         |                                                              |
230         | If you already have a Subversion installation using APR      |
231         | 0.9.x, it's still possible to move to APR 1.X safely.  Just  |
232         | be sure to recompile Subversion (and Apache httpd if         |
233         | necessary) after upgrading APR!                              |
234         |______________________________________________________________|
235
236
237       If you do not have a pre-installed APR and APR-util, you will need
238       to get these yourself:
239
240           http://apr.apache.org/download.cgi
241
242       On Unix systems, if you already have the APR libraries compiled and do
243       not wish to regenerate them from source code, then Subversion needs to
244       be able to find them.
245
246       There are a couple of options to "./configure" that tell it where
247       to look for the APR and APR-util libraries. By default it will try
248       to locate the libraries using apr-config and apu-config scripts.
249       These scripts provide all the relevant information for the APR and
250       APR-util installations.
251
252       If you want to specify the location of the APR library, you can use
253       the "--with-apr=" option of "./configure". It should be able to find
254       the apr-config script in the standard location under that directory
255       (e.g. ${prefix}/bin).
256
257       Similarly, you can specify the location of APR-util using the
258       "--with-apr-util=" option to "./configure". It will look for the
259       apu-config script relative to that directory.
260
261       For example, if you want to use the APR libraries you built
262       with the Apache httpd server, you could run:
263
264           $ ./configure --with-apr=/usr/local/apache2 \
265             --with-apr-util=/usr/local/apache2  ...
266
267       Be sure to use a native Windows SVN client (as opposed to
268       Cygwin's version) so that the .dsp files get carriage-returns at
269       the ends of their lines.  Otherwise Visual Studio will complain
270       that it doesn't recognize the .dsp files.
271
272       If you use APR libraries checked out from svn in an Unix
273       environment, you need to run the 'buildconf' script in each
274       library's directory, to regenerate the configure scripts and
275       other files required for compiling the libraries:
276
277       $ cd apr; ./buildconf; ./configure ...; make; make install; cd ..
278
279       $ cd apr-util; ./buildconf; ./configure ...; make; make install; cd ..
280
281       Configure build and install both libraries before running Subversion's
282       configure script.
283
284
285       2. Zlib  (REQUIRED)
286
287          Subversion's binary-differencing engine depends on zlib for
288          compression.   Most Unix systems have libz pre-installed, but
289          if you need it, you can get it from
290
291             http://www.zlib.net
292
293
294       3.  autoconf 2.59 or newer (Unix only)
295
296       This is required only if you plan to build from the latest source
297       (see section II.B). Generally only developers would be doing this.
298
299
300       4.  libtool 1.4 or newer (Unix only)
301
302       This is required only if you plan to build from the latest source
303       (see section II.B).
304
305       Note: Some systems (Solaris, for example) require libtool 1.4.3 or
306       newer. The autogen.sh script knows about that.
307
308
309       5.  Serf library 1.2.1 or newer (OPTIONAL)
310
311       If you want your client to be able to speak to an Apache
312       server (via a http:// or https:// URL), you must link against
313       serf.  Though optional, we strongly recommend this.
314
315       In order to use ra_serf, you must install serf, and run Subversion's
316       ./configure with the argument --with-serf.  If serf is installed in a
317       non-standard place, you should use
318
319                --with-serf=/path/to/serf/install
320
321       instead.
322
323       Serf can be obtained via your system's package distribution
324       system or directly from http://code.google.com/p/serf/.
325
326       For more information on serf and Subversion's ra_serf, see the file
327       subversion/libsvn_ra_serf/README.
328
329       6. OpenSSL  (OPTIONAL)
330
331       ### needs some updates. I think serf automagically handles
332       ### finding OpenSSL, but we may need more docco here. and w.r.t
333       ### zlib.
334
335       The Serf library has support for SSL encryption by relying on the
336       OpenSSL library.
337
338         a. Using OpenSSL on the client through Serf
339
340           On Unix systems, to build Serf with OpenSSL, you need OpenSSL
341           installed on your system, and you must add "--with-ssl" as a
342           "./configure" parameter.  If your OpenSSL installation is hard
343           for Serf to find, you may need to use "--with-libs=/path/to/lib"
344           in addition.  In particular, on Red Hat (but not Fedora Core) it
345           is necessary to specify "--with-libs=/usr/kerberos" for OpenSSL
346           to be found.  You can also specify a path to the zlib library
347           using "--with-libs".
348
349           Under Windows, you can specify the paths to these libraries by
350           passing the options --with-zlib and --with-openssl to gen-make.py.
351
352             ### Is that right? In-tree build of Neon was disabled in r875974.
353                 This may now apply to Serf, or else gen-make.py should be
354                 updated to remove such options.
355
356         c. Using OpenSSL on the Apache server
357
358           You can also add support for these features to an Apache httpd
359           server to be used for Subversion using the same support libraries.
360           The Subversion build system will not provide them, however.  You
361           add them by specifying parameters to the "./configure" script of
362           the Apache Server instead.
363
364           For getting SSL on your server, you would add the "--enable-ssl"
365           or "--with-ssl=/path/to/lib" option to Apache's "./configure"
366           script.  Apache enables zlib support by default, but you can
367           specify a nonstandard location for the library with the
368           "--with-z=/path/to/dir" option.  Consult the Apache documentation
369           for more details, and for other modules you may wish to install
370           to enhance your Subversion server.
371
372       If you don't already have it, you can get a copy of OpenSSL,
373       including instructions for building and packaging on both Unix
374       systems and Windows, at:
375
376           http://www.openssl.org/
377
378
379       7.  Berkeley DB 4.X  (OPTIONAL)
380
381       Berkeley DB is needed to build a Subversion server that supports
382       the BDB repository filesystem, or to access a BDB repository on
383       local disk.  If you will only use the FSFS repository filesystem,
384       or if you are building a Subversion client that will only speak
385       to remote (networked) repositories, you don't need it.
386
387       The current recommended version is 4.4.20 or newer, which brings
388       auto-recovery functionality to the Berkeley DB database
389       environment.
390
391       If you must use an older version of Berkeley DB, we *strongly*
392       recommend using 4.3 or 4.2 over the 4.1 or 4.0 versions.  Not
393       only are these significantly faster and more stable, but they
394       also enable Subversion repositories to automatically clean up
395       database journal files to save disk space.
396
397       You'll need Berkeley DB installed on your system.  You can
398       get it from:
399
400       http://www.oracle.com/technology/software/products/berkeley-db/index.html
401
402       If you have Berkeley DB installed in a place not searched by default
403       for includes and libraries, add something like this:
404
405           --with-berkeley-db=db.h:/usr/local/include/db4.7:/usr/local/lib/db4.7:db-4.7
406
407       to your `configure' switches, and the build process will use the
408       Berkeley DB header and library in the named directories.  You may
409       need to use a different path, of course.  Note that in order for
410       the detection to succeed, the dynamic linker must be able to find
411       the libraries at configure time.
412
413       If you are on the Windows platform and want to build Subversion,
414       a precompiled version of the Berkeley DB library is available for
415       download at the Subversion web site "Documents & files" area:
416
417           http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=688
418
419       Look in the "Releases > Windows > Windows BDB" section.
420
421
422       8.  Cyrus SASL library (OPTIONAL)
423
424       If the Simple Authentication and Security Layer (SASL) library
425       is detected on your system, then the Subversion client and
426       svnserve server can utilize its abilities for various forms of
427       authentication.  To learn more about SASL or to get the source
428       code, visit:
429
430          http://freshmeat.net/projects/cyrussasl/
431
432
433       9.  Apache Web Server 2.X  (OPTIONAL)
434
435           (http://httpd.apache.org/download.cgi)
436
437       The Apache httpd server is one of two methods to make your Subversion
438       repository available over a network - the other is a custom server
439       program called svnserve, which requires no extra software packages.
440       Building Subversion, the Apache server, and the modules that Apache
441       needs to communicate with Subversion are complicated enough that there
442       is a whole section at the end of this document that describes how it
443       is done: See section III for details.
444
445
446       10.  Python 2.5 or newer (http://www.python.org/)  (OPTIONAL)
447
448       If you want to run "make check" or build from the latest source
449       under Unix as described in section II.B and III.D, install
450       Python 2.5 or higher on your system. The majority of the test
451       suite is written in Python, as is part of Subversion's build
452       system.
453
454
455       11. Perl 5.8 or newer (Windows only)  (OPTIONAL)
456
457       To build Subversion under any of the MS Windows platforms, you
458       will also need Perl 5.8 or newer to run apr-util's w32locatedb.pl
459       script.
460
461
462       12. MASM 6 or newer (Windows only, OPTIONAL)
463
464       The Windows build scripts for Subversion can use the Microsoft
465       Macro Assembler (MASM) to build an optimized version of the ZLib
466       library. Make sure that the version of MASM you use is compatible
467       with the C compiler. If you're using MSVC 6, and don't have MASM 6,
468       a free MASM-compatible assembler is available here:
469
470           http://www.masm32.com/
471
472       You only need ML.EXE and ML.ERR from this distribution.
473
474       The VS.NET installation already contains MASM (but note, that
475       version if MASM is not compatible with MSVC 6).
476
477
478       13. SQLite  (REQUIRED)
479
480       Subversion 1.7 requires SQLite version 3.6.18 or above.  You can meet
481       this dependency several ways:
482         * Use an SQLite amalgamation file.
483         * Specify an SQLite installation to use.
484         * Let Subversion find an installed SQLite.
485
486       To use an SQLite-provided amalgamation, just drop sqlite3.c into
487       Subversion's sqlite-amalgamation/ directory, or point to it with the
488       --with-sqlite configure option.  This file also ships with the Subversion
489       dependencies distribution, or you can download it from SQLite:
490
491           http://www.sqlite.org/download.html
492
493
494       14. pkg-config  (Unix only, OPTIONAL)
495
496       Subversion uses pkg-config to find appropriate options used
497       at build time.
498
499
500       15. D-Bus  (Unix only, OPTIONAL)
501
502       D-Bus is a message bus system. D-Bus is required for support for KWallet
503       and GNOME Keyring. pkg-config is needed to find D-Bus headers and library.
504
505
506       16. Qt 4  (Unix only, OPTIONAL)
507
508       Qt is a cross-platform application framework. QtCore, QtDBus and QtGui
509       modules are required for support for KWallet. pkg-config is needed
510       to find Qt headers and libraries.
511
512
513       17. KDELibs 4  (Unix only, OPTIONAL)
514
515       Subversion contains optional support for storing passwords in KWallet.
516       KDELibs contains core KDE libraries. Subversion uses libkdecore and libkdeui
517       libraries when support for KWallet is enabled. kde4-config is used to get
518       some necessary options. pkg-config, D-Bus and Qt 4 are also required.
519       If you want to build support for KWallet, then pass the '--with-kwallet'
520       option to `configure`. If KDE is installed in a non-standard prefix, then
521       use:
522
523           --with-kwallet=/path/to/KDE/prefix
524
525       18. GLib 2  (Unix only, OPTIONAL)
526
527       GLib is a general-purpose utility library. GLib is required for support
528       for GNOME Keyring. pkg-config is needed to find GLib headers and library.
529
530
531       19. GNOME Keyring  (Unix only, OPTIONAL)
532
533       Subversion contains optional support for storing passwords in GNOME Keyring.
534       pkg-config is needed to find GNOME Keyring headers and library. D-Bus and
535       GLib are also required. If you want to build support for GNOME Keyring,
536       then pass the '--with-gnome-keyring' option to `configure`.
537
538
539       20. Ctypesgen  (OPTIONAL)
540
541       Ctypesgen is Python wrapper generator for ctypes. It is used to generate
542       a part of Subversion Ctypes Python bindings (CSVN). If you want to build
543       CSVN, then pass the '--with-ctypesgen' option to `configure`. If ctypesgen.py
544       is installed in a non-standard place, then use:
545
546           --with-ctypesgen=/path/to/ctypesgen.py
547
548       For more information on CSVN, see subversion/bindings/ctypes-python/README.
549
550       21. libmagic (OPTIONAL)
551
552       Subversion's configure script attempts to find libmagic automatically.
553       If it is installed in a non-standard location, then use:
554
555         --with-libmagic=/path/to/libmagic/prefix
556
557       The files include/magic.h and lib/libmagic.so.1.0 (or similar)
558       are expected beneath this prefix directory. If they cannot be
559       found Subversion will be compiled without support for libmagic.
560
561       If libmagic is installed but support for it should not be compiled
562       in, then use:
563       
564         --with-libmagic=no
565
566       If configure should fail when libmagic is not present, but only
567       the default locations should be searched, then use:
568
569         --with-libmagic
570
571   D. Documentation
572
573       The primary documentation for Subversion is the free book
574       "Version Control with Subversion", a.k.a. "The Subversion Book",
575       obtainable from http://svnbook.red-bean.com/.
576
577       Various additional documentation exists in the doc/ subdirectory of
578       the Subversion source.  See the file doc/README for more information.
579
580
581 \f
582 II.   INSTALLATION
583       ============
584
585   A.  Building from a Tarball or RPM
586       ------------------------------
587
588       1.  Building from a Tarball
589
590       Download the most recent distribution tarball from:
591
592           http://subversion.apache.org/download/
593
594       Unpack it, and use the standard GNU procedure to compile:
595
596           $ ./configure
597           $ make
598           # make install
599
600       You can also run the full test suite by running 'make check'.
601
602
603       2.  Building from an RPM
604
605       If you are using Linux (or any OS that can use RPM) then another
606       possibility is to download the binary RPM from the
607       http://summersoft.fay.ar.us/pub/subversion directory.
608
609       Currently only Linux on the i386 platform is supported
610       using this method.  You might also require additional RPMS
611       (which can be found in the above mentioned directory) to use the
612       subversion RPM depending on what packages you already have installed:
613
614           subversion*.i386.rpm
615           apache*.i386.rpm (Version 2.0.49 or greater)
616           db*.i386.rpm     (Version 4.0.14 or greater; version 4.3.27 or
617                             4.2.52 is preferred however)
618           expat            (Comes with RedHat)
619
620       After downloading, install it (as root user):
621
622           # rpm -ivh subversion*.386.rpm (add other packages as necessary)
623
624       Note: For an easy way to generate a new version of the RPM
625       source and binary package from the latest source code you
626       just checked out, see the packages/rpm/README file for a
627       one-line build procedure.
628
629
630   B.  Building the Latest Source under Unix
631       -------------------------------------
632
633       These instructions assume you have already installed Subversion
634       and checked out a working copy of Subversion's own code --
635       either the latest /trunk code, or some branch or tag.  You also
636       need to have already installed whatever prerequisites that
637       version of Subversion requires (if you haven't, the ./configure
638       step should complain).
639
640       You can discard the directory created by the tarball; you're
641       about to build the latest, greatest Subversion client.  This is
642       the procedure Subversion developers use.
643
644       First off, if you have any Subversion libraries lying around
645       from previous 'make installs', clean them up first!
646
647           # rm -f /usr/local/lib/libsvn*
648           # rm -f /usr/local/lib/libapr*
649           # rm -f /usr/local/lib/libexpat*
650           # rm -f /usr/local/lib/libserf*
651
652       Start the process by running "autogen.sh":
653
654           $ sh ./autogen.sh
655
656       This script will make sure you have all the necessary components
657       available to build Subversion.  If any are missing, you will be
658       told where to get them from.  (See the 'Build Requirements' in
659       section I.)
660
661       Note: if the command "autoconf" on your machine does not run
662       autoconf 2.59 or later, but you do have a new enough autoconf
663       available, then you can specify the correct one with the
664       AUTOCONF variable.  (The AUTOHEADER variable is similar.)  This
665       may be required on Debian GNU/Linux, where "autoconf" is
666       actually a Perl script that attempts to guess which version is
667       required -- because of the interaction between Subversion's and
668       APR's configuration systems, the Perl script may get it wrong.
669       So for example, you might need to do:
670
671           $ AUTOCONF=autoconf2.59 sh ./autogen.sh
672
673       Once you've prepared the working copy by running autogen.sh,
674       just follow the usual configuration and build procedure:
675
676           $ ./configure
677           $ make
678           # make install
679
680       (Optionally, you might want to pass --enable-maintainer-mode to
681       the ./configure script.  This enables debugging symbols in your
682       binaries (among other things) and most Subversion developers use it.)
683
684       Since the resulting binary depends on shared libraries, the
685       destination library directory must be identified in your
686       operating system's library search path. That is in either
687       /etc/ld.so.conf or $LD_LIBRARY_PATH for Linux systems and in
688       /etc/rc.conf for FreeBSD, followed by a run of the 'ldconfig'
689       program. Check your system documentation for details. By
690       identifying the destination directory, Subversion will be able
691       to dynamically load repository access plugins.  If you try to do
692       a checkout and see an error like:
693
694       subversion/libsvn_ra/ra_loader.c:209: (apr_err=170000)
695       svn: Unrecognized URL scheme 'https://svn.apache.org/repos/asf/subversion/trunk'
696
697       It probably means that the dynamic loader/linker can't find all
698       of the libsvn_* libraries.
699
700
701   C.  Building under Unix in Different Directories
702       --------------------------------------------
703
704       It is possible to configure and build Subversion on Unix in a
705       directory other than the working copy. For example
706
707           $ svn co https://svn.apache.org/repos/asf/subversion/trunk svn
708           $ cd svn
709           $ # get SQLite amalgamation if required
710           $ chmod +x autogen.sh
711           $ ./autogen.sh
712           $ mkdir ../obj
713           $ cd ../obj
714           $ ../svn/configure [...with options as appropriate...]
715           $ make
716
717       puts the Subversion working copy in the directory svn and builds
718       it in a separate, parallel directory obj.
719
720       Why would you want to do this? Well there are a number of
721       reasons...
722
723           *  You may prefer to avoid "polluting" the working copy with
724              files generated during the build.
725
726           *  You may want to put the build directory and the working
727              copy on different physical disks to improve performance.
728
729           *  You may want to separate source and object code and only
730              backup the source.
731
732           *  You may want to remote mount the working copy on multiple
733              machines, and build for different machines from the same
734              working copy.
735
736           *  You may want to build multiple configurations from the
737              same working copy.
738
739       The last reason above is possibly the most useful.  For instance
740       you can have separate debug and optimized builds each using the
741       same working copy. Or you may want a client-only build and a
742       client-server build. Using multiple build directories you can
743       rebuild any or all configurations after an edit without the need
744       to either clean and reconfigure, or identify and copy changes
745       into another working copy.
746
747
748   D.  Installing from a Zip or Installer File under Windows
749       --------------------------------------------------------
750
751       Of all the ways of getting a Subversion client, this is the
752       easiest.  Download a Zip (*.zip) or self-extracting installer
753       (*-setup.exe) file from:
754
755       http://subversion.apache.org/packages#windows
756
757       For a Zip file, run your unzipping utility (WinZIP, ZipGenius,
758       UltimateZIP, FreeZIP, whatever) and extract the DLLs and EXEs to
759       a directory of your choice. Included in the download is the SVN
760       client, the SVNADMIN administration tool, and the SVNLOOK
761       reporting tool.
762
763       Note that if you need support for non-English locales you'll have
764       to set the APR_ICONV_PATH environment variable to the path of the
765       iconv directory in the folder that contains the Subversion install.
766
767       You may also want to add the bin directory in the Subversion folder
768       to your PATH environment variable so as to not have to use the full
769       path when running Subversion commands.
770
771       To test the installation, open a DOS box (run either "cmd" or
772       "command" from the Start menu's "Run..." menu option), change to
773       the directory you installed the executables into, and run:
774
775           C:\test>svn co https://svn.apache.org/repos/asf/subversion/trunk svn
776
777       This will get the latest Subversion sources and put them into the
778       "svn" subdirectory.
779
780       If using a self-extracting .exe file, just run it instead of
781       unzipping it, to install Subversion.
782
783   E.  Building the Latest Source under Windows
784       ----------------------------------------
785
786   E.1 Prerequisites
787
788       * Visual Studio 6 and service pack. It can be built with later versions
789         of Visual Studio (Visual Studio.NET 2002, 2003, 2005, 2008 and Visual
790         C++ Express 2005, 2008) but these instructions assume VS6.
791       * A recent Windows SDK. (Not needed with Visual Studio 2005 and later)
792         If you are using Visual Studio 6, you need the latest SDK which
793         is compatible with VC6, which is the one from february 2003.
794         You can get it from MSDN:
795         http://www.microsoft.com/msdownload/platformsdk/sdkupdate/psdk-full.htm
796       * Python 2.5 or higher, downloaded from http://www.python.org/ which is
797         used to generate the project files.
798       * Perl 5.8 or higher from http://www.activestate.com/
799       * Awk (from http://www.cs.princeton.edu/~bwk/btl.mirror/awk95.exe) is
800         needed to compile Apache or APR.  Note that this is the actual awk
801         program, not an installer - just rename it to awk.exe and it is
802         ready to use.
803       * Apache apr, apr-util, and optionally apr-iconv libraries, version
804         0.9.12 or later. Included in both the Subversion dependencies ZIP file
805         and the Apache 2 source zip.  If you are building from a Subversion
806         checkout and have not downloaded Apache 2, then get these 3 libraries
807         from http://www.apache.org/dist/apr/.
808       * ZLib 1.2 or higher is required and is included in the Subversion
809         dependencies zip file or can be obtained from http://www.zlib.org
810       * Either a Subversion client binary from http://subversion.apache.org/ to
811         do the initial checkout of the Subversion source or the zip file
812         source distribution. See the section "Bootstrapping from a Zip or
813         Installer File under Windows" above for more.
814       * A means of unpacking the files, e.g., WinZIP or similar.
815
816       Additional Options
817
818       * [Optional] Apache 2 source, downloaded from
819         http://httpd.apache.org/download.cgi, these instructions assume
820         version 2.0.58.  This is only needed for building the Subversion
821         server Apache modules.  Note that although Subversion will compile
822         against Apache 2.2.3 and APR 1.2.7, there is a bug that causes
823         runtime failures with Subversion on Windows.  The fix is included in
824         APR 1.2.8 and will be bundled in the next HTTP Server release
825         (likely to be 2.2.4).
826       * [Optional] Apache 2 msi install file, also from
827         http://httpd.apache.org/download.cgi (required for running the
828         tests).  Only needed for testing the server dso modules and if
829         you are using Visual Studio 6.
830         Note that if you are not using Visual Studio 6 (and you want to
831         run and test the server modules) then you must rebuild Apache
832         from source -- do not use the stock MSI since mixing C runtime
833         libraries is not supported.
834       * [Optional] Berkeley DB for backend support of the server
835         components -- versions 4.3.27 and 4.4.20 are available from
836         http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=688
837         as db-4.3.27-win32.zip and db-4.4.20-win32.zip.
838         For more information see Section I.5.
839       * [Optional] Openssl 0.9.7f or higher can be obtained from
840         http://www.openssl.org/source/openssl-0.9.7f.tar.gz
841       * [Optional] A modified version of GNU libintl, called
842         svn-win32-libintl.zip, can be used for displaying localized
843         messages. Available at:
844         http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=2627
845       * [Optional] GNU gettext for generating message catalog (.mo)
846         files from message translations. You can get the latest
847         binaries from http://gnuwin32.sourceforge.net/. You'll need the
848         binaries (gettext-0.14.1-bin.zip) and dependencies
849         (gettext-0.14.1-dep.zip).
850       * [Optional] An assembler, e.g., MASM32 from http://www.masm32.com/
851         or nasm which is available from
852         http://www.nasm.us/pub/nasm/releasebuilds/?C=M;O=D
853
854   E.2 Notes
855
856       The Serf library supports secure connections with OpenSSL and
857       on-the-wire compression with zlib. If you want to use the
858       secure connections feature, you should pass the option
859       "--with-openssl" to the gen-make.py script. See Section I.11 for
860       more details.
861
862   E.3 Preparation
863
864       This section describes how to unpack the files to make a build tree.
865
866       * Make a directory SVN and cd into it.
867       * Either checkout Subversion:
868
869           svn co https://svn.apache.org/repos/asf/subversion/trunk src-trunk
870
871         or unpack the zip file distribution and rename the directory to
872         src-trunk.
873
874       * Install Visual Studio Environment. You either have to tell the
875         installer to register environment variables or run VCVARS32.BAT
876         before building anything.  If you are using a newer Visual Studio,
877         use the 'Visual Studio 200x Command Prompt' on the Start menu.
878       * Install and register a recent Windows Core SDK if you are using
879         Visual Studio 6. This is a quote from the Microsoft February 2003
880         SDK documentation:
881
882        "To register the SDK bin, include, and library directories with
883         Microsoft Visual Studio® version 6.0 and Visual Studio .NET,
884         click Start, point to All Programs, point to Microsoft Platform
885         SDK February 2003, point to Visual Studio Registration, and then
886         click Register PSDK Directories with Visual Studio. This
887         registration process places the SDK bin, include, and library
888         directories at the beginning of the search paths, which ensures
889         that the latest headers and libraries are used when building
890         applications in the IDE. Note that for Visual Studio 6.0
891         integration to succeed, Visual Studio 6.0 must run at least once
892         before you select Register PSDK Directories with Visual
893         Studio. Also note that when this option is run, the IDEs should
894         not be running."
895
896       * Install Python and add it to your path
897       * Install Perl (it should add itself to the path)
898       * Copy AWK (awk95.exe) to awk.exe (e.g. SVN\awk\awk.exe) and add
899         the directory containing it (e.g. SVN\awk) to the path.
900       * Install Apache 2 using the msi file if you are going to test the
901         server dso modules and are using Visual Studio 6.  You must build
902         and install it from source if you are not using Visual Studio 6 and
903         want to build and/or test the server modules.
904       * If you checked out Subversion from the repository then install the serf
905         sources into SVN\src-trunk\serf.
906       * If you want BDB backend support, extract the Berkeley DB files
907         into SVN\src-trunk\db4-win32. It's a good idea to add
908         SVN\src-trunk\db4-win32\bin to your PATH, so that Subversion can find
909         the Berkeley DB DLLs.
910
911         [NOTE: This binary package of Berkeley DB is provided for
912             convenience only. Please don't address questions about
913             Berkeley DB that aren't directly related to using Subversion
914             to the project mailing list.]
915
916         If you build Berkeley DB from the source, you will have to copy
917         the file db-x.x.x\build_win32\db.h to
918         SVN\src-trunk\db4-win32\include, and all the import libraries to
919         SVN\src-trunk\db4-win32\lib. Again, the DLLs should be somewhere in
920         your path.
921
922       * If you want to build the server modules, extract Apache source into
923         SVN\httpd-2.x.x.
924       * If you are building from a checkout of Subversion, and you are NOT
925         building Apache, then you will need the APR libraries.  Depending
926         on how you got your version of APR, either:
927           - Extract the APR, APR-util and APR-iconv source distributions into
928             SVN\apr, SVN\apr-util, and SVN\apr-iconv respectively.
929         Or:
930           - Extract the apr, apr-util and apr-iconv directories from the
931             srclib folder in the Apache httpd source into SVN\apr,
932             SVN\apr-util, and SVN\apr-iconv respectively.
933       * Extract the ZLib sources into SVN\zlib if you are not using the zlib
934         included in the dependencies zip file.
935       * If you want secure connection (https) client support, extract openssl
936         into SVN\openssl-x.x.x
937       * If you want localized message support, extract svn-win32-libintl.zip
938         into SVN\svn-win32-libintl and extract gettext-x.x.x-bin.zip and
939         gettext-x.x.x-dep.zip into SVN\gettext-x.x.x-bin.
940         Add SVN\gettext-x.x.x-bin\bin to your path.
941       * [Optional] Extract MASM32 (only the ML.EXE and ML.ERR files) into
942         SVN\asm (or extract nasm into SVN\asm) and put it in your path.
943
944   E.4 Building the Binaries
945
946       To build the binaries either follow the instructions here or use
947       build\win32\vc6-build.bat.in after editing its default paths to match
948       yours and saving it as vc6-build.bat.  The vc6-build.bat does a full build
949       using all options so it requires Apache 2 source and the other optional
950       components.
951
952       Start in the SVN directory you created.
953
954       Set up the environment (commands should be one line even if wrapped here).
955
956       C:>set VER=trunk
957       C:>set DIR=trunk
958       C:>set DRIVE=C
959       C:>set PYTHONDIR=C:\Python22
960       C:>set AWKDIR=C:\SVN\Awk
961       C:>set ASMDIR=C:\SVN\asm
962       C:>set SDKINC=C:\Program Files\Microsoft SDK\include
963       C:>set SDKLIB=C:\Program Files\Microsoft SDK\lib
964       C:>set GETTEXTBIN=C:\SVN\gettext-0.14.1-bin\bin
965       C:>PATH=%PATH%;%DRIVE%:\SVN\src-%DIR%\db4-win32;%ASMDIR%;
966               %PYTHONDIR%;%AWKDIR%;%GETTEXTBIN%
967       C:>set INCLUDE=%SDKINC%;%INCLUDE%
968       C:>set LIB=%SDKLIB%;%LIB%
969
970       OpenSSL
971
972       C:>cd openssl-0.9.7f
973       C:>perl Configure VC-WIN32
974   [*] C:>call ms\do_masm
975       C:>nmake -f ms\ntdll.mak
976       C:>cd out32dll
977       C:>call ..\ms\test
978       C:>cd ..\..
979
980       *Note: Use "call ms\do_nasm" if you have nasm instead of MASM, or
981              "call ms\do_ms" if you don't have an assembler.
982
983       Apache 2
984
985       This step is only required for building the server dso modules.
986
987       The Subversion gen-make.py script must be run before building Apache or
988       Apache and Subversion will be running incompatible versions of apr.
989
990       C:>cd src-%DIR%
991       C:>python gen-make.py -t dsp --with-httpd=..\httpd-2.0.58
992          --with-berkeley-db=db4-win32 --with-openssl=..\openssl-0.9.7f
993          --with-zlib=..\zlib --with-libintl=..\svn-win32-libintl
994       C:>cd ..
995       C:>set APACHEDIR=C:\Program Files\Apache Group\Apache2
996       C:>msdev httpd-2.0.58\apache.dsw /MAKE "BuildBin - Win32 Release"
997
998       Subversion
999
1000       Things to note:
1001
1002       * If you don't want to build mod_dav_svn, omit the --with-httpd
1003         option.  The zip file source distribution contains apr, apr-util and
1004         apr-iconv in the default build location. If you have downloaded the
1005         apr files yourself you will have to tell the generator where to find
1006         the APR libraries; the options are --with-apr, --with-apr-util and
1007         --with-apr-iconv.
1008       * If you would like a debug build substitute Debug for Release in
1009         the msdev commands.
1010       * There have been rumors that Subversion on Win32 can be built
1011         using the latest cygwin, you probably don't want the zip file source
1012         distribution though. ymmv.
1013       * The /USEENV switch to msdev makes it take notice of the INCLUDE and
1014         LIB environment variables, it also makes it ignore its own lib and
1015         include settings so you need to have the Windows SDK lib and include
1016         directories in the LIB and INCLUDE environment variables.  Do *not*
1017         use this switch when starting up the msdev Visual environment.  If you
1018         wish to build in the Visual environment the SDK lib and include
1019         directories must be in the Tools/Options/Directories settings (if you
1020         followed the 'Register the SDK with Visual Studio 6' instructions
1021         above this has been done for you).
1022       * If you are using Visual Studio .NET change -t dsw into -t vcproj and
1023         add the --vsnet-version=200x option on the gen-make.py command.
1024         In this case you will also have to distribute the C runtime dll with
1025         the binaries.  Also, since Apache/APR do not provide .vcproj files,
1026         you will need to convert the Apache/APR .dsp files to .vcproj files
1027         with Visual Studio before building -- just open the Apache .dsw file
1028         and answer 'Yes To All' when the conversion dialog pops up, or you
1029         can open the individual .dsp files and convert them one at a time.
1030         The Apache/APR projects required by Subversion are:
1031         apr-util\libaprutil.dsp, apr\libapr.dsp,
1032         apr-iconv\libapriconv.dsp, apr-util\xml\expat\lib\xml.dsp,
1033         apr-util\uri\gen_uri_delims.dsp (for APR 0.9.x),
1034         apr-iconv\ccs\libapriconv_ccs_modules.dsp, and
1035         apr-iconv\ces\libapriconv_ces_modules.dsp.
1036       * If the server dso modules are being built and tested Apache must not
1037         be running or the copy of the dso modules will fail.
1038
1039       C:>cd src-%DIR%
1040
1041       If Apache 2 has been built and the server modules are required then
1042       gen-make.py will already have been run. If the source is from the zip
1043       file, Apache 2 has not been built so gen-make.py must be run:
1044
1045       C:>python gen-make.py -t dsp --with-berkeley-db=db4-win32
1046           --with-openssl=..\openssl-0.9.7f --with-zlib=..\zlib
1047           --with-libintl=..\svn-win32-libintl
1048
1049       Then build subversion:
1050
1051       C:>msdev subversion_msvc.dsw /USEENV /MAKE "__ALL_TESTS__ - Win32 Release"
1052       C:>cd ..
1053
1054       Or, with Visual C++.NET 2002, 2003, 2005:
1055
1056       C:>devenv subversion_vcnet.sln /build "Release" /project "__ALL_TESTS__"
1057       C:>cd ..
1058
1059       Or, with Visual C++ Express 2005:
1060
1061       C:>msbuild subversion_vcnet.sln /t:__ALL_TESTS__ /p:Configuration=Release
1062       C:>cd ..
1063
1064       The binaries have now been built.
1065
1066   E.5 Packaging the binaries
1067
1068       You now need to copy the binaries ready to make the release zip
1069       file. You also need to do this to run the tests as the new binaries
1070       need to be in your path. You can use the build/win32/make_dist.py
1071       script in the Subversion source directory to do that.
1072
1073       [TBD: Describe how to do this. Note dependencies on zip, jar, doxygen.]
1074
1075   E.6 Testing the Binaries
1076       [TBD: It's been a long, long while since it was necessary to move
1077             binaries around for testing. win-tests.py does that automagically.
1078             Fix this section accordingly, and probably reorder, putting
1079             the packaging at the end.]
1080
1081       The build process creates the binary test programs but it does not
1082       copy the client tests into the release test area.
1083
1084       C:>cd src-%DIR%
1085       C:>mkdir Release\subversion\tests\cmdline
1086       C:>xcopy /S /Y subversion\tests\cmdline Release\subversion\tests\cmdline
1087
1088       If the server dso modules  have been built then copy the dso files and
1089       dlls into the Apache modules directory.
1090
1091       C:>copy Release\subversion\mod_dav_svn\mod_dav_svn.so "%APACHEDIR%"\modules
1092       C:>copy Release\subversion\mod_authz_svn\mod_authz_svn.so
1093          "%APACHEDIR%"\modules
1094       C:>copy svn-win32-%VER%\bin\intl.dll "%APACHEDIR%\bin"
1095       C:>copy svn-win32-%VER%\bin\iconv.dll "%APACHEDIR%\bin"
1096       C:>copy svn-win32-%VER%\bin\libdb42.dll "%APACHEDIR%\bin"
1097       C:>cd ..
1098
1099       Put the svn-win32-trunk\bin directory at the start of your path so
1100       you run the newly built binaries and not another version you might
1101       have installed.
1102
1103       Then run the client tests:
1104
1105       C:>PATH=%DRIVE%:\SVN\svn-win32-%VER%\bin;%PATH%
1106       C:>cd src-%DIR%
1107       C:>python win-tests.py -c -r -v
1108
1109       If the server dso modules were built configure Apache to use the
1110       mod_dav_svn and mod_authz_svn modules by making sure these lines appear
1111       uncommented in httpd.conf:
1112
1113         LoadModule dav_module         modules/mod_dav.so
1114         LoadModule dav_fs_module      modules/mod_dav_fs.so
1115         LoadModule dav_svn_module     modules/mod_dav_svn.so
1116         LoadModule authz_svn_module   modules/mod_authz_svn.so
1117
1118       And further down the file add location directives to point to the
1119       test repositories. Change the paths to the SVN directory you created
1120       (paths should be on one line even if wrapped here):
1121
1122         <Location /svn-test-work/repositories>
1123          DAV svn
1124          SVNParentPath C:/SVN/src-trunk/Release/subversion/tests/cmdline/
1125                        svn-test-work/repositories
1126         </Location>
1127
1128         <Location /svn-test-work/local_tmp/repos>
1129          DAV svn
1130          SVNPath c:/SVN/src-trunk/Release/subversion/tests/cmdline/
1131                  svn-test-work/local_tmp/repos
1132         </Location>
1133
1134       Then restart Apache and run the tests:
1135
1136       C:>python win-tests.py -c -r -v -u http://localhost
1137       C:>cd ..
1138 \f
1139 III.  BUILDING A SUBVERSION SERVER
1140       ============================
1141
1142       Subversion has two servers you can choose from:  svnserve and
1143       Apache.  svnserve is a small, lightweight server program that is
1144       automatically compiled when you build Subversion's source.  Apache
1145       is a more heavyweight HTTP server, but tends to have more features.
1146
1147       This section primarily focuses on how to build Apache and the
1148       accompanying mod_dav_svn server module for it.  If you plan to use
1149       svnserve instead, jump right to section E for a quick explanation.
1150
1151
1152   A.  Setting Up Apache
1153       -----------------
1154
1155       (Following the BOOTSTRAPPING FROM RPM procedures above will install and
1156       build the latest Subversion server for Linux RedHat 7.1, 7.2, and PPC
1157       Linux systems *IF* the apache-devel-2.0.41 or greater package is already
1158       installed when the SUBVERSION RPM is built.)
1159
1160
1161       1.  Obtaining and Installing Apache 2
1162
1163       Subversion tries to compile against the latest released version
1164       of Apache httpd 2.X.  The easiest thing for you to do is download
1165       a source tarball of the latest release and unpack that.
1166
1167
1168         ****************************************************************
1169         **    IMPORTANT ISSUE ABOUT APACHE VERSIONS:  READ THIS.      **
1170         **                                                            **
1171         ****************************************************************
1172         |                                                              |
1173         | First, be sure to read the APR version warning box, back in  |
1174         | section I.C.1, which explains that APR 0.9.x and 1.X are     |
1175         | binary-incompatible.                                         |
1176         |                                                              |
1177         |    Apache HTTPD 2.0 uses APR 0.9.x.                          |
1178         |    Apache HTTPD 2.2 uses APR 1.2.x.                          |
1179         |                                                              |
1180         | We recommend using the latest Apache.  However, whatever     |
1181         | version you choose, you *must* ensure that Subversion        |
1182         | and Apache are using the same version of APR.  If you don't, |
1183         | things will segfault and break.                              |
1184         |______________________________________________________________|
1185
1186
1187       If you have questions about the Apache httpd 2.0 build, please consult
1188       the httpd install documentation:
1189
1190           http://httpd.apache.org/docs-2.0/install.html
1191
1192       At the top of the httpd tree:
1193
1194           $ ./buildconf
1195           $ ./configure --enable-dav --enable-so --enable-maintainer-mode
1196
1197       The first arg says to build mod_dav.
1198
1199       The second arg says to enable shared module support which is needed
1200       for a typical compile of mod_dav_svn (see below).
1201
1202       The third arg says to include debugging information.  If you
1203       built Subversion with --enable-maintainer-mode, then you should
1204       do the same for Apache; there can be problems if one was
1205       compiled with debugging and the other without.
1206
1207       Note: if you have multiple db versions installed on your system,
1208       Apache might link to a different one than Subversion, causing
1209       failures when accessing the repository through Apache.  To prevent
1210       this from happening, you have to tell Apache which db version to
1211       use and where to find db.  Add --with-dbm=db4 and
1212       --with-berkeley-db=/usr/local/BerkeleyDB.4.2 to the configure
1213       line.  Make sure this is the same db as the one Subversion uses.
1214       This note assumes you have installed Berkeley DB 4.2.52
1215       at its default locations.  For more info about the db requirement,
1216       see section I.5.
1217
1218       You may also want to include other modules in your build. Add
1219       --enable-ssl to turn on SSL support, and --enable-deflate to turn on
1220       compression support, for example.  Consult the Apache documentation
1221       for more details.
1222
1223       All instructions below assume you configured Apache to install
1224       in its default location, /usr/local/apache2/; substitute
1225       appropriately if you chose some other location.
1226
1227       Compile and install apache:
1228
1229           $ make && make install
1230
1231
1232   B.  Making and Installing the Subversion Apache Server Module
1233       ---------------------------------------------------------
1234
1235       Go back into your subversion working copy and run ./autogen.sh if
1236       you need to.  Then, assuming Apache httpd 2.0 is installed in the
1237       standard location, run:
1238
1239           $ ./configure
1240
1241       Note: do *not* configure subversion with "--disable-shared"!
1242       mod_dav_svn *must* be built as a shared library, and it will
1243       look for other libsvn_*.so libraries on your system.
1244
1245       If you see a warning message that the build of mod_dav_svn is
1246       being skipped, this may be because you have Apache httpd 2.X
1247       installed in a non-standard location.  You can use the
1248       "--with-apxs=" option to locate the apxs script:
1249
1250           $ ./configure --with-apxs=/usr/local/apache2/bin/apxs
1251
1252       Note: it *is* possible to build mod_dav_svn as a static library
1253       and link it directly into Apache. Possible, but painful. Stick
1254       with the shared library for now; if you can't, then ask.
1255
1256           $ rm /usr/local/lib/libsvn*
1257
1258       If you have old subversion libraries sitting on your system,
1259       libtool will link them instead of the `fresh' ones in your tree.
1260       Remove them before building subversion.
1261
1262           $ make clean && make && make install
1263
1264       After the make install, the Subversion shared libraries are in
1265       /usr/local/lib/.  mod_dav_svn.so should be installed in
1266       /usr/local/apache2/modules/.
1267
1268
1269       Section II.E explains how to build the server on Windows.
1270
1271
1272   C.  Configuring Apache for Subversion
1273       ---------------------------------
1274
1275       The following section is an abbreviated version of the
1276       information in the Subversion Book
1277       (http://svnbook.red-bean.com).  Please read chapter 6 for more
1278       details.
1279
1280       The following assumes you have already created a repository.
1281       For documentation on how to do that, see README.
1282
1283       The following also assumes that you have modified
1284       /usr/local/apache2/conf/httpd.conf to reflect your setup.
1285       At a minimum you should look at the User, Group and ServerName
1286       directives.  Full details on setting up apache can be found at:
1287       http://httpd.apache.org/docs-2.0/
1288
1289       First, your httpd.conf needs to load the mod_dav_svn module.
1290       Subversion's 'make install' target should automatically add this
1291       line for you.  But if apache gives you an error like "Unknown
1292       DAV provider: svn", then you may want to verify that this line
1293       exists in your httpd.conf:
1294
1295          LoadModule dav_svn_module     modules/mod_dav_svn.so
1296
1297       NOTE: if you built mod_dav as a dynamic module as well, make sure
1298       the above line appears after the one that loads mod_dav.so.
1299
1300       Next, add this to the *bottom* of your httpd.conf:
1301
1302       <Location /svn/repos>
1303           DAV svn
1304           SVNPath /absolute/path/to/repository
1305       </Location>
1306
1307       This will give anyone unrestricted access to the repository.  If
1308       you want limited access, read or write, you add these lines to
1309       the Location block:
1310
1311           AuthType Basic
1312           AuthName "Subversion repository"
1313           AuthUserFile /my/svn/user/passwd/file
1314
1315       And:
1316
1317           a) For a read/write restricted repository:
1318
1319              Require valid-user
1320
1321           b) For a write restricted repository:
1322
1323              <LimitExcept GET PROPFIND OPTIONS REPORT>
1324                  Require valid-user
1325              </LimitExcept>
1326
1327           c) For separate restricted read and write access:
1328
1329              AuthGroupFile /my/svn/group/file
1330
1331              <LimitExcept GET PROPFIND OPTIONS REPORT>
1332                  Require group svn_committers
1333              </LimitExcept>
1334
1335              <Limit GET PROPFIND OPTIONS REPORT>
1336                  Require group svn_committers
1337                  Require group svn_readers
1338              </Limit>
1339
1340       These are only a few simple examples.  For a complete tutorial
1341       on Apache access control, please consider taking a look at the
1342       tutorials found under "Security" on the following page:
1343       http://httpd.apache.org/docs-2.0/misc/tutorials.html
1344
1345       In order for 'svn cp' to work (which is actually implemented as a
1346       DAV COPY command), mod_dav needs to be able to determine the
1347       hostname of the server.  A standard way of doing this is to use
1348       Apache's ServerName directive to set the server's hostname.  Edit
1349       your /usr/local/apache2/conf/httpd.conf to include:
1350
1351       ServerName svn.myserver.org
1352
1353       If you are using virtual hosting through Apache's NameVirtualHost
1354       directive, you may need to use the ServerAlias directive to specify
1355       additional names that your server is known by.
1356
1357       If you have configured mod_deflate to be in the server, you can enable
1358       compression support for your repository by adding the following line
1359       to your Location block:
1360
1361           SetOutputFilter DEFLATE
1362
1363
1364       NOTE: If you are unfamiliar with an Apache directive, or not exactly
1365       sure about what it does, don't hesitate to look it up in the
1366       documentation: http://httpd.apache.org/docs-2.0/mod/directives.html.
1367
1368       NOTE: Make sure that the user 'nobody' (or whatever UID the
1369       httpd process runs as) has permission to read and write the
1370       Berkeley DB files!  This is a very common problem.
1371
1372
1373   D.  Running and Testing
1374       -------------------
1375
1376       Fire up apache 2:
1377
1378           $ /usr/local/apache2/bin/apachectl stop
1379           $ /usr/local/apache2/bin/apachectl start
1380
1381       Check /usr/local/apache2/logs/error_log to make sure it started
1382       up okay.
1383
1384       Try doing a network checkout from the repository:
1385
1386           $ svn co http://localhost/svn/repos wc
1387
1388       The most common reason this might fail is permission problems
1389       reading the repository db files.  If the checkout fails, make
1390       sure that the httpd process has permission to read and write to
1391       the repository.  You can see all of mod_dav_svn's complaints in
1392       the Apache error logfile, /usr/local/apache2/logs/error_log.
1393
1394       To run the regression test suite for networked Subversion, see
1395       the instructions in subversion/tests/cmdline/README.
1396       For advice about tracing problems, see "Debugging the server" in
1397       http://subversion.apache.org/docs/community-guide/.
1398
1399
1400   E.  Alternative:  'svnserve' and ra_svn
1401       -----------------------------------
1402
1403       An alternative network layer is libsvn_ra_svn (on the client
1404       side) and the 'svnserve' process on the server.  This is a
1405       simple network layer that speaks a custom protocol over plain
1406       TCP (documented in libsvn_ra_svn/protocol):
1407
1408          $ svnserve -d     # becomes a background daemon
1409          $ svn checkout svn://localhost/usr/local/svn/repository
1410
1411       You can use the "-r" option to svnserve to set a logical root
1412       for repositories, and the "-R" option to restrict connections to
1413       read-only access.  ("Read-only" is a logical term here; svnserve
1414       still needs write access to the database in this mode, but will
1415       not allow commits or revprop changes.)
1416
1417       'svnserve' has built-in CRAM-MD5 authentication (so you can use
1418       non-system accounts), and can also be tunneled over SSH (so you
1419       can use existing system accounts).  It's also capable of using
1420       Cyrus SASL if libsasl2 is detected at ./configure time.  Please
1421       read chapter 6 in the Subversion Book
1422       (http://svnbook.red-bean.com) for details on these features.
1423
1424
1425 \f
1426 IV.   PLATFORM-SPECIFIC ISSUES
1427       ========================
1428
1429   A.  Windows XP
1430       ----------
1431
1432       There is an error in the Windows XP TCP/IP stack which causes
1433       corruption in certain cases.  This problem is exposed only
1434       through ra_dav.
1435
1436       The root of the matter is caused by duplicating file handles
1437       between parent and child processes.  The httpd Apache group
1438       explains this a lot better:
1439
1440           http://www.apache.org/dist/httpd/binaries/win32/#xpbug
1441
1442       And there's an item about this in the Subversion FAQ:
1443
1444           http://subversion.apache.org/faq.html#windows-xp-server
1445
1446       The only known workaround for now is to update to Windows XP
1447       SP1 (or higher).
1448
1449
1450   B.  Mac OS X
1451       --------
1452
1453       [TBD: Describe BDB 4.0.x problem]
1454
1455
1456 \f
1457 V.    PROGRAMMING LANGUAGE BINDINGS (PYTHON, PERL, RUBY, JAVA)
1458       ========================================================
1459
1460       For Python, Perl and Ruby bindings, see the file
1461
1462           ./subversion/bindings/swig/INSTALL
1463
1464       For Java bindings, see the file
1465
1466           ./subversion/bindings/javahl/README