[Hackage] #274: Add a 'build from sdist tarball' feature

#274: Add a 'build from sdist tarball' feature ----------------------------+----------------------------------------------- Reporter: guest | Owner: Type: enhancement | Status: new Priority: low | Milestone: Component: Cabal library | Version: 1.2.3.0 Severity: normal | Keywords: Difficulty: normal | Ghcversion: 6.8.2 Platform: | ----------------------------+----------------------------------------------- I've often seen Darcs repos where the sdist tarball was incomplete, or where a person had a tarball which was incomplete. I think this is because most people just never use the tarball; if they do ever use it, it's because it's what was downloaded from Hackage. The reason is that doing so is much more complex than 'configure; build; install': you need to configure, create an sdist tarball, cd into dist/; do a tar -xvf or whatever of the correct tarball; cd into *that* - and then you can configure/build/install. Assuming it is a working tarball. Now, of course you can automate it. After the first dozen times, I wrote myself a shellscript to do all that for me: function build_sdist { clean_configure && sdist && cd dist/ && untar *.tar.gz && cd `ls -t ./ | grep "/" | head -n 1` && clean_configure && build && hinstall; haddock && hinstall; } (This is pretty long and imperfect, but it would be even longer if all the other aliases and function definitions were included; I think they're pretty straightforwardly named though, so I haven't included them.) It seems to me that this would be, at the very least, a useful adjunct to cabal check - if it makes sense to see whether various fields are filled out sanely, surely it makes sense to see whether needed files are included/listed? It might be even better to make the normal 'runhaskell Setup build' do it from sdist, but this is harder to code (besides the forgoing, you'd need to copy in the configuration from the top-level, from when the user ran 'runhaskell Setup configure' and added whatever options) and possibly more confusing ("But Foo.hs *is* there, right there in src/! Why can't Cabal find it?"). So I'd be satisfied to do something like 'cabal checkdist'. -- gwern -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/274 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#274: Add a 'build from sdist tarball' feature (aka distcheck) ---------------------------------+------------------------------------------ Reporter: guest | Owner: Type: enhancement | Status: new Priority: normal | Milestone: Component: cabal-install tool | Version: 1.2.3.0 Severity: normal | Resolution: Keywords: | Difficulty: normal Ghcversion: 6.8.2 | Platform: ---------------------------------+------------------------------------------ Changes (by guest): * cc: gwern0@gmail.com (added) -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/274#comment:2 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#274: Add a 'build from sdist tarball' feature (aka distcheck) ---------------------------------+------------------------------------------ Reporter: guest | Owner: Type: enhancement | Status: new Priority: normal | Milestone: cabal-install-0.8 Component: cabal-install tool | Version: 1.2.3.0 Severity: normal | Resolution: Keywords: | Difficulty: normal Ghcversion: 6.8.2 | Platform: ---------------------------------+------------------------------------------ Changes (by duncan): * milestone: => cabal-install-0.8 -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/274#comment:3 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#274: Add a 'build from sdist tarball' feature (aka distcheck) ---------------------------------+------------------------------------------ Reporter: guest | Owner: Type: enhancement | Status: new Priority: normal | Milestone: cabal-install-0.8 Component: cabal-install tool | Version: 1.2.3.0 Severity: normal | Resolution: Keywords: | Difficulty: normal Ghcversion: 6.8.2 | Platform: ---------------------------------+------------------------------------------ Comment (by Saizan): so the UI would be a new command named distcheck? so that "cabal distcheck": 1) runs "cabal sdist" 2) untars the package in a fresh directory 3) runs "cabal install" in it and it should support most of the options of cabal sdist + cabal install(without a package argument)? -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/274#comment:4 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#274: Add a 'build from sdist tarball' feature (aka distcheck) ---------------------------------+------------------------------------------ Reporter: guest | Owner: Type: enhancement | Status: new Priority: normal | Milestone: cabal-install-0.8 Component: cabal-install tool | Version: 1.2.3.0 Severity: normal | Resolution: Keywords: | Difficulty: normal Ghcversion: 6.8.2 | Platform: ---------------------------------+------------------------------------------ Comment (by duncan): Replying to [comment:4 Saizan]:
so the UI would be a new command named distcheck?
I was thinking some variant of the existing check command, eg `cabal check --full` or something.
so that "cabal distcheck": 1) runs "cabal sdist" 2) untars the package in a fresh directory 3) runs "cabal install" in it
Yes. See also what [http://www.gnu.org/software/hello/manual/automake /Checking-the-Distribution.html#Checking-the-Distribution automake does].
and it should support most of the options of cabal sdist + cabal install(without a package argument)?
Hmm. I'd hope we can do with defaults, or perhaps a general configure/install option escape flag. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/274#comment:5 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#274: Add a 'build from sdist tarball' feature (aka distcheck) ---------------------------------+------------------------------------------ Reporter: guest | Owner: Type: enhancement | Status: new Priority: normal | Milestone: cabal-install-0.8 Component: cabal-install tool | Version: 1.2.3.0 Severity: normal | Resolution: Keywords: | Difficulty: normal Ghcversion: 6.8.2 | Platform: ---------------------------------+------------------------------------------ Changes (by NiklasBroberg): * cc: niklas.broberg@gmail.com (added) -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/274#comment:6 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects
participants (1)
-
Hackage