Drop single quote characters (') in operational log. They actually
[svn.git] / INSTALL
blobd37fc50f7704770a4195760ba052d7e3cf5ad829
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       * SQLite (REQUIRED for client and server)
96          SQLite is a lightweight, embeddable SQL library.  The
97          Subversion repository uses a SQLite database to track merge
98          data.
100       * libneon or libserf  (OPTIONAL for client)
102          The Neon and Serf libraries both allow the Subversion client
103          to send HTTP requests.  This is necessary if you want your
104          client to access a repository served by the Apache HTTP
105          server.  There is an alternate 'svnserve' server as well,
106          though, and clients automatically know how to speak the
107          svnserve protocol.  Thus it's not strictly necessary for your
108          client to be able to speak HTTP... though we still recommend
109          that your client be built to speak both HTTP and svnserve
110          protocols.  Your client can be compiled against either
111          libneon or libserf (or both), as they offer competing
112          implementations.
114       * OpenSSL (OPTIONAL for client and server)
116          OpenSSL enables your client to access SSL-encrypted https://
117          URLs (using either libneon or libserf) in addition to
118          unencrypted http:// URLs.  To use SSL with Subversion's
119          WebDAV server, Apache needs to be compiled with OpenSSL as
120          well.
122       * Berkeley DB (OPTIONAL for client and server)
124          There are two different repository 'back-end'
125          implementations.  One implementation stores data in a flat
126          filesystem (known as FSFS); the other implementation stores
127          data in a Berkeley DB database (known as BDB).  When you
128          create a repository, you have the option of specifying a
129          storage back-end.  The Berkeley DB back-end will only be
130          available if the BDB libraries are discovered at compile
131          time.
133       * libsasl (OPTIONAL for client and server)
135          If the Cyrus SASL library is detected at compile time, then
136          the svn client (and svnserve server) will be able to utilize
137          SASL to do various forms of authentication when speaking the
138          svnserve protocol.
140       * Python, Perl, Java, Ruby  (OPTIONAL)
142          Subversion is mostly a collection of C libraries with
143          well-defined APIs, with a small collection of programs that
144          use the APIs.  If you want to build Subversion API bindings
145          for other languages, you need to have those languages
146          available at build time.
149   C. Dependencies in Detail
151       Subversion depends on a number of third party tools and libraries.
152       Some of them are only required to run a Subversion server; others
153       are necessary just for a Subversion client.  This section explains
154       what other tools and libraries will be required so that Subversion
155       can be built with the set of features you want.
157       On Unix systems, the './configure' script will tell you if you are
158       missing the correct version of any of the required libraries or
159       tools, so if you are in a real hurry to get building, you can skip
160       straight to section II.  If you want to gather the pieces you will
161       need before starting out, however, you should read the following.
163       If you're just installing a Subversion client, the Subversion
164       team has created a package containing the minimal prerequisite
165       libraries (Apache Portable Runtime, Neon, and Zlib) called the
166       "dependency package" tarball or zipfile.  You should be able to
167       find it at the same place that you downloaded the Subversion
168       tarball itself from. (Note that this is new as of Subversion
169       1.4.0; previous releases packaged the dependencies in the same
170       tarball as Subversion itself.)  If you don't have these
171       libraries installed already, you can simply unpack the
172       dependency package "on top of" the Subversion package; for
173       example, if you are using a .tar.gz bundle on Unix, you could
174       type:
176           $ tar xzvf subversion-1.x.x.tar.gz
177           $ tar xzvf subversion-deps-1.x.x.tar.gz
178           $ cd subversion-1.x.x
180       This will place 'apr', 'apr-util', 'neon', and 'zlib'
181       directories directly into your unpacked Subversion distribution,
182       where they will be automatically configured and built by
183       Subversion's build process.
185       Note: Because previous builds of Subversion may have installed older
186       versions of these libraries, you may want to run some of the cleanup
187       commands described in section II.B before installing the following.
190       1.  Apache Portable Runtime 0.9.7 or 1.2.X  (REQUIRED)
192       Whenever you want to build any part of Subversion, you need the
193       Apache Portable Runtime (APR) and the APR Utility (APR-util)
194       libraries. These are included in the Subversion dependency package -
195       if you are building from a source tarball and wish to use the versions
196       of APR and APR-util included there, just unpack the dependency package
197       and skip ahead to the next requirement.
200         ****************************************************************
201         **       IMPORTANT ISSUE ABOUT APR VERSIONS:  READ THIS.      **
202         **                                                            **
203         ****************************************************************
204         |                                                              |
205         | APR 0.9.X and 1.X are binary-incompatible.                   |
206         |                                                              |
207         | This means:                                                  |
208         |                                                              |
209         |   - if you are already using Subversion with APR 0.9.X, and  |
210         |     then upgrade your libapr to 1.X without rebuilding       |
211         |     Subversion, things will break and segfault.              |
212         |                                                              |
213         |   - if your Subversion server libraries are linked to one    | 
214         |     version of APR, but your Apache server is linked to a    | 
215         |     different version, things will break and segfault.       |
216         |                                                              |
217         | Subversion 1.0 originally shipped with APR 0.9.  Even        |
218         | though APR 1.X has been available for many years, we         |
219         | continue to ship APR 0.9 so as not to accidentally break     |
220         | binary compatibility in Subversion upgrades.                 |
221         |                                                              |
222         | However, it's *perfectly* safe to use APR 1.X from the       |
223         | beginning.  In fact, we recommend it.  If you're building    |
224         | Subversion for the first time, there's no compatibility      |
225         | issue to worry about, so grab the latest version of APR      |
226         | (rather than the 0.9.X version we distribute.)               |
227         |                                                              |
228         | If you already have a Subversion installation using APR      |
229         | 0.9.x, it's still possible to move to APR 1.X safely.  Just  |
230         | be sure to recompile Subversion after upgrading APR!         |
231         |______________________________________________________________|
234       If you are not building from a tarball with the dependency
235       package, you will need to get these yourself:
237           http://apr.apache.org/download.cgi
239       On Unix systems, if you already have the APR libraries compiled and do
240       not wish to regenerate them from source code, then Subversion needs to
241       be able to find them.
243       There are a couple of options to "./configure" that tell it where
244       to look for the APR and APR-util libraries. By default, it will first
245       look for bundled versions of APR and APR-util, and then try to locate
246       already installed versions of the libraries using the apr-config and
247       apu-config scripts. These scripts provide all the relevant information
248       for the APR and APR-util installations.
250       If you want to specify the location of the APR library, you can use
251       the "--with-apr=" option of "./configure". It should be able to find
252       the apr-config script in the standard location under that directory
253       (e.g. ${prefix}/bin).
255       Similarly, you can specify the location of APR-util using the
256       "--with-apr-util=" option to "./configure". It will look for the
257       apu-config script relative to that directory.
259       For example, if you want to use the APR libraries you built
260       with the Apache httpd server, you could run:
262           $ ./configure --with-apr=/usr/local/apache2 \
263             --with-apr-util=/usr/local/apache2  ...
265       If you want Subversion to build the APR libraries from source
266       code as part of the Subversion build process, you can put their
267       source code into the "./apr" and "./apr-util" directories.
269       Be sure to use a native Windows SVN client (as opposed to
270       Cygwin's version) so that the .dsp files get carriage-returns at
271       the ends of their lines.  Otherwise Visual Studio will complain
272       that it doesn't recognize the .dsp files.
274       If you use APR libraries checked out from svn in an Unix
275       environment, you need to run the 'buildconf' script in each
276       library's directory, to regenerate the configure scripts and
277       other files required for compiling the libraries:
279       $ cd apr; ./buildconf; cd ..
281       $ cd apr-util; ./buildconf; cd ..
284       2. Zlib  (REQUIRED)
286          Subversion's binary-differencing engine depends on zlib for
287          compression.   Most Unix systems have libz pre-installed, but
288          if you need it, you can get it from
290             http://www.zlib.net
293       3. SQLite 3.x or newer  (REQUIRED for client and server)
295          SQLite is a lightweight, embeddable SQL library necessary to
296          build any repository-related code.
298          You can get sqlite 3.5.3 from:
300                http://www.sqlite.org/sqlite-3.5.3.tar.gz
302          SQLite must be built in thread-safe mode (with 'configure
303          --enable-threadsafe').  If building SQLite yourself, you
304          have the option of unpacking the archive into the top of the
305          Subversion source tree and renaming the resulting directory
306          within the Subversion source code from ./sqlite-3.5.3/ to
307          ./sqlite/.  Subversion will then build and install it for
308          you.
311       4.  autoconf 2.58 or newer (Unix only)
313       This is required only if you plan to build from the latest source
314       (see section II.B). Generally only developers would be doing this.
317       5.  libtool 1.4 or newer (Unix only)
319       This is required only if you plan to build from the latest source
320       (see section II.B).
322       Note: Some systems (Solaris, for example) require libtool 1.4.3 or
323       newer. The autogen.sh script knows about that.
326       6.  An HTTP client libary:  either neon or serf.  (OPTIONAL)
328         neon and serf are competing implementations of HTTP client
329         libraries.  If you want your client to be able to speak to an
330         Apache server (via a http:// or https:// URL), you must link
331         against at least one of these libraries.  Though optional, we
332         strongly recommend this.
334         (If you link against both, you can configure which one is used
335         in your ~/.subversion/servers configuration file.)
337         a. Neon library 0.25, 0.26 or 0.27 (http://www.webdav.org/neon/)
339            The Neon library allows a Subversion client to interact
340            with remote repositories over the Internet via a WebDAV
341            based protocol.
343            The source code is included with the Subversion
344            dependencies package, and it can also be obtained from:
346                http://www.webdav.org/neon/neon-0.25.5.tar.gz
347                http://www.webdav.org/neon/neon-0.26.4.tar.gz
348                http://www.webdav.org/neon/neon-0.27.2.tar.gz
350            Building Neon inside the subversion build:
352            The Neon library source code can be placed in "./neon" if
353            you want Subversion to build it as part of the Subversion
354            build process.
356            Unpack the archive using tar/gunzip.  Rename the resulting
357            directory from ./neon-0.XX.Y to just "./neon", inside the
358            top level of your Subversion source tree.  (This is what
359            unpacking the Subversion dependencies package does, too.)
361            Using Neon as an external library:
363            We recommend that you keep the neon installation out of the
364            Subversion working copy.  This is because most developers
365            have multiple working copies of Subversion, and it is
366            easier to use a single instance of the Neon library for all
367            instances.  To do this, just unzip/untar Neon, and build
368            and install it according to its own standard installation
369            instructions.  Then follow the steps below to use the
370            installed Neon when building.
372            Subversion's configuration mechanism should auto-detect the
373            installed Neon.  If it does not, you may need to set the
374            LDFLAGS environment variable when you run "./configure", or
375            specify Neon's location by passing the "--with-neon="
376            option to "./configure".  Look for the "neon-config" script
377            in a "bin/" subdirectory of the target of "--with-neon".
378            For example, if you pass "--with-neon=/usr/local/myneon/",
379            then there should be a file
380            "/usr/local/myneon/bin/neon-config".
382         b. Serf library 0.1.2 (http://code.google.com/p/serf/)
384            serf is a library for HTTP and WebDAV which is an
385            alternative to Neon for accessing Subversion repositories
386            over http:// and https:// URLs.  serf is designed as an
387            asynchronous library which can take advantage of HTTP
388            pipelining, so ra_serf may be more efficient than ra_neon
389            and better for HTTP proxy caches.  The serf library can be
390            found at:
392                http://code.google.com/p/serf/
394            In order to use ra_serf instead of ra_neon, you must install
395            serf, and run Subversion's ./configure with the argument
396            --with-serf.  (To only use ra_serf and not ra_neon, you
397            should also use --without-neon.)  If serf is installed in a
398            non-standard place, you should use
400                --with-serf=/path/to/serf/install
402            instead.  If you build with both ra_neon and ra_serf,
403            Subversion will use ra_neon by default; add "http-library =
404            serf" to the [global] section of your ~/.subversion/servers
405            file to use ra_serf instead.
407            For more information on serf and Subversion's ra_serf, see
408            the file subversion/libsvn_ra_serf/README.
411       7. OpenSSL  (OPTIONAL)
413       The Neon and Serf libraries have support for SSL encryption by
414       relying on the OpenSSL library.
416       When Neon is created with this dependency, then the Subversion
417       client inherits the ability to support SSL connections.  Neon
418       also has support for sending compressed data using the zlib
419       library which a Subversion client can take advantage of.
421       On Unix systems, if you are building neon as part of the
422       Subversion build process (as described in section I.4 above),
423       you can pass flags to Subversion's "./configure", and they will
424       be passed on to neon's "./configure".  You need OpenSSL
425       installed on your system, and you must add "--with-ssl" as a
426       "./configure" parameter.  If your OpenSSL installation is hard
427       for Neon to find, you may need to use "--with-libs=/path/to/lib"
428       in addition.  In particular, on Red Hat (but not Fedora Core) it
429       is necessary to specify "--with-libs=/usr/kerberos" for OpenSSL
430       to be found.  The zlib library is included in the Subversion
431       dependencies package, but if you are compiling Neon from a
432       different source you can also specify a path to the library
433       using "--with-libs".  Consult the Neon documentation for more
434       information on how to use these parameters and versions of
435       libraries you need.
437       Under Windows, you can specify the paths to these libraries by
438       passing the options --with-zlib and --with-openssl to gen-make.py.
440       You can also add support for these features to an Apache httpd server
441       to be used for Subversion using the same support libraries.  The
442       Subversion build system will not provide them, however.  You add them
443       by specifying parameters to the "./configure" script of the Apache
444       Server instead.
446       For getting SSL on your server, you would add the "--enable-ssl"
447       or "--with-ssl=/path/to/lib" option to Apache's "./configure"
448       script.  Apache enables zlib support by default, but you can
449       specify a nonstandard location for the library with the
450       "--with-z=/path/to/dir" option.  Consult the Apache documentation
451       for more details, and for other modules you may wish to install
452       to enhance your Subversion server.
454       If you don't already have it, you can get a copy of OpenSSL,
455       including instructions for building and packaging on both Unix
456       systems and Windows, at:
458           http://www.openssl.org/
461       8.  Berkeley DB 4.X  (OPTIONAL)
463       Berkeley DB is needed to build a Subversion server that supports
464       the BDB repository filesystem, or to access a BDB repository on
465       local disk.  If you will only use the FSFS repository filesystem,
466       or if you are building a Subversion client that will only speak
467       to remote (networked) repositories, you don't need it.
469       The current recommended version is 4.4.20, which brings
470       auto-recovery functionality to the Berkeley DB database
471       environment.  (Preliminary testing indicates that Subversion
472       will also work with Berkeley DB 4.5 once APR grows support for
473       that release.)
475       If you must use an older version of Berkeley DB, we *strongly*
476       recommend using 4.3 or 4.2 over the 4.1 or 4.0 versions.  Not
477       only are these significantly faster and more stable, but they
478       also enable Subversion repositories to automatically clean up
479       database journal files to save disk space.
481       You'll need Berkeley DB installed on your system.  You can
482       get it from:
484       http://www.oracle.com/technology/software/products/berkeley-db/index.html
486       If you have Berkeley DB installed in a place not searched by default
487       for includes and libraries, add something like this:
489           --with-berkeley-db=/usr/local/BerkeleyDB.4.4
491       to your `configure' switches, and the build process will use the
492       Berkeley library in the named directory.  You may need to use a
493       different path, of course.  Note that in order for the detection
494       to succeed, the dynamic linker must be able to find the libraries
495       at configure time.
497       If you are on the Windows platform and want to build Subversion,
498       a precompiled version of the Berkeley DB library is available for
499       download at the Subversion web site "Documents & files" area:
501           http://subversion.tigris.org/servlets/ProjectDocumentList
503       Look in the "Releases > Windows > Windows BDB" section.
506       9.  Cyrus SASL library (OPTIONAL)
508       If the Simple Authentication and Security Layer (SASL) library
509       is detected on your system, then the Subversion client and
510       svnserve server can utilize its abliities for various form of
511       authentication.  To learn more about SASL or to get the source
512       code, visit:
514          http://freshmeat.net/projects/cyrussasl/
517       10.  Apache Web Server 2.X  (OPTIONAL)
519           (http://httpd.apache.org/download.cgi)
521       The Apache httpd server is one of two methods to make your Subversion
522       repository available over a network - the other is a custom server
523       program called svnserve, which requires no extra software packages.
524       Building Subversion, the Apache server, and the modules that Apache
525       needs to communicate with Subversion are complicated enough that there
526       is a whole section at the end of this document that describes how it
527       is done: See section III for details.
530       11.  Python 2.2 or newer (http://www.python.org/)  (OPTIONAL)
532       If you want to run "make check" or build from the latest source
533       under Unix as described in section II.B and III.D, install
534       Python 2.2 or higher on your system. The majority of the test
535       suite is written in Python, as is part of Subversion's build
536       system.  Note that compiling under Windows requires Python 2.2
537       or newer.
540       12. Perl 5.8 or newer (Windows only)  (OPTIONAL)
542       To build Subversion under any of the MS Windows platforms, you
543       will also need Perl 5.8 or newer to run apr-util's w32locatedb.pl
544       script.
547       13. MASM 6 or newer (Windows only, OPTIONAL)
549       The Windows build scripts for Subversion can use the Microsoft
550       Macro Assembler (MASM) to build an optimized version of the ZLib
551       library. Make sure that the version of MASM you use is compatible
552       with the C compiler. If you're using MSVC 6, and don't have MASM 6,
553       a free MASM-compatible assembler is available here:
555           http://www.masm32.org/
557       You only need ML.EXE and ML.ERR from this distribution.
559       The VS.NET installation already contains MASM (but note, that
560       version if MASM is not compatible with MSVC 6).
563       14. Documentation
565       The primary documentation for Subversion is the free book
566       "Version Control with Subversion", a.k.a. "The Subversion Book",
567       obtainable from http://svnbook.red-bean.com/.
569       Various additional documentation exists in the doc/ subdirectory of
570       the Subversion source.  See the file doc/README for more information.
574 II.   INSTALLATION
575       ============
577   A.  Building from a Tarball or RPM
578       ------------------------------
580       1.  Building from a Tarball
582       Download the most recent distribution tarball from:
584           http://subversion.tigris.org/servlets/ProjectDocumentList
586       Unpack it, and use the standard GNU procedure to compile:
588           $ ./configure
589           $ make
590           # make install
592       You can also run the full test suite by running 'make check'.
595       2.  Building from an RPM
597       If you are using Linux (or any OS that can use RPM) then another
598       possibility is to download the binary RPM from the
599       http://summersoft.fay.ar.us/pub/subversion directory.
601       Currently only Linux on the i386 platform is supported
602       using this method.  You might also require additional RPMS
603       (which can be found in the above mentioned directory) to use the
604       subversion RPM depending on what packages you already have installed:
606           subversion*.i386.rpm
607           apache*.i386.rpm (Version 2.0.49 or greater)
608           db*.i386.rpm     (Version 4.0.14 or greater; version 4.3.27 or
609                             4.2.52 is preferred however)
610           expat            (Comes with RedHat)
611           neon             (Version 0.25.5)
613       After downloading, install it (as root user):
615           # rpm -ivh subversion*.386.rpm (add other packages as necessary)
617       Note: For an easy way to generate a new version of the RPM
618       source and binary package from the latest source code you
619       just checked out, see the packages/rpm/README file for a
620       one-line build procedure.
623   B.  Building the Latest Source under Unix
624       -------------------------------------
626       These instructions assume you have already installed Subversion
627       and checked out a working copy of Subversion's own code --
628       either the latest /trunk code, or some branch or tag.  You also
629       need to have already installed whatever prerequisites that
630       version of Subversion requires (if you haven't, the ./configure
631       step should complain).
633       You can discard the directory created by the tarball; you're
634       about to build the latest, greatest Subversion client.  This is
635       the procedure Subversion developers use.
637       First off, if you have any Subversion libraries lying around
638       from previous 'make installs', clean them up first!
640           # rm -f /usr/local/lib/libsvn*
641           # rm -f /usr/local/lib/libapr*
642           # rm -f /usr/local/lib/libexpat*
643           # rm -f /usr/local/lib/libneon*
645       Start the process by running "autogen.sh":
647           $ sh ./autogen.sh
649       This script will make sure you have all the necessary components
650       available to build Subversion.  If any are missing, you will be
651       told where to get them from.  (See the 'Build Requirements' in
652       section I.)
654       Note: if the command "autoconf" on your machine does not run
655       autoconf 2.58 or later, but you do have a new enough autoconf
656       available, then you can specify the correct one with the
657       AUTOCONF variable.  (The AUTOHEADER variable is similar.)  This
658       may be required on Debian GNU/Linux, where "autoconf" is
659       actually a Perl script that attempts to guess which version is
660       required -- because of the interaction between Subversion's and
661       APR's configuration systems, the Perl script may get it wrong.
662       So for example, you might need to do:
664           $ AUTOCONF=autoconf2.58 sh ./autogen.sh
666       Once you've prepared the working copy by running autogen.sh,
667       just follow the usual configuration and build procedure:
669           $ ./configure
670           $ make
671           # make install
673       (Optionally, you might want to pass --enable-maintainer-mode to
674       the ./configure script.  This enables debugging symbols in your
675       binaries (among other things) and most Subversion developers use it.)
677       Since the resulting binary depends on shared libraries, the
678       destination library directory must be identified in your
679       operating system's library search path. That is in either
680       /etc/ld.so.conf or $LD_LIBRARY_PATH for Linux systems and in
681       /etc/rc.conf for FreeBSD, followed by a run of the 'ldconfig'
682       program. Check your system documentation for details. By
683       identifying the destination directory, Subversion will be able
684       to dynamically load repository access plugins.  If you try to do
685       a checkout and see an error like:
687       subversion/libsvn_ra/ra_loader.c:209: (apr_err=170000)
688       svn: Unrecognized URL scheme 'http://svn.collab.net/repos/svn/trunk'
690       It probably means that the dynamic loader/linker can't find all
691       of the libsvn_* libraries.
693       Note that if you commonly build with the -jN option to make and
694       have unpacked a dependency tarball into your checkout, the make
695       step above may fail, because we don't ensure that third party
696       libraries in our source tree will finish building before
697       subversion itself.  If you want to use -jN, use the following
698       instead:
700           $ ./configure
701           $ make -jN external-all
702           $ make -jN local-all
703           $ make check
704           # make install
707   C.  Building under Unix in Different Directories
708       --------------------------------------------
710       It is possible to configure and build Subversion on Unix in a
711       directory other than the working copy. For example
713           $ svn co http://svn.collab.net/repos/svn/trunk svn
714           $ cd svn
715           $ # get neon/apr as required
716           $ chmod +x autogen.sh
717           $ ./autogen.sh
718           $ mkdir ../obj
719           $ cd ../obj
720           $ ../svn/configure [...with options as appropriate...]
721           $ make
723       puts the Subversion working copy in the directory svn and builds
724       it in a separate, parallel directory obj.
726       Why would you want to do this? Well there are a number of
727       reasons...
729           *  You may prefer to avoid "polluting" the working copy with
730              files generated during the build.
732           *  You may want to put the build directory and the working
733              copy on different physical disks to improve performance.
735           *  You may want to separate source and object code and only
736              backup the source.
738           *  You may want to remote mount the working copy on multiple
739              machines, and build for different machines from the same
740              working copy.
742           *  You may want to build multiple configurations from the
743              same working copy.
745       The last reason above is possibly the most useful.  For instance
746       you can have separate debug and optimized builds each using the
747       same working copy. Or you may want a client-only build and a
748       client-server build. Using multiple build directories you can
749       rebuild any or all configurations after an edit without the need
750       to either clean and reconfigure, or identify and copy changes
751       into another working copy.
754   D.  Installing from a Zip or Installer File under Windows
755       --------------------------------------------------------
757       Of all the ways of getting a Subversion client, this is the
758       easiest.  Download a Zip (*.zip) or self-extracting installer
759       (*-setup.exe) file from:
761       http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91
763       For a Zip file, run your unzipping utility (WinZIP, ZipGenius,
764       UltimateZIP, FreeZIP, whatever) and extract the DLLs and EXEs to
765       a directory of your choice. Included in the download is the SVN
766       client, the SVNADMIN administration tool, and the SVNLOOK
767       reporting tool.
769       Note that if you need support for non-English locales you'll have
770       to set the APR_ICONV_PATH environment variable to the path of the
771       iconv directory in the folder that contains the Subversion install.
773       You may also want to add the bin directory in the Subversion folder
774       to your PATH environment variable so as to not have to use the full
775       path when running Subversion commands.
777       To test the installation, open a DOS box (run either "cmd" or
778       "command" from the Start menu's "Run..." menu option), change to
779       the directory you installed the executables into, and run:
781           C:\test>svn co http://svn.collab.net/repos/svn/trunk svn
783       This will get the latest Subversion sources and put them into the
784       "svn" subdirectory.
786       If using a self-extracting .exe file, just run it instead of
787       unzipping it, to install Subversion.
789   E.  Building the Latest Source under Windows
790       ----------------------------------------
792   E.1 Prerequisites
794       * Visual Studio 6 and service pack. It can be built with later versions
795         of Visual Studio (Visual Studio.NET 2002, 2003, 2005 and Visual C++
796         Express 2005) but these instructions assume VS6.
797       * A recent Windows SDK if you are using Visual Studio 6.
798         You can get it from MSDN if you have it or from
799         http://www.microsoft.com/msdownload/platformsdk/sdkupdate/ if you
800         don't.
801       * Python 2.2 or higher, downloaded from http://www.python.org/ which is
802         used to generate the project files.
803       * Perl 5.8 or higher from http://www.activestate.com/
804       * Awk (from http://cm.bell-labs.com/cm/cs/who/bwk/awk95.exe) is
805         needed to compile Apache or APR.  Note that this is the actual awk
806         program, not an installer - just rename it to awk.exe and it is
807         ready to use.
808       * Neon 0.26.1 or higher, downloaded from
809         http://www.webdav.org/neon/neon-0.26.1.tar.gz which is required
810         for building the client components.  Neon is included in the zip file
811         distribution.  (0.25.0+ compiles, but does not properly support all
812         HTTP auth types.)
813       * Apache apr, apr-util, and apr-iconv libraries, version 0.9.12.
814         Included in both the Subversion dependencies ZIP file and the
815         Apache 2.058 source zip.  If you are building from a Subversion
816         checkout and have not downloaded Apache 2, then get these 3
817         libraries from http://www.apache.org/dist/apr/.  Note that
818         the 1.x APR releases are not yet functional with Subversion --
819         see the note on '[Optional] Apache 2 source' below.
820       * ZLib 1.2 or higher is required and is included in the Subversion
821         dependencies zip file or can be obtained from http://www.zlib.org
822       * Either a Subversion client binary from http://subversion.tigris.org/ to
823         do the initial checkout of the Subversion source or the zip file
824         source distribution. See the section "Bootstrapping from a Zip or
825         Installer File under Windows" above for more.
826       * A means of unpacking the files, e.g., WinZIP or similar.
828       Additional Options
830       * [Optional] Apache 2 source, downloaded from
831         http://httpd.apache.org/download.cgi, these instructions assume
832         version 2.0.58.  This is only needed for building the Subversion
833         server Apache modules.  Note that although Subversion will compile
834         against Apache 2.2.3 and APR 1.2.7, there is a bug that causes
835         runtime failures with Subversion on Windows.  The fix is included in
836         APR 1.2.8 and will be bundled in the next HTTP Server release
837         (likely to be 2.2.4).
838       * [Optional] Apache 2 msi install file, also from
839         http://httpd.apache.org/download.cgi (required for running the
840         tests).  Only needed for testing the server dso modules and if
841         you are using Visual Studio 6.
842         Note that if you are not using Visual Studio 6 (and you want to
843         run and test the server modules) then you must rebuild Apache
844         from source -- do not use the stock MSI since mixing C runtime
845         libraries is not supported.
846       * [Optional] Berkeley DB for backend support of the server
847         components -- versions 4.3.27 and 4.4.20 are available from
848         http://subversion.tigris.org/servlets/ProjectDocumentList as
849         db-4.3.27-win32.zip and db-4.4.20-win32.zip.
850         For more information see Section I.5.
851       * [Optional] Openssl 0.9.7f or higher can be obtained from
852         http://www.openssl.org/source/openssl-0.9.7f.tar.gz
853       * [Optional] A modified version of GNU libintl, called
854         svn-win32-libintl.zip, can be used for displaying localized
855         messages. Available at:
856         http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=2627
857       * [Optional] GNU gettext for generating message catalog (.mo)
858         files from message translations. You can get the latest
859         binaries from http://gnuwin32.sourceforge.net/. You'll need the
860         binaries (gettext-0.14.1-bin.zip) and dependencies
861         (gettext-0.14.1-dep.zip).
862       * [Optional] An assembler, e.g., MASM32 from http://www.masm32.com/
863         or nasm which is available from
864         http://www.kernel.org/pub/software/devel/nasm/binaries/win32/
866   E.2 Notes
868       The Neon library supports secure connections with OpenSSL and
869       on-the-wire compression with zlib. If you want to use the
870       secure connections feature, you should pass the option
871       "--with-openssl" to the gen-make.py script. See Section I.11 for
872       more details.
874       If you are installing under Win9x or NT4 (and do not have Internet
875       Explorer 5 or later) and svn.exe doesn't run, try installing
876       shfolder.dll from here (wrapped url):
878           http://download.microsoft.com/download/platformsdk/Redist/
879           5.50.4027.300/W9XNT4/EN-US/shfinst.EXE
881   E.3 Preparation
883       This section describes how to unpack the files to make a build tree.
885       * Make a directory SVN and cd into it.
886       * Either checkout Subversion:
888           svn co http://svn.collab.net/repos/svn/trunk/ src-trunk
890         or unpack the zip file distribution and rename the directory to
891         src-trunk.
893       * Install Visual Studio 6. You either have to tell the installer to
894         register environment variables or run VCVARS32.BAT before building
895         anything.  If you are using a newer Visual Studio, use the
896         'Visual Studio 200x Command Prompt' on the Start menu.
897       * Install and register a recent Windows Core SDK if you are using
898         Visual Studio 6. This is a quote from the Microsoft February 2003
899         SDK documentation:
901        "To register the SDK bin, include, and library directories with
902         Microsoft Visual Studio® version 6.0 and Visual Studio .NET,
903         click Start, point to All Programs, point to Microsoft Platform
904         SDK February 2003, point to Visual Studio Registration, and then
905         click Register PSDK Directories with Visual Studio. This
906         registration process places the SDK bin, include, and library
907         directories at the beginning of the search paths, which ensures
908         that the latest headers and libraries are used when building
909         applications in the IDE. Note that for Visual Studio 6.0
910         integration to succeed, Visual Studio 6.0 must run at least once
911         before you select Register PSDK Directories with Visual
912         Studio. Also note that when this option is run, the IDEs should
913         not be running."
915       * Install Python and add it to your path
916       * Install Perl (it should add itself to the path)
917       * Copy AWK (awk95.exe) to awk.exe (e.g. SVN\awk\awk.exe) and add
918         the directory containing it (e.g. SVN\awk) to the path.
919       * Install Apache 2 using the msi file if you are going to test the
920         server dso modules and are using Visual Studio 6.  You must build
921         and install it from source if you are not using Visual Studio 6 and
922         want to build and/or test the server modules.
923       * If you checked out Subversion from the repository then extract neon
924         into SVN\src-trunk\neon, the zip file source distribution includes
925         neon.
926       * If you want BDB backend support, extract the Berkeley DB files
927         into SVN\src-trunk\db4-win32. It's a good idea to add
928         SVN\src-trunk\db4-win32\bin to your PATH, so that Subversion can find
929         the Berkeley DB DLLs.
931         [NOTE: This binary package of Berkeley DB is provided for
932             convenience only. Please don't address questions about
933             Berkeley DB that aren't directly related to using Subversion
934             to the project mailing list.]
936         If you build Berkeley DB from the source, you will have to copy
937         the file db-x.x.x\build_win32\db.h to
938         SVN\src-trunk\db4-win32\include, and all the import libraries to
939         SVN\src-trunk\db4-win32\lib. Again, the DLLs should be somewhere in
940         your path.
942       * If you want to build the server modules, extract Apache source into
943         SVN\httpd-2.x.x.
944       * If you are building from a checkout of Subversion, and you are NOT
945         building Apache, then you will need the APR libraries.  Depending
946         on how you got your version of APR, either:
947           - Extract the APR, APR-util and APR-iconv source distributions into
948             SVN\apr, SVN\apr-util, and SVN\apr-iconv respectively.
949         Or:
950           - Extract the apr, apr-util and apr-iconv directories from the
951             srclib folder in the Apache httpd source into SVN\apr,
952             SVN\apr-util, and SVN\apr-iconv respectively.
953       * Extract the ZLib sources into SVN\zlib if you are not using the zlib
954         included in the dependencies zip file.
955       * If you want secure connection (https) client support, extract openssl
956         into SVN\openssl-x.x.x
957       * If you want localized message support, extract svn-win32-libintl.zip
958         into SVN\svn-win32-libintl and extract gettext-x.x.x-bin.zip and
959         gettext-x.x.x-dep.zip into SVN\gettext-x.x.x-bin.
960         Add SVN\gettext-x.x.x-bin\bin to your path.
961       * [Optional] Extract MASM32 (only the ML.EXE and ML.ERR files) into
962         SVN\asm (or extract nasm into SVN\asm) and put it in your path.
964   E.4 Building the Binaries
966       To build the binaries either follow the instructions here or use
967       build\win32\vc6-build.bat.in after editing its default paths to match
968       yours and saving it as vc6-build.bat.  The vc6-build.bat does a full build
969       using all options so it requires Apache 2 source and the other optional
970       components.
972       Start in the SVN directory you created.
974       Set up the environment (commands should be one line even if wrapped here).
976       C:>set VER=trunk
977       C:>set DIR=trunk
978       C:>set DRIVE=C
979       C:>set PYTHONDIR=C:\Python22
980       C:>set AWKDIR=C:\SVN\Awk
981       C:>set ASMDIR=C:\SVN\asm
982       C:>set SDKINC=C:\Program Files\Microsoft SDK\include
983       C:>set SDKLIB=C:\Program Files\Microsoft SDK\lib
984       C:>set GETTEXTBIN=C:\SVN\gettext-0.14.1-bin\bin
985       C:>PATH=%PATH%;%DRIVE%:\SVN\src-%DIR%\db4-win32;%ASMDIR%;
986               %PYTHONDIR%;%AWKDIR%;%GETTEXTBIN%
987       C:>set INCLUDE=%SDKINC%;%INCLUDE%
988       C:>set LIB=%SDKLIB%;%LIB%
990       OpenSSL
992       C:>cd openssl-0.9.7f
993       C:>perl Configure VC-WIN32
994   [*] C:>call ms\do_masm
995       C:>nmake -f ms\ntdll.mak
996       C:>cd out32dll
997       C:>call ..\ms\test
998       C:>cd ..\..
1000       *Note: Use "call ms\do_nasm" of you have nasm instead of MASM, or
1001              "call ms\do_ms" if you don't have an assembler.
1003       Apache 2
1005       This step is only required for building the server dso modules.
1007       The Subversion gen-make.py script must be run before building Apache or
1008       Apache and Subversion will be running incompatible versions of apr.
1010       C:>cd src-%DIR%
1011       C:>python gen-make.py -t dsp --with-httpd=..\httpd-2.0.58
1012          --with-berkeley-db=db4-win32 --with-openssl=..\openssl-0.9.7f
1013          --with-zlib=..\zlib --with-libintl=..\svn-win32-libintl
1014       C:>cd ..
1015       C:>set APACHEDIR=C:\Program Files\Apache Group\Apache2
1016       C:>msdev httpd-2.0.58\apache.dsw /MAKE "BuildBin - Win32 Release"
1018       Subversion
1020       Things to note:
1022       * If you don't want to build mod_dav_svn, omit the --with-httpd
1023         option.  The zip file source distribution contains apr, apr-util and
1024         apr-iconv in the default build location. If you have downloaded the
1025         apr files yourself you will have to tell the generator where to find
1026         the APR libraries; the options are --with-apr, --with-apr-util and
1027         --with-apr-iconv.
1028       * If you would like a debug build substitute Debug for Release in
1029         the msdev commands.
1030       * There have been rumors that Subversion on Win32 can be built
1031         using the latest cygwin, you probably don't want the zip file source
1032         distribution though. ymmv.
1033       * The /USEENV switch to msdev makes it take notice of the INCLUDE and
1034         LIB environment variables, it also makes it ignore its own lib and
1035         include settings so you need to have the Windows SDK lib and include
1036         directories in the LIB and INCLUDE environment variables.  Do *not*
1037         use this switch when starting up the msdev Visual environment.  If you
1038         wish to build in the Visual environment the SDK lib and include
1039         directories must be in the Tools/Options/Directories settings (if you
1040         followed the 'Register the SDK with Visual Studio 6' instructions
1041         above this has been done for you).
1042       * If you are using Visual Studio .NET change -t dsw into -t vcproj and
1043         add the --vsnet-version=200x option on the gen-make.py command.
1044         In this case you will also have to distribute the C runtime dll with
1045         the binaries.  Also, since Apache/APR do not provide .vcproj files,
1046         you will need to convert the Apache/APR .dsp files to .vcproj files
1047         with Visual Studio before building -- just open the Apache .dsw file
1048         and answer 'Yes To All' when the conversion dialog pops up, or you
1049         can open the individual .dsp files and convert them one at a time.
1050         The Apache/APR projects required by Subversion are:
1051         apr-util\libaprutil.dsp, apr\libapr.dsp,
1052         apr-iconv\libapriconv.dsp, apr-util\xml\expat\lib\xml.dsp,
1053         apr-util\uri\gen_uri_delims.dsp (for APR 0.9.x),
1054         apr-iconv\ccs\libapriconv_ccs_modules.dsp, and
1055         apr-iconv\ces\libapriconv_ces_modules.dsp.
1056       * If the server dso modules are being built and tested Apache must not
1057         be running or the copy of the dso modules will fail.
1059       C:>cd src-%DIR%
1061       If Apache 2 has been built and the server modules are required then
1062       gen-make.py will already have been run. If the source is from the zip
1063       file, Apache 2 has not been built so gen-make.py must be run:
1065       C:>python gen-make.py -t dsp --with-berkeley-db=db4-win32
1066           --with-openssl=..\openssl-0.9.7f --with-zlib=..\zlib
1067           --with-libintl=..\svn-win32-libintl
1069       Then build subversion:
1071       C:>msdev subversion_msvc.dsw /USEENV /MAKE "__ALL_TESTS__ - Win32 Release"
1072       C:>cd ..
1074       Or, with Visual C++.NET 2002, 2003, 2005:
1076       C:>devenv subversion_vcnet.sln /build "Release" /project "__ALL_TESTS__"
1077       C:>cd ..
1079       Or, with Visual C++ Express 2005:
1081       C:>msbuild subversion_vcnet.sln /t:__ALL_TESTS__ /p:Configuration=Release
1082       C:>cd ..
1084       The binaries have now been built.
1086   E.5 Packaging the binaries
1088       You now need to copy the binaries ready to make the release zip
1089       file. You also need to do this to run the tests as the new binaries
1090       need to be in your path. You can use the build/win32/make_dist.py
1091       script in the Subversion source directory to do that.
1093       [TBD: Describe how to do this. Note dependencies on zip, jar, doxygen.]
1095   E.6 Testing the Binaries
1096       [TBD: It's been a long, long while since it was necessary to move
1097             binaries around for testing. win-tests.py does that automagically.
1098             Fix this section accordingly, and probably reorder, putting
1099             the packaging at the end.]
1101       The build process creates the binary test programs but it does not
1102       copy the client tests into the release test area.
1104       C:>cd src-%DIR%
1105       C:>mkdir Release\subversion\tests\cmdline
1106       C:>xcopy /S /Y subversion\tests\cmdline Release\subversion\tests\cmdline
1108       If the server dso modules  have been built then copy the dso files and
1109       dlls into the Apache modules directory.
1111       C:>copy Release\subversion\mod_dav_svn\mod_dav_svn.so "%APACHEDIR%"\modules
1112       C:>copy Release\subversion\mod_authz_svn\mod_authz_svn.so
1113          "%APACHEDIR%"\modules
1114       C:>copy svn-win32-%VER%\bin\intl.dll "%APACHEDIR%\bin"
1115       C:>copy svn-win32-%VER%\bin\iconv.dll "%APACHEDIR%\bin"
1116       C:>copy svn-win32-%VER%\bin\libdb42.dll "%APACHEDIR%\bin"
1117       C:>cd ..
1119       Put the svn-win32-trunk\bin directory at the start of your path so
1120       you run the newly built binaries and not another version you might
1121       have installed.
1123       Then run the client tests:
1125       C:>PATH=%DRIVE%:\SVN\svn-win32-%VER%\bin;%PATH%
1126       C:>cd src-%DIR%
1127       C:>python win-tests.py -c -r -v
1129       If the server dso modules were built configure Apache to use the
1130       mod_dav_svn and mod_authz_svn modules by making sure these lines appear
1131       uncommented in httpd.conf:
1133         LoadModule dav_module         modules/mod_dav.so
1134         LoadModule dav_fs_module      modules/mod_dav_fs.so
1135         LoadModule dav_svn_module     modules/mod_dav_svn.so
1136         LoadModule authz_svn_module   modules/mod_authz_svn.so
1138       And further down the file add location directives to point to the
1139       test repositories. Change the paths to the SVN directory you created
1140       (paths should be on one line even if wrapped here):
1142         <Location /svn-test-work/repositories>
1143          DAV svn
1144          SVNParentPath C:/SVN/src-trunk/Release/subversion/tests/cmdline/
1145                        svn-test-work/repositories
1146         </Location>
1148         <Location /svn-test-work/local_tmp/repos>
1149          DAV svn
1150          SVNPath c:/SVN/src-trunk/Release/subversion/tests/cmdline/
1151                  svn-test-work/local_tmp/repos
1152         </Location>
1154       Then restart Apache and run the tests:
1156       C:>python win-tests.py -c -r -v -u http://localhost
1157       C:>cd ..
1159 III.  BUILDING A SUBVERSION SERVER
1160       ============================
1162       Subversion has two servers you can choose from:  svnserve and
1163       Apache.  svnserve is a small, lightweight server program that is
1164       automatically compiled when you build Subversion's source.  Apache
1165       is a more heavyweight HTTP server, but tends to have more features.
1167       This section primarily focuses on how to build Apache and the
1168       accompanying mod_dav_svn server module for it.  If you plan to use
1169       svnserve instead, jump right to section E for a quick explanation.
1172   A.  Setting Up Apache
1173       -----------------
1175       (Following the BOOTSTRAPPING FROM RPM procedures above will install and
1176       build the latest Subversion server for Linux RedHat 7.1, 7.2, and PPC
1177       Linux systems *IF* the apache-devel-2.0.41 or greater package is already
1178       installed when the SUBVERSION RPM is built.)
1181       1.  Obtaining and Installing Apache 2
1183       Subversion tries to compile against the latest released version
1184       of Apache httpd 2.X.  The easiest thing for you to do is download
1185       a source tarball of the latest release and unpack that.
1188         ****************************************************************
1189         **    IMPORTANT ISSUE ABOUT APACHE VERSIONS:  READ THIS.      **     
1190         **                                                            ** 
1191         ****************************************************************
1192         |                                                              |
1193         | First, be sure to read the APR version warning box, back in  |
1194         | section I.C.1, which explains that APR 0.9.x and 1.X are     |
1195         | binary-incompatible.                                         |
1196         |                                                              |
1197         |    Apache HTTPD 2.0 uses APR 0.9.x.                          |
1198         |    Apache HTTPD 2.2 uses APR 1.2.x.                          |
1199         |                                                              |
1200         | We recommend using the latest Apache.  However, whatever     |
1201         | version you choose, you *must* ensure that Subversion        |
1202         | and Apache are using the same version of APR.  If you don't, |
1203         | things will segfault and break.                              |
1204         |______________________________________________________________|
1205                                                                         
1207       If you have questions about the Apache httpd 2.0 build, please consult
1208       the httpd install documentation:
1210           http://httpd.apache.org/docs-2.0/install.html
1212       At the top of the httpd tree:
1214           $ ./buildconf
1215           $ ./configure --enable-dav --enable-so --enable-maintainer-mode
1217       The first arg says to build mod_dav.
1219       The second arg says to enable shared module support which is needed
1220       for a typical compile of mod_dav_svn (see below).
1222       The third arg says to include debugging information.  If you
1223       built Subversion with --enable-maintainer-mode, then you should
1224       do the same for Apache; there can be problems if one was
1225       compiled with debugging and the other without.
1227       Note: if you have multiple db versions installed on your system,
1228       Apache might link to a different one than Subversion, causing
1229       failures when accessing the repository through Apache.  To prevent
1230       this from happening, you have to tell Apache which db version to
1231       use and where to find db.  Add --with-dbm=db4 and
1232       --with-berkeley-db=/usr/local/BerkeleyDB.4.2 to the configure
1233       line.  Make sure this is the same db as the one Subversion uses.
1234       This note assumes you have installed Berkeley DB 4.2.52
1235       at its default locations.  For more info about the db requirement,
1236       see section I.5.
1238       You may also want to include other modules in your build. Add
1239       --enable-ssl to turn on SSL support, and --enable-deflate to turn on
1240       compression support, for example.  Consult the Apache documentation
1241       for more details.
1243       All instructions below assume you configured Apache to install
1244       in its default location, /usr/local/apache2/; substitute
1245       appropriately if you chose some other location.
1247       Compile and install apache:
1249           $ make && make install
1252   B.  Making and Installing the Subversion Apache Server Module
1253       ---------------------------------------------------------
1255       Go back into your subversion working copy and run ./autogen.sh if
1256       you need to.  Then, assuming Apache httpd 2.0 is installed in the
1257       standard location, run:
1259           $ ./configure
1261       Note: do *not* configure subversion with "--disable-shared"!
1262       mod_dav_svn *must* be built as a shared library, and it will
1263       look for other libsvn_*.so libraries on your system.
1265       If you see a warning message that the build of mod_dav_svn is
1266       being skipped, this may be because you have Apache httpd 2.X
1267       installed in a non-standard location.  You can use the
1268       "--with-apxs=" option to locate the apxs script:
1270           $ ./configure --with-apxs=/usr/local/apache2/bin/apxs
1272       Note: it *is* possible to build mod_dav_svn as a static library
1273       and link it directly into Apache. Possible, but painful. Stick
1274       with the shared library for now; if you can't, then ask.
1276           $ rm /usr/local/lib/libsvn*
1278       If you have old subversion libraries sitting on your system,
1279       libtool will link them instead of the `fresh' ones in your tree.
1280       Remove them before building subversion.
1282           $ make clean && make && make install
1284       After the make install, the Subversion shared libraries are in
1285       /usr/local/lib/.  mod_dav_svn.so should be installed in
1286       /usr/local/apache2/modules/.
1289       Section II.E explains how to build the server on Windows.
1292   C.  Configuring Apache for Subversion
1293       ---------------------------------
1295       The following section is an abbreviated version of the
1296       information in the Subversion Book
1297       (http://svnbook.red-bean.com).  Please read chapter 6 for more
1298       details.
1300       The following assumes you have already created a repository.
1301       For documentation on how to do that, see README.
1303       The following also assumes that you have modified
1304       /usr/local/apache2/conf/httpd.conf to reflect your setup.
1305       At a minimum you should look at the User, Group and ServerName
1306       directives.  Full details on setting up apache can be found at:
1307       http://httpd.apache.org/docs-2.0/
1309       First, your httpd.conf needs to load the mod_dav_svn module.
1310       Subversion's 'make install' target should automatically add this
1311       line for you.  But if apache gives you an error like "Unknown
1312       DAV provider: svn", then you may want to verify that this line
1313       exists in your httpd.conf:
1315          LoadModule dav_svn_module     modules/mod_dav_svn.so
1317       NOTE: if you built mod_dav as a dynamic module as well, make sure
1318       the above line appears after the one that loads mod_dav.so.
1320       Next, add this to the *bottom* of your httpd.conf:
1322       <Location /svn/repos>
1323           DAV svn
1324           SVNPath /absolute/path/to/repository
1325       </Location>
1327       This will give anyone unrestricted access to the repository.  If
1328       you want limited access, read or write, you add these lines to
1329       the Location block:
1331           AuthType Basic
1332           AuthName "Subversion repository"
1333           AuthUserFile /my/svn/user/passwd/file
1335       And:
1337           a) For a read/write restricted repository:
1339              Require valid-user
1341           b) For a write restricted repository:
1343              <LimitExcept GET PROPFIND OPTIONS REPORT>
1344                  Require valid-user
1345              </LimitExcept>
1347           c) For separate restricted read and write access:
1349              AuthGroupFile /my/svn/group/file
1351              <LimitExcept GET PROPFIND OPTIONS REPORT>
1352                  Require group svn_committers
1353              </LimitExcept>
1355              <Limit GET PROPFIND OPTIONS REPORT>
1356                  Require group svn_committers
1357                  Require group svn_readers
1358              </Limit>
1360       These are only a few simple examples.  For a complete tutorial
1361       on Apache access control, please consider taking a look at the
1362       tutorials found under "Security" on the following page:
1363       http://httpd.apache.org/docs-2.0/misc/tutorials.html
1365       In order for 'svn cp' to work (which is actually implemented as a
1366       DAV COPY command), mod_dav needs to be able to determine the
1367       hostname of the server.  A standard way of doing this is to use
1368       Apache's ServerName directive to set the server's hostname.  Edit
1369       your /usr/local/apache2/conf/httpd.conf to include:
1371       ServerName svn.myserver.org
1373       If you are using virtual hosting through Apache's NameVirtualHost
1374       directive, you may need to use the ServerAlias directive to specify
1375       additional names that your server is known by.
1377       If you have configured mod_deflate to be in the server, you can enable
1378       compression support for your repository by adding the following line
1379       to your Location block:
1381           SetOutputFilter DEFLATE
1384       NOTE: If you are unfamiliar with an Apache directive, or not exactly
1385       sure about what it does, don't hesitate to look it up in the
1386       documentation: http://httpd.apache.org/docs-2.0/mod/directives.html.
1388       NOTE: Make sure that the user 'nobody' (or whatever UID the
1389       httpd process runs as) has permission to read and write the
1390       Berkeley DB files!  This is a very common problem.
1393   D.  Running and Testing
1394       -------------------
1396       Fire up apache 2:
1398           $ /usr/local/apache2/bin/apachectl stop
1399           $ /usr/local/apache2/bin/apachectl start
1401       Check /usr/local/apache2/logs/error_log to make sure it started
1402       up okay.
1404       Try doing a network checkout from the repository:
1406           $ svn co http://localhost/svn/repos wc
1408       The most common reason this might fail is permission problems
1409       reading the repository db files.  If the checkout fails, make
1410       sure that the httpd process has permission to read and write to
1411       the repository.  You can see all of mod_dav_svn's complaints in
1412       the Apache error logfile, /usr/local/apache2/logs/error_log.
1414       To run the regression test suite for networked Subversion, see
1415       the instructions in subversion/tests/cmdline/README.
1416       For advice about tracing problems, see "Debugging the server" in
1417       www/hacking.html.
1420   E.  Alternative:  'svnserve' and ra_svn
1421       -----------------------------------
1423       An alternative network layer is libsvn_ra_svn (on the client
1424       side) and the 'svnserve' process on the server.  This is a
1425       simple network layer that speaks a custom protocol over plain
1426       TCP (documented in libsvn_ra_svn/protocol):
1428          $ svnserve -d     # becomes a background daemon
1429          $ svn checkout svn://localhost/usr/local/svn/repository
1431       You can use the "-r" option to svnserve to set a logical root
1432       for repositories, and the "-R" option to restrict connections to
1433       read-only access.  ("Read-only" is a logical term here; svnserve
1434       still needs write access to the database in this mode, but will
1435       not allow commits or revprop changes.)
1437       'svnserve' has built-in CRAM-MD5 authentication (so you can use
1438       non-system accounts), and can also be tunneled over SSH (so you
1439       can use existing system accounts).  It's also capable of using
1440       Cyrus SASL if libsasl2 is detected at ./configure time.  Please
1441       read chapter 6 in the Subversion Book
1442       (http://svnbook.red-bean.com) for details on these features.
1446 IV.   PLATFORM-SPECIFIC ISSUES
1447       ========================
1449   A.  Windows XP
1450       ----------
1452       There is an error in the Windows XP TCP/IP stack which causes
1453       corruption in certain cases.  This problem is exposed only
1454       through ra_dav.
1456       The root of the matter is caused by duplicating file handles
1457       between parent and child processes.  The httpd Apache group
1458       explains this a lot better:
1460           http://www.apache.org/dist/httpd/binaries/win32/#xpbug
1462       And there's an item about this in the Subversion FAQ:
1464           http://subversion.tigris.org/faq.html#windows-xp-server
1466       The only known workaround for now is to update to Windows XP
1467       SP1 (or higher).
1470   B.  Mac OS X
1471       --------
1473       [TBD: Describe BDB 4.0.x problem]
1477 V.    PROGRAMMING LANGUAGE BINDINGS (PYTHON, PERL, RUBY, JAVA)
1478       ========================================================
1479   
1480       For Python, Perl and Ruby bindings, see the file     
1482           ./subversion/bindings/swig/INSTALL
1484       For Java bindings, see the file
1486           ./subversion/bindings/javahl/README