<?xml version="1.0" encoding="UTF-8"?>
<feed
  xmlns="http://www.w3.org/2005/Atom"
  xmlns:thr="http://purl.org/syndication/thread/1.0"
  xml:lang="en"
   >
  <title type="text">Death of a Gremmie</title>
  <subtitle type="text">Brian Neal's blog about programming.</subtitle>

  <updated>2012-05-13T18:30:33Z</updated>
  <generator uri="http://blogofile.com/">Blogofile</generator>

  <link rel="alternate" type="text/html" href="http://deathofagremmie.com" />
  <id>http://deathofagremmie.com/feed/atom/</id>
  <link rel="self" type="application/atom+xml" href="http://deathofagremmie.com/feed/atom/" />
  <entry>
    <author>
      <name>Brian Neal</name>
      <uri>http://deathofagremmie.com</uri>
    </author>
    <title type="html"><![CDATA[Upgrading Trac on Windows Gotcha - Part 2]]></title>
    <link rel="alternate" type="text/html" href="http://deathofagremmie.com/2012/03/21/upgrading-trac-on-windows-gotcha-part-2" />
    <id>http://deathofagremmie.com/2012/03/21/upgrading-trac-on-windows-gotcha-part-2</id>
    <updated>2012-03-21T20:10:00Z</updated>
    <published>2012-03-21T20:10:00Z</published>
    <category scheme="http://deathofagremmie.com" term="Python" />
    <category scheme="http://deathofagremmie.com" term="Subversion" />
    <category scheme="http://deathofagremmie.com" term="Windows" />
    <category scheme="http://deathofagremmie.com" term="Trac" />
    <summary type="html"><![CDATA[Upgrading Trac on Windows Gotcha - Part 2]]></summary>
    <content type="html" xml:base="http://deathofagremmie.com/2012/03/21/upgrading-trac-on-windows-gotcha-part-2"><![CDATA[<div class="document">
<p>I have <a class="reference external" href="/2011/09/12/upgrading-trac-on-windows-gotchas">previously reported</a> on some problems I had when upgrading our <a class="reference external" href="http://trac.edgewall.org/">Trac</a>
install at work. Today I attempted another upgrade to <a class="reference external" href="http://subversion.apache.org/">Subversion</a> 1.7.4 and Trac
0.12.3 on Windows. I upgraded to <a class="reference external" href="http://www.python.org/">Python</a> 2.7.2 along the way. I ran into another
problem with the Python bindings to Subversion which took a while to figure out.
I had no problems upgrading Subversion, but Trac could not see our repository.
The symptoms were that the Trac &quot;timeline&quot; and &quot;browse source&quot; features were
missing.</p>
<p>Following the <a class="reference external" href="http://trac.edgewall.org/wiki/TracSubversion#Checklist">Trac troubleshooting advice</a>, I opened an interactive Python
session and tried this:</p>
<pre class="literal-block">
E:\Trac_Data&gt;python
Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)] on win
32
Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.
&gt;&gt;&gt; from svn import client
Traceback (most recent call last):
 File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;
 File &quot;C:\Python27\lib\site-packages\svn\client.py&quot;, line 26, in &lt;module&gt;
   from libsvn.client import *
 File &quot;C:\Python27\lib\site-packages\libsvn\client.py&quot;, line 25, in &lt;module&gt;
   _client = swig_import_helper()
 File &quot;C:\Python27\lib\site-packages\libsvn\client.py&quot;, line 21, in swig_import
_helper
   _mod = imp.load_module('_client', fp, pathname, description)
ImportError: DLL load failed: The operating system cannot run %1
</pre>
<p>After some head scratching and googling I finally found the problem. I had used
the Windows .msi installer, <a class="reference external" href="http://sourceforge.net/projects/win32svn/">graciously provided by Alagazam</a>, aka David Darj,
to install Subversion.  This placed the Subversion binaries and DLL's in
<tt class="docutils literal"><span class="pre">C:\Program</span> Files\Subversion\bin</tt>. I then unzipped the Python 2.7 bindings to
the <tt class="docutils literal"><span class="pre">C:\Python27\Lib\site-packages</span></tt> folder. The bindings depend on the DLL's
in the <tt class="docutils literal">Subversion\bin</tt> folder. But unfortunately for me, there were already
two older versions of the DLL's, <tt class="docutils literal">libeay32.dll</tt> and <tt class="docutils literal">ssleay32.dll</tt> on my
path. So when the bindings went looking for those two DLL's, instead of finding
them in <tt class="docutils literal">Subversion\bin</tt>, it found the older versions somewhere else.</p>
<p>To fix this, you can either rearrange your path, or copy those two DLL's to your
<tt class="docutils literal"><span class="pre">Python27\Lib\site-packages\libsvn</span></tt> folder. In the future, I am going to just
copy all the DLL's from <tt class="docutils literal">Subversion\bin</tt> to the <tt class="docutils literal">libsvn</tt> folder.</p>
<p>I examined the pre-built Subversion packages from <a class="reference external" href="http://bitnami.org/">Bitnami</a> and <a class="reference external" href="http://www.collab.net/">CollabNet</a>. They
had packaged all of the Subversion DLL's with the Python bindings together in
the same directory, so this seems reasonable. Later, on the Subversion users'
mailing list, Alagazam gave the nod to this approach.</p>
<p>A big thank you to Alagazam for the help and for the Windows binaries. And of
course thanks to the <a class="reference external" href="http://subversion.apache.org/">Apache</a>, <a class="reference external" href="http://subversion.apache.org/">Subversion</a>, <a class="reference external" href="http://trac.edgewall.org/">Trac</a>, &amp; <a class="reference external" href="http://www.python.org/">Python</a> teams for making
great tools.</p>
</div>
]]></content>
  </entry>
  <entry>
    <author>
      <name>Brian Neal</name>
      <uri>http://deathofagremmie.com</uri>
    </author>
    <title type="html"><![CDATA[Upgrading Trac on Windows Gotchas]]></title>
    <link rel="alternate" type="text/html" href="http://deathofagremmie.com/2011/09/12/upgrading-trac-on-windows-gotchas" />
    <id>http://deathofagremmie.com/2011/09/12/upgrading-trac-on-windows-gotchas</id>
    <updated>2011-09-12T22:15:00Z</updated>
    <published>2011-09-12T22:15:00Z</published>
    <category scheme="http://deathofagremmie.com" term="Python" />
    <category scheme="http://deathofagremmie.com" term="Subversion" />
    <category scheme="http://deathofagremmie.com" term="Windows" />
    <category scheme="http://deathofagremmie.com" term="Trac" />
    <summary type="html"><![CDATA[Upgrading Trac on Windows Gotchas]]></summary>
    <content type="html" xml:base="http://deathofagremmie.com/2011/09/12/upgrading-trac-on-windows-gotchas"><![CDATA[<div class="document">
<p>At work, we are outfitted with Windows servers. Despite this obstacle, I managed
to install <a class="reference external" href="http://trac.edgewall.org/">Trac</a> and <a class="reference external" href="http://subversion.apache.org/">Subversion</a> a few years ago. During a break in the action,
we decided to update Subversion (SVN) and Trac. Since we are on Windows, this
means we have to rely on the <a class="reference external" href="http://sourceforge.net/projects/win32svn/">kindness of strangers</a> for Subversion binaries. I
ran into a couple of gotchas I'd like to document here to help anyone else who
runs into these.</p>
<p>I managed to get Subversion and Trac up and running without any real problems.
However when Trac needed to access SVN to display changesets or a timeline, for
example, I got an error:</p>
<p><tt class="docutils literal">tracerror: unsupported version control system &quot;svn&quot; no module named _fs</tt></p>
<p>After some googling, I finally found that this issue is <a class="reference external" href="http://trac.edgewall.org/wiki/TracSubversion">documented on the Trac
wiki</a>, but it was kind of hard to find. To fix this problem, you have to rename
the Python SVN binding's DLLs to <tt class="docutils literal">*.pyd</tt>. Specifically, change the
<tt class="docutils literal"><span class="pre">libsvn/*.dll</span></tt> files to <tt class="docutils literal"><span class="pre">libsvn/*.pyd</span></tt>, but don't change the name of
<tt class="docutils literal"><span class="pre">libsvn_swig_py-1.dll</span></tt>. I'd really like to hear an explanation of why one
needs to do this. Why doesn't the Python-Windows build process do this for you?</p>
<p>The second problem I ran into dealt with <a class="reference external" href="http://code.google.com/p/modwsgi/">mod_wsgi</a> on Windows. Originally, a few
years ago, I setup Trac to run under <a class="reference external" href="http://www.modpython.org/">mod_python</a>. mod_python has long been
out of favor, so I decided to cut over to mod_wsgi. On my Linux boxes, I always
run mod_wsgi in daemon mode. When I tried to configure this on Windows, Apache
complained about an unknown directive <tt class="docutils literal">WSGIDaemonProcess</tt>. It turns out that
<a class="reference external" href="http://code.google.com/p/modwsgi/wiki/ConfigurationDirectives#WSGIDaemonProcess">this mode is not supported on Windows</a>. You'll have to use the embedded mode on
Windows.</p>
</div>
]]></content>
  </entry>
</feed>

