With cabal-install 2.0.0, a new scope for executables was added [1]. Private executables are put in a subdirectory of libexec. The default is "$abi/$pkgid" [2]. For example, on x86_64, the result is put in /usr/libexec/x86_64-linux-ghc-8.2.2/pkg_name-pkg_version. The package can own the lower directory, but something should own the ghc one. The other problem is that I don't know how to generate $abi. I assume 'linux-ghc' is fixed and I can get '8.2.2' from %ghc_version, but I don't know how to get 'x86_64'. I tried to use %{_target}, but that doesn't seem to match what ghc thinks the directory should be on i686 or ppc64le. Can we have: a) something to own the libexec subdir (/usr/libexec/x86_64-linux-ghc-8.2.2); and, b) a macro for this private directory? [1] https://github.com/haskell/cabal/pull/4501 [2] https://github.com/haskell/cabal/pull/4501/files#diff-83d11080988f2962cf0e63f21d919c1dR208
See this build for an example [1]. I used '%{_arch}-linux-ghc-%{ghc_version}' instead of '%{_target}-ghc-%{ghc_version}' which fixed it on i686. However, on ppc64le, ghc thinks the directory should be 'powerpc64le-linux-ghc-8.2.2' while the macros give 'ppc64le-linux-ghc-8.2.2'. Maybe we should pass `--libexecsubdir='$compiler/$pkgkey'` like is done for `libsubdir`? [1] https://koji.fedoraproject.org/koji/taskinfo?taskID=26173244
So I went with passing `--libexecsubdir='$compiler/$pkgkey'` for cabal-helper, but I'd like to know what we're doing for the future.
I am not sure which arch/host macro to use, but your approach looks fine to me.
(You can probably ignore my first cause above.) I think probably $pkgid would be sufficient for the subdir for now. Though most dirs in libexec or datadir seem unversioned, but at least version might avoid any collisions. I will go with that for now in ghc-rpm-macros. Can you please test with ghc-rpm-macros-1.8.7-4.fc29 which I built for Rawhide?
(I didn't add a macro for the libexecdir though but %{_libexecdir}/%{pkgver} should work.)
In the long term maybe we should change to using the actual base package name to avoid possible conflicts.
I'm now getting this: error: Empty %files file /builddir/build/BUILD/cabal-helper-0.8.0.2/ghc-cabal-helper.files Empty %files file /builddir/build/BUILD/cabal-helper-0.8.0.2/ghc-cabal-helper.files
Do you have the build.log?
Anything here: https://koji.fedoraproject.org/koji/taskinfo?taskID=26182937 except warp-tls which shouldn't have been in that build.
Thanks - sorry about that, my bad: this should be fixed by eclipseo's PR to ghc-rpm-macros: https://src.fedoraproject.org/rpms/ghc-rpm-macros/pull-request/1 which I just pushed to Koji
Looks okay now: https://koji.fedoraproject.org/koji/buildinfo?buildID=1067052 (I built ghc-concurrent-output for you on f29)
Works in what I needed too: https://koji.fedoraproject.org/koji/taskinfo?taskID=26278853 I guess this is also necessary on F28 as well, since that has cabal-install 2?
Thanks for confirming Yep, I was meaning to build for f28 - let me do it now. (I was waiting to add a "fhpkg merge" command but that may take more time.)
ghc-rpm-macros-1.8.7-5.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-909dde89dc
ghc-rpm-macros-1.8.7-5.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-909dde89dc
ghc-rpm-macros-1.8.7-5.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.