4426 Commits

Author SHA1 Message Date
Kai Lüke
c26008f082
Merge pull request #79 from flatcar-linux/scripts
common: Support reading the package URL env vars from version.txt by pothos
2020-07-14 21:52:23 +02:00
Kai Lüke
12aaffbc6d
common: Support reading the package URL env vars from version.txt
The environment variables FLATCAR_DEV_BUILDS and FLATCAR_DEV_BUILDS_SDK
define where the base URL for the binary package store of the board
packages and the SDK packages. To set it, they were either exported in
the chroot or passed each time as parameter but this was only available
for the SDK packages in the tricky order
"update_chroot --dev_builds_sdk URL" (or --binhost) and then
"./build_packages --skip_chroot_upgrade".
The defining information for binary package URL comes from version.txt
but it lacks the base URL for a convenient use. Add the base URLs for
SDK and board packages there to be able to get binary packages without
manual tricks and errors. Any changes to
~/trunk/.repo/manifests/version.txt will directly be picked up
from ./build_packages and friends to set the correct URLs in
/etc/portage/make.conf and /build/BOARD/etc/portage/make.conf
so that even a manual "emerge(-BOARD) --usepkg --getbinpkg" uses them.
A helper script "./set_version" is provided to ease modifying
~/trunk/.repo/manifests/version.txt by resolving the latest nightly
version.
Later this functionality can also be used to simplify the Jenkins code
which currently sets these variables (but the special case of the
Release Base download being different from the upload holds).
2020-07-14 21:52:22 +02:00
Kai Lüke
6b61542ed2
Merge pull request #78 from flatcar-linux/scripts
build_library/template_vmware.ovf: Newer OS type and hardware version by pothos
2020-07-09 12:20:46 +02:00
Kai Lüke
0c05c72881
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:20:46 +02:00
Marga Manterola
fcbe088636 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:28 +02:00
Dongsu Park
c9c8f5d1fb 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-18 12:08:08 +02:00
Dongsu Park
2576153f00 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-18 12:08:02 +02:00
Kai Lüke
1f069ea1f1
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:35 +02:00
Kai Lüke
fdae7286d8
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:10:24 +02:00
shredgar
77ee9eb080
Update create-coreos-vdi - grammar change
Fixed a grammar based line at `Line 47`:
`echo "$0: Target path (${DEST}) do not exists." >&2` -> `echo "$0: Target path (${DEST}) does not exist." >&2`
2020-06-05 12:13:06 +02:00
Benjamin Gilbert
236bb05da1
test_image_content: whitelist OpenSSL GLSA
We updated to 1.0.2u instead of 1.1.1g.
2020-05-22 15:31:26 +02:00
Benjamin Gilbert
4e356f6e01
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:31:26 +02:00
Benjamin Gilbert
e3f7cb9b3b
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:31:26 +02:00
Kai Lüke
11a71a010c
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:23:15 +02:00
Kai Lüke
697ba0d54b
set_lsb_release: update codename 2020-05-18 12:23:23 +02:00
Thilo Fromm
e4360529a8 qemu_template.sh: update naming CoreOS -> Flatcar 2020-05-15 15:25:50 +02:00
Kai Lüke
513a5b7c58
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:55 +02:00
Kai Lüke
95ec4d1ddb
build_toolchains: Fix upload path for toolchain-arm64 package
The Rust arm64 crossdev toolchain package was uploaded to
toolchain-arm64/rust… instead of toolchain-arm64/dev-lang/rust….
Upload the complete dev-lang folder as only Rust will be fetched
from there anyway.
2020-05-14 14:26:34 +02:00
Kai Lüke
8515369a53
build_packages: Add flag to ignore some binary packages
When the ebuild file changed but not its version nor its cross-workon
commit, the binary package would be used. Also some dependencies are not
encoded to trigger a rebuild of depending packages.
Allow to exclude some binary packages so that we can be sure that they
are rebuilt.
2020-05-11 16:27:28 +02:00
Kai Lüke
897f92d7cd
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:46:48 +02:00
Vincent Batts
31330a576d README: point to the current flatcar docs
Signed-off-by: Vincent Batts <vbatts@kinvolk.io>
2020-05-11 12:31:13 +02:00
Marga Manterola
bc1a778d33 Fix typo 2020-05-11 12:29:23 +02:00
Kai Lüke
c09d4ffa40
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:20:38 +02:00
Kai Lüke
8562d9c19f
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:55 +02:00
Kai Lüke
95000a04cc
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:06:17 +02:00
Kai Lüke
6ef1a2706e
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:58 +01:00
Kai Lüke
207a312a1b
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:58 +01:00
Kai Lüke
ff61ba8894
jenkins/images.sh: Generate production tar ball 2020-02-07 17:32:36 +01:00
Kai Lüke
1ba559fc70
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:32:27 +01:00
Dongsu Park
bc549e245d Merge branch 'flatcar-master' into flatcar-master-edge 2020-01-23 16:30:29 +01:00
Dongsu Park
5dc473a36e
Merge pull request #50 from flatcar-linux/dongsu/dev-container-fix-url
build_library: fix sync URI under Gentoo env for developer containers
2020-01-23 16:15:44 +01:00
Dongsu Park
fc835de3aa build_library: fix sync URI under Gentoo env for developer containers
When running `emerge-gitclone` in a developer container, it still
tries to fetch from coreos repos. We should make it fetch from
flatcar-linux repos.
2020-01-22 16:31:00 +01:00
Kai Lüke
1adf4039fb
Merge pull request #47 from flatcar-linux/kai/same-appid-for-arm
Use same APPID for arm64 and amd64
2020-01-22 11:30:51 +01:00
Kai Lüke
260329b417
Merge pull request #48 from flatcar-linux/kai/same-appid-for-arm-edge
Use same APPID for arm64 and amd64
2020-01-22 11:30:41 +01:00
Kai Lüke
fd414d540a
Use same APPID for arm64 and amd64
Nebraska supports an additional arch
variable to distinguish both boards.
2020-01-22 10:48:41 +01:00
Kai Lüke
4f9514139c
Use same APPID for arm64 and amd64
Nebraska supports an additional arch
variable to distinguish both boards.
2020-01-22 10:42:12 +01:00
Kai Lüke
05b7b3c605
Merge pull request #45 from flatcar-linux/kai/update-edge
Merge flatcar-master to -edge
2020-01-21 13:27:31 +01:00
Andrew Jeddeloh
875e379443
disk_util: retry loopback mounts if they fail
This fails frequently but should succeed if retried. This should reduce
failed builds.
2020-01-21 12:38:08 +01:00
Andrew Jeddeloh
1cbacf8076
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 12:38:08 +01:00
Benjamin Gilbert
64f70c3f20
test_image_content: whitelist OpenSSH GLSA
It only affects a default-disabled USE flag, and our overlay ebuild is too
old to even support it.
2020-01-21 12:38:07 +01:00
Kai Lüke
88adcbd27c
Merge pull request #43 from flatcar-linux/master
Merge upstream
2020-01-15 15:23:01 +01:00
Dongsu Park
124ce9e911
Merge pull request #36 from flatcar-linux/dongsu/gpt-type-flatcar-edge
build_library: replace coreos with flatcar in disk layout for edge
2019-12-18 16:13:58 +01:00
Andrew Jeddeloh
7bebaa7404
Merge pull request #888 from ajeddeloh/fix-losetup
disk_util: retry loopback mounts if they fail
2019-12-17 14:58:55 -08:00
Andrew Jeddeloh
c0ed59f902 disk_util: retry loopback mounts if they fail
This fails frequently but should succeed if retried. This should reduce
failed builds.
2019-12-17 17:17:21 +00:00
Andrew Jeddeloh
115790bc9c
Merge pull request #885 from ajeddeloh/workaround-losetup
build_library/disk_util: work around losetup bug
2019-12-13 11:34:34 -08:00
Dongsu Park
e362b1639d jenkins: add ami_vmdk to format list for ARM
The `image-matrix.groovy` script reads the list of image formats for ARM,
from `formats-arm64-usr.txt`
So we need to also add ami_vmdk to the list to publish AWS ARM images.
2019-12-13 16:26:39 +01:00
Dongsu Park
dfbee41ef6
Merge pull request #37 from flatcar-linux/dongsu/ami-format-list-arm64
jenkins: add ami_vmdk to format list for ARM
2019-12-13 16:25:16 +01:00
Andrew Jeddeloh
37da2494a2 build_library/disk_util: work around losetup bug
Retry losetup if it fails, up to 5 times with 5 seconds between retries.
2019-12-13 00:15:49 +00:00
Dongsu Park
eb1decdb9e jenkins: add ami_vmdk to format list for ARM
The `image-matrix.groovy` script reads the list of image formats for ARM,
from `formats-arm64-usr.txt`
So we need to also add ami_vmdk to the list to publish AWS ARM images.
2019-12-12 14:12:55 +01:00
Dongsu Park
2cd7b3b051 build_library: replace coreos-usr with flatcar-usr in disk_util
The disk_util also needs an update for the GPT type string.
2019-12-10 15:40:17 +01:00