<?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>BenV&#039;s notes</title>
	<atom:link href="http://notes.benv.junerules.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://notes.benv.junerules.com</link>
	<description>Rants and notes</description>
	<lastBuildDate>Tue, 09 Mar 2010 16:53:02 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>The Adobe Cancer</title>
		<link>http://notes.benv.junerules.com/all/software/the-adobe-cancer/</link>
		<comments>http://notes.benv.junerules.com/all/software/the-adobe-cancer/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 16:53:02 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Morons]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[flash]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=743</guid>
		<description><![CDATA[They&#8217;ve managed to piss me off once more.
I had to do a windows reinstall (XP of course) for some idiots that fubar-ed their machine, so after the usual install, 5 million windows updates, service packs, reboots and firefox install I figured I should probably install flash for them.
How hard can it be to install Adobe [...]]]></description>
			<content:encoded><![CDATA[<p>They&#8217;ve managed to piss me off once more.<br />
I had to do a windows reinstall (XP of course) for some idiots that fubar-ed their machine, so after the usual install, 5 million windows updates, service packs, reboots and firefox install I figured I should probably install flash for them.<br />
How hard can it be to install Adobe Flash?<span id="more-743"></span></p>
<p>Well, apparently it&#8217;s almost impossible these days.<br />
First I went to some site that needed flash, which I pretty much why I thought of it in the first place. Firefox asks &#8220;Hey man, you need a plugin for this page, want me to fix it?&#8221;.<br />
So I told it &#8220;Amuse me&#8221;. Firefox responded with &#8220;I&#8217;m sorry, I automatically failed&#8221;. Nothing new there.<br />
&#8220;Do you want to do a manual install?&#8221;. Sure thing.<br />
So it sent me to the adobe flash installation page: http://get.adobe.com/flashplayer/</p>
<p>The first big scary thing you see if the DEFAULT ENABLED Mcafee installation which most users will ignore.<br />
So when you disable that checkbox and hit the &#8220;Agree to get abused and give all your children to Adobe as slaves&#8221; button, it gives you a big &#8220;THANK YOU!&#8221; page.<br />
This gives you a nice pop-up in firefox, asking you to allow the installation of a an addon.<br />
At first I was positive &#8220;Well, that&#8217;s easier than I expected&#8221;. How wrong I was.</p>
<p>The addon it tried to install was none other than &#8220;Adobe DLM&#8221;. Short for &#8220;Adobe Destroyer of Local Machine&#8221;. I DO NOT WANT THAT PIECE OF GARBAGE, I ONLY WANT THAT FSC!@#$(#4#%$<br />
Needless to say I was very annoyed. Not only that, but on that page (including the previous) I couldn&#8217;t find a normal download link to the flash installer.<br />
Fine fine, I&#8217;ll use the cancer DLM, after which I&#8217;ll uninstall it.</p>
<p>Next problem: the DLM can&#8217;t download files!<br />
Yes, it&#8217;s hard to believe, but the only thing the DLM can get right is installing that fscking piece of rubbish from McafayeeEEEEEEE (never mind that I already have a <a href="http://www.avast.com/">decent FREE virus scanner</a>). On the flash download it fails to check the integrity of the file. Repeatedly.<br />
<div id="attachment_744" class="wp-caption alignnone" style="width: 310px"><a href="http://notes.benv.junerules.com/wp-content/uploads/2010/03/adobe-cancer.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2010/03/adobe-cancer-300x240.png" alt="How would you like to be upset today?" title="Adobe Cancer Downloader" width="300" height="240" class="size-medium wp-image-744" /></a><p class="wp-caption-text">Adobe Cancer</p></div><br />
Next the DLM asks &#8220;Do you want to try again?&#8221;. Yeah, right, as if that ever works. And indeed, retry fails in the same way.</p>
<p>For those of you in the same situation, there&#8217;s still a place to get the normal installer:<br />
As described in <a href="http://kb2.adobe.com/cps/191/tn_19166.html">this article from adobe</a>, you can download it <a href="http://fpdownload.adobe.com/get/flashplayer/current/install_flash_player.exe">HERE (other browser flash installer for windows)</a>.</p>
<p>Now please die adobe. Take your habbrokrat reader with you, and your picture crap, and flash, and all the rubbish software you create these days. What&#8217;s next, Adobe Anti-virus? Just stick to photoshop, thanks.</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/the-adobe-cancer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bye bye Ubisoft</title>
		<link>http://notes.benv.junerules.com/all/software/bye-bye-ubisoft/</link>
		<comments>http://notes.benv.junerules.com/all/software/bye-bye-ubisoft/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 22:51:26 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Morons]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[drm]]></category>
		<category><![CDATA[settlers]]></category>
		<category><![CDATA[ubisoft]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=740</guid>
		<description><![CDATA[How incredibly stupid can they possibly get&#8230; like a dumb user that keeps running virus infected &#8220;naked hot girls!!!&#8221; screensavers, they keep adding DRM.
And now we&#8217;ve reached the point where they expect you to stay connected constantly to play a single player game.
Aahahahaha. Bye bye Ubisoft, may the pirates laugh at you and dance on [...]]]></description>
			<content:encoded><![CDATA[<p>How incredibly stupid can they possibly get&#8230; like a dumb user that keeps running virus infected &#8220;naked hot girls!!!&#8221; screensavers, they keep adding DRM.<br />
And now we&#8217;ve <a href="http://www.computerandvideogames.com/article.php?id=235290&#038;site=pcg">reached the point where they expect you to stay connected constantly to play a single player game</a>.<br />
Aahahahaha. Bye bye Ubisoft, may the pirates laugh at you and dance on your grave.<br />
Alas for Settlers 7.. could have been an interesting game.</p>
<p>However, I expect them to revert their plans when <a href="http://www.rockpapershotgun.com/2010/02/17/you-maniacs/">enough badmouthing</a> hits the <a href="http://games.slashdot.org/story/10/02/18/0719256/Ubisofts-Constant-Net-Connection-DRM-Confirmed">news</a> and make them &#8220;only&#8221; half as bad as they currently are.<br />
We&#8217;ll see.</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/bye-bye-ubisoft/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Awesome</title>
		<link>http://notes.benv.junerules.com/all/software/awesome/</link>
		<comments>http://notes.benv.junerules.com/all/software/awesome/#comments</comments>
		<pubDate>Sat, 13 Feb 2010 15:27:57 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[autoconf]]></category>
		<category><![CDATA[awesome]]></category>
		<category><![CDATA[slackware]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=725</guid>
		<description><![CDATA[So every once in a while you have to mess around a bit with new stuff. Window managers for example.
I&#8217;m quite happy with Fluxbox (been using it since I started with linux), but it&#8217;s nice to see something new once in a while. Especially since development on Fluxbox is kind of &#8230;. dead. Well, not [...]]]></description>
			<content:encoded><![CDATA[<p>So every once in a while you have to mess around a bit with new stuff. Window managers for example.<br />
I&#8217;m quite happy with <a href="http://www.fluxbox.org/">Fluxbox</a> (been using it since I started with linux), but it&#8217;s nice to see something new once in a while. Especially since development on Fluxbox is kind of &#8230;. dead. Well, not completely, but there&#8217;s just not much to be added without totally changing the thing.<br />
My brother mentioned <a href="http://awesome.naquadah.org">Awesome</a> a few weeks ago, and during <a href="https://har2009.org/">HAR</a> last year it was also mentioned as something that I might like.<br />
Which means it&#8217;s time to check it out! <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> <span id="more-725"></span></p>
<h3>First stop: the installation on Slackware 64. (you may skip this if you run some flavor of Pokemon OS <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> ).</h3>
<p>As I mentioned in my previous rant, the developers of Awesome have decided that they&#8217;re complete and utter idiots. That is, they forced me through CMake, which usually fills me with anger. Fortunately they didn&#8217;t include Boost in the mix, so after some cursing it can be installed.<br />
In order to get Awesome 3.4.3 installed, I needed to:</p>
<ul>
<li>Upgrade my <span style="color:#FFFF00">xcb-proto</span> to version 1.6 ** (<a href="http://xcb.freedesktop.org/dist/xcb-proto-1.6.tar.gz">source</a>)</li>
<li>Upgrade my <span style="color:#FFFF00">libxcb</span> to version 1.5 ** (<a href="http://xcb.freedesktop.org/dist/libxcb-1.5.tar.bz2">source</a>)</li>
<li>Upgrade my <span style="color:#FFFF00">xcb-util</span> to version 0.3.6 ** (<a href="http://xcb.freedesktop.org/dist/xcb-util-0.3.6.tar.bz2">source</a>)</li>
<li>Install <span style="color:#FFFF00">libstartup-notification</span> version 0.10 or higher ** (<a href="http://www.freedesktop.org/software/startup-notification/releases/startup-notification-0.10.tar.gz">source</a>)</li>
<li>Install <span style="color:#FFFF00">libxdg-basedir</span> version 1.0.2 or higher ** (<a href="http://n.ethz.ch/~nevillm/download/libxdg-basedir/libxdg-basedir-latest.tar.gz">source</a>)</li>
<li>Install <span style="color:#FFFF00">libev</span> ** (<a href="http://dist.schmorp.de/libev/libev-3.9.tar.gz">source</a>)</li>
<li>** indicates that the whole &#8216;wget, tar, configure, make, makepkg&#8217; riddle works fine with my slackbuild.pl script</li>
</ul>
<p>That was pretty easy with slackbuild.pl. Note that you might have to recompile cairo to enable xcb support (it&#8217;s a configure flag that used to be disabled on Slackware). Mine didn&#8217;t need it though.<br />
Next is building Awesome. If you don&#8217;t want Awesome scattered all over /usr/local/share you might want to give CMake some hints. See my previous rant about setting this permanently.<br />
Today I used this:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>awesome-3.4.2$ <span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">CMAKE_ARGS</span>=<span style="color: #ff0000;">&quot;-DCMAKE_INSTALL_PREFIX=/usr -DPREFIX=/usr -DAWESOME_DOC_PATH=/usr/share/doc/awesome -DAWESOME_MAN_PATH=/usr/share/man -DAWESOME_XSESSION_PATH=/usr/share/xsessions -DSYSCONFDIR=/etc -DXDG_CONFIG_HOME=/etc/xdg&quot;</span></div></div>
<p>After that, &#8216;make&#8217; should compile it properly, and you can use slackbuild.pl to make a package out of it. (or make DESTDIR=bla, makepkg yadieyada).</p>
<h3>Second stop: Testing Awesome</h3>
<p>I still like to type startx every time I booted my machine, so for me the thing to change was the file <span style="color:#FF00FF">~/.xinitrc</span>.<br />
Something like:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;"># No more fluxbox for now, we want to try Awesome!</span><br />
<span style="color: #666666; font-style: italic;"># exec /usr/bin/startfluxbox</span><br />
<span style="color: #7a0874; font-weight: bold;">exec</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>awesome</div></div>
<p>Kill your X and startx, and voila! The first error.<br />
<div id="attachment_734" class="wp-caption alignnone" style="width: 310px"><a href="http://notes.benv.junerules.com/wp-content/uploads/2010/02/awesome-setbg-segfault.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2010/02/awesome-setbg-segfault-300x27.png" alt="Awesome&#039;s first error!" title="Awesome&#039;s first error!" width="300" height="27" class="size-medium wp-image-734" /></a><p class="wp-caption-text">Awesome's first error!</p></div><br />
Well, that&#8217;s off to a good start. Apparently the wmsetbg program segfaulted on that image. Don&#8217;t ask me why, it works fine on another PNG. Probably some transparency or layer issue, dunno. Not important for now.</p>
<p>First impression: looks clean.<br />
A tiny menu bar / panel / whatever you want to call it that shows the running programs and the date.<br />
The default shortcut to do everything seems to be the windows button, or mod4. I&#8217;m not sure if I like this, since alt was already cramping my thumb every now and then <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
However, this can be changed, so no big deal. mod4-enter starts a console. Good. It&#8217;s fast too!<br />
Hitting mod4-enter a few times looks like this:<br />
<div id="attachment_736" class="wp-caption alignnone" style="width: 310px"><a href="http://notes.benv.junerules.com/wp-content/uploads/2010/02/57.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2010/02/57-300x187.png" alt="Awesome after hitting mod4-enter a bunch of times" title="Awesome after hitting mod4-enter a bunch of times" width="300" height="187" class="size-medium wp-image-736" /></a><p class="wp-caption-text">Awesome after hitting mod4-enter a bunch of times</p></div><br />
As you might be able to see if you try, the terminal windows are all tiled next to each other. Resizing with mod4 and right mouse also works. Or mod4-f for fullscreen&#8230; or mod4-m for maximize. Yup, I like it so far.</p>
<p>Needless to say there are tons of things to try out and customize, but you might want to check out <a href="http://awesome.naquadah.org/wiki/My_first_awesome">this guide</a> for starting out with awesome. I did <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Maybe it will even replace Fluxbox&#8230;. we&#8217;ll see. Time to mess around with it some more.<br />
Keep up the good work Awesome developers&#8230;. and switch to autoconf!</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/awesome/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CMake issues</title>
		<link>http://notes.benv.junerules.com/all/software/cmake-issues/</link>
		<comments>http://notes.benv.junerules.com/all/software/cmake-issues/#comments</comments>
		<pubDate>Sat, 13 Feb 2010 14:28:36 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Morons]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[autoconf]]></category>
		<category><![CDATA[cmake]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=721</guid>
		<description><![CDATA[I can&#8217;t for the life of me begin to imagine why anyone would use cmake as an autoconf alternative. Actually, that&#8217;s a lie.
I suppose when you&#8217;re too dumb to write an autoconf file (never heard of autoscan, etc), or perhaps when your system doesn&#8217;t support autoconf you might look at those alternatives.
Personally I rather see [...]]]></description>
			<content:encoded><![CDATA[<p>I can&#8217;t for the life of me begin to imagine why anyone would use cmake as an autoconf alternative.<span id="more-721"></span> Actually, that&#8217;s a lie.<br />
I suppose when you&#8217;re too dumb to write an autoconf file (never heard of autoscan, etc), or perhaps when your system doesn&#8217;t support autoconf you might look at those alternatives.<br />
Personally I rather see a dir with only a Makefile in that case, because those are easier to fix than cmake.<br />
However, if you DO run into a CMake fuckup, you can put this in your environment to give it a prefix etc.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">CMAKE_ARGS</span>=<span style="color: #ff0000;">&quot;-DCMAKE_INSTALL_PREFIX=/usr -DPREFIX=/usr -DSYSCONFDIR=/etc&quot;</span></div></div>
<p>(put it in a file in /etc/profile.d to have it loaded all the time).<br />
Unfortunately this won&#8217;t save you from all CMake builds. For instance I just tried to build <a href="http://awesome.naquadah.org">Awesome</a> (messing around with a new window manager can be fun sometimes) but when I saw that they use CMake I almost aborted instantly. To make the installation use proper paths you would have to add this to the CMAKE_ARGS for instance:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">CMAKE_ARGS</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">$CMAKE_ARGS</span> -DAWESOME_DOC_PATH=/usr/share/doc/awesome -DAWESOME_MAN_PATH=/usr/share/man -DAWESOME_XSESSION_PATH=/usr/share/xsessions &nbsp; -DXDG_CONFIG_HOME=/etc/xdg&quot;</span></div></div>
<p>Ridiculous.</p>
<p>Anyhow, if I still feel like messing around it once it finally compiles I might talk about it later.</p>
<p>Did you know that <a href="http://www.itk.org/Wiki/CMake_FAQ#Can_I_do_.22make_uninstall.22_with_CMake.3F">CMake also fails to create an uninstall target</a>&#8230;. gah.<br />
Because oh dear, <em><span style="color:#FF00FF">it might remove useful files from the system</span></em>. NO SHIT SHERLOCK, WHY DO YOU THINK I WOULD WANT TO RUN AN UNINSTALL?!?!?!<br />
Fortunately it does support DESTDIR, so we can handle the uninstall through our package managers. Phew.</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/cmake-issues/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Gears 64 bits for Firefox 3.6 (64 bits) on Slackware 64</title>
		<link>http://notes.benv.junerules.com/all/software/google-gears-64-bits-for-firefox-3-6-64-bits-on-slackware-64/</link>
		<comments>http://notes.benv.junerules.com/all/software/google-gears-64-bits-for-firefox-3-6-64-bits-on-slackware-64/#comments</comments>
		<pubDate>Thu, 28 Jan 2010 14:32:42 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[gears]]></category>
		<category><![CDATA[slackware]]></category>
		<category><![CDATA[x86_64]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=718</guid>
		<description><![CDATA[Yesterday Slackware64-current gave me Firefox 3.6. So far I&#8217;m happy to note that this broke more than half my addons, but that&#8217;s to be expected with that addon-hell.
Wonder when they clean up that act and start including required stuff like firebug. Anyway, a while ago I built google gears for firefox 3.5. Since Google is [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday Slackware64-current gave me Firefox 3.6. So far I&#8217;m happy to note that this broke more than half my addons, but that&#8217;s to be expected with that addon-hell.<br />
Wonder when they clean up that act and start including required stuff like firebug. Anyway, a while ago I built <a href="http://notes.benv.junerules.com/all/software/google-gears-on-slackware-64-and-firefox/">google gears for firefox 3.5</a>. Since Google is too incompetent to provide a 64 bit linux version, you have to do it yourself, which I did. However, with the Firefox 3.6 upgrade this addon also broke. <span id="more-718"></span></p>
<p>Last time I explained in detail the steps needed to build it on slackware 64. So I&#8217;ll only summarize and tell you about the new problems I ran into.<br />
First, install libnotify. The new xpcom stuff seems to require it.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #666666; font-style: italic;"># slackbuild.pl http://galago-project.org/files/releases/source/libnotify/libnotify-0.4.5.tar.bz2</span><br />
&nbsp;<span style="color: #000000; font-weight: bold;">&lt;</span>smash enter a few <span style="color: #7a0874; font-weight: bold;">times</span><span style="color: #000000; font-weight: bold;">&gt;</span>:q<span style="color: #000000; font-weight: bold;">&lt;</span><span style="color: #c20cb9; font-weight: bold;">more</span> enters<span style="color: #000000; font-weight: bold;">&gt;</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #666666; font-style: italic;"># installpkg /usr/src/packages/libnotify-0.4.5-x86_64-1.tgz</span></div></div>
<p>How I love my <a href="http://notes.benv.junerules.com/slackbuild-pl/">slackbuild</a> sometimes <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Next, get the FF3.6 source and build the xpcom stuff:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src ; <span style="color: #c20cb9; font-weight: bold;">wget</span> <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>ftp.mozilla.org<span style="color: #000000; font-weight: bold;">/</span>pub<span style="color: #000000; font-weight: bold;">/</span>mozilla.org<span style="color: #000000; font-weight: bold;">/</span>firefox<span style="color: #000000; font-weight: bold;">/</span>releases<span style="color: #000000; font-weight: bold;">/</span>latest<span style="color: #000000; font-weight: bold;">/</span>source<span style="color: #000000; font-weight: bold;">/</span>firefox-3.6.source.tar.bz2 ; <span style="color: #c20cb9; font-weight: bold;">tar</span> jxvf firefox-3.6.source.tar.bz2<br />
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>mozilla-1.9.2 &nbsp;<span style="color: #666666; font-style: italic;"># dir name differs from tarball, idiots.</span><br />
.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--enable-application</span>=xpcom<br />
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #660033;">-C</span> config<br />
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #660033;">-C</span> nsprpub<br />
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #660033;">-C</span> xpcom<br />
<span style="color: #c20cb9; font-weight: bold;">make</span> tools_tier_xpcom <span style="color: #c20cb9; font-weight: bold;">install</span></div></div>
<p>Finally, symlink the newly built xpcom tools over the google provided ones and build gears. I assume you can check out the google gears sources yourself, otherwise see my previous rant on this.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>google-gears-svn<span style="color: #000000; font-weight: bold;">/</span>gears<br />
<span style="color: #c20cb9; font-weight: bold;">svn</span> up<br />
<span style="color: #c20cb9; font-weight: bold;">make</span> clean<br />
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>google-gears-svn<span style="color: #000000; font-weight: bold;">/</span>gears<br />
<span style="color: #000000; font-weight: bold;">for</span> k <span style="color: #000000; font-weight: bold;">in</span> xpidl xpt_link xpt_dump regxpcom<br />
<span style="color: #000000; font-weight: bold;">do</span><br />
&nbsp; <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>google-gears-svn<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gecko_1.9.2<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>gecko_sdk<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$k</span><br />
&nbsp; <span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>mozilla-1.9.2<span style="color: #000000; font-weight: bold;">/</span>dist<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$k</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>google-gears-svn<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gecko_1.9.2<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>gecko_sdk<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$k</span><br />
<span style="color: #000000; font-weight: bold;">done</span><br />
<span style="color: #000000; font-weight: bold;">for</span> k <span style="color: #000000; font-weight: bold;">in</span> libxpcom.so libnspr4.so libxpcomglue_s.a<br />
<span style="color: #000000; font-weight: bold;">do</span><br />
&nbsp; <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>google-gears-svn<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gecko_1.9.2<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>gecko_sdk<span style="color: #000000; font-weight: bold;">/</span>lib64 2<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<br />
&nbsp; <span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>mozilla-1.9.2<span style="color: #000000; font-weight: bold;">/</span>dist<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$k</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>google-gears-svn<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gecko_1.9.2<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>gecko_sdk<span style="color: #000000; font-weight: bold;">/</span>lib64<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$k</span><br />
<span style="color: #000000; font-weight: bold;">done</span><br />
<span style="color: #666666; font-style: italic;"># Xul is also needed</span><br />
<span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib64<span style="color: #000000; font-weight: bold;">/</span>firefox-3.6<span style="color: #000000; font-weight: bold;">/</span>libxul.so <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>google-gears-svn<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gecko_1.9.2<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>gecko_sdk<span style="color: #000000; font-weight: bold;">/</span>lib64<br />
<span style="color: #007800;">CPPFLAGS</span>=<span style="color: #ff0000;">&quot;-include /usr/include/stdio.h -include /usr/include/stdlib.h -include /usr/include/string.h -include /usr/include/limits.h -include /usr/include/pthread.h -D_XOPEN_SOURCE=600&quot;</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #007800;">MODE</span>=opt <span style="color: #007800;">BROWSER</span>=FF36</div></div>
<p>If you&#8217;re wondering about the CPPFLAGS, if you skip this the thing will break down completely. THAT&#8217;s why intelligent people use a configure script for that shit. Too difficult for google I suppose.</p>
<p>Anyhow, now we still want a nice .xpi installer.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #007800;">CPPFLAGS</span>=<span style="color: #ff0000;">&quot;-include /usr/include/stdio.h -include /usr/include/stdlib.h -include /usr/include/string.h -include /usr/include/limits.h -include /usr/include/pthread.h -D_XOPEN_SOURCE=600&quot;</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #007800;">MODE</span>=opt <span style="color: #007800;">BROWSER</span>=FF36 installers</div></div>
<p>Which barfs because some slut thought it also needed ff3(1) junk. Which I don&#8217;t agree with. So note that this breaks the .xpi for firefox ancient edition.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #660033;">-p</span> &nbsp;bin-opt<span style="color: #000000; font-weight: bold;">/</span>linux-x86_64<span style="color: #000000; font-weight: bold;">/</span>ff31<span style="color: #000000; font-weight: bold;">/</span> bin-opt<span style="color: #000000; font-weight: bold;">/</span>linux-x86_64<span style="color: #000000; font-weight: bold;">/</span>ff3<br />
<span style="color: #c20cb9; font-weight: bold;">cp</span> bin-opt<span style="color: #000000; font-weight: bold;">/</span>linux-x86_64<span style="color: #000000; font-weight: bold;">/</span>ff36<span style="color: #000000; font-weight: bold;">/</span>libgears.so bin-opt<span style="color: #000000; font-weight: bold;">/</span>linux-x86_64<span style="color: #000000; font-weight: bold;">/</span>ff31<span style="color: #000000; font-weight: bold;">/</span>libgears.so<br />
<span style="color: #c20cb9; font-weight: bold;">cp</span> bin-opt<span style="color: #000000; font-weight: bold;">/</span>linux-x86_64<span style="color: #000000; font-weight: bold;">/</span>ff36<span style="color: #000000; font-weight: bold;">/</span>libgears.so bin-opt<span style="color: #000000; font-weight: bold;">/</span>linux-x86_64<span style="color: #000000; font-weight: bold;">/</span>ff3<span style="color: #000000; font-weight: bold;">/</span>libgears.so<br />
<span style="color: #007800;">CPPFLAGS</span>=<span style="color: #ff0000;">&quot;-include /usr/include/stdio.h -include /usr/include/stdlib.h -include /usr/include/string.h -include /usr/include/limits.h -include /usr/include/pthread.h -D_XOPEN_SOURCE=600&quot;</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #007800;">MODE</span>=opt <span style="color: #007800;">BROWSER</span>=FF36 installers</div></div>
<p>Tada. Installer at <span style="color:#FF00FF">bin-opt/installers/gears-linux-x86_64-opt-0.5.34.0.xpi</span>.</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/google-gears-64-bits-for-firefox-3-6-64-bits-on-slackware-64/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Teamspeak 3 / epoll issue fixed</title>
		<link>http://notes.benv.junerules.com/all/software/teamspeak-3-epoll-issue-fixed/</link>
		<comments>http://notes.benv.junerules.com/all/software/teamspeak-3-epoll-issue-fixed/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 15:12:05 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[boost]]></category>
		<category><![CDATA[glibc]]></category>
		<category><![CDATA[slackware]]></category>
		<category><![CDATA[teamspeak]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=712</guid>
		<description><![CDATA[After a few days of waiting on a reply on the forums I got tired of waiting. So my possible solutions: Either switch to a newer glibc (which probably comes down to upgrading to slackware 13, not in the mood for that) or move the teamspeak server to a new domU. Since it couldn&#8217;t possible [...]]]></description>
			<content:encoded><![CDATA[<p>After a few days of waiting on a reply on the forums I got tired of waiting. So my possible solutions: Either switch to a newer glibc (which probably comes down to upgrading to slackware 13, not in the mood for that) or move the teamspeak server to a new domU. Since it couldn&#8217;t possible *cough* be kernel related, I figured the problem had to be in glibc somewhere.<span id="more-712"></span><br />
To remind you guys of the problem, check out this post: <a href="http://notes.benv.junerules.com/all/software/teamspeak-3/">Teamspeak 3</a>.<br />
Or summarized: starting Teamspeak 3 server beta 16 on Slackware 11 (32 bit) fails with:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">2010-01-22 15:16:<span style="color: #000000;">12.282194</span><span style="color: #000000; font-weight: bold;">|</span>WARNING <span style="color: #000000; font-weight: bold;">|</span>VirtualServer <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">|</span> <span style="color: #660033;">--------------------------------------------------------</span><br />
terminate called after throwing an instance of <span style="color: #ff0000;">'boost::exception_detail::clone_impl&lt;boost::except ion_detail::error_info_injector&lt;boost::system::sys tem_error&gt; &gt;'</span><br />
what<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>: epoll: Function not implemented<br />
Aborted</div></div>
<p>So I wondered how to figure out the problem. Digging around in libc gave some insight:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ <span style="color: #c20cb9; font-weight: bold;">strings</span> <span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>libc.so.6 <span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-i</span> epoll <br />
epoll_wait<br />
epoll_ctl<br />
epoll_create<br />
warning: epoll_create is not implemented and will always fail<br />
warning: epoll_ctl is not implemented and will always fail<br />
warning: epoll_wait is not implemented and will always fail</div></div>
<p>Say what? Will always fail? That explains&#8230;. but why?!<br />
Apparently there is another libc library that normally gets used that DOES have the proper epoll support, it is in /lib/tls . Weren&#8217;t it that the tls dir was renamed because Xen complained about it, so it doesn&#8217;t get used.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ &nbsp;<span style="color: #c20cb9; font-weight: bold;">strings</span> <span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>tls.disabled<span style="color: #000000; font-weight: bold;">/</span>libc.so.6 <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> epol <br />
epoll_wait<br />
epoll_ctl<br />
epoll_create<br />
__GI_epoll_ctl<br />
__GI_epoll_wait<br />
__GI_epoll_create<br />
epoll_wait<br />
epoll_ctl<br />
epoll_create</div></div>
<p>No warnings. However, a quick workaround to test this conclusion with LD_PRELOAD:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>teamspeak<span style="color: #000000; font-weight: bold;">/</span>teamspeak_server-b16<span style="color: #666666; font-style: italic;"># LD_PRELOAD=&quot;/lib/tls.disabled/libc.so.6 &nbsp;/lib/tls.disabled/libpthread-2.3.6.so&quot; setuidgid teamspeak ./ts3server_linux_x86</span><br />
TeamSpeak Server 3.0.0-beta16 <span style="color: #7a0874; font-weight: bold;">&#91;</span>Build: 9929<span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>c<span style="color: #7a0874; font-weight: bold;">&#41;</span>TeamSpeak Systems GmbH<br />
<br />
Logging started<br />
2010-01-25 09:34:<span style="color: #000000;">17.448370</span><span style="color: #000000; font-weight: bold;">|</span>INFO &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">|</span>ServerLibPriv <span style="color: #000000; font-weight: bold;">|</span> &nbsp; <span style="color: #000000; font-weight: bold;">|</span> Server Version: 3.0.0-beta16 <span style="color: #7a0874; font-weight: bold;">&#91;</span>Build: 9929<span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
2010-01-25 09:34:<span style="color: #000000;">17.448993</span><span style="color: #000000; font-weight: bold;">|</span>INFO &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">|</span>DatabaseQuery <span style="color: #000000; font-weight: bold;">|</span> &nbsp; <span style="color: #000000; font-weight: bold;">|</span> dbPlugin name: &nbsp; &nbsp;SQLite3 plugin, <span style="color: #7a0874; font-weight: bold;">&#40;</span>c<span style="color: #7a0874; font-weight: bold;">&#41;</span>TeamSpeak Systems GmbH<br />
2010-01-25 09:34:<span style="color: #000000;">17.449415</span><span style="color: #000000; font-weight: bold;">|</span>INFO &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">|</span>DatabaseQuery <span style="color: #000000; font-weight: bold;">|</span> &nbsp; <span style="color: #000000; font-weight: bold;">|</span> dbPlugin version: 3.6.21<br />
2010-01-25 09:34:<span style="color: #000000;">17.449913</span><span style="color: #000000; font-weight: bold;">|</span>INFO &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">|</span>DatabaseQuery <span style="color: #000000; font-weight: bold;">|</span> &nbsp; <span style="color: #000000; font-weight: bold;">|</span> checking database integrity<br />
2010-01-25 09:34:<span style="color: #000000;">17.605166</span><span style="color: #000000; font-weight: bold;">|</span>INFO &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">|</span>Accounting &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">|</span> &nbsp; <span style="color: #000000; font-weight: bold;">|</span> Licensing Information<br />
2010-01-25 09:34:<span style="color: #000000;">17.606004</span><span style="color: #000000; font-weight: bold;">|</span>INFO &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">|</span>Accounting &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">|</span> &nbsp; <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #7a0874; font-weight: bold;">type</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: Non-profit<br />
2010-01-25 09:34:<span style="color: #000000;">17.606884</span><span style="color: #000000; font-weight: bold;">|</span>INFO &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">|</span>Accounting &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">|</span> &nbsp; <span style="color: #000000; font-weight: bold;">|</span> starting <span style="color: #c20cb9; font-weight: bold;">date</span> &nbsp; &nbsp; : Mon Jan 11 00:00:00 2010<br />
2010-01-25 09:34:<span style="color: #000000;">17.607657</span><span style="color: #000000; font-weight: bold;">|</span>INFO &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">|</span>Accounting &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">|</span> &nbsp; <span style="color: #000000; font-weight: bold;">|</span> ending <span style="color: #c20cb9; font-weight: bold;">date</span> &nbsp; &nbsp; &nbsp; : Tue Jan 11 00:00:00 2011<br />
2010-01-25 09:34:<span style="color: #000000;">17.608393</span><span style="color: #000000; font-weight: bold;">|</span>INFO &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">|</span>Accounting &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">|</span> &nbsp; <span style="color: #000000; font-weight: bold;">|</span> max virtualservers: 10<br />
2010-01-25 09:34:<span style="color: #000000;">17.608856</span><span style="color: #000000; font-weight: bold;">|</span>INFO &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">|</span>Accounting &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">|</span> &nbsp; <span style="color: #000000; font-weight: bold;">|</span> max slots &nbsp; &nbsp; &nbsp; &nbsp; : 512<br />
2010-01-25 09:34:<span style="color: #000000;">17.639110</span><span style="color: #000000; font-weight: bold;">|</span>ERROR &nbsp; <span style="color: #000000; font-weight: bold;">|</span>FileManager &nbsp; <span style="color: #000000; font-weight: bold;">|</span> &nbsp; <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #7a0874; font-weight: bold;">bind</span><span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> failed: 98<br />
2010-01-25 09:34:<span style="color: #000000;">17.639691</span><span style="color: #000000; font-weight: bold;">|</span>ERROR &nbsp; <span style="color: #000000; font-weight: bold;">|</span>FileManager &nbsp; <span style="color: #000000; font-weight: bold;">|</span> &nbsp; <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #7a0874; font-weight: bold;">bind</span> failed on 0.0.0.0:30033<br />
2010-01-25 09:34:<span style="color: #000000;">17.690035</span><span style="color: #000000; font-weight: bold;">|</span>ERROR &nbsp; <span style="color: #000000; font-weight: bold;">|</span>VirtualServer <span style="color: #000000; font-weight: bold;">|</span> &nbsp;<span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">|</span> <span style="color: #7a0874; font-weight: bold;">bind</span> failed on 0.0.0.0:9987<br />
2010-01-25 09:34:<span style="color: #000000;">17.690658</span><span style="color: #000000; font-weight: bold;">|</span>ERROR &nbsp; <span style="color: #000000; font-weight: bold;">|</span>VirtualSvrMgr <span style="color: #000000; font-weight: bold;">|</span> &nbsp; <span style="color: #000000; font-weight: bold;">|</span> loading VirtualServer<span style="color: #7a0874; font-weight: bold;">&#40;</span>1<span style="color: #7a0874; font-weight: bold;">&#41;</span> failed to start, error: unable to <span style="color: #7a0874; font-weight: bold;">bind</span> network port<br />
2010-01-25 09:34:<span style="color: #000000;">17.764504</span><span style="color: #000000; font-weight: bold;">|</span>INFO &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">|</span>VirtualServer <span style="color: #000000; font-weight: bold;">|</span> &nbsp;<span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">|</span> stopped<br />
2010-01-25 09:34:<span style="color: #000000;">17.765957</span><span style="color: #000000; font-weight: bold;">|</span>ERROR &nbsp; <span style="color: #000000; font-weight: bold;">|</span>Query &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span> &nbsp; <span style="color: #000000; font-weight: bold;">|</span> 0.0.0.0:10011 unable to <span style="color: #7a0874; font-weight: bold;">bind</span> error: 98:Address already <span style="color: #000000; font-weight: bold;">in</span> use<br />
2010-01-25 09:34:<span style="color: #000000;">17.766585</span><span style="color: #000000; font-weight: bold;">|</span>ERROR &nbsp; <span style="color: #000000; font-weight: bold;">|</span>Query &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span> &nbsp; <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #7a0874; font-weight: bold;">bind</span> failed on 0.0.0.0:10011<br />
2010-01-25 09:34:<span style="color: #000000;">17.864334</span><span style="color: #000000; font-weight: bold;">|</span>INFO &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">|</span>Query &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span> &nbsp; <span style="color: #000000; font-weight: bold;">|</span> whitelist ips: 127.0.0.1,</div></div>
<p>Ha, that&#8217;s more like it. Yeah, it fails to start because I still have the beta 12 running in another dir, but it doesn&#8217;t give the error anymore.</p>
<p>Googling a bit to find some details on Slackware 11 and glibc gave me a discussion somewhere on a mailinglist that mentioned that the glibc in /lib was compiled against<br />
2.4 headers, while the /lib/tls version was compiled against 2.6 headers. That explains!<br />
In other words, time to recompile glibc against the proper headers.<br />
However, that task is a bit too cumbersome to post here. Long story short: it took me half the day to meddle with the glibc.Slackbuild script (and get the right kernel headers installed, etc) and I finally have a new glibc which works.</p>
<p>So, if you&#8217;re looking for a quick fix: use the LD_PRELOAD trick. For the more daring amongst you: upgrade your glibc &#8212; but beware that this is a DANGEROUS thing to do since it will break many things. Of course you could also upgrade to Slackware 13 and be done with it <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/teamspeak-3-epoll-issue-fixed/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Teamspeak 3</title>
		<link>http://notes.benv.junerules.com/all/software/teamspeak-3/</link>
		<comments>http://notes.benv.junerules.com/all/software/teamspeak-3/#comments</comments>
		<pubDate>Fri, 22 Jan 2010 16:09:51 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[boost]]></category>
		<category><![CDATA[slackware]]></category>
		<category><![CDATA[teamspeak]]></category>
		<category><![CDATA[ventrilo]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=705</guid>
		<description><![CDATA[A week or two ago I installed the latest teamspeak 3 beta on our server to check out how well it works these days.
I was impressed by how far they have come. Back when I still played WoW we always used Ventrilo version 2. We never ugpraded to the new 3 version (even though thats [...]]]></description>
			<content:encoded><![CDATA[<p>A week or two ago I installed the latest teamspeak 3 beta on our server to check out how well it works these days.<br />
I was impressed by how far they have come. Back when I still played WoW we always used Ventrilo version 2. We never ugpraded to the new 3 version (even though thats illegal according to them&#8230;.) because version 3 had a 10 slot limitation on the free server version. Of course they don&#8217;t tell you how much a license for version 3 costs, unless you want to host more than 1000 slots. Paying for Ventrilo would be fine, but paying for 1000 slots? Ha. And yeah, there are hosts that specialize in that (and make you pay through the nose for it), but we wanted to host it ourselves.</p>
<p>Anyway, Teamspeak 3 has a much better view of the world. They offer a -free- personal (that means non commercial!) non-profit license. This means if you&#8217;re a guild you can obtain a license<br />
from them for free <a href="http://npl.tritoncia.com/ts3npl.php">over here</a> which allows you to host your own Teamspeak 3 server with 10 virtual servers and 512 slots. That&#8217;s more like it!<br />
And if you ARE commercial, their licenses are well defined and very affordable. For instance a 1 year license for 25 slots is only $25. Compare that to Ventrilo 2 providers that ask you E10,- per month. Ha.<br />
Oh, did I mention that they DO have a linux client? And windows and mac of course&#8230;. including the 64 bit versions. Lovely <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
<a href="http://notes.benv.junerules.com/wp-content/uploads/2010/01/ts3-beta-linux-client.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2010/01/ts3-beta-linux-client-300x290.png" alt="" title="ts3-beta-linux-client" width="300" height="290" class="alignnone size-medium wp-image-706" /></a></p>
<p>However, as it&#8217;s still in beta I run into some problems every now and then. Today I was asked to upgade the b12 server to the latest. So I tried.<br />
Result:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">2010-01-22 15:16:<span style="color: #000000;">11.447045</span><span style="color: #000000; font-weight: bold;">|</span>INFO &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">|</span>ServerLibPriv <span style="color: #000000; font-weight: bold;">|</span> &nbsp; <span style="color: #000000; font-weight: bold;">|</span> Server Version: 3.0.0-beta16 <span style="color: #7a0874; font-weight: bold;">&#91;</span>Build: <span style="color: #000000;">9929</span><span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
&nbsp;<span style="color: #7a0874; font-weight: bold;">&#91;</span> blabla <span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
terminate called after throwing an instance of <span style="color: #ff0000;">'boost::exception_detail::clone_impl&lt;boost::exception_detail::error_info_injector&lt;boost::system::system_error&gt; &gt;'</span><br />
&nbsp; what<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>: &nbsp;epoll: Function not implemented<br />
Aborted</div></div>
<p>&#8230;. welcome back my friend&#8230;. <span style="color:#FF0000"><strong>BOOST</strong></span> &#8230;. always the fucking same with that piece of rubbish.<br />
However, to be fair this could very well be a &#8220;learn to code&#8221; problem by teamspeak, but still&#8230; it&#8217;s always boost the brings the curses.<br />
So what is it complaining now? I don&#8217;t have epoll? Seriously? Let&#8217;s see about that.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;"># uname -a</span><br />
Linux blue 2.6.32.2-xenU <span style="color: #666666; font-style: italic;">#1 SMP Thu Dec 24 15:55:52 CET 2009 i686 athlon-4 i386 GNU/Linux</span><br />
<span style="color: #666666; font-style: italic;"># zcat /proc/config.gz &nbsp;| grep -i epol</span><br />
<span style="color: #007800;">CONFIG_EPOLL</span>=y</div></div>
<p>So that&#8217;s not it.<br />
The forum has <a href="http://forum.teamspeak.com/showthread.php?t=50088">this thread</a> suggesting it might be glibc that&#8217;s too old.<br />
However, this particular slackware 11 server has glibc version 2.3.6, which should be old enough (according to that forum thread at least). Just in case it&#8217;s not I&#8217;ll try upgrading that later.<br />
In the meanwhile <a href="http://forum.teamspeak.com/showthread.php?t=50376">I created a thread on this problem on the forums</a>, let&#8217;s see what they suggest. I&#8217;ll put updates here.</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/teamspeak-3/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>MySQL fun</title>
		<link>http://notes.benv.junerules.com/all/software/mysql-fun/</link>
		<comments>http://notes.benv.junerules.com/all/software/mysql-fun/#comments</comments>
		<pubDate>Fri, 15 Jan 2010 16:04:04 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[dteq]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=697</guid>
		<description><![CDATA[Today I was scripting up some commandline tools and found myself in need of doing some MySQL commands on the commandline.
Or to be more specific: I wanted to create a database and grant some permissions. So I figured &#8220;Admin stuff&#8230; let&#8217;s try mysqladmin&#8220;.
After all, mysqladmin is a &#8220;Client for Administering a MySQL Server&#8220;.
Well, let me [...]]]></description>
			<content:encoded><![CDATA[<p>Today I was scripting up some commandline tools and found myself in need of doing some MySQL commands on the commandline.<br />
Or to be more specific: I wanted to create a database and grant some permissions. So I figured &#8220;Admin stuff&#8230; let&#8217;s try <span style="color:#FF00FF">mysqladmin</span>&#8220;.<span id="more-697"></span><br />
After all, mysqladmin is a &#8220;<a href="http://dev.mysql.com/doc/refman/5.1/en/mysqladmin.html">Client for Administering a MySQL Server</a>&#8220;.<br />
Well, let me tell you: <span style="color:#00FFFF">IT&#8217;S GARBAGE</span>. The retarded thing can&#8217;t even handle a <span style="color:#FFFF00">GRANT</span> statement. And everything else it does you can do with the <span style="color:#00FF77">mysql</span> tool as well, so I serously wonder why they ship this thing along with the superior mysql client.</p>
<p>Anyway, I reminded myself of a way better tool for scripting around SQL. A friend of mine wrote this and he calls it <a href="http://www.dataloss.nl/software/dteq/">dteq</a>.<br />
I&#8217;ve used it before and will probably do so again (not for grants though, mysql will do for that) in my scripts that do SQL stuff.<br />
Why? Templates! Good for auto-generating a users/passwords file and stuff like that.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>kanker$ mysqlteq <span style="color: #ff0000;">'select * from users'</span> <span style="color: #ff0000;">':'</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
benv:100:100:<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>benv<br />
testuser:101:100:<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">test</span></div></div>
<p>Very handy. Back to scripting.</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/mysql-fun/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FastCGI results</title>
		<link>http://notes.benv.junerules.com/all/software/fastcgi-results/</link>
		<comments>http://notes.benv.junerules.com/all/software/fastcgi-results/#comments</comments>
		<pubDate>Tue, 12 Jan 2010 18:23:19 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[fastcgi]]></category>
		<category><![CDATA[google analytics]]></category>
		<category><![CDATA[magento]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=692</guid>
		<description><![CDATA[A few weeks ago I implemented a FastCGI setup for a magento website. (details Here). That site also runs google analytics.
Here&#8217;s what analytics had to show about the speed of the site:
Can you guess when FastCGI was enabled? 
For those of you who are graphically challenged, the above graph shows a loading time of 2.1-2.5 [...]]]></description>
			<content:encoded><![CDATA[<p>A few weeks ago I implemented a FastCGI setup for a magento website. (details <a href="http://notes.benv.junerules.com/all/software/apache-2-2-and-php-configuration-fun-on-slackware-13/">Here</a>). That site also runs google analytics.<br />
Here&#8217;s what analytics had to show about the speed of the site:<br />
<div id="attachment_693" class="wp-caption alignnone" style="width: 310px"><a href="http://notes.benv.junerules.com/wp-content/uploads/2010/01/fastcgi-graph.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2010/01/fastcgi-graph-300x58.png" alt="FastCGI speedup graph by Google Analytics" title="FastCGI speedup graph" width="300" height="58" class="size-medium wp-image-693" /></a><p class="wp-caption-text">FastCGI speedup graph</p></div><br />
Can you guess when FastCGI was enabled? <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
For those of you who are graphically challenged, the above graph shows a loading time of 2.1-2.5 seconds on the left and then crashes down to only 1.0-1.3 seconds at the date that I enabled FastCGI. Neat huh? <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Google analytics also notes that &#8220;this site is faster than 83% of the sites&#8221;, whatever that means. Oh well, we&#8217;re happy.</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/fastcgi-results/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Deluge issue</title>
		<link>http://notes.benv.junerules.com/all/software/deluge-issue/</link>
		<comments>http://notes.benv.junerules.com/all/software/deluge-issue/#comments</comments>
		<pubDate>Sat, 02 Jan 2010 11:52:39 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[boost]]></category>
		<category><![CDATA[deluge]]></category>
		<category><![CDATA[slackware]]></category>
		<category><![CDATA[update]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=689</guid>
		<description><![CDATA[This morning I noticed my torrent daemon (aka Deluge) was down. 
Checking the logs revealed this:
&#91;ERROR &#160; &#93; 12:22:01 main:216 libboost_filesystem-mt.so: cannot open shared object file: No such file or directory
Traceback &#40;most recent call last&#41;:
&#160; File &#34;/usr/lib/python2.6/site-packages/deluge/main.py&#34;, line 209, in start_daemon
&#160; &#160; Daemon&#40;options, args&#41;
&#160; File &#34;/usr/lib/python2.6/site-packages/deluge/core/daemon.py&#34;, line 134, in __init__
&#160; &#160; from deluge.core.core import Core
&#160; [...]]]></description>
			<content:encoded><![CDATA[<p>This morning I noticed my torrent daemon (aka <a href="http://deluge-torrent.org/">Deluge</a>) was down. <span id="more-689"></span><br />
Checking the logs revealed this:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">&#91;</span>ERROR &nbsp; <span style="color: #7a0874; font-weight: bold;">&#93;</span> 12:22:01 main:216 libboost_filesystem-mt.so: cannot open shared object <span style="color: #c20cb9; font-weight: bold;">file</span>: No such <span style="color: #c20cb9; font-weight: bold;">file</span> or directory<br />
Traceback <span style="color: #7a0874; font-weight: bold;">&#40;</span>most recent call <span style="color: #c20cb9; font-weight: bold;">last</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>:<br />
&nbsp; File <span style="color: #ff0000;">&quot;/usr/lib/python2.6/site-packages/deluge/main.py&quot;</span>, line 209, <span style="color: #000000; font-weight: bold;">in</span> start_daemon<br />
&nbsp; &nbsp; Daemon<span style="color: #7a0874; font-weight: bold;">&#40;</span>options, args<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
&nbsp; File <span style="color: #ff0000;">&quot;/usr/lib/python2.6/site-packages/deluge/core/daemon.py&quot;</span>, line 134, <span style="color: #000000; font-weight: bold;">in</span> __init__<br />
&nbsp; &nbsp; from deluge.core.core import Core<br />
&nbsp; File <span style="color: #ff0000;">&quot;/usr/lib/python2.6/site-packages/deluge/core/core.py&quot;</span>, line 36, <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">&lt;</span>module<span style="color: #000000; font-weight: bold;">&gt;</span><br />
&nbsp; &nbsp; from deluge._libtorrent import lt<br />
&nbsp; File <span style="color: #ff0000;">&quot;/usr/lib/python2.6/site-packages/deluge/_libtorrent.py&quot;</span>, line 59, <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">&lt;</span>module<span style="color: #000000; font-weight: bold;">&gt;</span><br />
&nbsp; &nbsp; import libtorrent <span style="color: #c20cb9; font-weight: bold;">as</span> lt<br />
ImportError: libboost_filesystem-mt.so: cannot open shared object <span style="color: #c20cb9; font-weight: bold;">file</span>: No such <span style="color: #c20cb9; font-weight: bold;">file</span> or directory</div></div>
<p>Interesting. Suddenly I reminded myself of some Slackware updates that probably installed a new version of boost yesterday, replacing my own version.</p>
<p>Oh well, since it seems to be the libtorrent part that&#8217;s bugging, I might as well upgrade it:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src$ <span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>downloads.sourceforge.net<span style="color: #000000; font-weight: bold;">/</span>project<span style="color: #000000; font-weight: bold;">/</span>libtorrent<span style="color: #000000; font-weight: bold;">/</span>libtorrent<span style="color: #000000; font-weight: bold;">/</span>libtorrent-0.14.7<span style="color: #000000; font-weight: bold;">/</span>libtorrent-rasterbar-0.14.7.tar.gz?<span style="color: #007800;">use_mirror</span>=freefr<br />
&nbsp;<span style="color: #666666; font-style: italic;"># Leech leech</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src$ <span style="color: #c20cb9; font-weight: bold;">tar</span> zxf libtorrent-rasterbar-0.14.7.tar.gz<br />
&nbsp;<span style="color: #666666; font-style: italic;"># Kaboom, in your /usr/src</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src$ <span style="color: #7a0874; font-weight: bold;">cd</span> libtorrent-rasterbar-0.14.7<br />
root<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libtorrent-rasterbar-0.14.7$ .<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--enable-dependency-tracking</span> <span style="color: #660033;">--enable-shared</span> <span style="color: #660033;">--enable-static</span> <span style="color: #660033;">--enable-python-binding</span> <span style="color: #660033;">--with-boost</span> <span style="color: #660033;">--with-libgeoip</span><br />
&nbsp;<span style="color: #666666; font-style: italic;"># lalala, junk</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libtorrent-rasterbar-0.14.7$ <span style="color: #c20cb9; font-weight: bold;">make</span><br />
&nbsp;<span style="color: #666666; font-style: italic;"># See you in an hour</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libtorrent-rasterbar-0.14.7$ <span style="color: #c20cb9; font-weight: bold;">mkdir</span> pkg ; <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #007800;">DESTDIR</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">pwd</span><span style="color: #000000; font-weight: bold;">`/</span>pkg <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #7a0874; font-weight: bold;">cd</span> pkg<br />
root<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libtorrent-rasterbar-0.14.7<span style="color: #000000; font-weight: bold;">/</span>pkg$ makepkg <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>packages<span style="color: #000000; font-weight: bold;">/</span>libtorrent-rasterbar-0.14.7-i386-1.tgz<br />
root<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libtorrent-rasterbar-0.14.7<span style="color: #000000; font-weight: bold;">/</span>pkg$ upgradepkg <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>packages<span style="color: #000000; font-weight: bold;">/</span>libtorrent-rasterbar-0.14.7-i386-1.tgz</div></div>
<p>(or you could have used slackbuild.pl, it&#8217;s easier <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> )</p>
<p>After upgrading the package, deluge starts again. Wheee.</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/deluge-issue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Favicon.ico generation</title>
		<link>http://notes.benv.junerules.com/all/daily/favicon-ico-generation/</link>
		<comments>http://notes.benv.junerules.com/all/daily/favicon-ico-generation/#comments</comments>
		<pubDate>Wed, 30 Dec 2009 18:39:51 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Boring]]></category>
		<category><![CDATA[favicon]]></category>
		<category><![CDATA[favicon.ico]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=682</guid>
		<description><![CDATA[Since I keep forgetting how the heck I create these favicon.ico files, it&#8217;s time to put it here.
First of all, the size. Obviously Internet exploder fails in epic ways regarding favicon.ico.
Basically, if it isn&#8217;t a microsoft ico format with a 16&#215;16 (or maybe 32&#215;32) icon in it, IE fails.
So what we do is create a [...]]]></description>
			<content:encoded><![CDATA[<p>Since I keep forgetting how the heck I create these <a href="http://en.wikipedia.org/wiki/Favicon">favicon.ico</a> files, it&#8217;s time to put it here.<span id="more-682"></span></p>
<p>First of all, the size. Obviously Internet exploder fails in epic ways regarding favicon.ico.<br />
Basically, if it isn&#8217;t a microsoft ico format with a 16&#215;16 (or maybe 32&#215;32) icon in it, IE fails.<br />
So what we do is create a nice ico file that contains all relevant sizes (which are 64&#215;64, 48&#215;48, 32&#215;32 and 16&#215;16).<br />
Oh, let&#8217;s not forget about the color depth, this should be either 8-bit or 24-bit. (although it wouldn&#8217;t surprise me if 24 bits fails on IE).<br />
Note that Firefox and Opera aren&#8217;t that picky, they even accept PNG and JPEG files these days. Even better, they claim to support <a href="http://en.wikipedia.org/wiki/APNG">APNG</a> files&#8230; could be interesting.</p>
<p>Anyway, the creation. Gimp yourself a nice set of images for the specified format, or if you&#8217;re lazy simply create 1 image and convert it with imagemagick.<br />
P.S. Details on <span style="color:#00FFFF">convert</span> can be found <a href="http://www.imagemagick.org/script/convert.php">here</a>, wonderful tool.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ <span style="color: #007800;">IMAGE</span>=myimage.png<br />
$ convert <span style="color: #660033;">-resize</span> 64x64 <span style="color: #660033;">-gravity</span> center <span style="color: #660033;">-background</span> transparent <span style="color: #660033;">-extent</span> 64x64 <span style="color: #007800;">$IMAGE</span> ico64.png<br />
$ convert <span style="color: #660033;">-resize</span> 48x48 <span style="color: #660033;">-gravity</span> center <span style="color: #660033;">-background</span> transparent <span style="color: #660033;">-extent</span> 48x48 <span style="color: #007800;">$IMAGE</span> ico48.png<br />
$ convert <span style="color: #660033;">-resize</span> 32x32 <span style="color: #660033;">-gravity</span> center <span style="color: #660033;">-background</span> transparent <span style="color: #660033;">-extent</span> 32x32 <span style="color: #007800;">$IMAGE</span> ico32.png<br />
$ convert <span style="color: #660033;">-resize</span> 16x16 <span style="color: #660033;">-gravity</span> center <span style="color: #660033;">-background</span> transparent <span style="color: #660033;">-extent</span> 16x16 <span style="color: #007800;">$IMAGE</span> ico16.png</div></div>
<p>Now that we&#8217;ve got those images fixed, I usually use <a href="http://www.winterdrache.de/freeware/png2ico/index.html">png2ico</a> to convert the to the final ico file.</p>
<p>Obviously we first need to compile and install that tool. Skip this if you already have it <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src$ <span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>www.winterdrache.de<span style="color: #000000; font-weight: bold;">/</span>freeware<span style="color: #000000; font-weight: bold;">/</span>png2ico<span style="color: #000000; font-weight: bold;">/</span>data<span style="color: #000000; font-weight: bold;">/</span>png2ico-src-2002-12-08.tar.gz<br />
benv<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src$ <span style="color: #c20cb9; font-weight: bold;">tar</span> zxvf png2ico-src-2002-12-08.tar.gz<br />
benv<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src$ <span style="color: #7a0874; font-weight: bold;">cd</span> png2ico<br />
benv<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>png2ico$ <span style="color: #c20cb9; font-weight: bold;">make</span><br />
benv<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>png2ico$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> ginstall <span style="color: #660033;">-m755</span> <span style="color: #660033;">-o</span> root <span style="color: #660033;">-g</span> root png2ico <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>bin<br />
benv<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>png2ico$ ginstall <span style="color: #660033;">-m644</span> <span style="color: #660033;">-o</span> root <span style="color: #660033;">-g</span> root doc<span style="color: #000000; font-weight: bold;">/</span>png2ico.1 <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>man<span style="color: #000000; font-weight: bold;">/</span>man1</div></div>
<p>Now for the creation of the <span style="color:#FF00FF">favicon.ico</span></p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>tmp$ png2ico favicon.ico ico64.png ico48.png ico32.png ico16.png</div></div>
<p>Put it in your webroot and you can add a header tag to make it official (although most browsers request favicon.ico whether you specify it or not).</p>
<p>NOTE:<br />
If you add the 16&#215;16 icon, be aware that it might not look as fancy as you&#8217;d think. Most browsers will display this size by default though, so if your 16&#215;16 version looks<br />
like crap, simply don&#8217;t include it.</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/daily/favicon-ico-generation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache 2.2 and PHP configuration fun on Slackware 13</title>
		<link>http://notes.benv.junerules.com/all/software/apache-2-2-and-php-configuration-fun-on-slackware-13/</link>
		<comments>http://notes.benv.junerules.com/all/software/apache-2-2-and-php-configuration-fun-on-slackware-13/#comments</comments>
		<pubDate>Mon, 28 Dec 2009 17:49:30 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[apache2]]></category>
		<category><![CDATA[apc]]></category>
		<category><![CDATA[fastcgi]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[slackware]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=669</guid>
		<description><![CDATA[As I love to tinker around with apache/php installations to get them to work as fast as possible while still keeping some security in tact, I found myself messing around with FastCGI today. But why?! Here&#8217;s why:
On this machine I previously installed suPhP to get php scripts to run as a normal unix user instead [...]]]></description>
			<content:encoded><![CDATA[<p>As I love to tinker around with apache/php installations to get them to work as fast as possible while still keeping some security in tact, I found myself messing around with <a href="http://www.fastcgi.com/">FastCGI</a> today. But why?! Here&#8217;s why:<br />
On this machine I previously installed <a href="http://www.suphp.org/">suPhP</a> to get php scripts to run as a normal unix user instead of user apache (so users have the ability to completely lock out their database settings etc for other users on that machine). However, to speed stuff up on a <a href="http://www.magentocommerce.com/">magento</a> webshop I wanted to have a PHP opcode cache running (I tried out <a href="http://pecl.php.net/package/APC">APC</a>).<span id="more-669"></span><br />
Those opcode caches don&#8217;t work very well (read: they only slow things down) if you run php the way it&#8217;s supposed to run under suPHP though, because suPHP needs to be run using php&#8217;s CGI mode. This means no mod_php, but instead starting a new php instance for every request. Not only is this expensive in terms of startup costs, but it also makes those caches completely useless. (since they can&#8217;t share any memory without resorting to state files or some sort of uglyness).</p>
<p>Anyway, suphp is still nice to have for simple sites that don&#8217;t get many hits or don&#8217;t need to be very fast. Therefore I wanted to have both options available. Here&#8217;s how.<br />
I started out with the Slackware packages for php and apache, but soon found both to be inadequate. Php lacked some modules that some site wanted, and apache didn&#8217;t even bring suexec along.<br />
However, the slackware layout is good enough so I altered the slackbuild script a bit and built my own apache. You might need to install some packages as dependencies though. For instance I didn&#8217;t have &#8216;expat&#8217; and &#8216;db44&#8242; installed.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>it:~$ <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #660033;">-p</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>sources<span style="color: #000000; font-weight: bold;">/</span> ; <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>sources<br />
benv<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>sources$ lftp <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>ftp.nluug.nl<span style="color: #000000; font-weight: bold;">/</span>pub<span style="color: #000000; font-weight: bold;">/</span>os<span style="color: #000000; font-weight: bold;">/</span>Linux<span style="color: #000000; font-weight: bold;">/</span>distr<span style="color: #000000; font-weight: bold;">/</span>slackware<span style="color: #000000; font-weight: bold;">/</span>slackware-13.0<span style="color: #000000; font-weight: bold;">/</span>source<span style="color: #000000; font-weight: bold;">/</span>n<br />
<span style="color: #7a0874; font-weight: bold;">cd</span> ok, <span style="color: #007800;">cwd</span>=<span style="color: #000000; font-weight: bold;">/</span>pub<span style="color: #000000; font-weight: bold;">/</span>os<span style="color: #000000; font-weight: bold;">/</span>Linux<span style="color: #000000; font-weight: bold;">/</span>distr<span style="color: #000000; font-weight: bold;">/</span>slackware<span style="color: #000000; font-weight: bold;">/</span>slackware-<span style="color: #000000;">13.0</span><span style="color: #000000; font-weight: bold;">/</span>source<span style="color: #000000; font-weight: bold;">/</span>n<br />
lftp ftp.nluug.nl:<span style="color: #000000; font-weight: bold;">/</span>pub<span style="color: #000000; font-weight: bold;">/</span>os<span style="color: #000000; font-weight: bold;">/</span>Linux<span style="color: #000000; font-weight: bold;">/</span>distr<span style="color: #000000; font-weight: bold;">/</span>slackware<span style="color: #000000; font-weight: bold;">/</span>slackware-<span style="color: #000000;">13.0</span><span style="color: #000000; font-weight: bold;">/</span>source<span style="color: #000000; font-weight: bold;">/</span>n<span style="color: #000000; font-weight: bold;">&gt;</span> mirror httpd<br />
&nbsp;<span style="color: #666666; font-style: italic;"># takes a while...</span><br />
benv<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>sources$ <span style="color: #7a0874; font-weight: bold;">cd</span> httpd<br />
benv<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>sources<span style="color: #000000; font-weight: bold;">/</span>httpd$ <span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>www.apache-mirror.com<span style="color: #000000; font-weight: bold;">/</span>httpd<span style="color: #000000; font-weight: bold;">/</span>httpd-2.2.14.tar.bz2<br />
benv<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>sources<span style="color: #000000; font-weight: bold;">/</span>httpd$ <span style="color: #c20cb9; font-weight: bold;">vim</span> httpd.SlackBuild</div></div>
<p>Now edit the slackbuild file so it compiles with your compile flags. My changes were:<br />
1. Changed VERSION to 2.2.14 (was 2.2.13)<br />
2. Added these to the configure flags (to enable suexec) around line 103:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; <span style="color: #660033;">--enable-suexec</span> \<br />
&nbsp; <span style="color: #660033;">--with-suexec-bin</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>suexec \<br />
&nbsp; <span style="color: #660033;">--with-suexec-docroot</span>=<span style="color: #000000; font-weight: bold;">/</span>www \<br />
&nbsp; <span style="color: #660033;">--with-suexec-caller</span>=apache \<br />
&nbsp; <span style="color: #660033;">--with-suexec-uidmin</span>=1000 \<br />
&nbsp; <span style="color: #660033;">--with-suexec-gidmin</span>=100 \<br />
&nbsp; <span style="color: #660033;">--without-suexec-userdir</span> \</div></div>
<p>Compile and install it. Note that the suexec part requires root permissions, so I did this as root.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>sources<span style="color: #000000; font-weight: bold;">/</span>httpd<span style="color: #666666; font-style: italic;"># bash httpd.SlackBuild</span><br />
&nbsp;<span style="color: #666666; font-style: italic;"># takes a while</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>sources<span style="color: #000000; font-weight: bold;">/</span>httpd<span style="color: #666666; font-style: italic;"># mv /tmp/httpd-2.2.14-i386-1.txz /usr/src/packages</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>sources<span style="color: #000000; font-weight: bold;">/</span>httpd<span style="color: #666666; font-style: italic;"># installpkg /usr/src/packages/httpd-2.2.14-i386-1.txz</span></div></div>
<h3>PHP and suPHP</h3>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src$ <span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>nl3.php.net<span style="color: #000000; font-weight: bold;">/</span>get<span style="color: #000000; font-weight: bold;">/</span>php-5.2.12.tar.bz2<span style="color: #000000; font-weight: bold;">/</span>from<span style="color: #000000; font-weight: bold;">/</span>nl.php.net<span style="color: #000000; font-weight: bold;">/</span>mirror<br />
&nbsp;<span style="color: #666666; font-style: italic;"># Leech leech... and tomorrow there will be a new version since you're compiling it today. That's my luck ;)</span><br />
benv<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src$ <span style="color: #c20cb9; font-weight: bold;">tar</span> jxf php-5.2.12.tar.bz2<br />
benv<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src$ <span style="color: #7a0874; font-weight: bold;">cd</span> php-5.2.12<br />
&nbsp;<span style="color: #666666; font-style: italic;"># Pick your own configure string, but note that we don't build mod_php, so no --with-apxs!</span><br />
benv<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>php-5.2.12$ &nbsp;.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--enable-fastcgi</span> <span style="color: #660033;">--enable-force-cgi-redirect</span> <span style="color: #660033;">--with-config-file-path</span>=<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>php <span style="color: #660033;">--with-openssl</span> <span style="color: #660033;">--with-zlib</span> <span style="color: #660033;">--enable-bcmath</span> <span style="color: #660033;">--with-bz2</span> <span style="color: #660033;">--enable-calendar</span> <span style="color: #660033;">--with-curl</span> <span style="color: #660033;">--enable-dba</span>=shared <span style="color: #660033;">--enable-exif</span> <span style="color: #660033;">--enable-ftp</span> <span style="color: #660033;">--with-gd</span> <span style="color: #660033;">--with-ttf</span> <span style="color: #660033;">--with-t1lib</span> <span style="color: #660033;">--enable-gd-native-ttf</span> <span style="color: #660033;">--enable-gd-jis-conv</span> <span style="color: #660033;">--with-gettext</span> <span style="color: #660033;">--with-gmp</span> <span style="color: #660033;">--with-imap</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>c-client <span style="color: #660033;">--with-imap-ssl</span> <span style="color: #660033;">--enable-mbstring</span> <span style="color: #660033;">--with-mcrypt</span> <span style="color: #660033;">--with-mhash</span> <span style="color: #660033;">--with-mysql</span> <span style="color: #660033;">--with-mysqli</span> <span style="color: #660033;">--with-ncurses</span> <span style="color: #660033;">--with-pspell</span> <span style="color: #660033;">--with-mm</span> <span style="color: #660033;">--enable-shmop</span> <span style="color: #660033;">--enable-soap</span> <span style="color: #660033;">--enable-sockets</span> <span style="color: #660033;">--enable-sqlite-utf8</span> <span style="color: #660033;">--enable-sysvmsg</span> <span style="color: #660033;">--enable-sysvsem</span> <span style="color: #660033;">--enable-sysvshm</span> <span style="color: #660033;">--with-tidy</span> <span style="color: #660033;">--with-xsl</span> <span style="color: #660033;">--enable-zip</span> <span style="color: #660033;">--with-tsrm-pthreads</span> <span style="color: #660033;">--enable-shared</span> <span style="color: #660033;">--enable-static</span> <span style="color: #660033;">--without-ldap</span> <span style="color: #660033;">--without-ldap-sasl</span> <span style="color: #660033;">--with-jpeg-dir</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--with-freetype-dir</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--with-xpm-dir</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--with-pdo-mysql</span> <span style="color: #660033;">--with-png-dir</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<br />
&nbsp;<span style="color: #666666; font-style: italic;"># barf barf</span><br />
benv<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>php-5.2.12$ &nbsp;<span style="color: #c20cb9; font-weight: bold;">make</span><br />
&nbsp;<span style="color: #666666; font-style: italic;"># see you tomorrow</span><br />
benv<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>php-5.2.12$ &nbsp;<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></div></div>
<p>Note that since php is a pleuris product it will ignore the DESTDIR variable that usually works for creating a package. If you want a nice package for php, consider using the slackware build script instead. (I was too lazy for it this time). Next suPHP:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src$ <span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>www.suphp.org<span style="color: #000000; font-weight: bold;">/</span>download<span style="color: #000000; font-weight: bold;">/</span>suphp-0.7.1.tar.gz<br />
benv<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src$ <span style="color: #c20cb9; font-weight: bold;">tar</span> zxf suphp-0.7.1.tar.gz<br />
benv<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src$ <span style="color: #7a0874; font-weight: bold;">cd</span> suphp-0.7.1<br />
benv<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>suphp-0.7.1$ .<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--enable-checkpath</span> <span style="color: #660033;">--with-min-uid</span>=1000 <span style="color: #660033;">--with-apache-user</span>=apache <span style="color: #660033;">--with-logfile</span>=<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>suphp_log <span style="color: #660033;">--with-apr</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>apr-<span style="color: #000000;">1</span>-config<br />
&nbsp;<span style="color: #666666; font-style: italic;"># lala</span><br />
benv<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>suphp-0.7.1$ <span style="color: #c20cb9; font-weight: bold;">make</span><br />
benv<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>suphp-0.7.1$ <span style="color: #c20cb9; font-weight: bold;">mkdir</span> pkg<br />
benv<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>suphp-0.7.1$ <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #007800;">DESTDIR</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">pwd</span><span style="color: #000000; font-weight: bold;">`/</span>pkg <span style="color: #c20cb9; font-weight: bold;">install</span><br />
benv<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>suphp-0.7.1$ <span style="color: #7a0874; font-weight: bold;">cd</span> pkg <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> makepkg <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>packages<span style="color: #000000; font-weight: bold;">/</span>suphp-0.7.1-i386-1.tgz<br />
benv<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>suphp-0.7.1$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> installpkg <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>packages<span style="color: #000000; font-weight: bold;">/</span>suphp-0.7.1-i386-1.tgz</div></div>
<p>That went smooth. PHP could learn something from this. Now we still need to configure suphp. To do this we create 2 files and alter <span style="color:#FF00FF">httpd.conf</span> a little.<br />
First suphp.conf:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>suphp-0.7.1$ <span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>suphp-0.7.1<span style="color: #000000; font-weight: bold;">/</span>doc<span style="color: #000000; font-weight: bold;">/</span>suphp.conf-example <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>suphp.conf<br />
root<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>suphp-0.7.1$ <span style="color: #c20cb9; font-weight: bold;">vim</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>suphp.conf</div></div>
<p>Personally I left most to default, but I did change the log path and the docroot.<br />
Next we need to enable it in apache, but to keep module stuff in their own section we put this in mod_suphp.conf which we include in the httpd.conf.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>httpd$ <span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">&gt;</span> mod_suphp.conf<br />
LoadModule suphp_module &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>httpd<span style="color: #000000; font-weight: bold;">/</span>modules<span style="color: #000000; font-weight: bold;">/</span>mod_suphp.so<br />
<span style="color: #666666; font-style: italic;"># AddModule mod_suphp.c</span><br />
AddType application<span style="color: #000000; font-weight: bold;">/</span>x-httpd-php .php<br />
suPHP_AddHandler application<span style="color: #000000; font-weight: bold;">/</span>x-httpd-php<br />
&nbsp;<span style="color: #666666; font-style: italic;"># hit ctrl-d here</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>httpd$ <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">'Include /etc/httpd/mod_suphp.conf'</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> httpd.conf</div></div>
<p>That should be enough. Now for sites that you want to enable suphp, simply add a few lines to their vhost config like this:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; &nbsp; &nbsp; &nbsp; suPHP_Engine on<br />
&nbsp; &nbsp; &nbsp; &nbsp; suPHP_ConfigPath <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>php<br />
&nbsp; &nbsp; &nbsp; &nbsp; suPHP_UserGroup jemoeder <span style="color: #c20cb9; font-weight: bold;">users</span></div></div>
<p>Now you should have a working suPHP installation (provided that you restarted apache etc).<br />
If something fails, check the logs, especially <span style="color:#FFFF00">suphp.log</span> and of course the apache error_log.</p>
<h3>FastCGI</h3>
<p>To get this running I loosely followed <a href="http://www.brandonturner.net/blog/2009/07/fastcgi_with_php_opcode_cache/">this blog post</a>. It pretty much worked like Brandon explained, after I recompiled my apache for suexec support that is. Thus a summary:</p>
<h4>Install FastCGI</h4>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src$ <span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>www.fastcgi.com<span style="color: #000000; font-weight: bold;">/</span>dist<span style="color: #000000; font-weight: bold;">/</span>mod_fastcgi-current.tar.gz<br />
benv<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src$ <span style="color: #c20cb9; font-weight: bold;">tar</span> xvf mod_fastcgi-current.tar.gz<br />
benv<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src$ <span style="color: #7a0874; font-weight: bold;">cd</span> mod_fastcgi-2.4.6<br />
benv<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>mod_fastcgi-2.4.6$ apxs <span style="color: #660033;">-o</span> mod_fastcgi.so <span style="color: #660033;">-c</span> <span style="color: #000000; font-weight: bold;">*</span>.c<br />
&nbsp;<span style="color: #666666; font-style: italic;"># This as root</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>mod_fastcgi-2.4.6$ <span style="color: #c20cb9; font-weight: bold;">cp</span> .libs<span style="color: #000000; font-weight: bold;">/</span>mod_fastcgi.so <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>httpd<span style="color: #000000; font-weight: bold;">/</span>modules<br />
&nbsp;<span style="color: #666666; font-style: italic;"># Now to enable it in apache</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>$ <span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>httpd<span style="color: #000000; font-weight: bold;">/</span>mod_fastcgi.conf<br />
LoadModule fastcgi_module <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>httpd<span style="color: #000000; font-weight: bold;">/</span>modules<span style="color: #000000; font-weight: bold;">/</span>mod_fastcgi.so<br />
<br />
FastCgiConfig <span style="color: #660033;">-idle-timeout</span> 20 <span style="color: #660033;">-maxClassProcesses</span> <span style="color: #000000;">1</span><br />
FastCgiWrapper <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>suexec<br />
<span style="color: #000000; font-weight: bold;">&lt;</span>Location <span style="color: #ff0000;">&quot;/cgi-bin/php-fastcgi&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; Order Deny,Allow<br />
&nbsp; &nbsp; &nbsp; &nbsp; Deny from All<br />
&nbsp; &nbsp; &nbsp; &nbsp; Allow from <span style="color: #c20cb9; font-weight: bold;">env</span>=REDIRECT_STATUS<br />
&nbsp; &nbsp; &nbsp; &nbsp; Options ExecCGI<br />
&nbsp; &nbsp; &nbsp; &nbsp; SetHandler fastcgi-script<br />
<span style="color: #000000; font-weight: bold;">&lt;/</span>Location<span style="color: #000000; font-weight: bold;">&gt;</span><br />
<span style="color: #666666; font-style: italic;"># ctrl-d here</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>$ <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">'Include /etc/httpd/mod_fastcgi.conf'</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>httpd<span style="color: #000000; font-weight: bold;">/</span>httpd.conf</div></div>
<p>Now for the magic part, enabling it in a vhost.<br />
First we need a php wrapper script:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>$ <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #660033;">-p</span> <span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>fastcgi-wrappers<span style="color: #000000; font-weight: bold;">/</span>somevhost.com<br />
root<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>$ <span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>fastcgi-wrappers<span style="color: #000000; font-weight: bold;">/</span>somevhost.com<span style="color: #000000; font-weight: bold;">/</span>php-fastcgi<br />
<span style="color: #666666; font-style: italic;">#!/bin/sh</span><br />
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PHP_FCGI_CHILDREN</span>=5<br />
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PHP_FCGI_MAX_REQUESTS</span>=500<br />
<span style="color: #7a0874; font-weight: bold;">umask</span> 0022<br />
<span style="color: #7a0874; font-weight: bold;">exec</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>php <span style="color: #660033;">-d</span> apc.shm_size=<span style="color: #000000;">64</span><br />
<span style="color: #666666; font-style: italic;"># ctrl-d here</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>$ <span style="color: #c20cb9; font-weight: bold;">chown</span> <span style="color: #660033;">-R</span> vhostuser:<span style="color: #c20cb9; font-weight: bold;">users</span> <span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>fastcgi-wrappers<span style="color: #000000; font-weight: bold;">/</span>somevhost.com</div></div>
<p>Note the <span style="color:#00FFFF">-d apc.shm_size=64</span> option. This specific option is to set the cache size for APC, but this way you can give php custom settings per vhost. Neat huh? If you want to give this vhost its own php.ini you can add this to the script:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PHPRC</span>=<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>php<span style="color: #000000; font-weight: bold;">/</span>vhosts<span style="color: #000000; font-weight: bold;">/</span>somevhost</div></div>
<p>PHP will check for a php.ini in that dir. Make sure to check the permissions on these dirs though, especially on the wrapper script. Your users might do stuff you don&#8217;t want if you let them alter these things.<br />
Finally to enable FastCGI per vhost, add something to the vhost configuration like this (make sure to disable suphp on that vhost!):</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; &nbsp; &nbsp; &nbsp; SuexecUserGroup jemoeder <span style="color: #c20cb9; font-weight: bold;">users</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; Alias <span style="color: #000000; font-weight: bold;">/</span>cgi-bin<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>fastcgi-wrappers<span style="color: #000000; font-weight: bold;">/</span>somevhost.com<span style="color: #000000; font-weight: bold;">/</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; AddHandler php5-fcgi .php<br />
&nbsp; &nbsp; &nbsp; &nbsp; Action php5-fcgi <span style="color: #000000; font-weight: bold;">/</span>cgi-bin<span style="color: #000000; font-weight: bold;">/</span>php-fastcgi</div></div>
<p>Restart apache and you should see stuff like this in the process list:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>$ <span style="color: #c20cb9; font-weight: bold;">ps</span> auwx <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> jemoeder<br />
jemoeder &nbsp;5789 &nbsp;0.1 &nbsp;4.3 131388 44940 ? &nbsp; &nbsp; &nbsp; &nbsp;S &nbsp; &nbsp;16:46 &nbsp; 0:07 <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>php <span style="color: #660033;">-d</span> apc.shm_size=64<br />
jemoeder &nbsp;5790 &nbsp;0.1 &nbsp;3.0 130804 31888 ? &nbsp; &nbsp; &nbsp; &nbsp;S &nbsp; &nbsp;16:46 &nbsp; 0:06 <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>php <span style="color: #660033;">-d</span> apc.shm_size=64<br />
jemoeder &nbsp;5791 &nbsp;0.1 &nbsp;4.3 131644 44948 ? &nbsp; &nbsp; &nbsp; &nbsp;S &nbsp; &nbsp;16:46 &nbsp; 0:06 <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>php <span style="color: #660033;">-d</span> apc.shm_size=64<br />
jemoeder &nbsp;5792 &nbsp;0.1 &nbsp;3.3 131620 34160 ? &nbsp; &nbsp; &nbsp; &nbsp;S &nbsp; &nbsp;16:46 &nbsp; 0:06 <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>php <span style="color: #660033;">-d</span> apc.shm_size=64<br />
jemoeder &nbsp;5793 &nbsp;0.0 &nbsp;2.5 126872 26672 ? &nbsp; &nbsp; &nbsp; &nbsp;S &nbsp; &nbsp;16:46 &nbsp; 0:05 <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>php <span style="color: #660033;">-d</span> apc.shm_size=<span style="color: #000000;">64</span></div></div>
<h3>APC</h3>
<p>Now for some speedup. Let&#8217;s see apachebench on that magento vhost without APC and FastCGI:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>mybrik:~$ ab <span style="color: #660033;">-n</span> 50 <span style="color: #660033;">-c</span> 3 <span style="color: #660033;">-k</span> &nbsp;http:<span style="color: #000000; font-weight: bold;">//</span>www.somevhost.com<span style="color: #000000; font-weight: bold;">/</span><br />
This is ApacheBench, Version 2.3 <span style="color: #000000; font-weight: bold;">&lt;</span><span style="color: #007800;">$Revision</span>: 655654 $<span style="color: #000000; font-weight: bold;">&gt;</span><br />
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http:<span style="color: #000000; font-weight: bold;">//</span>www.zeustech.net<span style="color: #000000; font-weight: bold;">/</span><br />
Licensed to The Apache Software Foundation, http:<span style="color: #000000; font-weight: bold;">//</span>www.apache.org<span style="color: #000000; font-weight: bold;">/</span><br />
<br />
Benchmarking www.somevhost.com <span style="color: #7a0874; font-weight: bold;">&#40;</span>be patient<span style="color: #7a0874; font-weight: bold;">&#41;</span>.....done<br />
<br />
<br />
Server Software: &nbsp; &nbsp; &nbsp; &nbsp;Apache<span style="color: #000000; font-weight: bold;">/</span>2.2.14<br />
Server Hostname: &nbsp; &nbsp; &nbsp; &nbsp;www.somevhost.com<br />
Server Port: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;80<br />
<br />
Document Path: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">/</span><br />
Document Length: &nbsp; &nbsp; &nbsp; &nbsp;21590 bytes<br />
<br />
Concurrency Level: &nbsp; &nbsp; &nbsp;3<br />
Time taken <span style="color: #000000; font-weight: bold;">for</span> tests: &nbsp; <span style="color: #000000;">43.056</span> seconds<br />
Complete requests: &nbsp; &nbsp; &nbsp;<span style="color: #000000;">50</span><br />
Failed requests: &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">0</span><br />
Write errors: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">0</span><br />
Keep-Alive requests: &nbsp; &nbsp;<span style="color: #000000;">0</span><br />
Total transferred: &nbsp; &nbsp; &nbsp;<span style="color: #000000;">1104350</span> bytes<br />
HTML transferred: &nbsp; &nbsp; &nbsp; <span style="color: #000000;">1079500</span> bytes<br />
Requests per second: &nbsp; &nbsp;<span style="color: #000000;">1.16</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #666666; font-style: italic;">#/sec] (mean)</span><br />
Time per request: &nbsp; &nbsp; &nbsp; 2583.342 <span style="color: #7a0874; font-weight: bold;">&#91;</span>ms<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>mean<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
Time per request: &nbsp; &nbsp; &nbsp; 861.114 <span style="color: #7a0874; font-weight: bold;">&#91;</span>ms<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>mean, across all concurrent requests<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
Transfer rate: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;25.05 <span style="color: #7a0874; font-weight: bold;">&#91;</span>Kbytes<span style="color: #000000; font-weight: bold;">/</span>sec<span style="color: #7a0874; font-weight: bold;">&#93;</span> received<br />
<br />
Connection Times <span style="color: #7a0874; font-weight: bold;">&#40;</span>ms<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; min &nbsp;mean<span style="color: #7a0874; font-weight: bold;">&#91;</span>+<span style="color: #000000; font-weight: bold;">/</span>-sd<span style="color: #7a0874; font-weight: bold;">&#93;</span> median &nbsp; max<br />
Connect: &nbsp; &nbsp; &nbsp; 10 &nbsp; 12 &nbsp; 3.5 &nbsp; &nbsp; 11 &nbsp; &nbsp; &nbsp;29<br />
Processing: &nbsp;2077 2560 221.6 &nbsp; 2489 &nbsp; &nbsp;3083<br />
Waiting: &nbsp; &nbsp; 1741 2015 116.6 &nbsp; 2033 &nbsp; &nbsp;2266<br />
Total: &nbsp; &nbsp; &nbsp; 2093 2572 222.5 &nbsp; 2499 &nbsp; &nbsp;3094<br />
<br />
Percentage of the requests served within a certain <span style="color: #000000; font-weight: bold;">time</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>ms<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
&nbsp; <span style="color: #000000;">50</span><span style="color: #000000; font-weight: bold;">%</span> &nbsp; <span style="color: #000000;">2499</span><br />
&nbsp; <span style="color: #000000;">66</span><span style="color: #000000; font-weight: bold;">%</span> &nbsp; <span style="color: #000000;">2577</span><br />
&nbsp; <span style="color: #000000;">75</span><span style="color: #000000; font-weight: bold;">%</span> &nbsp; <span style="color: #000000;">2648</span><br />
&nbsp; <span style="color: #000000;">80</span><span style="color: #000000; font-weight: bold;">%</span> &nbsp; <span style="color: #000000;">2777</span><br />
&nbsp; <span style="color: #000000;">90</span><span style="color: #000000; font-weight: bold;">%</span> &nbsp; <span style="color: #000000;">3002</span><br />
&nbsp; <span style="color: #000000;">95</span><span style="color: #000000; font-weight: bold;">%</span> &nbsp; <span style="color: #000000;">3064</span><br />
&nbsp; <span style="color: #000000;">98</span><span style="color: #000000; font-weight: bold;">%</span> &nbsp; <span style="color: #000000;">3094</span><br />
&nbsp; <span style="color: #000000;">99</span><span style="color: #000000; font-weight: bold;">%</span> &nbsp; <span style="color: #000000;">3094</span><br />
&nbsp;<span style="color: #000000;">100</span><span style="color: #000000; font-weight: bold;">%</span> &nbsp; <span style="color: #000000;">3094</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>longest request<span style="color: #7a0874; font-weight: bold;">&#41;</span></div></div>
<p>As you can see it takes more than a second to get the page to load. Well, 0.8s mean across all, but 2.5s per request.<br />
Let&#8217;s install APC:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src$ <span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>pecl.php.net<span style="color: #000000; font-weight: bold;">/</span>get<span style="color: #000000; font-weight: bold;">/</span>APC-3.0.19.tgz<br />
root<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src$ <span style="color: #c20cb9; font-weight: bold;">tar</span> zvf APC-3.0.19.tgz<br />
root<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src$ <span style="color: #7a0874; font-weight: bold;">cd</span> APC-3.0.19<br />
root<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>APC-3.0.19$ .<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--enable-apc</span> <span style="color: #660033;">--enable-apc-filehits</span> <span style="color: #660033;">--enable-apc-sem</span> &nbsp;<span style="color: #660033;">--enable-apc-mmap</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>APC-3.0.19$ <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #666666; font-style: italic;"># Or create a package if you're up to it.</span><br />
<span style="color: #666666; font-style: italic;"># Now to enable it in php, assuming php.ini is /etc/php/php.ini</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>APC-3.0.19$ <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>php<span style="color: #000000; font-weight: bold;">/</span>php.ini<br />
<span style="color: #007800;">extension</span>=<span style="color: #ff0000;">&quot;apc.so&quot;</span><br />
<br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span>APC<span style="color: #7a0874; font-weight: bold;">&#93;</span> <br />
apc.enabled = <span style="color: #000000;">1</span> <br />
apc.enable_cli = <span style="color: #000000;">1</span><br />
apc.shm_segments = <span style="color: #000000;">1</span> <br />
apc.max_file_size = 10M <br />
apc.stat = <span style="color: #000000;">1</span><br />
<span style="color: #666666; font-style: italic;"># Ctrl-D here</span></div></div>
<p>Restart apache and voila. Time for a new benchmark.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>mybrik:~$ ab <span style="color: #660033;">-n</span> 50 <span style="color: #660033;">-c</span> 3 <span style="color: #660033;">-k</span> &nbsp;http:<span style="color: #000000; font-weight: bold;">//</span>www.somevhost.com<span style="color: #000000; font-weight: bold;">/</span><br />
This is ApacheBench, Version 2.3 <span style="color: #000000; font-weight: bold;">&lt;</span><span style="color: #007800;">$Revision</span>: 655654 $<span style="color: #000000; font-weight: bold;">&gt;</span><br />
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http:<span style="color: #000000; font-weight: bold;">//</span>www.zeustech.net<span style="color: #000000; font-weight: bold;">/</span><br />
Licensed to The Apache Software Foundation, http:<span style="color: #000000; font-weight: bold;">//</span>www.apache.org<span style="color: #000000; font-weight: bold;">/</span><br />
<br />
Benchmarking www.somevhost.com <span style="color: #7a0874; font-weight: bold;">&#40;</span>be patient<span style="color: #7a0874; font-weight: bold;">&#41;</span>.....done<br />
<br />
<br />
Server Software: &nbsp; &nbsp; &nbsp; &nbsp;Apache<span style="color: #000000; font-weight: bold;">/</span>2.2.14<br />
Server Hostname: &nbsp; &nbsp; &nbsp; &nbsp;www.somevhost.com<br />
Server Port: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;80<br />
<br />
Document Path: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">/</span><br />
Document Length: &nbsp; &nbsp; &nbsp; &nbsp;23337 bytes<br />
<br />
Concurrency Level: &nbsp; &nbsp; &nbsp;3<br />
Time taken <span style="color: #000000; font-weight: bold;">for</span> tests: &nbsp; <span style="color: #000000;">10.963</span> seconds<br />
Complete requests: &nbsp; &nbsp; &nbsp;<span style="color: #000000;">50</span><br />
Failed requests: &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">0</span><br />
Write errors: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">0</span><br />
Keep-Alive requests: &nbsp; &nbsp;<span style="color: #000000;">0</span><br />
Total transferred: &nbsp; &nbsp; &nbsp;<span style="color: #000000;">1192600</span> bytes<br />
HTML transferred: &nbsp; &nbsp; &nbsp; <span style="color: #000000;">1166850</span> bytes<br />
Requests per second: &nbsp; &nbsp;<span style="color: #000000;">4.56</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #666666; font-style: italic;">#/sec] (mean)</span><br />
Time per request: &nbsp; &nbsp; &nbsp; 657.787 <span style="color: #7a0874; font-weight: bold;">&#91;</span>ms<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>mean<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
Time per request: &nbsp; &nbsp; &nbsp; 219.262 <span style="color: #7a0874; font-weight: bold;">&#91;</span>ms<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>mean, across all concurrent requests<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
Transfer rate: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;106.23 <span style="color: #7a0874; font-weight: bold;">&#91;</span>Kbytes<span style="color: #000000; font-weight: bold;">/</span>sec<span style="color: #7a0874; font-weight: bold;">&#93;</span> received<br />
<br />
Connection Times <span style="color: #7a0874; font-weight: bold;">&#40;</span>ms<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; min &nbsp;mean<span style="color: #7a0874; font-weight: bold;">&#91;</span>+<span style="color: #000000; font-weight: bold;">/</span>-sd<span style="color: #7a0874; font-weight: bold;">&#93;</span> median &nbsp; max<br />
Connect: &nbsp; &nbsp; &nbsp; 10 &nbsp; 22 &nbsp;15.9 &nbsp; &nbsp; 16 &nbsp; &nbsp; &nbsp;76<br />
Processing: &nbsp; 477 &nbsp;630 &nbsp;71.8 &nbsp; &nbsp;618 &nbsp; &nbsp; 844<br />
Waiting: &nbsp; &nbsp; &nbsp;409 &nbsp;549 &nbsp;54.4 &nbsp; &nbsp;551 &nbsp; &nbsp; 708<br />
Total: &nbsp; &nbsp; &nbsp; &nbsp;493 &nbsp;652 &nbsp;74.8 &nbsp; &nbsp;640 &nbsp; &nbsp; 858<br />
<br />
Percentage of the requests served within a certain <span style="color: #000000; font-weight: bold;">time</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>ms<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
&nbsp; <span style="color: #000000;">50</span><span style="color: #000000; font-weight: bold;">%</span> &nbsp; &nbsp;<span style="color: #000000;">640</span><br />
&nbsp; <span style="color: #000000;">66</span><span style="color: #000000; font-weight: bold;">%</span> &nbsp; &nbsp;<span style="color: #000000;">654</span><br />
&nbsp; <span style="color: #000000;">75</span><span style="color: #000000; font-weight: bold;">%</span> &nbsp; &nbsp;<span style="color: #000000;">679</span><br />
&nbsp; <span style="color: #000000;">80</span><span style="color: #000000; font-weight: bold;">%</span> &nbsp; &nbsp;<span style="color: #000000;">692</span><br />
&nbsp; <span style="color: #000000;">90</span><span style="color: #000000; font-weight: bold;">%</span> &nbsp; &nbsp;<span style="color: #000000;">764</span><br />
&nbsp; <span style="color: #000000;">95</span><span style="color: #000000; font-weight: bold;">%</span> &nbsp; &nbsp;<span style="color: #000000;">811</span><br />
&nbsp; <span style="color: #000000;">98</span><span style="color: #000000; font-weight: bold;">%</span> &nbsp; &nbsp;<span style="color: #000000;">858</span><br />
&nbsp; <span style="color: #000000;">99</span><span style="color: #000000; font-weight: bold;">%</span> &nbsp; &nbsp;<span style="color: #000000;">858</span><br />
&nbsp;<span style="color: #000000;">100</span><span style="color: #000000; font-weight: bold;">%</span> &nbsp; &nbsp;<span style="color: #000000;">858</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>longest request<span style="color: #7a0874; font-weight: bold;">&#41;</span></div></div>
<p>W000t&#8230;. that&#8217;s a lot quicker, almost 4 times as fast. Nice <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/apache-2-2-and-php-configuration-fun-on-slackware-13/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Wordpress hits 2.9 with another failed auto-upgrade.</title>
		<link>http://notes.benv.junerules.com/all/software/wordpress-hits-2-9-with-another-failed-auto-upgrade/</link>
		<comments>http://notes.benv.junerules.com/all/software/wordpress-hits-2-9-with-another-failed-auto-upgrade/#comments</comments>
		<pubDate>Mon, 21 Dec 2009 18:15:38 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=665</guid>
		<description><![CDATA[Here we go again, wordpress has an update to version 2.9 this time.
New features include &#8220;automatic database optimization support&#8221;, which you can enable by putting define('WP_ALLOW_REPAIR', true); in your wp-config.php file.
The rest you&#8217;ll run into yourself, it&#8217;s a ton of new stuff and fixes but some cool stuff like a built-in image editor and easier [...]]]></description>
			<content:encoded><![CDATA[<p>Here we go <a href="http://notes.benv.junerules.com/software/another-wordpress-update/">again</a>, wordpress has an <a href="http://wordpress.org/development/2009/12/wordpress-2-9/">update to version 2.9</a> this time.</p>
<p>New features include &#8220;automatic database optimization support&#8221;, which you can enable by putting <code class="codecolorer text vibrant"><span class="text">define('WP_ALLOW_REPAIR', true);</span></code> in your <span style="color:#FF00FF">wp-config.php</span> file.<br />
The rest you&#8217;ll run into yourself, it&#8217;s a ton of new stuff and fixes but some cool stuff like a built-in image editor and easier embedding of your favorite youtube junk.</p>
<p>Needless to say the automatic upgrade failed AGAIN for me:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Downloading update from http:<span style="color: #000000; font-weight: bold;">//</span>wordpress.org<span style="color: #000000; font-weight: bold;">/</span>wordpress-2.9.zip.<br />
<br />
Download failed.: Operation timed out after <span style="color: #000000;">60</span> seconds with <span style="color: #000000;">1560944</span> bytes received<br />
<br />
Installation Failed</div></div>
<p>Fortunately, my previous patch still works. Get it <a href="http://notes.benv.junerules.com/wp-content/plugins/download-monitor/download.php?id=wordpress-auto-update-timeout.diff">here</a> if you want.</p>
<p>After patching that single line the automagic upgrade ended with: <span style="color:#FF0000">WordPress upgraded successfully</span>. Jeeeej.<br />
However, they still left the timeout at 60 seconds in the newer version <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;"># grep wp_remote_get wp-admin/includes/file.php</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #007800;">$response</span> = wp_remote_get<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #007800;">$url</span>, array<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #ff0000;">'timeout'</span> =<span style="color: #000000; font-weight: bold;">&gt;</span> 60<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>;</div></div>
<p>Failers. They deserve a 56k6 modem for their servers so they can find out about these issues themselves <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/wordpress-hits-2-9-with-another-failed-auto-upgrade/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Gears on Slackware 64 and firefox</title>
		<link>http://notes.benv.junerules.com/all/software/google-gears-on-slackware-64-and-firefox/</link>
		<comments>http://notes.benv.junerules.com/all/software/google-gears-on-slackware-64-and-firefox/#comments</comments>
		<pubDate>Mon, 14 Dec 2009 21:05:41 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[gears]]></category>
		<category><![CDATA[slackware]]></category>
		<category><![CDATA[x86_64]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=646</guid>
		<description><![CDATA[Don&#8217;t ask me why, but for some greasemonkey script that I wanted to run in Firefox I needed Google Gears.
So I went to the gears site with Firefox, and it told me that it needed to install some plugin. Yeah, whatever.
I hit the big Install Gears button, completely ignoring the tiny and almost invisible for [...]]]></description>
			<content:encoded><![CDATA[<p>Don&#8217;t ask me why, but for some greasemonkey script that I wanted to run in Firefox I needed <a href="http://gears.google.com/">Google Gears</a>.<br />
So I went to the gears site with Firefox, and it told me that it needed to install some plugin. Yeah, whatever.<br />
I hit the big <span style="color:#3333FF">Install Gears</span> button, completely ignoring the tiny and almost invisible for my eyes <span style="font-size: 1px; color:#333333">32-bit OS (64-bit not supported)</span> notice below it.<br />
Needless to say it went on to download a 3.5Mb package, started some popups and other junk after which it notified me of my grave mistake.<br />
Aha. So for some reason Google is too incompetent to work with 64 bits software&#8230;. even microsoft can deal with that these days guys, geesh.<span id="more-646"></span></p>
<p>So not wanting to give up immediately I decided to google for it a bit, and noticed that the Pokemon OS guys do have a gears version for their 64 bit <a href="http://packages.ubuntu.com/karmic/gears">Karmic</a> and <a href="http://packages.ubuntu.com/lucid/gears">Lucid</a> releases. Well, that must mean it&#8217;s possible! I took a quick look at their .deb file and didn&#8217;t see anything shocking, so I decided to try and build gears from svn.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>janeman:~$ <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<br />
benv<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src$ <span style="color: #c20cb9; font-weight: bold;">svn</span> checkout http:<span style="color: #000000; font-weight: bold;">//</span>gears.googlecode.com<span style="color: #000000; font-weight: bold;">/</span>svn<span style="color: #000000; font-weight: bold;">/</span>trunk<span style="color: #000000; font-weight: bold;">/</span> google-gears-svn<br />
&nbsp;<span style="color: #666666; font-style: italic;"># A bunch of files get leeched here... Note that this was revision 3414.</span><br />
benv<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src$ <span style="color: #7a0874; font-weight: bold;">cd</span> google-gears-svn<span style="color: #000000; font-weight: bold;">/</span>gears<br />
benv<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>google-gears-svn<span style="color: #000000; font-weight: bold;">/</span>gears$ <span style="color: #c20cb9; font-weight: bold;">make</span><br />
&nbsp;<span style="color: #666666; font-style: italic;"># blabalbla until we hit:</span><br />
..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gecko_1.9<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>gecko_sdk<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>xpidl <span style="color: #660033;">-I</span> ..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gecko_1.9<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>gecko_sdk<span style="color: #000000; font-weight: bold;">/</span>idl <span style="color: #660033;">-I</span> ..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gecko_1.9 <span style="color: #660033;">-m</span> header <span style="color: #660033;">-o</span> bin-dbg<span style="color: #000000; font-weight: bold;">/</span>linux-x86_64<span style="color: #000000; font-weight: bold;">/</span>ff3<span style="color: #000000; font-weight: bold;">/</span>genfiles<span style="color: #000000; font-weight: bold;">/</span>interfaces base<span style="color: #000000; font-weight: bold;">/</span>firefox<span style="color: #000000; font-weight: bold;">/</span>interfaces.idl<br />
<span style="color: #c20cb9; font-weight: bold;">make</span><span style="color: #7a0874; font-weight: bold;">&#91;</span>1<span style="color: #7a0874; font-weight: bold;">&#93;</span>: ..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gecko_1.9<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>gecko_sdk<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>xpidl: Command not found<br />
<span style="color: #c20cb9; font-weight: bold;">make</span><span style="color: #7a0874; font-weight: bold;">&#91;</span>1<span style="color: #7a0874; font-weight: bold;">&#93;</span>: <span style="color: #000000; font-weight: bold;">***</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>bin-dbg<span style="color: #000000; font-weight: bold;">/</span>linux-x86_64<span style="color: #000000; font-weight: bold;">/</span>ff3<span style="color: #000000; font-weight: bold;">/</span>genfiles<span style="color: #000000; font-weight: bold;">/</span>interfaces.h<span style="color: #7a0874; font-weight: bold;">&#93;</span> Error 127<br />
<span style="color: #c20cb9; font-weight: bold;">make</span>: <span style="color: #000000; font-weight: bold;">***</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>default<span style="color: #7a0874; font-weight: bold;">&#93;</span> Error <span style="color: #000000;">2</span></div></div>
<p>Command not found? huh?</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>janeman:~$ <span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #660033;">-la</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>google-gears-svn<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gecko_1.9<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>gecko_sdk<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>xpidl<br />
<span style="color: #660033;">-rwxr-xr-x</span> 1 benv <span style="color: #c20cb9; font-weight: bold;">users</span> <span style="color: #000000;">80542</span> <span style="color: #000000;">2009</span>-<span style="color: #000000;">12</span>-<span style="color: #000000;">14</span> <span style="color: #000000;">17</span>:<span style="color: #000000;">26</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>google-gears-svn<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gecko_1.9<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>gecko_sdk<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>xpidl<span style="color: #000000; font-weight: bold;">*</span></div></div>
<p>It&#8217;s right there&#8230;. ohhh, probably a 32 bit issue.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>janeman:~$ <span style="color: #c20cb9; font-weight: bold;">file</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>google-gears-svn<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gecko_1.9<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>gecko_sdk<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>xpidl<br />
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>google-gears-svn<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gecko_1.9<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>gecko_sdk<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>xpidl: ELF <span style="color: #000000;">32</span>-bit LSB executable, Intel <span style="color: #000000;">80386</span>, version <span style="color: #000000;">1</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>SYSV<span style="color: #7a0874; font-weight: bold;">&#41;</span>, dynamically linked <span style="color: #7a0874; font-weight: bold;">&#40;</span>uses shared libs<span style="color: #7a0874; font-weight: bold;">&#41;</span>, not stripped</div></div>
<p>So maybe THAT&#8217;s why they&#8217;re incompetent (read: lazy). Let&#8217;s see if we can get xipdl in a way that doesn&#8217;t need ancient 32 bit rubbish <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
Mozilla has some stuff about that tool <a href="https://developer.mozilla.org/en/XPIDL/xpidl">here</a>. However, actually finding the download link for the source of that tool is challenging.<br />
I&#8217;ll save you the trouble, you can get it here: <a href="ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/latest/source">ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/latest/source/</a>. Be aware, it&#8217;s a whopping 45MB download. That&#8217;s right, in the firefox sources.<br />
Let&#8217;s see if it compiles:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>us<span style="color: #000000; font-weight: bold;">/</span>src$ <span style="color: #c20cb9; font-weight: bold;">tar</span> jxvf firefox-3.5.5.source.tar.bz2 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp;<span style="color: #666666; font-style: italic;"># loads of mozilla</span><br />
benv<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>us<span style="color: #000000; font-weight: bold;">/</span>src$ <span style="color: #7a0874; font-weight: bold;">cd</span> mozilla-1.9.1 <span style="color: #666666; font-style: italic;"># What the heck, either rename your tarball or your dir... oh well</span><br />
benv<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>us<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>mozilla-1.9.1$ .<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--enable-application</span>=xpcom<br />
&nbsp;<span style="color: #666666; font-style: italic;"># heaps of output</span><br />
benv<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>us<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>mozilla-1.9.1$ <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #660033;">-C</span> config<br />
&nbsp;<span style="color: #666666; font-style: italic;"># junk junk</span><br />
benv<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>us<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>mozilla-1.9.1$ <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #660033;">-C</span> nsprpub<br />
&nbsp;<span style="color: #666666; font-style: italic;"># even more landfill</span><br />
benv<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>us<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>mozilla-1.9.1$ <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #660033;">-C</span> xpcom<span style="color: #000000; font-weight: bold;">/</span>typelib<br />
&nbsp;<span style="color: #666666; font-style: italic;"># finally something useful</span></div></div>
<p>After this we finally have a working xpidl executable that is actually 64 bits.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>us<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>mozilla-1.9.1$ <span style="color: #c20cb9; font-weight: bold;">file</span> xpcom<span style="color: #000000; font-weight: bold;">/</span>typelib<span style="color: #000000; font-weight: bold;">/</span>xpidl<span style="color: #000000; font-weight: bold;">/</span>xpidl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />
xpcom<span style="color: #000000; font-weight: bold;">/</span>typelib<span style="color: #000000; font-weight: bold;">/</span>xpidl<span style="color: #000000; font-weight: bold;">/</span>xpidl: ELF <span style="color: #000000;">64</span>-bit LSB executable, x86-<span style="color: #000000;">64</span>, version <span style="color: #000000;">1</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>SYSV<span style="color: #7a0874; font-weight: bold;">&#41;</span>, dynamically linked <span style="color: #7a0874; font-weight: bold;">&#40;</span>uses shared libs<span style="color: #7a0874; font-weight: bold;">&#41;</span>, not stripped</div></div>
<p>Back to GEARS! The easiest way I could determine to get it to work was replacing their xipdl with our new version. I&#8217;m sure there&#8217;s an easier way through setting an environment variable or something, but I got tired of their Makefile includes and third party libraries before I could work that out. The easy way:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>janeman:~$ <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>google-gears-svn<span style="color: #000000; font-weight: bold;">/</span>gears<br />
benv<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>us<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>google-gears-svn<span style="color: #000000; font-weight: bold;">/</span>gears$ <span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-sf</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>mozilla-1.9.1<span style="color: #000000; font-weight: bold;">/</span>xpcom<span style="color: #000000; font-weight: bold;">/</span>typelib<span style="color: #000000; font-weight: bold;">/</span>xpidl<span style="color: #000000; font-weight: bold;">/</span>xpidl <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>google-gears-svn<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gecko_1.9.1<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>gecko_sdk<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>xpidl<br />
benv<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>us<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>google-gears-svn<span style="color: #000000; font-weight: bold;">/</span>gears$ <span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-sf</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>mozilla-1.9.1<span style="color: #000000; font-weight: bold;">/</span>xpcom<span style="color: #000000; font-weight: bold;">/</span>typelib<span style="color: #000000; font-weight: bold;">/</span>xpt<span style="color: #000000; font-weight: bold;">/</span>tools<span style="color: #000000; font-weight: bold;">/</span>xpt_link <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>google-gears-svn<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gecko_1.9.1<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>gecko_sdk<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>xpt_link<br />
benv<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>us<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>google-gears-svn<span style="color: #000000; font-weight: bold;">/</span>gears$ <span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-sf</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>mozilla-1.9.1<span style="color: #000000; font-weight: bold;">/</span>xpcom<span style="color: #000000; font-weight: bold;">/</span>typelib<span style="color: #000000; font-weight: bold;">/</span>xpt<span style="color: #000000; font-weight: bold;">/</span>tools<span style="color: #000000; font-weight: bold;">/</span>xpt_dump <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>google-gears-svn<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gecko_1.9.1<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>gecko_sdk<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>xpt_dump<br />
benv<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>us<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>google-gears-svn<span style="color: #000000; font-weight: bold;">/</span>gears$ <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #007800;">BROWSER</span>=FF31<br />
&nbsp;<span style="color: #666666; font-style: italic;"># Make now passes the xipdl test. Next error:</span><br />
<span style="color: #c20cb9; font-weight: bold;">g++</span> -I.. -Ibin-dbg<span style="color: #000000; font-weight: bold;">/</span>linux-x86_64<span style="color: #000000; font-weight: bold;">/</span>ff31 -Ibin-dbg<span style="color: #000000; font-weight: bold;">/</span>linux-x86_64<span style="color: #000000; font-weight: bold;">/</span>common -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>npapi -I..<span style="color: #000000; font-weight: bold;">/</span>third_party -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>googleurl -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>icu38<span style="color: #000000; font-weight: bold;">/</span>public<span style="color: #000000; font-weight: bold;">/</span>common -DPNG_USER_CONFIG -DCHROME_PNG_WRITE_SUPPORT -DGEARS_PNG_BUILD &nbsp;-I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>zlib -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>skia<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>core -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>skia<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>images -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>skia<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>utils -DNO_GZIP -DNO_GZCOMPRESS <span style="color: #660033;">-DLINUX</span> -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gtk<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>gtk-2.0 -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gtk<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>atk-1.0 -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gtk<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>glib-2.0 -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gtk<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>pango-1.0 -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gtk<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>cairo -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gtk<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>gtk-2.0<span style="color: #000000; font-weight: bold;">/</span>include -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gtk<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>glib-2.0<span style="color: #000000; font-weight: bold;">/</span>include &nbsp;<span style="color: #660033;">-DDEBUG</span>=1 -DUSING_CCTESTS=1 -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gtest<span style="color: #000000; font-weight: bold;">/</span>include -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gtest <span style="color: #660033;">-c</span> <span style="color: #660033;">-o</span> bin-dbg<span style="color: #000000; font-weight: bold;">/</span>linux-x86_64<span style="color: #000000; font-weight: bold;">/</span>common<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>url_parse.o <span style="color: #660033;">-fPIC</span> <span style="color: #660033;">-fmessage-length</span>=0 <span style="color: #660033;">-Wall</span> <span style="color: #660033;">-Werror</span> <span style="color: #660033;">-g</span> <span style="color: #660033;">-O0</span> <span style="color: #660033;">-fshort-wchar</span> <span style="color: #660033;">-fno-exceptions</span> <span style="color: #660033;">-fno-rtti</span> <span style="color: #660033;">-Wno-non-virtual-dtor</span> <span style="color: #660033;">-Wno-ctor-dtor-privacy</span> <span style="color: #660033;">-funsigned-char</span> <span style="color: #660033;">-Wno-char-subscripts</span> &nbsp; ..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>googleurl<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>url_parse.cc<br />
..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>googleurl<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>url_parse.cc: In <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #ff0000;">'int url_parse::&lt;unnamed&gt;::DoParsePort(const CHAR*, const url_parse::Component&amp;)'</span>:<br />
..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>googleurl<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>url_parse.cc:<span style="color: #000000;">479</span>: error: there are no arguments to <span style="color: #ff0000;">'atoi'</span> that depend on a template parameter, so a declaration of <span style="color: #ff0000;">'atoi'</span> must be available<br />
..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>googleurl<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>url_parse.cc:479: error: <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000; font-weight: bold;">if</span> you use <span style="color: #ff0000;">'-fpermissive'</span>, G++ will accept your code, but allowing the use of an undeclared name is deprecated<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>googleurl<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>url_parse.cc: In <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #ff0000;">'int url_parse::&lt;unnamed&gt;::DoParsePort(const CHAR*, const url_parse::Component&amp;) [with CHAR = char]'</span>:<br />
..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>googleurl<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>url_parse.cc:<span style="color: #000000;">674</span>: &nbsp; instantiated from here<br />
..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>googleurl<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>url_parse.cc:<span style="color: #000000;">479</span>: error: <span style="color: #ff0000;">'atoi'</span> was not declared <span style="color: #000000; font-weight: bold;">in</span> this scope<br />
..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>googleurl<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>url_parse.cc: In <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #ff0000;">'int url_parse::&lt;unnamed&gt;::DoParsePort(const CHAR*, const url_parse::Component&amp;) [with CHAR = url_parse::UTF16Char]'</span>:<br />
..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>googleurl<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>url_parse.cc:<span style="color: #000000;">678</span>: &nbsp; instantiated from here<br />
..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>googleurl<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>url_parse.cc:<span style="color: #000000;">479</span>: error: <span style="color: #ff0000;">'atoi'</span> was not declared <span style="color: #000000; font-weight: bold;">in</span> this scope<br />
<span style="color: #c20cb9; font-weight: bold;">make</span><span style="color: #7a0874; font-weight: bold;">&#91;</span>1<span style="color: #7a0874; font-weight: bold;">&#93;</span>: <span style="color: #000000; font-weight: bold;">***</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>bin-dbg<span style="color: #000000; font-weight: bold;">/</span>linux-x86_64<span style="color: #000000; font-weight: bold;">/</span>common<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>url_parse.o<span style="color: #7a0874; font-weight: bold;">&#93;</span> Error 1<br />
<span style="color: #c20cb9; font-weight: bold;">make</span>: <span style="color: #000000; font-weight: bold;">***</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>default<span style="color: #7a0874; font-weight: bold;">&#93;</span> Error <span style="color: #000000;">2</span></div></div>
<p>Ghoooh, idiots. Maybe they should invest in a configure script or something. After messing with environment variables for a while, I decided that their Makefiles are about as kanker as their effort of giving us a 64 bit package in the first place.  I would expect to be able to set <code class="codecolorer bash vibrant"><span class="bash"><span style="color: #007800;">CXXFLAGS</span>=<span style="color: #ff0000;">&quot;-include /usr/include/stdlib.h&quot;</span></span></code>, but that was completely ignored. CPPFLAGS did seem to work however. Since another file missed another include, I added that as well.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>us<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>google-gears-svn<span style="color: #000000; font-weight: bold;">/</span>gears$ <span style="color: #007800;">CPPFLAGS</span>=<span style="color: #ff0000;">&quot;-include /usr/include/stdlib.h -include /usr/include/string.h -include /usr/include/limits.h&quot;</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #007800;">BROWSER</span>=FF31<br />
&nbsp;<span style="color: #666666; font-style: italic;"># Onto the next error</span><br />
<span style="color: #c20cb9; font-weight: bold;">g++</span> <span style="color: #660033;">-include</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>stdlib.h <span style="color: #660033;">-include</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>string.h <span style="color: #660033;">-include</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>limits.h -I.. <span style="color: #660033;">-I</span> -Ibin-dbg<span style="color: #000000; font-weight: bold;">/</span>linux-x86_64<span style="color: #000000; font-weight: bold;">/</span>common -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>npapi -I..<span style="color: #000000; font-weight: bold;">/</span>third_party -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>googleurl -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>icu38<span style="color: #000000; font-weight: bold;">/</span>public<span style="color: #000000; font-weight: bold;">/</span>common -DPNG_USER_CONFIG -DCHROME_PNG_WRITE_SUPPORT -DGEARS_PNG_BUILD &nbsp;-I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>zlib -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>skia<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>core -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>skia<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>images -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>skia<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>utils -DNO_GZIP -DNO_GZCOMPRESS <span style="color: #660033;">-DLINUX</span> -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gtk<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>gtk-2.0 -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gtk<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>atk-1.0 -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gtk<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>glib-2.0 -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gtk<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>pango-1.0 -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gtk<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>cairo -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gtk<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>gtk-2.0<span style="color: #000000; font-weight: bold;">/</span>include -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gtk<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>glib-2.0<span style="color: #000000; font-weight: bold;">/</span>include &nbsp;<span style="color: #660033;">-DDEBUG</span>=1 -DUSING_CCTESTS=1 -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gtest<span style="color: #000000; font-weight: bold;">/</span>include -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gtest -I.. -Ibin-dbg<span style="color: #000000; font-weight: bold;">/</span>linux-x86_64<span style="color: #000000; font-weight: bold;">/</span>ff3 -Ibin-dbg<span style="color: #000000; font-weight: bold;">/</span>linux-x86_64<span style="color: #000000; font-weight: bold;">/</span>common -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>npapi -I..<span style="color: #000000; font-weight: bold;">/</span>third_party -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>googleurl -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>icu38<span style="color: #000000; font-weight: bold;">/</span>public<span style="color: #000000; font-weight: bold;">/</span>common -DPNG_USER_CONFIG -DCHROME_PNG_WRITE_SUPPORT -DGEARS_PNG_BUILD &nbsp;-I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>zlib -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>skia<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>core -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>skia<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>images -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>skia<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>utils -DNO_GZIP -DNO_GZCOMPRESS <span style="color: #660033;">-DLINUX</span> -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gtk<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>gtk-2.0 -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gtk<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>atk-1.0 -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gtk<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>glib-2.0 -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gtk<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>pango-1.0 -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gtk<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>cairo -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gtk<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>gtk-2.0<span style="color: #000000; font-weight: bold;">/</span>include -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gtk<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>glib-2.0<span style="color: #000000; font-weight: bold;">/</span>include &nbsp;<span style="color: #660033;">-DDEBUG</span>=1 -DUSING_CCTESTS=1 -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gtest<span style="color: #000000; font-weight: bold;">/</span>include -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gtest <span style="color: #660033;">-c</span> <span style="color: #660033;">-o</span> bin-dbg<span style="color: #000000; font-weight: bold;">/</span>linux-x86_64<span style="color: #000000; font-weight: bold;">/</span>ff3<span style="color: #000000; font-weight: bold;">/</span>module.o <span style="color: #660033;">-fPIC</span> <span style="color: #660033;">-fmessage-length</span>=0 <span style="color: #660033;">-Wall</span> <span style="color: #660033;">-Werror</span> <span style="color: #660033;">-g</span> <span style="color: #660033;">-O0</span> <span style="color: #660033;">-fshort-wchar</span> <span style="color: #660033;">-fno-exceptions</span> <span style="color: #660033;">-fno-rtti</span> <span style="color: #660033;">-Wno-non-virtual-dtor</span> <span style="color: #660033;">-Wno-ctor-dtor-privacy</span> <span style="color: #660033;">-funsigned-char</span> <span style="color: #660033;">-Wno-char-subscripts</span> -DBROWSER_FF3=1 -DJS_THREADSAFE -DBROWSER_FF=1 -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gecko_1.9 -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gecko_1.9<span style="color: #000000; font-weight: bold;">/</span>linux -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gecko_1.9<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>gecko_sdk<span style="color: #000000; font-weight: bold;">/</span>include -DMOZILLA_STRICT_API &nbsp;base<span style="color: #000000; font-weight: bold;">/</span>firefox<span style="color: #000000; font-weight: bold;">/</span>module.cc<br />
In <span style="color: #c20cb9; font-weight: bold;">file</span> included from ..<span style="color: #000000; font-weight: bold;">/</span>gears<span style="color: #000000; font-weight: bold;">/</span>factory<span style="color: #000000; font-weight: bold;">/</span>factory_ff.h:<span style="color: #000000;">29</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;from base<span style="color: #000000; font-weight: bold;">/</span>firefox<span style="color: #000000; font-weight: bold;">/</span>module.cc:<span style="color: #000000;">46</span>:<br />
bin-dbg<span style="color: #000000; font-weight: bold;">/</span>linux-x86_64<span style="color: #000000; font-weight: bold;">/</span>ff31<span style="color: #000000; font-weight: bold;">/</span>genfiles<span style="color: #000000; font-weight: bold;">/</span>interfaces.h:<span style="color: #000000;">33</span>: error: expected <span style="color: #ff0000;">','</span> or <span style="color: #ff0000;">'...'</span> before <span style="color: #ff0000;">'NS_OUTPARAM'</span><br />
bin-dbg<span style="color: #000000; font-weight: bold;">/</span>linux-x86_64<span style="color: #000000; font-weight: bold;">/</span>ff31<span style="color: #000000; font-weight: bold;">/</span>genfiles<span style="color: #000000; font-weight: bold;">/</span>interfaces.h:<span style="color: #000000;">106</span>: error: expected <span style="color: #ff0000;">','</span> or <span style="color: #ff0000;">'...'</span> before <span style="color: #ff0000;">'NS_OUTPARAM'</span><br />
bin-dbg<span style="color: #000000; font-weight: bold;">/</span>linux-x86_64<span style="color: #000000; font-weight: bold;">/</span>ff31<span style="color: #000000; font-weight: bold;">/</span>genfiles<span style="color: #000000; font-weight: bold;">/</span>interfaces.h:<span style="color: #000000;">109</span>: error: expected <span style="color: #ff0000;">','</span> or <span style="color: #ff0000;">'...'</span> before <span style="color: #ff0000;">'NS_OUTPARAM'</span><br />
bin-dbg<span style="color: #000000; font-weight: bold;">/</span>linux-x86_64<span style="color: #000000; font-weight: bold;">/</span>ff31<span style="color: #000000; font-weight: bold;">/</span>genfiles<span style="color: #000000; font-weight: bold;">/</span>interfaces.h:<span style="color: #000000;">112</span>: error: expected <span style="color: #ff0000;">','</span> or <span style="color: #ff0000;">'...'</span> before <span style="color: #ff0000;">'NS_OUTPARAM'</span><br />
<span style="color: #c20cb9; font-weight: bold;">make</span><span style="color: #7a0874; font-weight: bold;">&#91;</span>1<span style="color: #7a0874; font-weight: bold;">&#93;</span>: <span style="color: #000000; font-weight: bold;">***</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>bin-dbg<span style="color: #000000; font-weight: bold;">/</span>linux-x86_64<span style="color: #000000; font-weight: bold;">/</span>ff31<span style="color: #000000; font-weight: bold;">/</span>module.o<span style="color: #7a0874; font-weight: bold;">&#93;</span> Error 1<br />
<span style="color: #c20cb9; font-weight: bold;">make</span>: <span style="color: #000000; font-weight: bold;">***</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>default<span style="color: #7a0874; font-weight: bold;">&#93;</span> Error <span style="color: #000000;">2</span></div></div>
<p>RAAAH, this keeps getting better and better. This fix was simple enough, simply edit that header file and remove all occurances of &#8216;NS_OUTPARAM&#8217;, whatever the heck that might be:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>us<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>google-gears-svn<span style="color: #000000; font-weight: bold;">/</span>gears$ <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #660033;">-ie</span> <span style="color: #ff0000;">'s/NS_OUTPARAM//g'</span> bin-dbg<span style="color: #000000; font-weight: bold;">/</span>linux-x86_64<span style="color: #000000; font-weight: bold;">/</span>ff3<span style="color: #000000; font-weight: bold;">/</span>genfiles<span style="color: #000000; font-weight: bold;">/</span>interfaces.h<br />
benv<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>us<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>google-gears-svn<span style="color: #000000; font-weight: bold;">/</span>gears$ <span style="color: #007800;">CPPFLAGS</span>=<span style="color: #ff0000;">&quot;-include /usr/include/stdlib.h -include /usr/include/string.h -include /usr/include/limits.h&quot;</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #007800;">BROWSER</span>=FF31<br />
&nbsp;<span style="color: #666666; font-style: italic;"># And it goes on</span><br />
cc1plus: warnings being treated <span style="color: #c20cb9; font-weight: bold;">as</span> errors<br />
desktop<span style="color: #000000; font-weight: bold;">/</span>desktop.cc: In member <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #ff0000;">'bool Desktop::ValidateShortcutInfo(Desktop::ShortcutInfo*, bool)'</span>:<br />
desktop<span style="color: #000000; font-weight: bold;">/</span>desktop.cc:222: error: suggest parentheses around <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> within <span style="color: #000000; font-weight: bold;">||</span><br />
desktop<span style="color: #000000; font-weight: bold;">/</span>desktop.cc:224: error: suggest parentheses around <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> within <span style="color: #000000; font-weight: bold;">||</span><br />
desktop<span style="color: #000000; font-weight: bold;">/</span>desktop.cc:226: error: suggest parentheses around <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> within <span style="color: #000000; font-weight: bold;">||</span><br />
<span style="color: #c20cb9; font-weight: bold;">make</span><span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: <span style="color: #000000; font-weight: bold;">***</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>bin-dbg<span style="color: #000000; font-weight: bold;">/</span>linux-x86_64<span style="color: #000000; font-weight: bold;">/</span>ff31<span style="color: #000000; font-weight: bold;">/</span>desktop.o<span style="color: #7a0874; font-weight: bold;">&#93;</span> Error <span style="color: #000000;">1</span></div></div>
<p>Aha, they request warnings to be error by default. Seems like running it with MODE=opt fixes this issue.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>us<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>google-gears-svn<span style="color: #000000; font-weight: bold;">/</span>gears$ <span style="color: #007800;">CPPFLAGS</span>=<span style="color: #ff0000;">&quot;-include /usr/include/stdlib.h -include /usr/include/string.h -include /usr/include/limits.h&quot;</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #007800;">MODE</span>=opt <span style="color: #007800;">BROWSER</span>=FF31<br />
&nbsp;<span style="color: #666666; font-style: italic;"># Ha, but even this fails</span><br />
cc1: warnings being treated <span style="color: #c20cb9; font-weight: bold;">as</span> errors<br />
..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>sqlite_google<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>mutex_unix.c: In <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #ff0000;">'pthreadMutexAlloc'</span>:<br />
..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>sqlite_google<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>mutex_unix.c:142: error: implicit declaration of <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #ff0000;">'pthread_mutexattr_settype'</span><br />
..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>sqlite_google<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>mutex_unix.c:<span style="color: #000000;">142</span>: error: <span style="color: #ff0000;">'PTHREAD_MUTEX_RECURSIVE'</span> undeclared <span style="color: #7a0874; font-weight: bold;">&#40;</span>first use <span style="color: #000000; font-weight: bold;">in</span> this <span style="color: #000000; font-weight: bold;">function</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>sqlite_google<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>mutex_unix.c:142: error: <span style="color: #7a0874; font-weight: bold;">&#40;</span>Each undeclared identifier is reported only once<br />
..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>sqlite_google<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>mutex_unix.c:142: error: <span style="color: #000000; font-weight: bold;">for</span> each <span style="color: #000000; font-weight: bold;">function</span> it appears in.<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<span style="color: #c20cb9; font-weight: bold;">make</span><span style="color: #7a0874; font-weight: bold;">&#91;</span>1<span style="color: #7a0874; font-weight: bold;">&#93;</span>: <span style="color: #000000; font-weight: bold;">***</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>bin-opt<span style="color: #000000; font-weight: bold;">/</span>linux-x86_64<span style="color: #000000; font-weight: bold;">/</span>common<span style="color: #000000; font-weight: bold;">/</span>sqlite<span style="color: #000000; font-weight: bold;">/</span>mutex_unix.o<span style="color: #7a0874; font-weight: bold;">&#93;</span> Error 1<br />
<span style="color: #c20cb9; font-weight: bold;">make</span>: <span style="color: #000000; font-weight: bold;">***</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>default<span style="color: #7a0874; font-weight: bold;">&#93;</span> Error <span style="color: #000000;">2</span></div></div>
<p>GODQ@#($*@#*^%^&#038; STUPID &#8230; *tries to contain the daemon within* &#8230; *RAAAGE*. Another missing include&#8230;. *sigh*</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>us<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>google-gears-svn<span style="color: #000000; font-weight: bold;">/</span>gears$ <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #660033;">-ie</span> <span style="color: #ff0000;">'s/-Wall//g'</span> tools<span style="color: #000000; font-weight: bold;">/</span>config.mk<br />
benv<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>us<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>google-gears-svn<span style="color: #000000; font-weight: bold;">/</span>gears$ <span style="color: #007800;">CPPFLAGS</span>=<span style="color: #ff0000;">&quot;-include /usr/include/stdlib.h -include /usr/include/string.h -include /usr/include/limits.h -include /usr/include/pthread.h -D_XOPEN_SOURCE=600&quot;</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #007800;">MODE</span>=opt <span style="color: #007800;">BROWSER</span>=FF31</div></div>
<p>Needless to say building an optimized version goes to another directory, so now you need to do the above NS_OUTPARAM thing again on the interfaces.h file in the bin-opt dir.<br />
Anyway, finally it compiled after messing with it for hours. Hopefully this log contains some useful info for you <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Last but not least, we still need to make an installer for it:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>us<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>google-gears-svn<span style="color: #000000; font-weight: bold;">/</span>gears$ <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #007800;">MODE</span>=opt <span style="color: #007800;">BROWSER</span>=FF31<br />
&nbsp;<span style="color: #666666; font-style: italic;"># some output here, nothing weird</span></div></div>
<p>Finally we end up with a <span style="color:#FF00FF">bin-opt/installers/gears-linux-x86_64-opt-0.5.34.0.xpi</span> that we can install in firefox. Phew.</p>
<p>Now what was I doing that needed gears anyway? &#8230; can&#8217;t remember. Feh.<br />
<div id="attachment_663" class="wp-caption alignnone" style="width: 310px"><a href="http://notes.benv.junerules.com/wp-content/uploads/2009/12/gears-working.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/12/gears-working-300x147.png" alt="Gears and Firefox 3.5.5 on Slackware 64" title="Gears and Firefox 3.5.5 on Slackware 64" width="300" height="147" class="size-medium wp-image-663" /></a><p class="wp-caption-text">Gears and Firefox 3.5.5 on Slackware 64</p></div></p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/google-gears-on-slackware-64-and-firefox/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ManageSieve</title>
		<link>http://notes.benv.junerules.com/all/software/managesieve/</link>
		<comments>http://notes.benv.junerules.com/all/software/managesieve/#comments</comments>
		<pubDate>Tue, 08 Dec 2009 11:45:01 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[dovecot]]></category>
		<category><![CDATA[managesieve]]></category>
		<category><![CDATA[sieve]]></category>
		<category><![CDATA[thunderbird]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=634</guid>
		<description><![CDATA[Time to continue our adventure into Sieve land from yesterday.
Yesterday the result was that Sieve scripts could be put in place by the system administrator and they work. Needless to say that&#8217;s cumbersome and we want users to handle it themselves.
To avoid all possible issues with opening up FTP / DAV / whatever, the clowns [...]]]></description>
			<content:encoded><![CDATA[<p>Time to continue <a href="http://notes.benv.junerules.com/all/software/qmail-vpopmail-dovecot-and-sieve/">our adventure into Sieve land</a> from yesterday.</p>
<p>Yesterday the result was that Sieve scripts could be put in place by the system administrator and they work. Needless to say that&#8217;s cumbersome and we want users to handle it themselves.<br />
To avoid all possible issues with opening up FTP / DAV / whatever, the clowns at Dovecot and the ietf have decided to create a new protocol for it. Currently still a draft, but it will be an official protocol called <a href="http://tools.ietf.org/id/draft-martin-managesieve-12.txt">ManageSieve</a>. <span id="more-634"></span></p>
<p>For Dovecot 1.2 it is still required to patch dovecot and then install the managesieve service. Feeling adventurous I&#8217;m going for the bleeding edge version again <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
First the patch:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>black:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>dovecot-sieve$ hg clone http:<span style="color: #000000; font-weight: bold;">//</span>hg.rename-it.nl<span style="color: #000000; font-weight: bold;">/</span>dovecot-<span style="color: #000000;">1.2</span>-managesieve-patch<span style="color: #000000; font-weight: bold;">/</span> dovecot-<span style="color: #000000;">1.2</span>-managesieve-patch-hg<br />
&nbsp;<span style="color: #000000; font-weight: bold;">*</span>leech leech<span style="color: #000000; font-weight: bold;">*</span><br />
&nbsp;<span style="color: #666666; font-style: italic;"># Next we create a copy of our installed dovecot that we can mess with</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>black:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>dovecot-sieve$ <span style="color: #7a0874; font-weight: bold;">cd</span> .. ; <span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #660033;">-ax</span> dovecot-1.2.8 dovecot-1.2.8-patched <br />
root<span style="color: #000000; font-weight: bold;">@</span>black:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src$ <span style="color: #7a0874; font-weight: bold;">cd</span> dovecot-1.2.8-patched<br />
&nbsp;<span style="color: #666666; font-style: italic;"># Apply the patch</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>black:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>dovecot-1.2.8-patched$ <span style="color: #c20cb9; font-weight: bold;">patch</span> <span style="color: #660033;">-p1</span> <span style="color: #000000; font-weight: bold;">&lt;</span> ..<span style="color: #000000; font-weight: bold;">/</span>dovecot-sieve<span style="color: #000000; font-weight: bold;">/</span>dovecot-1.2-managesieve-patch-hg<span style="color: #000000; font-weight: bold;">/</span>managesieve.patch <br />
patching <span style="color: #c20cb9; font-weight: bold;">file</span> README.managesieve<br />
patching <span style="color: #c20cb9; font-weight: bold;">file</span> dovecot-example.conf<br />
patching <span style="color: #c20cb9; font-weight: bold;">file</span> src<span style="color: #000000; font-weight: bold;">/</span>master<span style="color: #000000; font-weight: bold;">/</span>child-process.c<br />
patching <span style="color: #c20cb9; font-weight: bold;">file</span> src<span style="color: #000000; font-weight: bold;">/</span>master<span style="color: #000000; font-weight: bold;">/</span>child-process.h<br />
patching <span style="color: #c20cb9; font-weight: bold;">file</span> src<span style="color: #000000; font-weight: bold;">/</span>master<span style="color: #000000; font-weight: bold;">/</span>listener.c<br />
patching <span style="color: #c20cb9; font-weight: bold;">file</span> src<span style="color: #000000; font-weight: bold;">/</span>master<span style="color: #000000; font-weight: bold;">/</span>login-process.c<br />
patching <span style="color: #c20cb9; font-weight: bold;">file</span> src<span style="color: #000000; font-weight: bold;">/</span>master<span style="color: #000000; font-weight: bold;">/</span>mail-process.c<br />
patching <span style="color: #c20cb9; font-weight: bold;">file</span> src<span style="color: #000000; font-weight: bold;">/</span>master<span style="color: #000000; font-weight: bold;">/</span>main.c<br />
patching <span style="color: #c20cb9; font-weight: bold;">file</span> src<span style="color: #000000; font-weight: bold;">/</span>master<span style="color: #000000; font-weight: bold;">/</span>master-settings-defs.c<br />
patching <span style="color: #c20cb9; font-weight: bold;">file</span> src<span style="color: #000000; font-weight: bold;">/</span>master<span style="color: #000000; font-weight: bold;">/</span>master-settings.c<br />
Hunk <span style="color: #666666; font-style: italic;">#8 succeeded at 1066 (offset 8 lines).</span><br />
Hunk <span style="color: #666666; font-style: italic;">#10 succeeded at 1372 (offset 8 lines).</span><br />
Hunk <span style="color: #666666; font-style: italic;">#12 succeeded at 1397 (offset 8 lines).</span><br />
Hunk <span style="color: #666666; font-style: italic;">#14 succeeded at 1470 (offset 8 lines).</span><br />
Hunk <span style="color: #666666; font-style: italic;">#16 succeeded at 1605 (offset 8 lines).</span><br />
Hunk <span style="color: #666666; font-style: italic;">#18 succeeded at 1654 (offset 8 lines).</span><br />
Hunk <span style="color: #666666; font-style: italic;">#20 succeeded at 1696 (offset 8 lines).</span><br />
Hunk <span style="color: #666666; font-style: italic;">#22 succeeded at 1958 (offset 8 lines).</span><br />
patching <span style="color: #c20cb9; font-weight: bold;">file</span> src<span style="color: #000000; font-weight: bold;">/</span>master<span style="color: #000000; font-weight: bold;">/</span>master-settings.h<br />
&nbsp;<span style="color: #666666; font-style: italic;"># Seems like it applied cleanly. Let's recompile it! (pick your own configure string here)</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>black:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>dovecot-1.2.8-patched$ .<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--with-vpopmail</span> <span style="color: #660033;">--with-zlib</span> <span style="color: #660033;">--with-bzlib</span> <span style="color: #660033;">--without-passwd</span> <span style="color: #660033;">--without-passwd-file</span> <span style="color: #660033;">--without-shadow</span> <span style="color: #660033;">--without-pam</span> &nbsp;<span style="color: #660033;">--without-checkpassword</span> <span style="color: #660033;">--without-bsdauth</span> <span style="color: #660033;">--without-ldap</span> <span style="color: #660033;">--without-sia</span> <span style="color: #660033;">--without-static-userdb</span> <span style="color: #660033;">--without-prefetch-userdb</span> <span style="color: #660033;">--without-sql</span> <span style="color: #660033;">--without-pgsql</span> <span style="color: #660033;">--without-mysql</span> <span style="color: #660033;">--without-sqlite</span> <span style="color: #660033;">--without-nss</span><br />
&nbsp;<span style="color: #000000; font-weight: bold;">*</span> heaps of configure output <span style="color: #000000; font-weight: bold;">*</span><br />
&nbsp;<span style="color: #666666; font-style: italic;"># Clean up stuff from the old build, we want a clean build</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>black:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>dovecot-1.2.8-patched$ <span style="color: #c20cb9; font-weight: bold;">make</span> clean<br />
root<span style="color: #000000; font-weight: bold;">@</span>black:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>dovecot-1.2.8-patched$ <span style="color: #c20cb9; font-weight: bold;">make</span><br />
&nbsp;<span style="color: #666666; font-style: italic;"># Drink a cup of coffee, this could take a while</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>black:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>dovecot-1.2.8-patched$ <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>pkg ; <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #007800;">DESTDIR</span>=<span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>pkg <span style="color: #c20cb9; font-weight: bold;">install</span> ; <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>pkg ; makepkg <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>packages<span style="color: #000000; font-weight: bold;">/</span>dovecot-1.2.8-managesieve-i386-1.tgz</div></div>
<p>After upgrading to the new dovecot package we still have to put the managesieve service into place. Which we have to build first.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>black:~$ <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>dovecot-sieve<br />
root<span style="color: #000000; font-weight: bold;">@</span>black:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>dovecot-sieve$ hg clone http:<span style="color: #000000; font-weight: bold;">//</span>hg.rename-it.nl<span style="color: #000000; font-weight: bold;">/</span>dovecot-<span style="color: #000000;">1.2</span>-managesieve<span style="color: #000000; font-weight: bold;">/</span> dovecot-<span style="color: #000000;">1.2</span>-managesieve-hg<br />
&nbsp;<span style="color: #666666; font-style: italic;"># Leech leech</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>black:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>dovecot-sieve$ <span style="color: #7a0874; font-weight: bold;">cd</span> dovecot-1.2-managesieve-hg ; .<span style="color: #000000; font-weight: bold;">/</span>autogen.sh<br />
root<span style="color: #000000; font-weight: bold;">@</span>black:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>dovecot-sieve<span style="color: #000000; font-weight: bold;">/</span>dovecot-1.2-managesieve-hg$ .<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--with-dovecot</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>dovecot-1.2.8-patched <span style="color: #660033;">--with-dovecot-sieve</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>dovecot-sieve<span style="color: #000000; font-weight: bold;">/</span>dovecot-<span style="color: #000000;">1.2</span>-sieve-hg<br />
&nbsp;<span style="color: #666666; font-style: italic;"># Now to compile it</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>black:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>dovecot-sieve<span style="color: #000000; font-weight: bold;">/</span>dovecot-1.2-managesieve-hg$ <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #c20cb9; font-weight: bold;">mkdir</span> pkg <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #007800;">DESTDIR</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">pwd</span><span style="color: #000000; font-weight: bold;">`/</span>pkg <span style="color: #c20cb9; font-weight: bold;">install</span><br />
&nbsp;<span style="color: #666666; font-style: italic;"># And create a package</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>black:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>dovecot-sieve<span style="color: #000000; font-weight: bold;">/</span>dovecot-1.2-managesieve-hg$ <span style="color: #7a0874; font-weight: bold;">cd</span> pkg ; makepkg <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>packages<span style="color: #000000; font-weight: bold;">/</span>dovecot-<span style="color: #000000;">1.2</span>-managesieve-i386-1.tgz</div></div>
<p>Install the package and we&#8217;re almost done. All that&#8217;s left now is some configuration and kicking of services.<br />
As described <a href="http://wiki.dovecot.org/ManageSieve/Configuration">here</a> the biggest thing we need to do is add <span style="color:#00FFAA">managesieve</span> to the protocols line in <span style="color:#FF00FF">/etc/dovecot.conf</span>. Like this:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">protocols = imap imaps pop3 pop3s managesieve</div></div>
<p>By default this will steal port 2000 for incoming managesieve connections, but you can change that and a few other things in the dovecot.conf file if you like. Just add a section like this:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">## </span><br />
<span style="color: #666666; font-style: italic;">## ManageSieve settings</span><br />
<span style="color: #666666; font-style: italic;">##</span><br />
<br />
protocol managesieve <span style="color: #7a0874; font-weight: bold;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #666666; font-style: italic;"># listen = *:2000</span><br />
&nbsp; &nbsp; <span style="color: #666666; font-style: italic;"># login_executable = /usr/libexec/dovecot/managesieve-login</span><br />
&nbsp; &nbsp; <span style="color: #666666; font-style: italic;"># mail_executable = /usr/libexec/dovecot/managesieve</span><br />
&nbsp; &nbsp; <span style="color: #666666; font-style: italic;"># managesieve_max_line_length = 65536</span><br />
&nbsp; &nbsp; managesieve_logout_format = bytes <span style="color: #7a0874; font-weight: bold;">&#40;</span> <span style="color: #000000; font-weight: bold;">in</span>=<span style="color: #000000; font-weight: bold;">%</span>i : <span style="color: #007800;">out</span>=<span style="color: #000000; font-weight: bold;">%</span>o <span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #666666; font-style: italic;"># managesieve_implementation_string = dovecot</span><br />
<span style="color: #7a0874; font-weight: bold;">&#125;</span></div></div>
<p>And obviously you need to uncomment and change whatever you want to have broken <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> . I decided to stick to the defaults except for the log string.<br />
After these changes give a good hard kick to your dovecot daemon (since the binary changed with the patch I&#8217;m sure a HUP won&#8217;t cut it) and see what happens.<br />
Don&#8217;t forget to open up the managesieve port (<span style="color:#AAFF00">2000</span> by default) in your firewall!</p>
<p>Let&#8217;s see if it works:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>black:~$ telnet localhost <span style="color: #000000;">2000</span><br />
Trying 127.0.0.1...<br />
Connected to localhost.<br />
Escape character is <span style="color: #ff0000;">'^]'</span>.<br />
<span style="color: #ff0000;">&quot;IMPLEMENTATION&quot;</span> <span style="color: #ff0000;">&quot;dovecot&quot;</span><br />
<span style="color: #ff0000;">&quot;SIEVE&quot;</span> <span style="color: #ff0000;">&quot;comparator-i;octet comparator-i;ascii-casemap fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date&quot;</span><br />
<span style="color: #ff0000;">&quot;SASL&quot;</span> <span style="color: #ff0000;">&quot;PLAIN&quot;</span> &nbsp; <br />
<span style="color: #ff0000;">&quot;STARTTLS&quot;</span> &nbsp; &nbsp; &nbsp; <br />
<span style="color: #ff0000;">&quot;NOTIFY&quot;</span> <span style="color: #ff0000;">&quot;mailto&quot;</span><br />
<span style="color: #ff0000;">&quot;VERSION&quot;</span> <span style="color: #ff0000;">&quot;1.0&quot;</span> &nbsp;<br />
OK <span style="color: #ff0000;">&quot;Dovecot ready.&quot;</span></div></div>
<p>Looks good! Time to let users have some fun with molesting their stuff through Sieve <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
A quick test with the <a href="http://sieve.mozdev.org/installation.html">thunderbird sieve addon</a>:<br />
<div id="attachment_641" class="wp-caption alignnone" style="width: 310px"><a href="http://notes.benv.junerules.com/wp-content/uploads/2009/12/thunderbird-sieve-login.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/12/thunderbird-sieve-login-300x150.png" alt="Thunderbird Sieve Plugin 1" title="Thunderbird Sieve Plugin 1" width="300" height="150" class="size-medium wp-image-641" /></a><p class="wp-caption-text">Thunderbird Sieve Plugin 1</p></div><br />
Note that it required me to set the TLS to &#8216;Strict RFC style handshake&#8217; on the Sieve Options Compatibility page, otherwise it wouldn&#8217;t login.<br />
We can even molest our scripts with syntax checking, how nice:<br />
<div id="attachment_643" class="wp-caption alignnone" style="width: 310px"><a href="http://notes.benv.junerules.com/wp-content/uploads/2009/12/thunderbird-sieve-edit-script.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/12/thunderbird-sieve-edit-script-300x212.png" alt="Thunderbird Sieve plugin - edit script" title="Thunderbird Sieve plugin - edit script" width="300" height="212" class="size-medium wp-image-643" /></a><p class="wp-caption-text">Thunderbird Sieve plugin - edit script</p></div><br />
And underwater our log shows this:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">managesieve-login: Info: Login: <span style="color: #007800;">user</span>=<span style="color: #000000; font-weight: bold;">&lt;</span>benv-jemoeder<span style="color: #000000; font-weight: bold;">@</span>benv.junerules.com<span style="color: #000000; font-weight: bold;">&gt;</span>, <span style="color: #007800;">method</span>=PLAIN, <span style="color: #007800;">rip</span>=43.121.244.637, <span style="color: #007800;">lip</span>=280.649.21.50, TLS<br />
MANAGESIEVE<span style="color: #7a0874; font-weight: bold;">&#40;</span>benv-jemoeder<span style="color: #000000; font-weight: bold;">@</span>benv.junerules.com<span style="color: #7a0874; font-weight: bold;">&#41;</span>: Info: Effective <span style="color: #007800;">uid</span>=89, <span style="color: #007800;">gid</span>=89, <span style="color: #007800;">home</span>=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>vpopmail<span style="color: #000000; font-weight: bold;">/</span>domains<span style="color: #000000; font-weight: bold;">/</span>benv.junerules.com<span style="color: #000000; font-weight: bold;">/</span>benv<br />
MANAGESIEVE<span style="color: #7a0874; font-weight: bold;">&#40;</span>benv-jemoeder<span style="color: #000000; font-weight: bold;">@</span>benv.junerules.com<span style="color: #7a0874; font-weight: bold;">&#41;</span>: Info: sieve-storage: using active sieve script path: <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>vpopmail<span style="color: #000000; font-weight: bold;">/</span>domains<span style="color: #000000; font-weight: bold;">/</span>benv.junerules.com<span style="color: #000000; font-weight: bold;">/</span>benv<span style="color: #000000; font-weight: bold;">/</span>.sieve<span style="color: #000000; font-weight: bold;">/</span>dovecot.sieve<br />
MANAGESIEVE<span style="color: #7a0874; font-weight: bold;">&#40;</span>benv-jemoeder<span style="color: #000000; font-weight: bold;">@</span>benv.junerules.com<span style="color: #7a0874; font-weight: bold;">&#41;</span>: Info: sieve-storage: using sieve script storage directory: <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>vpopmail<span style="color: #000000; font-weight: bold;">/</span>domains<span style="color: #000000; font-weight: bold;">/</span>benv.junerules.com<span style="color: #000000; font-weight: bold;">/</span>benv<span style="color: #000000; font-weight: bold;">/</span>.sieve<br />
MANAGESIEVE<span style="color: #7a0874; font-weight: bold;">&#40;</span>benv-jemoeder<span style="color: #000000; font-weight: bold;">@</span>benv.junerules.com<span style="color: #7a0874; font-weight: bold;">&#41;</span>: Info: sieve-storage: relative path to sieve storage <span style="color: #000000; font-weight: bold;">in</span> active <span style="color: #c20cb9; font-weight: bold;">link</span>:<br />
MANAGESIEVE<span style="color: #7a0874; font-weight: bold;">&#40;</span>benv-jemoeder<span style="color: #000000; font-weight: bold;">@</span>benv.junerules.com<span style="color: #7a0874; font-weight: bold;">&#41;</span>: Warning: sieve-storage: Active sieve script symlink <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>vpopmail<span style="color: #000000; font-weight: bold;">/</span>domains<span style="color: #000000; font-weight: bold;">/</span>benv.junerules.com<span style="color: #000000; font-weight: bold;">/</span>benv<span style="color: #000000; font-weight: bold;">/</span>.sieve<span style="color: #000000; font-weight: bold;">/</span>dovecot.sieve is<br />
&nbsp;no symlink.<br />
MANAGESIEVE<span style="color: #7a0874; font-weight: bold;">&#40;</span>benv-jemoeder<span style="color: #000000; font-weight: bold;">@</span>benv.junerules.com<span style="color: #7a0874; font-weight: bold;">&#41;</span>: Info: sieve-storage: Moved active sieve script <span style="color: #c20cb9; font-weight: bold;">file</span> <span style="color: #ff0000;">'/home/vpopmail/domains/benv.junerules.com/benv/.sieve/dovecot.sieve'</span> <br />
to script storage <span style="color: #c20cb9; font-weight: bold;">as</span> <span style="color: #ff0000;">'/home/vpopmail/domains/benv.junerules.com/benv/.sieve/dovecot.orig.sieve'</span><br />
MANAGESIEVE<span style="color: #7a0874; font-weight: bold;">&#40;</span>benv-jemoeder<span style="color: #000000; font-weight: bold;">@</span>benv.junerules.com<span style="color: #7a0874; font-weight: bold;">&#41;</span>: Info: sieve-storage: nothing to rescue <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>vpopmail<span style="color: #000000; font-weight: bold;">/</span>domains<span style="color: #000000; font-weight: bold;">/</span>benv.junerules.com<span style="color: #000000; font-weight: bold;">/</span>benv<span style="color: #000000; font-weight: bold;">/</span>.sieve<span style="color: #000000; font-weight: bold;">/</span>dovecot.sieve.<br />
MANAGESIEVE<span style="color: #7a0874; font-weight: bold;">&#40;</span>benv-jemoeder<span style="color: #000000; font-weight: bold;">@</span>benv.junerules.com<span style="color: #7a0874; font-weight: bold;">&#41;</span>: Info: Disconnected: Logged out bytes <span style="color: #7a0874; font-weight: bold;">&#40;</span> <span style="color: #000000; font-weight: bold;">in</span>=746 : <span style="color: #007800;">out</span>=<span style="color: #000000;">1068</span> <span style="color: #7a0874; font-weight: bold;">&#41;</span></div></div>
<p>Works like a charm. And yeah, those warnings can be ignored, they&#8217;re there because of my meddling with scripts yesterday. How should I know it had to be a symlink :-p<br />
(after this session it was indeed a symlink, hitting the &#8216;active&#8217; button made it so).</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/managesieve/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Qmail + vpopmail + Dovecot and Sieve</title>
		<link>http://notes.benv.junerules.com/all/software/qmail-vpopmail-dovecot-and-sieve/</link>
		<comments>http://notes.benv.junerules.com/all/software/qmail-vpopmail-dovecot-and-sieve/#comments</comments>
		<pubDate>Mon, 07 Dec 2009 22:11:47 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[dovecot]]></category>
		<category><![CDATA[qmail]]></category>
		<category><![CDATA[sieve]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=621</guid>
		<description><![CDATA[Let&#8217;s start with a problem description. We start out with a -working- mailer:
A pretty simple qmail/vpopmail installation with Courier IMAP and the pop3d that comes with qmail. This is administered by users with the qmailadmin frontend and allows for creation of mailboxes and forwards by postmasters. Together with spamdyke and spamassassin it works pretty well. [...]]]></description>
			<content:encoded><![CDATA[<p>Let&#8217;s start with a problem description. We start out with a -working- mailer:<br />
A pretty simple qmail/vpopmail installation with Courier IMAP and the pop3d that comes with qmail. This is administered by users with the qmailadmin frontend and allows for creation of mailboxes and forwards by postmasters. Together with spamdyke and spamassassin it works pretty well. So why change it?</p>
<p>The problem: First of all, Courier is a piece of shit. The various parts of it have broken in various ways over the years (authd hanging for no apparent reason or suddenly eating a ton of memory, stuff like that). Not only that, but they decided that vpopmail wasn&#8217;t worth supporting anymore, so their latest release of courier-authlib simply doesn&#8217;t handle vpopmail anymore. (don&#8217;t ask me why, can&#8217;t find any details on it).<br />
Second of all, it would be cool to give our users the ability to create their own custom mail filters on our server. Stuff that you can do in thunderbird or through webmail, so they can setup their mailbox filters and vacation messages and whatever without me having to help them. (well&#8230;. we&#8217;ll see about that). Needless to say we could do that by giving them access to the .qmail files, but those are way out of their league. Not only that, it would be a security nightmare. So to solve that, we&#8217;re trying the <a href="http://en.wikipedia.org/wiki/Sieve_(mail_filtering_language)">Sieve</a> disaster. I mean language&#8230; or something.<span id="more-621"></span></p>
<p>Getting rid of Courier is really simple. Simply pull the harddisk out of your server and shake it a few times, then step on it and throw it out of the window (while still standing on top of it of course). If you did it properly you should now be wondering why the hell you follow instructions without thinking. However, if you do have a brain, you might want to shutdown the courier-imap* and pop* services and remove them from your disk. Tada.<br />
Personally I replaced the pop, imap and auth services with <a href="http://www.dovecot.org/">Dovecot</a>. If you&#8217;re running qmail like you&#8217;re supposed to this is pretty easy. Check out <a href="http://qmail.jms1.net/dovecot.shtml">this page by John Simpson</a> for details on that. Instructions for vpopmail included. (thanks again John!)</p>
<p>Now for the interesting part. Getting Sieve to work. I decided to get the latest shiny version from their hg repository, but feel free to take the latest stable version instead.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>black:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>dovecot-sieve$ hg clone http:<span style="color: #000000; font-weight: bold;">//</span>hg.rename-it.nl<span style="color: #000000; font-weight: bold;">/</span>dovecot-1.2-sieve dovecot-1.2-sieve-hg<br />
&nbsp;<span style="color: #000000; font-weight: bold;">*</span>clone meets clone<span style="color: #000000; font-weight: bold;">*</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>black:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>dovecot-sieve$ <span style="color: #7a0874; font-weight: bold;">cd</span> dovecot-1.2-sieve-hg<br />
root<span style="color: #000000; font-weight: bold;">@</span>black:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>dovecot-sieve<span style="color: #000000; font-weight: bold;">/</span>dovecot-1.2-sieve-hg$ .<span style="color: #000000; font-weight: bold;">/</span>autogen.sh<br />
&nbsp;<span style="color: #000000; font-weight: bold;">*</span>skip that <span style="color: #000000; font-weight: bold;">if</span> you are using the stable version<span style="color: #000000; font-weight: bold;">*</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>black:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>dovecot-sieve<span style="color: #000000; font-weight: bold;">/</span>dovecot-1.2-sieve-hg$ .<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--with-dovecot</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>dovecot-1.2.8<br />
root<span style="color: #000000; font-weight: bold;">@</span>black:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>dovecot-sieve<span style="color: #000000; font-weight: bold;">/</span>dovecot-1.2-sieve-hg$ <span style="color: #c20cb9; font-weight: bold;">make</span> ; <span style="color: #c20cb9; font-weight: bold;">mkdir</span> pkg ; <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #007800;">DESTDIR</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">pwd</span><span style="color: #000000; font-weight: bold;">`/</span>pkg <span style="color: #c20cb9; font-weight: bold;">install</span> ; <span style="color: #7a0874; font-weight: bold;">cd</span> pkg ; makepkg <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>packages<span style="color: #000000; font-weight: bold;">/</span>dovecot-sieve-i386-1.tgz</div></div>
<p>Now we still need to enable it. Make sure your <span style="color:#FF00FF">/etc/dovecot.conf</span> has a section like this:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">##</span><br />
<span style="color: #666666; font-style: italic;">## Local Delivery Agent stuff</span><br />
<span style="color: #666666; font-style: italic;">##</span><br />
protocol lda <span style="color: #7a0874; font-weight: bold;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; postmaster_address = postmaster<span style="color: #000000; font-weight: bold;">@</span>your.mother.isawhore.nl<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #c20cb9; font-weight: bold;">hostname</span> = mail.server.gov<br />
&nbsp; &nbsp; &nbsp; &nbsp; sendmail_path = <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>qmail<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">sendmail</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; mail_plugins = sieve<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; log_path = <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>dovecot-deliver-errors.log<br />
&nbsp; &nbsp; &nbsp; &nbsp; info_log_path = <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>dovecot-deliver.log<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #007800;">debug</span>=<span style="color: #c20cb9; font-weight: bold;">yes</span><br />
<span style="color: #7a0874; font-weight: bold;">&#125;</span><br />
auth default <span style="color: #7a0874; font-weight: bold;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;"># Your other garbage options here .... </span><br />
&nbsp; &nbsp; &nbsp; &nbsp; socket listen <span style="color: #7a0874; font-weight: bold;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; master <span style="color: #7a0874; font-weight: bold;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; path = <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>run<span style="color: #000000; font-weight: bold;">/</span>dovecot<span style="color: #000000; font-weight: bold;">/</span>auth-master<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mode = 0660<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; user = vpopmail<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; group = vchkpw<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #7a0874; font-weight: bold;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #7a0874; font-weight: bold;">&#125;</span><br />
<span style="color: #7a0874; font-weight: bold;">&#125;</span><br />
plugin <span style="color: #7a0874; font-weight: bold;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; sieve = ~<span style="color: #000000; font-weight: bold;">/</span>.sieve<span style="color: #000000; font-weight: bold;">/</span>dovecot.sieve<br />
&nbsp; &nbsp; &nbsp; &nbsp; sieve_dir = ~<span style="color: #000000; font-weight: bold;">/</span>.sieve<br />
&nbsp; &nbsp; &nbsp; &nbsp; sieve_global_dir = <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>dovecot<span style="color: #000000; font-weight: bold;">/</span>sieve<span style="color: #000000; font-weight: bold;">/</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; sieve_subaddress_sep = -+<br />
<span style="color: #7a0874; font-weight: bold;">&#125;</span></div></div>
<p>Easy. This should make the <span style="color:#00FFAA">/usr/libexec/dovecot/deliver</span> program able to verify the account information of a requested user against the vpopmail database and it instructs the local delivery part to use the sieve plugin. (which I&#8217;ve configured some paths for).<br />
However, next part literally took me hours to figure out. I wanted to use the Dovecot LDA only for my test email account. So I created a .qmail file for my user &#8211; <a href="http://wiki.dovecot.org/LDA/Qmail">according to their wiki </a>:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>black$ <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">'|/var/qmail/bin/preline -f /usr/local/libexec/dovecot/deliver -d $EXT@$USER'</span> <span style="color: #000000; font-weight: bold;">&gt;</span> ~vpopmail<span style="color: #000000; font-weight: bold;">/</span>domains<span style="color: #000000; font-weight: bold;">/</span>benv.junerules.com<span style="color: #000000; font-weight: bold;">/</span>.qmail-benv-test<br />
root<span style="color: #000000; font-weight: bold;">@</span>black$ <span style="color: #c20cb9; font-weight: bold;">chown</span> vpopmail:vchkpw ~vpopmail<span style="color: #000000; font-weight: bold;">/</span>domains<span style="color: #000000; font-weight: bold;">/</span>benv.junerules.com<span style="color: #000000; font-weight: bold;">/</span>.qmail-benv-test</div></div>
<p>According to their wiki, this should be the correct way to invoke the deliver program. So I send a test mail to benv-test@benv.junerules.com &#8230;. nothing happens. Nothing in logs, nothing.<br />
Oh that&#8217;s a lie, the error log says:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">deliver<span style="color: #7a0874; font-weight: bold;">&#40;</span>benv-test<span style="color: #000000; font-weight: bold;">@</span>benv.junerules.com<span style="color: #7a0874; font-weight: bold;">&#41;</span>: Info: Loading modules from directory: <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>dovecot<span style="color: #000000; font-weight: bold;">/</span>lda<br />
deliver<span style="color: #7a0874; font-weight: bold;">&#40;</span>benv-test<span style="color: #000000; font-weight: bold;">@</span>benv.junerules.com<span style="color: #7a0874; font-weight: bold;">&#41;</span>: Info: Module loaded: <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>dovecot<span style="color: #000000; font-weight: bold;">/</span>lda<span style="color: #000000; font-weight: bold;">/</span>lib90_sieve_plugin.so</div></div>
<p>Of course it doesn&#8217;t work yet, I haven&#8217;t put a sieve filter in place yet. So I put a simple reject filter there so I know it works when it does <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
This is the contents of a file <span style="color:#AAFF00">~vpopmail/domains/benv.junerules.com/benv/.sieve/dovecot.sieve</span>. <b>Corresponding with the dovecot.conf plugin settings</b>.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">require <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #ff0000;">&quot;reject&quot;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>;<br />
<br />
reject <span style="color: #ff0000;">&quot;If you're getting this reject... it works. Also, your mom wears combat boots!&quot;</span>;</div></div>
<p>I send another mail. Same stuff in the logs. Mhm&#8230; more debugging would be great guys. I have no idea if it loads a sieve filter, from what directory or if it does anything at all! GRRRr.<br />
After a lot of cursing and throwing with plants and cats and hammers, I went through the mailing archives from the John&#8217;s qmail-patch list and found a snippet from someone else that set up something similar. Apparently the way to invoke the deliver program is different. Because I use the qmail extension addresses, benv-test@benv.junerules.com was given as user. However, vpopmail only knows about benv@benv.junerules.com, so it failed. Blegh.<br />
So for now I decided to use the solution offered by the mailinglist:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">|</span> <span style="color: #007800;">DTLINE</span>=<span style="color: #800000;">${DTLINE/$USER-}</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>qmail<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>preline <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>libexec<span style="color: #000000; font-weight: bold;">/</span>dovecot<span style="color: #000000; font-weight: bold;">/</span>deliver <span style="color: #660033;">-d</span> <span style="color: #800000;">${EXT/-*}</span><span style="color: #000000; font-weight: bold;">@</span><span style="color: #007800;">$USER</span> <span style="color: #660033;">-a</span> <span style="color: #007800;">$EXT</span><span style="color: #000000; font-weight: bold;">@</span><span style="color: #007800;">$USER</span></div></div>
<p>A little explanation on the environment variables. Normally when I send a message to benv-test@benv.junerules.com they look like this:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #007800;">HOST2</span>=benv.junerules<br />
<span style="color: #007800;">HOST3</span>=benv<br />
<span style="color: #007800;">RECIPIENT</span>=benv.junerules.com-benv-test<span style="color: #000000; font-weight: bold;">@</span>benv.junerules.com<br />
<span style="color: #007800;">HOST</span>=benv.junerules.com<br />
<span style="color: #007800;">DTLINE</span>=Delivered-To: benv.junerules.com-benv-test<span style="color: #000000; font-weight: bold;">@</span>benv.junerules.com<br />
<span style="color: #007800;">HOST4</span>=benv<br />
<span style="color: #007800;">USER</span>=benv.junerules.com<br />
<span style="color: #007800;">EXT</span>=benv-test<br />
<span style="color: #007800;">LOCAL</span>=benv.junerules.com-benv-test<br />
<span style="color: #007800;">SHLVL</span>=2<br />
<span style="color: #007800;">EXT3</span>=<br />
<span style="color: #007800;">EXT2</span>=<span style="color: #7a0874; font-weight: bold;">test</span><br />
<span style="color: #007800;">EXT4</span>=</div></div>
<p>The DTLINE rewrite isn&#8217;t strictly necessary but looks a bit nicer in the logs. However, the EXT@USER part should not contain all the extensions since they won&#8217;t resolve to a vpopmail user.<br />
With the rewritten .qmail file I send another test email. Here&#8217;s the log:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">deliver<span style="color: #7a0874; font-weight: bold;">&#40;</span>benv<span style="color: #000000; font-weight: bold;">@</span>benv.junerules.com<span style="color: #7a0874; font-weight: bold;">&#41;</span>: Info: Loading modules from directory: <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>dovecot<span style="color: #000000; font-weight: bold;">/</span>lda<br />
deliver<span style="color: #7a0874; font-weight: bold;">&#40;</span>benv<span style="color: #000000; font-weight: bold;">@</span>benv.junerules.com<span style="color: #7a0874; font-weight: bold;">&#41;</span>: Info: Module loaded: <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>dovecot<span style="color: #000000; font-weight: bold;">/</span>lda<span style="color: #000000; font-weight: bold;">/</span>lib90_sieve_plugin.so<br />
deliver<span style="color: #7a0874; font-weight: bold;">&#40;</span>benv<span style="color: #000000; font-weight: bold;">@</span>benv.junerules.com<span style="color: #7a0874; font-weight: bold;">&#41;</span>: Info: auth input: <span style="color: #007800;">uid</span>=89<br />
deliver<span style="color: #7a0874; font-weight: bold;">&#40;</span>benv<span style="color: #000000; font-weight: bold;">@</span>benv.junerules.com<span style="color: #7a0874; font-weight: bold;">&#41;</span>: Info: auth input: <span style="color: #007800;">gid</span>=89<br />
deliver<span style="color: #7a0874; font-weight: bold;">&#40;</span>benv<span style="color: #000000; font-weight: bold;">@</span>benv.junerules.com<span style="color: #7a0874; font-weight: bold;">&#41;</span>: Info: auth input: <span style="color: #007800;">home</span>=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>vpopmail<span style="color: #000000; font-weight: bold;">/</span>domains<span style="color: #000000; font-weight: bold;">/</span>benv.junerules.com<span style="color: #000000; font-weight: bold;">/</span>benv<br />
deliver<span style="color: #7a0874; font-weight: bold;">&#40;</span>benv<span style="color: #000000; font-weight: bold;">@</span>benv.junerules.com<span style="color: #7a0874; font-weight: bold;">&#41;</span>: Info: Namespace: <span style="color: #7a0874; font-weight: bold;">type</span>=private, <span style="color: #007800;">prefix</span>=INBOX., <span style="color: #007800;">sep</span>=., <span style="color: #007800;">inbox</span>=<span style="color: #c20cb9; font-weight: bold;">yes</span>, <span style="color: #007800;">hidden</span>=no, <span style="color: #007800;">list</span>=1, <span style="color: #007800;">subscriptions</span>=<span style="color: #c20cb9; font-weight: bold;">yes</span><br />
deliver<span style="color: #7a0874; font-weight: bold;">&#40;</span>benv<span style="color: #000000; font-weight: bold;">@</span>benv.junerules.com<span style="color: #7a0874; font-weight: bold;">&#41;</span>: Info: maildir: <span style="color: #007800;">data</span>=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>vpopmail<span style="color: #000000; font-weight: bold;">/</span>domains<span style="color: #000000; font-weight: bold;">/</span>benv.junerules.com<span style="color: #000000; font-weight: bold;">/</span>benv<span style="color: #000000; font-weight: bold;">/</span>Maildir<br />
deliver<span style="color: #7a0874; font-weight: bold;">&#40;</span>benv<span style="color: #000000; font-weight: bold;">@</span>benv.junerules.com<span style="color: #7a0874; font-weight: bold;">&#41;</span>: Info: maildir++: <span style="color: #007800;">root</span>=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>vpopmail<span style="color: #000000; font-weight: bold;">/</span>domains<span style="color: #000000; font-weight: bold;">/</span>benv.junerules.com<span style="color: #000000; font-weight: bold;">/</span>benv<span style="color: #000000; font-weight: bold;">/</span>Maildir, <span style="color: #007800;">index</span>=, <span style="color: #007800;">control</span>=, <span style="color: #007800;">inbox</span>=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>vpopmail<span style="color: #000000; font-weight: bold;">/</span>domains<span style="color: #000000; font-weight: bold;">/</span>benv.junerules.com<span style="color: #000000; font-weight: bold;">/</span>benv<span style="color: #000000; font-weight: bold;">/</span>Mai<br />
ldir<br />
deliver<span style="color: #7a0874; font-weight: bold;">&#40;</span>benv<span style="color: #000000; font-weight: bold;">@</span>benv.junerules.com<span style="color: #7a0874; font-weight: bold;">&#41;</span>: Info: sieve: using sieve path <span style="color: #000000; font-weight: bold;">for</span> user<span style="color: #ff0000;">'s script: /home/vpopmail/domains/benv.junerules.com/benv/.sieve/dovecot.sieve<br />
deliver(benv@benv.junerules.com): Info: sieve: opening script /home/vpopmail/domains/benv.junerules.com/benv/.sieve/dovecot.sieve<br />
deliver(benv@benv.junerules.com): Info: sieve: executing compiled script /home/vpopmail/domains/benv.junerules.com/benv/.sieve/dovecot.sieve<br />
deliver(benv@benv.junerules.com): Info: sieve: msgid=&lt;20091207214454.GJ9038@uil.winnipeg.nl&gt;: rejected message from &lt;benv-rotnaarjegraf@junerules.com&gt; (reject)</span></div></div>
<p>Woohoo, it rejected! <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /><br />
So Sieve works. Next thing to do is to get ManageSieve up and running and test it with thunderbird and <a href="https://addons.mozilla.org/en-US/thunderbird/addon/2548">some sieve addons</a><br />
But that&#8217;s a rant for later, my eyes are collapsing.</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/qmail-vpopmail-dovecot-and-sieve/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Javascript WTF</title>
		<link>http://notes.benv.junerules.com/all/fun/javascript-wtf/</link>
		<comments>http://notes.benv.junerules.com/all/fun/javascript-wtf/#comments</comments>
		<pubDate>Sun, 29 Nov 2009 13:35:34 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Fun]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[if]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[opera]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=611</guid>
		<description><![CDATA[Last week at work we ran into this gem (click on the image to get it full screen):

For reasons unknown to us, this piece of code acts very strange. First it evaluates selected == index which it considered to be false. (outlined in green in the image) So far so good. However, what it does [...]]]></description>
			<content:encoded><![CDATA[<p>Last week at work we ran into this gem (click on the image to get it full screen):<br />
<div id="attachment_612" class="wp-caption alignnone" style="width: 310px"><a href="http://notes.benv.junerules.com/wp-content/uploads/2009/11/firebug-wtf.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/11/firebug-wtf-300x80.png" alt="Javascript wtf in firebug" title="Javascript wtf in firebug" width="300" height="80" class="size-medium wp-image-612" /></a><p class="wp-caption-text">Javascript wtf in firebug</p></div><span id="more-611"></span></p>
<p>For reasons unknown to us, this piece of code acts very strange. First it evaluates <code class="codecolorer javascript vibrant"><span class="javascript">selected <span style="color: #339933;">==</span> index</span></code> which it considered to be false. (outlined in green in the image) So far so good. However, what it does next is a real WTF.<br />
<span style="color:#FF00FF">Can someone explain to us why this code runs INTO the if statement?</span><br />
The <code class="codecolorer php vibrant"><span class="php"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> whatever <span style="color: #009900;">&#125;</span></span></code> part?<br />
Personally I&#8217;d expect the code to jump over the if block, since that&#8217;s what if statement are for. Skipping code unless the evaluation is true.<br />
Or explained a lot better <a href="http://en.wikipedia.org/wiki/Conditional_(programming)">on wikipedia</a>. However, what happens is that <em>whatever</em> is actually <em>executed</em>.</p>
<p>So after carefully inspecting this piece of code and saying obscene stuff, minds boggled, trying to find that hidden semicolon or whatever, we couldn&#8217;t find it. Maybe a browser bug? But both <a href="http://www.opera.com/">Opera</a> (version 10.10) and <a href="http://www.mozilla.com/firefox/">Firefox</a> (version 3.5.5) failed in the same way.<br />
Maybe some magic with jQuery? Whatever it is, it remains a mystery to us.</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/fun/javascript-wtf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Chrome OS in Virtualbox</title>
		<link>http://notes.benv.junerules.com/all/software/google-chrome-os-in-virtualbox/</link>
		<comments>http://notes.benv.junerules.com/all/software/google-chrome-os-in-virtualbox/#comments</comments>
		<pubDate>Sat, 21 Nov 2009 13:45:54 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Fun]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[chrome]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[virtualbox]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=603</guid>
		<description><![CDATA[So with all the hype around google&#8217;s upcoming Chrome OS, I was getting curious what it was all about.
Linux based web stuff, open source&#8230; yeah, that&#8217;s all cute, but just words. So today the option arrived to see what we&#8217;re dealing with. These clowns have a download page where you can download a virtual machine [...]]]></description>
			<content:encoded><![CDATA[<p>So with all the hype around google&#8217;s upcoming Chrome OS, I was getting curious what it was all about.<br />
Linux based web stuff, open source&#8230; yeah, that&#8217;s all cute, but just words. So today the option arrived to see what we&#8217;re dealing with. <a href="http://gdgt.com/google/chrome-os/download/">These clowns</a> have a download page where you can download a virtual machine image to check out a snapshot of Chrome OS.<span id="more-603"></span></p>
<p>I went to their page and found out they require a login for no apparent reason. I tried <a href="http://www.bugmenot.com/">bugmenot</a> and decided that <em>bugmenot is a piece of shit</em> since they refuse to carry logins for almost all sites I try to use it for. Getting angry with the login I registered with a throwaway email account (if you don&#8217;t have one, consider using something like <a href="http://www.mailinator.com/">mailinator</a>) and downloaded their image. Wonder why they don&#8217;t use a torrent for it&#8230; oh well, their problem.<br />
And since I&#8217;m still fed up with their login garbage, <a href="http://media.gdgt.com/secure/chrome-os-0.4.22.8-gdgt.vmdk.zip?e=1258810971&#038;h=ddab2e3f89fa67feb844f3c3a83bca31">HERE&#8217;S A DIRECT LINK TO THE CHROME OS IMAGE</a>. It will probably break real soon, but wget on this link worked on a completely different machine, so you might get lucky for now.</p>
<p>Once the image completed downloading and after installing the latest version (3.0.12 today) of <a href="http://www.virtualbox.org/">VirtualBox</a>, I created a new machine. Obviously I couldn&#8217;t be bothered to read whatever the clowns of gdtd had to say (if anything) about creating a virtual machine and the required settings for that, so I went with &#8220;It&#8217;s Linux, enable all possible acceleration and NX flags and whatnot and put it on a SATA controller, for network use a bridge, and here&#8217;s 1024MB of memory&#8221;. Surprisingly it worked right away.<br />
After only a few seconds this screen came up:<br />
<div id="attachment_604" class="wp-caption alignnone" style="width: 310px"><a href="http://notes.benv.junerules.com/wp-content/uploads/2009/11/chrome-os-login.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/11/chrome-os-login-300x244.png" alt="Chrome OS Login screen" title="Chrome OS Login screen" width="300" height="244" class="size-medium wp-image-604" /></a><p class="wp-caption-text">Chrome OS Login screen</p></div><br />
Guess that screen could still use some design improvements. Oh well, early version and all, don&#8217;t care.<br />
But what do we use to login?<br />
<span style="color:#FF00FF">Our google account of course!</span> That was to be expected. After logging in a browser pops up:<br />
<div id="attachment_607" class="wp-caption alignnone" style="width: 310px"><a href="http://notes.benv.junerules.com/wp-content/uploads/2009/11/chrome-os-after-login.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/11/chrome-os-after-login-300x244.png" alt="Chrome OS after login" title="Chrome OS after login" width="300" height="244" class="size-medium wp-image-607" /></a><p class="wp-caption-text">Chrome OS after login</p></div><br />
Well, that&#8217;s great. A browser. But what else does it have?</p>
<p>Clicking on the leftmost tab thingy gives us some more toys for now:<br />
<a href="http://notes.benv.junerules.com/wp-content/uploads/2009/11/chrome-os-other-applications.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/11/chrome-os-other-applications-300x244.png" alt="chrome-os-other-applications" title="chrome-os-other-applications" width="300" height="244" class="alignnone size-medium wp-image-608" /></a><br />
Took a while to load over here though, but that could be because of a slow internet connection.<br />
All these &#8216;applications&#8217; are actually shortcuts to websites. Google Docs etc are nothing new, and the Chess application is simply a piece of flash. Oh well, at least that means flash works.</p>
<p>Conclusion:<br />
It&#8217;s a fun toy for now, quick to boot but not so great if you have a slow internet connection. Other than that it&#8217;s not really useful yet, but that&#8217;s to be expected from an early build like this.<br />
Maybe I&#8217;ll try it on some real iron later. Since Google is targetting it at netbooks etc I might give it a shot on our EEE PC <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
It will be interesting to see how this OS turns out when they finally release it.</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/google-chrome-os-in-virtualbox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux and a Xerox Phaser 6125N</title>
		<link>http://notes.benv.junerules.com/all/software/linux-and-a-xerox-phaser-6125n/</link>
		<comments>http://notes.benv.junerules.com/all/software/linux-and-a-xerox-phaser-6125n/#comments</comments>
		<pubDate>Sun, 15 Nov 2009 00:35:07 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[cups]]></category>
		<category><![CDATA[pokemon os]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[xerox]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=579</guid>
		<description><![CDATA[A while ago a friend hinted me of this printer. We were both looking for a somewhat affordable network laser printer, color preferred. However, I was wondering if this thing would work properly under linux. Openprinter claims the device is excellent as a paperweight, so that made me doubtful.
So today I took my pokemon laptop [...]]]></description>
			<content:encoded><![CDATA[<p>A while ago a friend hinted me of <a href="http://www.office.xerox.com/product-resources/6125/N/enus.html">this printer</a>. We were both looking for a somewhat affordable network laser printer, color preferred. However, I was wondering if this thing would work properly under linux. <span id="more-579"></span>Openprinter claims the device is excellent as a <a href="http://www.openprinting.org/show_printer.cgi?recnum=Xerox-Phaser_6125">paperweight</a>, so that made me doubtful.<br />
So today I took my pokemon laptop over to his place, and while enjoying a nice glass of excellent 18 year old Glenlivet, we shook cups up and down. And glasses.</p>
<p>The <a href="http://www.linuxquestions.org/questions/linux-hardware-18/xerox-phaser-6125-n-688361/">instructions for ubuntu</a> were a good starting point. I&#8217;ll summarize:</p>
<ol>
<li>Download <a href="http://www.fujixerox.com.au/support/downloaddriver?productId=307&#038;operatingSystemCode=Linux">these drivers for the FX DocuPrint C525A</a>.</li>
<li>Unzip and use <span style="color:#FF00FF">alien</a> to convert the package to a .deb, and install it.
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>error:<span style="color: #000000; font-weight: bold;">/</span>tmp$ <span style="color: #c20cb9; font-weight: bold;">unzip</span> dpc525a_linux_.0.0.tar.zip; alien Fuji_Xerox-DocuPrint_C525_A_AP-1.0-1.i386.rpm; <span style="color: #c20cb9; font-weight: bold;">dpkg</span> <span style="color: #660033;">-i</span> fuji-xerox-docuprint-c525-a-ap_1.0-<span style="color: #000000;">2</span>_i386.deb</div></div>
</li>
<li>Go to http://localhost:631/admin and add a new network printer.</li>
<li>Select a protocol (either Jetdirect or LPD) and enter the IP address of the printer</li>
<li>Select the PPD file you installed from the .deb archive (<span style="color:#FFFF00">/usr/share/cups/model/FujiXerox/en/FX_DocuPrint_C525_A_AP.ppd</span>) or select the driver through the menu system</li>
<li>In cups go set the default printer options and make sure to set the optional tray module to <span style="color:#00FFFF">250 Sheet Feeder</span>.</li>
</ol>
<h3>Issues I ran into</h3>
<p>That&#8217;s all pretty default as the linked installation guide says. However, in my first attempt I used the JetDirect protocol on port 9100 (using an IP address, not a hostname). While this worked, everything was dirt slow. Going to the options page of a print dialog took almost a minute!<br />
After some messing around I decided to try other protocols. The other protocol that worked was LPD/LPR. But not only did it work, but it&#8217;s fast! Click *BAF* Bluescreen1!!&#8230; uhh, I mean, print dialog <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
Anyway, instead of using an URI like <em>socket://192.168.1.123:9100</em> simply use <code class="codecolorer bash vibrant"><span class="bash">lpd:<span style="color: #000000; font-weight: bold;">//</span>192.168.1.123:<span style="color: #000000;">515</span></span></code>. Let me repeat this so that people who skip over this post also read it: <span style="color:#FF0000">Use lpd://192.168.1.123:515 instead of socket://blabla, this works a lot faster!</span>.</p>
<p>Once I got the printer in CUPS I also ran into the issue that the printer would respond but give an error on the printer itself. This was because I forgot to properly select the Tray Module, make sure it&#8217;s set to the 250 Feeder like in this picture:<br />
<div id="attachment_586" class="wp-caption alignnone" style="width: 310px"><a href="http://notes.benv.junerules.com/wp-content/uploads/2009/11/xerox-6125-tray-module.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/11/xerox-6125-tray-module-300x181.png" alt="Xerox 6125N tray module selection" title="Xerox 6125N tray module selection" width="300" height="181" class="size-medium wp-image-586" /></a><p class="wp-caption-text">Xerox 6125N tray module selection</p></div></p>
<p>Another issue, cups doesn&#8217;t seem to give all options for this printer in their default options dialog. This is bad, because you need to change the default paper source. Default it&#8217;s set to the bypass tray, which means you have to manually insert the paper when printing. Very annoying. However, using other tools give you more options. Using <span style="color:#FFFF00">system-config-printer</span> for instance gives the chance to change it. Make sure you put it to auto or tray 1 like this:<br />
<div id="attachment_591" class="wp-caption alignnone" style="width: 310px"><a href="http://notes.benv.junerules.com/wp-content/uploads/2009/11/xerox-6125n-paper-source.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/11/xerox-6125n-paper-source-300x155.png" alt="Xerox 6125N Paper source selection" title="Xerox 6125N Paper source selection" width="300" height="155" class="size-medium wp-image-591" /></a><p class="wp-caption-text">Xerox 6125N Paper source selection</p></div></p>
<p>When you finally manage to get those options set, the printer works perfectly under linux.<br />
Have fun printing!</p>
<p>Oh yeah, here&#8217;s a slackware package in case you don&#8217;t want to mess with aliens and pokemon os <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
<a href="http://notes.benv.junerules.com/wp-content/plugins/download-monitor/download.php?id=Fuji_Xerox-DocuPrint_C525_A_AP-1.0-1.i386.tgz" title="Downloaded 7 times">Slackware package for Xerox Phaser 6125N cups driver</a> - Version 1.0 - SHA: 5f8b6478f93a6484d4834990448b152fb10d9cdd</p>
<p>And now, back to my Glenlivet&#8230; mmmmmmm<br />
<div id="attachment_597" class="wp-caption alignnone" style="width: 102px"><a href="http://notes.benv.junerules.com/wp-content/uploads/2009/11/glenlivet-18yo.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/11/glenlivet-18yo.png" alt="Glenlivet 18 year old" title="Glenlivet 18 year old" width="92" height="347" class="size-full wp-image-597" /></a><p class="wp-caption-text">Glenlivet 18 year old</p></div></p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/linux-and-a-xerox-phaser-6125n/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Dragon Age: Origins</title>
		<link>http://notes.benv.junerules.com/all/software/dragon-age-origins/</link>
		<comments>http://notes.benv.junerules.com/all/software/dragon-age-origins/#comments</comments>
		<pubDate>Tue, 10 Nov 2009 15:36:17 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Fun]]></category>
		<category><![CDATA[Morons]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[dragon age]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[manual install]]></category>
		<category><![CDATA[wine]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=558</guid>
		<description><![CDATA[This game has been released a couple of days ago, and if you&#8217;re a fan of Baldur&#8217;s Gate and such games (like Neverwinter Nights) I&#8217;m sure you&#8217;ll like this game. So when we heard it was released we immediately moved our computers together so we could play a game just like how we spent countless [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://dragonage.bioware.com/">This game</a> has been released a couple of days ago, and if you&#8217;re a fan of Baldur&#8217;s Gate and such games (like Neverwinter Nights) I&#8217;m sure you&#8217;ll like this game. So when we heard it was released we immediately moved our computers together so we could play a game just like how we spent countless hours playing Baldur&#8217;s Gate.<span id="more-558"></span></p>
<h2>Dragon Age and Wine</h2>
<p>First I decided to check it if the game would run in Wine. The <a href="http://appdb.winehq.org/objectManager.php?sClass=application&#038;iId=10457" title="Dragon Age on the wine appdb">appdb has some info</a> that doesn&#8217;t sound too terrible, and since the latest git builds sometimes give better results I needed to test no matter what the test results said. So I built the latest git version of wine (which should be version 1.1.33 by now, but since they had WineConf it&#8217;s still labeled 1.1.32) and fired up the installer in a new prefix. I always install games in their own wine prefix so they don&#8217;t bug eachother with dlls and hacks needed to get them running. The game seems to need a few hacks from <a href="http://www.kegel.com/wine/winetricks">winetricks</a>, specifically <span style="color:#FF00FF">gecko</span> and <span style="color:#FF00FF">vcrun2005</span>. Without the gecko component the Dotnet part of the installer crashed for me (it takes forever to install though). You might also want to install <span style="color:#FF00FF">physx</span>, since the game uses that as well. (and a lot of ppl had the physx installer fail through wine, good thing it&#8217;s in winetricks now). Finally I also installed <span style="color:#FF00FF">d3dx9</span> just to be sure, since it needs DirectX to run.</p>
<h3>Installing using the Installer</h3>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>janeman:~$ <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>storage<span style="color: #000000; font-weight: bold;">/</span>da<br />
benv<span style="color: #000000; font-weight: bold;">@</span>janeman:~$ <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>storage<span style="color: #000000; font-weight: bold;">/</span>da<br />
benv<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>storage<span style="color: #000000; font-weight: bold;">/</span>da$ <span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">WINEPREFIX</span>=<span style="color: #000000; font-weight: bold;">/</span>storage<span style="color: #000000; font-weight: bold;">/</span>da<span style="color: #000000; font-weight: bold;">/</span>.wine<br />
benv<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>storage<span style="color: #000000; font-weight: bold;">/</span>da$ winecfg<br />
wine: created the configuration directory <span style="color: #ff0000;">'/storage/da/.wine'</span><br />
&nbsp;<span style="color: #000000; font-weight: bold;">*</span>check the path and sound tabs, <span style="color: #c20cb9; font-weight: bold;">make</span> sure they work <span style="color: #000000; font-weight: bold;">for</span> you<span style="color: #000000; font-weight: bold;">*</span><br />
benv<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>storage<span style="color: #000000; font-weight: bold;">/</span>da$ winetricks gecko<br />
&nbsp;<span style="color: #000000; font-weight: bold;">*</span>junk here<span style="color: #000000; font-weight: bold;">*</span><br />
benv<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>storage<span style="color: #000000; font-weight: bold;">/</span>da$ winetricks vcrun2005<br />
&nbsp;<span style="color: #000000; font-weight: bold;">*</span>junk here<span style="color: #000000; font-weight: bold;">*</span><br />
benv<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>storage<span style="color: #000000; font-weight: bold;">/</span>da$ winetricks physx<br />
&nbsp;<span style="color: #000000; font-weight: bold;">*</span>junk here<span style="color: #000000; font-weight: bold;">*</span><br />
benv<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>storage<span style="color: #000000; font-weight: bold;">/</span>da$ winetricks d3dx9<br />
&nbsp;<span style="color: #000000; font-weight: bold;">*</span>junk here<span style="color: #000000; font-weight: bold;">*</span><br />
benv<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>storage<span style="color: #000000; font-weight: bold;">/</span>da:<span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">&gt;</span>wine <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>cdrom<span style="color: #000000; font-weight: bold;">/</span>setup.exe</div></div>
<p>The installer should now come up, like this.<br />
<div id="attachment_559" class="wp-caption alignnone" style="width: 298px"><a href="http://notes.benv.junerules.com/wp-content/uploads/2009/11/da-installer.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/11/da-installer.png" alt="Dragon Age - Installer (wine)" title="Dragon Age - Installer (wine)" width="288" height="128" class="size-full wp-image-559" /></a><p class="wp-caption-text">Dragon Age - Installer (wine)</p></div><br />
Interestingly enough today&#8217;s git build of wine seems to have wrecked something since I now get this notice:<br />
<div id="attachment_561" class="wp-caption alignnone" style="width: 310px"><a href="http://notes.benv.junerules.com/wp-content/uploads/2009/11/da-installer-adminerror.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/11/da-installer-adminerror-300x72.png" alt="Dragon Age Installer Adminerror (wine)" title="Dragon Age Installer Adminerror (wine)" width="300" height="72" class="size-medium wp-image-561" /></a><p class="wp-caption-text">Dragon Age Installer Adminerror (wine)</p></div><br />
I reverted to and older git packge I made (version wine-1.1.32-402-gde00535) which doesn&#8217;t give that error.<br />
<div id="attachment_562" class="wp-caption alignnone" style="width: 310px"><a href="http://notes.benv.junerules.com/wp-content/uploads/2009/11/da-installer2.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/11/da-installer2-300x217.png" alt="Dragon Age Installer under wine (2)" title="Dragon Age Installer under wine (2)" width="300" height="217" class="size-medium wp-image-562" /></a><p class="wp-caption-text">Dragon Age Installer under wine (2)</p></div><br />
In case the installer crashes for you, you could try installing some more stuff from winetricks. As you can see I installed quite a bit, and had the installer crash several times before I had all the winetricks stuff installed. Don&#8217;t worry if the installer fails on the physx part, the game is installed if you get that far (mine crashed here every time I tried, we don&#8217;t care).</p>
<h3>Dragon Age &#8211; Manual installation</h3>
<p>Since the installer is pretty much a bitch, and I noticed it didn&#8217;t do much except for bitch and wine <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  and unrar some packages, I tried to see if I could get it to run <em>without needing the installer</em>. Here goes! (you need the <a href="http://www.rarlab.com/download.htm">rar</a> utility for this).<br />
I created a new wine prefix and installed the required winetricks parts as above, but instead of running the installer I did this:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>storage<span style="color: #000000; font-weight: bold;">/</span>da$ <span style="color: #c20cb9; font-weight: bold;">mkdir</span> Dragon\ Age<br />
benv<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>storage<span style="color: #000000; font-weight: bold;">/</span>da$ <span style="color: #7a0874; font-weight: bold;">cd</span> Dragon\ Age<br />
benv<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>storage<span style="color: #000000; font-weight: bold;">/</span>da<span style="color: #000000; font-weight: bold;">/</span>Dragon Age$ <span style="color: #000000; font-weight: bold;">for</span> k <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>cdrom<span style="color: #000000; font-weight: bold;">/</span>data<span style="color: #000000; font-weight: bold;">/*</span>.rar ; <span style="color: #000000; font-weight: bold;">do</span> rar x <span style="color: #007800;">$k</span> ; <span style="color: #000000; font-weight: bold;">done</span><br />
&nbsp;<span style="color: #000000; font-weight: bold;">*</span>tons of rar output and your disk rattling like a snake<span style="color: #000000; font-weight: bold;">*</span></div></div>
<p>After this you should have a directory listing that looks very much like after using the official installer. The only worry I had was the game looking for registry entries, but it seems like those aren&#8217;t needed that much. (read, for me it started without asking stuff).<br />
In fact, what baffles me is: <span style="color:#FFFF00"><em>this way it doesn&#8217;t even ask about a CD key</em></span>. Very very interesting. However, I did need to use a no-cd patch to get it to run under wine (for both installation methods). Meh, nothing new there.</p>
<h3>Running it under wine</h3>
<p>Starting up the game will probably give you a black screen that does nothing until you click/bash your keyboard a few times. This is because the intro movies don&#8217;t work under wine at the moment.<br />
However, you can disable those movies in the .INI file:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>janeman:$ <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #660033;">-ie</span> <span style="color: #ff0000;">'s/DisableIntroMovies=0/DisableIntroMovies=1/g'</span> ~<span style="color: #000000; font-weight: bold;">/</span>BioWare<span style="color: #000000; font-weight: bold;">/</span>Dragon\ Age<span style="color: #000000; font-weight: bold;">/</span>Settings<span style="color: #000000; font-weight: bold;">/</span>DragonAge.ini</div></div>
<p>(or use a text editor).<br />
<div id="attachment_572" class="wp-caption alignnone" style="width: 310px"><a href="http://notes.benv.junerules.com/wp-content/uploads/2009/11/da-title-screen.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/11/da-title-screen-300x187.png" alt="Dragon Age Title Screen (wine)" title="Dragon Age Title Screen (wine)" width="300" height="187" class="size-medium wp-image-572" /></a><p class="wp-caption-text">Dragon Age Title Screen (wine)</p></div><br />
That solves the first problem, however, you might run into the next.<br />
Flickering.<br />
This doesn&#8217;t happen to all wine users it seems, but certainly to a lot of them. Might be related to the video card. I&#8217;m using an NVIDIA Geforce 8600GT with driver version 190.42.<br />
If you run into this you can change a few settings to make it a little better, but I haven&#8217;t found the perfect fix for it yet.<br />
There&#8217;s one settings that helps a ton for me, change it with this:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>janeman:$ <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #660033;">-ie</span> <span style="color: #ff0000;">'s/DisableMRT=0/DisableMRT=1/g'</span> ~<span style="color: #000000; font-weight: bold;">/</span>BioWare<span style="color: #000000; font-weight: bold;">/</span>Dragon\ Age<span style="color: #000000; font-weight: bold;">/</span>Settings<span style="color: #000000; font-weight: bold;">/</span>DragonAge.ini</div></div>
<p>For me the flickering was basically gone (during gameplay at least) when I reduced the graphics detail to &#8220;low&#8221;. (I could have Framebuffer effects enabled and also texture details set to high).<br />
What helps is basically lowering the graphics settings:</p>
<ul>
<li>Lower the resolution</li>
<li>Don&#8217;t run fullscreen</li>
</ul>
<p>Anyway, that makes it playable under wine.</p>
<h2>BenV&#8217;s opinion on the game</h2>
<p>It&#8217;s a very worthy game to play if you&#8217;re into Baldur&#8217;s gate etc. The graphics are very nice compared to what I&#8217;m used to (especially under windows <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> ) and the interface works properly.<br />
The intro story is completely different depending on the race, class, and background (noble or commoner) you pick. I played as a casteless dwarf rogue and had the intro story living in the slums of the city, my sister being a whore trying to marry her way up to the noble class, while thieving and robbing my way around myself. Needless I butchered my way through the intro, cheating my boss out of some money and fighting a lot.<br />
On the other hand my girlfriend started out as a human mage and had a lot less fighting and a lot more blabla and stuff from dreamworlds etc and could talk her way through a big part of the intro. (of course she also ran into the necessary fights, if it were only to teach the combat system of the game).<br />
Speaking of which, the combat system is also well done. The party can be told to hold ground and they will actually <em>stay there</em> instead of having your archers/mages being raped in the front. Stealthing around and backstabbing also works very nicely <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<h3>No LAN games</h3>
<p>Anyway, I&#8217;m sure you can read enough reviews about the game that explain all that in much more detail.<br />
But the one thing that is <b>very very bad</b> is the lack of multiplayer LAN games.<br />
If there&#8217;s one thing we loved about Baldur&#8217;s Gate it was the ability to play the game with 3 computers all controlling the very same party, all players with their own character.<br />
So why is it not in this game? I&#8217;ve seen a lot of BS on slashdot and other sites where the basic arguments are:</p>
<ul>
<li>It would take too much time to implement and therefore reduce the quality of the single player game</li>
<li>It&#8217;s not possible without having a linear story / it would need a completely different story not geared to &#8220;the one&#8221;</li>
<li>UI must be more complex for multiplayer</li>
<li>I&#8217;m a fucking retard</li>
</ul>
<p>Well, I think:</p>
<ul>
<li>Adding multiplayer would require LAN support which is extra code (but they already need that pretty much because of the DLC garbage). However, it&#8217;s not THAT MUCH more. A few screens to setup a game and deal with permissions together with a few tweaks to deal with synchronisation. That&#8217;s all. Peanuts compared to the rest of the game.</li>
<li>See Baldur&#8217;s Gate, we -loved- that kind of multiplayer. Doesn&#8217;t need a different story at all, exactly the same story was excellent.</li>
<li>The UI can be exactly the same, worked fine for Baldur&#8217;s Gate. There are however a few details that are nice to have when doing a multiplayer game, like people still being able to walk around and do stuff while others talk to NPCs, but no major overhauls.</li>
<li>Yes, you are.</li>
</ul>
<p>I&#8217;m sure most people who scream &#8220;NO&#8221; to the multiplayer support (and I wonder why) assume that big changes are needed to the game to make it multiplayer. Perhaps they have the wrong idea about what kind of multiplayer makes us happy.<br />
However, since EA games got involved (see the whole <a href="http://www.penny-arcade.com/2009/11/6/">DLC fiasco</a>) there&#8217;s little hope that it&#8217;ll be changed.<br />
Pity. Anyway, it&#8217;s still a very nice game. Time to play!</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/dragon-age-origins/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Torrent stuff</title>
		<link>http://notes.benv.junerules.com/all/software/torrent-stuff/</link>
		<comments>http://notes.benv.junerules.com/all/software/torrent-stuff/#comments</comments>
		<pubDate>Sat, 07 Nov 2009 16:10:04 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[bittorrent]]></category>
		<category><![CDATA[deluge]]></category>
		<category><![CDATA[ipv6]]></category>
		<category><![CDATA[slackware]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=549</guid>
		<description><![CDATA[Every now and then I like to leech something, and it happens to be that using bittorrent has a lot to offer in terms of availability and usability. However, as usual I have my demands. My demands for a torrent program are basically:

It has to run on Slackware
It has to run as a daemon (in [...]]]></description>
			<content:encoded><![CDATA[<p>Every now and then I like to leech something, and it happens to be that using bittorrent has a lot to offer in terms of availability and usability. However, as usual I have my demands. My demands for a torrent program are basically:</p>
<ul>
<li>It has to run on Slackware</li>
<li>It has to run as a daemon (in daemontools if possible)</li>
<li>There has to be an easy way to control and view the status, like a web based GUI.</li>
</ul>
<p><span id="more-549"></span><br />
A few years ago I used <span style="color:#FF00FF">mldonkey</span> for it. Worked fine, but their torrent support was getting worse and worse. (basically they didn&#8217;t update their product for ages, and when they did it didn&#8217;t improve much). It had a web interface that worked nicely though, and it was easy to control. Another cute thing was that it also supported other protocols that I still used back then like Edonkey.</p>
<p>However, at some point I got fed up with it and searched for a better product. Especially since I didn&#8217;t care about the other protocols anymore I could search for a pure torrent client. Many of them only support running as a client with some kind of fancy GUI&#8230; not good for running on our server. But then I found <a href="http://libtorrent.rakshasa.no/" title="Rtorrent">Rtorrent</a>.<br />
While it was a bitch to run on my server since it demanded to run in a terminal (and therefore refused to run under daemontools) &#8212; a problem I made bearable by running it in screen under a new user that was accessible through ssh keys &#8212; it worked very nicely. I had it running with a web interface called <a href="http://www.wtorrent-project.org/trac/">wtorrent</a>.<br />
But then yesterday I got very needy and demanded that it used IPv6 to connect to others. Sadly it fails to do that. Don&#8217;t know if it&#8217;s a configuration problem or simply <a href="http://libtorrent.rakshasa.no/ticket/1111">because the author doesn&#8217;t have enough time to fix it</a>. I tried the latest development builds and compiling it with <span style="color:#FFFF00">&#8211;enable-ipv6</span>, but it doesn&#8217;t seem to listen. In other words: time for a new client.</p>
<p>So after some searching I ran into <a href="http://dev.deluge-torrent.org/wiki/Screenshots" title="Deluge">Deluge</a>. It seems to fulfill all my requirements, so I decided to give it a shot. A few bonus points are immediately earned because Deluge uses the more commonly used <a href="http://www.rasterbar.com/products/libtorrent/">libtorrent</a>, not to be confused by the other libtorrent that rtorrent uses. The bonus points are because the rasterbar libtorrent has plugin support among things and in general is a bit more up to date on the whole torrent protocol as far as I can tell. (makes you wonder why rtorrent doesn&#8217;t use it).<br />
Time for installation!<br />
Slackbuild had no problems chewing through libtorrent and spitting out a nice slackware package. However, Deluge is built in python so some manual work to get a package from it. (I seriously need to get some time to work on slackbuild to support this stuff).</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>Uil:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>deluge-1.2.0_rc3<span style="color: #666666; font-style: italic;"># mkdir pkg</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>Uil:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>deluge-1.2.0_rc3<span style="color: #666666; font-style: italic;"># python setup.py install --root `pwd`/pkg -O2</span><br />
&nbsp;<span style="color: #000000; font-weight: bold;">*</span>blabla compile blabla<span style="color: #000000; font-weight: bold;">*</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>Uil:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>deluge-1.2.0_rc3<span style="color: #666666; font-style: italic;"># cd pkg/ &amp;&amp; makepkg /usr/src/packages/deluge-1.2.0rc3-i386-1.tgz</span></div></div>
<p>Voila, a nice package. After installing it, and creating a new user for it, it was time to see if it would work in daemontools.<br />
However, I didn&#8217;t check any dependencies so trying to run the deluge program failed:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Traceback <span style="color: #7a0874; font-weight: bold;">&#40;</span>most recent call <span style="color: #c20cb9; font-weight: bold;">last</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>:<br />
&nbsp; &nbsp;File <span style="color: #ff0000;">&quot;/usr/bin/deluged&quot;</span>, line 8, <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">&lt;</span>module<span style="color: #000000; font-weight: bold;">&gt;</span><br />
&nbsp; &nbsp; &nbsp;load_entry_point<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #ff0000;">'deluge==1.2.0-rc3'</span>, <span style="color: #ff0000;">'console_scripts'</span>, <span style="color: #ff0000;">'deluged'</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
&nbsp; &nbsp;File <span style="color: #ff0000;">&quot;/usr/lib/python2.6/site-packages/pkg_resources.py&quot;</span>, line 277, <span style="color: #000000; font-weight: bold;">in</span> load_entry_point<br />
&nbsp; &nbsp; &nbsp;<span style="color: #7a0874; font-weight: bold;">return</span> get_distribution<span style="color: #7a0874; font-weight: bold;">&#40;</span>dist<span style="color: #7a0874; font-weight: bold;">&#41;</span>.load_entry_point<span style="color: #7a0874; font-weight: bold;">&#40;</span>group, name<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
&nbsp; &nbsp;File <span style="color: #ff0000;">&quot;/usr/lib/python2.6/site-packages/pkg_resources.py&quot;</span>, line 2180, <span style="color: #000000; font-weight: bold;">in</span> load_entry_point<br />
&nbsp; &nbsp; &nbsp;<span style="color: #7a0874; font-weight: bold;">return</span> ep.load<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
&nbsp; &nbsp;File <span style="color: #ff0000;">&quot;/usr/lib/python2.6/site-packages/pkg_resources.py&quot;</span>, line 1913, <span style="color: #000000; font-weight: bold;">in</span> load<br />
&nbsp; &nbsp; &nbsp;entry = __import__<span style="color: #7a0874; font-weight: bold;">&#40;</span>self.module_name, globals<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>,globals<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;">&#91;</span><span style="color: #ff0000;">'__name__'</span><span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
&nbsp; &nbsp;File <span style="color: #ff0000;">&quot;/usr/lib/python2.6/site-packages/deluge/main.py&quot;</span>, line 47, <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">&lt;</span>module<span style="color: #000000; font-weight: bold;">&gt;</span><br />
&nbsp; &nbsp; &nbsp;import deluge.common<br />
&nbsp; &nbsp;File <span style="color: #ff0000;">&quot;/usr/lib/python2.6/site-packages/deluge/common.py&quot;</span>, line 66, <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">&lt;</span>module<span style="color: #000000; font-weight: bold;">&gt;</span><br />
&nbsp; &nbsp; &nbsp;import xdg, xdg.BaseDirectory<br />
&nbsp;ImportError: No module named xdg</div></div>
<p>Meh, xdg&#8230; fine. Fortunately python has <span style="color:#00FFFF">easy_install</span> as perl has cpan, so I installed a bunch of required things for it (like twisted, pyopenssl, chardet, mako). For xdg easy_install didn&#8217;t work though, so I handed it to easy_install using <a href="http://www.freedesktop.org/~lanius/pyxdg-0.18.tar.gz">this url</a>. After this it started up, even in daemontools! Another success.<br />
For those who are interested, my daemontools <span style="color:#00FF00">run</span> file looks like this:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#!/bin/bash</span><br />
<span style="color: #7a0874; font-weight: bold;">exec</span> 2<span style="color: #000000; font-weight: bold;">&gt;&amp;</span>1<br />
<span style="color: #c20cb9; font-weight: bold;">sleep</span> 1<br />
<span style="color: #000000; font-weight: bold;">set</span> <span style="color: #660033;">-e</span><br />
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">HOME</span>=<span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>general_stores2<span style="color: #000000; font-weight: bold;">/</span>deluge<br />
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #007800;">$HOME</span><br />
<span style="color: #7a0874; font-weight: bold;">exec</span> setuidgid deluge <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>deluged <span style="color: #660033;">-d</span> <span style="color: #660033;">-c</span> <span style="color: #007800;">$HOME</span><span style="color: #000000; font-weight: bold;">/</span>etc <span style="color: #660033;">-i</span> eth_local <span style="color: #660033;">-L</span> info</div></div>
<p>You obviously need to adjust the paths and interface and whatnot to your own ideals <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
After starting it for the first time it created some configuration and state files and is now waiting for connections. Woohoo.</p>
<p>So now, how do we connect to it? Seems like the web interface isn&#8217;t running yet. This is because deluge uses a client/server model where the daemon does<br />
all the work, but it doesn&#8217;t deal with the interface side. So to run the web interface we have to start a separate deluge process. Let&#8217;s also put that in daemontools:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#!/bin/bash</span><br />
<span style="color: #7a0874; font-weight: bold;">exec</span> 2<span style="color: #000000; font-weight: bold;">&gt;&amp;</span>1<br />
<span style="color: #c20cb9; font-weight: bold;">sleep</span> 1<br />
<span style="color: #000000; font-weight: bold;">set</span> <span style="color: #660033;">-e</span><br />
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">HOME</span>=<span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>general_stores2<span style="color: #000000; font-weight: bold;">/</span>deluge<br />
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #007800;">$HOME</span><br />
<span style="color: #7a0874; font-weight: bold;">exec</span> setuidgid deluge <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>deluge <span style="color: #660033;">-c</span> <span style="color: #007800;">$HOME</span><span style="color: #000000; font-weight: bold;">/</span>etc <span style="color: #660033;">-L</span> info <span style="color: #660033;">-u</span> web</div></div>
<p>After firing this one up you can connect using your browser on port 8112. Default password is <span style="color:#FFFF00">deluge</span>. After logging in you get the connection manager which shows the running daemon that you started up earlier. (or at least, that&#8217;s what it did here):<br />
<div id="attachment_553" class="wp-caption alignnone" style="width: 310px"><a href="http://notes.benv.junerules.com/wp-content/uploads/2009/11/deluge-connection-manager.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/11/deluge-connection-manager.png" alt="Deluge Connection Manager" title="deluge connection manager" width="300" height="291" class="size-full wp-image-553" /></a><p class="wp-caption-text">Deluge Connection Manager</p></div><br />
So have fun! Don&#8217;t forget to check out the plugins:<br />
<a href="http://notes.benv.junerules.com/wp-content/uploads/2009/11/deluge-plugins.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/11/deluge-plugins-300x291.png" alt="deluge-plugins" title="deluge-plugins" width="300" height="291" class="alignnone size-medium wp-image-554" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/torrent-stuff/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cry me a river!</title>
		<link>http://notes.benv.junerules.com/all/daily/cry-me-a-river/</link>
		<comments>http://notes.benv.junerules.com/all/daily/cry-me-a-river/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 14:50:45 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Boring]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=543</guid>
		<description><![CDATA[As I often instruct people to do:
Stolen from Wayfinder&#8217;s blog &#8211; check it out, it has many more funny face pics, not to mention great music!
]]></description>
			<content:encoded><![CDATA[<p>As I often instruct people to do:</p>
<div class="wp-caption alignnone" style="width: 330px"><a href="http://notes.benv.junerules.com/wp-content/uploads/2009/11/cry-me-a-river.jpg"><img alt="Cry me a river" src="http://notes.benv.junerules.com/wp-content/uploads/2009/11/cry-me-a-river.jpg" title="Cry me a river" width="320" height="240" /></a><p class="wp-caption-text">Cry me a river</p></div>
<p>Stolen from <a href="http://yfinder.de/" title="Wayfinder">Wayfinder&#8217;s blog</a> &#8211; check it out, it has many more funny face pics, not to mention great music!</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/daily/cry-me-a-river/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Qmail + Spamdyke and fail2ban</title>
		<link>http://notes.benv.junerules.com/all/software/qmail-spamdyke-and-fail2ban/</link>
		<comments>http://notes.benv.junerules.com/all/software/qmail-spamdyke-and-fail2ban/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 09:52:09 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Morons]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[fail2ban]]></category>
		<category><![CDATA[qmail]]></category>
		<category><![CDATA[spamdyke]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=539</guid>
		<description><![CDATA[Yesterday evening I was curiously looking at some tcpdump traffic that went through our dom0 of Xenbro. There seemed to be a ton of weird DNS requests. And with weird I mean spamlike domains, like familiesfirstmedical.com. After wondering for a bit I realized they were coming from our service domU that runs mail for the [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday evening I was curiously looking at some tcpdump traffic that went through our dom0 of Xenbro. There seemed to be a ton of weird DNS requests. And with weird I mean spamlike domains, like familiesfirstmedical.com. After wondering for a bit I realized they were coming from our service domU that runs mail for the junerules.com domain.<span id="more-539"></span><br />
I logged in and was surprised to see more than 50 active connections busy trying to deliver mostly spam to us. Fortunately I have some anti spam things enabled like <a href="http://spamassassin.apache.org/">spamassassin</a> and reverse DNS checking (which is where the DNS requests came from) and some more things using <a href="http://www.spamdyke.org/">Spamdyke</a>. However, checking the maillog I noticed that there were over 300000 denied connections from a day earlier! Time to become a bit more agressive in getting rid of zombie machines trying to spam us.</p>
<p>As a side story, since we moved our junerules.com domain from our very kind previous host to our own Xenbro machine, the amount of spam we receive plummeted. Apparently not because they stopped spamming on the domain though. I&#8217;m sure our previous host is glad he doesn&#8217;t have to deal with all the attention and traffic anymore <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .<br />
The main reason for this spam drop seems to be spamdyke. I&#8217;m sure you have your own opinion about how nice or acceptable it is to run graylisting and reverse DNS checking and all that, but my opinion is that if you have a badly configured mailserver (read: windows zombie machine) you can die in a fire for all I care. Fix your mailserver and then I&#8217;ll accept your mail.<br />
Too bad for the few properly configured mailservers out there that now have to try twice to get through the graylisting&#8230;. then again, it&#8217;s a small price to pay.</p>
<p>Anyway, to get rid of assholes trying to bruteforce their way into my ssh daemon I run <a href="http://www.fail2ban.org/">fail2ban</a>, which lets you try to get in a few times and then blocks your IP for a week. That&#8217;s how much I like them. So I decided to add a new filter to fail2ban, which gets rid of asshole mailservers that will fail their next attempts anyway. Those are the mailservers that spamdyke denies with the following errors:</p>
<ul>
<li><span style="color:#FF00FF">DENIED_RDNS_MISSING</span> &#8211; in other words, the mailserver doesn&#8217;t have a reverse DNS entry. You can&#8217;t be serious, that has to be a zombie.</li>
<li><span style="color:#FF00FF">DENIED_IP_IN_CC_RDNS</span> &#8211; means the mailserver probably has a dynamic IP address from their local ISP. Mostly zombies. Sorry for the 2 mailservers our there that are legitimate that mail like this. I&#8217;ll whitelist you whenever I see complaints.</li>
<li><span style="color:#FF00FF">DENIED_RDNS_RESOLVE</span> &#8211; means the reverse DNS does not resolve to the IP address it connected from. Get lost. However, this one should be used with care, because if the DNS resolver fails for whatever reason spamdyke will also issue this. So make a real good consideration if you want to use this in the fail2ban filter.</li>
</ul>
<p>Since above failures will keep coming back if they retry, I block these asshole servers for a week.<br />
Here&#8217;s my <span style="color:#FFFF00">/etc/fail2ban/filter.d/spamdyke.conf</span>:<br />
<a href="http://notes.benv.junerules.com/wp-content/plugins/download-monitor/download.php?id=spamdyke.conf" title="Downloaded 40 times">Fail2ban spamdyke filter</a> - Version 0.1 - SHA: 1ee23545d87998d0314d2683eb8f2a099cf9fca9</p>
<p>Simply put it in /etc/fail2ban/filter.d and edit <span style="color:#00FFFF">/etc/fail2ban/jail.local</span> and add something like this:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">&#91;</span>spamdyke-rdns<span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
enabled &nbsp;= <span style="color: #c20cb9; font-weight: bold;">true</span><br />
filter &nbsp; = spamdyke<br />
action &nbsp; = iptables-allports<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #007800;">name</span>=SPAM, <span style="color: #007800;">protocol</span>=all<span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
logpath &nbsp;= <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>maillog<br />
maxretry = <span style="color: #000000;">2</span><br />
bantime &nbsp;= <span style="color: #000000;">604800</span></div></div>
<p>Then reload fail2ban:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;"># fail2ban-client reload</span></div></div>
<p>After enabling it about 12 hours ago, this is the result:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>service<span style="color: #666666; font-style: italic;"># fail2ban-client status spamdyke-rdns</span><br />
Status <span style="color: #000000; font-weight: bold;">for</span> the jail: spamdyke-rdns<br />
<span style="color: #000000; font-weight: bold;">|</span>- filter<br />
<span style="color: #000000; font-weight: bold;">|</span> &nbsp;<span style="color: #000000; font-weight: bold;">|</span>- File list: &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>maillog<br />
<span style="color: #000000; font-weight: bold;">|</span> &nbsp;<span style="color: #000000; font-weight: bold;">|</span>- Currently failed: 72<br />
<span style="color: #000000; font-weight: bold;">|</span> &nbsp;<span style="color: #000000; font-weight: bold;">`</span>- Total failed: &nbsp; &nbsp; 10065<br />
<span style="color: #000000; font-weight: bold;">`</span>- action<br />
&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">|</span>- Currently banned: 1987<br />
&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">|</span>- <span style="color: #000000; font-weight: bold;">&lt;</span>BenV<span style="color: #000000; font-weight: bold;">&gt;</span> too many to list<br />
&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">`</span>- Total banned: &nbsp; &nbsp; <span style="color: #000000;">1987</span></div></div>
<p>Simply amazing. We&#8217;ll end up blocking half the internet. Oh well, it&#8217;s only the bad part of internet anyway.</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/qmail-spamdyke-and-fail2ban/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP &#8211; Produces Horrible Problems</title>
		<link>http://notes.benv.junerules.com/all/software/php-produces-horrible-problems/</link>
		<comments>http://notes.benv.junerules.com/all/software/php-produces-horrible-problems/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 14:11:21 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[curl]]></category>
		<category><![CDATA[ldap]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[slackware]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=530</guid>
		<description><![CDATA[That IS what it stands for, right?
Or maybe the last P is for Programs&#8230;.. oh no, silly me. It&#8217;s for PEOPLE. Now I get it.
Anyway, the quote of the day:
configure: error: There is something wrong. Please check config.log for more information.

Gee, that&#8217;s really&#8230;. helpful. OF COURSE THERE&#8217;S SOMETHING WRONG, I&#8217;M TRYING TO INSTALL PHP!!!!
But let&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>That IS what it stands for, right?<br />
Or maybe the last P is for Programs&#8230;.. oh no, silly me. It&#8217;s for <b>PEOPLE</b>. Now I get it.<br />
Anyway, the quote of the day:</p>
<blockquote><p>configure: error: There is something wrong. Please check config.log for more information.</p></blockquote>
<p><span id="more-530"></span><br />
Gee, that&#8217;s really&#8230;. helpful. <span style="color:#FF0000">OF COURSE THERE&#8217;S SOMETHING WRONG, I&#8217;M TRYING TO INSTALL PHP!!!!</span><br />
But let&#8217;s not get angry yet, I&#8217;m sure it&#8217;ll throw more tantrums at us while we try to chunk it together.<br />
In case you&#8217;re wondering, I&#8217;m trying to configure php so it has curl support. Apparently php&#8217;s configure has decided for me that in order to have curl support, it also requires ldap.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">configure:26607: checking <span style="color: #000000; font-weight: bold;">for</span> curl_easy_perform <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #660033;">-lcurl</span><br />
configure:26626: <span style="color: #c20cb9; font-weight: bold;">gcc</span> <span style="color: #660033;">-o</span> conftest <span style="color: #660033;">-g</span> <span style="color: #660033;">-O2</span> &nbsp; <span style="color: #660033;">-lcurl</span> <span style="color: #660033;">-lidn</span> <span style="color: #660033;">-lssl</span> <span style="color: #660033;">-lcrypto</span> <span style="color: #660033;">-lldap</span> <span style="color: #660033;">-lrt</span> <span style="color: #660033;">-lssl</span> <span style="color: #660033;">-lcrypto</span> <span style="color: #660033;">-ldl</span> <span style="color: #660033;">-lz</span> conftest.c <span style="color: #660033;">-lcurl</span> &nbsp;<span style="color: #660033;">-lcurl</span> <span style="color: #660033;">-lbz2</span> <span style="color: #660033;">-lz</span> <span style="color: #660033;">-lssl</span> <span style="color: #660033;">-lcrypto</span> <span style="color: #660033;">-lresolv</span> <span style="color: #660033;">-lm</span> <span style="color: #660033;">-ldl</span> <span style="color: #660033;">-lnsl</span> &nbsp;<span style="color: #660033;">-lxm</span><br />
l2 <span style="color: #660033;">-lz</span> <span style="color: #660033;">-lm</span> <span style="color: #660033;">-lcurl</span> <span style="color: #660033;">-lidn</span> <span style="color: #660033;">-lssl</span> <span style="color: #660033;">-lcrypto</span> <span style="color: #660033;">-lldap</span> <span style="color: #660033;">-lrt</span> <span style="color: #660033;">-lssl</span> <span style="color: #660033;">-lcrypto</span> <span style="color: #660033;">-ldl</span> <span style="color: #660033;">-lz</span> 1<span style="color: #000000; font-weight: bold;">&gt;&amp;</span>5 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>gcc<span style="color: #000000; font-weight: bold;">/</span>i486-slackware-linux<span style="color: #000000; font-weight: bold;">/</span>4.3.3<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>i486-slackware-linux<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">ld</span>: cannot <span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #660033;">-lldap</span><br />
collect2: <span style="color: #c20cb9; font-weight: bold;">ld</span> returned 1 <span style="color: #7a0874; font-weight: bold;">exit</span> status</div></div>
<p>&#8220;<span style="color:#FF0066">Then don&#8217;t configure it with ldap support!</span>&#8221;<br />
I didn&#8217;t. In fact, I explicity told it NOT to support ldap. <span style="color:#FF00FF">&#8211;without-ldap</span>. Doesn&#8217;t matter. Somehow it picked up the requirement to include ldap in the tests. After some searching I found out that the real source for this problem is the <span style="color:#00FFFF">curl-config</span> script:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;"># /usr/bin/curl-config --libs &nbsp; &nbsp; &nbsp;</span><br />
<span style="color: #660033;">-lcurl</span> <span style="color: #660033;">-lidn</span> <span style="color: #660033;">-lssl</span> <span style="color: #660033;">-lcrypto</span> <span style="color: #660033;">-lldap</span> <span style="color: #660033;">-lrt</span> <span style="color: #660033;">-lssl</span> <span style="color: #660033;">-lcrypto</span> <span style="color: #660033;">-ldl</span> <span style="color: #660033;">-lz</span></div></div>
<p>Note the <span style="color:#FF6600">-lldap</span> there. So basically this is Slackware&#8217;s fault. Meh.</p>
<p><em>Solution 1:</em><br />
 * Get rid of ldap in curl. This involves recompiling curl from source.<br />
<em>Solution 2:</em> Probably the easiest way is to hack curl-config</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #660033;">-ie</span> <span style="color: #ff0000;">'s/-lldap//'</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>curl-config</div></div>
<p><em>Solution 3:</em><br />
 * Install the openldap-client package. However, now you have ldap on your system which you probably don&#8217;t use on a webserver.</p>
<p>I went for solution 1, recompiling it myself from the slackware sources:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;"># cd /usr/src</span><br />
<span style="color: #666666; font-style: italic;"># lftp ftp://ftp.nluug.nl/pub/os/Linux/distr/slackware/slackware-13.0/source/n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><br />
<span style="color: #7a0874; font-weight: bold;">cd</span> ok, <span style="color: #007800;">cwd</span>=<span style="color: #000000; font-weight: bold;">/</span>pub<span style="color: #000000; font-weight: bold;">/</span>os<span style="color: #000000; font-weight: bold;">/</span>Linux<span style="color: #000000; font-weight: bold;">/</span>distr<span style="color: #000000; font-weight: bold;">/</span>slackware<span style="color: #000000; font-weight: bold;">/</span>slackware-<span style="color: #000000;">13.0</span><span style="color: #000000; font-weight: bold;">/</span>source<span style="color: #000000; font-weight: bold;">/</span>n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
lftp ftp.nluug.nl:<span style="color: #000000; font-weight: bold;">/</span>pub<span style="color: #000000; font-weight: bold;">/</span>os<span style="color: #000000; font-weight: bold;">/</span>Linux<span style="color: #000000; font-weight: bold;">/</span>distr<span style="color: #000000; font-weight: bold;">/</span>slackware<span style="color: #000000; font-weight: bold;">/</span>slackware-<span style="color: #000000;">13.0</span><span style="color: #000000; font-weight: bold;">/</span>source<span style="color: #000000; font-weight: bold;">/</span>n<span style="color: #000000; font-weight: bold;">&gt;</span> mirror curl<br />
<span style="color: #666666; font-style: italic;"># cd curl</span><br />
<span style="color: #666666; font-style: italic;"># sed -ie 's/configure/configure --disable-ldap --disable-ldaps/' curl.SlackBuild</span><br />
<span style="color: #666666; font-style: italic;"># bash curl.Slackbuild</span></div></div>
<p>After upgrading the curl package with this build it worked for me without the ldap nonsense.</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/php-produces-horrible-problems/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>C compiler cannot create executables</title>
		<link>http://notes.benv.junerules.com/all/software/c-compiler-cannot-create-executables/</link>
		<comments>http://notes.benv.junerules.com/all/software/c-compiler-cannot-create-executables/#comments</comments>
		<pubDate>Mon, 26 Oct 2009 14:16:09 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[configure]]></category>
		<category><![CDATA[gcc]]></category>
		<category><![CDATA[slackware]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=524</guid>
		<description><![CDATA[Yeah, I bet you didn&#8217;t know that. You&#8217;re so stupid.
Anyway, this isn&#8217;t the first time I run into this, so I figured it would be good to &#8220;jot this down&#8221; as Choco Billy would say.
I got this error while trying to configure apache on a new domU (which has almost no packages installed, which is [...]]]></description>
			<content:encoded><![CDATA[<p>Yeah, I bet you didn&#8217;t know that. You&#8217;re so stupid.<span id="more-524"></span><br />
Anyway, this isn&#8217;t the first time I run into this, so I figured it would be good to &#8220;<span style="color:#00FFFF">jot this down</span>&#8221; as Choco Billy would say.<br />
I got this error while trying to configure <span style="color:#FFFF00">apache</span> on a new domU (which has almost no packages installed, which is why I ran into this):</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>jemoeder:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>apache<span style="color: #000000; font-weight: bold;">/</span>httpd-2.2.14<span style="color: #666666; font-style: italic;"># ./configure $TEN_MILLION_OPTIONS_HERE</span><br />
checking <span style="color: #000000; font-weight: bold;">for</span> chosen layout... Apache<br />
<br />
&nbsp;<span style="color: #000000; font-weight: bold;">*</span>blablabla I<span style="color: #ff0000;">'m a dumbass yadieya*<br />
<br />
checking for C compiler default output file name... <br />
configure: error: in `/usr/src/apache/httpd-2.2.14/srclib/apr'</span>:<br />
configure: error: C compiler cannot create executables<br />
See <span style="color: #000000; font-weight: bold;">`</span>config.log<span style="color: #ff0000;">' for more details.</span></div></div>
<p>Well, I&#8217;ll give you the details: <span style="color:#FF00FF">it&#8217;s missing an assembler</span>. You can find out about this if you actually bother to read the <span style="color:#F00FF0">config.log</span> file in the <span style="color:#00FF00">srclib/apr</span> dir:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">gcc</span>: error trying to <span style="color: #7a0874; font-weight: bold;">exec</span> <span style="color: #ff0000;">'as'</span>: execvp: No such <span style="color: #c20cb9; font-weight: bold;">file</span> or directory</div></div>
<p>The simple fix: install an assembler. Slackware has the <b><span style="color:#1100FF">binutils</span></b> package for that.<br />
<code class="codecolorer bash vibrant"><span class="bash">slackpkg <span style="color: #c20cb9; font-weight: bold;">install</span> binutils</span></code>, done.</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/c-compiler-cannot-create-executables/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SOCKS, Opera, and brute force</title>
		<link>http://notes.benv.junerules.com/all/software/socks-opera-and-brute-force/</link>
		<comments>http://notes.benv.junerules.com/all/software/socks-opera-and-brute-force/#comments</comments>
		<pubDate>Wed, 21 Oct 2009 16:27:08 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[opera]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=511</guid>
		<description><![CDATA[Especially force, that&#8217;s what we need.
Because somehow Opera still hasn&#8217;t bothered to implement SOCKS proxy support. And if you would like to use&#8230; oh I don&#8217;t know&#8230; tor&#8230; or maybe simple ssh proxying support to test stuff from an external IP instead of from inside your local network, or for whatever your reason might be [...]]]></description>
			<content:encoded><![CDATA[<p>Especially <span style="color:#FF0000">force</span>, that&#8217;s what we need.<br />
Because somehow <a href="http://www.opera.com/browser/download/" title="Get Opera">Opera</a> still hasn&#8217;t bothered to implement SOCKS proxy support. And if you would like to use&#8230; oh I don&#8217;t know&#8230; <a href="http://www.torproject.org/">tor</a>&#8230; or maybe simple <a href="http://notes.benv.junerules.com/daily/the-wonders-of-ssh-forwarding/" title="The wonders of SSH forwarding">ssh proxying support</a> to test stuff from an external IP instead of from inside your local network, or for whatever your reason might be (working around your corperate firewall? <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> )&#8230;. you have to use <a href="http://www.mozilla.com/en-US/firefox/firefox.html?from=BenVsNotes" title="Get Firefox">Firefox</a>. Because they DO have SOCKS support. Strange. A case to bash Opera <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> <span id="more-511"></span></p>
<p>So <a href="http://www.opera.com/support/kb/view/194/" title="Opera Socks">Opera doesn&#8217;t suck^Wsocks</a>, huh.<br />
However, since I personally don&#8217;t like Firefox enough to recommend people using it over Opera, we&#8217;ll have to get socks support using an external program. There are several options for doing this. Bascially what we need is some method to catch the calls to the socket system call and converts them to go through the socks proxy. My expert google skills have found me 3 solutions:</p>
<ul>
<li><a href="http://sourceforge.net/projects/tsocks/" title="TSocks">Tsocks</a></li>
<li><a href="http://proxychains.sourceforge.net/" title="ProxyChains">Proxychains</a></li>
<li><a href="http://ksb.sourceforge.net/" title="Kernel Socks Bouncer">Kernel Socks Bouncer</a></li>
</ul>
<p>From this list <span style="color:#00FFFF">TSocks</span> sounds like the easiest one, even though it hasn&#8217;t been updated in _years_. Means either it works or it&#8217;s impossible to get to work these days <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> . Anyway, slackbuild didn&#8217;t have any issues building me a tsocks package. Let&#8217;s see if it works!<br />
First we create a little tsocks.conf file:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>janeman<span style="color: #666666; font-style: italic;"># echo -e &quot;local = 192.168.1.0/24\nserver = 127.0.0.1\nserver_port = 1234&quot; &gt; /etc/tsocks.conf</span></div></div>
<p>This tells tsocks that we want to access the proxy for everything that isn&#8217;t in our LAN (192.168.1.0/24) using a server on 127.0.0.1 on port 1234. It&#8217;s picky about the whitespace around the &#8216;=&#8217; in the config though, don&#8217;t forget them. Now we have to enable tsocks, either by running the application by using the tsocks wrapper script, or by letting tsocks put itself in the LD_PRELOAD environment variable. I chose the latter:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>janeman<span style="color: #666666; font-style: italic;"># source tsocks on ; tsocks show &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><br />
ERROR: ld.so: object <span style="color: #ff0000;">'/usr/lib/libtsocks.so'</span> from LD_PRELOAD cannot be preloaded: ignored.<br />
<span style="color: #007800;">LD_PRELOAD</span>=<span style="color: #ff0000;">&quot;/usr/lib/libtsocks.so&quot;</span></div></div>
<p>*<span style="color:#00FF33"><b>BZZZT</b></span>* WRONG! That&#8217;s strike 1 for being an ancient (not updated for more than 5 years) piece of junk. I&#8217;m running a 64 bit OS, that means the library is inside /usr/lib64. Fine, we patch it:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>janeman<span style="color: #666666; font-style: italic;"># sed -ie 's#/lib/#/lib64/#g; s#\\/lib\\/#\\/lib64\\/#g' /usr/bin/tsocks</span></div></div>
<p>If you&#8217;re getting errors about that /usr/lib/libtsocks.so not being found, unset your LD_PRELOAD variable <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
Good, time for a test!</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>janeman$ <span style="color: #c20cb9; font-weight: bold;">ssh</span> <span style="color: #660033;">-D</span> 1234 <span style="color: #660033;">-N</span> some.host.to.proxy.with<br />
benv<span style="color: #000000; font-weight: bold;">@</span>some.host.to.proxy.with<span style="color: #ff0000;">'s password: ******<br />
# SSH is forwarding but doesn'</span>t take commands from you now, leave it, switch to another terminal and <span style="color: #7a0874; font-weight: bold;">continue</span> there<br />
benv<span style="color: #000000; font-weight: bold;">@</span>janeman$ <span style="color: #7a0874; font-weight: bold;">source</span> tsocks on ; <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'GET / HTTP/1.0\r\nHost: www.whatismyip.crg \n\r\n'</span> <span style="color: #000000; font-weight: bold;">|</span> nc www.whatismyip.org 80 <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">tail</span> <span style="color: #660033;">-1</span><br />
123.456.789.012</div></div>
<p>It works! In order to make Opera use it simply start it like that:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>janeman$ <span style="color: #7a0874; font-weight: bold;">source</span> tsocks on ; opera</div></div>
<p><b>NEXT! ProxyChains</b><br />
&#8220;Q: Why use it in the first place? Tsocks works!&#8221;<br />
A: Because it&#8217;s always good to have more than 1 tool available to use. Because its latest version is not 7 years old (only 2 *cough*). Because it has other features. Because it&#8217;s fun to test shit <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Chalk down another success for slackbuild. Next, the configuration file. <span style="color:#3000FF">/etc/proxychains.conf</span> is automagically installed, so we only have to adapt it if we choose to. The default config should work for <b>tor</b>, but we want it for my SSH proxy. I changed the default proxy at the end of the file to be &#8217;socks5 127.0.0.1 1234&#8242;. Note that it has the cool features to use several proxies (hence the name I suppose) in a chain (randomly if wanted) and also to proxy DNS. Anyway, the test (after unsettings the LD_PRELOAD variable!):</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>janeman$ <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'GET / HTTP/1.0\r\nHost: www.whatismyip.crg \n\r\n'</span> <span style="color: #000000; font-weight: bold;">|</span> proxychains nc www.whatismyip.org 80 <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">tail</span> <span style="color: #660033;">-1</span><br />
<span style="color: #000000; font-weight: bold;">|</span>DNS-request<span style="color: #000000; font-weight: bold;">|</span> www.whatismyip.org <br />
<span style="color: #000000; font-weight: bold;">|</span>S-chain<span style="color: #000000; font-weight: bold;">|</span>-<span style="color: #000000; font-weight: bold;">&lt;&gt;</span>-127.0.0.1:1234-<span style="color: #000000; font-weight: bold;">&lt;&gt;&lt;&gt;</span>-4.2.2.2:53-<span style="color: #000000; font-weight: bold;">&lt;&gt;&lt;&gt;</span>-OK<br />
<span style="color: #000000; font-weight: bold;">|</span>DNS-response<span style="color: #000000; font-weight: bold;">|</span> www.whatismyip.org is 75.147.234.41<br />
<span style="color: #000000; font-weight: bold;">|</span>S-chain<span style="color: #000000; font-weight: bold;">|</span>-<span style="color: #000000; font-weight: bold;">&lt;&gt;</span>-127.0.0.1:<span style="color: #000000;">1234</span>-<span style="color: #000000; font-weight: bold;">&lt;&gt;&lt;&gt;</span>-75.147.234.41:<span style="color: #000000;">80</span>-<span style="color: #000000; font-weight: bold;">&lt;&gt;&lt;&gt;</span>-OK<br />
123.456.789.123</div></div>
<p>Cool, another working solution. Note how it proxied the DNS request for us. Also I find this one easier to use than tsocks.</p>
<p>Finally there&#8217;s this Kernel Socks Bouncer module, but it&#8217;s too much of a hassle for me to run kernel modules for a simple socks proxy. Let me know if it&#8217;s great if you used it <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
Thanks for reading folks!</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/socks-opera-and-brute-force/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Another wordpress update</title>
		<link>http://notes.benv.junerules.com/all/software/another-wordpress-update/</link>
		<comments>http://notes.benv.junerules.com/all/software/another-wordpress-update/#comments</comments>
		<pubDate>Wed, 21 Oct 2009 15:23:53 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Morons]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=504</guid>
		<description><![CDATA[Version 2.8.5 is here! Some important security hardening going on, fixing a trackback DoS attack (or so they claim). Some more details over here. As usualy the automatic update failed for me, so once again the fix for this error:
Download failed.: Operation timed out after 60 seconds with 1538482 bytes received
Either patch it manually:

Edit wp-admin/includes/file.php [...]]]></description>
			<content:encoded><![CDATA[<p>Version 2.8.5 is here! Some important security hardening going on, fixing a trackback DoS attack (or so they claim). Some more details <a href="http://wordpress.org/development/2009/10/wordpress-2-8-5-hardening-release/" title="wordpress 2.8.5 release">over here</a>. As usualy the automatic update failed for me, so once again the fix for this error:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Download failed.: Operation timed out after <span style="color: #000000;">60</span> seconds with <span style="color: #000000;">1538482</span> bytes received</div></div>
<p>Either patch it manually:</p>
<ul>
<li>Edit <span style="color:#FF00FF">wp-admin/includes/file.php</span> and change line <span style="color:#FFFF11">448</span> to a more reasonable default.</li>
<li>The line sould become something like: <code class="codecolorer php vibrant"><span class="php"><span style="color: #000088;">$response</span> <span style="color: #339933;">=</span> wp_remote_get<span style="color: #009900;">&#40;</span><span style="color: #000088;">$url</span><span style="color: #339933;">,</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'timeout'</span> <span style="color: #339933;">=&gt;</span> 600<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></span></code></li>
</ul>
<p>Or use this patch:</p>
<div class="codecolorer-container diff vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="diff codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">--- wp-admin/includes/file.php.org &nbsp; &nbsp; &nbsp;2009-10-21 17:03:47.000000000 +0200<br />
<span style="color: #888822;">+++ wp-admin/includes/file.php &nbsp;<span style="">2009</span>-<span style="">10</span>-<span style="">21</span> <span style="">17</span>:03:<span style="">06.000000000</span> +0200</span><br />
<span style="color: #440088;">@@ -<span style="">445</span>,<span style="">7</span> +<span style="">445</span>,<span style="">7</span> @@</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; if <span style="">&#40;</span> ! $handle <span style="">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return new WP_Error<span style="">&#40;</span>'http_no_file', __<span style="">&#40;</span>'Could not create Temporary file'<span style="">&#41;</span><span style="">&#41;</span>;<br />
&nbsp;<br />
<span style="color: #991111;">- &nbsp; &nbsp; &nbsp; $response = wp_remote_get<span style="">&#40;</span>$url, array<span style="">&#40;</span>'timeout' =&gt; 60<span style="">&#41;</span><span style="">&#41;</span>;</span><br />
<span style="color: #00b000;">+ &nbsp; &nbsp; &nbsp; $response = wp_remote_get<span style="">&#40;</span>$url, array<span style="">&#40;</span>'timeout' =&gt; 600<span style="">&#41;</span><span style="">&#41;</span>;</span><br />
&nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; if <span style="">&#40;</span> is_wp_error<span style="">&#40;</span>$response<span style="">&#41;</span> <span style="">&#41;</span> <span style="">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fclose<span style="">&#40;</span>$handle<span style="">&#41;</span>;</div></div>
<a href="http://notes.benv.junerules.com/wp-content/plugins/download-monitor/download.php?id=wordpress-auto-update-timeout.diff" title="Downloaded 105 times">Wordpress auto updater timeout patch</a> - Version  - SHA: 9e89757f4b2e5536dbd9fe85a3befd00ab1c4a51
<p>When I tried adding the above patch as a download (using the download monitor plugin) I got this failure:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">File <span style="color: #7a0874; font-weight: bold;">type</span> does not meet security guidelines. Try another.</div></div>
<p>What the fuck guys, this is a TEXT file. Grepping through the sources I find the <span style="color:#00FFFF">wp-admin/includes/file.php</span> file to be the nazi. Apparently I&#8217;m not allowed (as site admin) to pass this <code class="codecolorer php vibrant"><span class="php">current_user_can<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'unfiltered_upload'</span> <span style="color: #009900;">&#41;</span></span></code>. Security hardening, yeah&#8230; against idiots perhaps.<br />
I&#8217;m expecting an update of either wordpress or <a href="http://wordpress.org/extend/plugins/download-monitor/" title="Download Monitor plugin">the download monitor plugin</a> soon.<br />
Meanwhile I simply uploaded the file manually and added an existing download. Pfffrt, the hassle.</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/another-wordpress-update/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>MySQL 5.0 -&gt; 5.1 on Slackware current</title>
		<link>http://notes.benv.junerules.com/all/software/mysql-5-0-5-1-on-slackware-current/</link>
		<comments>http://notes.benv.junerules.com/all/software/mysql-5-0-5-1-on-slackware-current/#comments</comments>
		<pubDate>Wed, 07 Oct 2009 16:00:47 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[innodb]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[slackware]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=490</guid>
		<description><![CDATA[Slackware recently upgraded the MySQL version from 5.0 to 5.1, from the Changelog:
Sun Oct  4 00:17:50 CDT 2009
ap/mysql-5.1.39-x86_64-1.txz:  Upgraded.
  This bumps the version of the shared libraries to .so.16.0.0.
Yeah, that&#8217;s all great, but for me this broke on several of my machines. Not because of the expected recompiles (after all, a new [...]]]></description>
			<content:encoded><![CDATA[<p>Slackware recently upgraded the MySQL version from 5.0 to 5.1, from the Changelog:</p>
<blockquote><p>Sun Oct  4 00:17:50 CDT 2009<br />
ap/mysql-5.1.39-x86_64-1.txz:  Upgraded.<br />
  This bumps the version of the shared libraries to .so.16.0.0.</p></blockquote>
<p>Yeah, that&#8217;s all great, but for me this broke on several of my machines. <span id="more-490"></span>Not because of the expected recompiles (after all, a new library, so stuff like vpopmail might need a recompile, I&#8217;m fine with that), but because MySQL failed to handle my configuration files on those machines. You see, I like my data more than I like MySQL, and prefer their <span style="color:#FF0055">InnoDB</span> tables above <span style="color:#FFFF00">MyISAM</span> for that matter (yeah yeah, it&#8217;s still MySQL, whatever). Means I have some configuration lines about InnoDB in my <span style="color:#FF00FF">/etc/my.cnf</span>, like this:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">&#91;</span>mysqld<span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
skip-networking<br />
innodb_data_home_dir = <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>mysql<span style="color: #000000; font-weight: bold;">/</span><br />
innodb_data_file_path = ibdata1:10M:autoextend<br />
innodb_log_group_home_dir = <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>mysql<span style="color: #000000; font-weight: bold;">/</span><br />
innodb_log_arch_dir = <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>mysql<span style="color: #000000; font-weight: bold;">/</span><br />
innodb_buffer_pool_size = 64M<br />
innodb_additional_mem_pool_size = 8M</div></div>
<p>So after the upgrade of the package, mysql came down as fast as it came up:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">091005 <span style="color: #000000;">23</span>:<span style="color: #000000;">40</span>:<span style="color: #000000;">14</span> mysqld_safe Starting mysqld daemon with databases from <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>mysql<br />
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>libexec<span style="color: #000000; font-weight: bold;">/</span>mysqld: Table <span style="color: #ff0000;">'mysql.plugin'</span> doesn<span style="color: #ff0000;">'t exist<br />
091005 23:40:14 [ERROR] Can'</span>t open the mysql.plugin table. Please run mysql_upgrade to create it.<br />
091005 <span style="color: #000000;">23</span>:<span style="color: #000000;">40</span>:<span style="color: #000000;">14</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>ERROR<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>libexec<span style="color: #000000; font-weight: bold;">/</span>mysqld: unknown variable <span style="color: #ff0000;">'innodb_data_file_path=ibdata1:10M:autoextend'</span><br />
091005 <span style="color: #000000;">23</span>:<span style="color: #000000;">40</span>:<span style="color: #000000;">14</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>ERROR<span style="color: #7a0874; font-weight: bold;">&#93;</span> Aborting</div></div>
<p>Aha&#8230; so, I need to run some kind of upgrade tool called <span style="color:#FF00FF">mysql_upgrade</span>, good that they told me about that in advance. (Thanks Slackware guys <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  )<br />
So we try running the upgrade tool:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>janeman:~:0<span style="color: #000000; font-weight: bold;">&gt;</span>mysql_upgrade &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />
Looking <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #ff0000;">'mysql'</span> <span style="color: #c20cb9; font-weight: bold;">as</span>: mysql<br />
Looking <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #ff0000;">'mysqlcheck'</span> <span style="color: #c20cb9; font-weight: bold;">as</span>: mysqlcheck<br />
Running <span style="color: #ff0000;">'mysqlcheck with default connection arguments<br />
mysqlcheck: Got error: 2002: Can'</span>t connect to <span style="color: #7a0874; font-weight: bold;">local</span> MySQL server through socket <span style="color: #ff0000;">'/var/run/mysql/mysql.sock'</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">2</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> when trying to connect<br />
FATAL ERROR: Upgrade failed</div></div>
<p>Yeah&#8230; mysql didn&#8217;t quite come up because of the configuration issues, right. You&#8217;d hope an upgrade tool would fix that too, but oh well, guess we&#8217;ll have to do that ourselves.<br />
In fact, let&#8217;s read what they have to say about it themselves. <a href="http://dev.mysql.com/doc/refman/5.1/en/upgrade.html">Upgrading from MySQL 5.0 to 5.1</a>.<br />
Let&#8217;s see&#8230;. backup, check&#8230; read this document&#8230; (gee, wonder what we&#8217;re doing now)&#8230; read about changes&#8230; yeah yeah, cute, plugin api, whatever&#8230; run the upgrade tool&#8230; yeah that failed. If this bla, if that bla&#8230; and then the magic:</p>
<blockquote><p>If problems occur, such as that the new mysqld server does not start or that you cannot connect without a password, verify that you do not have an old my.cnf file from your previous installation. </p></blockquote>
<p>Guess I do huh. So yeah, obviously MySQL starts fine whenever you empty the config file. But what about my old config settings? Are they still needed?<br />
Apparently you can now choose betwen running InnoDB native or as a plugin. Guess I&#8217;ll stick to native.<br />
Now for the fun part. <a href="http://dev.mysql.com/doc/refman/5.1/en/innodb-parameters.html">Checking the options to put in the my.cnf file</a>. Huh, the option that it barfed about still exists&#8230; how can this be? <a href="http://dev.mysql.com/doc/refman/5.1/en/innodb-configuration.html">This document tells us how to set up InnoDB</a>&#8230; nothing new in there. <span style="color:#00FFFF">Conclusion: Slackware fucked up.</span> (that is, you can probably run it as a plugin, but I don&#8217;t want it as a plugin! At least tell me about this in the Changelog guys!)<br />
In case -you- want to run it as a plugin, the page I linked describes it. Basically you have to put this in your <span style="color:#FFFF00">/etc/my.cnf</span>:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">&#91;</span>mysqld<span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
ignore-builtin-innodb<br />
plugin-load=<span style="color: #007800;">innodb</span>=ha_innodb_plugin.so</div></div>
<p>Checking the mysql.Slackbuild script from slackware64-current confirms my suspicions:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">checking whether to use InnoDB Storage Engine... plugin<br />
checking whether to use InnoDB Storage Engine... plugin</div></div>
<p>Fine. So I change the mysql.Slackbuild:</p>
<div class="codecolorer-container diff vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="diff codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">--- mysql.SlackBuild&nbsp; &nbsp; 2009-09-28 21:42:00.000000000 +0200<br />
<span style="color: #888822;">+++ mysql.SlackBuild-BenV &nbsp; <span style="">2009</span>-<span style="">10</span>-07 <span style="">17</span>:<span style="">37</span>:<span style="">54.747337800</span> +0200</span><br />
<span style="color: #440088;">@@ -<span style="">76</span>,<span style="">6</span> +<span style="">76</span>,<span style="">7</span> @@</span><br />
&nbsp; &nbsp;--with-ssl=/usr \<br />
&nbsp; &nbsp;--enable-largefile \<br />
&nbsp; &nbsp;--with-readline \<br />
<span style="color: #00b000;">+ &nbsp;--with-plugin-innobase=&quot;yes&quot; \</span><br />
&nbsp; &nbsp;--build=$ARCH-slackware-linux<br />
&nbsp;#<br />
&nbsp;# --without-readline</div></div>
<p>Ironically, running the patched <span style="color:#FF0000">mysql.Slackbuild</span> killed my running mysqld because of the famous OOM killer. Guess 1GB of memory isn&#8217;t enough for both compiling AND running MySQL these days :p<br />
Anyway, it gave my a package, and after upgrading to it I finally had InnoDB back the way I wanted. Yeah, my old configuration file works fine again too.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Welcome to the MySQL monitor. &nbsp;Commands end with ; or \g.<br />
Your MySQL connection <span style="color: #c20cb9; font-weight: bold;">id</span> is <span style="color: #000000;">1</span><br />
Server version: 5.1.39 Source distribution<br />
<br />
Type <span style="color: #ff0000;">'help;'</span> or <span style="color: #ff0000;">'\h'</span> <span style="color: #000000; font-weight: bold;">for</span> help. Type <span style="color: #ff0000;">'\c'</span> to <span style="color: #c20cb9; font-weight: bold;">clear</span> the current input statement.<br />
<br />
mysql<span style="color: #000000; font-weight: bold;">&gt;</span> show storage engines;<br />
+------------+---------+------------------------------------------------------------+--------------+------+------------+<br />
<span style="color: #000000; font-weight: bold;">|</span> Engine &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span> Support <span style="color: #000000; font-weight: bold;">|</span> Comment &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">|</span> Transactions <span style="color: #000000; font-weight: bold;">|</span> XA &nbsp; <span style="color: #000000; font-weight: bold;">|</span> Savepoints <span style="color: #000000; font-weight: bold;">|</span><br />
+------------+---------+------------------------------------------------------------+--------------+------+------------+<br />
<span style="color: #000000; font-weight: bold;">|</span> CSV &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">|</span> YES &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span> CSV storage engine &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span> NO &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span> NO &nbsp; <span style="color: #000000; font-weight: bold;">|</span> NO &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span><br />
<span style="color: #000000; font-weight: bold;">|</span> MRG_MYISAM <span style="color: #000000; font-weight: bold;">|</span> YES &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span> Collection of identical MyISAM tables &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">|</span> NO &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span> NO &nbsp; <span style="color: #000000; font-weight: bold;">|</span> NO &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span><br />
<span style="color: #000000; font-weight: bold;">|</span> MEMORY &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span> YES &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span> Hash based, stored <span style="color: #000000; font-weight: bold;">in</span> memory, useful <span style="color: #000000; font-weight: bold;">for</span> temporary tables &nbsp;<span style="color: #000000; font-weight: bold;">|</span> NO &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span> NO &nbsp; <span style="color: #000000; font-weight: bold;">|</span> NO &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span><br />
<span style="color: #000000; font-weight: bold;">|</span> InnoDB &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span> YES &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span> Supports transactions, row-level locking, and foreign keys <span style="color: #000000; font-weight: bold;">|</span> YES &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">|</span> YES &nbsp;<span style="color: #000000; font-weight: bold;">|</span> YES &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">|</span><br />
<span style="color: #000000; font-weight: bold;">|</span> MyISAM &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span> DEFAULT <span style="color: #000000; font-weight: bold;">|</span> Default engine <span style="color: #c20cb9; font-weight: bold;">as</span> of MySQL 3.23 with great performance &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span> NO &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span> NO &nbsp; <span style="color: #000000; font-weight: bold;">|</span> NO &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span><br />
+------------+---------+------------------------------------------------------------+--------------+------+------------+<br />
5 rows <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">set</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">0.00</span> sec<span style="color: #7a0874; font-weight: bold;">&#41;</span></div></div>
<p>****UPDATE****<br />
Seems like the guys at slackware fixed it, from their Changelog:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Sat Oct 17 23:56:15 UTC 2009<br />
ap<span style="color: #000000; font-weight: bold;">/</span>mysql-5.1.39-x86_64-2.txz: &nbsp;Rebuilt.<br />
&nbsp; Added <span style="color: #660033;">--with-innodb</span> option. &nbsp;This was omitted from the <span style="color: #c20cb9; font-weight: bold;">last</span> package version<br />
&nbsp; since .<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--help</span> no longer lists <span style="color: #660033;">--with-innodb</span> or --without-innodb,<br />
&nbsp; but evidently the option is still supported <span style="color: #7a0874; font-weight: bold;">&#40;</span>and needed<span style="color: #7a0874; font-weight: bold;">&#41;</span>.<br />
&nbsp; Thanks to Amritpal Bath.</div></div>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/mysql-5-0-5-1-on-slackware-current/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Slackware(64), Qmail and IPv6</title>
		<link>http://notes.benv.junerules.com/all/software/slackware64-qmail-and-ipv6/</link>
		<comments>http://notes.benv.junerules.com/all/software/slackware64-qmail-and-ipv6/#comments</comments>
		<pubDate>Tue, 06 Oct 2009 13:34:46 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[djbdns]]></category>
		<category><![CDATA[ipv6]]></category>
		<category><![CDATA[qmail]]></category>
		<category><![CDATA[slackware]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=485</guid>
		<description><![CDATA[Now that we have Xenbro up and running with a domain attached to it and a bunch of toy domU&#8217;s running, we soon ran into the need for a dns server and mailer.
Needless to say I don&#8217;t like the default Sendmail and Bind junk very much (wonder why Slackware still ships it&#8230;), and my experiences [...]]]></description>
			<content:encoded><![CDATA[<p>Now that we have Xenbro up and running with a domain attached to it and a bunch of toy domU&#8217;s running, we soon ran into the need for a dns server and mailer.<br />
Needless to say I don&#8217;t like the default Sendmail and Bind junk very much (wonder why Slackware still ships it&#8230;), and my experiences with Exim and Postfix aren&#8217;t all too great either.<br />
Sure, they work, but they&#8217;re too complex for my liking. I like to know what&#8217;s going on, so I still use my trusty old <a href="http://cr.yp.to/qmail.html">Qmail</a> and <a href="http://cr.yp.to/djbdns.html">Djbdns</a> for mail and dns.<br />
However, since those packages haven&#8217;t been updated in years, some newer features are missing. So I patch them 4 times over and stab them a bit so they work the way I like <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> <span id="more-485"></span></p>
<p>So what things are missing in the vanilla Qmail 1.03 package?</p>
<ul>
<li>IPv6 support</li>
<li>A ton of antispam features like SPF, DomainKeys, MFCHECK, etc</li>
<li>Authentication support</li>
<li>Filter support for stuff like Spamassassin, ClamAV, /dev/null</li>
<li>Virtual domains</li>
</ul>
<p>Probably more, but these are things I care about. Some of these points are not entirely true, for instance you could add filter support by mangling the <span style="color:#FF00FF">.qmail</span> files for all users, but these are things you want centralized so all things have to pass the filter, not for only a few accounts.<br />
In order to fix the missing features I use a few things.<br />
First of all: <a href="http://qmail.jms1.net/patches/combined-details.shtml">John M. Simpson&#8217;s combined patch</a>. This patch fixes more than half of the list. It&#8217;s a collection of smaller patches all rolled together in a nice patch that cleanly applies to qmail 1.0.3 as supplied by D.J. Bernstein. Thanks a lot to Mr Simpson! His pages also have a lot of notes and scripts on how to get qmail up and running, and how to run the services from daemontools. You might want to <a href="http://qmail.jms1.net/scripts/">check them out</a>.<br />
Next, I use <a href="http://www.inter7.com/index.php?page=vpopmail">vpopmail</a> to handle the virtual domains problem. Together with <a href="http://www.inter7.com/index.php?page=qmailadmin">qmailadmin</a> they make the virtual domains thing very easy.</p>
<p>Anyway, that is all old stuff. New stuff is having Qmail working correctly using <span style="color:#FFFF00">IPv6</span>.<br />
It&#8217;s easy to get it up and running, basically just compile qmail as usual and patch <a href="http://cr.yp.to/ucspi-tcp.html">ucspi-tcp</a> using <a href="http://www.fefe.de/ucspi/">Fefe&#8217;s IPv6 patch</a>. Make a few new qmail-smtp services for the IPv6 enabled addressses and go!<br />
While this does work for receiving mail, it fails for a few things in the combined patch &#8211; like SPF checking.<br />
You will run into stuff like:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">@</span>400000004acb39440ca58a8c qmail-smtpd<span style="color: #7a0874; font-weight: bold;">&#91;</span>28952<span style="color: #7a0874; font-weight: bold;">&#93;</span>: Received-SPF: unknown <span style="color: #7a0874; font-weight: bold;">&#40;</span>service.xenbro.nl: No IP address <span style="color: #000000; font-weight: bold;">in</span> conversation<span style="color: #7a0874; font-weight: bold;">&#41;</span></div></div>
<p>Obviously this is a lie, but at least it&#8217;s dealt with gracefully. However, you want SPF checking for the IPv6 address!<br />
Fortunately, <a href="http://www.brandonturner.net/blog/2009/08/qmail-ipv6-jms1/">Brandon Turner</a> has patched this with a patch that applies to Qmail 1.0.3 when already patched with John&#8217;s patch. Enough patches for you? <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
After recompiling and restarting your services you will see that it works now. Thanks Brandon! <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">@</span>400000004acb4025340a0b5c qmail-smtpd<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">31526</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: Received-SPF: none <span style="color: #7a0874; font-weight: bold;">&#40;</span>service.xenbro.nl: domain at je.moeder.com does not designate permitted sender hosts<span style="color: #7a0874; font-weight: bold;">&#41;</span></div></div>
<p>What does Slackware have to do with this?<br />
Nothing, I just like the way it runs the qmail services :-p</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/slackware64-qmail-and-ipv6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Net-snmp and lmSensors (and Cacti)</title>
		<link>http://notes.benv.junerules.com/all/software/net-snmp-and-lmsensors-and-cacti/</link>
		<comments>http://notes.benv.junerules.com/all/software/net-snmp-and-lmsensors-and-cacti/#comments</comments>
		<pubDate>Mon, 28 Sep 2009 23:53:59 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[cacti]]></category>
		<category><![CDATA[snmp]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=482</guid>
		<description><![CDATA[In order to get some disk and sensor stats I decided to recompile Net-SNMP on Xenbro. Since I did this before on my server at home (32 bit slackware-current) I figured it would be a breeze. Was I in for a surprise. Since I use quite a big configure string that slackbuild doesn&#8217;t handle yet [...]]]></description>
			<content:encoded><![CDATA[<p>In order to get some disk and sensor stats I decided to recompile Net-SNMP on Xenbro. Since I did this before on my server at home (32 bit slackware-current) I figured it would be a breeze. Was I in for a surprise. Since I use quite a big configure string that slackbuild doesn&#8217;t handle yet I have it handy in a &#8216;bla&#8217; file:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>xenbro:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>net-snmp-<span style="color: #000000;">5.5</span><span style="color: #666666; font-style: italic;"># cat bla </span><br />
.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--with-defaults</span> <span style="color: #660033;">--localstatedir</span>=<span style="color: #000000; font-weight: bold;">/</span>var <span style="color: #660033;">--sysconfdir</span>=<span style="color: #000000; font-weight: bold;">/</span>etc <span style="color: #660033;">--with-sys-contact</span>=<span style="color: #ff0000;">&quot;Jemoeder&quot;</span> <span style="color: #660033;">--with-mib-modules</span>=<span style="color: #ff0000;">&quot;host disman/event-mib mibII/mta_sendmail smux ucd_snmp ucd-snmp/lmSensors ucd-snmp/diskio&quot;</span> <span style="color: #660033;">--enable-shared</span> <span style="color: #660033;">--with-perl-modules</span>=<span style="color: #ff0000;">&quot;PREFIX=<span style="color: #007800;">$PKG</span>/usr INSTALLDIRS=vendor&quot;</span> <span style="color: #660033;">--enable-embedded-perl</span> <span style="color: #660033;">--with-cflags</span>=<span style="color: #ff0000;">&quot;-O2&quot;</span> <span style="color: #660033;">--with-libwrap</span> &nbsp;<span style="color: #660033;">--with-python-modules</span> &nbsp;<span style="color: #660033;">--with-ldflags</span>=-lsensors &nbsp; <span style="color: #660033;">--enable-ipv6</span> <span style="color: #660033;">--disable-debugging</span> <span style="color: #660033;">--enable-static</span>=no</div></div>
<p>However, when compiling like this both v5.5 and v5.4.2.1 of net-snmp gave me:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">mkdir</span> ucd-snmp<span style="color: #000000; font-weight: bold;">/</span>.libs<br />
&nbsp;<span style="color: #c20cb9; font-weight: bold;">gcc</span> -I..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>include -I. -I..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>agent -I..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>agent<span style="color: #000000; font-weight: bold;">/</span>mibgroup -I..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>snmplib <span style="color: #660033;">-O2</span> <span style="color: #660033;">-Ulinux</span> <span style="color: #660033;">-Dlinux</span>=linux -I<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>rpm -D_REENTRANT -D_GNU_SOURCE <span style="color: #660033;">-fno-strict-aliasing</span> <span style="color: #660033;">-pipe</span> -I<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib64<span style="color: #000000; font-weight: bold;">/</span>perl5<span style="color: #000000; font-weight: bold;">/</span>5.10.0<span style="color: #000000; font-weight: bold;">/</span>x86_64-linux-thread-multi<span style="color: #000000; font-weight: bold;">/</span>CORE <span style="color: #660033;">-c</span> ucd-snmp<span style="color: #000000; font-weight: bold;">/</span>lmSensors.c &nbsp;<span style="color: #660033;">-fPIC</span> <span style="color: #660033;">-DPIC</span> <span style="color: #660033;">-o</span> ucd-snmp<span style="color: #000000; font-weight: bold;">/</span>.libs<span style="color: #000000; font-weight: bold;">/</span>lmSensors.o<br />
ucd-snmp<span style="color: #000000; font-weight: bold;">/</span>lmSensors.c: In <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #ff0000;">'_sensor_load'</span>:<br />
ucd-snmp<span style="color: #000000; font-weight: bold;">/</span>lmSensors.c:<span style="color: #000000;">943</span>: error: expected <span style="color: #ff0000;">'='</span>, <span style="color: #ff0000;">','</span>, <span style="color: #ff0000;">';'</span>, <span style="color: #ff0000;">'asm'</span> or <span style="color: #ff0000;">'__attribute__'</span> before <span style="color: #ff0000;">'*'</span> token<br />
ucd-snmp<span style="color: #000000; font-weight: bold;">/</span>lmSensors.c:<span style="color: #000000;">943</span>: error: <span style="color: #ff0000;">'data'</span> undeclared <span style="color: #7a0874; font-weight: bold;">&#40;</span>first use <span style="color: #000000; font-weight: bold;">in</span> this <span style="color: #000000; font-weight: bold;">function</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
ucd-snmp<span style="color: #000000; font-weight: bold;">/</span>lmSensors.c:943: error: <span style="color: #7a0874; font-weight: bold;">&#40;</span>Each undeclared identifier is reported only once<br />
ucd-snmp<span style="color: #000000; font-weight: bold;">/</span>lmSensors.c:943: error: <span style="color: #000000; font-weight: bold;">for</span> each <span style="color: #000000; font-weight: bold;">function</span> it appears in.<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
ucd-snmp<span style="color: #000000; font-weight: bold;">/</span>lmSensors.c:<span style="color: #000000;">964</span>: warning: passing argument <span style="color: #000000;">1</span> of <span style="color: #ff0000;">'sensors_get_detected_chips'</span> from incompatible pointer <span style="color: #7a0874; font-weight: bold;">type</span><br />
ucd-snmp<span style="color: #000000; font-weight: bold;">/</span>lmSensors.c:964: error: too few arguments to <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #ff0000;">'sensors_get_detected_chips'</span><br />
ucd-snmp<span style="color: #000000; font-weight: bold;">/</span>lmSensors.c:<span style="color: #000000;">973</span>: error: <span style="color: #ff0000;">'SENSORS_NO_MAPPING'</span> undeclared <span style="color: #7a0874; font-weight: bold;">&#40;</span>first use <span style="color: #000000; font-weight: bold;">in</span> this <span style="color: #000000; font-weight: bold;">function</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
ucd-snmp<span style="color: #000000; font-weight: bold;">/</span>lmSensors.c:974: error: incompatible <span style="color: #7a0874; font-weight: bold;">type</span> <span style="color: #000000; font-weight: bold;">for</span> argument <span style="color: #000000;">1</span> of <span style="color: #ff0000;">'sensors_get_label'</span><br />
ucd-snmp<span style="color: #000000; font-weight: bold;">/</span>lmSensors.c:974: error: too many arguments to <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #ff0000;">'sensors_get_label'</span><br />
<span style="color: #c20cb9; font-weight: bold;">make</span><span style="color: #7a0874; font-weight: bold;">&#91;</span>2<span style="color: #7a0874; font-weight: bold;">&#93;</span>: <span style="color: #000000; font-weight: bold;">***</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>ucd-snmp<span style="color: #000000; font-weight: bold;">/</span>lmSensors.lo<span style="color: #7a0874; font-weight: bold;">&#93;</span> Error 1<br />
<span style="color: #c20cb9; font-weight: bold;">make</span><span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">2</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: Leaving directory <span style="color: #000000; font-weight: bold;">`/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>net-snmp-5.4.2.1<span style="color: #000000; font-weight: bold;">/</span>agent<span style="color: #000000; font-weight: bold;">/</span>mibgroup<span style="color: #ff0000;">'<br />
make[1]: *** [subdirs] Error 1<br />
make[1]: Leaving directory `/usr/src/net-snmp-5.4.2.1/agent'</span><br />
<span style="color: #c20cb9; font-weight: bold;">make</span>: <span style="color: #000000; font-weight: bold;">***</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>subdirs<span style="color: #7a0874; font-weight: bold;">&#93;</span> Error <span style="color: #000000;">1</span></div></div>
<p>Google was as useless as ever (only 1 thread about this who solved it installing some ancient version of lmsensors or something), so I had to dick around to get this to work.<br />
First I wondered what was different about my server at home and Xenbro. 32 vs 64 bits obviously, but otherwise&#8230; not that much.<br />
So I tried upgrading libtool from version 1.5 to 2.2.6a. Recompile wasted another 5 minutes of my life.<br />
Then I read something about ucd-snmp/lmSensors vs ucd-snmp/lmsensorsMib. I have no idea what this is supposed to do, but I&#8217;d be better of not having read about it. Both options won&#8217;t compile because of the same compilation error above.</p>
<p>Finally after hours of cursing I installed lm_sensors 2.10 to /usr/local and hinted net-snmp to compile using -L/usr/local/lib, doing that made it it compile. You just have to push it a bit when it breaks&#8230; (and yes, I found out some older lm_sensors stuff was still lingering around on that home server). It kinda went like this:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;"># cd net-snmp-5.5/</span><br />
<span style="color: #666666; font-style: italic;"># bash bla</span><br />
<span style="color: #666666; font-style: italic;"># make</span><br />
<span style="color: #666666; font-style: italic;"># cd agent/</span><br />
<span style="color: #666666; font-style: italic;"># vim Makefile # change LD_FLAGS to include -L/usr/local/lib</span><br />
<span style="color: #666666; font-style: italic;"># make</span><br />
<span style="color: #666666; font-style: italic;"># cd ..</span><br />
<span style="color: #666666; font-style: italic;"># make</span><br />
<span style="color: #666666; font-style: italic;"># vim apps/Makefile # same edit as above</span><br />
<span style="color: #666666; font-style: italic;"># make</span></div></div>
<p>Amazing enough it even works now. You&#8217;d expect it to crash and barf all over the place&#8230;. or at least I did.</p>
<p>Now finally back to what I wanted to do: SENSOR GRAPHS in Cacti!!!<br />
A pretty much excellent description on how to do this is here: <a href="http://www.eric-a-hall.com/software/cacti-netsnmp-lmsensors/">Eric A. Hall&#8217;s on Cacti and lmsensor readings</a>.<br />
His steps summarized: </p>
<ol>
<li>Get net-snmp to return sensor readings</li>
<li>Download <a href="http://www.eric-a-hall.com/software/cacti-netsnmp-lmsensors/cacti-netsnmp-lmsensors.0.8.tar.gz">Cacti-netsnmp-lmsensors.tar.gz</a> which I mirrored here: <a href="http://notes.benv.junerules.com/wp-content/plugins/download-monitor/download.php?id=cacti-netsnmp-lmsensors.0.8.tar.gz" title="Downloaded 43 times">Cacti lmsensors</a> - Version 0.8 - SHA: f9c3f8b4d172cce9e63fa3fa0c0bbf7a58c17e7c</li>
<li>Untar, put files in right place, import templates in Cacti</li>
<li>Add data queries and graphs to hosts</li>
</ol>
<p>For more details check out his page, it has a detailed explanation. Thanks for building it Eric!</p>
<p>Then there&#8217;s disk stats. Half the links on the forums are hard to find or dead, so I&#8217;ll just take my own downloads. Easier for the next time I need it <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
<a href="http://forums.cacti.net/about12742-0-asc-0.html">This is the original thread for snmpdiskio</a> with <a href="http://forums.cacti.net/download.php?id=5233">the templates in here</a>. Then there&#8217;s a missing download for a copy/paste version of <a href="http://forums.cacti.net/viewtopic.php?p=124793#124793">this post</a>. I&#8217;ll save the copy/pasting for you, just leech it if you need it (only for when your net-snmp fails!):<br />
<a href="http://notes.benv.junerules.com/wp-content/plugins/download-monitor/download.php?id=snmpdiskio" title="Downloaded 48 times">snmpdiskio</a> - Version 0.9.6 - SHA: 0a4229c35a879240ea4c5128adbd1cb60b745757<br />
Finally there&#8217;s a script that fetches the stuff <a href="http://forums.cacti.net/download.php?id=12881">here</a>. Put that script in resource/snmp_queries/partition.xml<br />
Import the two templates from the snmpdiskio-v0.9.4 tarball.<br />
Next add the new snmp query (&#8220;Get Device I/O&#8221;) to your device (Devices -> $yourdevice -> at bottom select it from the pulldown menu). Create graphs for this device -> have fun.</p>
<p>I was going to add some images, but I&#8217;m too tired now. Hope you can get it to work, good luck <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/net-snmp-and-lmsensors-and-cacti/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Xen and routed IPv6</title>
		<link>http://notes.benv.junerules.com/all/software/xen-and-routed-ipv6/</link>
		<comments>http://notes.benv.junerules.com/all/software/xen-and-routed-ipv6/#comments</comments>
		<pubDate>Mon, 28 Sep 2009 11:56:16 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[ipv6]]></category>
		<category><![CDATA[xen]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=476</guid>
		<description><![CDATA[Xenbro has found its way into the Coloclue racks where it is now running with real IP addresses. The Coloclue network routes all IP space to the main IP address of the machine so that precious IP addresses are not &#8216;lost&#8217; to reserved network and broadcast addresses. This means that my /29 has 8 usable [...]]]></description>
			<content:encoded><![CDATA[<p>Xenbro has found its way into the Coloclue racks where it is now running with real IP addresses. The Coloclue network routes all IP space to the main IP address of the machine so that precious IP addresses are not &#8216;lost&#8217; to reserved network and broadcast addresses. This means that my /29 has 8 usable addresses in stead of only 6. In order to set this up you simply change the network-script and vif-script to the -route variants in <span style="color:#FF00FF">/etc/xen/xend-config.sxp</span> so it looks like this:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">&#40;</span>network-script network-route<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>vif-script &nbsp; &nbsp; vif-route<span style="color: #7a0874; font-weight: bold;">&#41;</span></div></div>
<p>Easy. Make sure ip forwarding is enabled though (check <span style="color:#FFFF00">/proc/sys/net/ipv4/ip_forward</span>, it should be 1) , and for IPv6 forwarding you need to enable <span style="color:#FFFF00">/proc/sys/net/ipv6/conf/all/forwarding</span>. Note that you must enable it on the -all- directory, only enabling it on a single interface won&#8217;t do what you&#8217;d expect (this took me a while to figure out <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> ).<br />
After requesting both a set of IPv4 and IPv6 addresses I stumbled upon Xen&#8217;s <span style="color:#00FFFF">/etc/xen/scripts/vif-route</span> script which doesn&#8217;t do anything with IPv6! Since I do want my IPv6 space routed to my domU (and probably to the others as well) I decided to molest the script a little. My modification assumes you provide both the IPv4 address and IPv6 range you want to use on the domU. Here&#8217;s the diff:<br />
<a href="http://notes.benv.junerules.com/wp-content/plugins/download-monitor/download.php?id=xen-3.4-vif-route-ipv6.diff" title="Downloaded 111 times">xen 3.4 vif-route patch to support IPv6</a> - Version  - SHA: e82dd95b8725c326121603fbd6168b3f88f5b881<br />
Note that my patch adds some extra logging as well, you can hack that out yourself if it annoys you.<br />
If patching is too difficult for you, here&#8217;s the patched vif-route script:<br />
<a href="http://notes.benv.junerules.com/wp-content/plugins/download-monitor/download.php?id=vif-route" title="Downloaded 98 times">Patched Xen 3.4.1 vif-route to support IPv6</a> - Version  - SHA: 29a28f4a8cff787233c1163435c86730fd5346fa</p>
<p>Don&#8217;t forget to put your IP addresses in your domU&#8217;s config file:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;"># domU.cfg</span><br />
vif = <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">'mac=00:16:11:11:2b:11, ip=2345::1/64 192.168.2.100'</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span></div></div>
<p>After patching vif-route and enabling the script in xend-config.sxp you still have to set routes to the dom0 in your domU. Example for dom0 with 192.168.1.1 and 1234::1</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;"># IPv4</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>domU<span style="color: #666666; font-style: italic;"># ifconfig eth0 192.168.2.10 netmask 255.255.255.255 # Your domU's IPv4 address here</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>domU<span style="color: #666666; font-style: italic;"># ip ro add 192.168.1.1 dev eth0</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>domU<span style="color: #666666; font-style: italic;"># ip ro add default via 192.168.1.1</span><br />
<span style="color: #666666; font-style: italic;"># IPv6</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>domU<span style="color: #666666; font-style: italic;"># ip -6 addr add 2345::1/64 dev eth0 # Your domU's IPv6 range here</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>domU<span style="color: #666666; font-style: italic;"># ip -6 ro add 1234::1 dev eth0</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>domU<span style="color: #666666; font-style: italic;"># ip -6 ro add default via 1234::1</span></div></div>
<p>Now it works (unless you did something stupid of course) <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/xen-and-routed-ipv6/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Slackware and dial-up through a mobile phone</title>
		<link>http://notes.benv.junerules.com/all/software/slackware-and-dial-up-through-a-mobile-phone/</link>
		<comments>http://notes.benv.junerules.com/all/software/slackware-and-dial-up-through-a-mobile-phone/#comments</comments>
		<pubDate>Thu, 24 Sep 2009 18:28:07 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[dial-up]]></category>
		<category><![CDATA[slackware]]></category>
		<category><![CDATA[wvdial]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=470</guid>
		<description><![CDATA[This weekend we&#8217;ll be going to some abandoned part of the country because we&#8217;re &#8220;celebrating&#8221; the 50th birthday of Lotjuh&#8217;s mom. (celebrating the fact that someone is a year closer to death&#8230;. weird rituals people engage in&#8230;). Anyway, since it&#8217;s in the middle of nowhere (&#8220;Limburg&#8221;, might as well be germany or belgium as far [...]]]></description>
			<content:encoded><![CDATA[<p>This weekend we&#8217;ll be going to some abandoned part of the country because we&#8217;re &#8220;celebrating&#8221; the 50th birthday of Lotjuh&#8217;s mom. (celebrating the fact that someone is a year closer to death&#8230;. weird rituals people engage in&#8230;). Anyway, since it&#8217;s in the middle of nowhere (&#8220;Limburg&#8221;, might as well be germany or belgium as far as I&#8217;m concerned) and the information page of the abandoned place we&#8217;re staying at didn&#8217;t hint anything about internet, I&#8217;m assuming the worst. Which means no wireless, no wired, only mobile phones. (and singing people *sigh*).<br />
However, there is still hope to <a href="http://www.animecubed.com/billy/?91818" title="Billy vs Snakeman!">play Billy vs Snakeman</a> this weekend.</p>
<p>Through a mobile phone!<span id="more-470"></span></p>
<p>Lotjuh has an LG Chocolate (of which the battery is dying), and with it came a little cable that connects the device to a USB port. So hopefully I plugged it into my laptop. The one that runs pokemon os. <code class="codecolorer text vibrant"><span class="text">dmesg</span></code> showed some gibberish, but it was only about some kind of mass storage device it found. Bah.<br />
The phone showed a screen with:<br />
<blockquote>If you use modem, select &#8220;Connectivity-modem&#8221;</p></blockquote>
<p>However, it didn&#8217;t respond to any keypresses. After disconnecting it again and going through the menu I finally found the holy grail that I was looking for. It was filled with candy. And modem. It was hidden at Menu -> Settings -> Connectivity -> Modem -> YES YES YES!!!<br />
Connecting it again now gave <code class="codecolorer bash vibrant"><span class="bash">cdc_acm <span style="color: #000000;">3</span>-<span style="color: #000000;">1</span>:<span style="color: #000000;">1.0</span>: ttyACM0: USB ACM device</span></code>. Woohoo!<br />
But how do we use such a thing? And since I&#8217;m not bringing this laptop, how do we use it on slackware?</p>
<p>Google was more helpful this time and showed me <a href="http://alumnit.ca/wiki/index.php?page=DownloadReleases">wvdial</a>. Sounds easy, so I got the <span style="color:#FF00FF">wvstreams</span> library and ran it through slackbuild. However, it complained about not finding Qt and readline. Qt was fixed by installing the official qt3 package and sourcing <span style="color:#FF00FF">/etc/profile.d/qt.sh</span>, but readline failed because of this:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">configure:8916: checking <span style="color: #000000; font-weight: bold;">for</span> readline <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #660033;">-lreadline</span><br />
configure:8951: <span style="color: #c20cb9; font-weight: bold;">g++</span> <span style="color: #660033;">-o</span> conftest &nbsp;-I<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>dbus-1.0 -I<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>dbus-1.0<span style="color: #000000; font-weight: bold;">/</span>include &nbsp; -Iyes<span style="color: #000000; font-weight: bold;">/</span>include <span style="color: #660033;">-ldbus-1</span> &nbsp; <span style="color: #660033;">-Lyes</span> conftest.cpp <span style="color: #660033;">-lreadline</span> &nbsp; <span style="color: #000000; font-weight: bold;">&gt;&amp;</span><span style="color: #000000;">5</span><br />
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>gcc<span style="color: #000000; font-weight: bold;">/</span>i486-slackware-linux<span style="color: #000000; font-weight: bold;">/</span>4.3.3<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>libreadline.so: undefined reference to <span style="color: #000000; font-weight: bold;">`</span>PC<span style="color: #ff0000;">'<br />
/usr/lib/gcc/i486-slackware-linux/4.3.3/../../../libreadline.so: undefined reference to `tgetflag'</span><br />
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>gcc<span style="color: #000000; font-weight: bold;">/</span>i486-slackware-linux<span style="color: #000000; font-weight: bold;">/</span>4.3.3<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>libreadline.so: undefined reference to <span style="color: #000000; font-weight: bold;">`</span>tgetent<span style="color: #ff0000;">'<br />
/usr/lib/gcc/i486-slackware-linux/4.3.3/../../../libreadline.so: undefined reference to `UP'</span><br />
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>gcc<span style="color: #000000; font-weight: bold;">/</span>i486-slackware-linux<span style="color: #000000; font-weight: bold;">/</span>4.3.3<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>libreadline.so: undefined reference to <span style="color: #000000; font-weight: bold;">`</span>tputs<span style="color: #ff0000;">'<br />
/usr/lib/gcc/i486-slackware-linux/4.3.3/../../../libreadline.so: undefined reference to `tgoto'</span><br />
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>gcc<span style="color: #000000; font-weight: bold;">/</span>i486-slackware-linux<span style="color: #000000; font-weight: bold;">/</span>4.3.3<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>libreadline.so: undefined reference to <span style="color: #000000; font-weight: bold;">`</span>tgetnum<span style="color: #ff0000;">'<br />
/usr/lib/gcc/i486-slackware-linux/4.3.3/../../../libreadline.so: undefined reference to `BC'</span><br />
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>gcc<span style="color: #000000; font-weight: bold;">/</span>i486-slackware-linux<span style="color: #000000; font-weight: bold;">/</span>4.3.3<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>libreadline.so: undefined reference to <span style="color: #000000; font-weight: bold;">`</span>tgetstr<span style="color: #ff0000;">'</span></div></div>
<p>This problem was quickly fixed by adding the ncurses library to the LIBS environment variable like this:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>error:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>wvstreams-<span style="color: #000000;">4.6</span><span style="color: #666666; font-style: italic;"># export LIBS=&quot; -lncurses&quot;</span></div></div>
<p>This time around configure didn&#8217;t complain anymore and we continued to build the package.<br />
That also failed:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">linking libwvdbus.so...<br />
<span style="color: #c20cb9; font-weight: bold;">g++</span>: <span style="color: #000000; font-weight: bold;">/</span>libdbus-1.a: No such <span style="color: #c20cb9; font-weight: bold;">file</span> or directory<br />
<span style="color: #c20cb9; font-weight: bold;">make</span>: <span style="color: #000000; font-weight: bold;">***</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>libwvdbus.so<span style="color: #7a0874; font-weight: bold;">&#93;</span> Error <span style="color: #000000;">1</span></div></div>
<p>No surprise that it couldn&#8217;t find libdus there. Not only that, it&#8217;s the wrong library, I don&#8217;t have the thing statically linked.<br />
Here&#8217;s a patch that suppsedly fixes it:<br />
<a href="http://notes.benv.junerules.com/wp-content/plugins/download-monitor/download.php?id=wvstreams-4.6-dbus.patch" title="Downloaded 22 times">wvstreams 4.6 dbus patch</a> - Version  - SHA: d64703eb27da74348ac0e745c498138c78650f5c<br />
You&#8217;d expect it to work now, but ha! It doesn&#8217;t. Somehow it fails to set <span style="color:#FFFF00">DBUS_LIBDIR</span> to <span style="color:#FF00FF">/usr/lib</span> (or <span style="color:#FF00FF">/usr/lib64</span> if you have a 64 bit version of slackware), so help him with it and it&#8217;ll work:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>error:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>wvstreams-<span style="color: #000000;">4.6</span><span style="color: #666666; font-style: italic;"># export DBUS_LIBDIR=/usr/lib</span></div></div>
<p>Now it should compile fine after you run configure again (I used slackbuild of course) and you&#8217;ll have the wvstreams package. (it even worked on 64 bit!)</p>
<p>Next the <span style="color:#FF00FF">wvdial</span> tool was pulled through slackbuild.<br />
However, this thing doesn&#8217;t even include configure, only a Makefile. So edit the Makefile to change the paths and use make to compile.<br />
Or take my packages if you trust me for not formatting your harddisk and rootkitting your mom:<br />
32 bit slackware 13 package:<br />
<a href="http://notes.benv.junerules.com/wp-content/plugins/download-monitor/download.php?id=wvdial-1.60-i386-1.txz" title="Downloaded 20 times">wvdial 32 bit slackware 13 package</a> - Version  - SHA: c19693808861373fa403ea5e9caf427c2cc64924<br />
64 bit slackware 13 package:<br />
<a href="http://notes.benv.junerules.com/wp-content/plugins/download-monitor/download.php?id=wvdial-1.60-x86_64-1.txz" title="Downloaded 20 times">wvdial slackware 13 (i386) package</a> - Version 1.60 - SHA: 19d67b45ca26542adc7967725483266415710ff6</p>
<p>Then finally, time to test the mobile connection!<br />
First for the configuration of the modem, run <span style="color:#FFFF33">wvdialconf</span> and it will write a config file for you to <span style="color:#00FFFF">/etc/wvdial.conf</span>.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>error:~<span style="color: #666666; font-style: italic;"># wvdialconf </span><br />
Editing <span style="color: #000000; font-weight: bold;">`/</span>etc<span style="color: #000000; font-weight: bold;">/</span>wvdial.conf<span style="color: #ff0000;">'.<br />
<br />
Scanning your serial ports for a modem.<br />
<br />
ttyACM0&lt;*1&gt;: ATQ0 V1 E1 -- OK<br />
ttyACM0&lt;*1&gt;: ATQ0 V1 E1 Z -- OK<br />
ttyACM0&lt;*1&gt;: ATQ0 V1 E1 S0=0 -- OK<br />
ttyACM0&lt;*1&gt;: ATQ0 V1 E1 S0=0 &amp;C1 -- OK<br />
ttyACM0&lt;*1&gt;: ATQ0 V1 E1 S0=0 &amp;C1 &amp;D2 -- OK<br />
ttyACM0&lt;*1&gt;: ATQ0 V1 E1 S0=0 &amp;C1 &amp;D2 +FCLASS=0 -- OK<br />
ttyACM0&lt;*1&gt;: Modem Identifier: ATI -- LG Electronics Inc.<br />
ttyACM0&lt;*1&gt;: Speed 4800: AT -- OK<br />
ttyACM0&lt;*1&gt;: Speed 9600: AT -- OK<br />
ttyACM0&lt;*1&gt;: Speed 19200: AT -- OK<br />
ttyACM0&lt;*1&gt;: Speed 38400: AT -- OK<br />
ttyACM0&lt;*1&gt;: Speed 57600: AT -- OK<br />
ttyACM0&lt;*1&gt;: Speed 115200: AT -- OK<br />
ttyACM0&lt;*1&gt;: Speed 230400: AT -- OK<br />
ttyACM0&lt;*1&gt;: Speed 460800: AT -- OK<br />
ttyACM0&lt;*1&gt;: Max speed is 460800; that should be safe.<br />
ttyACM0&lt;*1&gt;: ATQ0 V1 E1 S0=0 &amp;C1 &amp;D2 +FCLASS=0 -- OK<br />
<br />
Found an USB modem on /dev/ttyACM0.<br />
/etc/wvdial.conf&lt;Warn&gt;: Can'</span>t open <span style="color: #ff0000;">'/etc/wvdial.conf'</span> <span style="color: #000000; font-weight: bold;">for</span> reading: No such <span style="color: #c20cb9; font-weight: bold;">file</span> or directory<br />
<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>wvdial.conf<span style="color: #000000; font-weight: bold;">&lt;</span>Warn<span style="color: #000000; font-weight: bold;">&gt;</span>: ...starting with blank configuration.<br />
Modem configuration written to <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>wvdial.conf.<br />
ttyACM0<span style="color: #000000; font-weight: bold;">&lt;</span>Info<span style="color: #000000; font-weight: bold;">&gt;</span>: Speed <span style="color: #000000;">460800</span>; init <span style="color: #ff0000;">&quot;ATQ0 V1 E1 S0=0 &amp;C1 &amp;D2 +FCLASS=0&quot;</span></div></div>
<p>Next, edit the configuration file and change the <span style="color:#33FF33">Phone</span>, <span style="color:#33FF33">User</span>, and <span style="color:#33FF33">Password</span> line to reflect your account that you got from your ISP. When that&#8217;s done you can finally try to dial up!</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>error:~<span style="color: #666666; font-style: italic;"># wvdial</span><br />
--<span style="color: #000000; font-weight: bold;">&gt;</span> WvDial: Internet dialer version 1.60<br />
--<span style="color: #000000; font-weight: bold;">&gt;</span> Initializing modem.<br />
--<span style="color: #000000; font-weight: bold;">&gt;</span> Sending: ATZ<br />
ATZ<br />
OK<br />
--<span style="color: #000000; font-weight: bold;">&gt;</span> Sending: ATQ0 V1 E1 <span style="color: #007800;">S0</span>=0 <span style="color: #000000; font-weight: bold;">&amp;</span>C1 <span style="color: #000000; font-weight: bold;">&amp;</span>D2 +<span style="color: #007800;">FCLASS</span>=0<br />
ATQ0 V1 E1 <span style="color: #007800;">S0</span>=0 <span style="color: #000000; font-weight: bold;">&amp;</span>C1 <span style="color: #000000; font-weight: bold;">&amp;</span>D2 +<span style="color: #007800;">FCLASS</span>=0<br />
OK<br />
--<span style="color: #000000; font-weight: bold;">&gt;</span> Modem initialized.<br />
--<span style="color: #000000; font-weight: bold;">&gt;</span> Sending: ATDT01234567JEMOEDER<br />
--<span style="color: #000000; font-weight: bold;">&gt;</span> Waiting <span style="color: #000000; font-weight: bold;">for</span> carrier.<br />
ATDT01234567JEMOEDER<br />
CONNECT 9600<br />
--<span style="color: #000000; font-weight: bold;">&gt;</span> Carrier detected. &nbsp;Waiting <span style="color: #000000; font-weight: bold;">for</span> prompt.<br />
1: Welcome to XS4ALL, <span style="color: #000000; font-weight: bold;">for</span> UUCP or terminal <span style="color: #c20cb9; font-weight: bold;">login</span>, please dial 01234-56789<br />
<span style="color: #c20cb9; font-weight: bold;">login</span>: <br />
<span style="color: #c20cb9; font-weight: bold;">login</span>: <br />
--<span style="color: #000000; font-weight: bold;">&gt;</span> Looks like a <span style="color: #c20cb9; font-weight: bold;">login</span> prompt.<br />
--<span style="color: #000000; font-weight: bold;">&gt;</span> Sending: jemoeder<br />
<span style="color: #c20cb9; font-weight: bold;">login</span>: <br />
--<span style="color: #000000; font-weight: bold;">&gt;</span> Looks like a <span style="color: #c20cb9; font-weight: bold;">login</span> prompt.<br />
--<span style="color: #000000; font-weight: bold;">&gt;</span> Sending: jemoeder<br />
jemoeder<br />
Password: <br />
--<span style="color: #000000; font-weight: bold;">&gt;</span> Looks like a password prompt.<br />
--<span style="color: #000000; font-weight: bold;">&gt;</span> Sending: <span style="color: #7a0874; font-weight: bold;">&#40;</span>password<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<span style="color: #000000; font-weight: bold;">******</span><br />
Login incorrect <br />
<span style="color: #c20cb9; font-weight: bold;">login</span>: <br />
--<span style="color: #000000; font-weight: bold;">&gt;</span> Looks like a <span style="color: #c20cb9; font-weight: bold;">login</span> prompt.<br />
--<span style="color: #000000; font-weight: bold;">&gt;</span> Sending: jemoeder<br />
iseenhoer<br />
Password: <br />
--<span style="color: #000000; font-weight: bold;">&gt;</span> Looks like a password prompt.<br />
--<span style="color: #000000; font-weight: bold;">&gt;</span> Sending: <span style="color: #7a0874; font-weight: bold;">&#40;</span>password<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
--<span style="color: #000000; font-weight: bold;">&gt;</span> Don<span style="color: #ff0000;">'t know what to do! &nbsp;Starting pppd and hoping for the best.<br />
--&gt; Starting pppd at Thu Sep 24 20:21:09 2009<br />
--&gt; Pid of pppd: 6602<br />
--&gt; Using interface ppp0<br />
--&gt; pppd: @?0[08]@?0[08]<br />
--&gt; pppd: @?0[08]@?0[08]<br />
--&gt; pppd: @?0[08]@?0[08]<br />
--&gt; pppd: @?0[08]@?0[08]<br />
--&gt; pppd: @?0[08]@?0[08]<br />
--&gt; pppd: @?0[08]@?0[08]<br />
--&gt; local &nbsp;IP address 30.152.326.815<br />
--&gt; pppd: @?0[08]@?0[08]<br />
--&gt; remote IP address -6.234.56.89<br />
--&gt; pppd: @?0[08]@?0[08]<br />
--&gt; primary &nbsp; DNS address 194.109.6.66<br />
--&gt; pppd: @?0[08]@?0[08]<br />
--&gt; secondary DNS address 194.109.104.104<br />
--&gt; pppd: @?0[08]@?0[08]</span></div></div>
<p>Woohoo, it logged in! At this point wvdial will be stuck until you want to disconnect (CTRL-C or kill).<br />
Have fun paying for your expensive slow as dirt dial-up internet. But hopefully it will be good enough for me to check mail and play <a href="http://www.animecubed.com/billy/?91818">Billy</a> this weekend <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/slackware-and-dial-up-through-a-mobile-phone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pretty graphs!</title>
		<link>http://notes.benv.junerules.com/all/software/pretty-graphs/</link>
		<comments>http://notes.benv.junerules.com/all/software/pretty-graphs/#comments</comments>
		<pubDate>Thu, 24 Sep 2009 15:59:30 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Boring]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[cacti]]></category>
		<category><![CDATA[munin]]></category>
		<category><![CDATA[rrdtool]]></category>
		<category><![CDATA[snmp]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=443</guid>
		<description><![CDATA[Everyone loves them (except for idiots of course), pretty graphs that show fancy lines and stuff. Especially stuff.
For instance stuff like this:
Why make these graphs? Because you can. Because they can show you gradual changes that you normally wouldn&#8217;t notice because the change per day is only very little. Because they&#8217;re fancy. Because they can [...]]]></description>
			<content:encoded><![CDATA[<p>Everyone loves them (except for idiots of course), pretty graphs that show fancy lines and stuff. Especially stuff.<br />
For instance stuff like this:<br />
<div id="attachment_444" class="wp-caption alignleft" style="width: 310px"><a href="http://notes.benv.junerules.com/wp-content/uploads/2009/09/iejoor-traffic-week.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/09/iejoor-traffic-week-300x129.png" alt="Traffic graph" title="Traffic graph" width="300" height="129" class="size-medium wp-image-444" /></a><p class="wp-caption-text">Traffic graph</p></div><br />
<div id="attachment_445" class="wp-caption aligncenter" style="width: 310px"><a href="http://notes.benv.junerules.com/wp-content/uploads/2009/09/uil-disk-month.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/09/uil-disk-month-300x94.png" alt="Disk I/O" title="Disk I/O" width="300" height="94" class="size-medium wp-image-445" /></a><p class="wp-caption-text">Disk I/O</p></div><br />
<div id="attachment_448" class="wp-caption alignright" style="width: 310px"><a href="http://notes.benv.junerules.com/wp-content/uploads/2009/09/uil-hddtemp-month.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/09/uil-hddtemp-month-300x129.png" alt="HDD temperature" title="HDD temperature" width="300" height="129" class="size-medium wp-image-448" /></a><p class="wp-caption-text">HDD temperature</p></div></p>
<p>Why make these graphs? Because you can. Because they can show you gradual changes that you normally wouldn&#8217;t notice because the change per day is only very little. Because they&#8217;re fancy. Because they can give an indication on how hot stuff runs. Because they can kill your mother while you sleep. Because they got all the legendary items that you&#8217;ll never have. Tons of reasons.<br />
But mainly because they&#8217;re pretty <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> <span id="more-443"></span></p>
<div id="attachment_450" class="wp-caption alignleft" style="width: 310px"><a href="http://notes.benv.junerules.com/wp-content/uploads/2009/09/fileserver-schuur.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/09/fileserver-schuur-300x225.jpg" alt="Fileserver in the barn" title="Fileserver in the barn" width="300" height="225" class="size-medium wp-image-450" /></a><p class="wp-caption-text">Fileserver in the barn</p></div><br />
(Thanks to the <a href="http://archive.org/">waybackmachine</a> for this foto on the left, I had lost it!)<br />
Years ago when my fileserver was hanging on a wall in the barn (who needs cases anyway) where it would sometimes literally freeze, and sometimes be a whopping 30-40 degrees I decided it would be interesting to graph these temperatures etc. I dove into <a href="http://www.lm-sensors.org/">lm_sensors</a> and managed to get temperature information from my motherboard sensors. But where do you stick them?</p>
<p>These days there are plenty of options, but back the option that I liked best was write some scripts that hack together a bunch of <span style="color:#FF00FF">rrdtool</span> commands and run those from cron every 5 minutes. For those who don&#8217;t know rrdtool, <a href="http://oss.oetiker.ch/rrdtool/">RRDtool</a> is a neat tool that creates round robin databases that you can feed data into based on an interval of your choosing. After feeding it information you can pull graphs out of it as shown in the top images with a ton of options.<br />
Hacking these scripts together was fun the first time, but after a while it gets tedious. Especially when you lose the scripts to a harddisk crash or have to rewrite them because of different output etc. So what some people do is use a tool that takes data from a source (still a script in most cases, but very tiny scripts) and stashes it into a rrdtool database for them. Some of them even generate the graphs for you with a nice little (web)interface. </p>
<p>So after losing the entire fileserver after moving (guess it didn&#8217;t like being removed from the barn) I checked out several tools. </p>
<ul>
<li><a href="http://oss.oetiker.ch/mrtg/">MRTG</a> is well known for making those router datatraffic graphs. People (ab)use it for generating tons of other graphs as well these days. Nice and simple if you want to generate those data traffic graphs, but if you want a tool that is a little more versatile you probably do not want MRTG. It&#8217;s cool though, and made by the same author as RRDtool.</li>
<li><a href="http://munin.projects.linpro.no/">Munin</a> is a bigger project aimed at monitoring pretty much everything. There&#8217;s a ton of plugins for this beast that do just that. However, when playing around with it I found out that it also sucked a ton of CPU out of my machine while generating the graphs every time. It has a CGI mode where it&#8217;s supposed to only generate those when requested, but I couldn&#8217;t get it working (dead image links and everything). Cute toy, but it&#8217;s still very rough around the edges. Too much for my liking, so I ditched it after toying with it for a few months.</li>
<li>Then we have <a href="http://www.cacti.net/">Cacti</a>, the tool I still use today. You can read more about it below.</li>
<li>Of course there are also a ton of commercial solutions for this, but I don&#8217;t like commercial stuff. I&#8217;ve heard a few good things about <a href="http://www.zenoss.com/product/systems-management">ZenOSS</a> though&#8230; but I can&#8217;t get through their commercial site. No info, only marketing bullshit. So no go. (and no sale)</li>
</ul>
<h2>Cacti</h2>
<p>Right now I&#8217;m back to Cacti again for the pretty graphs solution. Why Cacti?</p>
<ul>
<li>Relatively nice web interface to configure and view your data sources, devices to monitor, and of course your graphs</li>
<li>Comes with a bunch of good default graphs and tools. Templates are good.</li>
<li>Doesn&#8217;t suck the life out of my CPU, although obviously all monitoring solutions waste a bunch of CPU. One reason is that it generates graphs on demand, not every 5 minutes.</li>
<li>Easy installation (Apache + PHP + MySQL), doesn&#8217;t require much on other devices that you want to monitor. (SNMP is enough most of the times)</li>
</ul>
<p>What sucks about Cacti?</p>
<ul>
<li>It can be a bitch to get a graph working. One of the reasons I switched to other products was that I couldn&#8217;t get Cacti to work for some very simple graphs, but I couldn&#8217;t figure out why it wouldn&#8217;t work.</li>
<li>Interface could use a redesign. It works, but the steps to generate a graph are confusing, there are several ways to do it and half of them don&#8217;t work as you&#8217;d expect. Maybe some wizards could fix this though.</li>
<li>Development isn&#8217;t dead, but it sure as hell isn&#8217;t going anywhere soon. When I quit using Cacti it pretty much looked and worked the same as it does now. That&#8217;s been 3 years I think.</li>
</ul>
<p>Installing Cacti is something you&#8217;ll manage yourself. Just trash it in the webdir, point your browser at it and walk through the installation steps. Easy enough. Just make sure your server has net-snmp installed. Now for adding some basic graphs.</p>
<p>The easiest way of generating graphs is by getting your data through <a href="http://en.wikipedia.org/wiki/Simple_Network_Management_Protocol">SNMP</a>. Most (not too cheap) routers and managed switches respond to it, and on all *nix systems you can get it running. Configuring SNMP can be a little more annoying though, since it&#8217;s one of those products that are really confusing to start with. Either walk through <span style="color:#00FFFF">snmpconf -g basic_setup</span> to generate your <span style="color:#FFFF00">snmpd.conf</span>, or take mine for some defaults. Be sure to close SNMP from outside your network of trust (the internet), they don&#8217;t need that access. SNMP is one of those protocols that can&#8217;t convince me of being secure. There are 3 versions of it, version 1 basically has no security, version 2 has no security with added layers of obscurity and with version 3 it becomes impossible to operate while having user/password/network combinations of &#8220;security&#8221;. So I don&#8217;t trust it, but that&#8217;s what a firewall is for. Since I don&#8217;t trust it anyway, I have the configuration pretty much open for reading anything by anyone as long as you can reach it. (I&#8217;m sure the SNMP experts disagree with my vision. You can link your tutorials on how to set it up below).<br />
<a href="http://notes.benv.junerules.com/wp-content/plugins/download-monitor/download.php?id=snmpd.conf" title="Downloaded 23 times">snmpd.conf</a> - Version  - SHA: 2312cae8b385d02864094427db75696857d16a32<br />
Oh yeah, another beauty: smnpd and its configuration depend on how it was compiled. So sometimes you do get disk stats, sometimes you don&#8217;t. Sensor statistics usually isn&#8217;t included, but if you recompile net-snmp and add <code class="codecolorer text vibrant"><span class="text">--with-mib-modules=&quot;ucd-snmp/lmSensors&quot;</span></code> (and your other modules!!!) you at least have a chance of getting it working.<br />
If you want to test or check the information that your snmp daemon returns, try <code class="codecolorer text vibrant"><span class="text">snmpwalk -v1 -c public $YOURHOSTNAME</span></code>.</p>
<p>Now that we&#8217;ve got that out of the way, let&#8217;s walk through the steps of creating fancy graphs.</p>
<ol>
<li value="0">On your device that you want to make graphs of, install snmpd and put the snmpd.conf in /etc/snmp. Oh, and start snmpd.</li>
<li>In the webinterface (as admin), go to <span style="color:#00FFFF">Console</span> -> <span style="color:#00FFFF">Devices</span> and click <span style="color:#00FFFF">add</span> in the upper right corner</li>
<li>Fill out information that&#8217;s obvious (hostname, description) and pick <span style="color:#FF0055">ucd/net SNMP host</span> for template. I always pick SNMP version 2 (since 3 is so much more hassle to setup) and hit create. It should return <span style="color:#FF00FF">Save Successful.</span>If it mentions <span style="color:#FF1111">SNMP error</span> then your snmp daemon could not be reached or returned bad information. Fix it! For pokemon os check out <span style="color:#FFFF00">/etc/default/snmpd</span> where they run it only on 127.0.0.1 by default. Either remove it or add your internal network IP address there. If you think it&#8217;s fixed OR want some debug info, scroll down to <span style="color:#00FF00">Associated Data Queries</span> and click <span style="color:#FF00FF">verbose query</span> (any one will do).  Once SNMP information doesn&#8217;t moan about errors anymore but gives you some decent info, it&#8217;s good.</li>
<li>Click <span style="color:#FF00FF">Create Graphs for this Host</span>. You should now get a selection screen where you can check boxes of things you want graphs from. If because of your constant failing the SNMP queries failed to get results in the previous step and therefore show you no options in the <span style="color:#FFFFFF; background:#3333FF"><b>Data Query</b></span> boxes, you might have to click the <span style="color:#00FF00">green circle</span> in the blue bar to reload that query. If it&#8217;s still empty your snmpd probably doesn&#8217;t supply that information.</li>
<li>Enable the checkboxes for lines that sound like they would make an interesting graph. CPU, Memory, and Load usually work and if you have interface statistics pick one that has a reasonable IP address. Hit <span style="color:#00FF00">Create</span> when you&#8217;ve enabled all checkboxes that sound good.</li>
<li>This is enough to let Cacti generate graphs, but you also want to be able to view those graphs. Go to <span style="color:#00FF00">Graph Trees</span> in the left menu and click <span style="color:#00FF00">Default Tree</span> on the rigth pane. Click <span style="color:#00FF00">Add</span>, then for <span style="color:#00FF00">Tree Item Type</span> take <span style="color:#00FF00">Host</span>. Select your newly created device and hit <span style="color:#00FF00">Create</span>. Now go fix yourself a cup of coffee while the graphs are being manufactured.</li>
</ol>
<p>&#8220;<span style="color:#00CF3F">But my graphs are empty! Images missing! My head exploding!</span>&#8221;<br />
Yeah, I know that feeling. First of all: WAIT! First the graphs have to be generated and collect some data before something appears. This will take a few cycles, and a cycle is 5 minutes. In other words: go fish for half an hour, play a game, do a rain dance. Now there should be pretty graphs!<br />
Like this:<br />
<div id="attachment_465" class="wp-caption alignnone" style="width: 310px"><a href="http://notes.benv.junerules.com/wp-content/uploads/2009/09/23.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/09/23-300x182.png" alt="Cacti new graphs" title="Cacti new graphs" width="300" height="182" class="size-medium wp-image-465" /></a><p class="wp-caption-text">Cacti new graphs</p></div>
<p>Now go add your other devices!<br />
If you feel like trying out some more advanced stuff, check out some of the scripts/templates on <a href="http://forums.cacti.net/forum-12.html">the cacti forums</a> . For instance the Disk IO graphs I can be made with <a href="http://forums.cacti.net/about12742.html">this snmpdiskio</a> package.</p>
<p>Well, enough for now, thanks for reading!</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/pretty-graphs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Widelands, settlers and scons</title>
		<link>http://notes.benv.junerules.com/all/software/widelands/</link>
		<comments>http://notes.benv.junerules.com/all/software/widelands/#comments</comments>
		<pubDate>Fri, 18 Sep 2009 15:41:34 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Fun]]></category>
		<category><![CDATA[Morons]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=420</guid>
		<description><![CDATA[Today the project to try out is Widelands, apparently a Settlers clone.
Since I loved the Settlers (the first one was the best) when the graphics were still acceptable, it is interesting enough to try it out. What I loved about the Settlers was the whole simulation concept. The construction of buildings, the little lemmings that [...]]]></description>
			<content:encoded><![CDATA[<p>Today the project to try out is <a href="http://wl.widelands.org/" title="Widelands">Widelands</a>, apparently a <span style="color:#FF00FF">Settlers</span> clone.<br />
Since I loved <a href="http://en.wikipedia.org/wiki/The_Settlers">the Settlers</a> (the first one was the best) when the graphics were still acceptable, it is interesting enough to try it out. What I loved about the Settlers was the whole simulation concept. The construction of buildings, the little lemmings that moved the goods around, chopped down trees, fished, etc. The entire war aspect of the game was terrible (what do you mean my maximum level guy just got p0wnz3d by their new lowlevel rookie?!) . Therefore I liked the games that followed less and less. Settlers 2 was acceptable, a welcome upgrade in graphics and interface and stuff like that, but the war aspect&#8230; blegh. Then at 3 I had enough of the series. Why can&#8217;t it be a simulation where tribes co-exist in peace? I see how that might not attract many gamers, but how about an option huh? Another thing that was great about the Settlers 1 was the multiplayer multi-mouse splitscreen mode, where both players had a mouse on 1 PC and could control a single empire together. With SVGA mode it was great <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> <span id="more-420"></span><br />
Today you need dosbox to run the ancient Settlers 1 game, but that&#8217;s no problem. However, I would like to see a remake of that game (preferably without the combat element), because the ancient graphics etc are just agonizing now that I&#8217;m spoiled with high resolution and more advanced games.<br />
<div id="attachment_422" class="wp-caption alignleft" style="width: 210px"><a href="http://notes.benv.junerules.com/wp-content/uploads/2009/09/settlers1.jpg"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/09/settlers1.jpg" alt="The Settlers 1" title="The Settlers 1" width="200" height="234" class="size-full wp-image-422" /></a><p class="wp-caption-text">The Settlers 1</p></div><br />
<div id="attachment_424" class="wp-caption alignright" style="width: 310px"><a href="http://notes.benv.junerules.com/wp-content/uploads/2009/09/settlers2.jpg"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/09/settlers2-300x225.jpg" alt="The Settlers 2" title="The Settlers 2" width="300" height="225" class="size-medium wp-image-424" /></a><p class="wp-caption-text">The Settlers 2</p></div><br />
It seems that they have arrived at Settlers VI these days. The graphics look impressive, but I wonder how the gameplay came along in all those years.</p>
<p>Anyway, today I decided to try out this free open source clone (that can even import Settlers II maps these days, isn&#8217;t that cute?).<br />
So on to the build process. I leeched the SVN version (you know me, official releases are for sissies) and took a look through the source. <span style="color:#FF1111"><b>Waaaah</b></span>! <span style="color:#00FFFF">SCONS</span>&#8230;. so much for getting my hopes up. Oh well, let&#8217;s see how well it does today.<br />
Running scons started with some notifications about not having optipng and pngrewrite and such (might get those later if I care about those 3 bytes they might shave off, I like the programs though) and then bailed out with this:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Could not <span style="color: #c20cb9; font-weight: bold;">find</span> the SDL_gfx library<span style="color: #000000; font-weight: bold;">!</span> Is it installed?</div></div>
<p>To which I told it &#8220;No, it is not.&#8221;. Guess I&#8217;ll have to fix that for you huh? Fine. (yeah, I don&#8217;t bother to check requirements these days&#8230; they&#8217;re all for pokemon OS anyway, I&#8217;ll just find out where the train stops by letting it derail).<br />
So I find the <span style="color:#33FF33">SDL_gfx</span> site from google and copy paste the latest release link to slackbuild.pl, which leeches it and starts compiling. Until:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">libtool: compile: &nbsp;<span style="color: #c20cb9; font-weight: bold;">gcc</span> -DPACKAGE_NAME=<span style="color: #000000; font-weight: bold;">\&quot;</span><span style="color: #000000; font-weight: bold;">\&quot;</span> -DPACKAGE_TARNAME=<span style="color: #000000; font-weight: bold;">\&quot;</span><span style="color: #000000; font-weight: bold;">\&quot;</span> -DPACKAGE_VERSION=<span style="color: #000000; font-weight: bold;">\&quot;</span><span style="color: #000000; font-weight: bold;">\&quot;</span> -DPACKAGE_STRING=<span style="color: #000000; font-weight: bold;">\&quot;</span><span style="color: #000000; font-weight: bold;">\&quot;</span> -DPACKAGE_BUGREPORT=<span style="color: #000000; font-weight: bold;">\&quot;</span><span style="color: #000000; font-weight: bold;">\&quot;</span> <span style="color: #660033;">-DPACKAGE</span>=<span style="color: #000000; font-weight: bold;">\&quot;</span>SDL_gfx<span style="color: #000000; font-weight: bold;">\&quot;</span> <span style="color: #660033;">-DVERSION</span>=<span style="color: #000000; font-weight: bold;">\&quot;</span>2.0.19<span style="color: #000000; font-weight: bold;">\&quot;</span> -DSTDC_HEADERS=<span style="color: #000000;">1</span> -DHAVE_SYS_TYPES_H=<span style="color: #000000;">1</span> -DHAVE_SYS_STAT_H=<span style="color: #000000;">1</span> -DHAVE_STDLIB_H=<span style="color: #000000;">1</span> -DHAVE_STRING_H=<span style="color: #000000;">1</span> -DHAVE_MEMORY_H=<span style="color: #000000;">1</span> -DHAVE_STRINGS_H=<span style="color: #000000;">1</span> -DHAVE_INTTYPES_H=<span style="color: #000000;">1</span> -DHAVE_STDINT_H=<span style="color: #000000;">1</span> -DHAVE_UNISTD_H=<span style="color: #000000;">1</span> -DHAVE_DLFCN_H=<span style="color: #000000;">1</span> -DLT_OBJDIR=<span style="color: #000000; font-weight: bold;">\&quot;</span>.libs<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000; font-weight: bold;">\&quot;</span> -DBUILD_DLL -I. <span style="color: #660033;">-g</span> <span style="color: #660033;">-O2</span> <span style="color: #660033;">-O</span> -DUSE_MMX -I<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>SDL -D_GNU_SOURCE=1 -D_REENTRANT <span style="color: #660033;">-MT</span> SDL_imageFilter.lo <span style="color: #660033;">-MD</span> <span style="color: #660033;">-MP</span> <span style="color: #660033;">-MF</span> .deps<span style="color: #000000; font-weight: bold;">/</span>SDL_imageFilter.Tpo <span style="color: #660033;">-c</span> SDL_imageFilter.c &nbsp;<span style="color: #660033;">-fPIC</span> <span style="color: #660033;">-DPIC</span> <span style="color: #660033;">-o</span> .libs<span style="color: #000000; font-weight: bold;">/</span>SDL_imageFilter.o<br />
SDL_imageFilter.c: Assembler messages:<br />
SDL_imageFilter.c:<span style="color: #000000;">34</span>: Error: <span style="color: #000000; font-weight: bold;">`</span>pusha<span style="color: #ff0000;">' is not supported in 64-bit mode<br />
SDL_imageFilter.c:38: Error: `popa'</span> is not supported <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000;">64</span>-bit mode<br />
SDL_imageFilter.c:<span style="color: #000000;">77</span>: Error: <span style="color: #000000; font-weight: bold;">`</span>pusha<span style="color: #ff0000;">' is not supported in 64-bit mode<br />
SDL_imageFilter.c:93: Error: `popa'</span> is not supported <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000;">64</span>-bit mode<br />
SDL_imageFilter.c:<span style="color: #000000;">152</span>: Error: <span style="color: #000000; font-weight: bold;">`</span>pusha<span style="color: #ff0000;">' is not supported in 64-bit mode<br />
SDL_imageFilter.c:176: Error: `popa'</span> is not supported <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000;">64</span>-bit mode</div></div>
<p>Oh really, asshole&#8230; mhm, maybe google did not give me the latest release page. Or maybe SDL_gfx fails. Let&#8217;s find out.<br />
So I run into <a href="http://www.ohloh.net/p/sdl-gfx">ohloh&#8217;s sdl-gfx page</a>, that has a button that made me slightly mad/angry/annoyed/I kill you.<br />
It looks like this: <a href="http://www.ohloh.net/p/sdl-gfx/download_teaser" title="Download teaser">Where&#8217;s the download?</a>. Yeah, where&#8217;s the fscking download, that&#8217;s what -<b>I</b>- want to know. So I follow the link and get the option to<br />
<blockquote>provide your users with downloads in 2 ways</p></blockquote>
<p>. *<span style="color:#FF3333">RAAAH</span>*. Do I look like a project manager to you? *<span style="color:#FF00FF">RAGE</span>*.<br />
The quickest way to fix these kind of issues is usually to forget about official sources and immediately walk to the pokemon OS repositories to get the patches. Funny how they are convenient sometimes. So I run to <a href="http://packages.ubuntu.com/source/karmic/sdlgfx">their latest repository version</a>, fetch their patches and check them out. Huh, no patches for this? After which I finally read the <span style="color:#00FFFF">README</span> from the official SDL_gfx source. *hehehe*, maybe I should have done that before I started ranting about this. The README mentions:</p>
<blockquote><p>To build without MMX code enabled (i.e. PPC or for AMD64 architecture<br />
which is missing pusha/popa):<br />
        ./configure &#8211;disable-mmx</p></blockquote>
<p>Aha! To be fair, it was kind of hidden in the README after a lot of blabla about stuff that I really don&#8217;t care about like what primitives it supports. Normally I do read the <span style="color:#00FFFF">INSTALL</span> file, but that contains the boilerplate GPL install file for this source. Makes me wonder why they don&#8217;t automagically disable MMX, that&#8217;s what configure is for after all. Oh well.<br />
With the <span style="color:#FFFF00">&#8211;disable-mmx</span> configure switch it compiled and I had a package. Back to Widelands:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Checking <span style="color: #000000; font-weight: bold;">for</span> ggzcore_conf_read_int<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000; font-weight: bold;">in</span> C library libggzcore... no<br />
Could not <span style="color: #c20cb9; font-weight: bold;">find</span> libggz or ggz-client-libs<span style="color: #000000; font-weight: bold;">!</span> Are they BOTH installed?</div></div>
<p>What the heck is libgigglez?<br />
<blockquote><a href="http://dev.ggzgamingzone.org/libraries/libggz/">libggz</a> wraps many common low-level functions which are often used in C programming.</p></blockquote>
<p>I see, another Boost wannabe. Or maybe libc. Or glib. You get the point.</p>
<blockquote><p>
 The first such group is memory handling, which offers functions such as ggz_strdup() or ggz_malloc(), which resemble their counterparts from libc but are more convenient to use. For instance, ggz_strdup(NULL) returns NULL instead of crashing, and ggz_malloc() includes a reference counter to be used for debugging in combination with ggz_free().
</p></blockquote>
<p>Ahaha, yeah, more convienient. Instead making sure you&#8217;re not trying to copy garbage in the first place you could simply copy NULL by using ggz_strdup and have your program end up with empty strings or a not working communication protocol. Much more convenient indeed <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
And obviously they haven&#8217;t heard of the <a href=""http://www.gnu.org/s/libc/manual/html_node/Allocation-Debugging.html>malloc debugging features</a> that are already present in the libc library. Hopefully their debugger is more easy to use and shows more info, but I don&#8217;t care for now. I&#8217;ll regard this ggz library as &#8220;More choice is always better&#8221;. Let&#8217;s see if it works on slackware64.<br />
I stashed <a href="http://ftp.belnet.be/mirror/ftp.ggzgamingzone.org/ggz/0.0.14.1/libggz-0.0.14.1.tar.gz">libggz-0.0.14.1.tar.gz</a> through slackbuild, which compiled it without any issues. Good. Scons also wanted <a href="http://ftp.belnet.be/mirror/ftp.ggzgamingzone.org/ggz/0.0.14.1/ggz-client-libs-0.0.14.1.tar.gz">ggz-client-libs</a> so I also ran it through slackbuild. Another win for slackbuild.</p>
<p>Back at Widelands scons finally agreed on the libraries and went on, then complained about my TERM variable since it was not equal to &#8220;xterm-color&#8221; or &#8220;dumb&#8221;&#8230; seriously, why bother checking if you&#8217;re going to act retarded anyway. Stick to terminfo/termcap for color support. After that it complained about me not having &#8216;krazy2&#8242; and<br />
<blockquote>you will submit code with i. a. spelling errors!</p></blockquote>
<p>Yeah, that&#8217;s just what I was planning to do. And they will quake in their boots when looking at my code.</p>
<p>After 5 million more &#8220;Checking for errors&#8221; checks it went on compiling. Finally it said:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">***</span> No errors detected<br />
scons: <span style="color: #000000; font-weight: bold;">done</span> building targets.</div></div>
<p>Time to play!</p>
<div id="attachment_435" class="wp-caption alignnone" style="width: 310px"><a href="http://notes.benv.junerules.com/wp-content/uploads/2009/09/widelands-menu.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/09/widelands-menu-300x240.png" alt="Widelands titlescreen" title="Widelands titlescreen" width="300" height="240" class="size-medium wp-image-435" /></a><p class="wp-caption-text">Widelands titlescreen</p></div><br />
The game indeed looks/feels like the Settlers 1-2:<br />
<div id="attachment_436" class="wp-caption alignnone" style="width: 310px"><a href="http://notes.benv.junerules.com/wp-content/uploads/2009/09/widelands-ingame1.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/09/widelands-ingame1-300x225.png" alt="Widelands ingame (1)" title="Widelands ingame (1)" width="300" height="225" class="size-medium wp-image-436" /></a><p class="wp-caption-text">Widelands ingame (1)</p></div><br />
<div id="attachment_437" class="wp-caption alignnone" style="width: 310px"><a href="http://notes.benv.junerules.com/wp-content/uploads/2009/09/widelands-ingame2.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/09/widelands-ingame2-300x225.png" alt="Widelands ingame (2)" title="Widelands ingame (2)" width="300" height="225" class="size-medium wp-image-437" /></a><p class="wp-caption-text">Widelands ingame (2)</p></div>
<p>While it&#8217;s still very much in development, it already is fun to play. You&#8217;ll recognize a bunch of stuff from the original game, but Widelands also changed some things like buildings and resource names. For example where Setllers 1 required a Sawmill, Widelands requires a &#8220;Wood hardener&#8221;. Convenient stuff like watch windows are implemented so you can keep track of a building, roads can be built piece by piece but also in 1 go like in the later Settler games, statistics about buildings and production, and there&#8217;s tons more. They included background music and sounds like birds singing etc, which is cute, but it&#8217;s a good thing they can be turned off as well.<br />
<div id="attachment_438" class="wp-caption alignnone" style="width: 310px"><a href="http://notes.benv.junerules.com/wp-content/uploads/2009/09/widelands-watch-window.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/09/widelands-watch-window-300x225.png" alt="Widelands with watch window" title="Widelands with watch window" width="300" height="225" class="size-medium wp-image-438" /></a><p class="wp-caption-text">Widelands with watch window</p></div><br />
Another thing in the game is the story stuff. An advisor will now and then tell you to do stuff or give background information on the land etc. Fun, but sometimes annoying when you&#8217;re doing something and the advisor suddenly feels the need to nag you.<br />
<div id="attachment_440" class="wp-caption alignnone" style="width: 310px"><a href="http://notes.benv.junerules.com/wp-content/uploads/2009/09/widelands-advisor.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/09/widelands-advisor-300x225.png" alt="Widelands ingame story stuff" title="Widelands ingame story stuff" width="300" height="225" class="size-medium wp-image-440" /></a><p class="wp-caption-text">Widelands ingame story stuff</p></div></p>
<p> So far I enjoyed playing the tutorial campaign. However, I haven&#8217;t done the combat part yet, I&#8217;m quite sure I&#8217;ll get bored of the game when I run into that&#8230;.. but don&#8217;t let that stop you!<br />
Go give the game a try, it&#8217;s fun <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div id="attachment_439" class="wp-caption alignnone" style="width: 310px"><a href="http://notes.benv.junerules.com/wp-content/uploads/2009/09/widelands-statistics.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/09/widelands-statistics-300x225.png" alt="Widelands ingame Statistics" title="Widelands ingame Statistics" width="300" height="225" class="size-medium wp-image-439" /></a><p class="wp-caption-text">Widelands ingame Statistics</p></div>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/widelands/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Do it yourself Bell Peppers</title>
		<link>http://notes.benv.junerules.com/all/daily/do-it-yourself-bell-peppers/</link>
		<comments>http://notes.benv.junerules.com/all/daily/do-it-yourself-bell-peppers/#comments</comments>
		<pubDate>Wed, 16 Sep 2009 18:48:43 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Boring]]></category>
		<category><![CDATA[bell peppers]]></category>
		<category><![CDATA[garden]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=396</guid>
		<description><![CDATA[Nope, no computer stuff this time.
When I&#8217;m not behind my computer I sometimes dare to enter the domain called &#8220;outside&#8221;.
If you like plants, and especially plants that are in some way &#8216;useful&#8217; (in other words: they produce edible parts), you might want to grow some of them yourself.
One particular cute little plant thingy that I [...]]]></description>
			<content:encoded><![CDATA[<p>Nope, no computer stuff this time.<br />
When I&#8217;m not behind my computer I sometimes dare to enter the domain called &#8220;outside&#8221;.<br />
If you like plants, and especially plants that are in some way &#8216;useful&#8217; (in other words: they produce edible parts), you might want to grow some of them yourself.<span id="more-396"></span><br />
One particular cute little plant thingy that I planted this year is a <span style="color:#FF00FF">bell pepper</span>, or <span style="color:#FF00FF">paprika</span> as we dutch people call them. You might have heard of them, since they can be found in various sorts of delicious food like shoarma (apparently <a href="http://en.wikipedia.org/wiki/Shawarma">Shawarma</a> in english), <a href="http://en.wikipedia.org/wiki/Dürüm">Dürüm</a>, and various salads (and tons of other recipes).</p>
<p>Enough about where you might encounter them, I wanted to talk about having them as a plant.<br />
&#8220;<span style="color:#00FFFF">Huh, plant?</span>&#8221;<br />
Yeah, you know&#8230; a greenish thing with leaves and sometimes flowers that stands in the dirt all day trying to catch sunlight and occasionally some water.<br />
&#8220;<span style="color:#00FFFF">Never heard of it.</span>&#8221;<br />
Idiot. Play some more Mario or Spore until you know.</p>
<p>What I did this year was: </p>
<ul>
<li> Buy a red bell pepper from the shop (because we needed one for dinner or whatever). Pick any color you like though, except for green, since green ones taste bad <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </li>
<li> When preparing it for the food -keep- the part that has all the seeds, and peel off a bunch of them.</li>
<li> Put those seeds on a saucer and let them dry for a while (a day orso)</li>
<li> Take a pot, fill it with some nice soil and put the seeds into the soil. (not too deep!)</li>
<li> Cover the pot with a little foil. (I used a rubber band to keep it in place)</li>
<li> Put the pot in front of the window so it gets some nice sunlight during the day</li>
<li> Wait, water the pot a little once every few days</li>
</ul>
<p>After a week or so something will start to grow in there. Mine looked like this:<br />
<div id="attachment_399" class="wp-caption alignnone" style="width: 310px"><a href="http://notes.benv.junerules.com/wp-content/uploads/2009/09/paprika-plantje-jong.jpg"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/09/paprika-plantje-jong-300x225.jpg" alt="Paprika plantje jong" title="Paprika plantje jong" width="300" height="225" class="size-medium wp-image-399" /></a><p class="wp-caption-text">Paprika plantje jong</p></div><br />
Then you wait some more and water it some more and it&#8217;ll grow and get a bit bigger&#8230;.<br />
<div id="attachment_400" class="wp-caption alignnone" style="width: 310px"><a href="http://notes.benv.junerules.com/wp-content/uploads/2009/09/paprika-plantjes-middel.jpg"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/09/paprika-plantjes-middel-300x225.jpg" alt="Paprika plantjes" title="Paprika plantjes" width="300" height="225" class="size-medium wp-image-400" /></a><p class="wp-caption-text">Paprika plantjes</p></div><br />
Until eventually they get a bunch of cute little flowers:<br />
<a href="http://notes.benv.junerules.com/wp-content/uploads/2009/09/paprika-bloempjes.jpg"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/09/paprika-bloempjes-300x225.jpg" alt="paprika bloempjes" title="paprika bloempjes" width="300" height="225" class="alignnone size-medium wp-image-403" /></a><br />
The flowers will open up and look proud, and after that most of the flowers will fall off. Nature&#8217;s way of prefering one thing above another and making sure the plant won&#8217;t have more fruit than it can sustain I guess. So don&#8217;t worry about it dropping a few flowers. In fact, here they dropped pretty much all flowers except for one or two. The flower(s) that remains will slowly start to create a tiny little green bell pepper.<br />
<a href="http://notes.benv.junerules.com/wp-content/uploads/2009/09/kleine-paprika.jpg"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/09/kleine-paprika-225x300.jpg" alt="kleine paprika" title="kleine paprika" width="225" height="300" class="alignnone size-medium wp-image-404" /></a><br />
The pepper will grow bigger and bigger &#8212; if you keep your plant somwhat happy that is, which means providing it with water and sunlight &#8212; until the plant is done with growing it. Then it will slowly start changing color if it catches enough sunbeams. Sun really seems to speed up the coloring process.<br />
<a href="http://notes.benv.junerules.com/wp-content/uploads/2009/09/paprika-verkleurd.jpg"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/09/paprika-verkleurd-300x225.jpg" alt="paprika verkleurd" title="paprika verkleurd" width="300" height="225" class="alignnone size-medium wp-image-406" /></a><br />
And then when it&#8217;s completely colored you should cut it from the plant so the plant can stick its energy in creating new flowers/bell peppers.<br />
Now you&#8217;ve got your home grown bell pepper, isn&#8217;t that cute?</p>
<p>Things I&#8217;ve noticed while growing these:</p>
<ul>
<li>The plants grow bigger if they have more room to grow. We put one plant in a big pot and two plants in smaller pots. It shows in the size of the plant. For reference, here is one of the smaller ones and the big one. The smaller plant is less than half the size.</li>
<p><a href="http://notes.benv.junerules.com/wp-content/uploads/2009/09/kleine-paprika2.jpg"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/09/kleine-paprika2-225x300.jpg" alt="Kleinere paprika plant" title="Kleinere paprika plant" width="225" height="300" class="alignleft size-medium wp-image-412" /></a><br />
<a href="http://notes.benv.junerules.com/wp-content/uploads/2009/09/paprika-plant-groot.jpg"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/09/paprika-plant-groot-225x300.jpg" alt="Grote paprika plant" title="Grote paprika plant" width="225" height="300" class="alignnone size-medium wp-image-410" /></a></p>
<li>They don&#8217;t like a lack of water. Sounds obvious, but when they are out of water for a short period, a day orso, (and the leaves start hanging and looking sad) the fruit will get distorted shapes. (or  get dropped completely).</li>
<li>As they grow bigger the stem hardens so they don&#8217;t really need support from sticks or anything. Quite surprising with the big fruit.</li>
<li>It&#8217;s fun to see your own bell pepper hanging on the plant, however, checking it every 5 minutes won&#8217;t make it bigger or more colored.</li>
</ul>
<p>As for the question &#8220;How about putting them outside?&#8221;, I haven&#8217;t tried this year since our garden was not quite ready for stuff like that yet. Also I expect that they dislike the dutch climate and therefore will either die, be sad and give no fruit, or give tiny fruit. I&#8217;ll try it next year though, just to see what it does <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>So&#8230;. try it yourself!<br />
Next year I&#8217;ll also try growing some <a href="http://en.wikipedia.org/wiki/Jalapeño">Jalapeño peppers</a>, should be pretty much the same process <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/daily/do-it-yourself-bell-peppers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PSX emulator for 64 bit linux</title>
		<link>http://notes.benv.junerules.com/all/software/psx-emulator-for-64-bit-linux/</link>
		<comments>http://notes.benv.junerules.com/all/software/psx-emulator-for-64-bit-linux/#comments</comments>
		<pubDate>Wed, 16 Sep 2009 09:51:20 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Fun]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[emulators]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[x86_64]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=387</guid>
		<description><![CDATA[A while ago I talked about emulators and my quest to run them on 64 bit linux.
Today I stumbled upon pcsx-r or PCSX-Reloaded. Basically the same thing as the old pcsx emulator, only better 
Why? First of all it builds and runs on my slackware64 without 32 bits garbage attached to it. Second of all, [...]]]></description>
			<content:encoded><![CDATA[<p>A while ago <a href="http://notes.benv.junerules.com/software/emulators/">I talked about emulators</a> and my quest to run them on 64 bit linux.<br />
Today I stumbled upon <a href="http://pcsxr.codeplex.com/" title=""PCSX-Reloaded>pcsx-r</a> or PCSX-Reloaded. Basically the same thing as the old pcsx emulator, only better <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
Why? First of all it builds and runs on my slackware64 without 32 bits garbage attached to it. Second of all, someone is actively developing it which means it&#8217;s still being improved. Finally, the interface is slightly better.<br />
I know it&#8217;s good since slackbuild compiled it without problems <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
Here&#8217;s the thing running on my slackware 64 install:<br />
<div id="attachment_388" class="wp-caption alignnone" style="width: 310px"><a href="http://notes.benv.junerules.com/wp-content/uploads/2009/09/pcsxr-about.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/09/pcsxr-about-300x209.png" alt="PCSX-Reloaded about screen" title="PCSX-Reloaded about screen" width="300" height="209" class="size-medium wp-image-388" /></a><p class="wp-caption-text">PCSX-Reloaded about screen</p></div><br />
I loaded final fantasy 8 on it:<br />
<div id="attachment_389" class="wp-caption alignnone" style="width: 310px"><a href="http://notes.benv.junerules.com/wp-content/uploads/2009/09/pcsxr-ff8.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/09/pcsxr-ff8-300x225.png" alt="PCSX-Reloaded running Final Fantasy 8" title="PCSX-Reloaded running Final Fantasy 8" width="300" height="225" class="size-medium wp-image-389" /></a><p class="wp-caption-text">PCSX-Reloaded running Final Fantasy 8</p></div><br />
And to prove it does more than just the intro screen, here&#8217;s a shot from the intro movie <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
<div id="attachment_391" class="wp-caption alignnone" style="width: 310px"><a href="http://notes.benv.junerules.com/wp-content/uploads/2009/09/pcsxr-ff8fmv1.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/09/pcsxr-ff8fmv1-300x225.png" alt="PCSX-Reloaded showing Final Fantasy 8 intro movie" title="PCSX-Reloaded showing Final Fantasy 8 intro movie" width="300" height="225" class="size-medium wp-image-391" /></a><p class="wp-caption-text">PCSX-Reloaded showing Final Fantasy 8 intro movie</p></div><br />
<div id="attachment_392" class="wp-caption alignnone" style="width: 310px"><a href="http://notes.benv.junerules.com/wp-content/uploads/2009/09/pcsxr-ff8fmv2.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/09/pcsxr-ff8fmv2-300x225.png" alt="PCSX-Reloaded showing Final Fantasy 8 intro movie (2)" title="PCSX-Reloaded showing Final Fantasy 8 intro movie (2)" width="300" height="225" class="size-medium wp-image-392" /></a><p class="wp-caption-text">PCSX-Reloaded showing Final Fantasy 8 intro movie (2)</p></div></p>
<p>Offtopic: Do you know what really annoys me in games?<br />
<span style="color:#FF0000"><b>UNSKIPPABLE CONTENT</b></span>!<br />
In this case the intro movie, but it goes for countless of things: cutscenes (either ingame or fmv), &#8220;game over&#8221; screens, long talks that I don&#8217;t give a damn about when I already know what they&#8217;re saying&#8230; I&#8217;m sure there are plenty more examples of this. If you&#8217;re developing a game, make sure you don&#8217;t force your gamer through this nonsense. Yeah, it&#8217;s cute, and we understand that you spent countless of hours wasting your time on fancy graphics, but after the first time I really don&#8217;t want to sit through it again. Especially if I just died and am forced through it -again-.</p>
<p>So now that I had it running in the background and could rant while it showed the intro, here&#8217;s an ingame shot <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
<div id="attachment_393" class="wp-caption alignnone" style="width: 310px"><a href="http://notes.benv.junerules.com/wp-content/uploads/2009/09/pcsxr-ff8ingame.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/09/pcsxr-ff8ingame-300x225.png" alt="PCSX-Reloaded showing Final Fantasy 8 ingame" title="PCSX-Reloaded showing Final Fantasy 8 ingame" width="300" height="225" class="size-medium wp-image-393" /></a><p class="wp-caption-text">PCSX-Reloaded showing Final Fantasy 8 ingame</p></div></p>
<p>Keep up the good work PCSX-Reloaded guys!<br />
And fix your homepage.<br />
Things that are currently wrong with it:<br />
 * It doesn&#8217;t tell me anything ABOUT the product, except for that it&#8217;s a fork/branch of PCSX<br />
 * It doesn&#8217;t have any screenshots (what is it with graphical programs that don&#8217;t have screenshots on their website? That&#8217; s a FAIL right there)<br />
 * It doesn&#8217;t have any information on requirements etc, I just tried to compile it on 64 bit linux because I hoped it would work, not because your site tells me it does.</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/psx-emulator-for-64-bit-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Firefox, nfs and libsafe</title>
		<link>http://notes.benv.junerules.com/all/daily/firefox-nfs-and-libsafe/</link>
		<comments>http://notes.benv.junerules.com/all/daily/firefox-nfs-and-libsafe/#comments</comments>
		<pubDate>Mon, 14 Sep 2009 20:36:29 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Boring]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=384</guid>
		<description><![CDATA[Don&#8217;t ask me why, but as usual Firefox (3.5.3 in this case) has issues. If it weren&#8217;t for lotjuh I didn&#8217;t even try to fix them. But since she smiles at me in such a cute way sometimes, I&#8217;ll fix it for her.
The issue was on teigetje, you remember the box from the NFS story [...]]]></description>
			<content:encoded><![CDATA[<p>Don&#8217;t ask me why, but as usual <span style="color:#00FFFF">Firefox</span> (3.5.3 in this case) has issues. If it weren&#8217;t for lotjuh I didn&#8217;t even try to fix them. But since she smiles at me in such a cute way sometimes, I&#8217;ll fix it for her.</p>
<p>The issue was on teigetje, you remember the box from the NFS story earlier today.<br />
Starting firefox gave nothing, it was just stuck. Running a strace on it:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>teigetje:~<span style="color: #666666; font-style: italic;"># strace -p 12111</span><br />
Process <span style="color: #000000;">12111</span> attached - interrupt to quit<br />
futex<span style="color: #7a0874; font-weight: bold;">&#40;</span>0x8056c60, FUTEX_WAIT_PRIVATE, <span style="color: #000000;">2</span>, NULL<br />
<span style="color: #000000; font-weight: bold;">*</span>stuck<span style="color: #000000; font-weight: bold;">*</span></div></div>
<p>The exact reason isn&#8217;t known to me, probably NFS related, but this works to get it going:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>teigetje:~<span style="color: #666666; font-style: italic;"># vim /etc/ld.so.preload</span><br />
i<br />
<span style="color: #666666; font-style: italic;">#</span><br />
:wq</div></div>
<p>In other words, this comments out the <span style="color:#FFFF00">/lib/libsafe.so.2</span> line so it wont be loaded anymore using LD_PRELOAD.<br />
&#8220;<span style="color:#FF00FF">But isn&#8217;t that unsafe?</span>&#8221;<br />
Pfffrt&#8230;. if you insist on firefox you&#8217;re probably opening yourself up for Adobe issues anyway. And <a href="http://www.research.avayalabs.com/gcm/usa/en-us/initiatives/all/nsr.htm&#038;Filter=ProjectTitle:Libsafe&#038;Wrapper=LabsProjectDetails&#038;View=LabsProjectDetails">libsafe</a> doesn&#8217;t really make stuff &#8220;safe&#8221;, it only tries to protect your machine against buffer overflow attacks. So now it&#8217;s up to your kernel to &#8217;safe&#8217; you instead.</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/daily/firefox-nfs-and-libsafe/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>NFS issues</title>
		<link>http://notes.benv.junerules.com/all/software/nfs-issues/</link>
		<comments>http://notes.benv.junerules.com/all/software/nfs-issues/#comments</comments>
		<pubDate>Mon, 14 Sep 2009 18:54:04 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Morons]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[nfs]]></category>
		<category><![CDATA[slackware]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=379</guid>
		<description><![CDATA[Yesterday evening after getting tired of playing the Aion open beta (it was the last night of the open beta, so we felt like at least reaching level 10, which we did&#8230; and then we could ~FLYYYY) we decided to go downstairs to watch some series on our beamer. So we fire up the machine [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday evening after getting tired of playing the Aion open beta (it was the last night of the open beta, so we felt like at least reaching level 10, which we did&#8230; and then we could ~FLYYYY) we decided to go downstairs to watch some series on our beamer. So we fire up the machine connected to it, which runs everything from <a href="http://nl.wikipedia.org/wiki/Network_File_System">NFS</a>. It didn&#8217;t take long for the boot screen to come up and after the default selection was made for us it ran through the boot process spewing out the usual kernel messages&#8230;..<span id="more-379"></span><br />
Until it ran into this:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Looking up port of RPC <span style="color: #000000;">100003</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2</span> on 192.168.1.1<br />
Looking up port of RPC <span style="color: #000000;">100005</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">1</span> on 192.168.1.1<br />
VFS: Mounted root <span style="color: #7a0874; font-weight: bold;">&#40;</span>nfs filesystem<span style="color: #7a0874; font-weight: bold;">&#41;</span> on device <span style="color: #000000;">0</span>:<span style="color: #000000;">14</span><br />
Freeing unused kernel memory: 412k freed<br />
INIT: version <span style="color: #000000;">2.86</span> booting<br />
nfs: server 192.168.1.1 not responding, still trying</div></div>
<p>&#8230; huh? What&#8217;s taking so long? Our server with issues? That&#8217;s unlikely since I still used it 5 minutes earlier. After checking out the NFS server and deciding nothing was wrong with it (or at least, it didn&#8217;t look like it) I got fed up with it and went to bed.<br />
Don&#8217;t you hate it when stuff stops working just when you&#8217;re tired and want to go to sleep? Fortunately for me this is our own internal problem so I could actually do so <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Today I decided to go find out what the hell was wrong with it. So again I booted the machine to find out the above kernel messages.<br />
Time for some tcpdump on the nfs server to see if that can shine some light on this situation. (needless to say there were no useful log entries anywhere).<br />
Tcpdump:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">18:27:51.931303 IP <span style="color: #7a0874; font-weight: bold;">&#40;</span>tos 0x0, ttl 64, <span style="color: #c20cb9; font-weight: bold;">id</span> 0, offset 0, flags <span style="color: #7a0874; font-weight: bold;">&#91;</span>DF<span style="color: #7a0874; font-weight: bold;">&#93;</span>, proto UDP <span style="color: #7a0874; font-weight: bold;">&#40;</span>17<span style="color: #7a0874; font-weight: bold;">&#41;</span>, length 132<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
&nbsp; &nbsp; 193.168.1.9.1304809574 <span style="color: #000000; font-weight: bold;">&gt;</span> 192.168.1.1.2049: 104 getattr fh Unknown<span style="color: #000000; font-weight: bold;">/</span>010004014D00460054C8D81757072101679D7E1B000000000000000000000000<br />
18:27:51.931402 IP <span style="color: #7a0874; font-weight: bold;">&#40;</span>tos 0x0, ttl 64, <span style="color: #c20cb9; font-weight: bold;">id</span> 0, offset 0, flags <span style="color: #7a0874; font-weight: bold;">&#91;</span>DF<span style="color: #7a0874; font-weight: bold;">&#93;</span>, proto UDP <span style="color: #7a0874; font-weight: bold;">&#40;</span>17<span style="color: #7a0874; font-weight: bold;">&#41;</span>, length 124<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
&nbsp; &nbsp; 192.168.1.1.2049 <span style="color: #000000; font-weight: bold;">&gt;</span> 192.168.1.9.1304809574: reply ok 96 getattr DIR 40755 ids 0<span style="color: #000000; font-weight: bold;">/</span>0 sz 69632<br />
18:27:55.725726 IP <span style="color: #7a0874; font-weight: bold;">&#40;</span>tos 0x0, ttl 64, <span style="color: #c20cb9; font-weight: bold;">id</span> <span style="color: #000000;">0</span>, offset <span style="color: #000000;">0</span>, flags <span style="color: #7a0874; font-weight: bold;">&#91;</span>DF<span style="color: #7a0874; font-weight: bold;">&#93;</span>, proto UDP <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">17</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>, length <span style="color: #000000;">140</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
&nbsp; &nbsp; 192.168.1.9.3787772006 <span style="color: #000000; font-weight: bold;">&gt;</span> 192.168.1.1.2049: <span style="color: #000000;">112</span> lookup fh Unknown<span style="color: #000000; font-weight: bold;">/</span>010004004D00460054C8D8170000000000000000000000000000000000000000 <span style="color: #ff0000;">&quot;proc&quot;</span><br />
18:27:56.825633 IP <span style="color: #7a0874; font-weight: bold;">&#40;</span>tos 0x0, ttl 64, <span style="color: #c20cb9; font-weight: bold;">id</span> <span style="color: #000000;">0</span>, offset <span style="color: #000000;">0</span>, flags <span style="color: #7a0874; font-weight: bold;">&#91;</span>DF<span style="color: #7a0874; font-weight: bold;">&#93;</span>, proto UDP <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">17</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>, length <span style="color: #000000;">140</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
&nbsp; &nbsp; 192.168.1.9.3787772006 <span style="color: #000000; font-weight: bold;">&gt;</span> 192.168.1.1.2049: <span style="color: #000000;">112</span> lookup fh Unknown<span style="color: #000000; font-weight: bold;">/</span>010004004D00460054C8D8170000000000000000000000000000000000000000 <span style="color: #ff0000;">&quot;proc&quot;</span><br />
18:27:59.025453 IP <span style="color: #7a0874; font-weight: bold;">&#40;</span>tos 0x0, ttl 64, <span style="color: #c20cb9; font-weight: bold;">id</span> <span style="color: #000000;">0</span>, offset <span style="color: #000000;">0</span>, flags <span style="color: #7a0874; font-weight: bold;">&#91;</span>DF<span style="color: #7a0874; font-weight: bold;">&#93;</span>, proto UDP <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">17</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>, length <span style="color: #000000;">140</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
&nbsp; &nbsp; 192.168.1.9.3787772006 <span style="color: #000000; font-weight: bold;">&gt;</span> 192.168.1.1.2049: <span style="color: #000000;">112</span> lookup fh Unknown<span style="color: #000000; font-weight: bold;">/</span>010004004D00460054C8D8170000000000000000000000000000000000000000 <span style="color: #ff0000;">&quot;proc&quot;</span><br />
18:28:03.425078 IP <span style="color: #7a0874; font-weight: bold;">&#40;</span>tos 0x0, ttl 64, <span style="color: #c20cb9; font-weight: bold;">id</span> <span style="color: #000000;">0</span>, offset <span style="color: #000000;">0</span>, flags <span style="color: #7a0874; font-weight: bold;">&#91;</span>DF<span style="color: #7a0874; font-weight: bold;">&#93;</span>, proto UDP <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">17</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>, length <span style="color: #000000;">140</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
&nbsp; &nbsp; 192.168.1.9.3787772006 <span style="color: #000000; font-weight: bold;">&gt;</span> 192.168.1.1.2049: <span style="color: #000000;">112</span> lookup fh Unknown<span style="color: #000000; font-weight: bold;">/</span>010004004D00460054C8D8170000000000000000000000000000000000000000 <span style="color: #ff0000;">&quot;proc&quot;</span><br />
18:28:12.224347 IP <span style="color: #7a0874; font-weight: bold;">&#40;</span>tos 0x0, ttl 64, <span style="color: #c20cb9; font-weight: bold;">id</span> <span style="color: #000000;">0</span>, offset <span style="color: #000000;">0</span>, flags <span style="color: #7a0874; font-weight: bold;">&#91;</span>DF<span style="color: #7a0874; font-weight: bold;">&#93;</span>, proto UDP <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">17</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>, length <span style="color: #000000;">140</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
&nbsp; &nbsp; 192.168.1.9.3787772006 <span style="color: #000000; font-weight: bold;">&gt;</span> 192.168.1.1.2049: <span style="color: #000000;">112</span> lookup fh Unknown<span style="color: #000000; font-weight: bold;">/</span>010004004D00460054C8D8170000000000000000000000000000000000000000 <span style="color: #ff0000;">&quot;proc&quot;</span><br />
18:28:13.324257 IP <span style="color: #7a0874; font-weight: bold;">&#40;</span>tos 0x0, ttl 64, <span style="color: #c20cb9; font-weight: bold;">id</span> <span style="color: #000000;">0</span>, offset <span style="color: #000000;">0</span>, flags <span style="color: #7a0874; font-weight: bold;">&#91;</span>DF<span style="color: #7a0874; font-weight: bold;">&#93;</span>, proto UDP <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">17</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>, length <span style="color: #000000;">140</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
&nbsp; &nbsp; 192.168.1.9.3787772006 <span style="color: #000000; font-weight: bold;">&gt;</span> 192.168.1.1.2049: <span style="color: #000000;">112</span> lookup fh Unknown<span style="color: #000000; font-weight: bold;">/</span>010004004D00460054C8D8170000000000000000000000000000000000000000 <span style="color: #ff0000;">&quot;proc&quot;</span><br />
18:28:15.524071 IP <span style="color: #7a0874; font-weight: bold;">&#40;</span>tos 0x0, ttl 64, <span style="color: #c20cb9; font-weight: bold;">id</span> <span style="color: #000000;">0</span>, offset <span style="color: #000000;">0</span>, flags <span style="color: #7a0874; font-weight: bold;">&#91;</span>DF<span style="color: #7a0874; font-weight: bold;">&#93;</span>, proto UDP <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">17</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>, length <span style="color: #000000;">140</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
&nbsp; &nbsp; 192.168.1.9.3787772006 <span style="color: #000000; font-weight: bold;">&gt;</span> 192.168.1.1.2049: <span style="color: #000000;">112</span> lookup fh Unknown<span style="color: #000000; font-weight: bold;">/</span>010004004D00460054C8D8170000000000000000000000000000000000000000 <span style="color: #ff0000;">&quot;proc&quot;</span></div></div>
<p>Hmm, interesting. The first request seems to &#8220;work&#8221; (read: it receives an answer) while the rest of the messages are somehow ignored. Wonder why&#8230;<br />
Just to make sure I checked the firewall on the server, which should allow pretty much everything:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>uil<span style="color: #666666; font-style: italic;"># iptables -L -v -n</span><br />
Chain INPUT <span style="color: #7a0874; font-weight: bold;">&#40;</span>policy ACCEPT 198M packets, 89G bytes<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
&nbsp;pkts bytes target &nbsp; &nbsp; prot opt <span style="color: #000000; font-weight: bold;">in</span> &nbsp; &nbsp; out &nbsp; &nbsp; <span style="color: #7a0874; font-weight: bold;">source</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; destination<br />
<br />
Chain FORWARD <span style="color: #7a0874; font-weight: bold;">&#40;</span>policy ACCEPT 0 packets, 0 bytes<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
&nbsp;pkts bytes target &nbsp; &nbsp; prot opt <span style="color: #000000; font-weight: bold;">in</span> &nbsp; &nbsp; out &nbsp; &nbsp; <span style="color: #7a0874; font-weight: bold;">source</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; destination<br />
<br />
Chain OUTPUT <span style="color: #7a0874; font-weight: bold;">&#40;</span>policy ACCEPT 228M packets, 166G bytes<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
&nbsp;pkts bytes target &nbsp; &nbsp; prot opt <span style="color: #000000; font-weight: bold;">in</span> &nbsp; &nbsp; out &nbsp; &nbsp; <span style="color: #7a0874; font-weight: bold;">source</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; destination</div></div>
<p>Well, that seems to be true. Maybe something weird in the mount options? Let&#8217;s see the <span style="color:#FF00FF">/etc/fstab</span> for the NFS client:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>teigetje<span style="color: #666666; font-style: italic;"># cat /etc/fstab</span><br />
192.168.1.1:<span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>general_stores2<span style="color: #000000; font-weight: bold;">/</span>teigetje &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">/</span> &nbsp; &nbsp; &nbsp; nfs &nbsp; &nbsp; <span style="color: #007800;">rsize</span>=8192,<span style="color: #007800;">wsize</span>=8192,<span style="color: #007800;">nfsvers</span>=<span style="color: #000000;">3</span> <span style="color: #000000;">0</span> &nbsp; &nbsp; &nbsp; <span style="color: #000000;">0</span><br />
proc &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">/</span>proc &nbsp; proc &nbsp; &nbsp;defaults &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">0</span> &nbsp; &nbsp; &nbsp; <span style="color: #000000;">0</span><br />
tmpfs &nbsp; <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>shm &nbsp; &nbsp; &nbsp; &nbsp;tmpfs &nbsp; defaults &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">0</span> &nbsp; &nbsp; &nbsp; <span style="color: #000000;">0</span><br />
tmpfs &nbsp; <span style="color: #000000; font-weight: bold;">/</span>tmp &nbsp; &nbsp;tmpfs &nbsp; defaults &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">0</span> &nbsp; &nbsp; &nbsp; <span style="color: #000000;">0</span></div></div>
<p>Nothing weird&#8230; or is there? After messing around with it for a bit I decided it really wasn&#8217;t anything in there.<br />
Time to do a test on a different machine in the network. On my workstation I tried to mount the root path after giving myself permissions and re-exporting the nfs paths:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>mnt:0<span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #c20cb9; font-weight: bold;">mount</span> <span style="color: #660033;">-o</span> <span style="color: #007800;">rsize</span>=8192,<span style="color: #007800;">wsize</span>=8192,<span style="color: #007800;">nfsvers</span>=3 192.168.1.1:<span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>general_stores2<span style="color: #000000; font-weight: bold;">/</span>teigetje tmp<br />
root<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>mnt:0<span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #660033;">-al</span> tmp<br />
<span style="color: #000000; font-weight: bold;">*</span>stuck<span style="color: #000000; font-weight: bold;">*</span></div></div>
<p>And there it was, being stuck for what seems to be forever. So in other words: the mount worked, but then it doesn&#8217;t respond for the ls command. What&#8230; the&#8230; fuck.<br />
Mind boggling, while the logs on the nfs server gave no hints at all. (as usual).<br />
To make this even more interesting, there is another export on that same nfs server that most workstation use, called <span style="color:#00FFFF">general_stores</span>. (to access the music collection etc).<br />
Can&#8217;t remember that being broken&#8230;. let&#8217;s test:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>janeman:~:0<span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #660033;">-lad</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>general_stores<span style="color: #000000; font-weight: bold;">/</span>.<br />
drwxr-xr-x <span style="color: #000000;">14</span> root root <span style="color: #000000;">4096</span> Aug <span style="color: #000000;">25</span> <span style="color: #000000;">16</span>:<span style="color: #000000;">58</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>general_stores<span style="color: #000000; font-weight: bold;">/</span>.<span style="color: #000000; font-weight: bold;">/</span></div></div>
<p>How can this be?! This mount works fine while the other doesn&#8217;t? What the hell is so special about that NFS client&#8217;s export?</p>
<p>And then it hit me.</p>
<p>*<span style="color:#FF0011">WHACK</span>*<br />
(ouch)</p>
<p>The window that I had open with the <span style="color:#FFF011">ls -al tmp</span> suddenly decided to work. It gave this listing:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">ls</span>: cannot access tmp<span style="color: #000000; font-weight: bold;">/</span>proc: Input<span style="color: #000000; font-weight: bold;">/</span>output error<br />
total <span style="color: #000000;">164</span><br />
drwxr-xr-x <span style="color: #000000;">21</span> root root &nbsp;<span style="color: #000000;">4096</span> Sep <span style="color: #000000;">14</span> <span style="color: #000000;">18</span>:<span style="color: #000000;">14</span> .<br />
drwxr-xr-x <span style="color: #000000;">12</span> root root &nbsp;<span style="color: #000000;">4096</span> Sep <span style="color: #000000;">26</span> &nbsp;<span style="color: #000000;">2006</span> ..<br />
drwxr-xr-x &nbsp;<span style="color: #000000;">2</span> root root &nbsp;<span style="color: #000000;">4096</span> Sep <span style="color: #000000;">14</span> <span style="color: #000000;">18</span>:<span style="color: #000000;">14</span> bin<br />
drwxr-xr-x <span style="color: #000000;">13</span> root root &nbsp;<span style="color: #000000;">4096</span> Sep <span style="color: #000000;">14</span> <span style="color: #000000;">18</span>:05 boot<br />
drwxr-xr-x <span style="color: #000000;">17</span> root root <span style="color: #000000;">69632</span> Oct &nbsp;<span style="color: #000000;">6</span> &nbsp;<span style="color: #000000;">1997</span> dev<br />
drwxr-xr-x <span style="color: #000000;">71</span> root root <span style="color: #000000;">12288</span> Sep <span style="color: #000000;">14</span> <span style="color: #000000;">18</span>:<span style="color: #000000;">24</span> etc<br />
drwxr-xr-x &nbsp;<span style="color: #000000;">5</span> root root &nbsp;<span style="color: #000000;">4096</span> Oct &nbsp;<span style="color: #000000;">6</span> &nbsp;<span style="color: #000000;">1997</span> home<br />
drwxr-xr-x &nbsp;<span style="color: #000000;">6</span> root root <span style="color: #000000;">12288</span> Sep <span style="color: #000000;">14</span> <span style="color: #000000;">18</span>:<span style="color: #000000;">11</span> lib<br />
drwxr-xr-x <span style="color: #000000;">16</span> root root &nbsp;<span style="color: #000000;">4096</span> Sep <span style="color: #000000;">14</span> <span style="color: #000000;">16</span>:<span style="color: #000000;">47</span> media<br />
drwxr-xr-x <span style="color: #000000;">12</span> root root &nbsp;<span style="color: #000000;">4096</span> Sep <span style="color: #000000;">26</span> &nbsp;<span style="color: #000000;">2006</span> mnt<br />
drwxr-xr-x &nbsp;<span style="color: #000000;">9</span> root root &nbsp;<span style="color: #000000;">4096</span> Jun <span style="color: #000000;">10</span> &nbsp;<span style="color: #000000;">2007</span> opt<br />
?????????? &nbsp;? ? &nbsp; &nbsp;? &nbsp; &nbsp; &nbsp; &nbsp;? &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;? proc<br />
drwx--x--- <span style="color: #000000;">28</span> root root &nbsp;<span style="color: #000000;">4096</span> Sep <span style="color: #000000;">14</span> <span style="color: #000000;">18</span>:<span style="color: #000000;">24</span> root<br />
drwxr-xr-x &nbsp;<span style="color: #000000;">2</span> root root &nbsp;<span style="color: #000000;">4096</span> Jun <span style="color: #000000;">14</span> 05:<span style="color: #000000;">35</span> sbin<br />
drwxr-xr-x &nbsp;<span style="color: #000000;">2</span> root root &nbsp;<span style="color: #000000;">4096</span> Apr &nbsp;<span style="color: #000000;">8</span> &nbsp;<span style="color: #000000;">2007</span> srv<br />
drwxr-xr-x &nbsp;<span style="color: #000000;">2</span> root root &nbsp;<span style="color: #000000;">4096</span> May <span style="color: #000000;">12</span> &nbsp;<span style="color: #000000;">2004</span> sys<br />
drwxrwxrwt &nbsp;<span style="color: #000000;">4</span> root root &nbsp;<span style="color: #000000;">4096</span> Sep <span style="color: #000000;">14</span> <span style="color: #000000;">18</span>:<span style="color: #000000;">17</span> tmp<br />
drwxr-xr-x <span style="color: #000000;">19</span> root root &nbsp;<span style="color: #000000;">4096</span> Jul <span style="color: #000000;">16</span> 02:<span style="color: #000000;">22</span> usr<br />
drwxr-xr-x <span style="color: #000000;">19</span> root root &nbsp;<span style="color: #000000;">4096</span> Aug &nbsp;<span style="color: #000000;">4</span> 01:<span style="color: #000000;">52</span> var</div></div>
<p>Doh! /proc &#8230; of course that&#8217;s the problem! That&#8217;s why tcpdump showed the &#8220;proc&#8221; entries!</p>
<p>But why?</p>
<p>Well, recently I moved some disks around and added a &#8216;<span style="color:#F00FFF">crossmnt</span>&#8216; option in the <span style="color:#FF00FF">/etc/exports</span> file on the NFS server.<br />
This option gives the nfs clients the ability to cross mount borders, so for example if I have this on the nfs server:<br />
 * /mnt/disk with device /dev/sda1 mounted there<br />
 * /mnt/disk/stuff with device /dev/sdb1 mounted there<br />
And then export /mnt/disk and mount it on my nfs client, I can see /mnt/disk/stuff with its contents because of the crossmnt option. Without that option the directory would be empty on nfs clients.</p>
<p>So how does this relate to proc? Well, since proc is &#8220;special&#8221; it has a ton of special files that nfs can&#8217;t deal with and therefore can not export.<br />
Now normally this wouldn&#8217;t be an issue, since it shouldn&#8217;t be mounted in the first place (the nfs server has its own /proc, the nfs cilent mounts its own version so it only needs a  place to mount it on). However, a little earlier my girly friend mounted it &#8220;because she had to build <a href="http://www.enlightenment.org/">E</a>&#8220;. Don&#8217;t ask.<br />
E again&#8230;. always the same&#8230; <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
After unmounting the proc dir and rebooting the NFS client it had no more problems and booted fine.</p>
<p>Conclusion:<br />
NFS can&#8217;t deal with proc. Don&#8217;t hide a mounted procfs in your nfs exports.<br />
NFS sucks because of stuff like this, but I haven&#8217;t found anything better so far. Guess we&#8217;ll stick with it for now.</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/nfs-issues/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Aion</title>
		<link>http://notes.benv.junerules.com/all/software/aion/</link>
		<comments>http://notes.benv.junerules.com/all/software/aion/#comments</comments>
		<pubDate>Fri, 11 Sep 2009 16:19:35 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Boring]]></category>
		<category><![CDATA[Morons]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Fun]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[virtualbox]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=371</guid>
		<description><![CDATA[Lately I&#8217;ve heard some rumors about this new mmorhghhghg coming up called &#8220;Aion&#8220;.
Fileplanet (you know, the cancer popup site you sometimes get when you need to download a game patch and then need to click through 23894723897 registration things etc&#8230; which is barred from bugmenot&#8230;. *sigh*) handed out open beta keys. So I got one. [...]]]></description>
			<content:encoded><![CDATA[<p>Lately I&#8217;ve heard some rumors about this new mmorhghhghg coming up called &#8220;<a href="http://us.ncsoft.com/en/aion/">Aion</a>&#8220;.<br />
Fileplanet (you know, the cancer popup site you sometimes get when you need to download a game patch and then need to click through 23894723897 registration things etc&#8230; which is barred from bugmenot&#8230;. *sigh*) handed out open beta keys. So I got one. And so did lotjuh.</p>
<p>Did I mention my machine doesn&#8217;t have windows? Makes it&#8230; interesting.<br />
First we obviously tried wine. Well, it installs without much hassle, which is a good thing.<br />
However, it doesn&#8217;t launch. Some piece of garbage called <span style="color:#FF00FF">GameGuard</span> <a href="http://appdb.winehq.org/objectManager.php?sClass=version&#038;iId=16284">doesn&#8217;t work on wine</a>. And because it doesn&#8217;t, neither does Aion.<br />
Great going Aion guys! Needless to say they couldn&#8217;t be arsed to write a linux binary for it, so they <b>SUCK</b> per default! They couldn&#8217;t even be arsed to write a Mac binary for it. Pffrt.</p>
<p>However, to make an interesting attempt to test out Virtualbox&#8217;s 3d acceleration support, I decided to install Aion in a virtualboxed windows xp that I &#8220;borrowed&#8221; from lotjuh.<br />
Virtualbox is at version 3.0.6 these days, so first I installed the latest version.<br />
The installation went fine:<br />
<div id="attachment_372" class="wp-caption alignnone" style="width: 310px"><a href="http://notes.benv.junerules.com/wp-content/uploads/2009/09/aion-virtualbox-install.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/09/aion-virtualbox-install-300x225.png" alt="Aion installation on XP in Virtualbox 3.0.6" title="Aion installation on XP in Virtualbox 3.0.6" width="300" height="225" class="size-medium wp-image-372" /></a><p class="wp-caption-text">Aion installation on XP in Virtualbox 3.0.6</p></div><br />
Not only the installation, but also the updater ran fine:<br />
<div id="attachment_374" class="wp-caption alignnone" style="width: 310px"><a href="http://notes.benv.junerules.com/wp-content/uploads/2009/09/aion-launcher-updates.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/09/aion-launcher-updates-300x188.png" alt="Aion Updater" title="Aion Updater" width="300" height="188" class="size-medium wp-image-374" /></a><p class="wp-caption-text">Aion Updater</p></div><br />
Then the gameguard part came, it looked promising:<br />
<div id="attachment_375" class="wp-caption alignnone" style="width: 310px"><a href="http://notes.benv.junerules.com/wp-content/uploads/2009/09/aion-gameguard.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/09/aion-gameguard-300x188.png" alt="Aion GameGuard part`" title="Aion GameGuard part" width="300" height="188" class="size-medium wp-image-375" /></a><p class="wp-caption-text">Aion GameGuard part`</p></div><br />
However, to all good things must come an end. So it dies because of hardware acceleration issues. No real surprise, but too bad for Virtualbox. Not there yet.<br />
<div id="attachment_376" class="wp-caption alignnone" style="width: 310px"><a href="http://notes.benv.junerules.com/wp-content/uploads/2009/09/aion-died.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/09/aion-died-300x188.png" alt="Aion dies" title="Aion dies" width="300" height="188" class="size-medium wp-image-376" /></a><p class="wp-caption-text">Aion dies</p></div><br />
Maybe it&#8217;ll work one day when Virtualbox gets their direct3d working as well as wine has it working.</p>
<p>Anyway, from what I&#8217;ve seen of the game (it runs &#8216;fine&#8217; on lotjuh&#8217;s PC with her &#8220;Seven&#8221; failure install), it&#8217;s a World of Warcraft wannabe.<br />
Graphics are a lot better, they put in some cute stuff like when it rains and the character idles it&#8217;ll put a leave over their head. The movies are cute, the quests sometimes even show you stuff (like a little ingame movie of the target area) to go along with the text. But all in all it doesn&#8217;t look like a wow killer. No linux support (not even with wine), no mac support, and so far I haven&#8217;t seen a major reason for people to switch from wow to this game, except for the graphics. Then again, I&#8217;ve only looked at it for a short amount of time, maybe it&#8217;ll get better <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
I&#8217;m sure they&#8217;ll get a decent amount of players though, it&#8217;s a good wow clone.<br />
Story wise the game is fail, I could sum it up with &#8220;There were gods, and a planet, and now the planet is split in 2 half planets and the &#8216;people&#8217; on those halves fight eachother&#8221;.</p>
<p>It asks for a stellar converter if you ask me. (master of orion 2 reference, can&#8217;t find a good image/video on google)</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/aion/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Pulseaudio, slackware and udev</title>
		<link>http://notes.benv.junerules.com/all/software/pulseaudio-slackware-and-udev/</link>
		<comments>http://notes.benv.junerules.com/all/software/pulseaudio-slackware-and-udev/#comments</comments>
		<pubDate>Fri, 11 Sep 2009 14:42:30 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[configure]]></category>
		<category><![CDATA[pulseaudio]]></category>
		<category><![CDATA[slackware]]></category>
		<category><![CDATA[udev]]></category>
		<category><![CDATA[update]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=367</guid>
		<description><![CDATA[Yesterday I found a release notice in the pulseaudio mailinglist announcing version 0.9.16.
Today, I found another release note in the mailinglist that announced pulseaudio version 0.9.17. Gee, another fuckup? (but that&#8217;s part of the release process I guess  )
Anyway, I decided to upgrade my 0.9.15 installation since it still glitches every now and then.
With [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I found a release notice in the <span style="color:#FF00FF">pulseaudio</span> mailinglist announcing version 0.9.16.<br />
Today, I found another release note in the mailinglist that announced pulseaudio version 0.9.17. Gee, another fuckup? (but that&#8217;s part of the release process I guess <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> )</p>
<p>Anyway, I decided to upgrade my 0.9.15 installation since it still glitches every now and then.<span id="more-367"></span><br />
With glitches I mean &#8220;The music played by mpd suddenly sounds as if you have quad damage in quake 3 arena and filter out most of the music frequencies&#8221;. You know, when you shoot a quad damage rocket through a hallway, that kind of sound. Restarting pulseaudio always fixes this. (I&#8217;ve been running into this glitch ever since I started using pulse). Seems to occur randomly though&#8230; sometimes when the server is busy, sometimes when switching from a .mod file to a .mp3 file, sometimes just when the lights turn on. You know the kind of glitch.<br />
Other than I kind of enjoy pulseaudio, even though it&#8217;s a struggle to get going. It does allow our server to stream to other servers and stuff like that, which is very cute. Oh, and per application volume levels and mixing etc&#8230; also good.<br />
This pulseaudio installation runs on our local server &#8212; in daemon/server mode &#8212; btw, on which we have connected our amplifier and speakers as to enlighten our office/game room/throne chamber.</p>
<p>So for compiling version 0.9.16 the first thing I ran into was <span style="color:#00FFFF">libsndfile</span> that was outdated. Version 1.0.17 was too old, so I ran slackbuild on the new <a href="http://www.mega-nerd.com/libsndfile/libsndfile-1.0.20.tar.gz">libsndfile v1.0.20.tar.gz</a>. Out came a package, upgrade, voila.<br />
Next, I noticed the pulseaudio configure output telling me:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; &nbsp; Enable udev: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; no<br />
&nbsp; &nbsp; Enable HAL-<span style="color: #000000; font-weight: bold;">&gt;</span>udev compat: &nbsp; &nbsp; &nbsp; no</div></div>
<p>I kinda wondered why, since my system definately runs udev. In <span style="color:#F00FFF">config.log</span> we find:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">configure:26464: checking <span style="color: #000000; font-weight: bold;">for</span> UDEV<br />
configure:26471: <span style="color: #007800;">$PKG_CONFIG</span> <span style="color: #660033;">--exists</span> <span style="color: #660033;">--print-errors</span> <span style="color: #ff0000;">&quot; libudev &gt;= 143 &quot;</span><br />
Requested <span style="color: #ff0000;">'libudev &gt;= 143'</span> but version of libudev is 141<br />
configure:26474: <span style="color: #007800;">$?</span> = 1<br />
configure:26487: <span style="color: #007800;">$PKG_CONFIG</span> <span style="color: #660033;">--exists</span> <span style="color: #660033;">--print-errors</span> <span style="color: #ff0000;">&quot; libudev &gt;= 143 &quot;</span><br />
Requested <span style="color: #ff0000;">'libudev &gt;= 143'</span> but version of libudev is 141<br />
configure:26490: <span style="color: #007800;">$?</span> = <span style="color: #000000;">1</span><br />
Requested <span style="color: #ff0000;">'libudev &gt;= 143'</span> but version of libudev is <span style="color: #000000;">141</span><br />
configure:<span style="color: #000000;">26517</span>: result: no</div></div>
<p>Aha.<br />
New challenge!<br />
Let&#8217;s see if we can grab the <a href="ftp://ftp.slackware.com:/pub/slackware/slackware-current/source/a/udev">official slackware udev sources</a> and get them to run a newer package! Today the latest udev is <a href="http://www.us.kernel.org/pub/linux/utils/kernel/hotplug/udev-146.tar.bz2">udev version 1.4.6</a>.<br />
So I changed the udev.Slackbuild to pick version 1.4.6</p>
<div class="codecolorer-container diff vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="diff codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">--- udev.SlackBuild.org &nbsp; &nbsp; 2009-09-11 14:55:14.000000000 +0200<br />
<span style="color: #888822;">+++ udev.SlackBuild &nbsp; &nbsp;<span style="">2009</span>-07-<span style="">15</span> 06:08:<span style="">30.000000000</span> +0200</span><br />
<span style="color: #440088;">@@ -<span style="">21</span>,<span style="">9</span> +<span style="">21</span>,<span style="">9</span> @@</span><br />
&nbsp;# &nbsp;ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.<br />
&nbsp;<br />
&nbsp;<br />
<span style="color: #991111;">-VERSION=$<span style="">&#123;</span>VERSION:-<span style="">146</span><span style="">&#125;</span></span><br />
<span style="color: #00b000;">+VERSION=$<span style="">&#123;</span>VERSION:-<span style="">141</span><span style="">&#125;</span></span><br />
&nbsp;ARCH=$<span style="">&#123;</span>ARCH:-i486<span style="">&#125;</span><br />
<span style="color: #991111;">-BUILD=$<span style="">&#123;</span>BUILD:-<span style="">1</span><span style="">&#125;</span></span><br />
<span style="color: #00b000;">+BUILD=$<span style="">&#123;</span>BUILD:-<span style="">3</span><span style="">&#125;</span></span><br />
&nbsp;<br />
&nbsp;NUMJOBS=$<span style="">&#123;</span>NUMJOBS:-&quot; -j7 &quot;<span style="">&#125;</span></div></div>
<p>Running udev.Slackbuild now soon brought another set of issues to my attention. The first being that the slackware patch for the rule generator breaks.<br />
Without looking too much at the script I simply manually patched it and created a new diff. Here it is:<br />
<a href="http://notes.benv.junerules.com/wp-content/plugins/download-monitor/download.php?id=rule_generator.diff.gz" title="Downloaded 38 times">rule_generator.diff.gz</a> - Version 0.1 - SHA: cf73f104543ce989fd11b383c440405110e915a2</p>
<p>Running the slackbuild now gave me a new error:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">In <span style="color: #c20cb9; font-weight: bold;">file</span> included from extras<span style="color: #000000; font-weight: bold;">/</span>scsi_id<span style="color: #000000; font-weight: bold;">/</span>scsi_serial.c:<span style="color: #000000;">27</span>:<br />
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>scsi<span style="color: #000000; font-weight: bold;">/</span>scsi.h:<span style="color: #000000;">145</span>: error: expected specifier-qualifier-list before <span style="color: #ff0000;">'u8'</span><br />
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>scsi<span style="color: #000000; font-weight: bold;">/</span>scsi.h: In <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #ff0000;">'scsi_varlen_cdb_length'</span>:<br />
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>scsi<span style="color: #000000; font-weight: bold;">/</span>scsi.h:<span style="color: #000000;">156</span>: error: <span style="color: #ff0000;">'struct scsi_varlen_cdb_hdr'</span> has no member named <span style="color: #ff0000;">'additional_cdb_length'</span><br />
<span style="color: #c20cb9; font-weight: bold;">make</span><span style="color: #7a0874; font-weight: bold;">&#91;</span>2<span style="color: #7a0874; font-weight: bold;">&#93;</span>: <span style="color: #000000; font-weight: bold;">***</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>extras<span style="color: #000000; font-weight: bold;">/</span>scsi_id<span style="color: #000000; font-weight: bold;">/</span>scsi_serial.o<span style="color: #7a0874; font-weight: bold;">&#93;</span> Error 1<br />
<span style="color: #c20cb9; font-weight: bold;">make</span><span style="color: #7a0874; font-weight: bold;">&#91;</span>2<span style="color: #7a0874; font-weight: bold;">&#93;</span>: <span style="color: #000000; font-weight: bold;">***</span> Waiting <span style="color: #000000; font-weight: bold;">for</span> unfinished jobs....<br />
<span style="color: #c20cb9; font-weight: bold;">make</span><span style="color: #7a0874; font-weight: bold;">&#91;</span>1<span style="color: #7a0874; font-weight: bold;">&#93;</span>: <span style="color: #000000; font-weight: bold;">***</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>all-recursive<span style="color: #7a0874; font-weight: bold;">&#93;</span> Error 1<br />
<span style="color: #c20cb9; font-weight: bold;">make</span>: <span style="color: #000000; font-weight: bold;">***</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>all<span style="color: #7a0874; font-weight: bold;">&#93;</span> Error <span style="color: #000000;">2</span></div></div>
<p>It never takes me long to realize that this error stems from the new kernel I installed earlier. (did I mention that <a href="ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.31.tar.bz2">linux 2.6.31</a> is released? <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> ).<br />
Google brought me <a href="http://patchwork.kernel.org/patch/38102/">this</a>, which informs us about something that should have been in 2.6.31 if you ask me. Fine, we&#8217;ll fix it ourselves.<br />
Another slackbuild run takes us past this error and gives us a new udev package. Inspecting the new package I noticed a <span style="color:#F00FFF">/libexec</span> directory that shouldn&#8217;t be in the root of the package. Meh, probably explains the <code class="codecolorer text vibrant"><span class="text">configure: WARNING: unrecognized options: --with-libdir-name</span></code>.<br />
So we change the <span style="color:#F00FFF">udev.Slackbuild</span> again with some new configure options (stolen from their own INSTALL file):</p>
<div class="codecolorer-container diff vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="diff codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">--- udev.SlackBuild.org &nbsp; &nbsp;2009-07-15 06:08:30.000000000 +0200<br />
<span style="color: #888822;">+++ udev.SlackBuild &nbsp; &nbsp; <span style="">2009</span>-09-<span style="">11</span> <span style="">16</span>:07:<span style="">19.000000000</span> +0200</span><br />
<span style="color: #440088;">@@ -<span style="">55</span>,<span style="">9</span> +<span style="">55</span>,<span style="">12</span> @@</span><br />
&nbsp;./configure \<br />
&nbsp; &nbsp;--prefix=/usr \<br />
&nbsp; &nbsp;--exec-prefix=/ \<br />
<span style="color: #00b000;">+ &nbsp;--sbindir=/sbin \</span><br />
<span style="color: #00b000;">+ &nbsp;--libdir=/lib$<span style="">&#123;</span>LIBDIRSUFFIX<span style="">&#125;</span> \</span><br />
<span style="color: #00b000;">+ &nbsp;--with-rootlibdir=/lib$<span style="">&#123;</span>LIBDIRSUFFIX<span style="">&#125;</span> \</span><br />
&nbsp; &nbsp;--sysconfdir=/etc \<br />
&nbsp; &nbsp;--mandir=/usr/man \<br />
<span style="color: #991111;">- &nbsp;--with-libdir-name=lib$<span style="">&#123;</span>LIBDIRSUFFIX<span style="">&#125;</span> \</span><br />
<span style="color: #00b000;">+ &nbsp;--libexecdir=/lib/udev \</span><br />
&nbsp; &nbsp;--build=$ARCH-slackware-linux<br />
&nbsp;<br />
&nbsp;make $NUMJOBS || make || exit <span style="">1</span></div></div>
<p>Btw, can someone explain to me why I always manage to fuck up the file order to diff? (my patches normally come out reversed <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> )<br />
Here&#8217;s the complete file if you want it:<br />
<a href="http://notes.benv.junerules.com/wp-content/plugins/download-monitor/download.php?id=udev.SlackBuild" title="Downloaded 66 times">udev.Slackbuild</a> - Version 1.4.6 - SHA: d550e146bdf34d1ad0e256936a94b7f9b7d62fd2</p>
<p>So after building and upgrading the package, it even restarted without glitches. Woei.<br />
Back to pulseaudio!</p>
<p>Running configure now correctly informs us about udev being YES. HAL->udev compat still said &#8220;no&#8221; though. I don&#8217;t care for now, let&#8217;s see if it works.<br />
My slackbuild.pl ran the make part and showed a ton of &#8220;leer coden, mongool&#8221; warnings (people should simply disable warnings if they don&#8217;t handle them if you ask me).<br />
Regardless of the warnings the compilation completed and I now have a shiny new package.<br />
After upgrading and restarting pulseaudio, there&#8217;s even sound coming out of my speakers when I hinted mpd to play. Woei.</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/pulseaudio-slackware-and-udev/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pokemon OS, rsync/ssh and MAC</title>
		<link>http://notes.benv.junerules.com/all/software/pokemon-os-rsyncssh-and-mac/</link>
		<comments>http://notes.benv.junerules.com/all/software/pokemon-os-rsyncssh-and-mac/#comments</comments>
		<pubDate>Fri, 11 Sep 2009 10:26:14 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[pokemon os]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=360</guid>
		<description><![CDATA[So yesterday at work I ran into the famous ssh MAC failure like this:
wouter@wouter-laptop:~:0&#62; rsync -varP ./vmware/ wouter@192.168.1.2:/archive/archive2/programs/vmware/
Password: 
sending incremental file list
./
Keys
&#160; &#160; &#160; &#160; &#160;116 100% &#160; &#160;0.00kB/s &#160; &#160;0:00:00 &#40;xfer#1, to-check=8/10)
linux/
linux/VMware-server-2.0.1-156745.i386.tar.gz
&#160; &#160; &#160; &#160;32768 &#160; 0% &#160;800.00kB/s &#160; &#160;0:10:11 &#160;Received disconnect from 192.168.1.2: 2: Corrupted MAC on input.

rsync: writefd_unbuffered failed to write 4 [...]]]></description>
			<content:encoded><![CDATA[<p>So yesterday at work I ran into the famous ssh <span style="color:#FF00FF">MAC</span> failure like this:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">wouter<span style="color: #000000; font-weight: bold;">@</span>wouter-laptop:~:0<span style="color: #000000; font-weight: bold;">&gt;</span> rsync <span style="color: #660033;">-varP</span> .<span style="color: #000000; font-weight: bold;">/</span>vmware<span style="color: #000000; font-weight: bold;">/</span> wouter<span style="color: #000000; font-weight: bold;">@</span>192.168.1.2:<span style="color: #000000; font-weight: bold;">/</span>archive<span style="color: #000000; font-weight: bold;">/</span>archive2<span style="color: #000000; font-weight: bold;">/</span>programs<span style="color: #000000; font-weight: bold;">/</span>vmware<span style="color: #000000; font-weight: bold;">/</span><br />
Password: <br />
sending incremental <span style="color: #c20cb9; font-weight: bold;">file</span> list<br />
.<span style="color: #000000; font-weight: bold;">/</span><br />
Keys<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">116</span> <span style="color: #000000;">100</span><span style="color: #000000; font-weight: bold;">%</span> &nbsp; &nbsp;0.00kB<span style="color: #000000; font-weight: bold;">/</span>s &nbsp; &nbsp;<span style="color: #000000;">0</span>:00:00 <span style="color: #7a0874; font-weight: bold;">&#40;</span>xfer<span style="color: #666666; font-style: italic;">#1, to-check=8/10)</span><br />
linux<span style="color: #000000; font-weight: bold;">/</span><br />
linux<span style="color: #000000; font-weight: bold;">/</span>VMware-server-2.0.1-156745.i386.tar.gz<br />
&nbsp; &nbsp; &nbsp; &nbsp;32768 &nbsp; 0<span style="color: #000000; font-weight: bold;">%</span> &nbsp;800.00kB<span style="color: #000000; font-weight: bold;">/</span>s &nbsp; &nbsp;0:10:11 &nbsp;Received disconnect from 192.168.1.2: 2: Corrupted MAC on input.<br />
<br />
rsync: writefd_unbuffered failed to <span style="color: #c20cb9; font-weight: bold;">write</span> 4 bytes to socket <span style="color: #7a0874; font-weight: bold;">&#91;</span>sender<span style="color: #7a0874; font-weight: bold;">&#93;</span>: Broken pipe <span style="color: #7a0874; font-weight: bold;">&#40;</span>32<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
rsync: connection unexpectedly closed <span style="color: #7a0874; font-weight: bold;">&#40;</span>53 bytes received so far<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>sender<span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
rsync error: error <span style="color: #000000; font-weight: bold;">in</span> rsync protocol data stream <span style="color: #7a0874; font-weight: bold;">&#40;</span>code 12<span style="color: #7a0874; font-weight: bold;">&#41;</span> at io.c<span style="color: #7a0874; font-weight: bold;">&#40;</span>600<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #007800;">sender</span>=3.0.6<span style="color: #7a0874; font-weight: bold;">&#93;</span></div></div>
<p>No, that has nothing to do with <a href="http://www.apple.com/">Apple/Mac computers</a> or <a href="http://en.wikipedia.org/wiki/MAC_address">Media Access Control</a>, it&#8217;s<br />
part of the SSH protocol (and others) called <a href="http://en.wikipedia.org/wiki/Message_authentication_code">Messenge Authentication Code</a>. This blog has a nice explanation: <a href="http://blogs.sun.com/janp/entry/ssh_messages_code_bad_packet">Jan Pechanec on SSH messages</a>.</p>
<p>Funny thing, my brother also had this exact issue with the same kind of laptop. Well&#8230;. in his case it was putty failing his connection from a windows machine to this laptop.<br />
The reason? Same as ever,  <span style="color:#FFFF00">checksum offloading</span>.<br />
You can check if your card does this with the  <span style="color:#00FFFF">ethtool</span> program:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">wouter<span style="color: #000000; font-weight: bold;">@</span>wouter-laptop:~:0<span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #c20cb9; font-weight: bold;">sudo</span> ethtool <span style="color: #660033;">-k</span> eth0<br />
Offload parameters <span style="color: #000000; font-weight: bold;">for</span> eth0:<br />
Cannot get device flags: Operation not supported<br />
rx-checksumming: on<br />
tx-checksumming: on<br />
scatter-gather: on<br />
tcp-segmentation-offload: off<br />
udp-fragmentation-offload: off<br />
generic-segmentation-offload: on<br />
generic-receive-offload: off<br />
large-receive-offload: off</div></div>
<p>And the fix for this:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">wouter<span style="color: #000000; font-weight: bold;">@</span>wouter-laptop:~:85<span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #c20cb9; font-weight: bold;">sudo</span> &nbsp;ethtool <span style="color: #660033;">-K</span> eth0 tx off</div></div>
<p>Fixed.</p>
<p>&#8221; <span style="color:#000FFF">Wait, what does Pokemon OS have to do with this?</span>&#8221;<br />
Well, isn&#8217;t that obvious? It&#8217;s supposed to magically work, and it doesn&#8217;t! <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
Probably more a kernel thing though&#8230; oh well.</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/pokemon-os-rsyncssh-and-mac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Boost, qBitTorrent and lib64</title>
		<link>http://notes.benv.junerules.com/all/software/boost-qbittorrent-and-lib64/</link>
		<comments>http://notes.benv.junerules.com/all/software/boost-qbittorrent-and-lib64/#comments</comments>
		<pubDate>Sat, 05 Sep 2009 16:13:06 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Morons]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[autoconf]]></category>
		<category><![CDATA[boost]]></category>
		<category><![CDATA[configure]]></category>
		<category><![CDATA[slackware]]></category>
		<category><![CDATA[x86_64]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=354</guid>
		<description><![CDATA[After toying around a bit on the news sites I decided it would be interesting to see if qBitTorrent would run on slackware 64.
So we go to the download site, copy the url, and see if Slackbuild likes it. Slackbuild leeches, untars, gives the configure options (which are a bit buggy, I know, will be [...]]]></description>
			<content:encoded><![CDATA[<p>After toying around a bit on the news sites I decided it would be interesting to see if <a href="http://qbittorrent.sourceforge.net">qBitTorrent</a> would run on slackware 64.<br />
So we go to the download site, copy the url, and see if Slackbuild likes it. Slackbuild leeches, untars, gives the configure options (which are a bit buggy, I know, will be fixed next release), runs configure. Configure crashes out with &#8220;blabla boost blabla&#8221;.<span id="more-354"></span></p>
<p>Oh. <span style="color:#FF0000">Boost</span>&#8230;.. that time of the month. If there&#8217;s one piece of trash I&#8217;ve run into very often on my compilation expeditions&#8230;. it&#8217;s boost. What a cancer piece of trash that is. You wouldn&#8217;t believe the amount of cursing I&#8217;ve gone through on my trails through &#8220;build from source&#8221; land because of boost. It never works, and when it does it&#8217;s limping on. They should have called it &#8220;blast&#8221; instead.<br />
These days boost is in the official slackware repositories. You&#8217;d think that would help, since I can&#8217;t mess up the paths etc anymore. (compiling boost is another disaster btw, don&#8217;t go there unless you like torture). But noo, as usual the programs that use boost (&#8220;because we can&#8217;t code &#8482;&#8221;, or at least, that&#8217;s what I think) are so good at coding stuff themselves that they fail the autoconf for it as well. Prutsers. Well, to be honest, if they can&#8217;t code it themselves it&#8217;s probably smart to use a library that handles it for them&#8230;.. but boost? :/</p>
<p>Anyway, back to qBitTorrent. Actually, it&#8217;s <span style="color:#FF00FF">libtorrent-rasterbar</span> that&#8217;s failing. Attempt 1, configure with only a prefix and no other options:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>janeman:~<span style="color: #000000; font-weight: bold;">/</span>tmp$ <span style="color: #666666; font-style: italic;"># ./configure --prefix=/usr</span><br />
&nbsp; <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #000000; font-weight: bold;">*</span>blabla<span style="color: #000000; font-weight: bold;">*</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
checking whether the Boost::System library is available... <span style="color: #c20cb9; font-weight: bold;">yes</span><br />
configure: error: unable to <span style="color: #c20cb9; font-weight: bold;">find</span> Boost.System library, currently this is required.</div></div>
<p>WHat?! Do you ahve Boost::System? Yes. I mean no!<br />
&#8230; seriously, who comes up with this shit&#8230;.<br />
So we dig into config.log and find:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">configure:21533: checking whether the Boost::System library is available<br />
configure:21567: <span style="color: #c20cb9; font-weight: bold;">g++</span> <span style="color: #660033;">-c</span> <span style="color: #660033;">-g</span> <span style="color: #660033;">-O2</span> &nbsp;-I<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>include conftest.cpp <span style="color: #000000; font-weight: bold;">&gt;&amp;</span>5<br />
configure:21574: <span style="color: #007800;">$?</span> = 0<br />
configure:21597: result: <span style="color: #c20cb9; font-weight: bold;">yes</span><br />
configure:21865: error: unable to <span style="color: #c20cb9; font-weight: bold;">find</span> Boost.System library, currently this is required.</div></div>
<p>Or in other words: nothing we didn&#8217;t already know. FUCK.<br />
Time for a trace.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>janeman:~<span style="color: #000000; font-weight: bold;">/</span>tmp$ <span style="color: #c20cb9; font-weight: bold;">bash</span> <span style="color: #660033;">-x</span> .<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--with-ssl</span> <span style="color: #660033;">--with-boost-system</span>=boost_system 2<span style="color: #000000; font-weight: bold;">&gt;&amp;</span>1 <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">less</span><br />
&nbsp;<span style="color: #7a0874; font-weight: bold;">&#91;</span> shift-g, <span style="color: #7a0874; font-weight: bold;">wait</span>, search <span style="color: #000000; font-weight: bold;">for</span> Boost::System <span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
++ <span style="color: #7a0874; font-weight: bold;">echo</span> -L<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<br />
++ <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'s/[^\/]*//'</span><br />
+ <span style="color: #007800;">BOOSTLIBDIR</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<br />
+ <span style="color: #007800;">LDFLAGS_SAVE</span>=<span style="color: #ff0000;">' -L/usr/lib'</span><br />
+ <span style="color: #7a0874; font-weight: bold;">test</span> x = x<br />
++ <span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #ff0000;">'/usr/lib/libboost_system*.so*'</span> <span style="color: #ff0000;">'/usr/lib/libboost_system*.a*'</span><br />
++ <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #ff0000;">'s,.*/,,'</span><br />
++ <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'s;^lib\(boost_system.*\)\.so.*$;\1;'</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'s;^lib\(boost_system.*\)\.a*$;\1;'</span><br />
+ <span style="color: #7a0874; font-weight: bold;">test</span> x <span style="color: #ff0000;">'!='</span> xyes<br />
++ <span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #ff0000;">'/usr/lib/boost_system*.dll*'</span> <span style="color: #ff0000;">'/usr/lib/boost_system*.a*'</span><br />
++ <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #ff0000;">'s,.*/,,'</span><br />
++ <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'s;^\(boost_system.*\)\.dll.*$;\1;'</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'s;^\(boost_system.*\)\.a*$;\1;'</span><br />
+ <span style="color: #7a0874; font-weight: bold;">test</span> x = xno<br />
+ <span style="color: #007800;">CPPFLAGS</span>=<br />
+ <span style="color: #007800;">LDFLAGS</span>=<br />
+ <span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #660033;">-z</span> <span style="color: #ff0000;">''</span><br />
+ <span style="color: #7a0874; font-weight: bold;">printf</span> <span style="color: #ff0000;">'%s\n'</span> <span style="color: #ff0000;">'configure:21865: error: unable to find Boost.System library, currently this is required.'</span><br />
+ <span style="color: #7a0874; font-weight: bold;">printf</span> <span style="color: #ff0000;">'%s\n'</span> <span style="color: #ff0000;">'configure: error: unable to find Boost.System library, currently this is required.'</span><br />
configure: error: unable to <span style="color: #c20cb9; font-weight: bold;">find</span> Boost.System library, currently this is required.</div></div>
<p>&#8230;. <span style="color:#FFFF00">/usr/lib</span>? Says who? Not me, that&#8217;s for sure. idiots.<br />
In fact, I&#8217;m quite sure that it&#8217;s in <span style="color:#FFFF00">/usr/lib64</span>.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>janeman:~<span style="color: #000000; font-weight: bold;">/</span>tmp$ &nbsp;<span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #660033;">-la</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib64<span style="color: #000000; font-weight: bold;">/</span>libboost_filesyste<span style="color: #000000; font-weight: bold;">*</span> <br />
<span style="color: #660033;">-rwxr-xr-x</span> 1 root root 83368 2009-08-25 04:31 <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib64<span style="color: #000000; font-weight: bold;">/</span>libboost_filesystem-mt.so<span style="color: #000000; font-weight: bold;">*</span><br />
<span style="color: #660033;">-rwxr-xr-x</span> <span style="color: #000000;">1</span> root root <span style="color: #000000;">83336</span> <span style="color: #000000;">2009</span>-08-<span style="color: #000000;">25</span> 04:<span style="color: #000000;">31</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib64<span style="color: #000000; font-weight: bold;">/</span>libboost_filesystem.so<span style="color: #000000; font-weight: bold;">*</span></div></div>
<p>Jup, as expected. Boost is kanker. Since boost doesn&#8217;t have the usual pkgconfig issues, we can only conclude that the reason is that either this configure.in was written by a moron, or that<br />
boost supplies invalid tests for finding itself through the autoconf system. I suspect the latter, but that&#8217;s just me <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>In this case the solution is simple, since the configure script has an override option. Wonder why&#8230; maybe they ran into boost idiocies before? <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
The solution:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>janeman:~<span style="color: #000000; font-weight: bold;">/</span>tmp$ .<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--with-boost-libdir</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib64</div></div>
<p>This runs through configure, it finds the boost garbage and runs through. And guess what? It even compiles! <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>The gist of this rant: autoconf is pretty useless if you make assumptions that autoconf is supposed to detect. If you write software, don&#8217;t assume this stuff, try to detect it.<br />
Also: when it fails, give me an error message that is useful, not some generic error code. &#8220;Library not found&#8221; vs &#8220;library not found because libblabla.so doesn&#8217;t exist in /usr/lib&#8221;.</p>
<p>About qbittorrent: it&#8217;s a cute little torrent client for linux. Especially if you like faily lightweight stuff that does has a gui. The thing I like about those lightweight clients: they&#8217;re fast.<br />
This one even has an RSS reader these days&#8230;. cute.<br />
Here&#8217;s a screenie:<br />
<div id="attachment_355" class="wp-caption alignnone" style="width: 310px"><a href="http://notes.benv.junerules.com/wp-content/uploads/2009/09/qbittorrent-1.5.0.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/09/qbittorrent-1.5.0-300x184.png" alt="qbittorrent v1.5.0" title="qbittorrent-1.5.0" width="300" height="184" class="size-medium wp-image-355" /></a><p class="wp-caption-text">qbittorrent v1.5.0</p></div></p>
<p>So qBittorrent: keep up the good work, and get rid of boost <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/boost-qbittorrent-and-lib64/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>P4-Clockfuck</title>
		<link>http://notes.benv.junerules.com/all/software/p4-clockfuck/</link>
		<comments>http://notes.benv.junerules.com/all/software/p4-clockfuck/#comments</comments>
		<pubDate>Wed, 02 Sep 2009 22:27:22 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[p4-clockmod]]></category>
		<category><![CDATA[powersave]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=349</guid>
		<description><![CDATA[You know what&#8217;s really annoying?
Try this:
root@Uil:/sys/devices/system/cpu/cpu0/cpufreq:0&#62;echo ondemand &#62; scaling_governor 
root@Uil:/sys/devices/system/cpu/cpu0/cpufreq:0&#62;dmesg
&#91;1325843.712549&#93; ondemand governor failed, too long transition latency of HW, fallback to performance governor
Apparently this is caused by the p4-clockmod module.
You know, this piece of junk:
Also known as &#8220;CONFIG_X86_P4_CLOCKMOD&#8220;.
The reason?
Well, the ondemand and the conservative governors want to be able to switch to a different speed [...]]]></description>
			<content:encoded><![CDATA[<p>You know what&#8217;s really annoying?</p>
<p>Try this:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>Uil:<span style="color: #000000; font-weight: bold;">/</span>sys<span style="color: #000000; font-weight: bold;">/</span>devices<span style="color: #000000; font-weight: bold;">/</span>system<span style="color: #000000; font-weight: bold;">/</span>cpu<span style="color: #000000; font-weight: bold;">/</span>cpu0<span style="color: #000000; font-weight: bold;">/</span>cpufreq:0<span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #7a0874; font-weight: bold;">echo</span> ondemand <span style="color: #000000; font-weight: bold;">&gt;</span> scaling_governor <br />
root<span style="color: #000000; font-weight: bold;">@</span>Uil:<span style="color: #000000; font-weight: bold;">/</span>sys<span style="color: #000000; font-weight: bold;">/</span>devices<span style="color: #000000; font-weight: bold;">/</span>system<span style="color: #000000; font-weight: bold;">/</span>cpu<span style="color: #000000; font-weight: bold;">/</span>cpu0<span style="color: #000000; font-weight: bold;">/</span>cpufreq:0<span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #c20cb9; font-weight: bold;">dmesg</span><br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">1325843.712549</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> ondemand governor failed, too long transition latency of HW, fallback to performance governor</div></div>
<p>Apparently this is caused by the <span style="color:#FF00FF">p4-clockmod</span> module.<br />
You know, this piece of junk:<br />
<div id="attachment_350" class="wp-caption alignnone" style="width: 390px"><a href="http://notes.benv.junerules.com/wp-content/uploads/2009/09/p4-clockmod.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/09/p4-clockmod.png" alt="p4-clockmod" title="p4-clockmod" width="380" height="30" class="size-full wp-image-350" /></a><p class="wp-caption-text">p4-clockmod</p></div><br />
Also known as &#8220;<span style="color:#00FFFF">CONFIG_X86_P4_CLOCKMOD</span>&#8220;.</p>
<p>The reason?<br />
Well, the ondemand and the conservative governors want to be able to switch to a different speed before their calculations become invalid.<br />
The p4-clockmod thing apparently makes the latency of switching so <b>BIG </b> that it becomes impossible. Or so they think.<br />
Which leaves only the sucky powersave and performance governors. (and of course userspace).</p>
<p>The kernel menuconfig help states:</p>
<blockquote><p>This driver should be only used in exceptional<br />
circumstances when very low power is needed because it causes severe<br />
slowdowns and noticeable latencies.  Normally Speedstep should be used<br />
instead.</p></blockquote>
<p>Lovely. I&#8217;ll keep that in mind, thanks.<br />
*enables <span style="color:#00FFFF">CONFIG_X86_ACPI_CPUFREQ</span> instead*</p>
<p>Note that when they&#8217;re both compiled in (as opposed to modules) the retarded thing seems to go for the clockmod. Just great.</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/p4-clockfuck/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Phpbb wtf</title>
		<link>http://notes.benv.junerules.com/all/software/phpbb-wtf/</link>
		<comments>http://notes.benv.junerules.com/all/software/phpbb-wtf/#comments</comments>
		<pubDate>Tue, 01 Sep 2009 08:00:38 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[phpbb]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=333</guid>
		<description><![CDATA[Today, phpbb decided to fuck with me.
Or with lotjuh that is. She went to our forum, blank page.
I went there to check, works fine for me. Meh. Probably firefox fucking up as usual.
She tries lynx. Blank.
She tries telnet&#8230;.
benv@janeman:~:1&#62;telnet forum.handofhades.eu 80 &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>Today, phpbb decided to fuck with me.<br />
Or with lotjuh that is. She went to our forum, blank page.<br />
I went there to check, works fine for me. Meh. Probably firefox fucking up as usual.<br />
She tries lynx. Blank.<br />
She tries telnet&#8230;.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>janeman:~:<span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">&gt;</span>telnet forum.handofhades.eu <span style="color: #000000;">80</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
Trying 80.69.76.81...<br />
Connected to forum.handofhades.eu.<br />
Escape character is <span style="color: #ff0000;">'^]'</span>.<br />
GET <span style="color: #000000; font-weight: bold;">/</span> HTTP<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">1.0</span><br />
Host: forum.handofhades.eu<br />
<br />
HTTP<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">1.1</span> <span style="color: #000000;">200</span> OK<br />
Date: Tue, 01 Sep <span style="color: #000000;">2009</span> 07:<span style="color: #000000;">50</span>:04 GMT<br />
Server: Apache<span style="color: #000000; font-weight: bold;">/</span>2.2.12 <span style="color: #7a0874; font-weight: bold;">&#40;</span>Unix<span style="color: #7a0874; font-weight: bold;">&#41;</span> mod_ssl<span style="color: #000000; font-weight: bold;">/</span>2.2.12 OpenSSL<span style="color: #000000; font-weight: bold;">/</span>0.9.8h DAV<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2</span> PHP<span style="color: #000000; font-weight: bold;">/</span>5.2.10 SVN<span style="color: #000000; font-weight: bold;">/</span>1.4.6<br />
X-Powered-By: PHP<span style="color: #000000; font-weight: bold;">/</span>5.2.10<br />
Content-Length: <span style="color: #000000;">0</span><br />
Connection: close<br />
Content-Type: text<span style="color: #000000; font-weight: bold;">/</span>html<br />
<br />
Connection closed by foreign host.</div></div>
<p>What. the Fuck.</p>
<p>So, I check the server logs. Nothing.<br />
NOTHING!!!!</p>
<p>Restarted apache. Nothing (surprise!)</p>
<p>Started php myself on index.php. Nothing.<br />
Strace on php to try to figure out what the fuck.<br />
And then I get a glimpse of where it goes wrong when I see it enter a cache dir.<br />
The cache dir has tons of stuff, but most of them look like these:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #660033;">-rw-------</span> &nbsp;1 www www &nbsp; &nbsp;316 2009-08-23 18:42 sql_a10522de103f7e26c0338f4a3982efe0.php<br />
<span style="color: #660033;">-rw-------</span> &nbsp;1 www www &nbsp; &nbsp;316 2009-08-24 21:38 sql_a12f21b584712a564d6bde0b3f733ef2.php<br />
<span style="color: #660033;">-rw-------</span> &nbsp;1 www www &nbsp; &nbsp;316 2009-08-23 00:46 sql_a1386e2adab2812fb0a9076cfbb0fa1a.php<br />
<span style="color: #660033;">-rw-------</span> &nbsp;1 www www &nbsp; &nbsp;316 2009-08-24 11:22 sql_a14603b084ca6516a8f591651a4f0286.php<br />
<span style="color: #660033;">-rw-------</span> &nbsp;1 www www &nbsp; &nbsp;316 2009-08-24 23:02 sql_a1aaa40aaac9978cb292881202667264.php<br />
<span style="color: #660033;">-rw-------</span> &nbsp;1 www www &nbsp; &nbsp;316 2009-08-24 18:23 sql_a1cb1e3ad6332900edb533b9e2a904e4.php<br />
<span style="color: #660033;">-rw-------</span> &nbsp;1 www www &nbsp; &nbsp;316 2009-08-30 18:56 sql_a1cbb2008b00faafb8957bafc7082453.php<br />
<span style="color: #660033;">-rw-------</span> &nbsp;1 www www &nbsp; &nbsp;316 2009-08-22 12:36 sql_a1d2e08e3641f1b8f7c03ceda2e78981.php<br />
<span style="color: #660033;">-rw-------</span> &nbsp;<span style="color: #000000;">1</span> www www &nbsp; &nbsp;<span style="color: #000000;">316</span> <span style="color: #000000;">2009</span>-08-<span style="color: #000000;">24</span> <span style="color: #000000;">15</span>:<span style="color: #000000;">58</span> sql_a1eac242296c2e713f78618b8b49ad15.php</div></div>
<p>You get the point.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>blue:<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>vhosts<span style="color: #000000; font-weight: bold;">/</span>forum.handofhades.eu<span style="color: #000000; font-weight: bold;">/</span>cache<span style="color: #666666; font-style: italic;"># rm sql_*.php</span></div></div>
<p>Fixed. Piece of cancer. Thanks for telling me&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/phpbb-wtf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Xen and Power Saving</title>
		<link>http://notes.benv.junerules.com/all/software/xen-and-power-saving/</link>
		<comments>http://notes.benv.junerules.com/all/software/xen-and-power-saving/#comments</comments>
		<pubDate>Mon, 31 Aug 2009 23:23:26 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[powersave]]></category>
		<category><![CDATA[xen]]></category>
		<category><![CDATA[xenpm]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=329</guid>
		<description><![CDATA[Or more specific: CPU frequency scaling.
On my laptop this is one of the first things I enabled to make my battery last longer.
Now that we&#8217;re going to put a server in a rack where they will bill us depending on the amount of power consumed, this sounds like a welcome thing to have enabled.
Our latest [...]]]></description>
			<content:encoded><![CDATA[<p>Or more specific: CPU frequency scaling.</p>
<p>On my laptop this is one of the first things I enabled to make my battery last longer.<br />
Now that we&#8217;re going to put a server in a rack where they will bill us depending on the amount of power consumed, this sounds like a welcome thing to have enabled.</p>
<p>Our latest Xen install has Xen 3.4, on which they&#8217;ve enabled it by default. Isn&#8217;t that nice?<br />
So basically, if your processor etc is good enough to support it, you can mess around with it using the <span style="color:#FF00FF">xenpm</span> tool.</p>
<p>For instance we can check the parameters for CPU 0 like this:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>xenbro:~<span style="color: #666666; font-style: italic;"># xenpm get-cpufreq-para 0</span><br />
cpu <span style="color: #c20cb9; font-weight: bold;">id</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : <span style="color: #000000;">0</span><br />
affected_cpus &nbsp; &nbsp; &nbsp; &nbsp;: <span style="color: #000000; font-weight: bold;">*</span><span style="color: #000000;">0</span> <span style="color: #000000;">1</span> <span style="color: #000000;">2</span> <span style="color: #000000;">3</span><br />
cpuinfo frequency &nbsp; &nbsp;: max <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">2600000</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> min <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">800000</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> cur <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">800000</span><span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
scaling_driver &nbsp; &nbsp; &nbsp; : <br />
scaling_avail_gov &nbsp; &nbsp;: userspace performance powersave ondemand<br />
current_governor &nbsp; &nbsp; : ondemand<br />
&nbsp; ondemand specific &nbsp;:<br />
&nbsp; &nbsp; sampling_rate &nbsp; &nbsp;: max <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">10000000</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> min <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">10000</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> cur <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">20000</span><span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
&nbsp; &nbsp; up_threshold &nbsp; &nbsp; : <span style="color: #000000;">80</span><br />
scaling_avail_freq &nbsp; : <span style="color: #000000;">2600000</span> <span style="color: #000000;">1900000</span> <span style="color: #000000;">1400000</span> <span style="color: #000000; font-weight: bold;">*</span><span style="color: #000000;">800000</span><br />
scaling frequency &nbsp; &nbsp;: max <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">2600000</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> min <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">800000</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> cur <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">800000</span><span style="color: #7a0874; font-weight: bold;">&#93;</span></div></div>
<p>As you can see, it&#8217;s very much like the whole <span style="color:#FF0000">cpufreq</span> ordeal. It has an <span style="color:#00FFFF">ondemand</span> governor, a <span style="color:#00FFFF">powersave</span> one, etc. Right now this CPU is using the ondemand governor, which will ramp up the clock when demand increases.<br />
However, since this is a quad core and not a real quad processor machine we can only change the governor for all 4 cores at the same time, not for individual ones. (would be cool to have 1 core burning away power while the rest idles by&#8230;.).</p>
<p>Anyway, the <span style="color:#FF00FF">xenpm</span> tool allows us to monitor and change various aspects of this.<br />
For instance this will do a little benchmark and show the processor states during the benchmark.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>xenbro:~<span style="color: #666666; font-style: italic;"># xenpm start 10</span><br />
Timeout <span style="color: #000000; font-weight: bold;">set</span> to 10 seconds<br />
Start sampling, waiting <span style="color: #000000; font-weight: bold;">for</span> CTRL-C or SIGINT or SIGALARM signal ...<br />
Elapsed <span style="color: #000000; font-weight: bold;">time</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>ms<span style="color: #7a0874; font-weight: bold;">&#41;</span>: <span style="color: #000000;">10003</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />
CPU0: &nbsp; Residency<span style="color: #7a0874; font-weight: bold;">&#40;</span>ms<span style="color: #7a0874; font-weight: bold;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Avg Res<span style="color: #7a0874; font-weight: bold;">&#40;</span>ms<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
&nbsp; C0 &nbsp; &nbsp;<span style="color: #000000;">49</span> &nbsp; &nbsp; &nbsp;<span style="color: #7a0874; font-weight: bold;">&#40;</span> <span style="color: #000000;">0.50</span><span style="color: #000000; font-weight: bold;">%</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">0.04</span><br />
&nbsp; C1 &nbsp; &nbsp;<span style="color: #000000;">9953</span> &nbsp; &nbsp;<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">99.50</span><span style="color: #000000; font-weight: bold;">%</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">7.19</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />
&nbsp; Avg freq &nbsp; &nbsp; &nbsp;<span style="color: #000000;">800000</span> &nbsp;KHz<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />
CPU1: &nbsp; Residency<span style="color: #7a0874; font-weight: bold;">&#40;</span>ms<span style="color: #7a0874; font-weight: bold;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Avg Res<span style="color: #7a0874; font-weight: bold;">&#40;</span>ms<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
&nbsp; C0 &nbsp; &nbsp;<span style="color: #000000;">13</span> &nbsp; &nbsp; &nbsp;<span style="color: #7a0874; font-weight: bold;">&#40;</span> <span style="color: #000000;">0.14</span><span style="color: #000000; font-weight: bold;">%</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">0.07</span><br />
&nbsp; C1 &nbsp; &nbsp;<span style="color: #000000;">9989</span> &nbsp; &nbsp;<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">99.86</span><span style="color: #000000; font-weight: bold;">%</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">48.49</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />
&nbsp; Avg freq &nbsp; &nbsp; &nbsp;<span style="color: #000000;">800000</span> &nbsp;KHz<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />
CPU2: &nbsp; Residency<span style="color: #7a0874; font-weight: bold;">&#40;</span>ms<span style="color: #7a0874; font-weight: bold;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Avg Res<span style="color: #7a0874; font-weight: bold;">&#40;</span>ms<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
&nbsp; C0 &nbsp; &nbsp;<span style="color: #000000;">83</span> &nbsp; &nbsp; &nbsp;<span style="color: #7a0874; font-weight: bold;">&#40;</span> <span style="color: #000000;">0.83</span><span style="color: #000000; font-weight: bold;">%</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">0.21</span><br />
&nbsp; C1 &nbsp; &nbsp;<span style="color: #000000;">9919</span> &nbsp; &nbsp;<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">99.17</span><span style="color: #000000; font-weight: bold;">%</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">25.05</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />
&nbsp; Avg freq &nbsp; &nbsp; &nbsp;<span style="color: #000000;">800000</span> &nbsp;KHz<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />
CPU3: &nbsp; Residency<span style="color: #7a0874; font-weight: bold;">&#40;</span>ms<span style="color: #7a0874; font-weight: bold;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Avg Res<span style="color: #7a0874; font-weight: bold;">&#40;</span>ms<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
&nbsp; C0 &nbsp; &nbsp;<span style="color: #000000;">28</span> &nbsp; &nbsp; &nbsp;<span style="color: #7a0874; font-weight: bold;">&#40;</span> <span style="color: #000000;">0.28</span><span style="color: #000000; font-weight: bold;">%</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">0.10</span><br />
&nbsp; C1 &nbsp; &nbsp;<span style="color: #000000;">9973</span> &nbsp; &nbsp;<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">99.72</span><span style="color: #000000; font-weight: bold;">%</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">33.92</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />
&nbsp; Avg freq &nbsp; &nbsp; &nbsp;<span style="color: #000000;">800000</span> &nbsp;KHz</div></div>
<p>As you can see my processor is mostly idle.<br />
<span style="color:#FFF033">State C0</span> is the most active state, <span style="color:#FFF033">C1</span> is sleeping with use of the HLT instruction.<br />
Your processor can have many more states, like my laptop which has 4.</p>
<p>Anyway, I put the change to ondemand governor in my /etc/rc.d/rc.local, so let&#8217;s hope it helps.</p>
<p>To read some more about the details of this stuff you can check out the <a href="http://wiki.xensource.com/xenwiki/xenpm">Xenpm wiki page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/xen-and-power-saving/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Minor annoyance about linux</title>
		<link>http://notes.benv.junerules.com/all/software/minor-annoyance-about-linux/</link>
		<comments>http://notes.benv.junerules.com/all/software/minor-annoyance-about-linux/#comments</comments>
		<pubDate>Mon, 31 Aug 2009 16:40:06 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Morons]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[ifconfig]]></category>
		<category><![CDATA[ipv4]]></category>
		<category><![CDATA[ipv6]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[proc]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=309</guid>
		<description><![CDATA[So I&#8217;m working on a little info script (check out Infoscreen) so I can have a nice overview
of my server when I look at console number one without having to log in etc.
Simple question:
&#8220;Where in /proc can I find a list of IP addresses with corresponding interfaces?&#8221;
Simple answer:
Try /proc/net/if_inet6!
wouter@wouter-laptop:~:0&#62;cat /proc/net/if_inet6 
00000000000000000000000000000001 01 80 10 80 [...]]]></description>
			<content:encoded><![CDATA[<p>So I&#8217;m working on a little info script (check out <a href="http://notes.benv.junerules.com/infoscreen/">Infoscreen</a>) so I can have a nice overview<br />
of my server when I look at console number one without having to log in etc.</p>
<p>Simple question:<br />
&#8220;Where in /proc can I find a list of IP addresses with corresponding interfaces?&#8221;</p>
<p>Simple answer:<br />
Try <code class="codecolorer text vibrant"><span class="text">/proc/net/if_inet6</span></code>!</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">wouter<span style="color: #000000; font-weight: bold;">@</span>wouter-laptop:~:0<span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>net<span style="color: #000000; font-weight: bold;">/</span>if_inet6 <br />
00000000000000000000000000000001 01 <span style="color: #000000;">80</span> <span style="color: #000000;">10</span> <span style="color: #000000;">80</span> &nbsp; &nbsp; &nbsp; lo<br />
20010888148d0000022100fffe221352 04 <span style="color: #000000;">40</span> 00 00 &nbsp; &nbsp;wlan1<br />
fe80000000000000022100fffe221352 04 <span style="color: #000000;">40</span> <span style="color: #000000;">20</span> <span style="color: #000000;">80</span> &nbsp; &nbsp;wlan1</div></div>
<p>&#8230; that&#8217;s great&#8230;. but I really wanted the IPv4 addresses as well.<br />
&#8220;/proc/net/if_inet4&#8243; or &#8220;/proc/net/if_inet&#8221;? Noooooo&#8230;.</p>
<p>Conclusion: KANKER LINUX!</p>
<p>Obviously I can get the address by calling &#8216;<span style="color:#FF00FF">ip addr show</span>&#8216;, &#8216;<span style="color:#FF00FF">ifconfig</span>&#8216; or a heap of other solution involving calling <span style="color:#FF00FF">ioctl</span> on sockets or using the <span style="color:#FF00FF">netlink interface</span>&#8230; but seriously, blegh.</p>
<p>The most retarded thing is that pretty much every other statistic about my network devices is there&#8230; including active connections and whatnot, but ipv4 addresses? Nooooo&#8230;.. *RAAH*</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/minor-annoyance-about-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New server, day 2. DomU and networking.</title>
		<link>http://notes.benv.junerules.com/all/software/new-server-day-2-domu-and-networking/</link>
		<comments>http://notes.benv.junerules.com/all/software/new-server-day-2-domu-and-networking/#comments</comments>
		<pubDate>Sat, 29 Aug 2009 14:54:01 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[domU]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[slackware]]></category>
		<category><![CDATA[xen]]></category>
		<category><![CDATA[xm]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=293</guid>
		<description><![CDATA[Another day, another time for fun!
Since we got Xen up and running yesterday, it&#8217;s now time for actually having some fun with it.
The goals are:

Getting xend started automagically when booting without destroying my network connection
Getting a domU up and running with a network connection
Getting an internal network between the domUs and dom0, shielded from the [...]]]></description>
			<content:encoded><![CDATA[<p>Another day, another time for fun!</p>
<p>Since we got Xen up and running yesterday, it&#8217;s now time for actually having some fun with it.<br />
The goals are:</p>
<ol>
<li>Getting xend started automagically when booting without destroying my network connection</li>
<li>Getting a domU up and running with a network connection</li>
<li>Getting an internal network between the domUs and dom0, shielded from the big bad internet.</li>
</ol>
<p><span id="more-293"></span></p>
<p>First things first, yesterday we got xen installed and all, but that&#8217;s about as far as we got before the bed was required. Xend almost got it right when it put a startup script in <span style="color:#FF00FF">/etc/rc.d/init.d</span> called &#8216;xend&#8217;, but alas, slackware will ignore that file. Personally I simply add the thing to <span style="color:#00FFFF">/etc/rc.d/rc.local</span>:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Starting xend...&quot;</span><br />
<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>xend start</div></div>
<p>This fixes issue #1, but only the first part.</p>
<p>Before you reboot you might want to alter some xend settings. The file to molest for this is <span style="color:#FFFF00">/etc/xend/xend-config.sxp</span>. Mine looks a bit like this:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>xenbro:~<span style="color: #666666; font-style: italic;"># grep -ve '#' -e '^$' /etc/xen/xend-config.sxp</span><br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>logfile <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>xen<span style="color: #000000; font-weight: bold;">/</span>xend.log<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>loglevel DEBUG<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>xen-api-server <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>unix<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>xend-unix-xmlrpc-server <span style="color: #c20cb9; font-weight: bold;">yes</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>xend-relocation-server <span style="color: #c20cb9; font-weight: bold;">yes</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>xend-unix-path <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>xend<span style="color: #000000; font-weight: bold;">/</span>xend-socket<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>xend-address localhost<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>xend-relocation-hosts-allow <span style="color: #ff0000;">'^localhost$ ^localhost\\.localdomain$'</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>network-script <span style="color: #ff0000;">'bridge-wrapper-benv netdev=eth0 bridge=xenbr0'</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>vif-script vif-bridge<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>dom0-min-mem 196<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>enable-dom0-ballooning <span style="color: #c20cb9; font-weight: bold;">yes</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>dom0-cpus <span style="color: #000000;">0</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>vncpasswd <span style="color: #ff0000;">''</span><span style="color: #7a0874; font-weight: bold;">&#41;</span></div></div>
<p>Almost everything is set to the default value. However, you will want to pay attention to the <span style="color:#FFFF00">network-script</span> part at the very least. As you can see I changed this to a little wrapper script.<br />
I won&#8217;t go into detail about all the possible Xen networking stuff, see the mailing list and the Xen docs for that, but what we want is the external network bridged to all domU&#8217;s, so they can have their own network space there and their external IP address and whatever they want to do without having to mess around in the dom0. To get this working you could stick to the default <code class="codecolorer text vibrant"><span class="text">(network-script network-bridge)</span></code>. Back in the Xen 3.0.3 days this molested my default gateway because their bridge script sucked (it failed to parse some stuff if I remember correctly), but when I tested it today it simply worked.</p>
<p>We want to have an internal network though, so we have to create our own bridge wrapper script.The only thing this script wrapper does is<br />
1. call the network bridge script as the default would do.<br />
2. create a second xen bridge.<br />
Here we go:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#!/bin/bash</span><br />
<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>xen<span style="color: #000000; font-weight: bold;">/</span>scripts<span style="color: #000000; font-weight: bold;">/</span>network-bridge <span style="color: #ff0000;">&quot;$@&quot;</span><br />
<br />
<span style="color: #007800;">bridge</span>=xenbr1<br />
<br />
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #000000; font-weight: bold;">!</span> <span style="color: #660033;">-d</span> <span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>;<br />
<span style="color: #000000; font-weight: bold;">then</span><br />
&nbsp; &nbsp;<span style="color: #7a0874; font-weight: bold;">echo</span> Creating internal bridge <span style="color: #800000;">${bridge}</span>....<br />
&nbsp; &nbsp;brctl addbr <span style="color: #800000;">${bridge}</span><br />
&nbsp; &nbsp;brctl stp <span style="color: #800000;">${bridge}</span> off<br />
&nbsp; &nbsp;brctl setfd <span style="color: #800000;">${bridge}</span> 0<br />
&nbsp; &nbsp;ip <span style="color: #c20cb9; font-weight: bold;">link</span> <span style="color: #000000; font-weight: bold;">set</span> <span style="color: #800000;">${bridge}</span> up &nbsp;<br />
<br />
&nbsp; &nbsp;<span style="color: #c20cb9; font-weight: bold;">ifconfig</span> <span style="color: #800000;">${bridge}</span> up &nbsp;10.0.0.1 netmask 255.255.255.0<br />
<span style="color: #000000; font-weight: bold;">fi</span></div></div>
<p>As you can see I also add an internal IP address to the bridge. You can make this bridge setup script as complex or as neat as you want, but I can&#8217;t be bothered to spend more time on it. It works for me &#8482; <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Now that all that is in place, let&#8217;s try out the creation of a domU. For testing purposes I steal my images from what used to be jailtime.org, these days it&#8217;s called <a href="http://stacklet.com/">Stacklet</a>. Too bad they don&#8217;t have a 64 bit slackware domU yet, but I guess I&#8217;ll create that myself a little later. Also, to keep stuff in a place where I can track it, I usually create a /xen directory where I store my host configurations and images.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>xenbro:~<span style="color: #666666; font-style: italic;"># mkdir -p &nbsp;/xen/hosts/slackware12.2</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>xenbro:~<span style="color: #666666; font-style: italic;"># cd /xen/hosts/slackware12.2</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>xenbro:<span style="color: #000000; font-weight: bold;">/</span>xen<span style="color: #000000; font-weight: bold;">/</span>hosts<span style="color: #000000; font-weight: bold;">/</span>slackware12.2<span style="color: #666666; font-style: italic;"># wget http://stacklet.com/sites/default/files/slackware/slackware.12-2.x86.20090509.img.tar.bz2</span><br />
&nbsp;<span style="color: #7a0874; font-weight: bold;">&#91;</span> ... <span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>xenbro:<span style="color: #000000; font-weight: bold;">/</span>xen<span style="color: #000000; font-weight: bold;">/</span>hosts<span style="color: #000000; font-weight: bold;">/</span>slackware12.2<span style="color: #666666; font-style: italic;"># tar jxvf slackware.12-2.x86.20090509.img.tar.bz2</span><br />
&nbsp;<span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #000000; font-weight: bold;">*</span>kaboom<span style="color: #000000; font-weight: bold;">*</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span></div></div>
<p>Edit the slackware.12-2.x86.xen3.cfg file and fix the location of the image file and the kernel. I simply used the same kernel that I use to boot my dom0 for now. Now let&#8217;s try it! Try</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">xm create <span style="color: #660033;">-c</span> slackware.12-2.x86.xen3.cfg</div></div>
<p>and it should enter the console of the now booting domU. To get out of the console hit <span style="color:#FFFF00">CTRL-[</span>.</p>
<p>Over here I got a bunch of kernel warnings like these:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">&#91;</span> &nbsp; &nbsp;0.000000<span style="color: #7a0874; font-weight: bold;">&#93;</span> ------------<span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #c20cb9; font-weight: bold;">cut</span> here <span style="color: #7a0874; font-weight: bold;">&#93;</span>------------ <br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span> &nbsp; &nbsp;0.000000<span style="color: #7a0874; font-weight: bold;">&#93;</span> WARNING: at drivers<span style="color: #000000; font-weight: bold;">/</span>firmware<span style="color: #000000; font-weight: bold;">/</span>dmi_scan.c:425 dmi_matches+0x81<span style="color: #000000; font-weight: bold;">/</span>0x90<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span> &nbsp; &nbsp;0.000000<span style="color: #7a0874; font-weight: bold;">&#93;</span> dmi check: not initialized yet. &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span> &nbsp; &nbsp;0.000000<span style="color: #7a0874; font-weight: bold;">&#93;</span> Modules linked <span style="color: #000000; font-weight: bold;">in</span>: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span> &nbsp; &nbsp;0.000000<span style="color: #7a0874; font-weight: bold;">&#93;</span> Pid: 0, <span style="color: #c20cb9; font-weight: bold;">comm</span>: swapper Not tainted 2.6.29.6-BenV <span style="color: #666666; font-style: italic;">#3</span><br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span> &nbsp; &nbsp;<span style="color: #000000;">0.000000</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> Call Trace: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span> &nbsp; &nbsp;<span style="color: #000000;">0.000000</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> &nbsp;<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000; font-weight: bold;">&lt;</span>ffffffff802352aa<span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> warn_slowpath+0xea<span style="color: #000000; font-weight: bold;">/</span>0x160<br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span> &nbsp; &nbsp;<span style="color: #000000;">0.000000</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> &nbsp;<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000; font-weight: bold;">&lt;</span>ffffffff8078bfd4<span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> printk+0x4e<span style="color: #000000; font-weight: bold;">/</span>0x56 &nbsp; &nbsp; &nbsp; &nbsp;<br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span> &nbsp; &nbsp;<span style="color: #000000;">0.000000</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> &nbsp;<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000; font-weight: bold;">&lt;</span>ffffffff80a9b625<span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> phys_pud_init+0x150<span style="color: #000000; font-weight: bold;">/</span>0x42b<br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span> &nbsp; &nbsp;<span style="color: #000000;">0.000000</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> &nbsp;<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000; font-weight: bold;">&lt;</span>ffffffff80a77418<span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> reserve_early+0x13<span style="color: #000000; font-weight: bold;">/</span>0x28 &nbsp;<br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span> &nbsp; &nbsp;<span style="color: #000000;">0.000000</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> &nbsp;<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000; font-weight: bold;">&lt;</span>ffffffff80771929<span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> init_memory_mapping+0x559<span style="color: #000000; font-weight: bold;">/</span>0xd40<br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span> &nbsp; &nbsp;<span style="color: #000000;">0.000000</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> &nbsp;<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000; font-weight: bold;">&lt;</span>ffffffff8063e671<span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> dmi_matches+0x81<span style="color: #000000; font-weight: bold;">/</span>0x90 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span> &nbsp; &nbsp;<span style="color: #000000;">0.000000</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> &nbsp;<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000; font-weight: bold;">&lt;</span>ffffffff8063e6f0<span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> dmi_check_system+0x20<span style="color: #000000; font-weight: bold;">/</span>0x60<br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span> &nbsp; &nbsp;<span style="color: #000000;">0.000000</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> &nbsp;<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000; font-weight: bold;">&lt;</span>ffffffff80a7554a<span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> setup_arch+0x2aa<span style="color: #000000; font-weight: bold;">/</span>0xf19 &nbsp; &nbsp;<br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span> &nbsp; &nbsp;<span style="color: #000000;">0.000000</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> &nbsp;<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000; font-weight: bold;">&lt;</span>ffffffff80a6e7ac<span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> start_kernel+0x81<span style="color: #000000; font-weight: bold;">/</span>0x483<br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span> &nbsp; &nbsp;<span style="color: #000000;">0.000000</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> &nbsp;<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000; font-weight: bold;">&lt;</span>ffffffff80a6e1bd<span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> x86_64_start_kernel+0xa9<span style="color: #000000; font-weight: bold;">/</span>0xbf<br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span> &nbsp; &nbsp;<span style="color: #000000;">0.000000</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> ---<span style="color: #7a0874; font-weight: bold;">&#91;</span> end trace 4eaa2a86a8e2da22 <span style="color: #7a0874; font-weight: bold;">&#93;</span>---</div></div>
<p>While these are a nuisance in dmesg, they seem to be fairly harmless. Somewhere on the Xen mailing list someone claims that you can disable CONFIG_DMI in the kernel to get rid of these, which I tend to believe but can&#8217;t be bothered. If I&#8217;m going to build a new kernel for my domU, I will take the latest vanilla kernel and add Xen domU support in that. It&#8217;s a mainline kernel option these days, you can see my post about it here: <a href="http://notes.benv.junerules.com/software/xen-and-booting-domu-using-a-vanilla-kernel/">Xen and booting domU using a vanilla kernel</a><br />
Login on the domU using root/password, note that your networking actually works, but you still have to enter an IP for eth1 if you want the internal network.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>darkstar:~<span style="color: #666666; font-style: italic;"># ifconfig eth1 10.0.0.2/24</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>darkstar:~<span style="color: #666666; font-style: italic;"># ping 10.0.0.1</span><br />
PING 10.0.0.1 <span style="color: #7a0874; font-weight: bold;">&#40;</span>10.0.0.1<span style="color: #7a0874; font-weight: bold;">&#41;</span> 56<span style="color: #7a0874; font-weight: bold;">&#40;</span>84<span style="color: #7a0874; font-weight: bold;">&#41;</span> bytes of data.<br />
64 bytes from 10.0.0.1: <span style="color: #007800;">icmp_seq</span>=1 <span style="color: #007800;">ttl</span>=64 <span style="color: #000000; font-weight: bold;">time</span>=0.770 ms<br />
64 bytes from 10.0.0.1: <span style="color: #007800;">icmp_seq</span>=2 <span style="color: #007800;">ttl</span>=64 <span style="color: #000000; font-weight: bold;">time</span>=0.192 ms<br />
64 bytes from 10.0.0.1: <span style="color: #007800;">icmp_seq</span>=3 <span style="color: #007800;">ttl</span>=64 <span style="color: #000000; font-weight: bold;">time</span>=<span style="color: #000000;">0.187</span> ms</div></div>
<p>Woohoo, it works! <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>For an overview of the currently running domains you can use</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>xenbro:~<span style="color: #666666; font-style: italic;"># xm list</span><br />
Name &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ID &nbsp; Mem VCPUs &nbsp; &nbsp; &nbsp;State &nbsp; Time<span style="color: #7a0874; font-weight: bold;">&#40;</span>s<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
Domain-0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0 &nbsp;7447 &nbsp; &nbsp; 4 &nbsp; &nbsp; r----- &nbsp; &nbsp; 16.0<br />
test1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1 &nbsp; 512 &nbsp; &nbsp; 1 &nbsp; &nbsp; <span style="color: #660033;">-b----</span> &nbsp; &nbsp; &nbsp;<span style="color: #000000;">5.9</span></div></div>
<p>The <span style="color:#00FFFF">xm</span> command has a ton of useful things, so check out the manpage/help for it.</p>
<p>For my real domU I will be using LVM partitions and install slackware 64 on it, but that&#8217;s fairly trivial to figure out once you&#8217;re this far. So have fun with your Xen install ^^</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/new-server-day-2-domu-and-networking/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New server, slackware64 and Xen 3.4</title>
		<link>http://notes.benv.junerules.com/all/software/new-server-slackware64-and-xen-3-4/</link>
		<comments>http://notes.benv.junerules.com/all/software/new-server-slackware64-and-xen-3-4/#comments</comments>
		<pubDate>Sat, 29 Aug 2009 00:06:00 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[coloclue]]></category>
		<category><![CDATA[slackware64]]></category>
		<category><![CDATA[x86_64]]></category>
		<category><![CDATA[xen]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=274</guid>
		<description><![CDATA[You read it right, time for fun!
First we build ourselves a nice cute little server in a 2U rack case made by Chenbro (sounds like Xenbro to me  ).
Inside we stash a quad core Phenom X2 810, 2 western digital 1TB disks from the &#8220;green&#8221; series and of course 8GB of DDR1333.
Could be faster, [...]]]></description>
			<content:encoded><![CDATA[<p>You read it right, time for fun!</p>
<p>First we build ourselves a nice cute little server in a 2U rack case made by Chenbro (sounds like Xenbro to me <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> ).<br />
Inside we stash a quad core Phenom X2 810, 2 western digital 1TB disks from the &#8220;green&#8221; series and of course 8GB of DDR1333.<br />
Could be faster, but this should do for not too much coin. (about 600 euros).<br />
<span id="more-274"></span></p>
<p>We (which is me and lotjuh plus some friends) want this machine as a toy machine that we can all play with which we&#8217;re going to put in a rack at <a href="http://coloclue.net/">Coloclue</a>.<br />
Basically everyone pays a tiny amount of money each month and gets himself a domU on the machine that he can do whatever he wants with, like messing around with<br />
vpn tunnels and ipv6 <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Anyway, after putting the stuff inside it looked a bit like this:<br />
<a href="http://notes.benv.junerules.com/wp-content/uploads/2009/08/suc54016.jpg"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/08/suc54016-300x225.jpg" alt="suc54016" title="suc54016" width="300" height="225" class="aligncenter size-medium wp-image-275" /></a></p>
<p>Power on, it works! (duh)<br />
Work through the BIOS, making sure to disable the halt on errors prompt and such nonsense. 512MB for integrated video? No thanks, too bad the minimum is still 128MB.<br />
And how come every time I run through a BIOS I find new (and undocumented) settings like &#8220;Enable C1E support&#8221;? Apparently this is some kind of new AMD power saving stuff,<br />
but from the comments I found it seems like a tickless kernel has issues with it, so I&#8217;ll leave it off.</p>
<p>Boot from PXE, slackware64-current, go go go. Created a little md0 raid1 boot partition, ran setup using NFS and a few minutes later it boots into slackware 64.<br />
That was easy. (And fast!)<br />
<a href="http://notes.benv.junerules.com/wp-content/uploads/2009/08/suc54018.jpg"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/08/suc54018-300x225.jpg" alt="suc54018" title="suc54018" width="300" height="225" class="aligncenter size-medium wp-image-276" /></a></p>
<p>Now for the more interesting stuff. First, let&#8217;s get rid of lilo and put the latest grub on the machine. It&#8217;s just such a nicer bootloader, once you get it properly installed that is.<br />
It does support autoconf these days, so I figured I could use my slackbuild script for it. Slackbuild immediately cursed at me for not having the packages dir, so that was fixed as well <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
I also put the site config in place while I was at it.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>xenbro:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #666666; font-style: italic;"># svn co svn://svn.sv.gnu.org/grub/trunk/grub2 grub2-svn</span><br />
&nbsp;<span style="color: #7a0874; font-weight: bold;">&#91;</span> ... <span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>xenbro:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #666666; font-style: italic;"># cd grub2-svn</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>xenbro:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>grub2-svn<span style="color: #666666; font-style: italic;"># slackbuild.pl</span><br />
&nbsp;<span style="color: #7a0874; font-weight: bold;">&#91;</span> ... <span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>xenbro:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>grub2-svn<span style="color: #666666; font-style: italic;"># installpkg /usr/src/packages/grub2-1.97-svn-x86_64-1.tgz</span><br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span> ... <span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>xenbro<span style="color: #666666; font-style: italic;"># grub-install /dev/md0</span><br />
Installation finished. No error reported.<br />
This is the contents of the device map <span style="color: #000000; font-weight: bold;">/</span>boot<span style="color: #000000; font-weight: bold;">/</span>grub<span style="color: #000000; font-weight: bold;">/</span>device.map.<br />
Check <span style="color: #000000; font-weight: bold;">if</span> this is correct or not. If any of the lines is incorrect,<br />
fix it and re-run the script <span style="color: #000000; font-weight: bold;">`</span>grub-install<span style="color: #ff0000;">'.<br />
<br />
(hd0) &nbsp; /dev/sda<br />
(hd1) &nbsp; /dev/sdb</span></div></div>
<p>Well, that went smooth. Now for the config file, this is usually more tricky.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>xenbro<span style="color: #666666; font-style: italic;"># grub-mkconfig &gt; /boot/grub/grub.cfg</span><br />
Generating grub.cfg ...<br />
Found linux image: <span style="color: #000000; font-weight: bold;">/</span>boot<span style="color: #000000; font-weight: bold;">/</span>vmlinuz-huge-2.6.29.6<br />
Found linux image: <span style="color: #000000; font-weight: bold;">/</span>boot<span style="color: #000000; font-weight: bold;">/</span>vmlinuz-generic-2.6.29.6<br />
<span style="color: #000000; font-weight: bold;">done</span></div></div>
<p>Looking good&#8230;. seems like it even added the mdraid module in the config, grub is improving these days <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
Time for a reboot to see if it lied to us. *reboot*<br />
Well, guess what&#8230;. it actually worked. Amazing.</p>
<p>Time for Xen!<br />
We have 2 HDDs in there which I split up in a 20 GB boot partition and the rest. Both partitions are mirrored using raid-1 so a disk could basically disappear and the system should still be fine.<br />
The bigger partition will be fed into LVM so we can make nice little chunks there to hand out to the domUs.<br />
Other than that everyone can decide for themselves whatever the hell they want to run on it, as long as it runs under Xen.<br />
Here we go:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>xenbro:~<span style="color: #666666; font-style: italic;"># cd /usr/src</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>xenbro:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #666666; font-style: italic;"># mkdir xen</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>xenbro:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #666666; font-style: italic;"># cd xen/</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>xenbro:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>xen<span style="color: #666666; font-style: italic;"># wget http://bits.xensource.com/oss-xen/release/3.4.1/xen-3.4.1.tar.gz</span><br />
&nbsp;<span style="color: #7a0874; font-weight: bold;">&#91;</span> ... <span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>xenbro:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>xen<span style="color: #666666; font-style: italic;"># tar zxvf xen-3.4.1.tar.gz </span><br />
&nbsp;<span style="color: #7a0874; font-weight: bold;">&#91;</span> ... <span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>xenbro:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>xen<span style="color: #666666; font-style: italic;"># cd xen-3.4.1</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>xenbro:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>xen<span style="color: #000000; font-weight: bold;">/</span>xen-3.4.1<span style="color: #666666; font-style: italic;"># make xen</span><br />
&nbsp;<span style="color: #7a0874; font-weight: bold;">&#91;</span> ... <span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>xenbro:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>xen<span style="color: #000000; font-weight: bold;">/</span>xen-3.4.1<span style="color: #666666; font-style: italic;"># make install-xen</span><br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span> ... <span style="color: #7a0874; font-weight: bold;">&#93;</span></div></div>
<p>That went smooth over here, and installed the xen hypervisor. (you should now have a /boot/xen.gz, which is a symlink to xen-3.4.1.gz).<br />
However, we also need a dom0 kernel and the xen tools to run and control the installation.<br />
First the tools:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>xenbro:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>xen<span style="color: #000000; font-weight: bold;">/</span>xen-3.4.1<span style="color: #666666; font-style: italic;"># make tools</span><br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span> .. <span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>xenbro:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>xen<span style="color: #000000; font-weight: bold;">/</span>xen-3.4.1<span style="color: #666666; font-style: italic;"># make install-tools</span><br />
&nbsp;<span style="color: #7a0874; font-weight: bold;">&#91;</span> ... <span style="color: #7a0874; font-weight: bold;">&#93;</span></div></div>
<p>Easy again. You should now have stuff like &#8216;<span style="color:#FF00FF">xm</span>&#8216; installed.<br />
This also created the <span style="color:#FF0055">/etc/xen</span> directory where we can muck around with the configuration later.</p>
<p>Now for the most challenging part: the kernel.<br />
What usually bites me is getting the kernel config worked out to my wishes, xen seems to wreck havoc with mine most of the times.<br />
Of course you could try to go for the default kernel, but I hate messing around with modules and initrds, so I usually try to make a megahuge kernel.<br />
Let&#8217;s go!</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>xenbro:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>xen<span style="color: #000000; font-weight: bold;">/</span>xen-3.4.1<span style="color: #666666; font-style: italic;"># make linux-2.6-xen0-prep</span></div></div>
<p>This fetches the kernel sources from hg and prepares them with initial configs etc. It might ask you some stuff, answer them to the best of your abilities, or simply accept the default.<br />
It doesn&#8217;t matter much if you messed up the questions, you have a chance to fix it. And fix the rest of the kernel as well while you&#8217;re at it:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>xenbro:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>xen<span style="color: #000000; font-weight: bold;">/</span>xen-3.4.1<span style="color: #666666; font-style: italic;"># cd build-linux-2.6.18-xen0_x86_64/</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>xenbro:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>xen<span style="color: #000000; font-weight: bold;">/</span>xen-3.4.1<span style="color: #000000; font-weight: bold;">/</span>build-linux-2.6.18-xen0_x86_64<span style="color: #666666; font-style: italic;"># make menuconfig</span></div></div>
<p>You are now presented with the usual kernel config dialogs. Have fun running through all of them as I did and halfway noticing the lack of <span style="color:#0055FF">EXT4</span> support.<br />
<span style="color:#FF0000">RAAAH!</span><br />
Kernel 2.6.18.8 for you&#8230; it&#8217;s ancient. But still default for the xen dom0. I wouldn&#8217;t mind that much, if it at least included support for my hardware (another machine we have with Xen required a patch to get AHCI up and running for that controller) and supported my filesystems. Meh.<br />
So after the conclusion that 2.6.18 wouldn&#8217;t work, I went for something better: 2.6.29.6 <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>xenbro:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>xen<span style="color: #666666; font-style: italic;"># wget http://gentoo-xen-kernel.googlecode.com/files/xen-patches-2.6.29-6.tar.bz2</span><br />
&nbsp;<span style="color: #7a0874; font-weight: bold;">&#91;</span> ... <span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>xenbro:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>xen<span style="color: #666666; font-style: italic;"># wget ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.29.6.tar.bz2</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>xenbro:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>xen<span style="color: #666666; font-style: italic;"># tar jxvf linux-2.6.29.6.tar.bz2 </span><br />
&nbsp;<span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #000000; font-weight: bold;">*</span>KABOOM<span style="color: #000000; font-weight: bold;">*</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>xenbro:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>xen<span style="color: #666666; font-style: italic;"># mkdir xen-patches</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>xenbro:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>xen<span style="color: #666666; font-style: italic;"># cd xen-patches</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>xenbro:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>xen<span style="color: #000000; font-weight: bold;">/</span>xen-patches<span style="color: #666666; font-style: italic;"># tar jxvf ../xen-patches-2.6.29-6.tar.bz2 </span><br />
root<span style="color: #000000; font-weight: bold;">@</span>xenbro:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>xen<span style="color: #000000; font-weight: bold;">/</span>xen-patches<span style="color: #666666; font-style: italic;"># cd ../linux-2.6.29.6</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>xenbro:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>xen<span style="color: #000000; font-weight: bold;">/</span>linux-2.6.29.6<span style="color: #666666; font-style: italic;"># for k in ../xen-patches/* ; do echo Patch $k: ; &nbsp;patch -p1 &lt; $k ; done</span><br />
&nbsp;<span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #000000; font-weight: bold;">*</span>WHOOSH<span style="color: #000000; font-weight: bold;">*</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span></div></div>
<p>If all went well you now have a patched 2.6.29.6 kernel source. Make sure it didn&#8217;t barf though, but if you used the correct kernel version this should apply cleanly.<br />
Retry on the config!</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>xenbro:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>xen<span style="color: #000000; font-weight: bold;">/</span>linux-2.6.29.6<span style="color: #666666; font-style: italic;"># make menuconfig</span><br />
&nbsp;<span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #000000; font-weight: bold;">*</span>yadieyada, don<span style="color: #ff0000;">'t forget to enable Xen dom0 support* ]<br />
root@xenbro:/usr/src/xen/linux-2.6.29.6# time make bzImage modules modules_install<br />
&nbsp;[ *crunch crunch* ]</span></div></div>
<p>Time for some coffee.<br />
When it&#8217;s done (took about 7 minutes on this machine with my huge list of options) we still need to put it in place and add it to grub&#8217;s menu.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>xenbro:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>xen<span style="color: #000000; font-weight: bold;">/</span>linux-2.6.29.6<span style="color: #666666; font-style: italic;"># cp vmlinux /boot/vmlinuz-xen-2.6.29.6 </span><br />
root<span style="color: #000000; font-weight: bold;">@</span>xenbro:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>xen<span style="color: #000000; font-weight: bold;">/</span>linux-2.6.29.6<span style="color: #666666; font-style: italic;"># vim /boot/grub/grub.cfg</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Add this somewhere logical</span><br />
menuentry <span style="color: #ff0000;">&quot;xen-3.4.1&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; insmod raid<br />
&nbsp; &nbsp; &nbsp; &nbsp; insmod mdraid<br />
&nbsp; &nbsp; &nbsp; &nbsp; insmod ext2<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">set</span> <span style="color: #007800;">root</span>=<span style="color: #7a0874; font-weight: bold;">&#40;</span>md0<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; search <span style="color: #660033;">--no-floppy</span> <span style="color: #660033;">--fs-uuid</span> <span style="color: #660033;">--set</span> 2f8afc00-ec48-4d1f-b4fa-5787e18f2387<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; multiboot <span style="color: #000000; font-weight: bold;">/</span>boot<span style="color: #000000; font-weight: bold;">/</span>xen-3.4.1.gz <span style="color: #007800;">dom0_mem</span>=512M<br />
&nbsp; &nbsp; &nbsp; &nbsp; module <span style="color: #000000; font-weight: bold;">/</span>boot<span style="color: #000000; font-weight: bold;">/</span>vmlinuz-xen-2.6.29.6 <span style="color: #007800;">root</span>=<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>md0 ro<br />
<br />
<span style="color: #7a0874; font-weight: bold;">&#125;</span></div></div>
<p>If you did everything allright, yay, it boots with Xen! <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
Of course over here it died shortly after booting the kernel because it couldn&#8217;t mount its root filesystem, but that&#8217;s nothing new with this stuff <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Time to debug the problem. After rebuilding my kernel about 4 times and fighting with grub, I started to seriously wonder what the hell its problem was.<br />
Raid (md) support, check.<br />
Ext4 support, check.<br />
Both in grub and the kernel they were present. Maybe xen in the way? Seems unlikely.<br />
The fact that the kernel gets booted proves to me that grub at least &#8220;gets&#8221; it.<br />
Finally I created an initrd to see if that would help. It didn&#8217;t, except for the fact that it gave me a nice little shell to dick around with.<br />
This showed me that md0 would indeed not mount, probably because it wasn&#8217;t started. After starting it manually using some busybox command (raidgetthefuckstarted /dev/md0 or something)<br />
I could mount it and exit the emergency shell, the system booted.<br />
After I recreated the initrd to include raid support (doh) it actually managed to boot without outsider help. Goody.<br />
The command for this was: (note that I gave my kernel the -BenV local version string)</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>xenbro:<span style="color: #000000; font-weight: bold;">/</span><span style="color: #666666; font-style: italic;"># mkinitrd -c -k 2.6.29.6-BenV -m ext4 -f ext4 -R -r /dev/md0</span></div></div>
<p>And the grub config entry now looks like:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">menuentry <span style="color: #ff0000;">&quot;GNU/Linux, Xen 3.4.1 / Linux 2.6.29.6&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; insmod raid<br />
&nbsp; &nbsp; &nbsp; &nbsp; insmod mdraid<br />
&nbsp; &nbsp; &nbsp; &nbsp; insmod ext2<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">set</span> <span style="color: #007800;">root</span>=<span style="color: #7a0874; font-weight: bold;">&#40;</span>md0<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; search <span style="color: #660033;">--no-floppy</span> <span style="color: #660033;">--fs-uuid</span> <span style="color: #660033;">--set</span> 2f8afc00-ec48-4d1f-b4fa-5787e18f2387<br />
&nbsp; &nbsp; &nbsp; &nbsp; multiboot <span style="color: #000000; font-weight: bold;">/</span>boot<span style="color: #000000; font-weight: bold;">/</span>xen-3.4.1.gz <span style="color: #007800;">dom0_mem</span>=512M<br />
&nbsp; &nbsp; &nbsp; &nbsp; module <span style="color: #000000; font-weight: bold;">/</span>boot<span style="color: #000000; font-weight: bold;">/</span>vmlinuz-xen-2.6.29.6 <span style="color: #007800;">root</span>=<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>md0 ro<br />
&nbsp; &nbsp; &nbsp; &nbsp; module <span style="color: #000000; font-weight: bold;">/</span>boot<span style="color: #000000; font-weight: bold;">/</span>initrd-xen-2.6.29.6.gz<br />
<span style="color: #7a0874; font-weight: bold;">&#125;</span></div></div>
<p>Well, good enough for today. Bedtime!</p>
<p><a href="http://notes.benv.junerules.com/wp-content/uploads/2009/08/xenbro.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/08/xenbro-1024x624.png" alt="xenbro" title="xenbro" width="1024" height="624" class="alignleft size-large wp-image-288" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/new-server-slackware64-and-xen-3-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Secret Maryo Chronicles</title>
		<link>http://notes.benv.junerules.com/all/daily/secret-maryo-chronicles/</link>
		<comments>http://notes.benv.junerules.com/all/daily/secret-maryo-chronicles/#comments</comments>
		<pubDate>Thu, 27 Aug 2009 22:13:35 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Boring]]></category>
		<category><![CDATA[Fun]]></category>
		<category><![CDATA[autoconf]]></category>
		<category><![CDATA[emulators]]></category>
		<category><![CDATA[gamepad]]></category>
		<category><![CDATA[mario]]></category>
		<category><![CDATA[slackware]]></category>
		<category><![CDATA[x86_64]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=261</guid>
		<description><![CDATA[So I was bored and went through the usual slashdot, kernel.org, freshmeat.net, etc.
Once reading through the news on happypenguin.org I noticed it must be mario season or something.
After checking the descriptions I decided to check out Super Mario^W^WSecret Maryo Chronicles.

Needless to say I went for the source ball. Through my famous slackbuild script of course!
That [...]]]></description>
			<content:encoded><![CDATA[<p>So I was bored and went through the usual slashdot, kernel.org, freshmeat.net, etc.<br />
Once reading through the news on happypenguin.org I noticed it must be mario season or something.<br />
After checking the descriptions I decided to check out <a href="http://secretmaryo.org/" title="Secret Maryo Chronicles">Super Mario^W^WSecret Maryo Chronicles</a>.<br />
<span id="more-261"></span></p>
<p>Needless to say I went for the source ball. Through my famous <span style="color:#00FFFF">slackbuild script</span> of course!<br />
That went fine, until configure barfed about some <a href="http://www.cegui.org.uk/wiki/index.php/Main_Page">CEGUI</a> thing.<br />
<span style="color:#FF00FF">What&#8217;s a CEGUI thing?</span><br />
Apparently it&#8217;s some kind of windowing/widget library. Yeah, another one.<br />
So I ram it through slackbuild, which went fine as usual after I did a <code class="codecolorer text vibrant"><span class="text">make distclean</span></code> in the source dir. Some how the first build fucked up, don&#8217;t ask me why.<br />
Anyhow, I installed the <span style="color:#FF00FF">CEGUI</span> package and ran back to the smc source dir.<br />
Slackbuild had no other issues this time so out rolled a package. After installation I tried to run it.</p>
<p>Here&#8217;s what it said after my screen went black for about a second and came back:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>janeman:~:0<span style="color: #000000; font-weight: bold;">&gt;</span>smc<br />
CEGUI Scheme Exception occurred : Imageset::xmlHandler::startElement - An unexpected error occurred <span style="color: #000000; font-weight: bold;">while</span> creating a Texture object from <span style="color: #c20cb9; font-weight: bold;">file</span> <span style="color: #ff0000;">'SMCLook512.png'</span></div></div>
<p>Yeah, that&#8217;s what I get for trusting yet another crap library with widgets. *<span style="color:#FF0033">sigh</span>*</p>
<p>However, I had just enough energy left to try one detour into bug/issue fixing land.<br />
Google came up with basically only 1 thing, so after trying my best to read some italian forum I trashed it back through google&#8217;s own translation service.<br />
Now that it was in dutch it was a bit more readable, it hinted about using the <span style="color:#00FF55">freeimage</span> library instead of the default TGA codec (which obviously failed).</p>
<p>Installing the <a href="http://freeimage.sourceforge.net/">freeimage library</a> was pretty trivial, although they don&#8217;t use autoconf so I had to go through their Makefiles manually.<br />
The first hint of trouble is usually when source packages come delivered in the famous <span style="color:#FF5500">.zip</span> format. Oh, sorry, I meant <b>.ZIP-EVERYTHING_IS_CAPS</b> format. Seriously, don&#8217;t get me started on how many times those kankerthings exploded in my /usr/src dir so far, completely splattering up everything there.<br />
Good thing I&#8217;m good with rm. Anyhow, this zip package was decent and created a dir (without version number though).<br />
After fiddling with the makefiles and building freeimage, I also build <span style="color:#FF5533">freeimage plus</span> and stashed it into a package with makepkg.<br />
Phew, sweat on my forehead. Hopefully slackbuild will be able to handle this some day&#8230;.. (dream on)</p>
<p>Back to <span style="color:#FF0000">CEGUI</span> &#8212; compiling it with the freeimage library went without problems, and after upgrading my previous CEGUI package it was finally time to retry SMC.<br />
By the way, did I note that all these packages compiled on x86_64? Good job on that one guys <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>This time the screen actually came up with some mario^H^Hyo like stuff! Just like the good old days with the <span style="color:#5500FF">SNES</span>! <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
It looked a bit like this:<br />
<a href="http://notes.benv.junerules.com/wp-content/uploads/2009/08/1.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/08/1-300x187.png" alt="1" title="1" width="300" height="187" class="aligncenter size-medium wp-image-262" /></a><br />
On the background the theme music played that reminded me quite a bit of the original snes game.</p>
<p>Messing around with it a bit I quickly got myself killed a few times and had some fun.<br />
<a href="http://notes.benv.junerules.com/wp-content/uploads/2009/08/2.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/08/2-300x187.png" alt="Super Maryo Chronicles (2)" title="Super Maryo Chronicles (2)" width="300" height="187" class="aligncenter size-medium wp-image-263" /></a></p>
<p>I soon realized that the SNES version had better controls, but then again&#8230; playing on a keyboard is kinda cramped for platform games.<br />
So I reconnected my Logitech Rumblepad 2 to see if it would work. Well, if works great <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
Not a snes pad (the thing is a lot like the original playstation controller), but it played a hell of a lot better.</p>
<p><a href="http://notes.benv.junerules.com/wp-content/uploads/2009/08/3.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/08/3-300x187.png" alt="Super Maryo Chronicles (3)" title="Super Maryo Chronicles (3)" width="300" height="187" class="aligncenter size-medium wp-image-264" /></a></p>
<p>Conclusion: if you&#8217;re feeling bored, give it a shot. Good for a bit of fun, and it has a level editor as well!<br />
(which can be seen in this impressive edit I made here <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><a href="http://notes.benv.junerules.com/wp-content/uploads/2009/08/4.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/08/4-300x187.png" alt="Super Maryo Chronicles (level edit)" title="Super Maryo Chronicles (level edit)" width="300" height="187" class="aligncenter size-medium wp-image-265" /></a></p>
<p>Keep up the good work, <a href="http://secretmaryo.org/index.php?page=contact&#038;sid=?sid=">guys from SMC</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/daily/secret-maryo-chronicles/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PDF printing and Cups (The Cups Drama &#8482; Part 2!)</title>
		<link>http://notes.benv.junerules.com/all/software/pdf-printing-and-cups-the-cups-drama-tm-part-2/</link>
		<comments>http://notes.benv.junerules.com/all/software/pdf-printing-and-cups-the-cups-drama-tm-part-2/#comments</comments>
		<pubDate>Tue, 25 Aug 2009 14:01:54 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[cups]]></category>
		<category><![CDATA[printing]]></category>
		<category><![CDATA[slackware]]></category>
		<category><![CDATA[xpdf]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=243</guid>
		<description><![CDATA[Here we are today, trying to do a very simple thing. Print a stupid little PDF document so our customers can pay their bills.
Easy huh? Especially after the previous cups drama?
So we fire up xpdf on the document, hit the print icon, lpr, GO!
*time passes*
Mhm, what is it now?
*check http://localhost:631*
Nope, no document there, seems like [...]]]></description>
			<content:encoded><![CDATA[<p>Here we are today, trying to do a very simple thing. Print a stupid little PDF document so our customers can pay their bills.<br />
Easy huh? Especially after the <a href="http://notes.benv.junerules.com/software/printing-and-cups/" title="Printing and Cups">previous cups drama</a>?</p>
<p>So we fire up xpdf on the document, hit the print icon, lpr, GO!<br />
*time passes*<br />
Mhm, what is it now?<br />
*check <span style="color:#F00F00">http://localhost:631</span>*<br />
Nope, no document there, seems like it was handled by the printer.<br />
*check cups <span style="color:#F000F0">error_log</span>*<br />
Heaps of garbage there. </p>
<p>Remember that we had this issue left in our previous cups story? Something about PDF printing causing issues?<span id="more-243"></span><br />
Well, since then cups got upgraded to version 1.3.11 and some other stuff too, like ghostscript.<br />
This time the error log showed something like this (only the relevant part here):</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">D <span style="color: #7a0874; font-weight: bold;">&#91;</span>25<span style="color: #000000; font-weight: bold;">/</span>Aug<span style="color: #000000; font-weight: bold;">/</span>2009:14:19:49 +0200<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>Job 652<span style="color: #7a0874; font-weight: bold;">&#93;</span> backendRunLoop<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #007800;">print_fd</span>=0, <span style="color: #007800;">device_fd</span>=5, <span style="color: #007800;">use_bc</span>=0, <span style="color: #007800;">side_cb</span>=0x804a23f<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
D <span style="color: #7a0874; font-weight: bold;">&#91;</span>25<span style="color: #000000; font-weight: bold;">/</span>Aug<span style="color: #000000; font-weight: bold;">/</span>2009:14:19:49 +0200<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>Job 652<span style="color: #7a0874; font-weight: bold;">&#93;</span> Wrote 1 pages...<br />
D <span style="color: #7a0874; font-weight: bold;">&#91;</span>25<span style="color: #000000; font-weight: bold;">/</span>Aug<span style="color: #000000; font-weight: bold;">/</span>2009:14:19:49 +0200<span style="color: #7a0874; font-weight: bold;">&#93;</span> PID 26288 <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>cups<span style="color: #000000; font-weight: bold;">/</span>filter<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">pstops</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> exited with no errors.<br />
D <span style="color: #7a0874; font-weight: bold;">&#91;</span>25<span style="color: #000000; font-weight: bold;">/</span>Aug<span style="color: #000000; font-weight: bold;">/</span>2009:14:19:50 +0200<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>Job 652<span style="color: #7a0874; font-weight: bold;">&#93;</span> Error: error occurred at print phase <span style="color: #000000; font-weight: bold;">!!</span><br />
E <span style="color: #7a0874; font-weight: bold;">&#91;</span>25<span style="color: #000000; font-weight: bold;">/</span>Aug<span style="color: #000000; font-weight: bold;">/</span>2009:14:19:50 +0200<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>Job 652<span style="color: #7a0874; font-weight: bold;">&#93;</span> No pages found<span style="color: #000000; font-weight: bold;">!</span><br />
D <span style="color: #7a0874; font-weight: bold;">&#91;</span>25<span style="color: #000000; font-weight: bold;">/</span>Aug<span style="color: #000000; font-weight: bold;">/</span>2009:14:19:50 +0200<span style="color: #7a0874; font-weight: bold;">&#93;</span> Discarding unused printer-state-changed event...<br />
D <span style="color: #7a0874; font-weight: bold;">&#91;</span>25<span style="color: #000000; font-weight: bold;">/</span>Aug<span style="color: #000000; font-weight: bold;">/</span>2009:14:19:50 +0200<span style="color: #7a0874; font-weight: bold;">&#93;</span> Discarding unused job-progress event...<br />
D <span style="color: #7a0874; font-weight: bold;">&#91;</span>25<span style="color: #000000; font-weight: bold;">/</span>Aug<span style="color: #000000; font-weight: bold;">/</span>2009:14:19:50 +0200<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>Job 652<span style="color: #7a0874; font-weight: bold;">&#93;</span> GPL Ghostscript 8.70: Unrecoverable error, <span style="color: #7a0874; font-weight: bold;">exit</span> code 1<br />
D <span style="color: #7a0874; font-weight: bold;">&#91;</span>25<span style="color: #000000; font-weight: bold;">/</span>Aug<span style="color: #000000; font-weight: bold;">/</span>2009:14:19:50 +0200<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>Job 652<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #c20cb9; font-weight: bold;">cat</span>: <span style="color: #c20cb9; font-weight: bold;">write</span> error: Broken pipe<br />
D <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">25</span><span style="color: #000000; font-weight: bold;">/</span>Aug<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2009</span>:<span style="color: #000000;">14</span>:<span style="color: #000000;">19</span>:<span style="color: #000000;">50</span> +0200<span style="color: #7a0874; font-weight: bold;">&#93;</span> PID <span style="color: #000000;">26289</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>cups<span style="color: #000000; font-weight: bold;">/</span>filter<span style="color: #000000; font-weight: bold;">/</span>brlpdwrapperdcp135c<span style="color: #7a0874; font-weight: bold;">&#41;</span> exited with no errors.<br />
D <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">25</span><span style="color: #000000; font-weight: bold;">/</span>Aug<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2009</span>:<span style="color: #000000;">14</span>:<span style="color: #000000;">19</span>:<span style="color: #000000;">50</span> +0200<span style="color: #7a0874; font-weight: bold;">&#93;</span> PID <span style="color: #000000;">26299</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>cups<span style="color: #000000; font-weight: bold;">/</span>backend<span style="color: #000000; font-weight: bold;">/</span>usb<span style="color: #7a0874; font-weight: bold;">&#41;</span> exited with no errors.<br />
D <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">25</span><span style="color: #000000; font-weight: bold;">/</span>Aug<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2009</span>:<span style="color: #000000;">14</span>:<span style="color: #000000;">19</span>:<span style="color: #000000;">50</span> +0200<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>Job <span style="color: #000000;">652</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> File <span style="color: #000000;">0</span> is complete.<br />
I <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">25</span><span style="color: #000000; font-weight: bold;">/</span>Aug<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2009</span>:<span style="color: #000000;">14</span>:<span style="color: #000000;">19</span>:<span style="color: #000000;">50</span> +0200<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>Job <span style="color: #000000;">652</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> Completed successfully.</div></div>
<p>Some weird definition of &#8217;successfully&#8217; you have there, cups.<br />
After a few hours of debugging through that error_log, fucking with filters in /usr/share/cups/filters (cursing at Brother for their half baked wrapper scripts), turning on and off debug and log options<br />
I was getting more and more annoyed with it. Considering on how to pick up the Brother DCP-135C and smashing it through the 2nd story window onto the pavement, but then not being<br />
sure if it really was the brother&#8217;s fault at all, I decided to make sure once and for all which one I had to throw through the window.</p>
<p>Time for a manual debug session with the filters again. If you are having trouble with stuff like this, I can commend it to you. The steps I took (after the usual turning on debug and log options etc):</p>
<ol>
<li>Grab your input file, in my case some PDF document which I ran through xpdf.</li>
<li>Instead of sending it to the printer, print using the &#8220;save to file&#8221; option so we have the source that cups has to deal with to work with.</li>
<li>Manually run this file through the filters as cups does. I curse on cups for not being more specific &#8212; EVEN WITH THE <code class="codecolorer bash vibrant"><span class="bash">LogLevel debug2</span></code> OPTION TURNED ON (it just becomes MORE unreadable, but without more information) &#8212; about how it runs these filters, but there are some shell scripts floating around that you can use. What I did was just use
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">strace</span> <span style="color: #660033;">-qfve</span> execve <span style="color: #660033;">-p</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">pidof</span> cupsd<span style="color: #000000; font-weight: bold;">`</span> <span style="color: #660033;">-s</span> <span style="color: #000000;">250</span></div></div>
<p>to figure out how my filters were called, but be ready to read tons of output on that one <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
Anyhow, to save you some trouble, the call syntax seems to be</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">filterprogram PRINTER JobNum User title copies documentoptions <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #c20cb9; font-weight: bold;">file</span><span style="color: #7a0874; font-weight: bold;">&#93;</span></div></div>
<p>or a real example from my test case:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>cups<span style="color: #000000; font-weight: bold;">/</span>filter<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">pstops</span> <span style="color: #ff0000;">&quot;DCP135C&quot;</span> <span style="color: #000000;">666</span> benv jemoeder <span style="color: #000000;">1</span> <span style="color: #ff0000;">&quot;document-name=4a93e8d852a17 number-up=1 job-uuid=urn:uuid:873e2907-cf50-35e2-5626-741377b394be&quot;</span> <span style="color: #ff0000;">&quot;/var/spool/cups/d00666-001&quot;</span></div></div>
</li>
<li>Find out which part fails. The pstops had some output that looked fine by me, as far as I can read postscript as it scrolls through my terminal.</li>
</ol>
<p>Funny thing is&#8230;. it seemed to me like pstops worked fine, as did the brother cups wrapper&#8230;.<br />
However, there was still this soab left:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">D <span style="color: #7a0874; font-weight: bold;">&#91;</span>25<span style="color: #000000; font-weight: bold;">/</span>Aug<span style="color: #000000; font-weight: bold;">/</span>2009:15:48:21 +0200<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>Job 667<span style="color: #7a0874; font-weight: bold;">&#93;</span> GPL Ghostscript 8.70: Unrecoverable error, <span style="color: #7a0874; font-weight: bold;">exit</span> code <span style="color: #000000;">1</span></div></div>
<p>Execution of /usr/bin/gs showed up in strace as well btw, don&#8217;t worry <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
So now the big question was: when did ghostscript become retarded?</p>
<p>I took my &#8220;print to file&#8221; postscript document, and tried opening it in ghostview.<br />
It just looked at me like a cow looks at an oncoming train. Or in its own words:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Error: <span style="color: #000000; font-weight: bold;">/</span>undefined <span style="color: #000000; font-weight: bold;">in</span> ilQ2-amMq3gmMqGPL Ghostscript 8.70: Unrecoverable error, <span style="color: #7a0874; font-weight: bold;">exit</span> code 1<br />
<br />
Operand stack:<br />
<br />
Execution stack:<br />
&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">%</span>interp_exit &nbsp; .runexec2 &nbsp; <span style="color: #660033;">--nostringval--</span> &nbsp; <span style="color: #660033;">--nostringval--</span> &nbsp; <span style="color: #660033;">--nostringval--</span> &nbsp; 2 &nbsp; <span style="color: #000000; font-weight: bold;">%</span>stopped_push &nbsp; <span style="color: #660033;">--nostringval--</span> &nbsp; <span style="color: #660033;">--nostringval--</span> &nbsp; <span style="color: #660033;">--nostringval--</span> &nbsp; <span style="color: #c20cb9; font-weight: bold;">false</span> &nbsp; 1 &nbsp; <span style="color: #000000; font-weight: bold;">%</span>stopped_push &nbsp; 1862 &nbsp; 1 &nbsp; 3 &nbsp; <span style="color: #000000; font-weight: bold;">%</span>oparray_pop &nbsp; 1861 &nbsp; 1 &nbsp; 3 &nbsp; <span style="color: #000000; font-weight: bold;">%</span>oparray_pop &nbsp; 1845 &nbsp; 1 &nbsp; 3 &nbsp; <span style="color: #000000; font-weight: bold;">%</span>oparray_pop &nbsp; 1739 &nbsp; 1 &nbsp; 3 &nbsp; <span style="color: #000000; font-weight: bold;">%</span>oparray_pop &nbsp; <span style="color: #660033;">--nostringval--</span> &nbsp; <span style="color: #000000; font-weight: bold;">%</span>errorexec_pop &nbsp; .runexec2 &nbsp; <span style="color: #660033;">--nostringval--</span> &nbsp; <span style="color: #660033;">--nostringval--</span> &nbsp; <span style="color: #660033;">--nostringval--</span> &nbsp; 2 &nbsp; <span style="color: #000000; font-weight: bold;">%</span>stopped_push &nbsp; <span style="color: #660033;">--nostringval--</span><br />
Dictionary stack:<br />
&nbsp; &nbsp;--dict:1150<span style="color: #000000; font-weight: bold;">/</span>1684<span style="color: #7a0874; font-weight: bold;">&#40;</span>ro<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>G<span style="color: #7a0874; font-weight: bold;">&#41;</span>-- &nbsp; --dict:0<span style="color: #000000; font-weight: bold;">/</span>20<span style="color: #7a0874; font-weight: bold;">&#40;</span>G<span style="color: #7a0874; font-weight: bold;">&#41;</span>-- &nbsp; --dict:71<span style="color: #000000; font-weight: bold;">/</span>200<span style="color: #7a0874; font-weight: bold;">&#40;</span>L<span style="color: #7a0874; font-weight: bold;">&#41;</span>-- &nbsp; --dict:65<span style="color: #000000; font-weight: bold;">/</span>75<span style="color: #7a0874; font-weight: bold;">&#40;</span>L<span style="color: #7a0874; font-weight: bold;">&#41;</span>-- &nbsp; --dict:18<span style="color: #000000; font-weight: bold;">/</span>25<span style="color: #7a0874; font-weight: bold;">&#40;</span>L<span style="color: #7a0874; font-weight: bold;">&#41;</span>--<br />
Current allocation mode is <span style="color: #7a0874; font-weight: bold;">local</span><br />
Last OS error: <span style="color: #000000;">11</span></div></div>
<p>Ah-HA!</p>
<p>&#8230;.</p>
<p>What?</p>
<p>Since I&#8217;m by no means an expert on postscript, I googled it. The search revealed that apparently this could be the result of an eps image conversion gone bad.<br />
Postscript doesn&#8217;t like to deal with binary data, so it&#8217;s not supposed to be there.<br />
<span style="color:#FFFF00">This can mean only one thing</span>!<br />
<span style="color:#FF0000">xpdf failed!!!!!!</span></p>
<p>Some testing revealed that xpdf on the old slackware32 chroot environment still does work, and printing the exact same PDF file there works fine, while printing that document from the 64 bit<br />
slackware envrionment fails with the above story. Fascinating. Seems like it isn&#8217;t a library issue though, unless it&#8217;s cleverly hidden in the X libraries. I hope they&#8217;ll fix this soon <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
Just for reference, this is the <span style="color:#FF00FF">xpdf-3.02pl3-x86_64-1</span> package that fails.</p>
<p>Well, now that we all know the details we can go to bed.<br />
And if you need to print that pdf document: simply use <span style="color:#00FF00">pdf2ps</span>, it works. (and stay away from habbokrat reader)</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/pdf-printing-and-cups-the-cups-drama-tm-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>dos2unix</title>
		<link>http://notes.benv.junerules.com/all/software/dos2unix/</link>
		<comments>http://notes.benv.junerules.com/all/software/dos2unix/#comments</comments>
		<pubDate>Fri, 21 Aug 2009 17:41:37 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Morons]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[dos]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[tricks]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=237</guid>
		<description><![CDATA[Another annoying thing: morons that save their files with dos line endings.
Also known as &#8220;I&#8217;ve got motherfucking ^M in my file, AAAIIEEEEYGGrrgrll&#8220;.
I usually find out about this when bash complains about stuff like this:
benv@janeman:~$ ./bla.pl 
-bash: ./bla.pl: /usr/bin/perl^M: bad interpreter: No such file or directory
(HAAAAAT!!!)
Solution:
benv@janeman:~$ vim kankerfile
:set fileformat=unix
:wq
(Don&#8217;t confuse fileformat with filetype, one is used [...]]]></description>
			<content:encoded><![CDATA[<p>Another annoying thing: morons that save their files with dos line endings.<br />
Also known as &#8220;<span style="color:#FF0000">I&#8217;ve got motherfucking ^M in my file, AAAIIEEEEYGGrrgrll</span>&#8220;.<br />
I usually find out about this when bash complains about stuff like this:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>janeman:~$ .<span style="color: #000000; font-weight: bold;">/</span>bla.pl <br />
-bash: .<span style="color: #000000; font-weight: bold;">/</span>bla.pl: <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">perl</span>^M: bad interpreter: No such <span style="color: #c20cb9; font-weight: bold;">file</span> or directory</div></div>
<p>(<span style="font-size: 200%; color:#FF0000">HAAAAAT!!!</span>)</p>
<p>Solution:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>janeman:~$ <span style="color: #c20cb9; font-weight: bold;">vim</span> kankerfile<br />
:<span style="color: #000000; font-weight: bold;">set</span> <span style="color: #007800;">fileformat</span>=unix<br />
:wq</div></div>
<p>(Don&#8217;t confuse fileformat with filetype, one is used for encoding, the other for things as syntax highlighting)</p>
<p>Solution 2:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>janeman:~$ dos2unix kankerfile</div></div>
<p>I never use this since I never have that piece of cancer called dos2unix, but some distros do.</p>
<p>Solution 3:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #660033;">-ie</span> <span style="color: #ff0000;">'s/\r//g'</span> bla.pl</div></div>
<p>That should fix it. On to the &#8220;let&#8217;s trash my home directory with my fancy new perl script that I just converted&#8221; <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/dos2unix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing rrdtool 1.3 on slackware</title>
		<link>http://notes.benv.junerules.com/all/software/installing-rrdtool-1-3-on-slackware/</link>
		<comments>http://notes.benv.junerules.com/all/software/installing-rrdtool-1-3-on-slackware/#comments</comments>
		<pubDate>Fri, 21 Aug 2009 16:04:46 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[rrdtool]]></category>
		<category><![CDATA[slackware]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=234</guid>
		<description><![CDATA[This keeps bugging me:
root@janeman# perl -i~ -p -e 's/(Requires.*?)\s*xrender.*/$1/' /usr/lib/pkgconfig/cairo.pc
Now it -will- run through configure. Thanks. (yeah yeah, it&#8217;s hidden in the docs somewhere).
]]></description>
			<content:encoded><![CDATA[<p>This keeps bugging me:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>janeman<span style="color: #666666; font-style: italic;"># perl -i~ -p -e 's/(Requires.*?)\s*xrender.*/$1/' /usr/lib/pkgconfig/cairo.pc</span></div></div>
<p>Now it -will- run through configure. Thanks. (yeah yeah, it&#8217;s hidden in the docs somewhere).</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/installing-rrdtool-1-3-on-slackware/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>configure/autoconf and paths</title>
		<link>http://notes.benv.junerules.com/all/software/configureautoconf-and-paths/</link>
		<comments>http://notes.benv.junerules.com/all/software/configureautoconf-and-paths/#comments</comments>
		<pubDate>Fri, 21 Aug 2009 15:51:24 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[autoconf]]></category>
		<category><![CDATA[configure]]></category>
		<category><![CDATA[siteconfig]]></category>
		<category><![CDATA[slackware]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=231</guid>
		<description><![CDATA[Of course you&#8217;re already thrilled by my slackbuild.pl script, but this one thing keeps popping up.
&#8220;How do I get configure to get my system paths right without giving it a line that&#8217;s 2389472389 arguments long?&#8221;
Simple, install a site config.
&#8220;A what?!&#8221;
It&#8217;s a tiny little shell script that takes the configure options and barfs out some prefixes [...]]]></description>
			<content:encoded><![CDATA[<p>Of course you&#8217;re already thrilled by my slackbuild.pl script, but this one thing keeps popping up.<br />
&#8220;<span style="color:#00FF00">How do I get configure to get my system paths right without giving it a line that&#8217;s 2389472389 arguments long?</span>&#8221;<br />
Simple, install a site config.<br />
&#8220;<span style="color:#00FF00">A what?!</span>&#8221;</p>
<p>It&#8217;s a tiny little shell script that takes the configure options and barfs out some prefixes and stuff based on the options presented to it.<br />
So when I tell it <code class="codecolorer text vibrant"><span class="text">prefix=/usr</span></code>, it will decide that <code class="codecolorer text vibrant"><span class="text">sysconfdir=/etc</span></code> instead of <code class="codecolorer text vibrant"><span class="text">sysconfdir=/usr/etc</span></code>.</p>
<p>You can get my my version here:<br />
<a href="http://notes.benv.junerules.com/wp-content/plugins/download-monitor/download.php?id=config.site" title="Downloaded 60 times">config.site</a> - Version 0.1 - SHA: {meta-shasum}</p>
<p>Now the important tidbit. In order for configure to automagically use this script, you wil need to set the environment variable <span style="color:#FF00FF">CONFIG_SITE</span>.<br />
Personally I do this through a profile file. Download the config.site script, put it in <span style="color:#FF4400">/etc</span> and put the profile file in <span style="color:#FF5511">/etc/profile.d</span>. Logout/login, done.<br />
Oh, here&#8217;s the profile file:<br />
<a href="http://notes.benv.junerules.com/wp-content/plugins/download-monitor/download.php?id=config_site.sh" title="Downloaded 57 times">config_site.sh</a> - Version 0.1 - SHA: 3a6145987d03811f274ace34f5d08738f266f131</p>
<p>Now if everything worked out allright, running configure should start with something like this:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>coolprogram-1.0$ .<span style="color: #000000; font-weight: bold;">/</span>configure<br />
configure: loading site script <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>config.site<br />
<span style="color: #007800;">prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<br />
<span style="color: #007800;">sysconfdir</span>=<span style="color: #000000; font-weight: bold;">/</span>etc<br />
<span style="color: #007800;">bindir</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<br />
<span style="color: #007800;">sbindir</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<br />
<span style="color: #007800;">includedir</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>include<br />
<span style="color: #007800;">libdir</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib64<br />
<span style="color: #007800;">libexecdir</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>libexec<br />
<span style="color: #007800;">datadir</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<br />
<span style="color: #007800;">mandir</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">man</span><br />
<span style="color: #007800;">infodir</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>info<br />
<span style="color: #007800;">localstatedir</span>=<span style="color: #000000; font-weight: bold;">/</span>var<br />
<span style="color: #007800;">sharedstatedir</span>=<span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>cache<br />
<span style="color: #007800;">lispdir</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>emacs<span style="color: #000000; font-weight: bold;">/</span>site-lisp</div></div>
<p>Wonderful isn&#8217;t it? <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/configureautoconf-and-paths/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The wonders of SSH forwarding</title>
		<link>http://notes.benv.junerules.com/all/daily/the-wonders-of-ssh-forwarding/</link>
		<comments>http://notes.benv.junerules.com/all/daily/the-wonders-of-ssh-forwarding/#comments</comments>
		<pubDate>Fri, 21 Aug 2009 15:20:24 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Boring]]></category>
		<category><![CDATA[firewall]]></category>
		<category><![CDATA[forward]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=227</guid>
		<description><![CDATA[This is trivial stuff, but nice to know.
Do they have a cute little firewall at your work that only allows outgoing traffic on a certain port? Does some site have retarded IP restrictions? Does the piratebay block you from home?
Have no fear, ssh is slow as a bear. (huh?)
Anyway, you could use an anonymous proxy [...]]]></description>
			<content:encoded><![CDATA[<p>This is trivial stuff, but nice to know.</p>
<p>Do they have a cute little firewall at your work that only allows outgoing traffic on a certain port? Does some site have retarded IP restrictions? Does the piratebay block you from home?<br />
Have no fear, ssh is slow as a bear. (huh?)</p>
<p>Anyway, you could use an anonymous proxy to get around all of this, but they are often slow and hard to find. Not only that, they often require you to use a specific port.<br />
So the simple solution for all this: use ssh. Of course this requires you to have ssh access on a machine outside of the network that you&#8217;re trying to get out of.<br />
But if you don&#8217;t even have that, you probably suck anyway. (get lost with your micro~s fail piece of cardboard).</p>
<p>Solution #1, for simple <span style="color:#FF0000">TCP</span> port forwards. For instance when you&#8217;re trying to access a remote snmp server that has the irc port (6667 by default) firewalled:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">idiot<span style="color: #000000; font-weight: bold;">@</span>yourmachine$ <span style="color: #c20cb9; font-weight: bold;">ssh</span> <span style="color: #660033;">-L</span> <span style="color: #000000;">1234</span>:127.0.0.1:<span style="color: #000000;">6667</span> ip.of.irc.machine<br />
<span style="color: #000000; font-weight: bold;">*</span>username and password stuff<span style="color: #000000; font-weight: bold;">*</span></div></div>
<p>After a successful login you can now connect an IRC program to localhost on port 1234 and it will act as if you were connecting to the remote machine directly. (bypassing the firewall).<br />
Woei. Too bad this fails for UDP though. You also need to keep the ssh connection open, but that&#8217;s pretty obvious.</p>
<p>Solution #2, for a real proxy solution. When you&#8217;re trying to access a remote web server it becomes more annoying to use a simple port forward, since your browser will not pass the correct<br />
information to the remote server. (It will say <code class="codecolorer text vibrant"><span class="text">Host: 127.0.0.1</span></code> for where it was supposed to be <code class="codecolorer text vibrant"><span class="text">Host: www.piratebay.org</span></code> for example).<br />
To make this work we simply turn ssh into a socks proxy like this:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">moron<span style="color: #000000; font-weight: bold;">@</span>yourmom$ <span style="color: #c20cb9; font-weight: bold;">ssh</span> <span style="color: #660033;">-D</span> <span style="color: #000000;">1234</span> ip.remote.shell.machine<br />
<span style="color: #000000; font-weight: bold;">*</span>username and password stuff<span style="color: #000000; font-weight: bold;">*</span></div></div>
<p>Now you can enter localhost and port 1234 in your browser&#8217;s proxy configuration in the SOCKS proxy section. Magic, you can now go to any site and it will be tunneled through the nicely <span style="color: #FF00FF">encrypted</span> ssh session. (although it might be a bit slower).</p>
<p>Well, so much for the obvious stuff today.</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/daily/the-wonders-of-ssh-forwarding/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Xen and booting domU using a vanilla kernel</title>
		<link>http://notes.benv.junerules.com/all/software/xen-and-booting-domu-using-a-vanilla-kernel/</link>
		<comments>http://notes.benv.junerules.com/all/software/xen-and-booting-domu-using-a-vanilla-kernel/#comments</comments>
		<pubDate>Tue, 18 Aug 2009 21:13:23 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Morons]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[exploit]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[slackware]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[xen]]></category>
		<category><![CDATA[xm]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=209</guid>
		<description><![CDATA[Our server in the datacenter is running slackware (duh) with a nice Xen installation on it.
Still running with Xen 3 using PAE since the last time I updated/upgraded it without any major problems for over 2 years now 
(ignoring the time that the power supply let go of the the magic smoke)
So after the latest [...]]]></description>
			<content:encoded><![CDATA[<p>Our server in the datacenter is running slackware (duh) with a nice Xen installation on it.<br />
Still running with <a href="http://www.xen.org/">Xen 3</a> using PAE since the last time I updated/upgraded it without any major problems for over 2 years now <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
(ignoring the time that the power supply let go of the the magic smoke)</p>
<p>So after the latest local root exploit thing, and testing it on some machines during har2009, I figured it might be nice to get the <a href="http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e694958388c50148389b0e9b9e9e8945cf0f1b98">patch</a> into my kernels. Running a webserver usually means you&#8217;re at risk after all, especially when it&#8217;s running wordpress <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>So I grabbed the latest kernel that had that patch and went for the usual <code class="codecolorer text vibrant"><span class="text">make menuconfig</span></code> ordeal. After half an hour of selecting &#8220;yes&#8221;, &#8220;maybe&#8221;, &#8220;I guess so&#8221;, and<br />
some XEN options (<span style="color: #FFFF00">CONFIG_PARAVIRT_GUEST=y, CONFIG_XEN=y, CONFIG_HVC_DRIVER=y, CONFIG_XEN_BLKDEV_FRONTEND=y, CONFIG_XEN_NETDEV_FRONTEND=y, CONFIG_XEN_KBDDEV_FRONTEND=y, CONFIG_HVC_XEN=y, CONFIG_XEN_BALLOON=y, CONFIG_XEN_SCRUB_PAGES=y, CONFIG_XENFS=y, CONFIG_XEN_COMPAT_XENFS=y</span>) I built the thing.<br />
As I usually build bzImages I also did so here. <code class="codecolorer text vibrant"><span class="text">make bzImage modules modules_install</span></code>.<br />
Half an hour later I had a shiny bzImage. Let&#8217;s try it on a test domain!</p>
<p>I copied the bzImage to /boot, changed the <code class="codecolorer text vibrant"><span class="text">kernel = &quot;/boot/vmlinuz-xen-old&quot;</span></code> option to the new place, and GO!<br />
This is what it told me:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>iejoor:<span style="color: #000000; font-weight: bold;">/</span>xen<span style="color: #000000; font-weight: bold;">/</span>hosts<span style="color: #000000; font-weight: bold;">/</span>purple<span style="color: #666666; font-style: italic;"># xm create -c purple.cfg-newkernel</span><br />
Using config <span style="color: #c20cb9; font-weight: bold;">file</span> <span style="color: #ff0000;">&quot;./purple.cfg-newkernel&quot;</span>.<br />
Started domain purple<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;root<span style="color: #000000; font-weight: bold;">@</span>iejoor:<span style="color: #000000; font-weight: bold;">/</span>xen<span style="color: #000000; font-weight: bold;">/</span>hosts<span style="color: #000000; font-weight: bold;">/</span>purple<span style="color: #666666; font-style: italic;">#</span></div></div>
<p>Huh, where&#8217;s my console?<br />
Checking <code class="codecolorer text vibrant"><span class="text">xm list</span></code> it seemed to be there&#8230; but paused&#8230; and with constantly increasing ids. Waaait a minute!<br />
Checking the log files (<span style="color: #00FF00">xend.log</span> in this case) revealed a secret:</p>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">[2009-08-18 16:40:01 16116] DEBUG (DevController:162) Waiting for devices irq.<br />
[2009-08-18 16:40:01 16116] DEBUG (DevController:162) Waiting for devices vkbd.<br />
[2009-08-18 16:40:01 16116] DEBUG (DevController:162) Waiting for devices vfb.<br />
[2009-08-18 16:40:01 16116] DEBUG (DevController:162) Waiting for devices console.<br />
[2009-08-18 16:40:01 16116] DEBUG (DevController:167) Waiting for 0.<br />
[2009-08-18 16:40:01 16116] DEBUG (DevController:162) Waiting for devices pci.<br />
[2009-08-18 16:40:01 16116] DEBUG (DevController:162) Waiting for devices ioports.<br />
[2009-08-18 16:40:01 16116] DEBUG (DevController:162) Waiting for devices tap.<br />
[2009-08-18 16:40:01 16116] DEBUG (DevController:162) Waiting for devices vtpm.<br />
[2009-08-18 16:40:01 16116] INFO (XendDomain:1165) Domain purple (35) unpaused.<br />
[2009-08-18 16:40:01 16116] WARNING (XendDomainInfo:1240) Domain has crashed: name=purple id=35.<br />
[2009-08-18 16:40:01 16116] DEBUG (XendDomainInfo:1879) XendDomainInfo.destroy: domid=35<br />
[2009-08-18 16:40:01 16116] DEBUG (XendDomainInfo:1896) XendDomainInfo.destroyDomain(35)</div></div>
<p>Note the &#8216;WARNING&#8217; line. Crashed?!<br />
Gee, that&#8217;s &#8230; interesting. Why? Took me 5 minutes to find the other log file, but <span style="color: #FF0000">xend-debug.log</span> had a magic line:<br />
<code class="codecolorer bash vibrant"><span class="bash">ERROR Invalid kernel: xc_dom_find_loader: no loader found</span></code><br />
&#8230; great. Another why.<br />
In case you&#8217;re wondering, the increasing status in &#8216;xm list&#8217; was caused by the <code class="codecolorer bash vibrant"><span class="bash">on_crash = <span style="color: #ff0000;">'reboot'</span></span></code> line in the xen host config.<br />
I quickly destroyed the doman and changed it to a oneshot try: <code class="codecolorer bash vibrant"><span class="bash">on_crash = <span style="color: #ff0000;">'destroy'</span></span></code></p>
<p>After some searching another hint presented itself. Aren&#8217;t they nice?<br />
This hint was: &#8220;Xen is a retarded piece of cancer and can&#8217;t decypher the bzImage format, try vmlinux instead&#8221;. Aha!<br />
Back to the kernel, <code class="codecolorer text vibrant"><span class="text">make vmlinux</span></code>, copy, and another try to boot it. Obviously this was way too simple. It still crashed.<br />
Checking my old kernel that works for both dom0 and domU with file I noticed that gz should at least work.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;"># file /boot/vmlinuz-2.6*</span><br />
<span style="color: #000000; font-weight: bold;">/</span>boot<span style="color: #000000; font-weight: bold;">/</span>vmlinuz-2.6.18.8-xen: <span style="color: #c20cb9; font-weight: bold;">gzip</span> compressed data, from Unix, <span style="color: #c20cb9; font-weight: bold;">last</span> modified: Tue Nov <span style="color: #000000;">25</span> <span style="color: #000000;">16</span>:<span style="color: #000000;">13</span>:<span style="color: #000000;">16</span> <span style="color: #000000;">2008</span>, max compression<br />
<span style="color: #000000; font-weight: bold;">/</span>boot<span style="color: #000000; font-weight: bold;">/</span>vmlinuz-new: ELF <span style="color: #000000;">32</span>-bit LSB executable, Intel <span style="color: #000000;">80386</span>, version <span style="color: #000000;">1</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>SYSV<span style="color: #7a0874; font-weight: bold;">&#41;</span>, statically linked, not stripped</div></div>
<p>Some more details about the crashing domains can be found using <code class="codecolorer text vibrant"><span class="text">xm dmesg</span></code><br />
It gave me something like:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">&#40;</span>XEN<span style="color: #7a0874; font-weight: bold;">&#41;</span> traps.c:413:d38 Unhandled general protection fault fault<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">trap</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #666666; font-style: italic;">#13] on VCPU 0 [ec=0000]</span><br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>XEN<span style="color: #7a0874; font-weight: bold;">&#41;</span> domain_crash_sync called from entry.S <span style="color: #7a0874; font-weight: bold;">&#40;</span>ff18928e<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>XEN<span style="color: #7a0874; font-weight: bold;">&#41;</span> Domain <span style="color: #000000;">38</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>vcpu<span style="color: #666666; font-style: italic;">#0) crashed on cpu#3:</span><br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>XEN<span style="color: #7a0874; font-weight: bold;">&#41;</span> ----<span style="color: #7a0874; font-weight: bold;">&#91;</span> Xen-3.2.3 x86_32p &nbsp;<span style="color: #007800;">debug</span>=n &nbsp;Not tainted <span style="color: #7a0874; font-weight: bold;">&#93;</span>----<br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>XEN<span style="color: #7a0874; font-weight: bold;">&#41;</span> CPU: &nbsp; &nbsp;3<br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>XEN<span style="color: #7a0874; font-weight: bold;">&#41;</span> EIP: &nbsp; &nbsp;e019:<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000; font-weight: bold;">&lt;</span>c03e9e60<span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>XEN<span style="color: #7a0874; font-weight: bold;">&#41;</span> EFLAGS: 00000282 &nbsp; CONTEXT: guest<br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>XEN<span style="color: #7a0874; font-weight: bold;">&#41;</span> eax: 8000c068 &nbsp; ebx: c064c040 &nbsp; ecx: 80000000 &nbsp; edx: 00000cf8<br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>XEN<span style="color: #7a0874; font-weight: bold;">&#41;</span> esi: c0651f3c &nbsp; edi: c0651f30 &nbsp; ebp: c06981b8 &nbsp; esp: c0651f14<br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>XEN<span style="color: #7a0874; font-weight: bold;">&#41;</span> cr0: 8005003b &nbsp; cr4: 000006f0 &nbsp; cr3: 00bd5c80 &nbsp; cr2: 00000000<br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>XEN<span style="color: #7a0874; font-weight: bold;">&#41;</span> ds: e021 &nbsp; es: e021 &nbsp; fs: e021 &nbsp; <span style="color: #c20cb9; font-weight: bold;">gs</span>: e021 &nbsp; ss: e021 &nbsp; cs: e019<br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>XEN<span style="color: #7a0874; font-weight: bold;">&#41;</span> Guest stack trace from <span style="color: #007800;">esp</span>=c0651f14:<br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>XEN<span style="color: #7a0874; font-weight: bold;">&#41;</span> &nbsp; &nbsp;00000000 c03e9e60 0001e019 00010082 c04bd0cd 00000068 00000000 00000000<br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>XEN<span style="color: #7a0874; font-weight: bold;">&#41;</span> &nbsp; &nbsp;00002003 00000000 00003030 00000002 00000007 c064c07c c065dfd8 00000000<br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>XEN<span style="color: #7a0874; font-weight: bold;">&#41;</span> &nbsp; &nbsp;c06423c0 c064c100 c0651fd8 c065a63f 00000005 00000000 00000000 00000000<br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>XEN<span style="color: #7a0874; font-weight: bold;">&#41;</span> &nbsp; &nbsp;c065d02b 006faee4 00000000 00000000 c056dad4 00100000 00000000 00100000<br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>XEN<span style="color: #7a0874; font-weight: bold;">&#41;</span> &nbsp; &nbsp;00100000 00000000 006faee4 c065d27c 006faee4 00000000 00000000 c0651fe8<br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>XEN<span style="color: #7a0874; font-weight: bold;">&#41;</span> &nbsp; &nbsp;00000000 00000000 00000000 c0651fe8 00000000 00000000 c065756f c056dd50<br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>XEN<span style="color: #7a0874; font-weight: bold;">&#41;</span> &nbsp; &nbsp;c04c5020 c0657073 c0651ff4 c065973e 00000000 <span style="color: #000000;">17898175</span> 00800001 03040800<br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>XEN<span style="color: #7a0874; font-weight: bold;">&#41;</span> &nbsp; &nbsp;00100f22 00000000 c08e0000 c04ba91b c04ba923 c0103371 c0103878 c0659a92<br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>XEN<span style="color: #7a0874; font-weight: bold;">&#41;</span> &nbsp; &nbsp;c01039c7 c0103afc c0103d1a c0104004 c0104163 c01041eb c010451d c010457c<br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>XEN<span style="color: #7a0874; font-weight: bold;">&#41;</span> &nbsp; &nbsp;c0659eb7 c0659ebf c04ba975 c04baa22 c0105536 c01055ae c0105781 c0105c5c<br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>XEN<span style="color: #7a0874; font-weight: bold;">&#41;</span> &nbsp; &nbsp;c0105c9e c0106253 c0106345 c0106831 c010683d c0107b07 c010825e c0108333<br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>XEN<span style="color: #7a0874; font-weight: bold;">&#41;</span> &nbsp; &nbsp;c065a45c c065a46a c0108e56 c065a982 c065a98a c0109bf0 c065af2c c065af93<br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>XEN<span style="color: #7a0874; font-weight: bold;">&#41;</span> &nbsp; &nbsp;c065afe9 c065b042 c065b09b c065b0f4 c065b14d c065b1a6 c065b1ff c065b258<br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>XEN<span style="color: #7a0874; font-weight: bold;">&#41;</span> &nbsp; &nbsp;c065b2b1 c065b32d c065b341 c065b397 c065b3f0 c065b449 c065c14f c065c157<br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>XEN<span style="color: #7a0874; font-weight: bold;">&#41;</span> &nbsp; &nbsp;c010aee5 c010aef3 c010af77 c010af85 c065d7be c065d7d1 c010bdc3 c010be22<br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>XEN<span style="color: #7a0874; font-weight: bold;">&#41;</span> &nbsp; &nbsp;c010c113 c010c14a c010c1c6 c010c2f3 c010c41a c010c443 c010c4dd c010d267<br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>XEN<span style="color: #7a0874; font-weight: bold;">&#41;</span> &nbsp; &nbsp;c010d4cb c010d77b c010d782 c010de76 c010defd c010df0c c010df3f c010df49<br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>XEN<span style="color: #7a0874; font-weight: bold;">&#41;</span> &nbsp; &nbsp;c010df84 c010df8c c010df94 c04bb1d7 c04bb466 c04bb4db c04bb5b9 c04bb60f<br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>XEN<span style="color: #7a0874; font-weight: bold;">&#41;</span> &nbsp; &nbsp;c04bb62f c04bbb8b c04bbd60 c065de79 c065de81 c04bc041 c04bc46b c04bc50d<br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>XEN<span style="color: #7a0874; font-weight: bold;">&#41;</span> &nbsp; &nbsp;c04bc899 c04bc902 c065e012 c065e01a c065e028 c065e030 c065e038 c065e040</div></div>
<p>As you can see, that&#8217;s really useful&#8230;.. <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>A useful page with some info can be found <a href="http://wiki.xensource.com/xenwiki/XenParavirtOps">here</a>. It confirms that a gz kernel should work (but bz probably doesn&#8217;t) since I&#8217;m still running Xen 3.2. However, I can&#8217;t find a good reason for why it won&#8217;t work.</p>
<p>Google to the rescue! Hard to find a useful keyword, since most xen kernel issues seem to be similar, but eventually I found this tidbit:<br />
<a href="http://patchwork.kernel.org/patch/36570/">tiny kernel patch</a>.<br />
Weird that this should be needed, one would hope that basic shit like this would work after 8 kernel versions, but obviously they&#8217;re all retards when it comes to this.<br />
Thanks Jeremy Fitzhardinge for the patch!<br />
Just for quick reference, this is the actual patch:</p>
<div class="codecolorer-container diff vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="diff codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c<br />
index 28e5f59..e2485b0 100644<br />
<span style="color: #888822;">--- a/arch/x86/kernel/cpu/amd.c</span><br />
<span style="color: #888822;">+++ b/arch/x86/kernel/cpu/amd.c</span><br />
<span style="color: #440088;">@@ -<span style="">356</span>,<span style="">7</span> +<span style="">356</span>,<span style="">7</span> @@ &nbsp;static void __cpuinit early_init_amd<span style="">&#40;</span>struct cpuinfo_x86 *c<span style="">&#41;</span></span><br />
&nbsp;#endif<br />
&nbsp;#if defined<span style="">&#40;</span>CONFIG_X86_LOCAL_APIC<span style="">&#41;</span> &amp;&amp; defined<span style="">&#40;</span>CONFIG_PCI<span style="">&#41;</span><br />
&nbsp; &nbsp; /* check CPU config space for extended APIC ID */<br />
<span style="color: #991111;">- &nbsp; if <span style="">&#40;</span>c-&gt;x86 &gt;= 0xf<span style="">&#41;</span> <span style="">&#123;</span></span><br />
<span style="color: #00b000;">+ &nbsp; if <span style="">&#40;</span>cpu_has_apic &amp;&amp; c-&gt;x86 &gt;= 0xf<span style="">&#41;</span> <span style="">&#123;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; unsigned int val;<br />
&nbsp; &nbsp; &nbsp; &nbsp; val = read_pci_config<span style="">&#40;</span>0, 24, 0, 0x68<span style="">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; if <span style="">&#40;</span><span style="">&#40;</span>val &amp; <span style="">&#40;</span><span style="">&#40;</span>1 &lt;&lt; 17<span style="">&#41;</span> | <span style="">&#40;</span>1 &lt;&lt; 18<span style="">&#41;</span><span style="">&#41;</span><span style="">&#41;</span> == <span style="">&#40;</span><span style="">&#40;</span>1 &lt;&lt; 17<span style="">&#41;</span> | <span style="">&#40;</span><span style="">1</span> &lt;&lt; <span style="">18</span><span style="">&#41;</span><span style="">&#41;</span><span style="">&#41;</span></div></div>
<p>So much for &#8216;vanilla&#8217;.</p>
<p>However, it boots now:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>iejoor:<span style="color: #000000; font-weight: bold;">/</span>xen<span style="color: #000000; font-weight: bold;">/</span>hosts<span style="color: #000000; font-weight: bold;">/</span>purple<span style="color: #666666; font-style: italic;"># xm create -c purple.cfg-newkernel</span><br />
Using config <span style="color: #c20cb9; font-weight: bold;">file</span> <span style="color: #ff0000;">&quot;./purple.cfg-newkernel&quot;</span>.<br />
Started domain purple<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Reserving virtual address space above 0xf5800000<br />
Linux version 2.6.30.5-jemoeder <span style="color: #7a0874; font-weight: bold;">&#40;</span>root<span style="color: #000000; font-weight: bold;">@</span>iejoor<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">gcc</span> version 4.1.2<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #666666; font-style: italic;">#9 SMP Tue Aug 18 22:59:38 CEST 2009</span><br />
KERNEL supported cpus:<br />
&nbsp; Intel GenuineIntel<br />
&nbsp; AMD AuthenticAMD<br />
&nbsp; NSC Geode by NSC<br />
&nbsp; Cyrix CyrixInstead<br />
&nbsp; Centaur CentaurHauls &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; Transmeta GenuineTMx86 &nbsp; &nbsp; &nbsp; <br />
&nbsp; Transmeta TransmetaCPU &nbsp; &nbsp; &nbsp; <br />
&nbsp; UMC UMC UMC UMC &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />
ACPI <span style="color: #000000; font-weight: bold;">in</span> unprivileged domain disabled</div></div>
<p>and a lot more yadieyada until it hits a new wall: root device.<br />
Well, that sounds solvable.</p>
<p>In fact, here&#8217;s a solution. What you say?<br />
&#8220;<span style="color: #FF00FF">AAAAH, I GET NOTHING, IT WON&#8217;T EVEN CRASH ANYMORE, JUST NO OUTPUT???!</span>&#8221;<br />
Ah yeah, I forgot to mention: they changed the console device as well as the block device. So here&#8217;s a solution for both issues:<br />
Edit your xen host config file and make it so:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root = <span style="color: #ff0000;">&quot;/dev/xvda1 ro&quot;</span><br />
extra = <span style="color: #ff0000;">&quot;xencons=hvc0&quot;</span></div></div>
<p>(xvda1 is what used to be sda1, you can figure out the rest).</p>
<p>And after all this: HAHA! Success is mine!<br />
Except of course for the undeniable fact that my domU has a fucked up fstab and all, but no issues there <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
Now go mess up your own system! Oh, I see&#8230; you already did. Good luck fixing it <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<h2>Update</h2>
<p>I just tested a testing kernel &#8212; 2.6.31-rc8, and it seems like they fixed it. Probably has been fixed in the testing branch for quite a while now, but still not in stable 2.6.30 <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
Let&#8217;s hope they release 2.6.31 soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/xen-and-booting-domu-using-a-vanilla-kernel/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Printing and cups</title>
		<link>http://notes.benv.junerules.com/all/software/printing-and-cups/</link>
		<comments>http://notes.benv.junerules.com/all/software/printing-and-cups/#comments</comments>
		<pubDate>Tue, 18 Aug 2009 13:29:06 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[cups]]></category>
		<category><![CDATA[printing]]></category>
		<category><![CDATA[slackware]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=199</guid>
		<description><![CDATA[We tried to do something that seems fairly simple. &#8220;Print out these tickets for HAR2009&#8220;, where we went last weekend and had a great time 
The tickets were delivered to me by mail in PDF format. Sounds easy huh?
Note that this story was written the day before we went there, just not finished, so timing [...]]]></description>
			<content:encoded><![CDATA[<p>We tried to do something that seems fairly simple. &#8220;Print out these tickets for <a href="https://wiki.har2009.org/page/Main_Page" title="Hacking At Random 2009">HAR2009</a>&#8220;, where we went last weekend and had a great time <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
The tickets were delivered to me by mail in PDF format. Sounds easy huh?<br />
Note that this story was written the day before we went there, just not finished, so timing might be a bit awkward. Here are the details.<span id="more-199"></span></p>
<p>Attempt 1:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ <span style="color: #c20cb9; font-weight: bold;">lpr</span> har_ticket_00.pdf<br />
$</div></div>
<p>Easy. It even works, the printer starts rumbling and out it comes. Oh&#8230;. seems like the barcode is a bit screwed&#8230;. mhm, wonder how it managed to do that. (the rest looked fine).<br />
Browsing through the cups error_log gave some gibberish, this line caught my attention:</p>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">W [11/Aug/2009:16:58:55 +0200] [Job 624] This document does not conform to the Adobe Document Structuring Conventions and may not print correctly!</div></div>
<p>Mhm, interesting. Google returned a bunch of filter thingies, and I was like &#8220;maybe it&#8217;ll work better if I try converting it to ps myself first&#8221;.<br />
So I ran pdf2ps (instead of pdftops as cups does) and viewed the resulting ps file. Looks a lot better. Print it!<br />
lpr on the file, and out it comes. Huh, no landscape? I try <code class="codecolorer text vibrant"><span class="text">lpr -o landscape stupidfile.ps</span></code> which also does portrait. RAAAH, STUPID KANKER CUPS.<br />
After an hour of google and cursing I said &#8220;Fine, you do it&#8221; to lotjuh, who asked me earlier if she had to do it with her <a href="http://www.adobe.com/nl/products/reader/">Habbokrat Reader</a>&#8230;. what a piece of garbage that is&#8230;.</p>
<p>Anyway, lotjuh soon ran into a new issue. First of all, her new Windows 7 didn&#8217;t have a printer driver, and trying to install the Vista on failed. Our printer is a cheap Brother DCP135C, which isn&#8217;t THAT old I thought. Oh well, that&#8217;s your windows problems for you <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
So she booted to linux. Surprise! Print didn&#8217;t work. That is, it said &#8220;OK&#8221; but out came nothing. Jobs just collected at her local cups.</p>
<p>*grumble*WHYYYYY???</p>
<p>Debugging this is a tough, since none of the logs give any useful information whatsoever, even in debug mode.</p>
<p>To understand this problem you might want some more network background info:<br />
We have our internet through xs4all, who gave us a Fritzbox for that. Since I couldn&#8217;t get it to work like our previous internet setup with the external IP address on our local server,<br />
we eventually decided that the thing could route for us, but we have our own DHCP server running on our local server.<br />
So in our LAN the default gateway is the fritzbox, but our local server has most ports forwarded to it. In order to also run a dns server and dns cache it has multiple IP addresses in our local lan.<br />
In fact, it has 3 IPs in the 192.168.1.x range on a single ethernet device.</p>
<p>Back to cups:<br />
In cupsd.conf I have <code class="codecolorer text vibrant"><span class="text">Listen 192.168.1.1:631</span></code>. That should work, right?<br />
However, BrowseAddress only accepts a .255 at the end, or an @IF statement. So I had @IF(eth_local) there.<br />
Result: clients get confused, try to send data to all 3 IP addresses on the network. And since I can&#8217;t put the primary IP address in the BrowseAddress&#8230;. it fails.<br />
My guess is that cups detects all 3 IP addresses on that interface and happily announces those, while only 1 of them should be used. Especially because of the listen statement.<br />
I fixed this by using the second address, which I conviently have on a &#8216;different&#8217; ethernet device eth_local:0. This seems to work a lot better, the clients now have a single printer in their cups<br />
configuration and it even provides its location!</p>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Device URI: ipp://192.168.1.2:631/printers/DCP135C</div></div>
<p>instead of the old</p>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Device URI: file://dev/null</div></div>
<p>However, my first problem was still present. The whining about invalid PDF files. Printing from KWord also gave this error. The local cups would happily forward my job to our server, which then barfed on the thing:</p>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">D [11/Aug/2009:19:47:17 +0200] [Job 637] Printer using device file &quot;/dev/usblp0&quot;...<br />
D [11/Aug/2009:19:47:17 +0200] Discarding unused printer-state-changed event...<br />
D [11/Aug/2009:19:47:17 +0200] [Job 637] backendRunLoop(print_fd=0, device_fd=5, use_bc=0, side_cb=0x804a23f)<br />
D [11/Aug/2009:19:47:17 +0200] [Job 637] Page = 595x842; 9,9 to 586,833<br />
D [11/Aug/2009:19:47:17 +0200] [Job 637] slow_collate=0, slow_duplex=0, slow_order=1<br />
W [11/Aug/2009:19:47:17 +0200] [Job 637] This document does not conform to the Adobe Document Structuring Conventions and may not print correctly!<br />
D [11/Aug/2009:19:47:17 +0200] Discarding unused printer-state-changed event...<br />
D [11/Aug/2009:19:47:17 +0200] Discarding unused job-progress event...<br />
D [11/Aug/2009:19:47:17 +0200] PID 12180 (/usr/lib/cups/filter/pdftops) exited with no errors.<br />
D [11/Aug/2009:19:47:17 +0200] PID 12181 (/usr/lib/cups/filter/pstops) exited with no errors.<br />
D [11/Aug/2009:19:47:18 +0200] [Job 637] Error: error occurred at print phase !!<br />
E [11/Aug/2009:19:47:18 +0200] [Job 637] No pages found!<br />
D [11/Aug/2009:19:47:18 +0200] Discarding unused printer-state-changed event...<br />
D [11/Aug/2009:19:47:18 +0200] Discarding unused job-progress event...<br />
D [11/Aug/2009:19:47:18 +0200] [Job 637] GPL Ghostscript 8.64: Unrecoverable error, exit code 1</div></div>
<p>&#8230; well, that&#8217;s just lovely.<br />
(insert your curse of the day here).</p>
<p>Oh btw, if anyone ever wonders about the status of their printer and cups and everything:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ lpstat <span style="color: #660033;">-t</span><br />
scheduler is running<br />
system default destination: DCP135C<br />
members of class default:<br />
&nbsp; &nbsp; unknown<br />
members of class printers:<br />
&nbsp; &nbsp; unknown<br />
device <span style="color: #000000; font-weight: bold;">for</span> DCP135C: ipp:<span style="color: #000000; font-weight: bold;">//</span>192.168.1.2:631<span style="color: #000000; font-weight: bold;">/</span>printers<span style="color: #000000; font-weight: bold;">/</span>DCP135C<br />
device <span style="color: #000000; font-weight: bold;">for</span> default: ipp:<span style="color: #000000; font-weight: bold;">//</span>192.168.1.2:631<span style="color: #000000; font-weight: bold;">/</span>classes<span style="color: #000000; font-weight: bold;">/</span>default<br />
device <span style="color: #000000; font-weight: bold;">for</span> printers: ipp:<span style="color: #000000; font-weight: bold;">//</span>192.168.1.2:<span style="color: #000000;">631</span><span style="color: #000000; font-weight: bold;">/</span>classes<span style="color: #000000; font-weight: bold;">/</span>printers<br />
DCP135C accepting requests since Tue <span style="color: #000000;">11</span> Aug <span style="color: #000000;">2009</span> 07:<span style="color: #000000;">44</span>:<span style="color: #000000;">45</span> PM CEST<br />
default accepting requests since Tue <span style="color: #000000;">11</span> Aug <span style="color: #000000;">2009</span> 07:<span style="color: #000000;">44</span>:<span style="color: #000000;">46</span> PM CEST<br />
printers accepting requests since Tue <span style="color: #000000;">11</span> Aug <span style="color: #000000;">2009</span> 07:<span style="color: #000000;">44</span>:<span style="color: #000000;">47</span> PM CEST<br />
printer DCP135C is idle. &nbsp;enabled since Tue <span style="color: #000000;">11</span> Aug <span style="color: #000000;">2009</span> 07:<span style="color: #000000;">44</span>:<span style="color: #000000;">45</span> PM CEST<br />
printer default is idle. &nbsp;enabled since Tue <span style="color: #000000;">11</span> Aug <span style="color: #000000;">2009</span> 07:<span style="color: #000000;">44</span>:<span style="color: #000000;">46</span> PM CEST<br />
printer printers is idle. &nbsp;enabled since Tue <span style="color: #000000;">11</span> Aug <span style="color: #000000;">2009</span> 07:<span style="color: #000000;">44</span>:<span style="color: #000000;">47</span> PM CEST</div></div>
<p>So far I haven&#8217;t found a solution for this problem yet, except for a print to file, scp, manually convert, lpr style workaround, but that&#8217;s tedious.<br />
If anyone knows, I&#8217;m interested in the cause and fix for it.</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/printing-and-cups/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Another wordpress security update?</title>
		<link>http://notes.benv.junerules.com/all/software/another-wordpress-security-update/</link>
		<comments>http://notes.benv.junerules.com/all/software/another-wordpress-security-update/#comments</comments>
		<pubDate>Wed, 12 Aug 2009 06:45:48 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=202</guid>
		<description><![CDATA[Meh.
Yet another security issue&#8230;.
&#8220;Prutsers&#8221;. Oh well, at least they fixed it.
As for the upgrade, once again I had to manually increase their timeout to more than 60 seconds.
Just for reference:
Edit wp-admin/includes/file.php with your favorite editor and change line 448 so it has a more reasonable timeout, I put it to 300:
$response = wp_remote_get&#40;$url, array&#40;'timeout' =&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>Meh.<br />
<a href="http://wordpress.org/development/2009/08/2-8-4-security-release/">Yet another security issue&#8230;.</a><br />
&#8220;Prutsers&#8221;. Oh well, at least they fixed it.</p>
<p>As for the upgrade, <a href="http://notes.benv.junerules.com/software/update-day/">once again</a> I had to manually increase their timeout to more than 60 seconds.<br />
Just for reference:<br />
Edit <span style="color: #FF0000">wp-admin/includes/file.php</span> with your favorite editor and change line 448 so it has a more reasonable timeout, I put it to 300:</p>
<div class="codecolorer-container php vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000088;">$response</span> <span style="color: #339933;">=</span> wp_remote_get<span style="color: #009900;">&#40;</span><span style="color: #000088;">$url</span><span style="color: #339933;">,</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'timeout'</span> <span style="color: #339933;">=&gt;</span> 300<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/another-wordpress-security-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Record Companies? Ahahahaha, morons.</title>
		<link>http://notes.benv.junerules.com/all/morons/record-companies-ahahahaha-morons/</link>
		<comments>http://notes.benv.junerules.com/all/morons/record-companies-ahahahaha-morons/#comments</comments>
		<pubDate>Tue, 11 Aug 2009 12:18:18 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Boring]]></category>
		<category><![CDATA[Morons]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=196</guid>
		<description><![CDATA[These guys are so stupid, they never stop to amuse me.
Look what they&#8217;re coming up with now&#8230;. A new digital format.
What is it with these guys and being completely out of whack? Why on earth would people want yet another format? (probably crippled too).
MP3 files work fine for most, put them in a nice little [...]]]></description>
			<content:encoded><![CDATA[<p>These guys are so stupid, they never stop to amuse me.<br />
Look what they&#8217;re coming up with now&#8230;. <a href="http://www.guardian.co.uk/music/2009/aug/10/major-labels-new-digital-format">A new digital format</a>.<br />
What is it with these guys and being completely out of whack? Why on earth would people want yet another format? (probably crippled too).<br />
MP3 files work fine for most, put them in a nice little directory structure, add a picture file and a lyrics file, and you have what they propose. Only better since it doesn&#8217;t need a special decoder/player.</p>
<p>Record companies: please die. Now.</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/morons/record-companies-ahahahaha-morons/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>(n)Curses magic part 2: magic!</title>
		<link>http://notes.benv.junerules.com/all/software/ncurses-magic-part-2-magic/</link>
		<comments>http://notes.benv.junerules.com/all/software/ncurses-magic-part-2-magic/#comments</comments>
		<pubDate>Sat, 08 Aug 2009 16:15:00 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Boring]]></category>
		<category><![CDATA[Fun]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[curses]]></category>
		<category><![CDATA[ncurses]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=187</guid>
		<description><![CDATA[So while messing around with some perl/curses stuff I got fancy with colors and soon found out about the limited support of colors in terminals and therefore also Curses.
Anyway, I made this little &#8220;fractal plasma&#8221; thingy with it, see if you can get it running 
It&#8217;s not really a fractal plasma, so don&#8217;t get technical [...]]]></description>
			<content:encoded><![CDATA[<p>So while messing around with some perl/curses stuff I got fancy with colors and soon found out about the limited support of colors in terminals and therefore also Curses.<br />
Anyway, I made this little &#8220;fractal plasma&#8221; thingy with it, see if you can get it running <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
It&#8217;s not really a fractal plasma, so don&#8217;t get technical on that, but it describes it best I think.</p>
<p>To get it running, open up your favorite terminal that supports 256 colors and allows palette changing &#8211; I found both xterm and urxvt to work.<br />
Make sure your TERM variable is set to something that allows this, for instance in urxvt:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ <span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">TERM</span>=rxvt-256color<br />
$ .<span style="color: #000000; font-weight: bold;">/</span>fractplasm.pl</div></div>
<p>or this worked for me with xterm:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ <span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">TERM</span>=xterm-256color<br />
$ .<span style="color: #000000; font-weight: bold;">/</span>fractplasm.pl</div></div>
<p>Something like this is the result:<br />
<a href="http://notes.benv.junerules.com/wp-content/uploads/2009/08/fractplasm.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/08/fractplasm-300x150.png" alt="fractplasm" title="fractplasm" width="300" height="150" class="aligncenter size-medium wp-image-188" /></a><br />
<a href="http://notes.benv.junerules.com/wp-content/uploads/2009/08/fractplasm2.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/08/fractplasm2-300x209.png" alt="fractplasm2" title="fractplasm2" width="300" height="209" class="aligncenter size-medium wp-image-190" /></a></p>
<a href="http://notes.benv.junerules.com/wp-content/plugins/download-monitor/download.php?id=fractplasm.pl" title="Downloaded 82 times">fractplasm.pl</a> - Version 0.1 - SHA: 83086edd86b25eed5fddcbbf6beaae53924e06f6
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/ncurses-magic-part-2-magic/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Slackware timezone fuckup</title>
		<link>http://notes.benv.junerules.com/all/software/slackware-timezone-fuckup/</link>
		<comments>http://notes.benv.junerules.com/all/software/slackware-timezone-fuckup/#comments</comments>
		<pubDate>Fri, 07 Aug 2009 15:20:27 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[slackware]]></category>
		<category><![CDATA[timezone]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=180</guid>
		<description><![CDATA[Messing around on one of my machines I checked a timestamp on a file&#8230;. and noticed &#8220;Huh, didn&#8217;t I just touch it?&#8221;.
ls told me the file was about 12 hours old. Interesting, since it was just created.
# date
Fri Aug &#160;7 10:08:09 CDT 2009
What the&#8230;. CDT ? When did we move?  
# ls -la /etc/*time*
lrwxrwxrwx [...]]]></description>
			<content:encoded><![CDATA[<p>Messing around on one of my machines I checked a timestamp on a file&#8230;. and noticed &#8220;Huh, didn&#8217;t I just touch it?&#8221;.<br />
ls told me the file was about 12 hours old. Interesting, since it was just created.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;"># date</span><br />
Fri Aug &nbsp;<span style="color: #000000;">7</span> <span style="color: #000000;">10</span>:08:09 CDT <span style="color: #000000;">2009</span></div></div>
<p>What the&#8230;. CDT ? When did we move? <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;"># ls -la /etc/*time*</span><br />
lrwxrwxrwx <span style="color: #000000;">1</span> root root <span style="color: #000000;">36</span> <span style="color: #000000;">2008</span>-03-<span style="color: #000000;">14</span> 04:<span style="color: #000000;">42</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>localtime -<span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>zoneinfo<span style="color: #000000; font-weight: bold;">/</span>Europe<span style="color: #000000; font-weight: bold;">/</span>Amsterdam</div></div>
<p>Well, not recently&#8230; that&#8217;s for sure.<span id="more-180"></span></p>
<p>Note that this box is running an ancient slackware version &#8211; 11.0. I keep it up2date regarding security issues using slackpkg and half the stuff running on it is built by myself anyway.<br />
And so I realized that <span style="color: #FF0000">glibc-zoneinfo</span> was recently upgraded to version 2.3.6. Ah yeah&#8230;. and so we suddenly moved.<br />
Checking another box that had the same update a few days ago I found it had the same problem. Joy.</p>
<p>I see 2 solutions, except for &#8220;wait for the slackware fix&#8221;.</p>
<ul>
<li>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;"># rm -f /etc/localtime</span><br />
<span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>zoneinfo<span style="color: #000000; font-weight: bold;">/</span>CET <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>localtime</div></div>
</li>
<li>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;"># rm -f /etc/localtime</span><br />
<span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>zoneinfo<span style="color: #000000; font-weight: bold;">/</span>Europe<span style="color: #000000; font-weight: bold;">/</span>Paris <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>localtime</div></div>
</li>
</ul>
<p>(of course there are plenty more solutions, like recompile glibc, but I&#8217;m not in the mood for that).</p>
<p>For testing timezones, you can use this:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;"># TZ=Europe/Dublin date</span><br />
Fri Aug &nbsp;<span style="color: #000000;">7</span> <span style="color: #000000;">16</span>:<span style="color: #000000;">18</span>:00 IST <span style="color: #000000;">2009</span></div></div>
<p>Or for figuring out what zone a timezone file is:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;"># strings /etc/localtime | grep ST</span><br />
CST6CDT,M3.2.0,M11.1.0</div></div>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/slackware-timezone-fuckup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>(n)Curses magic: are you a magician?</title>
		<link>http://notes.benv.junerules.com/all/software/ncurses-magic-are-you-a-magician/</link>
		<comments>http://notes.benv.junerules.com/all/software/ncurses-magic-are-you-a-magician/#comments</comments>
		<pubDate>Fri, 07 Aug 2009 14:39:13 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Morons]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[curses]]></category>
		<category><![CDATA[ncurses]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[Slackbuild.pl]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=158</guid>
		<description><![CDATA[Hej readers,
I decided to work on making slackbuild.pl a bit more acceptable in terms of usability and looks. The reason for this is that the dialog program doesn&#8217;t exactly do what I want.
That is, it works&#8230;. but that&#8217;s pretty much all I can say about it. It doesn&#8217;t allow me to make a comined checkbox/menu [...]]]></description>
			<content:encoded><![CDATA[<p>Hej readers,</p>
<p>I decided to work on making slackbuild.pl a bit more acceptable in terms of usability and looks. The reason for this is that the dialog program doesn&#8217;t exactly do what I want.<br />
That is, it works&#8230;. but that&#8217;s pretty much all I can say about it. It doesn&#8217;t allow me to make a comined checkbox/menu thing that I want for my configure options part. Next to that it&#8217;s tedious to fork and parse its output all the time, and let&#8217;s not even get started about looks and input issues.<br />
So I figured: hmm, dialog is made in ncurses, perl has a Curses lib&#8230;. let&#8217;s play!<span id="more-158"></span></p>
<p>First off I read through most of <a href="http://tldp.org/HOWTO/NCURSES-Programming-HOWTO/" title="NCURSES programming howto">NCURSES Programming HOWTO</a>. Somehow it felt familiar, probably because I already went through it when messing with iotop. Next, I realized that google is pretty much useless when you try to search for &#8216;curses&#8217; and perl, probably because it&#8217;s the misspelled version of &#8216;cursus&#8217; which means &#8216;course&#8217; in dutch. However, ncurses is something you can search for and find -some- (but few) bits and pieces of information.</p>
<p>Time for a hello world.</p>
<div class="codecolorer-container perl vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="perl codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#!/usr/bin/perl</span><br />
<span style="color: #000000; font-weight: bold;">use</span> Curses<span style="color: #339933;">;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># init curses</span><br />
initscr<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
noecho<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
start_color<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
init_pair<span style="color: #009900;">&#40;</span>1<span style="color: #339933;">,</span> COLOR_CYAN<span style="color: #339933;">,</span> COLOR_BLACK<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Print some stuff and wait for user input</span><br />
attron<span style="color: #009900;">&#40;</span>COLOR_PAIR<span style="color: #009900;">&#40;</span>1<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
addstr<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">5</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;Hello, world!<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
getch<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Cleanup and end</span><br />
endwin<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
<p>And we run this, and voila:<br />
<a href="http://notes.benv.junerules.com/wp-content/uploads/2009/08/curses1.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/08/curses1-300x150.png" alt="curses1" title="curses1" width="300" height="150" class="aligncenter size-medium wp-image-161" /></a></p>
<p>Well, that was easy enough. Of course I already knew all this shit, I made iotop after all&#8230;<br />
Now time for more advanced trickery: windows.<br />
What I want is simple: tailbox, yesnobox, checkboxconfigureoptionsthingy and all that with some good style.<br />
&#8220;<span style="color: #FF0000">YOU SAID SIMPLE!</span>&#8221;<br />
Well, I never said it would be easy <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>So my idea was to make the stdscr the backtitle, should be easy enough to always paint that the same way right?<br />
And then make the other things windows above that. Now the mysteries start.<br />
A little code to test the windowing concepts:</p>
<div class="codecolorer-container perl vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="perl codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#!/usr/bin/perl</span><br />
<span style="color: #000000; font-weight: bold;">use</span> Curses<span style="color: #339933;">;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># init again</span><br />
initscr<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
noecho<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
cbreak<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;"># no waiting for enter anymore on getch</span><br />
start_color<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
init_pair<span style="color: #009900;">&#40;</span>1<span style="color: #339933;">,</span> COLOR_CYAN<span style="color: #339933;">,</span> COLOR_BLACK<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># make some windows that overlap</span><br />
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$win</span> <span style="color: #339933;">=</span> newwin<span style="color: #009900;">&#40;</span>20<span style="color: #339933;">,</span> 40<span style="color: #339933;">,</span> 10<span style="color: #339933;">,</span> 10<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$win2</span> <span style="color: #339933;">=</span> newwin<span style="color: #009900;">&#40;</span>20<span style="color: #339933;">,</span> 40<span style="color: #339933;">,</span> 5<span style="color: #339933;">,</span> 5<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># some text in them</span><br />
addstr<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$win</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;World!&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
addstr<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$win2</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;Hello&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># give them borders</span><br />
attrset<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$win</span><span style="color: #339933;">,</span> COLOR_PAIR<span style="color: #009900;">&#40;</span>1<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
box<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$win</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">'|'</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">'-'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
attroff<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$win</span><span style="color: #339933;">,</span> COLOR_PAIR<span style="color: #009900;">&#40;</span>1<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
box<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$win2</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">'|'</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">'-'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Show them! (in correct overlapping order!)</span><br />
refresh<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$win2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
refresh<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$win</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Make user press 'q' this time</span><br />
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$key</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">do</span> <span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$key</span> <span style="color: #339933;">=</span> getch<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">ne</span> ERR <span style="color: #339933;">&amp;&amp;</span> <span style="color: #0000ff;">$key</span> <span style="color: #b1b100;">ne</span> <span style="color: #ff0000;">'q'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># cleanup and exit</span><br />
delwin<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$win2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
delwin<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$win</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
endwin<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
<p>And here&#8217;s our beautiful result:<br />
<a href="http://notes.benv.junerules.com/wp-content/uploads/2009/08/curses2.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/08/curses2-300x150.png" alt="curses2" title="curses2" width="300" height="150" class="aligncenter size-medium wp-image-166" /></a><br />
&#8230;. what the.<br />
Our window is empty?<br />
But how could this be?<br />
<span style="color: #FF00FF">M</span><span style="color: #FF5555">A</span><span style="color: #00FF55">G</span><span style="color: #55FFFF">I</span><span style="color: #77aaFF">C</span><span style="color: #9f00FF">!</span><span style="color: #33AA66">!</span><span style="color: #66AAFF">!</span><span style="color: #991155">!</span><br />
However, it does wait for the &#8216;q&#8217; button before exiting, so not everything failed&#8230;</p>
<p>This sort of nonsense is exactly the reason why I started this post. Right now I&#8217;m having some serious doubts about continuing this curse*COUGH*s project, but on the other hand, it&#8217;s a nice challenge. Probably one of the reasons dialog is such a piece of junk&#8230; the library is garbage! <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
Note that there are a few other options, such as <a href="http://search.cpan.org/~mdxi/Curses-UI-0.9607/lib/Curses/UI.pm" title="Curses::UI">Curses::UI</a>, but they seem to be a bit more junk than I want, not to mention another depedency. Nah, I&#8217;ll figure it out using Curses for as long as I can manage to not go crazy.</p>
<p>Some pointers I found out:</p>
<ul>
<li>Printing stuff outside a window (because the window is too small) makes it go bonkers. It might not appear at all, overwrite other stuff&#8230; you name it.</li>
<li>A big pitfall is the y,x syntax. Where one would expect coordinates in the x,y format, curses makes you curse and reverse.</li>
<li>Another pitfall is forgetting the refresh, or messing up the order of the refreshes. I&#8217;m writing some wrappers for that in slackbuild.pl.</li>
<li>Overlapping windows are another source of fun, in order to make sure the overlapped window gets repainted properly you can use <code class="codecolorer perl vibrant"><span class="perl">touchwin<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$win</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></span></code> on it.</li>
</ul>
<p>Oh yeah, if you ever decide to write a curses program:<br />
Make sure to set a __DIE__ handler that RESTORES THE TERMINAL PROPERLY! If one thing annoys people it&#8217;s messing up their stuff&#8230;. and not closing Curses properly does exactly that.<br />
For those who wonder how to get out of such a broken terminal, type in &#8216;<span style="color: #00FFFF">reset</span>&#8216; and hit enter. (or twice if you&#8217;re a bad typist). No, this won&#8217;t reset your pc, it will simply reset your terminal to sanity.</p>
<p>&#8220;<span style="color:#FF0055">But what about the broken code in the second example?</span>&#8221;<br />
Oh yeah&#8230; another case of forgetting to call refresh. What we did there was to properly refresh the imaginary windows.<br />
However, we forgot to refresh the real stdscr window that contains them! So nothing was output to the screen. Lovely.<br />
It&#8217;s still a bit fuzzy here though, so don&#8217;t mind me if I screwed up the reasoning, but that&#8217;s what I understand about it now. It&#8217;ll get better <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
Anyway, insert a <code class="codecolorer perl vibrant"><span class="perl">refresh<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></span></code> at line 25 and it&#8217;ll do what you&#8217;d expect. It&#8217;ll look like this:<br />
<a href="http://notes.benv.junerules.com/wp-content/uploads/2009/08/curses3.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/08/curses3-300x195.png" alt="curses3" title="curses3" width="300" height="195" class="aligncenter size-medium wp-image-172" /></a></p>
<p>Good luck with your cursed rabbits!</p>
<p>***<span style="color: #00FF00">followup here:</span><a href="http://notes.benv.junerules.com/software/ncurses-magic-part-2-magic/">ncurses magic part 2</a>***</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/ncurses-magic-are-you-a-magician/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTOP &#8211; top replacement</title>
		<link>http://notes.benv.junerules.com/all/software/htop-top-replacement/</link>
		<comments>http://notes.benv.junerules.com/all/software/htop-top-replacement/#comments</comments>
		<pubDate>Wed, 05 Aug 2009 16:18:37 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=151</guid>
		<description><![CDATA[I just ran into this cute &#8216;top&#8217; replacement called htop, thought I&#8217;d let you know.
If you don&#8217;t know what top is, you probably shouldn&#8217;t be here in the first place&#8230;  
After playing with it for a bit it looks like this on my machine (click for fullsize image):

Things I like about it:

Fast responsive interface, [...]]]></description>
			<content:encoded><![CDATA[<p>I just ran into this cute &#8216;top&#8217; replacement called <a href="http://htop.sourceforge.net/" title="HTOP - top replacement">htop</a>, thought I&#8217;d let you know.<br />
If you don&#8217;t know what top is, you probably shouldn&#8217;t be here in the first place&#8230; <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>After playing with it for a bit it looks like this on my machine (click for fullsize image):<br />
<a href="http://notes.benv.junerules.com/wp-content/uploads/2009/08/htop.png" title="htop screenshot"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/08/htop-300x182.png" alt="Click for bigger image" /></a></p>
<p>Things I like about it:</p>
<ul>
<li>Fast responsive interface, and the good thing is that it feels a lot better than the original top does.</li>
<li>Interface is intuitive, also makes good use of available space. Showing a &#8217;sort&#8217; menu and closing it again after a choice is made, I like.</li>
<li>Easy to nice/kill stuff without having to type pids like with top. Simply &#8220;browse&#8221; to your process and KILL KILL KILL!!!! <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </li>
<li>Cute features like bar/graph/led mode for your CPU etc.</li>
</ul>
<p>And so far I have found no &#8220;bad&#8221; things about it yet, but migth still come <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
Only possibly bad thing could be the ncurses requirement, but that shouldn&#8217;t be an issue.<br />
Needless to say it worked fine with my slackbuild script.</p>
<p>Try it out and see if you like it yourself.</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/htop-top-replacement/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pokemon OS, it just works! &#8482;</title>
		<link>http://notes.benv.junerules.com/all/software/pokemon-os-it-just-works-tm/</link>
		<comments>http://notes.benv.junerules.com/all/software/pokemon-os-it-just-works-tm/#comments</comments>
		<pubDate>Wed, 05 Aug 2009 13:42:48 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[ati]]></category>
		<category><![CDATA[karmic]]></category>
		<category><![CDATA[nvidia]]></category>
		<category><![CDATA[openoffice.org]]></category>
		<category><![CDATA[pokemon os]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=141</guid>
		<description><![CDATA[Or&#8230; not. Oh, the pokemon reference comes from the brilliant webcomic XKCD.
Usually I have little problems getting stuff to work on it, but as hardware gets older and support gets worse thing get more interesting.
First things first: I have no issues with ubuntu, they&#8217;re doing great work. In fact, the machine worked fine after installation, [...]]]></description>
			<content:encoded><![CDATA[<p>Or&#8230; not. Oh, the pokemon reference comes from <a title="xkcd 178 - not really into pokemon" href="http://xkcd.com/178/">the brilliant webcomic XKCD</a>.</p>
<p>Usually I have little problems getting stuff to work on it, but as hardware gets older and support gets worse thing get more interesting.<br />
First things first: I have no issues with ubuntu, they&#8217;re doing great work. In fact, the machine worked fine after installation, except for I can&#8217;t live with 800&#215;600, so I wanted a better video driver.<br />
Needless to say that means NON OPEN SOURCE GARBAGE FROM <span style="color: #ff6600;">NVIDIA</span> (<span style="color: #ff9900;">ATI</span> is just as bad btw). Although their binary driver usually &#8216;works&#8217;, you&#8217;re royally screwed if your system doesn&#8217;t meet their requirements.<span id="more-141"></span></p>
<p>So after installing ubuntu karmic, and more specific: kunbuntu karmic, everything kinda worked. In the system tray was a &#8220;hardware&#8221; icon indicating that there might be better but proprietory drivers for my hardware. *clickety*. &#8220;Yes sure, you can have my children and life and eternal soul and whatever the hell you believe making me check this checkbox will accomplish&#8221; (idiots).<br />
Maybe I should start using wget with something like</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">wget</span> <span style="color: #660033;">--referer</span> <span style="color: #ff0000;">&quot;By allowing this download you grant me all possible rights including the rigth to blasphemy your company into the ground and also the right to take your software and rape it as I see fit. All clauses included in the software downloaded are automatically null and void and are superseded by this contract&quot;</span> <span style="color: #007800;">$file</span></div></div>
<p>&#8230;. probably has about the same value as those checkboxes.<br />
Anyway, after the checkboxes the karmic koala downloaded some stuff and then barfed up some errors, none of them were helpful.</p>
<p>Digging a bit deeper it appeared that the dkms system wasn&#8217;t able to compile a kernel module. Oooh, why didn&#8217;t you say so&#8230; nvidia cruft scores again!<br />
More specific:</p>
<div class="codecolorer-container make vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="make codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">In file included from <span style="color: #004400;">/</span>var<span style="color: #004400;">/</span>lib<span style="color: #004400;">/</span>dkms<span style="color: #004400;">/</span>nvidia<span style="color: #004400;">/</span>96<span style="color: #004400;">.</span>43<span style="color: #004400;">.</span>10<span style="color: #004400;">/</span>build<span style="color: #004400;">/</span>nv<span style="color: #004400;">-</span>linux<span style="color: #004400;">.</span>h<span style="color: #004400;">:</span>112<span style="color: #004400;">,</span><br />
from <span style="color: #004400;">/</span>var<span style="color: #004400;">/</span>lib<span style="color: #004400;">/</span>dkms<span style="color: #004400;">/</span>nvidia<span style="color: #004400;">/</span>96<span style="color: #004400;">.</span>43<span style="color: #004400;">.</span>10<span style="color: #004400;">/</span>build<span style="color: #004400;">/</span>nv<span style="color: #004400;">.</span>c<span style="color: #004400;">:</span>14<span style="color: #004400;">:</span><br />
<span style="color: #666622; font-weight: bold;">include</span><span style="color: #004400;">/</span>linux<span style="color: #004400;">/</span>highmem<span style="color: #004400;">.</span>h<span style="color: #004400;">:</span> In function âzero_user_segmentsâ<span style="color: #004400;">:</span><br />
<span style="color: #666622; font-weight: bold;">include</span><span style="color: #004400;">/</span>linux<span style="color: #004400;">/</span>highmem<span style="color: #004400;">.</span>h<span style="color: #004400;">:</span>149<span style="color: #004400;">:</span> <span style="color: #666622; font-weight: bold;">warning</span><span style="color: #004400;">:</span> pointer of type âvoid <span style="color: #004400;">*</span>â used in arithmetic<br />
<span style="color: #666622; font-weight: bold;">include</span><span style="color: #004400;">/</span>linux<span style="color: #004400;">/</span>highmem<span style="color: #004400;">.</span>h<span style="color: #004400;">:</span>149<span style="color: #004400;">:</span> <span style="color: #666622; font-weight: bold;">warning</span><span style="color: #004400;">:</span> pointer of type âvoid <span style="color: #004400;">*</span>â used in arithmetic<br />
<span style="color: #666622; font-weight: bold;">include</span><span style="color: #004400;">/</span>linux<span style="color: #004400;">/</span>highmem<span style="color: #004400;">.</span>h<span style="color: #004400;">:</span>149<span style="color: #004400;">:</span> <span style="color: #666622; font-weight: bold;">warning</span><span style="color: #004400;">:</span> pointer of type âvoid <span style="color: #004400;">*</span>â used in arithmetic<br />
<span style="color: #666622; font-weight: bold;">include</span><span style="color: #004400;">/</span>linux<span style="color: #004400;">/</span>highmem<span style="color: #004400;">.</span>h<span style="color: #004400;">:</span>149<span style="color: #004400;">:</span> <span style="color: #666622; font-weight: bold;">warning</span><span style="color: #004400;">:</span> pointer of type âvoid <span style="color: #004400;">*</span>â used in arithmetic<br />
<span style="color: #666622; font-weight: bold;">include</span><span style="color: #004400;">/</span>linux<span style="color: #004400;">/</span>highmem<span style="color: #004400;">.</span>h<span style="color: #004400;">:</span>152<span style="color: #004400;">:</span> <span style="color: #666622; font-weight: bold;">warning</span><span style="color: #004400;">:</span> pointer of type âvoid <span style="color: #004400;">*</span>â used in arithmetic<br />
<span style="color: #666622; font-weight: bold;">include</span><span style="color: #004400;">/</span>linux<span style="color: #004400;">/</span>highmem<span style="color: #004400;">.</span>h<span style="color: #004400;">:</span>152<span style="color: #004400;">:</span> <span style="color: #666622; font-weight: bold;">warning</span><span style="color: #004400;">:</span> pointer of type âvoid <span style="color: #004400;">*</span>â used in arithmetic<br />
<span style="color: #666622; font-weight: bold;">include</span><span style="color: #004400;">/</span>linux<span style="color: #004400;">/</span>highmem<span style="color: #004400;">.</span>h<span style="color: #004400;">:</span>152<span style="color: #004400;">:</span> <span style="color: #666622; font-weight: bold;">warning</span><span style="color: #004400;">:</span> pointer of type âvoid <span style="color: #004400;">*</span>â used in arithmetic<br />
<span style="color: #666622; font-weight: bold;">include</span><span style="color: #004400;">/</span>linux<span style="color: #004400;">/</span>highmem<span style="color: #004400;">.</span>h<span style="color: #004400;">:</span>152<span style="color: #004400;">:</span> <span style="color: #666622; font-weight: bold;">warning</span><span style="color: #004400;">:</span> pointer of type âvoid <span style="color: #004400;">*</span>â used in arithmetic<br />
<span style="color: #004400;">/</span>var<span style="color: #004400;">/</span>lib<span style="color: #004400;">/</span>dkms<span style="color: #004400;">/</span>nvidia<span style="color: #004400;">/</span>96<span style="color: #004400;">.</span>43<span style="color: #004400;">.</span>10<span style="color: #004400;">/</span>build<span style="color: #004400;">/</span>nv<span style="color: #004400;">.</span>c<span style="color: #004400;">:</span> In function ânvos_proc_createâ<span style="color: #004400;">:</span><br />
<span style="color: #004400;">/</span>var<span style="color: #004400;">/</span>lib<span style="color: #004400;">/</span>dkms<span style="color: #004400;">/</span>nvidia<span style="color: #004400;">/</span>96<span style="color: #004400;">.</span>43<span style="color: #004400;">.</span>10<span style="color: #004400;">/</span>build<span style="color: #004400;">/</span>nv<span style="color: #004400;">.</span>c<span style="color: #004400;">:</span>502<span style="color: #004400;">:</span> <span style="color: #666622; font-weight: bold;">error</span><span style="color: #004400;">:</span> âstruct proc_dir_entryâ has no member named âownerâ<br />
<span style="color: #004400;">/</span>var<span style="color: #004400;">/</span>lib<span style="color: #004400;">/</span>dkms<span style="color: #004400;">/</span>nvidia<span style="color: #004400;">/</span>96<span style="color: #004400;">.</span>43<span style="color: #004400;">.</span>10<span style="color: #004400;">/</span>build<span style="color: #004400;">/</span>nv<span style="color: #004400;">.</span>c<span style="color: #004400;">:</span>503<span style="color: #004400;">:</span> <span style="color: #666622; font-weight: bold;">error</span><span style="color: #004400;">:</span> âstruct proc_dir_entryâ has no member named âownerâ<br />
<span style="color: #004400;">/</span>var<span style="color: #004400;">/</span>lib<span style="color: #004400;">/</span>dkms<span style="color: #004400;">/</span>nvidia<span style="color: #004400;">/</span>96<span style="color: #004400;">.</span>43<span style="color: #004400;">.</span>10<span style="color: #004400;">/</span>build<span style="color: #004400;">/</span>nv<span style="color: #004400;">.</span>c<span style="color: #004400;">:</span>504<span style="color: #004400;">:</span> <span style="color: #666622; font-weight: bold;">error</span><span style="color: #004400;">:</span> âstruct proc_dir_entryâ has no member named âownerâ<br />
<span style="color: #004400;">/</span>var<span style="color: #004400;">/</span>lib<span style="color: #004400;">/</span>dkms<span style="color: #004400;">/</span>nvidia<span style="color: #004400;">/</span>96<span style="color: #004400;">.</span>43<span style="color: #004400;">.</span>10<span style="color: #004400;">/</span>build<span style="color: #004400;">/</span>nv<span style="color: #004400;">.</span>c<span style="color: #004400;">:</span>524<span style="color: #004400;">:</span> <span style="color: #666622; font-weight: bold;">error</span><span style="color: #004400;">:</span> âstruct proc_dir_entryâ has no member named âownerâ<br />
<span style="color: #004400;">/</span>var<span style="color: #004400;">/</span>lib<span style="color: #004400;">/</span>dkms<span style="color: #004400;">/</span>nvidia<span style="color: #004400;">/</span>96<span style="color: #004400;">.</span>43<span style="color: #004400;">.</span>10<span style="color: #004400;">/</span>build<span style="color: #004400;">/</span>nv<span style="color: #004400;">.</span>c<span style="color: #004400;">:</span>537<span style="color: #004400;">:</span> <span style="color: #666622; font-weight: bold;">error</span><span style="color: #004400;">:</span> âstruct proc_dir_entryâ has no member named âownerâ<br />
<span style="color: #004400;">/</span>var<span style="color: #004400;">/</span>lib<span style="color: #004400;">/</span>dkms<span style="color: #004400;">/</span>nvidia<span style="color: #004400;">/</span>96<span style="color: #004400;">.</span>43<span style="color: #004400;">.</span>10<span style="color: #004400;">/</span>build<span style="color: #004400;">/</span>nv<span style="color: #004400;">.</span>c<span style="color: #004400;">:</span>548<span style="color: #004400;">:</span> <span style="color: #666622; font-weight: bold;">error</span><span style="color: #004400;">:</span> âstruct proc_dir_entryâ has no member named âownerâ<br />
<span style="color: #004400;">/</span>var<span style="color: #004400;">/</span>lib<span style="color: #004400;">/</span>dkms<span style="color: #004400;">/</span>nvidia<span style="color: #004400;">/</span>96<span style="color: #004400;">.</span>43<span style="color: #004400;">.</span>10<span style="color: #004400;">/</span>build<span style="color: #004400;">/</span>nv<span style="color: #004400;">.</span>c<span style="color: #004400;">:</span>558<span style="color: #004400;">:</span> <span style="color: #666622; font-weight: bold;">error</span><span style="color: #004400;">:</span> âstruct proc_dir_entryâ has no member named âownerâ<br />
<span style="color: #004400;">/</span>var<span style="color: #004400;">/</span>lib<span style="color: #004400;">/</span>dkms<span style="color: #004400;">/</span>nvidia<span style="color: #004400;">/</span>96<span style="color: #004400;">.</span>43<span style="color: #004400;">.</span>10<span style="color: #004400;">/</span>build<span style="color: #004400;">/</span>nv<span style="color: #004400;">.</span>c<span style="color: #004400;">:</span>568<span style="color: #004400;">:</span> <span style="color: #666622; font-weight: bold;">error</span><span style="color: #004400;">:</span> âstruct proc_dir_entryâ has no member named âownerâ<br />
<span style="color: #004400;">/</span>var<span style="color: #004400;">/</span>lib<span style="color: #004400;">/</span>dkms<span style="color: #004400;">/</span>nvidia<span style="color: #004400;">/</span>96<span style="color: #004400;">.</span>43<span style="color: #004400;">.</span>10<span style="color: #004400;">/</span>build<span style="color: #004400;">/</span>nv<span style="color: #004400;">.</span>c<span style="color: #004400;">:</span>579<span style="color: #004400;">:</span> <span style="color: #666622; font-weight: bold;">error</span><span style="color: #004400;">:</span> âstruct proc_dir_entryâ has no member named âownerâ<br />
<span style="color: #004400;">/</span>var<span style="color: #004400;">/</span>lib<span style="color: #004400;">/</span>dkms<span style="color: #004400;">/</span>nvidia<span style="color: #004400;">/</span>96<span style="color: #004400;">.</span>43<span style="color: #004400;">.</span>10<span style="color: #004400;">/</span>build<span style="color: #004400;">/</span>nv<span style="color: #004400;">.</span>c<span style="color: #004400;">:</span>586<span style="color: #004400;">:</span> <span style="color: #666622; font-weight: bold;">error</span><span style="color: #004400;">:</span> âstruct proc_dir_entryâ has no member named âownerâ<br />
<span style="color: #004400;">/</span>var<span style="color: #004400;">/</span>lib<span style="color: #004400;">/</span>dkms<span style="color: #004400;">/</span>nvidia<span style="color: #004400;">/</span>96<span style="color: #004400;">.</span>43<span style="color: #004400;">.</span>10<span style="color: #004400;">/</span>build<span style="color: #004400;">/</span>nv<span style="color: #004400;">.</span>c<span style="color: #004400;">:</span> In function ânvos_proc_add_warning_fileâ<span style="color: #004400;">:</span><br />
<span style="color: #004400;">/</span>var<span style="color: #004400;">/</span>lib<span style="color: #004400;">/</span>dkms<span style="color: #004400;">/</span>nvidia<span style="color: #004400;">/</span>96<span style="color: #004400;">.</span>43<span style="color: #004400;">.</span>10<span style="color: #004400;">/</span>build<span style="color: #004400;">/</span>nv<span style="color: #004400;">.</span>c<span style="color: #004400;">:</span>613<span style="color: #004400;">:</span> <span style="color: #666622; font-weight: bold;">error</span><span style="color: #004400;">:</span> âstruct proc_dir_entryâ has no member named âownerâ<br />
make<span style="color: #004400;">&#91;</span>3<span style="color: #004400;">&#93;</span><span style="color: #004400;">:</span> <span style="color: #004400;">***</span> <span style="color: #004400;">&#91;</span><span style="color: #004400;">/</span>var<span style="color: #004400;">/</span>lib<span style="color: #004400;">/</span>dkms<span style="color: #004400;">/</span>nvidia<span style="color: #004400;">/</span>96<span style="color: #004400;">.</span>43<span style="color: #004400;">.</span>10<span style="color: #004400;">/</span>build<span style="color: #004400;">/</span>nv<span style="color: #004400;">.</span>o<span style="color: #004400;">&#93;</span> <span style="color: #666622; font-weight: bold;">Error</span> 1<br />
make<span style="color: #004400;">&#91;</span>2<span style="color: #004400;">&#93;</span><span style="color: #004400;">:</span> <span style="color: #004400;">***</span> <span style="color: #004400;">&#91;</span>_module_<span style="color: #004400;">/</span>var<span style="color: #004400;">/</span>lib<span style="color: #004400;">/</span>dkms<span style="color: #004400;">/</span>nvidia<span style="color: #004400;">/</span>96<span style="color: #004400;">.</span>43<span style="color: #004400;">.</span>10<span style="color: #004400;">/</span>build<span style="color: #004400;">&#93;</span> <span style="color: #666622; font-weight: bold;">Error</span> 2<br />
NVIDIA<span style="color: #004400;">:</span> left KBUILD<span style="color: #004400;">.</span><br />
nvidia<span style="color: #004400;">.</span>ko failed to build<span style="color: #004400;">!</span><br />
make<span style="color: #004400;">&#91;</span>1<span style="color: #004400;">&#93;</span><span style="color: #004400;">:</span> <span style="color: #004400;">***</span> <span style="color: #004400;">&#91;</span>module<span style="color: #004400;">&#93;</span> <span style="color: #666622; font-weight: bold;">Error</span> 1<br />
make<span style="color: #004400;">:</span> <span style="color: #004400;">***</span> <span style="color: #004400;">&#91;</span>install<span style="color: #004400;">&#93;</span> <span style="color: #666622; font-weight: bold;">Error</span> <span style="color: #CC2200;">2</span></div></div>
<p>Well, that&#8217;s a very cute error. Better buy intel next time&#8230; or maybe <span style="color: #ff9900;">ATI</span> when they finally get their act together with their open source drivers&#8230;</p>
<p>The failing piece of cardboard in this case was an Nvidia Geforce 2 MX, or as lspci said it:</p>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">01:00.0 VGA compatible controller: nVidia Corporation NV11 [GeForce2 MX/MX 400] (rev b2)</div></div>
<p>&#8220;<span style="color: #ff0000;">Yeah that&#8217;s lovely, but how did you get it running?</span>&#8221;<br />
Simple, attach legs to it and kick it!</p>
<p>But seriously, there are some options, like <a href="http://www.nvnews.net/vbulletin/showthread.php?t=133990">this patch</a> I ran into.<br />
Don&#8217;t bother trying out the newer nvidia drivers, like the 185 series, they won&#8217;t work with a message like this:</p>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">[ 2111.806576] NVRM: The NVIDIA GeForce2 MX/MX 400 GPU installed in this system is<br />
[ 2111.806583] NVRM: &nbsp;supported through the NVIDIA 96.43.xx Legacy drivers. Please<br />
[ 2111.806585] NVRM: &nbsp;visit http://www.nvidia.com/object/unix.html for more<br />
[ 2111.806587] NVRM: &nbsp;information. &nbsp;The 185.18.14 NVIDIA driver will ignore<br />
[ 2111.806589] NVRM: &nbsp;this GPU. &nbsp;Continuing probe...<br />
[ 2111.806601] NVRM: No NVIDIA graphics adapter found!</div></div>
<p>So the simple solution now is to use the latest driver from the nvidia site:</p>
<p>http://www.nvidia.com/object/linux_display_ia32_96.43.13.html</p>
<p>&#8220;<span style="color: #ff0000;">So what&#8217;s the big deal?</span>&#8221;<br />
First of all, were these drivers open they would have been included by default. You can blame ubuntu for being slow or not testing all possible driver combinations, but it&#8217;s a problem on both sides.<br />
Second, now that I have to manually install this driver, there will be guaranteed issues whenever ubuntu has a new kernel, which means more support jobs for me. (which is something I don&#8217;t like for computers that are from relatives or customers)<br />
Third, with the drivers not being open it&#8217;s impossible to debug the bugs that are in them. Check the nvidia forums (nvnews) if you want to amuse yourself on some rants of tired customers from this department.</p>
<p>Oh well, at least it works for now&#8230;. more than I can say for my ancient <span style="color: #ff9900;">ATI</span> mobile M9700 chip in my old laptop&#8230; (well, it works but don&#8217;t ask how).</p>
<p><strong>Update &#8211; the story continues</strong><br />
Obviously this was not the last pokemon OS issue I had today. After the whole nvidia cardboard disaster, lotjuh wanted to configure some garbage on the PC, including openoffice.org.<br />
Shortly after she touched the machine she informed me about the broken state of openoffice.org:</p>
<blockquote><p>Lotjuh: Whenever I go to options it crashes!<br />
BenV: Did you start it from a console?<br />
Lotjuh: *retry* &#8230; *some error pops up*</p></blockquote>
<p>The error looked a bit like this:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">X-Error: BadAlloc <span style="color: #7a0874; font-weight: bold;">&#40;</span>insufficient resources <span style="color: #000000; font-weight: bold;">for</span> operation<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; Major opcode: <span style="color: #000000;">53</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>X_CreatePixmap<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; Resource ID: 0xjemoeder<br />
&nbsp; &nbsp; &nbsp; &nbsp; Serial No: <span style="color: #000000;">1234</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">567</span><span style="color: #7a0874; font-weight: bold;">&#41;</span></div></div>
<p>Since it was a new installation it couldn&#8217;t be the profile&#8230;. some googlefo gave me almost nothing, so another good reason to add this to this post.<br />
The most useful post I could find hinted that removing &#8216;<span style="color: #ff0000;">openoffice.org-gtk</span>&#8216; might help but leave an &#8220;ugly&#8221; openoffice. Well, indeed, after removing it not only the options page worked, it was also even more ugly. Who would have imagined that was even possible! <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
However, lotjuh wasn&#8217;t too thrilled about the new look. Obviously my &#8220;why use openoffice anyway&#8221; argument doesn&#8217;t fly with morons that can barely handle MSWord (&#8220;What does Save do?&#8221;), so time to look into that.</p>
<p>Checking apt-cache against openoffice (why doesn&#8217;t apt-cache sort by default?) gave some insight&#8230;. somehow the state of the system was that openoffice.org-base was not installed.<br />
Mighty interesting&#8230; I&#8217;m quite sure I didn&#8217;t remove that when removing openoffice.org-gtk&#8230; besides, how would it start otherwise?<br />
Ignoring this mystery for now I installed openoffice.org-base and some junk that tagged along with it.<br />
While I was at it I also installed the <span style="color: #ff00ff;">openclipart-openoffice.org</span> and <span style="color: #00ffff;">openoffice.org-style-galaxy</span>, my guess is that one of those fixed the problem.<br />
Yes, after that round of apt-get install it worked. Magic.</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/pokemon-os-it-just-works-tm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Update day!</title>
		<link>http://notes.benv.junerules.com/all/software/update-day/</link>
		<comments>http://notes.benv.junerules.com/all/software/update-day/#comments</comments>
		<pubDate>Tue, 04 Aug 2009 16:11:15 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Morons]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[apache2]]></category>
		<category><![CDATA[Slackbuild.pl]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=124</guid>
		<description><![CDATA[It seems to be update day today&#8230;.
I felt like updating my shit today. Somehow I enjoy updates so I do it whenever I see interesting stuff.
So glancing through the slackware changelog I noticed a new Apache2 version (2.2.12 with a bunch of security updates). Meh, not my favorite piece of garbage to upgrade, but local [...]]]></description>
			<content:encoded><![CDATA[<p>It seems to be update day today&#8230;.</p>
<p>I felt like updating my shit today. Somehow I enjoy updates so I do it whenever I see interesting stuff.<br />
So glancing through the slackware changelog I noticed a new <span style="color: #ff0000;">Apache2</span> version (<a href="http://apache.mirror.versatel.nl/httpd/CHANGES_2.2.12">2.2.12 with a bunch of security updates</a>). Meh, not my favorite piece of garbage to upgrade, but local upgrades were easy enough and also the remote (slackware 11, custom builds) ones went without hickups.<span id="more-124"></span></p>
<p>Then there was a new version of <span style="color: #00ccff;">Irssi</span><span style="color: #00ccff;"> </span>- <a title="Irssi - the client of the future" href="http://irssi.org/" target="_self">0.8.14</a>. Fine, updated that too. Good to see it didn&#8217;t break my scripts <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Meanwhile I checked out if the apache upgrade broke my notes, but it didn&#8217;t. While on the notes page I decided to write this little snippet,<br />
and found out that also Wordpress had a new release &#8211; <a href="http://wordpress.org/development/2009/08/wordpress-2-8-3-security-release/">2.8.3. More security stuff</a>.<br />
And the <span style="color: #800080;">codecolorer</span> plugin that I use for the code snippets also had an <a title="Codecolorer - wordpress plugin for syntax highlighting code blocks" href="http://wordpress.org/extend/plugins/codecolorer/" target="_self">update</a>.<br />
Updating wordpress was easy enough btw, just go to admin &#8211; tools &#8211; upgrade and hit the upgrade automatically button. I like features like that in a product.<br />
Note that this failed at least two times because of a 60 second timeout on the download. Guess they need to invest in faster servers <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
&#8220;Download failed.: Operation timed out after 60 seconds with 1226456 bytes received&#8221;&#8230;. too bad they don&#8217;t give me other options when that happens.<br />
And while I&#8217;m moaning about their &#8216;automagic upgrade&#8217;, how about some ajax progress indicators etc guys? <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
In case you also run into the timeout issue:<br />
Don&#8217;t bother downloading the file yourself and putting it in the /your/wordpress/path/wp-content/ dir. Hitting the button over and over will<br />
only swamp their servers even more and won&#8217;t make it any better either.<br />
I tried increasing the php timeout on the sockets, but that didn&#8217;t seem to help. Pity guys, real shame&#8230; in fact, it angers me. *grumble*morons*grumble*<br />
You might as well go for <a href="http://codex.wordpress.org/Upgrading_WordPress">the manual upgrade</a>.</p>
<p>At some point I got pissed enough to grep and read through the source for half an hour (AAARGH MY EYES) and distill this patch:<br />
Edit <span style="color: #00ccff;"><b>wp-admin/includes/file.php</b></span> with your favorite editor and change line 448 so it has a more reasonable timeout, I put it to 300:</p>
<div class="codecolorer-container php vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000088;">$response</span> <span style="color: #339933;">=</span> wp_remote_get<span style="color: #009900;">&#40;</span><span style="color: #000088;">$url</span><span style="color: #339933;">,</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'timeout'</span> <span style="color: #339933;">=&gt;</span> 300<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
<p>Now it finally worked <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>While on the update tour I also updated my <a href="http://mpd.wikia.com/wiki/Music_Player_Daemon_Wiki">MPD</a> to version 0.15.1, although I&#8217;m running the git<br />
version of course, but that went fine (through slackbuild.pl of course).</p>
<p>Well, that&#8217;s enough updates for today. Time for some coding on slackbuild I think <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/update-day/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Screenlets, retarded downloads, and python</title>
		<link>http://notes.benv.junerules.com/all/software/screenlets-retarded-downloads-and-python/</link>
		<comments>http://notes.benv.junerules.com/all/software/screenlets-retarded-downloads-and-python/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 14:06:15 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Boring]]></category>
		<category><![CDATA[Morons]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=115</guid>
		<description><![CDATA[Somewhere in my mailbox I found a link to Impulse. I&#8217;ve messed around with pulseaudio and have it running on my server together with mpd which allows for some network audio fun, but that&#8217;s not the story now. Back then I wondered if it would be possible to have a VU meter and stuff like [...]]]></description>
			<content:encoded><![CDATA[<p>Somewhere in my mailbox I found a link to <a title="Impulse - Pulseaudio screenlet" href="http://www.gnome-look.org/content/show.php/Impulse+-+PulseAudio+visualizer?content=99383" target="_self">Impulse</a>. I&#8217;ve messed around with pulseaudio and have it running on my server together with mpd which allows for some network audio fun, but that&#8217;s not the story now. Back then I wondered if it would be possible to have a VU meter and stuff like that, but couldn&#8217;t find it. So when I ran into this I was curious (how implemented, is it any good, etc).</p>
<p>So what the fuck are <a title="Screenlets" href="http://www.screenlets.org/index.php/Information" target="_self">screenlets</a>? Looks cute, feels cute, and once you think about it for a bit you immediately realize that it&#8217;s cute for 10 minutes after which you&#8217;ll kill the thing because it slows down your PC and you never really look at it anyway, but regardless I feel like checking it out.<span id="more-115"></span></p>
<p>&#8220;&lt;BenV&gt; Download&#8230; &#8230; I thought this page said download&#8230; and fuck off with your .deb file, gimme the source Ah, there we go - <a title="Screenlets download page" href="http://www.screenlets.org/index.php/Download" target="_self">Source</a>&#8221;</p>
<p>It&#8217;s funny how some people write software that they don&#8217;t want anyone to use. How the shift-3 am I supposed to download that source thing? Log in? Are you insane? For a download?</p>
<p>(speaking of which, go to hell fileplanet, gamersheaven and all such &#8220;login to download&#8221; kanker sites).</p>
<p>So what they really want to change that download link into is this: <a title="Screenlets DOWNLOAD, the real thing." href="https://code.launchpad.net/screenlets/+download" target="_self">DOWNLOAD</a>.</p>
<p>Feeding a url from that page to slackbuild.pl gives you a &#8220;Self signed certificate, AAAARGH, I&#8217;m dying, je moeder&#8221; whining from wget, so stuff it a &#8211;no-check-certificate and patch my slackbuild, done. Wait a minute&#8230;. certificate? On a http:// link? Oooh, thanks for the redirection guys. Makes me wonder why opera doesn&#8217;t bitch about self signed certificate for that link&#8230;. while wget does&#8230; let&#8217;s try firefox&#8230; nope, no warning. WHAT THE FUCK, try opening a website and they scream bloody murder because of a self signed cert, but a download? Oooh, noo, nooo problem. Morons.</p>
<p>In case you&#8217;re wondering about the cert, either go there for yourself, or check what openssl thinks:</p>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv@janeman:~:0&gt; openssl s_client -connect code.launchpad.net:443<br />
CONNECTED(00000003)<br />
depth=3 /L=ValiCert Validation Network/O=ValiCert, Inc./OU=ValiCert Class 2 Policy Validation Authority/CN=http://www.valicert.com//emailAddress=info@valicert.com<br />
verify error:num=19:self signed certificate in certificate chain<br />
verify return:0<br />
---</div></div>
<p>Maybe it&#8217;s OK when &#8220;they&#8221; selfsign, but it&#8217;s not ok if -I- selfsign? Guess I&#8217;m clueless&#8230;</p>
<p>Anyway, back to screenlets:<br />
Untarring their &#8217;sourceball&#8217; gives me a retarded directoryname (no version number), which hints me that it&#8217;s probably no decent autoconf thing. Ok, it&#8217;s python, so no surprise there.<br />
Other than that it builds and install without issues. Note to self: have to add python setup.py support to slackbuild, they&#8217;re clean enough to support that.</p>
<p>So after installing, wondering what to do next&#8230; I type &#8220;screenlets&#8221; in my urxvt and hit enter.<br />
*suspense*<br />
Will it work?</p>
<p>&#8230;</p>
<p><strong>OF COURSE NOT!</strong><br />
 <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Big surprise, probably something I managed to not install, how stupid of me. So what does it say now?</p>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv@janeman:~:0&gt;screenlets<br />
cat: /etc/screenlets/prefix: No such file or directory<br />
No module RSVG , graphics will not be so good<br />
Traceback (most recent call last):<br />
&nbsp; File &quot;/usr/share/screenlets-manager/screenlets-manager.py&quot;, line 28, in &lt;module&gt;<br />
&nbsp; &nbsp; import screenlets<br />
&nbsp; File &quot;/usr/lib64/python2.6/site-packages/screenlets/__init__.py&quot;, line 51, in &lt;module&gt;<br />
&nbsp; &nbsp; from options import *<br />
&nbsp; File &quot;/usr/lib64/python2.6/site-packages/screenlets/options.py&quot;, line 30, in &lt;module&gt;<br />
&nbsp; &nbsp; import utils<br />
&nbsp; File &quot;/usr/lib64/python2.6/site-packages/screenlets/utils.py&quot;, line 286, in &lt;module&gt;<br />
&nbsp; &nbsp; import session<br />
&nbsp; File &quot;/usr/lib64/python2.6/site-packages/screenlets/session.py&quot;, line 38, in &lt;module&gt;<br />
&nbsp; &nbsp; from xdg import BaseDirectory<br />
ImportError: No module named xdg</div></div>
<p>Mhm, that&#8217;s cute&#8230;.<br />
Missing python-xdg then huh. Let&#8217;s see how easy_install handles that. Speaking of which, I don&#8217;t think I have installed that yet. Let&#8217;s go!</p>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root@janeman:/usr/src# wget http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c9.tar.gz<br />
&nbsp; &nbsp;&lt;wget does its thing&gt;<br />
root@janeman:/usr/src# tar xf setuptools-0.6c9.tar.gz <br />
root@janeman:/usr/src# chown -R root:root setuptools-0.6c9 ; chmod -R o-w setuptools-0.6c9<br />
*peek in dir* -&gt; AU MY EYES... full of garbage junk and stuff. Fine, I'll just guess the install<br />
root@janeman:/usr/src/setuptools-0.6c9# python setup.py build<br />
root@janeman:/usr/src/setuptools-0.6c9# mkdir pkg ; python setup.py install --root `pwd`/pkg<br />
root@janeman:/usr/src/setuptools-0.6c9# cd pkg ; makepkg /usr/src/packages/setuptools-0.6c9-x86_64-1.tgz</div></div>
<p>And we have a package. Now for xdg:</p>
<p><code class="codecolorer text vibrant"><span class="text">easy_install http://www.freedesktop.org/~lanius/pyxdg-0.17.tar.gz</span></code><br />
That should fix it <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
However, the screenlets require more garbage, such as gnome-keyring (in case of missing GConf at least) so I ran <code class="codecolorer text vibrant"><span class="text">slackbuild.pl http://ftp.gnome.org/pub/gnome/sources/gnome-keyring/2.26/gnome-keyring-2.26.3.tar.bz2</span></code> but then also needed libtasn which was also handled by slackbuild.pl. Man I love that script. Especially the leech support <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
But the screenlets still didn&#8217;t function. &#8230; so I hunted for gnome-python-desktop, which had <a href="Yhttp://code.google.com/p/waf/">YET ANOTHER RETARDED BUILD SYSTEM CALLED &#8216;WAF&#8217;</a>. *sigh*. I hate it when 5 million people think they&#8217;re smarter than the other. They should simply all succumb to me. *adds another todo note in slackbuild.pl*</p>
<p>But then: finally, it worked!<br />
<a href="http://notes.benv.junerules.com/wp-content/uploads/2009/07/41.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/07/41-300x161.png" alt="Screenlets" title="Screenlets" width="300" height="161" class="aligncenter size-medium wp-image-116" /></a></p>
<p>*time passes*</p>
<p>Yep, I&#8217;ve messed around with it a bit&#8230;. and it&#8217;s cute&#8230; but fluxbox has its own mind about it. (giving the widgets a nice &#8220;you&#8217;re an application!&#8221; bar)&#8230; maybe I&#8217;ll reserve a desktop for it and<br />
see if I like it. A nice &#8216;widget&#8217; screen on desktop 10 or something <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
The good:</p>
<ul>
<li>It&#8217;s cute</li>
<li>Skinning support</li>
<li>Seems easy to build new screenlets, so many more will spawn</li>
</ul>
<p>The bad:</p>
<ul>
<li>Gnome based, so gnome deps and many screenlets assume too much</li>
<li>Young, so a bit buggy (mouse clicks through some screenlets, although that could be fluxbox related)</li>
<li> Eyecandy, while some could be useful it is just another resource hog.</li>
</ul>
<p>One thing though&#8230; where&#8217;s the auto-download-and-install support? Even firefox has it these days&#8230; <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href="http://notes.benv.junerules.com/wp-content/uploads/2009/07/screenlets.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/07/screenlets-300x187.png" alt="screenlets" title="screenlets" width="300" height="187" class="aligncenter size-medium wp-image-118" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/screenlets-retarded-downloads-and-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash64</title>
		<link>http://notes.benv.junerules.com/all/software/flash64/</link>
		<comments>http://notes.benv.junerules.com/all/software/flash64/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 10:56:52 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[opera]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=113</guid>
		<description><![CDATA[In case I forget it again, the !@#$()*@$%*#$ product called &#8220;flash&#8221; has a 64 bit plugin at http://labs.adobe.com/downloads/flashplayer10.html
Works in opera, just trash it into /usr/lib/opera/plugins&#8230;. why is that /usr/lib and not lib64? It&#8217;ll also use it from the mozilla dir, /usr/lib64/mozilla/plugins.
]]></description>
			<content:encoded><![CDATA[<p>In case I forget it again, the !@#$()*@$%*#$ product called &#8220;flash&#8221; has a 64 bit plugin at <a title="Molest your browser" href="http://labs.adobe.com/downloads/flashplayer10.html" target="_self">http://labs.adobe.com/downloads/flashplayer10.html</a></p>
<p>Works in opera, just trash it into /usr/lib/opera/plugins&#8230;. why is that /usr/lib and not lib64? It&#8217;ll also use it from the mozilla dir, /usr/lib64/mozilla/plugins.</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/flash64/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Emulators!</title>
		<link>http://notes.benv.junerules.com/all/software/emulators/</link>
		<comments>http://notes.benv.junerules.com/all/software/emulators/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 10:06:27 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Boring]]></category>
		<category><![CDATA[Fun]]></category>
		<category><![CDATA[Morons]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[dosbox]]></category>
		<category><![CDATA[emulators]]></category>
		<category><![CDATA[gamepad]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[x86_64]]></category>
		<category><![CDATA[zelda]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=97</guid>
		<description><![CDATA[Since I quit playing World of Warcraft again a while ago (seriously Blizzard, what are you doing to that game?) I find myself enjoyed playing tons of other things. Funny thing is, most of the games I play are ancient. Games from the DOS era (which means DOSBOX, I love that product) like Master of [...]]]></description>
			<content:encoded><![CDATA[<p>Since I quit playing World of Warcraft again a while ago (seriously Blizzard, what are you doing to that game?) I find myself enjoyed playing tons of other things. Funny thing is, most of the games I play are ancient. Games from the <span style="color: #ff6600;">DOS</span> era (which means <a title="DOSBox, an x86 emulator with DOS" href="http://www.dosbox.com/" target="_self">DOSBOX</a>, I love that product) like <a title="Wikipedia on Master of Orion" href="http://en.wikipedia.org/wiki/Master_of_Orion" target="_self">Master of Orion</a> (and it&#8217;s sequel), <a title="Wikipedia on Master of Magic" href="http://en.wikipedia.org/wiki/Master_of_Magic" target="_self">Master of Magic</a>, Paratrooper, <a title="Wikipedia on One Must Fall: 2097" href="http://en.wikipedia.org/wiki/One_Must_Fall:_2097" target="_self">One Must Fall: 2097</a> (which is freeware these days! Download it <a title="One Must Fall 2097" href="http://www.omfdownloads.com/2097/omf21cd.zip" target="_self">here</a>), X-Com, System Shock, and the list goes on and on. Yeah, come to think of it&#8230;. the games they made back then were pretty brilliant, and it&#8217;s not just nostalgia.<span id="more-97"></span></p>
<p>Not just the DOS stuff from back then was great, but also the console games.  We had a NES and later a SNES and games like Zelda, Mario, Mega Man and Double Dragon gave us a lot of education <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Somehow we missed the Final Fantasy series though, but one of the things I often play these days is one of the RPG genre.  In fact, I played Final Fantasy 2 on my laptop just a week ago <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>&#8220;<span style="color: #00ccff;">But how, my stupid x86 machine doesn&#8217;t accept these cardridges!</span>&#8220;.</p>
<p>Well, you need a bigger hammer obviously. Try stuffing them into the PCMCIA slot if you have one, I hear they are twice as fast. Or if you strip the plastic casing you can maybe insert them into an ISA slot if you still have one. You might need an adapter for the PCI slots though.</p>
<p>&#8230;</p>
<p>Oh, you&#8217;re still here? Well, ok, try an emulator if your slot smashing skills aren&#8217;t up to par.</p>
<p><strong><span style="color: #ff0000;">&lt;rant alert&gt;</span></strong></p>
<p>So someone explain to me:</p>
<p>If you&#8217;re writing an emulator&#8230;. you know, a thing that has to waste tons of CPU cycles in order to play dress-up and imitate a console with a different architecture&#8230;</p>
<p>Why the # wouldn&#8217;t you make it as cross platform as possible? Yeah, sure, I understand that you want to make it fast and hack in some assembly code. In fact, I love assembly code <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>However,  that concept is getting more obsolete every day. So if you write an emulator, MAKE SURE IT COMPILES ON BenV&#8217;s MACHINE!</p>
<p>That means it should run on at least<em><span style="color: #0000ff;"> x86 AND x86_64</span></em>. Why write an emulator that&#8217;s obsolete even before you finish it? I&#8217;m looking at you pcsx2 -.-</p>
<p>Applaud to DOSBox for that matter, they get it right.</p>
<p><span style="color: #ff0000;"> &lt;/rant&gt;</span></p>
<p>So anyway, for the <span style="color: #ff6600;">NES</span> games I suggest using <a title="FCEUX: cross-platform NES emulator for professionals" href="http://fceux.com/web/htdocs/" target="_self">FCEUX</a> these days. It runs on both x86 and x86_64, and it runs my games on my new slackware 64 installation&#8230; which makes me happy <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>For <span style="color: #ff6600;">SNES</span> I always used <a title="Good SNES emulator for x86 running DOS, obsolete for everything else" href="http://www.zsnes.com/" target="_self">ZSNES</a>, but they&#8217;re still stuck in the DOS era&#8230; trying to upgrade their obsolete assembly code to more generic stuff like the QT toolkit. It works great if you have an x86 installation, but it refuses my new slackware 64&#8230;. and I refuse to chroot back to my old slackware32 for an emulator like this. Puh, I&#8217;d sooner start it in dosbox :p. &#8220;But BenV, how do you play A Link to the Past then these days?&#8221;. Ahh, a good question, but it&#8217;s easy: I simply use <a title="byuu's snes emulator" href="http://byuu.org/bsnes/" target="_self">bsnes</a>. Runs all my snes games so far <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Then there&#8217;s the matter of the prutsstation, or <span style="color: #ff6600;">PSX</span>. Yeah, that&#8217;s another disaster area&#8230; let me know if you have a decent emulator. Guess I&#8217;m stuck to using <a title="ePSXe, needs an update" href="http://www.epsxe.com/" target="_self">epsxe</a> in a chroot environment for now.  Other than that it works pretty well once you get the plugins etc sorted, but I haven&#8217;t touched it lately. (guess why).</p>
<p>For <span style="color: #ff6600;">N64</span> we have another good emulator these days, called <a title="N64 emulator and plugins for Linux, Mac OSX, and FreeBSD" href="http://code.google.com/p/mupen64plus/" target="_self">Mupen64plus</a>. To my surprise a simple recompile worked on slack64, so no issues there (good coder <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> ). And it runs zelda, what more do you want? <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Then there&#8217;s the new PSX, or <span style="color: #ff6600;">PSX2</span>. Yeah&#8230;. that&#8217;s in the same (sinking) boat as the PSX. Only 1 reason to play: final fantasy. Only 1 somewhat decent emulator for this: <a title="pcsx2" href="http://pcsx2.net/" target="_blank">pcsx2</a>. Unfortunately it feels like they don&#8217;t give a damn about linux, and certainly not 64 bit linux. They &#8220;dropped the 64 bit build&#8221;&#8230;. idiots. So if you feel like it you can get it running on 32 bits, which I&#8217;ve done, and it runs ok. But you need a fast pc (multicore) and a decent graphics card and then it still runs like a garbagecan on wheels. (the wheels come off every 3 meters and you have to open the lid, shuffle the garbage around and close it again before it continues). Of course they are quite active, so that&#8217;s good, there&#8217;s still hope. For kicks lotjuh tried running this thing on windows, and it runs a bit better there, but they still have a lot of work to do. Let&#8217;s hope they consider dropping the 32 bitch port and switching to 64 before they&#8217;re even obsolete in windows land.</p>
<p>That&#8217;s all the emulators I can think of at the moment&#8230; or at least, that I want to talk about, this page is getting long enough. Yeah, there&#8217;s plenty more, like <a title="MAME | Multiple Arcade Machine Emulator" href="http://mamedev.org/" target="_self">mame</a>,  <a title="CCS64 - A Commodore 64 Emulator" href="http://www.ccs64.com/" target="_self">ccs64</a>, <a title="A multiplatform atari 2600 VCS emulator" href="http://stella.sourceforge.net/" target="_self">stella</a> and whatnot, but you can handle google yourself if you want to play those things.</p>
<p>Oh yeah, one more important thing: <strong><span style="color: #ffcc00;">Gamepads</span></strong><br />
If you want to play these console games, you want&#8230; I&#8217;d almost say -<strong>need</strong>- a gamepad. Final Fantasy and Zelda can be played with the keyboard just fine, but you&#8217;ll be crying me plenty of rivers if you attempt to complete Mega Man or Double Dragon with the keyboard. A little while ago I got myself a <a title="Logitech Rumblepad 2" href="http://www.logitech.com/index.cfm/gaming/pc_gaming/gamepads/devices/264&amp;cl=US,EN" target="_self">Logitech Rumblepad 2</a> which I&#8217;m quite happy with. Yeah, it&#8217;s not a rectangular box that&#8217;ll give you hernia and makes your skin come off after playing a few hours of mario like in the old days, so you&#8217;ll have to miss out on that nostalgia&#8230;.</p>
<p><a href="http://notes.benv.junerules.com/wp-content/uploads/2009/07/NES_controller.jpg"><img class="alignnone size-full wp-image-98" title="NES_controller" src="http://notes.benv.junerules.com/wp-content/uploads/2009/07/NES_controller.jpg" alt="NES_controller" width="400" height="400" /></a></p>
<p>but like I say, I&#8217;m quite happy with it. It even vibrates if you push the right button <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> . Needless to say it works under linux&#8230;. although you will want to enable the kernel option for it. My kernel config has <span style="color: #00ff00;">CONFIG_LOGITECH_FF=y, CONFIG_LOGIRUMBLEPAD2_FF=y, and CONFIG_HID_LOGITECH=y</span>, and so far all decent emulators play with it without much hassle.</p>
<p>So if you&#8217;re bored, go get one of these emulators, a gamepad, and give it a shot! <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/emulators/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Billy Vs. SNAKEMAN</title>
		<link>http://notes.benv.junerules.com/all/daily/billy-vs-snakeman/</link>
		<comments>http://notes.benv.junerules.com/all/daily/billy-vs-snakeman/#comments</comments>
		<pubDate>Thu, 30 Jul 2009 13:44:28 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Boring]]></category>
		<category><![CDATA[Fun]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=88</guid>
		<description><![CDATA[So what do you do when you&#8217;re looking for something to do while eating your bread in front of your computer?
(or coffee in case of early days). You read the daily news (slashdot, local garbage, kernel.org, happypenguin, you know the drill).
Anyway, I ran into another time wasting online game with properties that I like (RPG [...]]]></description>
			<content:encoded><![CDATA[<p>So what do you do when you&#8217;re looking for something to do while eating your bread in front of your computer?<br />
(or coffee in case of early days). You read the daily news (slashdot, local garbage, kernel.org, happypenguin, you know the drill).<br />
Anyway, I ran into another time wasting online game with properties that I like (RPG like, leveling, items, upgrades) called <a href="http://animecubed.com/billy/?91818">Billy Vs. SNAKEMAN</a>.</p>
<p>Give it a shot if you&#8217;re bored <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Oh, and they have a nice list of <a href="http://animecubed.com/billy/whybvs.shtml">why to play</a>, including &#8220;It&#8217;s free!&#8221; and &#8220;This list goes to eleven&#8221; <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Also, don&#8217;t blame me if you find yourself still clicking around while your coffee mug is empty again. I won&#8217;t refill it for you.</p>
<div id="attachment_93" class="wp-caption alignnone" style="width: 110px"><a href="http://notes.benv.junerules.com/wp-content/uploads/2009/07/1.jpg"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/07/1.jpg" alt="Billy Vs. SNAKEMAN" title="Billy Vs. SNAKEMAN" width="100" height="125" class="size-full wp-image-93" /></a><p class="wp-caption-text">Billy Vs. SNAKEMAN</p></div>
<p>Oh yeah, here&#8217;s my char:<br />
<a href="http://www.animecubed.com/billy/?91818"><img src="http://www.animecubed.com/billy/userimages/sigs/91818.jpg" border=1></a><br />
<font style="font-size:10px;">Be the Ultimate Ninja! Play <a href="http://www.animecubed.com/billy/?91818">Billy Vs. SNAKEMAN</a> today!<br /></font></p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/daily/billy-vs-snakeman/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Weird DNS log entries</title>
		<link>http://notes.benv.junerules.com/all/daily/weird-dns-log-entries/</link>
		<comments>http://notes.benv.junerules.com/all/daily/weird-dns-log-entries/#comments</comments>
		<pubDate>Wed, 29 Jul 2009 14:40:43 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Boring]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=84</guid>
		<description><![CDATA[So I was messing around with some new domain registrations, and just because I&#8217;m curious I tailed my tinydns logfile.
&#8230;. WHAT THE !@(#*!#%(*  is THAT?!&#8230;. I think, as my eye catches a glimp of this:
[Wed Jul 29 16:20:46 2009] 213.73.***.** &#160; &#160; &#160;port:64500 &#160;id:383b * &#160;PTR &#160;db._dns-sd._udp.winnipeg.nl
[Wed Jul 29 16:20:46 2009] 213.132.***.*** &#160; port:11328 [...]]]></description>
			<content:encoded><![CDATA[<p>So I was messing around with some new domain registrations, and just because I&#8217;m curious I tailed my tinydns logfile.<br />
&#8230;. WHAT THE !@(#*!#%(*  is THAT?!&#8230;. I think, as my eye catches a glimp of this:</p>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">[Wed Jul 29 16:20:46 2009] 213.73.***.** &nbsp; &nbsp; &nbsp;port:64500 &nbsp;id:383b * &nbsp;PTR &nbsp;db._dns-sd._udp.winnipeg.nl<br />
[Wed Jul 29 16:20:46 2009] 213.132.***.*** &nbsp; port:11328 &nbsp;id:300b * &nbsp;PTR &nbsp;r._dns-sd._udp.winnipeg.nl<br />
[Wed Jul 29 16:20:46 2009] 213.132.***.*** &nbsp; port:45174 &nbsp;id:0255 * &nbsp;PTR &nbsp;dr._dns-sd._udp.winnipeg.nl<br />
[Wed Jul 29 16:20:46 2009] 213.132.***.*** &nbsp; port:48779 &nbsp;id:9e01 * &nbsp;PTR &nbsp;lb._dns-sd._udp.winnipeg.nl</div></div>
<p>Now, these things immediately reminded me of the ZeroConf/Bonjour/Avahi garbage. However: first of all, I don&#8217;t run that on my machine since it&#8217;s a relatively new install that doesn&#8217;t have it yet.<br />
Second, those IPs&#8230;. they&#8217;re not mine. Whois tells me it&#8217;s Quicknet/multikabel/ziggo&#8230; which some of our friends and relatives have.<br />
That&#8217;s the weird part here, I can&#8217;t stop wondering why they&#8217;re requesting my domain while they&#8217;re back at home, so they should have a new dhcp entry and ditched their &#8220;search&#8221; line in resolv.conf. (ignoring windows as an option for now).</p>
<p>Google tells me it&#8217;s indeed <a href="http://www.dns-sd.org/">Bonjour DNS based &#8220;service discovery&#8221;</a> related, great, looks interesting, but I&#8217;m not in the mood to mess with DNS now&#8230; at least not until I have a machine that can actually use it. I wonder who it was though&#8230;. <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/daily/weird-dns-log-entries/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Browser ad blocking</title>
		<link>http://notes.benv.junerules.com/all/software/browser-ad-blocking/</link>
		<comments>http://notes.benv.junerules.com/all/software/browser-ad-blocking/#comments</comments>
		<pubDate>Wed, 29 Jul 2009 10:54:30 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=47</guid>
		<description><![CDATA[Not always I have to be negative about stuff&#8230;. ads for instance. They&#8217;re terribly kanker!
Take a reasonably fast site, tag in a few ads and *boom*. Your head explodes in anger when you accidentily mouseover some keyword/item that pops up a flash thingy&#8230; or maybe not flash but css mouseover crap&#8230; or whatever it is [...]]]></description>
			<content:encoded><![CDATA[<p>Not always I have to be negative about stuff&#8230;. ads for instance. They&#8217;re terribly kanker!</p>
<p>Take a reasonably fast site, tag in a few ads and *boom*. Your head explodes in anger when you accidentily mouseover some keyword/item that pops up a flash thingy&#8230; or maybe not flash but css mouseover crap&#8230; or whatever it is they do these days. Not only that, it takes 5 minutes to load the site  instead of 2 seconds, because the adservers are swamped and very slow.<span id="more-47"></span></p>
<p>So at some point doubleclick.net got me kinda pissed off, so I added a nice 127.0.0.1 entry in their dns record. (I love my own dns resolvers/servers). However, this still requires my browser to lookup their retarded server, and ask 127.0.0.1 to retrieve something. Obviously 127.0.0.1 doesn&#8217;t have a webserver running so it&#8217;ll get a connection refused if you&#8217;re lucky. Add in a firewall and the packet migth even get dropped and it&#8217;ll wait for a timeout, stalling and slowing your page down even more!</p>
<p>A better solution was needed, so finally I headed for  <a title="Squid" href="http://www.squid-cache.org/" target="_self">Squid</a>. Needless to say I went for the bleeding edge verson, which is also why I wanted to post this, because I felt like updating it again yesterday. Anyway, building and installing it was pretty straightforward as soon as you&#8217;ve figured out how to deal with that svn fuckup called Bazaar. (yeah, I&#8217;m sure tons of people love it, for me it&#8217;s just another weirdass version management tool that doesn&#8217;t do what I want&#8230; feels like git, but more svn-like. I&#8217;ll stick to <a title="Mercurial" href="http://www.selenic.com/mercurial/" target="_self">mercurial</a> for my own stuff, thank you. After installing it on my server and scratching the default configuration to my system it simply worked. It even played nice with <a title="D.J.B's Daemontools." href="http://cr.yp.to/daemontools.html" target="_self">daemontools</a>! (just give it a -N when starting it so it sticks in the foreground).</p>
<p>However, 2 issues remained. The first issue was that it didn&#8217;t block anything yet. Easily fixed, simply add a few &#8220;ads&#8221; ACLs that deny access to everything that matches ads.  Something like this:</p>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">acl ads dstdom_regex -i &quot;/etc/squid/adservers.list&quot;<br />
deny_info ERR_ACCESS_DENIED ads<br />
http_access deny ads</div></div>
<p>This will define an access control that matches everything in the adservers.list file (more on that in a bit) which will be denied when requested through the proxy by a big &#8220;ACCESS DENIED&#8221; page.</p>
<p>Woops, we don&#8217;t want a big access denied page for ads, so leave out the deny_info or put your own error page there if you feel like customizing your ads. Maybe a little html file that has a smiley face wherever an ad was supposed to be? The posibility are limitless! *MWHAHAHA*</p>
<p>&#8220;Yeah, that&#8217;s cute, but where do you get that adservers.list?&#8221;</p>
<p>Obviously I&#8217;m too lazy to type that adservers list myself, so some googling came up with this  nice piece of info &#8211; <a title="Squid Adserver lists" href="http://pgl.yoyo.org/adservers/#withsquid">http://pgl.yoyo.org/adservers/#withsquid</a>.</p>
<p>I have a little script in cron that fetches that adservers file every day. The script is on that page I just linked, or for the lazy people: <a title="refresh adservers script" href="http://pgl.yoyo.org/adservers/scripts/squid/update-squid-adservers.txt">HERE</a>.</p>
<p>Goody! Now you just kick squid in the balls, svc -t /var/service/squid here, and the ads are blocked.</p>
<p>Be aware that this is not the only list of adservers, for instance there&#8217;s this huge thing called <a title="Shallalist" href="http://www.shallalist.de/" target="_blank">Shalla&#8217;s Blacklist</a> that you can download and add as well. Simply make a new acl for the list you want to include (note that not all lists have regexps, for shalla you probably want to use &#8216;acl shalla_bla dstdomain &#8220;/BL/some/file/in/there&#8221;&#8216;)  point it to the file, and kick squid in the nuts.</p>
<p>However, there&#8217;s still this tiny annoying thing that people manually have to enter your proxy into their browser. While it seems like an easy thing to  do, people are stupid. Especially other people. Not only that, I&#8217;m lazy, so I don&#8217;t want to do more than click the &#8216;enable proxy&#8217; button in opera.  So onto the proxy autoconfiguration!</p>
<p>For this to work there are 2 methods, based on DNS and DHCP. Since they both suck I implemented both here. Simple steps:</p>
<ul>
<li>In /etc/dhcpd.conf, add in the global part:  
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">option wpad code 252 = text;</div></div>
</li>
<li>In the shared-network part if you have it, otherwise in the global part I suppose, add
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">option wpad &quot;http://your.local.webserver.nl/proxy.pac&quot;;</div></div>
</li>
</ul>
<p>That covers the DHCP part. Make sure you have a webserver running on that url you put there. Important, ditch a .htaccess file there with something like:</p>
<div class="codecolorer-container apache vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="apache codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;<span style="color: #000000; font-weight:bold;">Files</span> proxy.pac&gt;<br />
&nbsp; &nbsp;<span style="color: #00007f;">ForceType</span> application/x-ns-proxy-autoconfig<br />
&lt;/<span style="color: #000000; font-weight:bold;">Files</span>&gt;<br />
&lt;<span style="color: #000000; font-weight:bold;">Files</span> wpad.dat&gt;<br />
&nbsp; &nbsp;<span style="color: #00007f;">ForceType</span> application/x-ns-proxy-autoconfig<br />
&lt;/<span style="color: #000000; font-weight:bold;">Files</span>&gt;</div></div>
<p>Why? Because browsers are retarded, all of them. If they don&#8217;t see this filetype they&#8217;ll silently refuse to handle the thing. It&#8217;s the &#8220;silently&#8221; part that annoys me.<br />
On to the DNS method:</p>
<ul>
<li>Make sure your /etc/resolv.conf gets a &#8217;search my.domain.nl&#8217; directive, either through DHCP or manually. Goal of this is so that you type &#8220;ping wpad&#8221; it will try to ping wpad.my.domain.nl, this will make things easier.</li>
<li>Add a DNS entry for your domain so that wpad.my.domain.nl resolves to your webserver above.</li>
</ul>
<p>If you did what I meant, you are now able to wget http://wpad/wpad.dat and get a 404. &#8220;Great!&#8221;. Yeah, I&#8217;m sure you&#8217;re happy. You should be able to see this in the webserver logs.<br />
Time to put a file there, make it something like this:</p>
<div class="codecolorer-container javascript vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #003366; font-weight: bold;">function</span> FindProxyForURL<span style="color: #009900;">&#40;</span>url<span style="color: #339933;">,</span> host<span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #3366CC;">&quot;PROXY 192.168.1.1:3128; DIRECT&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></div></div>
<p>The above example is the most simple you can get, and assumes your squid is running on 192.168.1.1. It instructs browsers that accept this file to first try a proxy and if that fails make a direct connection.<br />
Personally I symlinked this wpad.dat to proxy.pac so both can be fetched from the webserver, but that&#8217;s up to you.<br />
Try it out first with a file this simple, because a syntax terror will make it fail. There is a wpad.dat tester out there somewhere, but I assume you&#8217;re not a complete and utter moron and can handle<br />
a few lines of garbagescript. For more complex examples there are <a title="wpad spec" href="http://wpad.com/draft-ietf-wrec-wpad-01.txt" target="_self">plenty</a> <a title="Informative site about proxy.pac etc" href="http://www.findproxyforurl.com/" target="_self">of sites</a> <a title="Another HOWTO" href="http://www.mercenary.net/blog/index.php?/archives/42-HOWTO-WPAD.html" target="_self">out there</a> that describe this wpad.dat idiocy.</p>
<p>Finally! It should work now! Startup your favorite version of opera, I&#8217;m using build  4478 right now <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> , and enable the proxy autoconfiguration checkbox. For the autoconfiuration URL you can use http://wpad/wpad.dat if it doesn&#8217;t work when left empty.<br />
Run a &#8220;tail -f /var/log/squid/access.log&#8221; and you should see stuff coming in. Ads fully denied. AAHHAHAHAHA *evil laugher*.</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/browser-ad-blocking/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Gnome kankerbende</title>
		<link>http://notes.benv.junerules.com/all/software/gnome-kankerbende/</link>
		<comments>http://notes.benv.junerules.com/all/software/gnome-kankerbende/#comments</comments>
		<pubDate>Tue, 28 Jul 2009 01:13:20 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[gnome]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=45</guid>
		<description><![CDATA[RAaaah, I&#8217;d be soo happy if everyone collectively decided to drop this piece of twine into a big fire&#8230;. blegh.
So I want gmpc&#8230;. so I build libmpd, no issues at all. Libsoup is next, which somehow wants gnome-common or something because of CVS requirements or whatever its problem is today. So I try configure &#8211;without-gnome [...]]]></description>
			<content:encoded><![CDATA[<p>RAaaah, I&#8217;d be soo happy if everyone collectively decided to drop this piece of twine into a big fire&#8230;. blegh.</p>
<p>So I want gmpc&#8230;. so I build libmpd, no issues at all. Libsoup is next, which somehow wants gnome-common or something because of CVS requirements or whatever its problem is today. So I try configure &#8211;without-gnome and it breaks. Ok, that&#8217;s obviously the fault of libsoup, however, I decide to go through with the gnome garbage once more and make the fatal mistake of trying to build those things.</p>
<p>gnome-common goes without much issues. (oh, needless to say I always take the last version I find, 2.26 today I think). Next it seems to need libproxy, also no issues. Orbit(ch)-2  is next, also goes without hassle. So far so good <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>But then, GConf. That monstrosity requires 12837189347 other things, but worse: THEY NEED TO BE RECENT! (of course the simple solution would be to downgrade it, but that&#8217;s for later). So we start&#8230; &#8221; No package &#8216;polkit-dbus&#8217; found&#8221;. Great. So I get Policykit, 0.93. But nooo, that needs eggdbus. FINE! So eggdbus it is (0.5), but nooo, that needs a more recent version of $something. Version 0.4 it is! &#8220;Requested &#8216;glib-2.0 &gt;= 2.19.0&#8242; but version of GLib is 2.18.4&#8243; RAAAH!@#(!@#%*(@#.  (long live slackbuild, speeds things up a ton!)</p>
<p>Yeah, right now I&#8217;m getting pretty tired of gnome again&#8230; why was I building all this crap? And I&#8217;m not even halfway there. Probably a good thing to continue tomorrow on a fresh brain&#8230;. and I&#8217;ll be sure to take 3 year old versions then. Or maybe 1 year old, since the 3 year old garbage doesn&#8217;t build with recent compilers. *sigh* <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/gnome-kankerbende/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Slackbuild.pl</title>
		<link>http://notes.benv.junerules.com/all/software/slackbuild-pl/</link>
		<comments>http://notes.benv.junerules.com/all/software/slackbuild-pl/#comments</comments>
		<pubDate>Mon, 27 Jul 2009 20:22:56 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Slackbuild.pl]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[slackware]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=37</guid>
		<description><![CDATA[Just wrote a page about my latest tool &#8211; slackbuild.pl
Go view it if you run slackware, or get bent if you run anything else.
]]></description>
			<content:encoded><![CDATA[<p>Just wrote a page about my latest tool &#8211; <a title="Slackbuild.pl" href="http://notes.benv.junerules.com/slackbuild-pl/" target="_self">slackbuild.pl</a></p>
<p>Go view it if you run slackware, or get bent if you run anything else.</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/slackbuild-pl/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>France/germany terrorized by car stealing Zelda Wallmasters!</title>
		<link>http://notes.benv.junerules.com/all/fun/francegermany-terrorized-by-car-stealing-zelda-wallmasters/</link>
		<comments>http://notes.benv.junerules.com/all/fun/francegermany-terrorized-by-car-stealing-zelda-wallmasters/#comments</comments>
		<pubDate>Mon, 27 Jul 2009 17:32:42 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Fun]]></category>
		<category><![CDATA[Signs]]></category>
		<category><![CDATA[zelda]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=23</guid>
		<description><![CDATA[As a hobby I make pictures of &#8216;funny&#8217; signs whenever I have the chance. Ran into this one when we were on a camping trip in france (near the german border though, guess that explains the language of the sign). Apparently they steal cars there&#8230; wonder if they bring them to the start of the [...]]]></description>
			<content:encoded><![CDATA[<p>As a hobby I make pictures of &#8216;funny&#8217; signs whenever I have the chance. Ran into this one when we were on a camping trip in france (near the german border though, guess that explains the language of the sign). Apparently they steal cars there&#8230; wonder if they bring them to the start of the &#8220;level&#8221;&#8230; (country? <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> )</p>
<p><img class="alignnone size-full wp-image-20" title="zelda-hand" src="http://notes.benv.junerules.com/wp-content/uploads/2009/07/zelda-hand.png" alt="zelda-hand" width="338" height="511" /></p>
<p>For comparison, here&#8217;s the original <a href="http://zelda.wikia.com/wiki/Wallmaster">Wallmaster</a> image from Zelda (stolen from a zelda wiki, thanks guys, feel free to steal this one back :-p):</p>
<p><img class="alignnone size-full wp-image-22" title="LOZ_NES_Wallmaster" src="http://notes.benv.junerules.com/wp-content/uploads/2009/07/LOZ_NES_Wallmaster.png" alt="LOZ_NES_Wallmaster" width="72" height="72" /></p>
<p><img class="alignnone size-full wp-image-21" title="Wallmaster" src="http://notes.benv.junerules.com/wp-content/uploads/2009/07/Wallmaster.png" alt="Wallmaster" width="118" height="82" /></p>
<p><img class="alignnone size-full wp-image-25" title="Wallmaster" src="http://notes.benv.junerules.com/wp-content/uploads/2009/07/Wallmaster.jpg" alt="Wallmaster" width="512" height="384" /></p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/fun/francegermany-terrorized-by-car-stealing-zelda-wallmasters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DNS entries</title>
		<link>http://notes.benv.junerules.com/all/morons/dns-entries/</link>
		<comments>http://notes.benv.junerules.com/all/morons/dns-entries/#comments</comments>
		<pubDate>Mon, 27 Jul 2009 16:22:55 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Morons]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/morons/dns-entries/</guid>
		<description><![CDATA[Stupid fscking @#$*$^(*@!%&#8230;.
Why, oh why, do people leave out the A record for a domain without subdomains?
Mutt.org, I&#8217;m looking at you!
]]></description>
			<content:encoded><![CDATA[<p>Stupid fscking @#$*$^(*@!%&#8230;.</p>
<p>Why, oh why, do people leave out the A record for a domain without subdomains?<br />
<a href="http://mutt.org">Mutt.org</a>, I&#8217;m looking at you!</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/morons/dns-entries/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Useful tools</title>
		<link>http://notes.benv.junerules.com/all/daily/useful-tools/</link>
		<comments>http://notes.benv.junerules.com/all/daily/useful-tools/#comments</comments>
		<pubDate>Mon, 27 Jul 2009 16:19:35 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Boring]]></category>
		<category><![CDATA[grub2]]></category>
		<category><![CDATA[uuid]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/daily/useful-tools/</guid>
		<description><![CDATA[Lotjuh was messing around with grub2 and its config&#8230;. fun!
Anyway, a nice tool to figure out uuids of block devices: blkid. (gives a nice overview per block device&#8230; you probably need to be root for it to work though)
Alternative: findfs, so you can search for a label or uuid.
Let is be known that grub2 is [...]]]></description>
			<content:encoded><![CDATA[<p>Lotjuh was messing around with grub2 and its config&#8230;. fun!</p>
<p>Anyway, a nice tool to figure out uuids of block devices: blkid. (gives a nice overview per block device&#8230; you probably need to be root for it to work though)<br />
Alternative: findfs, so you can search for a label or uuid.</p>
<p>Let is be known that grub2 is a kutproduct as far as documentation is concerned&#8230; but that&#8217;s no surprise given it&#8217;s infancy status <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> <br />
Works pretty good so far though, once you get the grub.cfg etc right. Also works with my ext4 partition these days (required a svn up and recompile/reinstall though)</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/daily/useful-tools/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wordpress bumps</title>
		<link>http://notes.benv.junerules.com/all/software/wordpress-bumps/</link>
		<comments>http://notes.benv.junerules.com/all/software/wordpress-bumps/#comments</comments>
		<pubDate>Mon, 27 Jul 2009 15:09:20 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=10</guid>
		<description><![CDATA[I see I found another product that doesn&#8217;t do what I want  
Obviously since I use a non default browser (Opera, usually the latest beta/alpha/snapshot of the day) the themes are slightly weird.
Either that or the authors are blind, but heck, I can live with that.
So I create a post, &#8220;guess&#8221; where to fill [...]]]></description>
			<content:encoded><![CDATA[<p>I see I found another product that doesn&#8217;t do what I want <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Obviously since I use a non default browser (Opera, usually the latest beta/alpha/snapshot of the day) the themes are slightly weird.</p>
<p>Either that or the authors are blind, but heck, I can live with that.</p>
<p>So I create a post, &#8220;guess&#8221; where to fill out the subject etc (tab works wonders)  and fill out some tags.</p>
<p>And the fucking product creates 1 huge tag called &#8220;apache2 htaccess rewrite&#8221;. RAAH..  Of course I could learn to read and simply use comma&#8217;s &#8230; <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>However, fixing this mess is less trivial&#8230; guess I&#8217;ll simply recreate them.</p>
<p>Other than that, it seems like it&#8217;s pretty decent software <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Even the plugins have an auto-install, good, good. &#8230;.</p>
<p>KANKER, wat nou weer&#8230; oh, seems like it needs write permissions on the -entire- vhost dir. Fine, be like that.</p>
<p>(I figured the plugins dir would be enough)&#8230; of course a (s)ftp  fallback is nice, but I prefer the autoinstall <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>After a little chown it works.</p>
<p>Another major malfunction in this piece of garbage: somehow they expect me to be able to read and edit PHP in order to adjust my themes.</p>
<p>What the fuck guys, get the fuck out of here with that stupid welcome box. Yeah sure I know php, but I&#8217;m sure others don&#8217;t.  Either make it easy for your users with AJAX-y widgets etc, or hand them a php editor&#8230; (but fine, I removed it)</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/wordpress-bumps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache2, vhost config and .htaccess</title>
		<link>http://notes.benv.junerules.com/all/software/apache2-vhost-config-and-htaccess/</link>
		<comments>http://notes.benv.junerules.com/all/software/apache2-vhost-config-and-htaccess/#comments</comments>
		<pubDate>Mon, 27 Jul 2009 14:52:09 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[apache2]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[rewrite]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/software/apache2-vhost-config-and-htaccess/</guid>
		<description><![CDATA[As usual this doesn&#8217;t work automagically (unless you&#8217;re lazy and put AllowOverride All in your vhost configs).
Wordpress wanted RewriteEngine on, but of course this disabled itself since apache didn&#8217;t like it with my default permissions.
So:
To allow Rewrite stuff in the .htaccess file, put &#8216;FileInfo&#8217; and &#8216;FollowSymlinks&#8217; (or SymLinksifOwnerMatch) in AllowOverride.
(of course putting the rewrite stuff [...]]]></description>
			<content:encoded><![CDATA[<p>As usual this doesn&#8217;t work automagically (unless you&#8217;re lazy and put AllowOverride All in your vhost configs).<br />
Wordpress wanted RewriteEngine on, but of course this disabled itself since apache didn&#8217;t like it with my default permissions.<br />
So:</p>
<p>To allow Rewrite stuff in the .htaccess file, put &#8216;FileInfo&#8217; and &#8216;FollowSymlinks&#8217; (or SymLinksifOwnerMatch) in AllowOverride.</p>
<p>(of course putting the rewrite stuff in the vhost config is faster than the .htaccess stuff, but who cares)</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/apache2-vhost-config-and-htaccess/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Notes intalled!</title>
		<link>http://notes.benv.junerules.com/all/software/notes-intalled/</link>
		<comments>http://notes.benv.junerules.com/all/software/notes-intalled/#comments</comments>
		<pubDate>Mon, 27 Jul 2009 14:26:25 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/uncategorized/notes-intalled/</guid>
		<description><![CDATA[Welcome, (or not), to BenV&#8217;s notes!
Finally a place to dump rants  
Still messing around with the layout etc of this place, but it should become stable real soon &#8482;.
As you&#8221;ve probably noticed, this site is running a pretty default wordpress install. Let&#8217;s see what it turns into  
]]></description>
			<content:encoded><![CDATA[<p>Welcome, (or not), to BenV&#8217;s notes!</p>
<p>Finally a place to dump rants <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Still messing around with the layout etc of this place, but it should become stable real soon &#8482;.</p>
<p>As you&#8221;ve probably noticed, this site is running a pretty default wordpress install. Let&#8217;s see what it turns into <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/notes-intalled/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
