Commit Graph

106 Commits

Author SHA1 Message Date
Ricardo Pardini
0c7596bd5a export-logs: use multiple paste servers in order until one works
- user can override by setting PASTE_SERVER_HOST=some.paste.server.com
2025-02-22 22:35:45 -03:00
Ricardo Pardini
43ee737f30 runners: fix if_error_find_files_sdcard if looking for full paths (shows DKMS log correctly)
- this should make `dmks`'s `make.log` properly show up in error logs now
2025-01-04 15:35:29 +01:00
ColorfulRhino
39fdf21b98 Beautify shellfmt and add board configs to formatting list (#6910)
* tools: shellfmt: Beautify and add board configs to formatting list
* Format the whole code using `lib/tools/shellfmt.sh`
---------
Co-authored-by: Igor <igor@armbian.com>
2024-07-08 17:00:38 +02:00
Viacheslav Bocharov
c27c55b0bc Fix trap-logging to CI ant not GITHUB_ACTIONS
Signed-off-by: Viacheslav Bocharov <adeep@lexina.in>
2024-07-04 21:35:26 +02:00
Igor Pecovnik
75ce67f329 Run shellfmt to complete code 2024-06-22 19:22:24 +02:00
Ricardo Pardini
41b99ec2b1 rootfs-create: if debootstrap second stage fails, find debootstrap.log and show it so we know what the error is
- runner: let `if_error_find_files_sdcard` be a simple filename (different debootstraps put debootstrap.log in different places)
2024-04-07 13:22:11 +02:00
Darsey Litzenberger
ce33bddb58 Make the colorized build output readable on a light background
This fixes the readability of colorized output of compile.sh when
running on a terminal with a light background.  It uses the COLORFGBG
environment variable similarly to how the ip(8) command does.

Signed-off-by: Darsey Litzenberger <dlitz@dlitz.net>
2024-02-09 19:38:03 +01:00
Ricardo Pardini
bebf4c7ae0 lib: implement and sprinkle some very basic config var change-tracking across board/family sourcing and several hook calls 2024-01-07 18:58:36 +01:00
Igor Pecovnik
2ee1616917 Move to primary pastebin service. It was upgraded long time ago and nobody switched back
Secondary is borked anyway. Probably ran out of resources.
2023-12-14 21:54:22 +01:00
Ricardo Pardini
2a9ec6d844 stacktraces: introduce get_stacktrace_element_by_index() to get a specific stracktrace element 2023-11-25 13:38:10 +01:00
Ricardo Pardini
a9d5969f21 config_post_main: sanity checks for RELEASE (vs ARCH) and RELEASE+DESKTOP_ENVIRONMENT (vs ARCH)
- the interactive menus didn't allow interactive users to select invalid combinations...
- ... but if specified directly on cmdline, no checks were done at all.
- introduce `exit_with_target_not_supported_error()`, which is just `exit_with_error` (code 43) but with code 44
  - this way the targets pipeline can just warn instead of break;
  - sometimes it's easier multiplying matrixes and skipping the few that can't be built
2023-08-23 21:35:02 +02:00
Ricardo Pardini
11df81403d config/lib/exts: run shellfmt
- `bash lib/tools/shellfmt.sh`
- mostly spacing changes that accumulated over time
2023-08-22 14:28:14 +02:00
Ricardo Pardini
24ee25e0c9 trap-logging: don't export markdown logs and GHA summary unless GHA_EXPORT_MD_SUMMARY=yes (try to make unicorns go away) 2023-08-12 12:04:22 +02:00
Ricardo Pardini
624ac450e3 trap-logging: just discard logs dir when ANSI_COLOR=none 2023-08-12 09:58:32 +02:00
Ricardo Pardini
953b9eb823 display-alert: strip newlines as well as ANSI colors if ANSI_COLOR=none
- `ANSI_COLOR=none` is used when we're driving compile.sh from Python
- some debugging messages had newlines in them, thus making Python mark those as `[LEAKED]`
2023-07-27 21:32:30 +02:00
Jacob Hrbek
6556a3a77e Add compatibility for non-FHS 3.0 systems
* Added `shell.nix` definition for temporary development environment for Nix(OS)
* Set uuidgen and other binaries check to not rely on hard-codded paths
2023-07-19 23:16:22 +02:00
Ricardo Pardini
f724ed130e export-logs: introduce PASTE_URL to make easy to change paste service used 2023-06-13 12:07:40 +02:00
Ricardo Pardini
e2f32c53f8 export-logs: add GHA output for logs_url (when SHARE_LOG=yes) 2023-05-17 18:06:21 +02:00
Ricardo Pardini
f0f9159faa logging: curb CI/GHA special errors for cascading errors during build failure
- otherwise we get 4 errors for each "error" in CI
  - one for the real error
  - one for "wait for cleanups"
  - one for "Docker build failed"
  - one from GHA itself since command failed (we can't get rid of this)
2023-05-15 17:43:25 +02:00
Ricardo Pardini
c692676da7 kernel-debs: postinst/etc: fix: unify is_boot_dev_vfat() function; make work during image build too via env var
- determinining if `/boot` is vfat is more complex than it looks;
  - use a common function to unify across all scripts
- during image build, the kernel install is always done with a non-fat, non-mounted /boot
  - use a special variable passed through the env so unified function can know ahead of time
  - introduce `extra_apt_envs` param to `chroot_sdcard_apt_get()`; array with extra environment vars
- if vfat /boot:
  - `linux-update-symlinks` is not called (Debian would just choke on this)
  - don't even try to symlink Armbian stuff, move instead
- more/better logging board-side (unfortunately mixed in all the set -x debugs)
2023-05-01 22:46:43 +02:00
Ricardo Pardini
3d2575639d logging: include Repeat Build Args in markdown/ANSI logs 2023-04-21 14:26:33 +02:00
Ricardo Pardini
953ab276d0 logging: better logging when ANSI_COLOR=none (eg, during info collection) 2023-04-15 22:43:06 +02:00
Ricardo Pardini
ed0b406265 lib: fix: replace undue export statements with declare -g 2023-03-31 09:12:44 +02:00
Ricardo Pardini
fc14d62c52 capture: set globals CAPTURED_VARS_NAMES and CAPTURED_VARS_ARRAY (instead of CAPTURED_VARS_ARRAY that was space-delimited); filter and sort last-minute 2023-03-31 09:12:44 +02:00
Ricardo Pardini
9a74b838ce runners: introduce internal skip_error_info=yes for run_host_command_logged()
- doesn't show nor clear vars `if_error_find_files_sdcard` and `if_error_detail_message`
- used by `chroot_sdcard_apt_get()` which uses `run_host_command_logged()` multiple times, and the first would clear the important/last one
2023-03-31 09:12:44 +02:00
Igor
d4a7a1c816 Revert "Update export-logs.sh to use primary Armbian paste server (#4936)"
This reverts commit bc62c8cd42.
2023-03-18 21:39:02 +01:00
Ricardo Pardini
736fe7ecf4 don't use "bright black" ANSI for logging unless we're running under a known-good terminal (eg, iTerm2)
- giving up on the "bright black" == "gray" thing. There's enough bad default themes out there, and not the first time people (rightfully) complained...
2023-03-17 08:32:11 +01:00
Ricardo Pardini
ee11f5dbd9 chroot_sdcard_apt_get: don't use -qq for all apt operations on chroot if SHOW_DEBUG=yes (or DEBUG=yes)
- helps debugging crazy upgrades happening due to @rpardini's stupid `Version: ` insanity
2023-03-12 18:40:20 -03:00
TheLinuxBug
bc62c8cd42 Update export-logs.sh to use primary Armbian paste server (#4936)
Changing export-logs.sh script from posting to armbian.next.armbian.com to posting to the primary paste server which has now been upgraded at paste.armbian.com.
2023-03-11 22:03:40 +01:00
Igor Pečovnik
b7b8eb7b72 Add / modify (c) in bash scripts (#4922)
* Add / modify (c) in bash scripts

Signed-off-by: Igor <igor@armbian.com>

* Add (c) to the source config files

---------

Signed-off-by: Igor <igor@armbian.com>
2023-03-09 18:30:40 +01:00
Ricardo Pardini
25606ef3c8 logs: remove git diff from GIT_INFO_ANSI, it's somewhat useless and potentially huge leading to argument list too long 2023-02-24 13:46:28 -03:00
Ricardo Pardini
2f7423d0e4 shellfmt/.editorconfig: enable trim whitespaces, run shellfmt, no actual code changes (#4849)
- shellfmt: bump to 3.6.0 (run with `bash lib/tools/shellfmt.sh`)
- .editorconfig: rationalize, remove duplicated logic
2023-02-23 09:24:41 +01:00
Ricardo Pardini
8f23c9d2e4 armbian-next: debug_dict()/debug_var() only if debugging 2023-02-18 07:46:08 -03:00
Ricardo Pardini
ecbf09491d armbian-next: logging: introduce RAW_LOG=yes to export .tar with raw unprocessed logs (for development) 2023-02-18 07:45:46 -03:00
Ricardo Pardini
3bcf89d6c6 armbian-next: logging: introduce SHARE_LOG=yes to auto-curl the logs to paste 2023-02-18 07:45:45 -03:00
Ricardo Pardini
0e480e685e armbian-next: docker: pass down git info via env var, since Docker doesn't get ${SRC}/.git, yet we need that info in the Docker logs 2023-02-18 07:45:40 -03:00
Ricardo Pardini
388c76c91b armbian-next: shellcheck: squash more shellcheck warnings; some long-lost variables being used; some unset's that are better reset's, etc 2023-02-18 07:45:33 -03:00
Ricardo Pardini
ba7487b1a1 armbian-next: docker: fix Dockerfile generation; don't output logs info during Dockerfile build 2023-02-18 07:45:23 -03:00
Ricardo Pardini
c5de5e0f1f armbian-next: logging: ansi-haste sharing beta 2 (now with URL) 2023-02-18 07:45:22 -03:00
Ricardo Pardini
bef7f8fee4 armbian-next: artifacts: introduce kernel/u-boot artifacts; git ref2info; "memoizer"; some hashing
- artifacts: u-boot/kernel - pt7 - adapt legacy/artifact versions; use common `capture_rename_legacy_debs_into_artifacts()`
- artifacts: u-boot - pt6: add artifact for u-boot
  - use artifact version / reason in actual u-boot .deb if present
- artifacts: kernel - pt5: tune kernel version, refactor
- artifacts: kernel - pt4: squash unrelated bugs that show up; move `prepare_compilation_vars()` to default build
- artifacts: kernel - pt3: drivers+patches+.config hashing
  - split file hashing function from drivers-harness; fix it so filenames are relative and sorted; sort from ${SRC}, always
  - aplit prepare_kernel_config_core_or_userpatches() from `kernel_config_initialize()`
- artifacts: kernel - pt2:  memoizing git ref2info
- artifacts: kernel - pt1:  versioning
2023-02-18 07:45:20 -03:00
Ricardo Pardini
b4df4b83c3 armbian-next: logging: detect TERM=alacritty and use normal instead of gray 2023-02-18 07:45:17 -03:00
Ricardo Pardini
41d7d0155e armbian-next: docker: fix: not all find's are made equal, back to -mtime +1 (full 24-hour period needed for match) 2023-02-18 07:45:08 -03:00
Ricardo Pardini
3c5488b002 armbian-next: bump logging archive greet to 14 files 2023-02-18 07:44:59 -03:00
Ricardo Pardini
89d6c686c6 armbian-next: chroot_sdcard_apt_get_install_dry_run(): run again if first try fails, with more logging 2023-02-18 07:44:52 -03:00
Ricardo Pardini
6177b94268 armbian-next: logging: pure ASCII .log; included in Markdown for GHA 2023-02-18 07:44:45 -03:00
Ricardo Pardini
1cec42392e armbian-next: GHA & rootfs adventures, pt 1
- rootfs: create readonly global `rootfs_cache_id` (type+hash+date/version)
- add "oras-upload" CLI command (dumb, no retries, single target/single source)
- docker: mount-bind for & re-pass envs `GITHUB_OUTPUT` and `GITHUB_STEP_SUMMARY` down to Docker
- introduce `github-actions.sh::github_actions_add_output()`
- during logs cleanup, dump the Markdown log into GITHUB_STEP_SUMMARY if it is available
2023-02-18 07:44:41 -03:00
Ricardo Pardini
78dcf01c92 armbian-next: cleanup, kill and add to-do's, remove dead code, turn down logging, squash future shortcircuit bugs
- killed `[[ $ROOTFS_TYPE != ext4 ]] && display_alert "Assuming ${BOARD} ${BRANCH} kernel supports ${ROOTFS_TYPE}" "" "wrn"`
  - which definitely didn't belong in rootfs
- disable usage of run_host_command_logged_long_running for kernel-make
- stop lying about long_running stuff being any different from non-long_running versions
- stop lying about 'set -e' when there's still a bunch of pipes for "pv" and stuff all around
2023-02-18 07:44:33 -03:00
Ricardo Pardini
44ae761927 armbian-next: apt: expand local caching to include package lists, as well as .deb's
- `/var/cache/apt` in chroot was already cached;
- add `/var/lib/apt/lists`
- remove usage of namerefs, replace with global dict
2023-02-18 07:44:19 -03:00
Ricardo Pardini
805085ff45 armbian-next: logging: validate where not already in a logging section when trying to start a new one
- with a small exception for 'entrypoint' ;-)
2023-02-18 07:44:18 -03:00
Ricardo Pardini
3f0c480e9d armbian-next: mark remove_all_trap_handlers() deprecated, it never did anything 2023-02-18 07:44:16 -03:00