Commit Graph

4905 Commits

Author SHA1 Message Date
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
95ae4c90b7
Merge pull request #124 from kinvolk/t-lo/fix-sdk-bootstrap-part-2
bootstrap_sdk: use local SDK ebuilds for stage1 (part 2)
2021-04-23 16:24:21 +02:00
Thilo Fromm
11e862e2d5 jenkins/sdk.sh: add stage1 portage and overlay refs
Signed-off-by: Thilo Fromm <thilo@kinvolk.io>
2021-04-23 16:23:10 +02:00
Thilo Fromm
8877d7adcd bootstrap_sdk: use local SDK ebuilds for stage1
This change uses portage-stable and coreos-overlay from the local SDK
chroot (from /var/lib/gentoo/repos) in the stage 1 SDK bootstrap build.
This is part 2 of the SDK bootstrap stage 1 fix (part 1 is covered in
64d8a73ac0), which ensures stage 1 does
not introduce any changes in its ebuilds over the seed SDK.

The change also introduces an option to consciously divert from the
above enforcement by use of command line parameters:

--stage1_overlay_ref <gitref> will check out coreos-overlay and use
                                <gitref> for stage 1 instead of the
                                local SDK's
                                /var/lib/gentoo/repos/coreos-overlay

--stage1_portage_ref <gitref> will check out portage-stable and use
                                <gitref> for stage 1 instead of the
                                local SDK's
                                /var/lib/gentoo/repos/gentoo

Signed-off-by: Thilo Fromm <thilo@kinvolk.io>
2021-04-23 16:23:03 +02:00
Thilo Fromm
64d8a73ac0
Merge pull request #123 from kinvolk/t-lo/fix-sdk-bootstrap
Fix SDK bootstrap in bootstrap_sdk: no package updates in stage 1
2021-03-15 15:06:13 +01:00
Thilo Fromm
659d4bf484
bootstrap_sdk: fix typo in top-level stage1 description
Co-authored-by: Sayan Chowdhury <sayan@kinvolk.io>
2021-03-05 12:11:18 +01:00
Thilo Fromm
ac31f8ac9a
bootstrap_sdk: fix typo in bootstrap process description
Co-authored-by: Marga Manterola <62987181+marga-kinvolk@users.noreply.github.com>
2021-03-04 19:03:00 +01: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
319e3e702f bootstrap_sdk stage1: more comments, restructured for clarity
Signed-off-by: Thilo Fromm <thilo@kinvolk.io>
2021-03-04 18:07:54 +01:00
Thilo Fromm
9fd60f9ea2
Spelling fixes in comments
Co-authored-by: Krzesimir Nowak <krzesimir@kinvolk.io>
2021-03-04 11:33:30 +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
Kai Lüke
dd4a8e0335
Merge pull request #122 from kinvolk/kai/vm-matrix-reuse
jenkins/vm: expect a FORMATS parameter which has a list of formats
2021-02-19 15:14:24 +01:00
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