Commit Graph

253 Commits

Author SHA1 Message Date
Krzesimir Nowak
0cbc3dc489
Merge pull request #3062 from flatcar/buildbot/weekly-portage-stable-package-updates-2025-06-30
Weekly portage-stable package updates 2025-06-30
2025-07-02 13:36:35 +02:00
Krzesimir Nowak
c022d43709 build_library/vm_image_util: Fix squashfs creation for pxe
The pxe disk is a cpio file that, among other things, contains a
squashfs image.

The image has contents of `/usr` directory, so the image's toplevel
directories are `lib`, `lib64`, `share` and so on. The first fix was
to change the `/usr/share/flatcar/update.conf` path in pseudofile
listing to `/share/flatcar/update.conf`. Otherwise mksquashfs started
complaining that `usr` directory does not exists in the image, so some
of the pseudofiles won't be installed.

Second fix is still related to the same file. It already exists in the
image, so the pseudofile wanting to be installed there won't be,
because mksquashfs stopped liking overwriting the files already
present in the image. I added `-e share/flatcar/update.conf` to avoid
adding the file into the image, so that pseudofile can be created
there. It was actually a suggestion printed by mksquashfs.
2025-07-02 13:33:24 +02:00
Robin Schneider
ad0b524c59
OEM: Provide STACKIT images 2025-06-30 14:40:16 +02:00
James Le Cuirot
2f587621ab
dev-util/checkbashisms: Drop package as qemu script now uses Bash
The check for that script was the only consumer.

Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
2025-04-24 12:23:46 +01:00
James Le Cuirot
3ab16bd843
build_library: Fix path handling in QEMU launcher script
I couldn't take it anymore! The launcher script could not handle paths
outside the script's own directory, and it was driving me crazy. Now
only the default values are relative to the script's directory. Given
paths are relative to the current directory and absolute paths work as
you would expect.

Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
2025-04-07 10:13:09 +01:00
Sayan Chowdhury
cdb45e62b3
build_libary/vm_image_util: Add the temporary shim signing cert
Signed-off-by: Sayan Chowdhury <schowdhury@microsoft.com>
2025-03-21 18:02:37 +05:30
James Le Cuirot
9f8eac6540
Drop lots of obsolete release signing and upload code
Most of this hinges on the --upload option being passed, and it never is
any more. Much of it also uses Google Buckets, which we no longer use,
save for some GCE-specific bits.

Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
2024-11-26 14:58:24 +00:00
James Le Cuirot
a76d1b3f1b
Drop all instances of ineffective --root-deps=rdeps option
This option became ineffective with EAPI 7 and all trace of older EAPIs
has now gone.

Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
2024-11-12 22:08:21 +00:00
James Le Cuirot
5125317506
coreos-base/coreos-sb-keys: Drop unnecessary PK and KEK certificates
These are only needed when you are going to ship DB updates to existing
systems, which we are not going to do. Our EFI variables are only for
testing. End users are expected to use EFI variables provided by their
hosts or hardware vendors. We presumably provided these before because
some PK and KEK does need to be provided, but we can now use the
Microsoft and Red Hat ones provided via Gentoo's edk2 package.

Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
2024-11-12 12:02:00 +00:00
James Le Cuirot
c0b58cf56b
Reuse Secure Boot EFI variables image prepared by Gentoo
Rather than starting with a blank image, reuse the image that already
has the Microsoft certificates and the latest DBX revocation list
applied. Gentoo also applies the Red Hat certificates, which we don't
need, but this is okay.

Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
2024-11-12 12:01:59 +00:00
James Le Cuirot
e50fe0a7e4
sys-firmware/edk2-aarch64: Drop in favour of edk2-bin
edk2-bin now supports multiple platforms, including QEMU on arm64, so we
no longer need to use Fedora's build. Note that the Secure Boot
implementation is currently insecure as it lacks SMM, which is needed to
protect the EFI variable store.

Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
2024-11-12 12:01:58 +00:00
James Le Cuirot
d1ba9b19fb
Switch from raw (.fd) EDK2 firmware images to QCOW2, plus 4MB on amd64
The new arm64 firmware supporting Secure Boot (see next commit) is in
QCOW2 format only, avoiding the extra space taken up by the 64MB
padding. Supporting both raw and QCOW2 images would be messy, so switch
entirely to QCOW2.

Only the 4MB images are in QCOW2 format on amd64, so also switch away
from the 2MB images. 4MB images are now the default for most
distributions as they are needed to apply certain Windows updates.

Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
2024-11-12 11:59:40 +00:00
Mathieu Tortuyaux
c80760c999
Merge pull request #1783 from flatcar/kai/proxmox-support
OEM: Provide Proxmox images
2024-11-12 12:52:31 +01:00
Mathieu Tortuyaux
6e674b26d3
oem: provide proxmox images
Co-authored-by: Kai Lüke <pothos@users.noreply.github.com>
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
2024-11-12 12:51:36 +01:00
James Le Cuirot
bcd203ebcb
app-crypt/efitools: Drop in favour of app-emulation/virt-firmware
virt-fw-vars handles X.509 conversion and QCOW2 conversion transparently
and can update all the variables in a single invocation.

Bonus: Asking it to list the variables doesn't cause a segfault due to
the feature not really being implemented. :D

The 00000000-0000-0000-0000-000000000000 owner GUID is what flash-var
used to set, as we didn't specify the -g argument. We don't need to set
a meaningful value as this file is only for testing.

Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
2024-11-06 12:04:18 +00:00
James Le Cuirot
1d7d53fad9
Upgrade to Catalyst 4
Catalyst 4 has totally changed the way repositories are handled. It only
works when the name of the directory containing the repository matches
the configured name of that repository. This was not the case for us,
with the coreos repository residing in the coreos-overlay directory. We
wanted to move and rename our repositories anyway, but this is a big
change, so we'll do separately. For now, this just renames coreos to
coreos-overlay.

Catalyst 4 also ingests the main repository snapshot as a squashfs
rather than a tarball. It features a utility to generate such a
snapshot, but it doesn't fit Flatcar well, particularly because it
expects each ebuild repository to reside at the top level of its own git
repository. It was very easy to call tar2sqfs manually though.

Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
2024-07-15 14:27:59 +01:00
Jeremi Piotrowski
14f1c4f735 grub_install: Remove core.{elf,efi} after copying
We currently carry multiple copies of the same grub core.elf or core.efi
on the boot partition. Save some space by removing duplicates that are
never used at runtime. CPIO build needed to be adapted because it
publishes grub efi files.

Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
2024-06-21 11:04:35 +03:00
Mathieu Tortuyaux
441e10bec5
oem: provide akamai images
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
2024-06-19 15:37:57 +02:00
Adrian Vladu
6efe345d89 image: add kubevirt image build
As Ignition supports KubeVirt, add a custom oem for it and also the
required parts to be able to build an image in .qcow2 format that
is already using internal .qcow2 gzip compression.

Fixes: https://github.com/flatcar/Flatcar/issues/1358

Signed-off-by: Adrian Vladu <avladu@cloudbasesolutions.com>
2024-04-30 09:19:16 +03:00
Mathieu Tortuyaux
9f02c8d262
vm_image_util: produce qcow2 images for Scaleway
For importing Scaleway images, extension needs to be '.qcow2'

See: https://www.scaleway.com/en/docs/compute/instances/how-to/snapshot-import-export-feature/
> Make sure that the QCOW / QCOW2 image file you want to import,
> uses the file extension .qcow or .qcow2 to avoid issues while importing the image.

Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
2024-04-26 09:47:29 +02:00
Mathieu Tortuyaux
5c2a8cf8b9
vm_image_util: add IMAGE_DISK_EXTENSION variable
This variable allows to override the disk extension which is initially
based on the DISK_FORMAT.

Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
2024-04-26 09:47:29 +02:00
Mathieu Tortuyaux
0d4031a6d8
Merge pull request #1880 from apricote/hetzner
OEM: Provide Hetzner Images
2024-04-17 15:17:33 +02:00
Kai Lueke
2e3f175fc1 build_library: Use original qemu image name in qemu script
The move to symlinking to the qemu-uefi image also resulted in the
qemu-uefi image being referenced in the qemu-bios and qemu-uefi-secure
scripts instead of referencing the image symlinks. Same for the VM name
shown in the qemu window title.
When generating the qemu scripts, use the original qemu image name and
VM name.
2024-04-17 12:19:08 +09:00
Julian Tölle
48c81bc978 oem: provide hetzner images 2024-04-16 17:08:04 +02:00
Kai Lueke
286a8ca4c1 Skip non-UEFI qemu image symlink/script for arm64
We didn't generate this before and don't need it.
2024-04-10 16:42:36 +09:00
Kai Lueke
de4eb8f755 Set up symlinks for same image artifacts to remove qemu/qemu_uefi_secure
The qemu and qemu_uefi_secure images have the same contents as the
qemu_uefi image which wastes space on the release server. A similar
case is the PXE vmlinuz which is the same as the regular one, too.

Set up symlinks for same images, and also detect this when compressing
to set up symlinks there as well. To reduce complexity, the qemu and
qemu_uefi_secure images are not supported anymore and the Jenkins or
GitHub CI will skip over them if specified. Users that build their own
images need to adapt, though.
2024-04-09 15:09:29 +02:00
Adrian Vladu
7d4917d67c image_to_vm: add support for hyper-v vhdx format
Add support for Gen 2 Hyper-V VMs.

`./image_to_vm` tool has now a new supported format: `hyperv_vhdx`,
that produces .vhdx dynamic disks.

How to use:

```bash
 ./image_to_vm.sh --from ../build/images/amd64-usr/developer-latest/ --format hyperv_vhdx
```

See: https://github.com/flatcar/Flatcar/issues/1009

Uses PR: https://github.com/flatcar/bootengine/pull/92

Signed-off-by: Adrian Vladu <avladu@cloudbasesolutions.com>
2024-04-09 10:52:06 +03:00
Kai Lueke
7379db37e8 vm_image_util.sh: Bump default VM memory to 2 GB
While Flatcar itself runs fine with 1 GB, many workloads do not and
having to debug this is time consuming when one forgets to bump the VM
memory, e.g., in the Qemu script.
Default to 2 GB as known-good setting for things like Kubernetes or
setting up LUKS devices.
2024-04-04 12:55:37 +09:00
Kai Lueke
1513f3a966 Remove ACI image building bits
The ACI OEM container image was used with rkt for GCE. For long time
this has been migrated to systemd-nspawn and now systemd-sysext.
Remove the unused build library code.
2024-04-03 16:18:56 +09:00
Jeremi Piotrowski
9b50112c5a build_library: Reduce xattr spam when creating cpio
Mksquashfs running against a btrfs filesystem tries to capture btrfs specific
xattrs (btrfs.compression) generating a lot of spam. Remove the spam by
ignoring btrfs xattrs.

Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
2024-03-15 09:26:36 +01:00
Mathieu Tortuyaux
1017216cbe
oem: provide scaleway images
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
2024-03-05 13:51:07 +01:00
Jeremi Piotrowski
6ff9f8b098 Add support for secure boot in qemu_template.sh
We have an existing qemu_uefi_secure format definition, but it is
necessary to update it so that it actually works. Qemu needs to be
passed the correct flags to enable SMM, we need to switch to the Q35
machine, and we need to copy over the secboot variant of the OVMF
firmware.
2024-02-26 12:01:09 +01:00
Jeremi Piotrowski
8019f7fd9f vm_image_util.sh: update path to arm64 UEFI firmware
The arm64 firmware is now called AAVMF with the updated edk2-aarch64
ebuild.
2024-02-26 12:01:09 +01:00
Mathieu Tortuyaux
1cb7be951d
coreos-base/oem-gce: remove ACI built image
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
2023-12-04 18:16:06 +01:00
Mathieu Tortuyaux
5cfbf6e1eb
coreos-base/oem-gce: migrate gce to sysext format
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
2023-12-04 18:15:58 +01:00
Kai Lueke
87ff566aae Use OpenStack image for Brightbox
The special Brightbox image uses the OpenStack userdata in Ignition but
lacked Afterburn usage. It actually works to use the OpenStack image and
directly which also enables Afterburn, thus we can drop the special
image.
Don't build a special image for Brightbox but recommend to use OpenStack
images directly. A symlink is added to help with the download of
hardcoded user scripts.
2023-11-15 13:33:55 +01:00
Mathieu Tortuyaux
b36cb28768
overlay coreos-base/oem-packet: migrate to sysext format
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
2023-10-09 14:35:08 +02:00
Mathieu Tortuyaux
989d20a2f1
overlay core-base/oem-digitalocean: migrate to sysext format
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
2023-10-09 14:35:07 +02:00
Mathieu Tortuyaux
57e7b5aebc
overlay coreos-base/oem-openstack: add oem-openstack
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
2023-10-09 14:35:07 +02:00
Mathieu Tortuyaux
ce2c0e7475
overlay coreos-base/oem-ami: new sysext image
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
2023-09-26 13:34:09 +02:00
Kai Lüke
9ffceaf3fe
Merge pull request #1132 from krishjainx/qcow2-inline-compression
Allow use qcow2 inline compression
2023-09-25 17:37:15 +02:00
Krzesimir Nowak
fa3dc6b649 build_library/vm_image_util: Opt VMware OEM into sysext images 2023-09-20 09:18:43 +02:00
Kai Lueke
d711725fe0 vm_image_util: Fix variable quoting to create correct OEM sysext file
The OEM sysext image file in the OEM partition had the version variable
name being part of the filename instead of the substituted version value
because of wrong quoting when the fixed string got replaced by ${…}.
2023-09-14 11:46:40 +02:00
krishjainx
2124f63dcb Allow use qcow2 compressed format in place of additional compressed layer 2023-09-12 11:21:08 -04:00
Kai Lueke
995ae2cdbc Support OEM systemd-sysext images and Flatcar extensions
The vendor tools on the OEM partition weren't updated. We now want to
ship them as systemd-sysext images which we can easily update. This
change extends the Flatcar A/B update mechanism to cover the OEM
systemd-sysext images. The same mechanism is also able to support
"official" Flatcar extensions, e.g., a ZFS extension.
2023-09-08 14:50:43 +02:00
Thilo Fromm
1f2706d44e build_sysext: guess image build dir and auto-create it
Signed-off-by: Thilo Fromm <thilofromm@microsoft.com>
2023-07-07 14:49:50 +02:00
Thilo Fromm
190fd2c38e build_sysext: bugfixes, QoL changes, help updated
This change improves build_sysext by sourcing a missing lib dependency,
adding a number of comfort / quality-of-life options, and updating the
output of '--help' accordingly.

The OEM sysext finction in build_library/vm_image_util.sh is also
updated to use new command line format.

1. Include missing dependency toolchain_util.sh to fix an error in
   board_options.sh (get_board_arch undefined).
2. Use positional parameters for mandatory arguments.
   build_dir and sysext_name are mandatory and are now positional
   arguments instead of options.
   binary_package is the third positional argument but can be omitted
   if --metapkgs was specified.
3. --squashfs_base is now guessed better and will use the most recent
   build by default.
4. A new boolean flag --ignore_version_mismatch for the more daring
   developer was added. The flag will cause the script to continue if a
   version mismatch between SDK board packages and squashfs base is
   detected.
5. Error messages were improved for when mandatory parameters were not
   provided.
6. The '--help' message was improved and adjusted to the new parameters.

Signed-off-by: Thilo Fromm <thilofromm@microsoft.com>
2023-07-07 11:44:39 +02:00
Krzesimir Nowak
00ac7586a4 *: Remove support for niftycloud OEM 2023-07-05 14:34:17 +02:00
Krzesimir Nowak
ad0360e744 *: Remove support for interoute OEM 2023-07-05 14:33:26 +02:00
Krzesimir Nowak
ec723be9d9 *: Drop unused pkgdb stuff 2023-07-05 08:43:25 +02:00