# Integration with https://github.com/coreos/bootupd and bootloader logic
# xref https://github.com/coreos/fedora-coreos-tracker/issues/510
packages:
  - bootupd

# bootloader
packages-aarch64:
  - grub2-efi-aa64 efibootmgr shim
packages-ppc64le:
  - grub2 ostree-grub2
packages-s390x:
  # On Fedora, this is provided by s390utils-core. on RHEL, this is for now
  # provided by s390utils-base, but soon will be -core too.
  - /usr/sbin/zipl
packages-x86_64:
  - grub2 grub2-efi-x64 efibootmgr shim
  - microcode_ctl

conditional-include:
  - if: basearch != "s390x"
    # And remove some cruft from grub2
    include: grub2-removals.yaml

postprocess:
  - |
    #!/bin/bash
    set -xeuo pipefail
    # Until we have https://github.com/coreos/rpm-ostree/pull/2275
    mkdir -p /run
    # Transforms /usr/lib/ostree-boot into a bootupd-compatible update payload
    /usr/bin/bootupctl backend generate-update-metadata
