packaging taffybar and problem with dummy package

Martin Bukatovic martin.bukatovic at gmail.com
Mon Nov 2 22:13:55 UTC 2015


Dear Haskell list,

I have a problem with packaging taffybar project from hackage. Using
cabal-rpm I was able to build it (including all dependencies not yet available
in fedora 22) as you can see my haskell copr:

https://copr.fedoraproject.org/coprs/marbu/haskell/

But I stumbled into corner case I'm not sure how to resolve. While my
priority is to get it work in the copr, I would like to resolve it in a
clean way which would be acceptable in a future fedora packaging review.

Taffybar requires (among others) network module. And since version 2.6,
this module was split into 2 modules: network and network uri. The
problem is that upstrem suggests that hackage projects which would like
to be buildable with both versions (before and after the split) should
use define following cabal flag:

http://hackage.haskell.org/package/network-uri-2.5.0.0

Since Fedora 22 provides ghc-network-2.4.2.3-1.fc22 (and if I checked
dist-git right, this is also the version which will be shipped for f23),
I need to set this network-uri flag to False. Which means that to
satisfy cabal requirement for network-uri < 2.6, I need to use network-uri
module in version 2.5 (it's just empty placeholder package). And as I
understand it, it was a deliberate decision motivated by some hackage
details I don't see into:

https://github.com/haskell/network-uri/pull/22

Anyway disabling the flag helps during build (as you can see in the
copr), but when I try to install it, I can't:

~~~
# rpm -qa "ghc-network-uri*"                                       
ghc-network-uri-2.5.0.0-1.fc22.i686                                             
ghc-network-uri-devel-2.5.0.0-1.fc22.i686
# dnf install ghc-taffybar-devel                                   
Last metadata expiration check performed 0:33:16 ago on Mon Nov  2 21:42:11 2015.
Error: nothing provides
ghc-devel(network-uri-2.5.0.0-57c8091ea57afec62c051eda2322cc2f) needed by ghc-taffybar-devel-0.4.5-2.fc22.i686
~~~

This is likely related to the fact that both ghc-network-uri packages
are empty, without any haskell binaries. So whatever ghc-devel macro
tries to find, it there is nothing in these packages by definition.

I could have just patch the cabal file like this:

https://github.com/marbu/specfiles/commit/8bb2ecc43ba3bed9d6df9654fd21730f9d2f304f

but that would not solve the problem for other packages which (possibly)
requires network-uri module and contains network-uri flag as suggested
by upstream.

So my questions are:

1) Is there any way how to make the dummy package work as intended?

2) Since I'm new to haskell packaging, I would like to know if this kind
   of issue is common or expected.

If both answers are just "no", I can probably just patch the cabal file after
all and call it a day :)

Thanks for the help.

-- 
Martin Bukatovic


More information about the haskell mailing list