Update from the Command Line with rug

rug uses the zmd daemon to install, update, and remove software according to the commands given. It can either 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), which correspond to groups of similar software. For example, one catalog might contain software from an update server as well as software from a third-party software vendor. You are able to subscribe to individual catalogs in order to control the display of available packages and prevent the accidental installation of unwanted software. Operations usually are performed only on software from catalogs to which you are subscribed.

Obtaining Information from rug

rug provides a wide range of useful information. It allows you to check the status of zmd, view registered services and catalogs, or see information about available patches.

If the zmd 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. This command wakes zmd up and logs its status information.

To see your registered services, use rug sl, and to see which services are supported on your system, use rug st.

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

Subscribing to rug Services

By default, a newly installed system is subscribed to several services. To add a new service, use rug sa URI service_name. Replace service_name with a meaningful and unique string that identifies the new service.

[Note]Error on Accessing the Update Catalog

If you are not able to access the update catalog, this might be due to an expired subscription. Normally, SUSE Linux Enterprise comes with a one or three years subscription, during which you have access to the update catalog. This access will be denied once the subscription ends.

In case of an access denial to the update catalog you will see a warning message with a recommendation to visit the Novell Customer Center and check your subscription. The Novell Customer Center is available at http://www.novell.com/center/.

Installing and Removing Software with rug

To install a package from any subscribed catalogs, use rug in package_name. To install from a selected catalog only, use -c catalog name. Get more 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 names, versions, and types. Confirm if you want to remove the package anyway.

rug User Management

One the main advantages of rug is its user management. Normally, only root can update or install new packages. With rug, you can assign the right to update the system to other users and restrict them, for example, to only updating 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 as trusted, so he is able to 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 rug ua  username upgrade command. 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 and replace the username by the name of the desired user. You get a list with the rights of the selected user. The edit command is interactive. Use plus (+) or minus (-) to add or remove the user's privileges and press Enter. For example, to permit the user to delete software, enter +remove. To save and quit, press Enter at a blank prompt.

Scheduling Updates

Using rug, the system can be updated automatically (for example, by scripts). The simplest example is a fully automatic update. To do this, configure a cron job as root 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 to be installed automatically, but may want to retrieve them and select the patches for installation at a later time. To download patches only, use the rug up -dy command. 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.

Configuring rug

rug allows you to customize its setup via a set of preferences. Some of them are preconfigured during installation. Use rug get command to get a list of the preferences available. To edit a preference, enter rug set preference. For example, adjust settings if you need to update your system through a proxy. Before downloading the updates, send your username and password to the proxy server. To do so, use the following 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.

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.