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