<?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>Ogalik</title>
	<atom:link href="http://www.ogalik.ee/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ogalik.ee</link>
	<description></description>
	<lastBuildDate>Fri, 13 Apr 2012 07:59:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Synology DSM 4 Openvpn client</title>
		<link>http://www.ogalik.ee/synology-dsm-4-openvpn-client/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=synology-dsm-4-openvpn-client</link>
		<comments>http://www.ogalik.ee/synology-dsm-4-openvpn-client/#comments</comments>
		<pubDate>Sun, 08 Apr 2012 20:30:19 +0000</pubDate>
		<dc:creator>owl</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[DSM]]></category>
		<category><![CDATA[Openvpn]]></category>
		<category><![CDATA[Synology]]></category>

		<guid isPermaLink="false">http://www.ogalik.ee/?p=438</guid>
		<description><![CDATA[<p>I was pleasantly surprised when I did find out, that <a href="http://www.synology.com" title="Synology"></a> had added a VPN client in their DSM 4 release. This VPN client supports either PPTP or openvpn. Openvpn support is what I am interested in. Unfortunately openvpn wizard in DSM assumes that username authentication is used.&#8230; <a href="http://www.ogalik.ee/synology-dsm-4-openvpn-client/" class="read_more">Read the rest</a></p>]]></description>
			<content:encoded><![CDATA[<p>I was pleasantly surprised when I did find out, that <a href="http://www.synology.com" title="Synology"></a> had added a VPN client in their DSM 4 release. This VPN client supports either PPTP or openvpn. Openvpn support is what I am interested in. Unfortunately openvpn wizard in DSM assumes that username authentication is used. I need certificate authentication. Fortunately it can be arranged.<br />
First create a bogus openvpn connection. It creates some configuration files and a connection name that can be started up via GUI.<br />
Changing those configuration files is done via ssh to Diskstation.<br />
DSM 4.0-2198 has<br />
<code>OpenVPN 2.1.4 armle-unknown-linux [SSL] [LZO2] [EPOLL] built on Feb 23 2012</code></p>
<p>Openvpn configuration files are located at:<br />
<code>/usr/syno/etc/synovpnclient/openvpn</code><br />
The interesting file is client_XX something. It is a plain openvpn configuration file.<br />
It is a bit inconvenient to edit this file directly in ssh session to Diskstation, so I copied it to a shared folder and changed it there. Copied it back later. Shared folders are, what Diskstation is used for, right?<br />
I got inspiration for setting up my Synology DS211j as openvpn client from <a href="http://ghughes.com/blog/2011/11/06/putting-a-synology-diskstation-to-good-use/" title="this posting"></a></p>
<p>My openvpn configuration looks like this:</p>
<pre class="brush: plain; title: ; notranslate">
client
float
resolv-retry infinite
nobind
persist-key
persist-tun
ca keys/ca.crt
cert keys/client.crt
key keys/client.key
ns-cert-type server
tls-auth keys/ta.key 1
cipher BF-CBC
verb 5
log openvpn.log

dev tun
tls-client
remote myserver 1194
pull
proto udp
comp-lzo
script-security 2
reneg-sec 0
explicit-exit-notify
plugin /lib/openvpn/openvpn-down-root.so /etc/ppp/ip-down
#auth-user-pass /tmp/ovpn_client_up
</pre>
<p>As long as I do not edit that pseudo config in VPN GUI all is good. Connect works and it seems to reconnect after connection loss.<br />
Connection stability is still to be tested.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ogalik.ee/synology-dsm-4-openvpn-client/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Code display in WordPress</title>
		<link>http://www.ogalik.ee/code-display-in-wordpress/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=code-display-in-wordpress</link>
		<comments>http://www.ogalik.ee/code-display-in-wordpress/#comments</comments>
		<pubDate>Sat, 07 Apr 2012 20:52:25 +0000</pubDate>
		<dc:creator>owl</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[suffusion]]></category>
		<category><![CDATA[syntax highlighting]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.ogalik.ee/?p=430</guid>
		<description><![CDATA[<p>I have accustomed in using &#60;code&#62;&#60;/code&#62; tags in my posts so that many posts have those tags.<br />
Unfortunately , my WordPress theme in its default settings does not really distinguish code in &#60;code&#62;&#60;/code&#62; tags enough to be easily distinguishable from the rest of the text.&#8230; <a href="http://www.ogalik.ee/code-display-in-wordpress/" class="read_more">Read the rest</a></p>]]></description>
			<content:encoded><![CDATA[<p>I have accustomed in using &lt;code&gt;&lt;/code&gt; tags in my posts so that many posts have those tags.<br />
Unfortunately , my WordPress theme in its default settings does not really distinguish code in &lt;code&gt;&lt;/code&gt; tags enough to be easily distinguishable from the rest of the text.<br />
Fortunately Suffusion has place ,Back-end-&gt;Custom Includes, for adding custom CSS so adding a bit of CSS there helps a lot.</p>
<pre class="brush: css; title: ; notranslate">
code {
        background-color: #F9F9F9;
        display: inline-block;
        overflow: hidden;
        border: 1px solid #c0c0c0;
        padding-left: 7px;
        padding-right: 7px;
        border-radius: 5px;
}
</pre>
<p>While I like what does for a longer bits of code I still like using &lt;code&gt;&lt;/code&gt; for one liners or for code snippets that are not nicely highlighted.</p>
<p><code>code</code><br />
works like this now.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ogalik.ee/code-display-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Saabiklubi talvekokkutulek ja jäärada 2012</title>
		<link>http://www.ogalik.ee/saabiklubi-talvekokkutulek-ja-jaarada-2012/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=saabiklubi-talvekokkutulek-ja-jaarada-2012</link>
		<comments>http://www.ogalik.ee/saabiklubi-talvekokkutulek-ja-jaarada-2012/#comments</comments>
		<pubDate>Sun, 11 Mar 2012 20:18:01 +0000</pubDate>
		<dc:creator>owl</dc:creator>
				<category><![CDATA[Saab]]></category>

		<guid isPermaLink="false">http://www.ogalik.ee/?p=357</guid>
		<description><![CDATA[Saabiklubi talvekokkutulek 2012 toimus Veldemani Puhkemajas. Sealsamas lähedal sai peetud ka jäärajasõit.
Mõnus koht, jäärada oli ka väga tasemel. ]]></description>
			<content:encoded><![CDATA[<p>Saabiklubi talvekokkutulek 2012 toimus Veldemani Puhkemajas. Sealsamas lähedal sai peetud ka jäärajasõit.<br />
Mõnus koht, jäärada oli ka väga tasemel.<br />

<div class="ngg-albumoverview">		

	<!-- List of galleries -->
		
	<div class="ngg-album-compact">
		<div class="ngg-album-compactbox">
			<div class="ngg-album-link">
				<a class="Link" href="http://www.ogalik.ee/saabiklubi-talvekokkutulek-ja-jaarada-2012/?album=13&amp;gallery=16">
					<img class="Thumb" alt="Saabiklubi talvekokkutulek 2012" src="http://www.ogalik.ee/wp-content/gallery/saabtalv2012/thumbs/thumbs_saabiklubi-talv-2012-5067-1.jpg"/>
				</a>
			</div>
		</div>
		<h4><a class="ngg-album-desc" title="Saabiklubi talvekokkutulek 2012" href="http://www.ogalik.ee/saabiklubi-talvekokkutulek-ja-jaarada-2012/?album=13&amp;gallery=16" >Saabiklubi talvekokkutulek 2012</a></h4>
				<p><strong>249</strong> Photos</p>
			</div>

 	 	
	<!-- Pagination -->
 	<div class="ngg-clear"></div>
</div>

</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ogalik.ee/saabiklubi-talvekokkutulek-ja-jaarada-2012/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Saabiklubi Jõuluõhtusöök 2011</title>
		<link>http://www.ogalik.ee/saabiklubi-jouluohtusook-2011/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=saabiklubi-jouluohtusook-2011</link>
		<comments>http://www.ogalik.ee/saabiklubi-jouluohtusook-2011/#comments</comments>
		<pubDate>Fri, 16 Dec 2011 10:48:13 +0000</pubDate>
		<dc:creator>owl</dc:creator>
				<category><![CDATA[Saab]]></category>
		<category><![CDATA[Eesti Saabiklubi]]></category>

		<guid isPermaLink="false">http://www.ogalik.ee/?p=349</guid>
		<description><![CDATA[Toimus Olustvere mõisas. Söök ja koht vägagi tasemel. Paar pilti ka.]]></description>
			<content:encoded><![CDATA[<p>Toimus Olustvere mõisas. Söök ja koht vägagi tasemel. Paar pilti ka.<br />

<div class="ngg-albumoverview">		

	<!-- List of galleries -->
		
	<div class="ngg-album-compact">
		<div class="ngg-album-compactbox">
			<div class="ngg-album-link">
				<a class="Link" href="http://www.ogalik.ee/saabiklubi-jouluohtusook-2011/?album=12&amp;gallery=15">
					<img class="Thumb" alt="Saabiklubi Jõul 2011" src="http://www.ogalik.ee/wp-content/gallery/saabjoul2011/thumbs/thumbs_saabiklubi-joul-2011-4573-2.jpg"/>
				</a>
			</div>
		</div>
		<h4><a class="ngg-album-desc" title="Saabiklubi Jõul 2011" href="http://www.ogalik.ee/saabiklubi-jouluohtusook-2011/?album=12&amp;gallery=15" >Saabiklubi Jõul 2011</a></h4>
				<p><strong>6</strong> Photos</p>
			</div>

 	 	
	<!-- Pagination -->
 	<div class="ngg-clear"></div>
</div>

</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ogalik.ee/saabiklubi-jouluohtusook-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgrading old Gentoo installations</title>
		<link>http://www.ogalik.ee/upgrading-old-gentoo/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=upgrading-old-gentoo</link>
		<comments>http://www.ogalik.ee/upgrading-old-gentoo/#comments</comments>
		<pubDate>Wed, 30 Nov 2011 08:48:48 +0000</pubDate>
		<dc:creator>owl</dc:creator>
				<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[gentoo]]></category>
		<category><![CDATA[portage]]></category>
		<category><![CDATA[upgrading]]></category>

		<guid isPermaLink="false">http://www.ogalik.ee/?p=336</guid>
		<description><![CDATA[<p>Sometimes for whatever reason You need to upgrade an old or really old Gentoo installation. Reinstall just is not an option. Upgrading old Gentoo installations is not really a plain sailing. All sorts of circular dependencies come up. For example portage is 2.1.6.13, bash is 3.2_p39 and python is 2.5.4.&#8230; <a href="http://www.ogalik.ee/upgrading-old-gentoo/" class="read_more">Read the rest</a></p>]]></description>
			<content:encoded><![CDATA[<p>Sometimes for whatever reason You need to upgrade an old or really old Gentoo installation. Reinstall just is not an option. Upgrading old Gentoo installations is not really a plain sailing. All sorts of circular dependencies come up. For example portage is 2.1.6.13, bash is 3.2_p39 and python is 2.5.4. First thing in Gentoo upgrading is usually to get portage as fresh as possible.  Latest stable portage at this moment is 2.1.10.11. Installing is not so simple. It depends on python 2.7 or 2.6 and bash at minimum of 3.2_p17, but as newer bash 4.1 is available, emerge -avu wants to upgrade to it. Bash 4.1_p9 requires portage 2.1.7.6 at minimum. So here we have the first circular dependency. Newer portage wants to upgrade bash, which needs newer portage.</p>
<p><code>emerge -avu portage</code></p>
<p><code>Calculating dependencies... done!<br />
[ebuild  N    ] dev-libs/libffi-3.0.9-r2  USE="-debug -static-libs -test" 715 kB<br />
[ebuild  N    ] app-misc/mime-types-8  12 kB<br />
[ebuild  N    ] virtual/libffi-0  0 kB<br />
[ebuild     U ] app-shells/bash-4.1_p9 [3.2_p39] USE="net%* nls -afs -bashlogger -examples -mem-scramble% -plugins -vanilla" 6,458 kB<br />
[ebuild  NS   ] dev-lang/python-2.7.1-r1 [2.3.6-r4, 2.4.4-r9, 2.5.4-r2] USE="gdbm ipv6 ncurses readline ssl threads (wide-unicode) xml -berkdb -build -doc -examples -sqlite -tk -wininst" 11,461 kB<br />
[ebuild     U ] sys-apps/portage-2.1.10.11 [2.1.6.13] USE="(ipc%*) less%* -build -doc -epydoc -python2% -python3% (-selinux)" LINGUAS="-pl" 0 kB<br />
*** Portage will stop merging at this point and reload itself,<br />
then resume the merge.<br />
[blocks B     ] dev-lang/python:2.7 ("dev-lang/python:2.7" is blocking sys-apps/portage-2.1.6.13)<br />
[blocks B     ] &lt;sys-apps/portage-2.1.7.16 ("&lt;sys-apps/portage-2.1.7.16" is blocking app-shells/bash-4.1_p9)<br />
[blocks B     ] &lt;sys-apps/portage-2.1.9 ("&lt;sys-apps/portage-2.1.9" is blocking dev-lang/python-2.7.1-r1)<br />
Total: 6 packages (2 upgrades, 3 new, 1 in new slot), Size of downloads: 18,646 kB<br />
Conflict: 3 blocks (3 unsatisfied)<br />
</code></p>
<p>Cannot upgrade, some blocks are present. Finding out the minimum version of bash required is simple:</p>
<p><code>cat /usr/portage/sys-apps/portage/portage-2.1.10.11.ebuild | grep bash<br />
&gt;=app-shells/bash-3.2_p17<br />
</code><br />
To break that circle, lets mask newer bash first.<br />
<code>echo  "&gt;=app-shells/bash-3.2_p39" &gt; /etc/portage/package.mask<br />
</code><br />
New test on emerge<br />
<code>emerge -avu portage</code></p>
<p><code>These are the packages that would be merged, in order:<br />
Calculating dependencies... done!<br />
[ebuild  N    ] dev-libs/libffi-3.0.9-r2  USE="-debug -static-libs -test" 715 kB<br />
[ebuild  N    ] app-misc/mime-types-8  12 kB<br />
[ebuild  N    ] virtual/libffi-0  0 kB<br />
[ebuild  NS   ] dev-lang/python-2.7.1-r1 [2.3.6-r4, 2.4.4-r9, 2.5.4-r2] USE="gdbm ipv6 ncurses readline ssl threads (wide-unicode) xml -berkdb -build -doc -examples -sqlite -tk -wininst" 11,461 kB<br />
[ebuild     U ] sys-apps/portage-2.1.10.11 [2.1.6.13] USE="(ipc%*) less%* -build -doc -epydoc -python2% -python3% (-selinux)" LINGUAS="-pl" 0 kB<br />
*** Portage will stop merging at this point and reload itself,<br />
then resume the merge.<br />
[blocks B     ] dev-lang/python:2.7 ("dev-lang/python:2.7" is blocking sys-apps/portage-2.1.6.13)<br />
[blocks B     ] &lt;sys-apps/portage-2.1.9 ("&lt;sys-apps/portage-2.1.9" is blocking dev-lang/python-2.7.1-r1)<br />
Total: 5 packages (1 upgrade, 3 new, 1 in new slot), Size of downloads: 12,188 kB<br />
Conflict: 2 blocks (2 unsatisfied)<br />
</code><br />
Bash block is gone.</p>
<p>Finding out what is the minimum required python version is a bit harder. Looking at  /usr/portage/sys-apps/portage/portage-2.1.10.11.ebuild we can find a row declaring:<br />
<code>build? ( || ( dev-lang/python:2.7 dev-lang/python:2.6[threads] )<br />
</code><br />
so lets mask python 2.7<br />
<code>echo  "&gt;=dev-lang/python-2.7" &gt;&gt;/etc/portage/package.mask<br />
</code><br />
Please notice the &gt;&gt; this time we append to package.mask. Single &gt; will just overwrite it.</p>
<p>Still no luck:</p>
<p>These are the packages that would be merged, in order:<br />
<code>Calculating dependencies... done!<br />
[ebuild  N    ] dev-libs/libffi-3.0.9-r2  USE="-debug -static-libs -test" 715 kB<br />
[ebuild  N    ] app-misc/mime-types-8  12 kB<br />
[ebuild  N    ] virtual/libffi-0  0 kB<br />
[ebuild  NS   ] dev-lang/python-2.6.6-r2 [2.3.6-r4, 2.4.4-r9, 2.5.4-r2] USE="gdbm ipv6 ncurses readline ssl threads (wide-unicode) xml -berkdb -build -doc -examples -sqlite -tk -wininst" 10,838 kB<br />
[ebuild     U ] sys-apps/portage-2.1.10.11 [2.1.6.13] USE="(ipc%*) less%* -build -doc -epydoc -python2% -python3% (-selinux)" LINGUAS="-pl" 0 kB<br />
*** Portage will stop merging at this point and reload itself,<br />
then resume the merge.<br />
[blocks B     ] &gt;=dev-lang/python-2.6.6:2.6 ("&gt;=dev-lang/python-2.6.6:2.6" is blocking sys-apps/portage-2.1.6.13)<br />
[blocks B     ] &lt;sys-apps/portage-2.1.9 ("&lt;sys-apps/portage-2.1.9" is blocking dev-lang/python-2.6.6-r2)<br />
Total: 5 packages (1 upgrade, 3 new, 1 in new slot), Size of downloads: 11,564 kB<br />
Conflict: 2 blocks (2 unsatisfied)<br />
</code></p>
<p>Portage 2.1.9 is still needed by portage 2.6.6. Is there something older?<br />
<code>ls /usr/portage/dev-lang/python/ | grep ebuild</code></p>
<p><code>python-2.4.6.ebuild<br />
python-2.5.4-r4.ebuild<br />
python-2.6.6-r2.ebuild<br />
python-2.6.7-r2.ebuild<br />
python-2.7.1-r1.ebuild<br />
python-2.7.2-r2.ebuild<br />
python-2.7.2-r3.ebuild<br />
python-3.1.3-r1.ebuild<br />
python-3.1.4-r2.ebuild<br />
python-3.1.4-r3.ebuild<br />
python-3.2.2.ebuild<br />
python-3.2-r2.ebuild<br />
</code><br />
Nope. the oldest ebuild for python 2.6 is 2.6.6-r2, which requires portage that we do not have. do we have an ebuild for portage that is satisfied with python we do have?<br />
<code>ls /usr/portage/sys-apps/portage/ | grep ebuild</code></p>
<p><code>portage-2.1.10.11.ebuild<br />
portage-2.1.10.18.ebuild<br />
portage-2.1.10.19.ebuild<br />
portage-2.1.10.3.ebuild<br />
portage-2.1.6.13.ebuild<br />
portage-2.1.6.7.ebuild<br />
portage-2.1.9.42.ebuild<br />
portage-2.2.0_alpha51.ebuild<br />
portage-2.2.0_alpha58.ebuild<br />
portage-2.2.0_alpha59.ebuild<br />
portage-9999.ebuild<br />
</code><br />
we are running portage 2.1.6.13, there is only one ebuild between 2.1.10.11 and 2.1.6.13. Lets try 2.1.9.42.<br />
<code>emerge -avu =sys-apps/portage-2.1.9.42</code></p>
<p><code>These are the packages that would be merged, in order:<br />
Calculating dependencies... done!<br />
[ebuild  N    ] dev-libs/libffi-3.0.9-r2  USE="-debug -static-libs -test" 715 kB<br />
[ebuild  N    ] app-misc/mime-types-8  12 kB<br />
[ebuild  N    ] virtual/libffi-0  0 kB<br />
[ebuild  NS   ] dev-lang/python-2.6.6-r2 [2.3.6-r4, 2.4.4-r9, 2.5.4-r2] USE="gdbm ipv6 ncurses readline ssl threads (wide-unicode) xml -berkdb -build -doc -examples -sqlite -tk -wininst" 10,838 kB<br />
[ebuild     U ] sys-apps/portage-2.1.9.42 [2.1.6.13] USE="(ipc%*) less%* -build -doc -epydoc -python2% -python3% (-selinux)" LINGUAS="-pl" 747 kB<br />
*** Portage will stop merging at this point and reload itself,<br />
then resume the merge.<br />
[blocks B     ] &gt;=dev-lang/python-2.6.6:2.6 ("&gt;=dev-lang/python-2.6.6:2.6" is blocking sys-apps/portage-2.1.6.13)<br />
[blocks B     ] &lt;sys-apps/portage-2.1.9 ("&lt;sys-apps/portage-2.1.9" is blocking dev-lang/python-2.6.6-r2)<br />
Total: 5 packages (1 upgrade, 3 new, 1 in new slot), Size of downloads: 12,310 kB<br />
Conflict: 2 blocks (2 unsatisfied)<br />
</code><br />
Still no luck. The next thing we can try is to ignore dependencies. They are marked in ebuilds for a reason but with some luck we can ignore them and maybe get something semi-working out of it.<br />
<code>emerge -avu --nodeps =sys-apps/portage-2.1.9.42<br />
</code><br />
Another check halts progress again.<br />
<code>This version of portage requires at least python-2.6 to be selected as the default python interpreter<br />
</code><br />
Lets try to force python then.<br />
<code>emerge -avu =dev-lang/python-2.6.6-r2<br />
</code><br />
without forcing python fails like so:<br />
<code>These are the packages that would be merged, in order:<br />
Calculating dependencies... done!<br />
!!! All ebuilds that could satisfy "&gt;=dev-libs/popt-1.15" have been masked.<br />
!!! One of the following masked packages is required to complete your request:<br />
- dev-libs/popt-1.16-r1 (masked by: EAPI 3)<br />
The current version of portage supports EAPI '2'. You must upgrade to a<br />
newer version of portage before EAPI masked packages can be installed.<br />
For more information, see the MASKED PACKAGES section in the emerge<br />
man page or refer to the Gentoo Handbook.<br />
(dependency required by "dev-util/pkgconfig-0.25-r2" [ebuild])<br />
(dependency required by "dev-lang/python-2.6.6-r2" [ebuild])<br />
(dependency required by "=dev-lang/python-2.6.6-r2" [argument])<br />
</code><br />
EAPI version depends on portage. Basically, newer portage is needed. Back to the beginning then.</p>
<p>This popt library is needed by pkgconfig. What is the minimum of pkgconfig needed by pyhton?<br />
<code>cat /usr/portage/dev-lang/python/python-2.6.6-r2.ebuild | grep pkgconfig<br />
dev-util/pkgconfig<br />
</code><br />
We might be in luck just a pkgconfig is needed. Any version.</p>
<p>We do have pkgconfig 0.22 /var/db/pkg/ gives a hint here. Mask newer ones.<br />
<code>echo  "&gt;dev-util/pkgconfig-0.22" &gt;&gt; /etc/portage/package.mask<br />
</code><br />
Trying python again:<br />
<code>emerge -avu =dev-lang/python-2.6.6-r2</code></p>
<p><code>These are the packages that would be merged, in order:<br />
Calculating dependencies... done!<br />
[ebuild  N    ] dev-libs/libffi-3.0.9-r2  USE="-debug -static-libs -test" 715 kB<br />
[ebuild     U ] dev-libs/expat-2.0.1-r3 [2.0.1] 0 kB<br />
[ebuild     U ] sys-libs/gdbm-1.8.3-r4 [1.8.3-r3] USE="berkdb" 0 kB<br />
[ebuild  N    ] app-misc/mime-types-8  12 kB<br />
[ebuild  N    ] virtual/yacc-0  0 kB<br />
[ebuild     U ] sys-devel/autoconf-wrapper-10-r1 [8] 0 kB<br />
[ebuild     U ] sys-devel/binutils-2.20.1-r1 [2.18-r1] USE="nls -multislot -multitarget -static-libs% -test -vanilla" 17,194 kB<br />
[ebuild     U ] sys-devel/autoconf-2.68 [2.65-r1] USE="-emacs" 1,350 kB<br />
[ebuild  N    ] virtual/libffi-0  0 kB<br />
[ebuild     U ] sys-libs/zlib-1.2.5-r2 [1.2.3-r1] 475 kB<br />
[uninstall    ] dev-libs/libxml2-2.6.30-r1  USE="ipv6 python readline -bootstrap -build -debug -doc -test"<br />
[blocks b     ] &lt;dev-libs/libxml2-2.7.7 ("&lt;dev-libs/libxml2-2.7.7" is blocking sys-libs/zlib-1.2.5-r2)<br />
[ebuild     U ] dev-libs/openssl-1.0.0e [0.9.8g] USE="zlib -bindist -gmp -kerberos -rfc3779% -sse2 -test (-emacs%)" 3,950 kB<br />
[ebuild  NS   ] sys-devel/libtool-2.4-r1 [2.2.6b] USE="-vanilla" 833 kB<br />
[uninstall    ] sys-devel/libtool-2.2.6b  USE="-test -vanilla"<br />
[blocks b     ] =sys-devel/libtool-2*:1.5 ("=sys-devel/libtool-2*:1.5" is blocking sys-devel/libtool-2.4-r1)<br />
[ebuild     U ] sys-libs/readline-6.1_p2 [5.2_p12-r1] 2,212 kB<br />
[ebuild     U ] app-admin/python-updater-0.9 [0.2] 8 kB<br />
[ebuild  NS   ] dev-lang/python-2.6.6-r2 [2.3.6-r4, 2.4.4-r9, 2.5.4-r2] USE="gdbm ipv6 ncurses readline ssl threads (wide-unicode) xml -berkdb -build -doc -examples -sqlite -tk -wininst" 10,838 kB<br />
[blocks B     ] &gt;=dev-lang/python-2.6.6:2.6 ("&gt;=dev-lang/python-2.6.6:2.6" is blocking sys-apps/portage-2.1.6.13)<br />
[blocks B     ] &lt;sys-apps/portage-2.1.9 ("&lt;sys-apps/portage-2.1.9" is blocking dev-lang/python-2.6.6-r2)<br />
Total: 15 packages (9 upgrades, 4 new, 2 in new slots, 2 uninstalls), Size of downloads: 37,583 kB<br />
Conflict: 4 blocks (2 unsatisfied)<br />
</code><br />
Blocking again, but now we do have a list of packages that python 2.6.6-r2 wants to install. Lets satisfy those dependencies we can and care about then. Specially those that do more than -r (revision) version upgrades and that do some uninstalls. python-updater is a no go, as it needs newer python of course.</p>
<p>I do use oneshot here as those packages are dependencies of something else anyway and I do not want to add them in my world file.<br />
<code>emerge -avu --oneshot libtool<br />
</code><br />
Libtool was the only one that did work actually and it brought some dependencies along. Good.</p>
<p>Now lets try python with nodeps<br />
<code>emerge -avu --nodeps =dev-lang/python-2.6.6-r2<br />
</code><br />
Unfortunately build fails.<br />
<code>error: /ffi.h: No such file or directory<br />
</code><br />
There actually is no file named so in the whole machine. Quick look around in another, up to date machine reveals that ffi.h is supplied by dev-libs/libffi and actually virtual/libffi was one of the dependencies on python. This tends to happen if nodeps is used on installing packages.</p>
<p>Installing libffi worked and we got a newer python, installed with &#8211;nodeps though.  Portage upgrade worked after that also.</p>
<p>the next logical step is to remove package masks we added.<br />
<code>rm /etc/portage/package.mask<br />
</code><br />
Now we can install python with dependencies. This is an important step, because portage can not possibly know, that we installed something with &#8211;nodeps and now it might not work as intended.</p>
<p>This takes care of upgrading portage. Next other development tools, python (it got updated already) , perl, gcc should be upgraded. then system, then world <img src='http://www.ogalik.ee/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>There is no direct route to take if upgrading old Gentoo systems. Just a lot of patience. First upgrade, then mask if upgrade does not work, then &#8211;nodeps if mask is not enough. The last thing, if &#8211;nodeps also fails is to copy some newer binaries from installation CD. I have had to use that only once fortunately.</p>
<p>The thing to remember &#8211; keep Your systems up to date &#8211; it is a lot easier this way.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ogalik.ee/upgrading-old-gentoo/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Website statistics. Awstats and Adsense.</title>
		<link>http://www.ogalik.ee/website-statistics-awstats-adsense/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=website-statistics-awstats-adsense</link>
		<comments>http://www.ogalik.ee/website-statistics-awstats-adsense/#comments</comments>
		<pubDate>Mon, 12 Sep 2011 05:45:53 +0000</pubDate>
		<dc:creator>owl</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[adsense]]></category>
		<category><![CDATA[awstats]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.ogalik.ee/?p=332</guid>
		<description><![CDATA[<p>After years of relaying on <a title="awstats" href="http://awstats.sourceforge.net/">Awstats</a> for my web site statistics I also added Google Analytics. The final push came from adding Adsense. If I already have many external javascripts running on every page of my site, then one more makes no real difference. &#8230; <a href="http://www.ogalik.ee/website-statistics-awstats-adsense/" class="read_more">Read the rest</a></p>]]></description>
			<content:encoded><![CDATA[<p>After years of relaying on <a title="awstats" href="http://awstats.sourceforge.net/">Awstats</a> for my web site statistics I also added Google Analytics. The final push came from adding Adsense. If I already have many external javascripts running on every page of my site, then one more makes no real difference.  What is the difference between Awstats and google analytics then? On both of them we get number of visits, unique visitors, pageviews, source countries (Awstats needs GeoIP plugin or similar), list of hosts visiting, visits duration, top pages on site, operating systems, browsers, source by search engine and external link, search keywords and I probably overlooked something. Basic stats are very similar. The results are not. As Awstats reads data from web server log files, it can also count direct links to files, and also bandwidth, which is inaccessible to Google Analytics. Those counters, hits and bandwidth are very important from server administration point of view.  Also Awstats provides graphs by days of week and hours, which are somewhat useful. For downtime planning for example. Awstats stops there unfortunately.  Google Analytics adds some more metrics. <a title="Lowering the bounce rate" href="http://www.ogalik.ee/lowering-the-bounce-rate/">Bounce rate</a> is one of more interesting ones. Of course, as Google has all the data on its search engine usage, it has some elaborate data there.There is more. A lot more. Also google has its webmaster tools. Those are worth looking at too.</p>
<p>What website statistics package is better? Awstats is more geared towards website administrators and Adsense towards content management. Each has its unique features and usages. I&#8217;ll keep my custom Awstats scripts but I tend to look at Adsense more and more.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ogalik.ee/website-statistics-awstats-adsense/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding Google Custom Search Engine to WordPress</title>
		<link>http://www.ogalik.ee/wordpress-google-custom-search/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=wordpress-google-custom-search</link>
		<comments>http://www.ogalik.ee/wordpress-google-custom-search/#comments</comments>
		<pubDate>Thu, 08 Sep 2011 06:11:02 +0000</pubDate>
		<dc:creator>owl</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[adsense]]></category>
		<category><![CDATA[google custom search]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.ogalik.ee/?p=328</guid>
		<description><![CDATA[<p>Google promotes it&#8217;s services in subtle ways. After integrating some Google services, like <a title="WordPress and adsense" href="http://www.ogalik.ee/wordpress-adsense/">Adsense into my webpage</a> it was time for Google Site Search.  Search is not really used much on my webpage, but it does not take really long to integrate it. &#8230; <a href="http://www.ogalik.ee/wordpress-google-custom-search/" class="read_more">Read the rest</a></p>]]></description>
			<content:encoded><![CDATA[<p>Google promotes it&#8217;s services in subtle ways. After integrating some Google services, like <a title="WordPress and adsense" href="http://www.ogalik.ee/wordpress-adsense/">Adsense into my webpage</a> it was time for Google Site Search.  Search is not really used much on my webpage, but it does not take really long to integrate it.  Google Custom Search can be configured in a multitude of ways. As I do not have a lot of content yet and I wanted to be quickly done with it, I used almost defaults again. On <a title="Custom Site Search" href="http://www.google.com/cse/">Custom Site Search</a> page I chose layout named &#8216;Two Page&#8217;. What it means is that I can add search box as text widget on my web page and search results are shown on a different page on my website.  Adding a text widget and filling it with HTML supplied by Google is simple. Then a page needs to be added where search results are shown. I did use a different post template for it. How it can be achieved is described in <a title="WordPress and adsense implementation" href="http://www.ogalik.ee/wordpress-adsense-implementation/">WordPress and AdSense implementation</a>. I could have used a simple post and it&#8217;s HTML editing mode but the search results HTML is a bit complicated and WordPress HTML editing mode keeps mangling it up. Easier is to use an empty post and add all relevant code into post template. For now I have one search box for the whole site, but I might implement different search boxes for different sections using <a title="Custom Sidebars" href="http://marquex.es/541/custom-sidebars-plugin-v0-8">custom sidebars</a>. If this site search sees some more usage first.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ogalik.ee/wordpress-google-custom-search/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Saabiklubi kalender 2011 September</title>
		<link>http://www.ogalik.ee/saabiklubi-kalender-2011-september/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=saabiklubi-kalender-2011-september</link>
		<comments>http://www.ogalik.ee/saabiklubi-kalender-2011-september/#comments</comments>
		<pubDate>Tue, 06 Sep 2011 12:26:41 +0000</pubDate>
		<dc:creator>owl</dc:creator>
				<category><![CDATA[Saab]]></category>
		<category><![CDATA[Eesti Saabiklubi]]></category>
		<category><![CDATA[saabiklubi kalender]]></category>

		<guid isPermaLink="false">http://www.ogalik.ee/?p=313</guid>
		<description><![CDATA[<p>Saabiklubi kalendri 2011 Septembrikuu foto sai tehtud 2010 augustis Pärnus. Täpsemalt vana Pärnu silla kõrval sadamakail.  Sõitsin spetsiaalselt siis veel Ivometsale kuuluvat Sonett III-e pildistama. See oli esimene ja siiani ka ainus kord kui ma kellegi autot spetsiaalselt pildistamas olen käinud.&#8230; <a href="http://www.ogalik.ee/saabiklubi-kalender-2011-september/" class="read_more">Read the rest</a></p>]]></description>
			<content:encoded><![CDATA[<p>Saabiklubi kalendri 2011 Septembrikuu foto sai tehtud 2010 augustis Pärnus. Täpsemalt vana Pärnu silla kõrval sadamakail.  Sõitsin spetsiaalselt siis veel Ivometsale kuuluvat Sonett III-e pildistama. See oli esimene ja siiani ka ainus kord kui ma kellegi autot spetsiaalselt pildistamas olen käinud. Antud pilt oli sel sessioonil tehtud u 160-st pildist üks esimesi ja näeb originaalis välja sellisena. 
<a href="http://www.ogalik.ee/wp-content/gallery/kalender-2011-09/IMG_0112.JPG" title="Originaalpilt " class="thickbox" rel="singlepic1242" >
	<img class="ngg-singlepic" src="http://www.ogalik.ee/wp-content/gallery/cache/1242__320x240_IMG_0112.JPG" alt="IMG_0112-2011-09-original" title="IMG_0112-2011-09-original" />
</a>
 Pilt on kuidagi lame ja taevas olevad pilved nõuavad rohkem tähelepanu. Kuna ma olin siis just HDR-ist sisse võetud ja see on ka fotovõistluse reeglitega lubatud. Otse läbi HDR-i lastud pildi üks versioon näeb välja selline.
<a href="http://www.ogalik.ee/wp-content/gallery/kalender-2011-09/IMG_0112_pregamma_1_fattal_alpha_0.1025_beta_1_saturation_1_noiseredux_0.1-1.jpg" title="HDR versioon 1" class="thickbox" rel="singlepic1243" >
	<img class="ngg-singlepic" src="http://www.ogalik.ee/wp-content/gallery/cache/1243__320x240_IMG_0112_pregamma_1_fattal_alpha_0.1025_beta_1_saturation_1_noiseredux_0.1-1.jpg" alt="IMG_0112_pregamma_1_fattal_alpha_0.1025_beta_1_saturation_1_noiseredux_0.1-1" title="IMG_0112_pregamma_1_fattal_alpha_0.1025_beta_1_saturation_1_noiseredux_0.1-1" />
</a>
. Selle pildi juures on ebaloomulikult häiriv auto all olev heledam asfalt. Samas auto enda värv on minuarust oluliselt huvitavam kui originaalil. Umbes selle HDR-i väljundi ja kontrastsuse, heleduse ning värvide tugevusega mängides sai tulemuseks pildi, mis ka kalendrisse jõudis. Kalendripilt on küll trükituna natuke erinev, sest kuulu järgi sai see parajalt tööeldud, et trükituna parem välja paistaks. 
<a href="http://www.ogalik.ee/wp-content/gallery/kalender-2011-09/kaldal.jpg" title="Kalendripilt" class="thickbox" rel="singlepic1246" >
	<img class="ngg-singlepic" src="http://www.ogalik.ee/wp-content/gallery/cache/1246__320x240_kaldal.jpg" alt="kaldal" title="kaldal" />
</a>
</p>
<p>Lisaks sellele sai tehtud veel mõned töötlused, mis kuhugi ei jõudnud. Üks versioon HDR-ist selle pildi kallal on selline 
<a href="http://www.ogalik.ee/wp-content/gallery/kalender-2011-09/IMG_0112_pregamma_1_fattal_alpha_1_beta_0.9_saturation_0.8_noiseredux_0-2.jpg" title="HDR versioon 2" class="thickbox" rel="singlepic1245" >
	<img class="ngg-singlepic" src="http://www.ogalik.ee/wp-content/gallery/cache/1245__320x240_IMG_0112_pregamma_1_fattal_alpha_1_beta_0.9_saturation_0.8_noiseredux_0-2.jpg" alt="IMG_0112_pregamma_1_fattal_alpha_1_beta_0.9_saturation_0.8_noiseredux_0-2" title="IMG_0112_pregamma_1_fattal_alpha_1_beta_0.9_saturation_0.8_noiseredux_0-2" />
</a>
. Siin aga muutusid eriti halvaks varjud auto all &#8211; alavalgustusest tulenevad täpid on vägagi häirivad, kuigi samas selle pildi pilved meeldivad mulle kõige rohkem. Kokkuvõttes meeldib mulle aga selle pildi töötlustest kõige rohkem hoopis järgnev pime pilt. Rattakoobaste servad ja ka aknaklaasi hele post on sellised, pilkupüüdvad. Seda pilti ma aga konkursile ei esitanud.  Liiga töödeldud juba. 
<a href="http://www.ogalik.ee/wp-content/gallery/kalender-2011-09/sonett_0112.jpg" title="Sonett öös" class="thickbox" rel="singlepic1247" >
	<img class="ngg-singlepic" src="http://www.ogalik.ee/wp-content/gallery/cache/1247__320x240_sonett_0112.jpg" alt="sonett_0112" title="sonett_0112" />
</a>
</p>
<p>Tegelikult meeldis mulle sellest fotosessioonist rohkem hoopis pilt mis kalendrisse ei pääsenud ja samast seeriast on ka mõni ilusam HDR töötlus olemas.  Nendest ehk mõni teine jutt.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ogalik.ee/saabiklubi-kalender-2011-september/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SaabSpeed 2009 afterparty</title>
		<link>http://www.ogalik.ee/saabspeed-2009-afterparty/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=saabspeed-2009-afterparty</link>
		<comments>http://www.ogalik.ee/saabspeed-2009-afterparty/#comments</comments>
		<pubDate>Fri, 02 Sep 2011 19:57:58 +0000</pubDate>
		<dc:creator>owl</dc:creator>
				<category><![CDATA[Saab]]></category>
		<category><![CDATA[Eesti Saabiklubi]]></category>

		<guid isPermaLink="false">http://www.ogalik.ee/?p=308</guid>
		<description><![CDATA[SaabSpeed 2009 afterparty toimus Allika turismitalus.]]></description>
			<content:encoded><![CDATA[<p>SaabSpeed 2009 afterparty toimus Allika turismitalus.</p>

<div class="ngg-albumoverview">		

	<!-- List of galleries -->
		
	<div class="ngg-album-compact">
		<div class="ngg-album-compactbox">
			<div class="ngg-album-link">
				<a class="Link" href="http://www.ogalik.ee/saabspeed-2009-afterparty/?album=3&amp;gallery=5">
					<img class="Thumb" alt="Allika 2009" src="http://www.ogalik.ee/wp-content/gallery/allika2009/thumbs/thumbs_allika2009-9903-1.jpg"/>
				</a>
			</div>
		</div>
		<h4><a class="ngg-album-desc" title="Allika 2009" href="http://www.ogalik.ee/saabspeed-2009-afterparty/?album=3&amp;gallery=5" >Allika 2009</a></h4>
				<p><strong>41</strong> Photos</p>
			</div>

 	 	
	<!-- Pagination -->
 	<div class="ngg-clear"></div>
</div>


]]></content:encoded>
			<wfw:commentRss>http://www.ogalik.ee/saabspeed-2009-afterparty/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Accurate LM35 readings</title>
		<link>http://www.ogalik.ee/accurate-lm35-reading/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=accurate-lm35-reading</link>
		<comments>http://www.ogalik.ee/accurate-lm35-reading/#comments</comments>
		<pubDate>Fri, 02 Sep 2011 07:37:59 +0000</pubDate>
		<dc:creator>owl</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[LM35]]></category>
		<category><![CDATA[sensor]]></category>
		<category><![CDATA[temperature]]></category>
		<category><![CDATA[thermometer]]></category>

		<guid isPermaLink="false">http://www.ogalik.ee/?p=300</guid>
		<description><![CDATA[<p>Sometimes LM35 analog temperature sensors give inconsistent readings. Reading fluctuations are simply too high. Specially if LM35 sensor is connected using a cable that is a meter long or longer.  There are some techniques tu compensate for those fluctuations and get more consistent readings.&#8230; <a href="http://www.ogalik.ee/accurate-lm35-reading/" class="read_more">Read the rest</a></p>]]></description>
			<content:encoded><![CDATA[<p>Sometimes LM35 analog temperature sensors give inconsistent readings. Reading fluctuations are simply too high. Specially if LM35 sensor is connected using a cable that is a meter long or longer.  There are some techniques tu compensate for those fluctuations and get more consistent readings. In general if it is possible and higher cost is not a problem it is better to use a digital temperature sensor like <a title="Arduino and DS18B20 – 1-wire digital thermometer" href="http://www.ogalik.ee/arduino-and-ds18b20-1-wire-digital-thermometer/">DS18B20</a>. A good documentation how to increase analog sensor accuracy can be found <a title="Analog sensor resolution" href="http://www.atmel.com/dyn/resources/prod_documents/doc8003.pdf">here</a>. From my tests and using three LM35-s with 1-2 meter long cables and arduino I did get some ideas:</p>
<p>&nbsp;</p>
<ul>
<li>Disregard the first reading. It seems that the first sensor reading after a couple of seconds is highly fluctuating.</li>
<li>Use lower voltage. You loose some some sensory range, but get more precise results. Specially if You know that the range is not needed anyhow. Normal room temperature will rarely get to 100°C for example.</li>
<li>Get more than one reading. It gives a better virtual resolution and fluctuations get smoothed out.</li>
<li>Have a small delay between readings. This keeps fluctuations down.</li>
<li>Test Your system before putting it into production. Theory might need to be adjusted to work in real world.</li>
</ul>
<p>For my <a title="Heater controller hardware" href="http://www.ogalik.ee/heater-controller-hardware/">heater controller project</a> I made this small function to read my LM35 sensors:</p>
<pre class="brush: cpp; title: ; notranslate">

// read analog LM35 sensor
float LM35_temp(int pin){
  unsigned int tempread = 0;
  unsigned int intmp;
  float temp;
  int i;

  Serial.print(&quot;Reading analog temp on pin: &quot;);
  Serial.println(pin);

  // first sample seems to fluctuate a lot. Disregard it
    intmp=analogRead(pin),
    Serial.println(intmp);
    delay(60);

  // 11 bit virtual resolution, according to http://www.atmel.com/dyn/resources/prod_documents/doc8003.pdf
  // arduino ADC is 10 bit real resolution
  // for 12 bit resolution 16 samples and &gt;&gt; 4 is needed
  for (i=0;i&lt;=3;i++){
    intmp=analogRead(pin),
    tempread = tempread + intmp;  // read  more samples. better stability.
    Serial.println(intmp);
    delay(60);
  }
  tempread = tempread&gt;&gt;2;.

  // default voltage is 5.0,  analogReference(INTERNAL) sets it to 1.1.
  // temp = temp / 5.0;
  //temp = (5.0 * (float)tempread* 100.0)/1024.0;  //convert the analog data to temperature
  temp = 110 * (float)tempread / 1024; // analogReference(INTERNAL); needed
  Serial.print(&quot;Temp is: &quot;);
  Serial.println(temp);
  return temp;
}// LM35
</pre>
<p>&nbsp;</p>
<p>Also analogReference should be set, preferably in setup</p>
<pre class="brush: cpp; title: ; notranslate">
// analog sensors reference.
// more precise but smaller range
analogReference(INTERNAL);
</pre>
<p>Writing code on web page is not the most effective way, so the same code can also be downloaded from <a title="LM35read.c" href="http://www.ogalik.ee/files/LM35read.txt">here</a>.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ogalik.ee/accurate-lm35-reading/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

