
Hi, Would it be possible to add an option to cabal2arch to prevent it from creating files outside of the directory which contains the PKGBUILD and install file (i.e. "link", "title", "desc", the source tarball and the cabal file)? Tangentially, is all of the necessary metainformation contained in the cabal file, or does cabal2arch require further information contained in the source tarball? I found it strange that it downloaded the latter. Presuming that the cabal file contains all the necessary information, I would really prefer it if cabal2arch could simply read the file remotely without saving it and then generate the directory with the PKGBUILD and install file, and nothing else. I ask this because I'm considering adding cabal support to bauerbill, which is a full yaourt replacement with additional features such as integrated support for building repo packages froms source. I am hoping to use cabal2arch to do this but I do now want to deal with the clutter that it creates as all I require are the PKGBUILD and install file. I do not want to implement my own "cabal2arch" though because it seems silly to duplicate the effort and then have to monitor changes in cabal2arch for compatibility. Also, as issues with yaourt have been previously mentioned, along with a mention of paktahn as an alternative, I invite you all to try bauerbill, which you can find here: http://xyne.archlinux.ca/info/bauerbill http://bbs.archlinux.org/viewtopic.php?id=88247 All feedback and suggestions are welcome. Additionally, please consider changing the cabal2arch help message as it does not describe what cabal2arch actually does: cabal2pkg: [-h|--help] [directory|url] Generate PKGBUILD to stdout for .cabal file in <directory> or at <url> Finally, the dependencies array does not specify minimum versions as specified in the cabal file, e.g. "Cabal-Version >= 1.2" does not translate to "haskell-cabal>=1.2". I realize that this example is trivial as haskell-cabal is already at a later version, but should this not be remedied to prevent possible issues in the future? I'm sorry that I haven't supplied any patches, but I'm still only just beginning to learn haskell and I doubt that any patches that I submit at this point would save more effort than their review would require. Regards, Xyne

xyne:
Hi,
Would it be possible to add an option to cabal2arch to prevent it from creating files outside of the directory which contains the PKGBUILD and install file (i.e. "link", "title", "desc", the source tarball and the cabal file)? Tangentially, is all of the necessary metainformation contained in the cabal file, or does cabal2arch require further information contained in the source tarball? I found it strange that it downloaded the latter. Presuming that the cabal file contains all the necessary information, I would really prefer it if cabal2arch could simply read the file remotely without saving it and then generate the directory with the PKGBUILD and install file, and nothing else.
Well, I really shouldn't have had those files be created -- they're a quick hack to log a bit of metainfo for other tools to process (to generate the upload logs).
I ask this because I'm considering adding cabal support to bauerbill, which is a full yaourt replacement with additional features such as integrated support for building repo packages froms source. I am hoping to use cabal2arch to do this but I do now want to deal with the clutter that it creates as all I require are the PKGBUILD and install file. I do not want to implement my own "cabal2arch" though because it seems silly to duplicate the effort and then have to monitor changes in cabal2arch for compatibility.
Could you just clean up the files?
Additionally, please consider changing the cabal2arch help message as it does not describe what cabal2arch actually does:
Good idea.
Finally, the dependencies array does not specify minimum versions as specified in the cabal file, e.g. "Cabal-Version >= 1.2" does not translate to "haskell-cabal>=1.2". I realize that this example is trivial as haskell-cabal is already at a later version, but should this not be remedied to prevent possible issues in the future?
I'm sorry that I haven't supplied any patches, but I'm still only just beginning to learn haskell and I doubt that any patches that I submit at this point would save more effort than their review would require.
In what sense would you support cabal in your tool? Just transparently calling cabal2arch? -- Don

xyne:
Additionally, please consider changing the cabal2arch help message as it does not describe what cabal2arch actually does:
cabal2pkg: [-h|--help] [directory|url] Generate PKGBUILD to stdout for .cabal file in <directory> or at <url>
I don't understand this. The above message *is* what cabal2arch does. It generates PKGBUILDs to stdout, for the .cabal file given in <directory> or <url> -- Don

* On Monday, January 18 2010, Don Stewart wrote:
xyne:
Additionally, please consider changing the cabal2arch help message as it does not describe what cabal2arch actually does:
cabal2pkg: [-h|--help] [directory|url] Generate PKGBUILD to stdout for .cabal file in <directory> or at <url>
I don't understand this. The above message *is* what cabal2arch does. It generates PKGBUILDs to stdout, for the .cabal file given in <directory> or <url>
-- Don
This is probably beside xyne's point, but it could be confusing when the cabal2arch calls itself cabal2pkg. -- Adam

vogt.adam:
* On Monday, January 18 2010, Don Stewart wrote:
xyne:
Additionally, please consider changing the cabal2arch help message as it does not describe what cabal2arch actually does:
cabal2pkg: [-h|--help] [directory|url] Generate PKGBUILD to stdout for .cabal file in <directory> or at <url>
I don't understand this. The above message *is* what cabal2arch does. It generates PKGBUILDs to stdout, for the .cabal file given in <directory> or <url>
-- Don
This is probably beside xyne's point, but it could be confusing when the cabal2arch calls itself cabal2pkg.
Oh, oops :)

Additionally, please consider changing the cabal2arch help message as it does not describe what cabal2arch actually does:
cabal2pkg: [-h|--help] [directory|url] Generate PKGBUILD to stdout for .cabal file in <directory> or at <url>
I don't understand this. The above message *is* what cabal2arch does. It generates PKGBUILDs to stdout, for the .cabal file given in <directory> or <url>
cabal2arch 0.6-1 does not generate anything to STDOUT. It creates a directory and writes the PKGBUILD and install file to that directory, along with the aforementioned "clutter" outside of that directory. The help text should therefore not include "to stdout" in my opinion. I am unable to test cabal2arch 0.6.1-1 to see if this has changed because I simply cannot build it. It seems that there are several haskell packages, including packages in extra, which do not contain correct and complete depends arrays in their PKGBUILDs. When trying to build cabal2arch, I am unable to get passed building haskell-csv which is pulled in as a dependency: ==> Making package: haskell-csv 0.1.1-2 x86_64 (Tue Jan 19 09:39:22 CET 2010) ==> Checking Runtime Dependencies... ==> Checking Buildtime Dependencies... ==> Retrieving Sources... -> Found csv-0.1.1.tar.gz in build dir ==> Validating source files with md5sums... csv-0.1.1.tar.gz ... Passed ==> Extracting Sources... -> Extracting csv-0.1.1.tar.gz with bsdtar ==> Removing existing pkg/ directory... ==> Entering fakeroot environment... ==> Starting build()... Setup.hs:2:0: Warning: In the use of `defaultUserHooks' (imported from Distribution.Simple): Deprecated: "Use simpleUserHooks or autoconfUserHooks, unless you need Cabal-1.2 compatibility in which case you must stick with defaultUserHooks" Warning: defaultUserHooks in Setup script is deprecated. Configuring csv-0.1.1... Setup: At least the following dependencies are missing: parsec -any ==> ERROR: Build Failed. I have tried to install haskell-parsec from [extra] but this in turn complained about missing (haskell-)mtl, which I then also installed. After this I tried to build haskell-csv again but that failed with the same error as above. At that point I gave up as I didn't have the time to fiddle with a series of broken PKGBUILDs or try to figure out what the exact problem is. I realize that it may be something painfully obvious and simple, but I am not familiar with building haskell packages yet and simply did not have the time to investigate further.

xyne:
Additionally, please consider changing the cabal2arch help message as it does not describe what cabal2arch actually does:
cabal2pkg: [-h|--help] [directory|url] Generate PKGBUILD to stdout for .cabal file in <directory> or at <url>
I don't understand this. The above message *is* what cabal2arch does. It generates PKGBUILDs to stdout, for the .cabal file given in <directory> or <url>
cabal2arch 0.6-1 does not generate anything to STDOUT. It creates a directory and writes the PKGBUILD and install file to that directory, along with the aforementioned "clutter" outside of that directory. The help text should therefore not include "to stdout" in my opinion.
Oh, yes. That is also true.
I am unable to test cabal2arch 0.6.1-1 to see if this has changed because I simply cannot build it. It seems that there are several haskell packages, including packages in extra, which do not contain correct and complete depends arrays in their PKGBUILDs. When trying to build cabal2arch, I am unable to get passed building haskell-csv which is pulled in as a dependency:
Please wait until we have completed the 6.12 update (other emails on this on the arch-haskell list), or else delay your upgrade. The darcs version of cabal2arch includes the new dependency policy. -- Don

* On Tuesday, January 19 2010, Xyne wrote: ...
I have tried to install haskell-parsec from [extra] but this in turn complained about missing (haskell-)mtl, which I then also installed. After this I tried to build haskell-csv again but that failed with the same error as above. At that point I gave up as I didn't have the time to fiddle with a series of broken PKGBUILDs or try to figure out what the exact problem is. I realize that it may be something painfully obvious and simple, but I am not familiar with building haskell packages yet and simply did not have the time to investigate further.
You could fall back to using cabal-install to get cabal2arch, which will chase all those dependencies. However there are a couple changes needed to build cabal2arch with ghc-6.12 (to use cabal-1.8). Attached is a darcs patch which fixes the compile errors with ghc-6.12, but maybe it will be applied sometime soon. $ darcs get http://code.haskell.org/~dons/code/cabal2arch $ cd cabal2arch $ darcs apply path/to/patch.dpatch $ cabal install Then hopefully you can use cabal2arch as planned? -- Adam
participants (3)
-
Adam Vogt
-
Don Stewart
-
Xyne