Monday, May 26, 2008

Research of possibility: running YaST anywhere

Hello !

One week ago I installed Fedora Core 9 distribution. But (experienced from openSUSE) there was something I missed : YaST and zypper. So I decide to port them to Fedora (and maybe to other distributons later).

I did something similar a long time ago (it was FC5) but now it seems much easier. Our developers makes UI part independent from ycp language. So I just compile libyui, libyui-bindings, qt, ncurses and was able to run example code in both frontends. With GTK there is still problem that is not cleaned from libzypp dependency.

Then I compiled libzypp and zypper. Then I add installation source - local CD-rom:

zypper ar cd:///?devices=/dev/sr0 CD

And it works perfectly!

Compared to yum is zypper much, much faster. Just for an example (I turn autorefresh on, by default is autorefresh disabled):

[root@dhcp24 ~]# time zypper se rpmlint
Reading installed packages...

S | Name | Summary | Type
--+---------+-------------------------------------------------+--------
| rpmlint | Tool for checking common errors in RPM packages | package

real 0m0.958s
user 0m0.308s
sys 0m0.482s
[root@dhcp24 ~]# time yum search rpmlint
Loaded plugins: refresh-packagekit
======================================== Matched: rpmlint =========================================
rpmlint.noarch : Tool for checking common errors in RPM packages

real 0m2.765s
user 0m1.826s
sys 0m0.788s

With autorefresh disabled search time is even better:

[root@dhcp24 ~]# time zypper se rpmlint
Reading installed packages...

S | Name | Summary | Type
--+---------+-------------------------------------------------+--------
| rpmlint | Tool for checking common errors in RPM packages | package

real 0m0.717s
user 0m0.289s
sys 0m0.362s


Note: I don't wan't to say which tool is better (everybody knows ;-)). Just that you can use zypper on the same installation source like yum. There are some requests on that porting from RH/Fedora users. And also some other people are thinking about this.

Ok, after that I compiled yast2-core, yast2-devtools, yast2-testsuite, yast2-perl-bindings, yast2-ycp-ui-bindings, yast2, yast2-pkg-bindings (maybe I forgot something, sorry). Finally mine package yast2-iscsi-client. Some patch because of distribution differences ... and the result is:



It works! ;-)
So we definitely can run YaST and its configuration modules on Fedora Core 9!

Ok, some work is needed to be done: create Build Service project and as a first step some distribution based patches. After that we should find some system how to use different backends for different distributions (like NetworkManager does). But this is something for another post ...

Good night,
Michal