Skip to content

Commit 7fcb9f7

Browse files
committed
disable btrfs for all CentOS/RHEL versions
Now that we no longer have to take 1.5/1.6 into account, we must unconditionally disable brtfs for CentOS and RHEL, as no version provides the Linux kernel headers for btrfs Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent b062731 commit 7fcb9f7

2 files changed

Lines changed: 7 additions & 29 deletions

File tree

debian/control

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@ Source: containerd.io
22
Section: devel
33
Priority: optional
44
Maintainer: Containerd team <[email protected]>
5-
# btrfs dependencies no longer needed for containerd 1.7 and up, which now
6-
# uses the Linux kernel headers for this.
7-
# TODO(thaJeztah): remove btrfs build-dependencies once containerd 1.6 reaches EOL.
8-
Build-Depends: libbtrfs-dev | btrfs-tools ,
9-
debhelper (>= 10~) | dh-systemd,
5+
Build-Depends: debhelper (>= 10~) | dh-systemd,
106
pkg-config,
117
libseccomp-dev
128
Standards-Version: 4.1.4

rpm/containerd.spec

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -70,21 +70,6 @@ BuildRequires: gcc
7070
BuildRequires: systemd
7171
BuildRequires: libseccomp-devel
7272

73-
# containerd 1.7.x now use Linux kernel headers for btrfs, so we only
74-
# need this dependency when building older (1.5.x, 1.6.x) releases.
75-
# TODO(thaJeztah): remove btrfs build-dependencies once containerd 1.6 reaches EOL.
76-
%if "%{major_minor}" == "1.6" || "%{major_minor}" == "1.5"
77-
%if %{undefined rhel} || 0%{?rhel} < 8
78-
%if %{defined suse_version}
79-
# SUSE flavors
80-
BuildRequires: libbtrfs-devel
81-
%else
82-
# Fedora / others, and CentOS/RHEL < 8
83-
BuildRequires: btrfs-progs-devel
84-
%endif
85-
%endif
86-
%endif
87-
8873
%{?systemd_requires}
8974

9075
%description
@@ -116,17 +101,14 @@ cd %{_topdir}/BUILD
116101
make man
117102

118103
BUILDTAGS=""
119-
%if %{defined rhel} && 0%{?rhel} >= 8
120-
# btrfs support was removed in CentOS/RHEL 8
121-
BUILDTAGS="${BUILDTAGS} no_btrfs"
122-
%else
123-
# TODO(thaJeztah): remove this block once 1.5.x and 1.6.x reach EOL.
124-
%if %{defined rhel} && 0%{?rhel} >= 7 && "%{major_minor}" != "1.6" && "%{major_minor}" != "1.5"
125-
# containerd 1.7.x now use linux kernel headers for btrfs, which is not
126-
# provided by CentOS/RHEL 7, so don't build with btrfs for 1.7+.
104+
105+
# TODO(thaJeztah): can we remove the version compare, or would that exclude other RHEL derivatives (Fedora, etc)?
106+
%if %{defined rhel} && 0%{?rhel} >= 7
107+
# btrfs support was removed in CentOS/RHEL 8, and containerd 1.7+ uses
108+
# linux kernel headers for btrfs, which are not provided by CentOS/RHEL 7
109+
# so build without btrfs support for any CentOS/RHEL version.
127110
BUILDTAGS="${BUILDTAGS} no_btrfs"
128111
%endif
129-
%endif
130112

131113
make -C /go/src/%{import_path} VERSION=%{getenv:VERSION} REVISION=%{getenv:REF} PACKAGE=%{getenv:PACKAGE} BUILDTAGS="${BUILDTAGS}"
132114

0 commit comments

Comments
 (0)