Added RPM generation capability to Cabal

Bryan O'Sullivan bos at serpentine.com
Tue Feb 20 23:56:00 EST 2007


> Have you seen cabal2rpm?  It's an external tool with a similar goal:
> 
> http://community.moertel.com/ss/space/Cabal2rpm/cabal2rpm.html

I hadn't seen it, no.

> Can you outline any other differences between this command and
> cabal2rpm?

Cabal2rpm is much less sophisticated.  The rpm command I wrote correctly 
calculates dependencies on other Haskell packages, and on system 
packages too.  Also, cabal2rpm has clearly bitrotted from looking at the 
source, and would be unlikely to work now.

> This seems like really cool work, but what do folks think about adding
> OS-specific items like this to Cabal.

I realise I get a bit less of a vote since I wrote this, but I think 
that cabal2rpm illustrates one aspect of the problem with keeping tools 
like this outside of Cabal: they break.  Another aspect is that you have 
to be able to *find* the external tools.  A Google search like "cabal 
rpm spec" does not yield cabal2rpm anywhere in the results.

> My stance has been that we
> should keep such tools external to Cabal, layered on top of Cabal so
> as to not clutter Cabal too much, and to make Cabal's interface to the
> outside world as good as possible.

I certainly wouldn't mind there being a single command entry point for 
building binary packages, e.g. bdist, with flags to control which kind 
of binary package to build (RPM, deb, DMG, Innosetup, etc.).  But I 
really think it's a good thing for the language as a whole to make it as 
easy as possible for people to provide binaries to their respective 
OS/distro communities.  This is a step towards that.  I've written Mac 
and Windows installers, too, so if the RPM stuff gets in, they're 
natural targets.

You can see that the code I added has negligible effect on the core of 
Cabal, so it doesn't add clutter.

	<b


More information about the cabal-devel mailing list