<?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>batteryslave &#187; apahe linux coding</title>
	<atom:link href="http://www.batteryslave.com/tag/apahe-linux-coding/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.batteryslave.com</link>
	<description>minor thoughts about gadgets, code, podcasts and other technical stuff...</description>
	<lastBuildDate>Sat, 20 Feb 2010 18:41:32 +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>first steps with trac</title>
		<link>http://www.batteryslave.com/2009/02/first-steps-with-trac/</link>
		<comments>http://www.batteryslave.com/2009/02/first-steps-with-trac/#comments</comments>
		<pubDate>Tue, 24 Feb 2009 20:36:25 +0000</pubDate>
		<dc:creator>batteryslave</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[toolz]]></category>
		<category><![CDATA[apahe linux coding]]></category>

		<guid isPermaLink="false">http://www.batteryslave.com/?p=89</guid>
		<description><![CDATA[ in a recent little project of my alter ego dotob (website not yet nice and tasty) i wanted to try the project management tool trac from edgewall. its a webbased system written in python. nice because i want to look at python as a scripting language anyway.
so because my webserver is a debian system [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.batteryslave.com/wp-content/trac-logo.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" src="http://www.batteryslave.com/wp-content/trac-logo-thumb.png" border="0" alt="trac_logo" width="218" height="65" /></a> in a recent little project of my alter ego dotob (website not yet nice and tasty) i wanted to try the project management tool <a href="http://trac.edgewall.org/" target="_blank">trac</a> from edgewall. its a webbased system written in python. nice because i want to look at python as a scripting language anyway.<br />
so because my webserver is a debian system the installations first steps where easy:</p>
<p><code>apt-get install trac</code></p>
<p>after that trac is installed in /usr/share/trac. to create your trac-environment you have to call the admin console program from trac:</p>
<p><code>trac-admin /var/www/trac initenv</code></p>
<p>where /var/www/trac is the place where your website will go and initenv is the command to tell trac-admin to initialise a new environment. next i setup apache to serve the new site. there are a bunch of possibilities to let apache server trac: cgi, fastcgi, mod_python etc. i tried cgi and fastcgi first but the mod_python version worked at last. so i need to install mod_phyton:</p>
<p><code>apt-get install libapache-mod-python</code></p>
<p>ok got some tips for the site config out of the net. here is my virtualhost-config part:</p>
<p><span style="font-family: Courier New;"># Trac Configuration<br />
&lt;VirtualHost *&gt;<br />
ServerName wop.dotob.de<br />
DocumentRoot /var/www/trac/<br />
&lt;Location / &gt;<br />
SetHandler mod_python<br />
PythonHandler trac.web.modpython_frontend<br />
PythonInterpreter main_interpreter<br />
PythonOption TracEnv /var/www/trac/<br />
PythonOption TracUriRoot /<br />
AuthType Basic<br />
AuthName &#8220;trac&#8221;<br />
# Use the SVN password file.<br />
AuthUserFile /var/svn/.dav_svn.passwd<br />
Require valid-user<br />
&lt;/Location&gt;<br />
&lt;/VirtualHost&gt;</span></p>
<p>sorry i assumed you have set your subversion on the same server an it is already up but i wont tell how this is done here. thats said: the /var/svn/.dav_svn.passwd is my subversion authentication file. i use the svn authentication for trac too.</p>
<p>well now trac is up and running. you can use trac-admin, which is a great commandline tool with tab-completion and all to config stuff like when you create a ticket which level of severity are displayed or what the name of your milestones is. what i suggest also is to set some of the user permissions so you can change more stuff via the webinterface.</p>
<p>another thing i wanted is to let trac look into subversion commits an retrieve some information from my commit messages. so assume i have a ticket #5 and i check some fix for that. now i can write &#8220;fix #5 introduce new style in xaml&#8221; in the commit message and trac will close the ticket #5 with the svn version mentioned and the commit message attached. so how is this done:</p>
<p>subversion uses hook files to let users run scripts. so you go to your subversion repository (assume /var/svn/src) into the directory hooks. rename the post-commit.tmpl to post-commit. than that file is executed by subversion. now you need to insert the code from trac:</p>
<p><code>REPOS="$1"<br />
REV="$2"<br />
LOG=`svnlook log -r $REV $REPOS`<br />
AUTHOR=`svnlook author -r $REV $REPOS`<br />
TRAC_ENV='/var/www/woptrac'<br />
/usr/bin/python /usr/share/doc/trac/contrib/trac-post-commit-hook -p "$TRAC_ENV" -r "$REV" -m "$LOG" -u "$AUTHOR"</code></p>
<p>i found some tutorials where the LOG part was missing but i couldnt get it to work without it. another thing that cost me a lot of time: when you write the commit it didnt work for me to write: &#8220;Fixes: #5&#8243;. i think the : between the command Fiexs and the #5 was not considered by the scripts regex.</p>
<p>i am curious about using trac. will tell how it behaves.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.batteryslave.com/2009/02/first-steps-with-trac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
