Tech tips: 'GRAB' Linux updates

Tracking a Linux RPM installation database can be maddening. Any package that can simplify this process can be quite valuable, especially if you have a lot of RPM packages installed. See how to use GRAB to keep tabs on RPMs.

RedHat Package Manager (RPM) is one of the most powerful and flexible systems available for keeping Linux systems up to date with the latest versions of applications and important patches. However, this power and flexibility comes with a price. RPM packages often require several individual packages to be downloaded and installed before a specific RPM package can be updated.

Greg's RPM Application Builder (GRAB), developed by Greg Kurtzer, simplifies this process by building lists of RPM files available on specified FTP servers. Once these lists are built, GRAB can compare the RPM packages installed on a Linux system, providing a list of available updates and performing some basic dependency resolution.

This article covers the procedures for downloading, installing, and configuring GRAB so that it will provide RPM updates for your Linux system.


GRAB version
To get the latest version of GRAB, click here. Although this article covers a prerelease version, the instructions contained in this article should be applicable to the latest version.

What you need
Here are the two packages you will need to install GRAB:

  • The latest version of GRAB. The home page for the GRAB project is located at RunLevelZero. GRAB is available in RPM, SRPM, and source format. For this article, I used grab-0.2.32-1.i386.rpm.
  • Perl-libnet is required for FTP transfers. This package may already be installed on your system. If it isn't, the perl-libnet package is available as either an RPM or source package from RunLevelZero.

Once GRAB and perl-libnet are downloaded, the first step is to install both packages. GRAB is installed with the command:
rpm -ivh grab-0.2.32-1.i386.rpm

If the perl-libnet package needs to be installed, run the following command (based on the name of the file you downloaded):
rpm -ivh perl-libnet-1.0703-6.noarch.rpm

Configuring GRAB
When GRAB runs for the first time (using the command grab), the /etc/grab directory is created. This directory contains the following three files, which are used to configure GRAB:
  • /etc/grab/defaults
  • /etc/grab/servers
  • /etc/grab/config

The defaults file
The defaults file sets three default actions for GRAB:
  • The default Update action
    Select Yes for the Update Me option to update the defaults file whenever GRAB is updated and the /etc/grab/defaults file is changed. Selecting Yes for this option will also mean that any system-specific options entered in the defaults file will be overwritten when GRAB is updated. The default is Yes.
  • The default architecture
    This specifies the architecture that GRAB searches for (i386, athlon, ppc, etc.). The default is All.
  • Search method
    Three search methods are available:
    1) match is used when you want to match an exact string to a package name.
    2) search is used when you want to specify a string for searches.
    3) all allows all search methods to be used, including a search of the rpmfind database. The search will always start with servers defined in the /etc/grab/servers file. The default search method for grab is match.

The servers file
The /etc/grab/servers file specifies the location of FTP servers that may be searched to update GRAB and search for updates to RPM packages.

The first entry in the servers file is the SERVER section, which specifies the location for the latest GRAB RPM packages. This is the server that is searched for new versions of GRAB whenever GRAB is updated. This section uses the format:
server   [ftp-server]   [path-to-RPM-packages]   [description)

The default for this section is:
server   ftp.runlevelzero.net   /pub/greg/grab/RPMS   GRAB@RUNLEVELZERO.NET

The LOCAL section specifies the location of each local directory that contains RPM packages. This section is useful when the administrator wants to maintain control over RPM packages that are installed on the system. Instead of searching FTP servers, GRAB can be configured to search directories on the local system for updates.

There are two default entries in the LOCAL section:
local   /mnt/cdrom/RedHat/RPMS/   Redhat_CDROM
local   /var/cache/grab/RPMS/   LOCAL_CACHE


Either of these entries may be changed to reflect the path to a local directory containing RPM files.

The SERVER_LIST section contains predefined entries that specify the location of FTP or HTTP servers. This SERVER_LIST is a default listing of servers that GRAB will use when searching for updates related to a specific distribution and/or architecture. Several GRAB contributors have provided servers for six Linux releases. To use the server list for any distribution, remove the comment (;) from the beginning of any line beginning with the entry server_list, and that server list will then be used for searches.

The server lists used by GRAB are actually text files on the FTP server located at ftp://ftp.runlevelzero.net/pub/. The server list for RedHat 7.2 is shown below:
#server altruistic.lbl.gov /pub/repositories/lbnl-extras-RH72/RPMS/ EXTRAS@LBL.GOV
#server altruistic.lbl.gov /pub/repositories/redhat-updates-7.2/RPMS/ UPDATES@LBL.GOV
#server altruistic.lbl.gov /pub/repositories/redhat-7.2-i386/RPMS/ MAIN_OS@LBL.GOV
server altruistic.lbl.gov /pub/repositories/lbnl-extras-RH72/RPMS/ EXTRAS@LBL.GOV
server altruistic.lbl.gov /pub/repositories/redhat-updates-7.2/RPMS/ UPDATES@LBL.GOV
server altruistic.lbl.gov /pub/repositories/redhat-7.2-i386/RPMS/ MAIN_OS@LBL.GOV

Advertisement

Talkback 0 comments

Sponsored content

Power Centre - Content from our premier sponsors

Blogs

Tags

Back to top

Featured