imagebuilder: fix APK for packages dir and cache
authorPaul Spooren <mail@aparcar.org>
Fri, 1 Nov 2024 11:33:49 +0000 (12:33 +0100)
committerPaul Spooren <mail@aparcar.org>
Sat, 9 Nov 2024 15:46:35 +0000 (16:46 +0100)
commitad1c1b7047b2e716b75031e26af544532f429f10
tree40b3da3b4f8edec1d55b91f4334a18c0c551d474
parent15de218a566c0563adcc184c5aa83b71b24e8cde
imagebuilder: fix APK for packages dir and cache

This commit solves multiple issues. First of just install the three
special packages base-files, libc and kernel directly from the index. In
upstream indexes, those will never appear to prevent accidental upgrades
may breaking the system.

Next, enable caching for the ImageBuilder, which speeds up consecutive
builds from ~33 seconds to ~5 seconds. Using cache however makes APK
create the folder `/var/cache/apk/` which conflicts with the base-files
installation, which ships a symlink from `/var` to `/tmp`, so specify
`--no-cache` for the rootfs initialization.

Lastly, drop the use of `apk update` since APK automatically does that.

Signed-off-by: Paul Spooren <mail@aparcar.org>
include/rootfs.mk
package/Makefile
target/imagebuilder/Makefile
target/imagebuilder/files/Makefile