RPM-based distributions

Author(s): José Luis González, Edison Mera, José F. Morales, The CLIP Group.

Building RPM packages

Requirements (rpm)

These are the main prerequisites for the build process to succeed:

  • A user account with enough free space (at least twice that necessary for a compiled local repository).
  • A local Ciao repository with documentation already generated.
  • A working installation of Ciao. (This is needed to generate the RPM specification and handle the build process.)
  • RPM v3 or higher.
  • rpmbuild installed in your system. (yum install rpm-build)

The usual Ciao software requirements also apply, but these are declared in the RPM specification and the build process should complain if anything is missing.

Instructions (rpm)

By default, a source Ciao distribution for your local repository will be packaged. Building is requested with the following command:

  • ./ciao-boot.sh gen_pbundle__rpm [--option=value...]

Options summary (rpm)

One or more options may be added to the building command.

These control the behaviour of the building and generation processes:

Enables building each bundle on its own subpackage. Without subpackages (option set to 'no') a single Ciao package will be produced with the whole bundle.

Produces versioned packages instead of regular ones. These are packages that allow installing several versions of Ciao or its bundles at the same time (see Installing packages). The contents for both kinds of packages are identical except that the versioned ones lack the simple names for binaries (e.g., they include an executable called ciao-1.13 but not one called ciao) and add a version suffix to the names of manual pages. This option must be used along with subpackages.

Produces packages that should work in all RPM-based Linux distributions. If disabled the packages are only guaranteed to work in the same distribution (vendor) they were built on.

Setting any of the following compiles Ciao with the feature of the same name enabled (as defined in ./ciao-boot.sh configure):

  • with_gsl=yes
  • with_mysql=yes
  • with_java_interface=yes

Note that none of these gets compiled in by default (if the option is not explicitly set.)

Vendor-dependent paths and filenames can also be modified as options. This is only recommended for building vendor dependent packages (vendor_independent=no) since default values are sensible and changing emacs_sitestart_dir or emacs_sitestart_filename messes up with vendor-independent installation/removal scripts. These would set the default values:

  • install_info_cmd=/sbin/install-info
  • emacs_sitestart_dir={_datadir}/emacs/site-lisp/site-start.d
  • emacs_sitestart_filename=ciao-mode-init.el

There is also support for changing some of Ciao's project details:

Sets Ciao's directory name for its subversion repository. Relative to the RPM build directory (absolute paths not allowed).
Sets Ciao's checkout URI for its subversion repository.
Sets the Ciao bibliography directory name for its subversion repository. Relative to the RPM build directory (absolute paths not allowed.)
Sets the Ciao bibliography checkout URI for its subversion repository.

Installing RPM packages

A RPM package can be installed with:

# rpm -U package(s).rpm

In order to upgrade your currently installed version of a package or packages to a newer one, the same command is used with the new package(s). This replaces the old (installed) version with the new one.

If you want to install more than one version of a Ciao bundle at the same time, just install a regular package for the latest version (the one that you want to be upgraded as the system's main version) and also install a versioned package for each of the additional (older) versions. For instance, if you want to install both ciao 1.18, 1.16 and 1.14, do:

# rpm -U ciao-1.18.0-XXX.rpm
# rpm -U ciao-v1.16-1.16.0-XXX.rpm
# rpm -U ciao-v1.14-1.14.1-XXX.rpm

The main (regular) installation will be available with plain commands (ciao, ciaoc) as well as versioned commands. The older (versioned) installations will only be available through versioned commands (e.g. ciao-1.16, ciaoc-1.14.)

Packager maintenance guide (rpm)

The system comprises the following elements:

  1. A stub (pbundle_gen_rpm.pl) for Ciao's installer that handles the whole process.
  2. A shell script (RPM-Ciao.bash) that ensures that an adequate RPM building environment exists (and sets it up if it doesn't) before running the actual build.
  3. A skeleton for the RPM specification (Ciao.spec.skel).

When the build process is run, an RPM specification file is generated on-the-fly from the skeleton. Then the RPM-Ciao.bash script builds the packages from this specification, the resulting packages get moved to the <builddir>/pbundle/ directory, and the RPM building environment is cleaned up.

Changes demanding maintenance (rpm)

Any of the following changes to Ciao requires that the RPM specification skeleton be updated accordingly:

  • Major changes to the top path structure (bin/, lib/ciao/, lib/ciaopp/, lib/lpdoc/, etc.)
  • Added, removed, or renamed binaries.
  • Renamed or relocated documentation.
  • Added, removed, or renamed (Ciao) bundles. This also affects the installer stub.
  • Changes to requirements for building the bundles.
  • Changes to requirements for running the bundles.
  • Changes in the configuration or build system.
  • For SVN compilation/building: changes to repository names or locations.

Special care must be taken to guarantee that versioned packages remain installable along with other versioned packages of the same bundle (as well as the regular upgradeable package), provided they are all different versions. Special care must also be taken to replicate changes in the separate subpackages to the main package.

Finally, there is a minor risk to be considered: that SuSE changes its distribution-specific peculiarities or some of the RPM-based Linux distributions change the path or name for the install-info command, the path or name for (x)emacs site-start scripts (all of which conveniently defined on top of the specification), or the names for packages listed as BuildRequires.

Further reading (rpm)

The reference documentation for RPM is available at:

The former resource is extensive and current, the latter includes a convenient global index.

Many specific details not covered by those documents are scattered in RPM's own documentation (a handful of note files).

Usage and interface

Documentation on multifiles

No further documentation available for this predicate. The predicate is multifile.


This work builds on the work of Manuel Carro, Emilio Gallego and Edison Mera. Thank you also to Manuel Hermenegildo and Germán Puebla for their invaluable support.

Known bugs and planned improvements

  • To speed up the process, we create the rpm from a precompiled bin distribution.
  • Some rpmbuild versions are said to no longer support --defining a macro's value as an argument. This would break generation options.
  • For now, release is equal to the SVN revision number, that is done only to allow generating the RPM now, but when version numbers are clarified, this should be reconsidered.
  • Check and warn for unknown options or incorrect values (at this time if the user sets an invalid option it gets silently ignored).
  • (subpackages=no ^ versionp=yes) should warn(incompatible) and exit error.
  • Better compliance with rpmlint
  • Check whether enabling mysql / java is feasible
  • Bugs from Emilio's email (debian package)
  • Eliminate PATHS warning issued by certain Ciao binaries
  • RPM-Ciao.bash should be replaced by Prolog code in this module
  • Review package descriptions