Skip to content
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

Liunan/containerd2 #11029

Draft
wants to merge 3 commits into
base: 3.0-dev
Choose a base branch
from
Draft
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
2 changes: 1 addition & 1 deletion LICENSES-AND-NOTICES/SPECS/LICENSES-MAP.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions LICENSES-AND-NOTICES/SPECS/data/licenses.json
Original file line number Diff line number Diff line change
Expand Up @@ -2221,6 +2221,7 @@
"cloud-hypervisor-cvm",
"cmake-fedora",
"containerd",
"containerd2",
"coredns",
"dcos-cli",
"debugedit",
Expand Down
15 changes: 15 additions & 0 deletions SPECS/containerd2/containerd.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[Unit]
Description=containerd container runtime
Documentation=https://containerd.io
After=network.target

[Service]
ExecStartPre=/sbin/modprobe overlay
ExecStart=/usr/bin/containerd
Restart=always
Delegate=yes
KillMode=process
OOMScoreAdjust=-999

[Install]
WantedBy=multi-user.target
25 changes: 25 additions & 0 deletions SPECS/containerd2/containerd.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#root = "/var/lib/containerd"
#state = "/run/containerd"
#subreaper = true
#oom_score = 0

#[grpc]
# address = "/run/containerd/containerd.sock"
# uid = 0
# gid = 0

#[debug]
# address = "/run/containerd/debug.sock"
# uid = 0
# gid = 0
# level = "info"

version = 2
[plugins]
[plugins."io.containerd.grpc.v1.cri"]
[plugins."io.containerd.grpc.v1.cri".containerd]
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes]
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc]
runtime_type = "io.containerd.runc.v2"
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc.options]
SystemdCgroup = true
7 changes: 7 additions & 0 deletions SPECS/containerd2/containerd2.signatures.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"Signatures": {
"containerd.service": "a07bfcf412669b06673190b0779f48e652c9adcf1758289e849a00802804eec8",
"containerd.toml": "793d4f11a4e69bdb3b1903da2cdf76b7f32dbc97197b12d295a05ecc284e230e",
"containerd-2.0.0.tar.gz": "346d644e1b96e1f4a39bfe9d1eb0eb01ca676f806c12d95e5dbe35325bbc1780"
}
}
88 changes: 88 additions & 0 deletions SPECS/containerd2/containerd2.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
%global debug_package %{nil}
%define upstream_name containerd
%define commit_hash 207ad711eabd375a01713109a8a197d197ff6542

Summary: Industry-standard container runtime
Name: %{upstream_name}2
Version: 2.0.0
Release: 1%{?dist}
License: ASL 2.0
Group: Tools/Container
URL: https://www.containerd.io
Vendor: Microsoft Corporation
Distribution: Azure Linux

Source0: https://github.com/containerd/containerd/archive/v%{version}.tar.gz#/%{upstream_name}-%{version}.tar.gz
Source1: containerd.service
Source2: containerd.toml

%{?systemd_requires}

BuildRequires: git
BuildRequires: golang < 1.23
BuildRequires: go-md2man
BuildRequires: make
BuildRequires: systemd-rpm-macros

Requires: runc >= 1.2.1

# This package replaces the old name of moby-containerd
Provides: moby-containerd = %{version}-%{release}
Obsoletes: moby-containerd < %{version}-%{release}

%description
containerd is an industry-standard container runtime with an emphasis on
simplicity, robustness and portability. It is available as a daemon for Linux
and Windows, which can manage the complete container lifecycle of its host
system: image transfer and storage, container execution and supervision,
low-level storage and network attachments, etc.

containerd is designed to be embedded into a larger system, rather than being
used directly by developers or end-users.

%prep
%autosetup -p1 -n %{upstream_name}-%{version}

%build
export BUILDTAGS="-mod=vendor"
make VERSION="%{version}" REVISION="%{commit_hash}" binaries man

%check
export BUILDTAGS="-mod=vendor"
make VERSION="%{version}" REVISION="%{commit_hash}" test

%install
make VERSION="%{version}" REVISION="%{commit_hash}" DESTDIR="%{buildroot}" PREFIX="/usr" install install-man

mkdir -p %{buildroot}/%{_unitdir}
install -D -p -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/containerd.service
install -D -p -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/containerd/config.toml
install -vdm 755 %{buildroot}/opt/containerd/{bin,lib}

%post
%systemd_post containerd.service

if [ $1 -eq 1 ]; then # Package install
systemctl enable containerd.service > /dev/null 2>&1 || :
systemctl start containerd.service > /dev/null 2>&1 || :
fi

%preun
%systemd_preun containerd.service

%postun
%systemd_postun_with_restart containerd.service

%files
%license LICENSE NOTICE
%{_bindir}/*
%{_mandir}/*
%config(noreplace) %{_unitdir}/containerd.service
%config(noreplace) %{_sysconfdir}/containerd/config.toml
%dir /opt/containerd
%dir /opt/containerd/bin
%dir /opt/containerd/lib

%changelog
* Mon Nov 11 2024 Nan Liu <[email protected]> - 2.0.0-1
- Initial containerd 2.0.0 version
2 changes: 1 addition & 1 deletion SPECS/libseccomp/libseccomp.signatures.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"Signatures": {
"libseccomp-2.5.4.tar.gz": "d82902400405cf0068574ef3dc1fe5f5926207543ba1ae6f8e7a1576351dcbdb"
"libseccomp-2.5.5.tar.gz": "248a2c8a4d9b9858aa6baf52712c34afefcf9c9e94b76dce02c1c9aa25fb3375"
}
}
5 changes: 4 additions & 1 deletion SPECS/libseccomp/libseccomp.spec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Summary: Enhanced seccomp library
Name: libseccomp
Version: 2.5.4
Version: 2.5.5
Release: 1%{?dist}
License: LGPLv2
Vendor: Microsoft Corporation
Expand Down Expand Up @@ -62,6 +62,9 @@ find %{buildroot} -type f -name "*.la" -delete -print
%{_mandir}/man3/*

%changelog
* Tue Nov 05 2024 Nan Liu <[email protected]> - 2.5.5-1
- Upgrade to 2.5.5 as other older version is no longer supported upstream

* Fri Oct 27 2023 CBL-Mariner Servicing Account <[email protected]> - 2.5.4-1
- Auto-upgrade to 2.5.4 - Azure Linux 3.0 - package upgrades

Expand Down
2 changes: 1 addition & 1 deletion SPECS/runc/runc.signatures.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"Signatures": {
"runc-1.1.12.tar.gz": "be31b07d6a54a8f234016501c300ad04b6c428c56588e7eca8c3b663308db208"
"runc-1.2.1.tar.gz": "1418fdaf46e0d6da75b62b4ad788fb9bccbe8a1b6318675205bf27cc03a02427"
}
}
7 changes: 5 additions & 2 deletions SPECS/runc/runc.spec
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
Summary: CLI tool for spawning and running containers per OCI spec.
Name: runc
# update "commit_hash" above when upgrading version
Version: 1.1.12
Release: 2%{?dist}
Version: 1.2.1
Release: 1%{?dist}
License: ASL 2.0
Vendor: Microsoft Corporation
Distribution: Azure Linux
Expand Down Expand Up @@ -43,6 +43,9 @@ make install-man DESTDIR=%{buildroot} PREFIX=%{_prefix}
%{_mandir}/*

%changelog
* Tue Nov 05 2024 Nan Liu <[email protected]> - 1.2.1-1
- Bump version to 1.2.1 required by containerd 2.0.0

* Tue Oct 15 2024 Muhammad Falak <[email protected]> - 1.1.12-2
- Pin golang version to <= 1.22

Expand Down
18 changes: 14 additions & 4 deletions cgmanifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2022,6 +2022,16 @@
}
}
},
{
"component": {
"type": "other",
"other": {
"name": "containerd2",
"version": "2.0.0",
"downloadUrl": "https://github.com/containerd/containerd/archive/v2.0.0.tar.gz"
}
}
},
{
"component": {
"type": "other",
Expand Down Expand Up @@ -10831,8 +10841,8 @@
"type": "other",
"other": {
"name": "libseccomp",
"version": "2.5.4",
"downloadUrl": "https://github.com/seccomp/libseccomp/releases/download/v2.5.4/libseccomp-2.5.4.tar.gz"
"version": "2.5.5",
"downloadUrl": "https://github.com/seccomp/libseccomp/releases/download/v2.5.5/libseccomp-2.5.5.tar.gz"
}
}
},
Expand Down Expand Up @@ -27054,8 +27064,8 @@
"type": "other",
"other": {
"name": "runc",
"version": "1.1.12",
"downloadUrl": "https://github.com/opencontainers/runc/archive/v1.1.12.tar.gz"
"version": "1.2.1",
"downloadUrl": "https://github.com/opencontainers/runc/archive/v1.2.1.tar.gz"
}
}
},
Expand Down
Loading