dump tgz complexity. Layers are already compressed

This commit is contained in:
Lance Vick 2024-02-06 01:21:20 -08:00
parent ab6ccf6678
commit 990ad1a2f3
Signed by: lrvick
GPG Key ID: 8E47A1EC35A1551D
6 changed files with 334 additions and 332 deletions

View File

@ -1,18 +1,18 @@
.PHONY: bootstrap
bootstrap: \
out/stage0.tgz \
out/stage1.tgz \
out/stage2.tgz \
out/stage3.tgz
out/stage0.tar \
out/stage1.tar \
out/stage2.tar \
out/stage3.tar
out/stage0.tgz:
out/stage0.tar:
$(call build,bootstrap,stage0)
out/stage1.tgz: out/stage0.tgz
out/stage1.tar: out/stage0.tar
$(call build,bootstrap,stage1)
out/stage2.tgz: out/stage1.tgz
out/stage2.tar: out/stage1.tar
$(call build,bootstrap,stage2)
out/stage3.tgz: out/stage2.tgz
out/stage3.tar: out/stage2.tar
$(call build,bootstrap,stage3)

View File

@ -1,377 +1,377 @@
.PHONY: core
core: \
out/rust.tgz \
out/go.tgz \
out/python.tgz \
out/perl.tgz \
out/gcc.tgz \
out/llvm.tgz
out/rust.tar \
out/go.tar \
out/python.tar \
out/perl.tar \
out/gcc.tar \
out/llvm.tar
out/musl.tgz: out/stage3.tgz
out/musl.tar: out/stage3.tar
$(call build,core,musl)
out/busybox.tgz: out/stage3.tgz
out/busybox.tar: out/stage3.tar
$(call build,core,busybox)
out/binutils.tgz: out/stage3.tgz out/musl.tgz
out/binutils.tar: out/stage3.tar out/musl.tar
$(call build,core,binutils)
out/make.tgz: out/stage3.tgz
out/make.tar: out/stage3.tar
$(call build,core,make)
out/gcc.tgz: out/stage3.tgz out/binutils.tgz out/musl.tgz
out/gcc.tar: out/stage3.tar out/binutils.tar out/musl.tar
$(call build,core,gcc)
out/bash.tgz: \
out/busybox.tgz \
out/gcc.tgz \
out/binutils.tgz \
out/musl.tgz \
out/make.tgz
out/bash.tar: \
out/busybox.tar \
out/gcc.tar \
out/binutils.tar \
out/musl.tar \
out/make.tar
$(call build,core,bash)
out/m4.tgz: \
out/busybox.tgz \
out/gcc.tgz \
out/binutils.tgz \
out/musl.tgz \
out/make.tgz
out/m4.tar: \
out/busybox.tar \
out/gcc.tar \
out/binutils.tar \
out/musl.tar \
out/make.tar
$(call build,core,m4)
out/perl.tgz: \
out/gcc.tgz \
out/binutils.tgz \
out/busybox.tgz \
out/make.tgz \
out/musl.tgz
out/perl.tar: \
out/gcc.tar \
out/binutils.tar \
out/busybox.tar \
out/make.tar \
out/musl.tar
$(call build,core,perl)
out/autoconf.tgz: \
out/busybox.tgz \
out/gcc.tgz \
out/binutils.tgz \
out/musl.tgz \
out/make.tgz \
out/perl.tgz \
out/m4.tgz
out/autoconf.tar: \
out/busybox.tar \
out/gcc.tar \
out/binutils.tar \
out/musl.tar \
out/make.tar \
out/perl.tar \
out/m4.tar
$(call build,core,autoconf,,fetch)
$(call build,core,autoconf)
out/automake.tgz: \
out/busybox.tgz \
out/gcc.tgz \
out/binutils.tgz \
out/musl.tgz \
out/make.tgz \
out/perl.tgz \
out/autoconf.tgz \
out/m4.tgz
out/automake.tar: \
out/busybox.tar \
out/gcc.tar \
out/binutils.tar \
out/musl.tar \
out/make.tar \
out/perl.tar \
out/autoconf.tar \
out/m4.tar
$(call build,core,automake)
out/sed.tgz: \
out/busybox.tgz \
out/gcc.tgz \
out/binutils.tgz \
out/musl.tgz \
out/make.tgz
out/sed.tar: \
out/busybox.tar \
out/gcc.tar \
out/binutils.tar \
out/musl.tar \
out/make.tar
$(call build,core,sed)
out/libtool.tgz: \
out/busybox.tgz \
out/gcc.tgz \
out/binutils.tgz \
out/musl.tgz \
out/make.tgz \
out/bash.tgz \
out/sed.tgz \
out/m4.tgz
out/libtool.tar: \
out/busybox.tar \
out/gcc.tar \
out/binutils.tar \
out/musl.tar \
out/make.tar \
out/bash.tar \
out/sed.tar \
out/m4.tar
$(call build,core,libtool)
out/pkgconf.tgz: \
out/busybox.tgz \
out/gcc.tgz \
out/binutils.tgz \
out/musl.tgz \
out/make.tgz \
out/libtool.tgz
out/pkgconf.tar: \
out/busybox.tar \
out/gcc.tar \
out/binutils.tar \
out/musl.tar \
out/make.tar \
out/libtool.tar
$(call build,core,pkgconf)
out/libunwind.tgz: \
out/busybox.tgz \
out/gcc.tgz \
out/binutils.tgz \
out/musl.tgz \
out/make.tgz \
out/bash.tgz \
out/autoconf.tgz \
out/automake.tgz \
out/libtool.tgz
out/libunwind.tar: \
out/busybox.tar \
out/gcc.tar \
out/binutils.tar \
out/musl.tar \
out/make.tar \
out/bash.tar \
out/autoconf.tar \
out/automake.tar \
out/libtool.tar
$(call build,core,libunwind)
out/linux-headers.tgz:
out/linux-headers.tar:
$(call build,core,linux-headers)
out/openssl.tgz: \
out/gcc.tgz \
out/binutils.tgz \
out/busybox.tgz \
out/linux-headers.tgz \
out/musl.tgz
out/openssl.tar: \
out/gcc.tar \
out/binutils.tar \
out/busybox.tar \
out/linux-headers.tar \
out/musl.tar
$(call build,core,openssl)
out/go.tgz: \
out/gcc.tgz \
out/binutils.tgz \
out/busybox.tgz \
out/bash.tgz \
out/musl.tgz
out/go.tar: \
out/gcc.tar \
out/binutils.tar \
out/busybox.tar \
out/bash.tar \
out/musl.tar
$(call build,core,go)
out/python.tgz: \
out/gcc.tgz \
out/perl.tgz \
out/binutils.tgz \
out/busybox.tgz \
out/openssl.tgz \
out/zlib.tgz \
out/make.tgz \
out/musl.tgz
out/python.tar: \
out/gcc.tar \
out/perl.tar \
out/binutils.tar \
out/busybox.tar \
out/openssl.tar \
out/zlib.tar \
out/make.tar \
out/musl.tar
$(call build,core,python)
out/ninja.tgz: \
out/busybox.tgz \
out/gcc.tgz \
out/binutils.tgz \
out/musl.tgz \
out/make.tgz \
out/openssl.tgz \
out/python.tgz
out/ninja.tar: \
out/busybox.tar \
out/gcc.tar \
out/binutils.tar \
out/musl.tar \
out/make.tar \
out/openssl.tar \
out/python.tar
$(call build,core,ninja)
out/cmake.tgz: \
out/busybox.tgz \
out/gcc.tgz \
out/binutils.tgz \
out/ninja.tgz \
out/musl.tgz \
out/make.tgz \
out/linux-headers.tgz
out/cmake.tar: \
out/busybox.tar \
out/gcc.tar \
out/binutils.tar \
out/ninja.tar \
out/musl.tar \
out/make.tar \
out/linux-headers.tar
$(call build,core,cmake)
out/py-setuptools.tgz: \
out/busybox.tgz \
out/python.tgz \
out/zlib.tgz
out/py-setuptools.tar: \
out/busybox.tar \
out/python.tar \
out/zlib.tar
$(call build,core,py-setuptools)
out/zlib.tgz: \
out/busybox.tgz \
out/gcc.tgz \
out/binutils.tgz \
out/musl.tgz \
out/make.tgz
out/zlib.tar: \
out/busybox.tar \
out/gcc.tar \
out/binutils.tar \
out/musl.tar \
out/make.tar
$(call build,core,zlib)
out/llvm13.tgz: \
out/gcc.tgz \
out/python.tgz \
out/py-setuptools.tgz \
out/perl.tgz \
out/binutils.tgz \
out/cmake.tgz \
out/ninja.tgz \
out/busybox.tgz \
out/zlib.tgz \
out/musl.tgz
out/llvm13.tar: \
out/gcc.tar \
out/python.tar \
out/py-setuptools.tar \
out/perl.tar \
out/binutils.tar \
out/cmake.tar \
out/ninja.tar \
out/busybox.tar \
out/zlib.tar \
out/musl.tar
$(call build,core,llvm,13.0.1)
out/llvm.tgz: \
out/gcc.tgz \
out/python.tgz \
out/py-setuptools.tgz \
out/perl.tgz \
out/binutils.tgz \
out/cmake.tgz \
out/ninja.tgz \
out/busybox.tgz \
out/zlib.tgz \
out/musl.tgz
out/llvm.tar: \
out/gcc.tar \
out/python.tar \
out/py-setuptools.tar \
out/perl.tar \
out/binutils.tar \
out/cmake.tar \
out/ninja.tar \
out/busybox.tar \
out/zlib.tar \
out/musl.tar
$(call build,core,llvm)
$(BUILDER) tag $(REGISTRY)/llvm $(REGISTRY)/llvm:16
$(BUILDER) tag $(REGISTRY)/llvm $(REGISTRY)/llvm:16.0.6
out/rust1.54.tgz: \
out/gcc.tgz \
out/bash.tgz \
out/zlib.tgz \
out/python.tgz \
out/py-setuptools.tgz \
out/perl.tgz \
out/libunwind.tgz \
out/pkgconf.tgz \
out/llvm13.tgz \
out/binutils.tgz \
out/cmake.tgz \
out/make.tgz \
out/busybox.tgz \
out/musl.tgz
out/rust1.54.tar: \
out/gcc.tar \
out/bash.tar \
out/zlib.tar \
out/python.tar \
out/py-setuptools.tar \
out/perl.tar \
out/libunwind.tar \
out/pkgconf.tar \
out/llvm13.tar \
out/binutils.tar \
out/cmake.tar \
out/make.tar \
out/busybox.tar \
out/musl.tar
$(call build,core,rust,1.54.0,bootstrap-package)
out/rust1.55.tgz: out/rust1.54.tgz
out/rust1.55.tar: out/rust1.54.tar
$(call build,core,rust,1.55.0,package,--build-arg BUILD_VERSION=1.54.0)
out/rust1.56.tgz: out/rust1.55.tgz
out/rust1.56.tar: out/rust1.55.tar
$(call build,core,rust,1.56.0,package,--build-arg BUILD_VERSION=1.55.0)
out/rust1.57.tgz: out/rust1.56.tgz
out/rust1.57.tar: out/rust1.56.tar
$(call build,core,rust,1.57.0,package,--build-arg BUILD_VERSION=1.56.0)
out/rust1.58.tgz: out/rust1.57.tgz
out/rust1.58.tar: out/rust1.57.tar
$(call build,core,rust,1.58.0,package,--build-arg BUILD_VERSION=1.57.0)
out/rust1.59.tgz: out/rust1.58.tgz
out/rust1.59.tar: out/rust1.58.tar
$(call build,core,rust,1.59.0,package,--build-arg BUILD_VERSION=1.58.0)
out/rust1.60.tgz: out/rust1.59.tgz
out/rust1.60.tar: out/rust1.59.tar
$(call build,core,rust,1.60.0,package,--build-arg BUILD_VERSION=1.59.0)
out/rust1.61.tgz: out/rust1.60.tgz
out/rust1.61.tar: out/rust1.60.tar
$(call build,core,rust,1.61.0,package,--build-arg BUILD_VERSION=1.60.0)
out/rust1.62.tgz: out/rust1.61.tgz
out/rust1.62.tar: out/rust1.61.tar
$(call build,core,rust,1.62.0,package,--build-arg BUILD_VERSION=1.61.0)
out/rust1.63.tgz: out/rust1.62.tgz
out/rust1.63.tar: out/rust1.62.tar
$(call build,core,rust,1.63.0,package,--build-arg BUILD_VERSION=1.62.0)
out/rust1.64.tgz: out/rust1.63.tgz
out/rust1.64.tar: out/rust1.63.tar
$(call build,core,rust,1.64.0,package,--build-arg BUILD_VERSION=1.63.0)
out/rust1.65.tgz: out/rust1.64.tgz
out/rust1.65.tar: out/rust1.64.tar
$(call build,core,rust,1.65.0,package,--build-arg BUILD_VERSION=1.64.0)
out/rust1.66.tgz: out/rust1.65.tgz
out/rust1.66.tar: out/rust1.65.tar
$(call build,core,rust,1.66.0,package,--build-arg BUILD_VERSION=1.65.0)
out/rust1.67.tgz: out/rust1.66.tgz
out/rust1.67.tar: out/rust1.66.tar
$(call build,core,rust,1.67.0,package,--build-arg BUILD_VERSION=1.66.0)
out/rust1.68.tgz: out/rust1.67.tgz
out/rust1.68.tar: out/rust1.67.tar
$(call build,core,rust,1.68.0,package,--build-arg BUILD_VERSION=1.67.0)
out/rust1.69.tgz: out/rust1.68.tgz out/llvm.tgz
out/rust1.69.tar: out/rust1.68.tar out/llvm.tar
$(call build,core,rust,1.69.0,package,--build-arg BUILD_VERSION=1.68.0 --build-arg LLVM_VERSION=16)
out/rust1.70.tgz: out/rust1.69.tgz
out/rust1.70.tar: out/rust1.69.tar
$(call build,core,rust,1.70.0,package,--build-arg BUILD_VERSION=1.69.0 --build-arg LLVM_VERSION=16)
out/rust1.71.tgz: out/rust1.70.tgz
out/rust1.71.tar: out/rust1.70.tar
$(call build,core,rust,1.71.0,package,--build-arg BUILD_VERSION=1.70.0 --build-arg LLVM_VERSION=16)
out/rust1.72.tgz: out/rust1.71.tgz
out/rust1.72.tar: out/rust1.71.tar
$(call build,core,rust,1.72.0,package,--build-arg BUILD_VERSION=1.71.0 --build-arg LLVM_VERSION=16)
out/rust1.73.tgz: out/rust1.72.tgz
out/rust1.73.tar: out/rust1.72.tar
$(call build,core,rust,1.73.0,package,--build-arg BUILD_VERSION=1.72.0 --build-arg LLVM_VERSION=16)
out/rust.tgz: out/rust1.73.tgz
out/rust.tar: out/rust1.73.tar
$(call build,core,rust,1.74.0,package,--build-arg BUILD_VERSION=1.73.0 --build-arg LLVM_VERSION=16)
out/bison.tgz: \
out/busybox.tgz \
out/gcc.tgz \
out/binutils.tgz \
out/musl.tgz \
out/make.tgz
out/bison.tar: \
out/busybox.tar \
out/gcc.tar \
out/binutils.tar \
out/musl.tar \
out/make.tar
$(call build,core,bison)
out/gettext.tgz: \
out/busybox.tgz \
out/gcc.tgz \
out/binutils.tgz \
out/musl.tgz \
out/make.tgz
out/gettext.tar: \
out/busybox.tar \
out/gcc.tar \
out/binutils.tar \
out/musl.tar \
out/make.tar
$(call build,core,gettext)
out/flex.tgz: \
out/busybox.tgz \
out/gcc.tgz \
out/autoconf.tgz \
out/libtool.tgz \
out/binutils.tgz \
out/gettext.tgz \
out/bison.tgz \
out/musl.tgz \
out/make.tgz
out/flex.tar: \
out/busybox.tar \
out/gcc.tar \
out/autoconf.tar \
out/libtool.tar \
out/binutils.tar \
out/gettext.tar \
out/bison.tar \
out/musl.tar \
out/make.tar
$(call build,core,flex)
out/argp-standalone.tgz: \
out/libtool.tgz \
out/automake.tgz \
out/autoconf.tgz \
out/make.tgz \
out/musl.tgz \
out/m4.tgz \
out/gcc.tgz
out/argp-standalone.tar: \
out/libtool.tar \
out/automake.tar \
out/autoconf.tar \
out/make.tar \
out/musl.tar \
out/m4.tar \
out/gcc.tar
$(call build,core,argp-standalone)
out/musl-fts.tgz: \
out/libtool.tgz \
out/automake.tgz \
out/autoconf.tgz \
out/make.tgz \
out/musl.tgz \
out/m4.tgz \
out/pkgconf.tgz \
out/gcc.tgz
out/musl-fts.tar: \
out/libtool.tar \
out/automake.tar \
out/autoconf.tar \
out/make.tar \
out/musl.tar \
out/m4.tar \
out/pkgconf.tar \
out/gcc.tar
$(call build,core,musl-fts)
out/musl-obstack.tgz: \
out/libtool.tgz \
out/automake.tgz \
out/autoconf.tgz \
out/make.tgz \
out/musl.tgz \
out/m4.tgz \
out/pkgconf.tgz \
out/gcc.tgz
out/musl-obstack.tar: \
out/libtool.tar \
out/automake.tar \
out/autoconf.tar \
out/make.tar \
out/musl.tar \
out/m4.tar \
out/pkgconf.tar \
out/gcc.tar
$(call build,core,musl-obstack)
out/meson.tgz: \
out/busybox.tgz \
out/cmake.tgz \
out/llvm.tgz \
out/python.tgz \
out/py-setuptools.tgz \
out/linux-headers.tgz \
out/zlib.tgz
out/meson.tar: \
out/busybox.tar \
out/cmake.tar \
out/llvm.tar \
out/python.tar \
out/py-setuptools.tar \
out/linux-headers.tar \
out/zlib.tar
$(call build,core,meson)
out/libzstd.tgz: \
out/busybox.tgz \
out/meson.tgz \
out/python.tgz \
out/zlib.tgz
out/libzstd.tar: \
out/busybox.tar \
out/meson.tar \
out/python.tar \
out/zlib.tar
$(call build,core,libzstd)
out/elfutils.tgz: \
out/busybox.tgz \
out/argp-standalone.tgz \
out/musl.tgz \
out/musl-fts.tgz \
out/musl-obstack.tgz \
out/binutils.tgz \
out/bison.tgz \
out/flex.tgz \
out/linux-headers.tgz \
out/libtool.tgz \
out/gettext.tgz \
out/libzstd.tgz \
out/pkgconf.tgz \
out/autoconf.tgz \
out/automake.tgz \
out/m4.tgz \
out/make.tgz \
out/gcc.tgz \
out/zlib.tgz
out/elfutils.tar: \
out/busybox.tar \
out/argp-standalone.tar \
out/musl.tar \
out/musl-fts.tar \
out/musl-obstack.tar \
out/binutils.tar \
out/bison.tar \
out/flex.tar \
out/linux-headers.tar \
out/libtool.tar \
out/gettext.tar \
out/libzstd.tar \
out/pkgconf.tar \
out/autoconf.tar \
out/automake.tar \
out/m4.tar \
out/make.tar \
out/gcc.tar \
out/zlib.tar
$(call build,core,elfutils)

View File

@ -1,18 +1,18 @@
.PHONY: linux
linux: \
out/linux-generic.tgz
out/linux-generic.tar
out/linux-generic.tgz: \
out/gcc.tgz \
out/binutils.tgz \
out/make.tgz \
out/musl.tgz \
out/bison.tgz \
out/pkgconf.tgz \
out/libzstd.tgz \
out/openssl.tgz \
out/perl.tgz \
out/zlib.tgz \
out/flex.tgz \
out/elfutils.tgz
out/linux-generic.tar: \
out/gcc.tar \
out/binutils.tar \
out/make.tar \
out/musl.tar \
out/bison.tar \
out/pkgconf.tar \
out/libzstd.tar \
out/openssl.tar \
out/perl.tar \
out/zlib.tar \
out/flex.tar \
out/elfutils.tar
$(call build,kernel,linux-generic)

View File

@ -1,18 +1,18 @@
out/libxml2.tgz: \
out/busybox.tgz \
out/gcc.tgz \
out/binutils.tgz \
out/musl.tgz \
out/make.tgz \
out/bash.tgz \
out/python.tgz \
out/sed.tgz \
out/m4.tgz \
out/autoconf.tgz \
out/automake.tgz \
out/pkgconf.tgz \
out/libtool.tgz
out/libxml2.tar: \
out/busybox.tar \
out/gcc.tar \
out/binutils.tar \
out/musl.tar \
out/make.tar \
out/bash.tar \
out/python.tar \
out/sed.tar \
out/m4.tar \
out/autoconf.tar \
out/automake.tar \
out/pkgconf.tar \
out/libtool.tar
$(call build,libs,libxml2)
out/ca-certificates.tgz:
out/ca-certificates.tar:
$(call build,libs,ca-certificates)

View File

@ -27,6 +27,7 @@ define build
$(eval TARGET := $(if $(4),$(4),package))
$(eval EXTRA_ARGS := $(if $(5),$(5),))
$(eval REVISION := $(shell git rev-list HEAD -1 src/$(CATEGORY)/$(NAME)))
$(eval TEMPFILE := out/.$(notdir $(basename $@)).tmp.tar)
$(eval BUILD_CMD := \
DOCKER_BUILDKIT=1 \
BUILDKIT_MULTI_PLATFORM=1 \
@ -40,22 +41,23 @@ define build
--platform $(PLATFORM) \
--progress=plain \
$(if $(filter latest,$(VERSION)),,--build-arg VERSION=$(VERSION)) \
--output type=oci,force-compression=true,name=$(NAME),annotation.org.opencontainers.image.revision=$(REVISION),annotation.org.opencontainers.image.version=$(VERSION),dest=$(basename $@).tar \
--output type=oci,force-compression=true,name=$(NAME),annotation.org.opencontainers.image.revision=$(REVISION),annotation.org.opencontainers.image.version=$(VERSION),dest=$(TEMPFILE) \
--target $(TARGET) \
$(EXTRA_ARGS) \
$(NOCACHE_FLAG) \
-f src/$(CATEGORY)/$(NAME)/Containerfile \
src/$(CATEGORY)/$(NAME) \
&& tar -tf $(basename $@).tar \
&& gzip < $(basename $@).tar > $@ \
&& rm $(basename $@).tar \
&& gunzip -c $@ | docker load; \
)
$(eval TIMESTAMP := $(shell TZ=GMT date +"%Y-%m-%dT%H:%M:%SZ"))
mkdir -p out/
echo $(TIMESTAMP) $(BUILD_CMD) >> out/build.log
$(BUILD_CMD)
set -eux; \
mkdir -p out/; \
echo $(TIMESTAMP) $(BUILD_CMD) start >> out/build.log; \
$(BUILD_CMD); \
tar -tf $(TEMPFILE); \
docker load < $(TEMPFILE); \
mv $(TEMPFILE) $@; \
tar -xf $@ index.json -O \
| jq -r '.manifests[].digest | sub("sha256:";"")' \
> $@.digest
> $(basename $@).digest; \
echo $(TIMESTAMP) $(BUILD_CMD) end >> out/build.log;
endef

View File

@ -1,31 +1,31 @@
out/curl.tgz: \
out/gcc.tgz \
out/musl.tgz \
out/busybox.tgz \
out/make.tgz \
out/binutils.tgz \
out/openssl.tgz \
out/ca-certificates.tgz
out/curl.tar: \
out/gcc.tar \
out/musl.tar \
out/busybox.tar \
out/make.tar \
out/binutils.tar \
out/openssl.tar \
out/ca-certificates.tar
$(call build,tools,curl)
out/gen_initramfs.tgz: \
out/gcc.tgz \
out/binutils.tgz \
out/musl.tgz
out/gen_initramfs.tar: \
out/gcc.tar \
out/binutils.tar \
out/musl.tar
$(call build,tools,gen_initramfs)
out/cpio.tgz: \
out/gcc.tgz \
out/binutils.tgz \
out/musl.tgz
out/cpio.tar: \
out/gcc.tar \
out/binutils.tar \
out/musl.tar
$(call build,tools,cpio)
out/tofu.tgz: \
out/busybox.tgz \
out/go.tgz
out/tofu.tar: \
out/busybox.tar \
out/go.tar
$(call build,tools,tofu)
out/sops.tgz: \
out/busybox.tgz \
out/go.tgz
out/sops.tar: \
out/busybox.tar \
out/go.tar
$(call build,tools,sops)