nix2aci
nix2aci copied to clipboard
/etc handling is broken
First off, I love this program. We're using it to make ACIs for our production software, and it's effective, simple, and it works. So thanks for making it!
The handling of /etc in mkACI.py is broken. mkACI.py uses cp -aL when copying /etc. Since this follows symlinks, this is broken if /etc from the input derivations contains relative or absolute links outside of /nix/store. For instance, if a derivation contains a /usr/share/whatever directory, and /etc/whatever is symlinked to it, when cp -aL is ran, the files from /usr/share/whatever on the host system will be used instead of the files from the derivation.
I'd be interested in fixing this, but I'm not sure what the best way to do so is, or what the rationale behind this behavior is.
You're very welcome :-) I'm glad it's useful for others too!
WRT /etc-handling: It would be useful if we had a derivation in the repository that could expose this bug. Could you work out an example and optimally also a way to test/verify the result?
@steveeJ Sure, I'll work on a derivation that exposes this bug, if you can commit to fixing this if I do it.
@philip-wernersbach You have my commitment 👍