<?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>dririan&#039;s Blog</title>
	<atom:link href="http://dririan.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://dririan.com</link>
	<description>A blog by me, dririan</description>
	<lastBuildDate>Sat, 17 Nov 2012 09:34:18 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.6-beta3-24432</generator>
		<item>
		<title>Why I Don&#8217;t Use GPL-style &#8220;or any later version&#8221;</title>
		<link>http://dririan.com/2012/11/why-i-dont-use-any-later-version/</link>
		<comments>http://dririan.com/2012/11/why-i-dont-use-any-later-version/#comments</comments>
		<pubDate>Sat, 17 Nov 2012 05:03:27 +0000</pubDate>
		<dc:creator>dririan</dc:creator>
				<category><![CDATA[Thoughts]]></category>

		<guid isPermaLink="false">http://dririan.com/?p=14</guid>
		<description><![CDATA[This post is long overdue. Quite a few people have asked me while all of the software I create does not have the &#8220;or (at your option) any later version&#8221; that the FSF seems to suggest. (I am not against &#8230; <a href="http://dririan.com/2012/11/why-i-dont-use-any-later-version/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>This post is long overdue. Quite a few people have asked me while all of the software I create does <em>not</em> have the &#8220;or (at your option) any later version&#8221; that the FSF seems to suggest. (I am not against contributing to projects that do have that clause, however.) This post will explain my reasoning, and hopefully cause others to see the potential problems with it. I am absolutely not against people using this clause in general; I merely want them to be fully aware of what they&#8217;re getting into before doing so. Also, please note that this applies to <em>any</em> license where an &#8220;any later version&#8221; clause is used, including the GFDL. I&#8217;m not just talking about software.</p>
<p><strong>Please note that I am not a lawyer and this is not legal advice</strong>.<br />
<span id="more-14"></span><br />
The standard boilerplate text that the FSF provides (<a href="https://www.gnu.org/licenses/gpl.html">here</a> [gnu.org], for reference, under the &#8220;How to Apply These Terms to Your New Programs&#8221; section) includes the clause &#8220;or (at your option) any later version.&#8221; I believe this clause to be dangerous to apply to any sort of project.</p>
<p>First, let&#8217;s examine the benefits. The FSF (rarely, admittedly) releases new versions of their licenses from time to time. Because of the nature of their licenses (strong copyleft), new versions are generally incompatible with older ones. This is because the licenses don&#8217;t allow you to add more restrictions past what they already do, and the newer licenses normally do (anti-tivoization in the GPLv3, etc.), which isn&#8217;t necessarily a bad thing. By having the &#8220;any later version&#8221; clause, developers that wish to use your code along with code under a newer license are able to do so, because they can take the &#8220;any later version&#8221; option, and effectively re-license your project under the new license. Keeping licenses compatible is generally considered a Good Thing.</p>
<p>That being said, there is one <em>huge</em> downside. By having such a clause, any newer version of whatever license you use is automatically usable with your project. Most programmers don&#8217;t intentionally place backdoors in their programs (the white hat programmers, anyway). If you use the &#8220;any later version&#8221; clause, though, you&#8217;re giving the FSF a backdoor into your project&#8217;s license.</p>
<p>Worse yet, the FSF has <em>already used this clause to do something against the spirit of the license</em>. Wikipedia was relicensed some time ago from the <a href="https://www.gnu.org/copyleft/fdl.html">GFDL</a> [gnu.org] to the <a href="https://creativecommons.org/licenses/by-sa/3.0/">CC BY-SA 3.0</a> [creativecommons.org] license. Here&#8217;s the short story: Wikipedia voted to move from the GFDL to the BY-SA. The caveat was that they&#8217;d have to get the approval from <em>every person that contributed</em> to Wikipedia. Obviously, that&#8217;s pretty unpractical. The only other option would be rewriting everything from scratch under an explicit BY-SA license. Again, rewriting all of Wikipedia is pretty unpractical. The Wikimedia Foundation (the organization that runs Wikipedia) convinced the FSF to let them re-license to BY-SA. Hopefully, this article&#8217;s title alone should tell you how they did it. The GFDL 1.2 was released, with the addition of the &#8220;RELICENSING&#8221; section. If you wish, you can click on the GFDL link above, and search for &#8220;relicensing&#8221; to see the terms for yourself. They gave Wikipedia (actually, <em>any</em> public wiki or any wiki-like site) permission to relicense everything under the BY-SA for a limited window of time. I haven&#8217;t heard of any other sites using this to relicense, but it certainly is far from impossible. By doing this, the FSF used a backdoor to carry out the wishes of the Wikimedia Foundation. If you consider Wikimedia getting what it wanted (relicensing to the BY-SA) to be good, this is a good outcome. However, what of the writers? Perhaps (given the sheer number of them, no doubt) some of them actively did not want the content relicensed to the BY-SA. There was a reasonable expectation that by contributing to a GFDL project (without copyright assignment) that their contribution would stay GFDL.</p>
<p>Actually, the relicensing affected people that weren&#8217;t even a contributor to Wikipedia. Before the license change, Wikipedia was legally permitted to (and did) pull content from other sources that were licensed under the GFDL and add it to its own pool of content. Just by having your content added to Wikipedia, whatever was added to Wikipedia <em>at any point</em> before the license change is now permanently available under BY-SA. (If the content was added after the license change, it was already BY-SA, or a copyright violation.) Because the BY-SA is a non-revocable license (as it should be), people can pull content from any point in the past and use it under the BY-SA. <em>Any</em> content at all is now free game.</p>
<p>The exact same problem can happen with software projects. If a project is allowed to relicense to something else, and they incorporated part of another project&#8217;s code, that project now has effectively released some (or all, depending on how much was incorporated) of its code under a license that they never chose against their will. No one else has that power. Even if Linus Torvalds wanted to, he couldn&#8217;t license the Linux kernel under the GPLv3. Most contributions are GPLv2 only, meaning they can&#8217;t be incorporated in a GPLv3 work. This gives the FSF an unprecedented, and completely unreasonable, amount of power over any project&#8217;s licensing that uses the &#8220;any later version&#8221; clause.</p>
<p>It could be worse, though. Even if you use the &#8220;any later version&#8221; clause, anyone is still able to use your project under any version of the license newer than, <em>or equal to</em>, the original license. So if your project is GPLv3 or newer, and the GPLv4 says &#8220;you cannot use this software ever&#8221; (doubtful, but the point is clear) then people can still use your software under the GPLv4. Of course, if there&#8217;s something else in the GPLv4 that you don&#8217;t agree with, there&#8217;s no out for you. Anyone in the world is welcome to use your project under the GPLv4. Possibly the worst-case scenario is a version of the GPL being released that is equivalent to a BSD-style license. Granted, Stallman most likely would never let that happen, but he won&#8217;t be around forever. There is another very frightening possibility, though. Humans make mistakes (even lawyers!) and the FSF is no exception. A newer version of the GPL could <em>accidentally</em> slip in something nasty, that gets abused by some other lawyers to do something that no one intended. Even if you fully trust the FSF, even enough to give them complete control over your project, it&#8217;s still possible for them to make a mistake, and if they do, I have no doubt that someone somewhere out there will abuse it to go against the spirit of the GPL.</p>
<p>There is one bright side to all of this, though. Not a single bit of it has been tested in court. If something bad does get into a GPL release, it&#8217;s entirely possible that the courts would throw it out based on intent. To the best of my knowledge, the &#8220;any later version&#8221; clause itself has never been tested in court. (If I&#8217;m wrong on this, please feel free to point me to a case where it has been tested.) For all we know, the clause itself wouldn&#8217;t hold up to judicial scrutiny. Even with the possibility of the court throwing either the clause or a hypothetical newer license out, why take the chance? Most people that use the GPL do it, either directly  or indirectly, to make sure the time they sunk into their project doesn&#8217;t go to waste by some entity taking their code, making it proprietary, and contributing nothing in return. Why risk having all that work undone because a new version of the GPL has something nasty in it?</p>
<p>The one other thing that disturbs me that I haven&#8217;t yet mentioned (and I only will briefly) is that it goes against <a href="http://opensource.org/osd">The Open Source Definition</a> [opensource.org], specifically &#8220;No Discrimination Against Persons or Groups.&#8221; The relicensing section of the GFDL only applies to what they call an &#8220;MMC Site&#8221; (Massive Multiauthor Collaboration), which is a fancy way of saying wiki. If I had incorporated GFDL content on this blog, I would not be free to relicense it under the BY-SA. While they didn&#8217;t specifically mention Wikipedia or the Wikimedia Foundation, they absolutely did discriminate against a group of people: everyone that&#8217;s not using a wiki. Why this blatant discrimination was never touched upon is beyond me.</p>
<p>tl;dr The &#8220;any later version&#8221; clause gives the creator of the license a licensing backdoor that lets them do whatever they want to your project&#8217;s license (including relicensing it under something else entirely).</p>
<p>Thanks for reading,<br />
dririan</p>
]]></content:encoded>
			<wfw:commentRss>http://dririan.com/2012/11/why-i-dont-use-any-later-version/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using boot0cfg on FreeBSD to configure the bootloader</title>
		<link>http://dririan.com/2012/07/using-boot0cfg/</link>
		<comments>http://dririan.com/2012/07/using-boot0cfg/#comments</comments>
		<pubDate>Sat, 14 Jul 2012 07:00:36 +0000</pubDate>
		<dc:creator>dririan</dc:creator>
				<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[Information]]></category>

		<guid isPermaLink="false">https://dririan.com/?p=13</guid>
		<description><![CDATA[FreeBSD has a bootloader vastly different than GRUB or LILO. The equivalent of stage1 in GRUB (which is used to locate the rest of GRUB and load it) is boot0 in FreeBSD, which is actually used to directly chainload Windows &#8230; <a href="http://dririan.com/2012/07/using-boot0cfg/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>FreeBSD has a bootloader vastly different than GRUB or LILO. The equivalent of stage1 in GRUB (which is used to locate the rest of GRUB and load it) is boot0 in FreeBSD, which is actually used to directly chainload Windows (or any other dual boot setup using the FreeBSD bootloader). The problem with boot0 is that, because it fits entirely in the MBR&#8217;s boot code area (which is 440 bytes), it doesn&#8217;t load a configuration file at all. FreeBSD still gives you a way to configure it, however, with <a href="http://www.freebsd.org/cgi/man.cgi?query=boot0cfg"><code>boot0cfg</code></a>. Read on for a simple tutorial on the basics of <code>boot0cfg</code>.<br />
<span id="more-13"></span><br />
With <code>boot0cfg</code>, you can easily hide partitions from the <code>boot0</code> menu. For example, Windows 7 uses two NTFS partitions (one is the &#8220;System Reserved Partition&#8221;, and the other is the C: partition), but only the System Reserved Partition is bootable. On my system, the partition order is:<br />
<code><br />
/dev/ada0s1 System Reserved Partition<br />
/dev/ada0s2 C:<br />
/dev/ada0s3 FreeBSD slice<br />
</code><br />
Booting from <code>/dev/ada0s2</code> (F2 in <code>boot0</code>) doesn&#8217;t work, so let&#8217;s hide it from the list of partitions. <code>boot0cfg</code> lets you set a mask that <code>boot0</code> will use to determine what partitions to show. The mask is a hexadecimal number from 0&#215;0 (all disabled) to 0xf (all enabled). In the example above, partitions 1 and 3 should be enabled, so the mask is 0b0101, or 0&#215;5. The right-most bit is partition 1, and the left-most bit is partition 4.</p>
<p>This is a table for the different masks you can use:</p>
<table>
<tbody>
<tr>
<td><strong>Part. 1</strong></td>
<td><strong>Part. 2</strong></td>
<td><strong>Part. 3</strong></td>
<td><strong>Part. 4</strong></td>
<td><strong>Mask</strong></td>
</tr>
<tr>
<td>enabled</td>
<td>disabled</td>
<td>disabled</td>
<td>disabled</td>
<td>0&#215;1</td>
</tr>
<tr>
<td>disabled</td>
<td>enabled</td>
<td>disabled</td>
<td>disabled</td>
<td>0&#215;2</td>
</tr>
<tr>
<td>enabled</td>
<td>enabled</td>
<td>disabled</td>
<td>disabled</td>
<td>0&#215;3</td>
</tr>
<tr>
<td>disabled</td>
<td>disabled</td>
<td>enabled</td>
<td>disabled</td>
<td>0&#215;4</td>
</tr>
<tr>
<td>enabled</td>
<td>disabled</td>
<td>enabled</td>
<td>disabled</td>
<td>0&#215;5</td>
</tr>
<tr>
<td>disabled</td>
<td>enabled</td>
<td>enabled</td>
<td>disabled</td>
<td>0&#215;6</td>
</tr>
<tr>
<td>enabled</td>
<td>enabled</td>
<td>enabled</td>
<td>disabled</td>
<td>0&#215;7</td>
</tr>
<tr>
<td>disabled</td>
<td>disabled</td>
<td>disabled</td>
<td>enabled</td>
<td>0&#215;8</td>
</tr>
<tr>
<td>enabled</td>
<td>disabled</td>
<td>disabled</td>
<td>enabled</td>
<td>0&#215;9</td>
</tr>
<tr>
<td>disabled</td>
<td>enabled</td>
<td>disabled</td>
<td>enabled</td>
<td>0xa</td>
</tr>
<tr>
<td>enabled</td>
<td>enabled</td>
<td>disabled</td>
<td>enabled</td>
<td>0xb</td>
</tr>
<tr>
<td>disabled</td>
<td>disabled</td>
<td>enabled</td>
<td>enabled</td>
<td>0xc</td>
</tr>
<tr>
<td>enabled</td>
<td>disabled</td>
<td>enabled</td>
<td>enabled</td>
<td>0xd</td>
</tr>
<tr>
<td>disabled</td>
<td>enabled</td>
<td>enabled</td>
<td>enabled</td>
<td>0xe</td>
</tr>
<tr>
<td>enabled</td>
<td>enabled</td>
<td>enabled</td>
<td>enabled</td>
<td>0xf</td>
</tr>
</tbody>
</table>
<p>Once you know what mask you need to use, run <code>boot0cfg -m $MASK /dev/$DISK</code>, replacing <code>$MASK</code> with the mask in the table above, and <code>$DISK</code> with the disk you want to configure. The disk should be the disk, not a partition (for example, <code>/dev/ada0</code> instead of <code>/dev/ada0s1</code>). In our example above, the command would be <code>boot0cfg -m 0x5 /dev/ada0</code>. The next time you reboot, you should only see the enabled partitions. The mask won&#8217;t, however, force a partition <code>boot0</code> wouldn&#8217;t normally show to be shown. It is only capable of disabling partitions that <code>boot0</code> normally shows.</p>
<p>An important note: <strong>you cannot boot from disabled partitions, at all!</strong> Trying to hit the key for a disabled partition just results in <code>boot0</code> printing <code>#</code> and waiting for another key to be pressed.</p>
]]></content:encoded>
			<wfw:commentRss>http://dririan.com/2012/07/using-boot0cfg/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Switched (Back) to Apache from Cherokee – Part 2: mod_macro</title>
		<link>http://dririan.com/2012/05/switched-back-to-apache-from-cherokee-part-2-mod_macro/</link>
		<comments>http://dririan.com/2012/05/switched-back-to-apache-from-cherokee-part-2-mod_macro/#comments</comments>
		<pubDate>Tue, 01 May 2012 06:36:19 +0000</pubDate>
		<dc:creator>dririan</dc:creator>
				<category><![CDATA[HOWTO]]></category>

		<guid isPermaLink="false">https://dririan.com/?p=11</guid>
		<description><![CDATA[In the last post, I discussed my reasoning for switching back to Apache from Cherokee. In this post, I&#8217;ll be talking about mod_macro [cri.ensmp.fr], and how it makes configuring Apache fairly easy, and making tweaks dead simple. One of the big &#8230; <a href="http://dririan.com/2012/05/switched-back-to-apache-from-cherokee-part-2-mod_macro/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>In the <a title="Switched (Back) to Apache from Cherokee – Part 1: Reasoning" href="https://dririan.com/2012/04/switched-back-to-apache-from-cherokee-part-1-reasoning/">last post</a>, I discussed my reasoning for switching back to Apache from Cherokee. In this post, I&#8217;ll be talking about <a href="http://www.cri.ensmp.fr/~coelho/mod_macro/"><code>mod_macro</code></a> [cri.ensmp.fr], and how it makes configuring Apache fairly easy, and making tweaks dead simple. One of the big complains about Apache is the difficulty in making changes to all virtual hosts on a server. <code>mod_macro</code> not only makes adding new virtual servers easy, it makes tweaking all of them trivial. Read on for a quick tutorial on <code>mod_macro</code>.</p>
<p><span id="more-11"></span><br />
The first step, of course, is to install <code>mod_macro</code>. Both Debian and Ubuntu include mod_macro as <code>libapache2-mod-macro</code>, so it&#8217;s just an <code>apt-get install libapache2-mod-macro</code> away. It&#8217;s also included in Gentoo as <code>www-apache/mod_macro</code>.</p>
<p>Next, make sure you enable <code>mod_macro</code> in your Apache configuration. This part is distro dependent as well. On Debian and Ubuntu, run <code>a2enmod macro</code>. In Gentoo, add <code>-DMACRO</code> to Apache&#8217;s command-line options in <code>/etc/conf.d/apache</code>.</p>
<p>Once <code>mod_macro</code> is enabled, you can define your own macros. For the sake of brevity, I won&#8217;t be telling you where to put these configuration snippets. In Debian/Ubuntu I use <code>/etc/apache2/sites-available/{macros,vhosts}</code> to define my macros and use them, respectively, and symlink them to <code>/etc/apache2/sites-enabled/{000-macros,010-vhosts}</code> respectively.</p>
<p>Macros are defined in <code>Macro</code> blocks, for example:</p>
<pre>&lt;Macro MacroName $arg1 $arg2&gt;
    SomeStatement $arg1
    SomeOtherStatement $arg2
&lt;/Macro&gt;</pre>
<p>You can then use the macro with <code>Use MacroName foo bar</code>, which would be equivalent to:</p>
<pre>SomeStatement foo
SomeOtherStatement bar</pre>
<p>It&#8217;s important to note that <code>mod_macro</code> doesn&#8217;t actually write the expanded macros to a file. The expansions will only be seen by Apache itself, though you can use <a href="https://httpd.apache.org/docs/trunk/mod/mod_info.html"><code>mod_info</code></a> [httpd.apache.org] to dump the configuration, which will show you the expanded macros.</p>
<p>A naive implementation of HTTP and HTTPS virtual hosts would use duplicated configuration, such as:</p>
<pre>&lt;Macro HTTPandHTTPSMacro $name&gt;
    &lt;VirtualHost *:80&gt;
        ServerName $name
    &lt;/VirtualHost&gt;
    &lt;VirtualHost *:443&gt;
        ServerName $name
    &lt;/VirtualHost&gt;
&lt;/Macro&gt;</pre>
<p>Obviously, that&#8217;s an over-simplified example. The difference is much more pronounced in real-world configurations. On my servers, I use a uniform layout, where the document root is <code>/srv/www/$host/htdocs</code>, the HTTPS private key is <code>/etc/ssl/private/$host.key</code>, and the HTTPS public key is <code>/etc/ssl/private/$host.crt</code>. You can nest macros and insert them in other contexts, so my macros look like this:</p>
<pre>&lt;Macro PHPVHostMixin $host&gt;
    ServerName $host
    DocumentRoot /srv/www/$host/htdocs

    AddHandler application/x-httpd-php5 .php

    &lt;Directory /srv/www/$host/htdocs&gt;
        Order allow,deny
        Allow from all
        AllowOverride All
    &lt;/Directory&gt;
&lt;/Macro&gt;
&lt;Macro PHPVHost $host&gt;
    &lt;VirtualHost *:80&gt;
        Use PHPVHostMixin $host
    &lt;/VirtualHost&gt;
    &lt;VirtualHost *:443&gt;
        Use PHPVHostMixin $host

        SSLEngine On
        SSLCertificateFile    /etc/ssl/private/$host.crt
	SSLCertificateKeyFile /etc/ssl/private/$host.key
    &lt;/VirtualHost&gt;
&lt;/Macro&gt;</pre>
<p>Once you get your macros set up, you can just add <code>Use PHPVHost dririan.com</code> to your configuration file to add a new virtual host! While there may be more work initially, if you ever have to change your configuration, things will be much easier. Editing all PHP virtual hosts in Cherokee means logging into <code>cherokee-admin</code> and manually tweaking every single virtual host. With <code>mod_macro</code>, you can tweak the macro and every virtual host will be updated with it. As usual, any changes to your macros requires you to reload Apache&#8217;s configuration.</p>
<p>If you have any questions or comments about using <code>mod_macro</code>, please post a comment below.</p>
<p>Thanks for reading,<br />
dririan</p>
]]></content:encoded>
			<wfw:commentRss>http://dririan.com/2012/05/switched-back-to-apache-from-cherokee-part-2-mod_macro/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Switched (Back) to Apache from Cherokee &#8211; Part 1: Reasoning</title>
		<link>http://dririan.com/2012/04/switched-back-to-apache-from-cherokee-part-1-reasoning/</link>
		<comments>http://dririan.com/2012/04/switched-back-to-apache-from-cherokee-part-1-reasoning/#comments</comments>
		<pubDate>Mon, 30 Apr 2012 22:09:45 +0000</pubDate>
		<dc:creator>dririan</dc:creator>
				<category><![CDATA[Announcement]]></category>

		<guid isPermaLink="false">https://dririan.com/?p=10</guid>
		<description><![CDATA[Sadly, the current version of the Cherokee web server [cherokee-project.com] has some serious outstanding flaws. Most notably, up until recently (where it was reverted in Chrome, not fixed in Cherokee) Chrome could not submit POST forms over HTTPS. Google said in the &#8230; <a href="http://dririan.com/2012/04/switched-back-to-apache-from-cherokee-part-1-reasoning/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Sadly, the current version of the <a href="http://www.cherokee-project.com/">Cherokee web server</a> [cherokee-project.com] has some serious outstanding flaws. Most notably, up until recently (where it was reverted in Chrome, not fixed in Cherokee) Chrome could not submit POST forms over HTTPS. Google said in the Chrome bug that web servers that were broken by this change didn&#8217;t conform to the SSL spec, and even after it was reverted, they say it was only reverted because quite a few servers still &#8220;broke&#8221; SSL specs. While Cherokee people (perhaps rightfully) said that Chrome shouldn&#8217;t have landed that change (and the change did hit stable very rapidly, due to Chrome&#8217;s rapid release schedule), having a web server that cannot accept POSTed data is unacceptable, no matter whose fault it is.</p>
<p>More over, there haven&#8217;t been any commits in the master branch of Cherokee&#8217;s source in over six months. The creator of Cherokee posted on the mailing list a week ago that he&#8217;s working on a totally new version, because most of the core code is being written to be more compatible with protocols like SPDY, and to fix &#8220;a few long standing SSL bugs.&#8221; Unfortunately, with no release (or even commits) at all being made in six months and with several fairly large bugs, I cannot continue to run Cherokee. Part of what I loved about Cherokee (aside from the gorgeous web administration interface) was the agility behind it: new versions with new features and bug fixes were released constantly. It felt much like Chrome does, including that serious bugs are very rare, and are usually patched out extremely quickly. The only serious bug I ever encountered with Cherokee was the HTTPS POST bug, which was technically only triggered by a change in Chrome, despite the former rapid releases.</p>
<p>So for these reasons, I have switched all of my web servers back to Apache from Cherokee. Personally, I probably won&#8217;t be switching back yet again once the new Cherokee with the rewritten core is released, but I know I won&#8217;t be recommending Cherokee for new servers at least until the new version is released, and even then probably not for heavy production use. The complete lack of communication (up until a couple of emails explaining the situation last week) makes me wary to use or recommend Cherokee in production.</p>
]]></content:encoded>
			<wfw:commentRss>http://dririan.com/2012/04/switched-back-to-apache-from-cherokee-part-1-reasoning/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Amazon Appstore QR Code</title>
		<link>http://dririan.com/2012/03/amazon-appstore-qr-code/</link>
		<comments>http://dririan.com/2012/03/amazon-appstore-qr-code/#comments</comments>
		<pubDate>Sat, 10 Mar 2012 03:51:44 +0000</pubDate>
		<dc:creator>dririan</dc:creator>
				<category><![CDATA[Information]]></category>

		<guid isPermaLink="false">http://dririan.com/?p=9</guid>
		<description><![CDATA[For some reason, Amazon doesn&#8217;t give you a direct link or QR code to get the APK for their Appstore; they only will send it to you over SMS or e-mail. So, here&#8217;s a QR code to grab the APK &#8230; <a href="http://dririan.com/2012/03/amazon-appstore-qr-code/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>For some reason, Amazon doesn&#8217;t give you a direct link or QR code to get the APK for their Appstore; they only will send it to you over SMS or e-mail. So, here&#8217;s a QR code to grab the APK straight from Amazon, using their <a href="http://amzn.to/getamazonappstore">official link</a> [amzn.to]:</p>
<p><img src="http://chart.apis.google.com/chart?cht=qr&amp;chs=230x230&amp;chld=M&amp;choe=UTF-8&amp;chl=http%3A%2F%2Famzn.to%2Fgetamazonappstore" alt="" /></p>
]]></content:encoded>
			<wfw:commentRss>http://dririan.com/2012/03/amazon-appstore-qr-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why RingyDingyDingy Can&#8217;t Support Gmail</title>
		<link>http://dririan.com/2012/01/why-ringydingydingy-cant-support-gmail/</link>
		<comments>http://dririan.com/2012/01/why-ringydingydingy-cant-support-gmail/#comments</comments>
		<pubDate>Mon, 30 Jan 2012 22:01:34 +0000</pubDate>
		<dc:creator>dririan</dc:creator>
				<category><![CDATA[Information]]></category>
		<category><![CDATA[RingyDingyDingy]]></category>

		<guid isPermaLink="false">http://dririan.com/?p=8</guid>
		<description><![CDATA[The two biggest feature requests for RingyDingyDingy pre-0.5 were Gmail and Google Voice integration. My goal was to implement them both for RDD 0.5&#8230; but, unfortunately, I could only implement Google Voice integration. It seems like this is going to &#8230; <a href="http://dririan.com/2012/01/why-ringydingydingy-cant-support-gmail/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>The two biggest feature requests for RingyDingyDingy pre-0.5 were Gmail and Google Voice integration. My goal was to implement them both for RDD 0.5&#8230; but, unfortunately, I could only implement Google Voice integration. It seems like this is going to be a long-term/permanent problem, as well, because Google intentionally caused this. Read on for why RDD can&#8217;t support Gmail.</p>
<p><span id="more-8"></span></p>
<p>Hopefully, if you have an Android phone, you&#8217;ve seen permissions in action before. Android uses them to tell you what an app can do (and nothing else). This system is great; it lets you easily tell if a random game you downloaded wants to read your contacts for some reason (hint: it&#8217;s probably bad) The Gmail app for Android uses permissions to control which apps can read or write emails through Gmail. This is excellent, as I don&#8217;t want some random app reading all my email. However, if I trusted an app with access to my email, apps could access your inbox through the <code>READ_GMAIL</code> permission. (It was shown as &#8220;Your messages &gt; read Gmail&#8221; in an app&#8217;s permission list.)</p>
<p>All was well in the Android world, as apps could freely use Gmail. Then, Google pushed an update to Gmail, which made <code>READ_GMAIL</code> only available to other Google apps. (For developers, the attribute <code>android:protectionLevel="signature"</code> was set in the manifest on the permission, and the <code>ContentProvider</code> requires the permission.) This caused half of the apps that used Gmail to outright crash (force close), and the other half to just fail. Google said that the apps that just failed were &#8220;designed properly&#8221;, because they do checks to make sure they have clearance to do what they want to do. In my opinion, while I believe that apps should gracefully degrade (some custom ROMs let you enable/disable individual apps, but stock Android makes you either install the app and accept all permissions, or don&#8217;t install it and accept none), no one actually does, including Google&#8217;s own examples.</p>
<p>As of now, there is <strong>no</strong> alternative or workaround to the problem. The absolute best an app can do is get notified when there is email, and how many unread messages there are. No more information can be obtained, such as the sender, subject, or body. Since there is no useful information to extract, RDD cannot support Gmail in its present state. There is a seriously hackish workaround for those that are desperate, however. You can pull the account username and password (which requires a few permissions of its own, including a few nasty ones that I wouldn&#8217;t give to any app I don&#8217;t absolutely trust) and use Gmail&#8217;s IMAP servers directly, just like the mail client you use on your computer (if you use one) does and monitor it independently from the Gmail app. Aside from all the extra effort (and permissions) this would require, there are two things that prevent me from doing so in RDD.</p>
<p>First, a big goal of mine is to avoid, at all costs, the <code>INTERNET</code> permission. Part of this is based on my own process for deciding if I&#8217;m going to install an app or not. If an app requests the <code>INTERNET</code> permission, the first thing I do is ask &#8220;Why does this app need Internet access?&#8221; and RingyDingyDingy somewhat fails that test. I&#8217;d be willing to give an app that I can trigger remotely <code>INTERNET</code> access, but it&#8217;s the next step in my process that RDD would get dropped. I look extra carefully at all of the permissions, and evaluate if I want that exposed to the Internet. RDD has four permissions right now: reading text messages (used to know when to ring or lock), the counterpart for Google Voice, sending text messages (used to respond to text messages giving confirmation or a reason why the command wasn&#8217;t completed), and reading contacts (used to look up someone&#8217;s name when a remote ring is triggered). An app that has those four permissions as well as <code>INTERNET</code> gets dropped immediately unless I completely trust the author.</p>
<p>Second, this would massively inflate the size of RDD. Because there&#8217;s built-in apps for e-mail, there is no IMAP/POP3 library in Android. All of the code to access Gmail&#8217;s servers would either need to be written by hand (a huge pain), or to be pulled from a library (most of which are huge). Right now, RDD manages to squeeze by in less than 64k, which it should. Pulling an IMAP library would make it in the megabyte range, so that won&#8217;t be happening unless absolutely critical.</p>
<p>Because Google Voice lets apps read incoming text messages (which it should, especially considering Android lets you do the same with plain text messages), there is now a working solution for triggering RDD on devices that aren&#8217;t a cellphone. Unless Gmail lets other apps access the mailbox, Gmail integration will not be coming to RDD.</p>
<p>Google&#8217;s own support forum is filled with developers having the same problem in <a href="https://www.google.com/support/forum/p/gmail/thread?tid=1728955d050a12bd&amp;hl=en">this thread</a> [google.com].</p>
]]></content:encoded>
			<wfw:commentRss>http://dririan.com/2012/01/why-ringydingydingy-cant-support-gmail/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RingyDingyDingy 0.5 released!</title>
		<link>http://dririan.com/2012/01/ringydingydingy-0-5-released/</link>
		<comments>http://dririan.com/2012/01/ringydingydingy-0-5-released/#comments</comments>
		<pubDate>Mon, 30 Jan 2012 21:31:31 +0000</pubDate>
		<dc:creator>dririan</dc:creator>
				<category><![CDATA[Announcement]]></category>
		<category><![CDATA[RingyDingyDingy]]></category>

		<guid isPermaLink="false">http://dririan.com/?p=7</guid>
		<description><![CDATA[I&#8217;ve just published RingyDingyDingy version 0.5 to the Android Market. I re-published it a few days ago after a long hiatus, and brought it back as a FOSS app. Before publicizing it, I wanted to give it some time to &#8230; <a href="http://dririan.com/2012/01/ringydingydingy-0-5-released/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve just published RingyDingyDingy version 0.5 to the Android Market. I re-published it a few days ago after a long hiatus, and brought it back as a FOSS app. Before publicizing it, I wanted to give it some time to settle down, and add a few wishlist features. Well, it&#8217;s now at a state that I feel comfortable with, and has most of the features I wanted to add.</p>
<p>That being said, you can grab it from the Android Market <a href="https://market.android.com/details?id=com.dririan.RingyDingyDingy">here</a> [market.android.com], and the Google Code page is <a href="https://code.google.com/p/ringydingydingy/">here</a> [code.google.com]. If you don't have access to the Market, you can also grab the APK from the Google Code page.</p>
<p>Finally, I'll be posting more here over the next few days about what I've learned on the way to RDD 0.5.</p>
]]></content:encoded>
			<wfw:commentRss>http://dririan.com/2012/01/ringydingydingy-0-5-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Serving Mercurial repositories with hgweb and mercurial-server</title>
		<link>http://dririan.com/2011/12/serving-mercurial-repositories-with-hgweb-and-mercurial-server/</link>
		<comments>http://dririan.com/2011/12/serving-mercurial-repositories-with-hgweb-and-mercurial-server/#comments</comments>
		<pubDate>Wed, 28 Dec 2011 01:42:29 +0000</pubDate>
		<dc:creator>dririan</dc:creator>
				<category><![CDATA[HOWTO]]></category>

		<guid isPermaLink="false">http://dririan.com/?p=6</guid>
		<description><![CDATA[I really like using mercurial-server [lshift.net] for hosting my Mercurial repositories. Because it uses SSH and public keys, it&#8217;s quite secure, and works well with multiple users. However, it doesn&#8217;t have public access for pulling repositories. For that reason, I &#8230; <a href="http://dririan.com/2011/12/serving-mercurial-repositories-with-hgweb-and-mercurial-server/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>I really like using <a href="http://www.lshift.net/mercurial-server.html" target="_blank"><code>mercurial-server</code></a> [lshift.net] for hosting my Mercurial repositories. Because it uses SSH and public keys, it&#8217;s quite secure, and works well with multiple users. However, it doesn&#8217;t have public access for pulling repositories. For that reason, I also use <code>hgweb</code> (shipped with Mercurial) to make my repositories publicly accessible and pullable, especially with the highlight module (also shipped with Mercurial) that uses <a href="http://pygments.org/" target="_blank">Pygments</a> [pygments.org] for syntax highlighting.</p>
<p>So in this post, I&#8217;ll be explaining how to use <code>mercurial-server</code> to host your repositories, while also having them publicly browsable and pullable with <code>hgweb</code>. I&#8217;ll also be demonstrating how to hide repositories from <code>hgweb</code>, while still keeping them working with <code>mercurial-server</code>.</p>
<p><span id="more-6"></span></p>
<p>First, I assume you have a working <code>mercurial-server</code> set up. If you do not, the documentation for it is available <a href="http://dev.lshift.net/paul/mercurial-server/docbook.html" target="_blank">here</a> [dev.lshift.net].</p>
<p>To have <code>hgweb</code> serve our repositories, we must first make a configuration file for <code>hgweb</code>. The configuration file should look like this:</p>
<pre>[collections]
/var/lib/mercurial-server/repos/ = /var/lib/mercurial-server/repos/

[extensions]
hgext.highlight =

[web]
allow_archive = bz2
pygments_style = vs
style = monoblue</pre>
<p>You can, of course, tweak this configuration to meet your needs. The <code>[collections]</code> section should stay the same, however, unless your <code>mercurial-server</code> saves the repositories in a non-default folder.</p>
<p>You can also disable the <code>highlight</code> extension by removing the <code>[extensions]</code> section and the <code>hgext.highlight</code> line. You need to do this, for example, if you do not have the Pygments library installed. However, I highly recommend it for browsing the source code. The <code>pygments_style</code> line should also be removed if you disable the highlight extension. I like the <code>vs</code> style (Visual Studio), but there are quite a few different styles that Pygment has out of the box. If you want to see the styles available to you, run the Python interpreter (<code>python</code>) and run:</p>
<pre>from pygments.styles import get_all_styles
print list(get_all_styles())</pre>
<p>You can choose between different styles for <code>hgweb</code> as well. I prefer <code>monoblue</code> myself, but there are quite a few options that come with Mercurial, and you can download even more online. If you want to see all of the <code>hgweb</code> styles available, in a shell run:</p>
<pre>ls /usr/lib/python*/site-packages/mercurial/templates/
# Note: only the directories are styles!
# If ls does not show colors, try adding the "--color" option.</pre>
<p>The <code>allow_archive</code> line tells <code>hgweb</code> to allow users to download a <code>.tar.bz2</code> archive of the repository. You can also add <code>gz</code> and/or <code>zip</code> to allow users to download a <code>.tar.gz</code> or <code>.zip</code> archive. They are comma-separated, so use <code>bz2, gzip, zip</code> to offer all three.</p>
<p>Next, you should add a contact and description for your repositories. If you don&#8217;t, Mercurial will just show &#8220;unknown&#8221; for Description and Contact. To add them, first change into the repository&#8217;s folder:</p>
<pre>cd /var/lib/mercurial-server/repos/$REPO_NAME</pre>
<p>Then, create/edit the file <code>.hg/hgrc</code> and add the following:</p>
<pre>[web]
contact = Your Name &lt;your@email.address&gt;
description = My Mercurial repository</pre>
<p>Additionally, for any repository you do not want to be shown in hgweb (which will also prevent people from pulling the repository using hgweb), add the following instead:</p>
<pre>[web]
deny_read = *</pre>
<p>You also need to set the ownership of the <code>hgrc</code> files to the <code>mercurial-server</code> user, <code>hg</code>. To do that, it&#8217;s easiest just to set the ownership of the entire repos folder (which is safe, because <code>mercurial-server</code> always owns the entire folder anyway) by running:</p>
<pre>chown -R hg: /var/lib/mercurial-server/repos/
# Failing to do this will cause warnings about untrusted files anytime
# someone pushes or pulls using mercurial-server!</pre>
<p>Finally, you need to configure your web server to use <code>hgweb</code>. This part is web server dependent. However, before you configure your web server, you need to choose the interface <code>hgweb</code> will use to communicate with your web server.</p>
<ul>
<li>CGI
<ul>
<li>Pros: easy to set up, no overhead when not being used, software updates happen immediately</li>
<li>Cons: forks a new process for each request so slightly slower page loads for small requests (insignificant for large requests, such as pulling a repository)</li>
</ul>
</li>
<li>FastCGI
<ul>
<li>Pros: no forking overhead so each request starts being processed immediately</li>
<li>Cons: always running so takes up more RAM, more complex to set up, not officially supported by Mercurial (although a FastCGI script is provided), software updates require a restart of the FastCGI script</li>
</ul>
</li>
<li>WSGI
<ul>
<li>Pros: no forking overhead like FastCGI, software updates happen immediately</li>
<li>Cons: more complex to set up, always running so takes up more RAM, requires either a Python interpreter in your web server (Apache) or a separate process (most other web servers)</li>
</ul>
</li>
</ul>
<p>No matter what you choose, the setup process is documented <a href="http://mercurial.selenic.com/wiki/PublishingRepositories#hgweb_-_introduction_and_prerequisites">here</a> [mercurial.selenic.com]. Remember to point <code>hgweb</code> at the configuration file you created!</p>
<p>The end result should look something like <a href="http://hg.0x3b.com">this</a> [hg.0x3b.com]. That installation of <code>hgweb</code> does not support pushing; <code>mercurial-server</code> handles all pushes. However, both <code>hgweb</code> and <code>mercurial-server</code> share repositories, so when I push to <code>mercurial-server</code>, it can be seen on <code>hgweb</code> immediately.</p>
<p>Hopefully this HOWTO was helpful! Feel free to leave comments if you have any questions or concerns. If you have any suggestions, please feel free to leave them <a title="Feedback/Suggestions" href="http://dririan.com/feedback/">here</a>!</p>
<p>Thanks for reading,<br />
dririan</p>
]]></content:encoded>
			<wfw:commentRss>http://dririan.com/2011/12/serving-mercurial-repositories-with-hgweb-and-mercurial-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hello Everyone!</title>
		<link>http://dririan.com/2011/12/hello-everyone/</link>
		<comments>http://dririan.com/2011/12/hello-everyone/#comments</comments>
		<pubDate>Tue, 27 Dec 2011 01:27:04 +0000</pubDate>
		<dc:creator>dririan</dc:creator>
				<category><![CDATA[Meta]]></category>

		<guid isPermaLink="false">http://dririan.com/?p=5</guid>
		<description><![CDATA[After years of not having this domain (thanks to domain parkers), I finally got it back! Hopefully, I&#8217;ll be making lots of posts soon with how-to guides for advanced topics, tutorials for basic ones, and lots of other content about &#8230; <a href="http://dririan.com/2011/12/hello-everyone/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>After years of not having this domain (thanks to domain parkers), I finally got it back!</p>
<p>Hopefully, I&#8217;ll be making lots of posts soon with how-to guides for advanced topics, tutorials for basic ones, and lots of other content about technology!</p>
<p>Talk to you soon,<br />
dririan</p>
]]></content:encoded>
			<wfw:commentRss>http://dririan.com/2011/12/hello-everyone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
