Commit Graph

443 Commits

Author SHA1 Message Date
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
Ricardo Pardini
1075f1b962
armbian-next: make sure temporary kernel and u-boot CLI commands always build a kernel/u-boot even if cached
- really, it's time to split off those into actual, proper CLIs
- remove a forgotten `KDEB_CHANGELOG_DIST` left there
2023-02-18 07:43:02 -03:00
Ricardo Pardini
d8254d1e6e
armbian-next: docker: fix Dockerfile output indentation & warning msgs about generation 2023-02-18 07:43:01 -03:00
Ricardo Pardini
43b4f45018
armbian-next: introduce POOR_MAN_PROFILER=yes (under ANSI_COLOR=none)
- turns out EPOCHREALTIME can be comma separated, and have multiple leading zeroes
2023-02-18 07:43:00 -03:00
Ricardo Pardini
2a68cc6e9e
armbian-next: optimize for CONFIG_DEFS_ONLY=yes, skipping stacktraces/git info 2023-02-18 07:42:59 -03:00
Ricardo Pardini
b7fa6fa8b0
armbian-next: optimize config_source_board_file(), now 600x faster by not reusing (slow) code from interactive 2023-02-18 07:42:58 -03:00
Ricardo Pardini
eb7b80983b
armbian-next: fix re-launching of CLI commands under sudo (Docker was ok) 2023-02-18 07:42:52 -03:00
Ricardo Pardini
78fd35a1e3
armbian-next: better logging for kernel_prepare_bare_repo_from_oras_gitball(); remove dead code
- remove dead code used to fetch tags, back from pre-bundle days
2023-02-18 07:42:51 -03:00
Ricardo Pardini
6cf26e4c59
armbian-next: don't warn about using extlinux 2023-02-18 07:42:49 -03:00
Ricardo Pardini
4d17aa2a98
armbian-next: rootfs: bunch'o'fixes, introduce disable_systemd_service_sdcard() to stop repeating incantantion
- fix a bunch of quoting issues
- use runners for chroot stuff
- don't error out of failed disable
- makes building `sid` again possible
- add a bunch of TODO's
2023-02-18 07:42:48 -03:00
Ricardo Pardini
b94074ec0a
armbian-next: Docker: abstract away and only run "docker info" once, it's very expensive 2023-02-18 07:42:47 -03:00
Ricardo Pardini
7879895049
armbian-next: core extensions for xfs / f2fs / brtfs / LUKS/cryptroot hostdeps; enable in main-config 2023-02-18 07:42:46 -03:00
Ricardo Pardini
7beeae6219
armbian-next: Python tooling: use consolidated+hashed+cached pip base/pycache; don't pip during Dockerfile build, nor cli-requirements
- consolidate at `prepare_python_and_pip()`
- sanity check for Python version 3.9+ regardless of HOSTRELEASE
- TODO: pip vs sudo/root: need pip 22.2+ to curb warning, not doing it
2023-02-18 07:42:44 -03:00
Ricardo Pardini
350cf62ee0
armbian-next: don't copy the host's keyrings to image
- why did we do this?
- there could be _anything_ in the host keyring, and it's not needed
2023-02-18 07:42:43 -03:00
Ricardo Pardini
461f82f95a
armbian-next: completely remove acl (which provided getfacl) and it's usages (basic deps) 2023-02-18 07:42:42 -03:00
Ricardo Pardini
9933fdc993
armbian-next: consider "Provided" installed packages when determining what is missing from host-side dependencies
- stop trying to install stuff that's already installed via Provides
- @TODO: something similar might be needed for rootfs as well
2023-02-18 07:42:41 -03:00
Ricardo Pardini
b5a777c4ac
armbian-next: remove REPO_STORAGE and REPO_CONFIG -- unused 2023-02-18 07:42:40 -03:00
Ricardo Pardini
53266feff8
armbian-next: kernel: deterministic .config mtime handling; kernel build logging sections reorg
- .config is now compared with previous one byte-wise, diff shown, and mtime preserved directly via `cp -p`
- this does away with the previous mtime-based BS I had written during the fasthash era (and thus remove file-mtime.sh, regen lib)
- split some functions, to better control the interactive piece in the _middle_ of kernel config process
- no more `kernel_config_maybe_interactive()`, now `kernel_config()` that controls its own logging sections
- extract `kernel_determine_toolchain()` out of config into make
- introduce internal hook `armbian_kernel_config()` that runs before custom version (for .config defaults, coming soon)
2023-02-18 07:42:39 -03:00
Ricardo Pardini
c99e06a84b
armbian-oleg: logging: disable debugging (set -x) of generated postinst/etc kernel scripts (board-side, but also chroot logging) 2023-02-18 07:42:38 -03:00
Ricardo Pardini
6b09e97b4f
armbian-oleg: logging: drastically curb / make more useful kernel packaging logging 2023-02-18 07:42:37 -03:00
Ricardo Pardini
00e1dec8a2
armbian-next: odroidxu4 vs kernel: move firmware hack to family using extension hook
- @TODO: is this even needed/used anymore?
2023-02-18 07:42:36 -03:00
Ricardo Pardini
878332fea1
armbian-next: cli: half-assed, legacy based, kernel and u-boot cli commands
- @TODO: a placeholder for now, needs refactoring after patching-hash/versioned-kernel work
2023-02-18 07:42:35 -03:00
Ricardo Pardini
ef36016ee4
armbian-next: logging: reinit logging after processing cmdline parameters
- so `DEBUG=yes` actually works
2023-02-18 07:42:34 -03:00
Ricardo Pardini
62bc394738
armbian-oleg: curb logging from building armbian-plymouth-theme; do it in a logging section, like the others 2023-02-18 07:42:33 -03:00
Ricardo Pardini
e8306a8712
armbian-oleg: curb logging from building armbian-firmware 2023-02-18 07:42:32 -03:00
Ricardo Pardini
d979c73c1d
armbian-next: split compilation/debs.sh; compile_xilinx_bootgen() moved to family 2023-02-18 07:42:31 -03:00
Ricardo Pardini
898d567ae0
armbian-oleg: if commands fail, write to log in bright red 2023-02-18 07:42:30 -03:00
Ricardo Pardini
68d8f10666
armbian-oleg: make chroot_sdcard_apt_get_install_dry_run() logging more useful by filtering the noise out 2023-02-18 07:42:29 -03:00
Ricardo Pardini
c7c7d2e0d6
armbian-oleg: drastically curb apt-get logging when running in chroot 2023-02-18 07:42:28 -03:00
Ricardo Pardini
8944c56255
armbian-oleg: drastically curb boot_logo() logging 2023-02-18 07:42:27 -03:00
Ricardo Pardini
75997b0e2c
armbian-oleg: drastically curb update-initramfs logging, unless SHOW_DEBUG=yes
- also, don't let the logging filter be the reason for failures
2023-02-18 07:42:26 -03:00
Ricardo Pardini
12ffcd6319
armbian-oleg: curb rsync logging during bsp 2023-02-18 07:42:25 -03:00
Ricardo Pardini
2c0c968645
armbian-oleg: curb Python launcher logs 2023-02-18 07:42:24 -03:00
Ricardo Pardini
95ffd76b3b
armbian-oleg: curb apt-get's logging with -q / -qq 2023-02-18 07:42:23 -03:00
Ricardo Pardini
b03530dacd
armbian-oleg: better logs; only include non-empty .log files 2023-02-18 07:42:22 -03:00
Ricardo Pardini
df058ea3f1
armbian-next: fix quoting of retry var (cosmetic)
- this commit is proof of OCD
2023-02-18 07:42:21 -03:00
Ricardo Pardini
d24f363187
armbian-oleg: logging: new logfile format; SHOW_LOG=yes default; introduce DEBUG=yes
- default `SHOW_LOG=yes` if user on terminal
- shortcut: `DEBUG=yes` defaults both `SHOW_LOG=yes` & `SHOW_DEBUG=yes`
- much simpler logging format for log file
- skip all display_alert()'s more verbose than DEBUG from logfile
  - set `DEBUG=yes` to log everything again
- skip Markdown assets from being included in ANSI log
- use of `ccze`
- introduce internal var for controlling COMMAND-level log
- remove unused `run_on_sdcard()` that somehow was left there
- drop `export_html_logs()` and `EXPORT_HTML_LOG` -- are no more
2023-02-18 07:42:20 -03:00
Ricardo Pardini
7493ce1b09
armbian-next: long overdue split of logging.sh 2023-02-18 07:42:19 -03:00
Ricardo Pardini
5b024f64ad
armbian-next: curb free_loop_device_retried()'s logging on first try 2023-02-18 07:42:18 -03:00
Ricardo Pardini
1ed9dada4d
armbian-next: curb aria2c's complaining a bit 2023-02-18 07:42:17 -03:00
Ricardo Pardini
3563a5f1e2
armbian-next: curb down git fetch logging; be verbose if user on terminal & not logging 2023-02-18 07:42:16 -03:00
Ricardo Pardini
2a22cee345
armbian-next: curb down wget logging for ORAS tooling download 2023-02-18 07:42:15 -03:00
Ricardo Pardini
47af820f5d
armbian-oleg: junk: drastically reduce host-side dependencies / "remove junk"
- remove a lot of hopefully / hardly confirmed, unused dependencies
- don't use crossbuild-essential-xxx; avoid the c++ compiler that comes with it, install gcc-only instead
- hostdeps: use `libc6-dev make dpkg-dev gcc` (without `g++`) instead of `build-essential`
- drop `btrfs-progs` and `f2fs-tools`  (@TODO add in extension when/whereused)
- more: drop `cryptsetup` (@TODO add in extension when/whereused)
- don't be too quiet when doing apt-update for hostdeps
2023-02-18 07:42:14 -03:00
Ricardo Pardini
93c8ce99af
armbian-next: apt-cacher-ng is now optional and activated via MANAGE_ACNG=yes; drop NO_APT_CACHER
- acng is constant source of headaches
- we don't need it anymore, since we have local caching now
- You can also have acng running on a different machine/container and set `APT_PROXY_ADDR=xxx:3142` if you're running a build farm
2023-02-18 07:42:12 -03:00
Ricardo Pardini
d4d3c1346c
armbian-oleg: split hostdeps again, full of ifs, and reduce the minimum set of pkgs for Oleg-conditions while trying to keep Docker full
- probably breaks a lot of stuff; c++ compilers, distcc, possibly others
- split into late_prepare_host_dependencies / early_prepare_host_dependencies calling adaptative_prepare_host_dependencies() full of if's

also:
- calc deps out of configuration
- reorg checks into obtain_and_check_host_release_and_arch()
2023-02-18 07:42:11 -03:00
Ricardo Pardini
225e878743
armbian-oleg: introduce DOCKER_SIMULATE_CLEAN=yes so I can pretend to be Oleg, but using Docker
- if set, the Docker launcher will not install any dependencies
- so every Docker run will reinstall everything from scratch
- do NOT use, **even if you're Oleg**
2023-02-18 07:42:10 -03:00
Ricardo Pardini
d7ea267389
armbian-oleg: handle error during host deps installation (Oleg has a mangled sources.list?) 2023-02-18 07:42:09 -03:00
Ricardo Pardini
3320081192
armbian-next: better logging for early apt installs during prepare_host_basic() 2023-02-18 07:42:08 -03:00
Ricardo Pardini
e6b1c4d875
armbian-next: CLEAN_LEVEL=make-kernel now does git clean -xfd instead, faster and 100% clean 2023-02-18 07:42:07 -03:00
Ricardo Pardini
4f743caab8
armbian-next: drivers-harness: force -c commit.gpgsign=false during git commit 2023-02-18 07:42:06 -03:00
Ricardo Pardini
8aa0ee640f
armbian-next: rootfs: don't stop if df -h fails
- still needs work
2023-02-18 07:42:05 -03:00
Ricardo Pardini
1e9bd386c5
armbian-next: SYNC_CLOCK: don't attempt if ntpd is running; don't fail if ntpdate fails for any reason 2023-02-18 07:42:04 -03:00
Ricardo Pardini
b380ba4d86
armbian-next: further split of config-prepare() and do_main_configuration() into do_extra_configuration() - fixes interactive desktop 2023-02-18 07:42:03 -03:00
Ricardo Pardini
e084991abc
armbian-next: copy modified config + defconfig back from where it came from when KERNEL_CONFIGURE=yes 2023-02-18 07:41:57 -03:00
Ricardo Pardini
d152574ea8
armbian-next: move aggregation to after prepare_host(), and thus out of config, and with correct Python deps 2023-02-18 07:41:53 -03:00
Ricardo Pardini
8d55a3258b
armbian-next: [focal-host] don't use git's --initial-branch which is not supported on focal's git 2023-02-18 07:41:52 -03:00
Ricardo Pardini
ac81b410e0
armbian-next: [focal-host] don't use git format-patch's --no-encode-email-headers which is not supported on focal's git 2023-02-18 07:41:51 -03:00
Ricardo Pardini
2b54793899
armbian-next: [focal-host] run pip3 under the python3_binary_path (so coerce it to use 3.9 under focal) 2023-02-18 07:41:50 -03:00
Ricardo Pardini
eda272045d
armbian-next: [focal-host] remove usages of declare -I, not supported under focal's bash
- this is bad/terrible and will cause a lot of shellcheck errors... but such is life
2023-02-18 07:41:49 -03:00
Ricardo Pardini
6dda660fb6
armbian-next: [focal-host] try to support focal-like host OS's again, by avoiding git's --no-auto-maintenance 2023-02-18 07:41:48 -03:00
Ricardo Pardini
6cb12a3397
armbian-next: [focal-host] try to support focal-like host OS's again, via python3.9 (and drop buster completely)
- completely remove support for building under `buster` -- that's way too old, sorry.
- de-hardcode `python3` invocations, instead use `python3_binary_path` set by `prepare_python3_binary_for_python_tools()`
- juggle `$HOSTRELEASE`: read from actual host, or determined from Docker image name (during Dockerfile build)
- TL;DR: include and use `python3.9` for focal-like host OS's
2023-02-18 07:41:47 -03:00
Ricardo Pardini
f167864f2c
armbian-next: split of config-prepare into multiple functions, allowing for logging of all non-interactive sections
- introduce `do_with_conditional_logging()` which only starts logging sections if `do_logging=no`
- with this we should get complete logs (ofc except for the interactive sections)
2023-02-18 07:41:46 -03:00
Ricardo Pardini
61d4691e09
armbian-next: drivers-harness: make sure cached patch is valid; write it first to tmp file; redirect inside subshell
- otherwise if format-patch failed, it would still create the (invalid) file which would be used next time
2023-02-18 07:41:45 -03:00
Ricardo Pardini
92a4296a62
armbian-next: drivers-harness: pass HOME/PATH explicitly to git commit/format-patch 2023-02-18 07:41:44 -03:00
Ricardo Pardini
0e8bddd1e8
armbian-next: cli: config-dump: can now run on any bash/coreutils-enabled machine; remove some useless vars from dump 2023-02-18 07:41:42 -03:00
Ricardo Pardini
c33b59d61b
armbian-next: config: reduce bash scope & remove some vars un-needed outside of config 2023-02-18 07:41:40 -03:00
Ricardo Pardini
166a34da86
armbian-next: avoid linux-version during configuration; declare -g instead of export
- config might run on a non-Linux, bash-capable, GNU coreutils enabled machine, so avoid `linux-version`
- use `declare -g` instead of `export` for most of `prepare_and_config_main_build_single()`
2023-02-18 07:41:40 -03:00
Ricardo Pardini
f252138693
armbian-next: call hook post_aggregate_packages() only after actually aggregating 2023-02-18 07:41:38 -03:00
Ricardo Pardini
6c027ba552
armbian-next: delete old aggregation code from config 2023-02-18 07:41:37 -03:00
Ricardo Pardini
67108e31c0
armbian-next: move var HOSTRELEASE from config to prepare_host() 2023-02-18 07:41:36 -03:00
Ricardo Pardini
6797016cfb
armbian-next: move compilation vars (chtreads, ccache stuff) from config to compile 2023-02-18 07:41:35 -03:00
Ricardo Pardini
60fb19b48d
Obsolete: kernel-headers via full source + make modules_prepare for 4.19 kernels. [later removed] 2023-02-18 07:41:34 -03:00
Ricardo Pardini
68fafebf9f
Obsolete: try for working armhf kernel-headers. leading nowhere. move to kernel-source / make modules_prepare later. [later re-done] 2023-02-18 07:41:33 -03:00
Ricardo Pardini
59278d1869
armbian-next: remove spurious debug logging with no useful info "Error-related files found" 2023-02-18 07:41:32 -03:00
Ricardo Pardini
b8e595aef4
armbian-next: drivers-harness: include the revert-IPX patch as a "driver" before all others 2023-02-18 07:41:28 -03:00
Ricardo Pardini
c18357fe56
armbian-next: drivers-harness: remove commit-date, do proper logging & escaping for git add/commit/format-patch
- seems like I indulged in the same mistakes I've been correcting for years ("&> /dev/null") - d'oh
2023-02-18 07:41:27 -03:00
Ricardo Pardini
ec2e6c42be
armbian-next: happy new year, bump Igor's copyright 2023-02-18 07:41:25 -03:00
Ricardo Pardini
43f268fdcb
armbian-next: remove very old extlinux killswitch 2023-02-18 07:41:24 -03:00
Ricardo Pardini
c61b985417
armbian-next: better logging in distro-agnostic.sh
- still _a lot_ to fix
2023-02-18 07:41:23 -03:00
Ricardo Pardini
8f3fd355eb
armbian-next: tune logging in multiple places, there was a lot of redundant/un-needed info's 2023-02-18 07:41:22 -03:00
Ricardo Pardini
7987dad34d
armbian-next: Python tools (aggregation/patching): use separate pycache dir in ./cache; use unbuffered stdout/stderr 2023-02-18 07:41:21 -03:00
Ricardo Pardini
59031be6b3
armbian-next: only put systemd-resolved's symlink in place if _not_ using NetworkManager
- why is it even installed? dunno, but fix anyway.
2023-02-18 07:41:20 -03:00
Ricardo Pardini
f8b141cdf0
armbian-next: fix: only aggregate packages if building images (AR-1471) 2023-02-18 07:41:19 -03:00
Ricardo Pardini
690ca4df7c
armbian-next: add (trap) cleanup handler to reset ./tmp and ./output to original pre-sudo UID before exiting, even with failure/abort 2023-02-18 07:41:17 -03:00
Ricardo Pardini
9973010972
armbian-next: Python patching: pass $HOME/$PATH to Python, so git can find .gitconfig and Python can find git
- add sanity check before handling the Git repo in Python (call `status()` to make sure access is OK)
2023-02-18 07:41:16 -03:00
Ricardo Pardini
12b31afa51
armbian-next: git: mark submodule's dirs as safe before recursive fetch_from_repo() 2023-02-18 07:41:15 -03:00
Ricardo Pardini
3bc8afd593
armbian-next: refactor losetup -d ... into free_loop_device_insistent() which retries 10 times 2023-02-18 07:41:14 -03:00
Ricardo Pardini
f679b81b10
armbian-next: git: use --recurse-submodules=no for fetch; fetch_from_repo() handles submodules separately
- also remove `du` working copy size debugging
2023-02-18 07:41:13 -03:00
Ricardo Pardini
65da2a697f
armbian-next: remove @TODO for stuff already done 2023-02-18 07:41:12 -03:00
Ricardo Pardini
ddbb91653f
armbian-next: reset_uid_owner for the markdown log file too 2023-02-18 07:41:11 -03:00
Ricardo Pardini
2f9a4470c7
armbian-next: validate cmdline params against malformed
- eg: `./compile.sh $ERROR=here` is caught now
2023-02-18 07:41:10 -03:00
Ricardo Pardini
093e60d111
armbian-next: exec into sudo when relaunching (AR-1452)
- with `exec`, `sudo` replaces the current shell, and thus never returns
2023-02-18 07:41:09 -03:00
Ricardo Pardini
9370c19a44
armbian-next: drop old code for patching & fasthash
- split the modification time stuff to general
2023-02-18 07:41:05 -03:00
Ricardo Pardini
143ba996ca
armbian-next: git: setup the worktree first before trying to ensure safe 2023-02-18 07:41:04 -03:00
Ricardo Pardini
5384a7dcbc
armbian-next: ignore git errors due to missing 'origin' remote and/or revisions of ${SRC}/.git during main-config 2023-02-18 07:41:03 -03:00
Ricardo Pardini
85009a6431
armbian-next: git worktree: forcefully fix the worktree's reference to the bare repo, and vice-versa 2023-02-18 07:41:02 -03:00
Ricardo Pardini
e607e9e54e
armbian-next: remove spurious output.log redirections in downloads.sh; warn that download_and_verify() is unhandled in armbian-next 2023-02-18 07:41:01 -03:00
Ricardo Pardini
bd04f71a05
armbian-next: Revert "Fix issues 4589 (#4614)" (installing HEADERS dependencies manually)
- This reverts commit 36d9420d
- this makes no sense
- we don't do adhoc installs in armbian-next
2023-02-18 07:41:00 -03:00
Ricardo Pardini
9200a2ce0c
armbian-next: bring find_toolchain() back from the dead; force SKIP_EXTERNAL_TOOLCHAINS=no to force use external toolchains
- handle a lot of corner cases, some toolchains are i386-only and won't run on modern x64 systems
2023-02-18 07:40:58 -03:00
Ricardo Pardini
39ac9e00b1
armbian-next: docker: don't try to double init when recovering from failed pull 2023-02-18 07:40:57 -03:00
Ricardo Pardini
7842113c1d
armbian-next: make sure at least one board config file is sourced, otherwise misspell BOARD= is hard to find 2023-02-18 07:40:56 -03:00