-
Notifications
You must be signed in to change notification settings - Fork 2
builder: check if patch was already applied before applying patch #26
base: master
Are you sure you want to change the base?
Conversation
So you rely on the fact that LGTM if CircleCI is green. |
Check if patch was already applied before applying patch. This will allow builder to work even if the kernel already includes the patch.
18ef9fa
to
fe7467d
Compare
Ah, I missed something. Force-pushed with |
We need to have config for kernel 4.12 to be able to build kernel on CircleCI.
Added a kernel config 4.12 to make CI work again. Now the CI passed. |
The PR itself is good, however I see that CircleCI (build 106) builds the following versions:
And the previous build generated the following artifacts:
So kernel 4.9.6 was previously built but not anymore. This is a problem because tcptracer-bpf and gobpf rely on it. See the following links: So, merging this PR would break tcptracer-bpf and gobpf. @schu used to trigger parametric CircleCI builds manually to avoid this issue. But I think it is wrong that tcptracer-bpf and gobpf always use the last version of the stage1-builder builds. We should use something like this:
(specifying 3 versions instead of 2: the rkt version, the kernel version, and a version of the stage1builder, so downstream projects would not break on every stage1-builder PR) And instead of picking the latest CircleCI artifacts, tcptracer-bpf and gobpf should stick to a specific CircleCI build. |
@alban Thanks for the explanation. I'm fine with not merging it until we had a new versioning policy. |
builder
Outdated
@@ -80,20 +80,36 @@ test "$(find "${kernel_source_dir}" -maxdepth 0 -type d -empty 2>/dev/null)" && | |||
# configure kernel | |||
test -f "${kernel_source_dir}/.config" || sed -e "s/-rkt-v1/${kernel_version_suffix}/g" "${kernel_config}" >"${kernel_source_dir}/.config" | |||
|
|||
function patch_kernel() { | |||
filename=$1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: we try to follow https://google.github.io/styleguide/shell.xml, i.e.
- use
local
variables in functions - prefer
[[
over[
Also, shellcheck
complains about a couple of things (e.g. missing "
quotes; not all from your change).
I'll try to get back to issue with build images / assets later this week.
Follow shell style guide https://google.github.io/styleguide/shell.xml, as well as fix warnings from shellcode.
@schu Pushed a new commit to fix shell style issues. |
Check if patch was already applied before applying patch. This will allow builder to work even if the kernel already includes the patch.