Changes

Jump to: navigation, search

Fedora RPM

1,524 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 standard Fedora rpm RPM there's a newer version available for development testing.
Assuming you have an existing version of gramps Gramps installed, you can try to install from the following repositories:
yum --enablerepo=updates-testing update gramps
yum --enablerepo=development update gramps
For Fedora versions 6 and older, the development repository is called '''extras-development'''.
= To build the rpm RPM from source =An alternative approach to installing the binary RPM is to build the package from source, this will build gramps Gramps using the package versions that you have installed. For this, you need the gramps Gramps source kit and a so called '''SPEC''' file. It is usually easiest to download the most recent gramps 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 ==
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 RPM from the Fedora repository, and install it.
rpm -iv gramps-XXX.src.rpm
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 RPM from SVN'.
Save the SPEC file and try to build the kit:
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.]
= 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.525.tar.gz
''' cd .. tar cvf - gramps-8.25 | gzip -f9 > gramps-8.25.tar.gz mv gramps-8.25.tar.gz ~/'''rpmbuild/SOURCES/ cd ~rpmbuild/ rpmbuild -bb SPECS/gramps.spec
'''tar cvf - An example gramps-2.2.5 | gzip -f9 > gramps-2spec is shown below.2This one works for 3.50.tar1 on Fedora 8 and 9, it may not work on other versions/releases - whatever.gz 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.)
'''mv gramps-2.2.5.tar.gz /home/<user>/rpmbuild/SOURCES/''' '''cd /home/<user>/rpmbuild/''' '''su -c 'rpmbuild -bb SPECS/gramps.spec'''' where gramps spec is the following file. 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 '''su -c 'yum localinstall /home/<user>/rpmbuild/RPMS/noarch/gramps-2.2.5rpm -1.noarch.rpm'''' or perhaps use localupdate? (see '''man yumivh'''):
'''su sudo rpm -c 'yum localupdate /home/<user>ivh ~/rpmbuild/RPMS/noarch/gramps-2.2.5-1ZZZZ.noarch.rpm''''
To bypass the signing process, '''temporarilyZZZZ''' change will be something similar to 8.25-1mine.fc9, depending on the contents actual content of the ''/etc/yum.conf'Version''' to disable (0) the gpgcheck.<pre>#gpgcheck=1gpgcheck=0</pre>and restore '''Release''' 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,969
edits

Navigation menu