-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
batch of fixes and enhancements - early january'2025 (#257)
> further enhancements: > - can now build (and develop) Hook for any arch under any arch, including for amd64 under Darwin arm64 > - full support for building on macOS+brew, including on arm64 > - added `shellfmt` tool and bash code format enforcing on CI (in addition to shellcheck) > - avoid pulling skopeo image over and over again ---- ### build: implement `shellfmt` (and `lint` which does both shellcheck/fmt) - for consistent bash formatting - include an .editorconfig for IDE's ### gha: switch to `lint` (which does both `shellcheck` and `shellfmt`) ### linuxkit: bump 1.5.2 -> 1.5.3 ### build: implement build-host dependency handling for macOS+brew - if on macOS+brew: - detects missing deps and installs them with brew - exports PATH with brew-based GNU versions first - coreutils, gnu-sed and gnu-tar included ### build: Dockerfile: fix FROM xx AS casing - to squash recent BuildKit warnings ### build: pass `--verbose 2` to linuxkit if `DEBUG=yes` - can help with some edge cases ### build: refactor skopeo pull and list-tags functions - this only affects Armbian kernel flavours - avoids pulling if found in local cache ### build: use skopeo `v1.17.0` instead of latest - since we now use the local tag ### build: armbian: kernel: refactor Dockerfile with helper - building the Armbian kernels would produce different hashes depending on the arch of the host - moving the affected code into the Dockerfile would lead to escaping pain; instead implement a docker.sh helper - in practice, all code in the Dockerfile is hashed, but the arch decision is now therein and hash won't change - also, allows for reuse, which is bound to come later ### build: docker: detect & export `DOCKER_HOST` from current `docker context` - Some Docker-in-VM solutions (like Docker Desktop, colima, etc) set a non-default docker context pointing to the correct socket - Seems LinuxKit fumbles detecting this and ends up silently failing all local-Docker-daemon cache hits - that is fine for CI, where all images are (beforehand) pushed to the registry (and thus LK ends up pulling from remote), but not during local development - reported to upstream LinuxKit: linuxkit/linuxkit#4092 ### build: kernel: force target arch on cross-built kernel docker image manifest - our kernel builds are done in arch-independent Dockerfiles - but those get the build-host's architecture, despite the contents being correct - when locally developing on a kernel that is != host-arch - those get the host-arch in the image - but LinuxKit refuses to use it due to arch mismatch - (when pushed to a registry, the arch info is discarded, and LK is ok with that) - thus - introduce `ensure_docker_image_architecture(imagetag, arch)` - which just hacks at manifests via a docker save/docker load - call it from both default and armbian kernel builds ### build: docker: avoid Docker Inc's "What's next" hints - enough spam already, thanks ----- Signed-off-by: Ricardo Pardini <[email protected]>
- Loading branch information
Showing
15 changed files
with
366 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_style = tab | ||
indent_size = 4 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.sh] | ||
shell_variant = bash | ||
binary_next_line = false | ||
switch_case_indent = true | ||
ij_shell_switch_cases_indented = true | ||
space_redirects = true | ||
keep_padding = false | ||
function_next_line = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.