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