-
Notifications
You must be signed in to change notification settings - Fork 721
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow to build for non-systemd systems #1666
Allow to build for non-systemd systems #1666
Conversation
This will disable systemd integration for all cabal users, but fixes IntersectMBO#1200. There are two other ways to fix this: * provide a hackage overlay, which contains lobemo-scribe-systemd only or all 3rdparty packages and then add that overlay to cabal.project (downside: stack doesn't seem to be able to use hackage overlays) * provide 2 cabal.project files and let user choose via e.g.: --project-file=cabal.project.nosystemd (downside: maintaining yet another file)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This solution is not acceptable because it disables systemd for all cabal users. IOHK"s devops currently rely on this and they run the current core nodes, so they are pretty important.
Unfortunatley, the other options are also rather sub optimal.
What about supplying a simple shell script that reads in the current cabal.project
file and spits out cabal.project.nosystemd
. This script would live in the scripts/
directory and with a little extra documentation would have a very high probability to avoid bit rot and should just DoTheRightThing (tm).
That's certainly an option. What about providing a hackage overlay? I find that an interesting idea in general and would be eager to look into it. But it will add more steps to release cycle. |
@hasufell Why do you need to disable systemd anyway? |
That doesn't work, as discussed in this PR, because of #1200 and haskell/cabal#5444 |
This seems to me like an issue that should be fixed upstream. |
Yes, there already is an issue open, but there is no clear timeline, so it needs a workaround. |
I don't see a reason to address this. The work-around is you modify the cabal.proejct file (as this patch does, and ideally when cabal is fixed, just add to cabal.project.local), but this patch would break our nix builds and cabal builds for anyone that wants systemd (which there are a number of pool operators I've been helping this weekend trying to get systemd services setup on non-nixos). |
@disassembler as @erikd pointed out, this could be done by a shell script. I don't believe users will figure this out on their own. Is there any reason to not accept a patch for that? |
1775: Fix build for cabal users that don't have systemd r=intricate a=hasufell This is mainly due to a cabal bug and should be removed in the future: haskell/cabal#5444 There are various distros, where installing development files of libsystemd won't be an option: - Alpine (doesn't have systemd at all) - Gentoo (not installable when eudev is installed) - Exherbo (not installable when eudev is installed) Users are expected to run the script and then execute cabal like so: cabal build --project-file=cabal.nosystemd.project all ---- related: - #1666 - #1200 This has also been discussed on slack. Instructions for this edge case should probably be added to the wiki? Co-authored-by: Julian Ospald <[email protected]>
This will disable systemd integration for all cabal users,
but fixes #1200.
There are two other ways to fix this:
only or all 3rdparty packages and then add that overlay to
cabal.project (downside: stack doesn't seem to be able to use
hackage overlays)
--project-file=cabal.project.nosystemd
(downside: maintaining yet another file)
Edit: third option could be to document for non-systemd users how to edit cabal.project, but I guess that's a bit awkward?