Commit Graph

1229 Commits

Author SHA1 Message Date
Mathieu Tortuyaux
4bbf66c11a
Merge pull request #3043 from invis-z/podman-subid
podman: remove subuid/subgid creation from sysext
2025-07-25 10:05:10 +02:00
James Le Cuirot
fb59f0ae0d
Merge pull request #3080 from flatcar/chewi/local-build-fixes
A couple of small fixes for performing Flatcar builds locally
2025-07-04 11:19:27 +01:00
James Le Cuirot
d78421a362
grub_install.sh: Ensure shim packages are installed
Without these, build_image will fail in a fresh SDK instance.

Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
2025-07-03 17:00:02 +01:00
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
Mathieu Tortuyaux
e699691736
Merge pull request #3018 from stackitcloud/stackit-oem-image
OEM: Provide STACKIT images
2025-06-30 17:44:27 +02:00
Robin Schneider
ad0b524c59
OEM: Provide STACKIT images 2025-06-30 14:40:16 +02:00
invis-z
0750ebb6f9
podman: remove subuid/subgid creation from sysext
Following what was done for incus. Removes the subuid/gid from sysext.

Adding subuid/subgid could be done through Ignition:
```yaml
version: 1.1.0
variant: flatcar
storage:
  files:
    - path: /etc/subuid
      append:
        - inline: |
            core:1065536:65536
    - path: /etc/subgid
      append:
        - inline: |
            core:1065536:65536
```

Related: flatcar/Flatcar#1733
2025-06-23 16:32:29 +08:00
Mathieu Tortuyaux
fcb6e97776
incus: remove subuid / subgid creation from sysext
This create more issues than it solves:
* override existing subuid / subgid
* not flexible for the end user
* it has to be created only once (while tmpfiles always try to create
  those files)

I think Flatcar should not be responsible to create this and it should
be documented on how to do it through Ignition:
```yaml
version: 1.1.0
variant: flatcar
storage:
  files:
    - path: /etc/subuid
      append:
        - inline: |
            root:1065536:65536
    - path: /etc/subgid
      append:
        - inline: |
            root:1065536:65536
```

Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
2025-06-18 10:11:34 +02:00
Mathieu Tortuyaux
47f47b4393
build_library: Add mangle script for incus sysext
This requests the `incus.service` for the multi-user.target

Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
2025-05-19 11:27:06 +02:00
Mathieu Tortuyaux
df4b910323
sysext: add incus
Sort the sysext entries as well.

Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
2025-05-19 11:26:55 +02:00
Daniel Zatovic
a96ba6d0ca sysext: build nvidia-persistenced daemon 2025-05-13 11:26:09 +02:00
Daniel Zatovic
ee918fb32b sysext: don't build nvidia-drivers on ARM 2025-05-13 11:26:09 +02:00
Daniel Zatovic
9cb0d0c8e5 sysext: allow for architecture-specific sysexts 2025-05-13 11:26:09 +02:00
Daniel Zatovic
894c794aeb sysext: Use SLOT notation in NVIDIA drivers version 2025-05-13 11:26:09 +02:00
Daniel Zatovic
820bc74c3b sysext: Change the sysext seperator from : to |
To be able to use the SLOT syntax, which uses : we need to change the
sysext seperator to |.
2025-05-13 11:26:09 +02:00
Daniel Zatovic
4efb615a55 sysext: Add pre-built NVIDIA drivers 2025-05-13 11:26:09 +02:00
Daniel Zatovic
305d999148 sysext: Allow per-sysext USE flags 2025-05-13 11:26:09 +02:00
James Le Cuirot
10498c29fb
build_library: Create extraction script temp files in $TMPDIR or /tmp
Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
2025-05-08 07:59:54 +01:00
James Le Cuirot
68def073cf
build_library: Sort content listings for more consistent output
Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
2025-05-08 07:59:53 +01:00
James Le Cuirot
ec904175e6
build_library: Fix directory handling in extraction script
I thought cpio was always creating the output directory automatically,
but it was silently failing. It would only extract the next rootfs when
run a subsequent time.

Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
2025-05-08 07:59:52 +01:00
Krzesimir Nowak
538fd076e9
Merge pull request #2814 from flatcar/krnowak/move-stuff-over
Move some packages from overlay to portage-stable
2025-04-24 15:31:36 +02:00
James Le Cuirot
3a887ebc4a
Merge pull request #2838 from flatcar/chewi/binpkgs
Drop confusing and obsolete binpkg-related code
2025-04-24 14:26:15 +01:00
Krzesimir Nowak
5ca9142507 build_library/build_image_util.sh: Use scan instead of packages in syft
The `packages` command is deprecated in favor of `scan`.
2025-04-24 15:26:13 +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
Krzesimir Nowak
654f36e75a build_library/qemu_template.sh: Make it use bash
Insisting on just sh is pointless. Use bash, so the checkbashisms
script running somewhere will just shut up.
2025-04-24 10:53:29 +02:00
Krzesimir Nowak
fb2682ddb6
Merge pull request #2846 from flatcar/krnowak/qemu-script
Simplify and improve flatcar_production_qemu*.sh script
2025-04-23 15:15:43 +02:00
Krzesimir Nowak
7fc5ec8b50 build_library/qemu_template.sh: Add support for primary disk options 2025-04-23 14:41:19 +02:00
James Le Cuirot
50d7dd1a84
Drop all references to a toolchain-specific binpkg host
This evidently hasn't been used in a very long time, if ever, and it's
just adding confusion.

Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
2025-04-22 17:59:38 +01:00
Krzesimir Nowak
df17f6b672 build_library/qemu_template.sh: Add support for extra disks 2025-04-22 17:19:38 +02:00
Krzesimir Nowak
36ee8ed43a build_library/qemu_template.sh: Simplify qemu execution
The final part of the script differed only the name of the qemu binary
to execute and in network device driver (virtio-net-pci on amd64 vs
virtio-net-device on arm64). virtio-net-pci seems to be working also
on arm64, so simplify the code to avoid repetition.
2025-04-22 17:19:38 +02:00
Krzesimir Nowak
b3dd088469 build_library/qemu_template.sh: Some whitespace fixes 2025-04-22 17:19:38 +02:00
Krzesimir Nowak
2ca63a3a82 build_library/qemu_template.sh: Simplify mounting VM image
There's no need to differentiate between amd64 and arm64 boards here
any more. This also adds bootindex=1 option to the -device flag, so we
can pass more secondary disks without affecting the boot order.
2025-04-22 17:19:38 +02:00
James Le Cuirot
14398067d5
build_library: Change extraction script to xz and rewrite to be simpler
This version writes fewer temporary files and tries cpio multiple times
for concatenated archives again.

Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
2025-04-22 13:14:02 +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
Adrian Vladu
0a8267f69b
cpio: do not fail on ghost rootfs
On Linux >= 6.10, the first rootfs is an extra ghost rootfs of 336K,
that has a corrupted CPIO.

To overcome this issue, do not fail on `cpio --extract`.
2025-03-27 16:14:17 +00:00
Krzesimir Nowak
e8b631fcb9
Merge pull request #2750 from flatcar/buildbot/weekly-portage-stable-package-updates-2025-03-17
Weekly portage-stable package updates 2025-03-17
2025-03-27 07:13:11 +01:00
Krzesimir Nowak
b1220b6e4e build_library/toolchain_util: Fix setting a profile
Setting a profile in a newly created sysroot when building native
toolchains broke after an eselect update. Apparently eselect gets the
path to the coreos-overlay repository and then prefixes it with
ROOT. Since ROOT was set to /build/<arch>-usr, the resulting patch was
wrong. Fix this by telling eselect where to find our make.profile
symlink in new sysroot by setting PORTAGE_CONFIGROOT to
/build/<arch>-usr and where to find our profiles by setting ROOT (and
SYSROOT, because it must match ROOT) to /.
2025-03-21 14:16:01 +01:00
Sayan Chowdhury
7d7bcb02e1
grub_install.sh: copy signed shim to location
Signed-off-by: Sayan Chowdhury <schowdhury@microsoft.com>
2025-03-21 18:02:38 +05:30
James Le Cuirot
76729bea7f
Revert "prod_image_util.sh: Temporarily nobble removing unsigned kernel and GRUB"
This reverts commit 3f68400908.
2025-03-21 18:02:38 +05:30
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
Sayan Chowdhury
450a8983cc
build_library/sbsign_util: Update the SBSIGN_KEY & AZURE_KEYVAULT_URL
Signed-off-by: Sayan Chowdhury <schowdhury@microsoft.com>
2025-03-21 18:02:30 +05:30
Gabriel Adrian Samfira
fb396e642f
Fix non conforming partition table
This change removes the legacy_boot flag from the EFI system partition.
We already have a BIOS boot partition which should offer compatibility with
legacy bios systems.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2025-02-14 19:24:47 +02:00
Krzesimir Nowak
1e9ed6156c virtual/rust: Drop unused package
Mentions of virtual/rust in some scripts were replaced with
dev-lang/rust-bin. These were usually about skipping the update/build
of the package, and these already contained dev-lang/rust, so added
the -bin variant for completeness.
2025-01-24 11:41:22 +01:00
Jan Bronicki
0f0fa2ff7a fix: Dynamically create netdev arguments to correctly include commas
docs: Add entrance to the changelog about the fix

Update changelog/changes/2025-01-15-qemu-startup-script-comma-fix.md

Co-authored-by: Mathieu Tortuyaux <mathieu.tortuyaux@gmail.com>
2025-01-15 17:57:56 +01:00
Jan Bronicki
1a7b995a08 Add port forwarding as multiple use parameters
Add mention in the changelog

Update changelog/changes/2025-01-10-qemu-startup-script-port-forwarding.md

Co-authored-by: Mathieu Tortuyaux <mathieu.tortuyaux@gmail.com>

Update build_library/qemu_template.sh

Co-authored-by: Mathieu Tortuyaux <mathieu.tortuyaux@gmail.com>

Adjust to review comments

Review adjustments
2025-01-13 15:28:25 +01:00
James Le Cuirot
29a5131380
build_image_util.sh: Don't compress extracted partition unnecessarily
I know I recently deduplicated the code between extract_update and
generate_update recently, but now that generate_update will sometimes be
called at a later time, I've realised that it is compressing and
uploading the partition twice.

Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
2024-12-23 13:01:36 +00:00
James Le Cuirot
3f68400908
prod_image_util.sh: Temporarily nobble removing unsigned kernel and GRUB
We would normally remove these for an official build so that the signed
versions can be uploaded later. However, we are not doing that signing
until we pass the shim review.

Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
2024-12-13 10:05:05 +00:00
Krzesimir Nowak
d4db435dd9 build_library/build_image_util: Fix local exporting
Apparently `local -x FOO` does not locally export an already existing
variable, but rather does some whole weird lot of nothing - it shadows
an existing variable with a new unset one, but it won't export it
until it gets assigned.
2024-12-04 17:27:29 +01:00
James Le Cuirot
0059a33aae
Merge pull request #2491 from flatcar/chewi/split-sbsign-job
Do Secure Boot signing for official builds in a separate additional job
2024-12-04 10:39:55 +00:00