Friday, May 19, 2006

A working ZMD/rug/libzypp/ZENworks setup

I have an updater setup in SUSE 10.1 which seems to work now. There are a few gotchas though. I'd recommend only using the command line tools, as the graphical tools seem to crash too often, leaving the ZMD backend in an unknown state. Also, although it looks like you're supposed to be able to install and remove software without being the superuser, it doesn't seem to work, so I do everything as root (using su).

First you have to register your machine. You can use the graphical version in YaST, but that didn't work for me, so I used suse_register -n from the command line. (If I didn't use the '-n' option it kept killing my network connection somehow!)

Although you can add just about any URL using rug and it says that it has added the service okay, you have to make sure you use the correct URL otherwise strange things happen. Also, if you did use the graphical tools to add a service and used spaces in the service names, they won't work.

First I had to add update services to the updater, whatever it is called (ZMD?). Please note that the name of the KDE-3.5-supplementary service is important - it doesn't seem to work if you give it a different name.

rug sa --type zypp ftp://ftp.mirrorservice.org/sites/ftp.suse.com/pub/suse/update/10.1/ SUSE-Update
rug sa --type zypp ftp://ftp.gwdg.de/pub/linux/misc/packman/suse/10.1/ Packman
rug sa --type zypp ftp://ftp.mirrorservice.org/sites/ftp.suse.com/pub/suse/i386/supplementary/KDE/update_for_10.1/yast-source/ KDE-3.5-supplementary
rug sa --type zypp http://ftp.gwdg.de/pub/linux/misc/suser-guru/rpm/10.1/RPMS/ SUSE-Guru

You can list the services using rug sl.

Then you have to subscribe to these services:

rug sub SUSE-Update
rug sub Packman
rug sub KDE-3.5-supplementary
rug sub SUSE-Guru

You can list the subscriptions using rug ca.

You can type rug on its own to view a list of available commands. Some useful ones I've used are rug search package, rug install package, rug remove package, rug patches and rug update.

I find it useful to have another couple of shells open watching the tail of the zmd log files, just so I know whether something is happening or if it's all given up:

tail -f /var/log/zmd-backend.log
tail -f /var/log/zmd-messages.log

I haven't found an easy way of just getting rug to update a package to a newer version from another server. For example, I had Amarok 1.3 installed on my computer, and this morning I wanted to upgrade to version 1.4 from the Guru repository. The only way I found to do it was to remove the existing version and the install the new version by specifying the version number:

rug remove amarok amarok-helix amarok-libvisual amarok-xine
rug install amarok-1.4.0_0.3c amarok-helix-1.4.0_0.3c amarok-libvisual-1.4.0_0.3c amarok-xine-1.4.0_0.3c

If anyone knows a better way, please let me know.

6 comments:

James Ots said...

By the way, I found it useful to use rug set sleep-interval 900 so that ZMD doesn't go to sleep so quickly when you don't do anything. Since it's pretty annoying when you type a command and all you get is 'ZMD is waking up...' for five minutes, and so you go and do something else, and by the time you get back to it it's already gone back to sleep again!

James Ots said...

If rug says that it is resolving dependencies, but nothing is happening in the log files, your best bet is to kill the zmd processes and start again. (Start it again using rczmd start

Daniel D. said...

While fixing all the zyppityduda issues, I found that Kpackage (which supports something like 42 source locations) is a handy tool to keep you going.

It's "best" feature - it doesn't resolve dependencies, it just tells you what you are lacking for a completed procedure.

Kpackage will not help with initial install, but upgrades are a breather. Just select the packages in "Updated" tab and go.

I used kpackage between OpenSuse 10.1 betas, RC's and finally to upgrade to "final"

It sure is not a "solution" but it is a good "band aid"

Francis said...

I recommend using smart. It comes on the SUSE CDs now, and it's very good. It's quite reliable, has nice and quick commandline tools, with smart install [package] option, a more y2pmsh-like option (smart --shell), or a reasonable gui front-end.

I've been using it almost exclusively since I got 10.1 official, and haven't had any problems, though smart used to handle my upgrades before when keeping on current factory.

Anonymous said...

Dear James et al

HEEEEEEEEEEEEEEEEEELP

I'm a newbie, and so far Suse has been a bit of a challenge.

It boots up and lets me know that ZMD isn't running.

I found you blog and thought, this is the answer!

But I seem to have a slightly different problem, here's what I did


linux-tw25:~ # suse_register -n
Cannot start zmd: Starting ZENworks Management Daemon..done
Checking for ZENworks Management Daemon: ..dead
(1)linux-tw25:~ # rczmd start
Starting ZENworks Management Daemon done
linux-tw25:~ # suse_register -n

Cannot start zmd: Starting ZENworks Management Daemon..done
Checking for ZENworks Management Daemon: ..dead

I can't find Kpackage, but do have KYUM this can't find any repositories, possibly because the Yast Sources thingy plays up because ZMD isn't running.

Any help you can will be greatly received, but pleas ebe gentle!

Thanks

James Ots said...

I have to admit I gave up on ZMD and all that a long time ago, and now just use Smart.

Instructions on installing it are on the SUSEwiki: http://susewiki.org/index.php?title=SMART_Package_Manager