coreos / rpm-ostree

⚛📦 Hybrid image/package system with atomic upgrades and package layering
https://coreos.github.io/rpm-ostree
Other
855 stars 193 forks source link

Support `rpm-ostree kargs` in container builds #3738

Open LorbusChris opened 2 years ago

LorbusChris commented 2 years ago

Host system details

$ rpm-ostree --version
rpm-ostree:
 Version: '2022.9'
 Git: 44031a71f444ec63ed292f8807b5bb04a0cf3329
 Features:
  - rust
  - compose
  - fedora-integration

Expected vs actual behavior

Running buildah build with the following Dockerfile:

FROM quay.io/coreos-assembler/fcos:testing-devel

RUN rpm-ostree kargs --replace mitigations=auto,nosmt=off && \
    rpm-ostree kargs --append intel_pstate=disable && \
    rpm-ostree cleanup -m && \
    ostree container commit

ENTRYPOINT ["/noentry"]

yields

STEP 1/3: FROM quay.io/coreos-assembler/fcos:testing-devel
STEP 2/3: RUN rpm-ostree kargs --replace mitigations=auto,nosmt=off &&     rpm-ostree kargs --append intel_pstate=disable &&     rpm-ostree cleanup -m &&     ostree container commit
error: This system was not booted via libostree.
Currently, most rpm-ostree commands only work on ostree-based host systems.

error building at STEP "RUN rpm-ostree kargs --replace mitigations=auto,nosmt=off &&     rpm-ostree kargs --append intel_pstate=disable &&     rpm-ostree cleanup -m &&     ostree container commit": error while running runtime: exit status 1

Expected: Successful manipulation of the kernel arguments stored in the image

jlebon commented 2 years ago

I think this will likely require distro-level integration to work. It might be better to move this to https://github.com/coreos/fedora-coreos-tracker, but we can leave it here for now.

cgwalters commented 2 years ago

Yeah, I definitely want this too. I think it would be particularly powerful if we also had our cliwrap'd version of grubby also do the same thing.

IverCoder commented 5 months ago

What's the progress on this?