<?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>openSUSE Lizards &#187; Josef Reidinger</title>
	<atom:link href="http://lizards.opensuse.org/author/jreidinger/feed/" rel="self" type="application/rss+xml" />
	<link>http://lizards.opensuse.org</link>
	<description>Blogs and Ramblings of the openSUSE Members</description>
	<lastBuildDate>Tue, 07 Feb 2012 11:48:48 +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>Temporary overwrite method for specific task</title>
		<link>http://lizards.opensuse.org/2011/03/18/temporary-overwrite-method-for-specific-task/</link>
		<comments>http://lizards.opensuse.org/2011/03/18/temporary-overwrite-method-for-specific-task/#comments</comments>
		<pubDate>Fri, 18 Mar 2011 12:37:01 +0000</pubDate>
		<dc:creator>Josef Reidinger</dc:creator>
				<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://lizards.opensuse.org/?p=6810</guid>
		<description><![CDATA[Hi, today I must solve issue with not well structured code. Problem is that one method return last correct version, but in one specific case it needs to return newest version (even incorrect). There is many calls between top level method which know what needs to call and target method which is called from generic [...]]]></description>
			<content:encoded><![CDATA[<p>Hi,<br />
today I must solve issue with not well structured code. Problem is that one method return last correct version, but in one specific case it needs to return newest version (even incorrect). There is many calls between top level method which know what needs to call and target method which is called from generic code. Now I need to fix it and code is not well tested and quite sensitive to changes ( this fix is fix of another fix <img src='http://lizards.opensuse.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . So what is the safest way to change it?<br />
I decide that the best solution which doesn&#8217;t change almost nothing ( but is suitable just for maintenance update, for trunk I create better solution ) is temporary overwrite of target method to change its behavior. Now how to do it?<br />
There is simple example:</p>
<pre>
class T
  def test
    puts "test"
  end

  def lest
    puts "lest"
  end

  def m
    test
  end
end

T.new.m
T.send(:define_method,:m_a) { lest }
T.send(:alias_method, :m_old, :m)
T.send(:alias_method, :m, :m_a)
T.new.m
T.send(:alias_method, :m, :m_old)
T.send(:undef_method, :m_a)
T.send(:undef_method, :m_old)
T.new.m
</pre>
<p>as you can see after modification class is exact same as before ( except if there is method a, but it is possible to handle it via introspection and dynamic choose of method). I don&#8217;t need to change whole stack of calls to add parameter or introduce new singleton class which can have flag.<br />
I hope it help someone with his fix of not so well written piece of software.</p>
]]></content:encoded>
			<wfw:commentRss>http://lizards.opensuse.org/2011/03/18/temporary-overwrite-method-for-specific-task/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Easy scripting actions with susestudio alias new rubygem studio_api</title>
		<link>http://lizards.opensuse.org/2010/12/23/rubygem-studio_api/</link>
		<comments>http://lizards.opensuse.org/2010/12/23/rubygem-studio_api/#comments</comments>
		<pubDate>Thu, 23 Dec 2010 17:37:45 +0000</pubDate>
		<dc:creator>Josef Reidinger</dc:creator>
				<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[studio api]]></category>
		<category><![CDATA[susestudio]]></category>

		<guid isPermaLink="false">http://lizards.opensuse.org/?p=6208</guid>
		<description><![CDATA[Hi, Now I work for SLMS ( Suse Lifecycle Management Server ) project. It cooperate with SuSE studio and use its API. I get idea that more people could benefit from easy access to studio API from ruby so I extract functionality and improve behavior, documentation and testing and now there is new rubygem studio_api. [...]]]></description>
			<content:encoded><![CDATA[<p>Hi,<br />
Now I work for SLMS ( Suse Lifecycle Management Server ) project. It cooperate with SuSE studio and use its API. I get idea that more people could benefit from easy access to studio API from ruby so I extract functionality and improve behavior, documentation and testing and now there is new rubygem studio_api.<br />
Why you should use this gem?</p>
<ul>
<li> ActiveResource Behavior</li>
<li> Actively maintained ( and will be due to SLMS support )</li>
<li> Tightly developed with guys from studio team</li>
<li> Well documented with yard</li>
<li> Good test coverage</li>
</ul>
<p><span id="more-6208"></span><br />
I think then a lot of glory words is better to show example. It is example based on example from documentation.<br />
Example goal is simple. Create new appliance in studio, add own cool rpm and build appliance with it. It can be useful to test your new version of software in stable environment and have automatic appliance in which you can test it.</p>
<pre>
  require 'rubygems'
  require 'studio_api'

  # Fill up Studio credentials (user name, API key, API URL)
  # See https://susestudio.com/user/show_api_key if you are using SUSE Studio online
  connection = StudioApi::Connection.new('user', 'pwd', 'https://susestudio.com/api/v1/user')
  # Setup the connection for all ActiveResource based class
  StudioApi::Util.configure_studio_connection connection

  # Find template with KDE4 for SLE11SP1
  templates = StudioApi::TemplateSet.find(:all).find {|s| s.name == "default" }.template
  template = templates.find { |t| t.name == "SLED 11 SP1, KDE 4 desktop" }
  # clone template to new appliance
  appliance = StudioApi::Appliance.clone template.appliance_id, :name =&gt; "New cool appliance", :arch =&gt; "i686"
  puts "Created appliance #{appliance.inspect}"

  #add own rpm built agains SLED11_SP1
  File.open("/home/jreidinger/rpms/cool_rpm-1.0-1.60.noarch.rpm","r") do |f|
    StudioApi::Rpm.upload f, "SLED11_SP1"
  end
  # and choose it in appliance ( and of course add repository with own rpms)
  appliance.add_user_repository
  appliance.add_package "cool_rpm", :version =&gt; "1.0-1.60"
  #check if appliance is OK, like dependency problems with new rpm
  if appliance.status.state != "ok"
    raise "appliance is not OK - #{appliance.status.issues.inspect}"
  end

  build = StudioApi::RunningBuild.new(:appliance_id =&gt; appliance.id, :image_type =&gt; "xen")
  build.save
  build.reload
  while build.state != "finished"
    puts "building (#{build.state}) - #{build.percent}%"
    sleep 5
    build.reload
  end

  final_build = StudioApi::Build.find build.id
  puts "Appliance to download: #{final_build.download_url}"
</pre>
<p>So I hope that you like interface how I design it. Of course I welcome any suggestion how to improve it. You can use comments here, novell bugzilla or issues on github.<br />
How to install it:</p>
<ul>
<li> In opensuse: <a href="http://software.opensuse.org/ymp/devel:languages:ruby:extensions/openSUSE_11.3/rubygem-studio_api.ymp?base=openSUSE%3A11.3&amp;query=rubygem-studio_api">1-click for 11.3</a> and <a href="http://software.opensuse.org/ymp/devel:languages:ruby:extensions/openSUSE_Factory/rubygem-studio_api.ymp?base=openSUSE%3AFactory&amp;query=rubygem-studio_api">1-click for factory</a></li>
<li> alternative possible everywhere is to use<br />
<code>gem install studio_api</code>
</li>
</ul>
<p>At the end few useful links if you are interested:<br />
<a href="https://github.com/jreidinger/studio_api">repository on github</a><br />
<a href="http://rdoc.info/github/jreidinger/studio_api/master/frames">yard documentation</a><br />
<a href="http://rubygems.org/gems/studio_api">gem at rubygems.org</a></p>
<p>Thanks for attention and I welcome any comments</p>
]]></content:encoded>
			<wfw:commentRss>http://lizards.opensuse.org/2010/12/23/rubygem-studio_api/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hackweek 5 &#8211; LXDE</title>
		<link>http://lizards.opensuse.org/2010/06/08/hackweek5/</link>
		<comments>http://lizards.opensuse.org/2010/06/08/hackweek5/#comments</comments>
		<pubDate>Tue, 08 Jun 2010 14:10:04 +0000</pubDate>
		<dc:creator>Josef Reidinger</dc:creator>
				<category><![CDATA[Desktop]]></category>

		<guid isPermaLink="false">http://lizards.opensuse.org/?p=4291</guid>
		<description><![CDATA[Hi, as hackweek continue I want to present my contribution for this year event. My plan is to support our the youngest supported desktop environment LXDE. So I contact our LXDE guy Andrea Florio and he ask lxde developers. Then we communicate directly and I found as the most intersting idea to replace gnome gvfs [...]]]></description>
			<content:encoded><![CDATA[<p>Hi,</p>
<p>as hackweek continue I want to present my contribution for this year event. My plan is to support our the youngest supported desktop environment LXDE. So I contact our LXDE guy Andrea Florio and he ask lxde developers. Then we communicate directly and I found as the most intersting idea to replace gnome gvfs which is needed to have usable gio interface in glib ( geek-deserialization: allow easy access remote systems, zip archives  in file manager like it is part of filesystem). Motivation for replacement is quite big gvfs dependency and system resource requirements. It choose it because I can learn something new, can return to programming in C from Ruby on Rails which is used for webyast and last not least I think it is usable also for another lightweight environment xfce4.</p>
<p>Code can be located in <a href="http://pcmanfm.git.sourceforge.net/git/gitweb.cgi?p=pcmanfm/gfusevfs;a=summary"> pcman git repository</a>. Idea of implementation is quite simple. Don&#8217;t use daemons and special code to handle different backends. Instead use fuse and its already written fs based on fuse. As first I start with ftps and its sshfs implementation. Code for single fs is simple and short. Today I finish first working proof of concept of gvfs extension and its gfile extension. It can query and copy file on gvfs as you can see in file gfusevfs.c where is testing program. Main problem which I still see is that fs is not umounted so it takes some sources, but umount it after file operation can lead to annoying behavior like passing password on each file operation.</p>
<p>I welcome any comments and ideas about this project.</p>
]]></content:encoded>
			<wfw:commentRss>http://lizards.opensuse.org/2010/06/08/hackweek5/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Encrypted directory</title>
		<link>http://lizards.opensuse.org/2009/12/03/encrypted-directory/</link>
		<comments>http://lizards.opensuse.org/2009/12/03/encrypted-directory/#comments</comments>
		<pubDate>Thu, 03 Dec 2009 14:40:12 +0000</pubDate>
		<dc:creator>Josef Reidinger</dc:creator>
				<category><![CDATA[Base System]]></category>

		<guid isPermaLink="false">http://lizards.opensuse.org/?p=2697</guid>
		<description><![CDATA[I have notebook which contain private data and I don&#8217;t want anyone to read it even if my notebook will be stolen. Encrypted whole home partition is too much as my home directory contains also svn or git repositories which could anybody read. So I create encrypted directory in home directory which contain all private [...]]]></description>
			<content:encoded><![CDATA[<p>I have notebook which contain private data and I don&#8217;t want anyone to read it even if my notebook will be stolen. Encrypted whole home partition is too much as my home directory contains also svn or git repositories which could anybody read. So I create encrypted directory in home directory which contain all private data and rest is normal accessible. So how to do it?<span id="more-2697"></span><br />
At first install user space crypted filesystem <em>encfs</em>. Then create two directories. First one for encrypted data and second one for accessible data. It is up to you how it is named e.g. encrypted and .encrypted or .Xcache and data (if your government feel that you must give him your data, so encrypted data is not so visible). Then create filesystem for it:<br />
<code><br />
mkdir .encrypted encrypted<br />
encfs /home/jreidinger/.encrypted /home/jreidinger/encrypted<br />
</code><br />
Easy, not? Then encrypted directory contain your data. you can unmount it by <em>fusermount -u encrypted</em>.<br />
After reboot you must attach it again. Maybe it is possible to do it easier, but I need that data only if I work from home, so I mount it manually. It is same as if you create <em> encfs /home/jreidinger/.encrypted /home/jreidinger/encrypted</em></p>
]]></content:encoded>
			<wfw:commentRss>http://lizards.opensuse.org/2009/12/03/encrypted-directory/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Ruby on rails, Ajax and memory watching</title>
		<link>http://lizards.opensuse.org/2009/05/14/ruby-on-rails-ajax-and-memory-watching/</link>
		<comments>http://lizards.opensuse.org/2009/05/14/ruby-on-rails-ajax-and-memory-watching/#comments</comments>
		<pubDate>Thu, 14 May 2009 14:44:09 +0000</pubDate>
		<dc:creator>Josef Reidinger</dc:creator>
				<category><![CDATA[YaST]]></category>

		<guid isPermaLink="false">http://lizards.opensuse.org/?p=996</guid>
		<description><![CDATA[As work on webinterface for YaST is in progress we must learn new technologies suitable for web development. WebYast will be written in ruby and ruby on rails framework. Also because WebYast is new interface it could contain AJAX features for better user comfort. Today I found that ajax support in RoR is on good [...]]]></description>
			<content:encoded><![CDATA[<p>As work on webinterface for YaST is in progress we must learn new technologies suitable for web development. WebYast will be written in ruby and ruby on rails framework. Also because WebYast is new interface it could contain AJAX features for better user comfort.  Today I found that ajax support in RoR is on good level and with documentation it takes few minutes to create first example which show current used memory on server. It is not connected anyhow to YaST because I want to focus on AJAX.<br />
And here is a code. It update page every fifth second (but not refresh only update div, on bigger page it is really significant):<br />
<code>/views/home/index.html.erb:<br />
&lt;%= javascript_include_tag :defaults %&gt;<br />
&lt;h1&gt;Hello world!&lt;/h1&gt;<br />
&lt;%= periodically_call_remote(:url =&gt; { :action =&gt; 'get_averages' }, :update =&gt; 'avg',:frequency =&gt; '5') %&gt;<br />
&lt;div id="avg"&gt;<br />
Memory usage is X MB &lt;/div&gt;<br />
</code><code>controllers/home_controller.rb:<br />
class HomeController &lt; ApplicationController<br />
&nbsp;&nbsp;  def index<br />
&nbsp;&nbsp;  end<br />
&nbsp;&nbsp;  def get_averages<br />
&nbsp;&nbsp;&nbsp;&nbsp;    output = `free -m` # bash solution - | sed 's/Mem:[^0-9]+[0-9]+[^0-9]+([0-9]+).*$/1/;2q;1d'`<br />
&nbsp;&nbsp;&nbsp;&nbsp;    output = $1 if (output =~ /.*n(.*)n.*n.*n/) #let live second line<br />
&nbsp;&nbsp;&nbsp;&nbsp;    output = $1 if (output =~ /.*:s+S+s+(S+)s+/) #second field<br />
&nbsp;&nbsp;&nbsp;&nbsp;    render :text  =&gt; "Usage mem is "+output+"MB RAM."<br />
&nbsp;&nbsp;  end<br />
end<br />
</code></p>
<p>And thats all to watch your server usage.</p>
]]></content:encoded>
			<wfw:commentRss>http://lizards.opensuse.org/2009/05/14/ruby-on-rails-ajax-and-memory-watching/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Edit system on iso image</title>
		<link>http://lizards.opensuse.org/2009/04/02/edit-system-on-iso-image/</link>
		<comments>http://lizards.opensuse.org/2009/04/02/edit-system-on-iso-image/#comments</comments>
		<pubDate>Thu, 02 Apr 2009 12:37:55 +0000</pubDate>
		<dc:creator>Josef Reidinger</dc:creator>
				<category><![CDATA[Base System]]></category>
		<category><![CDATA[Systems Management]]></category>

		<guid isPermaLink="false">http://lizards.opensuse.org/?p=671</guid>
		<description><![CDATA[I start maintaining yast2-repair and first bug which I start solving is that repair from DVD menu doesn&#8217;t work same as from installation menu. Find where is problem and also test if fix is correct is not trivial. I describe below how to modify inst-sys on DVD or software on LiveCD. I found useful information [...]]]></description>
			<content:encoded><![CDATA[<p>I start maintaining yast2-repair and first bug which I start solving is that repair from DVD menu doesn&#8217;t work same as from installation menu. Find where is problem and also test if fix is correct is not trivial. I describe below how to modify inst-sys on DVD or software on LiveCD.</p>
<p><span id="more-671"></span>
<p>I found useful information on our wiki &#8211; <a href="http://en.opensuse.org/Linuxrc/Creating_Modified_Installation_System"> Creating modified installation system</a>. But I don&#8217;t want install from network, as it doesn&#8217;t shown same menu as on DVD. I try use mkisofs, but it is not easy set same boot sector as have original iso image. And there I found good software &#8211; isomaster. This allows you to replace file on iso image and remember from original iso image where it has its boot sector. This iso should be easily tested in e.g. Virtual Box and I can verify, that my fix work before we release first DVD with opensuse 11.2. Just sidenote &#8211; linuxrc show warning, that your inst-sys doesn&#8217;t match checksum.</p>
<p>Same way is possible edit whole LiveCD. Simple mount and copy content of live system to your disc and with zypper &#8211;root you can change software in your LiveCD. Then create squashfs ( I use <em>mksquashfs live_root  openSUSE-kde-11.1-read-only.i686-2.7.0 -no-duplicates -noappend</em> ) and with isomaster replace file openSUSE-* and you have your modified liveCD.</p>
]]></content:encoded>
			<wfw:commentRss>http://lizards.opensuse.org/2009/04/02/edit-system-on-iso-image/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Zypper: Improved bash completion and practical usage</title>
		<link>http://lizards.opensuse.org/2009/02/12/zypper-improved-bash-completion-and-practical-usage/</link>
		<comments>http://lizards.opensuse.org/2009/02/12/zypper-improved-bash-completion-and-practical-usage/#comments</comments>
		<pubDate>Thu, 12 Feb 2009 09:28:43 +0000</pubDate>
		<dc:creator>Josef Reidinger</dc:creator>
				<category><![CDATA[Software Management]]></category>
		<category><![CDATA[Usability]]></category>

		<guid isPermaLink="false">http://lizards.opensuse.org/?p=423</guid>
		<description><![CDATA[Because no one reported any bugs to perl-Bootloader, I have some free time. I use it to improve bash completion for zypper, because I find current one have some really annoying things. In short now completion work also for zypper global options, hint also for short version of commands and help name of repo, service [...]]]></description>
			<content:encoded><![CDATA[<p>Because no one reported any bugs to perl-Bootloader, I have some free time. I use it to improve bash completion for zypper, because I find current one have some really annoying things. In short now completion work also for zypper global options, hint also for short version of commands and help name of repo, service and lock, if you use command which takes that as argument. Next few paragraphs contain practical examples how it help improve your command line productivity, how to get it to your system and also some notes how I implement it.<span id="more-423"></span><br />
At first how you can try it. It is really easy, in 11.2 it will be part of package, 11.1 contain only old bash-completion (created by Marek Stopka), so you must download this <a href="http://git.opensuse.org/?p=projects/zypp/zypper.git;a=blob;f=src/bash-completion.sh;hb=HEAD"> file </a> and save it as <strong>/etc/bash_completion.d/zypper.sh</strong>. After bash restart (simple type &#8216;bash&#8217; to get new shell) you can enjoy new bash completion.<br />
First change is that automatic hints works for all commands &#8211; long or short version and also on different zypper version (it is dynamic generated), so if you are not what is exactly name of option just use tab.<br />
<code><br />
zofie:/home/jreidinger # zypper in --<br />
--auto-agree-with-licenses  --from<br />
--capability                       --name<br />
--debug-solver                  --no-force-resolution<br />
--dry-run                          --no-recommends<br />
--force                             --repo<br />
--force-resolution              --type<br />
</code><br />
Improvement is also that it work also after first option (before it hint only first option after command. Now it also help you with global zypper option, so if you don&#8217;t yet write command you can type &#8212; and get all global options.<br />
<code><br />
zofie:/home/jreidinger # zypper --<br />
--cache-dir                             --plus-repo<br />
--disable-repositories              --quiet<br />
--disable-system-resolvables  --raw-cache-dir<br />
--help                                    --reposd-dir<br />
--no-abbrev                            --root<br />
--no-cd                                  --rug-compatible<br />
--no-gpg-checks                     --table-style<br />
--non-interactive                     --verbose<br />
--no-refresh                           --version<br />
--no-remote                           --xmlout<br />
</code><br />
What I find quite useful is that now you get hint also for repository, service or lock. I have quite long repository names and it is really annoying write it. So I usually use <em>zypper lr</em> to get number and then use that number instead repository name, as it is less typing. Now you can get help (problem is with names with spaces, I <a href="https://bugzilla.novell.com/show_bug.cgi?id=474361"> reported it</a>):<br />
<code><br />
zofie:/home/jreidinger # zypper ref repo-<br />
repo-debug    repo-non-oss  repo-oss      repo-source   repo-update<br />
</code><br />
So I hope you enjoy this improvements and I welcome any idea how improve it in comments.<br />
Last paragraph is some notes about implementation. At first for compare you can look at original bash complete from marek stopka <a href="http://git.opensuse.org/?p=projects/zypp/zypper.git;a=blob;f=src/bash-completion.sh;h=2396d5faa7999216c448c70ea7c20c38349ce0cf;hb=3825458e6a86f4541f73abf9f71bb366377715d5">here</a>. First what you can see, is that I remove static generating options help and create it dynamic. This really improve maintenance of this script. Only part which is static is special command handling like commands with repository, service or lock arguments. Second change is that now commands is recognized also if user use short option (e.g. when user type zypper mr and want hint for repository). This is quite easy change, as I only change awk output and remove comma between long and short version of command. Next change is more backward study of user line to find what command is typed. As you can see in original is study only previous argument. This causes problem when user want more options or use option and want help for argument. After my rewrite script is shorted by 20% and has better functionality and maintainability.</p>
]]></content:encoded>
			<wfw:commentRss>http://lizards.opensuse.org/2009/02/12/zypper-improved-bash-completion-and-practical-usage/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>What changed in perl-Bootloader between 11.0 and 11.1</title>
		<link>http://lizards.opensuse.org/2008/12/18/what-changed-in-perl-bootloader-between-110-and-111/</link>
		<comments>http://lizards.opensuse.org/2008/12/18/what-changed-in-perl-bootloader-between-110-and-111/#comments</comments>
		<pubDate>Thu, 18 Dec 2008 12:04:25 +0000</pubDate>
		<dc:creator>Josef Reidinger</dc:creator>
				<category><![CDATA[Base System]]></category>
		<category><![CDATA[bootloader]]></category>

		<guid isPermaLink="false">http://lizards.opensuse.org/?p=323</guid>
		<description><![CDATA[I start with history. After 11.0 I became maintainer of perl-Bootloader (I never before write anything in perl, but know some other scripting language, so it is not so hard learn another one) after Alexander. Problem is that alexander doesn&#8217;t have enough time for maintainer it (he is also leader of arch team). This mean [...]]]></description>
			<content:encoded><![CDATA[<p>I start with history. After 11.0 I became maintainer of perl-Bootloader (I never before write anything in perl, but know some other scripting language, so it is not so hard learn another one) after Alexander. Problem is that alexander doesn&#8217;t have enough time for maintainer it (he is also leader of arch team).  This mean I get many unresolved bugs (around 150), because lack of resource prevents fixing it. Also I get some features to implement and some enhancement I found enough useful (some idea start in bug reports or on factory mailing list, so thanks community) to implement it. I describe what succeed and what not in rest of this blog entry.<span id="more-323"></span><br />
Features can be divide to official which come through fate process ( you can read more about this process in <a href="http://lizards.opensuse.org/2008/12/16/fate-internal-up-and-downstream/">another blog</a>) and enhancement, which sounds reasonable for me.</p>
<h3>Official features</h3>
<p>First I look on official features. I think most important is automatic test suite. This is set of automatic test, which test again interface of library (it is black box testing).  Before release of 11.1 this test suite contain 232 tests. I hope this increase quality of each perl-Bootloader release, because this suite catch many problems and also if new occur I add to it (this should prevent regression). Only problem with this test suite is that it doesn&#8217;t test whole kernel upgrade. It is hard to due, because kernel upgrade must fill itself hardware informations and if I want test it correctly I must simulate it with actual utilities which is used and on many types of hardware. So this part should be improved, but need some idea how test many hardware configuration (like different RAIDs (linux and bios), LVMs, multipath, different hardware architecture (like macos, efika or chrp on powerpc))  on one machine.<br />
Another feature is consistent device names. This is most problematic feature, because it is hard to resolve many different devices given by udev (also udev is broken during some part of development). I experiment with many different sollution and at final I decide (it is after last beta) to create function which translate everything to kernel device and then compare that device to another translated device (previous solution based on filling all symlinks also work, but after device mapper problem with udev(more lower) I change it to more efficient and more reliable solution).<br />
Next feature you can use if you have machine with chip to trusted computing (some notebooks have it). More about trusted computing you can read <a href="http://trousers.sourceforge.net/grub.html">here</a>. Most work did thorsten duwe (maintainer of grub) and in final I only ensure that due to security reason no splash screen is loaded (I remove message line even if user want it).  If you have pc with GPT table and x86_64 processor you must for 11.0 use legacy booting. Now you can use ELILO bootloader (which have support efi) also on x86 architecture. This is also quite easy to implement, but harder to ensure it works, because get hardware with that configuration is not so easy. Only short notes for another features. Old disks which uses C/H/S is dropped and LBA is forced, kernel append during upgrade is taken from sysconfig and add support for disk remapping for windows entries.</p>
<h3>Enhancement</h3>
<p>Difference between feature and bug is really small and maybe some of enhancement looks more like bug and vice versa. For me interesting enhancement is check, if /boot is mounted. I use it at home quite often, because if you have separate home you needn&#8217;t mount it, but if during update also kernel is updated I often forgot mount it. First implementation is not ideal and I get many experience, that some users have really exotic entries in fstab, which of course bad match to check pattern. But after three iteration and one work-around this work quite good and I am satisfied with it. Another enhancement (really close to bug) is none bootloader. It is special bootloader settings, which ensure that nothing happen during kernel upgrade. It is quite useful if kernel update mess your configuration (which is bug, but you want prevent it until I fixed it) or take to much time (this is also bug). More important usage is for netboot, when you needn&#8217;t any bootloader, because you boot via PXE.<br />
Important enhanced is stop kernel install, if bootloader update fail (problem is in using tee in pipe and ignore script return value). It is good, because you know that something goes wrong and reload backup. Also because usually new kernel is installed first, you still have old kernel and can boot it. Last enhancement is for anyone who want look how perl-bootloader works inside. Now you can use <i>make doc</i> in sources and it generates html page from comments (something like javadoc). Beside this documentation together with Jozo Uhliarik we create wiki page about <a href="http://en.opensuse.org/YaST/Bootloader_API">interface of library</a> and anyone who want use perl-Bootloader should use it.</p>
<h3>Bugs</h3>
<p>Solving bugs in perl-Bootloader is not so interesting as it looks like <img src='http://lizards.opensuse.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> . You need analyze many long logs (if perl-Bootloader uses yast, then it is saved to y2log, if used by kernel upgrade then save to perl-BL-standalone log) and find what and when going wrong. You find what is wrong, but not who break it. Sometime it is bug in parsing configuration, sometime in parsing output of external commands and sometime is bug outside (like break udev).  Source code (also with test suite) have 15k LOC and when I try look how many line I change (oneliner for it `find . -type f 2&gt;/dev/null | grep -v .svn | xargs svn blame | grep jreidinger | wc -l `) I find, that I change 3k LOC. So code base is good, but need some improvement. I note some interesting bugs, which I solve.<br />
One is longterm problem with chainload, when as root is current mounted root, but chainloader key is with right prefix (root of chainloaded partition). This on some hardware causes problems and now root is correctly set and I don&#8217;t have any negative responses (so I hope it works).<br />
Another one is also quite long term problem when you change flavor of kernel, sometime previous kernel is uninstalled and after that new installed (normal work-flow is install new and uninstall old). Of course it switch default, which is quite annoying. Fix this is quite tricky, and trick is that after remove last image section and if it is default, I add comment about that and when new kernel is added, then set it as default. That fix works quite good, but after sent iso to factory (for boxes) I get bugs, that if you update via YaST, it doesn&#8217;t work. Problem is in some deprecated code which overwrite my comment by another one. Fix is easy, I only remove deprecated code, which cause it. So if you after install of opensuse11.1 see update of perl-Bootloader you know why.  As late update is also solved problem with hanging kernel update. It take too much time because when I read logs I add useful logging lines to code (I hope it help me next time find problem faster) and when log records reach some level, it take too much time (due to array copying of records). I reduce debug logging and also improve whole performance of logging, so I hope it significant improve time to kernel update (at least it should not take minutes to upgrade bootloader configuration).<br />
Not every bug is problem of perl-Bootloader, but you must solve it in code. Example is device mapper and udev inconsistency. Udev points to /dev/dm0, but device mapper to /dev/mapper/something. This became real problem when persistant names feature is implemented. Solution is also little tricky, udev define variables for links and one of that variable is DM_NAME for name of device and DM_PART for partition number and with this information I can construct whole /dev/mapper/name. I find this solution as working, but not much robust. If someone know better, (s-)he is welcome to write it to comment. Also many perl warnings is fixed, it usually doesn&#8217;t break anything, but it looks really unprofessional.<br />
Now I have only 2 unresolved bugs (both is enhancement on which I work) and wait for another, so report all problems in opensuse11.1, I don&#8217;t throw it to bin <img src='http://lizards.opensuse.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://lizards.opensuse.org/2008/12/18/what-changed-in-perl-bootloader-between-110-and-111/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>New software in build service</title>
		<link>http://lizards.opensuse.org/2008/11/18/new-software-in-build-service/</link>
		<comments>http://lizards.opensuse.org/2008/11/18/new-software-in-build-service/#comments</comments>
		<pubDate>Tue, 18 Nov 2008 18:33:33 +0000</pubDate>
		<dc:creator>Josef Reidinger</dc:creator>
				<category><![CDATA[Build Service]]></category>
		<category><![CDATA[GNOME]]></category>
		<category><![CDATA[Packaging]]></category>
		<category><![CDATA[XFCE]]></category>

		<guid isPermaLink="false">http://lizards.opensuse.org/?p=280</guid>
		<description><![CDATA[I try testing xfce4 desktop and find some bugs. But I also find that some really interesting missing in opensuse build service, so I add two new applications to build service (gnome community repository&#8230;but now gaupol is available only in my personal repository, because in gnome pygtk wait for python 1.6) &#8211; osmo and gaupol. [...]]]></description>
			<content:encoded><![CDATA[<p>I try testing xfce4 desktop and find some bugs. But I also find that some really interesting missing in opensuse build service, so I add two new applications to build service (<a href="http://download.opensuse.org/repositories/GNOME:/Community/openSUSE_Factory/">gnome community repository</a>&#8230;but now gaupol is available only in my <a href="http://download.opensuse.org/repositories/home:/jreidinger:/gaupol/openSUSE_Factory/">personal repository</a>, because in gnome pygtk wait for python 1.6) &#8211; <a href="http://clay.ll.pl/osmo/">osmo</a> and <a href="http://home.gna.org/gaupol/">gaupol</a>.<br />
 <span id="more-280"></span><br />
I start with gaupol which I often use to correct subtitle timing. Yes it is subtitle editor, which support translating, previewing or converting between subtitle format. more info you can get on project website &#8211; <a href="http://home.gna.org/gaupol/">http://home.gna.org/gaupol/</a>. This package depends on python bindings of enchant library, so I also package that wrapper. And here is screenshot how it run on opensuse beta4 with xfce desktop:<br />
<a href="http://lizards.opensuse.org/wp-content/uploads/2008/11/gaupol.png"><img class="alignnone size-medium wp-image-281" src="http://lizards.opensuse.org/wp-content/uploads/2008/11/gaupol-300x240.png" alt="gaupol screenshot" width="300" height="240" /></a><br />
Second is osmo. This is personal organizer for your appointments or tasks. It is nice described in <a href="http://www.linux.com/feature/123837"> article on linux.com </a>. I only add to it that it is good integrated to xfce enviroment (see right up corner on screenshot) and I personally prefer it against orage which is xfce project. It depends only on library for synchronizing syncml and library for support icalendar Libical. And screenshot for osmo:<br />
<a href="http://lizards.opensuse.org/wp-content/uploads/2008/11/osmo.png"><img class="alignnone size-medium wp-image-282" src="http://lizards.opensuse.org/wp-content/uploads/2008/11/osmo-300x240.png" alt="osmo" width="300" height="240" /></a></p>
<p>This is my first work with build service and It take me two hour to package this applications. So don&#8217;t wait and also prepare your own package for software which you miss in opensuse. But at first try <a href="http://software.opensuse.org/search"> search </a>, if someone before you doesn&#8217;t make it and share his(her) work with you.</p>
]]></content:encoded>
			<wfw:commentRss>http://lizards.opensuse.org/2008/11/18/new-software-in-build-service/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>What to do if every kernel update break your bootloader settings</title>
		<link>http://lizards.opensuse.org/2008/11/06/what-to-do-if-every-kernel-update-break-your-bootloader-settings/</link>
		<comments>http://lizards.opensuse.org/2008/11/06/what-to-do-if-every-kernel-update-break-your-bootloader-settings/#comments</comments>
		<pubDate>Thu, 06 Nov 2008 08:57:00 +0000</pubDate>
		<dc:creator>Josef Reidinger</dc:creator>
				<category><![CDATA[Base System]]></category>
		<category><![CDATA[kernel update]]></category>
		<category><![CDATA[perl-Bootloader]]></category>

		<guid isPermaLink="false">http://lizards.opensuse.org/?p=272</guid>
		<description><![CDATA[Perl-Bootloader response for kernel post-install bootloader update script. Current target is ensure, that you have in your bootloader actually kernel and also that entries for old kernel is removed. This is problematic for some complex or manually enhanced configuration. In this case perl-Bootloader should somehow break your settings (this mean you still can boot, but [...]]]></description>
			<content:encoded><![CDATA[<p>Perl-Bootloader response for kernel post-install bootloader update script. Current target is ensure, that you have in your bootloader actually kernel and also that entries for old kernel is removed. This is problematic for some complex or manually enhanced configuration. In this case perl-Bootloader should somehow break your settings (this mean you still can boot, but your enhancement or extra sections can dismiss). This should change in future as noticed in <a href="https://bugzilla.novell.com/show_bug.cgi?id=427854"> bugzilla </a>.</p>
<p>If you want maintain your configuration manually, you can simple set your bootloader to none. There is two ways how you can do it. First is set <em>LOADER_TYPE=&#8221;none&#8221;</em> in <em>/etc/sysconfig/bootloader</em>. Second is set this in <em>yast2 bootloader</em>. Another advantage is that this take almost no-time, so if obtain hardware configuration for update take to much time, this is workaround.</p>
<p><strong>Warning</strong>, if you set bootloader type to none you must manually edit your bootloader configuration after kernel update. What can help you, is set image and initrd to symlinks which lead to actual kernel.</p>
]]></content:encoded>
			<wfw:commentRss>http://lizards.opensuse.org/2008/11/06/what-to-do-if-every-kernel-update-break-your-bootloader-settings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

