File tree Expand file tree Collapse file tree 3 files changed +74
-3
lines changed Expand file tree Collapse file tree 3 files changed +74
-3
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ SCAN_GITCOMMIT?=$(shell cd $(realpath $(CURDIR)/../src/github.com/docker/scan-cl
13
13
BUILDX_GITCOMMIT? =$(shell cd $(realpath $(CURDIR ) /../src/github.com/docker/buildx) && git rev-parse --short HEAD)
14
14
15
15
ifdef BUILD_IMAGE
16
- BUILD_IMAGE_FLAG=--build-arg $(BUILD_IMAGE)
16
+ BUILD_IMAGE_FLAG=--build-arg BUILD_IMAGE= $(BUILD_IMAGE)
17
17
endif
18
18
BUILD?=DOCKER_BUILDKIT =1 \
19
19
docker build \
@@ -61,7 +61,7 @@ RUN?=docker run --rm \
61
61
FEDORA_RELEASES ?= fedora-37 fedora-36 fedora-35
62
62
CENTOS_RELEASES ?= centos-7 centos-8 centos-9
63
63
ifeq ($(ARCH ) ,s390x)
64
- RHEL_RELEASES ?= rhel-7
64
+ RHEL_RELEASES ?= rhel-7 rhel-8 rhel-9
65
65
else
66
66
RHEL_RELEASES ?=
67
67
endif
@@ -80,7 +80,7 @@ clean: ## remove build artifacts
80
80
-docker builder prune -f --filter until=24h
81
81
82
82
.PHONY : rpm
83
- rpm : fedora centos # # build all rpm packages
83
+ rpm : fedora centos rhel # # build all rpm packages
84
84
85
85
.PHONY : fedora
86
86
fedora : $(FEDORA_RELEASES ) # # build all fedora rpm packages
@@ -91,6 +91,9 @@ centos-8 centos-9: RPMBUILD_EXTRA_FLAGS=--define '_without_btrfs 1'
91
91
.PHONY : centos
92
92
centos : $(CENTOS_RELEASES ) # # build all centos rpm packages
93
93
94
+ .PHONY : rhel-8 rhel-9
95
+ rhel-8 rhel-9 : RPMBUILD_EXTRA_FLAGS=--define '_without_btrfs 1'
96
+
94
97
.PHONY : rhel
95
98
rhel : $(RHEL_RELEASES ) # # build all rhel rpm packages
96
99
Original file line number Diff line number Diff line change
1
+ ARG GO_IMAGE
2
+ ARG DISTRO=rhel
3
+ ARG SUITE=8
4
+ ARG BUILD_IMAGE=dockereng/${DISTRO}:${SUITE}-s390x
5
+
6
+ FROM ${GO_IMAGE} AS golang
7
+
8
+ FROM ${BUILD_IMAGE}
9
+ ENV GOPROXY=https://proxy.golang.org|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 exclude_graphdriver_btrfs
15
+ ARG DISTRO
16
+ ARG SUITE
17
+ ENV DISTRO=${DISTRO}
18
+ ENV SUITE=${SUITE}
19
+
20
+ RUN yum install -y rpm-build rpmlint libarchive yum-utils
21
+ COPY SPECS /root/rpmbuild/SPECS
22
+
23
+ # TODO change once we support scan-plugin on other architectures
24
+ RUN \
25
+ if [ "$(uname -m)" = "x86_64" ]; then \
26
+ yum-builddep --define '_without_btrfs 1' -y /root/rpmbuild/SPECS/*.spec; \
27
+ else \
28
+ yum-builddep --define '_without_btrfs 1' -y /root/rpmbuild/SPECS/docker-c*.spec; \
29
+ yum-builddep --define '_without_btrfs 1' -y /root/rpmbuild/SPECS/docker-b*.spec; \
30
+ fi
31
+
32
+ COPY --from=golang /usr/local/go /usr/local/go
33
+ WORKDIR /root/rpmbuild
34
+ ENTRYPOINT ["/bin/rpmbuild" ]
Original file line number Diff line number Diff line change
1
+ ARG GO_IMAGE
2
+ ARG DISTRO=rhel
3
+ ARG SUITE=9
4
+ ARG BUILD_IMAGE=dockereng/${DISTRO}:${SUITE}-s390x
5
+
6
+ FROM ${GO_IMAGE} AS golang
7
+
8
+ FROM ${BUILD_IMAGE}
9
+ ENV GOPROXY=https://proxy.golang.org|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 exclude_graphdriver_btrfs
15
+ ARG DISTRO
16
+ ARG SUITE
17
+ ENV DISTRO=${DISTRO}
18
+ ENV SUITE=${SUITE}
19
+
20
+ RUN yum install -y rpm-build rpmlint libarchive yum-utils
21
+ COPY SPECS /root/rpmbuild/SPECS
22
+
23
+ # TODO change once we support scan-plugin on other architectures
24
+ RUN \
25
+ if [ "$(uname -m)" = "x86_64" ]; then \
26
+ yum-builddep --define '_without_btrfs 1' -y /root/rpmbuild/SPECS/*.spec; \
27
+ else \
28
+ yum-builddep --define '_without_btrfs 1' -y /root/rpmbuild/SPECS/docker-c*.spec; \
29
+ yum-builddep --define '_without_btrfs 1' -y /root/rpmbuild/SPECS/docker-b*.spec; \
30
+ fi
31
+
32
+ COPY --from=golang /usr/local/go /usr/local/go
33
+ WORKDIR /root/rpmbuild
34
+ ENTRYPOINT ["/bin/rpmbuild" ]
You can’t perform that action at this time.
0 commit comments