From a1196233bfbe88a60aaf5c05b727eb20b78e6b8c Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sat, 27 May 2023 22:00:18 +0200 Subject: [PATCH 01/26] distro: add fedora 38 Signed-off-by: CrazyMax (cherry picked from commit a15f42f0abbc7189605d452d6ef6551b828edd0d) --- Makefile | 2 +- common/packages.hcl | 11 +++++++++++ common/packages.mk | 11 ++++++++++- 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index e8f2a64c..76ea1ff1 100644 --- a/Makefile +++ b/Makefile @@ -40,7 +40,7 @@ include common/packages.mk GHA_MATRIX ?= minimal ifeq ($(GHA_MATRIX),minimal) - GHA_RELEASES := debian10 debian11 debian12 ubuntu1804 ubuntu2004 ubuntu2204 ubuntu2304 centos7 centos9 oraclelinux7 fedora37 static + GHA_RELEASES := debian10 debian11 debian12 ubuntu1804 ubuntu2004 ubuntu2204 ubuntu2304 centos7 centos9 oraclelinux7 fedora37 fedora38 static else ifeq ($(GHA_MATRIX),all) GHA_RELEASES := $(PKG_DEB_RELEASES) $(PKG_RPM_RELEASES) static else diff --git a/common/packages.hcl b/common/packages.hcl index 02f68007..672a41b9 100644 --- a/common/packages.hcl +++ b/common/packages.hcl @@ -240,6 +240,17 @@ target "_pkg-fedora37" { } } +target "_pkg-fedora38" { + args = { + PKG_RELEASE = "fedora38" + PKG_TYPE = "rpm" + PKG_DISTRO = "fedora" + PKG_DISTRO_ID = "38" + PKG_DISTRO_SUITE = "38" + PKG_BASE_IMAGE = "fedora:38" + } +} + target "_pkg-oraclelinux7" { args = { PKG_RELEASE = "oraclelinux7" diff --git a/common/packages.mk b/common/packages.mk index 25fda83e..12732cc6 100644 --- a/common/packages.mk +++ b/common/packages.mk @@ -16,7 +16,7 @@ # if you add a new release PKG_APK_RELEASES ?= alpine314 alpine315 alpine316 PKG_DEB_RELEASES ?= debian10 debian11 debian12 ubuntu1804 ubuntu2004 ubuntu2204 ubuntu2210 ubuntu2304 raspbian10 raspbian11 raspbian12 -PKG_RPM_RELEASES ?= centos7 centos8 centos9 fedora36 fedora37 oraclelinux7 oraclelinux8 oraclelinux9 +PKG_RPM_RELEASES ?= centos7 centos8 centos9 fedora36 fedora37 fedora38 oraclelinux7 oraclelinux8 oraclelinux9 # PKG_SUPPORTED_PLATFORMS could be replaced by: # docker buildx imagetools inspect centos:7 --format "{{json .Manifest}}" | jq -r '.manifests[] | "\(.platform.os)/\(.platform.architecture)/\(.platform.variant)"' | sed 's#/null$##' | tr '\n' ',' | sed 's#,$##' @@ -214,6 +214,15 @@ pkg-info-fedora37: $(eval PKG_BASE_IMAGE = fedora:37) $(eval PKG_SUPPORTED_PLATFORMS = linux/amd64 linux/arm64 linux/ppc64le linux/s390x) +.PHONY: pkg-info-fedora38 +pkg-info-fedora38: + $(eval PKG_TYPE = rpm) + $(eval PKG_DISTRO = fedora) + $(eval PKG_DISTRO_ID = 38) + $(eval PKG_DISTRO_SUITE = 38) + $(eval PKG_BASE_IMAGE = fedora:38) + $(eval PKG_SUPPORTED_PLATFORMS = linux/amd64 linux/arm64 linux/ppc64le linux/s390x) + .PHONY: pkg-info-oraclelinux7 pkg-info-oraclelinux7: $(eval PKG_TYPE = rpm) From aa3da63594c7858f261d7f923285a36c5c00418c Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Mon, 29 May 2023 19:30:47 +0200 Subject: [PATCH 02/26] dockerfiles: update to stable frontend Signed-off-by: CrazyMax (cherry picked from commit 7651382d8724c13e76bb7763eed193617637e1c5) --- pkg/buildx/Dockerfile | 2 +- pkg/compose/Dockerfile | 2 +- pkg/containerd/Dockerfile | 2 +- pkg/credential-helpers/Dockerfile | 2 +- pkg/docker-cli/Dockerfile | 2 +- pkg/docker-engine/Dockerfile | 2 +- pkg/sbom/Dockerfile | 2 +- pkg/scan/Dockerfile | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pkg/buildx/Dockerfile b/pkg/buildx/Dockerfile index c80f7bac..fb2002aa 100644 --- a/pkg/buildx/Dockerfile +++ b/pkg/buildx/Dockerfile @@ -1,4 +1,4 @@ -# syntax=docker/dockerfile-upstream:1 +# syntax=docker/dockerfile:1 # Copyright 2022 Docker Packaging authors # diff --git a/pkg/compose/Dockerfile b/pkg/compose/Dockerfile index c0928b9e..c09734b3 100644 --- a/pkg/compose/Dockerfile +++ b/pkg/compose/Dockerfile @@ -1,4 +1,4 @@ -# syntax=docker/dockerfile-upstream:1 +# syntax=docker/dockerfile:1 # Copyright 2022 Docker Packaging authors # diff --git a/pkg/containerd/Dockerfile b/pkg/containerd/Dockerfile index 487fd6ba..c367f03a 100644 --- a/pkg/containerd/Dockerfile +++ b/pkg/containerd/Dockerfile @@ -1,4 +1,4 @@ -# syntax=docker/dockerfile-upstream:1 +# syntax=docker/dockerfile:1 # Copyright 2022 Docker Packaging authors # diff --git a/pkg/credential-helpers/Dockerfile b/pkg/credential-helpers/Dockerfile index b8f81d4c..5abd80e8 100644 --- a/pkg/credential-helpers/Dockerfile +++ b/pkg/credential-helpers/Dockerfile @@ -1,4 +1,4 @@ -# syntax=docker/dockerfile-upstream:1 +# syntax=docker/dockerfile:1 # Copyright 2022 Docker Packaging authors # diff --git a/pkg/docker-cli/Dockerfile b/pkg/docker-cli/Dockerfile index b1984ca7..477e8326 100644 --- a/pkg/docker-cli/Dockerfile +++ b/pkg/docker-cli/Dockerfile @@ -1,4 +1,4 @@ -# syntax=docker/dockerfile-upstream:1 +# syntax=docker/dockerfile:1 # Copyright 2022 Docker Packaging authors # diff --git a/pkg/docker-engine/Dockerfile b/pkg/docker-engine/Dockerfile index 4cc0f70e..05f3d28e 100644 --- a/pkg/docker-engine/Dockerfile +++ b/pkg/docker-engine/Dockerfile @@ -1,4 +1,4 @@ -# syntax=docker/dockerfile-upstream:1 +# syntax=docker/dockerfile:1 # Copyright 2022 Docker Packaging authors # diff --git a/pkg/sbom/Dockerfile b/pkg/sbom/Dockerfile index e777084e..a2ca0d3c 100644 --- a/pkg/sbom/Dockerfile +++ b/pkg/sbom/Dockerfile @@ -1,4 +1,4 @@ -# syntax=docker/dockerfile-upstream:1 +# syntax=docker/dockerfile:1 # Copyright 2022 Docker Packaging authors # diff --git a/pkg/scan/Dockerfile b/pkg/scan/Dockerfile index 454618a6..e401da93 100644 --- a/pkg/scan/Dockerfile +++ b/pkg/scan/Dockerfile @@ -1,4 +1,4 @@ -# syntax=docker/dockerfile-upstream:1 +# syntax=docker/dockerfile:1 # Copyright 2022 Docker Packaging authors # From 26c78adec9dc6064e39bf415c3cdf0fcb4415a40 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Fri, 4 Aug 2023 00:17:49 +0200 Subject: [PATCH 03/26] disable s390x releases Our remote instance seems offline for quite some time. Let's disable release builds for this arch for now. Signed-off-by: CrazyMax (cherry picked from commit ff95bee6457237f720d75953dc7ead8045b606df) --- .github/workflows/.release.yml | 12 ++++++------ pkg/buildx/Makefile | 3 ++- pkg/compose/Makefile | 3 ++- pkg/containerd/Makefile | 3 ++- pkg/credential-helpers/Makefile | 3 ++- pkg/docker-cli/Makefile | 3 ++- pkg/docker-engine/Makefile | 3 ++- 7 files changed, 18 insertions(+), 12 deletions(-) diff --git a/.github/workflows/.release.yml b/.github/workflows/.release.yml index 067ab281..a4ed9509 100644 --- a/.github/workflows/.release.yml +++ b/.github/workflows/.release.yml @@ -77,16 +77,16 @@ jobs: - name: aws_graviton2 endpoint: tcp://${{ secrets.AWS_ARM64_HOST }}:1234 platforms: darwin/arm64,linux/arm64,linux/arm/v5,linux/arm/v6,linux/arm/v7,windows/arm64 - - name: linuxone_s390x - endpoint: tcp://${{ secrets.LINUXONE_S390X_HOST }}:1234 - platforms: linux/s390x +# - name: linuxone_s390x +# endpoint: tcp://${{ secrets.LINUXONE_S390X_HOST }}:1234 +# platforms: linux/s390x env: BUILDER_NODE_1_AUTH_TLS_CACERT: ${{ secrets.AWS_ARM64_CACERT }} BUILDER_NODE_1_AUTH_TLS_CERT: ${{ secrets.AWS_ARM64_CERT }} BUILDER_NODE_1_AUTH_TLS_KEY: ${{ secrets.AWS_ARM64_KEY }} - BUILDER_NODE_2_AUTH_TLS_CACERT: ${{ secrets.LINUXONE_S390X_CACERT }} - BUILDER_NODE_2_AUTH_TLS_CERT: ${{ secrets.LINUXONE_S390X_CERT }} - BUILDER_NODE_2_AUTH_TLS_KEY: ${{ secrets.LINUXONE_S390X_KEY }} +# BUILDER_NODE_2_AUTH_TLS_CACERT: ${{ secrets.LINUXONE_S390X_CACERT }} +# BUILDER_NODE_2_AUTH_TLS_CERT: ${{ secrets.LINUXONE_S390X_CERT }} +# BUILDER_NODE_2_AUTH_TLS_KEY: ${{ secrets.LINUXONE_S390X_KEY }} - name: Build run: | diff --git a/pkg/buildx/Makefile b/pkg/buildx/Makefile index 9ca509e2..cec180e8 100644 --- a/pkg/buildx/Makefile +++ b/pkg/buildx/Makefile @@ -26,7 +26,8 @@ export BUILDX_REF := $(if $(BUILDX_REF),$(BUILDX_REF),master) PKG_LIST ?= deb rpm static # supported platforms: https://github.com/docker/buildx/blob/master/docker-bake.hcl#L110-L122 # FIXME: add linux/ppc64le when a remote PowerPC instance is available (too slow with QEMU) -PKG_PLATFORMS ?= darwin/amd64 darwin/arm64 linux/amd64 linux/arm/v5 linux/arm/v6 linux/arm/v7 linux/arm64 linux/riscv64 linux/s390x windows/amd64 windows/arm64 +# FIXME: add linux/s390x when remote instance is reachable again (too slow with QEMU) +PKG_PLATFORMS ?= darwin/amd64 darwin/arm64 linux/amd64 linux/arm/v5 linux/arm/v6 linux/arm/v7 linux/arm64 linux/riscv64 windows/amd64 windows/arm64 .PHONY: default default: pkg ; diff --git a/pkg/compose/Makefile b/pkg/compose/Makefile index a29a153c..2f9e47d0 100644 --- a/pkg/compose/Makefile +++ b/pkg/compose/Makefile @@ -26,7 +26,8 @@ export COMPOSE_REF := $(if $(COMPOSE_REF),$(COMPOSE_REF),v2) PKG_LIST ?= deb rpm static # supported platforms: https://github.com/docker/compose/blob/v2/docker-bake.hcl#L95-L107 # FIXME: add linux/ppc64le when a remote PowerPC instance is available (too slow with QEMU) -PKG_PLATFORMS ?= darwin/amd64 darwin/arm64 linux/amd64 linux/arm/v5 linux/arm/v6 linux/arm/v7 linux/arm64 linux/riscv64 linux/s390x windows/amd64 windows/arm64 +# FIXME: add linux/s390x when remote instance is reachable again (too slow with QEMU) +PKG_PLATFORMS ?= darwin/amd64 darwin/arm64 linux/amd64 linux/arm/v5 linux/arm/v6 linux/arm/v7 linux/arm64 linux/riscv64 windows/amd64 windows/arm64 .PHONY: default default: pkg ; diff --git a/pkg/containerd/Makefile b/pkg/containerd/Makefile index 24d45d10..334a68d9 100644 --- a/pkg/containerd/Makefile +++ b/pkg/containerd/Makefile @@ -32,7 +32,8 @@ PKG_LIST ?= deb rpm static # FIXME: can't build static binaries with containerd Makefile for darwin/amd64 darwin/arm64 windows/amd64 platforms # FIXME: linux/riscv64 needs ubuntu:22.04 image # FIXME: add linux/ppc64le when a remote PowerPC instance is available (too slow with QEMU) -PKG_PLATFORMS ?= linux/amd64 linux/arm/v5 linux/arm/v6 linux/arm/v7 linux/arm64 linux/s390x +# FIXME: add linux/s390x when remote instance is reachable again (too slow with QEMU) +PKG_PLATFORMS ?= linux/amd64 linux/arm/v5 linux/arm/v6 linux/arm/v7 linux/arm64 .PHONY: default default: pkg ; diff --git a/pkg/credential-helpers/Makefile b/pkg/credential-helpers/Makefile index b343ec75..cb60752f 100644 --- a/pkg/credential-helpers/Makefile +++ b/pkg/credential-helpers/Makefile @@ -26,7 +26,8 @@ export CREDENTIAL_HELPERS_REF := $(if $(CREDENTIAL_HELPERS_REF),$(CREDENTIAL_HEL PKG_LIST ?= deb rpm static # supported platforms: https://github.com/docker/docker-credential-helpers/blob/master/docker-bake.hcl#L56-L66 # FIXME: add linux/ppc64le when a remote PowerPC instance is available (too slow with QEMU) -PKG_PLATFORMS ?= darwin/amd64 darwin/arm64 linux/amd64 linux/arm/v5 linux/arm/v6 linux/arm/v7 linux/arm64 linux/s390x windows/amd64 +# FIXME: add linux/s390x when remote instance is reachable again (too slow with QEMU) +PKG_PLATFORMS ?= darwin/amd64 darwin/arm64 linux/amd64 linux/arm/v5 linux/arm/v6 linux/arm/v7 linux/arm64 windows/amd64 .PHONY: default default: pkg ; diff --git a/pkg/docker-cli/Makefile b/pkg/docker-cli/Makefile index 79afcf5c..3c415e2a 100644 --- a/pkg/docker-cli/Makefile +++ b/pkg/docker-cli/Makefile @@ -29,7 +29,8 @@ export PKG_RPM_RELEASE = 3 PKG_LIST ?= deb rpm static # supported platforms: https://github.com/docker/cli/blob/master/docker-bake.hcl#L30-L42 # FIXME: add linux/ppc64le when a remote PowerPC instance is available (too slow with QEMU) -PKG_PLATFORMS ?= darwin/amd64 darwin/arm64 linux/386 linux/amd64 linux/arm/v5 linux/arm/v6 linux/arm/v7 linux/arm64 linux/riscv64 linux/s390x windows/amd64 windows/arm64 +# FIXME: add linux/s390x when remote instance is reachable again (too slow with QEMU) +PKG_PLATFORMS ?= darwin/amd64 darwin/arm64 linux/386 linux/amd64 linux/arm/v5 linux/arm/v6 linux/arm/v7 linux/arm64 linux/riscv64 windows/amd64 windows/arm64 .PHONY: default default: pkg ; diff --git a/pkg/docker-engine/Makefile b/pkg/docker-engine/Makefile index 60d3fec3..b4a872be 100644 --- a/pkg/docker-engine/Makefile +++ b/pkg/docker-engine/Makefile @@ -29,7 +29,8 @@ export PKG_RPM_RELEASE = 3 PKG_LIST ?= deb rpm static # supported platforms: https://github.com/moby/moby/blob/master/docker-bake.hcl#L93-L101 # FIXME: add linux/ppc64le when a remote PowerPC instance is available (too slow with QEMU) -PKG_PLATFORMS ?= linux/amd64 linux/arm/v5 linux/arm/v6 linux/arm/v7 linux/arm64 linux/s390x windows/amd64 +# FIXME: add linux/s390x when remote instance is reachable again (too slow with QEMU) +PKG_PLATFORMS ?= linux/amd64 linux/arm/v5 linux/arm/v6 linux/arm/v7 linux/arm64 windows/amd64 .PHONY: default default: pkg ; From 24d51ae7f33688453d1bf0b05e8b4228f059c611 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Fri, 4 Aug 2023 04:51:22 +0200 Subject: [PATCH 04/26] common: ubuntu 18.04 eol Signed-off-by: CrazyMax (cherry picked from commit 9ff52378e6ebca62122b95ffbb596cda540a0b82) --- Makefile | 2 +- common/packages.hcl | 11 ----------- common/packages.mk | 11 +---------- 3 files changed, 2 insertions(+), 22 deletions(-) diff --git a/Makefile b/Makefile index 76ea1ff1..51a23ac6 100644 --- a/Makefile +++ b/Makefile @@ -40,7 +40,7 @@ include common/packages.mk GHA_MATRIX ?= minimal ifeq ($(GHA_MATRIX),minimal) - GHA_RELEASES := debian10 debian11 debian12 ubuntu1804 ubuntu2004 ubuntu2204 ubuntu2304 centos7 centos9 oraclelinux7 fedora37 fedora38 static + GHA_RELEASES := debian10 debian11 debian12 ubuntu2004 ubuntu2204 ubuntu2304 centos7 centos9 oraclelinux7 fedora37 fedora38 static else ifeq ($(GHA_MATRIX),all) GHA_RELEASES := $(PKG_DEB_RELEASES) $(PKG_RPM_RELEASES) static else diff --git a/common/packages.hcl b/common/packages.hcl index 672a41b9..f3e6545f 100644 --- a/common/packages.hcl +++ b/common/packages.hcl @@ -130,17 +130,6 @@ target "_pkg-raspbian12" { } } -target "_pkg-ubuntu1804" { - args = { - PKG_RELEASE = "ubuntu1804" - PKG_TYPE = "deb" - PKG_DISTRO = "ubuntu" - PKG_DISTRO_ID = "18.04" - PKG_DISTRO_SUITE = "bionic" - PKG_BASE_IMAGE = "ubuntu:bionic" - } -} - target "_pkg-ubuntu2004" { args = { PKG_RELEASE = "ubuntu2004" diff --git a/common/packages.mk b/common/packages.mk index 12732cc6..a8fd940d 100644 --- a/common/packages.mk +++ b/common/packages.mk @@ -15,7 +15,7 @@ # 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 debian12 ubuntu1804 ubuntu2004 ubuntu2204 ubuntu2210 ubuntu2304 raspbian10 raspbian11 raspbian12 +PKG_DEB_RELEASES ?= debian10 debian11 debian12 ubuntu2004 ubuntu2204 ubuntu2210 ubuntu2304 raspbian10 raspbian11 raspbian12 PKG_RPM_RELEASES ?= centos7 centos8 centos9 fedora36 fedora37 fedora38 oraclelinux7 oraclelinux8 oraclelinux9 # PKG_SUPPORTED_PLATFORMS could be replaced by: @@ -118,15 +118,6 @@ pkg-info-raspbian12: $(eval PKG_BASE_IMAGE = balenalib/rpi-raspbian:bookworm) $(eval PKG_SUPPORTED_PLATFORMS = linux/arm/v7) -.PHONY: pkg-info-ubuntu1804 -pkg-info-ubuntu1804: - $(eval PKG_TYPE = deb) - $(eval PKG_DISTRO = ubuntu) - $(eval PKG_DISTRO_ID = 18.04) - $(eval PKG_DISTRO_SUITE = bionic) - $(eval PKG_BASE_IMAGE = ubuntu:bionic) - $(eval PKG_SUPPORTED_PLATFORMS = linux/386 linux/amd64 linux/arm64 linux/arm/v7 linux/ppc64le linux/s390x) - .PHONY: pkg-info-ubuntu2004 pkg-info-ubuntu2004: $(eval PKG_TYPE = deb) From 49ff2f76c0f5a7dd6a556e6f69da223a90c9acf7 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Fri, 4 Aug 2023 06:13:00 +0200 Subject: [PATCH 05/26] pkg(buildx): update debhelper compat to 12 and set override_dh_dwz Signed-off-by: CrazyMax (cherry picked from commit 2f087ed478dfe2cd8ca1359338cb80147d68b9e0) --- pkg/buildx/deb/compat | 1 - pkg/buildx/deb/control | 2 +- pkg/buildx/deb/rules | 6 ++++++ pkg/buildx/scripts/pkg-deb-build.sh | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) delete mode 100644 pkg/buildx/deb/compat diff --git a/pkg/buildx/deb/compat b/pkg/buildx/deb/compat deleted file mode 100644 index f599e28b..00000000 --- a/pkg/buildx/deb/compat +++ /dev/null @@ -1 +0,0 @@ -10 diff --git a/pkg/buildx/deb/control b/pkg/buildx/deb/control index ea70f9fe..5285e415 100644 --- a/pkg/buildx/deb/control +++ b/pkg/buildx/deb/control @@ -7,7 +7,7 @@ Vcs-Browser: https://github.com/docker/buildx Vcs-Git: git://github.com/docker/buildx.git Standards-Version: 3.9.6 Build-Depends: bash, - debhelper (>= 10~) | dh-systemd + debhelper-compat (= 12) Package: docker-buildx-plugin Priority: optional diff --git a/pkg/buildx/deb/rules b/pkg/buildx/deb/rules index beeb5572..b9991a72 100644 --- a/pkg/buildx/deb/rules +++ b/pkg/buildx/deb/rules @@ -21,6 +21,12 @@ override_dh_auto_test: override_dh_strip: # Go has lots of problems with stripping, so just don't +# http://manpages.debian.org/dh_dwz +override_dh_dwz: + # dh_dwz in debhelper versions less than 13 has issues with files that are missing debug symbols (once we update to debhelper-compat 13+ this can be removed) + @# https://packages.debian.org/debhelper + @# https://packages.ubuntu.com/debhelper + override_dh_auto_install: install -D -m 0755 /usr/libexec/docker/cli-plugins/docker-buildx debian/docker-buildx-plugin/usr/libexec/docker/cli-plugins/docker-buildx diff --git a/pkg/buildx/scripts/pkg-deb-build.sh b/pkg/buildx/scripts/pkg-deb-build.sh index 23086398..6fabcb6f 100755 --- a/pkg/buildx/scripts/pkg-deb-build.sh +++ b/pkg/buildx/scripts/pkg-deb-build.sh @@ -66,6 +66,6 @@ mkdir -p "${pkgoutput}" set -x -chmod -x debian/compat debian/control debian/docs +chmod -x debian/control debian/docs VERSION=${GENVER_VERSION} REVISION=${GENVER_COMMIT} dpkg-buildpackage $PKG_DEB_BUILDFLAGS --host-arch $(xx-info debian-arch) --target-arch $(xx-info debian-arch) cp /root/docker-* "${pkgoutput}"/ From b52480d65cf6bfeb2c0c2536fa92dd1665cac969 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Fri, 4 Aug 2023 06:13:09 +0200 Subject: [PATCH 06/26] pkg(compose): update debhelper compat to 12 and set override_dh_dwz Signed-off-by: CrazyMax (cherry picked from commit baf804274301c313c966eb84707e1e9d17a23b1c) --- pkg/compose/deb/compat | 1 - pkg/compose/deb/control | 2 +- pkg/compose/deb/rules | 6 ++++++ pkg/compose/scripts/pkg-deb-build.sh | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) delete mode 100644 pkg/compose/deb/compat diff --git a/pkg/compose/deb/compat b/pkg/compose/deb/compat deleted file mode 100644 index f599e28b..00000000 --- a/pkg/compose/deb/compat +++ /dev/null @@ -1 +0,0 @@ -10 diff --git a/pkg/compose/deb/control b/pkg/compose/deb/control index 9330164b..d5e863b9 100644 --- a/pkg/compose/deb/control +++ b/pkg/compose/deb/control @@ -7,7 +7,7 @@ Vcs-Browser: https://github.com/docker/compose Vcs-Git: git://github.com/docker/compose.git Standards-Version: 3.9.6 Build-Depends: bash, - debhelper (>= 10~) | dh-systemd, + debhelper-compat (= 12), make Package: docker-compose-plugin diff --git a/pkg/compose/deb/rules b/pkg/compose/deb/rules index 5fc536e9..f3a2a591 100644 --- a/pkg/compose/deb/rules +++ b/pkg/compose/deb/rules @@ -16,6 +16,12 @@ override_dh_auto_test: override_dh_strip: # Go has lots of problems with stripping, so just don't +# http://manpages.debian.org/dh_dwz +override_dh_dwz: + # dh_dwz in debhelper versions less than 13 has issues with files that are missing debug symbols (once we update to debhelper-compat 13+ this can be removed) + @# https://packages.debian.org/debhelper + @# https://packages.ubuntu.com/debhelper + override_dh_auto_install: install -D -m 0755 /usr/libexec/docker/cli-plugins/docker-compose debian/docker-compose-plugin/usr/libexec/docker/cli-plugins/docker-compose diff --git a/pkg/compose/scripts/pkg-deb-build.sh b/pkg/compose/scripts/pkg-deb-build.sh index e2777c51..b3fc0332 100755 --- a/pkg/compose/scripts/pkg-deb-build.sh +++ b/pkg/compose/scripts/pkg-deb-build.sh @@ -70,6 +70,6 @@ mkdir -p "${pkgoutput}" set -x -chmod -x debian/compat debian/control debian/docs +chmod -x debian/control debian/docs VERSION=${GENVER_VERSION} dpkg-buildpackage $PKG_DEB_BUILDFLAGS --host-arch $(xx-info debian-arch) --target-arch $(xx-info debian-arch) cp /root/docker-* "${pkgoutput}"/ From 3186ac594ff430f3bfb6a71e2e070f842bf17614 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Fri, 4 Aug 2023 06:13:53 +0200 Subject: [PATCH 07/26] pkg(containerd): update debhelper compat to 12 and set override_dh_dwz Signed-off-by: CrazyMax (cherry picked from commit 1b7e28d7c4a4de7cee3093b187bc3e0c144f3a34) --- pkg/containerd/deb/compat | 1 - pkg/containerd/deb/control | 2 +- pkg/containerd/deb/rules | 8 +++++++- pkg/containerd/scripts/pkg-deb-build.sh | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) delete mode 100644 pkg/containerd/deb/compat diff --git a/pkg/containerd/deb/compat b/pkg/containerd/deb/compat deleted file mode 100644 index f599e28b..00000000 --- a/pkg/containerd/deb/compat +++ /dev/null @@ -1 +0,0 @@ -10 diff --git a/pkg/containerd/deb/control b/pkg/containerd/deb/control index 96568ec5..fbb50751 100644 --- a/pkg/containerd/deb/control +++ b/pkg/containerd/deb/control @@ -2,7 +2,7 @@ Source: containerd.io Section: devel Priority: optional Maintainer: Containerd team -Build-Depends: debhelper (>= 10~) | dh-systemd, +Build-Depends: debhelper-compat (= 12), pkg-config, libseccomp-dev Standards-Version: 4.1.4 diff --git a/pkg/containerd/deb/rules b/pkg/containerd/deb/rules index 6699f258..c211e224 100755 --- a/pkg/containerd/deb/rules +++ b/pkg/containerd/deb/rules @@ -15,7 +15,7 @@ # limitations under the License. %: - dh $@ --with systemd + dh $@ # GO_SRC_PATH and PKG_NAME are defined in the dockerfile # VERSION and REF are defined in scripts/build-deb @@ -51,6 +51,12 @@ man: ## Create containerd man pages override_dh_builddeb: dh_builddeb -- -Zxz +# http://manpages.debian.org/dh_dwz +override_dh_dwz: + # dh_dwz in debhelper versions less than 13 has issues with files that are missing debug symbols (once we update to debhelper-compat 13+ this can be removed) + @# https://packages.debian.org/debhelper + @# https://packages.ubuntu.com/debhelper + override_dh_auto_build: binaries bin/runc man override_dh_systemd_start: diff --git a/pkg/containerd/scripts/pkg-deb-build.sh b/pkg/containerd/scripts/pkg-deb-build.sh index 851254ee..566ce3d7 100755 --- a/pkg/containerd/scripts/pkg-deb-build.sh +++ b/pkg/containerd/scripts/pkg-deb-build.sh @@ -68,6 +68,6 @@ set -x sed 's#/usr/local/bin/containerd#/usr/bin/containerd#g' "${SRCDIR}/containerd.service" > /common/containerd.service -chmod -x debian/compat debian/control debian/copyright debian/manpages +chmod -x debian/control debian/copyright debian/manpages VERSION=${GENVER_VERSION} REVISION=${GENVER_COMMIT} dpkg-buildpackage $PKG_DEB_BUILDFLAGS --host-arch $(xx-info debian-arch) --target-arch $(xx-info debian-arch) cp /root/${PKG_NAME}* "${pkgoutput}"/ From e900ff1539dc42418cc7ecb3a3af8a87dc95070e Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Fri, 4 Aug 2023 06:14:10 +0200 Subject: [PATCH 08/26] pkg(credential-helpers): update debhelper compat to 12 and set override_dh_dwz Signed-off-by: CrazyMax (cherry picked from commit 3cb3a9000e1698013427fd551d2d0f2022088490) --- pkg/credential-helpers/deb/compat | 1 - pkg/credential-helpers/deb/control | 2 +- pkg/credential-helpers/deb/rules | 6 ++++++ pkg/credential-helpers/scripts/pkg-deb-build.sh | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) delete mode 100644 pkg/credential-helpers/deb/compat diff --git a/pkg/credential-helpers/deb/compat b/pkg/credential-helpers/deb/compat deleted file mode 100644 index f599e28b..00000000 --- a/pkg/credential-helpers/deb/compat +++ /dev/null @@ -1 +0,0 @@ -10 diff --git a/pkg/credential-helpers/deb/control b/pkg/credential-helpers/deb/control index a8f5c43d..d0cdd947 100644 --- a/pkg/credential-helpers/deb/control +++ b/pkg/credential-helpers/deb/control @@ -6,7 +6,7 @@ Homepage: https://www.docker.com Vcs-Browser: https://github.com/docker/docker-credential-helpers Vcs-Git: git://github.com/docker/docker-credential-helpers.git Standards-Version: 3.9.6 -Build-Depends: debhelper (>= 10~) | dh-systemd, +Build-Depends: debhelper-compat (= 12), gcc, libsecret-1-dev, make diff --git a/pkg/credential-helpers/deb/rules b/pkg/credential-helpers/deb/rules index f6197cf1..53f47357 100644 --- a/pkg/credential-helpers/deb/rules +++ b/pkg/credential-helpers/deb/rules @@ -11,6 +11,12 @@ override_dh_auto_build: override_dh_strip: # Go has lots of problems with stripping, so just don't +# http://manpages.debian.org/dh_dwz +override_dh_dwz: + # dh_dwz in debhelper versions less than 13 has issues with files that are missing debug symbols (once we update to debhelper-compat 13+ this can be removed) + @# https://packages.debian.org/debhelper + @# https://packages.ubuntu.com/debhelper + override_dh_auto_install: install -D bin/docker-credential-secretservice debian/docker-credential-secretservice/usr/bin/docker-credential-secretservice install -D bin/docker-credential-pass debian/docker-credential-pass/usr/bin/docker-credential-pass diff --git a/pkg/credential-helpers/scripts/pkg-deb-build.sh b/pkg/credential-helpers/scripts/pkg-deb-build.sh index 57c20ca6..8a8bb109 100755 --- a/pkg/credential-helpers/scripts/pkg-deb-build.sh +++ b/pkg/credential-helpers/scripts/pkg-deb-build.sh @@ -65,7 +65,7 @@ fi set -x -chmod -x debian/compat debian/control debian/docs +chmod -x debian/control debian/docs VERSION=${GENVER_VERSION} REVISION=${GENVER_COMMIT} dpkg-buildpackage $PKG_DEB_BUILDFLAGS --host-arch $(xx-info debian-arch) --target-arch $(xx-info debian-arch) mkdir -p "${pkgoutput}" cp /root/docker-credential-* "${pkgoutput}"/ From 4c21f4f85bd109858c0667b169299bded43a9e23 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Fri, 4 Aug 2023 06:14:36 +0200 Subject: [PATCH 09/26] pkg(docker-cli): update debhelper compat to 12 and set override_dh_dwz Signed-off-by: CrazyMax (cherry picked from commit 6f3ad5b5406975b8a552674883467861ffbef338) --- pkg/docker-cli/deb/compat | 1 - pkg/docker-cli/deb/control | 2 +- pkg/docker-cli/deb/rules | 6 ++++++ pkg/docker-cli/scripts/pkg-deb-build.sh | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) delete mode 100644 pkg/docker-cli/deb/compat diff --git a/pkg/docker-cli/deb/compat b/pkg/docker-cli/deb/compat deleted file mode 100644 index f599e28b..00000000 --- a/pkg/docker-cli/deb/compat +++ /dev/null @@ -1 +0,0 @@ -10 diff --git a/pkg/docker-cli/deb/control b/pkg/docker-cli/deb/control index ddd60c79..86aa12a1 100644 --- a/pkg/docker-cli/deb/control +++ b/pkg/docker-cli/deb/control @@ -8,7 +8,7 @@ Vcs-Git: git://github.com/docker/cli.git Standards-Version: 3.9.6 Build-Depends: bash, bash-completion, - debhelper (>= 10~) | dh-systemd, + debhelper-compat (= 12), gcc, libc-dev, make diff --git a/pkg/docker-cli/deb/rules b/pkg/docker-cli/deb/rules index ea2c5367..f83a198b 100644 --- a/pkg/docker-cli/deb/rules +++ b/pkg/docker-cli/deb/rules @@ -19,6 +19,12 @@ override_dh_auto_test: override_dh_strip: # Go has lots of problems with stripping, so just don't +# http://manpages.debian.org/dh_dwz +override_dh_dwz: + # dh_dwz in debhelper versions less than 13 has issues with files that are missing debug symbols (once we update to debhelper-compat 13+ this can be removed) + @# https://packages.debian.org/debhelper + @# https://packages.ubuntu.com/debhelper + override_dh_auto_install: install -D -m 0644 cli/contrib/completion/fish/docker.fish debian/docker-ce-cli/usr/share/fish/vendor_completions.d/docker.fish install -D -m 0644 cli/contrib/completion/zsh/_docker debian/docker-ce-cli/usr/share/zsh/vendor-completions/_docker diff --git a/pkg/docker-cli/scripts/pkg-deb-build.sh b/pkg/docker-cli/scripts/pkg-deb-build.sh index 3c9e1afc..8c7461ea 100755 --- a/pkg/docker-cli/scripts/pkg-deb-build.sh +++ b/pkg/docker-cli/scripts/pkg-deb-build.sh @@ -66,6 +66,6 @@ mkdir -p "${pkgoutput}" set -x -chmod -x debian/compat debian/control debian/docs debian/*.bash-completion debian/*.manpages +chmod -x debian/control debian/docs debian/*.bash-completion debian/*.manpages VERSION=${GENVER_VERSION} REVISION=${GENVER_COMMIT} dpkg-buildpackage $PKG_DEB_BUILDFLAGS --host-arch $(xx-info debian-arch) --target-arch $(xx-info debian-arch) cp /root/docker-* "${pkgoutput}"/ From 34576e9a02a7c575086d8cf53eed13b05f1cdcc3 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Fri, 4 Aug 2023 06:15:37 +0200 Subject: [PATCH 10/26] pkg(docker-engine): update debhelper compat to 12 and set override_dh_dwz Also removes the obsolete upstart script and use dh_installsystemd. Signed-off-by: CrazyMax (cherry picked from commit 712e38143460317453b43a8fd160128757621904) --- pkg/docker-engine/deb/compat | 1 - pkg/docker-engine/deb/control | 2 +- .../deb/docker-ce.docker.upstart | 72 ------------------- pkg/docker-engine/deb/docker-ce.maintscript | 1 + pkg/docker-engine/deb/rules | 10 +++ pkg/docker-engine/scripts/pkg-deb-build.sh | 2 +- 6 files changed, 13 insertions(+), 75 deletions(-) delete mode 100644 pkg/docker-engine/deb/compat delete mode 100644 pkg/docker-engine/deb/docker-ce.docker.upstart create mode 100644 pkg/docker-engine/deb/docker-ce.maintscript diff --git a/pkg/docker-engine/deb/compat b/pkg/docker-engine/deb/compat deleted file mode 100644 index f599e28b..00000000 --- a/pkg/docker-engine/deb/compat +++ /dev/null @@ -1 +0,0 @@ -10 diff --git a/pkg/docker-engine/deb/control b/pkg/docker-engine/deb/control index dade8bf2..19a6bcc4 100644 --- a/pkg/docker-engine/deb/control +++ b/pkg/docker-engine/deb/control @@ -9,7 +9,7 @@ Standards-Version: 3.9.6 Build-Depends: ca-certificates, cmake, dh-apparmor, - debhelper (>= 10~) | dh-systemd, + debhelper-compat (= 12), gcc, libc-dev, libdevmapper-dev, diff --git a/pkg/docker-engine/deb/docker-ce.docker.upstart b/pkg/docker-engine/deb/docker-ce.docker.upstart deleted file mode 100644 index d58f7d6a..00000000 --- a/pkg/docker-engine/deb/docker-ce.docker.upstart +++ /dev/null @@ -1,72 +0,0 @@ -description "Docker daemon" - -start on (filesystem and net-device-up IFACE!=lo) -stop on runlevel [!2345] - -limit nofile 524288 1048576 - -# Having non-zero limits causes performance problems due to accounting overhead -# in the kernel. We recommend using cgroups to do container-local accounting. -limit nproc unlimited unlimited - -respawn - -kill timeout 20 - -pre-start script - # see also https://github.com/tianon/cgroupfs-mount/blob/master/cgroupfs-mount - if grep -v '^#' /etc/fstab | grep -q cgroup \ - || [ ! -e /proc/cgroups ] \ - || [ ! -d /sys/fs/cgroup ]; then - exit 0 - fi - if ! mountpoint -q /sys/fs/cgroup; then - mount -t tmpfs -o uid=0,gid=0,mode=0755 cgroup /sys/fs/cgroup - fi - ( - cd /sys/fs/cgroup - for sys in $(awk '!/^#/ { if ($4 == 1) print $1 }' /proc/cgroups); do - mkdir -p $sys - if ! mountpoint -q $sys; then - if ! mount -n -t cgroup -o $sys cgroup $sys; then - rmdir $sys || true - fi - fi - done - ) -end script - -script - # modify these in /etc/default/$UPSTART_JOB (/etc/default/docker) - DOCKERD=/usr/bin/dockerd - DOCKER_OPTS= - if [ -f /etc/default/$UPSTART_JOB ]; then - . /etc/default/$UPSTART_JOB - fi - exec "$DOCKERD" $DOCKER_OPTS --raw-logs -end script - -# Don't emit "started" event until docker.sock is ready. -# See https://github.com/docker/docker/issues/6647 -post-start script - DOCKER_OPTS= - DOCKER_SOCKET= - if [ -f /etc/default/$UPSTART_JOB ]; then - . /etc/default/$UPSTART_JOB - fi - - if ! printf "%s" "$DOCKER_OPTS" | grep -qE -e '-H|--host'; then - DOCKER_SOCKET=/var/run/docker.sock - else - DOCKER_SOCKET=$(printf "%s" "$DOCKER_OPTS" | grep -oP -e '(-H|--host)\W*unix://\K(\S+)' | sed 1q) - fi - - if [ -n "$DOCKER_SOCKET" ]; then - while ! [ -e "$DOCKER_SOCKET" ]; do - initctl status $UPSTART_JOB | grep -qE "(stop|respawn)/" && exit 1 - echo "Waiting for $DOCKER_SOCKET" - sleep 0.1 - done - echo "$DOCKER_SOCKET is up" - fi -end script diff --git a/pkg/docker-engine/deb/docker-ce.maintscript b/pkg/docker-engine/deb/docker-ce.maintscript new file mode 100644 index 00000000..6ca08142 --- /dev/null +++ b/pkg/docker-engine/deb/docker-ce.maintscript @@ -0,0 +1 @@ +rm_conffile /etc/init/docker.conf 5:24.0.5-1~ \ No newline at end of file diff --git a/pkg/docker-engine/deb/rules b/pkg/docker-engine/deb/rules index 35c713a5..a3770065 100755 --- a/pkg/docker-engine/deb/rules +++ b/pkg/docker-engine/deb/rules @@ -19,6 +19,12 @@ override_dh_auto_test: override_dh_strip: # Go has lots of problems with stripping, so just don't +# http://manpages.debian.org/dh_dwz +override_dh_dwz: + # dh_dwz in debhelper versions less than 13 has issues with files that are missing debug symbols (once we update to debhelper-compat 13+ this can be removed) + @# https://packages.debian.org/debhelper + @# https://packages.ubuntu.com/debhelper + override_dh_auto_install: install -D -m 0644 /common/systemd/docker.service debian/docker-ce/lib/systemd/system/docker.service install -D -m 0644 /common/systemd/docker.socket debian/docker-ce/lib/systemd/system/docker.socket @@ -37,6 +43,10 @@ override_dh_installinit: # use "docker" as our service name, not "docker-ce" dh_installinit --name=docker +override_dh_installsystemd: + # use "docker" as our service name, not "docker-ce" + dh_installsystemd --name=docker + override_dh_shlibdeps: dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info diff --git a/pkg/docker-engine/scripts/pkg-deb-build.sh b/pkg/docker-engine/scripts/pkg-deb-build.sh index 02295196..8efee749 100755 --- a/pkg/docker-engine/scripts/pkg-deb-build.sh +++ b/pkg/docker-engine/scripts/pkg-deb-build.sh @@ -66,6 +66,6 @@ mkdir -p "${pkgoutput}" set -x -chmod -x debian/compat debian/control debian/docs +chmod -x debian/control debian/docs VERSION=${GENVER_VERSION} REVISION=${GENVER_COMMIT_SHORT} dpkg-buildpackage $PKG_DEB_BUILDFLAGS --host-arch $(xx-info debian-arch) --target-arch $(xx-info debian-arch) cp /root/docker-* "${pkgoutput}"/ From 1eaa54cac1c5a33daa0b1b477367067db7adb36c Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Fri, 4 Aug 2023 06:15:56 +0200 Subject: [PATCH 11/26] pkg(sbom): update debhelper compat to 12 and set override_dh_dwz Signed-off-by: CrazyMax (cherry picked from commit 58f5607ec4654c167ebaa3d783f598dd223025e9) --- pkg/sbom/deb/compat | 1 - pkg/sbom/deb/control | 2 +- pkg/sbom/deb/rules | 6 ++++++ pkg/sbom/scripts/pkg-deb-build.sh | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) delete mode 100644 pkg/sbom/deb/compat diff --git a/pkg/sbom/deb/compat b/pkg/sbom/deb/compat deleted file mode 100644 index f599e28b..00000000 --- a/pkg/sbom/deb/compat +++ /dev/null @@ -1 +0,0 @@ -10 diff --git a/pkg/sbom/deb/control b/pkg/sbom/deb/control index dd5da3d3..4fc290c3 100644 --- a/pkg/sbom/deb/control +++ b/pkg/sbom/deb/control @@ -7,7 +7,7 @@ Vcs-Browser: https://github.com/docker/sbom-cli-plugin Vcs-Git: git://github.com/docker/sbom-cli-plugin.git Standards-Version: 3.9.6 Build-Depends: bash, - debhelper (>= 10~) | dh-systemd, + debhelper-compat (= 12), make Package: docker-sbom-plugin diff --git a/pkg/sbom/deb/rules b/pkg/sbom/deb/rules index 51fb6b66..9ffb368f 100644 --- a/pkg/sbom/deb/rules +++ b/pkg/sbom/deb/rules @@ -19,6 +19,12 @@ override_dh_auto_test: override_dh_strip: # Go has lots of problems with stripping, so just don't +# http://manpages.debian.org/dh_dwz +override_dh_dwz: + # dh_dwz in debhelper versions less than 13 has issues with files that are missing debug symbols (once we update to debhelper-compat 13+ this can be removed) + @# https://packages.debian.org/debhelper + @# https://packages.ubuntu.com/debhelper + override_dh_auto_install: install -D -m 0755 /usr/libexec/docker/cli-plugins/docker-sbom debian/docker-sbom-plugin/usr/libexec/docker/cli-plugins/docker-sbom diff --git a/pkg/sbom/scripts/pkg-deb-build.sh b/pkg/sbom/scripts/pkg-deb-build.sh index 23086398..6fabcb6f 100755 --- a/pkg/sbom/scripts/pkg-deb-build.sh +++ b/pkg/sbom/scripts/pkg-deb-build.sh @@ -66,6 +66,6 @@ mkdir -p "${pkgoutput}" set -x -chmod -x debian/compat debian/control debian/docs +chmod -x debian/control debian/docs VERSION=${GENVER_VERSION} REVISION=${GENVER_COMMIT} dpkg-buildpackage $PKG_DEB_BUILDFLAGS --host-arch $(xx-info debian-arch) --target-arch $(xx-info debian-arch) cp /root/docker-* "${pkgoutput}"/ From b5ff6d6a7571cce295ec36c378b686e6fbd86887 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sat, 5 Aug 2023 07:04:44 +0200 Subject: [PATCH 12/26] common: ubuntu 22.10 eol Signed-off-by: CrazyMax (cherry picked from commit 5ab03388ff29a945973ce840fe76b266d6ea55dd) --- common/packages.hcl | 11 ----------- common/packages.mk | 12 +----------- pkg/docker-cli/Dockerfile | 2 +- pkg/docker-engine/Dockerfile | 2 +- 4 files changed, 3 insertions(+), 24 deletions(-) diff --git a/common/packages.hcl b/common/packages.hcl index f3e6545f..96fffb8a 100644 --- a/common/packages.hcl +++ b/common/packages.hcl @@ -152,17 +152,6 @@ target "_pkg-ubuntu2204" { } } -target "_pkg-ubuntu2210" { - args = { - PKG_RELEASE = "ubuntu2210" - PKG_TYPE = "deb" - PKG_DISTRO = "ubuntu" - PKG_DISTRO_ID = "22.10" - PKG_DISTRO_SUITE = "kinetic" - PKG_BASE_IMAGE = "ubuntu:kinetic" - } -} - target "_pkg-ubuntu2304" { args = { PKG_RELEASE = "ubuntu2304" diff --git a/common/packages.mk b/common/packages.mk index a8fd940d..9738d533 100644 --- a/common/packages.mk +++ b/common/packages.mk @@ -15,7 +15,7 @@ # 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 debian12 ubuntu2004 ubuntu2204 ubuntu2210 ubuntu2304 raspbian10 raspbian11 raspbian12 +PKG_DEB_RELEASES ?= debian10 debian11 debian12 ubuntu2004 ubuntu2204 ubuntu2304 raspbian10 raspbian11 raspbian12 PKG_RPM_RELEASES ?= centos7 centos8 centos9 fedora36 fedora37 fedora38 oraclelinux7 oraclelinux8 oraclelinux9 # PKG_SUPPORTED_PLATFORMS could be replaced by: @@ -138,16 +138,6 @@ pkg-info-ubuntu2204: @# FIXME: linux/riscv64 is not supported (golang base image does not support riscv64) $(eval PKG_SUPPORTED_PLATFORMS = linux/amd64 linux/arm64 linux/arm/v7 linux/ppc64le linux/s390x) -.PHONY: pkg-info-ubuntu2210 -pkg-info-ubuntu2210: - $(eval PKG_TYPE = deb) - $(eval PKG_DISTRO = ubuntu) - $(eval PKG_DISTRO_ID = 22.10) - $(eval PKG_DISTRO_SUITE = kinetic) - $(eval PKG_BASE_IMAGE = ubuntu:kinetic) - @# FIXME: linux/riscv64 is not supported (golang base image does not support riscv64) - $(eval PKG_SUPPORTED_PLATFORMS = linux/amd64 linux/arm64 linux/arm/v7 linux/ppc64le linux/s390x) - .PHONY: pkg-info-ubuntu2304 pkg-info-ubuntu2304: $(eval PKG_TYPE = deb) diff --git a/pkg/docker-cli/Dockerfile b/pkg/docker-cli/Dockerfile index 477e8326..7fc720f3 100644 --- a/pkg/docker-cli/Dockerfile +++ b/pkg/docker-cli/Dockerfile @@ -96,7 +96,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends apt-utils bash RUN < Date: Sat, 5 Aug 2023 07:17:04 +0200 Subject: [PATCH 13/26] common: fedora 36 eol Signed-off-by: CrazyMax (cherry picked from commit 4c4e01029783d3717198a001343d953c646833f3) --- common/packages.hcl | 11 ----------- common/packages.mk | 11 +---------- 2 files changed, 1 insertion(+), 21 deletions(-) diff --git a/common/packages.hcl b/common/packages.hcl index 96fffb8a..42614eec 100644 --- a/common/packages.hcl +++ b/common/packages.hcl @@ -196,17 +196,6 @@ target "_pkg-centos9" { } } -target "_pkg-fedora36" { - args = { - PKG_RELEASE = "fedora36" - PKG_TYPE = "rpm" - PKG_DISTRO = "fedora" - PKG_DISTRO_ID = "36" - PKG_DISTRO_SUITE = "36" - PKG_BASE_IMAGE = "fedora:36" - } -} - target "_pkg-fedora37" { args = { PKG_RELEASE = "fedora37" diff --git a/common/packages.mk b/common/packages.mk index 9738d533..e86ca839 100644 --- a/common/packages.mk +++ b/common/packages.mk @@ -16,7 +16,7 @@ # if you add a new release PKG_APK_RELEASES ?= alpine314 alpine315 alpine316 PKG_DEB_RELEASES ?= debian10 debian11 debian12 ubuntu2004 ubuntu2204 ubuntu2304 raspbian10 raspbian11 raspbian12 -PKG_RPM_RELEASES ?= centos7 centos8 centos9 fedora36 fedora37 fedora38 oraclelinux7 oraclelinux8 oraclelinux9 +PKG_RPM_RELEASES ?= centos7 centos8 centos9 fedora37 fedora38 oraclelinux7 oraclelinux8 oraclelinux9 # PKG_SUPPORTED_PLATFORMS could be replaced by: # docker buildx imagetools inspect centos:7 --format "{{json .Manifest}}" | jq -r '.manifests[] | "\(.platform.os)/\(.platform.architecture)/\(.platform.variant)"' | sed 's#/null$##' | tr '\n' ',' | sed 's#,$##' @@ -177,15 +177,6 @@ pkg-info-centos9: @# FIXME: packages look broken for linux/s390x on centos:stream9 $(eval PKG_SUPPORTED_PLATFORMS = linux/amd64 linux/arm64 linux/ppc64le) -.PHONY: pkg-info-fedora36 -pkg-info-fedora36: - $(eval PKG_TYPE = rpm) - $(eval PKG_DISTRO = fedora) - $(eval PKG_DISTRO_ID = 36) - $(eval PKG_DISTRO_SUITE = 36) - $(eval PKG_BASE_IMAGE = fedora:36) - $(eval PKG_SUPPORTED_PLATFORMS = linux/amd64 linux/arm64 linux/ppc64le linux/s390x) - .PHONY: pkg-info-fedora37 pkg-info-fedora37: $(eval PKG_TYPE = rpm) From 935d0a44d029dd0952e54a3319914901fd149b6a Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sat, 5 Aug 2023 12:14:36 +0200 Subject: [PATCH 14/26] ci: add manual-build workflow Signed-off-by: CrazyMax (cherry picked from commit cfc2a108f6056dc9fd85766bbee38e285f2a6b96) --- .github/workflows/manual-build.yml | 55 ++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .github/workflows/manual-build.yml diff --git a/.github/workflows/manual-build.yml b/.github/workflows/manual-build.yml new file mode 100644 index 00000000..6a47a161 --- /dev/null +++ b/.github/workflows/manual-build.yml @@ -0,0 +1,55 @@ +name: manual-build + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +on: + workflow_dispatch: + inputs: + projects: + description: 'Projects to build (all or space separated list)' + default: 'all' + required: false + type: string + pkgs: + description: 'Packages to build (minimal, all or space separated list)' + default: 'minimal' + required: false + type: string + +jobs: + prepare: + runs-on: ubuntu-20.04 + outputs: + matrix: ${{ steps.projects.outputs.matrix }} + steps: + - + name: Checkout + uses: actions/checkout@v3 + - + name: Create matrix + id: projects + run: | + if [ "${{ inputs.projects }}" = "all" ]; then + projects=$(find ./pkg -maxdepth 1 -type d -printf '%P ') + else + projects="${{ inputs.projects }}" + fi + projects=$(echo $projects | jq -cR 'split(" ")') + echo "matrix=$projects" >>${GITHUB_OUTPUT} + - + name: Show matrix + run: | + echo ${{ steps.projects.outputs.matrix }} + + build: + uses: ./.github/workflows/.release.yml + needs: + - prepare + strategy: + matrix: + project: ${{ fromJson(needs.prepare.outputs.matrix) }} + with: + name: ${{ matrix.project }} + secrets: inherit From c7be36dea298d6326faa7d02764aa3623c0aaed4 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sat, 5 Aug 2023 12:24:43 +0200 Subject: [PATCH 15/26] ci: fail-fast input for build workflows Signed-off-by: CrazyMax (cherry picked from commit 6bbae55bbabb48e8664b85e6eb444fd924e2f465) --- .github/workflows/.build.yml | 2 +- .github/workflows/build-buildx.yml | 5 +++++ .github/workflows/build-compose.yml | 5 +++++ .github/workflows/build-containerd.yml | 5 +++++ .github/workflows/build-credential-helpers.yml | 5 +++++ .github/workflows/build-docker-cli.yml | 5 +++++ .github/workflows/build-docker-engine.yml | 5 +++++ .github/workflows/build-sbom.yml | 5 +++++ .github/workflows/build-scan.yml | 5 +++++ .github/workflows/manual-build.yml | 4 ++++ 10 files changed, 45 insertions(+), 1 deletion(-) diff --git a/.github/workflows/.build.yml b/.github/workflows/.build.yml index cdc526c3..1dc3f9da 100644 --- a/.github/workflows/.build.yml +++ b/.github/workflows/.build.yml @@ -44,7 +44,7 @@ jobs: needs: - prepare strategy: - fail-fast: false + fail-fast: ${{ inputs.fail-fast || true }} matrix: pkg: ${{ fromJson(needs.prepare.outputs.matrix) }} steps: diff --git a/.github/workflows/build-buildx.yml b/.github/workflows/build-buildx.yml index 55b1c602..f5f171e3 100644 --- a/.github/workflows/build-buildx.yml +++ b/.github/workflows/build-buildx.yml @@ -12,6 +12,11 @@ on: default: 'minimal' required: false type: string + fail-fast: + description: 'Cancel all in-progress and queued jobs in the matrix if any job in the matrix fails' + default: true + required: false + type: boolean push: branches: - 'main' diff --git a/.github/workflows/build-compose.yml b/.github/workflows/build-compose.yml index 5e631578..913c0260 100644 --- a/.github/workflows/build-compose.yml +++ b/.github/workflows/build-compose.yml @@ -12,6 +12,11 @@ on: default: 'minimal' required: false type: string + fail-fast: + description: 'Cancel all in-progress and queued jobs in the matrix if any job in the matrix fails' + default: true + required: false + type: boolean push: branches: - 'main' diff --git a/.github/workflows/build-containerd.yml b/.github/workflows/build-containerd.yml index b2503a23..638ae81f 100644 --- a/.github/workflows/build-containerd.yml +++ b/.github/workflows/build-containerd.yml @@ -12,6 +12,11 @@ on: default: 'minimal' required: false type: string + fail-fast: + description: 'Cancel all in-progress and queued jobs in the matrix if any job in the matrix fails' + default: true + required: false + type: boolean push: branches: - 'main' diff --git a/.github/workflows/build-credential-helpers.yml b/.github/workflows/build-credential-helpers.yml index c70f4318..53492faf 100644 --- a/.github/workflows/build-credential-helpers.yml +++ b/.github/workflows/build-credential-helpers.yml @@ -12,6 +12,11 @@ on: default: 'minimal' required: false type: string + fail-fast: + description: 'Cancel all in-progress and queued jobs in the matrix if any job in the matrix fails' + default: true + required: false + type: boolean push: branches: - 'main' diff --git a/.github/workflows/build-docker-cli.yml b/.github/workflows/build-docker-cli.yml index 664845c5..e10f0b1e 100644 --- a/.github/workflows/build-docker-cli.yml +++ b/.github/workflows/build-docker-cli.yml @@ -12,6 +12,11 @@ on: default: 'minimal' required: false type: string + fail-fast: + description: 'Cancel all in-progress and queued jobs in the matrix if any job in the matrix fails' + default: true + required: false + type: boolean push: branches: - 'main' diff --git a/.github/workflows/build-docker-engine.yml b/.github/workflows/build-docker-engine.yml index 1f0f3b64..fe105c19 100644 --- a/.github/workflows/build-docker-engine.yml +++ b/.github/workflows/build-docker-engine.yml @@ -12,6 +12,11 @@ on: default: 'minimal' required: false type: string + fail-fast: + description: 'Cancel all in-progress and queued jobs in the matrix if any job in the matrix fails' + default: true + required: false + type: boolean push: branches: - 'main' diff --git a/.github/workflows/build-sbom.yml b/.github/workflows/build-sbom.yml index 04d39ea2..f5060c1c 100644 --- a/.github/workflows/build-sbom.yml +++ b/.github/workflows/build-sbom.yml @@ -12,6 +12,11 @@ on: default: 'minimal' required: false type: string + fail-fast: + description: 'Cancel all in-progress and queued jobs in the matrix if any job in the matrix fails' + default: true + required: false + type: boolean push: branches: - 'main' diff --git a/.github/workflows/build-scan.yml b/.github/workflows/build-scan.yml index 06e9fe21..af7dfe3a 100644 --- a/.github/workflows/build-scan.yml +++ b/.github/workflows/build-scan.yml @@ -12,6 +12,11 @@ on: default: 'minimal' required: false type: string + fail-fast: + description: 'Cancel all in-progress and queued jobs in the matrix if any job in the matrix fails' + default: true + required: false + type: boolean push: branches: - 'main' diff --git a/.github/workflows/manual-build.yml b/.github/workflows/manual-build.yml index 6a47a161..42c64930 100644 --- a/.github/workflows/manual-build.yml +++ b/.github/workflows/manual-build.yml @@ -17,6 +17,10 @@ on: default: 'minimal' required: false type: string + fail-fast: + description: 'Cancel all in-progress and queued jobs in the matrix if any job in the matrix fails' + required: false + type: boolean jobs: prepare: From 762b5b9b5456c90c30c2e0fa36aa07b6e7d7f331 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sat, 5 Aug 2023 13:08:14 +0200 Subject: [PATCH 16/26] ci: disable fail-fast in manual-build workflow Signed-off-by: CrazyMax (cherry picked from commit ad0ffb2d43c42a9db3c87444c0fe37e5e64ccf71) --- .github/workflows/build-buildx.yml | 2 +- .github/workflows/build-compose.yml | 2 +- .github/workflows/build-containerd.yml | 2 +- .github/workflows/build-credential-helpers.yml | 2 +- .github/workflows/build-docker-cli.yml | 2 +- .github/workflows/build-docker-engine.yml | 2 +- .github/workflows/build-sbom.yml | 2 +- .github/workflows/build-scan.yml | 2 +- .github/workflows/manual-build.yml | 3 ++- 9 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build-buildx.yml b/.github/workflows/build-buildx.yml index f5f171e3..6bc03463 100644 --- a/.github/workflows/build-buildx.yml +++ b/.github/workflows/build-buildx.yml @@ -13,7 +13,7 @@ on: required: false type: string fail-fast: - description: 'Cancel all in-progress and queued jobs in the matrix if any job in the matrix fails' + description: 'Fail fast' default: true required: false type: boolean diff --git a/.github/workflows/build-compose.yml b/.github/workflows/build-compose.yml index 913c0260..65851955 100644 --- a/.github/workflows/build-compose.yml +++ b/.github/workflows/build-compose.yml @@ -13,7 +13,7 @@ on: required: false type: string fail-fast: - description: 'Cancel all in-progress and queued jobs in the matrix if any job in the matrix fails' + description: 'Fail fast' default: true required: false type: boolean diff --git a/.github/workflows/build-containerd.yml b/.github/workflows/build-containerd.yml index 638ae81f..0c20b316 100644 --- a/.github/workflows/build-containerd.yml +++ b/.github/workflows/build-containerd.yml @@ -13,7 +13,7 @@ on: required: false type: string fail-fast: - description: 'Cancel all in-progress and queued jobs in the matrix if any job in the matrix fails' + description: 'Fail fast' default: true required: false type: boolean diff --git a/.github/workflows/build-credential-helpers.yml b/.github/workflows/build-credential-helpers.yml index 53492faf..10c780d7 100644 --- a/.github/workflows/build-credential-helpers.yml +++ b/.github/workflows/build-credential-helpers.yml @@ -13,7 +13,7 @@ on: required: false type: string fail-fast: - description: 'Cancel all in-progress and queued jobs in the matrix if any job in the matrix fails' + description: 'Fail fast' default: true required: false type: boolean diff --git a/.github/workflows/build-docker-cli.yml b/.github/workflows/build-docker-cli.yml index e10f0b1e..45dfbc74 100644 --- a/.github/workflows/build-docker-cli.yml +++ b/.github/workflows/build-docker-cli.yml @@ -13,7 +13,7 @@ on: required: false type: string fail-fast: - description: 'Cancel all in-progress and queued jobs in the matrix if any job in the matrix fails' + description: 'Fail fast' default: true required: false type: boolean diff --git a/.github/workflows/build-docker-engine.yml b/.github/workflows/build-docker-engine.yml index fe105c19..301cb8c5 100644 --- a/.github/workflows/build-docker-engine.yml +++ b/.github/workflows/build-docker-engine.yml @@ -13,7 +13,7 @@ on: required: false type: string fail-fast: - description: 'Cancel all in-progress and queued jobs in the matrix if any job in the matrix fails' + description: 'Fail fast' default: true required: false type: boolean diff --git a/.github/workflows/build-sbom.yml b/.github/workflows/build-sbom.yml index f5060c1c..57d90812 100644 --- a/.github/workflows/build-sbom.yml +++ b/.github/workflows/build-sbom.yml @@ -13,7 +13,7 @@ on: required: false type: string fail-fast: - description: 'Cancel all in-progress and queued jobs in the matrix if any job in the matrix fails' + description: 'Fail fast' default: true required: false type: boolean diff --git a/.github/workflows/build-scan.yml b/.github/workflows/build-scan.yml index af7dfe3a..1d9cd1a9 100644 --- a/.github/workflows/build-scan.yml +++ b/.github/workflows/build-scan.yml @@ -13,7 +13,7 @@ on: required: false type: string fail-fast: - description: 'Cancel all in-progress and queued jobs in the matrix if any job in the matrix fails' + description: 'Fail fast' default: true required: false type: boolean diff --git a/.github/workflows/manual-build.yml b/.github/workflows/manual-build.yml index 42c64930..ba12dd7e 100644 --- a/.github/workflows/manual-build.yml +++ b/.github/workflows/manual-build.yml @@ -18,7 +18,7 @@ on: required: false type: string fail-fast: - description: 'Cancel all in-progress and queued jobs in the matrix if any job in the matrix fails' + description: 'Fail fast' required: false type: boolean @@ -54,6 +54,7 @@ jobs: strategy: matrix: project: ${{ fromJson(needs.prepare.outputs.matrix) }} + fail-fast: false with: name: ${{ matrix.project }} secrets: inherit From 4358242d135d65196a8801ebf6dea904f2f2ea26 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sat, 5 Aug 2023 13:29:03 +0200 Subject: [PATCH 17/26] ci: fix misplaced fail-fast attr Signed-off-by: CrazyMax (cherry picked from commit aafd219d801b90aea889f1416dddc67a353656c3) --- .github/workflows/manual-build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/manual-build.yml b/.github/workflows/manual-build.yml index ba12dd7e..8717f09b 100644 --- a/.github/workflows/manual-build.yml +++ b/.github/workflows/manual-build.yml @@ -52,6 +52,7 @@ jobs: needs: - prepare strategy: + fail-fast: false matrix: project: ${{ fromJson(needs.prepare.outputs.matrix) }} fail-fast: false From 0021d61fbf71b32cd2ac8e0dc4a9c7bb128f1327 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sat, 5 Aug 2023 13:31:59 +0200 Subject: [PATCH 18/26] ci: fix manual-build workflow Signed-off-by: CrazyMax (cherry picked from commit 59a857650c37f04270ff56a78e1a3ca8cf79786b) --- .github/workflows/manual-build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/manual-build.yml b/.github/workflows/manual-build.yml index 8717f09b..bc54fd3a 100644 --- a/.github/workflows/manual-build.yml +++ b/.github/workflows/manual-build.yml @@ -55,7 +55,6 @@ jobs: fail-fast: false matrix: project: ${{ fromJson(needs.prepare.outputs.matrix) }} - fail-fast: false with: name: ${{ matrix.project }} secrets: inherit From 71fbfbe62977673157824ef3515e8c6f0c891f30 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sat, 5 Aug 2023 13:48:41 +0200 Subject: [PATCH 19/26] ci: fix missing fail-fast handling in release workflow Signed-off-by: CrazyMax (cherry picked from commit 5c40f42751ea82a9c42a4858296f28d708f6c576) --- .github/workflows/.release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/.release.yml b/.github/workflows/.release.yml index a4ed9509..775a3c61 100644 --- a/.github/workflows/.release.yml +++ b/.github/workflows/.release.yml @@ -43,7 +43,7 @@ jobs: needs: - prepare strategy: - fail-fast: true + fail-fast: ${{ inputs.fail-fast || true }} matrix: pkg: ${{ fromJson(needs.prepare.outputs.matrix) }} steps: From 8b4a557374a2dd65ade7a7687783ec16fe61737d Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sat, 5 Aug 2023 14:53:54 +0200 Subject: [PATCH 20/26] rpm: set nobest flag for dnf builddep command Signed-off-by: CrazyMax (cherry picked from commit a0f651a2c66ca3b7cb7807ae65bccc3eac295fe1) --- pkg/buildx/Dockerfile | 2 +- pkg/compose/Dockerfile | 2 +- pkg/containerd/Dockerfile | 2 +- pkg/credential-helpers/Dockerfile | 2 +- pkg/docker-cli/Dockerfile | 2 +- pkg/docker-engine/Dockerfile | 2 +- pkg/sbom/Dockerfile | 2 +- pkg/scan/Dockerfile | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pkg/buildx/Dockerfile b/pkg/buildx/Dockerfile index fb2002aa..5163befe 100644 --- a/pkg/buildx/Dockerfile +++ b/pkg/buildx/Dockerfile @@ -128,7 +128,7 @@ RUN < /dev/null; then - builddepCmd="setarch $(xx-info rhel-arch) dnf builddep" + builddepCmd="setarch $(xx-info rhel-arch) dnf builddep --nobest" elif command -v yum-builddep &> /dev/null; then builddepCmd="yum-builddep --target $(xx-info rhel-arch)" else diff --git a/pkg/compose/Dockerfile b/pkg/compose/Dockerfile index c09734b3..c9a6d113 100644 --- a/pkg/compose/Dockerfile +++ b/pkg/compose/Dockerfile @@ -131,7 +131,7 @@ RUN < /dev/null; then - builddepCmd="setarch $(xx-info rhel-arch) dnf builddep" + builddepCmd="setarch $(xx-info rhel-arch) dnf builddep --nobest" elif command -v yum-builddep &> /dev/null; then builddepCmd="yum-builddep --target $(xx-info rhel-arch)" else diff --git a/pkg/containerd/Dockerfile b/pkg/containerd/Dockerfile index c367f03a..486a7d55 100644 --- a/pkg/containerd/Dockerfile +++ b/pkg/containerd/Dockerfile @@ -165,7 +165,7 @@ RUN < /dev/null; then - builddepCmd="setarch $(xx-info rhel-arch) dnf builddep" + builddepCmd="setarch $(xx-info rhel-arch) dnf builddep --nobest" elif command -v yum-builddep &> /dev/null; then builddepCmd="yum-builddep --target $(xx-info rhel-arch)" else diff --git a/pkg/credential-helpers/Dockerfile b/pkg/credential-helpers/Dockerfile index 5abd80e8..cb624613 100644 --- a/pkg/credential-helpers/Dockerfile +++ b/pkg/credential-helpers/Dockerfile @@ -127,7 +127,7 @@ RUN < /dev/null; then - builddepCmd="setarch $(xx-info rhel-arch) dnf builddep" + builddepCmd="setarch $(xx-info rhel-arch) dnf builddep --nobest" elif command -v yum-builddep &> /dev/null; then builddepCmd="yum-builddep --target $(xx-info rhel-arch)" else diff --git a/pkg/docker-cli/Dockerfile b/pkg/docker-cli/Dockerfile index 7fc720f3..5c771c85 100644 --- a/pkg/docker-cli/Dockerfile +++ b/pkg/docker-cli/Dockerfile @@ -143,7 +143,7 @@ RUN < /dev/null; then - builddepCmd="setarch $(xx-info rhel-arch) dnf builddep" + builddepCmd="setarch $(xx-info rhel-arch) dnf builddep --nobest" elif command -v yum-builddep &> /dev/null; then builddepCmd="yum-builddep --target $(xx-info rhel-arch)" else diff --git a/pkg/docker-engine/Dockerfile b/pkg/docker-engine/Dockerfile index 1fa82a49..77720b18 100644 --- a/pkg/docker-engine/Dockerfile +++ b/pkg/docker-engine/Dockerfile @@ -145,7 +145,7 @@ RUN < /dev/null; then - builddepCmd="setarch $(xx-info rhel-arch) dnf builddep" + builddepCmd="setarch $(xx-info rhel-arch) dnf builddep --nobest" elif command -v yum-builddep &> /dev/null; then builddepCmd="yum-builddep --target $(xx-info rhel-arch)" else diff --git a/pkg/sbom/Dockerfile b/pkg/sbom/Dockerfile index a2ca0d3c..1e9d7373 100644 --- a/pkg/sbom/Dockerfile +++ b/pkg/sbom/Dockerfile @@ -128,7 +128,7 @@ RUN < /dev/null; then - builddepCmd="setarch $(xx-info rhel-arch) dnf builddep" + builddepCmd="setarch $(xx-info rhel-arch) dnf builddep --nobest" elif command -v yum-builddep &> /dev/null; then builddepCmd="yum-builddep --target $(xx-info rhel-arch)" else diff --git a/pkg/scan/Dockerfile b/pkg/scan/Dockerfile index e401da93..07013877 100644 --- a/pkg/scan/Dockerfile +++ b/pkg/scan/Dockerfile @@ -128,7 +128,7 @@ RUN < /dev/null; then - builddepCmd="setarch $(xx-info rhel-arch) dnf builddep" + builddepCmd="setarch $(xx-info rhel-arch) dnf builddep --nobest" elif command -v yum-builddep &> /dev/null; then builddepCmd="yum-builddep --target $(xx-info rhel-arch)" else From a53f07e371862b1a5d3088f7787b2402db3cc4b3 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sat, 5 Aug 2023 17:14:32 +0200 Subject: [PATCH 21/26] ci: set max-parallel to 1 for release builds Signed-off-by: CrazyMax (cherry picked from commit 504a9c6ebad6fd8eff19d0905ea020f681338b6d) --- .github/workflows/manual-build.yml | 1 + .github/workflows/nightly.yml | 97 +++++++++--------------------- 2 files changed, 31 insertions(+), 67 deletions(-) diff --git a/.github/workflows/manual-build.yml b/.github/workflows/manual-build.yml index bc54fd3a..2e23bb85 100644 --- a/.github/workflows/manual-build.yml +++ b/.github/workflows/manual-build.yml @@ -53,6 +53,7 @@ jobs: - prepare strategy: fail-fast: false + max-parallel: 1 matrix: project: ${{ fromJson(needs.prepare.outputs.matrix) }} with: diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index d120331a..01f7f2ed 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -12,73 +12,36 @@ on: - cron: '0 1 * * 0' # every sunday at 1am jobs: - buildx: - uses: ./.github/workflows/.release.yml - with: - name: buildx - envs: | - NIGHTLY_BUILD=1 - secrets: inherit - - compose: - uses: ./.github/workflows/.release.yml - needs: buildx - with: - name: compose - envs: | - NIGHTLY_BUILD=1 - secrets: inherit - - containerd: - uses: ./.github/workflows/.release.yml - needs: compose - with: - name: containerd - envs: | - NIGHTLY_BUILD=1 - secrets: inherit - - credential-helpers: - uses: ./.github/workflows/.release.yml - needs: containerd - with: - name: credential-helpers - envs: | - NIGHTLY_BUILD=1 - secrets: inherit - - docker-cli: - uses: ./.github/workflows/.release.yml - needs: credential-helpers - with: - name: docker-cli - envs: | - NIGHTLY_BUILD=1 - secrets: inherit - - docker-engine: - uses: ./.github/workflows/.release.yml - needs: docker-cli - with: - name: docker-engine - envs: | - NIGHTLY_BUILD=1 - secrets: inherit - - sbom: - uses: ./.github/workflows/.release.yml - needs: docker-engine - with: - name: sbom - envs: | - NIGHTLY_BUILD=1 - secrets: inherit - - scan: - uses: ./.github/workflows/.release.yml - needs: sbom - with: - name: scan + prepare: + runs-on: ubuntu-20.04 + outputs: + matrix: ${{ steps.projects.outputs.matrix }} + steps: + - + name: Checkout + uses: actions/checkout@v3 + - + name: Create matrix + id: projects + run: | + projects=$(find ./pkg -maxdepth 1 -type d -printf '%P ' | jq -cR 'split(" ")') + echo "matrix=$projects" >>${GITHUB_OUTPUT} + - + name: Show matrix + run: | + echo ${{ steps.projects.outputs.matrix }} + + build: + uses: ./.github/workflows/.release.yml + needs: + - prepare + strategy: + fail-fast: false + max-parallel: 1 + matrix: + project: ${{ fromJson(needs.prepare.outputs.matrix) }} + with: + name: ${{ matrix.project }} envs: | NIGHTLY_BUILD=1 secrets: inherit From 1203851fc93c5a64f1bbab8cced14d3f74cf1ee6 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sat, 5 Aug 2023 20:27:48 +0200 Subject: [PATCH 22/26] ci: use build reusable workflow in manual-build Signed-off-by: CrazyMax (cherry picked from commit 8a3798ee864d7cebb81800b59e1f99386dd0c357) --- .github/workflows/manual-build.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/manual-build.yml b/.github/workflows/manual-build.yml index 2e23bb85..4a83a02a 100644 --- a/.github/workflows/manual-build.yml +++ b/.github/workflows/manual-build.yml @@ -48,12 +48,11 @@ jobs: echo ${{ steps.projects.outputs.matrix }} build: - uses: ./.github/workflows/.release.yml + uses: ./.github/workflows/.build.yml needs: - prepare strategy: fail-fast: false - max-parallel: 1 matrix: project: ${{ fromJson(needs.prepare.outputs.matrix) }} with: From 90cceee1eaaed6ca1adcfc753ea5c666ad615369 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sat, 5 Aug 2023 21:59:04 +0200 Subject: [PATCH 23/26] ci: fix fail-fast Signed-off-by: CrazyMax (cherry picked from commit 933b6de709fdd0b479d496a8ea0cd8defa4c72fa) --- .github/workflows/.build.yml | 24 ++++++++++++++++-------- .github/workflows/.release.yml | 16 ++++++++-------- 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/.github/workflows/.build.yml b/.github/workflows/.build.yml index 1dc3f9da..48f2049d 100644 --- a/.github/workflows/.build.yml +++ b/.github/workflows/.build.yml @@ -19,34 +19,42 @@ jobs: prepare: runs-on: ubuntu-20.04 outputs: - matrix: ${{ steps.pkgs.outputs.matrix }} + pkgs: ${{ steps.set.outputs.pkgs }} + fail-fast: ${{ steps.set.outputs.fail-fast }} steps: - name: Checkout uses: actions/checkout@v3 - - name: Create matrix - id: pkgs + name: Set outputs + id: set run: | ghamatrix=$GHA_DEFAULT_MATRIX if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then ghamatrix=${{ inputs.pkgs }} fi pkgs=$(make gha-matrix GHA_MATRIX=$ghamatrix) - echo "matrix=$pkgs" >> $GITHUB_OUTPUT + echo "pkgs=$pkgs" >> $GITHUB_OUTPUT + if [ "${{ inputs.fail-fast }}" != "" ]; then + failfast=${{ inputs.fail-fast }} + else + failfast=true + fi + echo "fail-fast=$failfast" >> $GITHUB_OUTPUT - - name: Show matrix + name: Show outputs run: | - echo ${{ steps.pkgs.outputs.matrix }} + echo pkgs=${{ steps.set.outputs.pkgs }} + echo fail-fast=${{ steps.set.outputs.fail-fast }} build: runs-on: ubuntu-20.04 needs: - prepare strategy: - fail-fast: ${{ inputs.fail-fast || true }} + fail-fast: ${{ needs.prepare.outputs.fail-fast == 'true' }} matrix: - pkg: ${{ fromJson(needs.prepare.outputs.matrix) }} + pkg: ${{ fromJson(needs.prepare.outputs.pkgs) }} steps: - name: Checkout diff --git a/.github/workflows/.release.yml b/.github/workflows/.release.yml index 775a3c61..be12d378 100644 --- a/.github/workflows/.release.yml +++ b/.github/workflows/.release.yml @@ -22,30 +22,30 @@ jobs: prepare: runs-on: ubuntu-20.04 outputs: - matrix: ${{ steps.pkgs.outputs.matrix }} + pkgs: ${{ steps.set.outputs.pkgs }} steps: - name: Checkout uses: actions/checkout@v3 - - name: Create matrix - id: pkgs + name: Set outputs + id: set run: | pkgs=$(make gha-matrix GHA_MATRIX=all) - echo "matrix=$pkgs" >> $GITHUB_OUTPUT + echo "pkgs=$pkgs" >> $GITHUB_OUTPUT - - name: Show matrix + name: Show outputs run: | - echo ${{ steps.pkgs.outputs.matrix }} + pkgs=echo ${{ steps.set.outputs.pkgs }} build: runs-on: ubuntu-20.04 needs: - prepare strategy: - fail-fast: ${{ inputs.fail-fast || true }} + fail-fast: true matrix: - pkg: ${{ fromJson(needs.prepare.outputs.matrix) }} + pkg: ${{ fromJson(needs.prepare.outputs.pkgs) }} steps: - name: Checkout From e2574902cc201e5b86c7b11433b51f59ba9d631c Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sun, 6 Aug 2023 01:39:28 +0200 Subject: [PATCH 24/26] ci: fix release workflow Signed-off-by: CrazyMax (cherry picked from commit 6990cc29d5306eab14ad3c66b333becaa4bae2ee) --- .github/workflows/.release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/.release.yml b/.github/workflows/.release.yml index be12d378..f2cae76e 100644 --- a/.github/workflows/.release.yml +++ b/.github/workflows/.release.yml @@ -36,7 +36,7 @@ jobs: - name: Show outputs run: | - pkgs=echo ${{ steps.set.outputs.pkgs }} + echo pkgs=${{ steps.set.outputs.pkgs }} build: runs-on: ubuntu-20.04 From e85126e253d5fe3eacc6ec312f02c8b2e49a6c10 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sun, 6 Aug 2023 04:08:47 +0200 Subject: [PATCH 25/26] ci: fix nightly workflow Signed-off-by: CrazyMax (cherry picked from commit 1aa3d559bc5e27b54993ca86d8520f039656c9df) --- .github/workflows/nightly.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 01f7f2ed..4c635f7c 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -24,7 +24,8 @@ jobs: name: Create matrix id: projects run: | - projects=$(find ./pkg -maxdepth 1 -type d -printf '%P ' | jq -cR 'split(" ")') + projects=$(find ./pkg -maxdepth 1 -type d -printf '%P ') + projects=$(echo $projects | jq -cR 'split(" ")') echo "matrix=$projects" >>${GITHUB_OUTPUT} - name: Show matrix From aefeb36ac63162e2cd514c254707fd53c036405f Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sun, 6 Aug 2023 15:28:08 +0200 Subject: [PATCH 26/26] common: rpm-builddep Signed-off-by: CrazyMax (cherry picked from commit 22d1e86568fec7343e4ebbf1703b99e18e326642) --- common/scripts/rpm-builddep.sh | 38 +++++++++++++++++++++++++++++++ pkg/buildx/Dockerfile | 16 ++----------- pkg/compose/Dockerfile | 16 ++----------- pkg/containerd/Dockerfile | 16 ++----------- pkg/credential-helpers/Dockerfile | 16 ++----------- pkg/docker-cli/Dockerfile | 16 ++----------- pkg/docker-engine/Dockerfile | 16 ++----------- pkg/sbom/Dockerfile | 16 ++----------- pkg/scan/Dockerfile | 16 ++----------- 9 files changed, 54 insertions(+), 112 deletions(-) create mode 100755 common/scripts/rpm-builddep.sh diff --git a/common/scripts/rpm-builddep.sh b/common/scripts/rpm-builddep.sh new file mode 100755 index 00000000..4d62b461 --- /dev/null +++ b/common/scripts/rpm-builddep.sh @@ -0,0 +1,38 @@ +#!/usr/bin/env bash + +# Copyright 2023 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. + +arch=$1 +specsDir=$2 + +if [[ -z "$arch" ]] || [[ -z "$specsDir" ]]; then + echo "usage: ./rpm-builddep " >&2 + exit 1 +fi + +set -e + +builddepCmd="" +if command -v dnf &> /dev/null; then + builddepCmd="setarch $arch dnf builddep --nobest" +elif command -v yum-builddep &> /dev/null; then + builddepCmd="yum-builddep --target $arch" +else + echo "unable to detect package manager" >&2 + exit 1 +fi + +set -x +$builddepCmd -y "$specsDir"/*.spec diff --git a/pkg/buildx/Dockerfile b/pkg/buildx/Dockerfile index 5163befe..fdb569d4 100644 --- a/pkg/buildx/Dockerfile +++ b/pkg/buildx/Dockerfile @@ -124,20 +124,8 @@ RUN --mount=type=bind,from=common-scripts,source=rpm-init.sh,target=/usr/local/b rpm-init $PKG_RELEASE COPY rpm /root/rpmbuild/SPECS ARG TARGETPLATFORM -RUN < /dev/null; then - builddepCmd="setarch $(xx-info rhel-arch) dnf builddep --nobest" - elif command -v yum-builddep &> /dev/null; then - builddepCmd="yum-builddep --target $(xx-info rhel-arch)" - else - echo >&2 "unable to detect package manager" - exit 1 - fi - set -x - $builddepCmd -y /root/rpmbuild/SPECS/*.spec -EOT +RUN --mount=type=bind,from=common-scripts,source=rpm-builddep.sh,target=/usr/local/bin/rpm-builddep \ + rpm-builddep $(xx-info rhel-arch) /root/rpmbuild/SPECS WORKDIR /root/rpmbuild ARG BUILDX_REF ARG NIGHTLY_BUILD diff --git a/pkg/compose/Dockerfile b/pkg/compose/Dockerfile index c9a6d113..6dd241b5 100644 --- a/pkg/compose/Dockerfile +++ b/pkg/compose/Dockerfile @@ -127,20 +127,8 @@ RUN --mount=type=bind,from=common-scripts,source=rpm-init.sh,target=/usr/local/b rpm-init $PKG_RELEASE COPY rpm /root/rpmbuild/SPECS ARG TARGETPLATFORM -RUN < /dev/null; then - builddepCmd="setarch $(xx-info rhel-arch) dnf builddep --nobest" - elif command -v yum-builddep &> /dev/null; then - builddepCmd="yum-builddep --target $(xx-info rhel-arch)" - else - echo >&2 "unable to detect package manager" - exit 1 - fi - set -x - $builddepCmd -y /root/rpmbuild/SPECS/*.spec -EOT +RUN --mount=type=bind,from=common-scripts,source=rpm-builddep.sh,target=/usr/local/bin/rpm-builddep \ + rpm-builddep $(xx-info rhel-arch) /root/rpmbuild/SPECS WORKDIR /root/rpmbuild ARG COMPOSE_REF ARG NIGHTLY_BUILD diff --git a/pkg/containerd/Dockerfile b/pkg/containerd/Dockerfile index 486a7d55..b2091e67 100644 --- a/pkg/containerd/Dockerfile +++ b/pkg/containerd/Dockerfile @@ -161,20 +161,8 @@ RUN --mount=type=bind,from=common-scripts,source=rpm-init.sh,target=/usr/local/b rpm-init $PKG_RELEASE COPY rpm /root/rpmbuild/SPECS ARG TARGETPLATFORM -RUN < /dev/null; then - builddepCmd="setarch $(xx-info rhel-arch) dnf builddep --nobest" - elif command -v yum-builddep &> /dev/null; then - builddepCmd="yum-builddep --target $(xx-info rhel-arch)" - else - echo >&2 "unable to detect package manager" - exit 1 - fi - set -x - $builddepCmd -y /root/rpmbuild/SPECS/*.spec -EOT +RUN --mount=type=bind,from=common-scripts,source=rpm-builddep.sh,target=/usr/local/bin/rpm-builddep \ + rpm-builddep $(xx-info rhel-arch) /root/rpmbuild/SPECS WORKDIR /root/rpmbuild ARG CONTAINERD_REF ARG NIGHTLY_BUILD diff --git a/pkg/credential-helpers/Dockerfile b/pkg/credential-helpers/Dockerfile index cb624613..6488920b 100644 --- a/pkg/credential-helpers/Dockerfile +++ b/pkg/credential-helpers/Dockerfile @@ -123,20 +123,8 @@ RUN --mount=type=bind,from=common-scripts,source=rpm-init.sh,target=/usr/local/b rpm-init $PKG_RELEASE COPY rpm /root/rpmbuild/SPECS ARG TARGETPLATFORM -RUN < /dev/null; then - builddepCmd="setarch $(xx-info rhel-arch) dnf builddep --nobest" - elif command -v yum-builddep &> /dev/null; then - builddepCmd="yum-builddep --target $(xx-info rhel-arch)" - else - echo >&2 "unable to detect package manager" - exit 1 - fi - set -x - $builddepCmd -y /root/rpmbuild/SPECS/*.spec -EOT +RUN --mount=type=bind,from=common-scripts,source=rpm-builddep.sh,target=/usr/local/bin/rpm-builddep \ + rpm-builddep $(xx-info rhel-arch) /root/rpmbuild/SPECS WORKDIR /root/rpmbuild ARG CREDENTIAL_HELPERS_REF ARG NIGHTLY_BUILD diff --git a/pkg/docker-cli/Dockerfile b/pkg/docker-cli/Dockerfile index 5c771c85..8b7b679e 100644 --- a/pkg/docker-cli/Dockerfile +++ b/pkg/docker-cli/Dockerfile @@ -139,20 +139,8 @@ RUN --mount=type=bind,from=common-scripts,source=rpm-init.sh,target=/usr/local/b rpm-init $PKG_RELEASE COPY rpm /root/rpmbuild/SPECS ARG TARGETPLATFORM -RUN < /dev/null; then - builddepCmd="setarch $(xx-info rhel-arch) dnf builddep --nobest" - elif command -v yum-builddep &> /dev/null; then - builddepCmd="yum-builddep --target $(xx-info rhel-arch)" - else - echo >&2 "unable to detect package manager" - exit 1 - fi - set -x - $builddepCmd -y /root/rpmbuild/SPECS/*.spec -EOT +RUN --mount=type=bind,from=common-scripts,source=rpm-builddep.sh,target=/usr/local/bin/rpm-builddep \ + rpm-builddep $(xx-info rhel-arch) /root/rpmbuild/SPECS WORKDIR /root/rpmbuild ARG DOCKER_CLI_REF ARG NIGHTLY_BUILD diff --git a/pkg/docker-engine/Dockerfile b/pkg/docker-engine/Dockerfile index 77720b18..e4158c24 100644 --- a/pkg/docker-engine/Dockerfile +++ b/pkg/docker-engine/Dockerfile @@ -141,20 +141,8 @@ RUN --mount=type=bind,from=common-scripts,source=rpm-init.sh,target=/usr/local/b rpm-init $PKG_RELEASE COPY rpm /root/rpmbuild/SPECS ARG TARGETPLATFORM -RUN < /dev/null; then - builddepCmd="setarch $(xx-info rhel-arch) dnf builddep --nobest" - elif command -v yum-builddep &> /dev/null; then - builddepCmd="yum-builddep --target $(xx-info rhel-arch)" - else - echo >&2 "unable to detect package manager" - exit 1 - fi - set -x - $builddepCmd -y /root/rpmbuild/SPECS/*.spec -EOT +RUN --mount=type=bind,from=common-scripts,source=rpm-builddep.sh,target=/usr/local/bin/rpm-builddep \ + rpm-builddep $(xx-info rhel-arch) /root/rpmbuild/SPECS WORKDIR /root/rpmbuild ARG DOCKER_ENGINE_REF ARG NIGHTLY_BUILD diff --git a/pkg/sbom/Dockerfile b/pkg/sbom/Dockerfile index 1e9d7373..e8878717 100644 --- a/pkg/sbom/Dockerfile +++ b/pkg/sbom/Dockerfile @@ -124,20 +124,8 @@ RUN --mount=type=bind,from=common-scripts,source=rpm-init.sh,target=/usr/local/b rpm-init $PKG_RELEASE COPY rpm /root/rpmbuild/SPECS ARG TARGETPLATFORM -RUN < /dev/null; then - builddepCmd="setarch $(xx-info rhel-arch) dnf builddep --nobest" - elif command -v yum-builddep &> /dev/null; then - builddepCmd="yum-builddep --target $(xx-info rhel-arch)" - else - echo >&2 "unable to detect package manager" - exit 1 - fi - set -x - $builddepCmd -y /root/rpmbuild/SPECS/*.spec -EOT +RUN --mount=type=bind,from=common-scripts,source=rpm-builddep.sh,target=/usr/local/bin/rpm-builddep \ + rpm-builddep $(xx-info rhel-arch) /root/rpmbuild/SPECS WORKDIR /root/rpmbuild ARG SBOM_REF ARG NIGHTLY_BUILD diff --git a/pkg/scan/Dockerfile b/pkg/scan/Dockerfile index 07013877..c5cd4715 100644 --- a/pkg/scan/Dockerfile +++ b/pkg/scan/Dockerfile @@ -124,20 +124,8 @@ RUN --mount=type=bind,from=common-scripts,source=rpm-init.sh,target=/usr/local/b rpm-init $PKG_RELEASE COPY rpm /root/rpmbuild/SPECS ARG TARGETPLATFORM -RUN < /dev/null; then - builddepCmd="setarch $(xx-info rhel-arch) dnf builddep --nobest" - elif command -v yum-builddep &> /dev/null; then - builddepCmd="yum-builddep --target $(xx-info rhel-arch)" - else - echo >&2 "unable to detect package manager" - exit 1 - fi - set -x - $builddepCmd -y /root/rpmbuild/SPECS/*.spec -EOT +RUN --mount=type=bind,from=common-scripts,source=rpm-builddep.sh,target=/usr/local/bin/rpm-builddep \ + rpm-builddep $(xx-info rhel-arch) /root/rpmbuild/SPECS WORKDIR /root/rpmbuild ARG SCAN_REF ARG NIGHTLY_BUILD