Commit Graph

4592 Commits

Author SHA1 Message Date
Kai Lüke
8aab1d6d5a jenkins/vm: expect a FORMATS parameter which has a list of formats
One Jenkins jobs for each image format caused a large overhead.
Allow to build multiple image formats in one job.
2021-02-18 13:42:15 +01:00
Krzesimir Nowak
a6a6e0be2c common: Make sure that NUM_JOBS is a positive integer 2021-02-18 08:25:21 +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
Sayan Chowdhury
fcb58c6474
Merge pull request #120 from kinvolk/sayan/specify-num-jobs
image_to_vm.sh: Explicity mention the jobs param in image_to_vm step
2021-02-17 13:05:38 +05:30
Sayan Chowdhury
ee34c9d2e3
image_to_vm.sh: Explicity mention the jobs param in image_to_vm step
Now, in the oem aci creation step we make use of the jobs param.
Without this flag, an empty string is passed to to emerge which results
in failure.

Signed-off-by: Sayan Chowdhury <sayan.chowdhury2012@gmail.com>
2021-02-17 12:04:47 +05:30
Krzesimir Nowak
b1e730d0ed
Merge pull request #119 from kinvolk/krnowak/jobs-fix
Fix missing jobs parameter
2021-02-16 10:24:09 +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
1084f961fd build_*_aci: Add missing jobs parameter
They end up using emerge_to_image which needs uses the `$FLAGS_jobs`
parameter. Seems like new portage does not like getting the parameter
like `--jobs=` (with an empty value).
2021-02-16 08:31:11 +01:00
Krzesimir Nowak
91a85ddc86
Merge pull request #118 from kinvolk/krnowak/portage-update
portage update: port check_root to python3 and fix SDK bootstrap
2021-02-15 12:47:26 +01:00
Krzesimir Nowak
f09a648222 check_out_of_date: Add a TODO about porting it
The script is written in python2 and it imports portage code. Since
the portage is going to become a python3-only code, the script needs
porting to python3. It is not the high priority right now, because it
seems to be not used by other scripts or jenkins.
2021-02-12 10:03:16 +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
917d12cd7e bootstrap_sdk: The CONTENTS files are now gzipped
A newer version of catalyst seems to be actually gzipping the CONTENTS
files, so take this into accout.
2021-02-12 10:03:16 +01:00
Krzesimir Nowak
746ac38cfb
Merge pull request #112 from kinvolk/krnowak/break_dep_loop
Improve the dependency cycle breaking logic
2021-02-12 10:01:27 +01:00
Krzesimir Nowak
7f2a437f0a build_packages: Build all packages in the broken cycle
Previously we broke the cycle caused by sys-apps/util-linux only,
while disabling cryptsetup USE flag in systemd to avoid another
cycle. That worked before, because the follow-up merge of the rest of
packages built sys-fs/cryptsetup before sys-apps/systemd. After an
update, the new portage is ordering the builds in different way and
sys-apps/systemd ended up being built before sys-fs/cryptsetup and
that failed during the configure phase because of unmet dependencies.

Better build all the packages taking part in the loop (not counting
the virtual packages), so we become less reliant on the package build
ordering. It is going to take slightly more time as we build a couple
of packages more.
2021-02-09 07:44:22 +01:00
Krzesimir Nowak
d575ef441a build_packages: Build multiple packages in one go when breaking loops
Instead of rebuilding just one package and maybe rebuilding others as
a fallout, force rebuilding all the mentioned packages. This makes the
build process a bit more robust against package build ordering
changes.

May be useful when breaking multiple dep loops that have some common
packages, so we build them all once.
2021-02-09 07:44:22 +01:00
Krzesimir Nowak
85d6f05b1b
Merge pull request #117 from kinvolk/krnowak/bootstrap-sdk-refactor
bootstrap_sdk: Put image, contents and digests paths into variables
2021-02-05 14:02:26 +01:00
Krzesimir Nowak
11d1e10e3f bootstrap_sdk: Put image, contents and digests paths into variables
It makes it a bit easier to read and clearer what the script is doing
without all that repetition.
2021-02-05 08:27:34 +01:00
Dongsu Park
bb158261f5
Merge pull request #116 from kinvolk/dongsu/delete-docker-1.12
torcx: delete docker 1.12
2021-02-04 17:57:52 +01:00
Krzesimir Nowak
ea797c8df8
Merge pull request #115 from kinvolk/krnowak/move-root-overlay-var
bootstrap_sdk, build_toolchains: Move the ROOT_OVERLAY variable
2021-02-04 17:55:05 +01:00
Krzesimir Nowak
0c00fc99b7
Merge pull request #113 from kinvolk/krnowak/fix-catalyst-repo-paths
build_library/catalyst.sh: Fix paths to ebuild repos
2021-02-04 17:52:02 +01:00
Krzesimir Nowak
17c5038be1
Merge pull request #114 from kinvolk/krnowak/fix-setup-board
setup_board: Copy repos.conf earlier
2021-02-04 17:51:26 +01:00
Dongsu Park
ead20665b8 torcx: delete docker 1.12
Now that Docker 1.12 is gone, we need to also exclude docker 1.12
from the list of torcx stores.
2021-02-04 16:57:17 +01:00
Krzesimir Nowak
aab2cb5c77 bootstrap_sdk, build_toolchains: Move the ROOT_OVERLAY variable
ROOT_OVERLAY variable is defined in terms of TEMPDIR. The TEMPDIR
variable is set to an empty value by catalyst.sh, which the two
scripts import. So ROOT_OVERLAY always ended up being located in
toplevel directory (i.e. `/`). But the TEMPDIR variable gets a
meaningful value after calling the catalyst_init function, so define
the ROOT_OVERLAY after the function is called.
2021-02-03 17:16:02 +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
Krzesimir Nowak
fe07e45b65 setup_board: Copy repos.conf earlier
eselect calls "portage get_repo_path /build/amd64-usr coreos" at some
point. Before updating portage, portageq seemed to take all the
information not from /build/amd64-usr (which at the time contained no
repo information at all), but rather from /. The newer version of
portageq seems to respect the passed root now, so it actually tries to
consult the nonexistent repos configuration in /build/amd64-usr and
fails. To avoid the failure, perform the copying of the configuration
files earlier.
2021-01-25 16:12:31 +01:00
Marga Manterola
215583ff4d
Merge pull request #111 from kinvolk/marga-kinvolk/aws-pro
vm_image_util: Use new aws_pro flag for ec2-compat
2021-01-22 18:30:23 +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
934e4e28b9
Merge pull request #110 from kinvolk/kai/find-license
Fall back to source repository license files if not in portage
2021-01-20 18:26:16 +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
dac588de9e
Merge pull request #109 from kinvolk/krnowak/fix-urls
build_library: Fix git URLs
2021-01-19 17:56:49 +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
Marga Manterola
df660df80e
Merge pull request #108 from kinvolk/marga-kinvolk/gce-pro
Add GCE Pro OEM type
2021-01-04 11:59:44 +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
3ac8f6a5da
Merge pull request #107 from kinvolk/sayan/fix-dev-container-path
dev_container_util.sh: Use the shflags group instead of the default flag
2020-12-14 21:10:16 +05:30
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
bed73e2b2c
Merge pull request #103 from kinvolk/sayan/add-azure-gpu-support-on-main
Update the azure pro package reference to the oem-azure-pro
2020-11-25 19:39:28 +05:30
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
Dongsu Park
d4be1e865e
Merge pull request #101 from kinvolk/dongsu/fix-kernel-symlink-memcpy
build_library: Ignore broken symlink in Kernel source tree
2020-11-17 13:28:08 +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
5201aee4a3
Merge pull request #100 from flatcar-linux/dongsu/cleanup-ccache
jenkins: do not configure ccache variables
2020-10-26 23:30:44 +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
4ae32d068e
Merge pull request #99 from flatcar-linux/sayan/add-qemu-oem
Add OEM package for QEMU
2020-10-09 13:15:01 +05:30
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
86800378db
Merge pull request #96 from flatcar-linux/sayan/add-azure-pro
Add Azure Pro to the list of amd64 format list
2020-09-29 00:20:53 +05:30
Sayan Chowdhury
23c72c0a5c
Add Azure Pro to the list of amd64 format list
Signed-off-by: Sayan Chowdhury <sayan@kinvolk.io>
2020-09-28 23:09:36 +05:30