Contents

How to Build F-Spot from HEAD

This page has evolved from my own personal notes, so please feel free to update it to be more consistent and accurate. Hopefully it will help people who do not have to much experience with Subversion and compiling from Subversion to participate a bit more.

WARNING

Please ensure you have a good set of backup of your F-Spot database (~/.gnome2/f-spot/photos.db) as well as your actual photos (~/Photos). When you are using Trunk/Head from Subversion it is not as thorougly tested as the stable version. We do our best to ensure no critical errors will slip through, but sometimes it might happen. Also, Trunk/Head version might have changed the F-Spot database structure a bit, which means that your stable version of F-Spot will not be able to use it anymore.

So to be safe, we strongly recommend you to run on test data. That is use the --basedir and --photodir options. In this example I put both under /tmp, but you can specify whatever

Backup photos.db

cp ~/.gnome2/f-spot/photos.db ~/.gnome2/f-spot/photos.db.Stable

Install the pre-requisite packages

On Ubuntu Gutsy (7.10) the following should be sufficient:

sudo apt-get install automake1.9 libtool subversion
sudo apt-get build-dep f-spot

On Ubuntu Dapper (6.06) the following should be sufficient:

sudo apt-get install automake1.9 build-essential intltool libtool subversion
sudo apt-get build-dep f-spot

On Ubuntu Breezy (5.10), you will need to run the commands above as well as install mono

Currently you will need to install the following extra packages

  • gmcs
  • Mono.Data.SqliteClient
  • Mono.Cairo

In Edgy you install them as per below

sudo apt-get install mono-gmcs libmono-sqlite2.0-cil libmono-cairo2.0-cil intltool subversion

Create directories

mkdir -p ~/development/f-spot
mkdir -p ~/unstable/f-spot

Go to development main directory

cd ~/development/f-spot

Download f-spot Head

Fetch the latest unstable version from Subversion trunk with the following command.

svn co http://svn.gnome.org/svn/f-spot/trunk

Build

Go to trunk directory

cd trunk

Configure and autogen

./autogen.sh --prefix=${HOME}/unstable/f-spot --disable-scrollkeeper

or

./autogen.sh --prefix=/home/<user>/unstable/f-spot --disable-scrollkeeper

At this point, it is likely that the configure script will notify you of further dependencies. Install the missing software, and repeat the autogen command until it is successful.

Compile

make all

Install

If you are in the src directory, please go to the main f-spot directory (cd ..)

make install

(You can alternatively combine the Compile and Install into one command)

make all install

If the make install fails with a reference to

make[1]: Entering directory `.../f-spot/po'
make[1]: install_sh@: Command not found
make[1]: *** [install-data-yes] Error 127

Please check bug 351522 for a workaround/solution.


Run

Run SVN Install

cd ${HOME}/unstable/f-spot/bin
./f-spot --basedir /tmp  --photodir /tmp

Update with latest SVN

As changes are made to f-spot, you can now get the latest version by running the following:

cd ~/development/f-spot/trunk
svn update

Check the Changelog to find out what has been changed

less Changelog

Compile and test run the new version

make all
make install
cd ~/unstable/f-spot/bin
./f-spot --basedir /tmp  --photodir /tmp

A quick way of running

If only the f-spot core src files have been modified, there is no need to do a proper 'make install'. Instead you can run it directly from the src directory.

cd src
./f-spot --uninstalled --basedir /tmp  --photodir /tmp

Developing

A bit later you might want to start participate by testing patches or actually submit patches as well. Instructions for how to generate a patch diff file, as well as how to install a patch comes next

Generate a patch

Just remember to ensure you have done a svm update first, before you do a svn diff.

svn diff > MyF-Spot.diff

If you have added a new source file, the following command will add this file to your patch.

diff -u -p /dev/null <NEW FILE> >> MyF-Spot.diff

You must also update the Makefile.am (which is used to create the other makefiles. Do not forget to update the Changelog either.

To install a patch

Ensure you are located in the same directory as the diff file specifies and then run:

patch -p0 < YourF-Spot.diff

How NOT to build from HEAD

If you're running Debian unstable and you're interested in running the latest (current, unreleased) code but not in building it yourself, you may also use the unofficial packages available at Lolando's repository. They track HEAD, and they're usually updated a couple of times a week. The disclaimer still applies: this is provided as a way to test current code, and no guarantees are made.

This page was last modified on 24 March 2008, at 19:45. This page has been accessed 23,300 times.