twoliter icon indicating copy to clipboard operation
twoliter copied to clipboard

add repack-variant (OLD)

Open jpculp opened this issue 1 year ago • 3 comments

Description of changes:

This PR is a work in progress to introduce functionality to repackage a variant.

    buildsys: add repack-variant target

    Add the the initial target for repackaging a Bottlerocket variant. This
    target will skip the traditional workflow of building packages and
    using `rpm2img`. Instead the build system will point to a yet to be
    implemented `img2img` tool.
    buildsys: preliminary housekeeping

    Adjusts some things in the build system for preliminary support for an
    additional build target. Removes some unnecessary checks, references,
    and dependencies. Renames Dockerfile to build.Dockerfile and adds a
    common argument for future build targets to skip cleanup if desired.
    buildsys: add support for custom CA certificates

    Rather than having the CA certificate bundle installed as a package, the
    build system will pull the bundle from the Bottlerocket SDK. This can be
    overridden with a local CA bundle by passing
    BUILDSYS_CACERTS_BUNDLE_OVERRIDE.

Testing done:

  • [x] Build Bottlerocket with default CA certificates in Bottlerocket SDK.
  • [x] ~~Build Bottlerocket with custom CA certificates in /certs.~~
  • [x] Build Bottlerocket with custom CA certificates using BUILDSYS_CACERTS_BUNDLE_OVERRIDE.
  • [x] Build aws-k8s-1.27 (no secure boot).
  • [x] Build aws-k8s-1.28 (secure boot).
  • [x] Repack aws-k8s-1.27 (no secure boot).
  • [x] Repack aws-k8s-1.28 (secure boot).
  • [x] Repack vmware-k8s-1.28.

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

jpculp avatar May 02 '24 00:05 jpculp

  • Move symlink_image to imghelper.
  • Prevent buildsys from deleting repacked images if repacking a second time.

jpculp avatar May 02 '24 21:05 jpculp

Addressed most feedback, but still need to investigate some things related to standard output and other variants.

jpculp avatar May 10 '24 01:05 jpculp

Added support for qcow2 and ova/vmdk.

jpculp avatar May 11 '24 00:05 jpculp

Superseded by #231.

jpculp avatar May 22 '24 23:05 jpculp