Skip to content
This repository was archived by the owner on Oct 13, 2023. It is now read-only.

Commit 229ba25

Browse files
StefanSchererthaJeztah
authored andcommitted
Add rhel for s390x
Signed-off-by: Stefan Scherer <stefan.scherer@docker.com> (cherry picked from commit 6ea7ea0) Signed-off-by: Sebastiaan van Stijn <github@gone.nl> Upstream-commit: a281b4ca453cfd78d1181c2c84ee97d86b2aea32 Component: packaging
1 parent f63e79f commit 229ba25

2 files changed

Lines changed: 35 additions & 1 deletion

File tree

components/packaging/rpm/Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ SOURCES=$(addprefix rpmbuild/SOURCES/, $(SOURCE_FILES))
4242

4343
FEDORA_RELEASES := fedora-32 fedora-31 fedora-30
4444
CENTOS_RELEASES := centos-7 centos-8
45-
DISTROS := $(FEDORA_RELEASES) $(CENTOS_RELEASES)
45+
RHEL_RELEASES := rhel-7
46+
DISTROS := $(FEDORA_RELEASES) $(CENTOS_RELEASES) $(RHEL_RELEASES)
4647

4748
.PHONY: help
4849
help: ## show make targets
@@ -65,6 +66,9 @@ centos-8: RPMBUILD_EXTRA_FLAGS=--define '_without_btrfs 1'
6566
.PHONY: centos
6667
centos: $(CENTOS_RELEASES) ## build all centos rpm packages
6768

69+
.PHONY: rhel
70+
rhel: $(RHEL_RELEASES) ## build all rhel rpm packages
71+
6872
.PHONY: $(DISTROS)
6973
$(DISTROS): rpmbuild/SOURCES/engine.tgz rpmbuild/SOURCES/cli.tgz rpmbuild/SOURCES/docker.service rpmbuild/SOURCES/docker.socket rpmbuild/SOURCES/plugin-installers.tgz
7074
@echo "== Building packages for $@ =="
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
ARG GO_IMAGE
2+
ARG DISTRO=rhel
3+
ARG SUITE=7
4+
ARG BUILD_IMAGE=dockereng/${DISTRO}:${SUITE}-s390x
5+
6+
FROM ${GO_IMAGE} AS golang
7+
8+
FROM ${BUILD_IMAGE}
9+
ENV GOPROXY=direct
10+
ENV GO111MODULE=off
11+
ENV GOPATH=/go
12+
ENV PATH $PATH:/usr/local/go/bin:$GOPATH/bin
13+
ENV AUTO_GOPATH 1
14+
ENV DOCKER_BUILDTAGS seccomp selinux
15+
ENV RUNC_BUILDTAGS seccomp selinux
16+
ARG DISTRO
17+
ARG SUITE
18+
ENV DISTRO=${DISTRO}
19+
ENV SUITE=${SUITE}
20+
ENV CC=gcc
21+
22+
# In aarch64 (arm64) images, the altarch repo is specified as repository, but
23+
# failing, so replace the URL.
24+
RUN if [ -f /etc/yum.repos.d/CentOS-Sources.repo ]; then sed -i 's/altarch/centos/g' /etc/yum.repos.d/CentOS-Sources.repo; fi
25+
RUN yum install -y rpm-build rpmlint
26+
COPY SPECS /root/rpmbuild/SPECS
27+
RUN yum-builddep -y /root/rpmbuild/SPECS/*.spec
28+
COPY --from=golang /usr/local/go /usr/local/go
29+
WORKDIR /root/rpmbuild
30+
ENTRYPOINT ["/bin/rpmbuild"]

0 commit comments

Comments
 (0)