Last Update: Tue May 20 10:17:52 PDT 2003

New Update: Look towards the bottom of the readme for some helpful notes
from Mark Proctor <mproctor@cisco.com> experience with building subversion
on mandrake 9.1.

-----------------
Mandrake SVN RPM:
-----------------

These are the files required to build a mandrake 9.1 RPM for subversion.
Mandrake 9.1 (thankfully) has most of the software required to build
and install subversion. The only thing it does NOT have is a recent enough
version of NEON. You will need to build and install your own recent 
version, or get the source RPM from cooker or what not and update it
yourself.

To build the RPMs directly from this directory, you should be able to
just `make'. You must have followed the setup directions in the mandrake
rpm howto though, and, of course, you must have the appropriate
development packages. (also available at the above url) You might want to
read the top of the makefile for some other notes.

Now notes on the RPMs this spec file produces:

subversion-base:
----------------
This is the base set of common libraries required by subversion
components. All further packages depend on this one. This package
requires the apache portability runtime libraries and the apr-util
libraries.

subversion-client-common:
-------------------------
Subversion is written so that any number of RA modules can be built to
access repositories. This package includes the basic `svn' executable and
man page, and other client parts required to run it, but it does not
include any of the RA modules. This is a prerequisite for any of the
other subversion-client-something RPMs.

subversion-client-dav:
----------------------
This RPM includes the RA module for WebDAV repositories. In other words,
if you are going to access remote repositories, you want to install this
one. This package depends on subversion-client-common. This package also
depends on the NEON libraries.

subversion-client-local:
------------------------
This RPM includes the RA module for local repositories. This is so you
can access repositories stored in DB files on the local mounts. This
package requires the common client package, subversion-repos, and DB4.0.

subversion-devel:
-----------------
This RPM includes the static libraries, header files, and linker scripts
for subversion.

subversion-python:
------------------

  -- note: this is not building yet on mdk 9.1 --

This RPM includes the python SWIG bindings for subversion. This package
requires SWIG, the base subversion package, and any client packages one
might want depending on what the python scripts you're writing will do.

subversion-repos:
-----------------
This RPM includes the libraries required to access local repositories.
This is a required package for client-local, and the server RPM.

subversion-server:
------------------
This package will install the mod_dav_svn.so apache DSO, and a
configuration file called 46_mod_dav_svn.conf in /etc/httpd/conf.d. The
later file being the one you should modify to include your subversion
directory roots. Setting up the repositories and adding any users or
groups for the process is left to the user.


So, many combinations of packages are available depending on the type of
installation you want to do. The apr, apr-util, and subversion-base
packages are always required, but then you could just simply install
neon, client-common, and client-dav to get a subversion setup for network
repositories. Add client-local, and repos, for local repositories, or 
add repos and server to setup a subversion server.

--------
Contact:
--------

Please let me know if you have problems or additions to the spec file. My
email address is: ballbach@rten.net. Thanks.

--------------------------
Mark's Installation Notes:
--------------------------

I couldn't get SVN to pick up db4 so I downloaded the latest src and placed in top level dir as db. i did the same for neon.

!! NOTE -- db4.0 comes with mandrake 9.1, you should be able to compile subversion
against it with the --with-berkeley-db=/usr switch to ./configure. Neon you will
need to build and install a newer version of. You can either install it from a
tarball, or get the source RPM and build a new one. I've done the later a few
times and it was pretty simple.

download
http://www.sleepycat.com/update/snapshot/db-4.0.14.zip
http://www.webdav.org/neon/neon-0.23.7.tar.gz
unpack each to top level and rename to db and neon respectively
---------------------------------------------------------------------------
Install following RPMS, devel packages are important
libpython2.2-2.2.2-6mdk
python-base-2.2.2-6mdk
python-2.2.2-6mdk (not just python-base)

apache2-modules-2.0.45-5mdk
apache2-devel-2.0.45-5mdk
apache-conf-2.0.45-4mdk
apache2-2.0.45-5mdk
apache2-manual-2.0.45-5mdk
apache2-common-2.0.45-5mdk
apache2-mod_dav-2.0.45-5mdk

zlib
zlib-devel

libopenssl0.9.7-devel-0.9.7b-2mdk
libopenssl0.9.7-0.9.7b-2mdk
openssl-0.9.7b-2mdk

---------------------------------------------------------------------------
Even though i had libldap2-2.0.27-4mdk I get the following error:

which stopped the following error
cd subversion/libsvn_subr && /bin/sh /home/mproctor/subversion/libtool --silent --mode=link gcc  -pthread  -DNEON_ZLIB -DNEON_SSL  -L/usr/lib  -rpath /usr/local/lib -o libsvn_subr-1.la auth.lo cmdline.lo config.lo config_auth.lo config_file.lo config_win.lo error.lo getdate.lo hash.lo io.lo md5.lo opt.lo path.lo pool.lo quoprint.lo sorts.lo stream.lo subst.lo svn_base64.lo svn_string.lo target.lo time.lo utf.lo validate.lo xml.lo /usr/lib/libaprutil-0.la -lldap -llber -lgdbm -ldb-4.0 -lexpat /usr/lib/libapr-0.la -lm -lcrypt -lnsl  -ldl
/usr/bin/ld: cannot find -lldap
collect2: ld returned 1 exit status
make: *** [subversion/libsvn_subr/libsvn_subr-1.la] Error 1

update usr/bin/apu-conf and change the following line
LIBS="-lldap -llber -lgdbm -ldb-4.0 -lexpat"
to
LIBS="-lgdbm -ldb-4.0 -lexpat"
---------------------------------------------------------------------------
execute ./autogen.sh

---------------------------------------------------------------------------
./configure --with-apxs=/usr/sbin/apxs2 --with-apr=/usr/bin/apr-config --with-apr-util=/usr/bin/apu-config --enable-ssl --enable-deflate

---------------------------------------------------------------------------
Subversion correctly adds web_dav_svn.so to your httpd2.conf but make sure that mod_dav.so is loaded first otherwise you get the error:
/etc/httpd/2.0/modules/mod_dav_svn.so into server: /etc/httpd/2.0/modules/mod_dav_svn.so: undefined symbol: dav_xml_get_cdata

Make sure this line is placed before mod_dav_svn is loaded
LoadModule dav_module modules/mod_dav.so
---------------------------------------------------------------------------





