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

Auto-wrap kernel-install if layering kernel packages #4949

Closed
jlebon opened this issue May 7, 2024 · 0 comments · Fixed by #4950
Closed

Auto-wrap kernel-install if layering kernel packages #4949

jlebon opened this issue May 7, 2024 · 0 comments · Fixed by #4950
Labels
jira for syncing to jira

Comments

@jlebon
Copy link
Member

jlebon commented May 7, 2024

Basically right now, we have rpm-ostree cliwrap install-to-root / in the hot path for anyone who wants to swap kernels during derivation. The problem is that the cliwrap stuff lingers into the image, which introduces an unwanted diff wrt other nodes and causes real issues.

Until we have #4726, let's just in the layering code detect if:

  • we're in the container flow, and
  • there's a kernel package in the transaction, then
  • wrap kernel-install before running dnf_context_run() and unwrap it afterwards

Then, we should be able to drop the cargo-culted rpm-ostree cliwrap install-to-root everywhere.

@jmarrero jmarrero added the jira for syncing to jira label May 7, 2024
jlebon added a commit to jlebon/rpm-ostree that referenced this issue May 7, 2024
It's confusing right now how specifically for the kernel, one has to use
this obscure `rpm-ostree cliwrap install-to-root /` command to make it
work. Let's just always enable it: in the client-side layering case, we
don't run kernel scriptlets anyway so the wrapper is unused, and in the
container case, this will allow users to not have to enable cliwrap and
have it leak into their derived image.

I guess in theory, this should also allow us to *stop* ignoring kernel
scriptlets and rely on this instead, though let's leave that for a
separate investigation.

Closes: coreos#4949
jlebon added a commit to jlebon/rpm-ostree that referenced this issue May 7, 2024
It's confusing right now how specifically for the kernel, one has to use
this obscure `rpm-ostree cliwrap install-to-root /` command to make it
work. Let's just always enable it: in the client-side layering case, we
don't run kernel scriptlets anyway so the wrapper is unused, and in the
container case, this will allow users to not have to enable cliwrap and
have it leak into their derived image.

I guess in theory, this should also allow us to *stop* ignoring kernel
scriptlets and rely on this instead, though let's leave that for a
separate investigation.

Closes: coreos#4949
jlebon added a commit to jlebon/rpm-ostree that referenced this issue May 7, 2024
It's confusing right now how specifically for the kernel, one has to use
this obscure `rpm-ostree cliwrap install-to-root /` command to make it
work. Let's just always enable it: in the client-side layering case, we
don't run kernel scriptlets anyway so the wrapper is unused, and in the
container case, this will allow users to not have to enable cliwrap and
have it leak into their derived image.

I guess in theory, this should also allow us to *stop* ignoring kernel
scriptlets and rely on this instead, though let's leave that for a
separate investigation.

Closes: coreos#4949
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jira for syncing to jira
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants