- refactor `prepare_host_binfmt_qemu()` out of `prepare_host_noninteractive()` and into `rootfs/qemu-static.sh`
- further split into more functions and return early to avoid deep nesting
- implement force import and load of qemu-arm for non-armhf capable arm64 hosts (incl magic numbers)
- enhance `deploy_qemu_binary_to_chroot()` & `undeploy_qemu_binary_from_chroot()`;
- add 2nd param "caller" for better logging/tracking
- does sanity-check and preserve existing binary if it exists
- explicitly deploy/undeploy for the 3 cases:
- image: moved undeploy from `post_debootstrap_tweaks()` into image build proper for consistency
- rootfs: was leaving trash behind (since post_debootstrap_tweaks never ran for rootfs), now properly undeploys
- initrd: was already fine, just added caller info
- added `arch-test` host dependency
- ensure `arch-test ${ARCH}` works during prepare-host
- > tl,dr: "can build 32-bit armv7 armhf using Apple silicon; can use rootfs cache cross-arch reliably"
- `DEBOOTSTRAP_DIR` must be set during the 1st stage, but NOT the second stage
- latest devel versions might be missing scripts for old releases; just symlink to the default one if so
- this hopefully should _end_ the debootstrap madness we've been handling, at least until we get around to mmdebstrap (Perl) one day
- rationale: we don't want an eternal chicken-egg problem with rootfs vs repo.
- but, desktop rootfs require some parts of repo. case in point: `system-monitoring-center`
- so only add certain components of repo (-desktop, -utils) to rootfs so that is honored
- introduce `custom_apt_repo()` hook for extensions to add their repos as well
- same chicken-egg-avoiding is possible via param `CUSTOM_REPO_WHEN`
- revert #5139 Revert "Apt lists is needed for synpatic index generation"
This reverts commit 63e9bd3baa
- this actually only left junk in rootfs cache for the future to find
- rootfs: rootfs-create: show a summary of the 20 biggest dirs, right before tarring the rootfs (for debugging)
- rootfs: rootfs-create: show usage of caches between first and second stages
- rootfs: rootfs-create: cleanup junk left by `debootstrap` after second stage
- rootfs: rootfs-create: _always_ clean apt stuff at the end
- rename `apt_purge_unneeded_packages()` to `apt_purge_unneeded_packages_and_clean_apt_caches()` for clarity
- image: `apt_purge_unneeded_packages_and_clean_apt_caches()`: warn if apt caches not empty; clean them off, always.
- host-utils: `local_apt_deb_cache_prepare()`: also test the target, warn if not empty
- extension: cleanup-space-final-image: do NOT clean apt stuff. done in core now
- the metric shit-ton of debugs added should help the next person who faces this in the future
* 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>
- 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>
- 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!