<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  <!ENTITY % general-entities SYSTEM "../../general.ent">
  %general-entities;

  <!--<!ENTITY subversion-download-http
  "http://archive.apache.org/dist/subversion/subversion-&subversion-version;.tar.bz2">-->
  <!ENTITY subversion-download-http
  "http://www.apache.org/dist/subversion/subversion-&subversion-version;.tar.bz2">
  <!ENTITY subversion-download-ftp  " ">
  <!ENTITY subversion-md5sum        "766a89bbbb388f8eb76166672d3b9e49">
  <!ENTITY subversion-size          "6.6 MB">
  <!ENTITY subversion-buildsize     "123 MB (272 MB with all bindings and API documentation built; additional 694 MB for tests)">
  <!ENTITY subversion-time          "1.9 SBU (3.6 SBU with all bindings and API documentation built; additional 11 SBU for tests)">
]>

<sect1 id="subversion" xreflabel="Subversion-&subversion-version;">
  <?dbhtml filename="subversion.html"?>

  <sect1info>
    <othername>$LastChangedBy: bdubbs $</othername>
    <date>$Date: 2015-02-20 16:15:05 -0500 (Fri, 20 Feb 2015) $</date>
  </sect1info>

  <title>Subversion-&subversion-version;</title>

  <indexterm zone="subversion">
    <primary sortas="a-Subversion">Subversion</primary>
  </indexterm>

  <sect2 role="package">
    <title>Introduction to Subversion</title>

    <para>
      <application>Subversion</application> is a version control system that is
      designed to be a compelling replacement for <application>CVS</application>
      in the open source community. It extends and enhances
      <application>CVS</application>' feature set, while maintaining a similar
      interface for those already familiar with <application>CVS</application>.
      These instructions install the client and server software used to
      manipulate a <application>Subversion</application> repository. Creation of
      a repository is covered at <xref linkend="svnserver"/>.
    </para>

    &lfs77_checked;

    <bridgehead renderas="sect3">Package Information</bridgehead>
    <itemizedlist spacing="compact">
      <listitem>
        <para>
          Download (HTTP): <ulink url="&subversion-download-http;"/>
        </para>
      </listitem>
      <listitem>
        <para>
          Download (FTP): <ulink url="&subversion-download-ftp;"/>
        </para>
      </listitem>
      <listitem>
        <para>
          Download MD5 sum: &subversion-md5sum;
        </para>
      </listitem>
      <listitem>
        <para>
          Download size: &subversion-size;
        </para>
      </listitem>
      <listitem>
        <para>
          Estimated disk space required: &subversion-buildsize;
        </para>
      </listitem>
      <listitem>
        <para>
          Estimated build time: &subversion-time;
        </para>
      </listitem>
    </itemizedlist>

    <bridgehead renderas="sect3">Subversion Dependencies</bridgehead>

    <bridgehead renderas="sect4">Required</bridgehead>
    <para role="required">
      <xref linkend="apr-util"/> and
      <xref linkend="sqlite"/>
    </para>

    <bridgehead renderas="sect4">Recommended</bridgehead>
    <para role="recommended">
      <xref linkend="serf"/> (for handling http:// and https:// URLs)
    </para>

<!-- support for berkeley db is deprecated since 1.8
    <note>
      <para>
        If you require the <application>Berkeley DB</application> back-end hooks
        in <application>Subversion</application> to build or support BDB based
        repositories, you must have <application>APR-util</application> linked to
        the <application>Berkeley DB</application> library.
      </para>
    </note>
-->

    <bridgehead renderas="sect4">Optional</bridgehead>
    <para role="optional">
      <xref linkend="apache"/>,
<!-- support for berkeley db is deprecated since 1.8
      <xref linkend="db"/>,
-->
      <xref linkend="cyrus-sasl"/>,
      <xref linkend="dbus"/>,
      <xref linkend="kdelibs"/> (for <ulink url="http://utils.kde.org/projects/kwalletmanager/">KWallet</ulink> support),
      <xref linkend="python2"/> (with sqlite support for the tests),
      <xref linkend="ruby"/>, and
      <xref linkend="swig"/> (for building Perl, Python and Ruby bindings)
    </para>

    <bridgehead renderas="sect4">Optional (for the Java Bindings)</bridgehead>
    <para role="optional">
      One of <xref linkend="openjdk"/>,
      <ulink url="http://www.inet.no/dante/">Dante</ulink> or
      <ulink url="http://oss.software.ibm.com/developerworks/opensource/jikes/">Jikes</ulink>,
      and <xref linkend="junit"/> (to test the Java bindings)
    </para>

    <para condition="html" role="usernotes">
      User Notes: <ulink url="&blfs-wiki;/subversion"/>
    </para>
  </sect2>

  <sect2 role="installation">
    <title>Installation of Subversion</title>

    <para>
      Install <application>Subversion</application> by running the following
      commands:
    </para>

<screen><userinput>./configure --prefix=/usr    \
            --disable-static \
            --with-apache-libexecdir &amp;&amp;
make</userinput></screen>

    <para>
      If you have <xref linkend="doxygen"/> installed and you wish to build the
      API documentation, issue: <command>doxygen doc/doxygen.conf</command>.
    </para>

    <para>
      If you passed the <option>--enable-javahl</option> parameter to
      <command>configure</command> and wish to build the Java bindings, issue
      the following command:
    </para>
    <para>
      <screen><command>make javahl</command></screen>
    </para>

    <para>
      If you have a multi core CPU and normally run <command>make</command> with
      multiple jobs (eg <command>make -j4</command>) then a bug in the
      <filename>Makefile</filename> will prevent the
      <application>Perl</application> bindings compiling correctly. Fix the
      <filename>Makefile</filename> with:
    </para>
    <para>
     <screen><command>sed -i 's#Makefile.PL.in$#&amp; libsvn_swig_perl#' Makefile.in</command></screen>
    </para>

    <para>
      If you want to compile <application>Perl</application>,
      <application>Python2</application>, or <application>Ruby</application>
      bindings, issue any of the following command:
    </para>
    <para>
      <screen><command>make swig-pl</command> # for <application>Perl</application>
<command>make swig-py \
     swig_pydir=/usr/lib/python&python2-majorver;/site-packages/libsvn \
     swig_pydir_extra=/usr/lib/python&python2-majorver;/site-packages/svn</command> # for <application>Python</application>
<command>make swig-rb</command> # for <application>Ruby</application></screen>
    </para>

    <para>
      To test the results, issue: <command>make -k check</command>. One test
      (wc-queries-test) is known to fail with recent versions of SQLite. 
    </para>

    <para>
      To test the results of the Java bindings build, issue
      <command>make check-javahl</command>. Note you must have the
      <application>JUnit</application> testing framework installed.
    </para>

    <para>
      To test the results of any of the <application>SWIG</application>
      bindings, you can use any of the following commands:
      <command>make check-swig-pl</command>,
      <command> make check-swig-py</command>, or
      <command>make check-swig-rb</command>.
    </para>


    <para>
      Now, as the <systemitem class="username">root</systemitem> user:
    </para>

<screen role="root"><userinput>make -j1 install &amp;&amp;
install -v -m755 -d /usr/share/doc/subversion-&subversion-version; &amp;&amp;
cp      -v -R       doc/* \
                    /usr/share/doc/subversion-&subversion-version;</userinput></screen>

    <para>
      If you built the Java bindings, issue the following command as the
      <systemitem class="username">root</systemitem> user to install them:
    </para>
    <para>
     <screen> <command>make install-javahl</command></screen>
    </para>

    <para>
      If you built the <application>Perl</application>,
      <application>Python2</application>, or
      <application>Ruby</application> bindings, issue any of the following
      commands as the <systemitem class="username">root</systemitem> user
      to install them:
    </para>
    <para>
      <screen><command>make install-swig-pl</command>
<command>make install-swig-py \
      swig_pydir=/usr/lib/python&python2-majorver;/site-packages/libsvn \
      swig_pydir_extra=/usr/lib/python&python2-majorver;/site-packages/svn</command>
<command>make install-swig-rb</command></screen>
    </para>

  </sect2>

  <sect2 role="commands">
    <title>Command Explanations</title>

    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
      href="../../xincludes/static-libraries.xml"/>

    <para>
      <parameter>--with-apache-libexecdir</parameter>:
      If <xref linkend="apache"/> is installed, the shared
      <application>Apache</application> modules are
      built. This switch allows to have those modules installed to
      <application>Apache</application>'s configured module dir instead
      of <filename class="directory">/usr/libexec</filename>. It has no effect
      if <application>Apache</application> is not installed.
    </para>

  </sect2>

  <sect2 role="configuration">
    <title>Configuring Subversion</title>

    <sect3 id="subversion-config">
      <title>Config Files</title>

      <para>
        <filename>~/.subversion/config</filename> and
        <filename>/etc/subversion/config</filename>
      </para>

      <indexterm zone="subversion subversion-config">
        <primary sortas="e-AA.subversion/config">~/.subversion/config</primary>
      </indexterm>

      <indexterm zone="subversion subversion-config">
        <primary sortas="e-etc-subversion-config">/etc/subversion/config</primary>
      </indexterm>
    </sect3>

    <sect3>
      <title>Configuration Information</title>

      <para>
        <filename>/etc/subversion/config</filename> is the
        <application>Subversion</application> system-wide configuration file.
        This file is used to specify defaults for different
        <command>svn</command> commands.
      </para>

      <para>
        <filename>~/.subversion/config</filename> is the user's personal
        configuration file. It is used to override the system-wide defaults set
        in <filename>/etc/subversion/config</filename>.
      </para>
    </sect3>

  </sect2>

  <sect2 role="content">
    <title>Contents</title>

    <segmentedlist>
      <segtitle>Installed Programs</segtitle>
      <segtitle>Installed Libraries</segtitle>
      <segtitle>Installed Directories</segtitle>

      <seglistitem>
        <seg>
          svn, svnadmin, svndumpfilter, svnlook, svnmucc, svnrdump, svnserve,
          svnsync, and svnversion
        </seg>
        <seg>
          libsvn_*-1.so and optionally, a Java library, the mod_dav_svn.so and
          and mod_authz_svn.so <application>Apache HTTP</application> DSO
          modules and various <application>Perl</application>,
          <application>Python</application> and
          <application>Ruby</application> modules.
        </seg>
        <seg>
          /usr/include/subversion-1,
          /usr/lib/perl5/site_perl/&lfs-perl-version;/{,auto/}SVN,
          /usr/lib/python2.7/site-packages/{libsvn,svn},
          /usr/lib/ruby/site_ruby//&lt;x.y.z&gt;/{,&lt;arch-linux&gt;-linux/}svn,
          /usr/lib/svn-javahl, and
          /usr/share/doc/subversion-&subversion-version;
<!--      /usr/lib/svn-python/libsvn (optional),
          /usr/lib/svn-python/svn (optional),
-->
        </seg>
      </seglistitem>
    </segmentedlist>

    <variablelist>
      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
      <?dbfo list-presentation="list"?>
      <?dbhtml list-presentation="table"?>

      <varlistentry id="svn">
        <term><command>svn</command></term>
        <listitem>
          <para>
            is a command-line client program used to access
            <application>Subversion</application> repositories.
          </para>
          <indexterm zone="subversion svn">
            <primary sortas="b-svn">svn</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="svnadmin">
        <term><command>svnadmin</command></term>
        <listitem>
          <para>
            is a tool for creating, tweaking or repairing a
            <application>Subversion</application> repository.
          </para>
          <indexterm zone="subversion svnadmin">
            <primary sortas="b-svnadmin">svnadmin</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="svndumpfilter">
        <term><command>svndumpfilter</command></term>
        <listitem>
          <para>
            is a program for filtering <application>Subversion</application>
            repository dumpfile format streams.
          </para>
          <indexterm zone="subversion svndumpfilter">
            <primary sortas="b-svndumpfilter">svndumpfilter</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="svnlook">
        <term><command>svnlook</command></term>
        <listitem>
          <para>
            is a tool for inspecting a <application>Subversion</application>
            repository.
          </para>
          <indexterm zone="subversion svnlook">
            <primary sortas="b-svnlook">svnlook</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="svnmucc">
        <term><command>svnmucc</command></term>
        <listitem>
          <para>
            is a Multiple URL Command Client for <application>Subversion</application>.
          </para>
          <indexterm zone="subversion svnmucc">
            <primary sortas="b-svnmucc">svnmucc</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="svnrdump">
        <term><command>svnrdump</command></term>
        <listitem>
          <para>
            is a tool for dumping or loading a remote
            <application>Subversion</application> repository.
          </para>
          <indexterm zone="subversion svnrdump">
            <primary sortas="b-svnrdump">svnrdump</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="svnserve">
        <term><command>svnserve</command></term>
        <listitem>
          <para>
            is a custom standalone server program, able to run as a daemon
            process or invoked by SSH.
          </para>
          <indexterm zone="subversion svnserve">
           <primary sortas="b-svnserve">svnserve</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="svnsync">
        <term><command>svnsync</command></term>
        <listitem>
          <para>
            is a <application>Subversion</application> repository
            synchronisation tool.
          </para>
          <indexterm zone="subversion svnsync">
           <primary sortas="b-svnsync">svnsync</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="svnversion">
        <term><command>svnversion</command></term>
        <listitem>
          <para>
            is used to report the version number and state of a working
            <application>Subversion</application> repository copy.
          </para>
          <indexterm zone="subversion svnversion">
            <primary sortas="b-svnversion">svnversion</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="libsvn_star-1">
        <term><filename class="libraryfile">libsvn_*-1.so</filename></term>
        <listitem>
          <para>
            are the support libraries used by the
            <application>Subversion</application> programs.
          </para>
          <indexterm zone="subversion libsvn_star-1">
            <primary sortas="c-libsvn_star-1">libsvn_*-1.so</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="mod_authz_svn">
        <term><filename class="libraryfile">mod_authz_svn.so</filename></term>
        <listitem>
          <para>
            is a plug-in module for the <application>Apache</application> HTTP
            server, used to authenticate users to a
            <application>Subversion</application> repository over the Internet
            or an intranet.
          </para>
          <indexterm zone="subversion mod_authz_svn">
            <primary sortas="c-mod_authz_svn">mod_authz_svn.so</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="mod_dav_svn">
        <term><filename class="libraryfile">mod_dav_svn.so</filename></term>
        <listitem>
          <para>
            is a plug-in module for the <application>Apache</application> HTTP
            server, used to make a <application>Subversion</application>
            repository available to others over the Internet or an intranet.
          </para>
          <indexterm zone="subversion mod_dav_svn">
            <primary sortas="c-mod_authz_svn">mod_dav_svn.so</primary>
          </indexterm>
        </listitem>
      </varlistentry>

    </variablelist>

  </sect2>

</sect1>
