From be0624f9475caf11dbd61e360fe1f426c8e16514 Mon Sep 17 00:00:00 2001 From: BigfootACA Date: Fri, 31 May 2024 17:57:39 +0800 Subject: [PATCH] builder: build: bootstrap.py: add more filesystem stages Signed-off-by: BigfootACA --- builder/build/bootstrap.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/builder/build/bootstrap.py b/builder/build/bootstrap.py index 02c861e..7240a90 100644 --- a/builder/build/bootstrap.py +++ b/builder/build/bootstrap.py @@ -88,6 +88,9 @@ def build_rootfs(ctx: ArchBuilderContext): # initialize mount points for chroot mount.init_mount(ctx) + # running add files hooks (for build settings) + filesystem.add_files_all(ctx, "pre-build") + # initialize pacman context pacman = pacman_comp.Pacman(ctx) @@ -103,9 +106,15 @@ def build_rootfs(ctx: ArchBuilderContext): # install all keyring packages before other packages pacman_build.proc_pacman_keyring(ctx, pacman) + # running add files hooks (for pacman settings) + filesystem.add_files_all(ctx, "pre-pacman") + # real install all packages pacman_build.proc_pacman(ctx, pacman) + # running add files hooks (for user settings) + filesystem.add_files_all(ctx, "pre-user") + # reload user databases after install packages ctx.reload_passwd() @@ -124,6 +133,9 @@ def build_rootfs(ctx: ArchBuilderContext): # setup system names (environments / hosts / hostname / machine-info) names.proc_names(ctx) + # running add files hooks (for initramfs settings) + filesystem.add_files_all(ctx, "pre-initramfs") + # recreate initramfs mkinitcpio.proc_mkinitcpio(ctx) @@ -139,6 +151,9 @@ def build_rootfs(ctx: ArchBuilderContext): # cleanup unneeded files cleanup(ctx) + # running add files hooks (after build rootfs) + filesystem.add_files_all(ctx, "post-build") + # reload user database before create images ctx.reload_passwd()