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