Alien-SVN
view release on metacpan or search on metacpan
src/subversion/INSTALL view on Meta::CPAN
# rpm -ivh subversion*.386.rpm (add other packages as necessary)
Note: For an easy way to generate a new version of the RPM
source and binary package from the latest source code you
just checked out, see the packages/rpm/README file for a
one-line build procedure.
B. Building the Latest Source under Unix
-------------------------------------
These instructions assume you have already installed Subversion
and checked out a working copy of Subversion's own code --
either the latest /trunk code, or some branch or tag. You also
need to have already installed whatever prerequisites that
version of Subversion requires (if you haven't, the ./configure
step should complain).
You can discard the directory created by the tarball; you're
about to build the latest, greatest Subversion client. This is
the procedure Subversion developers use.
First off, if you have any Subversion libraries lying around
from previous 'make installs', clean them up first!
# rm -f /usr/local/lib/libsvn*
# rm -f /usr/local/lib/libapr*
# rm -f /usr/local/lib/libexpat*
# rm -f /usr/local/lib/libserf*
Start the process by running "autogen.sh":
$ sh ./autogen.sh
This script will make sure you have all the necessary components
available to build Subversion. If any are missing, you will be
told where to get them from. (See the 'Build Requirements' in
section I.)
Note: if the command "autoconf" on your machine does not run
autoconf 2.59 or later, but you do have a new enough autoconf
available, then you can specify the correct one with the
AUTOCONF variable. (The AUTOHEADER variable is similar.) This
may be required on Debian GNU/Linux, where "autoconf" is
actually a Perl script that attempts to guess which version is
required -- because of the interaction between Subversion's and
APR's configuration systems, the Perl script may get it wrong.
So for example, you might need to do:
$ AUTOCONF=autoconf2.59 sh ./autogen.sh
Once you've prepared the working copy by running autogen.sh,
just follow the usual configuration and build procedure:
$ ./configure
$ make
# make install
(Optionally, you might want to pass --enable-maintainer-mode to
the ./configure script. This enables debugging symbols in your
binaries (among other things) and most Subversion developers use it.)
Since the resulting binary depends on shared libraries, the
destination library directory must be identified in your
operating system's library search path. That is in either
/etc/ld.so.conf or $LD_LIBRARY_PATH for Linux systems and in
/etc/rc.conf for FreeBSD, followed by a run of the 'ldconfig'
program. Check your system documentation for details. By
identifying the destination directory, Subversion will be able
to dynamically load repository access plugins. If you try to do
a checkout and see an error like:
subversion/libsvn_ra/ra_loader.c:209: (apr_err=170000)
svn: Unrecognized URL scheme 'https://svn.apache.org/repos/asf/subversion/trunk'
It probably means that the dynamic loader/linker can't find all
of the libsvn_* libraries.
C. Building under Unix in Different Directories
--------------------------------------------
It is possible to configure and build Subversion on Unix in a
directory other than the working copy. For example
$ svn co https://svn.apache.org/repos/asf/subversion/trunk svn
$ cd svn
$ # get SQLite amalgamation if required
$ chmod +x autogen.sh
$ ./autogen.sh
$ mkdir ../obj
$ cd ../obj
$ ../svn/configure [...with options as appropriate...]
$ make
puts the Subversion working copy in the directory svn and builds
it in a separate, parallel directory obj.
Why would you want to do this? Well there are a number of
reasons...
* You may prefer to avoid "polluting" the working copy with
files generated during the build.
* You may want to put the build directory and the working
copy on different physical disks to improve performance.
* You may want to separate source and object code and only
backup the source.
* You may want to remote mount the working copy on multiple
machines, and build for different machines from the same
working copy.
* You may want to build multiple configurations from the
same working copy.
The last reason above is possibly the most useful. For instance
you can have separate debug and optimized builds each using the
same working copy. Or you may want a client-only build and a
client-server build. Using multiple build directories you can
rebuild any or all configurations after an edit without the need
to either clean and reconfigure, or identify and copy changes
into another working copy.
D. Installing from a Zip or Installer File under Windows
--------------------------------------------------------
Of all the ways of getting a Subversion client, this is the
easiest. Download a Zip (*.zip) or self-extracting installer
(*-setup.exe) file from:
http://subversion.apache.org/packages#windows
For a Zip file, run your unzipping utility (WinZIP, ZipGenius,
UltimateZIP, FreeZIP, whatever) and extract the DLLs and EXEs to
a directory of your choice. Included in the download is the SVN
client, the SVNADMIN administration tool, and the SVNLOOK
reporting tool.
Note that if you need support for non-English locales you'll have
to set the APR_ICONV_PATH environment variable to the path of the
iconv directory in the folder that contains the Subversion install.
You may also want to add the bin directory in the Subversion folder
to your PATH environment variable so as to not have to use the full
path when running Subversion commands.
To test the installation, open a DOS box (run either "cmd" or
"command" from the Start menu's "Run..." menu option), change to
the directory you installed the executables into, and run:
C:\test>svn co https://svn.apache.org/repos/asf/subversion/trunk svn
This will get the latest Subversion sources and put them into the
"svn" subdirectory.
If using a self-extracting .exe file, just run it instead of
unzipping it, to install Subversion.
E. Building the Latest Source under Windows
----------------------------------------
E.1 Prerequisites
* Visual Studio 6 and service pack. It can be built with later versions
of Visual Studio (Visual Studio.NET 2002, 2003, 2005, 2008 and Visual
C++ Express 2005, 2008) but these instructions assume VS6.
* A recent Windows SDK. (Not needed with Visual Studio 2005 and later)
If you are using Visual Studio 6, you need the latest SDK which
is compatible with VC6, which is the one from february 2003.
You can get it from MSDN:
http://www.microsoft.com/msdownload/platformsdk/sdkupdate/psdk-full.htm
* Python 2.5 or higher, downloaded from http://www.python.org/ which is
used to generate the project files.
* Perl 5.8 or higher from http://www.activestate.com/
* Awk (from http://www.cs.princeton.edu/~bwk/btl.mirror/awk95.exe) is
needed to compile Apache or APR. Note that this is the actual awk
src/subversion/INSTALL view on Meta::CPAN
yours and saving it as vc6-build.bat. The vc6-build.bat does a full build
using all options so it requires Apache 2 source and the other optional
components.
Start in the SVN directory you created.
Set up the environment (commands should be one line even if wrapped here).
C:>set VER=trunk
C:>set DIR=trunk
C:>set DRIVE=C
C:>set PYTHONDIR=C:\Python22
C:>set AWKDIR=C:\SVN\Awk
C:>set ASMDIR=C:\SVN\asm
C:>set SDKINC=C:\Program Files\Microsoft SDK\include
C:>set SDKLIB=C:\Program Files\Microsoft SDK\lib
C:>set GETTEXTBIN=C:\SVN\gettext-0.14.1-bin\bin
C:>PATH=%PATH%;%DRIVE%:\SVN\src-%DIR%\db4-win32;%ASMDIR%;
%PYTHONDIR%;%AWKDIR%;%GETTEXTBIN%
C:>set INCLUDE=%SDKINC%;%INCLUDE%
C:>set LIB=%SDKLIB%;%LIB%
OpenSSL
C:>cd openssl-0.9.7f
C:>perl Configure VC-WIN32
[*] C:>call ms\do_masm
C:>nmake -f ms\ntdll.mak
C:>cd out32dll
C:>call ..\ms\test
C:>cd ..\..
*Note: Use "call ms\do_nasm" if you have nasm instead of MASM, or
"call ms\do_ms" if you don't have an assembler.
Apache 2
This step is only required for building the server dso modules.
The Subversion gen-make.py script must be run before building Apache or
Apache and Subversion will be running incompatible versions of apr.
C:>cd src-%DIR%
C:>python gen-make.py -t dsp --with-httpd=..\httpd-2.0.58
--with-berkeley-db=db4-win32 --with-openssl=..\openssl-0.9.7f
--with-zlib=..\zlib --with-libintl=..\svn-win32-libintl
C:>cd ..
C:>set APACHEDIR=C:\Program Files\Apache Group\Apache2
C:>msdev httpd-2.0.58\apache.dsw /MAKE "BuildBin - Win32 Release"
Subversion
Things to note:
* If you don't want to build mod_dav_svn, omit the --with-httpd
option. The zip file source distribution contains apr, apr-util and
apr-iconv in the default build location. If you have downloaded the
apr files yourself you will have to tell the generator where to find
the APR libraries; the options are --with-apr, --with-apr-util and
--with-apr-iconv.
* If you would like a debug build substitute Debug for Release in
the msdev commands.
* There have been rumors that Subversion on Win32 can be built
using the latest cygwin, you probably don't want the zip file source
distribution though. ymmv.
* The /USEENV switch to msdev makes it take notice of the INCLUDE and
LIB environment variables, it also makes it ignore its own lib and
include settings so you need to have the Windows SDK lib and include
directories in the LIB and INCLUDE environment variables. Do *not*
use this switch when starting up the msdev Visual environment. If you
wish to build in the Visual environment the SDK lib and include
directories must be in the Tools/Options/Directories settings (if you
followed the 'Register the SDK with Visual Studio 6' instructions
above this has been done for you).
* If you are using Visual Studio .NET change -t dsw into -t vcproj and
add the --vsnet-version=200x option on the gen-make.py command.
In this case you will also have to distribute the C runtime dll with
the binaries. Also, since Apache/APR do not provide .vcproj files,
you will need to convert the Apache/APR .dsp files to .vcproj files
with Visual Studio before building -- just open the Apache .dsw file
and answer 'Yes To All' when the conversion dialog pops up, or you
can open the individual .dsp files and convert them one at a time.
The Apache/APR projects required by Subversion are:
apr-util\libaprutil.dsp, apr\libapr.dsp,
apr-iconv\libapriconv.dsp, apr-util\xml\expat\lib\xml.dsp,
apr-util\uri\gen_uri_delims.dsp (for APR 0.9.x),
apr-iconv\ccs\libapriconv_ccs_modules.dsp, and
apr-iconv\ces\libapriconv_ces_modules.dsp.
* If the server dso modules are being built and tested Apache must not
be running or the copy of the dso modules will fail.
C:>cd src-%DIR%
If Apache 2 has been built and the server modules are required then
gen-make.py will already have been run. If the source is from the zip
file, Apache 2 has not been built so gen-make.py must be run:
C:>python gen-make.py -t dsp --with-berkeley-db=db4-win32
--with-openssl=..\openssl-0.9.7f --with-zlib=..\zlib
--with-libintl=..\svn-win32-libintl
Then build subversion:
C:>msdev subversion_msvc.dsw /USEENV /MAKE "__ALL_TESTS__ - Win32 Release"
C:>cd ..
Or, with Visual C++.NET 2002, 2003, 2005:
C:>devenv subversion_vcnet.sln /build "Release" /project "__ALL_TESTS__"
C:>cd ..
Or, with Visual C++ Express 2005:
C:>msbuild subversion_vcnet.sln /t:__ALL_TESTS__ /p:Configuration=Release
C:>cd ..
The binaries have now been built.
E.5 Packaging the binaries
You now need to copy the binaries ready to make the release zip
src/subversion/INSTALL view on Meta::CPAN
Subversion has two servers you can choose from: svnserve and
Apache. svnserve is a small, lightweight server program that is
automatically compiled when you build Subversion's source. Apache
is a more heavyweight HTTP server, but tends to have more features.
This section primarily focuses on how to build Apache and the
accompanying mod_dav_svn server module for it. If you plan to use
svnserve instead, jump right to section E for a quick explanation.
A. Setting Up Apache
-----------------
(Following the BOOTSTRAPPING FROM RPM procedures above will install and
build the latest Subversion server for Linux RedHat 7.1, 7.2, and PPC
Linux systems *IF* the apache-devel-2.0.41 or greater package is already
installed when the SUBVERSION RPM is built.)
1. Obtaining and Installing Apache 2
Subversion tries to compile against the latest released version
of Apache httpd 2.X. The easiest thing for you to do is download
a source tarball of the latest release and unpack that.
****************************************************************
** IMPORTANT ISSUE ABOUT APACHE VERSIONS: READ THIS. **
** **
****************************************************************
| |
| First, be sure to read the APR version warning box, back in |
| section I.C.1, which explains that APR 0.9.x and 1.X are |
| binary-incompatible. |
| |
| Apache HTTPD 2.0 uses APR 0.9.x. |
| Apache HTTPD 2.2 uses APR 1.2.x. |
| |
| We recommend using the latest Apache. However, whatever |
| version you choose, you *must* ensure that Subversion |
| and Apache are using the same version of APR. If you don't, |
| things will segfault and break. |
|______________________________________________________________|
If you have questions about the Apache httpd 2.0 build, please consult
the httpd install documentation:
http://httpd.apache.org/docs-2.0/install.html
At the top of the httpd tree:
$ ./buildconf
$ ./configure --enable-dav --enable-so --enable-maintainer-mode
The first arg says to build mod_dav.
The second arg says to enable shared module support which is needed
for a typical compile of mod_dav_svn (see below).
The third arg says to include debugging information. If you
built Subversion with --enable-maintainer-mode, then you should
do the same for Apache; there can be problems if one was
compiled with debugging and the other without.
Note: if you have multiple db versions installed on your system,
Apache might link to a different one than Subversion, causing
failures when accessing the repository through Apache. To prevent
this from happening, you have to tell Apache which db version to
use and where to find db. Add --with-dbm=db4 and
--with-berkeley-db=/usr/local/BerkeleyDB.4.2 to the configure
line. Make sure this is the same db as the one Subversion uses.
This note assumes you have installed Berkeley DB 4.2.52
at its default locations. For more info about the db requirement,
see section I.5.
You may also want to include other modules in your build. Add
--enable-ssl to turn on SSL support, and --enable-deflate to turn on
compression support, for example. Consult the Apache documentation
for more details.
All instructions below assume you configured Apache to install
in its default location, /usr/local/apache2/; substitute
appropriately if you chose some other location.
Compile and install apache:
$ make && make install
B. Making and Installing the Subversion Apache Server Module
---------------------------------------------------------
Go back into your subversion working copy and run ./autogen.sh if
you need to. Then, assuming Apache httpd 2.0 is installed in the
standard location, run:
$ ./configure
Note: do *not* configure subversion with "--disable-shared"!
mod_dav_svn *must* be built as a shared library, and it will
look for other libsvn_*.so libraries on your system.
If you see a warning message that the build of mod_dav_svn is
being skipped, this may be because you have Apache httpd 2.X
installed in a non-standard location. You can use the
"--with-apxs=" option to locate the apxs script:
$ ./configure --with-apxs=/usr/local/apache2/bin/apxs
Note: it *is* possible to build mod_dav_svn as a static library
and link it directly into Apache. Possible, but painful. Stick
with the shared library for now; if you can't, then ask.
$ rm /usr/local/lib/libsvn*
If you have old subversion libraries sitting on your system,
libtool will link them instead of the `fresh' ones in your tree.
Remove them before building subversion.
$ make clean && make && make install
After the make install, the Subversion shared libraries are in
/usr/local/lib/. mod_dav_svn.so should be installed in
( run in 0.882 second using v1.01-cache-2.11-cpan-02777c243ea )