Jump to: navigation, search

Fedora RPM

150 bytes added, 09:53, 22 September 2008
To build the rpm from source
= To build the rpm from source =
A better An alternative approach to installing the binary rpm RPM is to build the package from source, this will build gramps using the package versions that you have installed. The [http://For this, you need the gramps source kit and a so called '''SPEC''' file. It is usually easiest to|SRPMS] directory contains the most recent gramps source rpm for RPM (SRPM) from the Fedora repositories, extract the latest development build. Download this rpmSPEC file, install adjust it and build your own binary using for the fedora release (in this case fc6) you're runningnew version, as the and try to build environmenta new RPM.
== To build the rpm as non-root (recommended method) RPM ==
Install the '''Always build environment in packages as an ordinary user. Never use the users directoryroot account for building packages.'''su -c 'yum install rpmdevtools'You have been warned!'''
Login as a 'normal' user and run '''rpmdevInstall the RPM build environment tools: su -setuptree''' . This will silently create the 'rpmbuild/' tree in the users home directory (instead of using ''usr/src/redhatc 'yum install rpmdevtools')
Download the source rpm, for this example it will be Run '''wget&nbsp;<nowiki>''' .2.4-3.fc7.src.rpm<This will silently create the 'rpmbuild/nowiki>'tree in the users home directory (instead of using '' or use your browser on the [http:usr/src/ link]'')
'''rpmbuild -Download the most recent source rpm from the Fedora repository, and install it. rpm -rebuild iv gramps-2.2.4-3.fc7XXX.src.rpm''' (additional packages may be required at this step - see ''Problems with the build'' below)
Copy the most recent gramps source kit to the '''rpmbuild/SOURCES'''su directory cp gramps-c 'yum localinstall YYY.tar.gz ~/homerpmbuild/<user>SOURCESEdit '''rpmbuild/RPMS/noarchSPECS/gramps.spec''' using an editor you're familiar with. Change '''Version''' to the appropriate version number. Change '''Source0''' to point to your gramps-2YYY.tar.2gz.4-3(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'''.noarchFor example, assume you are trying to build Gramps 8.rpm24 using unique tag '''mine''' (use yum , and you have copied gramps-8.24.tar.gz to the SOURCES directory, the first lines of the SPEC file should be like this: Name: gramps Version: 8.24 Release: 1mine%{?dist} ... URL: Source0:{name}/%{name}-%{version}.tar.gz Save the SPEC file and try to install build the rpm)kit: rpmbuild -ba ~/rpmbuild/SPECS/gramps.spec It may need some additional tweaking before the build terminates correctly.
=== Problems with the build ===
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 [|gramps mailing lists.]
*adding the following line on top of the spec file, /usr/src/redhat//SPEC/gramps.spec: ''%define _unpackaged_files_terminate_build 0'' is a temporary solution provided from the [|] lists. Remember, the file will still need packaging, the difference is the build will complete, or the next error will abort it. You'll just be a step closer to knowing how to fix it, or phrasing the question ;-)
= To build an rpm from SVN =

Navigation menu