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

cmd-buildextend-live: update kargs_json when moving EFI grub.cfg #3169

Merged
merged 5 commits into from
Nov 7, 2022

Commits on Nov 7, 2022

  1. cmd-buildextend-live: declare vendor_id var to avoid indexing

    It's more legible that way.
    jlebon committed Nov 7, 2022
    Configuration menu
    Copy the full SHA
    80aaf22 View commit details
    Browse the repository at this point in the history
  2. cmd-buildextend-live: use dfd-relative for grub.cfg rename

    This allows the glob to be relative to the live ISO root. Prep for
    future patch which relies on this.
    jlebon committed Nov 7, 2022
    Configuration menu
    Copy the full SHA
    c15e587 View commit details
    Browse the repository at this point in the history
  3. cmd-buildextend-live: update kargs_json when moving EFI grub.cfg

    Otherwise, code lower down will remove the that `grub.cfg` from the list
    of kargs files. This in turn will prevent `coreos-installer iso kargs`
    from affecting kargs on UEFI boots.
    
    Fixes 3991e6f ("cmd-buildextend-live: always change dir
    `EFI/{vendor}/` to correct vendor id").
    jlebon committed Nov 7, 2022
    Configuration menu
    Copy the full SHA
    d5cdce7 View commit details
    Browse the repository at this point in the history
  4. cmd-buildextend-live: ensure files exist before writing kargs.json

    Rather than silently deleting files that no longer exist, flip this
    around so that we assert they all exist. This will then ensure that new
    code moving `grub.cfg` will also have to update `kargs_json`.
    jlebon committed Nov 7, 2022
    Configuration menu
    Copy the full SHA
    37b7f46 View commit details
    Browse the repository at this point in the history
  5. cmd-buildextend-live: avoid no-op renameat(2) for FCOS

    On FCOS, the EFI directory is already correctly named in the src config
    repo. So there's no need to do any renames at all. The previous code
    still worked because `renameat(2)` with the src and dest being the same
    file is a no-op.
    
    This is a bit too implicit though. Let's just add a check to be more
    clear. This avoids us also unnecessarily iterating over
    `kargs_json['files']`.
    
    While here, add a print statement when this logic kicks in.
    jlebon committed Nov 7, 2022
    Configuration menu
    Copy the full SHA
    0bd4e72 View commit details
    Browse the repository at this point in the history