openSUSE:Appliances events workshop Nuremberg 2010 projects decouple WebYaST from YaST2

Jump to: navigation, search

Decouple WebYaST from YaST2

Team

Lead: Jiří Šrain
Members: Jíří Suchomel, Josef Reidinger, Ladislav Slezák

Objective

The objective here is to find possible ways how to make WebYaST independent of legacy YaST.

The reasons are mainly:

  • Huge package dependencies (adding WebYaST to JeOS almost doubles the image size)
  • Make WebYaST project interesting for community developers (don't require YaST knowledge)
  • Reuse other existing tools (less maintenance)

Tasks

Evaluate and reduce dependencies of the current WebYaST packages

  • Removed PackageKit, yast2-core and yast2-dbus-server from webyast-base-ws, legacy YaST should be required only by plugins which really need it
  • Added yast2_ui and yast2_ui_pkg provides so YaST UI is not needed (yast2-gtk + it's huge dependencies). Note that ncurses, theoretically smaller, requires glibc-locale.

The changes above reduced the size of basic WebYaST (base ws + ui, reboot) to c.a. 80MB from 200MB. The biggest chunk of remaining dependencies is Rails stuff.

Within complete WebYaST installation, some components which were removed from the base system dependencies will be dragged in anyway (PackageKit for updates, collectd dependencies for system status).

Create new backends for WebYaST which do not use legacy YaST

Current modules with YaST dependency:

  • Administrator

Possible non-YaST solution: simple D-BUS service accessing to system tools ('passwd'). For editing mail aliases, parser for aliases file would be needed.

  • Users

Possible non-YaST solution: simple D-BUS service accessing to system tools ('useradd', 'usermod')

  • Mail Settings
  • System Services

Possible non-YaST solution: simple D-BUS service accessing to system tools ('insserv').

  • Firewall
  • Network
  • Time & NTP
  • Registration

Status module

webyast-status-ws contains a small Ruby file for reading system log files. The D-Bus interface is created by the YaST D-Bus service. It should be quite easy to wrap it into a separate D-Bus service using ruby-dbus.

Other dependencies

webyast-status-ws plugin uses collectd for monitoring, the problem is that there is collectd -> rrdtool -> X libraries dependency which pulls in about 30MB of packages. This cannot be simply changed, rrdtool would have to be split into two packages, one without graphics support (that functionality is not needed in WebYaST) and one full featured package. This can save c.a. 5MB.

Software management requires PackageKit which pulls in python, Networkmanager-glib and other big packages, about 30MB in size.

Administrator module

We created D-BUS service just for changing the root password. With the new package (https://build.suse.de/package/show?package=webyast-root-user-ws&project=home%3Alslezak%3Abranches%3ASUSE%3ASLE-11-SP1%3AGA), we saved about 20MB space because of reduced dependency.

TODO

  • Check all dependencies - some of modules could rely on webyast-base-ws requiring their stuff
  • Get rid of "cheap" dependencies, which can be almost repackaging only (using only YaST as wrapper for D-Bus service)
  • Enhance documentation, especially for debugging DBus services (the first draft is available here)
  • Research using existing Perl agents directly, without the WebYaST overhead
  • If needed, research universal parsers for configuration files (candidate: augeas is already in SLE11, <1MB, many bindings exist, packaged only in BS)