Skip to content
Merged
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
4 changes: 4 additions & 0 deletions rpm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ RPMBUILD_FLAGS?=-ba\
--define '_release $(word 2,$(GEN_RPM_VER))' \
--define '_version $(word 1,$(GEN_RPM_VER))' \
--define '_origversion $(word 4, $(GEN_RPM_VER))' \
$(RPMBUILD_EXTRA_FLAGS) \
$(SPECS)

# Additional flags may be necessary at some point
Expand Down Expand Up @@ -58,6 +59,9 @@ rpm: fedora centos ## build all rpm packages
.PHONY: fedora
fedora: $(FEDORA_RELEASES) ## build all fedora rpm packages

.PHONY: centos-8
centos-8: RPMBUILD_EXTRA_FLAGS=--define '_without_btrfs 1'

.PHONY: centos
centos: $(CENTOS_RELEASES) ## build all centos rpm packages

Expand Down
6 changes: 4 additions & 2 deletions rpm/SPECS/docker-ce.spec
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
%global debug_package %{nil}

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

Name: docker-ce
Version: %{_version}
Expand Down Expand Up @@ -29,7 +31,7 @@ Requires: xz
Requires: device-mapper-libs >= 1.02.90-1

BuildRequires: bash
BuildRequires: btrfs-progs-devel
%{?_with_btrfs:BuildRequires: btrfs-progs-devel}
BuildRequires: ca-certificates
BuildRequires: cmake
BuildRequires: device-mapper-devel
Expand Down Expand Up @@ -79,7 +81,7 @@ export DOCKER_GITCOMMIT=%{_gitcommit}
mkdir -p /go/src/github.com/docker
ln -s /root/rpmbuild/BUILD/src/engine /go/src/github.com/docker/docker

pushd engine
pushd /root/rpmbuild/BUILD/src/engine
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: can't we use an RPM variable here, like $RPM_BUILD_ROOT ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll look at some cleaning up in a follow-up 👍

for component in tini "proxy dynamic";do
TMP_GOPATH="/go" hack/dockerfile/install/install.sh $component
done
Expand Down
7 changes: 4 additions & 3 deletions rpm/centos-8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,16 @@ ENV GO111MODULE=off
ENV GOPATH=/go
ENV PATH $PATH:/usr/local/go/bin:$GOPATH/bin
ENV AUTO_GOPATH 1
ENV DOCKER_BUILDTAGS seccomp selinux
ENV DOCKER_BUILDTAGS exclude_graphdriver_btrfs seccomp selinux
ENV RUNC_BUILDTAGS seccomp selinux
ARG DISTRO
ARG SUITE
ENV DISTRO=${DISTRO}
ENV SUITE=${SUITE}
RUN yum install -y rpm-build rpmlint
RUN yum install -y rpm-build rpmlint yum-utils
RUN yum-config-manager --set-enabled PowerTools
COPY SPECS /root/rpmbuild/SPECS
RUN yum-builddep -y /root/rpmbuild/SPECS/*.spec
RUN yum-builddep --define '_without_btrfs 1' -y /root/rpmbuild/SPECS/*.spec
COPY --from=golang /usr/local/go /usr/local/go
WORKDIR /root/rpmbuild
ENTRYPOINT ["/bin/rpmbuild"]