Configuring the Remote Control RPM build tree

About this task

The RPM build tree is where building an RPM takes place. By default, this tree is under /usr/src, but this requires building as the root user. It is recommended that you create your own RPM build tree.

Use the following steps to configure the RPM build tree in src/rpm in your home directory.

Type the following commands to configure the RPM build tree :

Procedure

  1. $ mkdir -p ~/src/rpm
  2. $ cd ~/src/rpm
  3. $ mkdir BUILD RPMS SOURCES SPECS SRPMS
  4. $ mkdir RPMS/i[3456]86 RPMS/noarch RPMS/athlon
  5. To override the default location of the RPM build tree, create or edit .rpmmacros in your home directory,
    or use the following command.

    $ echo -e "%_topdir\t${PWD}" > ~/.rpmmacros

    Note:
    this command overwrites the .rpmmacros file.
  6. To verify that the configuration was successful, check that the following command gives the correct path to the SOURCES directory.

    $ rpm --eval %_sourcedir

    For example: /home/yourusername/src/rpm/SOURCES