diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d79c8634..0f524e12 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -44,5 +44,8 @@ jobs: - name: Build run: | - make -j 4 -C pkg/${{ matrix.pkg }} pkg + make -C pkg/${{ matrix.pkg }} all + - + name: List artifacts + run: | tree -nh ./pkg/${{ matrix.pkg }}/bin diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fca35d3f..7af47d45 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -41,7 +41,7 @@ jobs: - name: Build pkgs run: | - make -j 4 -C pkg/${{ inputs.package }} pkg + make -C pkg/${{ inputs.package }} all tree -nh ./pkg/${{ inputs.package }}/bin - name: Docker meta diff --git a/Makefile b/Makefile index 9026c4ef..58ab7844 100644 --- a/Makefile +++ b/Makefile @@ -22,16 +22,16 @@ apk deb rpm static: .PHONY: apk-% apk-%: - $(MAKE) -C pkg/$* $(foreach release,$(PKG_APK_RELEASES),build-cross-apk-$(release)) + $(MAKE) -C pkg/$* pkg-apk .PHONY: deb-% deb-%: - $(MAKE) -C pkg/$* $(foreach release,$(PKG_DEB_RELEASES),build-cross-deb-$(release)) + $(MAKE) -C pkg/$* pkg-deb .PHONY: rpm-% rpm-%: - $(MAKE) -C pkg/$* $(foreach release,$(PKG_RPM_RELEASES),build-cross-rpm-$(release)) + $(MAKE) -C pkg/$* pkg-rpm .PHONY: static-% static-%: - $(MAKE) -C pkg/$* build-cross-static + $(MAKE) -C pkg/$* pkg-static diff --git a/README.md b/README.md index 68d95ab4..fcbab3cb 100644 --- a/README.md +++ b/README.md @@ -46,133 +46,347 @@ $ undock --wrap --rm-dist --all dockereng/packaging:buildx-v0.9.1 ./bin/undock tree ./bin/undock ``` -./bin/undock -├── darwin -│ ├── amd64 -│ │ └── docker-buildx-plugin_0.9.1.tgz -│ └── arm64 -│ └── docker-buildx-plugin_0.9.1.tgz -├── linux -│ ├── amd64 -│ │ ├── docker-buildx-plugin-0.9.1-centos7.x86_64.rpm -│ │ ├── docker-buildx-plugin-0.9.1-centos8.x86_64.rpm -│ │ ├── docker-buildx-plugin-0.9.1-fedora33.x86_64.rpm -│ │ ├── docker-buildx-plugin-0.9.1-fedora34.x86_64.rpm -│ │ ├── docker-buildx-plugin-0.9.1-fedora35.x86_64.rpm -│ │ ├── docker-buildx-plugin-0.9.1-fedora36.x86_64.rpm -│ │ ├── docker-buildx-plugin_0.9.1-debian10_amd64.deb -│ │ ├── docker-buildx-plugin_0.9.1-debian11_amd64.deb -│ │ ├── docker-buildx-plugin_0.9.1-r0_x86_64.apk -│ │ ├── docker-buildx-plugin_0.9.1-raspbian10_amd64.deb -│ │ ├── docker-buildx-plugin_0.9.1-raspbian11_amd64.deb -│ │ ├── docker-buildx-plugin_0.9.1-ubuntu1804_amd64.deb -│ │ ├── docker-buildx-plugin_0.9.1-ubuntu2004_amd64.deb -│ │ ├── docker-buildx-plugin_0.9.1-ubuntu2204_amd64.deb -│ │ └── docker-buildx-plugin_0.9.1.tgz -│ ├── arm -│ │ ├── v6 -│ │ │ ├── docker-buildx-plugin-0.9.1-centos7.armv6hl.rpm -│ │ │ ├── docker-buildx-plugin-0.9.1-centos8.armv6hl.rpm -│ │ │ ├── docker-buildx-plugin-0.9.1-fedora33.armv6hl.rpm -│ │ │ ├── docker-buildx-plugin-0.9.1-fedora34.armv6hl.rpm -│ │ │ ├── docker-buildx-plugin-0.9.1-fedora35.armv6hl.rpm -│ │ │ ├── docker-buildx-plugin-0.9.1-fedora36.armv6hl.rpm -│ │ │ ├── docker-buildx-plugin_0.9.1-debian10_armel.deb -│ │ │ ├── docker-buildx-plugin_0.9.1-debian11_armel.deb -│ │ │ ├── docker-buildx-plugin_0.9.1-r0_armhf.apk -│ │ │ ├── docker-buildx-plugin_0.9.1-raspbian10_armel.deb -│ │ │ ├── docker-buildx-plugin_0.9.1-raspbian11_armel.deb -│ │ │ ├── docker-buildx-plugin_0.9.1-ubuntu1804_armel.deb -│ │ │ ├── docker-buildx-plugin_0.9.1-ubuntu2004_armel.deb -│ │ │ ├── docker-buildx-plugin_0.9.1-ubuntu2204_armel.deb +./bin/undock/ +├── alpine +│ ├── 3.14 +│ │ ├── amd64 +│ │ │ └── docker-buildx-plugin_0.9.1-0_x86_64.apk +│ │ ├── arm +│ │ │ ├── v6 +│ │ │ │ └── docker-buildx-plugin_0.9.1-0_armhf.apk +│ │ │ └── v7 +│ │ │ └── docker-buildx-plugin_0.9.1-0_armv7.apk +│ │ ├── arm64 +│ │ │ └── docker-buildx-plugin_0.9.1-0_aarch64.apk +│ │ ├── ppc64le +│ │ │ └── docker-buildx-plugin_0.9.1-0_ppc64le.apk +│ │ ├── riscv64 +│ │ │ └── docker-buildx-plugin_0.9.1-0_riscv64.apk +│ │ └── s390x +│ │ └── docker-buildx-plugin_0.9.1-0_s390x.apk +│ ├── 3.15 +│ │ ├── amd64 +│ │ │ └── docker-buildx-plugin_0.9.1-0_x86_64.apk +│ │ ├── arm +│ │ │ ├── v6 +│ │ │ │ └── docker-buildx-plugin_0.9.1-0_armhf.apk +│ │ │ └── v7 +│ │ │ └── docker-buildx-plugin_0.9.1-0_armv7.apk +│ │ ├── arm64 +│ │ │ └── docker-buildx-plugin_0.9.1-0_aarch64.apk +│ │ ├── ppc64le +│ │ │ └── docker-buildx-plugin_0.9.1-0_ppc64le.apk +│ │ ├── riscv64 +│ │ │ └── docker-buildx-plugin_0.9.1-0_riscv64.apk +│ │ └── s390x +│ │ └── docker-buildx-plugin_0.9.1-0_s390x.apk +│ └── 3.16 +│ ├── amd64 +│ │ └── docker-buildx-plugin_0.9.1-0_x86_64.apk +│ ├── arm +│ │ ├── v6 +│ │ │ └── docker-buildx-plugin_0.9.1-0_armhf.apk +│ │ └── v7 +│ │ └── docker-buildx-plugin_0.9.1-0_armv7.apk +│ ├── arm64 +│ │ └── docker-buildx-plugin_0.9.1-0_aarch64.apk +│ ├── ppc64le +│ │ └── docker-buildx-plugin_0.9.1-0_ppc64le.apk +│ ├── riscv64 +│ │ └── docker-buildx-plugin_0.9.1-0_riscv64.apk +│ └── s390x +│ └── docker-buildx-plugin_0.9.1-0_s390x.apk +├── centos +│ ├── 7 +│ │ ├── amd64 +│ │ │ └── docker-buildx-plugin-0.9.1-0.x86_64.rpm +│ │ ├── arm +│ │ │ ├── v6 +│ │ │ │ └── docker-buildx-plugin-0.9.1-0.armv6hl.rpm +│ │ │ └── v7 +│ │ │ └── docker-buildx-plugin-0.9.1-0.armv7hl.rpm +│ │ ├── arm64 +│ │ │ └── docker-buildx-plugin-0.9.1-0.aarch64.rpm +│ │ ├── ppc64le +│ │ │ └── docker-buildx-plugin-0.9.1-0.ppc64le.rpm +│ │ ├── riscv64 +│ │ │ └── docker-buildx-plugin-0.9.1-0.riscv64.rpm +│ │ └── s390x +│ │ └── docker-buildx-plugin-0.9.1-0.s390x.rpm +│ ├── 8 +│ │ ├── amd64 +│ │ │ └── docker-buildx-plugin-0.9.1-0.x86_64.rpm +│ │ ├── arm +│ │ │ ├── v6 +│ │ │ │ └── docker-buildx-plugin-0.9.1-0.armv6hl.rpm +│ │ │ └── v7 +│ │ │ └── docker-buildx-plugin-0.9.1-0.armv7hl.rpm +│ │ ├── arm64 +│ │ │ └── docker-buildx-plugin-0.9.1-0.aarch64.rpm +│ │ ├── ppc64le +│ │ │ └── docker-buildx-plugin-0.9.1-0.ppc64le.rpm +│ │ ├── riscv64 +│ │ │ └── docker-buildx-plugin-0.9.1-0.riscv64.rpm +│ │ └── s390x +│ │ └── docker-buildx-plugin-0.9.1-0.s390x.rpm +│ └── 9 +│ ├── amd64 +│ │ └── docker-buildx-plugin-0.9.1-0.x86_64.rpm +│ ├── arm +│ │ ├── v6 +│ │ │ └── docker-buildx-plugin-0.9.1-0.armv6hl.rpm +│ │ └── v7 +│ │ └── docker-buildx-plugin-0.9.1-0.armv7hl.rpm +│ ├── arm64 +│ │ └── docker-buildx-plugin-0.9.1-0.aarch64.rpm +│ ├── ppc64le +│ │ └── docker-buildx-plugin-0.9.1-0.ppc64le.rpm +│ ├── riscv64 +│ │ └── docker-buildx-plugin-0.9.1-0.riscv64.rpm +│ └── s390x +│ └── docker-buildx-plugin-0.9.1-0.s390x.rpm +├── debian +│ ├── bullseye +│ │ ├── amd64 +│ │ │ └── docker-buildx-plugin_0.9.1-0_amd64.deb +│ │ ├── arm +│ │ │ ├── v6 +│ │ │ │ └── docker-buildx-plugin_0.9.1-0_armel.deb +│ │ │ └── v7 +│ │ │ └── docker-buildx-plugin_0.9.1-0_armhf.deb +│ │ ├── arm64 +│ │ │ └── docker-buildx-plugin_0.9.1-0_arm64.deb +│ │ ├── ppc64le +│ │ │ └── docker-buildx-plugin_0.9.1-0_ppc64el.deb +│ │ ├── riscv64 +│ │ │ └── docker-buildx-plugin_0.9.1-0_riscv64.deb +│ │ └── s390x +│ │ └── docker-buildx-plugin_0.9.1-0_s390x.deb +│ └── buster +│ ├── amd64 +│ │ └── docker-buildx-plugin_0.9.1-0_amd64.deb +│ ├── arm +│ │ ├── v6 +│ │ │ └── docker-buildx-plugin_0.9.1-0_armel.deb +│ │ └── v7 +│ │ └── docker-buildx-plugin_0.9.1-0_armhf.deb +│ ├── arm64 +│ │ └── docker-buildx-plugin_0.9.1-0_arm64.deb +│ ├── ppc64le +│ │ └── docker-buildx-plugin_0.9.1-0_ppc64el.deb +│ ├── riscv64 +│ │ └── docker-buildx-plugin_0.9.1-0_riscv64.deb +│ └── s390x +│ └── docker-buildx-plugin_0.9.1-0_s390x.deb +├── fedora +│ ├── 35 +│ │ ├── amd64 +│ │ │ └── docker-buildx-plugin-0.9.1-0.x86_64.rpm +│ │ ├── arm +│ │ │ ├── v6 +│ │ │ │ └── docker-buildx-plugin-0.9.1-0.armv6hl.rpm +│ │ │ └── v7 +│ │ │ └── docker-buildx-plugin-0.9.1-0.armv7hl.rpm +│ │ ├── arm64 +│ │ │ └── docker-buildx-plugin-0.9.1-0.aarch64.rpm +│ │ ├── ppc64le +│ │ │ └── docker-buildx-plugin-0.9.1-0.ppc64le.rpm +│ │ ├── riscv64 +│ │ │ └── docker-buildx-plugin-0.9.1-0.riscv64.rpm +│ │ └── s390x +│ │ └── docker-buildx-plugin-0.9.1-0.s390x.rpm +│ ├── 36 +│ │ ├── amd64 +│ │ │ └── docker-buildx-plugin-0.9.1-0.x86_64.rpm +│ │ ├── arm +│ │ │ ├── v6 +│ │ │ │ └── docker-buildx-plugin-0.9.1-0.armv6hl.rpm +│ │ │ └── v7 +│ │ │ └── docker-buildx-plugin-0.9.1-0.armv7hl.rpm +│ │ ├── arm64 +│ │ │ └── docker-buildx-plugin-0.9.1-0.aarch64.rpm +│ │ ├── ppc64le +│ │ │ └── docker-buildx-plugin-0.9.1-0.ppc64le.rpm +│ │ ├── riscv64 +│ │ │ └── docker-buildx-plugin-0.9.1-0.riscv64.rpm +│ │ └── s390x +│ │ └── docker-buildx-plugin-0.9.1-0.s390x.rpm +│ └── 37 +│ ├── amd64 +│ │ └── docker-buildx-plugin-0.9.1-0.x86_64.rpm +│ ├── arm +│ │ ├── v6 +│ │ │ └── docker-buildx-plugin-0.9.1-0.armv6hl.rpm +│ │ └── v7 +│ │ └── docker-buildx-plugin-0.9.1-0.armv7hl.rpm +│ ├── arm64 +│ │ └── docker-buildx-plugin-0.9.1-0.aarch64.rpm +│ ├── ppc64le +│ │ └── docker-buildx-plugin-0.9.1-0.ppc64le.rpm +│ ├── riscv64 +│ │ └── docker-buildx-plugin-0.9.1-0.riscv64.rpm +│ └── s390x +│ └── docker-buildx-plugin-0.9.1-0.s390x.rpm +├── oraclelinux +│ ├── 7 +│ │ ├── amd64 +│ │ │ └── docker-buildx-plugin-0.9.1-0.x86_64.rpm +│ │ ├── arm +│ │ │ ├── v6 +│ │ │ │ └── docker-buildx-plugin-0.9.1-0.armv6hl.rpm +│ │ │ └── v7 +│ │ │ └── docker-buildx-plugin-0.9.1-0.armv7hl.rpm +│ │ ├── arm64 +│ │ │ └── docker-buildx-plugin-0.9.1-0.aarch64.rpm +│ │ ├── ppc64le +│ │ │ └── docker-buildx-plugin-0.9.1-0.ppc64le.rpm +│ │ ├── riscv64 +│ │ │ └── docker-buildx-plugin-0.9.1-0.riscv64.rpm +│ │ └── s390x +│ │ └── docker-buildx-plugin-0.9.1-0.s390x.rpm +│ ├── 8 +│ │ ├── amd64 +│ │ │ └── docker-buildx-plugin-0.9.1-0.x86_64.rpm +│ │ ├── arm +│ │ │ ├── v6 +│ │ │ │ └── docker-buildx-plugin-0.9.1-0.armv6hl.rpm +│ │ │ └── v7 +│ │ │ └── docker-buildx-plugin-0.9.1-0.armv7hl.rpm +│ │ ├── arm64 +│ │ │ └── docker-buildx-plugin-0.9.1-0.aarch64.rpm +│ │ ├── ppc64le +│ │ │ └── docker-buildx-plugin-0.9.1-0.ppc64le.rpm +│ │ ├── riscv64 +│ │ │ └── docker-buildx-plugin-0.9.1-0.riscv64.rpm +│ │ └── s390x +│ │ └── docker-buildx-plugin-0.9.1-0.s390x.rpm +│ └── 9 +│ ├── amd64 +│ │ └── docker-buildx-plugin-0.9.1-0.x86_64.rpm +│ ├── arm +│ │ ├── v6 +│ │ │ └── docker-buildx-plugin-0.9.1-0.armv6hl.rpm +│ │ └── v7 +│ │ └── docker-buildx-plugin-0.9.1-0.armv7hl.rpm +│ ├── arm64 +│ │ └── docker-buildx-plugin-0.9.1-0.aarch64.rpm +│ ├── ppc64le +│ │ └── docker-buildx-plugin-0.9.1-0.ppc64le.rpm +│ ├── riscv64 +│ │ └── docker-buildx-plugin-0.9.1-0.riscv64.rpm +│ └── s390x +│ └── docker-buildx-plugin-0.9.1-0.s390x.rpm +├── raspbian +│ ├── bullseye +│ │ ├── amd64 +│ │ │ └── docker-buildx-plugin_0.9.1-0_amd64.deb +│ │ ├── arm +│ │ │ ├── v6 +│ │ │ │ └── docker-buildx-plugin_0.9.1-0_armel.deb +│ │ │ └── v7 +│ │ │ └── docker-buildx-plugin_0.9.1-0_armhf.deb +│ │ ├── arm64 +│ │ │ └── docker-buildx-plugin_0.9.1-0_arm64.deb +│ │ ├── ppc64le +│ │ │ └── docker-buildx-plugin_0.9.1-0_ppc64el.deb +│ │ ├── riscv64 +│ │ │ └── docker-buildx-plugin_0.9.1-0_riscv64.deb +│ │ └── s390x +│ │ └── docker-buildx-plugin_0.9.1-0_s390x.deb +│ └── buster +│ ├── amd64 +│ │ └── docker-buildx-plugin_0.9.1-0_amd64.deb +│ ├── arm +│ │ ├── v6 +│ │ │ └── docker-buildx-plugin_0.9.1-0_armel.deb +│ │ └── v7 +│ │ └── docker-buildx-plugin_0.9.1-0_armhf.deb +│ ├── arm64 +│ │ └── docker-buildx-plugin_0.9.1-0_arm64.deb +│ ├── ppc64le +│ │ └── docker-buildx-plugin_0.9.1-0_ppc64el.deb +│ ├── riscv64 +│ │ └── docker-buildx-plugin_0.9.1-0_riscv64.deb +│ └── s390x +│ └── docker-buildx-plugin_0.9.1-0_s390x.deb +├── static +│ ├── darwin +│ │ ├── amd64 │ │ │ └── docker-buildx-plugin_0.9.1.tgz -│ │ └── v7 -│ │ ├── docker-buildx-plugin-0.9.1-centos7.armv7hl.rpm -│ │ ├── docker-buildx-plugin-0.9.1-centos8.armv7hl.rpm -│ │ ├── docker-buildx-plugin-0.9.1-fedora33.armv7hl.rpm -│ │ ├── docker-buildx-plugin-0.9.1-fedora34.armv7hl.rpm -│ │ ├── docker-buildx-plugin-0.9.1-fedora35.armv7hl.rpm -│ │ ├── docker-buildx-plugin-0.9.1-fedora36.armv7hl.rpm -│ │ ├── docker-buildx-plugin_0.9.1-debian10_armhf.deb -│ │ ├── docker-buildx-plugin_0.9.1-debian11_armhf.deb -│ │ ├── docker-buildx-plugin_0.9.1-r0_armv7.apk -│ │ ├── docker-buildx-plugin_0.9.1-raspbian10_armhf.deb -│ │ ├── docker-buildx-plugin_0.9.1-raspbian11_armhf.deb -│ │ ├── docker-buildx-plugin_0.9.1-ubuntu1804_armhf.deb -│ │ ├── docker-buildx-plugin_0.9.1-ubuntu2004_armhf.deb -│ │ ├── docker-buildx-plugin_0.9.1-ubuntu2204_armhf.deb +│ │ └── arm64 │ │ └── docker-buildx-plugin_0.9.1.tgz -│ ├── arm64 -│ │ ├── docker-buildx-plugin-0.9.1-centos7.aarch64.rpm -│ │ ├── docker-buildx-plugin-0.9.1-centos8.aarch64.rpm -│ │ ├── docker-buildx-plugin-0.9.1-fedora33.aarch64.rpm -│ │ ├── docker-buildx-plugin-0.9.1-fedora34.aarch64.rpm -│ │ ├── docker-buildx-plugin-0.9.1-fedora35.aarch64.rpm -│ │ ├── docker-buildx-plugin-0.9.1-fedora36.aarch64.rpm -│ │ ├── docker-buildx-plugin_0.9.1-debian10_arm64.deb -│ │ ├── docker-buildx-plugin_0.9.1-debian11_arm64.deb -│ │ ├── docker-buildx-plugin_0.9.1-r0_aarch64.apk -│ │ ├── docker-buildx-plugin_0.9.1-raspbian10_arm64.deb -│ │ ├── docker-buildx-plugin_0.9.1-raspbian11_arm64.deb -│ │ ├── docker-buildx-plugin_0.9.1-ubuntu1804_arm64.deb -│ │ ├── docker-buildx-plugin_0.9.1-ubuntu2004_arm64.deb -│ │ ├── docker-buildx-plugin_0.9.1-ubuntu2204_arm64.deb -│ │ └── docker-buildx-plugin_0.9.1.tgz -│ ├── ppc64le -│ │ ├── docker-buildx-plugin-0.9.1-centos7.ppc64le.rpm -│ │ ├── docker-buildx-plugin-0.9.1-centos8.ppc64le.rpm -│ │ ├── docker-buildx-plugin-0.9.1-fedora33.ppc64le.rpm -│ │ ├── docker-buildx-plugin-0.9.1-fedora34.ppc64le.rpm -│ │ ├── docker-buildx-plugin-0.9.1-fedora35.ppc64le.rpm -│ │ ├── docker-buildx-plugin-0.9.1-fedora36.ppc64le.rpm -│ │ ├── docker-buildx-plugin_0.9.1-debian10_ppc64el.deb -│ │ ├── docker-buildx-plugin_0.9.1-debian11_ppc64el.deb -│ │ ├── docker-buildx-plugin_0.9.1-r0_ppc64le.apk -│ │ ├── docker-buildx-plugin_0.9.1-raspbian10_ppc64el.deb -│ │ ├── docker-buildx-plugin_0.9.1-raspbian11_ppc64el.deb -│ │ ├── docker-buildx-plugin_0.9.1-ubuntu1804_ppc64el.deb -│ │ ├── docker-buildx-plugin_0.9.1-ubuntu2004_ppc64el.deb -│ │ ├── docker-buildx-plugin_0.9.1-ubuntu2204_ppc64el.deb -│ │ └── docker-buildx-plugin_0.9.1.tgz -│ ├── riscv64 -│ │ ├── docker-buildx-plugin-0.9.1-centos7.riscv64.rpm -│ │ ├── docker-buildx-plugin-0.9.1-centos8.riscv64.rpm -│ │ ├── docker-buildx-plugin-0.9.1-fedora33.riscv64.rpm -│ │ ├── docker-buildx-plugin-0.9.1-fedora34.riscv64.rpm -│ │ ├── docker-buildx-plugin-0.9.1-fedora35.riscv64.rpm -│ │ ├── docker-buildx-plugin-0.9.1-fedora36.riscv64.rpm -│ │ ├── docker-buildx-plugin_0.9.1-debian10_riscv64.deb -│ │ ├── docker-buildx-plugin_0.9.1-debian11_riscv64.deb -│ │ ├── docker-buildx-plugin_0.9.1-r0_riscv64.apk -│ │ ├── docker-buildx-plugin_0.9.1-raspbian10_riscv64.deb -│ │ ├── docker-buildx-plugin_0.9.1-raspbian11_riscv64.deb -│ │ ├── docker-buildx-plugin_0.9.1-ubuntu1804_riscv64.deb -│ │ ├── docker-buildx-plugin_0.9.1-ubuntu2004_riscv64.deb -│ │ ├── docker-buildx-plugin_0.9.1-ubuntu2204_riscv64.deb -│ │ └── docker-buildx-plugin_0.9.1.tgz -│ └── s390x -│ ├── docker-buildx-plugin-0.9.1-centos7.s390x.rpm -│ ├── docker-buildx-plugin-0.9.1-centos8.s390x.rpm -│ ├── docker-buildx-plugin-0.9.1-fedora33.s390x.rpm -│ ├── docker-buildx-plugin-0.9.1-fedora34.s390x.rpm -│ ├── docker-buildx-plugin-0.9.1-fedora35.s390x.rpm -│ ├── docker-buildx-plugin-0.9.1-fedora36.s390x.rpm -│ ├── docker-buildx-plugin_0.9.1-debian10_s390x.deb -│ ├── docker-buildx-plugin_0.9.1-debian11_s390x.deb -│ ├── docker-buildx-plugin_0.9.1-r0_s390x.apk -│ ├── docker-buildx-plugin_0.9.1-raspbian10_s390x.deb -│ ├── docker-buildx-plugin_0.9.1-raspbian11_s390x.deb -│ ├── docker-buildx-plugin_0.9.1-ubuntu1804_s390x.deb -│ ├── docker-buildx-plugin_0.9.1-ubuntu2004_s390x.deb -│ ├── docker-buildx-plugin_0.9.1-ubuntu2204_s390x.deb -│ └── docker-buildx-plugin_0.9.1.tgz -└── windows - ├── amd64 - │ └── docker-buildx-plugin_0.9.1.zip - └── arm64 - └── docker-buildx-plugin_0.9.1.zip +│ ├── linux +│ │ ├── amd64 +│ │ │ └── docker-buildx-plugin_0.9.1.tgz +│ │ ├── arm +│ │ │ ├── v6 +│ │ │ │ └── docker-buildx-plugin_0.9.1.tgz +│ │ │ └── v7 +│ │ │ └── docker-buildx-plugin_0.9.1.tgz +│ │ ├── arm64 +│ │ │ └── docker-buildx-plugin_0.9.1.tgz +│ │ ├── ppc64le +│ │ │ └── docker-buildx-plugin_0.9.1.tgz +│ │ ├── riscv64 +│ │ │ └── docker-buildx-plugin_0.9.1.tgz +│ │ └── s390x +│ │ └── docker-buildx-plugin_0.9.1.tgz +│ └── windows +│ ├── amd64 +│ │ └── docker-buildx-plugin_0.9.1.zip +│ └── arm64 +│ └── docker-buildx-plugin_0.9.1.zip +└── ubuntu + ├── bionic + │ ├── amd64 + │ │ └── docker-buildx-plugin_0.9.1-0_amd64.deb + │ ├── arm + │ │ ├── v6 + │ │ │ └── docker-buildx-plugin_0.9.1-0_armel.deb + │ │ └── v7 + │ │ └── docker-buildx-plugin_0.9.1-0_armhf.deb + │ ├── arm64 + │ │ └── docker-buildx-plugin_0.9.1-0_arm64.deb + │ ├── ppc64le + │ │ └── docker-buildx-plugin_0.9.1-0_ppc64el.deb + │ ├── riscv64 + │ │ └── docker-buildx-plugin_0.9.1-0_riscv64.deb + │ └── s390x + │ └── docker-buildx-plugin_0.9.1-0_s390x.deb + ├── focal + │ ├── amd64 + │ │ └── docker-buildx-plugin_0.9.1-0_amd64.deb + │ ├── arm + │ │ ├── v6 + │ │ │ └── docker-buildx-plugin_0.9.1-0_armel.deb + │ │ └── v7 + │ │ └── docker-buildx-plugin_0.9.1-0_armhf.deb + │ ├── arm64 + │ │ └── docker-buildx-plugin_0.9.1-0_arm64.deb + │ ├── ppc64le + │ │ └── docker-buildx-plugin_0.9.1-0_ppc64el.deb + │ ├── riscv64 + │ │ └── docker-buildx-plugin_0.9.1-0_riscv64.deb + │ └── s390x + │ └── docker-buildx-plugin_0.9.1-0_s390x.deb + └── jammy + ├── amd64 + │ └── docker-buildx-plugin_0.9.1-0_amd64.deb + ├── arm + │ ├── v6 + │ │ └── docker-buildx-plugin_0.9.1-0_armel.deb + │ └── v7 + │ └── docker-buildx-plugin_0.9.1-0_armhf.deb + ├── arm64 + │ └── docker-buildx-plugin_0.9.1-0_arm64.deb + ├── ppc64le + │ └── docker-buildx-plugin_0.9.1-0_ppc64el.deb + ├── riscv64 + │ └── docker-buildx-plugin_0.9.1-0_riscv64.deb + └── s390x + └── docker-buildx-plugin_0.9.1-0_s390x.deb -15 directories, 109 files +194 directories, 144 files ``` diff --git a/packages.hcl b/packages.hcl new file mode 100644 index 00000000..1e09a34d --- /dev/null +++ b/packages.hcl @@ -0,0 +1,229 @@ +// Copyright 2022 Docker Packaging authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +variable "PKG_RELEASE" { + default = "" +} +variable "PKG_TYPE" { + default = "" +} +variable "PKG_DISTRO" { + default = "" +} +variable "PKG_SUITE" { + default = "" +} +variable "PKG_BASE_IMAGE" { + default = "" +} + +target "_pkg-alpine314" { + args = { + PKG_RELEASE = "alpine314" + PKG_TYPE = "apk" + PKG_DISTRO = "alpine" + PKG_SUITE = "3.14" + PKG_BASE_IMAGE = "alpine:3.14" + } +} + +target "_pkg-alpine315" { + args = { + PKG_RELEASE = "alpine315" + PKG_TYPE = "apk" + PKG_DISTRO = "alpine" + PKG_SUITE = "3.15" + PKG_BASE_IMAGE = "alpine:3.15" + } +} + +target "_pkg-alpine316" { + args = { + PKG_RELEASE = "alpine316" + PKG_TYPE = "apk" + PKG_DISTRO = "alpine" + PKG_SUITE = "3.16" + PKG_BASE_IMAGE = "alpine:3.16" + } +} + +target "_pkg-debian10" { + args = { + PKG_RELEASE = "debian10" + PKG_TYPE = "deb" + PKG_DISTRO = "debian" + PKG_SUITE = "buster" + PKG_BASE_IMAGE = "debian:buster" + } +} + +target "_pkg-debian11" { + args = { + PKG_RELEASE = "debian11" + PKG_TYPE = "deb" + PKG_DISTRO = "debian" + PKG_SUITE = "bullseye" + PKG_BASE_IMAGE = "debian:bullseye" + } +} + +target "_pkg-raspbian10" { + args = { + PKG_RELEASE = "raspbian10" + PKG_TYPE = "deb" + PKG_DISTRO = "raspbian" + PKG_SUITE = "buster" + PKG_BASE_IMAGE = "balenalib/rpi-raspbian:buster" + } +} + +target "_pkg-raspbian11" { + args = { + PKG_RELEASE = "raspbian11" + PKG_TYPE = "deb" + PKG_DISTRO = "raspbian" + PKG_SUITE = "bullseye" + PKG_BASE_IMAGE = "balenalib/rpi-raspbian:bullseye" + } +} + +target "_pkg-ubuntu1804" { + args = { + PKG_RELEASE = "ubuntu1804" + PKG_TYPE = "deb" + PKG_DISTRO = "ubuntu" + PKG_SUITE = "bionic" + PKG_BASE_IMAGE = "ubuntu:bionic" + } +} + +target "_pkg-ubuntu2004" { + args = { + PKG_RELEASE = "ubuntu2004" + PKG_TYPE = "deb" + PKG_DISTRO = "ubuntu" + PKG_SUITE = "focal" + PKG_BASE_IMAGE = "ubuntu:focal" + } +} + +target "_pkg-ubuntu2204" { + args = { + PKG_RELEASE = "ubuntu2204" + PKG_TYPE = "deb" + PKG_DISTRO = "ubuntu" + PKG_SUITE = "jammy" + PKG_BASE_IMAGE = "ubuntu:jammy" + } +} + +target "_pkg-centos7" { + args = { + PKG_RELEASE = "centos7" + PKG_TYPE = "rpm" + PKG_DISTRO = "centos" + PKG_SUITE = "7" + PKG_BASE_IMAGE = "centos:7" + } +} + +target "_pkg-centos8" { + args = { + PKG_RELEASE = "centos8" + PKG_TYPE = "rpm" + PKG_DISTRO = "centos" + PKG_SUITE = "8" + PKG_BASE_IMAGE = "quay.io/centos/centos:stream8" + } +} + +target "_pkg-centos9" { + args = { + PKG_RELEASE = "centos9" + PKG_TYPE = "rpm" + PKG_DISTRO = "centos" + PKG_SUITE = "9" + PKG_BASE_IMAGE = "quay.io/centos/centos:stream9" + } +} + +target "_pkg-fedora35" { + args = { + PKG_RELEASE = "fedora35" + PKG_TYPE = "rpm" + PKG_DISTRO = "fedora" + PKG_SUITE = "35" + PKG_BASE_IMAGE = "fedora:35" + } +} + +target "_pkg-fedora36" { + args = { + PKG_RELEASE = "fedora36" + PKG_TYPE = "rpm" + PKG_DISTRO = "fedora" + PKG_SUITE = "36" + PKG_BASE_IMAGE = "fedora:36" + } +} + +target "_pkg-fedora37" { + args = { + PKG_RELEASE = "fedora37" + PKG_TYPE = "rpm" + PKG_DISTRO = "fedora" + PKG_SUITE = "37" + PKG_BASE_IMAGE = "fedora:37" + } +} + +target "_pkg-oraclelinux7" { + args = { + PKG_RELEASE = "oraclelinux7" + PKG_TYPE = "rpm" + PKG_DISTRO = "oraclelinux" + PKG_SUITE = "7" + PKG_BASE_IMAGE = "oraclelinux:7" + } +} + +target "_pkg-oraclelinux8" { + args = { + PKG_RELEASE = "oraclelinux8" + PKG_TYPE = "rpm" + PKG_DISTRO = "oraclelinux" + PKG_SUITE = "8" + PKG_BASE_IMAGE = "oraclelinux:8" + } +} + +target "_pkg-oraclelinux9" { + args = { + PKG_RELEASE = "oraclelinux9" + PKG_TYPE = "rpm" + PKG_DISTRO = "oraclelinux" + PKG_SUITE = "9" + PKG_BASE_IMAGE = "oraclelinux:9" + } +} + +target "_pkg-static" { + args = { + PKG_RELEASE = "" + PKG_TYPE = "static" + PKG_DISTRO = "static" + PKG_SUITE = "" + PKG_BASE_IMAGE = "debian:bullseye" + } +} diff --git a/packages.mk b/packages.mk new file mode 100644 index 00000000..08cdc4ca --- /dev/null +++ b/packages.mk @@ -0,0 +1,203 @@ +# Copyright 2022 Docker Packaging authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# don't forget to add/update pkg-info-* rule and update packages.hcl as well +# if you add a new release +PKG_APK_RELEASES ?= alpine314 alpine315 alpine316 +PKG_DEB_RELEASES ?= debian10 debian11 ubuntu1804 ubuntu2004 ubuntu2204 raspbian10 raspbian11 +PKG_RPM_RELEASES ?= centos7 centos8 centos9 fedora35 fedora36 fedora37 oraclelinux7 oraclelinux8 oraclelinux9 + +.PHONY: pkg-releases +pkg-releases: + $(info $$PKG_RELEASES = $(PKG_RELEASES)) + +.PHONY: pkg-apk-releases +pkg-apk-releases: + $(eval PKG_RELEASES = $(PKG_APK_RELEASES)) + +.PHONY: pkg-deb-releases +pkg-deb-releases: + $(eval PKG_RELEASES = $(PKG_DEB_RELEASES)) + +.PHONY: pkg-rpm-releases +pkg-rpm-releases: + $(eval PKG_RELEASES = $(PKG_RPM_RELEASES)) + +.PHONY: pkg-info +pkg-info: + $(info $$PKG_TYPE = $(PKG_TYPE)) + $(info $$PKG_DISTRO = $(PKG_DISTRO)) + $(info $$PKG_SUITE = $(PKG_SUITE)) + $(info $$PKG_BASE_IMAGE = $(PKG_BASE_IMAGE)) + $(info $$PKG_SUPPORTED_ARCHS = $(PKG_SUPPORTED_ARCHS)) + +.PHONY: pkg-info-alpine314 +pkg-info-alpine314: + $(eval PKG_TYPE = apk) + $(eval PKG_DISTRO = alpine) + $(eval PKG_SUITE = 3.14) + $(eval PKG_BASE_IMAGE = alpine:3.14) + $(eval PKG_SUPPORTED_ARCHS = i386 x86_64 aarch64 arm64 armv7l armv6l armv5l ppc64le s390x) + +.PHONY: pkg-info-alpine315 +pkg-info-alpine315: + $(eval PKG_TYPE = apk) + $(eval PKG_DISTRO = alpine) + $(eval PKG_SUITE = 3.15) + $(eval PKG_BASE_IMAGE = alpine:3.15) + $(eval PKG_SUPPORTED_ARCHS = i386 x86_64 aarch64 arm64 armv7l armv6l armv5l ppc64le s390x) + +.PHONY: pkg-info-alpine316 +pkg-info-alpine316: + $(eval PKG_TYPE = apk) + $(eval PKG_DISTRO = alpine) + $(eval PKG_SUITE = 3.16) + $(eval PKG_BASE_IMAGE = alpine:3.16) + $(eval PKG_SUPPORTED_ARCHS = i386 x86_64 aarch64 arm64 armv7l armv6l armv5l ppc64le s390x) + +.PHONY: pkg-info-debian10 +pkg-info-debian10: + $(eval PKG_TYPE = deb) + $(eval PKG_DISTRO = debian) + $(eval PKG_SUITE = buster) + $(eval PKG_BASE_IMAGE = debian:buster) + $(eval PKG_SUPPORTED_ARCHS = i386 x86_64 aarch64 arm64 armv7l armv6l ppc64le riscv64 s390x) + +.PHONY: pkg-info-debian11 +pkg-info-debian11: + $(eval PKG_TYPE = deb) + $(eval PKG_DISTRO = debian) + $(eval PKG_SUITE = bullseye) + $(eval PKG_BASE_IMAGE = debian:bullseye) + $(eval PKG_SUPPORTED_ARCHS = i386 x86_64 aarch64 arm64 armv7l armv6l ppc64le riscv64 s390x) + +.PHONY: pkg-info-raspbian10 +pkg-info-raspbian10: + $(eval PKG_TYPE = deb) + $(eval PKG_DISTRO = raspbian) + $(eval PKG_SUITE = buster) + $(eval PKG_BASE_IMAGE = raspbian:buster) + $(eval PKG_SUPPORTED_ARCHS = armv6l) + +.PHONY: pkg-info-raspbian11 +pkg-info-raspbian11: + $(eval PKG_TYPE = deb) + $(eval PKG_DISTRO = raspbian) + $(eval PKG_SUITE = bullseye) + $(eval PKG_BASE_IMAGE = raspbian:bullseye) + $(eval PKG_SUPPORTED_ARCHS = armv6l) + +.PHONY: pkg-info-ubuntu1804 +pkg-info-ubuntu1804: + $(eval PKG_TYPE = deb) + $(eval PKG_DISTRO = ubuntu) + $(eval PKG_SUITE = bionic) + $(eval PKG_BASE_IMAGE = ubuntu:bionic) + $(eval PKG_SUPPORTED_ARCHS = i386 x86_64 aarch64 arm64 armv7l ppc64le s390x) + +.PHONY: pkg-info-ubuntu2004 +pkg-info-ubuntu2004: + $(eval PKG_TYPE = deb) + $(eval PKG_DISTRO = ubuntu) + $(eval PKG_SUITE = focal) + $(eval PKG_BASE_IMAGE = ubuntu:focal) + $(eval PKG_SUPPORTED_ARCHS = x86_64 aarch64 arm64 armv7l ppc64le riscv64 s390x) + +.PHONY: pkg-info-ubuntu2204 +pkg-info-ubuntu2204: + $(eval PKG_TYPE = deb) + $(eval PKG_DISTRO = ubuntu) + $(eval PKG_SUITE = jammy) + $(eval PKG_BASE_IMAGE = ubuntu:jammy) + $(eval PKG_SUPPORTED_ARCHS = x86_64 aarch64 arm64 armv7l ppc64le riscv64 s390x) + +.PHONY: pkg-info-centos7 +pkg-info-centos7: + $(eval PKG_TYPE = rpm) + $(eval PKG_DISTRO = centos) + $(eval PKG_SUITE = 7) + $(eval PKG_BASE_IMAGE = centos:7) + $(eval PKG_SUPPORTED_ARCHS = i386 x86_64 aarch64 arm64 armv7l ppc64le) + +.PHONY: pkg-info-centos8 +pkg-info-centos8: + $(eval PKG_TYPE = rpm) + $(eval PKG_DISTRO = centos) + $(eval PKG_SUITE = 8) + $(eval PKG_BASE_IMAGE = quay.io/centos/centos:stream8) + $(eval PKG_SUPPORTED_ARCHS = i386 x86_64 aarch64 arm64 ppc64le) + +.PHONY: pkg-info-centos9 +pkg-info-centos9: + $(eval PKG_TYPE = rpm) + $(eval PKG_DISTRO = centos) + $(eval PKG_SUITE = 9) + $(eval PKG_BASE_IMAGE = quay.io/centos/centos:stream9) + $(eval PKG_SUPPORTED_ARCHS = i386 x86_64 aarch64 arm64 ppc64le s390x) + +.PHONY: pkg-info-fedora35 +pkg-info-fedora35: + $(eval PKG_TYPE = rpm) + $(eval PKG_DISTRO = fedora) + $(eval PKG_SUITE = 35) + $(eval PKG_BASE_IMAGE = fedora:35) + $(eval PKG_SUPPORTED_ARCHS = x86_64 aarch64 arm64 armv7l ppc64le s390x) + +.PHONY: pkg-info-fedora36 +pkg-info-fedora36: + $(eval PKG_TYPE = rpm) + $(eval PKG_DISTRO = fedora) + $(eval PKG_SUITE = 36) + $(eval PKG_BASE_IMAGE = fedora:36) + $(eval PKG_SUPPORTED_ARCHS = x86_64 aarch64 arm64 armv7l ppc64le s390x) + +.PHONY: pkg-info-fedora37 +pkg-info-fedora37: + $(eval PKG_TYPE = rpm) + $(eval PKG_DISTRO = fedora) + $(eval PKG_SUITE = 37) + $(eval PKG_BASE_IMAGE = fedora:37) + $(eval PKG_SUPPORTED_ARCHS = x86_64 aarch64 arm64 ppc64le s390x) + +.PHONY: pkg-info-oraclelinux7 +pkg-info-oraclelinux7: + $(eval PKG_TYPE = rpm) + $(eval PKG_DISTRO = oraclelinux) + $(eval PKG_SUITE = 7) + $(eval PKG_BASE_IMAGE = oraclelinux:7) + $(eval PKG_SUPPORTED_ARCHS = x86_64 aarch64 arm64) + +.PHONY: pkg-info-oraclelinux8 +pkg-info-oraclelinux8: + $(eval PKG_TYPE = rpm) + $(eval PKG_DISTRO = oraclelinux) + $(eval PKG_SUITE = 8) + $(eval PKG_BASE_IMAGE = oraclelinux:8) + $(eval PKG_SUPPORTED_ARCHS = x86_64 aarch64 arm64) + +.PHONY: pkg-info-oraclelinux9 +pkg-info-oraclelinux9: + $(eval PKG_TYPE = rpm) + $(eval PKG_DISTRO = oraclelinux) + $(eval PKG_SUITE = 9) + $(eval PKG_BASE_IMAGE = oraclelinux:9) + $(eval PKG_SUPPORTED_ARCHS = x86_64 aarch64 arm64) + +.PHONY: pkg-info-static +pkg-info-static: + $(eval PKG_TYPE = static) + $(eval PKG_DISTRO = static) + $(eval PKG_SUITE =) + $(eval PKG_BASE_IMAGE = debian:bullseye) + $(eval PKG_SUPPORTED_ARCHS =) diff --git a/pkg/buildx/Dockerfile b/pkg/buildx/Dockerfile index 655bf047..56bd0684 100644 --- a/pkg/buildx/Dockerfile +++ b/pkg/buildx/Dockerfile @@ -19,6 +19,13 @@ ARG NFPM_VERSION="2.15.1" ARG XX_VERSION="1.1.2" ARG MODE="download" +# pkg matrix +ARG PKG_RELEASE="debian11" +ARG PKG_TYPE="deb" +ARG PKG_DISTRO="debian" +ARG PKG_SUITE="bullseye" +ARG PKG_BASE_IMAGE="debian:bullseye" + FROM --platform=$BUILDPLATFORM alpine:${ALPINE_VERSION} AS base RUN apk add --no-cache bash curl file git zip tar @@ -61,10 +68,13 @@ COPY --from=binary /out/buildx /usr/bin/buildx ARG MODE ARG BUILDX_VERSION ARG PKG_NAME -ARG PKG_TYPE ARG PKG_RELEASE -ARG PKG_VENDOR +ARG PKG_TYPE +ARG PKG_DISTRO +ARG PKG_SUITE ARG PKG_PACKAGER +ARG PKG_VENDOR +ARG PKG_REVISION ARG PKG_OUTPUT=/build ARG TARGETPLATFORM RUN --mount=source=nfpm.yml,target=nfpm.yml \ @@ -74,7 +84,13 @@ RUN --mount=source=nfpm.yml,target=nfpm.yml \ if [ "$MODE" != "download" ]; then BUILDX_VERSION="$(git -C "/src" describe --match 'v[0-9]*' --dirty='.m' --always --tags)" fi - PKG_OUTPUT="${PKG_OUTPUT}/$(xx-info os)/$(xx-info arch)" + PKG_OUTPUT="${PKG_OUTPUT}/${PKG_DISTRO}" + if [ "${PKG_DISTRO}" = "static" ]; then + PKG_OUTPUT="${PKG_OUTPUT}/$(xx-info os)" + else + PKG_OUTPUT="${PKG_OUTPUT}/${PKG_SUITE}" + fi + PKG_OUTPUT="${PKG_OUTPUT}/$(xx-info arch)" if [ -n "$(xx-info variant)" ]; then PKG_OUTPUT="${PKG_OUTPUT}/$(xx-info variant)" fi @@ -112,7 +128,7 @@ RUN --mount=source=nfpm.yml,target=nfpm.yml \ esac ( set -x - ARCH="${arch}" VERSION="${BUILDX_VERSION}" RELEASE="$PKG_RELEASE" VENDOR="${PKG_VENDOR}" PACKAGER="${PKG_PACKAGER}" nfpm package --config ./nfpm.yml --packager $PKG_TYPE --target "$PKG_OUTPUT" + ARCH="${arch}" VERSION="${BUILDX_VERSION}" RELEASE="$PKG_REVISION" VENDOR="${PKG_VENDOR}" PACKAGER="${PKG_PACKAGER}" nfpm package --config ./nfpm.yml --packager $PKG_TYPE --target "$PKG_OUTPUT" ) else rm -rf "${PKG_OUTPUT}" @@ -130,17 +146,35 @@ ARG TARGETARCH ARG TARGETVARIANT RUN --mount=from=bin-folder,source=.,target=/release < docker-buildx-plugin_0.8.1-r0_aarch64.apk -# deb: debian11 => docker-buildx-plugin_0.8.1-debian11_arm64.deb -# rpm: fedora36 => docker-buildx-plugin-0.8.1-fedora36.aarch64.rpm -variable "PKG_RELEASE" { - default = "unknown" +target "_pkg-static" { + args = { + PKG_RELEASE = "" + PKG_TYPE = "static" + } } # Sets the vendor/maintainer name (only for linux packages) @@ -53,6 +51,12 @@ variable "PKG_PACKAGER" { default = "Docker " } +# Include an extra `.0` in the version, in case we ever would have to re-build +# an already published release with a packaging-only change. +variable "PKG_REVISION" { + default = "0" +} + # Defines the output folder variable "DESTDIR" { default = "" @@ -72,14 +76,14 @@ group "default" { } target "_common" { + inherits = ["_pkg-${PKG_RELEASE}"] args = { BUILDX_REPO = BUILDX_REPO BUILDX_VERSION = BUILDX_VERSION PKG_NAME = PKG_NAME - PKG_TYPE = PKG_TYPE - PKG_RELEASE = PKG_RELEASE PKG_VENDOR = PKG_VENDOR PKG_PACKAGER = PKG_PACKAGER + PKG_REVISION = PKG_REVISION } } @@ -99,8 +103,8 @@ target "_platforms" { ] } -# $ PKG_TYPE=deb PKG_DEB_RELEASE=debian11 docker buildx bake pkg -# $ docker buildx bake --set *.platform=windows/amd64 --set *.output=./bin pkg +# $ PKG_RELEASE=debian11 docker buildx bake pkg +# $ docker buildx bake --set *.platform=linux/amd64 --set *.output=./bin pkg group "pkg" { targets = [substr(BUILDX_VERSION, 0, 1) == "#" ? "_pkg-build" : "_pkg-download"] } @@ -112,8 +116,8 @@ group "pkg-cross" { # Create release image by using ./bin folder as named context. Therefore # pkg-cross target must be run before using this target: -# $ PKG_TYPE=deb PKG_DEB_RELEASE=debian11 docker buildx bake pkg-cross -# $ docker buildx bake release --set *.output=type=image,push=true --set *.tags=docker/packaging:buildx-0.8.1-r0 +# $ PKG_RELEASE=debian11 docker buildx bake pkg-cross +# $ docker buildx bake release --push --set *.tags=docker/packaging:build-v0.9.1 target "release" { inherits = ["meta-helper", "_platforms"] target = "release" diff --git a/pkg/compose/Dockerfile b/pkg/compose/Dockerfile index 14a5361f..98c8f98d 100644 --- a/pkg/compose/Dockerfile +++ b/pkg/compose/Dockerfile @@ -19,6 +19,13 @@ ARG NFPM_VERSION="2.15.1" ARG XX_VERSION="1.1.2" ARG MODE="download" +# pkg matrix +ARG PKG_RELEASE="debian11" +ARG PKG_TYPE="deb" +ARG PKG_DISTRO="debian" +ARG PKG_SUITE="bullseye" +ARG PKG_BASE_IMAGE="debian:bullseye" + FROM --platform=$BUILDPLATFORM alpine:${ALPINE_VERSION} AS base RUN apk add --no-cache bash curl file git zip tar @@ -63,10 +70,13 @@ COPY --from=binary /out/compose /usr/bin/compose ARG MODE ARG COMPOSE_VERSION ARG PKG_NAME -ARG PKG_TYPE ARG PKG_RELEASE -ARG PKG_VENDOR +ARG PKG_TYPE +ARG PKG_DISTRO +ARG PKG_SUITE ARG PKG_PACKAGER +ARG PKG_VENDOR +ARG PKG_REVISION ARG PKG_OUTPUT=/build ARG TARGETPLATFORM RUN --mount=source=nfpm.yml,target=nfpm.yml \ @@ -76,7 +86,13 @@ RUN --mount=source=nfpm.yml,target=nfpm.yml \ if [ "$MODE" != "download" ]; then COMPOSE_VERSION="$(git -C "/src" describe --match 'v[0-9]*' --dirty='.m' --always --tags)" fi - PKG_OUTPUT="${PKG_OUTPUT}/$(xx-info os)/$(xx-info arch)" + PKG_OUTPUT="${PKG_OUTPUT}/${PKG_DISTRO}" + if [ "${PKG_DISTRO}" = "static" ]; then + PKG_OUTPUT="${PKG_OUTPUT}/$(xx-info os)" + else + PKG_OUTPUT="${PKG_OUTPUT}/${PKG_SUITE}" + fi + PKG_OUTPUT="${PKG_OUTPUT}/$(xx-info arch)" if [ -n "$(xx-info variant)" ]; then PKG_OUTPUT="${PKG_OUTPUT}/$(xx-info variant)" fi @@ -114,7 +130,7 @@ RUN --mount=source=nfpm.yml,target=nfpm.yml \ esac ( set -x - ARCH="${arch}" VERSION="${COMPOSE_VERSION}" RELEASE="$PKG_RELEASE" VENDOR="${PKG_VENDOR}" PACKAGER="${PKG_PACKAGER}" nfpm package --config ./nfpm.yml --packager $PKG_TYPE --target "$PKG_OUTPUT" + ARCH="${arch}" VERSION="${COMPOSE_VERSION}" RELEASE="$PKG_REVISION" VENDOR="${PKG_VENDOR}" PACKAGER="${PKG_PACKAGER}" nfpm package --config ./nfpm.yml --packager $PKG_TYPE --target "$PKG_OUTPUT" ) else rm -rf "${PKG_OUTPUT}" @@ -132,17 +148,35 @@ ARG TARGETARCH ARG TARGETVARIANT RUN --mount=from=bin-folder,source=.,target=/release < docker-compose-plugin_2.10.2-r0_aarch64.apk -# deb: debian11 => docker-compose-plugin_2.10.2-debian11_arm64.deb -# rpm: fedora36 => docker-compose-plugin-2.10.2-fedora36.aarch64.rpm -variable "PKG_RELEASE" { - default = "unknown" +target "_pkg-static" { + args = { + PKG_RELEASE = "" + PKG_TYPE = "static" + } } # Sets the vendor/maintainer name (only for linux packages) @@ -53,6 +51,12 @@ variable "PKG_PACKAGER" { default = "Docker " } +# Include an extra `.0` in the version, in case we ever would have to re-build +# an already published release with a packaging-only change. +variable "PKG_REVISION" { + default = "0" +} + # Defines the output folder variable "DESTDIR" { default = "" @@ -72,14 +76,14 @@ group "default" { } target "_common" { + inherits = ["_pkg-${PKG_RELEASE}"] args = { COMPOSE_REPO = COMPOSE_REPO COMPOSE_VERSION = COMPOSE_VERSION PKG_NAME = PKG_NAME - PKG_TYPE = PKG_TYPE - PKG_RELEASE = PKG_RELEASE PKG_VENDOR = PKG_VENDOR PKG_PACKAGER = PKG_PACKAGER + PKG_REVISION = PKG_REVISION } } @@ -99,8 +103,8 @@ target "_platforms" { ] } -# $ PKG_TYPE=deb PKG_DEB_RELEASE=debian11 docker buildx bake pkg -# $ docker buildx bake --set *.platform=windows/amd64 --set *.output=./bin pkg +# $ PKG_RELEASE=debian11 docker buildx bake pkg +# $ docker buildx bake --set *.platform=linux/amd64 --set *.output=./bin pkg group "pkg" { targets = [substr(COMPOSE_VERSION, 0, 1) == "#" ? "_pkg-build" : "_pkg-download"] } @@ -112,8 +116,8 @@ group "pkg-cross" { # Create release image by using ./bin folder as named context. Therefore # pkg-cross target must be run before using this target: -# $ PKG_TYPE=deb PKG_DEB_RELEASE=debian11 docker buildx bake pkg-cross -# $ docker buildx bake release --set *.output=type=image,push=true --set *.tags=docker/packaging:compose-2.10.2-r0 +# $ PKG_RELEASE=debian11 docker buildx bake pkg-cross +# $ docker buildx bake release --push --set *.tags=docker/packaging:compose-v2.10.2 target "release" { inherits = ["meta-helper", "_platforms"] target = "release" diff --git a/vars.mk b/vars.mk index 057bee36..bfcd0192 100644 --- a/vars.mk +++ b/vars.mk @@ -12,10 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -PKG_APK_RELEASES ?= r0 -PKG_DEB_RELEASES ?= debian10 debian11 ubuntu1804 ubuntu2004 ubuntu2204 raspbian10 raspbian11 -PKG_RPM_RELEASES ?= centos7 centos8 fedora33 fedora34 fedora35 fedora36 - export BASEDIR ?= $(CURDIR) export PKG_VENDOR ?= Docker export PKG_PACKAGER ?= Docker @@ -26,8 +22,10 @@ export COMPOSE_REPO ?= https://github.com/docker/compose.git export BUILDX_VERSION ?= v0.9.1 export COMPOSE_VERSION ?= v2.10.2 +.PHONY: buildx-version buildx-version: @echo $(BUILDX_VERSION) +.PHONY: compose-version compose-version: @echo $(COMPOSE_VERSION)