diff --git a/Makefile b/Makefile index 1139b091..7bb1c7a6 100644 --- a/Makefile +++ b/Makefile @@ -40,7 +40,7 @@ include common/packages.mk GHA_MATRIX ?= minimal ifeq ($(GHA_MATRIX),minimal) - GHA_RELEASES := debian10 debian11 debian12 ubuntu2004 ubuntu2204 ubuntu2310 centos7 centos9 oraclelinux7 fedora39 static + GHA_RELEASES := debian10 debian11 debian12 ubuntu2004 ubuntu2204 centos9 oraclelinux9 fedora39 static else ifeq ($(GHA_MATRIX),all) GHA_RELEASES := $(PKG_DEB_RELEASES) $(PKG_RPM_RELEASES) static else diff --git a/README.md b/README.md index 9d6b96c0..351dc30f 100644 --- a/README.md +++ b/README.md @@ -287,8 +287,8 @@ $ make $ make pkg-deb # build debian bullseye packages $ make run-pkg-debian11 -# build centos 7 packages -$ make run-pkg-centos7 +# build centos 9 packages +$ make run-pkg-centos9 ``` To create a new release of Buildx v0.9.1: diff --git a/common/packages.hcl b/common/packages.hcl index 70eee628..35c8c1d1 100644 --- a/common/packages.hcl +++ b/common/packages.hcl @@ -152,50 +152,6 @@ target "_pkg-ubuntu2204" { } } -target "_pkg-ubuntu2304" { - args = { - PKG_RELEASE = "ubuntu2304" - PKG_TYPE = "deb" - PKG_DISTRO = "ubuntu" - PKG_DISTRO_ID = "23.04" - PKG_DISTRO_SUITE = "lunar" - PKG_BASE_IMAGE = "ubuntu:lunar" - } -} - -target "_pkg-ubuntu2310" { - args = { - PKG_RELEASE = "ubuntu2310" - PKG_TYPE = "deb" - PKG_DISTRO = "ubuntu" - PKG_DISTRO_ID = "23.10" - PKG_DISTRO_SUITE = "mantic" - PKG_BASE_IMAGE = "ubuntu:mantic" - } -} - -target "_pkg-centos7" { - args = { - PKG_RELEASE = "centos7" - PKG_TYPE = "rpm" - PKG_DISTRO = "centos" - PKG_DISTRO_ID = "7" - PKG_DISTRO_SUITE = "7" - PKG_BASE_IMAGE = "centos:7" - } -} - -target "_pkg-centos8" { - args = { - PKG_RELEASE = "centos8" - PKG_TYPE = "rpm" - PKG_DISTRO = "centos" - PKG_DISTRO_ID = "8" - PKG_DISTRO_SUITE = "8" - PKG_BASE_IMAGE = "quay.io/centos/centos:stream8" - } -} - target "_pkg-centos9" { args = { PKG_RELEASE = "centos9" @@ -240,17 +196,6 @@ target "_pkg-fedora39" { } } -target "_pkg-oraclelinux7" { - args = { - PKG_RELEASE = "oraclelinux7" - PKG_TYPE = "rpm" - PKG_DISTRO = "oraclelinux" - PKG_DISTRO_ID = "7" - PKG_DISTRO_SUITE = "7" - PKG_BASE_IMAGE = "oraclelinux:7" - } -} - target "_pkg-oraclelinux8" { args = { PKG_RELEASE = "oraclelinux8" diff --git a/common/packages.mk b/common/packages.mk index 901a76d0..01feb364 100644 --- a/common/packages.mk +++ b/common/packages.mk @@ -15,8 +15,8 @@ # don't forget to add/update pkg-info-* rule and update packages.hcl as well # if you add a new release PKG_APK_RELEASES ?= alpine314 alpine315 alpine316 -PKG_DEB_RELEASES ?= debian10 debian11 debian12 ubuntu2004 ubuntu2204 ubuntu2304 ubuntu2310 raspbian10 raspbian11 raspbian12 -PKG_RPM_RELEASES ?= centos7 centos8 centos9 fedora37 fedora38 fedora39 oraclelinux7 oraclelinux8 oraclelinux9 +PKG_DEB_RELEASES ?= debian10 debian11 debian12 ubuntu2004 ubuntu2204 raspbian10 raspbian11 raspbian12 +PKG_RPM_RELEASES ?= centos9 fedora37 fedora38 fedora39 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#,$##' @@ -138,45 +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-ubuntu2304 -pkg-info-ubuntu2304: - $(eval PKG_TYPE = deb) - $(eval PKG_DISTRO = ubuntu) - $(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) - -.PHONY: pkg-info-ubuntu2310 -pkg-info-ubuntu2310: - $(eval PKG_TYPE = deb) - $(eval PKG_DISTRO = ubuntu) - $(eval PKG_DISTRO_ID = 23.10) - $(eval PKG_DISTRO_SUITE = mantic) - $(eval PKG_BASE_IMAGE = ubuntu:mantic) - @# FIXME: linux/riscv64 is not supported (golang base image does not support riscv64) - $(eval PKG_SUPPORTED_PLATFORMS = linux/amd64 linux/arm64 linux/arm/v7 linux/ppc64le linux/s390x) - -.PHONY: pkg-info-centos7 -pkg-info-centos7: - $(eval PKG_TYPE = rpm) - $(eval PKG_DISTRO = centos) - $(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) - -.PHONY: pkg-info-centos8 -pkg-info-centos8: - $(eval PKG_TYPE = rpm) - $(eval PKG_DISTRO = centos) - $(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) - .PHONY: pkg-info-centos9 pkg-info-centos9: $(eval PKG_TYPE = rpm) @@ -214,15 +175,6 @@ pkg-info-fedora39: $(eval PKG_BASE_IMAGE = fedora:39) $(eval PKG_SUPPORTED_PLATFORMS = linux/amd64 linux/arm64 linux/ppc64le linux/s390x) -.PHONY: pkg-info-oraclelinux7 -pkg-info-oraclelinux7: - $(eval PKG_TYPE = rpm) - $(eval PKG_DISTRO = oraclelinux) - $(eval PKG_DISTRO_ID = 7) - $(eval PKG_DISTRO_SUITE = 7) - $(eval PKG_BASE_IMAGE = oraclelinux:7) - $(eval PKG_SUPPORTED_PLATFORMS = linux/amd64 linux/arm64) - .PHONY: pkg-info-oraclelinux8 pkg-info-oraclelinux8: $(eval PKG_TYPE = rpm) diff --git a/common/scripts/rpm-init.sh b/common/scripts/rpm-init.sh index 1fddddbb..3770fe65 100755 --- a/common/scripts/rpm-init.sh +++ b/common/scripts/rpm-init.sh @@ -35,43 +35,11 @@ EOF } case "$pkgrelease" in - centos7) - [ -f /etc/yum.repos.d/CentOS-Sources.repo ] && sed -i 's/altarch/centos/g' /etc/yum.repos.d/CentOS-Sources.repo - yum install -y rpm-build rpmlint epel-release - # FIXME: centos 7 has an old git version (1.8) not compatible with gen-ver - # script so install it from Software Collection as a workaround. - # https://wiki.centos.org/AdditionalResources/Repositories/SCL - yum install -y centos-release-scl-rh - swcolInstallGit "227" - # remove software collections repo when Git installed otherwise wrong deps - # are picked up by yum-builddep - yum remove -y centos-release-scl-rh - ;; - centos8) - [ -f /etc/yum.repos.d/CentOS-Stream-Sources.repo ] && sed -i 's/altarch/centos/g' /etc/yum.repos.d/CentOS-Stream-Sources.repo - [ -f /etc/yum.repos.d/CentOS-Stream-PowerTools.repo ] && sed -i 's/enabled=0/enabled=1/g' /etc/yum.repos.d/CentOS-Stream-PowerTools.repo - rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial - dnf install -y git rpm-build rpmlint dnf-plugins-core epel-release epel-next-release - ;; centos9) rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial dnf install -y git rpm-build rpmlint dnf-plugins-core epel-release epel-next-release dnf config-manager --set-enabled crb ;; - oraclelinux7) - [ -f /etc/yum.repos.d/CentOS-Sources.repo ] && sed -i 's/altarch/centos/g' /etc/yum.repos.d/CentOS-Sources.repo - yum install -y rpm-build rpmlint oraclelinux-release-el7 oracle-softwarecollection-release-el7 oracle-epel-release-el7 - yum-config-manager --enable ol7_addons ol7_latest ol7_optional_latest ol7_software_collections - # FIXME: oracle linux 7 has an old git version (1.9) not compatible with - # gen-ver script so install it from Software Collection as a workaround. - # https://docs.oracle.com/en/operating-systems/oracle-linux/scl-user/ol-scl-relnotes.html#section_e3v_nbl_cr - yum install -y oracle-softwarecollection-release-el7 - yum-config-manager --enable ol7_software_collections - swcolInstallGit "29" - # disable software collections repo when Git installed otherwise wrong deps - # are picked up by yum-builddep - yum-config-manager --disable ol7_software_collections - ;; oraclelinux8) dnf install -y git rpm-build rpmlint dnf-plugins-core oraclelinux-release-el8 oracle-epel-release-el8 dnf config-manager --enable ol8_addons ol8_codeready_builder diff --git a/common/scripts/verify-rpm-init.sh b/common/scripts/verify-rpm-init.sh index 5d305f6e..a865e825 100755 --- a/common/scripts/verify-rpm-init.sh +++ b/common/scripts/verify-rpm-init.sh @@ -24,23 +24,11 @@ fi set -e case "$pkgrelease" in - centos7) - yum install -y findutils epel-release - ;; - centos8) - [ -f /etc/yum.repos.d/CentOS-Stream-PowerTools.repo ] && sed -i 's/enabled=0/enabled=1/g' /etc/yum.repos.d/CentOS-Stream-PowerTools.repo - rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial - dnf install -y findutils dnf-plugins-core epel-release epel-next-release - ;; centos9) rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial dnf install -y findutils dnf-plugins-core epel-release epel-next-release dnf config-manager --set-enabled crb ;; - oraclelinux7) - yum install -y findutils oraclelinux-release-el7 oracle-epel-release-el7 - yum-config-manager --enable ol7_addons ol7_latest ol7_optional_latest - ;; oraclelinux8) dnf install -y findutils dnf-plugins-core oraclelinux-release-el8 oracle-epel-release-el8 dnf config-manager --enable ol8_addons ol8_codeready_builder diff --git a/pkg/buildx/rpm/docker-buildx-plugin.spec b/pkg/buildx/rpm/docker-buildx-plugin.spec index a74a92b2..55e4fe75 100644 --- a/pkg/buildx/rpm/docker-buildx-plugin.spec +++ b/pkg/buildx/rpm/docker-buildx-plugin.spec @@ -12,13 +12,7 @@ URL: https://github.com/docker/buildx Vendor: Docker Packager: Docker -# 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 Enhances: docker-ce-cli -%endif BuildRequires: bash diff --git a/pkg/compose/rpm/docker-compose-plugin.spec b/pkg/compose/rpm/docker-compose-plugin.spec index 9be87524..725be68c 100644 --- a/pkg/compose/rpm/docker-compose-plugin.spec +++ b/pkg/compose/rpm/docker-compose-plugin.spec @@ -12,13 +12,7 @@ URL: https://github.com/docker/compose Vendor: Docker Packager: Docker -# 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 Enhances: docker-ce-cli -%endif BuildRequires: bash BuildRequires: make diff --git a/pkg/credential-helpers/verify.Dockerfile b/pkg/credential-helpers/verify.Dockerfile index 5266c22e..e4f802b4 100644 --- a/pkg/credential-helpers/verify.Dockerfile +++ b/pkg/credential-helpers/verify.Dockerfile @@ -70,7 +70,7 @@ RUN --mount=from=bin-folder,target=/build < Requires: /bin/sh Requires: /usr/sbin/groupadd -# 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-buildx-plugin -Requires: docker-compose-plugin -%else Recommends: docker-buildx-plugin Recommends: docker-compose-plugin -%endif BuildRequires: gcc BuildRequires: libtool-ltdl-devel diff --git a/pkg/docker-cli/verify.Dockerfile b/pkg/docker-cli/verify.Dockerfile index 1469be98..21b817a3 100644 --- a/pkg/docker-cli/verify.Dockerfile +++ b/pkg/docker-cli/verify.Dockerfile @@ -70,14 +70,7 @@ RUN --mount=from=bin-folder,target=/build < Requires: /usr/sbin/groupadd Requires: docker-ce-cli -# CentOS 7 and RHEL 7 do not yet support weak dependencies -# -# Note that we're not using <= 7 here, to account for other RPM distros, such -# as Fedora, which would not have the rhel macro set (so default to 0). -%if 0%{?rhel} == 7 -Requires: docker-ce-rootless-extras -%else Recommends: docker-ce-rootless-extras -%endif Requires: container-selinux >= 2:2.74 Requires: libseccomp >= 2.3 Requires: systemd diff --git a/pkg/docker-engine/scripts/pkg-rpm-build.sh b/pkg/docker-engine/scripts/pkg-rpm-build.sh index ed49341e..37e7a67d 100755 --- a/pkg/docker-engine/scripts/pkg-rpm-build.sh +++ b/pkg/docker-engine/scripts/pkg-rpm-build.sh @@ -68,7 +68,7 @@ if [ -n "$(xx-info variant)" ]; then fi case "$PKG_RELEASE" in - centos7|centos8|centos9|oraclelinux*) + centos9|oraclelinux*) export DOCKER_BUILDTAGS="exclude_graphdriver_btrfs $DOCKER_BUILDTAGS" ;; esac diff --git a/pkg/sbom/rpm/docker-sbom-plugin.spec b/pkg/sbom/rpm/docker-sbom-plugin.spec index ca743e5e..682ac876 100644 --- a/pkg/sbom/rpm/docker-sbom-plugin.spec +++ b/pkg/sbom/rpm/docker-sbom-plugin.spec @@ -12,13 +12,7 @@ URL: https://github.com/docker/sbom Vendor: Docker Packager: Docker -# 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 Enhances: docker-ce-cli -%endif BuildRequires: bash diff --git a/pkg/scan/rpm/docker-scan-plugin.spec b/pkg/scan/rpm/docker-scan-plugin.spec index 74c2dc85..6c591b04 100644 --- a/pkg/scan/rpm/docker-scan-plugin.spec +++ b/pkg/scan/rpm/docker-scan-plugin.spec @@ -12,13 +12,7 @@ URL: https://github.com/docker/scan-cli-plugin Vendor: Docker Packager: Docker -# 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 Enhances: docker-ce-cli -%endif BuildRequires: bash BuildRequires: make