Cabal, tar and uploading to Hackage

Lately my attempts at creating tar-balls for uploading to Hackage have been failing. I use the standard `./Setup.hs sdist` method to generate tar-balls, but apparently that uses `/usr/bin/tar` (GNU tar), which defaults to the 'gnu' format, while Hackage requires the 'ustar' format. Is there some way to pass arguments to `tar` when using `./Setup.hs sdist`? /M -- Magnus Therning OpenPGP: 0xAB4DFBA4 email: magnus@therning.org jabber: magnus@therning.org twitter: magthe http://therning.org/magnus Heuristic is an algorithm in a clown suit. It’s less predictable, it’s more fun, and it comes without a 30-day, money-back guarantee. -- Steve McConnell, Code Complete

You could try setting the TAR_OPTIONS environment variable before running
Setup:
TAR_OPTIONS="--format=ustar" runhaskell Setup.hs sdist
On Sat, May 24, 2014 at 11:41 PM, Magnus Therning
Lately my attempts at creating tar-balls for uploading to Hackage have been failing. I use the standard `./Setup.hs sdist` method to generate tar-balls, but apparently that uses `/usr/bin/tar` (GNU tar), which defaults to the 'gnu' format, while Hackage requires the 'ustar' format.
Is there some way to pass arguments to `tar` when using `./Setup.hs sdist`?
/M
-- Magnus Therning OpenPGP: 0xAB4DFBA4 email: magnus@therning.org jabber: magnus@therning.org twitter: magthe http://therning.org/magnus
Heuristic is an algorithm in a clown suit. It’s less predictable, it’s more fun, and it comes without a 30-day, money-back guarantee. -- Steve McConnell, Code Complete
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
On Sat, May 24, 2014 at 11:41 PM, Magnus Therning
Lately my attempts at creating tar-balls for uploading to Hackage have been failing. I use the standard `./Setup.hs sdist` method to generate tar-balls, but apparently that uses `/usr/bin/tar` (GNU tar), which defaults to the 'gnu' format, while Hackage requires the 'ustar' format.
Is there some way to pass arguments to `tar` when using `./Setup.hs sdist`?
/M
-- Magnus Therning OpenPGP: 0xAB4DFBA4 email: magnus@therning.org jabber: magnus@therning.org twitter: magthe http://therning.org/magnus
Heuristic is an algorithm in a clown suit. It’s less predictable, it’s more fun, and it comes without a 30-day, money-back guarantee. -- Steve McConnell, Code Complete
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Magnus Therning wrote:
Lately my attempts at creating tar-balls for uploading to Hackage have been failing. I use the standard `./Setup.hs sdist` method to generate tar-balls, but apparently that uses `/usr/bin/tar` (GNU tar), which defaults to the 'gnu' format, while Hackage requires the 'ustar' format.
Is there some special reason why you use Setup.hs for this? I'm not sure why you say that is the "standard". From what I understand, the standard way has been cabal dist for quite some time. Are you using a custom Setup.hs (which often results in problems and should be avoided unless absolutely necessary), and have you checked that cabal dist doesn't do the right thing? Regards, Yitz

On Mon, May 26, 2014 at 06:52:30PM +0300, Yitzchak Gale wrote:
Magnus Therning wrote:
Lately my attempts at creating tar-balls for uploading to Hackage have been failing. I use the standard `./Setup.hs sdist` method to generate tar-balls, but apparently that uses `/usr/bin/tar` (GNU tar), which defaults to the 'gnu' format, while Hackage requires the 'ustar' format.
Is there some special reason why you use Setup.hs for this?
Because using tar directly is a bit too much work.
I'm not sure why you say that is the "standard". From what I understand, the standard way has been cabal dist for quite some time.
Maybe it's not 'the' standard any longer, but it surely is 'a' standard, since it's what tools like `cabal` has to fall back on when a package has a non-trivial Setup.hs.
Are you using a custom Setup.hs (which often results in problems and should be avoided unless absolutely necessary), and have you checked that cabal dist doesn't do the right thing?
No, I'm not using a non-standard Setup.hs, but I have so far not had any use for `cabal` since I'm on a platform with a real package manager. /M -- Magnus Therning OpenPGP: 0xAB4DFBA4 email: magnus@therning.org jabber: magnus@therning.org twitter: magthe http://therning.org/magnus I invented the term Object-Oriented, and I can tell you I did not have C++ in mind. -- Alan Kay

On 26 May 2014 18:25, Magnus Therning
On Mon, May 26, 2014 at 06:52:30PM +0300, Yitzchak Gale wrote:
Magnus Therning wrote:
Lately my attempts at creating tar-balls for uploading to Hackage have been failing. I use the standard `./Setup.hs sdist` method to generate tar-balls, but apparently that uses `/usr/bin/tar` (GNU tar), which defaults to the 'gnu' format, while Hackage requires the 'ustar' format.
File a Cabal bug report. The Setup.hs really ought to call gnu tar in such a way that it always produces ustar format. Duncan
participants (4)
-
Duncan Coutts
-
Magnus Therning
-
Thor Adam
-
Yitzchak Gale