Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add distro for opencloudos and tencentos #1138

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions rpm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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 $@ =="
Expand Down
36 changes: 36 additions & 0 deletions rpm/opencloudos-9/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
36 changes: 36 additions & 0 deletions rpm/tencentos-4/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]