Skip to content

cli: Add build-commit - #217

Closed
jmarrero wants to merge 1 commit into
bootc-dev:mainfrom
jmarrero:bootc-commit
Closed

jmarrero wants to merge 1 commit into
bootc-dev:mainfrom
jmarrero:bootc-commit

Conversation

@jmarrero

@jmarrero jmarrero commented Dec 5, 2023

Copy link
Copy Markdown
Contributor

Closes #216

@jmarrero

jmarrero commented Dec 5, 2023

Copy link
Copy Markdown
Contributor Author

mm I think I need to use the ostree-ext crate directly instead of just calling ostree.

@vrothberg vrothberg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@sallyom sallyom left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@jmarrero do you want to convert to PR?

@cgwalters

Copy link
Copy Markdown
Member

So one big thing we could do here in general is a lot of what happens today in the rpm-ostree postprocessing phase; for example, a big one is handling /etc/passwd and generating sysusers fragments.

Another interesting one is kernel handling; erroring out if you have multiple kernels, cleaning up the duplicate content the Fedora kernel packages drop in /boot etc.

However...lately I'm also thinking just for maximum compatibility we should start to do that stuff on the client too automatically.

@jmarrero

jmarrero commented Dec 20, 2023 •

Copy link
Copy Markdown
Contributor Author

Did not get it out of Draft because of background chats with Colin, sorry for not updating sooner. I think we wanted to make this bootc native code instead of calling back to ostree to reduce the dep on ostree and on top of that, the logic with /var changes needs to be revised.

What do you all think about:

  1. check for stuff in /tmp and error out
  2. relax the /var errors make it warning
  3. any other check?

@cgwalters

Copy link
Copy Markdown
Member

Or maybe what would be best is something like a generalized "hooks" framework, i.e. we have /usr/lib/bootc/container-commit.d that contains drop-ins that can execute at build time. That would make everything easily extensible...and today we have sysusers code in rpm-ostree that we could keep where it is, and have e.g.

cat /usr/lib/bootc/container-commit.d/10-rpmostree-sysusers
#!/bin/bash
exec rpm-ostree postprocess sysusers

or so?

@jmarrero

jmarrero commented Dec 20, 2023 •

Copy link
Copy Markdown
Contributor Author

I guess that would work, but we would need also to scan the dropins and skip anything calling binaries not present on the system? Or just fail with a warning? Because, with your example we would fail the build on an image that does not have rpm-ostree.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add bootc build commit

4 participants