<?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>mobile and gis dev notes &#187; trac</title>
	<atom:link href="http:///wordpress/tag/trac/feed/" rel="self" type="application/rss+xml" />
	<link>/wordpress</link>
	<description>by rupert</description>
	<lastBuildDate>Sun, 22 Jan 2012 04:34:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Long Time No Trac</title>
		<link>/wordpress/2008/11/long-time-no-trac/</link>
		<comments>/wordpress/2008/11/long-time-no-trac/#comments</comments>
		<pubDate>Tue, 25 Nov 2008 09:37:48 +0000</pubDate>
		<dc:creator>rupert</dc:creator>
				<category><![CDATA[trac]]></category>

		<guid isPermaLink="false">/wordpress/?p=299</guid>
		<description><![CDATA[Its been a while I haven&#8217;t setup an svn repository for SCM. Anyhow, here are the steps just in case I forget again and again&#8230; 1. Add a new trac setting in /etc/apache2/sites-available/default &#160; 2. Copy a template cp -Rf /var/www/trac/trac-template /var/www/localdumplings 3. Restart Apache2 4. Resync the repository trac-admin localdumpling resync]]></description>
			<content:encoded><![CDATA[<p>Its been a while I haven&#8217;t setup an svn repository for SCM. Anyhow, here are the steps just in case I forget again and again&#8230;</p>
<p>1. Add a new trac setting in /etc/apache2/sites-available/default</p>

<div class="wp_syntax"><div class="code"><pre class="conf" style="font-family:monospace;">&nbsp;</pre></div></div>

<p>2. Copy a template</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #660033;">-Rf</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>trac<span style="color: #000000; font-weight: bold;">/</span>trac-template <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>localdumplings</pre></div></div>

<p>3. Restart Apache2</p>
<p>4. Resync the repository</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">trac-admin localdumpling resync</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>/wordpress/2008/11/long-time-no-trac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Trac slow on updating or creating tickets</title>
		<link>/wordpress/2008/03/trac-slow-on-updating-or-creating-tickets/</link>
		<comments>/wordpress/2008/03/trac-slow-on-updating-or-creating-tickets/#comments</comments>
		<pubDate>Sun, 09 Mar 2008 15:36:56 +0000</pubDate>
		<dc:creator>rupert</dc:creator>
				<category><![CDATA[subversion]]></category>
		<category><![CDATA[trac]]></category>

		<guid isPermaLink="false">http://www.gisnotes.com/wordpress/index.php/2008/03/09/trac-slow-on-updating-or-creating-tickets/</guid>
		<description><![CDATA[This has been a productivity hogger for us for quite a few weeks and we really had no clue at it first. What I noticed was after enabling logging on trac.ini: [logging] log_file = trac.log log_level = CRITICAL log_type = file was that every post was being sent to an SMTP server. 2008-03-09 19:50:49,323 Trac[__init__] [...]]]></description>
			<content:encoded><![CDATA[<p>This has been a productivity hogger for us for quite a few weeks and we really had no clue at it first. What I noticed was after enabling logging on trac.ini:</p>

<div class="wp_syntax"><div class="code"><pre class="conf" style="font-family:monospace;">[logging]
log_file = trac.log
log_level = CRITICAL
log_type = file</pre></div></div>

<p>was that every post was being sent to an SMTP server.</p>
<p><span id="more-162"></span></p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">2008-03-09 19:50:49,323 Trac[__init__] DEBUG: Dispatching &lt;request&gt;
2008-03-09 19:50:49,335 Trac[__init__] DEBUG: action controllers: [
&lt;trac&gt;]
2008-03-09 19:51:48,483 Trac[__init__] INFO: Sending SMTP notification to 192.168.1.15:25 to [u'rupert@cybersoftchina.com', u'dev@cybersoftchina.com']
2008-03-09 19:51:53,610 Trac[__init__] DEBUG: Retrieving session for ID 'rupert'
2008-03-09 19:51:53,654 Trac[__init__] DEBUG: Dispatching &lt;request&gt;
&lt;/request&gt;&lt;/trac&gt;&lt;/request&gt;</pre></div></div>

<p>The culprit as you expected was my slow qmail server which for some reason I can&#8217;t figure out for now.</p>
<p><strong>Workaround</strong><br />
I have to disable email alerts for every new/update ticket for the time being.</p>

<div class="wp_syntax"><div class="code"><pre class="conf" style="font-family:monospace;">[notification]
admit_domains =
always_notify_owner = true
always_notify_reporter = true
always_notify_updater = true
ignore_domains =
mime_encoding = base64
#smtp_always_bcc =
#smtp_always_cc = dev@cybersoftchina.com
#smtp_default_domain =
#smtp_enabled = true
#smtp_from = trac@cybersoftchina.com
#smtp_from_name = Trac Auto Notification CNCPHS
#smtp_password = cybertrac2007
#smtp_port = 25
#smtp_replyto = dev@cybersoftchina.com
#smtp_server = 192.168.1.15
#smtp_subject_prefix = __default__
#smtp_user = trac@cybersoftchina.com
ticket_subject_template = $prefix #$ticket.id: $summary
use_public_cc = false
use_short_addr = false
use_tls = false</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>/wordpress/2008/03/trac-slow-on-updating-or-creating-tickets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Subversion on Debian</title>
		<link>/wordpress/2008/01/building-and-migrating-svn-to-another-machine/</link>
		<comments>/wordpress/2008/01/building-and-migrating-svn-to-another-machine/#comments</comments>
		<pubDate>Sat, 26 Jan 2008 17:26:15 +0000</pubDate>
		<dc:creator>rupert</dc:creator>
				<category><![CDATA[subversion]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[trac]]></category>

		<guid isPermaLink="false">/wordpress/?p=138</guid>
		<description><![CDATA[I was greeted with &#8220;No space left on device&#8221; on my cron log. Turns out that my svn server obviously ran out of disk space. The old svn server was running on CentOS4.3, Subversion 1.3.2, Trac-0.11.devxxx. I decided to migrate the svn data to a new server, so I installed Debian4.01 on a small server [...]]]></description>
			<content:encoded><![CDATA[<p>I was greeted with &#8220;No space left on device&#8221; on my cron log. Turns out that my svn server obviously ran out of disk space. The old svn server was running on CentOS4.3, Subversion 1.3.2, Trac-0.11.devxxx.  I decided to migrate the svn data to a new server, so I installed Debian4.01 on a small server with 72 GB HD, no partitions (just / and swap, so the svn have room to grow&#8230;). Here are the steps I took for the migration:</p>
<p><strong>A. A fresh start&#8230;</strong><br />
1. Installed Debian. Fixed network and ssh.<br />
2. apt-get install apache2<br />
3. apt-get install subversion<br />
4. apt-get install python python-setuptools python-mysqldb python-subversion<br />
5. apt-get install libapache2-svn libapache2-mod-python</p>
<p><strong>B. Making SVN work&#8230;</strong><br />
1. svnadmin create /repos &#8211;fs-type fsfs</p>
<p>2.  Since I have a fresh apache configuration, I edited it accordingly from /etc/apache2/mods-available/dav_svn.conf:</p>

<div class="wp_syntax"><div class="code"><pre class="conf" style="font-family:monospace;">#SVN dir
&lt;location&gt;
  DAV svn
  SVNPath /repos
  SVNAutoversioning on
  AuthType Basic
  AuthName &quot;SVN - Your Project&quot;
  AuthUserFile /repos/svn-auth-file
  Require valid-user
&lt;/location&gt;</pre></div></div>

<p>3. Restart apache</p>
<p>4. To test if svn is running, import a project inside the repository.<br />
<code>svn import -m "initial import" /tmp/project http://127.0.0.1/repos/project</code></p>
<p><strong>C. Migrating the data</strong></p>
<p>After I got my fresh debian svn machine, I need to move the svn data and trac to the new server. <a href="http://svnbook.red-bean.com/nightly/en/svn.reposadmin.html">http://svnbook.red-bean.com/nightly/en/svn.reposadmin.html</a></p>
<p>1. Transfer <strong>/repos/svn-auth-file</strong> and <strong>/repos/svn-authorization-file</strong> to the new server<br />
2. Transferred <strong>trac.tar.gz</strong> (/var/www/trac) to the new server</p>
<p>To move the svn data from one server to another, I tried the ff choices&#8230;<br />
1. <code>svnadmin dump /repos /reposbak</code>. <em>Will work if disk space is not an issue. My <code>/repos</code> is 25 GB, and my other 30 GB partition was wiped out, even though the dump was not finished yet.</em></p>
<p>2. <code>svnadmin hotcopy --clean-logs /repos /repos2</code>. Accdg to the docs, this is exactly the same repository without the BdB logs. I then transferred the hotcopy from choice 2 above to the new server and works flawlessly to my surprise. So now, I still have all my revisions</p>
<p><a href="http://bealers.com/2008/01/01/installing-trac-on-debian-etch/">http://bealers.com/2008/01/01/installing-trac-on-debian-etch/</a><br />
<a href="http://trac.edgewall.org/wiki/TracOnDebianSarge">http://trac.edgewall.org/wiki/TracOnDebianSarge</a><br />
<a href="http://trac.edgewall.org/wiki/TracUpgrade">http://trac.edgewall.org/wiki/TracUpgrade</a><br />
<a href="http://trac.edgewall.org/wiki/TracInstall">http://trac.edgewall.org/wiki/TracInstall</a><br />
<a href="http://trac.edgewall.org/wiki/TracModPython">http://trac.edgewall.org/wiki/TracModPython</a></p>
]]></content:encoded>
			<wfw:commentRss>/wordpress/2008/01/building-and-migrating-svn-to-another-machine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Trac on CentOS4</title>
		<link>/wordpress/2007/06/installing-trac-on-centos4/</link>
		<comments>/wordpress/2007/06/installing-trac-on-centos4/#comments</comments>
		<pubDate>Tue, 26 Jun 2007 16:42:45 +0000</pubDate>
		<dc:creator>rupert</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[trac]]></category>

		<guid isPermaLink="false">/wordpress/?p=64</guid>
		<description><![CDATA[There is a problem with clearsilver on CentOS systems. I get neo_cgi.so module not found. Don&#8217;t force yourself, it would simply not work (Trac0.10.4 on CentOS, not unless we try the DAG repositories). So, I have to use Trac 0.11, setuptools and Genshi. Prerequisites: - Must have python 2.3+ - Must have mod_python-3.3.1.tgz - Must [...]]]></description>
			<content:encoded><![CDATA[<p>There is a problem with clearsilver on CentOS systems. I get neo_cgi.so module not found. Don&#8217;t force yourself, it would simply not work (Trac0.10.4 on CentOS, not unless we try the DAG repositories).</p>
<p>So, I have to use Trac 0.11, setuptools and Genshi.</p>
<p>Prerequisites:<br />
- Must have python 2.3+<br />
- Must have mod_python-3.3.1.tgz<br />
- Must have httpd2.0.x+ or httpd2.2.x</p>
<p><strong>A. Core Trac Installation</strong></p>
<p>1. Install <a href="http://cheeseshop.python.org/pypi/setuptools/">setuptools-0.6c6-py2.3.egg.</a> Download the setuptools according to your python distribution and simply run:</p>
<p><code>sh setuptools-0.6c4-py2.3.egg</code></p>
<p>2. Install <a href="http://genshi.edgewall.org/">Genshi.</a> There are numerous ways of installing <a href="http://genshi.edgewall.org/wiki/Download">Genshi.</a></p>
<p><code>easy_install Genshi</code></p>
<p>or</p>
<p><code><br />
#wget http://ftp.edgewall.com/pub/genshi/Genshi-0.4.2-py2.3.egg<br />
#chmod +x Genshi-0.4.2-py2.3.egg<br />
#easy_install Genshi-0.4.2-py2.3.egg<br />
</code></p>
<p>3. Install <a href="http://trac.edgewall.org/wiki/TracDownload">Trac 0.11.</a> We need to install trac from svn<br />
#svn co http://svn.edgewall.org/repos/trac/trunk trac<br />
#python ./setup.py install</p>
<p>This would install trac-admin and tracd in /usr/bin.</p>
<p><strong>Trac Post Intall</strong><br />
<code><br />
#mkdir -p /var/www/trac<br />
#cd /var/www/trac<br />
#trac-admin /var/www/trac/poimgr initenv<br />
#chown -Rf nobody:root /var/www<br />
#chmod -Rf 755 /var/www<br />
</code></p>
<p>Just accept the defaults for now, we can change it later on /var/www/trac/poimgr/conf/trac.ini.</p>
<p><strong>C. Apache Configuration</strong></p>

<div class="wp_syntax"><div class="code"><pre class="conf" style="font-family:monospace;">LoadModule python_module /usr/local/apache2/modules/mod_python.so
&nbsp;
&lt;location&gt;
SetHandler mod_python
PythonHandler trac.web.modpython_frontend
PythonOption TracEnv /var/www/trac/poimgr
PythonOption TracUriRoot /trac/poimgr
#Order deny,allow
#Deny from all
#Allow from 192.168.1.0/24
AuthType Basic
AuthName &quot;TRAC-POIMGR&quot;
AuthUserFile &quot;/repos/svn-auth-file&quot;
require valid-user
&lt;/location&gt;</pre></div></div>

<p>Notes:<br />
<a href="http://www.yolinux.com/TUTORIALS/LinuxSubversionAndTracServer.html">http://www.yolinux.com/TUTORIALS/LinuxSubversionAndTracServer.html</a></p>
<p>Depending on your installation, you may encounter some problems. I had problems with expat errors:</p>
<p><code><br />
ExpatError (null): line 1,column 0.<br />
</code></p>
<p>Turns out that it was confused between the link libraries of apache and that of python.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#ps aux | grep http | head -3</span>
<span style="color: #666666; font-style: italic;">#sof -p 29982 | grep expat</span>
<span style="color: #666666; font-style: italic;"># strings libexpat.so.0.1.0 | grep expat_</span>
expat_1.95.2
<span style="color: #666666; font-style: italic;"># strings /usr/lib/python2.3/lib-dynload/pyexpat.so | grep expat_</span>
expat_1.95.7
&nbsp;
Quickfix is to use symbolic links:
<span style="color: #666666; font-style: italic;">#cd /usr/local/apache2/lib/</span>
<span style="color: #666666; font-style: italic;">#cp -Rf /usr/lib/libexpat.so.0.5.0 /usr/local/apache2/lib/</span>
<span style="color: #666666; font-style: italic;">#ln -s libexpat.so.0.5.0 libexpat.so</span>
<span style="color: #666666; font-style: italic;">#ln -s libexpat.so.0.5.0 libexpat.so.0</span>
<span style="color: #666666; font-style: italic;">#su -l</span>
<span style="color: #666666; font-style: italic;">#/etc/init.d/httpd restart</span></pre></div></div>

<p>Configuring Trac.<br />
1. I have to move /etc/svn-auth-file to /repos-auth-file. Change the permissions so &#8220;nobody&#8221; could access it.</p>
<p>2. How to configure my users? Well, since its an intranet application and my trac-users and developers is both in the svn-auth-file, I need a way to configure users easily. Follow these steps from <a href="http://trac-hacks.org/wiki/AccountManagerPlugin">trac-hack.</a><br />
<code><br />
easy_install http://trac-hacks.org/svn/accountmanagerplugin/trunk<br />
</code></p>
<p>Role base authorisation in trac</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">trac-admin <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>trac<span style="color: #000000; font-weight: bold;">/</span>poiclient permission remove anonymous \
TICKET_CREATE TICKET_MODIFY WIKI_CREATE WIKI_MODIFY
&nbsp;
<span style="color: #000000; font-weight: bold;">for</span> n <span style="color: #000000; font-weight: bold;">in</span> rupert andrew; <span style="color: #000000; font-weight: bold;">do</span>
trac-admin <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>trac<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">&#123;</span>app_name<span style="color: #7a0874; font-weight: bold;">&#125;</span> permission add <span style="color: #007800;">$n</span> TRAC_ADMIN
<span style="color: #000000; font-weight: bold;">done</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">for</span> n <span style="color: #000000; font-weight: bold;">in</span> rupert andrew; <span style="color: #000000; font-weight: bold;">do</span>
trac-admin <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>trac<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">&#123;</span>app_name<span style="color: #7a0874; font-weight: bold;">&#125;</span> permission add <span style="color: #007800;">$n</span> WIKI_DELETE
<span style="color: #000000; font-weight: bold;">done</span>
&nbsp;
trac-admin <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>trac<span style="color: #000000; font-weight: bold;">/</span>poiclient permission add authenticated \
BROWSER_VIEW CHANGESET_VIEW FILE_VIEW LOG_VIEW MILESTONE_VIEW \
REPORT_SQL_VIEW REPORT_VIEW ROADMAP_VIEW SEARCH_VIEW \
TICKET_CREATE TICKET_MODIFY TICKET_VIEW TIMELINE_VIEW \
WIKI_CREATE WIKI_MODIFY WIKI_VIEW</pre></div></div>

<p>3. Here&#8217;s my trac.ini. Things to look at is the <em>notification</em> and <em>account-manager</em>.</p>
<p>4. Deleting a Trac Ticket:<br />
<code><br />
# sqlite3 trac.db<br />
delete from ticket_custom where ticket = [ticketID];<br />
delete from ticket_change where ticket = [ticketID];<br />
delete from ticket where id = [ticketID];<br />
</code></p>
<p>Other References:<br />
<a href="http://www.dscpl.com.au/wiki/ModPython/Articles/ExpatCausingApacheCrash">http://www.dscpl.com.au/wiki/ModPython/Articles/ExpatCausingApacheCrash</a><br />
<a href="http://www.yolinux.com/TUTORIALS/LinuxSubversionAndTracServer.html">http://www.yolinux.com/TUTORIALS/LinuxSubversionAndTracServer.html</a><br />
<a href="http://lists.edgewall.com/archive/trac/2004-April/000175.html">Trac and Multiple Subversion Repositories</a></p>
<p>Future Work:<br />
<a href="http://insurrection.tigris.org/">http://insurrection.tigris.org/</a></p>
]]></content:encoded>
			<wfw:commentRss>/wordpress/2007/06/installing-trac-on-centos4/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

