<?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 Admin Zone &#187; Subversion</title>
	<atom:link href="http://linuxadminzone.com/tag/subversion/feed/" rel="self" type="application/rss+xml" />
	<link>http://linuxadminzone.com</link>
	<description>Adding more reasons to celebrate Open Source.</description>
	<lastBuildDate>Wed, 09 May 2012 10:17:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Configure password based subversion access via http for multiple users</title>
		<link>http://linuxadminzone.com/configure-password-based-subversion-access-via-http-for-multiple-users/</link>
		<comments>http://linuxadminzone.com/configure-password-based-subversion-access-via-http-for-multiple-users/#comments</comments>
		<pubDate>Wed, 06 May 2009 13:27:14 +0000</pubDate>
		<dc:creator>jagbir</dc:creator>
				<category><![CDATA[Subversion]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://linuxadminzone.com/?p=114</guid>
		<description><![CDATA[Given the tight timeline to configure subversion with httpd access having multiple users, I found that it&#8217;s not a big deal. Although, as there&#8217;s excellent reference available online for subversion, this quick howto will be helpful to point out just the essential statements. What I want: A subversion server having multiple repository in /svn directory [...]]]></description>
			<content:encoded><![CDATA[<p>Given the tight timeline to configure subversion with httpd access having multiple users, I found that it&#8217;s not a big deal. Although, as there&#8217;s excellent <a title="reference" href="http://svnbook.red-bean.com/nightly/en/">reference</a> available online for subversion, this quick howto will be helpful to point out just the essential statements.</p>
<p><strong>What I want: </strong><br />
A subversion server having multiple repository in /svn directory and accessible through http url like http://svn.example.com. You can not browse svn repositories without supplying a valid username/password. All users have read only access to all repositories while only one user &#8216;svnadmin&#8217; have read/write (commit,update etc.) access to svn.</p>
<p><strong>Step 1.</strong> I assume you have downloaded and installed subversion either by using rpms or by compiling it. Let&#8217;s say multiple subversion repositories are in single directory: /svn</p>
<p><strong>Step 2.</strong> Open <em>/etc/httpd/conf.d/subversion.conf </em>file which should be already there, update the file as follows. Keep in mind to change values as per your own setup:</p>
<blockquote><p>LoadModule dav_svn_module     modules/mod_dav_svn.so<br />
LoadModule authz_svn_module   modules/mod_authz_svn.so</p>
<p>&lt;VirtualHost *:80&gt;<br />
ServerName svn.example.com<br />
ServerAdmin root@localhost</p>
<p>&lt;Location /svn&gt;<br />
DAV svn<br />
SVNParentPath /svn<br />
AuthType Basic<br />
AuthName &#8220;My Subversion Server&#8221;<br />
AuthzSVNAccessFile /etc/subversion/svnpath.users<br />
AuthUserFile /etc/subversion/svnaccess.users<br />
Require valid_user<br />
&lt;/Location&gt;<br />
&lt;/VirtualHost&gt;</p></blockquote>
<p>Here,</p>
<p><strong>SVNParentPath /svn</strong> means we have multiple repositories in /svn directory and /svn is specified as parent location.</p>
<p><strong>Location</strong> directive is there to indicate we are implementing some restrictions/rules for /svn directory.</p>
<p><strong>AuthzSVNAccessFile</strong> <strong>/etc/subversion/svnpath.users</strong> tells the mod_authz_svn module to look in <em>svnpath.users</em> file for path based access rules. Please note that I&#8217;ve created /etc/subversion directory explicitly to store such custom files. One question you may ask here is why I&#8217;m using path based access which is discouraged in general use? Well, I tried several settings in apache config file to enable read-only access for all valid users and read/write access for one particular user. My attempts didn&#8217;t yield desired results, so I jumped immediately on other alternative <img src='http://linuxadminzone.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  which means performance of my server will be compromised by a little.<br />
Update the file as per below:<br />
# vim /etc/subversion/svnpath.users</p>
<blockquote><p>[/]<br />
* = r<br />
svnadmin = rw</p></blockquote>
<p>In the file <strong>[/]</strong> means parent directory where all repositories are stored, you can also specify single repository name here. and <strong>* = r </strong>means all users have read access, <strong>svnadmin = rw</strong> means a &#8216;svnadmin&#8217; user has read/write access.</p>
<p><strong>AuthUserFile /etc/subversion/svnaccess.users</strong> statement means Apache should look in <em>svnaccess.users</em> file for available users and passwords. We can create this file using htpasswd command:</p>
<blockquote><p># htpasswd -cm /etc/subversion/svnaccess.users svnread</p></blockquote>
<p>supply the password for &#8216;svnread&#8217; user. create another user which will have read/write access:</p>
<blockquote><p># htpasswd -m /etc/subversion/svnaccess.users svnadmin</p></blockquote>
<p>supply the password for &#8216;svnadmin&#8217; user.</p>
<p>Save the subversion.conf file and reload httpd service:</p>
<blockquote><p># /etc/init.d/httpd reload</p></blockquote>
<p>Now try to access you svn repositories from any machine on net, it should go smooth. While committing you may encounter following error:</p>
<blockquote><p>svn: Commit failed (details follow):<br />
svn: Can&#8217;t create directory &#8216;/svn/testrepo/db/transactions/51-1.txn&#8217;: Permission denied</p></blockquote>
<p>It means the user under Apache running (generally apache in RHEL/CentOS/Fedora) doesnt have permission for /svn directory. You can assign permission in subversion server:</p>
<blockquote><p># chown root:apache /svn -R<br />
# chmod 775 /svn -R</p></blockquote>
<p>Try again and you should be able to access/update svn now without any issue.</p>
]]></content:encoded>
			<wfw:commentRss>http://linuxadminzone.com/configure-password-based-subversion-access-via-http-for-multiple-users/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>QuickFix: ViewVC ImportError: No module named svn error</title>
		<link>http://linuxadminzone.com/quickfix-viewvc-importerror-no-module-named-svn-error/</link>
		<comments>http://linuxadminzone.com/quickfix-viewvc-importerror-no-module-named-svn-error/#comments</comments>
		<pubDate>Fri, 24 Apr 2009 10:06:07 +0000</pubDate>
		<dc:creator>jagbir</dc:creator>
				<category><![CDATA[Subversion]]></category>
		<category><![CDATA[viewvc]]></category>

		<guid isPermaLink="false">http://linuxadminzone.com/?p=106</guid>
		<description><![CDATA[Recently I was in need to update a old subversion server to latest one in a CentOS 5.2 box. I removed the older rpms and compiled subversion from latest source. Everything seems fine except ViewVC which is used to browse svn repositories. Following error was occurring: An Exception Has Occurred Python Traceback &#160; Traceback &#40;most [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I was in need to update a old subversion server to latest one in a CentOS 5.2 box. I removed the older rpms and compiled subversion from latest source. Everything seems fine except <a href="http://linuxadminzone.com/download-install-and-configure-viewvc-for-subversion/">ViewVC</a> which is used to browse svn repositories. </p>
<p>Following error was occurring:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">An Exception Has Occurred
Python Traceback
&nbsp;
Traceback <span style="color: #7a0874; font-weight: bold;">&#40;</span>most recent call <span style="color: #c20cb9; font-weight: bold;">last</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>:
  File <span style="color: #ff0000;">&quot;/usr/local/viewvc-1.1/lib/viewvc.py&quot;</span>, line <span style="color: #000000;">4065</span>, <span style="color: #000000; font-weight: bold;">in</span> main
    request.run_viewvc<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
  File <span style="color: #ff0000;">&quot;/usr/local/viewvc-1.1/lib/viewvc.py&quot;</span>, line <span style="color: #000000;">403</span>, <span style="color: #000000; font-weight: bold;">in</span> run_viewvc
    self.view_func<span style="color: #7a0874; font-weight: bold;">&#40;</span>self<span style="color: #7a0874; font-weight: bold;">&#41;</span>
  File <span style="color: #ff0000;">&quot;/usr/local/viewvc-1.1/lib/viewvc.py&quot;</span>, line <span style="color: #000000;">1662</span>, <span style="color: #000000; font-weight: bold;">in</span> view_roots
    allroots = list_roots<span style="color: #7a0874; font-weight: bold;">&#40;</span>request<span style="color: #7a0874; font-weight: bold;">&#41;</span>
  File <span style="color: #ff0000;">&quot;/usr/local/viewvc-1.1/lib/viewvc.py&quot;</span>, line <span style="color: #000000;">3922</span>, <span style="color: #000000; font-weight: bold;">in</span> list_roots
    cfg.utilities, cfg.options.svn_config_dir<span style="color: #7a0874; font-weight: bold;">&#41;</span>
  File <span style="color: #ff0000;">&quot;/usr/local/viewvc-1.1/lib/vclib/svn/__init__.py&quot;</span>, line <span style="color: #000000;">53</span>, <span style="color: #000000; font-weight: bold;">in</span> SubversionRepository
    import svn_repos
  File <span style="color: #ff0000;">&quot;/usr/local/viewvc-1.1/lib/vclib/svn/svn_repos.py&quot;</span>, line <span style="color: #000000;">25</span>, <span style="color: #000000; font-weight: bold;">in</span> ?
    from <span style="color: #c20cb9; font-weight: bold;">svn</span> import fs, repos, core, client, delta
ImportError: No module named <span style="color: #c20cb9; font-weight: bold;">svn</span></pre></div></div>

<p>Solution: You need to install python bindings for svn and may also need to install python-devel and python-subversion.</p>
<p>Step 1: Check whether <a href="http://www.swig.org/">SWIG library</a> is installed in your system or not (most distribution already have):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ rpm <span style="color: #660033;">-qa</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-i</span> swig
swig-1.3.29-<span style="color: #000000;">2</span>.el5</pre></div></div>

<p>Its there in my system, if you doesn&#8217;t get any output then install the library by using yum install swig or manually by from <a href="http://www.swig.org/">here</a>.</p>
<p>Step 2: Install python bindings for SWIG. I assume you have <a href="http://subversion.tigris.org">subversion</a> source avaialble with you. Untar the source and you will be able to find the bindings in /usr/src/subversion-1.6.1/subversion/bindings/swig/python directory.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>subversion-1.6.1<span style="color: #000000; font-weight: bold;">/</span>
$ <span style="color: #c20cb9; font-weight: bold;">make</span> swig-py
$ <span style="color: #c20cb9; font-weight: bold;">make</span> check-swig-py		<span style="color: #666666; font-style: italic;">### Perform checks </span>
$ <span style="color: #c20cb9; font-weight: bold;">make</span> install-swig-py</pre></div></div>

<p>You may also need to install python-devel and python-subversion as mentioned by comments below but I didn&#8217;t required it. If you face any issue while this installation, pls check INSTALL file in  /usr/src/subversion-1.6.1/subversion/bindings/swig directory to get further instructions, otherwise the library should be installed successfully and programs like ViewVC or other ones which requires swig python bindings should run fine.</p>
]]></content:encoded>
			<wfw:commentRss>http://linuxadminzone.com/quickfix-viewvc-importerror-no-module-named-svn-error/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Fix subversion/svn child exit signal segmentation fault error in Apache</title>
		<link>http://linuxadminzone.com/fix-subversion-svn-child-exit-signal-segmentation-fault-error-in-apache/</link>
		<comments>http://linuxadminzone.com/fix-subversion-svn-child-exit-signal-segmentation-fault-error-in-apache/#comments</comments>
		<pubDate>Mon, 20 Apr 2009 17:36:22 +0000</pubDate>
		<dc:creator>jagbir</dc:creator>
				<category><![CDATA[Subversion]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://linuxadminzone.com/?p=102</guid>
		<description><![CDATA[When running subversion with apache, how good config you&#8217;d done, you may still found that your svn repos are not accessible through http:// or https:// and most probably you&#8217;ll find this error in your apache error logs: child pid 6485 exit signal Segmentation fault (11) In my CentOS 5.2 box with httpd 2.2.3 and subversion [...]]]></description>
			<content:encoded><![CDATA[<p>When running subversion with apache, how good config you&#8217;d done, you may still found that your svn repos are not accessible through http:// or https:// and most probably you&#8217;ll find this error in your apache error logs: </p>
<blockquote><p>
child pid 6485 exit signal Segmentation fault (11)
</p></blockquote>
<p>In my CentOS 5.2 box with httpd 2.2.3 and subversion 1.6.1, this error caused enough headache for me and claimed long time before I was able to find out the root cause. The problem is caused by collision of apr and apu utilities which are installed by both subversion and Apache. These packages are required to access svn via apache. The subversion-deps package contains apr and apr-util version 0.9.x,  but apache 2.2.x uses apr and apr-util 1.2.x, and subversion and apache must be using the same version of apr and apr-util, else things can result in above error. </p>
<p>To get a fix, you need to re-compile subversion and inform that it should use Apache&#8217;s apr and apr-util packs instead of it&#8217;s own. You should search for apr-1-config and apu-1-config files in your server and then supply their path while running configure. I found both in my /usr/bin/ directory.</p>
<blockquote><p>
# cd subversion-1.6.1<br />
# ./configure &#8211;with-apr=/usr/bin/apr-1-config &#8211;with-apr-util=/usr/bin/apu-1-config<br />
# make<br />
# make install
</p></blockquote>
<p>Now config your apache to access your repositories, you can find a quick howto <a href="http://linuxadminzone.com/configure-password-based-subversion-access-via-http-for-multiple-users/">here</a>. It should run fine. Please post a comment in case you still not able to access your repos using Apache.</p>
]]></content:encoded>
			<wfw:commentRss>http://linuxadminzone.com/fix-subversion-svn-child-exit-signal-segmentation-fault-error-in-apache/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Download, install and configure ViewVC for Subversion</title>
		<link>http://linuxadminzone.com/download-install-and-configure-viewvc-for-subversion/</link>
		<comments>http://linuxadminzone.com/download-install-and-configure-viewvc-for-subversion/#comments</comments>
		<pubDate>Tue, 22 Apr 2008 09:38:46 +0000</pubDate>
		<dc:creator>jagbir</dc:creator>
				<category><![CDATA[Subversion]]></category>
		<category><![CDATA[cvs]]></category>
		<category><![CDATA[viewvc]]></category>

		<guid isPermaLink="false">http://linuxadminzone.com/?p=7</guid>
		<description><![CDATA[ViewVC is a Subversion repository browser software having many useful features. You need python and a web browser to run it. If you are maintaining a Subversion server, you should install it to view repositories, files, branches, directories, versions or comparison between versions. Step 1. Download and install Get the latest version of viewvc from [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://viewvc.tigris.org/">ViewVC</a> is a Subversion repository browser software having many useful features. You need python and a web browser to run it. If you are maintaining a Subversion server, you should install it to view repositories, files, branches, directories, versions or comparison between versions.</p>
<p><strong>Step 1. Download and install</strong><br />
Get the latest version of viewvc from <a href="http://viewvc.tigris.org/">here</a>, when writing of this article the latest version was 1.2-dev. I&#8217;m using the development branch, you can use more stable. Untar it and start installation:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">tar</span> xzf viewvc-<span style="color: #000000;">1.2</span>-dev.tar.gz
$ <span style="color: #7a0874; font-weight: bold;">cd</span> viewvc-<span style="color: #000000;">1.2</span>-dev
$ .<span style="color: #000000; font-weight: bold;">/</span>viewvc-install</pre></div></div>

<p><strong>Step 2. Installation</strong><br />
Answer simple questions. Default choice is okay for normal operation.</p>
<p><strong>Step 3. Update Config</strong><br />
Edit its config file which is self explanatory. Various options are there, you should read carefully and make use of. For basic working just update following options related to your Subversion server:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>viewvc-<span style="color: #000000;">1.2</span>-dev<span style="color: #000000; font-weight: bold;">/</span>
$ <span style="color: #c20cb9; font-weight: bold;">vi</span> viewvc.conf
svn_roots = cgi-bin: <span style="color: #000000; font-weight: bold;">/</span>svn<span style="color: #000000; font-weight: bold;">/</span>cgi-bin
root_parents = <span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">svn</span> : <span style="color: #c20cb9; font-weight: bold;">svn</span>
default_root = cgi
root_as_url_component = <span style="color: #000000;">1</span></pre></div></div>

<p>here, root_parents is directory which contains all you repositories. It can be avoided in case your repositories are spread over multiple locations. default_root is the name of repository(set in svn_roots) to be displayed by viewvc automatically. </p>
<p><strong>Step 4. Update Apache</strong><br />
Open your httpd.conf file for Apache settings and write:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">vi</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>httpd<span style="color: #000000; font-weight: bold;">/</span>conf<span style="color: #000000; font-weight: bold;">/</span>httpd.conf
&nbsp;
ScriptAlias <span style="color: #000000; font-weight: bold;">/</span>viewvc <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>viewvc-<span style="color: #000000;">1.2</span>-dev<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>cgi<span style="color: #000000; font-weight: bold;">/</span>viewvc.cgi
ScriptAlias <span style="color: #000000; font-weight: bold;">/</span>queryvc <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>viewvc-<span style="color: #000000;">1.2</span>-dev<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>cgi<span style="color: #000000; font-weight: bold;">/</span>query.cgi</pre></div></div>

<p>We are making a scriptalias to access viewvc through running its cgi script. The second line, which make alias of query.cgi is optional but recommended. It enables you to search for repositories, branches, files in your cvs/subversion.</p>
<p>ViewVC should run fine now, but in case you still found that its throwing some exception/error something like something like <strong> No module named svn found </strong>, pls proceed to the solution which I&#8217;ve posted <a href="http://linuxadminzone.com/quickfix-viewvc-importerror-no-module-named-svn-error/">here</a>. </p>
<p>More related and helpful articles:<br />
* <a href="http://linuxadminzone.com/5-steps-to-secure-your-linux-server/"> 5 steps to secure your Linux Server </a><br />
* <a href="http://linuxadminzone.com/ensuring-secure-access-to-production-linux-servers/"> Ensuring secure access to production Linux Servers </a><br />
* <a href="http://linuxadminzone.com/bash-script-to-backup-essential-log-files-of-linux-server/"> Bash script to backup essential log files in Linux </a><br />
* <a href="http://linuxadminzone.com/quickly-change-your-ssh-port-from-default-22-to-something-higher/"> Quickly change your ssh port from defualt 22 to something higher </a><br />
* <a href="http://linuxadminzone.com/ssh-port-forwarding-from-remote-to-local-machine/"> SSH port forwarding from remote to local machine </a><br />
* <a href="http://linuxadminzone.com/save-root-or-user-history-to-check-later/"> Save root or user history to check later </a><br />
* <a href="http://linuxadminzone.com/install-and-configure-denyhost/"> Install and configure denyhost to prevent brute force attacks </a></p>
]]></content:encoded>
			<wfw:commentRss>http://linuxadminzone.com/download-install-and-configure-viewvc-for-subversion/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

