Joachim Breitner

Ways to fork privately

Published 2008-02-11 in sections English, Debian.

A few days ago, I asked how to fork a debian package privately. I got some repsonses by comments, e-Mail and other blog posts, and I want to summarize the tools that were suggested. I have not really tried them, just looked at the webpages, the documentation or the sourcecode. I’m only including Debian-specific solutions, as using Gentoo might be nice, but is out of scope here :-)

I also deleted half the text before saving it, and I hate rewriting stuff, so it might be a bit terse.

debtoo

Eddy Petrișor tells me about his three year old project debtoo, which wants to bring a Gentoo-like experience to Debian. While it probably provides what I need, it feels “too big” in that it has a more general aim than what I’m looking for. It is not in Debian and not actively developed in the last two years.

srcinst

Eddy also tells me about srcinst, which is a small haskell program written by jgoerzen in 2005. This is more a proof-of-concept that builds a package and all necessariy build-dependencies without using a binary package, but does not allow for patches to be applied. It is in Debian, actively maintained, but not developed, and barely documented (just an IRC log).

apt-build

A similar tool and also in Debian is apt-build. This package is created to compile packages for optimization (as it asks half a dozend compiler-flag-questions with DebConf during the installation). It allows the user to apply a patch to the source, but it has to be passed as a command line option, and patches seem not to be tracked. Not much development in the last year, and not much documentation.

debpatch

Not to be confused with the program in the debdelta package is the debpatch tool by Victor Hsieh which Carsten Hey told me about. Also written in 2005, this comes closest to what I want. For every package you want to modify, you can configure it to apply patches to the source, to add patches to the debian/patches directory or to statically replace files in the generated binary and puts it in a local apt repository. No code yet to track new versions of the packages and no support for pbuilder though. This perl script is not yet in Debian, but is available as a Debian package and seems to have seen some development in the last years. Quick Googleing does not return any user reports; has any already tried this?

customdeb

Somewhat in this direction goes the script that I wrote two weeks ago for a totally different project, customdeb, but it is aimed at binary debian files exclusively, and debpatch already supports replacing files in the binary package.

apt-src

Also a related tool Carsten Hey told me about is apt-src. This tool wants to provide apt-like features for source packages. It allows you to “install” sources somewhere, upgrade the source and build binary packages from them. It does not really hide the sources from the user and seems to be created for people who want to work with the source somehow. If you have local changes to the sources, it can try to merge them with the new version, but these changes are not kept as a separate patch but only as implicit changes. If that were different, it would seem be a very nice tool. It’s written by Joey Hess he abondonned it in 2004. Since then, not much development has happened.

debnest

Yet another approach is taken by debnest, which Peter Makholm took over. Here, you create a full debian source package with a debian/ directory containing a control and rule file etc., but besides the debian/ directory, it contains  just the packed sources (.dsc et al) from another package. In your debian/rules, you can specify your changes. I can see no support for tracking new versions of the inner package, but at least this project is maintained and in Debian.

Summary

I found a few projects that go in a similar direction, and one that seems to fit my needs quite well. All of them are not widely used and in a very early state of development, and it seems to be something people start to work on and quickly lose interest. I’m actually surprised that this is not a itch more people had to scratch! I will have a closer look at debpatch when I find the time and maybe, if found useful, see if it can be included in Debian − probably after a name change, since we already have a debpatch binary. Or maybe I should try to add support for what I need to apt-src, which seems to be the most advanced of all these programs, although it’s unmaintained longer than the others exist.

Update: Added apt-src.

Update 2: Added debnest;

Comments

I never got the time to reply to you previous post, so here goes...

In the same situation some months ago I found debnest in the same old, unmaintained and mostly just a proof-of-concept stage as some of the solutions you found.

I took over maintainership and touched some code to make it work the way I needed. There is still some missing parts and I havn't got around rewriting the documentation.
#1 Peter Makholm (Homepage) am 2008-02-12

Have something to say? You can post a comment by sending an e-Mail to me at <mail@joachim-breitner.de>, and I will include it here.