<?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>Persönlicher Blog von Robert Erlinger &#187; Subversion</title>
	<atom:link href="http://blog.databyte.at/tag/subversion/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.databyte.at</link>
	<description>Persönlicher Blog von Robert Erlinger</description>
	<lastBuildDate>Tue, 10 May 2011 14:21:07 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How do I install mod_dav_svn</title>
		<link>http://blog.databyte.at/2008/06/how-do-i-install-mod_dav_svn/</link>
		<comments>http://blog.databyte.at/2008/06/how-do-i-install-mod_dav_svn/#comments</comments>
		<pubDate>Sun, 15 Jun 2008 18:04:39 +0000</pubDate>
		<dc:creator>Robert Erlinger</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[Subversion]]></category>

		<guid isPermaLink="false">http://blog.databyte.at/index.php/86</guid>
		<description><![CDATA[Installing mod_dav_svn by Gregg Pollack (gregg at patchedsoftware dot com)
1. Install mod_dav_svn
sudo yum install mod_dav_svn
2. Add the LoadModule lines to your httpd:
To edit the httpd.conf:
sudo vi /etc/httpd/conf/httpd.conf
Search for the LoadModule lines, and add these to the bottom:
LoadModule dav_svn_module     modules/mod_dav_svn.so
LoadModule authz_svn_module   modules/mod_authz_svn.so
3. Create an HTTP authentication file &#8211; To setup and create the authentication file for [...]]]></description>
			<content:encoded><![CDATA[<p>Installing mod_dav_svn by Gregg Pollack (gregg at patchedsoftware dot com)</p>
<p>1. Install mod_dav_svn<br />
sudo yum install mod_dav_svn</p>
<p>2. Add the LoadModule lines to your httpd:</p>
<p>To edit the httpd.conf:<br />
sudo vi /etc/httpd/conf/httpd.conf</p>
<p>Search for the LoadModule lines, and add these to the bottom:<br />
LoadModule dav_svn_module     modules/mod_dav_svn.so<br />
LoadModule authz_svn_module   modules/mod_authz_svn.so</p>
<p>3. Create an HTTP authentication file &#8211; To setup and create the authentication file for the first time, run:</p>
<p>sudo htpasswd -cm /etc/svn-auth-file &lt;username&gt;</p>
<p>To add new users to this file, use</p>
<p>sudo htpasswd -m /etc/svn-auth-file &lt;username&gt;</p>
<p>NOTE: If when you run this command, you may get &#8220;Command not found&#8221;. this is because you don&#8217;t have /usr/sbin/ in your path directory.  So lets do that now.</p>
<p>run &#8220;vi ~/.bash_profile&#8221;, and add to the end of your path, so it looks like this:</p>
<p>PATH=$PATH:$HOME/bin:/usr/sbin:/sbin</p>
<p>Then run &#8220;. ~/.bash_profile&#8221; to execute your bash_profile and go back up to step 3.</p>
<p>4. Railsmachine creates an apache config file for each of your domains, in /etc/httpd/conf/apps/.  Find the application that you want to add svn to, and edit the conf file.  In my case, the website was www.MyDietSolution.com.  I added this to the top of the /etc/httpd/conf/apps/myabsolutediet.conf file:</p>
<p>&lt;VirtualHost *:80&gt;<br />
ServerName svn.myabsolutediet.com</p>
<p>&lt;Location /&gt;<br />
DAV svn<br />
SVNPath /var/www/apps/myabsolutediet/repos<br />
AuthType Basic<br />
AuthName &#8220;Authorization Realm&#8221;<br />
AuthUserFile /etc/absolute-auth-file<br />
Require valid-user<br />
&lt;/Location&gt;<br />
&lt;/VirtualHost&gt;</p>
<p>5.  You don&#8217;t have to worry about changing any file permissions, as other subversion http tutorials might tell you.  deploy user already runs apache.</p>
<p>6.  Restart your apache:<br />
sudo /etc/init.d/httpd restart</p>
<p>7.  Test out your application by going to http://svn.YourDomain.com/, and it should prompt for authorization, and then show you the repository!</p>
<p>8. You want to enable SSL security so your passwords and code aren&#8217;t sent in plaintext? Keep on following. This is assuming you don&#8217;t already have your own Cert.  If you do have your own cert, skip down to the bottom of the page.</p>
<p>First you&#8217;ll want to create your own private cert (if you don&#8217;t have one and don&#8217;t want to pay for one).  Follow these instructions to create your own.  You&#8217;ll need to input a passphrase you can remember for later too.</p>
<p>mkdir ~/sslcert<br />
cd ~/sslcert</p>
<p>openssl genrsa -des3 -out server.key 1024<br />
openssl req -new -key server.key -out server.csr<br />
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt</p>
<p>9. edit your virtualhost tag again, change the port, and add the three SSL lines.  Like:</p>
<p>&lt;VirtualHost *:443&gt;<br />
ServerName svn.myabsolutediet.com<br />
SSLEngine On<br />
SSLCertificateFile /home/deploy/sslcert/server.crt<br />
SSLCertificateKeyFile /home/deploy/sslcert/server.key</p>
<p>10. If you&#8217;re using a different subdomain, &#8220;svn.yourdomain.com&#8221;, make sure your dns has a CNAME Record called svn so it forwards properly.  You wouldn&#8217;t need to worry about this if all subdomains forward to your server.</p>
<p>11. Restart apache:<br />
sudo /etc/init.d/httpd restart</p>
<p>Then go to https://svn.yourdomain.com/ and you should be prompted for the cert, and for authorization, and you&#8217;re golden.</p>
<p>12. You will be asked for your key everytime you restart apache.  To get around this:</p>
<p>cd ~/sslcert<br />
cp server.key server.key.orig<br />
openssl rsa -in server.key.orig -out server.key</p>
<p>&#8212;&#8211;</p>
<p>So you have your own CERT?</p>
<p>I&#8217;m going to assume you configured this using railsmachine&#8217;s scripts, and that your webserver conf file (/etc/httpd/conf/apps/myabsolutediet.conf) has two parts, one for port 80 and another for port 443.  I&#8217;m also going to assume that your Certificate is setup properly.</p>
<p>1. Under your port 443 virtual host, create an alias for your svn server if you like:</p>
<p>ServerAlias svn.yourdomain.com</p>
<p>If you do use svn.yourdomain.com make sure your dns has a CNAME Record called svn so it forwards properly.  You wouldn&#8217;t need to worry about this if all subdomains forward to your server.</p>
<p>2. Add your location directives:</p>
<p>&lt;Location /svn&gt;<br />
DAV svn<br />
SVNPath /var/www/apps/myabsolutediet/repos<br />
AuthType Basic<br />
AuthName &#8220;Authorization Realm&#8221;<br />
AuthUserFile /etc/absolute-auth-file<br />
Require valid-user<br />
&lt;/Location&gt;</p>
<p>This is a little different then the Location we used the first time.  Notice this time we&#8217;re giving a path name &#8220;Location /svn&#8221;, so we&#8217;re only directed to svn if we go to that path in our URL.</p>
<p>3. Now we need to tell apache, that we DON&#8217;T want to redirect incoming requests that have SVN in the URL to our mongrel cluster.  Put the following line BEFORE the &#8220;RewriteRule ^/(.*)$ balancer://servername_cluster%{REQUEST_URI} [P,QSA,L]&#8221; directive:</p>
<p>RewriteCond %{REQUEST_URI} !^/svn*</p>
<p>4. Restart the server, and try going to https://domain_name.com/svn/</p>
<p>&#8212;&#8212;-</p>
<p>Adding Multiple Repositories</p>
<p>1. All you need to do to add multiple repositories, without adding more IP addresses, is add multiple Location directives.</p>
<p>&lt;Location /domain1/svn&gt;<br />
DAV svn<br />
SVNPath /var/www/apps/domain1/repos<br />
AuthType Basic<br />
AuthName &#8220;Authorization Realm&#8221;<br />
AuthUserFile /etc/domain1-auth-file<br />
Require valid-user<br />
&lt;/Location&gt;</p>
<p>&lt;Location /domain2/svn&gt;<br />
DAV svn<br />
SVNPath /var/www/apps/domain2/repos<br />
AuthType Basic<br />
AuthName &#8220;Authorization Realm&#8221;<br />
AuthUserFile /etc/domain2-auth-file<br />
Require valid-user<br />
&lt;/Location&gt;</p>
<p>2. If you want to be able to have a different base url, just add a new alias:</p>
<p>ServerAlias svn.domain1.com<br />
ServerAlias svn.domain2.com</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.databyte.at/2008/06/how-do-i-install-mod_dav_svn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Keyword Substitution in Subversion</title>
		<link>http://blog.databyte.at/2007/06/keyword-substitution-in-subversion/</link>
		<comments>http://blog.databyte.at/2007/06/keyword-substitution-in-subversion/#comments</comments>
		<pubDate>Mon, 11 Jun 2007 11:16:07 +0000</pubDate>
		<dc:creator>Robert Erlinger</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[Subversion]]></category>

		<guid isPermaLink="false">http://blog.databyte.at/?p=16</guid>
		<description><![CDATA[Um in Files bestimmte Tags durch Subversion zu ersetzen, wie wir es zB aus CVS kennen, muss im SVN Projekt folgendes gemacht werden:
 bash# svn propset svn:keywords "Id" &#60;list-of-files&#62;
 Im zu ersetzenden File muss der Tag geschrieben werden, z.B.:

 /**
  * File: AuthenticationFilter.java
  * $Id$
  */
 Nach einem Commit wird der Tag [...]]]></description>
			<content:encoded><![CDATA[<p>Um in Files bestimmte Tags durch Subversion zu ersetzen, wie wir es zB aus CVS kennen, muss im SVN Projekt folgendes gemacht werden:</p>
<pre class="programlisting"> bash# svn propset svn:keywords "Id" &lt;list-of-files&gt;</pre>
<p><strong> Im zu ersetzenden File muss der Tag geschrieben werden, z.B.:</strong></p>
<pre class="programlisting">
 /**
  * File: AuthenticationFilter.java
  * $Id$
  */</pre>
<p><strong> Nach einem Commit wird der Tag z.B. wie folgt ersetzt:</strong></p>
<pre class="programlisting"> /**
  * File: AuthenticationFilter.java
  * $Id: AuthenticationFilter.java 104 2007-06-11 09:13:15Z robert.erlinger $
  */</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.databyte.at/2007/06/keyword-substitution-in-subversion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

