[darcs-users] Using Darcs for Debian package maintenance

Christoph Haas email at christoph-haas.de
Sat Jun 3 19:50:54 UTC 2006


Evening,

I'm on a mission to find the "perfect" revision control system for
maintaining my Debian packages. And I hope to find some enlightenment
here.

For those of you not familiar with Debian package maintenance: Debian is
an operating system (or even a Linux distribution) that includes
thousands of "packages". Packages each contain a certain software that
is made available in a special form (a "deb" package) that can be
installed on a Debian system. It's similar to "rpm" (just more powerful
of course). :) Now maintaining packages means that you deal with an
upstream component (the software that you download from a web page) and
the downstream component (additions made by the "package maintainer"
that make the pile of files a Debian package).

Your directory tree often looks like this (simplified):

./README                <--- upstream
./Makefile                     " "
./src/main.c                   " "
./src/additions.c              " "
./doc/index.html               " "
./doc/index.txt                " "
./debian/control        <--- downstream (everything in debian/)
./debian/copyright             " "
./debian/rules                 " "

So the upstream component changes whenever the software author
(upstream) publishes a new release. And the downstream changes more
often - whenever the package maintainer decides to improve it. In theory
you could even change upstream files. Like the upstream author wants to
install a certain software into /usr/local/lib/ but you want to have it
installed into /usr/share in Debian. So you change the Makefile. (There
are better ways to handle it but this is just an example.) The problem
is that you need to keep your change in the next upstream release.
Merging might help here - no idea how that would work in practice.

Are you still with me? Good. Sorry for the boring introduction. So I'm
trying to find out whether Darcs is a good solution. A number of Debian
developers/maintainers seem to use Darcs. So it can't be all that bad.
Most are probably using Subversion (while many complain loudly about the
stupid way of branching) or Git+Cogito or even nothing because they
believe repositories make their work more complicated than they actually
help.

First thought is managing only the debian/ (downstream) component in a
Darcs repository versus keeping everything in there. I heard rumors
(well, nobody could yet show me a working example) that keeping
everything in the repository works well. They claim that way they do not
lose changes of the upstream files because the RCS merges them into the
new version. Actually I don't believe it would work well because new
upstream version often change large parts and the patches could not be
applied cleanly.

Further issues I found while testing Darcs were:

- I cannot easily check in my changes into a central repository through
  an HTTP proxy. The concept of distributed repositories is indeed a bit
  new to me. But using (procmail) scripts that automatically import
  GPG-signed patches sent through mail sounds more like a workaround
  than a good solution. Subversion uses WebDAV which is pretty
  compatible even through proxies. I know a developer who manages his
  Darcs repository locally making it publicly visible as a web site (as
  described on darcs.net) and just accept patches from other people in a
  cherry-picking manner. This might be okay for first- and second-class
  maintainers. Of course every participant in a project can run a web
  server to show their current state. But equitable maintainership
  sounds harder this way.

- I read rumors that Darcs isn't yet stable enough for serious use (e.g.
  hanging in loops that take hours). While I don't mind using something
  non-stable to report problems and help improve the software I wonder
  how "beta" Darcs really is.

- Darcs does not know about file permissions. If I store executable
  files (e.g. shell scripts) then other people who check those out first
  need to fix the permissions manually. Is this a feature?

- Some operations seem to mean changing files in the _darcs subdirectory
  manually. Like the "boring" files for example. This sounds like it's
  not only done in very rare cases where I have to override Darcs'
  default behavior but rather on a common basis. I had expected to just
  use the proper darcs command-line tools to maintain the repository.
  In other RCSs I don't care about the internal structure of the
  repository either.

- I missed something like "svn stat" to see which files in the current
  directory are under repository control. The kind people in #darcs
  (IRC) recommended "darcs whatsnew -l" which is similar but shows
  everything recursively which can become a lot of output. Or as an
  alternative I was recommended to just look at _darcs/current. But I
  wouldn't want to compare my current directory to what's in
  _darcs/current actually.

- As I'm not familiar with branching I can't really tell whether
  branching in Darcs is handled badly (I read a branch is a full copy of
  the repository's directory tree in the file system). But many people
  love branches because they try things out in other branches and then
  merge it back in. Do you use them often?

Actually I'm even considering to stay with Subversion because I think I
know how it works. But that just makes me feel stupid. If so many people
are complaining that decentral repository systems are superior and that
branching is important for nowadays developers I'm sure I'm missing out
on something. Sure you can tell me "if you are happy with Subversion
then just stay there" but my race seeks perfection. :)

Another choice might be Git+Cogito which I learned about a few days ago.
It's just so badly documented that I feel lost a bit. And I wouldn't
want to be forced to read the source code of my RCS to understand it. It
also doesn't appear to be very widely used (even if it's the apparent
choice for the Linux kernel). That may well be misconception.

I'm seriously interested in your opinions. Even if this is a very
general posting.

Kindly
 Christoph





More information about the darcs-users mailing list