-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[release/1.6 backport] deb, rpm: fix runc using incorrect version #386
Draft
thaJeztah
wants to merge
7
commits into
docker:release/1.6
Choose a base branch
from
thaJeztah:1.6_backport_fix_runc_version
base: release/1.6
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
ecdae52
remove GOTOOLCHAIN env-vars
thaJeztah 010029b
remove some GOTOOLCHAIN=local env-vars
thaJeztah f4b2129
disable btrfs for all CentOS/RHEL versions
thaJeztah 98bca18
rpm: remove version-constraint for container-selinux
thaJeztah c46cb46
update examples with more current distros
thaJeztah 57ad062
rpm: update macros used in spec
thaJeztah 8ef2340
deb, rpm: fix runc using incorrect version
thaJeztah File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,7 +57,7 @@ Source3: runc | |
%if %{undefined suse_version} | ||
# amazonlinux2 doesn't have container-selinux either | ||
%if "%{?dist}" != ".amzn2" | ||
Requires: container-selinux >= 2:2.74 | ||
Requires: container-selinux | ||
%endif | ||
Requires: libseccomp | ||
%else | ||
|
@@ -70,21 +70,6 @@ BuildRequires: gcc | |
BuildRequires: systemd | ||
BuildRequires: libseccomp-devel | ||
|
||
# containerd 1.7.x now use Linux kernel headers for btrfs, so we only | ||
# need this dependency when building older (1.5.x, 1.6.x) releases. | ||
# TODO(thaJeztah): remove btrfs build-dependencies once containerd 1.6 reaches EOL. | ||
%if "%{major_minor}" == "1.6" || "%{major_minor}" == "1.5" | ||
%if %{undefined rhel} || 0%{?rhel} < 8 | ||
%if %{defined suse_version} | ||
# SUSE flavors | ||
BuildRequires: libbtrfs-devel | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oof, here too |
||
%else | ||
# Fedora / others, and CentOS/RHEL < 8 | ||
BuildRequires: btrfs-progs-devel | ||
%endif | ||
%endif | ||
%endif | ||
|
||
%{?systemd_requires} | ||
|
||
%description | ||
|
@@ -96,50 +81,48 @@ low-level storage and network attachments, etc. | |
|
||
|
||
%prep | ||
rm -rf %{_topdir}/BUILD/ | ||
if [ ! -d %{_topdir}/SOURCES/containerd ]; then | ||
rm -rf %{_builddir} | ||
if [ ! -d %{_sourcedir}/containerd ]; then | ||
# Copy over our source code from our gopath to our source directory | ||
cp -rf /go/src/%{import_path} %{_topdir}/SOURCES/containerd; | ||
cp -rf /go/src/%{import_path} %{_sourcedir}/containerd; | ||
fi | ||
# symlink the go source path to our build directory | ||
ln -s /go/src/%{import_path} %{_topdir}/BUILD | ||
ln -s /go/src/%{import_path} %{_builddir} | ||
|
||
if [ ! -d %{_topdir}/SOURCES/runc ]; then | ||
if [ ! -d %{_sourcedir}/runc ]; then | ||
# Copy over our source code from our gopath to our source directory | ||
cp -rf /go/src/github.com/opencontainers/runc %{_topdir}/SOURCES/runc | ||
cp -rf /go/src/github.com/opencontainers/runc %{_sourcedir}/runc | ||
fi | ||
cd %{_topdir}/BUILD/ | ||
cd %{_builddir} | ||
|
||
|
||
%build | ||
cd %{_topdir}/BUILD | ||
GO111MODULE=auto make man | ||
cd %{_builddir} | ||
make man | ||
|
||
BUILDTAGS="" | ||
%if %{defined rhel} && 0%{?rhel} >= 8 | ||
# btrfs support was removed in CentOS/RHEL 8 | ||
BUILDTAGS="${BUILDTAGS} no_btrfs" | ||
%else | ||
# TODO(thaJeztah): remove this block once 1.5.x and 1.6.x reach EOL. | ||
%if %{defined rhel} && 0%{?rhel} >= 7 && "%{major_minor}" != "1.6" && "%{major_minor}" != "1.5" | ||
# containerd 1.7.x now use linux kernel headers for btrfs, which is not | ||
# provided by CentOS/RHEL 7, so don't build with btrfs for 1.7+. | ||
|
||
# TODO(thaJeztah): can we remove the version compare, or would that exclude other RHEL derivatives (Fedora, etc)? | ||
%if %{defined rhel} && 0%{?rhel} >= 7 | ||
# btrfs support was removed in CentOS/RHEL 8, and containerd 1.7+ uses | ||
# linux kernel headers for btrfs, which are not provided by CentOS/RHEL 7 | ||
# so build without btrfs support for any CentOS/RHEL version. | ||
BUILDTAGS="${BUILDTAGS} no_btrfs" | ||
%endif | ||
%endif | ||
|
||
GO111MODULE=auto make -C /go/src/%{import_path} VERSION=%{getenv:VERSION} REVISION=%{getenv:REF} PACKAGE=%{getenv:PACKAGE} BUILDTAGS="${BUILDTAGS}" | ||
make -C /go/src/%{import_path} VERSION=%{getenv:VERSION} REVISION=%{getenv:REF} PACKAGE=%{getenv:PACKAGE} BUILDTAGS="${BUILDTAGS}" | ||
|
||
# Remove containerd-stress, as we're not shipping it as part of the packages | ||
rm -f bin/containerd-stress | ||
bin/containerd --version | ||
bin/ctr --version | ||
|
||
GO111MODULE=auto make -C /go/src/github.com/opencontainers/runc BINDIR=%{_topdir}/BUILD/bin runc install | ||
# Unset the VERSION variable as it's meant for containerd's version, not runc. | ||
env -u VERSION make -C /go/src/github.com/opencontainers/runc BINDIR=%{_builddir}/bin runc install | ||
|
||
|
||
%install | ||
cd %{_topdir}/BUILD | ||
cd %{_builddir} | ||
mkdir -p %{buildroot}%{_bindir} | ||
install -D -m 0755 bin/* %{buildroot}%{_bindir} | ||
install -D -m 0644 %{S:1} %{buildroot}%{_unitdir}/containerd.service | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would be why 👀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤦 I started with only the first two commits, then thought "we no longer do rhel/centos7 so let me pick those commits as well.
Got myself to blame for not mentioning that those also assumed containerd 1.7, and I didn't look here because another PR also started failing on the btrfs headers 🙈