Commit Graph

443 Commits

Author SHA1 Message Date
Ricardo Pardini
941bc81868
armbian-next: docker: pass ARMBIAN_ENABLE_CALL_TRACING=yes via env, and only if DOCKER_ARMBIAN_ENABLE_CALL_TRACING=yes 2023-02-18 07:44:56 -03:00
Ricardo Pardini
9849990031
armbian-next: all chroots: mount /var/tmp as tmpfs; create dir /run/user/0 and mount as tmpfs @TODO cleanups 2023-02-18 07:44:55 -03:00
Ricardo Pardini
962ae65a45
armbian-next: docker: include ${SRC}/.git static via Dockerfile, for kernel-patches-to-git / archeology; use fast archeology
- include FAST_ARCHEOLOGY in call to Python, default yes; sync kernel & u-boot call
2023-02-18 07:44:54 -03:00
Ricardo Pardini
6e267f5cd1
armbian-next: docker: passthrough of the SSH agent, via Docker magic on Darwin; enable for docker-shell and kernel-patches-to-git
- don't check/verify/update SSH-related hostkey etc for git tree push
2023-02-18 07:44:53 -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
817deb0c53
armbian-next: drop buildpkg code 2023-02-18 07:44:50 -03:00
Ricardo Pardini
32bfcb1b68
armbian-next: rootfs: curb logging; GHA outputs rootfs_cache_id_version, rootfs_cache_id and rootfs_out_filename_relative 2023-02-18 07:44:47 -03:00
Ricardo Pardini
bd0a7936da
armbian-next: docker/gha: pass down a bunch of GHA specific vars (list unconfirmed)
- docker: curb logging about stdin
2023-02-18 07:44:46 -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
dbfa7329ab
armbian-next: cli: kernel cli forces KERNEL_CONFIGURE=no; @TODO this should only "default to", not force. for proper kernel cli, later 2023-02-18 07:44:44 -03:00
Igor
00bc1b4a1e
armbian-next: rootfs: introduce ROOTFS_COMPRESSION_RATIO, default 5 for general use, default 15 for rootfs CLI; fix pv | tar bug; remove GPG signing
- Remove PGP signing from the script as its done in GHA
- Also remove generating .current control file as its obsolete in this design

Co-authored-by: Ricardo Pardini <ricardo@pardini.net>
2023-02-18 07:44:42 -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
7f74b2e83f
armbian-next: docker: don't spew errors about sharing cache if cache doesn't even exist 2023-02-18 07:44:40 -03:00
Ricardo Pardini
041297c563
armbian-next: binfmt: make sure we have all binfmt's setup & enabled for rootfs build (v2) 2023-02-18 07:44:39 -03:00
Ricardo Pardini
b82badd214
armbian-next: wait_for_disk_sync(): warn only if more than 30s fsync 2023-02-18 07:44:38 -03:00
Ricardo Pardini
ed3416dc7d
armbian-next: kernel-debs: squash some warnings; add KERNEL_SRC_ARCH to arch configs; don't warn about NAME_KERNEL 2023-02-18 07:44:37 -03:00
Ricardo Pardini
d4f70008b5
armbian-next: kernel-debs: force arch/arm/boot/zImage as vmlinuz for armhf
- we want a "Linux kernel ARM boot executable zImage (little-endian)" vmlinuz for armhf
- such is not deployed by default by kernel's "make install"
2023-02-18 07:44:36 -03:00
Ricardo Pardini
766d17726c
armbian-next: extrawifi: include all patch/misc/wireless*.patch and patch/misc/*wifi*.patch in drivers hash calculation
- calculate hash of hash at once, not for each file
2023-02-18 07:44:35 -03:00
Ricardo Pardini
80410f50c7
armbian-next: extrawifi: include driver_uwe5622_allwinner() in harness 2023-02-18 07:44:34 -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
a9a3c3fe0b
armbian-next: kernel-debs: re-enable postinst debugging; fix bad builddeb port for zImage armhf (image_name == NAME_KERNEL) 2023-02-18 07:44:32 -03:00
Ricardo Pardini
3cac8f44a4
armbian-next: we don't really need target RELEASE defined to install host deps (for now), don't freak out about it 2023-02-18 07:44:31 -03:00
Ricardo Pardini
f43732a8e9
armbian-next: use unified methods for tmp dir handling all around (except ATF, which is special) 2023-02-18 07:44:29 -03:00
Ricardo Pardini
d17157885c
armbian-next: rootfs: converge rootfs-cache and rootfs together; exchange BOARD for ARCH 2023-02-18 07:44:28 -03:00
Ricardo Pardini
695bfb387b
armbian-next: rootfs: reset UID of produced rootfs tarball; announce what is doing and what has done 2023-02-18 07:44:27 -03:00
Ricardo Pardini
6077d40f9b
armbian-next: rootfs: build rootfs from CLI, sans-BOARD, sans-FAMILY, etc -- rootfs are meant to be shared
- require ARCH/RELEASE for rootfs cli
- disallow BOARD/LINUXFAMILY/BOARDFAMILY being set for rootfs cli
- split `prep_conf_main_only_rootfs()` instead of `prep_conf_main_build_single()` for rootfs-only stuff
- run both conf and build without stdin for rootfs CLI (no interactive allowed)
- don't blindly set `ARCH=armhf` for no reason in main-config
- allow skipping family stuff in main-config, via `allow_no_family=yes` (used only in `prep_conf_main_only_rootfs()`)
- kill double loading of userpatches family, not needed/old code
- allow skipping kernel stuff via `skip_kernel=yes` in `config_pre_main()`  (used only in `prep_conf_main_only_rootfs()`)
2023-02-18 07:44:26 -03:00
Ricardo Pardini
091ae1d27f
armbian-next: rootfs: adapt to new reality after huge refactor
- make `tmpfs_estimated_size` and `available_physical_memory_mib` readonly and global and only ever set once
- remove subshell from `get_rootfs_cache_list()`, new version `get_rootfs_cache_list_into_array_variable()` for sanity
- warns if `ROOT_FS_CREATE_ONLY=yes` is set during cached build path
- add a `wait_for_disk_sync()` after restoring rootfs cache
- fix logging sections for `build_rootfs_only()` and `prepare_rootfs_build_params_and_trap()` in `build_rootfs_and_image()`
- remove the logging section from `get_or_create_rootfs_cache_chroot_sdcard()` call in `build_rootfs_only()` (which is now itself logged)
- @TODO: `deploy_qemu_binary_to_chroot()` is leaking a qemu bin in rootfs cache!
2023-02-18 07:44:24 -03:00
Ricardo Pardini
28d89e2c91
armbian-next: rootfs: new CLI command for rootfs cache building; further refactorings
- _told ya it would all make sense eventually..._
- introduce new, real, non-alias `rootfs` command in `cli-rootfs` -- this _only_ builds rootfs, nothing else
- no more `main_default_build_single()`; instead `full_build_packages_rootfs_and_image()`
- introduce `do_with_default_build()` wrapper, for things that need host prepared + aggregation to run
- CLI-specific parts of `main_default_build_single()` moved to cli-build
- put prepare/cleanup pair of `prepare_rootfs_build_params_and_trap()` and `trap_handler_cleanup_rootfs_and_image()` into new `trap-rootfs.sh` (this needs further splitting for the image part)
- refactor `get_or_create_rootfs_cache_chroot_sdcard()` into `build_rootfs_only()`, `calculate_rootfs_cache_id()`
- update library with new files
2023-02-18 07:44:22 -03:00
Ricardo Pardini
6176dc3702
armbian-next: rootfs: split create-cache into rootfs-create
- bear with me, this will make sense in the end
- a `mount_chroot()` was ejected out of rootfs building code into main, for reuse's sake
2023-02-18 07:44:21 -03:00
Ricardo Pardini
2d30a44831
armbian-next: main: split default-build into build-packages, start-end
- bear with me, this will make sense in the end
2023-02-18 07:44:20 -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
8a63a0ae20
armbian-next: downloads.sh: some cleanup and add debugging to get_urls() 2023-02-18 07:44:17 -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
Ricardo Pardini
8fedd749aa
armbian-next: kernel/logging: stop lying about LD/AR/INSTALL/SIGN/XZ make output 2023-02-18 07:44:14 -03:00
Ricardo Pardini
780fe26ea4
armbian-next: logging: (very, very early beta) for uploading/sharing of ANSI log file online 2023-02-18 07:44:13 -03:00
Ricardo Pardini
7f16064c23
armbian-next: interactive: info msg before (slow) gathering of all boards 2023-02-18 07:44:12 -03:00
Ricardo Pardini
18c9946a4d
armbian-next: countdown: if to test -t 0 (0: stdin, 1:stdout) for interactive-ness; also test in if-not-aborted version 2023-02-18 07:44:11 -03:00
Ricardo Pardini
1a7877bb2e
armbian-next: docker: warn & countdown if we can't write to cache/docker; continue by using .tmp/docker if not aborted. 2023-02-18 07:44:10 -03:00
Ricardo Pardini
8d2be2c694
armbian-next: python/pip: solve crazy with /usr/bin/pip3 by not using it (instead, python3 -m pip); don't mask errors
- "| cut" masked errors in multiple places
- include real pip3 version in python deps hash, all will be invalidated
- be less happy about hitting hash/cache, should happen often
2023-02-18 07:44:09 -03:00
Ricardo Pardini
2453722962
armbian-next: docker: pass CI env down to Docker (for GHA etc) 2023-02-18 07:44:08 -03:00
Ricardo Pardini
d4f969c67d
armbian-next: docker: don't bomb if stdin is not a terminal (eg, in CI) 2023-02-18 07:44:07 -03:00
Ricardo Pardini
d95478281b
armbian-next: fix ANSI logs, use reset at strategic places 2023-02-18 07:44:06 -03:00
Ricardo Pardini
eb30aac310
armbian-next: extensions: move 'extensions.sh' into library; replace manual source with init function
- wraps globals in `extension_manager_declare_globals()` -- and make them actually global
- whoever wrote this original code is insane, add copyright
2023-02-18 07:44:05 -03:00
Ricardo Pardini
092f9ad3b2
armbian-next: firmware-deb.sh: prefix temp dir so it's "deb-firmware" 2023-02-18 07:44:04 -03:00
Ricardo Pardini
486ba2953c
armbian-next: bsp: use prepare_temp_dir_in_workdir_and_schedule_cleanup(); bring back PACKAGES_SEARCH_ROOT_ABSOLUTE_DIRS 2023-02-18 07:44:03 -03:00
Igor
90c46e0215
armbian-next: cli: add CLI alias command rootfs-cache for creating rootfs cache 2023-02-18 07:44:02 -03:00
Ricardo Pardini
22074a0cde
armbian-next: logging: new log file / summary nomenclature 2023-02-18 07:44:01 -03:00
Ricardo Pardini
a6182bbd89
armbian-next: docker: archive logfiles again; warn & greet testers when archiving many old logfiles 2023-02-18 07:44:00 -03:00
Ricardo Pardini
dcaadac152
armbian-next: git: disallow forcing impossible shallow/full; warn if it's the case
- you gotta wipe the worktree before you change it from full to shallow or vice-versa
2023-02-18 07:43:59 -03:00
Ricardo Pardini
da77aad1dd
armbian-next: git: detect, and stop, when git bare trees vs worktrees have been shuffled around and can't be recovered
- hopefully this will never happen ;-)
2023-02-18 07:43:58 -03:00
Ricardo Pardini
51f9f59084
armbian-next: back to cleaning downloaded bundles/gitballs after they've converted to bare tree & proven working 2023-02-18 07:43:57 -03:00
Ricardo Pardini
25d5fe5926
armbian-next: darwin: try to get rid of .DS_Store sneaky bastards before launching Docker 2023-02-18 07:43:56 -03:00
Ricardo Pardini
84e0bc1423
armbian-next: fix, don't try to get pid descendants on non-Linux (fixes Darwin cleanups) 2023-02-18 07:43:55 -03:00
Ricardo Pardini
88ff66ae11
armbian-next: adaptive shallow/full Kernel git bare git (3gb -> 300mb download)
- allows using pre-shallow-ed bare trees, specific to the KERNEL_MAJOR_MINOR
- uses shallow by default if storage is "slow" (mmc), or free disk space < 32g (@TODO tweak this)
- if full tree already there keeps using it
- allow forcing decision with `KERNEL_GIT=full` or `KERNEL_GIT=shallow`
- countdown to confirm if decision based on storage type/free space and user is interactive
  - this has some of the worst copy ever written
- @TODO refactor the device type / free space code, reuse across codebase (3-4 other spots detect free space)
- @TODO GHA self-hosted (full) vs hosted (shallow) runners decision
- sprinkle with `wait_for_disk_sync()` around clean/download/extract
- sprinkle git with debugs, and an info between fetch and checkout (otherwise it seems "fetch" takes a long time)
2023-02-18 07:43:54 -03:00
Ricardo Pardini
72c61f2f68
armbian-next: replace bare sync invocations by introducing wait_for_disk_sync(); sync early at start of build
- wait 10s for sync call; otherwise warn user to be patient
- wait_for_sync "reason for sync" everywhere
- add @TODO for /run/user/0 etc and XDG_RUNTIME_DIR in chroot
2023-02-18 07:43:53 -03:00
Ricardo Pardini
4d43c05f7b
armbian-next: kernel: git: remove dead code, GIT_PRE_FETCH_HOOK / checked_out_revision_mtime 2023-02-18 07:43:52 -03:00
Ricardo Pardini
3eacae68c7
armbian-next: kernel: git: split via-ORAS and via-Bundle tangle 2023-02-18 07:43:51 -03:00
Ricardo Pardini
8af14d4f8c
armbian-next: countdown: split off file for countdown functions (countdown-to-abort and countdown-to-continue)
- introduce `countdown.sh`, move `traps.sh::exit_if_countdown_not_aborted()` there, introduce `exit_if_countdown_not_aborted()`
2023-02-18 07:43:50 -03:00
Ricardo Pardini
2c9582f9ba
armbian-next: add Debian Ports keyring hostdep to strap Debian riscv64 from ports
- rpardini: actually use ports keyring for Debian Risc-V
- `risc-v`: correctly include `debian-ports-archive-keyring` in Risc-V CLI packages
  - include in debootstrap list, via `config/optional/architectures/riscv64/_config/cli/_all_distributions/main/packages`
  - can't have two `--include` in debootstrap call
- riscv64: move `debian-ports-archive-keyring` from main to debootstrap; also only for `sid`
2023-02-18 07:43:49 -03:00
Ricardo Pardini
d8016c49b6
armbian-next: fix ATF build under binutils 2.39+ via TF_LDFLAGS=--no-warn-rwx-segment 2023-02-18 07:43:48 -03:00
Ricardo Pardini
549ae08061
armbian-next: git: show "fetch completed" info, lest user thinks fetch is hanging while checking out 2023-02-18 07:43:46 -03:00
Ricardo Pardini
47bac3af92
armbian-next: fix missing BOARD_TYPE 2023-02-18 07:43:45 -03:00
Ricardo Pardini
8cedc82ec2
armbian-next: hopefully improved error logging; avoid logging errors up to 3x; subdued red stacktraces
- reorg `display_alert()` so more frequent levels are handled first
- improve some ANSI color usage, still a mess
- don't write failed commands stackstrace as warnings to screen -- just to file (yes it's redundant, except if in test)
- more useful / subdued stacktraces, to make actual error more obvious...
2023-02-18 07:43:43 -03:00
Ricardo Pardini
da1cf2b475
armbian-next: rename too-long main function to prep_conf_main_build_single()
- this commit is proof of OCD (old name didn't fit stacktrace space)
2023-02-18 07:43:42 -03:00
Ricardo Pardini
242a5dad1f
armbian-next: somewhat-better handling/logging when using Docker (don't show two logfiles to inspect)
- do not show path to Docker run-host's logfile, unless the Docker run itself didn't produce logs
- introduce `global_final_exit_code` to allow to maintain/preserve Docker's exit code without triggering an error host-side
2023-02-18 07:43:41 -03:00
Ricardo Pardini
bf3f346bee
armbian-next: still fighting tee leaking: now I think I won, again
- avoid using the "last resort, use lazy umount" by killing tee_pid _and descendants_ before hand. Works!
- introduce `get_descendants_of_pid_array()` using recursive trick to get all descendants
- do not `unset CURRENT_LOGFILE` -- during `logging_error_show_log()` (from SHOW_LOG=no days)
  - do `unset CURRENT_LOGFILE` immediately before processing logs -- although it magically survives. mysteries of traps in bash...
- `declare -g` instead of `export` for `start_logging_section()`
- don't `check_and_close_fd_13()` in `run_cleanup_handlers()`
- do run `check_and_close_fd_13()`, but only after archiving the old logs (in logging trap!)
- add a default error for unhandled TRAP's -- of which should be done
- fix reset of `global_tee_pid=0` in section-logging
2023-02-18 07:43:40 -03:00
Ricardo Pardini
c1100fa461
armbian-next: still fighting tee leaking under duress, turns out I _hadn't_ really won
- last resort, use lazy umount.
- include `lsof` in hostdeps, useful to debug these situations
2023-02-18 07:43:39 -03:00
Ricardo Pardini
a3d8b5891b
armbian-next: aggregation.py vs create-cache.sh: better hashing, much desktop
- aggregation.py:
  - only include non-removed pkgs in hash (do'h)
  - use a sorted unique of desktop+rootfs+debootstrap pkgs for pkg hash
  - make space for having apt sources/gpg keys in hash @TODO
  - write a hash-text variable for bash with info, for easy comparison later
  - refactor out bash_string_multiline()
- create-cache.sh:
  - don't armhf unless `ARMHF_ARCH=yes`
  - remove the uninstall stuff until we decide @TODO
  - don't show "free space of MOUNT" when there's only SDCARD
  - better logging for resolv.conf/machine-id shenanigans does in rootfs cache
  - drop dead code, squash some quoting issues
  - show the size of the zstd ball after compressing
  - don't even go to github armbian/cache nor cache.armbian.com for list of caches if SKIP_ARMBIAN_REPO=yes
  - remove mentions of BOARD or BRANCH, not relevant in rootfs cache
2023-02-18 07:43:36 -03:00
Ricardo Pardini
be49433b41
armbian-next: use retries for downloading ORAS tooling
- `do_with_retries()`: add `IS_A_RETRY` and `RETRY_FMT_MORE_THAN_ONCE` for convenient logging in retried functions
2023-02-18 07:43:35 -03:00
Ricardo Pardini
ec7639e518
armbian-next: severe bug, there was no prefix-emoji for Windows 2023-02-18 07:43:33 -03:00
Ricardo Pardini
4dd278f07d
armbian-next: compile_firmware(): use new temp dir helpers (saves 2Gb+ in WORKDIR), fix typos 2023-02-18 07:43:32 -03:00
Ricardo Pardini
62d948b1b4
armbian-next: still fighting tee leaking under duress, and I think I won
- call `check_and_close_fd_13()` directly when `exit_with_error()` called, don't wait for trap
- store PID spawned by `do_with_logging()` under `$global_tee_pid`
- `check_and_close_fd_13()`:
  - sprinkle with `sync` to give a chance for stuff to die gracefully
  - check if `$global_tee_pid` is set and actually a running PID, if so, kill it
  - do not blindly "wait" for stuff, instead, kill it and wait for it to die -- 100% more likely to not hang ;-)
2023-02-18 07:43:31 -03:00
Ricardo Pardini
ce47db1e0a
armbian-next: add logging with size of actual built rootfs in MiB; debug tmpfs in trap & after pkgs done 2023-02-18 07:43:30 -03:00
Ricardo Pardini
164db02af5
armbian-next: small cleanups: squash typos / add function keyword / add types / mark dead code 2023-02-18 07:43:29 -03:00
Ricardo Pardini
35fbb7ed6c
armbian-next: small cleanups: squash typos / add function keyword / add types / mark dead code 2023-02-18 07:43:28 -03:00
Ricardo Pardini
0ea0fe3528
armbian-next: mktemp and tmpfs related utility functions with automatic cleanup handlers 2023-02-18 07:43:27 -03:00
Ricardo Pardini
af7ace7e57
armbian-next: don't leak .raw image if failure before move; show rootfs-tmpfs info
- add escapings and TODO's around the area...
2023-02-18 07:43:26 -03:00
Ricardo Pardini
1636a2afea
armbian-next: tune logging: unmounting, u-boot prep/source/install; traps; extensions 2023-02-18 07:43:25 -03:00
Ricardo Pardini
ff4b5069ce
armbian-next: extract move_images_to_final_destination() and optimize for fast-move when src/dst on same filesystem 2023-02-18 07:43:24 -03:00
Ricardo Pardini
92d902c883
armbian-next: drop dead/duplicated code for bootsplash and mark kernel-drivers.sh (which includes bootsplash) as dead code 2023-02-18 07:43:23 -03:00
Ricardo Pardini
4d59ad7ac4
armbian-next: try harder to get en_US.UTF-8 logging 2023-02-18 07:43:22 -03:00
Ricardo Pardini
99a7a7980b
armbian-next: docker: remove old code 2023-02-18 07:43:21 -03:00
Ricardo Pardini
a6a5152695
armbian-next: chroot_sdcard_apt_get_update() to replace and better log chroot_sdcard_apt_get update
- also add retries where it was missing
- @TODO: desktop_postinstall() is a mess, needs aggregation work
2023-02-18 07:43:19 -03:00
Ricardo Pardini
2455c55dac
armbian-next: firmware: don't build -full firmware if not on CI/noninteractive and board's not going to use it
- move `fakeroot_dpkg_deb_build()` from runners.sh to new utils-dpkgdeb.sh
  - and make it debug show the size of the source
- clean off `.git` directory earlier for full build
- @TODO: get rid of the "hardlinks" funky biz in there and not-copy `.git` to begin with
2023-02-18 07:43:18 -03:00
Ricardo Pardini
f2bd68afde
armbian-next: kernel: cleanup bundle after patching succeeded, not after build success
- for extra gigabytes of space, earlier
2023-02-18 07:43:17 -03:00
Ricardo Pardini
48c0e9acf4
armbian-next: severe bug, countdown counted up 2023-02-18 07:43:16 -03:00
Ricardo Pardini
8444e7e308
armbian-next: bring back swig hostdep -- needed for some u-boot's 2023-02-18 07:43:15 -03:00
Ricardo Pardini
9d26ee1373
armbian-next: logging: squash nasty leaking file descriptor bug due to "tee"
- check and make sure the fd is closed before processing and/or deleting logs.
- change from fd 3 to 13, for extra "this is evil". is it? is 13 an evil number? you decide.
2023-02-18 07:43:14 -03:00
Ricardo Pardini
c4ca062709
armbian-next: tmpfs-utils: last-resort debugging, to stderr, of failed tmpfs unmount 2023-02-18 07:43:13 -03:00
Ricardo Pardini
ff94b79e60
armbian-next: do basic host checks before config if interactive, or during prepare-host if not
- group basic checks at `check_basic_host()`
2023-02-18 07:43:12 -03:00
Tony
f549ddb273
armbian-next: officially support WSL2; pester user for UTF-8 terminal
- new `wsl2.sh` file with WSL2-related functions; checking/validating/pestering user; allow WSL2 (not WSL1)

Co-authored-by: Ricardo Pardini <ricardo@pardini.net>
2023-02-18 07:43:11 -03:00
Ricardo Pardini
bf891d54d9
armbian-next: split prepare_host(), fix .tmp reset trap
- `prepare_host()`: split; do checks earlier and allow them to be interactive
- introduce `exit_if_countdown_not_aborted()` for "Low Disk Space" and other critical conditions
- split `prepare_host()` into interactive & non-interactive parts
- split off `clean_deprecated_mountpoints()` from prepare into `cleaning.sh`
- introduce and use `reset_uid_owner_non_recursive()` for `.tmp` reset in trap, to avoid disasters
- add more logging sections to default-build.sh, avoid unlogged parts
2023-02-18 07:43:10 -03:00
Ricardo Pardini
2d9f9216eb
armbian-next: introduce tmpfs-utils.sh; put LOGDIR and WORKDIR under tmpfs; set CCACHE_TEMPDIR under WORKDIR
- introduce generic `prepare_tmpfs_for()`, which manages it's own cleanup/dir removal
- use it for `WORKDIR` (which is `TMPDIR`) and `LOGDIR`
  - adapt previous cleanup handlers for those, so they delete their contents but not the dir itself (which might be mounted)
- also: make `ARMBIAN_LOG_CLI_ID` readonly together with other superglobals
- set `XDG_RUNTIME_DIR` & `XDG_RUNTIME_DIR` together with `TMPDIR`
- kernel-make.sh: pass `CCACHE_TEMPDIR` down to Kernel make (thanks @the-Going)
2023-02-18 07:43:09 -03:00
Ricardo Pardini
d6200a30e6
armbian-next: make superglobals readonly (DEST/WORKDIR/LOGDIR/SDCARD/MOUNT and others) 2023-02-18 07:43:08 -03:00
Ricardo Pardini
7f21e7d5f3
armbian-next: ccache: show more in ccache debugging 2023-02-18 07:43:07 -03:00
Ricardo Pardini
231e179703
armbian-next: traps: allow for cleanup handlers with arguments; unify around run_one_cleanup_handler()
- show error if trap handler fails
2023-02-18 07:43:06 -03:00
Ricardo Pardini
029076d0a0
armbian-next: docker: use dash-lines before/after launching docker; set ARMBIAN_INSIDE_DOCKERFILE_BUILD=yes when it is so 2023-02-18 07:43:05 -03:00
Ricardo Pardini
aaf391bf19
armbian-next: mark Vagrant CLI as unimplemented 2023-02-18 07:43:04 -03:00
Ricardo Pardini
e633ff584a
armbian-next: debug note about fstab with tmpfs in chroot 2023-02-18 07:43:03 -03:00