From 2c8e36203729cabe5dc8a6617d39bf3f7333bcd2 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Fri, 17 Feb 2023 13:57:51 +0100 Subject: [PATCH 01/54] remove buildkit package We don't have strong use cases for using BuildKit as a package atm so let's just remove it in the meantime to avoid confusion. Signed-off-by: CrazyMax (cherry picked from commit 2522897b8ce1620b71464b5edc02be3562e4a231) --- .github/workflows/.build.yml | 2 +- .github/workflows/.release.yml | 2 +- .github/workflows/build-buildkit.yml | 36 ---- .github/workflows/release-buildkit.yml | 42 ---- pkg/buildkit/.dockerignore | 1 - pkg/buildkit/.gitignore | 1 - pkg/buildkit/Dockerfile | 220 --------------------- pkg/buildkit/Makefile | 42 ---- pkg/buildkit/common/buildkit.service | 49 ----- pkg/buildkit/common/buildkit.socket | 26 --- pkg/buildkit/common/buildkitd.toml | 124 ------------ pkg/buildkit/deb/compat | 1 - pkg/buildkit/deb/control | 28 --- pkg/buildkit/deb/docs | 1 - pkg/buildkit/deb/rules | 47 ----- pkg/buildkit/deb/source/format | 1 - pkg/buildkit/docker-bake.hcl | 233 ----------------------- pkg/buildkit/rpm/buildkit.spec | 112 ----------- pkg/buildkit/scripts/pkg-deb-build.sh | 74 ------- pkg/buildkit/scripts/pkg-rpm-build.sh | 76 -------- pkg/buildkit/scripts/pkg-static-build.sh | 118 ------------ pkg/buildkit/verify.Dockerfile | 107 ----------- 22 files changed, 2 insertions(+), 1341 deletions(-) delete mode 100644 .github/workflows/build-buildkit.yml delete mode 100644 .github/workflows/release-buildkit.yml delete mode 100644 pkg/buildkit/.dockerignore delete mode 100644 pkg/buildkit/.gitignore delete mode 100644 pkg/buildkit/Dockerfile delete mode 100644 pkg/buildkit/Makefile delete mode 100644 pkg/buildkit/common/buildkit.service delete mode 100644 pkg/buildkit/common/buildkit.socket delete mode 100644 pkg/buildkit/common/buildkitd.toml delete mode 100644 pkg/buildkit/deb/compat delete mode 100644 pkg/buildkit/deb/control delete mode 100644 pkg/buildkit/deb/docs delete mode 100644 pkg/buildkit/deb/rules delete mode 100644 pkg/buildkit/deb/source/format delete mode 100644 pkg/buildkit/docker-bake.hcl delete mode 100644 pkg/buildkit/rpm/buildkit.spec delete mode 100755 pkg/buildkit/scripts/pkg-deb-build.sh delete mode 100755 pkg/buildkit/scripts/pkg-rpm-build.sh delete mode 100755 pkg/buildkit/scripts/pkg-static-build.sh delete mode 100644 pkg/buildkit/verify.Dockerfile diff --git a/.github/workflows/.build.yml b/.github/workflows/.build.yml index 6f773fb7..75179e81 100644 --- a/.github/workflows/.build.yml +++ b/.github/workflows/.build.yml @@ -135,7 +135,7 @@ jobs: * commit: [\`${COMMIT}\`](${REPO}/commit/${COMMIT}) EOF - if [[ "${{ inputs.name }}" = "buildkit" ]] || [[ "${{ inputs.name }}" = "containerd" ]]; then + if [ "${{ inputs.name }}" = "containerd" ]; then cat >> "$GITHUB_STEP_SUMMARY" <<-EOF * runc * repo: ${RUNC_REPO} diff --git a/.github/workflows/.release.yml b/.github/workflows/.release.yml index d0f9c770..6554b3c8 100644 --- a/.github/workflows/.release.yml +++ b/.github/workflows/.release.yml @@ -203,7 +203,7 @@ jobs: * commit: [\`${COMMIT}\`](${REPO}/commit/${COMMIT}) EOF - if [[ "${{ inputs.name }}" = "buildkit" ]] || [[ "${{ inputs.name }}" = "containerd" ]]; then + if [ "${{ inputs.name }}" = "containerd" ]; then cat >> "/tmp/summary.txt" <<-EOF * runc * repo: ${RUNC_REPO} diff --git a/.github/workflows/build-buildkit.yml b/.github/workflows/build-buildkit.yml deleted file mode 100644 index 62e2d7a8..00000000 --- a/.github/workflows/build-buildkit.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: build-buildkit - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -on: - workflow_dispatch: - inputs: - pkgs: - description: 'Packages to build (minimal, all or space separated list)' - default: 'minimal' - required: false - type: string - push: - branches: - - 'main' - - 'buildkit/[0-9]+.[0-9]+' - paths: - - '.github/workflows/.build.yml' - - '.github/workflows/build-buildkit.yml' - - 'common/**' - - 'pkg/buildkit/**' - pull_request: - paths: - - '.github/workflows/.build.yml' - - '.github/workflows/build-buildkit.yml' - - 'common/**' - - 'pkg/buildkit/**' - -jobs: - run: - uses: ./.github/workflows/.build.yml - with: - name: buildkit - secrets: inherit diff --git a/.github/workflows/release-buildkit.yml b/.github/workflows/release-buildkit.yml deleted file mode 100644 index 6c8feb39..00000000 --- a/.github/workflows/release-buildkit.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: release-buildkit - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -on: - workflow_dispatch: - inputs: - ref: - description: 'Ref (e.g. v0.11.2)' - required: true - type: string - repo: - description: 'Override default repo' - required: false - type: string - runc_repo: - description: 'Override runc repo' - required: false - type: string - runc_ref: - description: 'Override runc ref' - required: false - type: string - release: - description: 'Push image and create release' - required: false - type: boolean - -jobs: - release: - uses: ./.github/workflows/.release.yml - with: - name: buildkit - release: ${{ inputs.release }} - env: | - BUILDKIT_REPO=${{ inputs.repo }} - BUILDKIT_REF=${{ inputs.ref }} - RUNC_REPO=${{ inputs.runc_repo }} - RUNC_REF=${{ inputs.runc_ref }} - secrets: inherit diff --git a/pkg/buildkit/.dockerignore b/pkg/buildkit/.dockerignore deleted file mode 100644 index 5e56e040..00000000 --- a/pkg/buildkit/.dockerignore +++ /dev/null @@ -1 +0,0 @@ -/bin diff --git a/pkg/buildkit/.gitignore b/pkg/buildkit/.gitignore deleted file mode 100644 index 5e56e040..00000000 --- a/pkg/buildkit/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/bin diff --git a/pkg/buildkit/Dockerfile b/pkg/buildkit/Dockerfile deleted file mode 100644 index 3cb0be6d..00000000 --- a/pkg/buildkit/Dockerfile +++ /dev/null @@ -1,220 +0,0 @@ -# syntax=docker/dockerfile-upstream:1 - -# 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. - -ARG XX_VERSION="1.2.1" -ARG DEBIAN_FRONTEND="noninteractive" - -# common args -ARG GO_IMAGE="golang" -ARG GO_VERSION="1.19" -ARG GO_IMAGE_VARIANT="bullseye" -ARG PKG_RELEASE="debian11" -ARG PKG_TYPE="deb" -ARG PKG_DISTRO="debian" -ARG PKG_SUITE="bullseye" -ARG PKG_BASE_IMAGE="debian:bullseye" - -# stage used as named context that mounts common/scripts -# see pkg target in docker-bake.hcl -FROM scratch AS common-scripts - -# cross compilation helper -FROM --platform=$BUILDPLATFORM tonistiigi/xx:${XX_VERSION} AS xx - -# go base image to retrieve /usr/local/go -FROM ${GO_IMAGE}:${GO_VERSION}-${GO_IMAGE_VARIANT} AS go -FROM --platform=$BUILDPLATFORM ${GO_IMAGE}:${GO_VERSION}-${GO_IMAGE_VARIANT} AS gocross - -# src -FROM --platform=$BUILDPLATFORM alpine AS src-base -RUN apk add --no-cache bash curl file git zip tar - -FROM src-base AS src -WORKDIR /src -ARG BUILDKIT_REPO -RUN git init . && git remote add origin "${BUILDKIT_REPO}" -ARG BUILDKIT_REF -RUN git fetch origin "${BUILDKIT_REF}" +refs/heads/*:refs/remotes/origin/* +refs/tags/*:refs/tags/* && git checkout -q FETCH_HEAD - -FROM src-base AS src-tgz -RUN --mount=from=src,source=/src,target=/buildkit \ - mkdir /out && tar -C / -zcf /out/buildkit.tgz --exclude .git buildkit - -FROM src-base AS runc-ref -ARG RUNC_REF -RUN --mount=from=src,source=/src,target=/buildkit \ - echo "${RUNC_REF:=$(grep "ARG RUNC_VERSION" "/buildkit/Dockerfile" | awk -F'=' '{print $2}')}" > /runc-ref - -FROM src-base AS runc-src -WORKDIR /src -ARG RUNC_REPO -RUN git init . && git remote add origin "${RUNC_REPO}" -RUN --mount=from=runc-ref,source=/runc-ref,target=/runc-ref \ - git fetch origin "$(cat /runc-ref)" +refs/heads/*:refs/remotes/origin/* +refs/tags/*:refs/tags/* && git checkout -q FETCH_HEAD - -FROM src-base AS runc-src-tgz -RUN --mount=from=runc-src,source=/src,target=/runc \ - mkdir /out && tar -C / -zcf /out/runc.tgz --exclude .git runc - -# metadata -FROM src-base AS metadata-builder -ARG BUILDKIT_REPO -ARG BUILDKIT_REF -ARG RUNC_REPO -ARG NIGHTLY_BUILD -RUN --mount=type=bind,from=common-scripts,source=gen-ver.sh,target=/usr/local/bin/gen-ver \ - --mount=type=bind,from=src,source=/src,target=/src \ - --mount=from=runc-ref,source=/runc-ref,target=/runc-ref \ - --mount=type=bind,from=runc-src,source=/src,target=/runc-src < "/out/metadata.env" <<-EOF -REPO=${BUILDKIT_REPO%.*} -REF=${BUILDKIT_REF} -VERSION=${GENVER_VERSION} -COMMIT=${GENVER_COMMIT} -EOF - for l in $(gen-ver "/runc-src"); do - export "${l?}" - done - cat >> "/out/metadata.env" <<-EOF -RUNC_REPO=${RUNC_REPO%.*} -RUNC_REF=$(cat /runc-ref) -RUNC_VERSION=${GENVER_VERSION} -RUNC_COMMIT=${GENVER_COMMIT} -EOF -EOT - -FROM scratch AS metadata -COPY --from=metadata-builder /out / - -# deb -FROM ${PKG_BASE_IMAGE} AS builder-deb -COPY --from=xx / / -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" -ENV CGO_ENABLED="0" -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 -ARG TARGETPLATFORM -RUN mk-build-deps -t "xx-apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y" -i /root/package/debian/control -WORKDIR /root/package -ARG BUILDKIT_REF -ARG NIGHTLY_BUILD -ARG PKG_NAME -ARG PKG_DISTRO -ARG PKG_SUITE -ARG PKG_PACKAGER -ARG PKG_DEB_BUILDFLAGS -ARG PKG_DEB_REVISION -ARG PKG_DEB_EPOCH -ARG SOURCE_DATE_EPOCH -RUN --mount=type=bind,source=scripts/pkg-deb-build.sh,target=/usr/local/bin/pkg-deb-build \ - --mount=type=bind,from=common-scripts,source=gen-ver.sh,target=/usr/local/bin/gen-ver \ - --mount=type=bind,from=common-scripts,source=fix-cc.sh,target=/usr/local/bin/fix-cc \ - --mount=type=bind,source=common,target=/common,rw \ - --mount=type=bind,from=src,source=/src,target=/root/package/buildkit,rw \ - --mount=type=bind,from=runc-src,source=/src,target=/root/package/runc,rw \ - --mount=type=bind,from=go,source=/usr/local/go,target=/usr/local/go \ - OUTDIR=/out SRCDIR=./buildkit pkg-deb-build - -# rpm -FROM ${PKG_BASE_IMAGE} AS builder-rpm -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" -ENV CGO_ENABLED="0" -ARG PKG_RELEASE -RUN --mount=type=bind,from=common-scripts,source=rpm-init.sh,target=/usr/local/bin/rpm-init \ - rpm-init $PKG_RELEASE -COPY rpm /root/rpmbuild/SPECS -ARG TARGETPLATFORM -RUN < /dev/null; then - builddepCmd="setarch $(xx-info rhel-arch) dnf builddep" - 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 -WORKDIR /root/rpmbuild -ARG BUILDKIT_REF -ARG NIGHTLY_BUILD -ARG PKG_NAME -ARG PKG_DISTRO -ARG PKG_SUITE -ARG PKG_PACKAGER -ARG PKG_RPM_BUILDFLAGS -ARG PKG_RPM_RELEASE -ARG SOURCE_DATE_EPOCH -RUN --mount=type=bind,source=scripts/pkg-rpm-build.sh,target=/usr/local/bin/pkg-rpm-build \ - --mount=type=bind,from=common-scripts,source=gen-ver.sh,target=/usr/local/bin/gen-ver \ - --mount=type=bind,from=common-scripts,source=fix-cc.sh,target=/usr/local/bin/fix-cc \ - --mount=type=bind,source=common/buildkit.service,target=/root/rpmbuild/SOURCES/buildkit.service \ - --mount=type=bind,source=common/buildkit.socket,target=/root/rpmbuild/SOURCES/buildkit.socket \ - --mount=type=bind,source=common/buildkitd.toml,target=/root/rpmbuild/SOURCES/buildkitd.toml \ - --mount=type=bind,from=src-tgz,source=/out/buildkit.tgz,target=/root/rpmbuild/SOURCES/buildkit.tgz \ - --mount=type=bind,from=runc-src-tgz,source=/out/runc.tgz,target=/root/rpmbuild/SOURCES/runc.tgz \ - --mount=type=bind,from=src,source=/src,target=/usr/local/src/buildkit \ - --mount=type=bind,from=runc-src,source=/src,target=/usr/local/src/runc \ - --mount=type=bind,from=go,source=/usr/local/go,target=/usr/local/go \ - OUTDIR=/out SRCDIR=/usr/local/src/buildkit pkg-rpm-build - -# static -FROM --platform=$BUILDPLATFORM ${PKG_BASE_IMAGE} AS builder-static -COPY --from=xx / / -ARG DEBIAN_FRONTEND -RUN apt-get update && apt-get install -y --no-install-recommends bash ca-certificates file git zip tar \ - dpkg-dev git make pkg-config -ENV GOPROXY="https://proxy.golang.org|direct" -ENV GOPATH="/go" -ENV PATH="$PATH:/usr/local/go/bin:$GOPATH/bin" -ENV GO111MODULE="on" -ENV CGO_ENABLED="0" -ARG PKG_NAME -ARG BUILDKIT_REF -ARG NIGHTLY_BUILD -WORKDIR /build -ARG TARGETPLATFORM -RUN xx-apt-get install -y gcc libseccomp-dev -RUN --mount=type=bind,source=scripts/pkg-static-build.sh,target=/usr/local/bin/pkg-static-build \ - --mount=type=bind,from=common-scripts,source=gen-ver.sh,target=/usr/local/bin/gen-ver \ - --mount=type=bind,from=common-scripts,source=fix-cc.sh,target=/usr/local/bin/fix-cc \ - --mount=type=bind,from=src,source=/src,target=/usr/local/src/buildkit \ - --mount=type=bind,from=runc-src,source=/src,target=/usr/local/src/runc,rw \ - --mount=type=bind,from=gocross,source=/usr/local/go,target=/usr/local/go,rw \ - OUTDIR=/out BUILDDIR=/build SRCDIR=/usr/local/src/buildkit RUNC_SRCDIR=/usr/local/src/runc pkg-static-build - -FROM builder-${PKG_TYPE} AS build-pkg -ARG BUILDKIT_SBOM_SCAN_STAGE=true - -FROM scratch AS pkg -COPY --from=build-pkg /out / diff --git a/pkg/buildkit/Makefile b/pkg/buildkit/Makefile deleted file mode 100644 index 8b766068..00000000 --- a/pkg/buildkit/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -# 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. - -include ../../common/vars.mk - -# https://github.com/moby/buildkit/blob/master/Dockerfile#L38 -export GO_VERSION = 1.19 - -DESTDIR ?= $(BASEDIR)/bin -BAKE_DEFINITIONS ?= -f docker-bake.hcl -f ../../common/packages.hcl - -export BUILDKIT_REPO := $(if $(BUILDKIT_REPO),$(BUILDKIT_REPO),https://github.com/moby/buildkit.git) -export BUILDKIT_REF := $(if $(BUILDKIT_REF),$(BUILDKIT_REF),master) -export RUNC_REPO := $(if $(RUNC_REPO),$(RUNC_REPO),https://github.com/opencontainers/runc.git) -export RUNC_REF := $(if $(RUNC_REF),$(RUNC_REF),) - -PKG_LIST ?= deb rpm static -# supported platforms: https://github.com/moby/buildkit/blob/master/.github/workflows/build.yml#L247 -# FIXME: add linux/ppc64le when a remote PowerPC instance is available (too slow with QEMU) -# FIXME: can't install riscv64 cross pkgs on bullseye for static pkgs -PKG_PLATFORMS ?= darwin/amd64 darwin/arm64 linux/amd64 linux/arm/v6 linux/arm/v7 linux/arm64 linux/s390x windows/amd64 windows/arm64 - -.PHONY: default -default: pkg ; - -.PHONY: metadata -metadata: - docker buildx bake metadata - -include ../../common/packages.mk -include ../../common/build.mk diff --git a/pkg/buildkit/common/buildkit.service b/pkg/buildkit/common/buildkit.service deleted file mode 100644 index 045649dd..00000000 --- a/pkg/buildkit/common/buildkit.service +++ /dev/null @@ -1,49 +0,0 @@ -# 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. - -[Unit] -Description=BuildKit -Documentation=https://github.com/moby/buildkit -# local-fs ensures that buildkitd is started after the /etc/fstab entries -After=network-online.target local-fs.target buildkit.socket -Wants=network-online.target -Requires=buildkit.socket - -[Service] -Type=notify -ExecStart=/usr/bin/buildkitd --addr fd:// -ExecReload=/bin/kill -s HUP $MAINPID -TimeoutStartSec=0 -RestartSec=2 -Restart=always - -# Having non-zero Limit*s causes performance problems due to accounting overhead -# in the kernel. We recommend using cgroups to do container-local accounting. -LimitNPROC=infinity -LimitCORE=infinity -LimitNOFILE=infinity - -# Comment TasksMax if your systemd version does not support it. -# Only systemd 226 and above support this option. -TasksMax=infinity - -# Set delegate yes so that systemd does not reset the cgroups of containers -Delegate=yes - -# Kill only the buildkitd process, not all processes in the cgroup -KillMode=process -OOMScoreAdjust=-500 - -[Install] -WantedBy=multi-user.target diff --git a/pkg/buildkit/common/buildkit.socket b/pkg/buildkit/common/buildkit.socket deleted file mode 100644 index 2151136f..00000000 --- a/pkg/buildkit/common/buildkit.socket +++ /dev/null @@ -1,26 +0,0 @@ -# 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. - -[Unit] -Description=BuildKit socket to access the gRPC API -Documentation=https://github.com/moby/buildkit - -[Socket] -# If /var/run is not implemented as a symlink to /run, you may need to -# specify ListenStream=/var/run/buildkit/buildkitd.sock instead. -ListenStream=/run/buildkit/buildkitd.sock -SocketMode=0660 - -[Install] -WantedBy=sockets.target diff --git a/pkg/buildkit/common/buildkitd.toml b/pkg/buildkit/common/buildkitd.toml deleted file mode 100644 index 855b6211..00000000 --- a/pkg/buildkit/common/buildkitd.toml +++ /dev/null @@ -1,124 +0,0 @@ -# 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. - -# https://github.com/moby/buildkit/blob/master/docs/buildkitd.toml.md - -# root is where all buildkit state is stored. -# root = "/var/lib/buildkit" - -# insecure-entitlements allows insecure entitlements, disabled by default. -# insecure-entitlements = [ "network.host", "security.insecure" ] - -# debug = true - -# [grpc] - # address = [ "tcp://0.0.0.0:1234" ] - # uid = 0 - # gid = 0 - # [grpc.tls] - # cert = "/etc/buildkit/tls.crt" - # key = "/etc/buildkit/tls.key" - # ca = "/etc/buildkit/tlsca.crt" - - # debugAddress is address for attaching go profiles and debuggers. - # debugAddress = "0.0.0.0:6060" - -# config for build history API that stores information about completed build commands -# [history] - # maxAge is the maximum age of history entries to keep, in seconds. - # maxAge = 172800 - # maxEntries is the maximum number of history entries to keep. - # maxEntries = 50 - -# [worker.oci] - # enabled = true - # platforms is manually configure platforms, detected automatically if unset. - # platforms = [ "linux/amd64", "linux/arm64" ] - - # overlayfs or native, default value is "auto". - # snapshotter = "auto" - - # rootless mode requires cgroup v2 and systemd. - # see https://github.com/moby/buildkit/blob/master/docs/rootless.md for details. - # rootless = false - - # whether run subprocesses in main pid namespace or not, this is useful for - # running rootless buildkit inside a container. - # noProcessSandbox = false - - # gc = true - # gckeepstorage = 9000 - - # alternate OCI worker binary name(example 'crun'), by default either - # buildkit-runc or runc binary is used - # binary = "" - - # name of the apparmor profile that should be used to constrain build containers. - # the profile should already be loaded (by a higher level system) before creating a worker. - # apparmor-profile = "" - - # limit the number of parallel build steps that can run at the same time - # max-parallelism = 4 - - # maintain a pool of reusable CNI network namespaces to amortize the overhead - # of allocating and releasing the namespaces - # cniPoolSize = 16 - - # [worker.oci.labels] - # "foo" = "bar" - # [[worker.oci.gcpolicy]] - # keepBytes = 512000000 - # keepDuration = 172800 - # filters = [ "type==source.local", "type==exec.cachemount", "type==source.git.checkout"] - # [[worker.oci.gcpolicy]] - # all = true - # keepBytes = 1024000000 - -# [worker.containerd] - # address = "/run/containerd/containerd.sock" - # enabled = true - # platforms = [ "linux/amd64", "linux/arm64" ] - # namespace = "buildkit" - # gc = true - - # gckeepstorage sets storage limit for default gc profile, in MB. - # gckeepstorage = 9000 - - # maintain a pool of reusable CNI network namespaces to amortize the overhead - # of allocating and releasing the namespaces - # cniPoolSize = 16 - # [worker.containerd.labels] - # "foo" = "bar" - # [[worker.containerd.gcpolicy]] - # keepBytes = 512000000 - # keepDuration = 172800 # in seconds - # filters = [ "type==source.local", "type==exec.cachemount", "type==source.git.checkout"] - # [[worker.containerd.gcpolicy]] - # all = true - # keepBytes = 1024000000 - -# registry configures a new Docker register used for cache import or output. -# [registry."docker.io"] - # mirror configuration to handle path in case a mirror registry requires a /project path rather than just a host:port - # mirrors = ["yourmirror.local:5000", "core.harbor.domain/proxy.docker.io"] - # http = true - # insecure = true - # ca=["/etc/config/myca.pem"] - # [[registry."docker.io".keypair]] - # key="/etc/config/key.pem" - # cert="/etc/config/cert.pem" - -# optionally mirror configuration can be done by defining it as a registry. -# [registry."yourmirror.local:5000"] - # http = true diff --git a/pkg/buildkit/deb/compat b/pkg/buildkit/deb/compat deleted file mode 100644 index f599e28b..00000000 --- a/pkg/buildkit/deb/compat +++ /dev/null @@ -1 +0,0 @@ -10 diff --git a/pkg/buildkit/deb/control b/pkg/buildkit/deb/control deleted file mode 100644 index c305fb2f..00000000 --- a/pkg/buildkit/deb/control +++ /dev/null @@ -1,28 +0,0 @@ -Source: buildkit -Section: admin -Priority: optional -Maintainer: Docker -Homepage: https://github.com/moby/buildkit -Vcs-Browser: https://github.com/moby/buildkit -Vcs-Git: git://github.com/moby/buildkit.git -Standards-Version: 4.1.4 -Build-Depends: dh-apparmor, - debhelper (>= 10~) | dh-systemd, - gcc, - libc-dev, - pkg-config, - libseccomp2, - libseccomp-dev, - make - -Package: buildkit -Architecture: any -Depends: libseccomp2 (>= 2.3.0), - ${misc:Depends}, - ${shlibs:Depends} -Recommends: ca-certificates, - git, - pigz, - procps, - xz-utils -Description: BuildKit is concurrent, cache-efficient, and Dockerfile-agnostic builder toolkit for converting source code to build artifacts. diff --git a/pkg/buildkit/deb/docs b/pkg/buildkit/deb/docs deleted file mode 100644 index 2f133a10..00000000 --- a/pkg/buildkit/deb/docs +++ /dev/null @@ -1 +0,0 @@ -buildkit/README.md diff --git a/pkg/buildkit/deb/rules b/pkg/buildkit/deb/rules deleted file mode 100644 index c81e389b..00000000 --- a/pkg/buildkit/deb/rules +++ /dev/null @@ -1,47 +0,0 @@ -#!/usr/bin/make -f - -%: - dh $@ --with systemd - -# force packages to be built with xz compression, as Ubuntu 21.10 and up use -# zstd compression, which is non-standard, and breaks 'dpkg-sig --verify' -override_dh_builddeb: - dh_builddeb -- -Zxz - -override_dh_auto_build: - mkdir -p /go/src/github.com/moby && \ - ln -snf $(CURDIR)/buildkit /go/src/github.com/moby/buildkit && \ - cd /go/src/github.com/moby/buildkit && \ - go build \ - -mod=vendor \ - -trimpath \ - -ldflags "-X github.com/moby/buildkit/version.Version=$(VERSION) -X github.com/moby/buildkit/version.Revision=$(REVISION) -X github.com/moby/buildkit/version.Package=github.com/moby/buildkit" \ - -tags "urfave_cli_no_docs apparmor seccomp" \ - -o "./bin/buildctl" \ - ./cmd/buildctl && \ - go build \ - -mod=vendor \ - -trimpath \ - -ldflags "-X github.com/moby/buildkit/version.Version=$(VERSION) -X github.com/moby/buildkit/version.Revision=$(REVISION) -X github.com/moby/buildkit/version.Package=github.com/moby/buildkit" \ - -tags "urfave_cli_no_docs apparmor seccomp" \ - -o "./bin/buildkitd" \ - ./cmd/buildkitd && \ - mkdir -p /go/src/github.com/opencontainers && \ - ln -snf $(CURDIR)/runc /go/src/github.com/opencontainers/runc && \ - cd /go/src/github.com/opencontainers/runc && \ - CGO_ENABLED=1 GO111MODULE=auto make BINDIR="$$(pwd)/bin" runc install - -override_dh_strip: - # Go has lots of problems with stripping, so just don't - -override_dh_systemd_start: - dh_systemd_start --restart-after-upgrade - sed -i 's/_dh_action=try-restart/_dh_action=restart/g' ./debian/buildkit.postinst.debhelper - -override_dh_auto_install: - mkdir -p debian/buildkit/usr/bin - install -D -m 0755 buildkit/bin/* debian/buildkit/usr/bin - install -D -m 0755 runc/bin/runc debian/buildkit/usr/bin/buildkit-runc - install -D -m 0644 /common/buildkit.service debian/buildkit/lib/systemd/system/buildkit.service - install -D -m 0644 /common/buildkit.socket debian/buildkit/lib/systemd/system/buildkit.socket - install -D -m 0644 /common/buildkitd.toml debian/buildkit/etc/buildkit/buildkitd.toml diff --git a/pkg/buildkit/deb/source/format b/pkg/buildkit/deb/source/format deleted file mode 100644 index d3827e75..00000000 --- a/pkg/buildkit/deb/source/format +++ /dev/null @@ -1 +0,0 @@ -1.0 diff --git a/pkg/buildkit/docker-bake.hcl b/pkg/buildkit/docker-bake.hcl deleted file mode 100644 index 80372e62..00000000 --- a/pkg/buildkit/docker-bake.hcl +++ /dev/null @@ -1,233 +0,0 @@ -// 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. - -# Sets the buildkit repo. Will be used to clone the repo at -# BUILDKIT_REF to include the README.md and LICENSE for the -# static packages and also create version string. -variable "BUILDKIT_REPO" { - default = "https://github.com/moby/buildkit.git" -} - -# Sets the buildkit ref. -variable "BUILDKIT_REF" { - default = "master" -} - -# In case we want to set runc to a specific version instead of using -# the one used by buildkit -variable "RUNC_REPO" { - default = "https://github.com/opencontainers/runc.git" -} -variable "RUNC_REF" { - default = "" -} - -# set to 1 to enforce nightly build -variable "NIGHTLY_BUILD" { - default = "" -} - -# Sets Go image, version and variant to use for building -variable "GO_IMAGE" { - default = "golang" -} -variable "GO_VERSION" { - default = "1.19" -} -variable "GO_IMAGE_VARIANT" { - default = "bullseye" -} - -# Sets the pkg name. -variable "PKG_NAME" { - default = "buildkit" -} - -# Sets the list of package types to build: apk, deb, rpm or static -variable "PKG_TYPE" { - default = "static" -} - -# Sets release flavor. See packages.hcl and packages.mk for more details. -variable "PKG_RELEASE" { - default = "static" -} -target "_pkg-static" { - args = { - PKG_RELEASE = "" - PKG_TYPE = "static" - } -} - -# Sets the vendor/maintainer name (only for linux packages) -variable "PKG_VENDOR" { - default = "Docker" -} - -# Sets the name of the company that produced the package (only for linux packages) -variable "PKG_PACKAGER" { - default = "Docker " -} - -# deb specific, see vars.mk for more details -variable "PKG_DEB_BUILDFLAGS" { - default = "-b -uc" -} -variable "PKG_DEB_REVISION" { - default = "0" -} -variable "PKG_DEB_EPOCH" { - default = "5" -} - -# rpm specific, see vars.mk for more details -variable "PKG_RPM_BUILDFLAGS" { - default = "-bb" -} -variable "PKG_RPM_RELEASE" { - default = "" -} - -# Defines the output folder -variable "DESTDIR" { - default = "" -} -function "bindir" { - params = [defaultdir] - result = DESTDIR != "" ? DESTDIR : "./bin/${defaultdir}" -} - -# Defines if we just want to build for the local platform -variable "LOCAL_PLATFORM" { - default = "" -} - -# Defines reference for registry cache exporter -variable "BUILD_CACHE_REGISTRY_SLUG" { - default = "dockereng/packaging-cache" -} -variable "BUILD_CACHE_REGISTRY_PUSH" { - default = "" -} - -group "default" { - targets = ["pkg"] -} - -target "_common" { - inherits = ["_pkg-${PKG_RELEASE}"] - args = { - BUILDKIT_MULTI_PLATFORM = 1 - BUILDKIT_REPO = BUILDKIT_REPO - BUILDKIT_REF = BUILDKIT_REF - RUNC_REPO = RUNC_REPO - RUNC_REF = RUNC_REF - NIGHTLY_BUILD = NIGHTLY_BUILD - GO_IMAGE = GO_IMAGE - GO_VERSION = GO_VERSION - GO_IMAGE_VARIANT = GO_IMAGE_VARIANT - PKG_NAME = PKG_NAME - PKG_VENDOR = PKG_VENDOR - PKG_PACKAGER = PKG_PACKAGER - PKG_DEB_BUILDFLAGS = PKG_DEB_BUILDFLAGS - PKG_DEB_REVISION = PKG_DEB_REVISION - PKG_DEB_EPOCH = PKG_DEB_EPOCH - PKG_RPM_BUILDFLAGS = PKG_RPM_BUILDFLAGS - PKG_RPM_RELEASE = PKG_RPM_RELEASE - } - platforms = [ - # BAKE_LOCAL_PLATFORM is a built-in var returning the current platform's - # default platform specification: https://docs.docker.com/build/customize/bake/file-definition/#built-in-variables - LOCAL_PLATFORM != "" ? BAKE_LOCAL_PLATFORM : "" - ] - cache-from = [ - BUILD_CACHE_REGISTRY_SLUG != "" ? "type=registry,ref=${BUILD_CACHE_REGISTRY_SLUG}:buildkit-${PKG_TYPE}-${PKG_RELEASE}" : "", - ] - cache-to = [ - BUILD_CACHE_REGISTRY_SLUG != "" && BUILD_CACHE_REGISTRY_PUSH != "" ? "type=registry,ref=${BUILD_CACHE_REGISTRY_SLUG}:buildkit-${PKG_TYPE}-${PKG_RELEASE},mode=max" : "", - ] -} - -# $ PKG_RELEASE=debian11 docker buildx bake pkg -# $ docker buildx bake --set *.platform=linux/amd64 --set *.output=./bin pkg -target "pkg" { - inherits = ["_common"] - target = "pkg" - output = [bindir(PKG_RELEASE)] - contexts = { - common-scripts = "../../common/scripts" - } - attest = [ - "type=sbom", - "type=provenance,mode=max" - ] -} - -# Special target: https://github.com/docker/metadata-action#bake-definition -target "meta-helper" { - tags = ["dockereng/packaging:buildkit-local"] -} - -# Create release image by using ./bin folder as named context. Make sure all -# pkg targets are called before releasing -target "release" { - inherits = ["meta-helper"] - dockerfile = "../../common/release.Dockerfile" - target = "release" - # same as PKG_PLATFORMS in Makefile - platforms = [ - "darwin/amd64", - "darwin/arm64", - "linux/amd64", - "linux/arm/v6", - "linux/arm/v7", - "linux/arm64", - "linux/ppc64le", - "linux/riscv64", - "linux/s390x", - "windows/amd64", - "windows/arm64" - ] - contexts = { - bin-folder = "./bin" - } -} - -# Verify packages -target "verify" { - inherits = ["_pkg-${PKG_RELEASE}"] - dockerfile = "verify.Dockerfile" - output = ["type=cacheonly"] - contexts = { - common-scripts = "../../common/scripts" - bin-folder = "./bin" - } -} - -# Output metadata -target "metadata" { - inherits = ["_pkg-${PKG_RELEASE}"] - args = { - BUILDKIT_REPO = BUILDKIT_REPO - BUILDKIT_REF = BUILDKIT_REF - RUNC_REPO = RUNC_REPO - RUNC_REF = RUNC_REF - NIGHTLY_BUILD = NIGHTLY_BUILD - } - target = "metadata" - output = ["./bin"] - contexts = { - common-scripts = "../../common/scripts" - } -} diff --git a/pkg/buildkit/rpm/buildkit.spec b/pkg/buildkit/rpm/buildkit.spec deleted file mode 100644 index da67ea00..00000000 --- a/pkg/buildkit/rpm/buildkit.spec +++ /dev/null @@ -1,112 +0,0 @@ -%global debug_package %{nil} - -Name: buildkit -Version: %{_version} -Release: %{_release}%{?dist} -Source0: buildkit.tgz -Source1: buildkit.service -Source2: buildkit.socket -Source3: buildkitd.toml -Source4: runc.tgz -Summary: Concurrent, cache-efficient, and Dockerfile-agnostic builder toolkit -License: ASL 2.0 -URL: https://github.com/moby/buildkit -Vendor: Docker -Packager: Docker - -# container-selinux isn't a thing in suse flavors -%if %{undefined suse_version} -# amazonlinux2 doesn't have container-selinux either -%if "%{?dist}" != ".amzn2" -Requires: container-selinux >= 2:2.74 -%endif -Requires: libseccomp -%else -# SUSE flavors do not have container-selinux, -# and libseccomp is named libseccomp2 -Requires: libseccomp2 -%endif - -BuildRequires: make -BuildRequires: gcc -BuildRequires: libtool-ltdl-devel -BuildRequires: systemd -BuildRequires: libseccomp-devel -BuildRequires: pkgconfig - -%{?systemd_requires} - -%description -BuildKit is concurrent, cache-efficient, and Dockerfile-agnostic builder -toolkit for converting source code to build artifacts. - -%prep -rm -rf %{_topdir}/BUILD/ -rm -f /go/src/github.com/moby/buildkit /go/src/github.com/opencontainers/runc -mkdir -p %{_topdir}/BUILD/src /go/src/github.com/moby /go/src/github.com/opencontainers -if [ ! -d %{_topdir}/SOURCES/buildkit ]; then - cp -rf /usr/local/src/buildkit %{_topdir}/SOURCES/buildkit -fi -ln -s %{_topdir}/SOURCES/buildkit /go/src/github.com/moby/buildkit -if [ ! -d %{_topdir}/SOURCES/runc ]; then - cp -rf /usr/local/src/runc %{_topdir}/SOURCES/runc -fi -ln -s %{_topdir}/SOURCES/runc /go/src/github.com/opencontainers/runc -cd %{_topdir}/BUILD/ - -%build -pushd /go/src/github.com/moby/buildkit - go build \ - -mod=vendor \ - -trimpath \ - -ldflags "-X github.com/moby/buildkit/version.Version=%{_origversion} -X github.com/moby/buildkit/version.Revision=%{_commit} -X github.com/moby/buildkit/version.Package=github.com/moby/buildkit" \ - -tags "urfave_cli_no_docs apparmor seccomp" \ - -o "%{_topdir}/BUILD/bin/buildctl" \ - ./cmd/buildctl && \ - go build \ - -mod=vendor \ - -trimpath \ - -ldflags "-X github.com/moby/buildkit/version.Version=%{_origversion} -X github.com/moby/buildkit/version.Revision=%{_commit} -X github.com/moby/buildkit/version.Package=github.com/moby/buildkit" \ - -tags "urfave_cli_no_docs apparmor seccomp" \ - -o "%{_topdir}/BUILD/bin/buildkitd" \ - ./cmd/buildkitd -popd -pushd /go/src/github.com/opencontainers/runc - CGO_ENABLED=1 GO111MODULE=auto make BINDIR="%{_topdir}/BUILD/bin" runc install -popd - -%install -cd %{_topdir}/BUILD -mkdir -p %{buildroot}%{_bindir} -install -D -m 0755 bin/buildctl ${RPM_BUILD_ROOT}%{_bindir}/buildctl -install -D -m 0755 bin/buildkitd ${RPM_BUILD_ROOT}%{_bindir}/buildkitd -install -D -m 0755 bin/runc ${RPM_BUILD_ROOT}%{_bindir}/buildkit-runc -install -D -m 0644 %{S:1} %{buildroot}%{_unitdir}/buildkit.service -install -D -m 0644 %{S:2} %{buildroot}%{_unitdir}/buildkit.socket -install -D -m 0644 %{S:3} %{buildroot}%{_sysconfdir}/buildkit/buildkitd.toml -mkdir -p build-docs -for file in LICENSE MAINTAINERS README.md; do - cp "%{_topdir}/SOURCES/buildkit/$file" "build-docs/$file" -done - -%post -%systemd_post buildkit.service - -%preun -%systemd_preun buildkit.service - -%postun -%systemd_postun_with_restart buildkit.service - -%files -%doc build-docs/LICENSE build-docs/MAINTAINERS build-docs/README.md -%{_bindir}/buildctl -%{_bindir}/buildkitd -%{_bindir}/buildkit-runc -%{_unitdir}/buildkit.service -%{_unitdir}/buildkit.socket -%{_sysconfdir}/buildkit -%doc -%config(noreplace) %{_sysconfdir}/buildkit/buildkitd.toml - -%changelog diff --git a/pkg/buildkit/scripts/pkg-deb-build.sh b/pkg/buildkit/scripts/pkg-deb-build.sh deleted file mode 100755 index a70f43e3..00000000 --- a/pkg/buildkit/scripts/pkg-deb-build.sh +++ /dev/null @@ -1,74 +0,0 @@ -#!/usr/bin/env bash - -# 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. - -: "${NIGHTLY_BUILD=}" - -: "${PKG_NAME=}" -: "${PKG_RELEASE=}" -: "${PKG_DISTRO=}" -: "${PKG_SUITE=}" -: "${PKG_PACKAGER=}" -: "${PKG_VENDOR=}" - -: "${PKG_DEB_REVISION=}" -: "${PKG_DEB_EPOCH=}" - -: "${SOURCE_DATE_EPOCH=}" -: "${SRCDIR=/work/src}" -: "${OUTDIR=/out}" - -set -e - -if [ -z "$PKG_RELEASE" ]; then - echo >&2 "error: PKG_RELEASE is required" - exit 1 -fi -if [ -z "$OUTDIR" ]; then - echo >&2 "error: OUTDIR is required" - exit 1 -fi - -mkdir -p "$OUTDIR" - -if ! command -v xx-info &> /dev/null; then - echo >&2 "error: xx cross compilation helper is required" - exit 1 -fi - -for l in $(gen-ver "${SRCDIR}"); do - export "${l?}" -done - -xx-go --wrap -fix-cc - -cat > "debian/changelog" <<-EOF -${PKG_NAME} (${PKG_DEB_EPOCH}$([ -n "$PKG_DEB_EPOCH" ] && echo ":")${GENVER_PKG_VERSION}-${PKG_DEB_REVISION}) $PKG_SUITE; urgency=low - * Version: $GENVER_VERSION - -- $(awk -F ': ' '$1 == "Maintainer" { print $2; exit }' debian/control) $(date --rfc-2822) -EOF - -pkgoutput="${OUTDIR}/${PKG_DISTRO}/${PKG_SUITE}/$(xx-info arch)" -if [ -n "$(xx-info variant)" ]; then - pkgoutput="${pkgoutput}/$(xx-info variant)" -fi -mkdir -p "${pkgoutput}" - -set -x - -chmod -x debian/compat 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/${PKG_NAME}* "${pkgoutput}"/ diff --git a/pkg/buildkit/scripts/pkg-rpm-build.sh b/pkg/buildkit/scripts/pkg-rpm-build.sh deleted file mode 100755 index fa6dd9ab..00000000 --- a/pkg/buildkit/scripts/pkg-rpm-build.sh +++ /dev/null @@ -1,76 +0,0 @@ -#!/usr/bin/env bash - -# 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. - -: "${NIGHTLY_BUILD=}" - -: "${PKG_NAME=}" -: "${PKG_RELEASE=}" -: "${PKG_DISTRO=}" -: "${PKG_SUITE=}" -: "${PKG_PACKAGER=}" -: "${PKG_VENDOR=}" - -: "${PKG_RPM_RELEASE=}" - -: "${SOURCE_DATE_EPOCH=}" -: "${SRCDIR=/work/src}" -: "${OUTDIR=/out}" - -set -e - -if [ -z "$PKG_RELEASE" ]; then - echo >&2 "error: PKG_RELEASE is required" - exit 1 -fi -if [ -z "$OUTDIR" ]; then - echo >&2 "error: OUTDIR is required" - exit 1 -fi - -mkdir -p "$OUTDIR" - -if ! command -v xx-info &> /dev/null; then - echo >&2 "error: xx cross compilation helper is required" - exit 1 -fi - -for l in $(gen-ver "${SRCDIR}"); do - export "${l?}" -done - -xx-go --wrap -fix-cc - -rpmDefine=( - --define "_version ${GENVER_PKG_VERSION}" - --define "_origversion ${GENVER_VERSION}" - --define "_release ${PKG_RPM_RELEASE:-${GENVER_RPM_RELEASE}}" - --define "_commit ${GENVER_COMMIT}" -) - -pkgoutput="${OUTDIR}/${PKG_DISTRO}/${PKG_SUITE}/$(xx-info arch)" -if [ -n "$(xx-info variant)" ]; then - pkgoutput="${pkgoutput}/$(xx-info variant)" -fi - -set -x - -rpmbuild --target $(xx-info rhel-arch) $PKG_RPM_BUILDFLAGS "${rpmDefine[@]}" /root/rpmbuild/SPECS/*.spec -mkdir -p "${pkgoutput}" -cp ./RPMS/*/*.* "${pkgoutput}"/ -if [ "$(ls -A ./SRPMS)" ]; then - cp ./SRPMS/* "${pkgoutput}"/ -fi diff --git a/pkg/buildkit/scripts/pkg-static-build.sh b/pkg/buildkit/scripts/pkg-static-build.sh deleted file mode 100755 index 28c7e786..00000000 --- a/pkg/buildkit/scripts/pkg-static-build.sh +++ /dev/null @@ -1,118 +0,0 @@ -#!/usr/bin/env bash - -# 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. - -: "${NIGHTLY_BUILD=}" - -: "${PKG_NAME=}" - -: "${BUILDDIR=/work/build}" -: "${SRCDIR=/work/src}" -: "${OUTDIR=/out}" - -: "${RUNC_SRCDIR=/work/runc-src}" - -set -e - -if [ -z "$OUTDIR" ]; then - echo >&2 "error: OUTDIR is required" - exit 1 -fi - -mkdir -p "$OUTDIR" - -if ! command -v xx-info &> /dev/null; then - echo >&2 "error: xx cross compilation helper is required" - exit 1 -fi - -for l in $(gen-ver "${SRCDIR}"); do - export "${l?}" -done - -xx-go --wrap -fix-cc - -binext=$([ "$(xx-info os)" = "windows" ] && echo ".exe" || true) -mkdir -p ${BUILDDIR}/${PKG_NAME} - -( - set -x - pushd ${SRCDIR} - go build \ - -mod=vendor \ - -trimpath \ - -ldflags "-X github.com/moby/buildkit/version.Version=${GENVER_VERSION} -X github.com/moby/buildkit/version.Revision=${GENVER_COMMIT} -X github.com/moby/buildkit/version.Package=github.com/moby/buildkit -extldflags '-static'" \ - -tags "urfave_cli_no_docs osusergo netgo static_build seccomp" \ - -o "${BUILDDIR}/${PKG_NAME}/buildctl${binext}" \ - ./cmd/buildctl - popd - xx-verify --static "${BUILDDIR}/${PKG_NAME}/buildctl${binext}" -) - -if [ "$(xx-info os)" != "darwin" ]; then - ( - set -x - pushd ${SRCDIR} - go build \ - -mod=vendor \ - -trimpath \ - -ldflags "-X github.com/moby/buildkit/version.Version=${GENVER_VERSION} -X github.com/moby/buildkit/version.Revision=${GENVER_COMMIT} -X github.com/moby/buildkit/version.Package=github.com/moby/buildkit -extldflags '-static'" \ - -tags "urfave_cli_no_docs osusergo netgo static_build seccomp" \ - -o "${BUILDDIR}/${PKG_NAME}/buildkitd${binext}" \ - ./cmd/buildkitd - popd - xx-verify --static "${BUILDDIR}/${PKG_NAME}/buildkitd${binext}" - ) -fi - -if [ "$(xx-info os)" = "linux" ]; then - ( - set -x - pushd ${RUNC_SRCDIR} - CGO_ENABLED=1 make static - mv runc "${BUILDDIR}/${PKG_NAME}/buildkit-runc" - popd - xx-verify --static "${BUILDDIR}/${PKG_NAME}/buildkit-runc" - ) -fi - -pkgoutput="$OUTDIR/static/$(xx-info os)/$(xx-info arch)" -if [ -n "$(xx-info variant)" ]; then - pkgoutput="${pkgoutput}/$(xx-info variant)" -fi -mkdir -p "${pkgoutput}" - -cd "$BUILDDIR" -for pkgname in *; do - workdir=$(mktemp -d -t docker-packaging.XXXXXXXXXX) - mkdir -p "$workdir/${pkgname}" - ( - set -x - cp "${pkgname}"/* ${SRCDIR}/LICENSE ${SRCDIR}/README.md "$workdir/${pkgname}/" - ) - if [ "$(xx-info os)" = "windows" ]; then - ( - set -x - cd "$workdir" - zip -r "${pkgoutput}/${pkgname}_${GENVER_VERSION#v}.zip" "${pkgname}" - ) - else - ( - set -x - tar -czf "${pkgoutput}/${pkgname}_${GENVER_VERSION#v}.tgz" -C "$workdir" "${pkgname}" - ) - fi -done diff --git a/pkg/buildkit/verify.Dockerfile b/pkg/buildkit/verify.Dockerfile deleted file mode 100644 index 8112040a..00000000 --- a/pkg/buildkit/verify.Dockerfile +++ /dev/null @@ -1,107 +0,0 @@ -# syntax=docker/dockerfile:1 - -# 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. - -ARG XX_VERSION="1.2.1" - -ARG PKG_TYPE -ARG PKG_BASE_IMAGE - -# cross compilation helper -FROM --platform=$BUILDPLATFORM tonistiigi/xx:${XX_VERSION} AS xx - -FROM scratch AS bin-folder -FROM scratch AS common-scripts - -FROM ${PKG_BASE_IMAGE} AS verify-deb -RUN apt-get update -COPY --from=xx / / -ARG PKG_DISTRO -ARG PKG_SUITE -ARG TARGETPLATFORM -RUN --mount=from=bin-folder,target=/build <&2 "warning: no packages found in $dir" - exit 0 - fi - for package in $(find $dir -type f -name '*.deb'); do - ( - set -x - dpkg-deb --info $package - apt-get install -y --no-install-recommends $package - ) - done - set -x - buildctl --version - buildkitd --version - buildkit-runc --version -EOT - -FROM ${PKG_BASE_IMAGE} AS verify-rpm -COPY --from=xx / / -ARG PKG_RELEASE -ARG PKG_DISTRO -ARG PKG_SUITE -RUN --mount=type=bind,from=common-scripts,source=verify-rpm-init.sh,target=/usr/local/bin/verify-rpm-init \ - verify-rpm-init $PKG_RELEASE -ARG TARGETPLATFORM -RUN --mount=from=bin-folder,target=/build <&2 "warning: no packages found in $dir" - exit 0 - fi - for package in $(find $dir -type f -name '*.rpm'); do - ( - set -x - rpm -qilp $package - yum install -y $package - ) - done - set -x - buildctl --version - buildkitd --version - buildkit-runc --version -EOT - -FROM ${PKG_BASE_IMAGE} AS verify-static -RUN apt-get update && apt-get install -y --no-install-recommends tar -COPY --from=xx / / -ARG PKG_DISTRO -ARG PKG_SUITE -ARG TARGETPLATFORM -RUN --mount=from=bin-folder,target=/build <&2 "warning: no packages found in $dir" - exit 0 - fi - for package in $(find $dir -type f -name '*.tgz'); do - ( - set -x - tar zxvf $package -C /usr/bin --strip-components=1 - ) - done - set -x - buildctl --version - buildkitd --version - buildkit-runc --version -EOT - -FROM verify-${PKG_TYPE} From 6cf037bff2a69c5ce7bebb020fab405861efeace Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Tue, 28 Feb 2023 13:01:09 +0100 Subject: [PATCH 02/54] ci: fix env key in reusable workflows Signed-off-by: CrazyMax (cherry picked from commit 507c10a2f39f607b2f9359ef5478d3af25183fcc) --- .github/workflows/.build.yml | 15 +++++++++++++++ .github/workflows/.release.yml | 6 +++--- .github/workflows/nightly.yml | 14 +++++++------- .github/workflows/release-buildx.yml | 2 +- .github/workflows/release-compose.yml | 2 +- .github/workflows/release-containerd.yml | 2 +- .github/workflows/release-credential-helpers.yml | 2 +- .github/workflows/release-docker-cli.yml | 2 +- .github/workflows/release-docker-engine.yml | 2 +- .github/workflows/release-sbom.yml | 2 +- .github/workflows/release-scan.yml | 2 +- 11 files changed, 33 insertions(+), 18 deletions(-) diff --git a/.github/workflows/.build.yml b/.github/workflows/.build.yml index 75179e81..cdc526c3 100644 --- a/.github/workflows/.build.yml +++ b/.github/workflows/.build.yml @@ -7,6 +7,9 @@ on: name: required: true type: string + envs: + required: false + type: string env: BUILD_CACHE_REGISTRY_SLUG: dockereng/packaging-cache @@ -48,6 +51,12 @@ jobs: - name: Checkout uses: actions/checkout@v3 + - + name: Environment variables + run: | + for l in "${{ inputs.envs }}"; do + echo "${l?}" >> $GITHUB_ENV + done - name: Prepare run: | @@ -106,6 +115,12 @@ jobs: - name: Checkout uses: actions/checkout@v3 + - + name: Environment variables + run: | + for l in "${{ inputs.envs }}"; do + echo "${l?}" >> $GITHUB_ENV + done - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 diff --git a/.github/workflows/.release.yml b/.github/workflows/.release.yml index 6554b3c8..067ab281 100644 --- a/.github/workflows/.release.yml +++ b/.github/workflows/.release.yml @@ -7,7 +7,7 @@ on: name: required: true type: string - env: + envs: required: false type: string release: @@ -53,7 +53,7 @@ jobs: - name: Environment variables run: | - for l in "${{ inputs.env }}"; do + for l in "${{ inputs.envs }}"; do echo "${l?}" >> $GITHUB_ENV done - @@ -119,7 +119,7 @@ jobs: - name: Environment variables run: | - for l in "${{ inputs.env }}"; do + for l in "${{ inputs.envs }}"; do echo "${l?}" >> $GITHUB_ENV done - diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index c87665a4..289dfe0f 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -28,7 +28,7 @@ jobs: needs: buildx with: name: compose - env: | + envs: | NIGHTLY_BUILD=${{ env.NIGHTLY_BUILD }} secrets: inherit @@ -37,7 +37,7 @@ jobs: needs: compose with: name: containerd - env: | + envs: | NIGHTLY_BUILD=${{ env.NIGHTLY_BUILD }} secrets: inherit @@ -46,7 +46,7 @@ jobs: needs: containerd with: name: credential-helpers - env: | + envs: | NIGHTLY_BUILD=${{ env.NIGHTLY_BUILD }} secrets: inherit @@ -55,7 +55,7 @@ jobs: needs: credential-helpers with: name: docker-cli - env: | + envs: | NIGHTLY_BUILD=${{ env.NIGHTLY_BUILD }} secrets: inherit @@ -64,7 +64,7 @@ jobs: needs: docker-cli with: name: docker-engine - env: | + envs: | NIGHTLY_BUILD=${{ env.NIGHTLY_BUILD }} secrets: inherit @@ -73,7 +73,7 @@ jobs: needs: docker-engine with: name: sbom - env: | + envs: | NIGHTLY_BUILD=${{ env.NIGHTLY_BUILD }} secrets: inherit @@ -82,6 +82,6 @@ jobs: needs: sbom with: name: scan - env: | + envs: | NIGHTLY_BUILD=${{ env.NIGHTLY_BUILD }} secrets: inherit diff --git a/.github/workflows/release-buildx.yml b/.github/workflows/release-buildx.yml index a2a2f41c..69d3e8fe 100644 --- a/.github/workflows/release-buildx.yml +++ b/.github/workflows/release-buildx.yml @@ -26,7 +26,7 @@ jobs: with: name: buildx release: ${{ inputs.release }} - env: | + envs: | BUILDX_REPO=${{ inputs.repo }} BUILDX_REF=${{ inputs.ref }} secrets: inherit diff --git a/.github/workflows/release-compose.yml b/.github/workflows/release-compose.yml index 562a767b..a9df67c2 100644 --- a/.github/workflows/release-compose.yml +++ b/.github/workflows/release-compose.yml @@ -26,7 +26,7 @@ jobs: with: name: compose release: ${{ inputs.release }} - env: | + envs: | COMPOSE_REPO=${{ inputs.repo }} COMPOSE_REF=${{ inputs.ref }} secrets: inherit diff --git a/.github/workflows/release-containerd.yml b/.github/workflows/release-containerd.yml index 6fb02e70..d82b3453 100644 --- a/.github/workflows/release-containerd.yml +++ b/.github/workflows/release-containerd.yml @@ -34,7 +34,7 @@ jobs: with: name: containerd release: ${{ inputs.release }} - env: | + envs: | CONTAINERD_REPO=${{ inputs.repo }} CONTAINERD_REF=${{ inputs.ref }} RUNC_REPO=${{ inputs.runc_repo }} diff --git a/.github/workflows/release-credential-helpers.yml b/.github/workflows/release-credential-helpers.yml index 1c80b7ff..8e69b18f 100644 --- a/.github/workflows/release-credential-helpers.yml +++ b/.github/workflows/release-credential-helpers.yml @@ -26,7 +26,7 @@ jobs: with: name: credential-helpers release: ${{ inputs.release }} - env: | + envs: | CREDENTIAL_HELPERS_REPO=${{ inputs.repo }} CREDENTIAL_HELPERS_REF=${{ inputs.ref }} secrets: inherit diff --git a/.github/workflows/release-docker-cli.yml b/.github/workflows/release-docker-cli.yml index 05944fd1..f99f5081 100644 --- a/.github/workflows/release-docker-cli.yml +++ b/.github/workflows/release-docker-cli.yml @@ -26,7 +26,7 @@ jobs: with: name: docker-cli release: ${{ inputs.release }} - env: | + envs: | DOCKER_CLI_REPO=${{ inputs.repo }} DOCKER_CLI_REF=${{ inputs.ref }} secrets: inherit diff --git a/.github/workflows/release-docker-engine.yml b/.github/workflows/release-docker-engine.yml index d5047956..37796c01 100644 --- a/.github/workflows/release-docker-engine.yml +++ b/.github/workflows/release-docker-engine.yml @@ -26,7 +26,7 @@ jobs: with: name: docker-engine release: ${{ inputs.release }} - env: | + envs: | DOCKER_ENGINE_REPO=${{ inputs.repo }} DOCKER_ENGINE_REF=${{ inputs.ref }} secrets: inherit diff --git a/.github/workflows/release-sbom.yml b/.github/workflows/release-sbom.yml index 289e85a0..67af9146 100644 --- a/.github/workflows/release-sbom.yml +++ b/.github/workflows/release-sbom.yml @@ -26,7 +26,7 @@ jobs: with: name: sbom release: ${{ inputs.release }} - env: | + envs: | SBOM_REPO=${{ inputs.repo }} SBOM_REF=${{ inputs.ref }} secrets: inherit diff --git a/.github/workflows/release-scan.yml b/.github/workflows/release-scan.yml index 8851ceb8..d603bcee 100644 --- a/.github/workflows/release-scan.yml +++ b/.github/workflows/release-scan.yml @@ -26,7 +26,7 @@ jobs: with: name: scan release: ${{ inputs.release }} - env: | + envs: | SCAN_REPO=${{ inputs.repo }} SCAN_REF=${{ inputs.ref }} secrets: inherit From b1853b0bc18cf0320def88fd45b498fff1335844 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Thu, 30 Mar 2023 18:41:37 +0200 Subject: [PATCH 03/54] ci: fix nightly build workflow Signed-off-by: CrazyMax (cherry picked from commit 60a261c2fa9b51f9b99e8afa578314b7371887ba) --- .github/workflows/nightly.yml | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 289dfe0f..d120331a 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -11,16 +11,13 @@ on: schedule: - cron: '0 1 * * 0' # every sunday at 1am -env: - NIGHTLY_BUILD: 1 - jobs: buildx: uses: ./.github/workflows/.release.yml with: name: buildx - env: | - NIGHTLY_BUILD=${{ env.NIGHTLY_BUILD }} + envs: | + NIGHTLY_BUILD=1 secrets: inherit compose: @@ -29,7 +26,7 @@ jobs: with: name: compose envs: | - NIGHTLY_BUILD=${{ env.NIGHTLY_BUILD }} + NIGHTLY_BUILD=1 secrets: inherit containerd: @@ -38,7 +35,7 @@ jobs: with: name: containerd envs: | - NIGHTLY_BUILD=${{ env.NIGHTLY_BUILD }} + NIGHTLY_BUILD=1 secrets: inherit credential-helpers: @@ -47,7 +44,7 @@ jobs: with: name: credential-helpers envs: | - NIGHTLY_BUILD=${{ env.NIGHTLY_BUILD }} + NIGHTLY_BUILD=1 secrets: inherit docker-cli: @@ -56,7 +53,7 @@ jobs: with: name: docker-cli envs: | - NIGHTLY_BUILD=${{ env.NIGHTLY_BUILD }} + NIGHTLY_BUILD=1 secrets: inherit docker-engine: @@ -65,7 +62,7 @@ jobs: with: name: docker-engine envs: | - NIGHTLY_BUILD=${{ env.NIGHTLY_BUILD }} + NIGHTLY_BUILD=1 secrets: inherit sbom: @@ -74,7 +71,7 @@ jobs: with: name: sbom envs: | - NIGHTLY_BUILD=${{ env.NIGHTLY_BUILD }} + NIGHTLY_BUILD=1 secrets: inherit scan: @@ -83,5 +80,5 @@ jobs: with: name: scan envs: | - NIGHTLY_BUILD=${{ env.NIGHTLY_BUILD }} + NIGHTLY_BUILD=1 secrets: inherit From 9c44bc03f70c0e681ca6eea01b29c26e96d95029 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Thu, 30 Mar 2023 23:17:05 +0200 Subject: [PATCH 04/54] pkg(docker-engine): bump Go to 1.19.7 Signed-off-by: CrazyMax --- pkg/docker-engine/Dockerfile | 2 +- pkg/docker-engine/Makefile | 4 ++-- pkg/docker-engine/docker-bake.hcl | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/docker-engine/Dockerfile b/pkg/docker-engine/Dockerfile index a3954246..a4f4f192 100644 --- a/pkg/docker-engine/Dockerfile +++ b/pkg/docker-engine/Dockerfile @@ -22,7 +22,7 @@ ARG GOWINRES_VERSION="v0.3.0" # common args ARG GO_IMAGE="golang" -ARG GO_VERSION="1.19.4" +ARG GO_VERSION="1.19.7" ARG GO_IMAGE_VARIANT="bullseye" ARG PKG_RELEASE="debian11" ARG PKG_TYPE="deb" diff --git a/pkg/docker-engine/Makefile b/pkg/docker-engine/Makefile index cc51a83b..007f6925 100644 --- a/pkg/docker-engine/Makefile +++ b/pkg/docker-engine/Makefile @@ -14,8 +14,8 @@ include ../../common/vars.mk -# https://github.com/moby/moby/blob/master/Dockerfile#L3 -export GO_VERSION = 1.19.4 +# https://github.com/moby/moby/blob/23.0/Dockerfile#L3 +export GO_VERSION = 1.19.7 DESTDIR ?= $(BASEDIR)/bin BAKE_DEFINITIONS ?= -f docker-bake.hcl -f ../../common/packages.hcl diff --git a/pkg/docker-engine/docker-bake.hcl b/pkg/docker-engine/docker-bake.hcl index 0b060806..a89f6cfa 100644 --- a/pkg/docker-engine/docker-bake.hcl +++ b/pkg/docker-engine/docker-bake.hcl @@ -34,7 +34,7 @@ variable "GO_IMAGE" { default = "golang" } variable "GO_VERSION" { - default = "1.19.4" + default = "1.19.7" } variable "GO_IMAGE_VARIANT" { default = "bullseye" From efb6339029a3f021dd6db664bdf8eaea820394c0 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Thu, 30 Mar 2023 23:17:12 +0200 Subject: [PATCH 05/54] pkg(docker-cli): bump Go to 1.19.7 Signed-off-by: CrazyMax --- pkg/docker-cli/Dockerfile | 2 +- pkg/docker-cli/Makefile | 4 ++-- pkg/docker-cli/docker-bake.hcl | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/docker-cli/Dockerfile b/pkg/docker-cli/Dockerfile index a5f3a639..f856f0e2 100644 --- a/pkg/docker-cli/Dockerfile +++ b/pkg/docker-cli/Dockerfile @@ -22,7 +22,7 @@ ARG GOVERSIONINFO_VERSION="v1.3.0" # common args ARG GO_IMAGE="golang" -ARG GO_VERSION="1.19.4" +ARG GO_VERSION="1.19.7" ARG GO_IMAGE_VARIANT="bullseye" ARG PKG_RELEASE="debian11" ARG PKG_TYPE="deb" diff --git a/pkg/docker-cli/Makefile b/pkg/docker-cli/Makefile index 495f1b10..2118992b 100644 --- a/pkg/docker-cli/Makefile +++ b/pkg/docker-cli/Makefile @@ -14,8 +14,8 @@ include ../../common/vars.mk -# https://github.com/docker/cli/blob/master/Dockerfile#L4 -export GO_VERSION = 1.19.4 +# https://github.com/docker/cli/blob/23.0/Dockerfile#L4 +export GO_VERSION = 1.19.7 DESTDIR ?= $(BASEDIR)/bin BAKE_DEFINITIONS ?= -f docker-bake.hcl -f ../../common/packages.hcl diff --git a/pkg/docker-cli/docker-bake.hcl b/pkg/docker-cli/docker-bake.hcl index 0aa67ea0..583c7685 100644 --- a/pkg/docker-cli/docker-bake.hcl +++ b/pkg/docker-cli/docker-bake.hcl @@ -34,7 +34,7 @@ variable "GO_IMAGE" { default = "golang" } variable "GO_VERSION" { - default = "1.19.4" + default = "1.19.7" } variable "GO_IMAGE_VARIANT" { default = "bullseye" From 145983b6509d17c6c6c9000e2564dac8e6f8f649 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Thu, 30 Mar 2023 23:20:59 +0200 Subject: [PATCH 06/54] pkg(docker-cli,docker-engine): fix default ref to 23.0 Signed-off-by: CrazyMax --- pkg/docker-cli/Makefile | 2 +- pkg/docker-cli/docker-bake.hcl | 2 +- pkg/docker-engine/Makefile | 2 +- pkg/docker-engine/docker-bake.hcl | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/docker-cli/Makefile b/pkg/docker-cli/Makefile index 2118992b..6ae83abf 100644 --- a/pkg/docker-cli/Makefile +++ b/pkg/docker-cli/Makefile @@ -21,7 +21,7 @@ DESTDIR ?= $(BASEDIR)/bin BAKE_DEFINITIONS ?= -f docker-bake.hcl -f ../../common/packages.hcl export DOCKER_CLI_REPO := $(if $(DOCKER_CLI_REPO),$(DOCKER_CLI_REPO),https://github.com/docker/cli.git) -export DOCKER_CLI_REF := $(if $(DOCKER_CLI_REF),$(DOCKER_CLI_REF),master) +export DOCKER_CLI_REF := $(if $(DOCKER_CLI_REF),$(DOCKER_CLI_REF),23.0) export PKG_DEB_REVISION = 3 export PKG_RPM_RELEASE = 3 diff --git a/pkg/docker-cli/docker-bake.hcl b/pkg/docker-cli/docker-bake.hcl index 583c7685..f2fea56d 100644 --- a/pkg/docker-cli/docker-bake.hcl +++ b/pkg/docker-cli/docker-bake.hcl @@ -21,7 +21,7 @@ variable "DOCKER_CLI_REPO" { # Sets the docker cli ref. variable "DOCKER_CLI_REF" { - default = "master" + default = "23.0" } # set to 1 to enforce nightly build diff --git a/pkg/docker-engine/Makefile b/pkg/docker-engine/Makefile index 007f6925..6274b7c0 100644 --- a/pkg/docker-engine/Makefile +++ b/pkg/docker-engine/Makefile @@ -21,7 +21,7 @@ DESTDIR ?= $(BASEDIR)/bin BAKE_DEFINITIONS ?= -f docker-bake.hcl -f ../../common/packages.hcl export DOCKER_ENGINE_REPO := $(if $(DOCKER_ENGINE_REPO),$(DOCKER_ENGINE_REPO),https://github.com/docker/docker.git) -export DOCKER_ENGINE_REF := $(if $(DOCKER_ENGINE_REF),$(DOCKER_ENGINE_REF),master) +export DOCKER_ENGINE_REF := $(if $(DOCKER_ENGINE_REF),$(DOCKER_ENGINE_REF),23.0) export PKG_DEB_REVISION = 3 export PKG_RPM_RELEASE = 3 diff --git a/pkg/docker-engine/docker-bake.hcl b/pkg/docker-engine/docker-bake.hcl index a89f6cfa..eb74da97 100644 --- a/pkg/docker-engine/docker-bake.hcl +++ b/pkg/docker-engine/docker-bake.hcl @@ -21,7 +21,7 @@ variable "DOCKER_ENGINE_REPO" { # Sets the docker engine ref. variable "DOCKER_ENGINE_REF" { - default = "master" + default = "23.0" } # set to 1 to enforce nightly build From ef32532219262917795f27b3cf25cb0979bacfa9 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Thu, 30 Mar 2023 23:48:33 +0200 Subject: [PATCH 07/54] ci(build): branch restriction on pull request event Signed-off-by: CrazyMax (cherry picked from commit 981d1bc2deae4ecc06a69a2cec38d5d2be434082) --- .github/workflows/build-buildx.yml | 3 +++ .github/workflows/build-compose.yml | 3 +++ .github/workflows/build-containerd.yml | 3 +++ .github/workflows/build-credential-helpers.yml | 3 +++ .github/workflows/build-docker-cli.yml | 3 +++ .github/workflows/build-docker-engine.yml | 3 +++ .github/workflows/build-sbom.yml | 3 +++ .github/workflows/build-scan.yml | 3 +++ 8 files changed, 24 insertions(+) diff --git a/.github/workflows/build-buildx.yml b/.github/workflows/build-buildx.yml index 2e208a49..55b1c602 100644 --- a/.github/workflows/build-buildx.yml +++ b/.github/workflows/build-buildx.yml @@ -22,6 +22,9 @@ on: - 'common/**' - 'pkg/buildx/**' pull_request: + branches: + - 'main' + - 'buildx/[0-9]+.[0-9]+' paths: - '.github/workflows/.build.yml' - '.github/workflows/build-buildx.yml' diff --git a/.github/workflows/build-compose.yml b/.github/workflows/build-compose.yml index 669eb915..5e631578 100644 --- a/.github/workflows/build-compose.yml +++ b/.github/workflows/build-compose.yml @@ -22,6 +22,9 @@ on: - 'common/**' - 'pkg/compose/**' pull_request: + branches: + - 'main' + - 'compose/[0-9]+.[0-9]+' paths: - '.github/workflows/.build.yml' - '.github/workflows/build-compose.yml' diff --git a/.github/workflows/build-containerd.yml b/.github/workflows/build-containerd.yml index 4cf15b8e..b2503a23 100644 --- a/.github/workflows/build-containerd.yml +++ b/.github/workflows/build-containerd.yml @@ -22,6 +22,9 @@ on: - 'common/**' - 'pkg/containerd/**' pull_request: + branches: + - 'main' + - 'containerd/[0-9]+.[0-9]+' paths: - '.github/workflows/.build.yml' - '.github/workflows/build-containerd.yml' diff --git a/.github/workflows/build-credential-helpers.yml b/.github/workflows/build-credential-helpers.yml index 86e2348d..c70f4318 100644 --- a/.github/workflows/build-credential-helpers.yml +++ b/.github/workflows/build-credential-helpers.yml @@ -22,6 +22,9 @@ on: - 'common/**' - 'pkg/credential-helpers/**' pull_request: + branches: + - 'main' + - 'credential-helpers/[0-9]+.[0-9]+' paths: - '.github/workflows/.build.yml' - '.github/workflows/build-credential-helpers.yml' diff --git a/.github/workflows/build-docker-cli.yml b/.github/workflows/build-docker-cli.yml index 011ecf19..664845c5 100644 --- a/.github/workflows/build-docker-cli.yml +++ b/.github/workflows/build-docker-cli.yml @@ -22,6 +22,9 @@ on: - 'common/**' - 'pkg/docker-cli/**' pull_request: + branches: + - 'main' + - 'docker/[0-9]+.[0-9]+' paths: - '.github/workflows/.build.yml' - '.github/workflows/build-docker-cli.yml' diff --git a/.github/workflows/build-docker-engine.yml b/.github/workflows/build-docker-engine.yml index 0fe34839..1f0f3b64 100644 --- a/.github/workflows/build-docker-engine.yml +++ b/.github/workflows/build-docker-engine.yml @@ -22,6 +22,9 @@ on: - 'common/**' - 'pkg/docker-engine/**' pull_request: + branches: + - 'main' + - 'docker/[0-9]+.[0-9]+' paths: - '.github/workflows/.build.yml' - '.github/workflows/build-docker-engine.yml' diff --git a/.github/workflows/build-sbom.yml b/.github/workflows/build-sbom.yml index 6635c53f..04d39ea2 100644 --- a/.github/workflows/build-sbom.yml +++ b/.github/workflows/build-sbom.yml @@ -22,6 +22,9 @@ on: - 'common/**' - 'pkg/sbom/**' pull_request: + branches: + - 'main' + - 'sbom/[0-9]+.[0-9]+' paths: - '.github/workflows/.build.yml' - '.github/workflows/build-sbom.yml' diff --git a/.github/workflows/build-scan.yml b/.github/workflows/build-scan.yml index 993dac48..06e9fe21 100644 --- a/.github/workflows/build-scan.yml +++ b/.github/workflows/build-scan.yml @@ -22,6 +22,9 @@ on: - 'common/**' - 'pkg/scan/**' pull_request: + branches: + - 'main' + - 'scan/[0-9]+.[0-9]+' paths: - '.github/workflows/.build.yml' - '.github/workflows/build-scan.yml' From 68c9cb2d7a9914ba9c236ea9e1fdece8425951b5 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sat, 8 Apr 2023 07:18:29 +0200 Subject: [PATCH 08/54] pkg(docker-cli): remove scan plugin from recommends Signed-off-by: CrazyMax (cherry picked from commit 2b6509a1a1b3e8b3305ef819590ee4621c3f7525) --- pkg/docker-cli/deb/control | 4 +--- pkg/docker-cli/rpm/docker-ce-cli.spec | 13 ------------- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/pkg/docker-cli/deb/control b/pkg/docker-cli/deb/control index 2db67c24..ddd60c79 100644 --- a/pkg/docker-cli/deb/control +++ b/pkg/docker-cli/deb/control @@ -16,10 +16,8 @@ Build-Depends: bash, Package: docker-ce-cli Architecture: linux-any Depends: ${shlibs:Depends} -# TODO change once we support scan-plugin on other architectures Recommends: docker-buildx-plugin, - docker-compose-plugin, - docker-scan-plugin [amd64] + docker-compose-plugin Conflicts: docker (<< 1.5~), docker-engine, docker-engine-cs, diff --git a/pkg/docker-cli/rpm/docker-ce-cli.spec b/pkg/docker-cli/rpm/docker-ce-cli.spec index 5a22f0ae..3fab6249 100644 --- a/pkg/docker-cli/rpm/docker-ce-cli.spec +++ b/pkg/docker-cli/rpm/docker-ce-cli.spec @@ -27,19 +27,6 @@ Recommends: docker-buildx-plugin Recommends: docker-compose-plugin %endif -# TODO change once we support scan-plugin on other architectures -%ifarch x86_64 -# 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-scan-plugin(x86-64) -%else -Recommends: docker-scan-plugin(x86-64) -%endif -%endif - BuildRequires: gcc BuildRequires: libtool-ltdl-devel BuildRequires: make From 78b1ee2ff238396c7fec9eb9b9533a1cdbc9d6a2 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sat, 8 Apr 2023 07:27:11 +0200 Subject: [PATCH 09/54] pkg(docker-cli): bump Go to 1.19.8 Signed-off-by: CrazyMax --- pkg/docker-cli/Dockerfile | 2 +- pkg/docker-cli/Makefile | 2 +- pkg/docker-cli/docker-bake.hcl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/docker-cli/Dockerfile b/pkg/docker-cli/Dockerfile index f856f0e2..dce3d200 100644 --- a/pkg/docker-cli/Dockerfile +++ b/pkg/docker-cli/Dockerfile @@ -22,7 +22,7 @@ ARG GOVERSIONINFO_VERSION="v1.3.0" # common args ARG GO_IMAGE="golang" -ARG GO_VERSION="1.19.7" +ARG GO_VERSION="1.19.8" ARG GO_IMAGE_VARIANT="bullseye" ARG PKG_RELEASE="debian11" ARG PKG_TYPE="deb" diff --git a/pkg/docker-cli/Makefile b/pkg/docker-cli/Makefile index 6ae83abf..af72d1d4 100644 --- a/pkg/docker-cli/Makefile +++ b/pkg/docker-cli/Makefile @@ -15,7 +15,7 @@ include ../../common/vars.mk # https://github.com/docker/cli/blob/23.0/Dockerfile#L4 -export GO_VERSION = 1.19.7 +export GO_VERSION = 1.19.8 DESTDIR ?= $(BASEDIR)/bin BAKE_DEFINITIONS ?= -f docker-bake.hcl -f ../../common/packages.hcl diff --git a/pkg/docker-cli/docker-bake.hcl b/pkg/docker-cli/docker-bake.hcl index f2fea56d..69904ed0 100644 --- a/pkg/docker-cli/docker-bake.hcl +++ b/pkg/docker-cli/docker-bake.hcl @@ -34,7 +34,7 @@ variable "GO_IMAGE" { default = "golang" } variable "GO_VERSION" { - default = "1.19.7" + default = "1.19.8" } variable "GO_IMAGE_VARIANT" { default = "bullseye" From bc249bcabb4cb344e3b5f850141380afade538ed Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sat, 8 Apr 2023 07:27:18 +0200 Subject: [PATCH 10/54] pkg(docker-engine): bump Go to 1.19.8 Signed-off-by: CrazyMax --- pkg/docker-engine/Dockerfile | 2 +- pkg/docker-engine/Makefile | 2 +- pkg/docker-engine/docker-bake.hcl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/docker-engine/Dockerfile b/pkg/docker-engine/Dockerfile index a4f4f192..a19b816b 100644 --- a/pkg/docker-engine/Dockerfile +++ b/pkg/docker-engine/Dockerfile @@ -22,7 +22,7 @@ ARG GOWINRES_VERSION="v0.3.0" # common args ARG GO_IMAGE="golang" -ARG GO_VERSION="1.19.7" +ARG GO_VERSION="1.19.8" ARG GO_IMAGE_VARIANT="bullseye" ARG PKG_RELEASE="debian11" ARG PKG_TYPE="deb" diff --git a/pkg/docker-engine/Makefile b/pkg/docker-engine/Makefile index 6274b7c0..bb3c1d35 100644 --- a/pkg/docker-engine/Makefile +++ b/pkg/docker-engine/Makefile @@ -15,7 +15,7 @@ include ../../common/vars.mk # https://github.com/moby/moby/blob/23.0/Dockerfile#L3 -export GO_VERSION = 1.19.7 +export GO_VERSION = 1.19.8 DESTDIR ?= $(BASEDIR)/bin BAKE_DEFINITIONS ?= -f docker-bake.hcl -f ../../common/packages.hcl diff --git a/pkg/docker-engine/docker-bake.hcl b/pkg/docker-engine/docker-bake.hcl index eb74da97..1562db87 100644 --- a/pkg/docker-engine/docker-bake.hcl +++ b/pkg/docker-engine/docker-bake.hcl @@ -34,7 +34,7 @@ variable "GO_IMAGE" { default = "golang" } variable "GO_VERSION" { - default = "1.19.7" + default = "1.19.8" } variable "GO_IMAGE_VARIANT" { default = "bullseye" From 64b5eca52311afa80912fc6392dd9891676b57db Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sat, 8 Apr 2023 07:28:16 +0200 Subject: [PATCH 11/54] common: bump Go to 1.19.8 Signed-off-by: CrazyMax --- common/vars.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/vars.mk b/common/vars.mk index acb6d410..d40962e3 100644 --- a/common/vars.mk +++ b/common/vars.mk @@ -16,7 +16,7 @@ export BASEDIR ?= $(CURDIR) # go base image export GO_IMAGE ?= golang -export GO_VERSION ?= 1.19.2 +export GO_VERSION ?= 1.19.8 export GO_IMAGE_VARIANT ?= bullseye # if set, ony build matching the local platform From d6b55c0c36960f70620af8f6a96314398ea3242b Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sun, 12 Feb 2023 22:15:44 +0100 Subject: [PATCH 12/54] deb: add debian 12 bookworm Signed-off-by: CrazyMax (cherry picked from commit 03910a53c9c644e16e53ae13e94ef6b2e966ee52) --- Makefile | 2 +- common/packages.hcl | 10 ++++++++++ common/packages.mk | 10 +++++++++- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index f3e722dc..3a1b53a1 100644 --- a/Makefile +++ b/Makefile @@ -40,7 +40,7 @@ include common/packages.mk GHA_MATRIX ?= minimal ifeq ($(GHA_MATRIX),minimal) - GHA_RELEASES := debian10 debian11 ubuntu1804 ubuntu2004 ubuntu2204 centos7 centos9 oraclelinux7 fedora37 static + GHA_RELEASES := debian10 debian11 debian12 ubuntu1804 ubuntu2004 ubuntu2204 centos7 centos9 oraclelinux7 fedora37 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 1ff27c96..d55d7b2c 100644 --- a/common/packages.hcl +++ b/common/packages.hcl @@ -78,6 +78,16 @@ target "_pkg-debian11" { } } +target "_pkg-debian12" { + args = { + PKG_RELEASE = "debian12" + PKG_TYPE = "deb" + PKG_DISTRO = "debian" + PKG_SUITE = "bookworm" + PKG_BASE_IMAGE = "debian:bookworm" + } +} + target "_pkg-raspbian10" { args = { PKG_RELEASE = "raspbian10" diff --git a/common/packages.mk b/common/packages.mk index f94b306b..54cf325c 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 ubuntu1804 ubuntu2004 ubuntu2204 ubuntu2210 raspbian10 raspbian11 +PKG_DEB_RELEASES ?= debian10 debian11 debian12 ubuntu1804 ubuntu2004 ubuntu2204 ubuntu2210 raspbian10 raspbian11 PKG_RPM_RELEASES ?= centos7 centos8 centos9 fedora36 fedora37 oraclelinux7 oraclelinux8 oraclelinux9 # PKG_SUPPORTED_PLATFORMS could be replaced by: @@ -77,6 +77,14 @@ pkg-info-debian11: $(eval PKG_BASE_IMAGE = debian:bullseye) $(eval PKG_SUPPORTED_PLATFORMS = linux/386 linux/amd64 linux/arm64 linux/arm/v5 linux/arm/v6 linux/arm/v7 linux/mips64le linux/ppc64le linux/s390x) +.PHONY: pkg-info-debian12 +pkg-info-debian12: + $(eval PKG_TYPE = deb) + $(eval PKG_DISTRO = debian) + $(eval PKG_SUITE = bookworm) + $(eval PKG_BASE_IMAGE = debian:bookworm) + $(eval PKG_SUPPORTED_PLATFORMS = linux/386 linux/amd64 linux/arm64 linux/arm/v5 linux/arm/v6 linux/arm/v7 linux/mips64le linux/ppc64le linux/s390x) + .PHONY: pkg-info-raspbian10 pkg-info-raspbian10: $(eval PKG_TYPE = deb) From 7820b2803d3e5bd948613974d12c91178e8d1e03 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sun, 12 Feb 2023 22:18:44 +0100 Subject: [PATCH 13/54] deb: add raspbian 12 bookworm Signed-off-by: CrazyMax (cherry picked from commit 839d0ad9a71f7b1a4bc015478b098acc4ce2523b) --- common/packages.hcl | 10 ++++++++++ common/packages.mk | 10 +++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/common/packages.hcl b/common/packages.hcl index d55d7b2c..d0d26fe8 100644 --- a/common/packages.hcl +++ b/common/packages.hcl @@ -108,6 +108,16 @@ target "_pkg-raspbian11" { } } +target "_pkg-raspbian12" { + args = { + PKG_RELEASE = "raspbian12" + PKG_TYPE = "deb" + PKG_DISTRO = "raspbian" + PKG_SUITE = "bookworm" + PKG_BASE_IMAGE = "balenalib/rpi-raspbian:bookworm" + } +} + target "_pkg-ubuntu1804" { args = { PKG_RELEASE = "ubuntu1804" diff --git a/common/packages.mk b/common/packages.mk index 54cf325c..b4b8b72b 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 raspbian10 raspbian11 +PKG_DEB_RELEASES ?= debian10 debian11 debian12 ubuntu1804 ubuntu2004 ubuntu2204 ubuntu2210 raspbian10 raspbian11 raspbian12 PKG_RPM_RELEASES ?= centos7 centos8 centos9 fedora36 fedora37 oraclelinux7 oraclelinux8 oraclelinux9 # PKG_SUPPORTED_PLATFORMS could be replaced by: @@ -101,6 +101,14 @@ pkg-info-raspbian11: $(eval PKG_BASE_IMAGE = balenalib/rpi-raspbian:bullseye) $(eval PKG_SUPPORTED_PLATFORMS = linux/arm/v7) +.PHONY: pkg-info-raspbian12 +pkg-info-raspbian12: + $(eval PKG_TYPE = deb) + $(eval PKG_DISTRO = raspbian) + $(eval PKG_SUITE = bookworm) + $(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) From 30613e4b1e828dc49f07a6acac05f99b5335d22c Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sat, 8 Apr 2023 07:50:47 +0200 Subject: [PATCH 14/54] distro: add ubuntu 23.04 Signed-off-by: CrazyMax (cherry picked from commit 683a390e898df2febc129c0f474d82479511e958) --- Makefile | 2 +- common/packages.hcl | 10 ++++++++++ common/packages.mk | 11 ++++++++++- pkg/docker-cli/Dockerfile | 2 +- pkg/docker-engine/Dockerfile | 2 +- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 3a1b53a1..e8f2a64c 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 centos7 centos9 oraclelinux7 fedora37 static + GHA_RELEASES := debian10 debian11 debian12 ubuntu1804 ubuntu2004 ubuntu2204 ubuntu2304 centos7 centos9 oraclelinux7 fedora37 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 d0d26fe8..b1209f1f 100644 --- a/common/packages.hcl +++ b/common/packages.hcl @@ -158,6 +158,16 @@ target "_pkg-ubuntu2210" { } } +target "_pkg-ubuntu2304" { + args = { + PKG_RELEASE = "ubuntu2304" + PKG_TYPE = "deb" + PKG_DISTRO = "ubuntu" + PKG_SUITE = "lunar" + PKG_BASE_IMAGE = "ubuntu:lunar" + } +} + target "_pkg-centos7" { args = { PKG_RELEASE = "centos7" diff --git a/common/packages.mk b/common/packages.mk index b4b8b72b..cf80e655 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 raspbian10 raspbian11 raspbian12 +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_SUPPORTED_PLATFORMS could be replaced by: @@ -144,6 +144,15 @@ pkg-info-ubuntu2210: @# 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) + $(eval PKG_DISTRO = ubuntu) + $(eval PKG_SUITE = lunar) + $(eval PKG_BASE_IMAGE = ubuntu:lunar) + @# 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 dce3d200..4c760e16 100644 --- a/pkg/docker-cli/Dockerfile +++ b/pkg/docker-cli/Dockerfile @@ -95,7 +95,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends apt-utils bash RUN < Date: Sun, 9 Apr 2023 07:49:25 +0200 Subject: [PATCH 15/54] fix deb package version Signed-off-by: CrazyMax (cherry picked from commit c0099747d168cc061097bac23f144e1a6b002ca9) --- common/packages.hcl | 26 ++++++ common/packages.mk | 23 +++++ common/scripts/gen-deb-changelog.sh | 92 +++++++++++++++++++ pkg/buildx/Dockerfile | 4 + pkg/buildx/scripts/pkg-deb-build.sh | 7 +- pkg/buildx/scripts/pkg-rpm-build.sh | 1 + pkg/buildx/verify.Dockerfile | 3 + pkg/compose/Dockerfile | 4 + pkg/compose/scripts/pkg-deb-build.sh | 1 + pkg/compose/scripts/pkg-rpm-build.sh | 1 + pkg/compose/verify.Dockerfile | 3 + pkg/containerd/Dockerfile | 4 + pkg/containerd/scripts/pkg-deb-build.sh | 13 +-- pkg/containerd/scripts/pkg-rpm-build.sh | 1 + pkg/containerd/verify.Dockerfile | 3 + pkg/credential-helpers/Dockerfile | 4 + .../scripts/pkg-deb-build.sh | 7 +- .../scripts/pkg-rpm-build.sh | 1 + pkg/credential-helpers/verify.Dockerfile | 3 + pkg/docker-cli/Dockerfile | 4 + pkg/docker-cli/scripts/pkg-deb-build.sh | 7 +- pkg/docker-cli/scripts/pkg-rpm-build.sh | 1 + pkg/docker-cli/verify.Dockerfile | 3 + pkg/docker-engine/Dockerfile | 4 + pkg/docker-engine/scripts/pkg-deb-build.sh | 7 +- pkg/docker-engine/scripts/pkg-rpm-build.sh | 1 + pkg/docker-engine/verify.Dockerfile | 3 + pkg/sbom/Dockerfile | 4 + pkg/sbom/scripts/pkg-deb-build.sh | 7 +- pkg/sbom/scripts/pkg-rpm-build.sh | 1 + pkg/sbom/verify.Dockerfile | 3 + pkg/scan/Dockerfile | 4 + pkg/scan/scripts/pkg-deb-build.sh | 7 +- pkg/scan/scripts/pkg-rpm-build.sh | 1 + pkg/scan/verify.Dockerfile | 3 + 35 files changed, 220 insertions(+), 41 deletions(-) create mode 100755 common/scripts/gen-deb-changelog.sh diff --git a/common/packages.hcl b/common/packages.hcl index b1209f1f..cc54e2ae 100644 --- a/common/packages.hcl +++ b/common/packages.hcl @@ -21,6 +21,9 @@ variable "PKG_TYPE" { variable "PKG_DISTRO" { default = "" } +variable "PKG_ID" { + default = "" +} variable "PKG_SUITE" { default = "" } @@ -33,6 +36,7 @@ target "_pkg-alpine314" { PKG_RELEASE = "alpine314" PKG_TYPE = "apk" PKG_DISTRO = "alpine" + PKG_ID = "3.14" PKG_SUITE = "3.14" PKG_BASE_IMAGE = "alpine:3.14" } @@ -43,6 +47,7 @@ target "_pkg-alpine315" { PKG_RELEASE = "alpine315" PKG_TYPE = "apk" PKG_DISTRO = "alpine" + PKG_ID = "3.15" PKG_SUITE = "3.15" PKG_BASE_IMAGE = "alpine:3.15" } @@ -53,6 +58,7 @@ target "_pkg-alpine316" { PKG_RELEASE = "alpine316" PKG_TYPE = "apk" PKG_DISTRO = "alpine" + PKG_ID = "3.16" PKG_SUITE = "3.16" PKG_BASE_IMAGE = "alpine:3.16" } @@ -63,6 +69,7 @@ target "_pkg-debian10" { PKG_RELEASE = "debian10" PKG_TYPE = "deb" PKG_DISTRO = "debian" + PKG_ID = "10" PKG_SUITE = "buster" PKG_BASE_IMAGE = "debian:buster" } @@ -73,6 +80,7 @@ target "_pkg-debian11" { PKG_RELEASE = "debian11" PKG_TYPE = "deb" PKG_DISTRO = "debian" + PKG_ID = "11" PKG_SUITE = "bullseye" PKG_BASE_IMAGE = "debian:bullseye" } @@ -83,6 +91,7 @@ target "_pkg-debian12" { PKG_RELEASE = "debian12" PKG_TYPE = "deb" PKG_DISTRO = "debian" + PKG_ID = "12" PKG_SUITE = "bookworm" PKG_BASE_IMAGE = "debian:bookworm" } @@ -93,6 +102,7 @@ target "_pkg-raspbian10" { PKG_RELEASE = "raspbian10" PKG_TYPE = "deb" PKG_DISTRO = "raspbian" + PKG_ID = "10" PKG_SUITE = "buster" PKG_BASE_IMAGE = "balenalib/rpi-raspbian:buster" } @@ -103,6 +113,7 @@ target "_pkg-raspbian11" { PKG_RELEASE = "raspbian11" PKG_TYPE = "deb" PKG_DISTRO = "raspbian" + PKG_ID = "11" PKG_SUITE = "bullseye" PKG_BASE_IMAGE = "balenalib/rpi-raspbian:bullseye" } @@ -113,6 +124,7 @@ target "_pkg-raspbian12" { PKG_RELEASE = "raspbian12" PKG_TYPE = "deb" PKG_DISTRO = "raspbian" + PKG_ID = "12" PKG_SUITE = "bookworm" PKG_BASE_IMAGE = "balenalib/rpi-raspbian:bookworm" } @@ -123,6 +135,7 @@ target "_pkg-ubuntu1804" { PKG_RELEASE = "ubuntu1804" PKG_TYPE = "deb" PKG_DISTRO = "ubuntu" + PKG_ID = "18.04" PKG_SUITE = "bionic" PKG_BASE_IMAGE = "ubuntu:bionic" } @@ -133,6 +146,7 @@ target "_pkg-ubuntu2004" { PKG_RELEASE = "ubuntu2004" PKG_TYPE = "deb" PKG_DISTRO = "ubuntu" + PKG_ID = "20.04" PKG_SUITE = "focal" PKG_BASE_IMAGE = "ubuntu:focal" } @@ -143,6 +157,7 @@ target "_pkg-ubuntu2204" { PKG_RELEASE = "ubuntu2204" PKG_TYPE = "deb" PKG_DISTRO = "ubuntu" + PKG_ID = "22.04" PKG_SUITE = "jammy" PKG_BASE_IMAGE = "ubuntu:jammy" } @@ -153,6 +168,7 @@ target "_pkg-ubuntu2210" { PKG_RELEASE = "ubuntu2210" PKG_TYPE = "deb" PKG_DISTRO = "ubuntu" + PKG_ID = "22.10" PKG_SUITE = "kinetic" PKG_BASE_IMAGE = "ubuntu:kinetic" } @@ -163,6 +179,7 @@ target "_pkg-ubuntu2304" { PKG_RELEASE = "ubuntu2304" PKG_TYPE = "deb" PKG_DISTRO = "ubuntu" + PKG_ID = "23.04" PKG_SUITE = "lunar" PKG_BASE_IMAGE = "ubuntu:lunar" } @@ -173,6 +190,7 @@ target "_pkg-centos7" { PKG_RELEASE = "centos7" PKG_TYPE = "rpm" PKG_DISTRO = "centos" + PKG_ID = "7" PKG_SUITE = "7" PKG_BASE_IMAGE = "centos:7" } @@ -183,6 +201,7 @@ target "_pkg-centos8" { PKG_RELEASE = "centos8" PKG_TYPE = "rpm" PKG_DISTRO = "centos" + PKG_ID = "8" PKG_SUITE = "8" PKG_BASE_IMAGE = "quay.io/centos/centos:stream8" } @@ -193,6 +212,7 @@ target "_pkg-centos9" { PKG_RELEASE = "centos9" PKG_TYPE = "rpm" PKG_DISTRO = "centos" + PKG_ID = "9" PKG_SUITE = "9" PKG_BASE_IMAGE = "quay.io/centos/centos:stream9" } @@ -203,6 +223,7 @@ target "_pkg-fedora36" { PKG_RELEASE = "fedora36" PKG_TYPE = "rpm" PKG_DISTRO = "fedora" + PKG_ID = "36" PKG_SUITE = "36" PKG_BASE_IMAGE = "fedora:36" } @@ -213,6 +234,7 @@ target "_pkg-fedora37" { PKG_RELEASE = "fedora37" PKG_TYPE = "rpm" PKG_DISTRO = "fedora" + PKG_ID = "37" PKG_SUITE = "37" PKG_BASE_IMAGE = "fedora:37" } @@ -223,6 +245,7 @@ target "_pkg-oraclelinux7" { PKG_RELEASE = "oraclelinux7" PKG_TYPE = "rpm" PKG_DISTRO = "oraclelinux" + PKG_ID = "7" PKG_SUITE = "7" PKG_BASE_IMAGE = "oraclelinux:7" } @@ -233,6 +256,7 @@ target "_pkg-oraclelinux8" { PKG_RELEASE = "oraclelinux8" PKG_TYPE = "rpm" PKG_DISTRO = "oraclelinux" + PKG_ID = "8" PKG_SUITE = "8" PKG_BASE_IMAGE = "oraclelinux:8" } @@ -243,6 +267,7 @@ target "_pkg-oraclelinux9" { PKG_RELEASE = "oraclelinux9" PKG_TYPE = "rpm" PKG_DISTRO = "oraclelinux" + PKG_ID = "9" PKG_SUITE = "9" PKG_BASE_IMAGE = "oraclelinux:9" } @@ -253,6 +278,7 @@ target "_pkg-static" { PKG_RELEASE = "" PKG_TYPE = "static" PKG_DISTRO = "static" + PKG_ID = "" PKG_SUITE = "" PKG_BASE_IMAGE = "debian:bullseye" } diff --git a/common/packages.mk b/common/packages.mk index cf80e655..9e998742 100644 --- a/common/packages.mk +++ b/common/packages.mk @@ -41,6 +41,7 @@ pkg-static-releases: pkg-info-alpine314: $(eval PKG_TYPE = apk) $(eval PKG_DISTRO = alpine) + $(eval PKG_ID = 3.14) $(eval PKG_SUITE = 3.14) $(eval PKG_BASE_IMAGE = alpine:3.14) $(eval PKG_SUPPORTED_PLATFORMS = linux/386 linux/amd64 linux/arm64 linux/arm/v7 linux/arm/v6 linux/arm/v5 linux/ppc64le linux/s390x) @@ -49,6 +50,7 @@ pkg-info-alpine314: pkg-info-alpine315: $(eval PKG_TYPE = apk) $(eval PKG_DISTRO = alpine) + $(eval PKG_ID = 3.15) $(eval PKG_SUITE = 3.15) $(eval PKG_BASE_IMAGE = alpine:3.15) $(eval PKG_SUPPORTED_PLATFORMS = linux/386 linux/amd64 linux/arm64 linux/arm/v7 linux/arm/v6 linux/arm/v5 linux/ppc64le linux/s390x) @@ -57,6 +59,7 @@ pkg-info-alpine315: pkg-info-alpine316: $(eval PKG_TYPE = apk) $(eval PKG_DISTRO = alpine) + $(eval PKG_ID = 3.16) $(eval PKG_SUITE = 3.16) $(eval PKG_BASE_IMAGE = alpine:3.16) $(eval PKG_SUPPORTED_PLATFORMS = linux/386 linux/amd64 linux/arm64 linux/arm/v7 linux/arm/v6 linux/arm/v5 linux/ppc64le linux/s390x) @@ -65,6 +68,7 @@ pkg-info-alpine316: pkg-info-debian10: $(eval PKG_TYPE = deb) $(eval PKG_DISTRO = debian) + $(eval PKG_ID = 10) $(eval PKG_SUITE = buster) $(eval PKG_BASE_IMAGE = debian:buster) $(eval PKG_SUPPORTED_PLATFORMS = linux/386 linux/amd64 linux/arm64 linux/arm/v7) @@ -73,6 +77,7 @@ pkg-info-debian10: pkg-info-debian11: $(eval PKG_TYPE = deb) $(eval PKG_DISTRO = debian) + $(eval PKG_ID = 11) $(eval PKG_SUITE = bullseye) $(eval PKG_BASE_IMAGE = debian:bullseye) $(eval PKG_SUPPORTED_PLATFORMS = linux/386 linux/amd64 linux/arm64 linux/arm/v5 linux/arm/v6 linux/arm/v7 linux/mips64le linux/ppc64le linux/s390x) @@ -81,6 +86,7 @@ pkg-info-debian11: pkg-info-debian12: $(eval PKG_TYPE = deb) $(eval PKG_DISTRO = debian) + $(eval PKG_ID = 12) $(eval PKG_SUITE = bookworm) $(eval PKG_BASE_IMAGE = debian:bookworm) $(eval PKG_SUPPORTED_PLATFORMS = linux/386 linux/amd64 linux/arm64 linux/arm/v5 linux/arm/v6 linux/arm/v7 linux/mips64le linux/ppc64le linux/s390x) @@ -89,6 +95,7 @@ pkg-info-debian12: pkg-info-raspbian10: $(eval PKG_TYPE = deb) $(eval PKG_DISTRO = raspbian) + $(eval PKG_ID = 10) $(eval PKG_SUITE = buster) $(eval PKG_BASE_IMAGE = balenalib/rpi-raspbian:buster) $(eval PKG_SUPPORTED_PLATFORMS = linux/arm/v7) @@ -97,6 +104,7 @@ pkg-info-raspbian10: pkg-info-raspbian11: $(eval PKG_TYPE = deb) $(eval PKG_DISTRO = raspbian) + $(eval PKG_ID = 11) $(eval PKG_SUITE = bullseye) $(eval PKG_BASE_IMAGE = balenalib/rpi-raspbian:bullseye) $(eval PKG_SUPPORTED_PLATFORMS = linux/arm/v7) @@ -105,6 +113,7 @@ pkg-info-raspbian11: pkg-info-raspbian12: $(eval PKG_TYPE = deb) $(eval PKG_DISTRO = raspbian) + $(eval PKG_ID = 12) $(eval PKG_SUITE = bookworm) $(eval PKG_BASE_IMAGE = balenalib/rpi-raspbian:bookworm) $(eval PKG_SUPPORTED_PLATFORMS = linux/arm/v7) @@ -113,6 +122,7 @@ pkg-info-raspbian12: pkg-info-ubuntu1804: $(eval PKG_TYPE = deb) $(eval PKG_DISTRO = ubuntu) + $(eval PKG_ID = 18.04) $(eval PKG_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) @@ -121,6 +131,7 @@ pkg-info-ubuntu1804: pkg-info-ubuntu2004: $(eval PKG_TYPE = deb) $(eval PKG_DISTRO = ubuntu) + $(eval PKG_ID = 20.04) $(eval PKG_SUITE = focal) $(eval PKG_BASE_IMAGE = ubuntu:focal) @# FIXME: linux/riscv64 is not supported (golang base image does not support riscv64) @@ -130,6 +141,7 @@ pkg-info-ubuntu2004: pkg-info-ubuntu2204: $(eval PKG_TYPE = deb) $(eval PKG_DISTRO = ubuntu) + $(eval PKG_ID = 22.04) $(eval PKG_SUITE = jammy) $(eval PKG_BASE_IMAGE = ubuntu:jammy) @# FIXME: linux/riscv64 is not supported (golang base image does not support riscv64) @@ -139,6 +151,7 @@ pkg-info-ubuntu2204: pkg-info-ubuntu2210: $(eval PKG_TYPE = deb) $(eval PKG_DISTRO = ubuntu) + $(eval PKG_ID = 22.10) $(eval PKG_SUITE = kinetic) $(eval PKG_BASE_IMAGE = ubuntu:kinetic) @# FIXME: linux/riscv64 is not supported (golang base image does not support riscv64) @@ -148,6 +161,7 @@ pkg-info-ubuntu2210: pkg-info-ubuntu2304: $(eval PKG_TYPE = deb) $(eval PKG_DISTRO = ubuntu) + $(eval PKG_ID = 23.04) $(eval PKG_SUITE = lunar) $(eval PKG_BASE_IMAGE = ubuntu:lunar) @# FIXME: linux/riscv64 is not supported (golang base image does not support riscv64) @@ -157,6 +171,7 @@ pkg-info-ubuntu2304: pkg-info-centos7: $(eval PKG_TYPE = rpm) $(eval PKG_DISTRO = centos) + $(eval PKG_ID = 7) $(eval PKG_SUITE = 7) $(eval PKG_BASE_IMAGE = centos:7) @# FIXME: packages look broken for linux/arm/v7 on centos:7 @@ -166,6 +181,7 @@ pkg-info-centos7: pkg-info-centos8: $(eval PKG_TYPE = rpm) $(eval PKG_DISTRO = centos) + $(eval PKG_ID = 8) $(eval PKG_SUITE = 8) $(eval PKG_BASE_IMAGE = quay.io/centos/centos:stream8) $(eval PKG_SUPPORTED_PLATFORMS = linux/amd64 linux/arm64 linux/ppc64le) @@ -174,6 +190,7 @@ pkg-info-centos8: pkg-info-centos9: $(eval PKG_TYPE = rpm) $(eval PKG_DISTRO = centos) + $(eval PKG_ID = 9) $(eval PKG_SUITE = 9) $(eval PKG_BASE_IMAGE = quay.io/centos/centos:stream9) @# FIXME: packages look broken for linux/s390x on centos:stream9 @@ -183,6 +200,7 @@ pkg-info-centos9: pkg-info-fedora36: $(eval PKG_TYPE = rpm) $(eval PKG_DISTRO = fedora) + $(eval PKG_ID = 36) $(eval PKG_SUITE = 36) $(eval PKG_BASE_IMAGE = fedora:36) $(eval PKG_SUPPORTED_PLATFORMS = linux/amd64 linux/arm64 linux/ppc64le linux/s390x) @@ -191,6 +209,7 @@ pkg-info-fedora36: pkg-info-fedora37: $(eval PKG_TYPE = rpm) $(eval PKG_DISTRO = fedora) + $(eval PKG_ID = 37) $(eval PKG_SUITE = 37) $(eval PKG_BASE_IMAGE = fedora:37) $(eval PKG_SUPPORTED_PLATFORMS = linux/amd64 linux/arm64 linux/ppc64le linux/s390x) @@ -199,6 +218,7 @@ pkg-info-fedora37: pkg-info-oraclelinux7: $(eval PKG_TYPE = rpm) $(eval PKG_DISTRO = oraclelinux) + $(eval PKG_ID = 7) $(eval PKG_SUITE = 7) $(eval PKG_BASE_IMAGE = oraclelinux:7) $(eval PKG_SUPPORTED_PLATFORMS = linux/amd64 linux/arm64) @@ -207,6 +227,7 @@ pkg-info-oraclelinux7: pkg-info-oraclelinux8: $(eval PKG_TYPE = rpm) $(eval PKG_DISTRO = oraclelinux) + $(eval PKG_ID = 8) $(eval PKG_SUITE = 8) $(eval PKG_BASE_IMAGE = oraclelinux:8) $(eval PKG_SUPPORTED_PLATFORMS = linux/amd64 linux/arm64) @@ -215,6 +236,7 @@ pkg-info-oraclelinux8: pkg-info-oraclelinux9: $(eval PKG_TYPE = rpm) $(eval PKG_DISTRO = oraclelinux) + $(eval PKG_ID = 9) $(eval PKG_SUITE = 9) $(eval PKG_BASE_IMAGE = oraclelinux:9) $(eval PKG_SUPPORTED_PLATFORMS = linux/amd64 linux/arm64) @@ -223,6 +245,7 @@ pkg-info-oraclelinux9: pkg-info-static: $(eval PKG_TYPE = static) $(eval PKG_DISTRO = static) + $(eval PKG_ID =) $(eval PKG_SUITE =) $(eval PKG_BASE_IMAGE = debian:bullseye) $(eval PKG_SUPPORTED_PLATFORMS =) diff --git a/common/scripts/gen-deb-changelog.sh b/common/scripts/gen-deb-changelog.sh new file mode 100755 index 00000000..076ac6bc --- /dev/null +++ b/common/scripts/gen-deb-changelog.sh @@ -0,0 +1,92 @@ +#!/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. + +version="$1" +pkgVersion="$2" +pkgDistro="$3" +pkgId="$4" +pkgSuite="$5" +if [[ -z "$version" ]] || [[ -z "$pkgVersion" ]] || [[ -z "$pkgDistro" ]] || [[ -z "$pkgId" ]] || [[ -z "$pkgSuite" ]]; then + echo "usage: ./gen-deb-changelog [ ]" >&2 + exit 1 +fi +if [ ! -d "debian" ]; then + echo "This script should be run the root package" >&2 + exit 1 +fi + +# Include an extra `1` in the version, in case we ever would have to re-build an +# already published release with a packaging-only change. +pkgRevision=${6:-1} + +# This is a single (generally small) unsigned integer. It may be omitted, in +# which case zero is assumed. Epochs can help when the upstream version +# numbering scheme changes, but they must be used with care. You should not +# change the epoch, even in experimental, without getting consensus on +# debian-devel first. +pkgEpoch=${7:-} +pkgEpochSep="" +if [ -n "$pkgEpoch" ]; then + pkgEpochSep=":" +fi + +pkgSource="$(awk -F ': ' '$1 == "Source" { print $2; exit }' debian/control)" +pkgMaintainer="$(awk -F ': ' '$1 == "Maintainer" { print $2; exit }' debian/control)" +pkgDate="$(date --rfc-2822)" + +# Generate changelog. The version/name of the generated packages are based on this. +# +# Resulting packages are formatted as; +# +# - name of the package (e.g., "docker-ce") +# - version (e.g., "23.0.0~beta.0") +# - pkgRevision (usually "-0", see above), which allows updating packages with +# packaging-only changes (without a corresponding release of the software +# that's packaged). +# - distro (e.g., "ubuntu") +# - VERSION_ID (e.g. "22.04" or "11") this must be "sortable" to make sure that +# packages are upgraded when upgrading to a newer distro version ("codename" +# cannot be used for this, as they're not sorted) +# - SUITE ("codename"), e.g. "jammy" or "bullseye". This is mostly for convenience, +# because some places refer to distro versions by codename, others by version. +# we prefix the codename with a tilde (~), which effectively excludes it from +# version comparison. +# +# Note that while the `${EPOCH}${EPOCH_SEP}` is part of the version, it is not +# included in the package's *filename*. (And if you're wondering: we needed the +# EPOCH because of our use of CalVer, which made version comparing not work in +# some cases). +# +# Examples: +# +# docker-ce_23.0.0~beta.0-1~debian.11~bullseye_amd64.deb +# docker-ce_23.0.0~beta.0-1~ubuntu.22.04~jammy_amd64.deb + +if [[ -f "debian/changelog" ]] && [[ "${version}" != "v${pkgVersion}" ]]; then + cp "debian/changelog" "debian/changelog.or" +fi +if [[ ! -f "debian/changelog" ]] || [[ "${version}" != "v${pkgVersion}" ]]; then + cat > "debian/changelog" <<-EOF +$pkgSource (${pkgEpoch}${pkgEpochSep}${pkgVersion}-${pkgRevision}~${pkgDistro}.${pkgId}~${pkgSuite}) $pkgSuite; urgency=low + * Version: $version + -- $pkgMaintainer $pkgDate +EOF + # The space above at the start of the line for the pkgMaintainer is very important +fi +if [ -f "debian/changelog.or" ]; then + cat "debian/changelog.or" >> "debian/changelog" + rm "debian/changelog.or" +fi diff --git a/pkg/buildx/Dockerfile b/pkg/buildx/Dockerfile index 2923fc9a..4b62a341 100644 --- a/pkg/buildx/Dockerfile +++ b/pkg/buildx/Dockerfile @@ -24,6 +24,7 @@ ARG GO_IMAGE_VARIANT="bullseye" ARG PKG_RELEASE="debian11" ARG PKG_TYPE="deb" ARG PKG_DISTRO="debian" +ARG PKG_ID="11" ARG PKG_SUITE="bullseye" ARG PKG_BASE_IMAGE="debian:bullseye" @@ -95,6 +96,7 @@ ARG BUILDX_REF ARG NIGHTLY_BUILD ARG PKG_NAME ARG PKG_DISTRO +ARG PKG_ID ARG PKG_SUITE ARG PKG_PACKAGER ARG PKG_DEB_BUILDFLAGS @@ -103,6 +105,7 @@ ARG PKG_DEB_EPOCH ARG SOURCE_DATE_EPOCH RUN --mount=type=bind,source=scripts/pkg-deb-build.sh,target=/usr/local/bin/pkg-deb-build \ --mount=type=bind,from=common-scripts,source=gen-ver.sh,target=/usr/local/bin/gen-ver \ + --mount=type=bind,from=common-scripts,source=gen-deb-changelog.sh,target=/usr/local/bin/gen-deb-changelog \ --mount=type=bind,from=common-scripts,source=fix-cc.sh,target=/usr/local/bin/fix-cc \ --mount=type=bind,from=src,source=/src,target=/root/package/buildx,rw \ --mount=type=bind,from=go,source=/usr/local/go,target=/usr/local/go \ @@ -140,6 +143,7 @@ ARG BUILDX_REF ARG NIGHTLY_BUILD ARG PKG_NAME ARG PKG_DISTRO +ARG PKG_ID ARG PKG_SUITE ARG PKG_PACKAGER ARG PKG_RPM_BUILDFLAGS diff --git a/pkg/buildx/scripts/pkg-deb-build.sh b/pkg/buildx/scripts/pkg-deb-build.sh index d7bccebd..bd45adf2 100755 --- a/pkg/buildx/scripts/pkg-deb-build.sh +++ b/pkg/buildx/scripts/pkg-deb-build.sh @@ -19,6 +19,7 @@ : "${PKG_NAME=}" : "${PKG_RELEASE=}" : "${PKG_DISTRO=}" +: "${PKG_ID=}" : "${PKG_SUITE=}" : "${PKG_PACKAGER=}" : "${PKG_VENDOR=}" @@ -55,11 +56,7 @@ done xx-go --wrap fix-cc -cat > "debian/changelog" <<-EOF -${PKG_NAME} (${PKG_DEB_EPOCH}$([ -n "$PKG_DEB_EPOCH" ] && echo ":")${GENVER_PKG_VERSION}-${PKG_DEB_REVISION}) $PKG_SUITE; urgency=low - * Version: $GENVER_VERSION - -- $(awk -F ': ' '$1 == "Maintainer" { print $2; exit }' debian/control) $(date --rfc-2822) -EOF +gen-deb-changelog "$GENVER_VERSION" "$GENVER_PKG_VERSION" "$PKG_DISTRO" "$PKG_ID" "$PKG_SUITE" "$PKG_DEB_REVISION" "$PKG_DEB_EPOCH" pkgoutput="${OUTDIR}/${PKG_DISTRO}/${PKG_SUITE}/$(xx-info arch)" if [ -n "$(xx-info variant)" ]; then diff --git a/pkg/buildx/scripts/pkg-rpm-build.sh b/pkg/buildx/scripts/pkg-rpm-build.sh index fa6dd9ab..19e10b06 100755 --- a/pkg/buildx/scripts/pkg-rpm-build.sh +++ b/pkg/buildx/scripts/pkg-rpm-build.sh @@ -19,6 +19,7 @@ : "${PKG_NAME=}" : "${PKG_RELEASE=}" : "${PKG_DISTRO=}" +: "${PKG_ID=}" : "${PKG_SUITE=}" : "${PKG_PACKAGER=}" : "${PKG_VENDOR=}" diff --git a/pkg/buildx/verify.Dockerfile b/pkg/buildx/verify.Dockerfile index 1f57470b..d2387792 100644 --- a/pkg/buildx/verify.Dockerfile +++ b/pkg/buildx/verify.Dockerfile @@ -29,6 +29,7 @@ FROM ${PKG_BASE_IMAGE} AS verify-deb RUN apt-get update COPY --from=xx / / ARG PKG_DISTRO +ARG PKG_ID ARG PKG_SUITE ARG TARGETPLATFORM RUN --mount=from=bin-folder,target=/build < "debian/changelog.or" - cat > "debian/changelog" <<-EOF -${PKG_NAME} (${PKG_DEB_EPOCH}$([ -n "$PKG_DEB_EPOCH" ] && echo ":")${GENVER_PKG_VERSION}-${PKG_DEB_REVISION}) $PKG_SUITE; urgency=low - * Version: ${GENVER_VERSION} - -- $(awk -F ': ' '$1 == "Maintainer" { print $2; exit }' debian/control) $(date --rfc-2822) - -EOF - cat "debian/changelog.or" >> "debian/changelog" - rm "debian/changelog.or" -fi +gen-deb-changelog "$GENVER_VERSION" "$GENVER_PKG_VERSION" "$PKG_DISTRO" "$PKG_ID" "$PKG_SUITE" "$PKG_DEB_REVISION" "$PKG_DEB_EPOCH" pkgoutput="${OUTDIR}/${PKG_DISTRO}/${PKG_SUITE}/$(xx-info arch)" if [ -n "$(xx-info variant)" ]; then diff --git a/pkg/containerd/scripts/pkg-rpm-build.sh b/pkg/containerd/scripts/pkg-rpm-build.sh index 0eba3a45..957c196e 100755 --- a/pkg/containerd/scripts/pkg-rpm-build.sh +++ b/pkg/containerd/scripts/pkg-rpm-build.sh @@ -19,6 +19,7 @@ : "${PKG_NAME=}" : "${PKG_RELEASE=}" : "${PKG_DISTRO=}" +: "${PKG_ID=}" : "${PKG_SUITE=}" : "${PKG_PACKAGER=}" : "${PKG_VENDOR=}" diff --git a/pkg/containerd/verify.Dockerfile b/pkg/containerd/verify.Dockerfile index f43328c3..03661e55 100644 --- a/pkg/containerd/verify.Dockerfile +++ b/pkg/containerd/verify.Dockerfile @@ -29,6 +29,7 @@ FROM ${PKG_BASE_IMAGE} AS verify-deb RUN apt-get update COPY --from=xx / / ARG PKG_DISTRO +ARG PKG_ID ARG PKG_SUITE ARG TARGETPLATFORM RUN --mount=from=bin-folder,target=/build < "debian/changelog" <<-EOF -${PKG_NAME} (${PKG_DEB_EPOCH}$([ -n "$PKG_DEB_EPOCH" ] && echo ":")${GENVER_PKG_VERSION}-${PKG_DEB_REVISION}) $PKG_SUITE; urgency=low - * Version: ${GENVER_VERSION} - -- $(awk -F ': ' '$1 == "Maintainer" { print $2; exit }' debian/control) $(date --rfc-2822) -EOF +gen-deb-changelog "$GENVER_VERSION" "$GENVER_PKG_VERSION" "$PKG_DISTRO" "$PKG_ID" "$PKG_SUITE" "$PKG_DEB_REVISION" "$PKG_DEB_EPOCH" xx-go --wrap fix-cc diff --git a/pkg/credential-helpers/scripts/pkg-rpm-build.sh b/pkg/credential-helpers/scripts/pkg-rpm-build.sh index f2a1ea68..a9d796c9 100755 --- a/pkg/credential-helpers/scripts/pkg-rpm-build.sh +++ b/pkg/credential-helpers/scripts/pkg-rpm-build.sh @@ -19,6 +19,7 @@ : "${PKG_NAME=}" : "${PKG_RELEASE=}" : "${PKG_DISTRO=}" +: "${PKG_ID=}" : "${PKG_SUITE=}" : "${PKG_PACKAGER=}" : "${PKG_VENDOR=}" diff --git a/pkg/credential-helpers/verify.Dockerfile b/pkg/credential-helpers/verify.Dockerfile index 2a65b710..5549e1e4 100644 --- a/pkg/credential-helpers/verify.Dockerfile +++ b/pkg/credential-helpers/verify.Dockerfile @@ -29,6 +29,7 @@ FROM ${PKG_BASE_IMAGE} AS verify-deb RUN apt-get update COPY --from=xx / / ARG PKG_DISTRO +ARG PKG_ID ARG PKG_SUITE ARG TARGETPLATFORM RUN --mount=from=bin-folder,target=/build < "debian/changelog" <<-EOF -${PKG_NAME} (${PKG_DEB_EPOCH}$([ -n "$PKG_DEB_EPOCH" ] && echo ":")${GENVER_PKG_VERSION}-${PKG_DEB_REVISION}) $PKG_SUITE; urgency=low - * Version: ${GENVER_VERSION} - -- $(awk -F ': ' '$1 == "Maintainer" { print $2; exit }' debian/control) $(date --rfc-2822) -EOF +gen-deb-changelog "$GENVER_VERSION" "$GENVER_PKG_VERSION" "$PKG_DISTRO" "$PKG_ID" "$PKG_SUITE" "$PKG_DEB_REVISION" "$PKG_DEB_EPOCH" xx-go --wrap fix-cc diff --git a/pkg/docker-cli/scripts/pkg-rpm-build.sh b/pkg/docker-cli/scripts/pkg-rpm-build.sh index fa6dd9ab..19e10b06 100755 --- a/pkg/docker-cli/scripts/pkg-rpm-build.sh +++ b/pkg/docker-cli/scripts/pkg-rpm-build.sh @@ -19,6 +19,7 @@ : "${PKG_NAME=}" : "${PKG_RELEASE=}" : "${PKG_DISTRO=}" +: "${PKG_ID=}" : "${PKG_SUITE=}" : "${PKG_PACKAGER=}" : "${PKG_VENDOR=}" diff --git a/pkg/docker-cli/verify.Dockerfile b/pkg/docker-cli/verify.Dockerfile index c13ecb58..49615a17 100644 --- a/pkg/docker-cli/verify.Dockerfile +++ b/pkg/docker-cli/verify.Dockerfile @@ -29,6 +29,7 @@ FROM ${PKG_BASE_IMAGE} AS verify-deb RUN apt-get update COPY --from=xx / / ARG PKG_DISTRO +ARG PKG_ID ARG PKG_SUITE ARG TARGETPLATFORM RUN --mount=from=bin-folder,target=/build < "debian/changelog" <<-EOF -${PKG_NAME} (${PKG_DEB_EPOCH}$([ -n "$PKG_DEB_EPOCH" ] && echo ":")${GENVER_PKG_VERSION}-${PKG_DEB_REVISION}) $PKG_SUITE; urgency=low - * Version: ${GENVER_VERSION} - -- $(awk -F ': ' '$1 == "Maintainer" { print $2; exit }' debian/control) $(date --rfc-2822) -EOF +gen-deb-changelog "$GENVER_VERSION" "$GENVER_PKG_VERSION" "$PKG_DISTRO" "$PKG_ID" "$PKG_SUITE" "$PKG_DEB_REVISION" "$PKG_DEB_EPOCH" pkgoutput="${OUTDIR}/${PKG_DISTRO}/${PKG_SUITE}/$(xx-info arch)" if [ -n "$(xx-info variant)" ]; then diff --git a/pkg/docker-engine/scripts/pkg-rpm-build.sh b/pkg/docker-engine/scripts/pkg-rpm-build.sh index a0c4b77b..f11038c3 100755 --- a/pkg/docker-engine/scripts/pkg-rpm-build.sh +++ b/pkg/docker-engine/scripts/pkg-rpm-build.sh @@ -19,6 +19,7 @@ : "${PKG_NAME=}" : "${PKG_RELEASE=}" : "${PKG_DISTRO=}" +: "${PKG_ID=}" : "${PKG_SUITE=}" : "${PKG_PACKAGER=}" : "${PKG_VENDOR=}" diff --git a/pkg/docker-engine/verify.Dockerfile b/pkg/docker-engine/verify.Dockerfile index 8c50f35b..eff8cfcd 100644 --- a/pkg/docker-engine/verify.Dockerfile +++ b/pkg/docker-engine/verify.Dockerfile @@ -29,6 +29,7 @@ FROM ${PKG_BASE_IMAGE} AS verify-deb RUN apt-get update && apt-get install -y --no-install-recommends libdevmapper-dev COPY --from=xx / / ARG PKG_DISTRO +ARG PKG_ID ARG PKG_SUITE ARG TARGETPLATFORM RUN --mount=from=bin-folder,target=/build <"debian/changelog" <<-EOF -${PKG_NAME} (${PKG_DEB_EPOCH}$([ -n "$PKG_DEB_EPOCH" ] && echo ":")${GENVER_PKG_VERSION}-${PKG_DEB_REVISION}) $PKG_SUITE; urgency=low - * Version: ${GENVER_VERSION} - -- $(awk -F ': ' '$1 == "Maintainer" { print $2; exit }' debian/control) $(date --rfc-2822) -EOF +gen-deb-changelog "$GENVER_VERSION" "$GENVER_PKG_VERSION" "$PKG_DISTRO" "$PKG_ID" "$PKG_SUITE" "$PKG_DEB_REVISION" "$PKG_DEB_EPOCH" pkgoutput="${OUTDIR}/${PKG_DISTRO}/${PKG_SUITE}/$(xx-info arch)" if [ -n "$(xx-info variant)" ]; then diff --git a/pkg/sbom/scripts/pkg-rpm-build.sh b/pkg/sbom/scripts/pkg-rpm-build.sh index 10b98064..be273249 100755 --- a/pkg/sbom/scripts/pkg-rpm-build.sh +++ b/pkg/sbom/scripts/pkg-rpm-build.sh @@ -19,6 +19,7 @@ : "${PKG_NAME=}" : "${PKG_RELEASE=}" : "${PKG_DISTRO=}" +: "${PKG_ID=}" : "${PKG_SUITE=}" : "${PKG_PACKAGER=}" : "${PKG_VENDOR=}" diff --git a/pkg/sbom/verify.Dockerfile b/pkg/sbom/verify.Dockerfile index b9ddba0a..d43f02bf 100644 --- a/pkg/sbom/verify.Dockerfile +++ b/pkg/sbom/verify.Dockerfile @@ -29,6 +29,7 @@ FROM ${PKG_BASE_IMAGE} AS verify-deb RUN apt-get update COPY --from=xx / / ARG PKG_DISTRO +ARG PKG_ID ARG PKG_SUITE ARG TARGETPLATFORM RUN --mount=from=bin-folder,target=/build <"debian/changelog" <<-EOF -${PKG_NAME} (${PKG_DEB_EPOCH}$([ -n "$PKG_DEB_EPOCH" ] && echo ":")${GENVER_PKG_VERSION}-${PKG_DEB_REVISION}) $PKG_SUITE; urgency=low - * Version: ${GENVER_VERSION} - -- $(awk -F ': ' '$1 == "Maintainer" { print $2; exit }' debian/control) $(date --rfc-2822) -EOF +gen-deb-changelog "$GENVER_VERSION" "$GENVER_PKG_VERSION" "$PKG_DISTRO" "$PKG_ID" "$PKG_SUITE" "$PKG_DEB_REVISION" "$PKG_DEB_EPOCH" pkgoutput="${OUTDIR}/${PKG_DISTRO}/${PKG_SUITE}/$(xx-info arch)" if [ -n "$(xx-info variant)" ]; then diff --git a/pkg/scan/scripts/pkg-rpm-build.sh b/pkg/scan/scripts/pkg-rpm-build.sh index fa6dd9ab..19e10b06 100755 --- a/pkg/scan/scripts/pkg-rpm-build.sh +++ b/pkg/scan/scripts/pkg-rpm-build.sh @@ -19,6 +19,7 @@ : "${PKG_NAME=}" : "${PKG_RELEASE=}" : "${PKG_DISTRO=}" +: "${PKG_ID=}" : "${PKG_SUITE=}" : "${PKG_PACKAGER=}" : "${PKG_VENDOR=}" diff --git a/pkg/scan/verify.Dockerfile b/pkg/scan/verify.Dockerfile index f25da2dd..451992d8 100644 --- a/pkg/scan/verify.Dockerfile +++ b/pkg/scan/verify.Dockerfile @@ -29,6 +29,7 @@ FROM ${PKG_BASE_IMAGE} AS verify-deb RUN apt-get update COPY --from=xx / / ARG PKG_DISTRO +ARG PKG_ID ARG PKG_SUITE ARG TARGETPLATFORM RUN --mount=from=bin-folder,target=/build < Date: Sun, 9 Apr 2023 12:19:00 +0200 Subject: [PATCH 16/54] rename PKG_ID and PKG_SUITE vars Signed-off-by: CrazyMax (cherry picked from commit 6ef74cac4b6e6de54ee694e5f369b551096fc085) --- common/packages.hcl | 96 +++++++++---------- common/packages.mk | 92 +++++++++--------- common/scripts/gen-deb-changelog.sh | 10 +- pkg/buildx/Dockerfile | 12 +-- pkg/buildx/scripts/pkg-deb-build.sh | 8 +- pkg/buildx/scripts/pkg-rpm-build.sh | 6 +- pkg/buildx/verify.Dockerfile | 16 ++-- pkg/compose/Dockerfile | 12 +-- pkg/compose/scripts/pkg-deb-build.sh | 8 +- pkg/compose/scripts/pkg-rpm-build.sh | 6 +- pkg/compose/verify.Dockerfile | 16 ++-- pkg/containerd/Dockerfile | 12 +-- pkg/containerd/scripts/pkg-deb-build.sh | 8 +- pkg/containerd/scripts/pkg-rpm-build.sh | 6 +- pkg/containerd/verify.Dockerfile | 16 ++-- pkg/credential-helpers/Dockerfile | 12 +-- .../scripts/pkg-deb-build.sh | 8 +- .../scripts/pkg-rpm-build.sh | 6 +- pkg/credential-helpers/verify.Dockerfile | 16 ++-- pkg/docker-cli/Dockerfile | 12 +-- pkg/docker-cli/scripts/pkg-deb-build.sh | 8 +- pkg/docker-cli/scripts/pkg-rpm-build.sh | 6 +- pkg/docker-cli/verify.Dockerfile | 16 ++-- pkg/docker-engine/Dockerfile | 12 +-- pkg/docker-engine/scripts/pkg-deb-build.sh | 8 +- pkg/docker-engine/scripts/pkg-rpm-build.sh | 6 +- pkg/docker-engine/verify.Dockerfile | 16 ++-- pkg/sbom/Dockerfile | 12 +-- pkg/sbom/scripts/pkg-deb-build.sh | 8 +- pkg/sbom/scripts/pkg-rpm-build.sh | 6 +- pkg/sbom/verify.Dockerfile | 16 ++-- pkg/scan/Dockerfile | 12 +-- pkg/scan/scripts/pkg-deb-build.sh | 8 +- pkg/scan/scripts/pkg-rpm-build.sh | 6 +- pkg/scan/verify.Dockerfile | 16 ++-- 35 files changed, 267 insertions(+), 267 deletions(-) diff --git a/common/packages.hcl b/common/packages.hcl index cc54e2ae..02f68007 100644 --- a/common/packages.hcl +++ b/common/packages.hcl @@ -21,10 +21,10 @@ variable "PKG_TYPE" { variable "PKG_DISTRO" { default = "" } -variable "PKG_ID" { +variable "PKG_DISTRO_ID" { default = "" } -variable "PKG_SUITE" { +variable "PKG_DISTRO_SUITE" { default = "" } variable "PKG_BASE_IMAGE" { @@ -36,8 +36,8 @@ target "_pkg-alpine314" { PKG_RELEASE = "alpine314" PKG_TYPE = "apk" PKG_DISTRO = "alpine" - PKG_ID = "3.14" - PKG_SUITE = "3.14" + PKG_DISTRO_ID = "3.14" + PKG_DISTRO_SUITE = "3.14" PKG_BASE_IMAGE = "alpine:3.14" } } @@ -47,8 +47,8 @@ target "_pkg-alpine315" { PKG_RELEASE = "alpine315" PKG_TYPE = "apk" PKG_DISTRO = "alpine" - PKG_ID = "3.15" - PKG_SUITE = "3.15" + PKG_DISTRO_ID = "3.15" + PKG_DISTRO_SUITE = "3.15" PKG_BASE_IMAGE = "alpine:3.15" } } @@ -58,8 +58,8 @@ target "_pkg-alpine316" { PKG_RELEASE = "alpine316" PKG_TYPE = "apk" PKG_DISTRO = "alpine" - PKG_ID = "3.16" - PKG_SUITE = "3.16" + PKG_DISTRO_ID = "3.16" + PKG_DISTRO_SUITE = "3.16" PKG_BASE_IMAGE = "alpine:3.16" } } @@ -69,8 +69,8 @@ target "_pkg-debian10" { PKG_RELEASE = "debian10" PKG_TYPE = "deb" PKG_DISTRO = "debian" - PKG_ID = "10" - PKG_SUITE = "buster" + PKG_DISTRO_ID = "10" + PKG_DISTRO_SUITE = "buster" PKG_BASE_IMAGE = "debian:buster" } } @@ -80,8 +80,8 @@ target "_pkg-debian11" { PKG_RELEASE = "debian11" PKG_TYPE = "deb" PKG_DISTRO = "debian" - PKG_ID = "11" - PKG_SUITE = "bullseye" + PKG_DISTRO_ID = "11" + PKG_DISTRO_SUITE = "bullseye" PKG_BASE_IMAGE = "debian:bullseye" } } @@ -91,8 +91,8 @@ target "_pkg-debian12" { PKG_RELEASE = "debian12" PKG_TYPE = "deb" PKG_DISTRO = "debian" - PKG_ID = "12" - PKG_SUITE = "bookworm" + PKG_DISTRO_ID = "12" + PKG_DISTRO_SUITE = "bookworm" PKG_BASE_IMAGE = "debian:bookworm" } } @@ -102,8 +102,8 @@ target "_pkg-raspbian10" { PKG_RELEASE = "raspbian10" PKG_TYPE = "deb" PKG_DISTRO = "raspbian" - PKG_ID = "10" - PKG_SUITE = "buster" + PKG_DISTRO_ID = "10" + PKG_DISTRO_SUITE = "buster" PKG_BASE_IMAGE = "balenalib/rpi-raspbian:buster" } } @@ -113,8 +113,8 @@ target "_pkg-raspbian11" { PKG_RELEASE = "raspbian11" PKG_TYPE = "deb" PKG_DISTRO = "raspbian" - PKG_ID = "11" - PKG_SUITE = "bullseye" + PKG_DISTRO_ID = "11" + PKG_DISTRO_SUITE = "bullseye" PKG_BASE_IMAGE = "balenalib/rpi-raspbian:bullseye" } } @@ -124,8 +124,8 @@ target "_pkg-raspbian12" { PKG_RELEASE = "raspbian12" PKG_TYPE = "deb" PKG_DISTRO = "raspbian" - PKG_ID = "12" - PKG_SUITE = "bookworm" + PKG_DISTRO_ID = "12" + PKG_DISTRO_SUITE = "bookworm" PKG_BASE_IMAGE = "balenalib/rpi-raspbian:bookworm" } } @@ -135,8 +135,8 @@ target "_pkg-ubuntu1804" { PKG_RELEASE = "ubuntu1804" PKG_TYPE = "deb" PKG_DISTRO = "ubuntu" - PKG_ID = "18.04" - PKG_SUITE = "bionic" + PKG_DISTRO_ID = "18.04" + PKG_DISTRO_SUITE = "bionic" PKG_BASE_IMAGE = "ubuntu:bionic" } } @@ -146,8 +146,8 @@ target "_pkg-ubuntu2004" { PKG_RELEASE = "ubuntu2004" PKG_TYPE = "deb" PKG_DISTRO = "ubuntu" - PKG_ID = "20.04" - PKG_SUITE = "focal" + PKG_DISTRO_ID = "20.04" + PKG_DISTRO_SUITE = "focal" PKG_BASE_IMAGE = "ubuntu:focal" } } @@ -157,8 +157,8 @@ target "_pkg-ubuntu2204" { PKG_RELEASE = "ubuntu2204" PKG_TYPE = "deb" PKG_DISTRO = "ubuntu" - PKG_ID = "22.04" - PKG_SUITE = "jammy" + PKG_DISTRO_ID = "22.04" + PKG_DISTRO_SUITE = "jammy" PKG_BASE_IMAGE = "ubuntu:jammy" } } @@ -168,8 +168,8 @@ target "_pkg-ubuntu2210" { PKG_RELEASE = "ubuntu2210" PKG_TYPE = "deb" PKG_DISTRO = "ubuntu" - PKG_ID = "22.10" - PKG_SUITE = "kinetic" + PKG_DISTRO_ID = "22.10" + PKG_DISTRO_SUITE = "kinetic" PKG_BASE_IMAGE = "ubuntu:kinetic" } } @@ -179,8 +179,8 @@ target "_pkg-ubuntu2304" { PKG_RELEASE = "ubuntu2304" PKG_TYPE = "deb" PKG_DISTRO = "ubuntu" - PKG_ID = "23.04" - PKG_SUITE = "lunar" + PKG_DISTRO_ID = "23.04" + PKG_DISTRO_SUITE = "lunar" PKG_BASE_IMAGE = "ubuntu:lunar" } } @@ -190,8 +190,8 @@ target "_pkg-centos7" { PKG_RELEASE = "centos7" PKG_TYPE = "rpm" PKG_DISTRO = "centos" - PKG_ID = "7" - PKG_SUITE = "7" + PKG_DISTRO_ID = "7" + PKG_DISTRO_SUITE = "7" PKG_BASE_IMAGE = "centos:7" } } @@ -201,8 +201,8 @@ target "_pkg-centos8" { PKG_RELEASE = "centos8" PKG_TYPE = "rpm" PKG_DISTRO = "centos" - PKG_ID = "8" - PKG_SUITE = "8" + PKG_DISTRO_ID = "8" + PKG_DISTRO_SUITE = "8" PKG_BASE_IMAGE = "quay.io/centos/centos:stream8" } } @@ -212,8 +212,8 @@ target "_pkg-centos9" { PKG_RELEASE = "centos9" PKG_TYPE = "rpm" PKG_DISTRO = "centos" - PKG_ID = "9" - PKG_SUITE = "9" + PKG_DISTRO_ID = "9" + PKG_DISTRO_SUITE = "9" PKG_BASE_IMAGE = "quay.io/centos/centos:stream9" } } @@ -223,8 +223,8 @@ target "_pkg-fedora36" { PKG_RELEASE = "fedora36" PKG_TYPE = "rpm" PKG_DISTRO = "fedora" - PKG_ID = "36" - PKG_SUITE = "36" + PKG_DISTRO_ID = "36" + PKG_DISTRO_SUITE = "36" PKG_BASE_IMAGE = "fedora:36" } } @@ -234,8 +234,8 @@ target "_pkg-fedora37" { PKG_RELEASE = "fedora37" PKG_TYPE = "rpm" PKG_DISTRO = "fedora" - PKG_ID = "37" - PKG_SUITE = "37" + PKG_DISTRO_ID = "37" + PKG_DISTRO_SUITE = "37" PKG_BASE_IMAGE = "fedora:37" } } @@ -245,8 +245,8 @@ target "_pkg-oraclelinux7" { PKG_RELEASE = "oraclelinux7" PKG_TYPE = "rpm" PKG_DISTRO = "oraclelinux" - PKG_ID = "7" - PKG_SUITE = "7" + PKG_DISTRO_ID = "7" + PKG_DISTRO_SUITE = "7" PKG_BASE_IMAGE = "oraclelinux:7" } } @@ -256,8 +256,8 @@ target "_pkg-oraclelinux8" { PKG_RELEASE = "oraclelinux8" PKG_TYPE = "rpm" PKG_DISTRO = "oraclelinux" - PKG_ID = "8" - PKG_SUITE = "8" + PKG_DISTRO_ID = "8" + PKG_DISTRO_SUITE = "8" PKG_BASE_IMAGE = "oraclelinux:8" } } @@ -267,8 +267,8 @@ target "_pkg-oraclelinux9" { PKG_RELEASE = "oraclelinux9" PKG_TYPE = "rpm" PKG_DISTRO = "oraclelinux" - PKG_ID = "9" - PKG_SUITE = "9" + PKG_DISTRO_ID = "9" + PKG_DISTRO_SUITE = "9" PKG_BASE_IMAGE = "oraclelinux:9" } } @@ -278,8 +278,8 @@ target "_pkg-static" { PKG_RELEASE = "" PKG_TYPE = "static" PKG_DISTRO = "static" - PKG_ID = "" - PKG_SUITE = "" + PKG_DISTRO_ID = "" + PKG_DISTRO_SUITE = "" PKG_BASE_IMAGE = "debian:bullseye" } } diff --git a/common/packages.mk b/common/packages.mk index 9e998742..25fda83e 100644 --- a/common/packages.mk +++ b/common/packages.mk @@ -41,8 +41,8 @@ pkg-static-releases: pkg-info-alpine314: $(eval PKG_TYPE = apk) $(eval PKG_DISTRO = alpine) - $(eval PKG_ID = 3.14) - $(eval PKG_SUITE = 3.14) + $(eval PKG_DISTRO_ID = 3.14) + $(eval PKG_DISTRO_SUITE = 3.14) $(eval PKG_BASE_IMAGE = alpine:3.14) $(eval PKG_SUPPORTED_PLATFORMS = linux/386 linux/amd64 linux/arm64 linux/arm/v7 linux/arm/v6 linux/arm/v5 linux/ppc64le linux/s390x) @@ -50,8 +50,8 @@ pkg-info-alpine314: pkg-info-alpine315: $(eval PKG_TYPE = apk) $(eval PKG_DISTRO = alpine) - $(eval PKG_ID = 3.15) - $(eval PKG_SUITE = 3.15) + $(eval PKG_DISTRO_ID = 3.15) + $(eval PKG_DISTRO_SUITE = 3.15) $(eval PKG_BASE_IMAGE = alpine:3.15) $(eval PKG_SUPPORTED_PLATFORMS = linux/386 linux/amd64 linux/arm64 linux/arm/v7 linux/arm/v6 linux/arm/v5 linux/ppc64le linux/s390x) @@ -59,8 +59,8 @@ pkg-info-alpine315: pkg-info-alpine316: $(eval PKG_TYPE = apk) $(eval PKG_DISTRO = alpine) - $(eval PKG_ID = 3.16) - $(eval PKG_SUITE = 3.16) + $(eval PKG_DISTRO_ID = 3.16) + $(eval PKG_DISTRO_SUITE = 3.16) $(eval PKG_BASE_IMAGE = alpine:3.16) $(eval PKG_SUPPORTED_PLATFORMS = linux/386 linux/amd64 linux/arm64 linux/arm/v7 linux/arm/v6 linux/arm/v5 linux/ppc64le linux/s390x) @@ -68,8 +68,8 @@ pkg-info-alpine316: pkg-info-debian10: $(eval PKG_TYPE = deb) $(eval PKG_DISTRO = debian) - $(eval PKG_ID = 10) - $(eval PKG_SUITE = buster) + $(eval PKG_DISTRO_ID = 10) + $(eval PKG_DISTRO_SUITE = buster) $(eval PKG_BASE_IMAGE = debian:buster) $(eval PKG_SUPPORTED_PLATFORMS = linux/386 linux/amd64 linux/arm64 linux/arm/v7) @@ -77,8 +77,8 @@ pkg-info-debian10: pkg-info-debian11: $(eval PKG_TYPE = deb) $(eval PKG_DISTRO = debian) - $(eval PKG_ID = 11) - $(eval PKG_SUITE = bullseye) + $(eval PKG_DISTRO_ID = 11) + $(eval PKG_DISTRO_SUITE = bullseye) $(eval PKG_BASE_IMAGE = debian:bullseye) $(eval PKG_SUPPORTED_PLATFORMS = linux/386 linux/amd64 linux/arm64 linux/arm/v5 linux/arm/v6 linux/arm/v7 linux/mips64le linux/ppc64le linux/s390x) @@ -86,8 +86,8 @@ pkg-info-debian11: pkg-info-debian12: $(eval PKG_TYPE = deb) $(eval PKG_DISTRO = debian) - $(eval PKG_ID = 12) - $(eval PKG_SUITE = bookworm) + $(eval PKG_DISTRO_ID = 12) + $(eval PKG_DISTRO_SUITE = bookworm) $(eval PKG_BASE_IMAGE = debian:bookworm) $(eval PKG_SUPPORTED_PLATFORMS = linux/386 linux/amd64 linux/arm64 linux/arm/v5 linux/arm/v6 linux/arm/v7 linux/mips64le linux/ppc64le linux/s390x) @@ -95,8 +95,8 @@ pkg-info-debian12: pkg-info-raspbian10: $(eval PKG_TYPE = deb) $(eval PKG_DISTRO = raspbian) - $(eval PKG_ID = 10) - $(eval PKG_SUITE = buster) + $(eval PKG_DISTRO_ID = 10) + $(eval PKG_DISTRO_SUITE = buster) $(eval PKG_BASE_IMAGE = balenalib/rpi-raspbian:buster) $(eval PKG_SUPPORTED_PLATFORMS = linux/arm/v7) @@ -104,8 +104,8 @@ pkg-info-raspbian10: pkg-info-raspbian11: $(eval PKG_TYPE = deb) $(eval PKG_DISTRO = raspbian) - $(eval PKG_ID = 11) - $(eval PKG_SUITE = bullseye) + $(eval PKG_DISTRO_ID = 11) + $(eval PKG_DISTRO_SUITE = bullseye) $(eval PKG_BASE_IMAGE = balenalib/rpi-raspbian:bullseye) $(eval PKG_SUPPORTED_PLATFORMS = linux/arm/v7) @@ -113,8 +113,8 @@ pkg-info-raspbian11: pkg-info-raspbian12: $(eval PKG_TYPE = deb) $(eval PKG_DISTRO = raspbian) - $(eval PKG_ID = 12) - $(eval PKG_SUITE = bookworm) + $(eval PKG_DISTRO_ID = 12) + $(eval PKG_DISTRO_SUITE = bookworm) $(eval PKG_BASE_IMAGE = balenalib/rpi-raspbian:bookworm) $(eval PKG_SUPPORTED_PLATFORMS = linux/arm/v7) @@ -122,8 +122,8 @@ pkg-info-raspbian12: pkg-info-ubuntu1804: $(eval PKG_TYPE = deb) $(eval PKG_DISTRO = ubuntu) - $(eval PKG_ID = 18.04) - $(eval PKG_SUITE = bionic) + $(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) @@ -131,8 +131,8 @@ pkg-info-ubuntu1804: pkg-info-ubuntu2004: $(eval PKG_TYPE = deb) $(eval PKG_DISTRO = ubuntu) - $(eval PKG_ID = 20.04) - $(eval PKG_SUITE = focal) + $(eval PKG_DISTRO_ID = 20.04) + $(eval PKG_DISTRO_SUITE = focal) $(eval PKG_BASE_IMAGE = ubuntu:focal) @# 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) @@ -141,8 +141,8 @@ pkg-info-ubuntu2004: pkg-info-ubuntu2204: $(eval PKG_TYPE = deb) $(eval PKG_DISTRO = ubuntu) - $(eval PKG_ID = 22.04) - $(eval PKG_SUITE = jammy) + $(eval PKG_DISTRO_ID = 22.04) + $(eval PKG_DISTRO_SUITE = jammy) $(eval PKG_BASE_IMAGE = ubuntu:jammy) @# 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) @@ -151,8 +151,8 @@ pkg-info-ubuntu2204: pkg-info-ubuntu2210: $(eval PKG_TYPE = deb) $(eval PKG_DISTRO = ubuntu) - $(eval PKG_ID = 22.10) - $(eval PKG_SUITE = kinetic) + $(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) @@ -161,8 +161,8 @@ pkg-info-ubuntu2210: pkg-info-ubuntu2304: $(eval PKG_TYPE = deb) $(eval PKG_DISTRO = ubuntu) - $(eval PKG_ID = 23.04) - $(eval PKG_SUITE = lunar) + $(eval PKG_DISTRO_ID = 23.04) + $(eval PKG_DISTRO_SUITE = lunar) $(eval PKG_BASE_IMAGE = ubuntu:lunar) @# 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) @@ -171,8 +171,8 @@ pkg-info-ubuntu2304: pkg-info-centos7: $(eval PKG_TYPE = rpm) $(eval PKG_DISTRO = centos) - $(eval PKG_ID = 7) - $(eval PKG_SUITE = 7) + $(eval PKG_DISTRO_ID = 7) + $(eval PKG_DISTRO_SUITE = 7) $(eval PKG_BASE_IMAGE = centos:7) @# FIXME: packages look broken for linux/arm/v7 on centos:7 $(eval PKG_SUPPORTED_PLATFORMS = linux/amd64 linux/arm64 linux/ppc64le) @@ -181,8 +181,8 @@ pkg-info-centos7: pkg-info-centos8: $(eval PKG_TYPE = rpm) $(eval PKG_DISTRO = centos) - $(eval PKG_ID = 8) - $(eval PKG_SUITE = 8) + $(eval PKG_DISTRO_ID = 8) + $(eval PKG_DISTRO_SUITE = 8) $(eval PKG_BASE_IMAGE = quay.io/centos/centos:stream8) $(eval PKG_SUPPORTED_PLATFORMS = linux/amd64 linux/arm64 linux/ppc64le) @@ -190,8 +190,8 @@ pkg-info-centos8: pkg-info-centos9: $(eval PKG_TYPE = rpm) $(eval PKG_DISTRO = centos) - $(eval PKG_ID = 9) - $(eval PKG_SUITE = 9) + $(eval PKG_DISTRO_ID = 9) + $(eval PKG_DISTRO_SUITE = 9) $(eval PKG_BASE_IMAGE = quay.io/centos/centos:stream9) @# FIXME: packages look broken for linux/s390x on centos:stream9 $(eval PKG_SUPPORTED_PLATFORMS = linux/amd64 linux/arm64 linux/ppc64le) @@ -200,8 +200,8 @@ pkg-info-centos9: pkg-info-fedora36: $(eval PKG_TYPE = rpm) $(eval PKG_DISTRO = fedora) - $(eval PKG_ID = 36) - $(eval PKG_SUITE = 36) + $(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) @@ -209,8 +209,8 @@ pkg-info-fedora36: pkg-info-fedora37: $(eval PKG_TYPE = rpm) $(eval PKG_DISTRO = fedora) - $(eval PKG_ID = 37) - $(eval PKG_SUITE = 37) + $(eval PKG_DISTRO_ID = 37) + $(eval PKG_DISTRO_SUITE = 37) $(eval PKG_BASE_IMAGE = fedora:37) $(eval PKG_SUPPORTED_PLATFORMS = linux/amd64 linux/arm64 linux/ppc64le linux/s390x) @@ -218,8 +218,8 @@ pkg-info-fedora37: pkg-info-oraclelinux7: $(eval PKG_TYPE = rpm) $(eval PKG_DISTRO = oraclelinux) - $(eval PKG_ID = 7) - $(eval PKG_SUITE = 7) + $(eval PKG_DISTRO_ID = 7) + $(eval PKG_DISTRO_SUITE = 7) $(eval PKG_BASE_IMAGE = oraclelinux:7) $(eval PKG_SUPPORTED_PLATFORMS = linux/amd64 linux/arm64) @@ -227,8 +227,8 @@ pkg-info-oraclelinux7: pkg-info-oraclelinux8: $(eval PKG_TYPE = rpm) $(eval PKG_DISTRO = oraclelinux) - $(eval PKG_ID = 8) - $(eval PKG_SUITE = 8) + $(eval PKG_DISTRO_ID = 8) + $(eval PKG_DISTRO_SUITE = 8) $(eval PKG_BASE_IMAGE = oraclelinux:8) $(eval PKG_SUPPORTED_PLATFORMS = linux/amd64 linux/arm64) @@ -236,8 +236,8 @@ pkg-info-oraclelinux8: pkg-info-oraclelinux9: $(eval PKG_TYPE = rpm) $(eval PKG_DISTRO = oraclelinux) - $(eval PKG_ID = 9) - $(eval PKG_SUITE = 9) + $(eval PKG_DISTRO_ID = 9) + $(eval PKG_DISTRO_SUITE = 9) $(eval PKG_BASE_IMAGE = oraclelinux:9) $(eval PKG_SUPPORTED_PLATFORMS = linux/amd64 linux/arm64) @@ -245,7 +245,7 @@ pkg-info-oraclelinux9: pkg-info-static: $(eval PKG_TYPE = static) $(eval PKG_DISTRO = static) - $(eval PKG_ID =) - $(eval PKG_SUITE =) + $(eval PKG_DISTRO_ID =) + $(eval PKG_DISTRO_SUITE =) $(eval PKG_BASE_IMAGE = debian:bullseye) $(eval PKG_SUPPORTED_PLATFORMS =) diff --git a/common/scripts/gen-deb-changelog.sh b/common/scripts/gen-deb-changelog.sh index 076ac6bc..3f8d2712 100755 --- a/common/scripts/gen-deb-changelog.sh +++ b/common/scripts/gen-deb-changelog.sh @@ -17,10 +17,10 @@ version="$1" pkgVersion="$2" pkgDistro="$3" -pkgId="$4" -pkgSuite="$5" -if [[ -z "$version" ]] || [[ -z "$pkgVersion" ]] || [[ -z "$pkgDistro" ]] || [[ -z "$pkgId" ]] || [[ -z "$pkgSuite" ]]; then - echo "usage: ./gen-deb-changelog [ ]" >&2 +pkgDistroId="$4" +pkgDistroSuite="$5" +if [[ -z "$version" ]] || [[ -z "$pkgVersion" ]] || [[ -z "$pkgDistro" ]] || [[ -z "$pkgDistroId" ]] || [[ -z "$pkgDistroSuite" ]]; then + echo "usage: ./gen-deb-changelog [ ]" >&2 exit 1 fi if [ ! -d "debian" ]; then @@ -80,7 +80,7 @@ if [[ -f "debian/changelog" ]] && [[ "${version}" != "v${pkgVersion}" ]]; then fi if [[ ! -f "debian/changelog" ]] || [[ "${version}" != "v${pkgVersion}" ]]; then cat > "debian/changelog" <<-EOF -$pkgSource (${pkgEpoch}${pkgEpochSep}${pkgVersion}-${pkgRevision}~${pkgDistro}.${pkgId}~${pkgSuite}) $pkgSuite; urgency=low +$pkgSource (${pkgEpoch}${pkgEpochSep}${pkgVersion}-${pkgRevision}~${pkgDistro}.${pkgDistroId}~${pkgDistroSuite}) $pkgDistroSuite; urgency=low * Version: $version -- $pkgMaintainer $pkgDate EOF diff --git a/pkg/buildx/Dockerfile b/pkg/buildx/Dockerfile index 4b62a341..2346f64a 100644 --- a/pkg/buildx/Dockerfile +++ b/pkg/buildx/Dockerfile @@ -24,8 +24,8 @@ ARG GO_IMAGE_VARIANT="bullseye" ARG PKG_RELEASE="debian11" ARG PKG_TYPE="deb" ARG PKG_DISTRO="debian" -ARG PKG_ID="11" -ARG PKG_SUITE="bullseye" +ARG PKG_DISTRO_ID="11" +ARG PKG_DISTRO_SUITE="bullseye" ARG PKG_BASE_IMAGE="debian:bullseye" # stage used as named context that mounts common/scripts @@ -96,8 +96,8 @@ ARG BUILDX_REF ARG NIGHTLY_BUILD ARG PKG_NAME ARG PKG_DISTRO -ARG PKG_ID -ARG PKG_SUITE +ARG PKG_DISTRO_ID +ARG PKG_DISTRO_SUITE ARG PKG_PACKAGER ARG PKG_DEB_BUILDFLAGS ARG PKG_DEB_REVISION @@ -143,8 +143,8 @@ ARG BUILDX_REF ARG NIGHTLY_BUILD ARG PKG_NAME ARG PKG_DISTRO -ARG PKG_ID -ARG PKG_SUITE +ARG PKG_DISTRO_ID +ARG PKG_DISTRO_SUITE ARG PKG_PACKAGER ARG PKG_RPM_BUILDFLAGS ARG PKG_RPM_RELEASE diff --git a/pkg/buildx/scripts/pkg-deb-build.sh b/pkg/buildx/scripts/pkg-deb-build.sh index bd45adf2..23086398 100755 --- a/pkg/buildx/scripts/pkg-deb-build.sh +++ b/pkg/buildx/scripts/pkg-deb-build.sh @@ -19,8 +19,8 @@ : "${PKG_NAME=}" : "${PKG_RELEASE=}" : "${PKG_DISTRO=}" -: "${PKG_ID=}" -: "${PKG_SUITE=}" +: "${PKG_DISTRO_ID=}" +: "${PKG_DISTRO_SUITE=}" : "${PKG_PACKAGER=}" : "${PKG_VENDOR=}" @@ -56,9 +56,9 @@ done xx-go --wrap fix-cc -gen-deb-changelog "$GENVER_VERSION" "$GENVER_PKG_VERSION" "$PKG_DISTRO" "$PKG_ID" "$PKG_SUITE" "$PKG_DEB_REVISION" "$PKG_DEB_EPOCH" +gen-deb-changelog "$GENVER_VERSION" "$GENVER_PKG_VERSION" "$PKG_DISTRO" "$PKG_DISTRO_ID" "$PKG_DISTRO_SUITE" "$PKG_DEB_REVISION" "$PKG_DEB_EPOCH" -pkgoutput="${OUTDIR}/${PKG_DISTRO}/${PKG_SUITE}/$(xx-info arch)" +pkgoutput="${OUTDIR}/${PKG_DISTRO}/${PKG_DISTRO_SUITE}/$(xx-info arch)" if [ -n "$(xx-info variant)" ]; then pkgoutput="${pkgoutput}/$(xx-info variant)" fi diff --git a/pkg/buildx/scripts/pkg-rpm-build.sh b/pkg/buildx/scripts/pkg-rpm-build.sh index 19e10b06..c309ab14 100755 --- a/pkg/buildx/scripts/pkg-rpm-build.sh +++ b/pkg/buildx/scripts/pkg-rpm-build.sh @@ -19,8 +19,8 @@ : "${PKG_NAME=}" : "${PKG_RELEASE=}" : "${PKG_DISTRO=}" -: "${PKG_ID=}" -: "${PKG_SUITE=}" +: "${PKG_DISTRO_ID=}" +: "${PKG_DISTRO_SUITE=}" : "${PKG_PACKAGER=}" : "${PKG_VENDOR=}" @@ -62,7 +62,7 @@ rpmDefine=( --define "_commit ${GENVER_COMMIT}" ) -pkgoutput="${OUTDIR}/${PKG_DISTRO}/${PKG_SUITE}/$(xx-info arch)" +pkgoutput="${OUTDIR}/${PKG_DISTRO}/${PKG_DISTRO_SUITE}/$(xx-info arch)" if [ -n "$(xx-info variant)" ]; then pkgoutput="${pkgoutput}/$(xx-info variant)" fi diff --git a/pkg/buildx/verify.Dockerfile b/pkg/buildx/verify.Dockerfile index d2387792..634d699c 100644 --- a/pkg/buildx/verify.Dockerfile +++ b/pkg/buildx/verify.Dockerfile @@ -29,12 +29,12 @@ FROM ${PKG_BASE_IMAGE} AS verify-deb RUN apt-get update COPY --from=xx / / ARG PKG_DISTRO -ARG PKG_ID -ARG PKG_SUITE +ARG PKG_DISTRO_ID +ARG PKG_DISTRO_SUITE ARG TARGETPLATFORM RUN --mount=from=bin-folder,target=/build <&2 "warning: no packages found in $dir" exit 0 @@ -54,14 +54,14 @@ FROM ${PKG_BASE_IMAGE} AS verify-rpm COPY --from=xx / / ARG PKG_RELEASE ARG PKG_DISTRO -ARG PKG_ID -ARG PKG_SUITE +ARG PKG_DISTRO_ID +ARG PKG_DISTRO_SUITE RUN --mount=type=bind,from=common-scripts,source=verify-rpm-init.sh,target=/usr/local/bin/verify-rpm-init \ verify-rpm-init $PKG_RELEASE ARG TARGETPLATFORM RUN --mount=from=bin-folder,target=/build <&2 "warning: no packages found in $dir" exit 0 @@ -81,8 +81,8 @@ FROM ${PKG_BASE_IMAGE} AS verify-static RUN apt-get update && apt-get install -y --no-install-recommends tar COPY --from=xx / / ARG PKG_DISTRO -ARG PKG_ID -ARG PKG_SUITE +ARG PKG_DISTRO_ID +ARG PKG_DISTRO_SUITE ARG TARGETPLATFORM RUN --mount=from=bin-folder,target=/build < "debian/changelog" <<-EOF -${PKG_NAME} (${PKG_DEB_EPOCH}$([ -n "$PKG_DEB_EPOCH" ] && echo ":")${GENVER_PKG_VERSION}-${PKG_DEB_REVISION}) $PKG_SUITE; urgency=low +${PKG_NAME} (${PKG_DEB_EPOCH}$([ -n "$PKG_DEB_EPOCH" ] && echo ":")${GENVER_PKG_VERSION}-${PKG_DEB_REVISION}) $PKG_DISTRO_SUITE; urgency=low * Version: ${GENVER_VERSION} -- $(awk -F ': ' '$1 == "Maintainer" { print $2; exit }' debian/control) $(date --rfc-2822) EOF -pkgoutput="${OUTDIR}/${PKG_DISTRO}/${PKG_SUITE}/$(xx-info arch)" +pkgoutput="${OUTDIR}/${PKG_DISTRO}/${PKG_DISTRO_SUITE}/$(xx-info arch)" if [ -n "$(xx-info variant)" ]; then pkgoutput="${pkgoutput}/$(xx-info variant)" fi diff --git a/pkg/compose/scripts/pkg-rpm-build.sh b/pkg/compose/scripts/pkg-rpm-build.sh index 19e10b06..c309ab14 100755 --- a/pkg/compose/scripts/pkg-rpm-build.sh +++ b/pkg/compose/scripts/pkg-rpm-build.sh @@ -19,8 +19,8 @@ : "${PKG_NAME=}" : "${PKG_RELEASE=}" : "${PKG_DISTRO=}" -: "${PKG_ID=}" -: "${PKG_SUITE=}" +: "${PKG_DISTRO_ID=}" +: "${PKG_DISTRO_SUITE=}" : "${PKG_PACKAGER=}" : "${PKG_VENDOR=}" @@ -62,7 +62,7 @@ rpmDefine=( --define "_commit ${GENVER_COMMIT}" ) -pkgoutput="${OUTDIR}/${PKG_DISTRO}/${PKG_SUITE}/$(xx-info arch)" +pkgoutput="${OUTDIR}/${PKG_DISTRO}/${PKG_DISTRO_SUITE}/$(xx-info arch)" if [ -n "$(xx-info variant)" ]; then pkgoutput="${pkgoutput}/$(xx-info variant)" fi diff --git a/pkg/compose/verify.Dockerfile b/pkg/compose/verify.Dockerfile index de909b7d..20b7e1c0 100644 --- a/pkg/compose/verify.Dockerfile +++ b/pkg/compose/verify.Dockerfile @@ -29,12 +29,12 @@ FROM ${PKG_BASE_IMAGE} AS verify-deb RUN apt-get update COPY --from=xx / / ARG PKG_DISTRO -ARG PKG_ID -ARG PKG_SUITE +ARG PKG_DISTRO_ID +ARG PKG_DISTRO_SUITE ARG TARGETPLATFORM RUN --mount=from=bin-folder,target=/build <&2 "warning: no packages found in $dir" exit 0 @@ -54,14 +54,14 @@ FROM ${PKG_BASE_IMAGE} AS verify-rpm COPY --from=xx / / ARG PKG_RELEASE ARG PKG_DISTRO -ARG PKG_ID -ARG PKG_SUITE +ARG PKG_DISTRO_ID +ARG PKG_DISTRO_SUITE RUN --mount=type=bind,from=common-scripts,source=verify-rpm-init.sh,target=/usr/local/bin/verify-rpm-init \ verify-rpm-init $PKG_RELEASE ARG TARGETPLATFORM RUN --mount=from=bin-folder,target=/build <&2 "warning: no packages found in $dir" exit 0 @@ -81,8 +81,8 @@ FROM ${PKG_BASE_IMAGE} AS verify-static RUN apt-get update && apt-get install -y --no-install-recommends tar COPY --from=xx / / ARG PKG_DISTRO -ARG PKG_ID -ARG PKG_SUITE +ARG PKG_DISTRO_ID +ARG PKG_DISTRO_SUITE ARG TARGETPLATFORM RUN --mount=from=bin-folder,target=/build <&2 "warning: no packages found in $dir" exit 0 @@ -57,14 +57,14 @@ FROM ${PKG_BASE_IMAGE} AS verify-rpm COPY --from=xx / / ARG PKG_RELEASE ARG PKG_DISTRO -ARG PKG_ID -ARG PKG_SUITE +ARG PKG_DISTRO_ID +ARG PKG_DISTRO_SUITE RUN --mount=type=bind,from=common-scripts,source=verify-rpm-init.sh,target=/usr/local/bin/verify-rpm-init \ verify-rpm-init $PKG_RELEASE ARG TARGETPLATFORM RUN --mount=from=bin-folder,target=/build <&2 "warning: no packages found in $dir" exit 0 @@ -87,8 +87,8 @@ FROM ${PKG_BASE_IMAGE} AS verify-static RUN apt-get update && apt-get install -y --no-install-recommends tar COPY --from=xx / / ARG PKG_DISTRO -ARG PKG_ID -ARG PKG_SUITE +ARG PKG_DISTRO_ID +ARG PKG_DISTRO_SUITE ARG TARGETPLATFORM RUN --mount=from=bin-folder,target=/build <&2 "warning: no packages found in $dir" exit 0 @@ -55,14 +55,14 @@ FROM ${PKG_BASE_IMAGE} AS verify-rpm COPY --from=xx / / ARG PKG_RELEASE ARG PKG_DISTRO -ARG PKG_ID -ARG PKG_SUITE +ARG PKG_DISTRO_ID +ARG PKG_DISTRO_SUITE RUN --mount=type=bind,from=common-scripts,source=verify-rpm-init.sh,target=/usr/local/bin/verify-rpm-init \ verify-rpm-init $PKG_RELEASE ARG TARGETPLATFORM RUN --mount=from=bin-folder,target=/build <&2 "warning: no packages found in $dir" exit 0 @@ -98,8 +98,8 @@ FROM ${PKG_BASE_IMAGE} AS verify-static RUN apt-get update && apt-get install -y --no-install-recommends tar libsecret-1-0 COPY --from=xx / / ARG PKG_DISTRO -ARG PKG_ID -ARG PKG_SUITE +ARG PKG_DISTRO_ID +ARG PKG_DISTRO_SUITE ARG TARGETPLATFORM RUN --mount=from=bin-folder,target=/build <&2 "warning: no packages found in $dir" exit 0 @@ -54,14 +54,14 @@ FROM ${PKG_BASE_IMAGE} AS verify-rpm COPY --from=xx / / ARG PKG_RELEASE ARG PKG_DISTRO -ARG PKG_ID -ARG PKG_SUITE +ARG PKG_DISTRO_ID +ARG PKG_DISTRO_SUITE RUN --mount=type=bind,from=common-scripts,source=verify-rpm-init.sh,target=/usr/local/bin/verify-rpm-init \ verify-rpm-init $PKG_RELEASE ARG TARGETPLATFORM RUN --mount=from=bin-folder,target=/build <&2 "warning: no packages found in $dir" exit 0 @@ -88,8 +88,8 @@ FROM ${PKG_BASE_IMAGE} AS verify-static RUN apt-get update && apt-get install -y --no-install-recommends tar COPY --from=xx / / ARG PKG_DISTRO -ARG PKG_ID -ARG PKG_SUITE +ARG PKG_DISTRO_ID +ARG PKG_DISTRO_SUITE ARG TARGETPLATFORM RUN --mount=from=bin-folder,target=/build <&2 "warning: no packages found in $dir" exit 0 @@ -54,15 +54,15 @@ FROM ${PKG_BASE_IMAGE} AS verify-rpm COPY --from=xx / / ARG PKG_RELEASE ARG PKG_DISTRO -ARG PKG_ID -ARG PKG_SUITE +ARG PKG_DISTRO_ID +ARG PKG_DISTRO_SUITE RUN --mount=type=bind,from=common-scripts,source=verify-rpm-init.sh,target=/usr/local/bin/verify-rpm-init \ verify-rpm-init $PKG_RELEASE && \ yum install -y device-mapper-devel ARG TARGETPLATFORM RUN --mount=from=bin-folder,target=/build <&2 "warning: no packages found in $dir" exit 0 @@ -82,8 +82,8 @@ FROM ${PKG_BASE_IMAGE} AS verify-static RUN apt-get update && apt-get install -y --no-install-recommends tar COPY --from=xx / / ARG PKG_DISTRO -ARG PKG_ID -ARG PKG_SUITE +ARG PKG_DISTRO_ID +ARG PKG_DISTRO_SUITE ARG TARGETPLATFORM RUN --mount=from=bin-folder,target=/build <&2 "warning: no packages found in $dir" exit 0 @@ -55,14 +55,14 @@ FROM ${PKG_BASE_IMAGE} AS verify-rpm COPY --from=xx / / ARG PKG_RELEASE ARG PKG_DISTRO -ARG PKG_ID -ARG PKG_SUITE +ARG PKG_DISTRO_ID +ARG PKG_DISTRO_SUITE RUN --mount=type=bind,from=common-scripts,source=verify-rpm-init.sh,target=/usr/local/bin/verify-rpm-init \ verify-rpm-init $PKG_RELEASE ARG TARGETPLATFORM RUN --mount=from=bin-folder,target=/build <&2 "warning: no packages found in $dir" exit 0 @@ -83,8 +83,8 @@ FROM ${PKG_BASE_IMAGE} AS verify-static RUN apt-get update && apt-get install -y --no-install-recommends tar COPY --from=xx / / ARG PKG_DISTRO -ARG PKG_ID -ARG PKG_SUITE +ARG PKG_DISTRO_ID +ARG PKG_DISTRO_SUITE ARG TARGETPLATFORM RUN --mount=from=bin-folder,target=/build <&2 "warning: no packages found in $dir" exit 0 @@ -55,14 +55,14 @@ FROM ${PKG_BASE_IMAGE} AS verify-rpm COPY --from=xx / / ARG PKG_RELEASE ARG PKG_DISTRO -ARG PKG_ID -ARG PKG_SUITE +ARG PKG_DISTRO_ID +ARG PKG_DISTRO_SUITE RUN --mount=type=bind,from=common-scripts,source=verify-rpm-init.sh,target=/usr/local/bin/verify-rpm-init \ verify-rpm-init $PKG_RELEASE ARG TARGETPLATFORM RUN --mount=from=bin-folder,target=/build <&2 "warning: no packages found in $dir" exit 0 @@ -83,8 +83,8 @@ FROM ${PKG_BASE_IMAGE} AS verify-static RUN apt-get update && apt-get install -y --no-install-recommends tar COPY --from=xx / / ARG PKG_DISTRO -ARG PKG_ID -ARG PKG_SUITE +ARG PKG_DISTRO_ID +ARG PKG_DISTRO_SUITE ARG TARGETPLATFORM RUN --mount=from=bin-folder,target=/build < Date: Sat, 21 Jan 2023 00:22:19 +0100 Subject: [PATCH 17/54] pkg(docker-cli): add arm/v5 platform Signed-off-by: CrazyMax (cherry picked from commit 62e88947819b21fa44c0554ef437a780f60fcff8) --- pkg/docker-cli/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/docker-cli/Makefile b/pkg/docker-cli/Makefile index af72d1d4..be63a328 100644 --- a/pkg/docker-cli/Makefile +++ b/pkg/docker-cli/Makefile @@ -29,7 +29,7 @@ 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/v6 linux/arm/v7 linux/arm64 linux/riscv64 linux/s390x windows/amd64 windows/arm64 +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 .PHONY: default default: pkg ; From 902fbd1fc17d0f9ce9ca651a193f40f7e671cc05 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sat, 21 Jan 2023 00:22:35 +0100 Subject: [PATCH 18/54] pkg(docker-engine): add arm/v5 platform Signed-off-by: CrazyMax (cherry picked from commit d0429c1d602f3fc41f30d91139815077b90d95e6) --- pkg/docker-engine/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/docker-engine/Makefile b/pkg/docker-engine/Makefile index bb3c1d35..2a0a25e0 100644 --- a/pkg/docker-engine/Makefile +++ b/pkg/docker-engine/Makefile @@ -29,7 +29,7 @@ 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/v6 linux/arm/v7 linux/arm64 linux/s390x windows/amd64 +PKG_PLATFORMS ?= linux/amd64 linux/arm/v5 linux/arm/v6 linux/arm/v7 linux/arm64 linux/s390x windows/amd64 .PHONY: default default: pkg ; From 5ee54f8fae84ab364d8d35181dd70ef22de25564 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sat, 21 Jan 2023 01:23:14 +0100 Subject: [PATCH 19/54] pkg(docker-cli): split darwin static stage Avoids issue with dockercore/golang-cross:xx-sdk-extras that doesn't have a dummy linux/arm/v5 platform Signed-off-by: CrazyMax (cherry picked from commit 0439c7f418d7adfbd8aeabb36636ee13c255934d) --- pkg/docker-cli/Dockerfile | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/pkg/docker-cli/Dockerfile b/pkg/docker-cli/Dockerfile index 73ac6a80..d2447016 100644 --- a/pkg/docker-cli/Dockerfile +++ b/pkg/docker-cli/Dockerfile @@ -188,7 +188,27 @@ ARG GOVERSIONINFO_VERSION RUN --mount=type=bind,from=gocross,source=/usr/local/go,target=/usr/local/go,rw \ GOBIN=/out GO111MODULE=on go install "github.com/josephspurrier/goversioninfo/cmd/goversioninfo@${GOVERSIONINFO_VERSION}" -FROM build-base-static AS builder-static +FROM build-base-static AS builder-static-nosdk +ARG DEBIAN_FRONTEND +RUN apt-get install -y --no-install-recommends dpkg-dev clang lld llvm make pkg-config +ARG PKG_NAME +ARG DOCKER_CLI_REF +ARG NIGHTLY_BUILD +WORKDIR /build +ARG TARGETPLATFORM +RUN xx-apt-get install -y gcc libc6-dev +RUN --mount=type=bind,source=scripts/pkg-static-build.sh,target=/usr/local/bin/pkg-static-build \ + --mount=type=bind,from=common-scripts,source=gen-ver.sh,target=/usr/local/bin/gen-ver \ + --mount=type=bind,from=common-scripts,source=fix-cc.sh,target=/usr/local/bin/fix-cc \ + --mount=type=bind,from=src,source=/src,target=/go/src/github.com/docker/cli,rw \ + --mount=type=bind,from=gocross,source=/usr/local/go,target=/usr/local/go,rw \ + --mount=type=bind,from=goversioninfo,source=/out/goversioninfo,target=/usr/bin/goversioninfo \ + --mount=type=tmpfs,target=/go/src/github.com/docker/cli/winresources \ + OUTDIR=/out BUILDDIR=/build SRCDIR=/go/src/github.com/docker/cli pkg-static-build +FROM builder-static-nosdk AS builder-static-linux +FROM builder-static-nosdk AS builder-static-windows + +FROM build-base-static AS builder-static-darwin ARG DEBIAN_FRONTEND RUN apt-get install -y --no-install-recommends dpkg-dev clang lld llvm make pkg-config ARG PKG_NAME @@ -207,6 +227,8 @@ RUN --mount=type=bind,source=scripts/pkg-static-build.sh,target=/usr/local/bin/p --mount=type=tmpfs,target=/go/src/github.com/docker/cli/winresources \ OUTDIR=/out BUILDDIR=/build SRCDIR=/go/src/github.com/docker/cli pkg-static-build +FROM builder-static-$TARGETOS AS builder-static + FROM builder-${PKG_TYPE} AS build-pkg ARG BUILDKIT_SBOM_SCAN_STAGE=true From 825ae90c009e9f60fc1f43601380fde0d7676c9f Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sat, 21 Jan 2023 11:51:27 +0100 Subject: [PATCH 20/54] pkg(buildx): arm/v5 platform support Signed-off-by: CrazyMax (cherry picked from commit 6f413c6bb8902c77727f45e44c29dbf5b8ae2fa4) --- pkg/buildx/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/buildx/Makefile b/pkg/buildx/Makefile index df08ae9f..0d7b076f 100644 --- a/pkg/buildx/Makefile +++ b/pkg/buildx/Makefile @@ -26,7 +26,7 @@ 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/v6 linux/arm/v7 linux/arm64 linux/riscv64 linux/s390x windows/amd64 windows/arm64 +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 .PHONY: default default: pkg ; From fa575da8b6a0522ce9299663112ab602c4f9ee45 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sat, 21 Jan 2023 11:51:34 +0100 Subject: [PATCH 21/54] pkg(compose): arm/v5 platform support Signed-off-by: CrazyMax (cherry picked from commit c58700bdaaeb902bab858463abc491015214eff9) --- pkg/compose/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/compose/Makefile b/pkg/compose/Makefile index 9d443ab5..b03f4132 100644 --- a/pkg/compose/Makefile +++ b/pkg/compose/Makefile @@ -26,7 +26,7 @@ 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/v6 linux/arm/v7 linux/arm64 linux/riscv64 linux/s390x windows/amd64 windows/arm64 +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 .PHONY: default default: pkg ; From 255bb43a463e9e1ce93720ee2ed61d305ad4219b Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sat, 21 Jan 2023 11:51:40 +0100 Subject: [PATCH 22/54] pkg(containerd): arm/v5 platform support Signed-off-by: CrazyMax (cherry picked from commit 44b074872681854d8e7ded7a7f133431b49c7b7a) --- pkg/containerd/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/containerd/Makefile b/pkg/containerd/Makefile index 8368c142..a717dbe0 100644 --- a/pkg/containerd/Makefile +++ b/pkg/containerd/Makefile @@ -32,7 +32,7 @@ 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/v6 linux/arm/v7 linux/arm64 linux/s390x +PKG_PLATFORMS ?= linux/amd64 linux/arm/v5 linux/arm/v6 linux/arm/v7 linux/arm64 linux/s390x .PHONY: default default: pkg ; From 7fa79233561414a3e9e1aa2a89e92402718fb1c9 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sat, 21 Jan 2023 11:51:55 +0100 Subject: [PATCH 23/54] pkg(credential-helpers): arm/v5 platform support Signed-off-by: CrazyMax (cherry picked from commit b2a7bb9ec98e95c6dae669ba51e7c704b1ef809c) --- pkg/credential-helpers/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/credential-helpers/Makefile b/pkg/credential-helpers/Makefile index 8501756c..b343ec75 100644 --- a/pkg/credential-helpers/Makefile +++ b/pkg/credential-helpers/Makefile @@ -26,7 +26,7 @@ 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/v6 linux/arm/v7 linux/arm64 linux/s390x windows/amd64 +PKG_PLATFORMS ?= darwin/amd64 darwin/arm64 linux/amd64 linux/arm/v5 linux/arm/v6 linux/arm/v7 linux/arm64 linux/s390x windows/amd64 .PHONY: default default: pkg ; From 3f168445713c8dd562fdc91de57d5520c7b9e9df Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sat, 27 May 2023 22:00:18 +0200 Subject: [PATCH 24/54] 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 e8cfaef111fb051f7357526f5264211d35c7d5e3 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Mon, 29 May 2023 19:30:47 +0200 Subject: [PATCH 25/54] 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 2346f64a..79d60d16 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 6ebcfd54..08587773 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 50de7bc1..2e81e2e7 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 8860d53a..b147cbc4 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 d2447016..77648a0a 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 34f6db12..6c9b2b96 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 b132ecdf..d7ddc00b 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 8e077c7e6822cd36700cab7d592c0b36ace66448 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Fri, 4 Aug 2023 00:17:49 +0200 Subject: [PATCH 26/54] 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 0d7b076f..fd58304b 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 b03f4132..1b58ecd0 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 a717dbe0..cbea16fb 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 be63a328..eb97a0ba 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 2a0a25e0..064189f6 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 144be344a3b31e05a4770ac05962bcf117f3631a Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Fri, 4 Aug 2023 04:51:22 +0200 Subject: [PATCH 27/54] 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 d391feb6a5cdaa5cd74e2d7c87f0bc06256796c6 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Fri, 4 Aug 2023 06:13:00 +0200 Subject: [PATCH 28/54] 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 1868e3250311dd7c44c80263de915a9ce0e7425c Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Fri, 4 Aug 2023 06:13:09 +0200 Subject: [PATCH 29/54] 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 918514b94ceff3f270dec6307e9ab5111832c05c Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Fri, 4 Aug 2023 06:13:53 +0200 Subject: [PATCH 30/54] 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 5ab87ef2..b26381ff 100644 --- a/pkg/containerd/deb/control +++ b/pkg/containerd/deb/control @@ -3,7 +3,7 @@ Section: devel Priority: optional Maintainer: Containerd team Build-Depends: libbtrfs-dev | btrfs-tools, - debhelper (>= 10~) | dh-systemd, + 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 cb98b74df61a9644b382bc228f7bf4f76e95d54f Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Fri, 4 Aug 2023 06:14:10 +0200 Subject: [PATCH 31/54] 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 d778dc6fa0ac6c580a02d749419f1e5bedda3db6 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Fri, 4 Aug 2023 06:14:36 +0200 Subject: [PATCH 32/54] 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 2825d234ef1f7631bbfc46bb046a9592c3af43dc Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Fri, 4 Aug 2023 06:15:37 +0200 Subject: [PATCH 33/54] 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 b31b92cd..636f1b6e 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 6f0e04f1d77ba9e723ca7c26519ee5ee6b008888 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Fri, 4 Aug 2023 06:15:56 +0200 Subject: [PATCH 34/54] 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 3af536df0ca0fa48b33b0b51df05b1f9e9956038 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sat, 5 Aug 2023 07:04:44 +0200 Subject: [PATCH 35/54] 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 77648a0a..07cae8c5 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 36/54] 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 ee93b5e43b191c5b4b18144fc11c9f543ea86efd Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sat, 5 Aug 2023 12:14:36 +0200 Subject: [PATCH 37/54] 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 9a022b3561f45a0d50ea8929a578b64e35530cf8 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sat, 5 Aug 2023 12:24:43 +0200 Subject: [PATCH 38/54] 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 76dd80292f2a6df8e4ee9a0c23fb004e2bb06960 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sat, 5 Aug 2023 13:08:14 +0200 Subject: [PATCH 39/54] 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 add24e02d4b11c248b5d5d28b08fe94f1471c388 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sat, 5 Aug 2023 13:29:03 +0200 Subject: [PATCH 40/54] 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 00e572cd4f13594d8238e65f007909c95919b71d Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sat, 5 Aug 2023 13:31:59 +0200 Subject: [PATCH 41/54] 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 906bce55849a03ac87e18e6a8fa626a87795e3c9 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sat, 5 Aug 2023 13:48:41 +0200 Subject: [PATCH 42/54] 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 39f9ff07276a22bcc97bebb08c4c3b72549ca940 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sat, 5 Aug 2023 14:53:54 +0200 Subject: [PATCH 43/54] 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 79d60d16..bdb79b8a 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 08587773..17f979a5 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 2e81e2e7..edf57c2b 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 b147cbc4..78d23382 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 07cae8c5..1f05b23b 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 999f43cf..77633dd2 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 d7ddc00b..3b0d9d6d 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 04852a3930f93121b2e4fa4e1505051b0e6c50ab Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sat, 5 Aug 2023 17:14:32 +0200 Subject: [PATCH 44/54] 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 ebdd83e89509232ed9e20aff49cd645d401e528b Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sat, 5 Aug 2023 20:27:48 +0200 Subject: [PATCH 45/54] 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 61fba53dfeabb21e4d021f831637acbc392855f9 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sat, 5 Aug 2023 21:59:04 +0200 Subject: [PATCH 46/54] 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 a201c8b2fe8cb7d99214a894d150eaf835e09c68 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sun, 6 Aug 2023 01:39:28 +0200 Subject: [PATCH 47/54] 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 d2694052a76b53cfc517a47be88bb6583a245ef5 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sun, 6 Aug 2023 04:08:47 +0200 Subject: [PATCH 48/54] 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 44ee7cd9ce4433aef9cbdf2ad17cb3d88499491e Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sun, 6 Aug 2023 15:28:08 +0200 Subject: [PATCH 49/54] 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 bdb79b8a..6c843c12 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 17f979a5..6f77b253 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 edf57c2b..5ee94d82 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 78d23382..ff9d5a01 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 1f05b23b..7d53323e 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 77633dd2..27e7debf 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 3b0d9d6d..2ecfbe81 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 From 2e6f9434d5d48375dce2e2dbeecf2683fc815869 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sun, 6 Aug 2023 21:36:53 +0200 Subject: [PATCH 50/54] common: bump go to 1.19.12 Signed-off-by: CrazyMax --- common/vars.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/vars.mk b/common/vars.mk index d40962e3..7174a5c2 100644 --- a/common/vars.mk +++ b/common/vars.mk @@ -16,7 +16,7 @@ export BASEDIR ?= $(CURDIR) # go base image export GO_IMAGE ?= golang -export GO_VERSION ?= 1.19.8 +export GO_VERSION ?= 1.19.12 export GO_IMAGE_VARIANT ?= bullseye # if set, ony build matching the local platform From f818e7d0f80e2dd06d3de70a333adbcb00f67e29 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sun, 6 Aug 2023 21:38:02 +0200 Subject: [PATCH 51/54] pkg(docker-cli): bump go to 1.20.5 Signed-off-by: CrazyMax --- pkg/docker-cli/Dockerfile | 2 +- pkg/docker-cli/Makefile | 2 +- pkg/docker-cli/docker-bake.hcl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/docker-cli/Dockerfile b/pkg/docker-cli/Dockerfile index 7d53323e..712be4a7 100644 --- a/pkg/docker-cli/Dockerfile +++ b/pkg/docker-cli/Dockerfile @@ -22,7 +22,7 @@ ARG GOVERSIONINFO_VERSION="v1.3.0" # common args ARG GO_IMAGE="golang" -ARG GO_VERSION="1.19.8" +ARG GO_VERSION="1.20.5" ARG GO_IMAGE_VARIANT="bullseye" ARG PKG_RELEASE="debian11" ARG PKG_TYPE="deb" diff --git a/pkg/docker-cli/Makefile b/pkg/docker-cli/Makefile index eb97a0ba..11c1827f 100644 --- a/pkg/docker-cli/Makefile +++ b/pkg/docker-cli/Makefile @@ -15,7 +15,7 @@ include ../../common/vars.mk # https://github.com/docker/cli/blob/23.0/Dockerfile#L4 -export GO_VERSION = 1.19.8 +export GO_VERSION = 1.20.5 DESTDIR ?= $(BASEDIR)/bin BAKE_DEFINITIONS ?= -f docker-bake.hcl -f ../../common/packages.hcl diff --git a/pkg/docker-cli/docker-bake.hcl b/pkg/docker-cli/docker-bake.hcl index 69904ed0..df0ad49e 100644 --- a/pkg/docker-cli/docker-bake.hcl +++ b/pkg/docker-cli/docker-bake.hcl @@ -34,7 +34,7 @@ variable "GO_IMAGE" { default = "golang" } variable "GO_VERSION" { - default = "1.19.8" + default = "1.20.5" } variable "GO_IMAGE_VARIANT" { default = "bullseye" From 5619b87a1aa98bb93c32ebfad64d57a2b579ad5e Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sun, 6 Aug 2023 21:38:09 +0200 Subject: [PATCH 52/54] pkg(docker-engine): bump go to 1.20.5 Signed-off-by: CrazyMax --- pkg/docker-engine/Dockerfile | 2 +- pkg/docker-engine/Makefile | 2 +- pkg/docker-engine/docker-bake.hcl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/docker-engine/Dockerfile b/pkg/docker-engine/Dockerfile index 27e7debf..4964e18f 100644 --- a/pkg/docker-engine/Dockerfile +++ b/pkg/docker-engine/Dockerfile @@ -22,7 +22,7 @@ ARG GOWINRES_VERSION="v0.3.0" # common args ARG GO_IMAGE="golang" -ARG GO_VERSION="1.19.8" +ARG GO_VERSION="1.20.5" ARG GO_IMAGE_VARIANT="bullseye" ARG PKG_RELEASE="debian11" ARG PKG_TYPE="deb" diff --git a/pkg/docker-engine/Makefile b/pkg/docker-engine/Makefile index 064189f6..740af2f9 100644 --- a/pkg/docker-engine/Makefile +++ b/pkg/docker-engine/Makefile @@ -15,7 +15,7 @@ include ../../common/vars.mk # https://github.com/moby/moby/blob/23.0/Dockerfile#L3 -export GO_VERSION = 1.19.8 +export GO_VERSION = 1.20.5 DESTDIR ?= $(BASEDIR)/bin BAKE_DEFINITIONS ?= -f docker-bake.hcl -f ../../common/packages.hcl diff --git a/pkg/docker-engine/docker-bake.hcl b/pkg/docker-engine/docker-bake.hcl index 1562db87..d9773700 100644 --- a/pkg/docker-engine/docker-bake.hcl +++ b/pkg/docker-engine/docker-bake.hcl @@ -34,7 +34,7 @@ variable "GO_IMAGE" { default = "golang" } variable "GO_VERSION" { - default = "1.19.8" + default = "1.20.5" } variable "GO_IMAGE_VARIANT" { default = "bullseye" From 1d9b781b1a1d5eaa5f86568d7a2baa570674740d Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Tue, 8 Aug 2023 20:11:49 +0200 Subject: [PATCH 53/54] pkg(docker-cli): bump go to 1.20.7 Signed-off-by: CrazyMax --- pkg/docker-cli/Dockerfile | 2 +- pkg/docker-cli/Makefile | 2 +- pkg/docker-cli/docker-bake.hcl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/docker-cli/Dockerfile b/pkg/docker-cli/Dockerfile index 712be4a7..17633e99 100644 --- a/pkg/docker-cli/Dockerfile +++ b/pkg/docker-cli/Dockerfile @@ -22,7 +22,7 @@ ARG GOVERSIONINFO_VERSION="v1.3.0" # common args ARG GO_IMAGE="golang" -ARG GO_VERSION="1.20.5" +ARG GO_VERSION="1.20.7" ARG GO_IMAGE_VARIANT="bullseye" ARG PKG_RELEASE="debian11" ARG PKG_TYPE="deb" diff --git a/pkg/docker-cli/Makefile b/pkg/docker-cli/Makefile index 11c1827f..3c3884d2 100644 --- a/pkg/docker-cli/Makefile +++ b/pkg/docker-cli/Makefile @@ -15,7 +15,7 @@ include ../../common/vars.mk # https://github.com/docker/cli/blob/23.0/Dockerfile#L4 -export GO_VERSION = 1.20.5 +export GO_VERSION = 1.20.7 DESTDIR ?= $(BASEDIR)/bin BAKE_DEFINITIONS ?= -f docker-bake.hcl -f ../../common/packages.hcl diff --git a/pkg/docker-cli/docker-bake.hcl b/pkg/docker-cli/docker-bake.hcl index df0ad49e..3cdb8f9f 100644 --- a/pkg/docker-cli/docker-bake.hcl +++ b/pkg/docker-cli/docker-bake.hcl @@ -34,7 +34,7 @@ variable "GO_IMAGE" { default = "golang" } variable "GO_VERSION" { - default = "1.20.5" + default = "1.20.7" } variable "GO_IMAGE_VARIANT" { default = "bullseye" From 5670d1eb6e1dc01f37d1e5a902694b4585e4f262 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Tue, 8 Aug 2023 20:13:31 +0200 Subject: [PATCH 54/54] pkg(docker-engine): bump go to 1.20.7 Signed-off-by: CrazyMax --- pkg/docker-engine/Dockerfile | 2 +- pkg/docker-engine/Makefile | 2 +- pkg/docker-engine/docker-bake.hcl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/docker-engine/Dockerfile b/pkg/docker-engine/Dockerfile index 4964e18f..2bb2ee68 100644 --- a/pkg/docker-engine/Dockerfile +++ b/pkg/docker-engine/Dockerfile @@ -22,7 +22,7 @@ ARG GOWINRES_VERSION="v0.3.0" # common args ARG GO_IMAGE="golang" -ARG GO_VERSION="1.20.5" +ARG GO_VERSION="1.20.7" ARG GO_IMAGE_VARIANT="bullseye" ARG PKG_RELEASE="debian11" ARG PKG_TYPE="deb" diff --git a/pkg/docker-engine/Makefile b/pkg/docker-engine/Makefile index 740af2f9..d13e085c 100644 --- a/pkg/docker-engine/Makefile +++ b/pkg/docker-engine/Makefile @@ -15,7 +15,7 @@ include ../../common/vars.mk # https://github.com/moby/moby/blob/23.0/Dockerfile#L3 -export GO_VERSION = 1.20.5 +export GO_VERSION = 1.20.7 DESTDIR ?= $(BASEDIR)/bin BAKE_DEFINITIONS ?= -f docker-bake.hcl -f ../../common/packages.hcl diff --git a/pkg/docker-engine/docker-bake.hcl b/pkg/docker-engine/docker-bake.hcl index d9773700..a0052cb3 100644 --- a/pkg/docker-engine/docker-bake.hcl +++ b/pkg/docker-engine/docker-bake.hcl @@ -34,7 +34,7 @@ variable "GO_IMAGE" { default = "golang" } variable "GO_VERSION" { - default = "1.20.5" + default = "1.20.7" } variable "GO_IMAGE_VARIANT" { default = "bullseye"