nspawn: permit prefixing of source paths in --bind= and --overlay= with "+"
authorLennart Poettering <lennart@poettering.net>
Wed, 30 Nov 2016 15:02:47 +0000 (16:02 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 1 Dec 2016 11:41:18 +0000 (12:41 +0100)
commit86c0dd4a71c29d300632d39cf56ddb0fd0facb24
tree081097c05ef73d8f2afc376651c243fb8572f1a6
parente28c7cd0665364bb910fe2cead882623c23c28ac
nspawn: permit prefixing of source paths in --bind= and --overlay= with "+"

If a source path is prefixed with "+" it is taken relative to the container's
root directory instead of the host. This permits easily establishing bind and
overlay mounts based on data from the container rather than the host.

This also reworks custom_mounts_prepare(), and turns it into two functions: one
custom_mount_check_all() that remains in nspawn.c but purely verifies the
validity of the custom mounts configured. And one called
custom_mount_prepare_all() that actually does the preparation step, sorts the
custom mounts, resolves relative paths, and allocates temporary directories as
necessary.
man/systemd-nspawn.xml
src/nspawn/nspawn-mount.c
src/nspawn/nspawn-mount.h
src/nspawn/nspawn-register.c
src/nspawn/nspawn.c