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

Commit 09b724c

Browse files
committed
Fix CentOS 8 build
- Enable PowerTools repo - Disable building btrfs, which is no longer supported on CentOS/RHEL Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commit a03dda0) Signed-off-by: Sebastiaan van Stijn <github@gone.nl> Upstream-commit: f96d17612f38a7941e01e2bb70d0162d5e2fa08d Component: packaging
1 parent 5f18965 commit 09b724c

3 files changed

Lines changed: 12 additions & 5 deletions

File tree

components/packaging/rpm/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ RPMBUILD_FLAGS?=-ba\
3333
--define '_release $(word 2,$(GEN_RPM_VER))' \
3434
--define '_version $(word 1,$(GEN_RPM_VER))' \
3535
--define '_origversion $(word 4, $(GEN_RPM_VER))' \
36+
$(RPMBUILD_EXTRA_FLAGS) \
3637
$(SPECS)
3738
RUN?=$(RPMBUILD) rpmbuild-$@/$(ARCH) $(RPMBUILD_FLAGS)
3839

@@ -58,6 +59,9 @@ rpm: fedora centos ## build all rpm packages
5859
.PHONY: fedora
5960
fedora: $(FEDORA_RELEASES) ## build all fedora rpm packages
6061

62+
.PHONY: centos-8
63+
centos-8: RPMBUILD_EXTRA_FLAGS=--define '_without_btrfs 1'
64+
6165
.PHONY: centos
6266
centos: $(CENTOS_RELEASES) ## build all centos rpm packages
6367

components/packaging/rpm/SPECS/docker-ce.spec

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
%global debug_package %{nil}
22

3+
# BTRFS is enabled by default, but can be disabled by defining _without_btrfs
4+
%{!?_with_btrfs: %{!?_without_btrfs: %define _with_btrfs 1}}
35

46
Name: docker-ce
57
Version: %{_version}
@@ -33,7 +35,7 @@ Requires: xz
3335
Requires: device-mapper-libs >= 1.02.90-1
3436

3537
BuildRequires: bash
36-
BuildRequires: btrfs-progs-devel
38+
%{?_with_btrfs:BuildRequires: btrfs-progs-devel}
3739
BuildRequires: ca-certificates
3840
BuildRequires: cmake
3941
BuildRequires: device-mapper-devel
@@ -83,7 +85,7 @@ export DOCKER_GITCOMMIT=%{_gitcommit}
8385
mkdir -p /go/src/github.com/docker
8486
ln -s /root/rpmbuild/BUILD/src/engine /go/src/github.com/docker/docker
8587

86-
pushd engine
88+
pushd /root/rpmbuild/BUILD/src/engine
8789
for component in tini "proxy dynamic";do
8890
TMP_GOPATH="/go" hack/dockerfile/install/install.sh $component
8991
done

components/packaging/rpm/centos-8/Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,16 @@ ENV GO111MODULE=off
1111
ENV GOPATH=/go
1212
ENV PATH $PATH:/usr/local/go/bin:$GOPATH/bin
1313
ENV AUTO_GOPATH 1
14-
ENV DOCKER_BUILDTAGS seccomp selinux
14+
ENV DOCKER_BUILDTAGS exclude_graphdriver_btrfs seccomp selinux
1515
ENV RUNC_BUILDTAGS seccomp selinux
1616
ARG DISTRO
1717
ARG SUITE
1818
ENV DISTRO=${DISTRO}
1919
ENV SUITE=${SUITE}
20-
RUN yum install -y rpm-build rpmlint
20+
RUN yum install -y rpm-build rpmlint yum-utils
21+
RUN yum-config-manager --set-enabled PowerTools
2122
COPY SPECS /root/rpmbuild/SPECS
22-
RUN yum-builddep -y /root/rpmbuild/SPECS/*.spec
23+
RUN yum-builddep --define '_without_btrfs 1' -y /root/rpmbuild/SPECS/*.spec
2324
COPY --from=golang /usr/local/go /usr/local/go
2425
WORKDIR /root/rpmbuild
2526
ENTRYPOINT ["/bin/rpmbuild"]

0 commit comments

Comments
 (0)