Home Home > 2009 > 02 > 03
Sign up | Login

Deprecation notice: openSUSE Lizards user blog platform is deprecated, and will remain read only for the time being. Learn more...

Archive for February 3rd, 2009

Do You Want Multiple Kernels on Your System?

February 3rd, 2009 by

Today, I’d like to mention another rather hidden feature of openSUSE 11.1. The package management is finally able to keep multiple versions of packages, if they support installation of parallel versions. A typical example of this is of course kernel. A lot of people want to keep the old, functional, kernel around when installing a kernel update and now there is a way to do it.

Open /etc/zypp/zypp.conf in your favorite editor and change this value:

multiversion = kernel-default,kernel-default-extra,kernel-default-base,kernel-source

The list contains names of packages to be installed via ‘rpm -i’ instead of ‘rpm -U’. Just adopt it to your the kernel flavor you are using.

Of course, there is a catch – there are no means to limit the number of package versions to be installed this way. The reasoning is that there is no automatic way to guess which versions to remove (in case of kernel, everyone has its own definition of working kernel) So you have to uninstall additional kernels you don’t need anymore manually.

Enjoy!

YaST WEB

February 3rd, 2009 by

Aim

First of all we want to provide an general web based interface with the
functionality which is already provided by the YaST command line interface.

This API is based on the REST (Representational state transfer) architecture. This is a
simple interface which transmits domain-specific data over HTTP.
Please have a look to

http://en.wikipedia.org/wiki/Representational_State_Transfer

for more information about REST.

The second aim is to provide a YaST Web UI which can be used by every
web browser.

The current state of the project is an existing YaST-Webservice on the
host side which provides the REST based interface.
On the client side we have the concerning YaST-Webclient which can be
used be any web browser.

YaST-Webservice and YaST-Webclient are running as a webserver
(currently lighttpd) on different or even the same computer.

So the aim is to configure a host via the internet in a simple and
safety way.

How does it work ?

YaST Web

The YaST Webclient communicate via HTTP(s) with the YaST Webservice. The
user has to authenticate ( username, password ) to the host via PAM
(Pluggable Authentication Modules) which is available on every linux system.

The YaST Webclient sends requests ( e.g. create a user, install patch) to
the YaST Webservice. This service checks if the user has the right to
execute this request via PolicyKit. For each kind of request there is
PolicyKit rule defined. These rights has to be granted to the concerning user.

After permission check the request will be send via DBUS to the SCR agent of
YaST. The return value will be given back to YaST-Webclient in XML or JSON
format.

Patches will be handled by PackageKit. These requests will also be sent from
the YaST Webservice to PackageKit via DBUS.

How to get it ?

Have a look the openSUSE buildservice project

YaST Webservice (home:schubi2)

There are all needed packages for version openSuSE 11.1 and above.

As some additional packages (e.g. lighttpd) are needed which are not on openSuSE 11.1 you should add a
repositories ( e.g. factory ) in order to provide these packages.
The simplest way for installation would be to use zypper:

zypper in yast2-core-2*.rpm
zypper in ruby-dbus-*.rpm
zypper in yast2-webservice-*.rpm
zypper in yast2-webclient-*.rpm

How to use the YaST-Webservice

After you have installed these packages you can start the YaST-Webservice-Server with

rcyastws start

The server is running as “localhost:8080” with which you can connect with a web browser:

http://localhost:8080

YaST-Webservice

This “pure” web page shows the available modules which can be used via the REST interface.

This REST API is described under

http://localhost:8080/doc_interface.html

Additional configuration stuff like

– setup Hostname and Port
– setup HTTPS connection
– granting permissions for an single user
– AVAHI support

can be found here:
http://localhost:8080/doc_config.html

How to use the YaST-Webclient

After you have started the YaST-Webservice-Server you also can start the YaST-Webclient:

rcyastwc start

Now you can use any browser and connect with http://<name of your computer> to your
computer.
The default rights of the YaST Webservice are set to root only. So you can login with the root password
of that machine.

Following features are implemented:

– setting languages
– setting system time
– setting user permissions
– installing patches
– managing local users
– export user SSH-keys
– starting,stopping,status,… of services
– configuration of ntp server

Have a look to the following screen shot it order to give an overview how it looks like:

System Services

Available Patches

User Permissions

Known Bugs
-The first call of an menue entry will be slow cause an additional process will be started.
The second one should be much more faster 🙂
-Permissions will sometime not be shown correctly (just click “search” again) Bug 470645