You are not logged in.

#1 2020-12-19 17:02:05

VannTen
Member
Registered: 2019-09-26
Posts: 11

Packaging Haskell The Arch Way

Hello everyone,

I recently tried to use an haskell package on the AUR (matterhorn). Long story short, it did not work, and I suspect that is because I build my packages in a clean chroot, and the PKGBUILD build some dependencies which are already in the arch repos. So ghc being not deterministic, the dependency was not the same, so, breakage (I'm not 100% sure this was the cause, but I think so).

So, after a bit of digging around, I found out arch-hs, in the official repositories. The tool is wonderful and I made my own PKGBUILDs (6 of them for the dependencies which were not packaged) without much trouble. So my matterhorn work, I rebuild it when there is haskell packages updates, not much trouble.

However, since I've done that work, I would like to share it.
And I have a few questions :

- What's the preferred way to package AUR Haskell packages ? The arch-hs one seems better to me, and match the official arch packages, but I've seen both looking at the various haskell packages on the AUR
I can understand that having several PKGBUILD instead of one, to build in a specific order, is more troublesome.

- The Haskell package guidelines do not mention arch-hs, or what's the better way to package Haskell software. Is it deliberate or just missing ?

-Finally, what tool do you use to detect which packages need a rebuild ? And if I maintain a package on the AUR, should i bump the pkgrel the same way this is done for official haskell packages ?

EDIT:

Forgot my fourth question : should I use a single pkgbase and split packages for closely related packages ? For example, matterhorn needs haskell-mattermost-api and haskell-mattermost-api-qc.
But I'm not sure it can work if some of the packages depends on another

Thanks for reading me smile

Last edited by VannTen (2020-12-19 17:09:15)

Offline

#2 2020-12-19 18:07:49

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: Packaging Haskell The Arch Way

VannTen wrote:

Finally, what tool do you use to detect which packages need a rebuild ? And if I maintain a package on the AUR, should i bump the pkgrel the same way this is done for official haskell packages ?

You seems to be mixing questions there from a user and packager perspective.  From a user perspective, I pretty much know when something needs to be rebuilt when it fails and gives an error message about missing libs.  I once wrote a little script to check for any missing library depedencies of binaries in packages to automate this - but I'm not sure where the script went as I didn't really use it.  From the packager / maintainer perspective, you do nothing.  Do not bump the pkgrel to just increment the pkgrel.

VannTen wrote:

should I use a single pkgbase and split packages for closely related packages ?

No.  Unless "closely related" means they share the same upstream source tarball/archive.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

Board footer

Powered by FluxBB