12.07.2015 Views

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Building RPM Packages 135example, if the rpm -qf /etc/crontab command is issued, the output is crontabs--, where - is the version and release of thecrontabs package installed.TIPIf the file is a command already in your PATH environment variable, use the followingsyntax instead of typing the entire path to the file,:rpm -qf `which `Notice the command contains back ticks, not apostrophes. The back ticks tell theshell to execute the command inside them and use that as part of the overallcommand.You also know that configuration files are marked as configuration files in the RPM databasewhen they are installed. To retrieve a list of configuration files from a packageinstalled, use the following command:rpm -qc 5If any files from the package were marked as configuration files when the package wascreated, a list of them will be displayed.A similar query can be performed to list any documentation files installed with a package:rpm -qd Documentation files include man pages and text or HTML formatted files in/usr/share/doc/ installed by the package.Each time a package is changed, the developer is responsible for adding a changelog entryto describe the change. This becomes part of the information provided by the RPMpackage. The query option has the ability to show the changelog for the package with thefollowing command:rpm -q --changelog These query commands can also be performed on an RPM package file instead of on thepackage name of the package already installed. To do so, add the -p argument followed bythe full or relative path to the package file. For example, to view the changelog of apackage before installing it, use the following command:rpm -q --changelog -p --..rpmBuilding RPM PackagesFinally, although building packages is usually left to the software distributor or softwaredeveloper, it is useful for an administrator to know how to build a basic RPM package.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!