Checking the finished RPM

When an RPM has been created, it is stored in /usr/src/packages/RPMS/i 586. For other architectures (s390, ppc, and so on), RPMs are saved in the relevant architecture subdirectory.

You can check the existence of the file and also list the files in the package just as you did earlier in the chapter with the rpm -qlp command, as shown in Listing 12-11.

Listing 12-H: Listing the Files in the logcheck RPM

bible:/usr/src/packages/RPMS/i586 # rpm -qlp logcheck-1.1.2-2.i586.rpm

/etc/cron.hourly/logcheck

/etc/logcheck

/etc/logcheck/logcheck.hacking

/etc/logcheck/logcheck.ignore

/etc/logcheck/logcheck.violations

/etc/logcheck/logcheck.violations.ignore

/usr/sbin/logcheck.sh

/usr/sbin/logtail

/usr/share/doc/packages/logcheck

/usr/share/doc/packages/logcheck/CHANGES

/usr/share/doc/packages/logcheck/CREDITS

/usr/share/doc/packages/logcheck/README

/usr/share/doc/packages/logcheck/README.how.to.interpret

/usr/share/doc/packages/logcheck/README.keywords

/usr/share/doc/packages/logcheck/README.linux

/usr/share/doc/packages/logcheck/README.linux.IMPORTANT

So you can see the RPM is there and looks correct based on your configuration in the spec file. Now you are ready to install the RPM (see Listing 12-12) with rpm -Uvh (upgrade, verbose, and show hash marks).

Listing 12-12: Installing the logcheck RPM

bible:/usr/src/packages/RPMS/i586 # rpm -Uvh logcheck-1.1.2-2.i586.rpm Preparing... ########################################### [100%]

1:logcheck ########################################### [100%]

The RPM you have taken from source, created the spec file for, and compiled into a binary RPM is finally integrated into our system.

RPM creation is something that the distributors have to do for every release, bugfix, and update of a package. SUSE includes over 3,000 packages already, so the possibility of not having software that fulfills your need is quite slim. However, in the event that you can't find a package, like logcheck, RPM creation is a useful skill to have.

Ultimately, knowing how an RPM is built and what RPM authors can do with an RPM package proves useful when you are working with packages themselves. It allows you to see how dependencies, post-installation scripts, and file specifications impact how your packages work when installed.

Was this article helpful?

0 0

Post a comment