<?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>Raim</title>
	<atom:link href="http://raim.codingfarm.de/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://raim.codingfarm.de/blog</link>
	<description>Me in a fish bowl</description>
	<lastBuildDate>Thu, 08 Mar 2012 09:16:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Subversion diff with vimdiff improved</title>
		<link>http://raim.codingfarm.de/blog/2012/02/09/subversion-diff-with-vimdiff-improved/</link>
		<comments>http://raim.codingfarm.de/blog/2012/02/09/subversion-diff-with-vimdiff-improved/#comments</comments>
		<pubDate>Thu, 09 Feb 2012 22:09:04 +0000</pubDate>
		<dc:creator>Rainer Müller</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[diff]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[vimdiff]]></category>

		<guid isPermaLink="false">http://raim.codingfarm.de/blog/?p=352</guid>
		<description><![CDATA[Almost three years ago, I published a bash wrapper function for the svn command on this blog. This shell function allows to use external tools when calling svn diff, for example colordiff, Apple&#8217;s FileMerge on OS X or vimdiff. Since then, I improved the file by using less forks with type -fp, added quotes where [...]]]></description>
			<content:encoded><![CDATA[<p>Almost three years ago, I published a bash wrapper function for the <code>svn</code> command <a href="http://raim.codingfarm.de/blog/2009/03/17/subversion-diff-commands/">on this blog</a>. This shell function allows to use external tools when calling <code>svn diff</code>, for example <code>colordiff</code>, Apple&#8217;s FileMerge on OS X or vimdiff.</p>
<p><span id="more-352"></span></p>
<p>Since then, I improved the file by using less forks with <code>type -fp</code>, added quotes where I encountered filenames with spaces, etc. However, it is basically still the same as back then. Here, I left out the parts about the other diff functions so you get an idea how this works without requiring you to read the other blog post:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> <span style="color: #c20cb9; font-weight: bold;">svn</span><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;">local</span> <span style="color: #007800;">svn</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">type</span> <span style="color: #660033;">-fp</span> <span style="color: #c20cb9; font-weight: bold;">svn</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
    <span style="color: #000000; font-weight: bold;">case</span> <span style="color: #ff0000;">&quot;$1&quot;</span> <span style="color: #000000; font-weight: bold;">in</span>
        diff-vim<span style="color: #7a0874; font-weight: bold;">&#41;</span>
            <span style="color: #7a0874; font-weight: bold;">shift</span>;
            <span style="color: #007800;">$svn</span> <span style="color: #c20cb9; font-weight: bold;">diff</span> <span style="color: #660033;">--diff-cmd</span> <span style="color: #007800;">$HOME</span><span style="color: #000000; font-weight: bold;">/</span>libexec<span style="color: #000000; font-weight: bold;">/</span>svndiff <span style="color: #660033;">-x</span> vimdiff <span style="color: #ff0000;">&quot;$@&quot;</span>
            <span style="color: #000000; font-weight: bold;">;;</span>
        <span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
            <span style="color: #007800;">$svn</span> <span style="color: #ff0000;">&quot;$@&quot;</span>
            <span style="color: #000000; font-weight: bold;">;;</span>
    <span style="color: #000000; font-weight: bold;">esac</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span></pre></div></div>

<p>This approach has one drawback for practical use of the <code>svn diff-vim</code> command: sometimes, svn does not use the original file name, but creates a temporary file first. This hinders editing of such a diff using vimdiff, as edits can not be saved easily to the actual specified file.</p>
<p><em>[Side note: this happens as soon as a file has a <code>svn:keywords</code> property and keywords such as <code>$Id$</code> were expanded. In this case, the diff does not use the original file path but a temporary file to avoid changes introduced by keyword expansion. (<a href="http://stackoverflow.com/questions/396176/why-does-svn-diff-sometimes-copy-working-files-to-a-temp-file">details</a>)]</em></p>
<p>This behavior became annoying for me, so I improved the original approach and present the new version below. This time, I am using <code>svn cat</code> to manually retrieve the older version of the file to a temporary location and then call vimdiff with the file specified and the older version. This became more complex as I also wanted to support the <code>-r</code> syntax to specify the revision to compare against:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> <span style="color: #c20cb9; font-weight: bold;">svn</span><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;">local</span> <span style="color: #007800;">svn</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">type</span> <span style="color: #660033;">-fp</span> <span style="color: #c20cb9; font-weight: bold;">svn</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
    <span style="color: #000000; font-weight: bold;">case</span> <span style="color: #ff0000;">&quot;$1&quot;</span> <span style="color: #000000; font-weight: bold;">in</span>
        diff-vim<span style="color: #7a0874; font-weight: bold;">&#41;</span>
            <span style="color: #7a0874; font-weight: bold;">shift</span>;
&nbsp;
            <span style="color: #7a0874; font-weight: bold;">local</span> <span style="color: #007800;">file</span>=<span style="color: #ff0000;">&quot;&quot;</span>
            <span style="color: #7a0874; font-weight: bold;">local</span> <span style="color: #007800;">rev</span>=<span style="color: #ff0000;">&quot;-rBASE&quot;</span>
&nbsp;
            <span style="color: #000000; font-weight: bold;">while</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$#</span> <span style="color: #660033;">-gt</span> <span style="color: #000000;">0</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">do</span>
                <span style="color: #000000; font-weight: bold;">case</span> <span style="color: #ff0000;">&quot;$1&quot;</span> <span style="color: #000000; font-weight: bold;">in</span>
                    --<span style="color: #7a0874; font-weight: bold;">&#41;</span>
                        <span style="color: #7a0874; font-weight: bold;">break</span>;
                        <span style="color: #000000; font-weight: bold;">;;</span>
                    -r<span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
                        <span style="color: #007800;">rev</span>=<span style="color: #ff0000;">&quot;$1&quot;</span>
                        <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;$1&quot;</span> == <span style="color: #ff0000;">&quot;-r&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;">shift</span>
                            <span style="color: #007800;">rev</span>=<span style="color: #ff0000;">&quot;-r$1&quot;</span>
                        <span style="color: #000000; font-weight: bold;">fi</span>
                        <span style="color: #000000; font-weight: bold;">;;</span>
                    --revision<span style="color: #7a0874; font-weight: bold;">&#41;</span>
                        <span style="color: #7a0874; font-weight: bold;">shift</span>
                        <span style="color: #007800;">rev</span>=<span style="color: #ff0000;">&quot;-r$1&quot;</span>
                        <span style="color: #000000; font-weight: bold;">;;</span>
                    -<span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
                        <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;svn: invalid option: $1&quot;</span>
                        <span style="color: #7a0874; font-weight: bold;">return</span> <span style="color: #000000;">1</span>
                        <span style="color: #000000; font-weight: bold;">;;</span>
                    <span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</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;">$file</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;svn: diff-vim works with one single filename only&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&amp;</span><span style="color: #000000;">2</span>
                            <span style="color: #7a0874; font-weight: bold;">return</span> <span style="color: #000000;">1</span>
                        <span style="color: #000000; font-weight: bold;">fi</span>
                        <span style="color: #007800;">file</span>=<span style="color: #ff0000;">&quot;$1&quot;</span>
                        <span style="color: #000000; font-weight: bold;">;;</span>
                <span style="color: #000000; font-weight: bold;">esac</span>
                <span style="color: #7a0874; font-weight: bold;">shift</span>;
            <span style="color: #000000; font-weight: bold;">done</span>;
&nbsp;
            <span style="color: #7a0874; font-weight: bold;">local</span> <span style="color: #007800;">tmp</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">mktemp</span> <span style="color: #660033;">-t</span> svn-diff-vim <span style="color: #000000; font-weight: bold;">||</span> <span style="color: #7a0874; font-weight: bold;">return</span> <span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>.<span style="color: #800000;">${file##*.}</span>
            <span style="color: #007800;">$svn</span> <span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #007800;">$rev</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$file</span>&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #007800;">$tmp</span> <span style="color: #000000; font-weight: bold;">||</span> <span style="color: #7a0874; font-weight: bold;">return</span> <span style="color: #000000;">1</span>
            <span style="color: #c20cb9; font-weight: bold;">chmod</span> a-w <span style="color: #007800;">$tmp</span> <span style="color: #000000; font-weight: bold;">||</span> <span style="color: #7a0874; font-weight: bold;">return</span> <span style="color: #000000;">1</span>
            vimdiff <span style="color: #ff0000;">&quot;<span style="color: #007800;">$file</span>&quot;</span> <span style="color: #007800;">$tmp</span> <span style="color: #000000; font-weight: bold;">||</span> <span style="color: #7a0874; font-weight: bold;">return</span> <span style="color: #000000;">1</span>
            <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-f</span> <span style="color: #007800;">$tmp</span> <span style="color: #000000; font-weight: bold;">||</span> <span style="color: #7a0874; font-weight: bold;">return</span> <span style="color: #000000;">1</span>
            <span style="color: #000000; font-weight: bold;">;;</span>
        <span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
            <span style="color: #007800;">$svn</span> <span style="color: #ff0000;">&quot;$@&quot;</span>
            <span style="color: #000000; font-weight: bold;">;;</span>
    <span style="color: #000000; font-weight: bold;">esac</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span></pre></div></div>

<p>A known drawback of this approach is that you can no longer use the <code>-c</code> option to view changes introduced in a specific revision, or specify a peg revision with the <code>file@rev</code> syntax. For me, these aren&#8217;t showstoppers, as the most common use case for me is to revert only some parts of a file. Using the presented function above, this is quite easy with <code>svn diff-vim</code> and the vim commands moving changes from one file to the other: <code>do</code> for diff-obtain and <code>dp</code> for diff-put.</p>
<p>You can also get the full file with all implemented diff commands as a <a href="http://raim.codingfarm.de/downloads/svn.bash">download</a>. This file is meant to be sourced from your <code>.bashrc</code>. You can share and use this script as you will, it is hereby placed into Public Domain.</p>
<p>As always, I am happy to hear about your experiences with this script, suggestions or better solutions in the comments below!</p>
]]></content:encoded>
			<wfw:commentRss>http://raim.codingfarm.de/blog/2012/02/09/subversion-diff-with-vimdiff-improved/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google&#8217;s Privacy Policy over the Years</title>
		<link>http://raim.codingfarm.de/blog/2012/01/30/googles-privacy-policy-over-the-years/</link>
		<comments>http://raim.codingfarm.de/blog/2012/01/30/googles-privacy-policy-over-the-years/#comments</comments>
		<pubDate>Sun, 29 Jan 2012 23:46:27 +0000</pubDate>
		<dc:creator>Rainer Müller</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Society]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[privacy]]></category>
		<category><![CDATA[privacy policy]]></category>

		<guid isPermaLink="false">http://raim.codingfarm.de/blog/?p=333</guid>
		<description><![CDATA[Google&#8217;s Privacy Policy is going to change this March in order to unify up to 60 different policies across all the services Google has to offer. While reading through the new terms, I compared what did change exactly to see if the coverage in other blogs and media is correct. As older versions are still [...]]]></description>
			<content:encoded><![CDATA[<p>Google&#8217;s Privacy Policy is going to change this March in order to unify up to 60 different policies across all the services Google has to offer. While reading through the new terms, I compared what did change exactly to see if the coverage in other blogs and media is correct.</p>
<p>As older versions are still available, I noticed that the beginning of this <a href="https://www.google.com/intl/en/policies/privacy/">Privacy Policy</a> has changed over the years. There used to be a first sentence explaining the general approach Google takes towards your data. But read yourself:</p>
<p><span id="more-333"></span></p>
<p><strong>August 14, 2000</strong>:</p>
<blockquote><p>Google respects and protects the privacy of the individuals that use Google’s search engine services. <sub>[...]</sub></p></blockquote>
<p>Well, that sounds fair.</p>
<p><strong>July 1, 2004</strong>:</p>
<blockquote><p>At Google, we strive to develop innovative services to better serve our users. We recognize that privacy is an important issue, so we design and operate our services with the protection of your privacy in mind. <sub>[...]</sub></p></blockquote>
<p>Hey, they want to bring us innovation. Okay, at least they think about privacy—in the second sentence.</p>
<p><strong>October 14, 2005</strong>,<br />
<strong>August 7, 2008</strong>,<br />
<strong>January 27, 2009</strong>,<br />
<strong>March 11, 2009</strong>:</p>
<blockquote><p>At Google we recognize that privacy is important. <sub>[...]</sub></p></blockquote>
<p>Yes, they are aware that privacy is important, but they might do whatever they want with your data.</p>
<p><strong>October 3, 2010</strong>,<br />
<strong>March 1, 2012</strong></p>
<blockquote><p><sub>[...]</sub></p></blockquote>
<p>From here on, no such sentence exists anymore. I leave it to you what that means.</p>
]]></content:encoded>
			<wfw:commentRss>http://raim.codingfarm.de/blog/2012/01/30/googles-privacy-policy-over-the-years/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Performance improvements in the upcoming Subversion 1.7 release</title>
		<link>http://raim.codingfarm.de/blog/2011/09/10/performance-improvements-in-the-upcoming-subversion-1-7-release/</link>
		<comments>http://raim.codingfarm.de/blog/2011/09/10/performance-improvements-in-the-upcoming-subversion-1-7-release/#comments</comments>
		<pubDate>Sat, 10 Sep 2011 17:46:09 +0000</pubDate>
		<dc:creator>Rainer Müller</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[benchmark]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://raim.codingfarm.de/blog/?p=316</guid>
		<description><![CDATA[I just tried out a build from the Subversion 1.7.x branch which appears to come close to a final release. Instead of creating .svn directories everywhere, the new working copy layout switches to a central storage using SQLite. You will only see a single .svn at the top most directory of the working copy. Details [...]]]></description>
			<content:encoded><![CDATA[<p>I just tried out a build from the Subversion 1.7.x branch which appears to come close to a final release. Instead of creating <code>.svn</code> directories everywhere, the new working copy layout switches to a central storage using SQLite. You will only see a single <code>.svn</code> at the top most directory of the working copy. Details are outlined in the preliminary <a href="http://subversion.apache.org/docs/release-notes/1.7.html">release notes</a>.</p>
<p><span id="more-316"></span></p>
<p>The following is a totally inaccurate benchmark, but I want to share some numbers. The MacPorts repository used here contains lots of directories with only a few files in each, often only a single file. This makes operations walking the <code>.svn</code> directories in the tree very expensive.</p>
<p>Listing status of files:</p>
<pre>
~/src/macports/trunk-svn $ time svn st

real	3m39.347s
user	0m1.450s
sys	0m5.900s

~/src/macports/trunk-svn17 $ time svn17 st

real	0m23.788s
user	0m1.914s
sys	0m2.297s
</pre>
<p>Update without changes (locking the whole working copy against concurrent access):</p>
<pre>
~/src/macports/trunk-svn $ time svn up
At revision 83750.

real	2m32.855s
user	0m1.202s
sys	0m5.060s

~/src/macports/trunk-svn17 $ time svn17 up
Updating '.':
At revision 83750.

real	0m5.362s
user	0m1.793s
sys	0m1.166s
</pre>
<p>Impressive results!</p>
]]></content:encoded>
			<wfw:commentRss>http://raim.codingfarm.de/blog/2011/09/10/performance-improvements-in-the-upcoming-subversion-1-7-release/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mission Control grabbed my keyboard shortcuts</title>
		<link>http://raim.codingfarm.de/blog/2011/07/31/mission-control-grabbed-my-keyboard-shortcuts/</link>
		<comments>http://raim.codingfarm.de/blog/2011/07/31/mission-control-grabbed-my-keyboard-shortcuts/#comments</comments>
		<pubDate>Sun, 31 Jul 2011 14:05:41 +0000</pubDate>
		<dc:creator>Rainer Müller</dc:creator>
				<category><![CDATA[English]]></category>

		<guid isPermaLink="false">http://raim.codingfarm.de/blog/?p=308</guid>
		<description><![CDATA[The previous so called &#8220;Spaces&#8221; are now part of &#8220;Mission Control&#8221; in Mac OS X 10.7 Lion. It implements multiple work spaces as known from common Linux desktop environments. Unfortunately it grabs the global keyboard shortcuts Ctrl-1, Ctrl-2, &#8230;, Ctrl-0 and Ctrl-Option-1, Ctrl-Option-2, &#8230;, Ctrl-Option-6 to switch to the corresponding space by default. This prevents [...]]]></description>
			<content:encoded><![CDATA[<p>The previous so called &#8220;Spaces&#8221; are now part of &#8220;Mission Control&#8221; in Mac OS X 10.7 Lion. It implements multiple work spaces as known from common Linux desktop environments.</p>
<p>Unfortunately it grabs the global keyboard shortcuts <em>Ctrl-1</em>, <em>Ctrl-2</em>, &#8230;, <em>Ctrl-0</em> and <em>Ctrl-Option-1</em>, <em>Ctrl-Option-2</em>, &#8230;, <em>Ctrl-Option-6</em> to switch to the corresponding space by default. This prevents using any of these shortcuts in an application. I had defined some of those for use with my favorite editor vim, where the shortcuts ceased to work after the upgrade to Lion.</p>
<p>Even more unfortunate, it&#8217;s a tedious task to stop Mission Control from allocating these keyboard shortcuts. The GUI offers the configuration check boxes only for spaces which are currently enabled.</p>
<p><a href="http://raim.codingfarm.de/blog/wp-content/uploads/2011/07/MissionControlKeyboardShortcuts.png"><img class="size-full wp-image-309 aligncenter" title="MissionControlKeyboardShortcuts" src="http://raim.codingfarm.de/blog/wp-content/uploads/2011/07/MissionControlKeyboardShortcuts.png" alt="" width="404" height="165" /></a></p>
<p>So the solution was to enable <strong>all</strong> possible spaces, which are capped at a maximum of 16, using the Mission Control interface. Then disable the check box for each of them in <em>System Preferences</em> &gt; <em>Keyboard</em> &gt; <em>Keyboard Shortcuts</em>.</p>
<p>As said a tedious task, but works. I was hoping to provide some <em>defaults write</em> command here, but I was unable to determine where these settings are stored.</p>
]]></content:encoded>
			<wfw:commentRss>http://raim.codingfarm.de/blog/2011/07/31/mission-control-grabbed-my-keyboard-shortcuts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>tvtime on Linux kernel 2.6.38 without V4L1 API</title>
		<link>http://raim.codingfarm.de/blog/2011/04/06/tvtime-on-linux-kernel-2-6-38-without-v4l1-api/</link>
		<comments>http://raim.codingfarm.de/blog/2011/04/06/tvtime-on-linux-kernel-2-6-38-without-v4l1-api/#comments</comments>
		<pubDate>Tue, 05 Apr 2011 22:32:15 +0000</pubDate>
		<dc:creator>Rainer Müller</dc:creator>
				<category><![CDATA[English]]></category>

		<guid isPermaLink="false">http://raim.codingfarm.de/blog/?p=294</guid>
		<description><![CDATA[My favorite application for watching analogue TV is tvtime. Unfortunately it has not been updated for a few years now. As is the rule for unmaintained code, the upstream version finally is no longer compatible with Linux kernel 2.6.38. The V4L1 API has now been removed after being deprecated for a really long time. But [...]]]></description>
			<content:encoded><![CDATA[<p>My favorite application for watching analogue TV is <a href="http://tvtime.sourceforge.net">tvtime</a>. Unfortunately it has not been updated for a few years now. As is the rule for unmaintained code, the upstream version finally is no longer compatible with Linux kernel 2.6.38. The <acronym title="Video 4 Linux version 1">V4L1</acronym> API has now been removed after being deprecated for a really long time.</p>
<p>But Devin Heitmueller from <a href="http://www.kernellabs.com/">KernelLabs</a> invested some time to remove the parts from tvtime that still needed the old API. The source is available from <a href="http://www.kernellabs.com/hg/~dheitmueller/tvtime">this mercurial repo</a>.</p>
<pre>
hg clone http://www.kernellabs.com/hg/~dheitmueller/tvtime
cd tvtime
autoreconf -i -f
./configure --prefix=/usr/local --disable-nls
make
make install
</pre>
<p>There is also a <a href="http://bugs.gentoo.org/show_bug.cgi?id=359743">report in Gentoo&#8217;s Bugzilla</a> with a new ebuild attached, but I haven&#8217;t tried that. Installing the new patched tvtime to <code>/usr/local</code> works for now.</p>
<p>I am all ears if anyone can recommend an alternative to tvtime. I know about xawtv, but the interface is poor and offers less features than tvtime.</p>
]]></content:encoded>
			<wfw:commentRss>http://raim.codingfarm.de/blog/2011/04/06/tvtime-on-linux-kernel-2-6-38-without-v4l1-api/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hauppauge WinTV HVR-1300 with Linux kernel 2.6.38</title>
		<link>http://raim.codingfarm.de/blog/2011/04/06/hauppauge-wintv-hvr-1300-with-linux-kernel-2-6-38/</link>
		<comments>http://raim.codingfarm.de/blog/2011/04/06/hauppauge-wintv-hvr-1300-with-linux-kernel-2-6-38/#comments</comments>
		<pubDate>Tue, 05 Apr 2011 22:05:30 +0000</pubDate>
		<dc:creator>Rainer Müller</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[hauppauge]]></category>
		<category><![CDATA[hvr1300]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[patch]]></category>
		<category><![CDATA[v4l]]></category>

		<guid isPermaLink="false">http://raim.codingfarm.de/blog/?p=288</guid>
		<description><![CDATA[After the upgrade to Linux kernel 2.6.38, the boot process for my machine hang quite long while Populating /dev with existing devices through uevents. After investigations it turns out that the cx88 driver used for my Hauppauge WinTV HVR-1300 tv card was not correctly converted to the new mutex system while removing the BKL. This [...]]]></description>
			<content:encoded><![CDATA[<p>After the upgrade to Linux kernel 2.6.38, the boot process for my machine hang quite long while <code>Populating /dev with existing devices through uevents</code>. After investigations it turns out that the <code>cx88</code> driver used for my Hauppauge WinTV HVR-1300 tv card was not correctly converted to the new mutex system while removing the <acronym title="Big Kernel Lock">BKL</acronym>. This is being tracked in the kernel bugzilla as <a href="https://bugzilla.kernel.org/show_bug.cgi?id=31962">bug #31962</a>.</p>
<p>Fortunately, there is a patch attached to the mentioned bug report which resolves the problem:</p>
<pre>
cd /usr/src/linux
wget -O cx88-2.6.38-fix-driver-deadlocks.patch 'https://bugzilla.kernel.org/attachment.cgi?id=53722'
patch -p1 < cx88-2.6.38-fix-driver-deadlocks.patch
</pre>
<p><em>[Edited on 2011-04-23: replaced patch <a href="https://bugzilla.kernel.org/attachment.cgi?id=52902">52902</a> with <a href="https://bugzilla.kernel.org/attachment.cgi?id=53722">53722</a>]</em></p>
<p>After applying the patch, build and install your kernel as usual. But there are still some more problems with 2.6.38 related to tvtime. See also <a href="/blog/2011/04/06/tvtime-on-linux-kernel-2-6-38-without-v4l1-api/">my next post</a>.</p>
<p>I do not follow kernel development close enough to know in which git tree this has to show up to confirm if it has been merged yet. Hopefully this patch will make it into the next kernel release. </p>
]]></content:encoded>
			<wfw:commentRss>http://raim.codingfarm.de/blog/2011/04/06/hauppauge-wintv-hvr-1300-with-linux-kernel-2-6-38/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Erste Basteleien mit dem Oyo</title>
		<link>http://raim.codingfarm.de/blog/2011/03/26/erste-basteleien-mit-dem-oyo/</link>
		<comments>http://raim.codingfarm.de/blog/2011/03/26/erste-basteleien-mit-dem-oyo/#comments</comments>
		<pubDate>Sat, 26 Mar 2011 02:22:37 +0000</pubDate>
		<dc:creator>Rainer Müller</dc:creator>
				<category><![CDATA[Embedded]]></category>
		<category><![CDATA[German]]></category>
		<category><![CDATA[Hacking]]></category>
		<category><![CDATA[ebook]]></category>
		<category><![CDATA[ebook reader]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[oyo]]></category>

		<guid isPermaLink="false">http://raim.codingfarm.de/blog/?p=274</guid>
		<description><![CDATA[Bereits seit Weihnachten besitze ich nun einen Oyo. Dabei handelt es sich um einen E-Book-Reader, der in Deutschland von Medion produziert und von Thalia vertrieben wird und international gibt es dieselbe Plattform von Qisda auch unter anderen Namen. Das Gerät ist ARMv5-basiert und es läuft bereits ein Linux-System darauf. Die mitgelieferte Oberfläche zum Betrachten von [...]]]></description>
			<content:encoded><![CDATA[<p>Bereits seit Weihnachten besitze ich nun einen <a href="http://www.thalia.de/shop/oyo/show/">Oyo</a>. Dabei handelt es sich um einen E-Book-Reader, der in Deutschland von Medion produziert und von Thalia vertrieben wird und international gibt es dieselbe Plattform von Qisda auch <a href="http://openinkpot.org/wiki/Device/Qisda-eBook">unter anderen Namen</a>. Das Gerät ist ARMv5-basiert und es läuft bereits ein Linux-System darauf. Die mitgelieferte Oberfläche zum Betrachten von Büchern, Browser, Audio-Player usw. ist mit Qt/Embedded implementiert.</p>
<p>Es sollte daher ja möglich sein, auch andere Verwendungsmöglichkeiten für den Oyo zu erschließen (z.B. als Organizer mit Kalenderfunktion, als Fernbedienung mit einem mpd-Client, usw.).</p>
<p><span id="more-274"></span></p>
<p>Nachdem nun der übliche anfängliche Respekt vor dem neuen Gerät verflogen ist, wollte ich mich auch mal ein bisschen intensiver mit dem Oyo beschäftigen. Es gibt bereits eine umfangreiche Sammlung von Informationen in <a href="http://www.fwma.de/pmwiki/pmwiki.php?n=Main.OYO">Frank&#8217;s Wiki</a>. Damit ist es mir auch schnell gelungen mittels <em>usbserial</em> und <em>minicom</em> eine Shell auf dem Gerät zu bekommen. Darüber lässt sich dann wiederum <em>telnet</em> aktivieren, was die ganze Sache ein bisschen angenehmer macht.</p>
<p>Ursprünglich läuft auf dem E-Book-Reader ein Kernel 2.6.21, der ja nun schon etwas angerostet ist. Allerdings hat Thalia immerhin ihre Pflicht gemäß GPL erfüllt und die Sourcen des Kernels und des Bootloaders <a href="http://www.denx.de/wiki/U-Boot">U-Boot</a> zur Verfügung gestellt. Heiko Stuebner (MMind) arbeitet derzeit daran, die Treiber und sonstige Änderungen in einen aktuellen Kernel zu portieren und berichtet regelmäßig in seinem Blog <a href="http://www.outsidethewalledgarden.de/categories/5-Oyo">Outside the Walled Garden</a> über die Fortschritte.</p>
<p>Da ich den Oyo nebenbei zu irgendwelchen Testinstallationen dennoch zum Lesen verwenden will, bietet sich der Boot von SD-Karte an. Als ersten Schritt hab ich mir auch erstmal eine 1:1 Kopie des internen Flash-Speichers gezogen. Leider kann man mit dem modifiziertem U-Boot allerdings nur in der Kombination eines zImage mit initrd/initramfs von der SD-Karte booten. Um also direkt ein rootfs von der SD-Karte nutzen zu können, werde ich wohl noch ein bisschen basteln müssen.</p>
]]></content:encoded>
			<wfw:commentRss>http://raim.codingfarm.de/blog/2011/03/26/erste-basteleien-mit-dem-oyo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>bash: reuse last argument from previous command</title>
		<link>http://raim.codingfarm.de/blog/2011/01/14/bash-reuse-last-argument-from-previous-command/</link>
		<comments>http://raim.codingfarm.de/blog/2011/01/14/bash-reuse-last-argument-from-previous-command/#comments</comments>
		<pubDate>Fri, 14 Jan 2011 00:35:15 +0000</pubDate>
		<dc:creator>Rainer Müller</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://raim.codingfarm.de/blog/?p=255</guid>
		<description><![CDATA[Reuse the last argument of the previous command with !$: $ echo abc def abc def $ echo !$ def A common use case would be mkdir and cd: $ mkdir foo $ cd !$ You can also insert the last argument of the previous command and continue typing with &#60;ESC&#62;.: $ echo abc def [...]]]></description>
			<content:encoded><![CDATA[<p>Reuse the last argument of the previous command with <code>!$</code>:</p>
<pre>
$ echo abc def
abc def
$ echo !$
def
</pre>
<p>A common use case would be <code>mkdir</code> and <code>cd</code>:</p>
<pre>
$ mkdir foo
$ cd !$
</pre>
<p>You can also insert the last argument of the previous command and continue typing with <code>&lt;ESC&gt;.</code>:</p>
<pre>
$ echo abc def
abc def
$ echo &lt;ESC&gt;. ghi
def ghi
</pre>
<p>Oh, the little things… <img src='http://raim.codingfarm.de/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://raim.codingfarm.de/blog/2011/01/14/bash-reuse-last-argument-from-previous-command/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>bash: for-loop with glob patterns</title>
		<link>http://raim.codingfarm.de/blog/2010/09/09/bash-for-loop-with-glob-patterns/</link>
		<comments>http://raim.codingfarm.de/blog/2010/09/09/bash-for-loop-with-glob-patterns/#comments</comments>
		<pubDate>Thu, 09 Sep 2010 14:18:16 +0000</pubDate>
		<dc:creator>Rainer Müller</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[glob]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[wildcards]]></category>

		<guid isPermaLink="false">http://raim.codingfarm.de/blog/?p=233</guid>
		<description><![CDATA[It is common to use a for-loop with glob patterns: for i in *.txt; do mv $i $i.old done But if the glob pattern does not match anything it will be preserved unchanged in the command. This results in command execution of mv *.txt *.txt.old which fails because no file named *.txt (literally!) exists. As [...]]]></description>
			<content:encoded><![CDATA[<p>It is common to use a for-loop with glob patterns:</p>
<pre>
for i in *.txt; do
    mv $i $i.old
done
</pre>
<p>But if the glob pattern does not match anything it will be preserved unchanged in the command. This results in command execution of <code>mv *.txt *.txt.old</code> which fails because no file named <code>*.txt</code> (literally!) exists.</p>
<p>As this is not the desired behavior, here is a way how to do this as expected without forking using the <code>nullglob</code> bash shell option.</p>
<pre>
oldnullglob=$(shopt -p nullglob)
shopt -s nullglob

for i in *.txt; do
    mv $i $i.old
done

eval "$oldnullglob" 2>/dev/null
unset oldnullglob
</pre>
<p>This will silently prevent the execution of the <code>mv</code> command. If you use <code>failglob</code> instead of <code>nullglob</code> bash will interrupt the evaluation of any command if the glob pattern did not match anything.</p>
<p>Disclaimer: Be careful with this option, as this will not be the expected behavior in all cases. Most (in)famously it breaks <code>bash-completion </code> if you set it in your interactive bash session. I suggest to use it temporary only.</p>
]]></content:encoded>
			<wfw:commentRss>http://raim.codingfarm.de/blog/2010/09/09/bash-for-loop-with-glob-patterns/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Checking expiry dates of SSL certificates</title>
		<link>http://raim.codingfarm.de/blog/2010/07/03/checking-expiry-dates-of-ssl-certificates/</link>
		<comments>http://raim.codingfarm.de/blog/2010/07/03/checking-expiry-dates-of-ssl-certificates/#comments</comments>
		<pubDate>Sat, 03 Jul 2010 20:31:21 +0000</pubDate>
		<dc:creator>Rainer Müller</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[certificate]]></category>
		<category><![CDATA[cronjob]]></category>
		<category><![CDATA[expiry]]></category>
		<category><![CDATA[openssl]]></category>
		<category><![CDATA[ssl]]></category>
		<category><![CDATA[x509]]></category>

		<guid isPermaLink="false">http://raim.codingfarm.de/blog/?p=220</guid>
		<description><![CDATA[Once again I missed the expiry date of one of the SSL certificates on my server. Therefore I am now using a cronjob to warn me early enough that a certificate is about to expire. This is the script /usr/local/bin/ssl-cert-check which checks the expiry date of the certificate files passed as arguments: #!/bin/bash &#160; DAYS=30 [...]]]></description>
			<content:encoded><![CDATA[<p>Once again I missed the expiry date of one of the <acronym title="Secure Sockets Layer">SSL</acronym> certificates on my server. Therefore I am now using a cronjob to warn me early enough that a certificate is about to expire.</p>
<p>This is the script <code>/usr/local/bin/ssl-cert-check</code> which checks the expiry date of the certificate files passed as arguments:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
&nbsp;
<span style="color: #007800;">DAYS</span>=<span style="color: #000000;">30</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">for</span> <span style="color: #c20cb9; font-weight: bold;">file</span> <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #ff0000;">&quot;$@&quot;</span>; <span style="color: #000000; font-weight: bold;">do</span>
    openssl x509 <span style="color: #660033;">-checkend</span> $<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span> <span style="color: #000000;">86400</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #007800;">$DAYS</span> <span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #660033;">-in</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$file</span>&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>null
    <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$?</span> <span style="color: #000000; font-weight: bold;">!</span>= <span style="color: #000000;">0</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;==&gt; Certificate <span style="color: #007800;">$file</span> is about to expire soon:&quot;</span>
        openssl x509 <span style="color: #660033;">-enddate</span> <span style="color: #660033;">-in</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$file</span>&quot;</span> <span style="color: #660033;">-noout</span>
    <span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #000000; font-weight: bold;">done</span></pre></div></div>

<p>And the corresponding cronjob entry checking <acronym title="Secure Sockets Layer">SSL</acronym> certificates once a day:</p>
<pre>
6       6    * * *  nobody  /usr/local/bin/ssl-cert-check /etc/apache2/ssl/*.crt /etc/ssl/certs/dovecot.pem
</pre>
]]></content:encoded>
			<wfw:commentRss>http://raim.codingfarm.de/blog/2010/07/03/checking-expiry-dates-of-ssl-certificates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

