<?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>Klaus Kiwi's blog &#187; Linux</title>
	<atom:link href="http://blog.klauskiwi.com/archives/category/opensource/linux/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.klauskiwi.com</link>
	<description>A lazy, sparsely populated web storage for brain dumps</description>
	<lastBuildDate>Wed, 22 Dec 2010 20:20:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Exporting GIT repositories remotely</title>
		<link>http://blog.klauskiwi.com/archives/102</link>
		<comments>http://blog.klauskiwi.com/archives/102#comments</comments>
		<pubDate>Tue, 21 Dec 2010 18:38:11 +0000</pubDate>
		<dc:creator>Klaus</dc:creator>
				<category><![CDATA[git]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open-Source]]></category>
		<category><![CDATA[alias]]></category>
		<category><![CDATA[archive]]></category>
		<category><![CDATA[cross development]]></category>
		<category><![CDATA[export]]></category>
		<category><![CDATA[rsync]]></category>

		<guid isPermaLink="false">http://blog.klauskiwi.com/?p=102</guid>
		<description><![CDATA[This tip may be useful for those working on a local GIT tree, but in need to &#8220;export&#8221; it to a remote server (for example for building and testing). I know that ideally one would &#8220;push&#8221; the changes to a commonly-accessible remote server, and pull back from the build/testing host. But sometimes we simply don&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>This tip may be useful for those working on a local GIT tree, but in need to &#8220;export&#8221; it to a remote server (for example for building and testing).</p>
<p>I know that ideally one would &#8220;push&#8221; the changes to a commonly-accessible remote server, and pull back from the build/testing host. But sometimes we simply don&#8217;t have GIT available on that host, other times we&#8217;re just lazy.</p>
<p>The standard procedure then is to use the &#8220;git archive&#8221; command to export the contents of the repository to a tarball, optionally compress it, and then transfer it and unpack on the remote side:</p>
<blockquote>
<pre>$ <strong>git archive --format=tar --prefix=kernel_20101221a/ HEAD | bzip2 &gt; kernel_20101221a.tar.bz2</strong>
$ <strong>scp kernel_20101221a.tar.bz2 root@spin.ltc.br.ibm.com:.</strong>
root@spin.ltc.br.ibm.com's password:
kernel_20101221a.tar.bz2                                                  100%   68MB  11.4MB/s   00:06    
$ <strong>ssh root@spin.ltc.br.ibm.com</strong>
root@spin.ltc.br.ibm.com's password:
Last login: Tue Dec 21 15:01:59 2010 from dyn531363.br.ibm.com
# <strong>tar xvf kernel_20101221a.tar.bz2</strong>
kernel_20101221a/
kernel_20101221a/.gitignore
kernel_20101221a/.mailmap
kernel_20101221a/COPYING
kernel_20101221a/CREDITS
kernel_20101221a/Documentation/
kernel_20101221a/Documentation/.gitignore
kernel_20101221a/Documentation/00-INDEX
kernel_20101221a/Documentation/ABI/
...
</pre>
</blockquote>
<p>This has obvious problems&#8230; Even if you&#8217;re using SSH key authentication to avoid entering the password twice, you end-up typing too many commands and transferring too many bytes. For a project as large as the Linux kernel, this could be a real pain.</p>
<p>A smarter, more direct alternative would be to avoid creating a local archive at all, using ssh input/output tunneling and tar to do the hard-lifting for us:</p>
<blockquote>
<pre>$ <strong>git archive --format=tar --prefix=kernel_20101221b/ HEAD | ssh root@spin.ltc.br.ibm.com tar xvf -</strong>
root@spin.ltc.br.ibm.com's password:
kernel_20101221b/
kernel_20101221b/.gitignore
kernel_20101221b/.mailmap
kernel_20101221b/COPYING
kernel_20101221b/CREDITS
kernel_20101221b/Documentation/
kernel_20101221b/Documentation/.gitignore
kernel_20101221b/Documentation/00-INDEX
kernel_20101221b/Documentation/ABI/
kernel_20101221b/Documentation/ABI/README
...
</pre>
</blockquote>
<p>Since you may end-up doing this several times per day, an even smarter way would be to just transfer the absolute necessary &#8211; essentially what changed between the last and the current tree. RSYNC is the ideal tool to do that, since it will only send the differences between those files. We could, in theory, use rsync to transfer the whole tree, perhaps ignoring the .git directory since it has no use for us remotely. An even better option would be to transfer just what&#8217;s being tracked (and rsync would transfer just what changed). Doing that requires us to use &#8220;git ls-files&#8221; to list the files being tracked, and pipe that to a rsync command that reads the files to be transfered from standard input:</p>
<blockquote>
<pre>$ <strong>git ls-files -z | rsync -e ssh --files-from - -av0 . root@spin.ltc.br.ibm.com:kernel_20101221c/</strong>
root@spin.ltc.br.ibm.com's password:
building file list ... done
Documentation/
Documentation/ABI/
Documentation/ABI/obsolete/
Documentation/ABI/removed/
Documentation/ABI/stable/
Documentation/ABI/testing/
Documentation/DocBook/
Documentation/DocBook/drm.tmpl
Documentation/DocBook/filesystems.tmpl
Documentation/DocBook/gadget.tmpl
Documentation/DocBook/genericirq.tmpl
Documentation/DocBook/kernel-api.tmpl
Documentation/DocBook/kernel-hacking.tmpl
Documentation/DocBook/kernel-locking.tmpl
Documentation/DocBook/kgdb.tmpl
Documentation/DocBook/libata.tmpl
Documentation/DocBook/librs.tmpl
Documentation/DocBook/lsm.tmpl
Documentation/DocBook/mcabook.tmpl
Documentation/DocBook/media-entities.tmpl
Documentation/DocBook/media-indices.tmpl
Documentation/DocBook/media.tmpl
...</pre>
</blockquote>
<p>The &#8220;git ls-files&#8221; command will list only the files being tracked in the current git tree. The &#8220;-z&#8221; argument for &#8220;git ls-files&#8221;, together with it&#8217;s counterpart &#8220;-0&#8243; in the rsync command tell those commands to use &#8220;\0&#8243; (the null character) as delimiter between files, so that is safe to deal with file names with spaces on them.</p>
<p>The final step is to create an alias that will invoke the command above:</p>
<blockquote>
<pre>$ <strong>git config --add alias.upload-spin '!git ls-files -z | rsync -e ssh --files-from - -av0 . root@spin.ltc.br.ibm.com:kernel-dev/'</strong>
$ <strong>git upload-spin</strong>
root@spin.ltc.br.ibm.com's password:
building file list ... done
created directory kernel-dev
</pre>
</blockquote>
<p>Note that &#8220;shell&#8221; aliases (i.e., starting with &#8220;!&#8221;) will execute those commands on the top-level directory for the GIT repository you are on, so the command above should work correctly even from sub-directories.</p>
<p>I hope the above tips can increase your productivity when working with cross-platform development (and more important, freeing you from a boring repetitive task to more do more value-add coding).</p>
<p>Leave a comment if you like it, have corrections or would like to show us some other tips.</p>
<p>-Klaus</p>
<h2>Update:</h2>
<p>Sometimes you&#8217;ll need a <em>clean upload</em>, meaning you&#8217;d like to remove untracked files from the remote side. Turns out this is not as easy as I have hoped.</p>
<p>I&#8217;m using the the output from &#8220;git ls-files&#8221; as an &#8220;inclusion filter&#8221;, plus an &#8220;include all dirs&#8221; and a &#8220;exclude everything&#8221; filter to the rsync command. The reasons why I&#8217;m using those are beyond the scope of this post (check the <em>INCLUDE/EXCLUDE PATTERN RULES</em> section at the rsync(1) man page), but the command below seems do to the trick:</p>
<blockquote>
<pre>git ls-files -z | rsync -avi0 -e ssh --include-from - --include '*/' --prune-empty-dirs \
    --delete --delete-excluded --exclude '*' . root@spin.ltc.br.ibm.com:kernel-dev/
</pre>
</blockquote>
<p>I&#8217;ve created an alias called &#8220;update-pristine&#8221; that does that automatically for me. It will take more time to execute than the original version (I believe due to recursive path descend), but again, you should only use it when wanting to explicitly exclude everything that is not being tracked.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://blog.klauskiwi.com/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://blog.klauskiwi.com/archives/102/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My talk for LinuxCon Brazil 2010 (KVM Security)</title>
		<link>http://blog.klauskiwi.com/archives/91</link>
		<comments>http://blog.klauskiwi.com/archives/91#comments</comments>
		<pubDate>Thu, 02 Sep 2010 12:00:46 +0000</pubDate>
		<dc:creator>Klaus</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open-Source]]></category>
		<category><![CDATA[kvm]]></category>
		<category><![CDATA[linuxcon]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[slides]]></category>
		<category><![CDATA[talk]]></category>

		<guid isPermaLink="false">http://blog.klauskiwi.com/?p=91</guid>
		<description><![CDATA[I&#8217;m back from LinuxCon Brazil 2010. After spending two entire days off-line (interesting experience btw), I can finally upload the slide deck for my talk, &#8220;KVM Security &#8211; Where Are We At, Where Are We Going&#8221;, as promised. I can&#8217;t spend time reporting on the event right now, so I&#8217;ll just summarize that it was [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m back from LinuxCon Brazil 2010. After spending two entire days off-line (interesting experience btw), I can finally upload the slide deck for my talk, <a href="http://blog.klauskiwi.com/wp-content/uploads/2010/08/KVM-Security_en.pdf">&#8220;KVM Security &#8211; Where Are We At, Where Are We Going&#8221;</a>, as promised.</p>
<p>I can&#8217;t spend time reporting on the event right now, so I&#8217;ll just summarize that it was in my opinion the best Linux-related even we had down here so far, with some good talks from both local and foreigner guys.</p>
<p>The funniest part, however, was seeing Linus having it&#8217;s own Justin Bieber moment, with girls freaking out and everything <img src='http://blog.klauskiwi.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Thanks for everyone who attended. I hope we can all meet again next year for an even better event.</p>
<p><em>PS.: I ended-up canceling the Linux Professional Development BoF, due to confusions with scheduling and a couple of other things &#8211; Sorry for everyone who planned to attend, but keep in touch (comment here or email me at klaus@klauskiwi.com) &#8211; I still have the idea of at least mapping the Linux professional development industry here in Brazil. We need better know each other, really!</em></p>
<p>-Klaus</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://blog.klauskiwi.com/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://blog.klauskiwi.com/archives/91/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New opencryptoki release available</title>
		<link>http://blog.klauskiwi.com/archives/89</link>
		<comments>http://blog.klauskiwi.com/archives/89#comments</comments>
		<pubDate>Wed, 18 Aug 2010 13:53:44 +0000</pubDate>
		<dc:creator>Klaus</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open-Source]]></category>
		<category><![CDATA[2.3.2]]></category>
		<category><![CDATA[opencryptoki]]></category>
		<category><![CDATA[pkcs#11]]></category>

		<guid isPermaLink="false">http://blog.klauskiwi.com/?p=89</guid>
		<description><![CDATA[I just now found the time to write about the latest opencryptoki version, which was released just over two weeks ago. Opencryptoki version 2.3.2 was released roughly 6 months after 2.3.1, and brings a series or improvements and bug fixes: Improved performance when handling many sessions or many session objects. An inefficient walk through a [...]]]></description>
			<content:encoded><![CDATA[<p>I just now found the time to write about the latest <a href="http://sourceforge.net/projects/opencryptoki/">opencryptoki</a> version, which was released just over two weeks ago.</p>
<p><a href="http://sourceforge.net/projects/opencryptoki/files/opencryptoki/2.3.2/">Opencryptoki version 2.3.2</a> was released roughly 6 months after 2.3.1, and brings a series or improvements and bug fixes:</p>
<ul>
<li>Improved performance when handling many sessions or many session objects. An inefficient walk through a linked-list was part of the validation step for every operation involving session or object handles. While still lacking a more efficient data-structure, we where able to use the pointers themselves as handles, thus making the look-up in linear time as opposed to exponential time as it were. This improvement has significant impact for scenarios where a single process had more than 4000 sessions at once. Although we are still able to do some verification, this change may also expose buggy applications which may crash if trying to use invalid handles, so be advised.</li>
<li>Largely rewritten build scripts. This version went through a much needed refactor for the autoconf/automake build scripts, in the hope of having now a clearer and less error-prone build procedure.</li>
<li>New SPEC file for building RPM packages. The Opencryptoki binaries are now split into different sub-packages: the main <em>opencryptoki</em> package now brings only the slot daemon (pkcsslotd, initialization script) and administration utilities (pkcsconf, pkcs11_setup). The <em>opencryptoki-libs</em> package brings the PKCS#11 library itself. The packages <em>opencryptoki-swtok</em>, <em>opencryptoki-tpmtok</em>, <em>opencryptoki-icatok</em> and <em>opencryptoki-ccatok</em> bring token-specific plug-ins (aka STDLLs) that enables support for different kinds of crypto hardware. This way, the System Administrator can now choose to install only what&#8217;s necessary for his/her environment.</li>
<li>A nice addition by <em>Kent Yoder</em> that allows pkcsconf to display mechanisms names instead of only numeric identifiers</li>
<li><em>Kent</em> also provided a couple of fixes to the software token (inaccuracies in mechanism list) and testcases</li>
<li>A couple of useful additions/fixes related to init-scripts and pkcsconf by ﻿<em>Dan Horák</em></li>
<li>A number of RSA fixes and improvements by <em>Ramon de Carvalho Valle</em>, including an endianess bug in key-pair generation for the software token and improved PKCS#1 v1.5 padding functions.</li>
</ul>
<p>As for the next version, we&#8217;re having a strong focus on making the testsuite better. You can follow the development log <a href="http://opencryptoki.git.sourceforge.net/git/gitweb.cgi?p=opencryptoki/opencryptoki;a=log">here</a>.</p>
<p>-Klaus</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://blog.klauskiwi.com/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://blog.klauskiwi.com/archives/89/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apresentação FISL 11: Segurança em Virtualização utilizando o KVM</title>
		<link>http://blog.klauskiwi.com/archives/82</link>
		<comments>http://blog.klauskiwi.com/archives/82#comments</comments>
		<pubDate>Thu, 22 Jul 2010 02:58:17 +0000</pubDate>
		<dc:creator>Klaus</dc:creator>
				<category><![CDATA[kvm]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open-Source]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[apresentacao]]></category>
		<category><![CDATA[fisl11]]></category>
		<category><![CDATA[portugues]]></category>

		<guid isPermaLink="false">http://blog.klauskiwi.com/?p=82</guid>
		<description><![CDATA[Abaixo está o link para o PDF da minha apresentação utilizada no FISL 11 sobre &#8220;Segurança em Virtualização utilizando o KVM&#8221;. Lembrando que eu devo abordar novamente este tópico na LinuxCon Brasil 2010, que acontecerá dia 31 de Agosto e 1° de Setembro deste ano &#8211; fique ligado na programação. Aproveito também para adiantar que [...]]]></description>
			<content:encoded><![CDATA[<p>Abaixo está o link para o PDF da minha apresentação utilizada no <a href="http://softwarelivre.org/fisl11/">FISL 11</a> sobre &#8220;Segurança em Virtualização utilizando o KVM&#8221;.</p>
<p>Lembrando que eu devo abordar novamente este tópico na <a href="http://events.linuxfoundation.org/events/linuxcon-brazil">LinuxCon Brasil 2010</a>, que acontecerá dia 31 de Agosto e 1° de Setembro deste ano &#8211; fique ligado na programação. Aproveito também para adiantar que eu devo conduzir um &#8220;Encontro de desenvolvedores profissionais de Linux&#8221; na mesma LinuxCon Brasil 2010. Deverá ser uma oportunidade para encontrar colegas das várias empresas que trabalham direamente com desenvolvimento do Sistema Operacional Linux, e debater sobre o mercado de trabalho, educação, e realizações. Entre em contato (klaus arroba klauskiwi.com) ou deixe um comentário se estiver interessado neste mini-summit.</p>
<p>Comentários, correções e dúvidas são sempre bem-vindas!</p>
<p>-Klaus</p>
<p><a href="http://blog.klauskiwi.com/wp-content/uploads/2010/07/SegurancaKVM-Oo.org_.pdf">Apresentação em PDF: SegurancaKVM-Oo.org</a></p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://blog.klauskiwi.com/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://blog.klauskiwi.com/archives/82/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Blueprint available: Securing KVM guests and the host system</title>
		<link>http://blog.klauskiwi.com/archives/69</link>
		<comments>http://blog.klauskiwi.com/archives/69#comments</comments>
		<pubDate>Thu, 08 Jul 2010 21:51:16 +0000</pubDate>
		<dc:creator>Klaus</dc:creator>
				<category><![CDATA[kvm]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[virtualization]]></category>

		<guid isPermaLink="false">http://blog.klauskiwi.com/?p=69</guid>
		<description><![CDATA[IBM recently made available another Blueprint of my authorship: Securing KVM guests and the host system. The text, which also has a PDF version, brings a couple of steps and some discussion around the theme of KVM Security for the Red Hat Enterprise Linux running on IBM System x with Virtualization capability. Those include remote [...]]]></description>
			<content:encoded><![CDATA[<p>IBM recently made available another Blueprint of my authorship: <a href="http://publib.boulder.ibm.com/infocenter/lnxinfo/v3r0m0/topic/liaai/kvmsec/kvmsecstart.htm">Securing KVM guests and the host system</a>.</p>
<p>The text, which also has a <a href="http://publib.boulder.ibm.com/infocenter/lnxinfo/v3r0m0/topic/liaai/kvmsec/kvmsecprint.htm">PDF</a> version, brings a couple of steps and some discussion around the theme of KVM Security for the <a href="http://www.redhat.com/rhel/server/">Red Hat Enterprise Linux</a> running on IBM System x with Virtualization capability. Those include remote management aspects, host and guest security, a few suggestions for auditing and why not some image-at-rest cryptography?</p>
<p>The complete index follows:</p>
<ul>
<li><em><strong> Introduction</strong></em></li>
<li><em><strong> Securing KVM guests and the host system</strong></em>
<ul>
<li><em>Secured KVM remote management</em></li>
<li><em>Setting up secure remote management</em></li>
<li><em>Remote management using SSH tunnels</em></li>
<li><em>Remote management using SASL authentication and encryption</em></li>
<li><em>Remote management using TLS</em></li>
</ul>
</li>
<li><em><strong> Guest virtual network isolation options</strong></em>
<ul>
<li><em>Network port sharing with Ethernet bridges</em></li>
<li><em>Network port sharing using 802.1q VLANs</em></li>
</ul>
</li>
<li><em><strong> Auditing the KVM virtualization host and guests</strong></em>
<ul>
<li><em>Audit rules file</em></li>
</ul>
</li>
<li><em><strong>KVM guest image encryption</strong></em>
<ul>
<li><em>Using encryption in KVM guest images</em></li>
<li><em>Migrating existing guests to encrypted storage</em></li>
<li><em>Installing a new KVM guest</em></li>
<li><em>Storing encrypted guest images</em></li>
</ul>
</li>
<li><em><strong>Appendix A. Sample audit rules file</strong></em></li>
<li><em><strong> Appendix B. Troubleshooting</strong></em></li>
</ul>
<p>Feedback, comments, corrections and suggestions are welcome as always, and we now have a way to provide them directly in the text. Questions can be answered in the developerWorks <a href="http://www.ibm.com/developerworks/forums/forum.jspa?forumID=1271"><em>Linux Security Community Forum</em></a>.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://blog.klauskiwi.com/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://blog.klauskiwi.com/archives/69/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Reviewing patches</title>
		<link>http://blog.klauskiwi.com/archives/42</link>
		<comments>http://blog.klauskiwi.com/archives/42#comments</comments>
		<pubDate>Thu, 08 Jul 2010 19:29:51 +0000</pubDate>
		<dc:creator>Klaus</dc:creator>
				<category><![CDATA[git]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open-Source]]></category>
		<category><![CDATA[claws]]></category>
		<category><![CDATA[patches]]></category>
		<category><![CDATA[reviewing]]></category>
		<category><![CDATA[tip]]></category>

		<guid isPermaLink="false">http://blog.klauskiwi.com/?p=42</guid>
		<description><![CDATA[I always struggled at reviewing code. Specially when the code to be reviewed is in reality a patch inlined in some e-mail&#8230; I hate monospaced fonts in my e-mail reader, and with all the context switches I got in my daily work, I simply can&#8217;t concentrate properly in order to follow what&#8217;s been proposed with [...]]]></description>
			<content:encoded><![CDATA[<p>I always struggled at reviewing code.</p>
<p>Specially when the code to be reviewed is in reality a patch inlined in some e-mail&#8230; I hate monospaced fonts in my e-mail reader, and with all the context switches I got in my daily work, I simply can&#8217;t concentrate properly in order to follow what&#8217;s been proposed with that one patch out of many, in that long long patch series.</p>
<p>In the past, I used to apply them manually, then go over the code using <a href="http://sourcenav.berlios.de/">Source Navigator</a> and later <a href="http://cscope.sourceforge.net/">cscope</a>.</p>
<p>I still miss the ability to jump between symbol definition and use that cscope does the best, but I have a much more streamlined way of reviewing patches today, thanks to <a href="http://git-scm.com/">git</a>, <a href="http://meld.sourceforge.net/">meld</a>, and <a href="http://www.claws-mail.org/">claws-mail</a>.</p>
<p>The first thing is about <strong>git</strong>. Nowadays I use git in every coding project I use &#8211; even if the upstream project is not using git as SCM itself (I simply create a local repository and import). And this is not only for making reviewing patches easier, but all sorts of things, like fast branching and merging, easy cherry-picking, rebasing, commit amending, modern utilities et al. It&#8217;s really the 21st century version control system.</p>
<p>The second thing is meld. Meld is one good example of an intuitive interface that doesn&#8217;t get in the way. It can compare, merge and edit files (up to 3-way merge if needed). Supports all the major SCMs such as git, hg, cvs and svn (although I can&#8217;t find a reason why would anyone still use the last two, at least locally).</p>
<p style="text-align: center;">
<div id="attachment_46" class="wp-caption aligncenter" style="width: 310px"><a href="http://blog.klauskiwi.com/wp-content/uploads/2010/06/Screenshot-Meld1.png"><img class="size-medium wp-image-46 " title="Screenshot-Meld1" src="http://blog.klauskiwi.com/wp-content/uploads/2010/06/Screenshot-Meld1-300x196.png" alt="Meld side-by-side diff" width="300" height="196" /></a><p class="wp-caption-text">Meld side-by-side diff</p></div>
<p>The forth thing, and where actually everything makes sense, is Claws-mail, which has the very useful (and unique?) ability to create custom <em>actions</em> to process messages.</p>
<div id="attachment_54" class="wp-caption aligncenter" style="width: 310px"><a href="http://blog.klauskiwi.com/wp-content/uploads/2010/07/Screenshot-Claws-Mail1.png"><img class="size-medium wp-image-54 " title="Screenshot-Claws-Mail1" src="http://blog.klauskiwi.com/wp-content/uploads/2010/07/Screenshot-Claws-Mail1-300x196.png" alt="Claws-Mail Actions" width="300" height="196" /></a><p class="wp-caption-text">Claws-Mail Actions</p></div>
<p style="text-align: left;">Guess what happens when you combine Claws-Mail&#8217;s <em>actions</em> with a script that uses git and Meld? A very <em>point-and-click</em> way of reviewing patches:</p>
<p style="text-align: left;">
<div id="attachment_55" class="wp-caption aligncenter" style="width: 310px"><a href="http://blog.klauskiwi.com/wp-content/uploads/2010/07/Screenshot-Review1.png"><img class="size-medium wp-image-55" title="Screenshot-Review1" src="http://blog.klauskiwi.com/wp-content/uploads/2010/07/Screenshot-Review1-300x175.png" alt="Claws-Mail, git and Meld in action" width="300" height="175" /></a><p class="wp-caption-text">Claws-Mail, git and Meld in action</p></div>
<p style="text-align: left;">The trick is in configuring an <em>action</em> in Claws-Mail that opens a terminal and calls a script. The script uses <em>git-am</em> to apply the patch contained within the selected mail message to <em>some</em> branch in your local git repository. After applying, it calls <em>git-difftool</em> to show the differences. <em>git-difftool</em> then calls any diff tool you might like (my suggestion stays with Meld).</p>
<p style="text-align: left;">I&#8217;m attaching the script for reference below:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
<span style="color: #666666; font-style: italic;">## git-review-step</span>
<span style="color: #666666; font-style: italic;">## (C) Copyright 2010 Klaus Heinrich Kiwi</span>
<span style="color: #666666; font-style: italic;">## Licensed under CreativeCommons Attribution-ShareAlike 3.0 Unsupported</span>
<span style="color: #666666; font-style: italic;">## http://creativecommons.org/licenses/by-sa/3.0/ for more info.</span>
&nbsp;
<span style="color: #666666; font-style: italic;">## dirname is where the git tree is located.</span>
<span style="color: #007800;"><span style="color: #c20cb9; font-weight: bold;">dirname</span></span>=<span style="color: #007800;">$HOME</span><span style="color: #000000; font-weight: bold;">/</span>sandbox<span style="color: #000000; font-weight: bold;">/</span>ock<span style="color: #000000; font-weight: bold;">/</span>sourceforge-git<span style="color: #000000; font-weight: bold;">/</span>opencryptoki
&nbsp;
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;$#&quot;</span> <span style="color: #660033;">-lt</span> <span style="color: #000000;">1</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
  <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Invalid number of parameters&quot;</span>
  <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;usage: <span style="color: #007800;">$(basename $0)</span> &lt;patch1&gt; [patch2] [patch3] [...]&quot;</span>
  <span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">1</span>
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #007800;">messages</span>=<span style="color: #7a0874; font-weight: bold;">&#40;</span>$<span style="color: #000000; font-weight: bold;">@</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #007800;">$dirname</span>
<span style="color: #007800;">oldbranch</span>=<span style="color: #000000; font-weight: bold;">`</span>git branch <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'^* '</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">cut</span> <span style="color: #660033;">-d</span> <span style="color: #ff0000;">&quot; &quot;</span> <span style="color: #660033;">-f</span> <span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">`</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Save any uncommitted changes in the working dir or index</span>
<span style="color: #000000; font-weight: bold;">if</span> git stash <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> HEAD; <span style="color: #000000; font-weight: bold;">then</span>
  <span style="color: #007800;">savedchanges</span>=<span style="color: #ff0000;">&quot;yes&quot;</span>
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> restore<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
  <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Reverting to original branch...&quot;</span>
  git checkout <span style="color: #660033;">--force</span> <span style="color: #007800;">$oldbranch</span>
  <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$savedchanges</span>&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
    <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Restoring un-committed changes...&quot;</span>
    git stash pop
  <span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Get branch to apply to</span>
git branch
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Select branch to apply patches:&quot;</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;  Enter <span style="color: #000099; font-weight: bold;">\&quot;</span>&lt;branchname&gt;<span style="color: #000099; font-weight: bold;">\&quot;</span> to apply to an existing branch&quot;</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;  Enter <span style="color: #000099; font-weight: bold;">\&quot;</span>&lt;newname&gt; [origref]<span style="color: #000099; font-weight: bold;">\&quot;</span> to create a new branch from <span style="color: #000099; font-weight: bold;">\&quot;</span>origref<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;    reference (use current branch and HEAD if left blank)&quot;</span>
<span style="color: #c20cb9; font-weight: bold;">read</span> <span style="color: #660033;">-p</span> <span style="color: #ff0000;">&quot;Apply patch(es) to branch (default is current):&quot;</span> <span style="color: #660033;">-e</span> <span style="color: #660033;">-i</span> <span style="color: #007800;">$oldbranch</span> newbranch origbranch
&nbsp;
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$newbranch</span>&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
  <span style="color: #000000; font-weight: bold;">if</span> git branch <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">&quot;\b<span style="color: #007800;">${newbranch}</span>$&quot;</span>; <span style="color: #000000; font-weight: bold;">then</span>
    <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Applying to existing branch <span style="color: #000099; font-weight: bold;">\&quot;</span><span style="color: #007800;">$newbranch</span><span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span>
    <span style="color: #666666; font-style: italic;"># Checkout</span>
    <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #000000; font-weight: bold;">!</span> git checkout <span style="color: #007800;">$newbranch</span>; <span style="color: #000000; font-weight: bold;">then</span>
      <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Error checkout out <span style="color: #000099; font-weight: bold;">\&quot;</span><span style="color: #007800;">$newbranch</span><span style="color: #000099; font-weight: bold;">\&quot;</span> - Aborting&quot;</span>
      restore
      <span style="color: #c20cb9; font-weight: bold;">read</span> <span style="color: #660033;">-p</span> <span style="color: #ff0000;">&quot;Press Enter to continue&quot;</span>
      <span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">1</span>
    <span style="color: #000000; font-weight: bold;">fi</span>
  <span style="color: #000000; font-weight: bold;">else</span>
    <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$origbranch</span>&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
      <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Applying to new branch <span style="color: #000099; font-weight: bold;">\&quot;</span><span style="color: #007800;">$newbranch</span><span style="color: #000099; font-weight: bold;">\&quot;</span> created from <span style="color: #000099; font-weight: bold;">\&quot;</span><span style="color: #007800;">$origbranch</span><span style="color: #000099; font-weight: bold;">\&quot;</span> branch...&quot;</span>
    <span style="color: #000000; font-weight: bold;">else</span>
      <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Applying to new branch <span style="color: #000099; font-weight: bold;">\&quot;</span><span style="color: #007800;">$newbranch</span><span style="color: #000099; font-weight: bold;">\&quot;</span> created from <span style="color: #000099; font-weight: bold;">\&quot;</span><span style="color: #007800;">$oldbranch</span><span style="color: #000099; font-weight: bold;">\&quot;</span> branch...&quot;</span>
    <span style="color: #000000; font-weight: bold;">fi</span>
    <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #000000; font-weight: bold;">!</span> git checkout <span style="color: #660033;">-b</span> <span style="color: #007800;">$newbranch</span> <span style="color: #007800;">$origbranch</span>; <span style="color: #000000; font-weight: bold;">then</span>
      <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Error creating <span style="color: #000099; font-weight: bold;">\&quot;</span><span style="color: #007800;">$newbranch</span><span style="color: #000099; font-weight: bold;">\&quot;</span> from <span style="color: #000099; font-weight: bold;">\&quot;</span><span style="color: #007800;">$oldbranch</span><span style="color: #000099; font-weight: bold;">\&quot;</span> - Aborting&quot;</span>
      restore
      <span style="color: #c20cb9; font-weight: bold;">read</span> <span style="color: #660033;">-p</span> <span style="color: #ff0000;">&quot;Press Enter to continue&quot;</span>
      <span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">1</span>
    <span style="color: #000000; font-weight: bold;">fi</span>  <span style="color: #666666; font-style: italic;"># if ! git checkout ...</span>
&nbsp;
  <span style="color: #000000; font-weight: bold;">fi</span>    <span style="color: #666666; font-style: italic;"># if `git branch | grep ...</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">fi</span>      <span style="color: #666666; font-style: italic;"># if [ -n $newbranch ...</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Apply patches to working dir using git-apply</span>
<span style="color: #007800;">amparams</span>=<span style="color: #ff0000;">&quot;--whitespace=error-all&quot;</span>
<span style="color: #000000; font-weight: bold;">while</span> <span style="color: #000000; font-weight: bold;">!</span> git am <span style="color: #007800;">$amparams</span> <span style="color: #800000;">${messages[@]}</span>; <span style="color: #000000; font-weight: bold;">do</span>
  git am <span style="color: #660033;">--abort</span>
  <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;git-am failed. Retry (the whole chunk) with additional parameters?&quot;</span>
  <span style="color: #c20cb9; font-weight: bold;">read</span> <span style="color: #660033;">-p</span> <span style="color: #ff0000;">&quot;git-am parameters (empty aborts):&quot;</span> <span style="color: #660033;">-e</span> <span style="color: #660033;">-i</span> <span style="color: #007800;">$amparams</span> amparams
  <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-z</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$amparams</span>&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
    <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Aborting...&quot;</span>
    restore
    <span style="color: #c20cb9; font-weight: bold;">read</span> <span style="color: #660033;">-p</span> <span style="color: #ff0000;">&quot;Press Enter to continue&quot;</span>
    <span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">1</span>
  <span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #000000; font-weight: bold;">done</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">for</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span> <span style="color: #007800;">i</span>=<span style="color: #800000;">${#messages[@]}</span>; i <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000;">0</span>; i-- <span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>; <span style="color: #000000; font-weight: bold;">do</span>
  <span style="color: #007800;">PAGER</span>=<span style="color: #ff0000;">''</span> git log <span style="color: #660033;">--stat</span> HEAD~<span style="color: #800000;">${i}</span>..HEAD~$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>i-<span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
  <span style="color: #000000; font-weight: bold;">if</span> git <span style="color: #c20cb9; font-weight: bold;">diff</span> <span style="color: #660033;">--check</span> HEAD~<span style="color: #800000;">${i}</span>..HEAD~$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>i-<span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>; <span style="color: #000000; font-weight: bold;">then</span>
    <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;WARNING: Commit introduces whitespace or indenting errors&quot;</span>
  <span style="color: #000000; font-weight: bold;">fi</span>
  git difftool HEAD~<span style="color: #800000;">${i}</span>..HEAD~$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>i-<span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #000000; font-weight: bold;">done</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Restoring working tree to original state&quot;</span>
restore
<span style="color: #c20cb9; font-weight: bold;">read</span> <span style="color: #660033;">-p</span> <span style="color: #ff0000;">&quot;Press Enter to continue&quot;</span></pre></div></div>

<p><a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"><img style="border-width: 0;" src="http://i.creativecommons.org/l/by-sa/3.0/88x31.png" alt="Creative Commons License" /></a><br />
<span>git-review-step</span> by <a rel="cc:attributionURL" href="http://blog.klauskiwi.com">Klaus Heinrich Kiwi</a> is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-ShareAlike 3.0 Unported License</a>.<br />
Based on a work at <a rel="dc:source" href="http://blog.klauskiwi.com/archives/42">blog.klauskiwi.com</a>.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://blog.klauskiwi.com/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://blog.klauskiwi.com/archives/42/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>xcryptolinz RPMs</title>
		<link>http://blog.klauskiwi.com/archives/40</link>
		<comments>http://blog.klauskiwi.com/archives/40#comments</comments>
		<pubDate>Mon, 21 Sep 2009 21:54:19 +0000</pubDate>
		<dc:creator>Klaus</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[linux crypto cca hardware]]></category>

		<guid isPermaLink="false">http://blog.klauskiwi.com/?p=40</guid>
		<description><![CDATA[In case anyone is looking for the xcryptolinz RPMs to support IBM cryptographic hardware in Secure Key mode (among other things) through the CCA API, they are actually placed in IBM&#8217;s software support page for cryptocards (link) As of this posting, current version is 3.28-rc8, and only supported in the s390x architecture (System z). Update: [...]]]></description>
			<content:encoded><![CDATA[<p>In case anyone is looking for the xcryptolinz RPMs to support IBM cryptographic hardware in Secure Key mode (among other things) through the CCA API, they are actually placed in IBM&#8217;s software support page for cryptocards (<a href="http://www-03.ibm.com/security/cryptocards/pcixcc/ordersoftware.shtml" target="_blank">link</a>)</p>
<p>As of this posting, current version is <a href="http://www-03.ibm.com/security/cryptocards/dwnlds/xcryptolinzGA-3.28-rc08.s390x.rpm" target="_blank">3.28-rc8</a>, and only supported in the s390x architecture (System z).</p>
<p><em><span style="text-decoration: underline;">Update:</span></em></p>
<p><em>IBM has released a <a href="http://www-03.ibm.com/security/cryptocards/pciecc/ordersoftware.shtml">new CCA library</a> (ver. 4.0), supporting the newer IBM <a href="http://www-03.ibm.com/security/cryptocards/pciecc/overview.shtml">PCIe Cryptographic Coprocessor</a> (aka CEX3C aka 4765) card.  The library now supports SHA-2 AES and RSA with modulus size up to 4096 bits (for capable hardware), besides other Secure-Key operations such as DES, 3DES and SHA-1.</em></p>
<p><em>Opencryptoki starting from version <a href="https://sourceforge.net/projects/opencryptoki/files/opencryptoki/">2.3</a> supports (and in fact requires) this library in order to use the CCA token type.<br />
</em></p>
<p>If time permits, I&#8217;ll post more here about CCA support in <a href="http://sourceforge.net/projects/opencryptoki/" target="_blank">openCryptoki</a> in the future.</p>
<p>-Klaus</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://blog.klauskiwi.com/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://blog.klauskiwi.com/archives/40/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
<enclosure url="http://www-03.ibm.com/security/cryptocards/dwnlds/xcryptolinzGA-3.28-rc08.s390x.rpm" length="367925" type="audio/x-pn-realaudio-plugin" />
		</item>
		<item>
		<title>test libraries without &#8216;make install&#8217;</title>
		<link>http://blog.klauskiwi.com/archives/34</link>
		<comments>http://blog.klauskiwi.com/archives/34#comments</comments>
		<pubDate>Thu, 03 Sep 2009 19:05:54 +0000</pubDate>
		<dc:creator>Klaus</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[LD_LIBRARY_PATH]]></category>
		<category><![CDATA[oneliner]]></category>

		<guid isPermaLink="false">http://blog.klauskiwi.com/?p=34</guid>
		<description><![CDATA[Quick oneliner to export LD_LIBRARY_PATH containing all the pathnames that brings a shared library (.so) file in, so the lazy ones like myself can sometimes risk running/testing software that uses these libraries without issuing a &#8216;make install&#8217;. There are probably more clever/elegant ways to do that, but whatever: export LD_LIBRARY_PATH=$(for j in \ $(for i [...]]]></description>
			<content:encoded><![CDATA[<p>Quick oneliner to export LD_LIBRARY_PATH containing all the pathnames that brings a shared library (.so) file in, so the lazy ones like myself can sometimes risk running/testing software that uses these libraries without issuing a &#8216;make install&#8217;.</p>
<p>There are probably more clever/elegant ways to do that, but whatever:</p>
<blockquote>
<pre>export LD_LIBRARY_PATH=$(for j in \
  $(for i in \
    $(find . -name '*.so'); \
    do dirname $i; done | sort | uniq);\
  do readlink -f $j; done |\
  awk '{ printf "%s:", $0 }')</pre>
</blockquote>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://blog.klauskiwi.com/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://blog.klauskiwi.com/archives/34/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>fglrx problems with Jaunty</title>
		<link>http://blog.klauskiwi.com/archives/24</link>
		<comments>http://blog.klauskiwi.com/archives/24#comments</comments>
		<pubDate>Sat, 09 May 2009 04:19:15 +0000</pubDate>
		<dc:creator>Klaus</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[fglrx radeon compiz hang]]></category>

		<guid isPermaLink="false">http://blog.klauskiwi.com/?p=24</guid>
		<description><![CDATA[Problems getting compiz (or any other 3D acceleration app) working with your ATI Radeon graphics card on the latest Ubuntu release, Jaunty Jackalope (9.04)? Or better yet: you figured out that you were missing ATI&#8217;s proprietary driver, fglrx, and installed it on your own (since the Hardware Drivers wasn&#8217;t giving you the option to enable [...]]]></description>
			<content:encoded><![CDATA[<p>Problems getting compiz (or any other 3D acceleration app) working with your ATI Radeon graphics card on the latest Ubuntu release, Jaunty Jackalope (9.04)?</p>
<p>Or better yet: you figured out that you were missing ATI&#8217;s proprietary driver, fglrx, and installed it on your own (since the <em>Hardware Drivers</em> wasn&#8217;t giving you the option to enable it in the first place)?</p>
<p>If that was the case, I think you already know that the reason why you&#8217;d get a <em>hard freeze</em> everytime the X server was comming up is that you were wrong, and Ubuntu and the <em>Hardware Drivers</em> app were right!</p>
<p>ATI&#8217;s Catalyst drivers (also known as fglrx drivers), in the default version shipped with Jaunty, are incompatible with some features from Xserver 1.6, which was introduced with Jaunty. Catalyst drivers up to version 9.3 <strong>will not work</strong> with Xorg version 7.4 or beyond.</p>
<p>The good news is that AMD has already released a 9.4 version that is compatible with the new server. You can get the new version, for Linux x86 and Linux 86_64 here: <a href="http://support.amd.com/us/gpudownload/Pages/index.aspx">http://support.amd.com/us/gpudownload/Pages/index.aspx</a></p>
<p>The bad news is (or better, are):</p>
<ul>
<li>Ubuntu&#8217;s packages haven&#8217;t been updated to include this version yet (as of the time of this writing) &#8211; so yes, you&#8217;d need to install them the manual way (see below for some tips)</li>
<li>Seems like the new driver still has some instabilities, notably when trying to use compiz with video overlay (try using totem to play a video while running a composite desktop &#8211; AT YOUR OWN RISK <img src='http://blog.klauskiwi.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </li>
</ul>
<p>Oh wait! I actually have another piece of &#8216;good news&#8217;: Despite not having official packages for Ubuntu yet, I just found out how easy it&#8217;s to create those packages using ATI&#8217;s own binary:</p>
<pre>
<pre># ./ati-driver-installer-9-4-x86.x86_64.run --buildpkg Ubuntu/9.04</pre>
</pre>
<p>Yep, that&#8217;s pretty much it. Install the generated <em>.deb</em> files and reboot the system. You may want to run <em>aticonfig &#8211;initial</em> if you are not confident that Xorg will automatically detect your driver.</p>
<p>Having a proper package installed instead of just files laying around will allow the system to reconfigure itself when needed (i.e., upon kernel updates) and it also allows you to keep your files tracked, smooth upgrades, etc &#8211; generally a Good Thing™to do.</p>
<p style="padding-left: 60px;">
<p style="padding-left: 60px;">-Klaus</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://blog.klauskiwi.com/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://blog.klauskiwi.com/archives/24/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Guest blogging on Emily&#8217;s &#8220;Open Source Security&#8221; blog</title>
		<link>http://blog.klauskiwi.com/archives/21</link>
		<comments>http://blog.klauskiwi.com/archives/21#comments</comments>
		<pubDate>Wed, 29 Apr 2009 13:36:48 +0000</pubDate>
		<dc:creator>Klaus</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open-Source]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[IBM LTC kerberos ldap guest blogging]]></category>

		<guid isPermaLink="false">http://blog.klauskiwi.com/?p=21</guid>
		<description><![CDATA[Starting from today I am a proud contributor to Emily Ratliff&#8217;s Open Source Security blog. The blog brings information, news, discussions and opinions mainly about Linux and Open Source security in general, and, besides Emily and myself, has other members from the IBM&#8217;s Linux Technology Center Security Team as contributors. My first post brings a [...]]]></description>
			<content:encoded><![CDATA[<p>Starting from today I am a proud contributor to Emily Ratliff&#8217;s <a href="http://www.ratliff.net/blog/" target="_blank">Open Source Security</a> blog. The blog brings information, news, discussions and opinions mainly about Linux and Open Source security in general, and, besides Emily and myself, has other members from the IBM&#8217;s <a href="http://www.ratliff.net/blog/" target="_blank">Linux Technology Center</a> Security Team as <a href="http://www.ratliff.net/blog/guest-bloggers/" target="_blank">contributors</a>.</p>
<p>My <a href="http://www.ratliff.net/blog/2009/04/29/kerberos_and_itds/" target="_blank">first post</a> brings a little introduction to concepts such as authentication and authorization, and how Kerberos and LDAP can be used to perform those important roles, to later introduce the &#8220;<a href="http://publib.boulder.ibm.com/infocenter/lnxinfo/v3r0m0/topic/liaai/kerberos/liaaikerberos1.htm" target="_blank">Using MIT-Kerberos fo IBM Tivoli Directory Server backend</a>&#8221; Blueprint which I authored by the end of last year.</p>
<p>Please go <a href="http://www.ratliff.net/blog/2009/04/29/kerberos_and_itds/">check it out</a>. Comments are always welcome.</p>
<p><span style="text-decoration: underline;"><em>Update:</em></span><em> blueprint link fixed</em></p>
<p>-Klaus</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://blog.klauskiwi.com/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://blog.klauskiwi.com/archives/21/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.634 seconds -->

