Ticket #529 (closed defect: wontfix)

Opened 4 years ago

Last modified 3 years ago

sdist creation code currently doesn't work with Solaris's tar

Reported by: igloo Owned by:
Priority: normal Milestone:
Component: Cabal library Version: 1.6.0.1
Severity: normal Keywords:
Cc: Difficulty: unknown
GHC Version: Platform:

Description

Cabal's sdist creation code currently doesn't work on Solaris. The code (in Cabal's Distribution/Simple/SrcDist.hs) is:

let tarBallFilePath = targetPref </> tarBallName pkg_descr <.> "tar.gz"
rawSystemProgram verbosity tarProg
         ["-C", tmpDir, "-czf", tarBallFilePath, tarBallName pkg_descr]
return tarBallFilePath

but it looks like we need this instead:

let tarFilePath = targetPref </> tarBallName pkg_descr <.> "tar"
    tarBallFilePath = tarFilePath <.> "gz"
rawSystemProgram verbosity tarProg
         ["-cf", tarFilePath, "-C", tmpDir, tarBallName pkg_descr]
rawSystemProgram verbosity gzipProg
         [tarFilePath]
removeFile tarFilePath
return tarBallFilePath

Note that we don't actually tell gzip where to put the output, but I can't see a way to do so without messing with stdout.

See  http://hackage.haskell.org/trac/ghc/ticket/3106 for more details on the problems.

Change History

Changed 4 years ago by bos

Running gtar on a Solaris box would also do the trick, as would constructing a pipeline from tar to gzip.

Changed 3 years ago by duncan

  • status changed from new to closed
  • resolution set to wontfix

Personally I have no plan to fix this. The cabal sdist works fine on all platforms because it uses Haskell tar code rather than any external tar program. The sdist command doesn't really belong in the Cabal lib anyway. It's not something you need to be able to build a package. It's a command line feature for developers and as such belongs in the cabal command line prog. If we need some per-package sdist hook in the Cabal lib it should be for preparing a source tree ready to be tarred up, it does not need to construct the actual tarball.

Note: See TracTickets for help on using tickets.