diff --git a/rpm/Makefile b/rpm/Makefile index dcd2edae40..6d937bf8e5 100644 --- a/rpm/Makefile +++ b/rpm/Makefile @@ -64,8 +64,10 @@ RUN?=docker run --rm \ FEDORA_RELEASES ?= fedora-40 fedora-41 CENTOS_RELEASES ?= centos-9 centos-10 RHEL_RELEASES ?= rhel-8 rhel-9 +OPENCLOUDOS_RELEASES ?= opencloudos-9 +TENCENTOS_RELEASES ?= tencentos-4 -DISTROS := $(FEDORA_RELEASES) $(CENTOS_RELEASES) $(RHEL_RELEASES) +DISTROS := $(FEDORA_RELEASES) $(CENTOS_RELEASES) $(RHEL_RELEASES) $(OPENCLOUDOS_RELEASES) $(TENCENTOS_RELEASES) BUNDLES := $(patsubst %,rpmbuild/bundles-ce-%-$(DPKG_ARCH).tar.gz,$(DISTROS)) .PHONY: help @@ -79,7 +81,7 @@ clean: ## remove build artifacts -docker builder prune -f --filter until=24h .PHONY: rpm -rpm: fedora centos ## build all rpm packages +rpm: fedora centos opencloudos tencentos ## build all rpm packages .PHONY: fedora fedora: $(FEDORA_RELEASES) ## build all fedora rpm packages @@ -90,6 +92,12 @@ centos: $(CENTOS_RELEASES) ## build all centos rpm packages .PHONY: rhel rhel: $(RHEL_RELEASES) ## build all rhel rpm packages +.PHONY: opencloudos +opencloudos: $(OPENCLOUDOS_RELEASES) ## build all opencloudos rpm packages + +.PHONY: tencentos +tencentos: $(TENCENTOS_RELEASES) ## build all tencentos rpm packages + .PHONY: $(DISTROS) $(DISTROS): sources @echo "== Building packages for $@ ==" diff --git a/rpm/opencloudos-9/Dockerfile b/rpm/opencloudos-9/Dockerfile new file mode 100644 index 0000000000..e17eacbcd7 --- /dev/null +++ b/rpm/opencloudos-9/Dockerfile @@ -0,0 +1,36 @@ +# syntax=docker/dockerfile:1 + +ARG GO_IMAGE=golang:latest +ARG DISTRO=opencloudos +ARG SUITE=9 +ARG BUILD_IMAGE=docker.io/opencloudos/opencloudos${SUITE}-minimal + +FROM ${GO_IMAGE} AS golang + +FROM ${BUILD_IMAGE} +ENV GOPROXY=https://proxy.golang.org|direct +ENV GO111MODULE=off +ENV GOPATH=/go +ENV GOTOOLCHAIN=local +ENV PATH=$PATH:/usr/local/go/bin:$GOPATH/bin +ENV AUTO_GOPATH=1 +ENV DOCKER_BUILDTAGS=exclude_graphdriver_btrfs +ARG DISTRO +ARG SUITE +ENV DISTRO=${DISTRO} +ENV SUITE=${SUITE} + +# OpenCloudOS GPG key handling +RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-* || true + +# Install build dependencies +RUN dnf install -y rpm-build dnf-plugins-core + +# Enable additional repositories if needed +RUN dnf config-manager --set-enabled crb || dnf config-manager --set-enabled powertools || true + +COPY --link SPECS /root/rpmbuild/SPECS +RUN dnf builddep -y /root/rpmbuild/SPECS/*.spec +COPY --link --from=golang /usr/local/go /usr/local/go +WORKDIR /root/rpmbuild +ENTRYPOINT ["/bin/rpmbuild"] diff --git a/rpm/tencentos-4/Dockerfile b/rpm/tencentos-4/Dockerfile new file mode 100644 index 0000000000..72a5fbdd89 --- /dev/null +++ b/rpm/tencentos-4/Dockerfile @@ -0,0 +1,36 @@ +# syntax=docker/dockerfile:1 + +ARG GO_IMAGE=golang:latest +ARG DISTRO=tencentos +ARG SUITE=4 +ARG BUILD_IMAGE=docker.io/tencentos/tencentos${SUITE}-minimal + +FROM ${GO_IMAGE} AS golang + +FROM ${BUILD_IMAGE} +ENV GOPROXY=https://proxy.golang.org|direct +ENV GO111MODULE=off +ENV GOPATH=/go +ENV GOTOOLCHAIN=local +ENV PATH=$PATH:/usr/local/go/bin:$GOPATH/bin +ENV AUTO_GOPATH=1 +ENV DOCKER_BUILDTAGS=exclude_graphdriver_btrfs +ARG DISTRO +ARG SUITE +ENV DISTRO=${DISTRO} +ENV SUITE=${SUITE} + +# TencentOS GPG key handling +RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-* || true + +# Install build dependencies +RUN dnf install -y rpm-build dnf-plugins-core + +# Enable additional repositories if needed +RUN dnf config-manager --set-enabled crb || dnf config-manager --set-enabled powertools || true + +COPY --link SPECS /root/rpmbuild/SPECS +RUN dnf builddep -y /root/rpmbuild/SPECS/*.spec +COPY --link --from=golang /usr/local/go /usr/local/go +WORKDIR /root/rpmbuild +ENTRYPOINT ["/bin/rpmbuild"]