RFE: --copy-up remap
It might be useful to expand the --copy-up argument to accept syntax for remapping the source to a different destination.
For instance, my particular use-case involves chrooting on entry, but simply due to the nature of chrooting, critical directories (like /run/, /etc/, and others) are not available in the chrooted filesystem.
For additional context, my overall goal of this is to create an isolated system that can be modified without affecting the host filesystem. Specifically, I have a directory structure that mimics a Linux installation, including things like /home. I'd like changes to the user dir to be isolated to this particular directory structure, rather than having file changes/additions/deletions affecting the actual /home dir on the host system. Currently, I'm not fully aware of a way to accomplish this without creating hard-links to the directories that I want to "copy-up". I'm about to test this method, but it's also not entirely ideal.
Feature Request
Argument --copy-up could accept a syntax like: rootlesskit --copy-up=/etc:./etc. Or, a new argument that would accept this type of logic, like --map-up or something.
This may be more involved than simply allowing for a remapping, given the functionality of chroot. So instead, the approach may be to explore chroot-friendly functionality when used with rootlesskit? The overall ideal solution would be to abstract changes to the rootlesskit-ed system away from the host filesystem so that changes are isolated and do not ultimately affect the host. This may require a more custom solution outside of the scope of rootlesskit, but it would certainly allow for improved functionality.
For instance, I'm genuinely torn between the functionality of proot and rootlesskit. With rootlesskit, although it's appears outside of the scope of the project, I find myself handicapped due to the inability to protect the host system from changes. While proot allows for "chrooting" of images, it doesn't provide the exceptional functionality of rootlesskit, including slirp, systemd, etc...
It just occurred to me that I should be able to achieve this with a bind mount. However, adding this as a built-in capability would be particularly useful for a streamlined process. Maybe something like --bind=/etc:./etc? But, given that chrooting isn't an inherent feature built into rootlesskit, it might not make sense to implement this feature without also implementing an autochroot feature. That's probably out of scope, but again, it would be a great addition to rootlesskit for the same reasons already mentioned!
SGTM