Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cli: Add build-commit #217

Closed
wants to merge 1 commit into from
Closed

Conversation

jmarrero
Copy link
Member

@jmarrero jmarrero commented Dec 5, 2023

Closes #216

@jmarrero
Copy link
Member Author

jmarrero commented Dec 5, 2023

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

Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

@sallyom sallyom left a comment

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
Collaborator

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
Copy link
Member Author

jmarrero commented Dec 20, 2023

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
Collaborator

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
Copy link
Member Author

jmarrero commented Dec 20, 2023

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