From ac82087bedc2d47144cbe7cf08ceece81ea53eb6 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Thu, 19 Dec 2024 16:24:48 -0500 Subject: [PATCH] install: Add /usr/share/doc/bootc/baseimage This directory will contain expected files in the base image. That said, I may change the container import path to auto-create at least the sysroot dir and symlink at some point and these can just be dropped. And for that matter after https://github.com/ostreedev/ostree/pull/3353/commits/9a0acd7249bb0c7f55c2bf56e5073902cd60038b "libostree/deploy: enable composefs by default" we can likely just drop the prepare-root bit too. But for now this is needed. Motivated by improving base image generation from https://gitlab.com/fedora/bootc/tracker/-/issues/32 Signed-off-by: Colin Walters --- Makefile | 3 +++ baseimage/README.md | 10 ++++++++++ baseimage/base/ostree | 1 + baseimage/base/usr/lib/ostree/prepare-root.conf | 2 ++ 4 files changed, 16 insertions(+) create mode 100644 baseimage/README.md create mode 120000 baseimage/base/ostree create mode 100644 baseimage/base/usr/lib/ostree/prepare-root.conf diff --git a/Makefile b/Makefile index 1a96f63a..180926ea 100644 --- a/Makefile +++ b/Makefile @@ -25,6 +25,9 @@ install: fi; \ done install -D -m 0644 -t $(DESTDIR)/$(prefix)/lib/systemd/system systemd/*.service systemd/*.timer + install -D -m 0644 -t $(DESTDIR)/$(prefix)/share/doc/bootc/baseimage/base/usr/lib/ostree/prepare-root.conf baseimage/base/usr/lib/ostree/prepare-root.conf + install -d -m 755 $(DESTDIR)/$(prefix)/share/doc/bootc/baseimage/base/sysroot + cp -PfT baseimage/base/ostree $(DESTDIR)/$(prefix)/share/doc/bootc/baseimage/base/ostree # Run this to also take over the functionality of `ostree container` for example. # Only needed for OS/distros that have callers invoking `ostree container` and not bootc. diff --git a/baseimage/README.md b/baseimage/README.md new file mode 100644 index 00000000..1a759763 --- /dev/null +++ b/baseimage/README.md @@ -0,0 +1,10 @@ +# Recommended image content + +The subdirectories here are recommended to be installed alongside +bootc in `/usr/share/doc/bootc/baseimage` - they act as reference +sources of content. + +- [base](base): At the current time the content here is effectively + a hard requirement. It's not much, just an ostree configuration + enabling composefs, plus the default `sysroot` directory (which + may go away in the future) and the `ostree` symlink into `sysroot`. diff --git a/baseimage/base/ostree b/baseimage/base/ostree new file mode 120000 index 00000000..99bd5a25 --- /dev/null +++ b/baseimage/base/ostree @@ -0,0 +1 @@ +sysroot/ostree \ No newline at end of file diff --git a/baseimage/base/usr/lib/ostree/prepare-root.conf b/baseimage/base/usr/lib/ostree/prepare-root.conf new file mode 100644 index 00000000..2faae22b --- /dev/null +++ b/baseimage/base/usr/lib/ostree/prepare-root.conf @@ -0,0 +1,2 @@ +[composefs] +enabled = true