Skip to content

Commit

Permalink
pkg(docker-engine): remove btrfs dependencies
Browse files Browse the repository at this point in the history
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
  • Loading branch information
crazy-max committed Jan 21, 2023
1 parent 15bb8a5 commit 5a8be54
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 23 deletions.
11 changes: 2 additions & 9 deletions pkg/docker-engine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -153,14 +153,7 @@ RUN <<EOT
exit 1
fi
set -x
case "$PKG_RELEASE" in
centos8|centos9|oraclelinux*)
$builddepCmd --define '_without_btrfs 1' -y /root/rpmbuild/SPECS/*.spec
;;
*)
$builddepCmd -y /root/rpmbuild/SPECS/*.spec
;;
esac
$builddepCmd -y /root/rpmbuild/SPECS/*.spec
EOT
WORKDIR /root/rpmbuild
ARG DOCKER_ENGINE_REF
Expand Down Expand Up @@ -206,7 +199,7 @@ ARG DOCKER_ENGINE_REF
ARG NIGHTLY_BUILD
WORKDIR /build
ARG TARGETPLATFORM
RUN xx-apt-get install -y gcc libc6-dev libapparmor-dev libbtrfs-dev libdevmapper-dev libltdl-dev libseccomp-dev libsecret-1-dev libsystemd-dev libudev-dev pkg-config
RUN xx-apt-get install -y gcc libc6-dev libapparmor-dev libdevmapper-dev libltdl-dev libseccomp-dev libsecret-1-dev libsystemd-dev libudev-dev pkg-config
RUN --mount=type=bind,source=scripts/pkg-static-build.sh,target=/usr/local/bin/pkg-static-build \
--mount=type=bind,from=common-scripts,source=gen-ver.sh,target=/usr/local/bin/gen-ver \
--mount=type=bind,from=common-scripts,source=fix-cc.sh,target=/usr/local/bin/fix-cc \
Expand Down
1 change: 0 additions & 1 deletion pkg/docker-engine/deb/control
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ Build-Depends: ca-certificates,
dh-apparmor,
debhelper (>= 10~) | dh-systemd,
gcc,
libbtrfs-dev | btrfs-tools,
libc-dev,
libdevmapper-dev,
libltdl-dev,
Expand Down
6 changes: 0 additions & 6 deletions pkg/docker-engine/rpm/docker-ce.spec
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
%global debug_package %{nil}

# BTRFS is enabled by default, but can be disabled by defining _without_btrfs
%if %{undefined _with_btrfs} && %{undefined _without_btrfs}
%define _with_btrfs 1
%endif

Name: docker-ce
Version: %{_version}
Release: %{_release}%{?dist}
Expand Down Expand Up @@ -35,7 +30,6 @@ Requires: tar
Requires: xz

BuildRequires: bash
%{?_with_btrfs:BuildRequires: btrfs-progs-devel}
BuildRequires: ca-certificates
BuildRequires: cmake
BuildRequires: device-mapper-devel
Expand Down
7 changes: 0 additions & 7 deletions pkg/docker-engine/scripts/pkg-rpm-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,6 @@ if [ -n "$(xx-info variant)" ]; then
pkgoutput="${pkgoutput}/$(xx-info variant)"
fi

case "$PKG_RELEASE" in
centos7|centos8|centos9|oraclelinux*)
rpmDefine+=(--define "_without_btrfs 1")
export DOCKER_BUILDTAGS="exclude_graphdriver_btrfs $DOCKER_BUILDTAGS"
;;
esac

set -x

rpmbuild --target $(xx-info rhel-arch) $PKG_RPM_BUILDFLAGS "${rpmDefine[@]}" /root/rpmbuild/SPECS/*.spec
Expand Down

0 comments on commit 5a8be54

Please sign in to comment.