nix2aci icon indicating copy to clipboard operation
nix2aci copied to clipboard

/etc handling is broken

Open philip-wernersbach opened this issue 8 years ago • 3 comments

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.

philip-wernersbach avatar Nov 14 '16 16:11 philip-wernersbach

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 avatar Dec 09 '16 17:12 steveej

@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 avatar Dec 27 '16 17:12 philip-wernersbach

@philip-wernersbach You have my commitment 👍

steveej avatar Jan 17 '17 15:01 steveej