<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Linux Sysadmin Blog &#187; svn</title>
	<atom:link href="http://linuxsysadminblog.com/category/svn/feed/" rel="self" type="application/rss+xml" />
	<link>http://linuxsysadminblog.com</link>
	<description></description>
	<lastBuildDate>Tue, 10 May 2011 03:23:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>Setup Subversion (SVN) and mod_dav_svn on Cpanel Server</title>
		<link>http://linuxsysadminblog.com/2010/10/setup-subversion-svn-and-mod_dav_svn-on-cpanel-server/</link>
		<comments>http://linuxsysadminblog.com/2010/10/setup-subversion-svn-and-mod_dav_svn-on-cpanel-server/#comments</comments>
		<pubDate>Mon, 18 Oct 2010 11:00:06 +0000</pubDate>
		<dc:creator>gerold</dc:creator>
				<category><![CDATA[Centos]]></category>
		<category><![CDATA[cpanel]]></category>
		<category><![CDATA[Installation]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[dav]]></category>
		<category><![CDATA[subversion]]></category>

		<guid isPermaLink="false">http://linuxsysadminblog.com/?p=1180</guid>
		<description><![CDATA[Quick install guide for SVN with mod_dav_svn (http/https) repository access on Cpanel server running CentOs5. Configure Cpanel for SVN Recompile Apache/PHP (WHM -&#62; Software -&#62; EasyApache) and enable support for the following: Dav (Among other things mod_dav can be used by DAV enabled Frontpage clients instead of FP extensions) BerkeleyDB. Note: BerkeleyDB support (&#8220;&#8211;with-berkeley-db&#8220;) is [...]]]></description>
			<content:encoded><![CDATA[<p>Quick install guide for SVN with mod_dav_svn (http/https) repository access on Cpanel server running CentOs5.</p>
<p><strong>Configure Cpanel for SVN</strong><br />
Recompile Apache/PHP (<em>WHM -&gt; Software -&gt; EasyApache</em>) and enable support for the following:</p>
<ul>
<li> Dav (<em>Among other things mod_dav can be used by DAV enabled Frontpage clients instead of FP extensions</em>)</li>
<li> BerkeleyDB.  <strong>Note</strong>: BerkeleyDB support (&#8220;<em>&#8211;with-berkeley-db</em>&#8220;) is not enabled by default in EasyApache so you need to add this manually to your EasyApache config using <a href="http://docs.cpanel.net/twiki/bin/view/EasyApache3/CustomConfigureFlags">this guide</a> or <a href="http://community.eapps.com/showthread.php?271-Adding-subversion-support-to-Apache">this one</a>.</li>
</ul>
<p><strong>Install Subversion and mod_dav_svn</strong><br />
Install subversion using yum (<em>yum install subversion</em>) or install it from source.  At this time CentOS repo version is 1.4.x and the latest from source is 1.6.x.<br />
<span id="more-1180"></span><br />
<strong>Install and enable mod_dav_svn in Cpanel</strong><br />
Install mod_dav_svn using yum (<em>yum install mod_dav_svn</em>) &#8211; version 1.4.x same as subersion above.<br />
Load mod_dav_svn module to Apache.  Go to <em>WHM -&gt; Service Configuration -&gt; Apache Configuration -&gt; Include Editor -&gt; Pre-Main Include</em>.   Select either &#8220;<em>All Versions</em>&#8221; or your current Apache version (ex: &#8220;<em>2.2.16</em>&#8220;) from drop-down list.  Or you can edit their corresponding file directly:<br />
All Versions:  <em>/usr/local/apache/conf/includes/pre_main_global.conf</em><br />
Apache 2.2.16: <em>/usr/local/apache/conf/includes/pre_main_2.conf</em><br />
Add the codes below and click &#8220;<em>Update</em>&#8221; button to save config. This will restart Apache if no error on your configuration.<br />
<code>&lt;IfModule mod_dav.c&gt;<br />
LoadModule dav_svn_module /usr/lib/httpd/modules/mod_dav_svn.so<br />
LoadModule authz_svn_module /usr/lib/httpd/modules/mod_authz_svn.so<br />
&lt;/IfModule&gt;</code></p>
<p><strong>Create repository and add http access (ex: http://domain.com/svn)</strong><br />
Create your repository: <em>svnadmin create /path/to/svn/repos</em><br />
Add the code below to your domain&#8217;s custom include file.  You need to create this file based on <a href="http://www.cpanel.net/documentation/easyapache/customdirectives.html">this guide</a> to preserve when you recompile Apache/PHP.<br />
Example file (Apache2,standard/non-ssl):  <em>/usr/local/apache/conf/userdata/std/2/cpanl_user/domain.com/svn.conf</em><br />
File Contents:<br />
<code>&lt;Location /svn&gt;<br />
#  mod dav svn support and location of svn repo files<br />
DAV svn<br />
SVNPath /path/to/svn/repos<br />
# authentication for security, create using htpasswd<br />
AuthType Basic<br />
AuthName "SVN Access"<br />
AuthUserFile /path/to/file/containing/user.pass<br />
Require valid-user<br />
# added for permissions/access<br />
Order allow,deny<br />
Allow from all<br />
&lt;/Location&gt;</code></p>
]]></content:encoded>
			<wfw:commentRss>http://linuxsysadminblog.com/2010/10/setup-subversion-svn-and-mod_dav_svn-on-cpanel-server/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>svnadmin: can&#8217;t open file &#8216;svn/db/fsfs.conf&#8217;: No such file or directory</title>
		<link>http://linuxsysadminblog.com/2010/06/svnadmin-cant-open-file-svndbfsfs-conf-no-such-file-or-directory/</link>
		<comments>http://linuxsysadminblog.com/2010/06/svnadmin-cant-open-file-svndbfsfs-conf-no-such-file-or-directory/#comments</comments>
		<pubDate>Sun, 13 Jun 2010 05:37:48 +0000</pubDate>
		<dc:creator>Marius</dc:creator>
				<category><![CDATA[svn]]></category>
		<category><![CDATA[Tips and Tricks]]></category>

		<guid isPermaLink="false">http://linuxsysadminblog.com/?p=1105</guid>
		<description><![CDATA[While working on setting up a backup script for a subversion repository I encountred an interesting problem. I&#8217;ve done this before many times, on different repos, and haven&#8217;t seen any issues, but in this case the backup command that is using the built-in svnadmin hotcopy command was failing with this error: svnadmin hotcopy --clean-logs /svn/repo/ [...]]]></description>
			<content:encoded><![CDATA[<p>While working on setting up a <em>backup script for a subversion repository</em> I encountred an interesting problem. I&#8217;ve done this before many times, on different repos, and haven&#8217;t seen any issues, but in this case the backup command that is using the built-in <strong>svnadmin hotcopy</strong> command was failing with this error:<br />
<code>svnadmin hotcopy --clean-logs /svn/repo/ /backup/repo/<br />
svnadmin: Can't open file '/svn/repo/db/fsfs.conf': No such file or directory</code></p>
<p>Hmm&#8230; looking at the respective path I can see that the command is not lying and that file <strong>fsfs.conf</strong> is indeed not present. I could find a file <strong>fs-type</strong> but not fsfs.conf. So my only assumption was that this is an <em>older</em> repository created with an <em>older svn version</em> than the one we were running currently. Checking the existing svn version I got:<br />
<code>svn --version<br />
svn, version 1.6.11 (r934486)<br />
compiled Apr 20 2010, 00:24:22</code><br />
and the fact that this repo was very old (~2009) made my assumption sound correct. Ok, now what? Well in this situation my first thought was to use the <strong>svnadmin upgrade</strong> command; from the manual it looked like this is what I needed to fix this issue:<span id="more-1105"></span></p>
<p><em>&#8220;svnadmin help upgrade<br />
upgrade: usage: svnadmin upgrade REPOS_PATH</em></p>
<p><em>Upgrade the repository located at REPOS_PATH to the latest supported<br />
schema version.</em></p>
<p><em>This functionality is provided as a convenience for repository<br />
administrators who wish to make use of new Subversion functionality<br />
without having to undertake a potentially costly full repository dump<br />
and load operation.  As such, the upgrade performs only the minimum<br />
amount of work needed to accomplish this while still maintaining the<br />
integrity of the repository.  It does not guarantee the most optimized<br />
repository state as a dump and subsequent load would.&#8221;</em></p>
<p>After I&#8217;ve made a manual backup archive of the repo (a simple tar.gz of the repo folder) I ran the upgrade command sure this is going to fix my issue:<br />
<code>svnadmin upgrade /svn/repo/</code><br />
and after it completed, I verified that svn was still working as expected and checked for the fsfs.conf file. But that was <strong>not created</strong>&#8230; Hmm&#8230; Let&#8217;s try the hotcopy command anyway:<br />
<code>svnadmin hotcopy --clean-logs /svn/repo/ /tmp/repo/<br />
svnadmin: Can't open file '/svn/repo/db/fsfs.conf': No such file or directory</code><br />
the exact same error.</p>
<p>Trying to understand what the fsfs.conf file contains I just created a new repository to see if it gets created. Indeed my v1.6.11 of svn created the file for a new repo, and after copying it to the location of my existing repository (as it was basically just an empty file) my issue was fixed and the hotcopy command started working. Here is the content of the file as created by my svn version, that I copied in the older repo to fix this problem:</p>
<pre><code>cat fsfs.conf
### This file controls the configuration of the FSFS filesystem.

[memcached-servers]
### These options name memcached servers used to cache internal FSFS
### data.  See http://www.danga.com/memcached/ for more information on
### memcached.  To use memcached with FSFS, run one or more memcached
### servers, and specify each of them as an option like so:
# first-server = 127.0.0.1:11211
# remote-memcached = mymemcached.corp.example.com:11212
### The option name is ignored; the value is of the form HOST:PORT.
### memcached servers can be shared between multiple repositories;
### however, if you do this, you *must* ensure that repositories have
### distinct UUIDs and paths, or else cached data from one repository
### might be used by another accidentally.  Note also that memcached has
### no authentication for reads or writes, so you must ensure that your
### memcached servers are only accessible by trusted users.

[caches]
### When a cache-related error occurs, normally Subversion ignores it
### and continues, logging an error if the server is appropriately
### configured (and ignoring it with file:// access).  To make
### Subversion never ignore cache errors, uncomment this line.
# fail-stop = true

[rep-sharing]
### To conserve space, the filesystem can optionally avoid storing
### duplicate representations.  This comes at a slight cost in performace,
### as maintaining a database of shared representations can increase
### commit times.  The space savings are dependent upon the size of the
### repository, the number of objects it contains and the amount of
### duplication between them, usually a function of the branching and
### merging process.
###
### The following parameter enables rep-sharing in the repository.  It can
### be switched on and off at will, but for best space-saving results
### should be enabled consistently over the life of the repository.
# enable-rep-sharing = false</code></pre>
<p>Hopefully this will help others seeing the same issue I was experiencing.</p>
]]></content:encoded>
			<wfw:commentRss>http://linuxsysadminblog.com/2010/06/svnadmin-cant-open-file-svndbfsfs-conf-no-such-file-or-directory/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
	</channel>
</rss>

