<?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>Paul Osman &#187; SCM</title>
	<atom:link href="http://blog.eval.ca/category/scm/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.eval.ca</link>
	<description>Thoughts on Software and Other Things</description>
	<lastBuildDate>Wed, 07 Jul 2010 18:56:48 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Perforce Knowledge Base Launched</title>
		<link>http://blog.eval.ca/2007/11/04/perforce-knowledge-base-launched/</link>
		<comments>http://blog.eval.ca/2007/11/04/perforce-knowledge-base-launched/#comments</comments>
		<pubDate>Sun, 04 Nov 2007 10:21:59 +0000</pubDate>
		<dc:creator>paul</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[SCM]]></category>

		<guid isPermaLink="false">http://blog.paulosman.com/?p=23</guid>
		<description><![CDATA[In case you missed the announcement, the Perforce Knowledge Base is now available. Click here for more information about the technology driving the site. 
]]></description>
			<content:encoded><![CDATA[<p>In case you missed the announcement, the Perforce Knowledge Base is now <a href="http://kb.perforce.com/">available</a>. Click <a href="http://www.perforce.com/perforce/conferences/us/2007/presentations/kbpresentation.pdf">here</a> for more information about the technology driving the site. </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.eval.ca/2007/11/04/perforce-knowledge-base-launched/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Perspectives on SCM</title>
		<link>http://blog.eval.ca/2007/06/20/perspectives-on-scm/</link>
		<comments>http://blog.eval.ca/2007/06/20/perspectives-on-scm/#comments</comments>
		<pubDate>Wed, 20 Jun 2007 20:33:40 +0000</pubDate>
		<dc:creator>paul</dc:creator>
				<category><![CDATA[SCM]]></category>

		<guid isPermaLink="false">http://blog.paulosman.com/?p=21</guid>
		<description><![CDATA[So I know this is old news by now, but Linus Torvalds gave a talk last month on git, the version management system he wrote. He spends quite a lot of time bashing other SCM systems, particularly Perforce and Subversion. He writes off CVS entirely, which is perhaps warranted, but I thought his views on [...]]]></description>
			<content:encoded><![CDATA[<p>So I know this is old news by now, but Linus Torvalds gave a talk last month on <a href="http://git.or.cz/">git</a>, the version management system he wrote. He spends quite a lot of time bashing other SCM systems, particularly <a href="http://www.perforce.com">Perforce</a> and <a href="http://subversion.tigris.org/">Subversion</a>. He writes off CVS entirely, which is perhaps warranted, but I thought his views on the other two products were way off. He doesn&#8217;t really explain why he thinks that Perforce &#8220;should just go away&#8221;, so I can&#8217;t really comment on that, but curiously he does go on to complain about things that Perforce actually does rather well (like branching and merging). He also says clearly that he &#8220;is not an SCM person&#8221;, so I guess that explains it.</p>
<p>
<object width="425" height="350"><param name="movie; value=;http://www.youtube.com/v/4XpnKHJAok8"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/4XpnKHJAok8" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object>
</p>
<p>
For a much more informative and useful presentation on SCM, check out Laura Wingerd&#8217;s (someone who <em>is</em> an SCM person) presentation at Google Talks:
</p>
<p>
<embed style="width:400px; height:326px;" id="VideoPlayback" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=-577744660535947210&#038;hl=en-CA" flashvars=""></embed></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.eval.ca/2007/06/20/perspectives-on-scm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PAM Authentication for Apache, Trac and SVN</title>
		<link>http://blog.eval.ca/2007/01/04/pam-authentication-for-apache-trac-and-svn/</link>
		<comments>http://blog.eval.ca/2007/01/04/pam-authentication-for-apache-trac-and-svn/#comments</comments>
		<pubDate>Thu, 04 Jan 2007 20:45:38 +0000</pubDate>
		<dc:creator>paul</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[SCM]]></category>

		<guid isPermaLink="false">http://blog.paulosman.com/?p=11</guid>
		<description><![CDATA[
I&#8217;m going to describe how to get two of my favourite development tools, Trac and Subversion, to authenticate against PAM (Pluggable Authentication Module). For those who might not be familiar, Trac is a wiki that has integrated SCM and issue tracking. It&#8217;s written in Python and it&#8217;s incredibly useful. I&#8217;ve been using Subversion for version [...]]]></description>
			<content:encoded><![CDATA[<p>
I&#8217;m going to describe how to get two of my favourite development tools, Trac and Subversion, to authenticate against PAM (Pluggable Authentication Module). For those who might not be familiar, <a href="http://trac.edgewall.org/" title="Trac">Trac</a> is a wiki that has integrated SCM and issue tracking. It&#8217;s written in Python and it&#8217;s incredibly useful. I&#8217;ve been using Subversion for version control for a long time and Trac is perfect for documenting a project as you go, and for keeping track of tasks and bugs. It&#8217;s access control settings allow you to specify levels of access for different users, so I often create one group for me and any other developers, and another group for my clients. The clients group can update the wiki, create tickets and get reports or look at milestones, etc. The developers group can administer all aspects of the site. Anyway, as useful as Trac and SVN are, I started to get really sick of handling authentication for them. I used to set up htpasswd files for each repository and wiki and it got to be a real pain, especially when I wanted my clients or developers to also have email, shell access, etc. So I decided to try and get mod_pam_auth working so I could use existing system accounts for Trac and Subversion access (over SSL of course).
</p>
<p>
mod_auth_pam is an Apache module that implements Basic authentication on top of the Pluggable Authentication Module. Unfortunately, as the <a href="http://pam.sourceforge.net/mod_auth_pam/">project</a> page says, the module is no longer being maintained which is unfortunate, but it works well enough with Apache 2.0.
</p>
<p>
Installing the module is pretty straightforward if you&#8217;re familiar installing Apache modules. I won&#8217;t go into too much detail, but as usual you&#8217;ll need to load the module in your Apache configuration:
</p>

<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;"><span style="color: #00007f;">LoadModule</span> auth_pam_module modules/mod_auth_pam.so
<span style="color: #00007f;">LoadModule</span> auth_sys_group_module modules/mod_auth_sys_group.so</pre></div></div>

<p>
Once that&#8217;s done you can easily set up basic authentication with PAM. Because Basic authentication involves sending a username + password combination in plain text, this setup should <b>not</b> be used without SSL. Within my VirtualHost configuration, I define separate location configs for each trac site and svn repository. It all looks something like this:
</p>

<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;">&lt;<span style="color: #000000; font-weight:bold;">VirtualHost</span> 123.321.123.321:<span style="color: #ff0000;">443</span>&gt;
    <span style="color: #00007f;">ServerName</span> host.domain.tld
    SSLEngine <span style="color: #0000ff;">On</span>
    ...
    <span style="color: #adadad; font-style: italic;"># Trac config</span>
    &lt;<span style="color: #000000; font-weight:bold;">Location</span> /trac&gt;
       <span style="color: #00007f;">SetHandler</span> mod_python
       PythonHandler trac.web.modpython_frontend 
       PythonOption TracEnvParentDir /var/lib/trac
       PythonOption TracUriRoot /trac
    &lt;/<span style="color: #000000; font-weight:bold;">Location</span>&gt;
&nbsp;
    &lt;<span style="color: #000000; font-weight:bold;">Location</span> <span style="color: #7f007f;">&quot;/trac/tracsiteone/login&quot;</span>&gt;
       AuthPAM_Enabled <span style="color: #0000ff;">On</span>
       <span style="color: #00007f;">AuthType</span> Basic
       <span style="color: #00007f;">AuthName</span> <span style="color: #7f007f;">&quot;trac site # 1&quot;</span>
       <span style="color: #00007f;">Require</span> <span style="color: #00007f;">user</span> paul
    &lt;/<span style="color: #000000; font-weight:bold;">Location</span>&gt;
&nbsp;
    &lt;<span style="color: #000000; font-weight:bold;">Location</span> <span style="color: #7f007f;">&quot;/trac/tracsitetwo/login&quot;</span>&gt;
       AuthPAM_Enabled <span style="color: #0000ff;">On</span>
       <span style="color: #00007f;">AuthType</span> Basic
       <span style="color: #00007f;">AuthName</span> <span style="color: #7f007f;">&quot;trac site # 2&quot;</span>
       <span style="color: #00007f;">Require</span> <span style="color: #00007f;">group</span> developers
    &lt;/<span style="color: #000000; font-weight:bold;">Location</span>&gt;
&nbsp;
    <span style="color: #adadad; font-style: italic;"># Subversion config</span>
    &lt;<span style="color: #000000; font-weight:bold;">Location</span> /svn&gt;
       DAV svn
       SVNParentPath /var/svn
       SVNListParentPath <span style="color: #0000ff;">On</span>
       SVNAutoVersioning <span style="color: #0000ff;">On</span>
    &lt;/<span style="color: #000000; font-weight:bold;">Location</span>&gt;
&nbsp;
    &lt;<span style="color: #000000; font-weight:bold;">Location</span> <span style="color: #7f007f;">&quot;/svn/repositoryone&quot;</span>&gt;
       AuthPAM_Enabled <span style="color: #0000ff;">On</span>
       <span style="color: #00007f;">AuthType</span> Basic
       <span style="color: #00007f;">AuthName</span> <span style="color: #7f007f;">&quot;Repo # 1&quot;</span>
       <span style="color: #00007f;">Require</span> <span style="color: #00007f;">user</span> paul
    &lt;/<span style="color: #000000; font-weight:bold;">Location</span>&gt;
&nbsp;
    &lt;<span style="color: #000000; font-weight:bold;">Location</span> <span style="color: #7f007f;">&quot;/svn/repositorytwo&quot;</span>&gt;
       AuthPAM_Enabled <span style="color: #0000ff;">On</span>
       <span style="color: #00007f;">AuthType</span> Basic
       <span style="color: #00007f;">AuthName</span> <span style="color: #7f007f;">&quot;Repo # 2&quot;</span>
       <span style="color: #00007f;">Require</span> <span style="color: #00007f;">group</span> developers
    &lt;/<span style="color: #000000; font-weight:bold;">Location</span>&gt;
&lt;/<span style="color: #000000; font-weight:bold;">VirtualHost</span>&gt;</pre></div></div>

<p>
So what we have now is two SVN repositories and two Trac wikis. For the first trac wiki and the first subversion repository, only the user &#8216;paul&#8217; is given access. For the second, any valid user in the &#8216;developers&#8217; group has access. Unfortunately there&#8217;s an issue with shadow passwords and this module and I&#8217;m not entirely happy with the work-around so I may have to edit this setup to use <a href="http://unixpapa.com/mod_authnz_external/">mod_authnz_external</a> or maybe I&#8217;ll eventually move to LDAP. Regardless, I find this works well enough for now and saves a lot of hassle maintaining separate authentication files.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.eval.ca/2007/01/04/pam-authentication-for-apache-trac-and-svn/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
