From a506f44ef2f188d3ba08990b936ea5e8c57fd574 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sat, 21 Oct 2023 13:26:12 +0200 Subject: [PATCH 1/5] align GOPROXY and GO111MODULE env vars Signed-off-by: CrazyMax (cherry picked from commit bfddc17ec209001acc7eb15c01e4af41b0f1ed7e) --- pkg/containerd/Dockerfile | 8 +++++--- pkg/credential-helpers/Dockerfile | 2 ++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/pkg/containerd/Dockerfile b/pkg/containerd/Dockerfile index b2091e67..d6365bb9 100644 --- a/pkg/containerd/Dockerfile +++ b/pkg/containerd/Dockerfile @@ -44,8 +44,8 @@ FROM --platform=$BUILDPLATFORM ${GO_IMAGE}:${GO_VERSION}-${GO_IMAGE_VARIANT} AS # md2man FROM go AS go-md2man -ARG GOPROXY="direct" -ARG GO111MODULE="on" +ENV GOPROXY="https://proxy.golang.org|direct" +ENV GO111MODULE="on" ARG MD2MAN_VERSION RUN go install github.com/cpuguy83/go-md2man/v2@${MD2MAN_VERSION} @@ -120,6 +120,7 @@ COPY --from=xx / / ARG DEBIAN_FRONTEND ENV GOPROXY="https://proxy.golang.org|direct" ENV GOPATH="/go" +ENV GO111MODULE="on" ENV PATH="$PATH:/usr/local/go/bin:$GOPATH/bin" COPY --from=go-md2man /go/bin/go-md2man $GOPATH/bin/go-md2man ARG PKG_RELEASE @@ -154,6 +155,7 @@ FROM ${PKG_BASE_IMAGE} AS builder-rpm COPY --from=xx / / ENV GOPROXY="https://proxy.golang.org|direct" ENV GOPATH="/go" +ENV GO111MODULE="on" ENV PATH="$PATH:/usr/local/go/bin:$GOPATH/bin" COPY --from=go-md2man /go/bin/go-md2man $GOPATH/bin/go-md2man ARG PKG_RELEASE @@ -194,7 +196,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends bash ca-certifi ENV GOPROXY="https://proxy.golang.org|direct" ENV GOPATH="/go" ENV PATH="$PATH:/usr/local/go/bin:$GOPATH/bin" -ENV GO111MODULE="off" +ENV GO111MODULE="on" ENV CGO_ENABLED="1" ARG PKG_NAME ARG CONTAINERD_REF diff --git a/pkg/credential-helpers/Dockerfile b/pkg/credential-helpers/Dockerfile index 6488920b..b1603d0e 100644 --- a/pkg/credential-helpers/Dockerfile +++ b/pkg/credential-helpers/Dockerfile @@ -87,6 +87,7 @@ ARG DEBIAN_FRONTEND ENV GOPROXY="https://proxy.golang.org|direct" ENV GOPATH="/go" ENV PATH="$PATH:/usr/local/go/bin:$GOPATH/bin" +ENV GO111MODULE="on" ARG PKG_RELEASE RUN apt-get update && apt-get install -y --no-install-recommends apt-utils bash ca-certificates curl devscripts equivs git COPY deb /root/package/debian @@ -118,6 +119,7 @@ COPY --from=xx / / ENV GOPROXY="https://proxy.golang.org|direct" ENV GOPATH="/go" ENV PATH="$PATH:/usr/local/go/bin:$GOPATH/bin" +ENV GO111MODULE="on" ARG PKG_RELEASE RUN --mount=type=bind,from=common-scripts,source=rpm-init.sh,target=/usr/local/bin/rpm-init \ rpm-init $PKG_RELEASE From 01d2e01dab5767bb766d984a26b08b90723361bf Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sat, 21 Oct 2023 18:33:45 +0200 Subject: [PATCH 2/5] distro: add fedora 39 Signed-off-by: CrazyMax (cherry picked from commit d02ddfaff9ee7331d8f612b94906e3fb9311245e) --- Makefile | 2 +- common/packages.hcl | 11 +++++++++++ common/packages.mk | 11 ++++++++++- 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 51a23ac6..7d199e85 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 ubuntu2004 ubuntu2204 ubuntu2304 centos7 centos9 oraclelinux7 fedora37 fedora38 static + GHA_RELEASES := debian10 debian11 debian12 ubuntu2004 ubuntu2204 ubuntu2304 centos7 centos9 oraclelinux7 fedora38 fedora39 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 42614eec..c3b76901 100644 --- a/common/packages.hcl +++ b/common/packages.hcl @@ -218,6 +218,17 @@ target "_pkg-fedora38" { } } +target "_pkg-fedora39" { + args = { + PKG_RELEASE = "fedora39" + PKG_TYPE = "rpm" + PKG_DISTRO = "fedora" + PKG_DISTRO_ID = "39" + PKG_DISTRO_SUITE = "39" + PKG_BASE_IMAGE = "fedora:39" + } +} + target "_pkg-oraclelinux7" { args = { PKG_RELEASE = "oraclelinux7" diff --git a/common/packages.mk b/common/packages.mk index e86ca839..d0d1969f 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 fedora37 fedora38 oraclelinux7 oraclelinux8 oraclelinux9 +PKG_RPM_RELEASES ?= centos7 centos8 centos9 fedora37 fedora38 fedora39 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#,$##' @@ -195,6 +195,15 @@ pkg-info-fedora38: $(eval PKG_BASE_IMAGE = fedora:38) $(eval PKG_SUPPORTED_PLATFORMS = linux/amd64 linux/arm64 linux/ppc64le linux/s390x) +.PHONY: pkg-info-fedora39 +pkg-info-fedora39: + $(eval PKG_TYPE = rpm) + $(eval PKG_DISTRO = fedora) + $(eval PKG_DISTRO_ID = 39) + $(eval PKG_DISTRO_SUITE = 39) + $(eval PKG_BASE_IMAGE = fedora:39) + $(eval PKG_SUPPORTED_PLATFORMS = linux/amd64 linux/arm64 linux/ppc64le linux/s390x) + .PHONY: pkg-info-oraclelinux7 pkg-info-oraclelinux7: $(eval PKG_TYPE = rpm) From 9bdf3a481c966fed8f7d816bbb337d95674d3b55 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sat, 21 Oct 2023 18:39:42 +0200 Subject: [PATCH 3/5] docker-engine: fix require with rpm "docker-ce-rootless-extras" pkg Signed-off-by: CrazyMax (cherry picked from commit a8335660ad3183b2443731f281398d250ca673f4) --- pkg/docker-engine/rpm/docker-ce.spec | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkg/docker-engine/rpm/docker-ce.spec b/pkg/docker-engine/rpm/docker-ce.spec index c10d42aa..66d862a9 100644 --- a/pkg/docker-engine/rpm/docker-ce.spec +++ b/pkg/docker-engine/rpm/docker-ce.spec @@ -16,7 +16,15 @@ Packager: Docker Requires: /usr/sbin/groupadd Requires: docker-ce-cli +# CentOS 7 and RHEL 7 do not yet support weak dependencies +# +# Note that we're not using <= 7 here, to account for other RPM distros, such +# as Fedora, which would not have the rhel macro set (so default to 0). +%if 0%{?rhel} == 7 Requires: docker-ce-rootless-extras +%else +Recommends: docker-ce-rootless-extras +%endif Requires: container-selinux >= 2:2.74 Requires: libseccomp >= 2.3 Requires: systemd From 26d4f22b48b58c1ee8ad7f5a0f5e11f04816cff8 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sat, 21 Oct 2023 18:43:04 +0200 Subject: [PATCH 4/5] docker-engine: add docker.socket to %systemd_preun Signed-off-by: CrazyMax (cherry picked from commit fdb6351a83a6d8f8b8553a146ecc6d8b24d28de6) --- pkg/docker-engine/rpm/docker-ce.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/docker-engine/rpm/docker-ce.spec b/pkg/docker-engine/rpm/docker-ce.spec index 66d862a9..4ab3ec9c 100644 --- a/pkg/docker-engine/rpm/docker-ce.spec +++ b/pkg/docker-engine/rpm/docker-ce.spec @@ -116,7 +116,7 @@ if ! getent group docker > /dev/null; then fi %preun -%systemd_preun docker.service +%systemd_preun docker.service docker.socket %postun %systemd_postun_with_restart docker.service From 496711df69fa5819e119e60cda8d6a10a2741444 Mon Sep 17 00:00:00 2001 From: Ross Smith II Date: Sat, 21 Oct 2023 10:28:30 -0700 Subject: [PATCH 5/5] distro: add ubuntu 23.10 Signed-off-by: Ross Smith II (cherry picked from commit 966a7fbc2e61b2044e2591d5dab47ffd8404cf2f) --- Makefile | 2 +- common/packages.hcl | 11 +++++++++++ common/packages.mk | 12 +++++++++++- pkg/docker-cli/Dockerfile | 2 +- pkg/docker-engine/Dockerfile | 2 +- 5 files changed, 25 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 7d199e85..4f66b2b8 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 ubuntu2004 ubuntu2204 ubuntu2304 centos7 centos9 oraclelinux7 fedora38 fedora39 static + GHA_RELEASES := debian10 debian11 debian12 ubuntu2004 ubuntu2204 ubuntu2304 ubuntu2310 centos7 centos9 oraclelinux7 fedora38 fedora39 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 c3b76901..70eee628 100644 --- a/common/packages.hcl +++ b/common/packages.hcl @@ -163,6 +163,17 @@ target "_pkg-ubuntu2304" { } } +target "_pkg-ubuntu2310" { + args = { + PKG_RELEASE = "ubuntu2310" + PKG_TYPE = "deb" + PKG_DISTRO = "ubuntu" + PKG_DISTRO_ID = "23.10" + PKG_DISTRO_SUITE = "mantic" + PKG_BASE_IMAGE = "ubuntu:mantic" + } +} + target "_pkg-centos7" { args = { PKG_RELEASE = "centos7" diff --git a/common/packages.mk b/common/packages.mk index d0d1969f..901a76d0 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 ubuntu2304 raspbian10 raspbian11 raspbian12 +PKG_DEB_RELEASES ?= debian10 debian11 debian12 ubuntu2004 ubuntu2204 ubuntu2304 ubuntu2310 raspbian10 raspbian11 raspbian12 PKG_RPM_RELEASES ?= centos7 centos8 centos9 fedora37 fedora38 fedora39 oraclelinux7 oraclelinux8 oraclelinux9 # PKG_SUPPORTED_PLATFORMS could be replaced by: @@ -148,6 +148,16 @@ pkg-info-ubuntu2304: @# 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-ubuntu2310 +pkg-info-ubuntu2310: + $(eval PKG_TYPE = deb) + $(eval PKG_DISTRO = ubuntu) + $(eval PKG_DISTRO_ID = 23.10) + $(eval PKG_DISTRO_SUITE = mantic) + $(eval PKG_BASE_IMAGE = ubuntu:mantic) + @# 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-centos7 pkg-info-centos7: $(eval PKG_TYPE = rpm) diff --git a/pkg/docker-cli/Dockerfile b/pkg/docker-cli/Dockerfile index 17633e99..5f811f59 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 <