<?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>0x89 &#187; encrypted</title>
	<atom:link href="http://0x89.eu/tag/encrypted/feed/" rel="self" type="application/rss+xml" />
	<link>http://0x89.eu</link>
	<description>just a random mind dump</description>
	<lastBuildDate>Sun, 20 Sep 2009 17:55:05 +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>abs, subversion, and kwallet to store svn passwords encrypted</title>
		<link>http://0x89.eu/2009/08/35/35/</link>
		<comments>http://0x89.eu/2009/08/35/35/#comments</comments>
		<pubDate>Mon, 03 Aug 2009 21:16:07 +0000</pubDate>
		<dc:creator>me</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[UNIX]]></category>
		<category><![CDATA[encrypted]]></category>
		<category><![CDATA[kwallet]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[subversion]]></category>

		<guid isPermaLink="false">http://0x89.eu/?p=35</guid>
		<description><![CDATA[How to build binary packages for archlinux using abs, with the example of subversion compiled with kwallet support]]></description>
			<content:encoded><![CDATA[<p>A long time ago, I wrote down <a href="http://cip.physik.uni-bonn.de/~sander/2007-11-25-making-deb-packages-of-gnuplot-linked-to-gnu-readline.html">how to make a gnuplot ubuntu package with gnu readline support on ubuntu</a>. I often used this as a reference when I had to build deb-packages from source packages and forgot how it is done.</p>
<p>Today I came by a similar problem in <a href="http://www.archlinux.org/">Arch Linux,</a> which ships with subversion 1.6 at the moment. Subversion finally got support for storing the password in an encrypted form, or rather support for using kwallet or GNOME keyring to store the passwords (very unixy, although I&#8217;d prefer a more <a href="http://suckless.org">suckless</a> alternative for storing passwords &#8211; preferably an open standard that a suckless keyring could implement).</p>
<p>For historic reasons I use some KDE apps from time to time (mainly konqueror when I am lazy and need a swiss army tool). So I decided to try the kwallet support as it was already installed.</p>
<p>The problem is that subversion is compiled without kwallet support on Arch. So I used the great <a href="http://wiki.archlinux.org/index.php/ABS_-_The_Arch_Build_System">abs</a> &#8211; Arch Linux Build System to make a package. That is much easier than it was on ubuntu. First, install an configure abs:</p>
<ul>
<li>install abs

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> pacman <span style="color: #660033;">-S</span> abs</pre></div></div>

</li>
<li>configure it by editing <code>/etc/abs.conf</code>, I just changed the last line so that it looked like this:

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">REPOS</span>=<span style="color: #7a0874; font-weight: bold;">&#40;</span>core extra community <span style="color: #000000; font-weight: bold;">!</span>testing<span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></div></div>

</li>
<li>update the abs tree

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> abs</pre></div></div>

</li>
</ul>
<p>These steps have to be done only once, obviously.</p>
<p>Then, configure and build the subversion package:</p>
<ul>
<li>copy  the subversion slim ABS from the abs tree to a build directory in <code>~</code>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #660033;">-p</span> ~<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>abs; <span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #660033;">-r</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>abs<span style="color: #000000; font-weight: bold;">/</span>extra<span style="color: #000000; font-weight: bold;">/</span>subversion ~<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>abs</pre></div></div>

</li>
<li> edit the <code>PKGBUILD</code>, just add <code>--with-kwallet</code> to the <code>./configure</code> step

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">    .<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--with-apr</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--with-apr-util</span>=<span style="color: #000000; font-weight: bold;">/</span>usr \
               <span style="color: #660033;">--with-zlib</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--with-neon</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--with-apxs</span> \
               <span style="color: #660033;">--with-sqlite</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--with-kwallet</span> \
               <span style="color: #660033;">--enable-javahl</span> <span style="color: #660033;">--with-jdk</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>jvm<span style="color: #000000; font-weight: bold;">/</span>java-1.6.0-openjdk</pre></div></div>

</li>
<li>build the package

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"> $ makepkg <span style="color: #660033;">-s</span></pre></div></div>

<p>the <code>-s</code> Flag tells makepkg to automatically fetch all dependencies and build-dependencies via pacman, so you might have to type in your password if you try that.</li>
<li>install the package

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"> $ <span style="color: #c20cb9; font-weight: bold;">sudo</span> pacman <span style="color: #660033;">-U</span> subversion-1.6.3-<span style="color: #000000;">1</span>-i686.pkg.tar.gz</pre></div></div>

</li>
</ul>
<p>Done. Annoyingly, I had to install Kwalletmanager to configure Kwallet to stay open when svn exits (so I don&#8217;t have to re-type the kwallet password in subsequent svn runs), which is not in a package of its own, but in kdeutils &#8211; another 250 MB largely wasted. But storage and bandwidth is cheap nowadays, so I don&#8217;t really care.</p>
]]></content:encoded>
			<wfw:commentRss>http://0x89.eu/2009/08/35/35/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

