producing nice tarballs

Duncan Coutts duncan.coutts at worc.ox.ac.uk
Wed May 11 21:34:24 EDT 2005


On Wed, 2005-05-11 at 16:24 -0700, Iavor Diatchki wrote:
> Hi,
> I pretty much agree with what you said, and I am eager for a Cabal
> with a working sdist (and support to build a profiling version of the
> package).  I think some of these things are fixed, or at least were
> discussed, but I am not sure how to update the Cabal I have (this is
> the one that was installed with GHC).

I believe that one just installs a new release of Cabal. This will
provide updated versions of the Distribution/* modules which will mask
the ones provided with ghc.

Someone correct me if I'm wrong about this! :-)

> Just one comment about the naming convention:
> 
> On 5/11/05, Duncan Coutts <duncan.coutts at worc.ox.ac.uk> wrote:
> > ...
> > So if you've got a cabal package with fields:
> > 
> > name:           FooBar
> > version:        1.2.3
> > 
> > Then the tarball should be "FooBar-1.2.3.tar.gz" (or .zip or .tar.bz2).
> 
> Many packages could be distributed in more than one flavour, e.g.
> source, GHC 6.4 binaries, GHC-6.2 binaries etc.  There could also be
> versions for different platforms.
> I like the convention FooBar-1.2.3-src.tar.gz for packages that
> contain source code, but I am not sure how should one name other
> packages....   I would expect that all of those would extract to a
> directoy like you suggested: FooBar-1.2.3.  Unless of course I
> misunderstood your post and you were just referring to distributing
> source code?

Sorry, yes I was only referring to distributing source code. (In Gentoo
of course that's all we deal with!) The conventions for binary
distributions are less universal, especially for 'generic' binary
packages rather than distro packages like .deb and .rpm files.

As an example of binary distribution, for Gtk2Hs, we distribute the
source code as "gtk2hs-0.9.7.tar.gz" but for win32 binaries we use
"gtk2hs-0.9.7.1.gtk-2.4.win32.zip" and
"gtk2hs-0.9.7.1.gtk-2.6.win32.zip" (you can see that we have an extra
component which refers to the gtk version).

The convention that rpm follows is "foobar-1.2.3.i386.rpm" where the
last component identifies the arch. Of course for a 'generic' package
you might need to identify the OS as well as the arch since rpm/deb is
of course specific to one OS.

You could follow the convention that GHC uses, eg:
"ghc-6.4-powerpc64-unknown-linux.tar.bz2"

which includes the full arch vendor OS triple.

I guess the fact is that most binary distributions are done by distros /
packaging people who can pick their own convention. The original
distributor providing 'generic' binary packages (as opposed to
providing .debs or .rpms) is comparatively rare.

So I'd suggest:

      * "FooBar-1.2.3.tar.gz" for the sources
      * "FooBar-1.2.3.xxx.tar.gz" for a 'generic' binary distribution
        where xxx is some kind of OS/arch identifier.

I know it seems asymmetric to omit the "src" for the source
distribution, but this is the most common convention.

Duncan



More information about the Libraries mailing list