<?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>stick&#039;s corner &#187; intro</title>
	<atom:link href="http://stick.gk2.sk/blog/tag/intro/feed/" rel="self" type="application/rss+xml" />
	<link>http://stick.gk2.sk</link>
	<description>Look at you, hacker. A pathetic creature of meat and bone. How can you challenge a perfect, immortal machine?</description>
	<lastBuildDate>Mon, 26 Jul 2010 16:31:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Popcorn &#8211; Popularity Contest (for RPM)</title>
		<link>http://stick.gk2.sk/blog/2009/03/popcorn-popularity-contest-for-rpm/</link>
		<comments>http://stick.gk2.sk/blog/2009/03/popcorn-popularity-contest-for-rpm/#comments</comments>
		<pubDate>Fri, 13 Mar 2009 08:18:55 +0000</pubDate>
		<dc:creator>Pavol Rusnak</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[intro]]></category>
		<category><![CDATA[opensuse]]></category>
		<category><![CDATA[popcon]]></category>
		<category><![CDATA[popcorn]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[rpm]]></category>

		<guid isPermaLink="false">http://stick.gk2.sk/blog/?p=173</guid>
		<description><![CDATA[A few days ago I came across Feature #305877. What is it about? Well, Debian has the Popularity Contest, which tracks installed packages, how often they are used and sends an anonymized report once a week to their server. This maps the usage of Debian packages and as a nice side effect Debian guys can [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-174" style="margin-right: 16px;" title="Popcorn" src="http://stick.gk2.sk/blog/wp-content/uploads/2009/03/popcorn-128x128.png" alt="Popcorn" width="128" height="128" /></p>
<p style="text-align: justify;">A few days ago I came across <a href="https://features.opensuse.org/305877">Feature #305877</a>. What is it about? Well, Debian has the <a href="http://popcon.debian.org/">Popularity Contest</a>, which tracks installed packages, how often they are used and sends an anonymized report once a week to their server. This maps the usage of Debian packages and as a nice side effect Debian guys can estimate the size of their user base on various platforms and releases. This also gives information about the community structure (e.g. how many users use development tools or graphic applications). This would be a very neat thing to have in openSUSE too!</p>
<p style="text-align: justify;">At first, the task seemed pretty straightforward &#8211; just to replace dpkg calls with corresponding calls to rpm. There was one catch, though. Because of the transactions, which RPM uses, scanning on my openSUSE 11.1 machine took 2 minutes instead of 2 seconds on Debian! That&#8217;s because RPM creates one transaction for each package and constant locking and unlocking of rpmdb makes this process really slow. I rewrote the script to python, just to see how long will it take using only one long transaction and was very pleasantly surprised that it got back to 2 seconds. <img src='http://stick.gk2.sk/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Moreover, rpmdb can tell you the exact time when the package was installed, so there was no need to check for <a href="http://en.wikipedia.org/wiki/Stat_(Unix)">ctime</a> for files inside the packages like Debian does. (We still have to check for files <a href="http://en.wikipedia.org/wiki/Stat_(Unix)">atime</a> to determine whether the package is used or not, though).</p>
<p style="text-align: justify;">For the server part I was pretty sure about writing it in C to have it very fast and responsive, because I want to process incoming requests on the fly. The problem was with the storage. At the beginning I thought about using <a href="http://www.sqlite.org/">SQLite</a>, but after some testing I decided to use much lighter disk-based hashtables <a href="http://tdb.samba.org/">TDB</a> from the <a href="http://samba.org/">Samba</a> team, because they perfectly fitted my humble needs.</p>
<p style="text-align: justify;">Has this caught your interest? You can dig through the code at <a href="http://gitorious.org/opensuse/popcorn">gitorious</a> and any help is deeply welcome!. Yes, and why popcorn? Because the original is called popcon, but everybody at work just kept calling it popcorn during the discussions. Later I found another reason: popcorn is intended for RPM packages, so we definitively need an extra R in the name. <img src='http://stick.gk2.sk/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://stick.gk2.sk/blog/2009/03/popcorn-popularity-contest-for-rpm/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Scout project introduction</title>
		<link>http://stick.gk2.sk/blog/2008/05/scout-project-introduction/</link>
		<comments>http://stick.gk2.sk/blog/2008/05/scout-project-introduction/#comments</comments>
		<pubDate>Fri, 16 May 2008 21:13:03 +0000</pubDate>
		<dc:creator>Pavol Rusnak</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[intro]]></category>
		<category><![CDATA[opensuse]]></category>
		<category><![CDATA[scout]]></category>

		<guid isPermaLink="false">http://stick.gk2.sk/blog/?p=10</guid>
		<description><![CDATA[You might have heard about my older project called command-not-found. Right now it is implemented as SQLite database which contains only table(binary, path, package). (I&#8217;m going to rewrite it, so that it makes use of the new SAT solver files, but this is not the topic of this blogpost). In the meantime, my colleague and [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">You might have heard about my older project called <a href="http://stick.gk2.sk/blog/?p=4">command-not-found</a>. Right now it is implemented as SQLite database which contains only <kbd>table(binary, path, package)</kbd>. (I&#8217;m going to rewrite it, so that it makes use of the new SAT solver files, but this is not the topic of this blogpost).</p>
<p style="text-align: justify;">In the meantime, my colleague and Java packager Michal Vyskocil encountered a problem: it is very hard to find out which package installs particular Java class. Standa Brabec suggested that we could also process autoconf macros stored in m4 files. So we decided to merge these ideas together and we started the &#8220;Scout&#8221; project.</p>
<p style="text-align: justify;">It will be a command line utility which will index various attributes of the packages and will allow the users to search in them. Each functionality will have its own module, so implementation could differ (we wanted the binary module to use SAT solver files and the others SQlite). I think that you&#8217;ll get the idea from the following picture:</p>
<p style="text-align: center;">
<p style="text-align: center;">
<p style="text-align: center;"><a title="Scout project mockup" href="http://stick.gk2.sk/blog/wp-content/uploads/2008/05/scout-mockup.png"  rel="lightbox[10]"><img class="size-medium wp-image-12 aligncenter" title="scout-mockup" src="http://stick.gk2.sk/blog/wp-content/uploads/2008/05/scout-mockup-300x170.png" alt="" width="300" height="170" /></a></p>
<p style="text-align: justify;">Michal and I started development by creating a <a href="http://repo.or.cz/w/scout.git">GIT repository</a> (not much to see there, yet). Obviously this program will not appear in openSUSE 11.0, but we&#8217;d like to see it in 11.1 (and my plan is that command-not-found will use scout as its helper). At start, we will create 3 modules (binaries, java and autoconf), but later we&#8217;ll extend the support for python/ruby programmers.</p>
<p style="text-align: justify;">If you have any ideas, do not hesitate and contact me! <img src='http://stick.gk2.sk/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://stick.gk2.sk/blog/2008/05/scout-project-introduction/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>command-not-found for openSUSE</title>
		<link>http://stick.gk2.sk/blog/2008/02/command-not-found-for-opensuse/</link>
		<comments>http://stick.gk2.sk/blog/2008/02/command-not-found-for-opensuse/#comments</comments>
		<pubDate>Tue, 26 Feb 2008 11:11:42 +0000</pubDate>
		<dc:creator>Pavol Rusnak</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[intro]]></category>
		<category><![CDATA[opensuse]]></category>
		<category><![CDATA[release]]></category>
		<category><![CDATA[tryme]]></category>

		<guid isPermaLink="false">http://stick.gk2.sk/blog/?p=4</guid>
		<description><![CDATA[During Hackweek I implemented project command-not-found for openSUSE. Background: Debian and Ubuntu use patched bash, that allows to write handler, which is executed before &#8220;command not found&#8221; is written. That provides us a way we can help user in solving the problem. You can look at the picture to get the idea: In first example, [...]]]></description>
			<content:encoded><![CDATA[<p>During Hackweek I implemented project <a href="http://idea.opensuse.org/content/ideas/command-not-found-for-opensuse">command-not-found for openSUSE</a>.</p>
<p class="justify" style="text-align: justify;">Background: Debian and Ubuntu use patched bash, that allows to write handler, which is executed before &#8220;command not found&#8221; is written. That provides us a way we can help user in solving the problem. You can look at the picture to get the idea:</p>
<p class="justify">
<p class="justify" style="text-align: center;"><a title="command-not-found in action" href="http://stick.gk2.sk/blog/wp-content/uploads/2008/05/cnf.png"  rel="lightbox[4]"><img class="size-medium wp-image-7" title="Screenshot" src="http://stick.gk2.sk/blog/wp-content/uploads/2008/05/cnf-300x225.png" alt="" width="300" height="225" /></a></p>
<p class="justify">
<p class="justify" style="text-align: justify;">In first example, user types &#8220;epihpany&#8221; instead of &#8220;epiphany&#8221; and handler suggests correct spelling. After this user tries running epiphany, but it is not installed, so handler shows list of packages that provide this program. In the third example, user runs program that is not found, but package providing it is installed (meaning that program is not in user&#8217;s path &#8211; probably intended to be run only by root).</p>
<p class="justify" style="text-align: justify;">Package command-not-found and patched bash are available in <a href="https://build.opensuse.org/project/show?project=home:prusnak:command-not-found">BuildService</a> or you can download packages directly from <a href="http://download.opensuse.org/repositories/home:/prusnak:/command-not-found/">repository</a>. Please test the packages and let me know if you have any ideas or in case you have found a bug.</p>
<p style="text-align: justify;">Ah, I almost forgot <img src='http://stick.gk2.sk/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  You have to add these 3 lines to /etc/bash.bashrc.local or ~/.bashrc:</p>
<pre>if [ -f /etc/bash_command_not_found ]; then
  . /etc/bash_command_not_found
fi</pre>
<p>Handler for zsh can be installed in similar fashion. Read README in command-not-found package.</p>
]]></content:encoded>
			<wfw:commentRss>http://stick.gk2.sk/blog/2008/02/command-not-found-for-opensuse/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
