From 7e650742c01fec5bac4b989ddf5b5904b7b3d137 Mon Sep 17 00:00:00 2001 From: Wildan M Date: Fri, 31 Oct 2025 15:45:07 +0700 Subject: [PATCH 1/2] Use cookbook new filesystem config --- mk/ci.mk | 7 ++----- mk/repo.mk | 37 ++++++++++++++++++++++++++++++------- 2 files changed, 32 insertions(+), 12 deletions(-) diff --git a/mk/ci.mk b/mk/ci.mk index 89ee4ca3..267bed70 100644 --- a/mk/ci.mk +++ b/mk/ci.mk @@ -29,12 +29,9 @@ else $(HOST_CARGO) build --manifest-path cookbook/Cargo.toml --release $(HOST_CARGO) build --manifest-path cookbook/pkgar/Cargo.toml --release $(HOST_CARGO) build --manifest-path installer/Cargo.toml --release - export PATH="$(PREFIX_PATH):$$PATH" && \ - export COOKBOOK_HOST_SYSROOT="$(ROOT)/$(PREFIX_INSTALL)" && \ + export CI=1 PATH="$(PREFIX_PATH):$$PATH" COOKBOOK_HOST_SYSROOT="$(ROOT)/$(PREFIX_INSTALL)" && \ PACKAGES="$$($(LIST_PACKAGES) $(LIST_PACKAGES_OPTS) --short -c config/$(ARCH)/ci.toml)" && \ - cd cookbook && \ - ./fetch.sh "$${PACKAGES}" && \ - ./repo.sh $(REPO_NONSTOP) "$${PACKAGES}" + ./cookbook/repo.sh $(REPO_NONSTOP) --with-package-deps "--filesystem=../config/$(ARCH)/ci.toml" endif # CI toolchain diff --git a/mk/repo.mk b/mk/repo.mk index 3c4196d0..51479301 100644 --- a/mk/repo.mk +++ b/mk/repo.mk @@ -6,18 +6,24 @@ ifeq ($(PODMAN_BUILD),1) else export PATH="$(PREFIX_PATH):$$PATH" && \ export COOKBOOK_HOST_SYSROOT="$(ROOT)/$(PREFIX_INSTALL)" && \ - PACKAGES="$$($(LIST_PACKAGES) $(LIST_PACKAGES_OPTS) --short -c $(FILESYSTEM_CONFIG))" && \ - ./cookbook/repo.sh $(REPO_NONSTOP) $(REPO_OFFLINE) --with-package-deps "$${PACKAGES}" + ./cookbook/repo.sh $(REPO_NONSTOP) $(REPO_OFFLINE) --with-package-deps "--filesystem=../$(FILESYSTEM_CONFIG)" mkdir -p $(BUILD) # make sure fstools.tag are newer than the things repo modifies touch $(FSTOOLS_TAG) touch $@ endif - comma := , -# Find recipe +# List all recipes in a tree fashion specified by the filesystem config +tree: $(FSTOOLS_TAG) $(CONTAINER_TAG) +ifeq ($(PODMAN_BUILD),1) + $(PODMAN_RUN) make $@ +else + @cd ./cookbook && ./target/release/repo tree --with-package-deps "--filesystem=../$(FILESYSTEM_CONFIG)" +endif + +# Find recipe for one or more targets separated by comma find.%: $(FSTOOLS_TAG) FORCE ifeq ($(PODMAN_BUILD),1) $(PODMAN_RUN) make $@ @@ -25,7 +31,7 @@ else @cd ./cookbook && ./target/release/repo find $(foreach f,$(subst $(comma), ,$*),$(f)) endif -# Invoke clean.sh for one or more targets separated by comma +# Invoke clean for one or more targets separated by comma c.%: $(FSTOOLS_TAG) FORCE ifeq ($(PODMAN_BUILD),1) $(PODMAN_RUN) make $@ @@ -33,7 +39,7 @@ else cd ./cookbook && ./target/release/repo clean $(foreach f,$(subst $(comma), ,$*),$(f)) endif -# Invoke fetch.sh for one or more targets separated by comma +# Invoke fetch for one or more targets separated by comma f.%: $(FSTOOLS_TAG) FORCE ifeq ($(PODMAN_BUILD),1) $(PODMAN_RUN) make $@ @@ -77,7 +83,24 @@ endif pp.%: $(FSTOOLS_TAG) FORCE $(MAKE) p.$*,--with-package-deps -# Invoke unfetch.sh for one or more targets separated by comma +# Push all recipes specified by the filesystem config +push: $(FSTOOLS_TAG) FORCE + @rm -f $(MOUNTED_TAG) + @if [ ! -d "$(MOUNT_DIR)" ]; then \ + $(MAKE) mount; \ + touch $(MOUNTED_TAG); \ + fi +ifeq ($(PODMAN_BUILD),1) + $(PODMAN_RUN) make $@ +else + cd ./cookbook && ./target/release/repo push --with-package-deps "--filesystem=../$(FILESYSTEM_CONFIG)" "--sysroot=../$(MOUNT_DIR)" +endif + @if [ -f $(MOUNTED_TAG) ]; then \ + $(MAKE) unmount && rm -f $(MOUNTED_TAG); \ + else echo "Not unmounting by ourself, don't forget to do it"; \ + fi + +# Invoke unfetch for one or more targets separated by comma u.%: $(FSTOOLS_TAG) FORCE ifeq ($(PODMAN_BUILD),1) $(PODMAN_RUN) make $@ From d675e65fdc5e60cdf1c30ae0296220d811266c51 Mon Sep 17 00:00:00 2001 From: Wildan M Date: Fri, 31 Oct 2025 23:15:21 +0700 Subject: [PATCH 2/2] Update cookbook --- cookbook | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbook b/cookbook index adbb0327..49a246c2 160000 --- a/cookbook +++ b/cookbook @@ -1 +1 @@ -Subproject commit adbb0327804dd34386c787895afb662ef596bdef +Subproject commit 49a246c2b9d25e6bbd4690799a333e95b0d52cbb