
Hi all, With my Gentoo Haskell packaging hat on I'd like to grumble slightly :-) There are a number of packages floating around that have various things 'odd' about them. It makes the lives of packaging people much easier if tarballs follow a standard convention. I suggest that the convention should be the same as what autoconf/automake does in the C world (because this is what packaging people are used to and what packaging tools work best with) 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). And that archive should unpack to "FooBar-1.2.3/". There are packages around where the cabal package name is all lower case but the tarball name is all upper case or mixed. Similarly there are packages which unpack to just the package name rather name & version. There are also packages with non-canonical version numbers, eg 5.01 gets normalised to 5.1. Cabal identifies these two version numbers but it's not clear that package authors are aware of this. I know these seem like trivial issues but consistency makes things much easier for (semi-)automatic tools. With the rise of cabal, I think this is a great opportunity to have tools that make it easy for package authors to "do the right thing". For example, the C coders who use automake get package tarball preperation for free. Indeed automake does some quite sophisiticated checks to make sure that a source tarball is complete and consitent (it unpacks the tarball, builds the package and uses it to produce another tarbal which it compares to the original). We (Gentoo packaging folk) are quite eager for cabal's "./setup sdist" feature to be fixed/improved (apparently there are some issues with it currently) so that package authors can be encouraged to use it and produce consistent tarballs that will make packaging that bit smoother. If it's not so high on everyone else's priority list we'll send patches! :-) Duncan

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).
Just one comment about the naming convention:
On 5/11/05, Duncan Coutts
... 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? -Iavor

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
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
participants (2)
-
Duncan Coutts
-
Iavor Diatchki