-
Notifications
You must be signed in to change notification settings - Fork 116
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
Packaging pcs with Nix #777
Comments
Hi @matt1432, ad 1) untagged build Build from an untagged commit is handled by creating a file ad 2) pam path
I'm not sure how to help with this. Probably it is some issue of python package in nixos, that it cannot find the right path. ad 3) fix other paths
I think you do not have to modify configure.ac file. It is enough to define env variables before running configure script in order to override these settings:
ad 4) var files
Is it working without these directories? I think pcsd needs them in order to be able run. ad 5) PAM config I hope I helped a little bit. |
I've been trying to package pcs for NixOS and I've been mostly successful. You can see my attempt here: https://github.com/matt1432/nixos-pcsd
However, a lot of changes to the build process were needed to get everything to work so I was looking for some help or pointers on how I could deal with this in a better way.
Here are the things I would like help with:
Modifications of build files
Configure flags
PAM config
Some more info:
Untagged build
Since I wanted to get latest git to update to the latest gems, I tried building from source but I got this error:
which I fixed with this line:
echo 'printf %s "${version}"' > $sourceRoot/make/git-version-gen
I could definitely use some help with
git-version-gen
SystemD paths
In nix, all the built files go to
$out
which is a path in the nix store that only has the package's files. I found it quite hard to specify where pcs should place the systemd unit files so I had to a very ugly text replacement with a new line to get it to work.I am also unsure which systemd environment variable I was supposed to change.
Pacemaker and Corosync executables
To have the pacemaker and corosync executables available to pcs, I basically did the same thing as for the systemd path but for the env vars
PCMKEXECPREFIX
andCOROEXECPREFIX
I also had to change the
$prefix
for$prefix/libexec/pacemaker
because the prefix would be different for every package in nixVar directories
In nix, the builds are sandbox and therefore cannot make directories. It would be nice to have a flag maybe to disable that instead of replacing the lines with nothing like I did, although there might be a better way of doing this.
In nix, the service takes care of this which I declare in my module in my git repo.
"--with-distro=*"
As far as I can tell, the major difference in the
--with-distro
parameters was the PAM configuration. In my module I had to make my own PAM config file based on the fedora one, but I replacedsystem-auth
withsystemd-user
. I have no real knowledge of PAM so I have no idea if this is good or not but it works.Obviously I am not expecting pcs to support nix but I would appreciate any help I can get since this was my most challenging software to package in nix and I am pretty certain there is still a lot I can improve.
Thank you
The text was updated successfully, but these errors were encountered: