3.3. Update from the Command Line with rug

rug works with the zmd daemon to install, update, and remove software according to the commands given. It can install software from local files or from servers. You may use one or more remote servers, known as services. Supported services are mount for local files and yum or ZENworks for servers.

rug sorts software from services into catalogs (also known as channels), groups of similar software. For example, one catalog might contain software from an update server and another some software from a third-party software vendor. Subscribe to individual catalogs to control the display of available packages and prevent the accidental installation of unwanted software. Operations are normally performed only on software from catalogs to which you are subscribed.

3.3.1. Obtaining Information from rug

rug provides a wide range of useful information. Check the status of zmd with rug, view registered services and catalogs or see information about available patches.

If the zmd daemon is not used for a certain period of time, it can be switched to sleep mode. To check the zmd status and reactivate the daemon, use rug ping. The command wakes up zmd and logs status information of the daemon.

To see your registered services, use rug sl. If you want to add a new service and you are not sure which services are supported on your system, use rug st.

To check new patches, use rug pch. To view information about a patch, enter rug patch-info patch.

3.3.2. Subscribing rug Services

At installation time, you are subscribed to several services. To subscribe to more services, enter the service URI of the new service. To add a new service, use rug sa URI service_name. Replace service_name by a meaningful and unique string that identifies the new service. Information about additional installation sources is provided at http://en.opensuse.org/Installation_Sources.

3.3.3. Installing and Removing Software with rug

To install a package from all subscribed catalogs, use rug in package_name. To install from a selected catalog only, use the above command with --entire-catalog and specify the catalog you want to install from. View information about a package with rug if package_name.

To remove a package, use rug rm package_name. If other packages depend on this package, rug displays their name, version, and type. To finally remove the package, confirm the transaction.

3.3.4. rug User Management

One of the biggest advantages of rug is user management. Normally only root can update or install new packages. With rug, you can distribute the right to update the system to other users and restrict them, for example, only to the update right without the possibility to remove software. Privileges you can grant are:

install

The user may install new software

lock

The user may set package locks

remove

The user may remove software

subscribe

The user may change channel subscriptions

trusted

The user is considered trusted, so may install packages without package signatures

upgrade

The user may update software packages

view

This allows the user to see which software is installed on the machine and which software is in available channels. The option is relevant only to remote users, local users are normally permitted to view installed and available packages.

superuser

Permits all rug commands except user management and settings, which must be done locally.

To give a user permission to update the system, use the command rug ua  username upgrade. Replace username by the name of the user. To revoke the privileges of a user, use command rug ud username. To list users with their rights, use rug ul.

To change the current privileges of a user, use rug ue username. Replace username by the name of the desired user. The edit command is interactive. It lists privileges of the selected user and the offers you a prompt. Enter the plus (+) or minus (-) symbol and the name of the privilege. Then press Enter. For example, to permit the user to delete software, enter +remove. To save and quit, press Enter at a blank prompt.

3.3.5. Scheduling Updates

Using rug, the system can be updated automatically (e.g. by scripts). The simplest example is a fully automatic update. To do this, as root configure a cron job that executes rug up -y. The up -y option downloads and installs the patches from your catalogs without confirmation.

However, you may not want the patches installed automatically. Instead, you may want to retrieve the patches and select the patches for installation at a later time. To download patches only, use the command rug up -dy. The up -dy option downloads the patches from your catalogs without confirmation and saves them to the rug cache. The default location of the rug cache is /var/cache/zmd.

3.3.6. Configuring rug

rug allows you to customize its setup via a set of preferences. Some of them are preconfigured during installation. To list the preferences available, use rug get. To edit a preference, enter rug set preference. For example, adjust settings if you need to update your system, but your computer is sits behind a proxy server. Before downloading the updates, send your username and password to the proxy server. To do so, use the commands:

rug set proxy-url url_path
rug set proxy-username name
rug set proxy-password password

Replace url_path by the name of your proxy server. Replace name by your username. Replace password by your password.

3.3.7. For More Information

For more information about updating from the command line, enter rug --help or see the rug(1) man page. The --help option is also available for all rug commands. If, for example, you need help for rug update, enter rug update --help. For examples and detailed information, visit http://en.opensuse.org/Using_rug.