]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commit
rootfs-postcommands.bbclass: avoid moving ssh host keys if etc is writable
authorPeter Bergin <peter@berginkonsult.se>
Mon, 5 Sep 2022 18:40:40 +0000 (20:40 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 8 Sep 2022 13:55:51 +0000 (14:55 +0100)
commitd2ad7aa1f2153955adc044ea4eb11c48086a01d1
tree000d2b0d1acae50416f994b4a97fb5a62fa28ca2
parentfa08030b32c2bf77889c23f964892f46e84994a3
rootfs-postcommands.bbclass: avoid moving ssh host keys if etc is writable

When using IMAGE_FEATURE read-only-rootfs ssh host keys are moved to volatile
storage. If the feature overlayfs-etc is used in addition to read-only-rootfs
/etc is writable and the move is not wanted. But in the case also the IMAGE_FEATURE
stateless-rootfs is used the keys will be moved as storage of keys should not
be wanted in a stateless-rootfs.

This change only takes effect in the case IMAGE_FEATURE contains read-only-rootfs.
In adddition the following cases are handled:

  IMAGE_FEATURES = "read-only-rootfs" --> ssh keys/config handled as ro root
  IMAGE_FEATURES = "read-only-rootfs overlayfs-etc" --> ssh keys/config handled as rw root
  IMAGE_FEATURES = "read-only-rootfs stateless-rootfs" --> ssh keys/config handled as ro root
  IMAGE_FEATURES = "read-only-rootfs overlayfs-etc stateless-rootfs" --> ssh keys/config handled as ro root

Signed-off-by: Peter Bergin <peter@berginkonsult.se>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes-recipe/rootfs-postcommands.bbclass