Compiling Rpm Packages With Build - Novell LINUX ENTERPRISE SERVER 10 - INSTALLATION AND ADMINISTRATION 08-05-2008 Installation Manual

Hide thumbs Also See for LINUX ENTERPRISE SERVER 10 - INSTALLATION AND ADMINISTRATION 08-05-2008:
Table of Contents

Advertisement

-ba
Do the same as -bb, but with the additional creation of the source RPM. If the
compilation was successful, the binary should be in /usr/src/packages/
SRPMS.
--short-circuit
Skip some steps.
The binary RPM created can now be installed with rpm -i or, preferably, with rpm
-U. Installation with rpm makes it appear in the RPM database.
16.7 Compiling RPM Packages with
build
The danger with many packages is that unwanted files are added to the running system
during the build process. To prevent this, use build, which creates a defined environ-
ment in which the package is built. To establish this chroot environment, the build
script must be provided with a complete package tree. This tree can be made available
on the hard disk, via NFS, or from DVD. Set the position with build --rpms
directory. Unlike rpm, the build command looks for the SPEC file in the source
directory. To build wget (like in the above example) with the DVD mounted in the
system under /media/dvd, use the following commands as root:
cd /usr/src/packages/SOURCES/
mv ../SPECS/wget.spec .
build --rpms /media/dvd/suse/ wget.spec
Subsequently, a minimum environment is established at /var/tmp/build-root.
The package is built in this environment. Upon completion, the resulting packages are
located in /var/tmp/build-root/usr/src/packages/RPMS.
The build script offers a number of additional options. For example, cause the script
to prefer your own RPMs, omit the initialization of the build environment, or limit the
rpm command to one of the above-mentioned stages. Access additional information
with build --help and by reading the build man page.
RPM—the Package Manager
323

Advertisement

Table of Contents
loading

This manual is also suitable for:

Suse linux enterprise server 10

Table of Contents