<HTML ><HEAD ><TITLE >RPM packages</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK REL="HOME" TITLE=" Burning a RedHat CD HOWTO " HREF="index.html"><LINK REL="PREVIOUS" TITLE="Anatomy of the Red Hat FTP site" HREF="redhat-ftp-site.html"><LINK REL="NEXT" TITLE="Obtaining your local copy of the distribution" HREF="distribution-mirror.html"></HEAD ><BODY CLASS="SECT1" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >Burning a RedHat CD HOWTO</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="redhat-ftp-site.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="distribution-mirror.html" ACCESSKEY="N" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><DIV CLASS="SECT1" ><H1 CLASS="SECT1" ><A NAME="RPM-PACKAGES" ></A >3. RPM packages</H1 ><P > The major part of the Red Hat distribution consists of a set of RPM (Redhat Package Manager) files. An RPM package typically contains binary executables, along with relevant configuration files and documentation. The <A HREF="http://www.rpm.org" TARGET="_top" >rpm</A > program is a powerful package manager, which can be used to install, query, verify, update, erase and build software packages in the RPM format. <TT CLASS="FILENAME" >Rpm</TT > convieniently maintains a database of all the software packages it has installed, so information on the installed software is available at any time. </P ><P > The binary RPM files in the distribution have been built on a system running the distribution itself. This is important, because most of the programs in the packages rely on shared libraries. From RedHat version 5.0, the new version 2 of the GNU standard C library (which is 64-bit clean) has been used. This version of the library is commonly referred to as <EM >glibc</EM > or in Linux: <EM >libc 6</EM >. All executables in the distribution have been linked against this library. If you attempt to install binary files from a different distribution, chances are that they will not work, unless you install the libc5 package for backwards compability. There are also incompatibilities between the various version of the Redhat Package Manager itself which will make the installation of some packages fail even on machines they are supposed to (and they would probably) run on. </P ><P > The names of the RPM packages contain the suffix <EM >.arch.rpm</EM >, where <EM >arch</EM > is the architecture, usually having the value <EM >i386</EM > for Intel platform binaries. The packages you install must match the versions of the shared libraries available on the machine. The <A HREF="http://www.rpm.org" TARGET="_top" >rpm</A > program is usually quite good at ensuring that this is indeed the case, however, there are ways around this check, and you should be sure that you know what you are doing if you force installation of packages this way. However, using the RedHat installation boot disk, it is ensured that the correct set of RPM packages are installed on the machine. </P ><P > If you discover a RPM package that was not installed on your system during the installation process, don't despair. At any time, you may (as root) install RPM packages, for example: <TABLE BORDER="1" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="SCREEN" > # rpm --install WindowMaker-0.18-1b.i386.rpm </PRE ></FONT ></TD ></TR ></TABLE > </P ><P > You can even install directly from the Internet, if you know the URL of a RPM package: <TABLE BORDER="1" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="SCREEN" > # rpm --install ftp://rufus.w3.org/redhat-contrib/noarch/mirror-2.9-2.noarch.rpm </PRE ></FONT ></TD ></TR ></TABLE > </P ><P > If you want to update (or install if it's not present on the machine) a RPM package, use the command: <TABLE BORDER="1" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="SCREEN" > # rpm --update WindowMaker-0.18-1b.i386.rpm </PRE ></FONT ></TD ></TR ></TABLE > </P ><P > If you want to update a RPM package only if a previous version is already installed on the machine use the command: <TABLE BORDER="1" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="SCREEN" > # rpm --freshen WindowMaker-0.18-1b.i386.rpm </PRE ></FONT ></TD ></TR ></TABLE > </P ><P > Another version of the RPM packages contains the original sources used to build the binaries. These packages have the suffix <EM >.src.rpm</EM > and are situated in the <TT CLASS="FILENAME" >SRPMS</TT > directory. These packages compose the last two CDs and part of the third one out of the five which compose the 8.0 (or 7.3) release. For release 9 they are on three separate CDs. For 6.2 (and previous, not too old, versions), things change a bit because there is only one installation CD not comprising the SRPMS packages, which you can burn on a different disc, if you want. </P ><P > To obtain more informations on the Redhat package manager, I suggest you to read the man pages and the fairly detailed book <A HREF="http://www.rpm.org/max-rpm/" TARGET="_top" > maximum rpm</A >. </P ><P > In the next section, I will introduce a C program which will be used in various scripts throughout the rest of the howto. It just returns, given two versions of the same RPM package, which one is newer. This program is based on the code used in the Redhat Package Manager (release 4.1) and is used when the <EM >--freshen</EM > option is given. </P ><DIV CLASS="SECT2" ><H2 CLASS="SECT2" ><A NAME="RPM-VERSION-COMPARE" ></A >3.1. Comparing two versions of a RPM package</H2 ><P > The C code included in the three files <A HREF="rhcd-scripts/rpmvc/Makefile" TARGET="_top" > Makefile</A >, <A HREF="rhcd-scripts/rpmvc/rvc.h" TARGET="_top" > rvc.h</A >, <A HREF="rhcd-scripts/rpmvc/rvc.c" TARGET="_top" > rvc.c</A > was extracted from the Redhat Package Manager and (slightly) modified to fit our needs. They form a simple C program which given two versions A and B of a package returns 1, 0 or -1 if A is respectively newer, equal or older than B and other values in case of error (you can read the code comments for more detailed informations). To compile the program (you need the <TT CLASS="FILENAME" >make</TT > program and the <TT CLASS="FILENAME" >gcc</TT > C compiler), put the files in the same directory and issue the command: <TABLE BORDER="1" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="SCREEN" > $ make </PRE ></FONT ></TD ></TR ></TABLE > </P ><P > This program is needed by almost every script used in the following sections and is found setting the <EM >RVC</EM > variable in the file <A HREF="rhcd-scripts/rhcd.conf" TARGET="_top" >rhcd.conf</A >. </P ><P > You can find a copy of the source and a precompiled version in the archive <A HREF="rhcd-scripts.tar.gz" TARGET="_top" >rhcd-sripts.tar.gz</A > in the <TT CLASS="FILENAME" >rpmvc</TT > directory. </P ><DIV CLASS="NOTE" ><P ></P ><TABLE CLASS="NOTE" WIDTH="100%" BORDER="0" ><TR ><TD WIDTH="25" ALIGN="CENTER" VALIGN="TOP" ><IMG SRC="../images/note.gif" HSPACE="5" ALT="Note"></TD ><TD ALIGN="LEFT" VALIGN="TOP" ><P > There was an error in the way this program was used by the <EM >updateDist.sh (ver. < 1.17)</EM > and <EM >updateCD.sh (ver. < 1.12)</EM > scripts. I strongly suggest to avoid versions of the scripts which have lower release numbers than the reported ones, even if the problem doesn't show up really frequently (at least apparently). </P ></TD ></TR ></TABLE ></DIV ></DIV ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="redhat-ftp-site.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="distribution-mirror.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >Anatomy of the Red Hat FTP site</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" > </TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >Obtaining your local copy of the distribution</TD ></TR ></TABLE ></DIV ></BODY ></HTML >