SuSE GmbH

SuSE Support Database

Title: Compiling SuSE Linux source packages

----------

Mainpage o Searchform o History o Versions o Categories o Contents
Deutsch

----------

Compiling SuSE Linux source packages

Applies to

SuSE Linux: Versions since 5.1

Project:

You plan to compile a source package that came with your SuSE Linux All source packages are located in series "zq". They all have the extension .spm. These packages are the so called Source-RPMs. As you might have guessed already compiling, packaging and installing is done by rpm.

Requirements:

The base packages of series "d" (Development) need to be installed. If you plan to compile X applications make sure that the packages in series "xdev" (Development under X11) are installed either.

The working directories of the rpm need to be setup (as far as no settings have been made, e.g. in /etc/rpmrc)

SOURCES
this is used for the original sources (.tar.gz)as well as the specific adaptions of the distribution(.dif-Files).
SPECS
this is for the so called .specfiles. These serve as a sort of Meta-Makefiles for the build process.
BUILD
here the sources are unpacked, patched and compiled.
RPMS
This is where the binaries are.

How to proceed:

CAUTION: Please do not experiment with RPM using important and vital system components (libc, rpm, nkit, etc.). You might damage your system!

If you install a source package from "zq" with YaST the components that are needed for the build will be installed under /usr/src/packages, the sources themselves and the adaptions are located in SOURCES,the .spec in SPECS. Now lets have a look at an example. We install the package wget.spm. After the actual installation the following files have been installed:

        /usr/src/packages/SPECS/wget.spec
        /usr/src/packages/SOURCES/wget-1.4.5.dif
        /usr/src/packages/SOURCES/wget-1.4.5.tar.gz

To start the compile process invoke rpm -b <X> /usr/src/packages/SPECS/wget.spec. Here <X> may be one of the options listed below: rpm -b <X> /usr/src/packages/SPECS/wget.spec starts the compiling process; <X> stands for different stages (see the --help-Output or the RPM documentation). Here's a short extract:

-bp
Prepare the sources in directory /usr/src/packages/BUILD: extract and pathc
-bc
as -bp, but compile additionally
-bi
as -bc, but install files afterwards; Attention, if a package does not supply the BuildRoot-Feature, it is possible that you will overwrite important configuration files!
-bb
as -bi, but will also create a binary-RPM package. If successful, you will find it in /usr/src/packages/RPMS.
-ba
as -bb, but will also create the source RPM. If successful, you will find it in /usr/src/packages/SRPMS.

The Option --short-circuit enables you to skip certain steps.

The freshly created RPM binary may be installed by entering rpm -i ... or even better with rpm -U ... (thus it wil make its way into the RPM database.

Further info about RPM can be found in the Book "Maximum RPM" which is also available in PostScript on http://www.rpm.org an in the RPM-HOWTO.


Problems

You try to install an .spm but get an error message as:

        cannot write to ///usr/src/redhat/SOURCES
        error: /cdrom/suse/zq1/tetex.spm cannot be installed

Remove /etc/rpmrc (or adapt it to /usr/lib/rpmrc). The easiest way is to enter:

        rm /etc/rpmrc

----------

See also:

----------

Keywords: SOURCES, SRC, PACKAGE, SPM, SRPM, RPM, COMPILE, COMPILING, ZQ

----------

Categories: Applications , Package

----------

Feedback welcome: Send Mail to ke@suse.de (Please give the following subject: SDB-ke_source-rpm)

----------

Mainpage o Searchform o History o Versions o Categories o Contents
Deutsch

----------

SDB-ke_source-rpm, Copyright SuSE GmbH, Nuremberg, Germany - Version: 10. Dec 1997
SuSE GmbH - Last generated: 07. Oct 1999 16:49:44 by maddin with sdb_gen 1.00.0