6245 Commits

Author SHA1 Message Date
Kai Lüke
8f994d6963 sys-apps/baselayout: Work around systemd-tmpfiles not finding libidn2
The baselayout ebuild file calls systemd-tmpfiles but despite that
the systemd ebuild file depends on libidn2 through a use flag, it was
not built early enough.
Ensure that libidn2 is built before baselayout wants to use it.
2020-07-29 16:33:32 +02:00
Kai Lüke
c66b25ccfe sys-apps/systemd: Guard deletion of hwdb.d folder behind use flag
Building systemd in the SDK bootstrap failed because the hwdb.d folder
did not exist. The upstream ebuild file has this guard:
https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-apps/systemd/systemd-245.5.ebuild#n390
2020-07-29 12:37:54 +02:00
Kai Lüke
c0d4c41ae3 Merge pull request #498 from flatcar-linux/kai/no-md5-cache
metadata: Delete md5-cache
2020-07-28 16:52:46 +02:00
Kai Lüke
158f72af0f Merge pull request #494 from flatcar-linux/kai/migrate-github-actions
Migrate GitHub actions
2020-07-28 15:36:10 +02:00
Kai Lüke
a1727654a8 .github: Do not create metadata/md5-cache commits 2020-07-28 15:12:58 +02:00
Kai Lüke
0066ee57e0 .github: Setup kernel updates for maintenance branches 2020-07-28 15:05:31 +02:00
Kai Lüke
0324dd7f93 metadata: Delete md5-cache
The metadata/md5-cache folder is machine-generated based on the
other files in the repository. It causes merge conflicts when at
one time they were not regernated in a commit and then later a
commit does it and includes cache changes which	are incompatible
with later or newer states.
Remove the folder as it	is not necessary to have it and was removed
in upstream Gentoo, too.
2020-07-27 16:20:16 +02:00
Kai Lüke
1965865b12 Revert "sys-libs/glibc: update to 2.30-r8"
This reverts commit 7ed010a557a898ffce6697f4006e27294f2d77f6.
2020-07-27 11:54:27 +02:00
Kai Lüke
eba038aed2 Revert "sys-libs/glibc: Apply Flatcar changes"
This reverts commit 640d6894a1cd788f4e3250878f2d31b801728ed3.
2020-07-27 11:54:19 +02:00
Dongsu Park
06166e3b6e Merge pull request #488 from flatcar-linux/linux-5.4.53-alpha
Upgrade Linux Kernel in Alpha from 5.4.52 to 5.4.53
2020-07-24 15:32:00 +02:00
Kai Lüke
4e25834549 .github: Only update the new main branch
The new main branch is the only branch that should get new software
updates with the exception of the maintenance branches that get kernel
updates.
Only target the main branch with GitHub Actions until we add discovery
for all active channel maintenance branches.
2020-07-23 19:26:09 +02:00
Dongsu Park
bb6a5945f4 .github: replace COMMIT_ID in runc ebuilds
So far Github actions have not changed existing `COMMIT_ID` variable in
runc ebuilds. As a result, the result PRs have correct versions with wrong
commit hashes.

We need to replace `COMMIT_ID` with one that matches with the new version.
To do that, clone the repo completely, since it is not possible to get
the commit hash by running `git rev-parse` on a shallow cloned repo.
Parse commit from a tag with an original version with `-` as its
delimiter, e.g. `v1.0.0-rc91`, because a transformed
tag like `v1.0.0_rc91` does not exist in the upstream repo.
2020-07-23 18:32:28 +02:00
Sayan Chowdhury
39b5c5d2e0 .github/workflows: Update the kernel release edge version to 5.7
Signed-off-by: Sayan Chowdhury <sayan.chowdhury2012@gmail.com>
2020-07-23 18:32:28 +02:00
Dongsu Park
faf94bbe20 .github: update rust versions also in profiles
We need to update rust versions also in multiple files in profiles,
e.g. `package.accept_keywords`. Otherwise `emerge rust` will fail,
due to mismatches between rust versions, in profiles and the actual
ebuilds.
2020-07-23 18:32:28 +02:00
Dongsu Park
ee7960d64e .github: fix version format in docker-runc
docker-runc ebuild has lines of runc versions with not only underscore
(`_`) but also hyphen (`-`). So when we replace the runc version, we
need to also care about versions with hyphen, for example, `1.0.0-rc10`.
2020-07-23 18:32:28 +02:00
Dongsu Park
e4c1f9b59a .github: correctly check status of checkout_branches
`exit` command will simply fail the whole script, so it would not be
possible to check for status of `checkout_branches`. Instead, we need to
use `return` for the error checks.
2020-07-23 18:32:28 +02:00
Dongsu Park
b330d54042 .github: update Kernel version to 5.4 for beta
Now that we updated Kernel to 5.4 for Beta, we also need to set Kernel
version to 5.4 in Github Actions.
2020-07-23 18:32:28 +02:00
Dongsu Park
730ae31678 .github: skip branch checkout if it exists
In case the target branch already exists, `checkout_branch()` needs to
simply `exit 0`, so the subsequent steps could be skipped.
In that case, it has to set `UPDATE_NEEDED` to 0, so the Github action
could avoiding creating another PR.

It resolves occasional issues that happen when subsequent PRs overwrite
existing open PRs made on the very same version. It would be no problem
if there was no change in the PR. However, if there was any manual
change in the previous open PR, the change will be simply overwritten.
That would be very unfortunate.
2020-07-23 18:32:27 +02:00
Dongsu Park
e48aa048a2 .github: check out with a specific channel name
When checking out into a branch name, append `-${CHANNEL}` to the name,
so the branch can be distinguished from each other. To do that, make
every Github actions yaml file pass in its corresponding `CHANNEL`
variable.
2020-07-23 18:32:27 +02:00
Dongsu Park
ee727b639f .github: generate package versions from input values
We do not need to specify each version from each workflow yaml file.
Make *-apply.patch scripts instead generate `$VERSION_SHORT` from the
input version value.
2020-07-23 18:32:27 +02:00
Dongsu Park
596136827b .github: detect latest cork version during SDK setup
We do not need to specify a cork version from each Github action.
Simply detect the latest version in `setup-flatcar-sdk.sh`, before
downloading cork binary file from Github.

Also remove the env variable for cork version from each Github action.
2020-07-23 18:32:27 +02:00
Dongsu Park
566be32dfd .github: update Kernel version to 5.4 for Alpha
Now that Kernel was updated to 5.4 in flatcar-master-alpha, we need
to update also Kernel versions for Alpha in Github actions.
2020-07-23 18:32:27 +02:00
Dongsu Park
8ae55c6d77 .github: schedule weekly Github actions for containerd
To get containerd in sync with upstream, we need to schedule weekly
Github actions. It runs on Friday every week, only for Alpha and Edge.
Similar to those for Docker, we need to deal with torcx ebuilds as well,
as they contain containerd versions.
2020-07-23 18:32:27 +02:00
Dongsu Park
eba279d24f .github: run weekly once to check for usual packages
We do not need to run once in a day to check for updates from
ordinary packages. Most releases happen once in more than a week.
So schedule the Github actions only once in a week for most packages.
Go on Mon, Rust on Tue, Docker on Wed, Runc on Thu.

Note, we still need to check for Kernel once in a day, as Kernel
releases happen quite often.
2020-07-23 18:32:27 +02:00
Dongsu Park
f6d9de2f68 .github: detect kernel version correctly
`kernel-apply-patch.sh` cannot detect the existing kernel version,
if the version does not have a patchlevel, e.g. `5.6`. So the old
kernel version variable becomes an empty string, and the final pull
request has an empty field after the `from` string.

If the Manifest does not have a `patch-` line, try to read a `linux-`
line again, to detect the correct kernel version.
2020-07-23 18:32:26 +02:00
Dongsu Park
0d4a0194be .github: split out from runc into common.sh
To avoid duplicates, make runc-apply-patch.sh use the helper
functions in `common.sh`.
2020-07-23 18:32:26 +02:00
Dongsu Park
c74c31a835 .github: split out from docker into common.sh
To avoid duplicates, make docker-apply-patch.sh use the helper
functions in `common.sh`.
2020-07-23 18:32:26 +02:00
Dongsu Park
2957eb592f .github: split out from Go into common.sh
To avoid duplicates, make go-apply-patch.sh use the helper functions
in `common.sh`.
2020-07-23 18:32:26 +02:00
Dongsu Park
9575d9251c .github: split out from rust into common.sh
To avoid duplicates, make rust-apply-patch.sh use the helper functions
in `common.sh`.
2020-07-23 18:32:26 +02:00
Dongsu Park
a292bdd1be .github: rename versionOld to VERSION_OLD
To make go-apply-patch.sh work with the new helpers,
we need to remove `versionOld` to `VERSION_OLD`.
2020-07-23 18:32:26 +02:00
Dongsu Park
e45323dc37 .github: split out from kernel into common.sh
To avoid duplicates, we should split out common parts into
separate functions in `common.sh`.
Make kernel-apply-patch.sh use the helper functions.
2020-07-23 18:32:25 +02:00
Dongsu Park
de65e80178 .github: schedule daily Github actions for Rust
Schedule daily Github actions for creating PRs for upstream Rust releases.

The Github workflow will create pull request for `dev-lang/rust` in
`coreos-overlay`. At the same time, it will send a repository dispatch
event to `flatcar-linux/portage-stable`, to update also `virtual/rust`.
We need to send different event types to distinguish alpha from edge.
2020-07-23 18:32:25 +02:00
Dongsu Park
a4b6456806 .github: use correct make.conf when setting up Flatcar SDK
When setting up a Flatcar SDK from scratch, we need to also set up
correct configs in `/etc/portage/make.conf`. For example we need to
set `PORTDIR=/mnt/host/source/src/third_party/portage-stable` instead
of the default Gentoo configs like `PORTDIR=/var/gentoo/repos/gentoo`.

Otherwise `update_metadata` will fail in some cases, because portage
cannot find the correct location of portage-stable.
2020-07-23 18:32:25 +02:00
Dongsu Park
4efb14c2a3 .github: check out correct base branches before applying patches
Before starting to apply patches inside `coreos-overlay`, we need to
check out base branches, also for `scripts` and `portage-stable`.
Otherwise, in case of Beta, Alpha, or Edge, `ebuild` commands could
fail due to mismatch of ebuild files across multiple repos like
`coreos-overlay` and `portage-stable`.
2020-07-23 18:32:25 +02:00
Dongsu Park
4e33e9667c .github: fix metadata generation for Kernel and Go
We need to generate metadata after the main commit was created.
Also run git format-patch for both commits, main and metadata.
2020-07-23 18:32:25 +02:00
Dongsu Park
0f4f393884 .github: update Kernel to 5.6 for Edge
Upgrade the base Kernel version from 5.5 to 5.6 for the Edge channel.
2020-07-23 18:32:25 +02:00
Dongsu Park
8bd2c35747 .github: get metadata included in the generated PRs
We need to get metadata included in the generated pull requests.
2020-07-23 18:32:25 +02:00
Dongsu Park
e10e7e45b7 .github: also update metadata on go-apply-patch 2020-07-23 18:32:24 +02:00
Dongsu Park
7e008ca73c .github: also generate metadata on kernel-apply-patch 2020-07-23 18:32:24 +02:00
Dongsu Park
9936ea8841 .github: schedule daily Github actions for Kernel in beta, stable
Check for upstream Kernel releases once in a day, for Beta and Stable,
just like it has been done for Alpha and Edge.
2020-07-23 18:32:24 +02:00
Dongsu Park
c33e7561c1 .github: fix sed expressions in runc-apply-patch
To be able to sort correctly between official releases and rc releases,
we need to add some sed tweaks when getting the original runc version.
2020-07-23 18:32:24 +02:00
Dongsu Park
40ebacc970 .github: schedule daily Github actions for runc
Schedule daily Github actions for upstream runc releases, just like
Docker.

In this case, we also need to update multiple repos like
`app-emulation/docker`, `app-emulation/containerd`, `app-torcx/docker`, etc.
2020-07-23 18:32:24 +02:00
Dongsu Park
e047f6db2f .github: schedule daily Github actions for Docker
Schedule daily Github actions to get upstream Docker releases,
for Alpha and Edge.

We need to change more files, as Docker version is used by torcx
as well as docker-runc.
2020-07-23 18:32:24 +02:00
Dongsu Park
f9163d93c6 .github: set up coreos profiles after setting up SDK
We need to set up coreos profiles under `/etc/portage/repos.conf`, to be
able to run any package-related actions like `emerge` or `egencache`.

Also change permissions for directories, so portage actions could write
files.
2020-07-23 18:32:23 +02:00
Dongsu Park
1011b5d7a2 .github/workflows: do not clone the whole golang repo
Instead of cloning the whole golang github repo, we should do a
shallow clone, and parse the tags list by running `git ls-remote`.
2020-07-23 18:32:23 +02:00
Dongsu Park
2b9e74e80c .github: git shallow clone instead of full clone for kernel
To reduce running time of git clone, we should avoid a full git clone
of the linux kernel repo. Instead, we shallow clone the repo, and
parse tags list by running `git ls-remote`.
2020-07-23 18:32:23 +02:00
Dongsu Park
f0db41dbb5 .github: schedule daily Github actions for Go
Schedule daily Github actions for creating PRs for upstream Go releases,
just like Kernel.
2020-07-23 18:32:23 +02:00
Dongsu Park
4e9d98cc60 .github: do not fail if the release is already the latest Kernel
If the current Flatcar release is already the latest Kernel, we should
simply exit with 0, without giving a failure status 1. The `exit 1`
would the otherwise result in a failure of the entire Github actions.
2020-07-23 18:32:23 +02:00
Dongsu Park
a5ef692fd1 .github: fix a commit message in Kernel workflows
We should use a prefix `sys-kernel`, without `coreos-sources`.
2020-07-23 18:32:23 +02:00
Dongsu Park
6ac7367f83 schedule daily Github actions for Kernel
This commit add 2 different Github actions that run once in a day,
one for Alpha, Kernel 4.19, and the other for Edge, Kernel 5.5.

Because of limitations of Github Actions, i.e. create-pull-request
actions, we cannot combine the two actions into one.
Also we need to create a patch and apply it to the top source directory,
since the create-pull-request action requires the changes in the top
directory.

Although we are not updating flatcar-master branch, (only Alpha and
Edge) the Github actions files need to be merged to flatcar-master,
because Github actions can only schedule cron jobs from the default
branch, flatcar-master.
2020-07-23 18:32:22 +02:00