Changes

Jump to: navigation, search

Fedora RPM

1,939 bytes removed, 00:38, 1 October 2021
no edit summary
{{languages|Fedora RPM}}{{stub}}
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 [httphttps://fedoraproject.org/wiki/ fedoraFedora] distribution. This page details a different method and is for those users wanting an alternative version of grampsGramps, this may be to test a SVN version or to install the latest stable version.
= Development rpm RPM =It may be possible that next to the [http://download.fedora.redhat.com/pub/fedora/linux/extras/development/testing rpm] works on the current core version of Fedora. For example, the fc7 rpm will run on fc6, with a few small issues. The fc8 version has been verified with standard Fedora 8 and 9. This usually works, but it is not a supported method, ie: if it breaks the error may not be with gramps or the fedora build, but with the differences between fedora versions. In other words youRPM there're on your own with trouble shooting, and if you do report s a bug then be sure that it isn't to do with the newer version mismatch - don't confuse the developers/builders with introduced problems (one's outside their control)available for development testing.
Assuming you have an existing version of gramps Gramps installed, then you can try to install from the development rpm for fc6...following repositories: yum --enablerepo=extrasupdates-testing update gramps yum --enablerepo=development update gramps
if If you don't have any version installed, then use '''install''' it using..instead of '''update'''. yum --enablerepo=extras-development install gramps
With For Fedora versions 6 and older, the release of fc7, extras will apparently no longer exist as a seperate development repository. This package will no doubt be found using is called '''yum extras--enablerepo=development install gramps''', or similar.
= To build the rpm 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 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 download.fedora.redhat.com/pub/fedora/linux/extras/development/SRPMS/|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>http://download.fedora.redhat.com/pub/fedora/linux/extras/development/SRPMS/grampsrpmdev-2setuptree''' .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/download.fedora.redhat.com/pub/fedora/linux/extras/development/SRPMS/gramps-2.2.4-3.fc7.src.rpm 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.2tar.4-3gz. (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: http://gramps.sourceforge.net/ Source0: http://download.sourceforge.net/%{name}/%{name}-%{version}.tar.gz More information on the SPEC file can be found in the next section, 'To build an RPM from SVN'. 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 ===
Missing dependencies: These dependencies may be related to the build environment (have you built packages from source, on this machine, before?)
In addition to the normal build tools, these additional packages are needed to build the gramps rpmRPM: desktop-file-utils, gettext, perl-XML-Parser, gnome-python2-canvas, gnome-python2-gconf, gnome-vfs2-devel, pygtk2-libglade, python-devel, scrollkeeper, and gnome-doc-utils
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 [http://sourceforge.net/mail/?group_id=25770|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 [http://www.rpm.org/hintskinks/unpackaged-files/|rpm.org] 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 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 rpmRPM. ({{man menu|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 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 irreplacableirreplaceable.'''
**Happy Bug Hunting!
If this is the first build on this machine then the following installation may be required, to install the build environment in the users directory, as described in the previous section.'''su -c 'yum install rpmdevtools''''
then login as a 'normal' user and run '''rpmdev-setuptree''' . This will silently create The following acts out the 'rpmbuild/' tree in build process for the users home directory (instead of using ''usr/src/redhat''imaginary)8. In addition the dependencies listed above (under 'Problems with the build' need to be installed. Once this is done the gramps build can proceed25 pre-release from SVN.
The following acts out the build process for the 2 svn co https://gramps.2svn.5 presourceforge.net/svnroot/gramps/branches/gramps8 mv gramps8 gramps-release from SVN8.25 && cd gramps-8.25 ./autogen.sh
If this fails with '''svn co httpswhich://gramps.svn.sourceforgeno gnome-autogen.net/svnroot/gramps/branches/gramps22 'sh ''follow the advice and execute
'''mv gramps2 gramps-2.2.5 && cd gramps-2.2.5''' '''./autogen.sh''' 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...
which I have so far ignored, with no ill effects.
The resulting directory now needs to be packaged as gramps-28.2.5.tar.gz '''cd ../''' '''tar cvf - gramps-2.2.5 | gzip -f9 > gramps-2.2.5.tar.gz''' '''mv gramps-2.2.525.tar.gz /home/<user>/rpmbuild/SOURCES/'''
''' cd .. tar cvf - gramps-8.25 | gzip -f9 > gramps-8.25.tar.gz mv gramps-8.25.tar.gz ~/rpmbuild/homeSOURCES/<user> cd ~rpmbuild/ rpmbuild-bb SPECS/'''gramps.spec
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''su t despair, go looking and try to solve the problem, if you succeed then modify the spec -c 'rpmbuild both yours and the one on this page -bb SPECS/grampsto suit.specIf you don'''' where gramps spec is t succeed, then ask as per the following filesuggestion above.)
But first a word about the spec file, this one works for 2.2.4 and 2.2.5 on fedora core 6, 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 extras maintainers and has been extracted from the source file ''gramps-2.2.410-31.fc7fc9.src.rpm''. There may be It is worth looking for a more up todate to date file in a newer src package?packages, if available.
<pre>
Source0: http://download.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarchPackager: Johan Vromans <[email protected]>
BuildRequires: desktop-file-utils
BuildRequires: gettext
BuildRequires: perl(XML::Parser)BuildRequires: gnome-python2-canvasBuildRequires: gnome-python2-gconfBuildRequires: gnome-vfs2-devel
BuildRequires: pygtk2-libglade
BuildRequires: python-devel
BuildRequires: scrollkeeperlibrsvg2-develBuildRequires: gnome-doc-utils intltool
Requires: gnome-python2-canvaslibrsvg2 Requires: gnome-python2-gconfRequires: gnome-python2-gnomevfsRequires: gnome-python2Requires: gnome-python2-gnomeprintRequires: gnome-python2-gtkspellRequires: ImageMagickRequires: freefont
Requires: pygtk2
Requires: pygtk2-libglade
Requires: rcs
Requires: python-reportlab graphvizRequires: graphviz xdgutils
Requires(pre): GConf2
Requires(post): desktop-file-utils
Requires(post): scrollkeeper
Requires(post): GConf2
Requires(preun): GConf2
Requires(postun): desktop-file-utils
Requires(postun): scrollkeeper
%description
gramps (Genealogical Research and Analysis Management Programming
System) is a GNOME GTK based genealogy program supporting a Python
based plugin system.
%clean
rm -rf ${RPM_BUILD_ROOT}
 
 
%pre
if [ "$1" -gt 1 ]; then
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
gconftool-2 --makefile-uninstall-rule \
%{_sysconfdir}/gconf/schemas/%{name}.schemas >/dev/null || :
fi
%post
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
gconftool-2 --makefile-install-rule \
%{_sysconfdir}/gconf/schemas/%{name}.schemas > /dev/null || :
scrollkeeper-update -q -o %{_datadir}/omf/%{name} || :
update-desktop-database &> /dev/null ||:
update-mime-database %{_datadir}/mime &> /dev/null || :
fi
 
%preun
if [ "$1" -eq 0 ]; then
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
gconftool-2 --makefile-uninstall-rule \
%{_sysconfdir}/gconf/schemas/%{name}.schemas > /dev/null || :
fi
%postun
scrollkeeper-update -q || :
update-desktop-database &> /dev/null ||:
update-mime-database %{_datadir}/mime &> /dev/null || :
</pre>
To install the succesful successful build, note the name of the noarch RPM that was written, and pass it to '''rpm -ivh''':
'''su sudo rpm -c 'yum localinstall /home/<user>ivh ~/rpmbuild/RPMS/noarch/gramps-2.2.5-1ZZZZ.noarch.rpm''''
or perhaps use localupdate? (see '''man yumZZZZ''') '''su -c 'yum localupdate /home/<user>/rpmbuild/RPMS/noarch/gramps-2will be something similar to 8.2.525-11mine.noarch.rpmfc9, depending on the actual content of the '''VersionTo bypass the signing process, ''and 'temporarily''Release' change the contents of ''/etc/yum.conf'' to disable (0) the gpgcheck.<pre>#gpgcheck=1gpgcheck=0</pre>and restore definitions from the SPEC file to its original state when finished.
= See also =
[http://fedoranews.org/tchung/rpmbuild/ HOWTO: How to create rpmbuild directory], and [http://myy.helia.fi/~karte/linux/doc/rpm-build-as-user.html RPM Building as a User]
* [https://www.centos.org/docs/5/html/Deployment_Guide-en-US/s1-rpm-using.html 10.2. Using RPM] - CentOS
 
==See also==
* [[Linux:Build from source]]
* [[OpenSUSE RPM]]
[[Category:Developers/Installation]]
[[Category:Developers/Packaging]]
1,483
edits

Navigation menu