[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

ANN: cabal-debian et el


Having received no negative feedback, I uploaded the latest version of
cabal-debian to hackage. cabal-debian is part of the debian package
which features:

1. cabal-debian

Automatically generate a debian directory from a .cabal package. To
use, cd in the root directory of the .cabal project and run:

 cabal-debian --debianize

Then edit the debian directory as needed. Mostly cabal libraries
should build out of the box, but some may require extra love and care
to build or to make lintian happy.

2. the Debian library

The debian library contains code for:

 + parsing, manipulating, and printing common debian file formats,
   such as .changes files, control files, sources.list files, etc.

 + parsing and comparing Debian Version numbers. (Includes support for
   ~, not sure if the version number policy has had any new additions
   since that?)

 + mapping entries in sources.list to the corresponding file names of
   the downloaded index files on disk.

 + interface for using the binaries in /usr/lib/apt/methods for
   'downloading' files.

 + a Debian dependency solver. You give it a Depends line, and it will
   provide solutions that satisfy the Depends. Due to the combination
   of 'or' dependencies and implicit/explicit Conflicts, calculating a
   solution for the dependencies is an NP-Hard problem. However, last
   time I tested, this solver performed well against the packages in
   sid. So, experimentally, I believe the types of cases that would
   cause this solver to choke, do not naturally occur often in the
   real world.

3. BONUS: apt-get-build-depends

apt-get provides a command build-depends so that you can do, apt-get
build-depends for a source package, to install all the required build
dependencies. Unfortuantely, it does not look at the local
debian/control, but rather, the Source package index file that it

Additionally, when dpkg-buildpackage fails, it spits out a list of the
missing build dependencies. In theory, you would just copy and paste
those missing build dependencies as the arguments to apt-get
install. Unfortuantely, apt-get install does not know how to parse the
build-dependencies if they include | or version numbers.

Hence, the creation of apt-get-build-depends. It will look in
debian/control, find all the Build-Depends and Build-Depends-Indep and
attempt to install them. At present it is very hackish -- I believe it
ignores architecture and version requiresments. But, it's a start :)

- jeremy

Reply to: