Commit Graph

972 Commits

Author SHA1 Message Date
Krzesimir Nowak
ea0f478cfa build_library: Fix some string vs bytes issues
This is some fallout from converting scripts from python2 to
python3. Output received from the functions in subprocess module now
return bytearrays, but we operate on them as if they were a text. So
decode the bytearrays to strings. Otherwise we are either getting some
junk values passed to the command line utilities (for example:
`b'/dev/loop2'` instead of `/dev/loop2`), or exceptions are thrown,
because a function expected a string.
2021-08-18 18:58:16 +02:00
Krzesimir Nowak
b6c6a05404 build_library: Fix python script extension
It's not a shell script. It never was a shell script. Must have been a
mistake to name it as such.
2021-08-18 18:57:04 +02:00
Krzesimir Nowak
336a967941 build_library: Convert python2 scripts to python3
This is just a conversion done by 2to3 with a manual updates of
shebangs to mention python3 explicitly. The fixups for bytearray vs
string issues will follow up.
2021-08-18 18:56:48 +02:00
Dongsu Park
04d9fea0c1 build_library: fix docstring issues
Fix several docstring issues, so that the docstrings could match with
the actual code.
2021-08-16 10:39:26 +02:00
Dongsu Park
34cb6d305a build_library: support multi-arch in generate_au_zip
To be able to support arm64 native SDK without cross builds, we should
make generate_au_zip support both architectures, amd64 and arm64.
Without doing that, `build_image` fails with `ERROR : Required
WHITE_LIST items ld-linux-x86-64.so.2 not found!!!`, because the
script recognizes only amd64 libs in WHITE_LIST.

We should first determine the architecture in build_image, before
running generate_au_zip, and pass the architecture, either amd64 or
arm64. Also add allow_list and ld_linux parameters to necessary
functions.
2021-08-13 10:03:33 +02:00
Dongsu Park
a7f251da44 build_library: use proper vocabulary in generate_au_zip
Replace black list with deny list, white list with allow list.
2021-08-13 09:30:53 +02:00
Jeremi Piotrowski
a8a57c733b
Merge pull request #134 from kinvolk/jepio/arm64-sdk-support
bootstrap_sdk: enable arm64 sdk bootstrap
2021-08-03 12:18:01 +02:00
Kai Lüke
4321b2ab83 Revert "Revert "disk_layout: use btrfs for the OEM partition""
This reverts commit bb9ddfb08a,
meaning that the planned change is now done and we switch the OEM
partition to btrfs. The reason for the revert is resolved in
https://github.com/kinvolk/ignition/pull/22
2021-08-03 10:50:06 +02:00
Kai Lüke
bb9ddfb08a Revert "disk_layout: use btrfs for the OEM partition"
This reverts commit bc97e15c3c.
2021-07-30 20:44:36 +02:00
Kai Lüke
c1b2d88aa2 build_image_util.sh: delete vmlinuz file from /usr partition
The vmlinuz kernel image gets installed to /usr/boot/ but isn't usable
for dm-verity until it gets copied over to /boot/flatcar/ and the hash
gets embedded at a particular offset. The file in /usr/boot/ uses space
while it's not having a real purpose as long as dm-verity is used.

Delete the vmlinuz file under /usr/boot/ to free up space. When
generating the ISO image we use the vmlinuz file from /boot/flatcar/
which also has the advantage that we only distribute a single vmlinuz
file with one particular checksum.
2021-07-28 20:59:16 +02:00
Jeremi Piotrowski
6ce5d3165f
build_library/toolchain_util: check CBUILD+CHOST for rust warning
For consistency with code further down in the file: aarch64 cross compilation only applies when CBUILD is x86,
for native aarch64 builds rust is guaranteed to have aarch64 rustlibs.
2021-07-28 16:47:13 +02:00
Kai Lüke
e4f811dd0d disk_layout: optimize btrfs filesystem overhead
The defaults already give more space than the ext4 defaults but it's
recommended to use the mixed mode for filesystems smaller than 1-5 GB.
Another aspect is the duplication of metadata and while it currently is
off it's actually related to the underlying block device and could
change as soon as the block device type changes.

Select the mixed mode that uses a merged area for data and metadata
blocks. Also ensure that no metadata duplication gets enabled
automatically.
2021-07-27 14:23:47 +02:00
Kai Lüke
bc97e15c3c disk_layout: use btrfs for the OEM partition
The compression feature of btrfs allows us to store more in the
size-limited /usr and OEM partitions. The size should of course still
be monitored to not bloat the image but more headroom helps to try
things out quickly without hitting the hard limit which fails the
build.
Use btrfs for the OEM partition but with zlib compression because
the outdated GRUB version doesn't support zstd yet.
New subvolumes currently can't be used for the OEM partition as default
subvolumes because GRUB tries to read the grub.cfg from the top
subvolume (at least with our old version). (We could however use
subvolumes for the /usr partition when switching to btrfs if that
makes any sense.)
2021-07-27 14:08:42 +02:00
Kai Lüke
d0cf1a4d19 disk_util: support compressed btrfs filesystems
The limited /usr and OEM partiton size is a challenge when adding new
packages or updating a package. Since the disk layout can't be changed
for compatibility reasons when updating an existing instance, we can't
simply try out something without ensuring first that enough space is
there by removing something else. This situation can be relaxed by
leveraging btrfs compression. There was some support for btrfs but it
was a bit outdated and didn't allow to configure compression or setting
read-only flags.
Fix the btrfs support, allow to mark the default subvolume as read only
and add a compression variable that allows to select a compression
algorithm. Instead of enabling compression by setting the mount option,
we can set the filesystem attribute which has the benefit that
compression is still used with the default mount options for this (top)
directory and its contents. While for the ext2 /usr partition a hack
existed to force read-only mode by modifying some bytes and checking
these bytes could also be used to know if read-only should be used to
prevent corruption of dm-verity data, we rather check directly whether
dm-verity is active for this partition and mount it read-only (and
with the norecovery option to really prevent any write attempt).
2021-07-27 14:08:42 +02:00
Jeremi Piotrowski
8e44a167d5
Merge pull request #133 from kinvolk/jepio/fix-arm64-devcontainer
disk_layout: devcontainer: use architecture agnostic part uuid
2021-07-22 22:10:29 +02:00
Jeremi Piotrowski
4ba3218d6a boostrap_sdk: only build aarch64 cross-rust on x86 hosts
The rust ebuild has some magic to detect cross-toolchains present on the
system and enable building additional cross targets. The code to trigger
the rebuild of rust is part of install_cross_rust, and checks whether
the cross directories exist in the rust installation. If they don't,
then rust is removed and rebuilt to allow for the auto-detection to
happen.

Right now there are two issues with the code. Firstly, the path that is
checked is wrong, which leads to rust always being removed and rebuilt.
The path checked is /usr/lib/rust-*/rustlib but /usr/lib/rustlib is
where the files are installed.

The second issue is that it checks for aarch64 dirs when CHOST is
aarch64-cros-linux-gnu. However, on an aarch64 host the aarch64 dirs
will already exist from building the sdk itself. The rust ebuild is not
ready to handle aarch64 hosts yet and blows up. The correct behavior is
to combine the check for CHOST with a check for the right CBUILD.

On an aarch64 host we should presumably check for the x86 CHOST and rust
dirs, but that can be added later, because it needs more work.

Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
2021-07-19 15:11:12 +00:00
Jeremi Piotrowski
e4f57bea82 bootstrap_sdk: fix issues around lib->lib64 symlink
The arm64 profiles don't specify SYMLINK_LIB=yes, which makes sense
since arm64 systems don't support multilib in the way that we are used
to from x86. What this means is that build artifacts are installed into
separate lib and lib64 directories. The root overlay installed in stage4
needs to check for SYMLINK_LIB before trying to create a symlink,
otherwise it fails to be applied because it collides with the directory
in the rootfs.

This uncovered a second minor issues - the rust toolchain bootstrap
scripts checked for /usr/lib64/rust*, but the ebuild installs to
/usr/lib/rust.

Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
2021-07-19 15:11:09 +00:00
Jeremi Piotrowski
911da26072 disk_layout: devcontainer: use architecture agnostic part uuid
The previously used uuid 4f68bce3-e8cd-4db1-96e7-fbcaf984b709 is valid
for x86_64 root partitions, which resulted in the dev container not
working with systemd-nspawn on aarch64. systemd-nspawn fails with:

  No suitable root partition found in image

Change the partition uuid to the architecture agnostic one documented
in the man page:

  A GUID partition table (GPT) with a single partition of type 0fc63daf-8483-4772-8e79-3d69d8477de4.

This makes systemd-nspawn happy on aarch64.

Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
2021-07-16 15:35:18 +00:00
Mathieu Tortuyaux
35387cfdff
build_lib/qemu_tmpl: fix short-form warning
starting from qemu-6.0.0, options with short-form are deprecated.

```
$ ./flatcar_production_qemu.sh
qemu-system-x86_64: -fsdev local,id=conf,security_model=none,readonly,path=/tmp/flatcar-configdrive.gyqmdrQqfA: warning: short-form boolean option 'readonly' deprecated
Please use readonly=on instead
```

See this commit: ccd3b3b811

Signed-off-by: Mathieu Tortuyaux <mathieu@kinvolk.io>
2021-07-16 16:04:50 +02:00
Kai Lüke
177bea4a74 Generate test update payload and run the kola update test
The kola update tests need a dev-key-signed update payload. This was
lacking and caused the update tests to be skipped.
Generate the test update payload for both dev builds and release builds
and run the kola tests for both. The test update payload has a special
name to not confuse it with the real update payload for releases, and
we keep the previous behavior to sign releases. Therefore, the
generate_update function wasn't used but the extract_update function
extended with generating the additional test payload.
2021-07-12 18:49:54 +02:00
Thilo Fromm
d1e2f6d1f2 catalyst_toolchains: don't touch the SDK
This change removes 8 years old code from the toolchains build which
tries to update SDK libraries for unknown reasons, breaking the
toolchains build in the glibc-2.33 update.

Signed-off-by: Thilo Fromm <thilo@kinvolk.io>
2021-06-25 10:37:21 +02:00
Krzesimir Nowak
3cf5d83056
Merge pull request #121 from kinvolk/krnowak/jobs-be-gone
Drop `--jobs` parameter
2021-05-05 19:25:20 +02:00
Thilo Fromm
12d59f88e0 build_library/catalyst_sdk.sh: save snapshot of coreos-overlay
This change to stage 4 of the SDK bootstrap process will keep a
snapshot of coreos-overlay in the SDK tarball. This snapshot can be
used in future SDK bootstraps' stage1 to ensure a clean stage 1 output
without any package updates.

Signed-off-by: Thilo Fromm <thilo@kinvolk.io>
2021-03-04 18:59:13 +01:00
Thilo Fromm
84d7bf63b1 bootstrap_sdk: no package updates in stage 1
This change updates the stage1 SDK bootstrap build to use local
("known good") package ebuilds only, preventing updated package ebuilds
to apply in stage 1. This fixes SDK build breakage we observed when
upgrading core libraries like readline.

The change also removes the seed update from stage 1 as it should not
be needed anymore now that we postpone any package updates to stage 2.

The following package ebuild repos are used for stage 1:
- for portage-stable, we simply copy /var/gentoo/repos/gentoo
   from the SDK root.
- coreos-overlay is more complicated since ebuilds are missing from
   the SDK. So we grok the version the SDK was built with from
     /mnt/host/source/.repo/manifests/default.xml
   and then we create a local stage 1 clone of
     https://github.com/kinvolk/coreos-overlay.git
   in which we then check out the revision noted in the default mnifest.

Signed-off-by: Thilo Fromm <thilo@kinvolk.io>
2021-03-03 17:32:38 +01:00
Krzesimir Nowak
6ed7cd66d5 *: Drop jobs parameter
The `--jobs` parameter that some scripts defined was not used anywhere
in jenkins or mantle. So the value of the parameter always ended up
being equal to `${NUM_JOBS}` set by `common.sh`. Also, even if the
`--jobs` parameter was used for some script, that script usually
didn't forward the jobs value to other scripts, so the other scripts
ended up using `${NUM_JOBS}` again. Also, the `${FLAGS_jobs}` variable
was used by some functions in the build library, and those functions
were sometimes invoked by scripts that didn't define the
`${FLAGS_jobs}` variable. It is tedious to track which script should
actually define the parameter, and where it should be forwarded.

Just get rid of this half-working pretense. If you want to affect how
many jobs `emerge` uses, export the `NUM_JOBS` environment variable
before calling any script.

For `EMERGE_FLAGS` and `REBUILD_FLAGS` we unconditionally specify the
`--jobs` flag's value to `${NUM_JOBS}` because they are passed to
`emerge`. On the other hand we drop the `--jobs` parameter from the
`UPDATE_ARGS` variable, because this variable passed to `setup_board`
or `update_chroot`, which don't have this flag any more.
2021-02-17 13:26:36 +01:00
Krzesimir Nowak
9cbf3049ea vm_image-util: Forward jobs parameter to build_oem_aci 2021-02-16 08:36:57 +01:00
Krzesimir Nowak
647690e264 build_library/check_root: Port to python3
The script needs to be ported, because it is importing portage code
which became python3 only.

The porting I did is likely a lousy job, but at least it stopped
failing with some p(yt)hony errors.
2021-02-12 10:03:16 +01:00
Krzesimir Nowak
0e41ffc336 build_library/catalyst.sh: Fix paths to ebuild repos
I have no idea how this thing worked before - the repos never were in
/usr/portage nor in /usr/local/portage… But the newer version of
portage seems to be pretty picky about the validity of repos location,
so fix them.
2021-02-03 16:47:59 +01:00
Margarita Manterola
ad8204af82 vm_image_util: Use new aws_pro flag for ec2-compat 2021-01-22 11:57:52 +01:00
Kai Lüke
bd34d059f3 Fall back to source repository license files if not in portage
When a license file is newly added, portage may not yet have it in the
shared folder and the license inclusion step fails.
Fall back to the source repositories and look for the license file
there, too. Print a warning if not found instead of failing to build.
2021-01-20 17:03:05 +01:00
Krzesimir Nowak
45d3a0d9a9 build_library: Fix git URLs
The repos were moved to kinvolk. Redirects still work, but it's better
not to rely on them.
2021-01-19 17:31:17 +01:00
Margarita Manterola
cf7f4bd4a4 Add GCE Pro OEM type 2020-12-22 13:52:52 +01:00
Vincent Batts
d46b95ba29
Merge pull request #91 from kinvolk/vbatts/arm
qemu_template: use more cpus for ARM if available
2020-12-15 08:29:10 -05:00
Kai Lüke
ef631cd7af
Merge pull request #106 from kinvolk/kai/aws-pro
Add AWS Pro OEM type
2020-12-15 11:14:25 +01:00
Sayan Chowdhury
95f05a9ad6
dev_container_util.sh: Use the shflags group instead of the default flag
The build_image script invokes the create_dev_container function, and
passes the `FLAGS_group` as param. Use the param, to generate the
binhost URL instead of using the DEFAULT_GROUP which stays as developer
always.

Fixes: kinvolk/Flatcar#298
Signed-off-by: Sayan Chowdhury <sayan@kinvolk.io>
2020-12-14 19:30:08 +05:30
Kai Lüke
f84ca169e5 Add AWS Pro OEM type
This is the initial creation of an AWS Pro image coming with support,
and features added on top of it.
2020-12-09 16:38:28 +01:00
Sayan Chowdhury
9e2098bfff
Update the azure pro package reference to the oem-azure-pro
This commit also fixes the BINHOST URL for the for the developer
container portage

Signed-off-by: Sayan Chowdhury <sayan@kinvolk.io>
2020-11-25 14:42:56 +05:30
Thilo Fromm
81d4ed8940
Merge pull request #102 from kinvolk/t-lo/build_packages-fix-symlink-run-gcc-config
build_packages, build_image_util.sh: fix up liblto symlink
2020-11-18 14:42:21 +01:00
Thilo Fromm
22b08b0ae4 build_packages, build_image_util.sh: fix up liblto symlink
Signed-off-by: Thilo Fromm <thilo@kinvolk.io>
2020-11-16 19:06:59 +01:00
Dongsu Park
6eae505f16 build_library: Ignore broken symlink in Kernel source tree
Kernel source tree started to have a broken link
`tools/testing/selftests/powerpc/copyloops/memcpy_mcsafe_64.S`.
Especially in case of Kernel 5.8.18, like:

```
broken link: /usr/src/linux-5.8.18-coreos/tools/testing/selftests/powerpc/copyloops/memcpy_mcsafe_64.S
ERROR   build_packages: test_image_content: Failed symlink check
```

Ignore the symlink when checking broken symlinks.
2020-11-13 17:27:49 +01:00
Dongsu Park
829cec45e8 jenkins: do not configure ccache variables
Setting the invalid CCACHE_ variables resulted in strange failure
in projects depending on meson, newer version like 0.55.3. For example
systemd build fails like the following errors:

```
 * ACCESS DENIED:  utimes:       /mnt/host/source/ccache
 * ACCESS DENIED:  utimes:       /mnt/host/source/ccache

F: utimes
S: deny
P: /mnt/host/source/ccache
A: /mnt/host/source/ccache
R: /mnt/host/source/ccache
C: ccache cc /build/amd64-usr/var/tmp/portage/sys-apps/systemd-246/work/systemd-246-abi_x86_64.amd64/meson-private/sanitycheckc.c -o /build/amd64-usr/var/tmp/portage/sys-apps/systemd-246/work/systemd-246-abi_x86_64.amd64/meson-private/sanitycheckc.exe -O1 -pipe -pipe -D_FILE_OFFSET_BITS=64
```

We should not set up ccache at all, as it has been already disabled in
coreos-overlay repo.
2020-10-26 15:38:57 +01:00
Sayan Chowdhury
8799028007
Add OEM package for QEMU
Signed-off-by: Sayan Chowdhury <sayan@kinvolk.io>
2020-10-08 11:51:24 +05:30
Sayan Chowdhury
9953cc8c8f
build_library: Rename the images to use pro instead of premium
Signed-off-by: Sayan Chowdhury <sayan@kinvolk.io>
2020-09-21 20:31:41 +05:30
Sayan Chowdhury
e66c89ef31
Merge pull request #93 from flatcar-linux/sayan/azure-seperate-build
Add Azure OEM and selective private upload
2020-09-21 19:55:23 +05:30
Sayan Chowdhury
cc147a1255
Add the new OEM type, and selective upload azure as private
Signed-off-by: Sayan Chowdhury <sayan@kinvolk.io>
2020-09-19 18:58:12 +05:30
Vincent Batts
ed7de96c1f
qemu_template: shell lint and update
Signed-off-by: Vincent Batts <vbatts@kinvolk.io>
2020-09-16 10:30:07 -04:00
Vincent Batts
a97df50696
qemu_template: use more cpus for ARM if available
But don't hog all `VM_NCPUS`, as we are still emulating them

Signed-off-by: Vincent Batts <vbatts@kinvolk.io>
2020-09-15 17:39:35 -04:00
Marga Manterola
c832af024e grub.cfg: Stop probing for UUID 0x01 2020-08-04 11:45:29 +02:00
Kai Lüke
cfdb7b0ab7
build_library/toolchain_util.sh: Remove old download code for Rust
The SDK now includes a Rust version with the aarch64 cross-compilation
libraries and the toolchain job doesn't build it anymore. Yet it was
still recompiled because the path had changed.
Remove the adjustment of the download URL and any automatic building
of Rust. Just issue a warning so that any problem can be spotted easily.
This change does not affect the SDK bootstrapping (full or just stage4)
but affects ./build_packages and the toolchains job. For the toolchains
job the crossdev setup is missing anyway and rebuilding wouldn't help
but only downloading, yet since in stage4 there are no binary package
URLs at all, it's best to remove this step and if it is needed later,
the warning will help.
2020-07-31 22:54:53 +02:00
Kai Lüke
c016b581b4
build_library/catalyst.sh: Specify which gcc package to rebuild
The default update seed command does only specify gcc which leads to
an error because »The short ebuild name "gcc" is ambiguous«.
Choose the standard package name instead of the cross compiler packages
which are only known to emerge because we build them as part of an SDK
release now.
2020-07-27 20:31:17 +02:00
Kai Lüke
6754d2d979
build_library/template_vmware.ovf: Newer OS type and hardware version
The VM hardware and OS type versions were outdated and resulted in
features not being available by default.
Choose a newer ESXi host version (requires 6.5) and set the guest
OS type to Linux 3.x 64 bit.
2020-07-09 12:19:23 +02:00
Marga Manterola
e04156a0f1
bootstrap_sdk: build and upload SDK toolchain pkgs
Before, we were relying on the toolchains job to build and upload
packages that were part of the SDK. With this change, all packages that
should be part of the SDK are built and uploaded by the SDK job. The
toolchains job only builds toolchain packages specific for the release.

This change includes several adjustments done to both the SDK and the
toolchains jobs to make this work:
 * Make the SDK job build all cross toolchains, including Rust
 * Stop building Rust in the toolchains job and use the one in the SDK
   instead.
 * In toolchain_util.sh: detect when the symlink folder for crossdev
   packages is missing and run crossdev to create it during
   update_chroot setup.
 * Make it possible to build the SDK starting from stage 4 instead of
   stage 1, to make the SDK building faster for PR branches / nightlies
   (full build should still be done for releases / weeklies).
2020-06-29 15:18:55 +05:30
Dongsu Park
4e109a49cf
Merge pull request #72 from flatcar-linux/dongsu/catalyst-rust-alpha
build_library/catalyst: Update virtual/rust during catalyst stage1 for alpha
2020-06-18 12:06:50 +02:00
Kai Lüke
3dadf125c8
Filter out unicode characters in package content list
For some unicode characters in ca-certificates file names "rev" complains
about an "invalid or incomplete multibyte or wide character"
and gives no output.
Filter out any unexpected characters for "rev" and replace them with "?"
so that "ls some?name" will still resolve the original name.
2020-06-11 18:00:12 +02:00
Dongsu Park
b13976285e build_library: deal with both virtual/rust and dev-lang/rust
Toolchain utils have installed only `dev-lang/rust`. It could result
in version mismatch between `virtual/rust` and `dev-lang/rust`, because
`dev-lang/rust` does not automatically pull in `virtual/rust`.

So install `virtual/rust` instead of `dev-lang/rust`.
2020-06-10 20:30:22 +02:00
Dongsu Park
8047522874 build_library/catalyst: Update virtual/rust during catalyst stage1
Install `virtual/rust` to avoid version conflicts that happen in case of
rust versions in the SDK being different from those in the new ebuilds.

`/usr/share/catalyst/targets/stage1/stage1-chroot.sh` installs gcc and
its dependencies, including `dev-lang/rust`, while `virtual/rust` does
not get updated. That results in version conflicts between
`virtual/rust` and `dev-lang/rust`. To avoid such an issue, we should
update also `virtual/rust` when building stage1. Since `virtual/rust`
automatically pulls in `dev-lang/rust`, we do not need to explicitly
specify `dev-lang/rust` here.
2020-06-10 20:28:40 +02:00
Kai Lüke
c7ad59e28c
build_library: Enhance license info and store it on the image
The license JSON file did only include the package names but not
any other metadata. Also since the file was not on the image itself,
it had to be downloaded.
Add more metadata to the license JSON and store it on the image.
2020-06-09 21:09:44 +02:00
Benjamin Gilbert
1c0da3c910
test_image_content: whitelist OpenSSL GLSA
We updated to 1.0.2u instead of 1.1.1g.
2020-05-22 15:30:54 +02:00
Benjamin Gilbert
42a45ac727
test_image_content: whitelist some GLSAs
Git was fixed by updating to 2.23.3, not 2.26.2.  Python and QEMU are
only in the SDK.
2020-05-22 15:30:48 +02:00
Benjamin Gilbert
df718abc57
test_image_content: whitelist some GLSAs
systemd and sudo are already fixed.  Git was fixed by updating to 2.23.2,
not 2.24.1.  Samba is 2 years old and customized, thus difficult to update.
file, Python, and gdb are only in the SDK.
2020-05-22 15:30:30 +02:00
Kai Lüke
15681e1d77
Support the /boot/coreos/first_boot flag file
If a user or old software creates the flag file on the old CoreOS location,
nothing would happen.
Check the old location, too, so that Ignition is rerun.
2020-05-22 15:22:46 +02:00
Kai Lüke
76abe2e8c5
set_lsb_release: update codename 2020-05-18 12:22:51 +02:00
Thilo Fromm
56341ea725 qemu_template.sh: update naming CoreOS -> Flatcar 2020-05-15 15:25:27 +02:00
Kai Lüke
06c4894f71
SDK: Take environment variable to specify SDK location
The dev build SDKs are not in $FLATCAR_DEV_BUILDS/sdk but published under
$FLATCAR_DEV_BUILDS/developer/sdk.
Add an environment variable to specify where the SDK is to be found
but default to $FLATCAR_DEV_BUILDS/sdk if it is not specified.
From Jenkins this variable is exported as DOWNLOAD_ROOT_SDK.
2020-05-14 16:03:15 +02:00
Kai Lüke
74f04c59f7
Reuse correct binary packages for a Flatcar version
Two Flatcar versions were used in /etc/portage/make.conf both in the SDK
and in the boards.
Use only a single version by default to get the expected results and not
something else when using binary packages.

The Rust crossdev package was never uploaded to /sdk/ and always
had to be compiled again.
Upload it in a separate toolchain-arm64 directory because /Packages in /crossdev/
doesn't refer to the Rust package and its use flags.
2020-05-11 15:45:21 +02:00
Kai Lüke
d1fb202fe2
build_library/dev_container_util.sh: Use correct BINHOST URLs
The BINHOST was still configured to be the CoreOS CL upstream location
which does not work for independent Flatcar CL releases. This broke
binary package installation in the development container.
Use the correct BINHOST to fix installation of binary packages in the
development container.
2020-05-04 13:17:59 +02:00
Kai Lüke
aebba12996
build_library/template_vmware.ovf: Document and add cloud-init OVF vars
The configuration variables for the Ignition configuration also serve as
data source for coreos-cloudinit config data (which includes plain scripts).
Document them properly and also call out that the networking variables only
work if coreos-cloudinit data is used.
For some use cases, too few networking variables were available. Add secondary
routing variables for the main network interface and add a second interface.
2020-04-27 13:48:10 +02:00
Kai Lüke
42cf3423d4
build_library/template_vmware.ovf: Remove old CoreOS OVF variables
There was a logical mistake in Ignition that caused ignition.config.*
only to work when it was part of the ovfenv. Thus they were added but
the old CoreOS variables marked deprecated and kept. With both as OVF
variables each of them worked but directly specifying ignition.config.*
as guest variable still didn't because of the logical mistake.
Now there is a fix and both work well when specified directly as guest
variable (https://github.com/flatcar-linux/ignition/pull/11).
Delete the old CoreOS OVF variables because they just clutter the UI
and only the Ignition variables should be used in the UI.
2020-04-17 17:05:02 +02:00
Kai Lüke
687bbefad8
build_library/vm_image_util.sh: Generate iPXE script
Write out an iPXE script file for Packet.
The script uses relative URLs to refer to
the other PXE files and thus can be copied
along with the files to any server.
This is useful because it saves the creation
of an iPXE script for a release/channel on a
third-party service. For CI testing it is
also helpful because the script does not only
end up on the release server but also already
on the Google buckets, refering to unpublished
PXE payloads.
2020-03-18 16:09:40 +01:00
Kai Lüke
f9c8feb09c
build_library/template_vmware.ovf: Use Ignition OVF vars
For the Ignition variables to be usable they need to be
specified in the OVF.
Call out that the CoreOS variables are deprecated to
reduce confusion when both are displayed besides each other.
2020-03-10 13:18:36 +01:00
Kai Lüke
1bf2bba4bf
build_library/dev_container_util.sh: Correct repo URLs
Same content as in flatcar-build-2387.
2020-02-19 14:12:02 +01:00
Kai Lüke
42068f1cbc
build_image: Add prodtar command to build a tar ball
Create a tar ball with the contents of the / and /usr partitions
to be used as follows with systemd-nspawn (via machinectl):
  machinectl import-tar flatcar-container.tar.gz flatcar-container
  machinectl start flatcar-container
  machinectl shell flatcar-container
or with docker by converting it to an OCI image:
  docker import -c "CMD /bin/bash" flatcar-container.tar.gz flatcar-container

Since the new "prodtar" command relies on the results of the "prod" command,
it bundles it so that "prod prodtar" and "prodtar" is the same.
2020-02-07 17:33:37 +01:00
Kai Lüke
1a1fcadf0a
Use same APPID for arm64 and amd64
Nebraska supports an additional arch
variable to distinguish both boards.
2020-01-22 10:50:25 +01:00
Andrew Jeddeloh
15745d520e
disk_util: retry loopback mounts if they fail
This fails frequently but should succeed if retried. This should reduce
failed builds.
2020-01-21 13:29:45 +01:00
Andrew Jeddeloh
00d77d199a
build_library/disk_util: work around losetup bug
Retry losetup if it fails, up to 5 times with 5 seconds between retries.
2020-01-21 13:29:30 +01:00
Flatcar Buildbot
8ac3182bc3 2345.0.1 2019-12-05 09:01:56 +01:00
Flatcar Buildbot
c7bbb2b1e2 2345.0.0 2019-12-04 14:59:11 +01:00
Flatcar Buildbot
7ee9c9c033 2331.0.0 2019-11-22 14:34:26 +01:00
Flatcar Buildbot
1dad511f69 2317.0.1 2019-11-07 19:40:01 +01:00
Benjamin Gilbert
bd79eaf9d1 test_image_content: whitelist Perl and dbus GLSAs
Backported the dbus GLSA.  Ignoring the Perl one.
2019-09-10 21:47:55 -04:00
Benjamin Gilbert
97e61a164b test_image_content: whitelist polkit GLSA
Both CVE fixes were backported.
2019-08-24 01:28:29 -04:00
David Michael
9b863fa7ae Revert "build_library: Add temporary workaround for binutils update"
This reverts commit faf07f1b8f.
2019-08-08 15:53:06 +00:00
David Michael
faf07f1b8f build_library: Add temporary workaround for binutils update
Revert this after the new binutils is built into the SDK.
2019-08-03 16:24:27 +00:00
Andrew Jeddeloh
006fe8765d disk_layout: bump dev container from 3 to 4GB
Builds are beginning to run out of space with 3GB. Bump to 4GB.
2019-06-11 21:39:02 +00:00
David Michael
2791e33eb5 Revert "catalyst: Temporarily disable update_seed again"
This reverts commit a85cb08443.
2019-05-02 03:23:07 +00:00
David Michael
a85cb08443 catalyst: Temporarily disable update_seed again
The glib security update blocks itself.  Disable this until a new
SDK is generated, then it can be reverted again.
2019-04-23 03:29:09 +00:00
David Michael
3254c63690 build_library: Drop whitelisted systemd GLSA
This no longer matches since upgrading to 241.
2019-03-12 16:29:48 +00:00
David Michael
4bd4cd5a8e disk_util: Add -I for mkfs.vfat
When loop device partition nodes aren't cleaned up, building images
will fail with:

mkfs.vfat: Partitions or virtual mappings on device '/dev/loop0', not making filesystem (use -I to override)

Just add the flag unconditionally to work around it.
2019-02-10 02:44:01 +00:00
David Michael
cea88d9c52 Revert "catalyst: Temporarily disable update_seed again"
This reverts commit 7d99b4dbdd.
2019-01-28 15:58:47 +00:00
David Michael
06cbc02e0c check_root: Silence libperl warnings 2019-01-25 21:52:27 +00:00
David Michael
7d99b4dbdd catalyst: Temporarily disable update_seed again
The Perl update will break SDK bootstrapping during seed update, so
disable it again.  This can be reverted after bumping the SDK to a
version that includes the new Perl.
2019-01-25 18:12:55 +00:00
David Michael
7b7c78b592 build_library: Drop old workarounds for toolchain binpkgs 2019-01-24 23:25:51 +00:00
David Michael
45c9ef7867 build_library: Drop whitelisted Go GLSAs
Since Go is no longer cross-compiled, it won't hit the boards' GLSA
tests anymore.
2018-12-21 16:27:55 +00:00
David Michael
e1761bee54 Revert "catalyst: Temporarily disable update_seed again"
This reverts commit 373d5a814b.
2018-11-16 14:11:00 +00:00
David Michael
103c7425fe build_library: Whitelist the systemd GLSA until we have 239 2018-11-01 14:45:21 +00:00
David Michael
373d5a814b catalyst: Temporarily disable update_seed again
This works around the edk2 rename breaking SDK bootstrapping.  It
can be reverted when an SDK has the new version built into it.
2018-10-25 17:08:02 -04:00
David Michael
f9432f6702 vm_image_util: Switch back to edk2-ovmf paths
The custom sys-firmware/edk2 package has been replaced by Gentoo's
sys-firmware/edk2-ovmf package now that only amd64 is supported.

This partially reverts 1761d9d071 .
2018-10-25 17:15:03 +00:00
David Michael
2467923d56 Remove arm64 from supported board operations 2018-10-25 16:00:09 +00:00
David Michael
a598864413 catalyst: Update sharedir for catalyst 3 2018-10-19 12:12:46 -04:00
David Michael
23c5b018c6 prod_image_util: Drop /usr/include
This should be covered by INSTALL_MASK, but it apparently gets
confused by a symlink loop installed by json-c.  Remove it here.
2018-10-18 16:32:32 +00:00