Skip to content

many: redo customizations in a bootc install to-filesystem world (HMS-3453) #571

Merged
ondrejbudai merged 2 commits intoosbuild:mainfrom
mvo5:bootc-disk-customize-again-2
Apr 15, 2024
Merged

many: redo customizations in a bootc install to-filesystem world (HMS-3453) #571
ondrejbudai merged 2 commits intoosbuild:mainfrom
mvo5:bootc-disk-customize-again-2

Conversation

@mvo5
Copy link
Contributor

@mvo5 mvo5 commented Apr 10, 2024

[draft as this needs https://github.com/osbuild/osbuild/pull/1711 first (and agreement that this is the way to do it]
[draft also because it should have some tests at least that the right pipeline is generated]

This commit implements filesystem customizations for images that got generated via bootc install to-filesystem via the new org.osbuild.bind mechanism.

First the image is written via the bootc.install-to-fs stage, then the image is mounted, the ostree.deployment stage is used to get the right deployment and finally the mount is put over the "tree" directory via the bind mount module. This way for the users and selinux stages nothing changes, they work as before on a normal tree (that just happens to be mounted from an image this time).

It also includes a stage to make the /var/home directory that is missing by default on the generic images.

mvo5 added a commit to mvo5/bootc-image-builder that referenced this pull request Apr 10, 2024
@mvo5 mvo5 changed the title many: redo customizations in a bootc install to-filesystem world many: redo customizations in a bootc install to-filesystem world (HMS-3453) Apr 10, 2024
@cgwalters
Copy link
Contributor

cgwalters commented Apr 10, 2024 via email

@mvo5 mvo5 force-pushed the bootc-disk-customize-again-2 branch from 6296ae0 to df7acf8 Compare April 12, 2024 10:12
@mvo5 mvo5 force-pushed the bootc-disk-customize-again-2 branch 2 times, most recently from cabf5d5 to ad204b9 Compare April 12, 2024 10:25
@mvo5 mvo5 marked this pull request as ready for review April 12, 2024 10:25
@mvo5 mvo5 requested review from achilleas-k and ondrejbudai April 12, 2024 10:25
Copy link
Member

@ondrejbudai ondrejbudai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just double-checking: We will still have to drop the group customization, right? It's not documented, so this is probably fine, but I just want to point that out. :)

mvo5 added a commit to mvo5/bootc-image-builder that referenced this pull request Apr 12, 2024
This uses the new customization capabilites of the images
PR osbuild/images#571
@mvo5 mvo5 force-pushed the bootc-disk-customize-again-2 branch from ad204b9 to 94416a6 Compare April 12, 2024 11:33
@mvo5
Copy link
Contributor Author

mvo5 commented Apr 12, 2024

Just double-checking: We will still have to drop the group customization, right? It's not documented, so this is probably fine, but I just want to point that out. :)

Hey, I can reintroduce the groups customization trivially if needed, it will require a tiny PR to osbuild. Happy to do that in a followup, to me it felt less important than the user customizations because it seems rare (at least at this early stage of bib/bootc) that people would use them. But happy to re-add them in a quick followup (or now if that is prerfred).

mvo5 added a commit to mvo5/bootc-image-builder that referenced this pull request Apr 12, 2024
This uses the new customization capabilites of the images
PR osbuild/images#571
cgwalters added a commit to cgwalters/bootc-image-builder that referenced this pull request Apr 12, 2024
To match what we expect currently with composefs.

The more correct thing here longer term is to inspect the
container image, in theory.

In practice though, after we start relying on `bootc install`
osbuild/images#571
I think that will lead us to a place where we start to implicitly
hard require composefs.

But without inspection/detection this will affect how
non-composefs container images (e.g. current quay.io/fedora/* images).

So again the more medium term fix here has to be that either
we inspect, or more ideally we gather the expected mount
options and filesystem types etc. from `bootc` inside the container.
Copy link
Contributor

@cgwalters cgwalters left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only superficially familiar, but this seem sane.

The bigger picture thing here though that is important to me (that cross-cuts a lot of discussions) is iterating to a place where the logic that happens in bib and Anaconda aligns (and also where we've rationalized with bootc install).

That probably looks like having bootc grow a way to spawn a container in the target root itself, bind mounting in external content. Right now bib has a lot of code to inspect things and make bind mounts, and so does Anaconda.

@achilleas-k achilleas-k force-pushed the bootc-disk-customize-again-2 branch from 94416a6 to 4b3e0bb Compare April 12, 2024 16:54
@achilleas-k
Copy link
Member

Rebased for manifest stability fix (which affects CI caching).

ondrejbudai
ondrejbudai previously approved these changes Apr 15, 2024
Copy link
Member

@ondrejbudai ondrejbudai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Splendid, thanks!

@ondrejbudai ondrejbudai added this pull request to the merge queue Apr 15, 2024
@mvo5 mvo5 removed this pull request from the merge queue due to a manual request Apr 15, 2024
@mvo5 mvo5 force-pushed the bootc-disk-customize-again-2 branch from 4b3e0bb to 5a3cb19 Compare April 15, 2024 08:16
@mvo5 mvo5 force-pushed the bootc-disk-customize-again-2 branch from 5a3cb19 to 1e29249 Compare April 15, 2024 08:16
This commit implements filesystem customizations for images that
got generated via `bootc install to-filesystem` via the new
`org.osbuild.bind` mechanism.

First the image is written via the `bootc.install-to-fs` stage,
then the image is mounted, the ostree.deployment stage is used
to get the right deployment and finally the mount is put over
the "tree" directory via the bind mount module. This way for
the users and selinux stages nothing changes, they work as
before on a normal tree (that just happens to be mounted from an
image this time).

It also includes a stage to make the /var/home directory that is
missing by default on the generic images.
@ondrejbudai ondrejbudai added this pull request to the merge queue Apr 15, 2024
Merged via the queue into osbuild:main with commit 5ecb18e Apr 15, 2024
@mvo5 mvo5 deleted the bootc-disk-customize-again-2 branch April 15, 2024 10:45
mvo5 added a commit to mvo5/images that referenced this pull request Apr 15, 2024
When porting custoizations to the new `bootc install to-filesystem`
world initially only users/kernel-options where added. This commit
adds `org.osbuild.groups` now as well.

Needs:
osbuild#571
osbuild/osbuild#1726
mvo5 added a commit to mvo5/bootc-image-builder that referenced this pull request Apr 15, 2024
This uses the new customization capabilites of the images
PR osbuild/images#571
mvo5 added a commit to mvo5/images that referenced this pull request Apr 15, 2024
When porting custoizations to the new `bootc install to-filesystem`
world initially only users/kernel-options where added. This commit
adds `org.osbuild.groups` now as well.

Needs:
osbuild#571
osbuild/osbuild#1726
achilleas-k pushed a commit to mvo5/images that referenced this pull request Apr 15, 2024
When porting custoizations to the new `bootc install to-filesystem`
world initially only users/kernel-options where added. This commit
adds `org.osbuild.groups` now as well.

Needs:
osbuild#571
osbuild/osbuild#1726
github-merge-queue bot pushed a commit that referenced this pull request Apr 15, 2024
When porting custoizations to the new `bootc install to-filesystem`
world initially only users/kernel-options where added. This commit
adds `org.osbuild.groups` now as well.

Needs:
#571
osbuild/osbuild#1726
mvo5 added a commit to mvo5/bootc-image-builder that referenced this pull request Apr 15, 2024
This uses the new customization capabilites of the images
PR osbuild/images#571
mvo5 added a commit to mvo5/images that referenced this pull request Apr 15, 2024
With the new uniform way to handle writing to the bootc image deployment
we can now support a custom `/etc/fstab` again. Similar to what we
do for users [0] and groups [1] we allow also writing a custom fstab
now.

This will need osbuild/osbuild#1727 and also
probably a port of the fstab module to schema_2.

[0] osbuild#571
[1] osbuild#593
github-merge-queue bot pushed a commit that referenced this pull request Apr 16, 2024
With the new uniform way to handle writing to the bootc image deployment
we can now support a custom `/etc/fstab` again. Similar to what we
do for users [0] and groups [1] we allow also writing a custom fstab
now.

This will need osbuild/osbuild#1727 and also
probably a port of the fstab module to schema_2.

[0] #571
[1] #593
github-merge-queue bot pushed a commit to osbuild/bootc-image-builder that referenced this pull request Apr 17, 2024
This uses the new customization capabilites of the images
PR osbuild/images#571
mvo5 added a commit to mvo5/bootc-image-builder that referenced this pull request Apr 17, 2024
This uses the new customization capabilites of the images
PR osbuild/images#571
github-merge-queue bot pushed a commit to osbuild/bootc-image-builder that referenced this pull request Apr 17, 2024
This uses the new customization capabilites of the images
PR osbuild/images#571
ondrejbudai pushed a commit to cgwalters/bootc-image-builder that referenced this pull request Apr 23, 2024
To match what we expect currently with composefs.

The more correct thing here longer term is to inspect the
container image, in theory.

In practice though, after we start relying on `bootc install`
osbuild/images#571
I think that will lead us to a place where we start to implicitly
hard require composefs.

But without inspection/detection this will affect how
non-composefs container images (e.g. current quay.io/fedora/* images).

So again the more medium term fix here has to be that either
we inspect, or more ideally we gather the expected mount
options and filesystem types etc. from `bootc` inside the container.
ondrejbudai pushed a commit to cgwalters/bootc-image-builder that referenced this pull request Apr 23, 2024
To match what we expect currently with composefs.

The more correct thing here longer term is to inspect the
container image, in theory.

In practice though, after we start relying on `bootc install`
osbuild/images#571
I think that will lead us to a place where we start to implicitly
hard require composefs.

But without inspection/detection this will affect how
non-composefs container images (e.g. current quay.io/fedora/* images).

So again the more medium term fix here has to be that either
we inspect, or more ideally we gather the expected mount
options and filesystem types etc. from `bootc` inside the container.
github-merge-queue bot pushed a commit to osbuild/bootc-image-builder that referenced this pull request Apr 24, 2024
To match what we expect currently with composefs.

The more correct thing here longer term is to inspect the
container image, in theory.

In practice though, after we start relying on `bootc install`
osbuild/images#571
I think that will lead us to a place where we start to implicitly
hard require composefs.

But without inspection/detection this will affect how
non-composefs container images (e.g. current quay.io/fedora/* images).

So again the more medium term fix here has to be that either
we inspect, or more ideally we gather the expected mount
options and filesystem types etc. from `bootc` inside the container.
github-merge-queue bot pushed a commit to osbuild/bootc-image-builder that referenced this pull request Apr 24, 2024
To match what we expect currently with composefs.

The more correct thing here longer term is to inspect the
container image, in theory.

In practice though, after we start relying on `bootc install`
osbuild/images#571
I think that will lead us to a place where we start to implicitly
hard require composefs.

But without inspection/detection this will affect how
non-composefs container images (e.g. current quay.io/fedora/* images).

So again the more medium term fix here has to be that either
we inspect, or more ideally we gather the expected mount
options and filesystem types etc. from `bootc` inside the container.
mvo5 added a commit to mvo5/image-builder-cli that referenced this pull request Nov 19, 2025
This uses the new customization capabilites of the images
PR osbuild/images#571
mvo5 pushed a commit to mvo5/image-builder-cli that referenced this pull request Nov 19, 2025
To match what we expect currently with composefs.

The more correct thing here longer term is to inspect the
container image, in theory.

In practice though, after we start relying on `bootc install`
osbuild/images#571
I think that will lead us to a place where we start to implicitly
hard require composefs.

But without inspection/detection this will affect how
non-composefs container images (e.g. current quay.io/fedora/* images).

So again the more medium term fix here has to be that either
we inspect, or more ideally we gather the expected mount
options and filesystem types etc. from `bootc` inside the container.
mvo5 added a commit to mvo5/image-builder-cli that referenced this pull request Nov 25, 2025
This uses the new customization capabilites of the images
PR osbuild/images#571
mvo5 pushed a commit to mvo5/image-builder-cli that referenced this pull request Nov 25, 2025
To match what we expect currently with composefs.

The more correct thing here longer term is to inspect the
container image, in theory.

In practice though, after we start relying on `bootc install`
osbuild/images#571
I think that will lead us to a place where we start to implicitly
hard require composefs.

But without inspection/detection this will affect how
non-composefs container images (e.g. current quay.io/fedora/* images).

So again the more medium term fix here has to be that either
we inspect, or more ideally we gather the expected mount
options and filesystem types etc. from `bootc` inside the container.
mvo5 added a commit to mvo5/image-builder-cli that referenced this pull request Nov 27, 2025
This uses the new customization capabilites of the images
PR osbuild/images#571
mvo5 pushed a commit to mvo5/image-builder-cli that referenced this pull request Nov 27, 2025
To match what we expect currently with composefs.

The more correct thing here longer term is to inspect the
container image, in theory.

In practice though, after we start relying on `bootc install`
osbuild/images#571
I think that will lead us to a place where we start to implicitly
hard require composefs.

But without inspection/detection this will affect how
non-composefs container images (e.g. current quay.io/fedora/* images).

So again the more medium term fix here has to be that either
we inspect, or more ideally we gather the expected mount
options and filesystem types etc. from `bootc` inside the container.
mvo5 added a commit to mvo5/image-builder-cli that referenced this pull request Dec 3, 2025
This uses the new customization capabilites of the images
PR osbuild/images#571
mvo5 pushed a commit to mvo5/image-builder-cli that referenced this pull request Dec 3, 2025
To match what we expect currently with composefs.

The more correct thing here longer term is to inspect the
container image, in theory.

In practice though, after we start relying on `bootc install`
osbuild/images#571
I think that will lead us to a place where we start to implicitly
hard require composefs.

But without inspection/detection this will affect how
non-composefs container images (e.g. current quay.io/fedora/* images).

So again the more medium term fix here has to be that either
we inspect, or more ideally we gather the expected mount
options and filesystem types etc. from `bootc` inside the container.
mvo5 added a commit to mvo5/image-builder-cli that referenced this pull request Dec 8, 2025
This uses the new customization capabilites of the images
PR osbuild/images#571
mvo5 pushed a commit to mvo5/image-builder-cli that referenced this pull request Dec 8, 2025
To match what we expect currently with composefs.

The more correct thing here longer term is to inspect the
container image, in theory.

In practice though, after we start relying on `bootc install`
osbuild/images#571
I think that will lead us to a place where we start to implicitly
hard require composefs.

But without inspection/detection this will affect how
non-composefs container images (e.g. current quay.io/fedora/* images).

So again the more medium term fix here has to be that either
we inspect, or more ideally we gather the expected mount
options and filesystem types etc. from `bootc` inside the container.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants