Using rug
From openSUSE
| This article refers to version '10.1' and is now obsolete. If it remains obsolete, it may eventually be deleted. If possible, please help to update this article to make it current. Refer to this article's discussion page for more information. |
rug is the command line frontend to zmd. It does no actual work except for issuing commands to zmd and reporting to the user the status of the command. Let's get started using rug!
Contents |
Checking if zmd is running
First you need to check if zmd is running. To do this try rug ping:
$ rug ping ZMD 7.1.1, Copyright (C) 2006 Novell, Inc. Started at 7/17/2006 2:47:39 PM (uptime: 1 days, 0 hours, 38 minutes) RSS size: 42252 Network Connected: Yes Running on Mono 1.1.13.8 OS Target: SUSE Linux Enterprise Server 10 (i586) Module Name | Description -------------------+------------------------------------------ NetworkManager | NetworkManager support Package Management | Package Management module for Linux ZENworks Server | SOAP methods used by a ZENworks server XML-RPC interface | Export ZMD public interfaces over XML-RPC
If zmd isn't running you'll get a message like this:
$ rug ping ERROR: ZMD does not appear to be running.
In that case you must be root and do % rczmd start.
Adding a service
Before we can install any packages we must first add a service. To do this you must generally be root or run the command with sudo. The general syntax is:
$ rug service-add --type=zypp URL unique-name
So, to use the SUSE mirror ftp.gwdg.de, you can do:
$ rug sa --type=zypp http://ftp.gwdg.de/pub/opensuse/distribution/SL-OSS-factory/inst-source/suse factory
Adding ZYPP service http://ftp.gwdg.de/pub/opensuse/distribution/SL-OSS-factory/inst-source/suse...
100%
Now let's check what services zmd is using:
$ rug service-list # | Status | Type | Name | URI --+--------+------+-----------+------------------------------------------------- 1 | Active | ZYPP | factory | http://ftp.gwdg.de/pub/opensuse/distribution/...
Renaming a service
Subscribing to a catalog
It is not enough to simply add a service and start installing packages. Services may contain one or more catalogs. Think of services as a repository of catalogs and catalogs as a repository for packages and patches. Let's see what catalogs we have available:
$ rug catalogs
Sub'd? | Name | Service
-------+-----------+----------
| factory | factory
Great, we have the "factory" catalog from our "factory" service that we added earlier. Now we can subscribe:
$ rug subscribe factory Subscribed to 'factory'
Finding, Installing, Upgrading, and Removing Packages
Now that we have a catalog which we are subscribed to we can install some packages. For a lot of these commands you usually need to be root or run them with sudo. There is this great program I like called boo for mono. I'm not sure what the package name is. Let's find out:
$ rug search boo S | Catalog | Bundle | Name | Version | Arch --+---------+--------+---------------------------------+----------------------------+------- | factory | | boo | 0.7.0.1921-17 | noarch ...
Sweet the package name is "boo" time to install it:
$ rug install boo
Resolving Dependencies...
The following packages will be installed:
boo 0.7.0.1921-17 (http://ftp.gwdg.de/pub/opensuse/distribution/SL-OSS-factory/inst-source/suse)
Transaction...
100%
Transaction Finished
Great now I can write sweet boo programs. *5 years pass* Oh it's been 5 years! I need to upgrade boo. Fortunately the same command "install" is used for both upgrading a previously installed package and installing a package for the first time.
$ rug install boo
Resolving Dependencies...
The following packages will be installed:
boo 0.7.0.1921-17.2 (http://ftp.gwdg.de/pub/opensuse/distribution/SL-OSS-factory/inst-source/suse)
Transaction...
100%
Transaction Finished
Now I have version 0.7.0.1921-17.2 of boo! Unfortunately, after five years, I've stopped programming in boo, I'd rather just use Perl 6 on Parrot. I need to get rid of it:
$ rug remove boo
root's password:
Resolving Dependencies...
The following packages will be removed:
boo 0.7.0.1921-17.2 (system)
Transaction...
100%
Transaction Finished
Doing More, Getting Help
rug is a robust program with many commands and options. To get a list of available commands try:
$ rug --help
To get help on any specific command try:
$ rug <command> --help

