Home Home > Systems-management
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 the ‘Systems Management’ Category

Using Ruby for system scripts

January 14th, 2009 by

So here we are, the second installment of my openSUSE+Ruby mini-series.  See this link for the first article covering installation and configuration.  In this post, I’ll give you a fast introduction to Ruby and a sample system script on openSUSE.

(more…)

What’s green, red, and awesome all over?

January 10th, 2009 by

openSUSE/SLES and Ruby!

Considering that my blog no-longer exists and I’ve got a couple of topics floating around in my head, I thought I’d make use of my Lizards account and contribute something useful for once.

openSUSE has quickly become my favorite development platform and Ruby is my language of choice these days.  The two together make an excellent combination and it couldn’t be easier to get started.  In the next few posts, I’ll cover how I use the Ruby scripting language with SUSE on a daily basis.

That being said, lets start with installation…

(more…)

Webpin search in YaST for openSUSE 11.1

January 9th, 2009 by

This is just a short reminder that in openSUSE 11.1, it is possible to search online for packages in YaST as described in this blog (thanks to Lukas and Bubli for making this reality!).

In short, just type on command line:

/sbin/yast2 webpin_package_search

and you will get this UI for an online search and install of packages:

Webpin Search in YaST

Enjoy!

Integration of YaST Server Modules to YaST System Services

January 8th, 2009 by

Today, I’ve played a bit with an idea to allow starting of YaST Server module from the YaST System Services module.

YaST System Services (Runlevel) Editor

The only visible difference is the additional “Configure…’ button at the bottom of the dialog. This button would be active only if there is a YaST module associated with the entry. After clicking it, the respective YaST module would be started:

YaST Firewall module invoked from YaST System Services module

With this simple principle, the YaST control center ‘Network Services’ section would be reduced to:

YaST Control Center, Network Services section

And all those YaST modules would be available from ‘System’ section:

YaST Control Center, System section

This approach could be used even further. You can see that the ‘Network Services’ section contents do not really match the section name anymore. In fact, most of the items could be moved to other modules as well. E.g. introducing a module for authentication/authorization, which would cover Kerberos client, LDAP client, etc. The NFS client is in fact a part of the new Disk Partitioning module already. So, the section could vaporize completely.

However, there are drawbacks. The biggest one I see is a ‘starting point’ problem. Just imagine you want to have a Apache2 running in your system. Until now, the YaST HTTP module is installed and can be used to bootstrap your configuration – it will install the packages and help to set up the basics. But with the new approach, the apache2 package is not installed, therefore System Services module would not see the apache2 service (init script) and does not show it at all! I’m not sure how to address this. Maybe the best would be to attach the YaST  module to apache2 package or HTTP server pattern and the Software Management module would become such starting point. Would it be better? I don’t know.

Then, there is an issue of a quick access – if you are moderately experienced user, you know what you are looking for and you start a proper module right away. But to figure out what is the configuration starting point if it’s hidden in another module, that might be a blocker.

I’m sure there are more problems. Anyway, I find the idea quite useful for reducing the number of YaST modules. What do you think?

YaST Qt4 Stylesheet Editor

December 23rd, 2008 by

YaST uses style.qss located in /usr/share/YaST2/theme/current/wizard by
default. If you want YaST to use a different style sheet (e.g. the style shown
while installation) you can set the $Y2STYLE environment variable:

Y2STYLE=installation.qss /sbin/yast2 disk

I’ve added a new hotkey to YaST which allows to modify the style sheet on
runtime. Pressing [Ctrl] + [Shift] + [Alt] + [S] in a YaST module opens the Stylesheet Editor. Now you can load a style sheet and modify its style rules.

Screenshot YaST Stylesheet Editor

The Stylesheet Editor can be very usefull when you want to design your own style for the YaST Qt4 UI.

This feature will be available in openSUSE 11.2. If you want to use it now all you need is yast2-qt version 2.18.2. You can find the latest version here:
http://download.opensuse.org/repositories/home:/tgoettlicher/openSUSE_Factory/

Developing with libyui/libzypp & python – part4

November 11th, 2008 by

Let’s extend the application to make it even more useful!

* add support for YaST-Repositories

* add Support for different architectures

* use always a random temporary directory

Now, it looks like this:

Picture of the Application

You can grab it out of my home: in the openSUSE Build Service (for openSUSE 11.0).

Start it with “repoviewer”, add the repository’s url, select the type, the architecture and hit “Go!” .
You can choose the architectures only for the “highest” type of the family as they list the “lower” types, too.
So to see “ppc” packages. use “ppc64” in the combobox and later “ppc” in the “Arch” column.
For big repos (like factory) it takes some time to download and parse the metadata.

Also try in a console-window:
unset DISPLAY; repoviewer

😉 thanks to libyui, that just works !
Update: You can access also local directories (like mounted CDs/DVDs).
Just use “file:///” and the full path ! E.g.: “file:///media/SU1100.001/”

YaST releases independent of openSUSE releases?

November 7th, 2008 by

YaST is one of the cornerstones of openSUSE. It is developed for openSUSE and is released as part of openSUSE. There never was a release of YaST independent of openSUSE. Even the versioning of YaST is tied to openSUSE – the versions are 2.X.Y, where X is increased for every openSUSE release (17 for 11.1) and Y is simply a patch level, whenever a new fix or feature is added. Even more, every YaST package has its own versioning, so the only way to ensure you have a consistent set of YaST packages is via dependencies set in the .spec file of the YaST packages.

But in principle, YaST is a tool that can be used across distributions and there are people interested in this to happen. There are technical barriers to do releases independent of openSUSE (e.g. a lot of openSUSE-specific knowledge and behavior coded in YaST) as well as procedural. During past years, a lot of these non-technical issues has been addressed as we opened up the YaST development (re-licensing the code under GPL, opening up source control system and mailing lists, etc).

But still, there is one big thing left: YaST packages are released in concert with openSUSE. Yes, it is very convenient for openSUSE, but it makes it almost impossible to track the development during for people outside of our great distribution.

If one looks at the way the YaST packages are updated during the hotphase of an openSUSE release, the core parts of YaST (yast2-devtools, yast2-core, libyui, …) are rarely updated, they get a bug fix here and there. However, the distribution specific parts (yast2-pkg-bindings, yast2 common libraries, bootloader, storage, networking, …) get a fast flow of patch-level releases, typically several between openSUSE milestones.

Thus, the way forward I like the most right now is a compromise: a core YaST system should be released independently of the openSUSE release cycle while specific modules could keep their crescendo during openSUSE hot phase. How to do that?

For core YaST packages (a list to be defined) would be released independently of openSUSE and during hot phase, they would be handled the way other FOSS parts of openSUSE are – by patching the code in the package. The rest of the YaST, current practice would stay untouched.

There are clearly advantages – the YaST developers can do a proper release management of the core code and it is much more predictable how the core part of YaST will be released. On the other hand, people would need to be aware of the split.

However, I can imagine there is a lot of I did not realize. I’m definitely interested in comments about this topic.

How survive zypper dup on system with bad internet connection

October 30th, 2008 by

Maybe someday you try zypper dup to actualize your distribution and in middle of process it fail, because you are disconnected or some packages is actualized before you download it (especially on factory this can happen). It is more safety download packages at first and then install from this local files.

How todo this is little tricky, at first you must enable caching downloaded files (I do it only for remote connection):

zypper mr –keep-packages –remote

So now you cache all downloaded files and now try testing run of dup. Trick is that all packages download for that test is cached.

zypper dup –dry-run

Now if you have slow connection I reccomend also disable autorefresh for all repositories, because if repository is refreshed before dup, you can easily find that some packages is newer than package in cache and you must download it.

zypper mr –all –no-refresh

Now is everything prepared for zypper dup, which use files from cache. Cache can take quite lot of disk space, so after dup you can clean it.

zypper clean

And thats all. This features work from OpenSuse 11 and you can also use this trick for zypper update or zypper install.

Parralel processing in zypper

October 6th, 2008 by

I have been on leave for a couple of days and today when I booted my laptop the openSUSE updater notified me of 4 security updates. While I was watching zypper updating the system (I prefer the command line client) I wondered if it would be possible for zypper to download and install patches/programs/etc asynchronously.  To explain better: instead of downloading a patch and then installing it, why can’t zypper download the patch and then start a process/tread to install it while it immediately starts to download the next file ? I have no knowledge of the internals of zypper or yast, so I don’t know it it even feasible, but it would decrease the time needed to patch the system.

zypper best feature

October 6th, 2008 by

Im impressed how many users don’t know new zypper features.

Users asks for ability to cache downloaded package with tracked dependencies. Somebody recommends use smart, somebody setup squid between ISP and home pc.

None of that methods are valid anymore.
Now zypper have caching feature. Ok, let me explain how to enable it.

First of all we need to determine for which repo we want to enable caching.

k0da@laptop:~> zypper sl
# | Alias                 | Name                  | Enabled | Refresh
--+-----------------------+-----------------------+---------+--------
1 | debug                 | debug                 | Yes     | No
2 | repo-non-oss          | openSUSE-11.0-Non-Oss | Yes     | No
3 | home:Eri_zaq          | home:Eri_zaq          | Yes     | Yes
4 | openSUSE-11.0-Updates | Updates for 11.0      | Yes     | Yes
5 | OBS                   | OBS                   | Yes     | Yes
6 | Packman               | Packman               | Yes     | Yes
7 | repo-oss              | openSUSE-11.0-Oss     | Yes     | No

In this example output we can get repo # or its name.

Now we are ready to enable cache

sudo zypper mr -k <repo name>| #

Thats all. Now install some packages from repo.

All cached packages now stored in cache dir (described in /etc/zypp/zypp.conf).

By default it stored in /var/cache/zypp

Next really wanted feature we are waiting for is resume download package, if internet connection lost 😉