diff options
| author | Michael Vogt <michael.vogt@gmail.com> | 2016-06-07 10:23:58 +0200 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@gmail.com> | 2016-06-07 10:23:58 +0200 |
| commit | f28b33b3599dc3884e8c41641a7da57eb276d520 (patch) | |
| tree | 83543bb36eaf7734fc63b56c6c5beaeb50b7a2b0 | |
| parent | b00f0eba14b5eeea1455c002e8bd1d9df576a693 (diff) | |
| parent | f0c39d494d3cc5601f53bd36a0bf87944e36f642 (diff) | |
Merge pull request #32 from ubuntu-core/rootfs
Add configuration option for using core snap as rootfs
| -rw-r--r-- | configure.ac | 19 | ||||
| -rw-r--r-- | src/mount-support.c | 5 |
2 files changed, 23 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 4241a008d8..fd888b4df9 100644 --- a/configure.ac +++ b/configure.ac @@ -61,5 +61,24 @@ AS_IF([test "x$enable_confinement" = "xyes"], [ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX]) ]) +# Allow to use the new execution environment based on pivot_root and bind-mount +# of the core snap. This is closer to how an all-snap system would execute +# applications (the root file system is a read only core snap) and is more +# flexible in how the host OS can look like (it can have any directory layout) +# and lastly it is much easier to implement arbitrary bind mounts from the +# classic environment. +AC_ARG_ENABLE([rootfs_is_core_snap], + AS_HELP_STRING([--enable-rootfs-is-core-snap], [Use core snap as the root file system]), + [case "${enableval}" in + yes) enable_rootfs_is_core_snap=yes ;; + no) enable_rootfs_is_core_snap=no ;; + *) AC_MSG_ERROR([bad value ${enableval} for --enable-rootfs-is-core-snap]) + esac], [enable_rootfs_is_core_snap=no]) +AM_CONDITIONAL([ROOTFS_IS_CORE_SNAP], [test "x$enable_rootfs_is_core_snap" = "xyes"]) + +AS_IF([test "x$enable_rootfs_is_core_snap" = "xyes"], [ + AC_DEFINE([ROOTFS_IS_CORE_SNAP], [1], + [Use the core snap as the root file system])]) + AC_CONFIG_FILES([Makefile src/Makefile tests/Makefile compat/Makefile]) AC_OUTPUT diff --git a/src/mount-support.c b/src/mount-support.c index 0b89a83951..668d13beb1 100644 --- a/src/mount-support.c +++ b/src/mount-support.c @@ -127,7 +127,9 @@ void setup_private_pts() void setup_snappy_os_mounts() { debug("%s", __func__); - +#ifdef ROOTFS_IS_CORE_SNAP +#error "not implemented" +#else // we mount some whitelisted directories // // Note that we do not mount "/etc/" from snappy. We could do that, @@ -159,6 +161,7 @@ void setup_snappy_os_mounts() die("unable to bind %s to %s", src, dst); } } +#endif // ROOTFS_IS_CORE_SNAP } void setup_slave_mount_namespace() |
