Skip to content

Commit

Permalink
install: Add /usr/share/doc/bootc/baseimage
Browse files Browse the repository at this point in the history
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
ostreedev/ostree@9a0acd7
"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 <[email protected]>
  • Loading branch information
cgwalters committed Dec 20, 2024
1 parent 7bea5ef commit d284a6e
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ install:
fi; \
done
install -D -m 0644 -t $(DESTDIR)/$(prefix)/lib/systemd/system systemd/*.service systemd/*.timer systemd/*.path systemd/*.target
install -D -m 0644 -t $(DESTDIR)/$(prefix)/share/doc/bootc/baseimage/base/usr/lib/ostree/ 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.
Expand Down
10 changes: 10 additions & 0 deletions baseimage/README.md
Original file line number Diff line number Diff line change
@@ -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`.
1 change: 1 addition & 0 deletions baseimage/base/ostree
3 changes: 3 additions & 0 deletions baseimage/base/sysroot/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# A trick to keep an empty directory in git
*
!.gitignore
2 changes: 2 additions & 0 deletions baseimage/base/usr/lib/ostree/prepare-root.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[composefs]
enabled = true

0 comments on commit d284a6e

Please sign in to comment.