RPM-based distributions

Author(s): José Luis González, Edison Mera, José F. Morales, The Ciao Development Team.

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 --kind=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:

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.

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.

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.

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

  • Library usage:
    :- use_module(ciaobld(pbundle_gen_rpm)).

Documentation on multifiles

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

Documentation on imports

This module has the following direct dependencies:


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.
  • Check and warn for unknown options or incorrect values (at this time if the user sets an invalid option it gets silently ignored).
  • 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