wiki:Developer/Projects/Obsolete/RPM_Packages

Version 8 (modified by ChrisJohns, on Dec 8, 2005 at 6:54:27 AM) (diff)

Add RPM Macros file.

Building Tool RPM Packages

Chris: This is the start of documenting building the tool RPM packages.

RTEMS provides binary tool packages in the RPM format. You need to build the packages from source so will need the RTEMS source tree, plus the source for GCC, binutils, newlib and GDB. The standard packages may require patches?.

Build Machine

The current tool sets are build on Linux PC based machines. Joel uses a RedHat? 7.3 machine to give the resulting executables a wide range of machines to run on. Ralf and Chris use Fedora Core 4 machines. The page is written while building on a Fedora Core 4 machine.

The host machine needs to be a software development machine. You need to make sure you have a working GNU compile suite. If you intend to build all possible packages you will need a large amount of disk space. You need to install perl and help2man. On Fedora Core 4 you can find a help2man RPM package in the Extras RPM repository standard packages may require patches.

Source Code

To build the latest tool set you will need a current RTEMS snapshot. A checkout standard packages may require patches maybe suitable. You will also need to download these source code packages:

Place these files in a SOURCES directory under the RPM build location you select.

RPM Base Directory

You need to selection a location on the host build machine where the RPMs are built and the resulting images left. An example is:

/opt/rtems/src

This means the source code should be placed in:

/opt/rtems/src/SOURCES

You also need to create few working directories. These are:

$ cd /opt/rtems/src $ mkdir SRPMS $ mkdir -p RPMS/noarch

=RPM Macros File =

Create a private RPM macros file in your home directory:

$ cat ~/.rpmmacros %_topdir /opt/rtems/src %_tmppath /tmp/rtems %_rpmdir %_topdir/%_target_os/RPMS %_srcrpmdir %_topdir/%_target_os/SRPMS %_signature gpg # %_gpg_path ~/.gnupg # %_gpg_name "RTEMS Packager" %_gpg_name rtems %vendor: OAR Corp %packager http://www.rtems.org

The {{{%_topdir</code> field is set to your RPM Base directory.