<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://t2bwiki.iihe.ac.be/index.php?action=history&amp;feed=atom&amp;title=BuildANewPysvnOnAiiServer</id>
	<title>BuildANewPysvnOnAiiServer - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://t2bwiki.iihe.ac.be/index.php?action=history&amp;feed=atom&amp;title=BuildANewPysvnOnAiiServer"/>
	<link rel="alternate" type="text/html" href="https://t2bwiki.iihe.ac.be/index.php?title=BuildANewPysvnOnAiiServer&amp;action=history"/>
	<updated>2026-04-20T10:04:16Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://t2bwiki.iihe.ac.be/index.php?title=BuildANewPysvnOnAiiServer&amp;diff=40&amp;oldid=prev</id>
		<title>Maintenance script: Created page with &quot; === Initial problem === When installing a new AII server in SL63, we have discovered that &quot;svn co&quot; was failing against our Quattor SVN. The reason for this seems to lie in t...&quot;</title>
		<link rel="alternate" type="text/html" href="https://t2bwiki.iihe.ac.be/index.php?title=BuildANewPysvnOnAiiServer&amp;diff=40&amp;oldid=prev"/>
		<updated>2015-08-26T12:28:17Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot; === Initial problem === When installing a new AII server in SL63, we have discovered that &amp;quot;svn co&amp;quot; was failing against our Quattor SVN. The reason for this seems to lie in t...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
=== Initial problem ===&lt;br /&gt;
When installing a new AII server in SL63, we have discovered that &amp;quot;svn co&amp;quot; was failing against our Quattor SVN. The reason for this seems to lie in the fact that the current subversion version was built with gnutls instead of openssl, and that gnutls doesn&amp;#039;t like the kind of certificate we use on our SVN repo (&amp;quot;Key usage violation&amp;quot; error message when trying to checkout).&lt;br /&gt;
&lt;br /&gt;
In this page, we will describe how we solved the problem by building a new openssl-based subversion, and then, how to build pysvn.&lt;br /&gt;
&lt;br /&gt;
=== Preparation ===&lt;br /&gt;
#Disable quattor daemons (ncm-cdispd and cdp-listend).&lt;br /&gt;
 2. Remove the actual subversion :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum remove subversion&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Building subversion ===&lt;br /&gt;
First, you need a compiler :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install gcc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Package that you might need when building neon :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install expat libxml2 libxml2-devel openssl-devel&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now, let&amp;#039;s build everything :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /usr/local/src&lt;br /&gt;
wget http://apache.mirror.uber.com.au/subversion/subversion-1.7.17.tar.gz&lt;br /&gt;
tar xvzf subversion-1.7.17.tar.gz&lt;br /&gt;
cd subversion-1.7.17&lt;br /&gt;
./get-deps.sh&lt;br /&gt;
cd neon&lt;br /&gt;
./configure --with-ssl=openssl&lt;br /&gt;
make&lt;br /&gt;
make install&lt;br /&gt;
cd ..&lt;br /&gt;
wget http://www.sqlite.org/sqlite-amalgamation-3.7.0.1.tar.gz&lt;br /&gt;
tar xvzf sqlite-amalgamation-3.7.0.1.tar.gz&lt;br /&gt;
cp sqlite-3.7.0.1/sqlite3.c sqlite-amalgamation/&lt;br /&gt;
./configure --with-neon=/usr/local/lib/&lt;br /&gt;
make&lt;br /&gt;
make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
As a result of the two &amp;quot;make install&amp;quot; commands, everything got copied in /usr/local/bin and /usr/local/lib.&lt;br /&gt;
&lt;br /&gt;
Now, we can test :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir /root/test_checkout&lt;br /&gt;
cd /root/test_checkout&lt;br /&gt;
export PATH=$PATH:/usr/local/bin/svn&lt;br /&gt;
svn co  https://quattorrepository.begrid.be/repos/centralised-begrid-v9/trunk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Building pysvn ===&lt;br /&gt;
Compiler g++ needed :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install gcc-c++&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Some dependencies :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install python-devel&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Follow these steps :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir /root/pysvn&lt;br /&gt;
cd /root/pysvn&lt;br /&gt;
wget http://pysvn.barrys-emacs.org/source_kits/pysvn-1.7.8.tar.gz&lt;br /&gt;
tar xvzf pysvn-1.7.8.tar.gz&lt;br /&gt;
cd pysvn-1.7.8&lt;br /&gt;
cd Source&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Due to a bug described [http://pysvn.tigris.org/ds/viewMessage.do?dsForumId=1335&amp;amp;dsMessageId=3084151 here], you will have to modify the file setup_configure.py in three different places :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Index: /Users/barry/wc/svn/​pysvn/Extension/Sour​ce/setup_configure.p​y&lt;br /&gt;
====================​====================​====================​=======&lt;br /&gt;
--- /Users/barry/wc/svn/​pysvn/Extension/Sour​ce/setup_configure.p​y	(revision 1578)&lt;br /&gt;
+++ /Users/barry/wc/svn/​pysvn/Extension/Sour​ce/setup_configure.p​y	(working copy)&lt;br /&gt;
@@ -1183,6 +1183,7 @@&lt;br /&gt;
     def _getLdLibs( self ):&lt;br /&gt;
         py_ld_libs = [&lt;br /&gt;
                 &amp;#039;-L%(SVN_LIB)s&amp;#039;,&lt;br /&gt;
+                &amp;#039;-L%(APR_LIB)s&amp;#039;,&lt;br /&gt;
                 ]&lt;br /&gt;
         if not self.setup.options.hasOption( &amp;#039;--norpath&amp;#039; ):&lt;br /&gt;
             py_ld_libs.extend( [&lt;br /&gt;
@@ -1207,6 +1208,7 @@&lt;br /&gt;
     def _getLdLibs( self ):&lt;br /&gt;
         py_ld_libs = [&lt;br /&gt;
                 &amp;#039;-L%(SVN_LIB)s&amp;#039;,&lt;br /&gt;
+                &amp;#039;-L%(APR_LIB)s&amp;#039;,&lt;br /&gt;
                 &amp;#039;-Wl,--rpath&amp;#039;,&lt;br /&gt;
                 &amp;#039;-Wl,/usr/lib:/usr/local/lib&amp;#039;,&lt;br /&gt;
                 &amp;#039;-lsvn_client-1&amp;#039;,&lt;br /&gt;
@@ -1231,6 +1233,7 @@&lt;br /&gt;
     def _getLdLibs( self ):&lt;br /&gt;
         py_ld_libs = [&lt;br /&gt;
                 &amp;#039;-L%(svn_lib_dir)s&amp;#039;,&lt;br /&gt;
+                &amp;#039;-L%(apr_lib_dir)s&amp;#039;,&lt;br /&gt;
                 &amp;#039;-L/usr/lib/python%d.%d/config -lpython%d.%d.dll&amp;#039; %&lt;br /&gt;
                     (sys.version_info[0], sys.version_info[1], sys.version_info[0], sys.version_info[1]),&lt;br /&gt;
                 &amp;#039;-lsvn_client-1&amp;#039;,&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
After this bug fixing, you can go back to the normal recipe :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
python setup.py configure&lt;br /&gt;
make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To test the newly built pysvn library :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd ..&lt;br /&gt;
cd Tests&lt;br /&gt;
make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installing the new pysvn in the &amp;quot;runcheck&amp;quot; tool ===&lt;br /&gt;
Taking CB9 as an example :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rm -rf /opt/CB9/svncheck/pysvn&lt;br /&gt;
cp -a /root/pysvn/pysvn-1.7.8/Source/pysvn /opt/CB9/svncheck/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Before running the runcheck command, your environment must be set like this :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib:/usr/local/apr/lib&lt;br /&gt;
export PATH=$PATH:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/local/bin/svn&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{TracNotice|{{PAGENAME}}}}&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>