How to build and install Sourceforge packages from CVS


This document aims at explaining how you can get, build and install your Sourceforge packages from the CVS repository.


In order to have any use for this document, you'll need the following items ready:

Getting the sources

This paragraph is about getting the current state of the package from the CVS repository.

Building the package

To build the packages, place yourself in your working copy directory (sourceforge-2.5 or sourceforge-2.6) and issue the following command:

debuild -us -uc

This will build the package(s) in the parent directory. You'll see one *.deb file (or several if you're with 2.6), a *.changes file, and a few others that you can safely ignore for now.

You might want to clean up your source directory afterwards, so that you don't have temporary files left over (which would be a nuisance if/when you start interfering with CVS later). To do so:

fakeroot ./debian/rules clean

Installing the package, method #1

The simplest way to install a package is to do it by hand with dpkg. If you are tracking the 2.5 branch, you'll only get one *.deb file. To install it, just run:

dpkg -i sourceforge_2.5-33_all.deb

(Replace the version number adequately.)

If you're on the 2.6 branch, you'll get a whole bunch of *.deb files. You'll have to un dpkg -i on each of them in the appropriate order. What this order actually is can vary, but if you start with sourceforge-common, then go on with sourceforge-db-postgresql and sourceforge-ldap-openldap, you should be able to install the rest in pretty much any order afterwards. If not, well, dpkg will be sure to tell you.

Installing the package, method #2

There is another way of installing the packages. It is a bit more complex to set up, but it prevents the hassle of installing the packages by hand with dpkg: it relies on apt-get to do the bring job of installing the packages and the dependencies in the appropriate order. What you do is put your package(s) in a directory that apt-get can handle.

Making an apt-able directory has long been a hassle, but Colin Walters came up with a very nice program called mini-dinstall, which takes care of lots of boring details. Basically, it scans an incoming/ directory for new packages, and installs them in the appropriate drectories, while generating the Packages and Sources files that apt-get uses.

And since putting files into that incoming/ directory could also be boring, support for a local apt repository has been added to the dput program.

Since both mini-dinstall and dput are both rather new and rather customisable, you should read their documentation to see if they fit your needs, and to check how to use them. It's not difficult, but it might sound too much of a hassle if you just want to install the latest snapshot package.

Once you have installed them and set them up, you can use apt-get to install and upgrade your Sourceforge packages:

apt-get update
apt-get install sourceforge

And it should take care of installing the dependencies and the packages in the appropriate order.

Which installation method should I use?

Both, until you decide which one you prefer. I personally prefer #2, but I did spend an hour or two fiddling with mini-dinstall and dput (and sending patches).

What now?

Well, now that you know how to build and install your own packages from CVS, feel free to send us patches fixing bugs. Please do so by issuing the following command from the working copy directory:

cvs diff -uN

...and sending us the result, either in the Savannah patch tracker or on the debian-sf-devel mailing-list (details are available on the Savannah website). Don't forget to bring your working copy up-to-date (see above) before you try any diff.

If/when you send patches, please try to keep them as small and self-contained as possible (fix one bug at a time), don't forget to add an entry in the debian/changelog file (if you wish to remain anonymous, just don't include your name), and keep in mind that you're not allowed to break things if that can be avoided :-)