Fedora rpm

This page's factual accuracy may be compromised due to out-of-date information. Please help improve the Gramps Wiki as a useful resource by updating it.

The installation page details how to download and install a working version of Gramps to your operating system of choice. For most users...

yum install gramps

will be all that is needed for the fedora distribution. This page details a different method and is for those users wanting an alternative version of Gramps, this may be to test a SVN version or to install the latest stable version.

If you don't have any version installed, then use install instead of update.

For Fedora versions 6 and older, the development repository is called extras-development.

To build the rpm from source

An alternative approach to installing the binary RPM is to build the package from source, this will build Gramps using the package versions that you have installed. For this, you need the Gramps source kit and a so called SPEC file. It is usually easiest to download the most recent Gramps source RPM (SRPM) from the Fedora repositories, extract the SPEC file, adjust it for the new version, and try to build a new RPM.

To build the RPM

Always build packages as an ordinary user. Never use the root account for building packages. You have been warned!

Install the RPM build environment tools:

su -c 'yum install rpmdevtools'

Run rpmdev-setuptree . This will silently create the 'rpmbuild/' tree in the users home directory (instead of using usr/src/redhat)

Download the most recent source rpm from the Fedora repository, and install it.

rpm -iv gramps-XXX.src.rpm

Copy the most recent gramps source kit to the rpmbuild/SOURCES directory

cp gramps-YYY.tar.gz ~/rpmbuild/SOURCES/

Edit rpmbuild/SPECS/gramps.spec using an editor you're familiar with. Change Version to the appropriate version number. Change Source0 to point to your gramps-YYY.tar.gz. (This is probably done automatically if you changed Version correctly). To avoid confusing your private version with any official versions, add a unique tag to Release. For example, assume you are trying to build Gramps 8.24 using unique tag mine, and you have copied gramps-8.24.tar.gz to the SOURCES directory, the first lines of the SPEC file should be like this:

Build errors: such as unpackaged files etc: The remedy for any of these errors will vary depending on circumstances, ie; there are no easy answers. Read the error message carefully, copy a relevant part of the message string, and search the net. The chances are very good that the problem has been encountered before and a solution exists. If that fails and you're still keen, try the mailing lists.

To build an rpm from SVN

Caveat emptor:

Some assumptions have been made here, the prime one being that you have any needed devel packages installed, and therefore a system that can actually build from source. If you don't have one - yet - then continue on and hopefully your system will give enough clues so that you can get to the final stage, and build an rpm. (Ah! and please update this page to suit, or notify the mailing list).

A secondary assumption is that your happy to install over your existing Gramps installation? This is the SVN (bleeding edge) package and things may break. The flip side to that problem is that once they're reported they'll be fixed and goodness will prevail!

And with that in mind, backup your database first. Don't work on that which is irreplaceable.

Happy Bug Hunting!

If this is the first build on this machine then install the build environment in the users directory, as described in the previous section.

The following acts out the build process for the (imaginary) 8.25 pre-release from SVN.

If this fails with which: no gnome-autogen.sh follow the advice and execute

su -c 'yum -y install gnome-common

If it again fails, but with...

checking for intltool >= 0.25...
testing intltoolize... not found.
...
...
...
Checking for forbidden M4 macros...
***Error***: some autoconf macros required to build gramps
were not found in your aclocal path, or some forbidden
macros were found. Perhaps you need to adjust your
ACLOCAL_FLAGS?

then su -c 'yum -y install intltool'

In my case this succesfully ran to completion, except for the following suggestion

Please add the files
codeset.m4 gettext.m4 glibc21.m4 iconv.m4 isc-posix.m4 lcmessage.m4
progtest.m4
from the /usr/share/aclocal directory to your autoconf macro directory
or directly to your aclocal.m4 file.
You will also need config.guess and config.sub, which you can get from
ftp://ftp.gnu.org/pub/gnu/config/.

which I have so far ignored, with no ill effects.

The resulting directory now needs to be packaged as gramps-8.25.tar.gz

An example gramps.spec is shown below. This one works for 3.0.1 on Fedora 8 and 9, it may not work on other versions/releases - whatever. If it doesn't see above (ie: don't despair, go looking and try to solve the problem, if you succeed then modify the spec - both yours and the one on this page - to suit. If you don't succeed, then ask as per the suggestion above.)

This spec file is a minor adaption of the one used by the fedora maintainers and has been extracted from the source file gramps-2.2.10-1.fc9.src.rpm. It is worth looking for a more up to date file in newer src packages, if available.