-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
lxc: fix postInstall substitutions #371051
base: master
Are you sure you want to change the base?
Conversation
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.
Can you explain the behavior you're trying to fix?
I think you're actually reversing the correct order of operations, and changing fail to warn is obscuring this reversal.
Sorry for not including more details in the original description! I'm trying to fix the file paths in some of the configuration files. Grabbing LXC from unstable gives me this:
And even just trying to create a container fails:
This has been a particular issue as I've been trying to create containers and LXC starts looking for these configuration files at the wrong paths. I manually patched these for my development environment and with these changes it seems to be working fine, i.e. I'm not getting "file not found" errors anymore and I can successfully create containers. I agree that changing fail to warn could obscure errors, but when I just reversed them initially, ran the build, got the error, and checked the files that were being substituted, the files were empty. I'm not familiar enough with Nix build to know why this might be happening, but my assumption was that these files are filled in some sort of 2-stage system where they are created and then filled later, but if these can be left as fail instead of warn, please let me know and I'll update the PR! |
I'm still digging, but it seems like the substitutions for |
Signed-off-by: Matt Provost <[email protected]>
Fix the order of substitutions in postInstall hook of lxc package. They seem to have been implemented in reverse order, resulting in path issues.
Also changed some of the substitutions to
--replace-warn
. In my testing, leaving it on--replace-fail
caused it to false-positive fail.Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.