2016-03-27 12:27:18 +02:00
|
|
|
#
|
|
|
|
# spec file for package containerd
|
|
|
|
#
|
2021-01-30 02:14:08 +01:00
|
|
|
# Copyright (c) 2021 SUSE LLC
|
2016-03-27 12:27:18 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2019-03-25 07:51:51 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2016-03-27 12:27:18 +02:00
|
|
|
#
|
2017-10-26 20:00:35 +02:00
|
|
|
# nodebuginfo
|
2016-03-27 12:27:18 +02:00
|
|
|
|
2016-06-17 16:40:17 +02:00
|
|
|
|
2017-11-24 11:06:55 +01:00
|
|
|
#Compat macro for new _fillupdir macro introduced in Nov 2017
|
|
|
|
%if ! %{defined _fillupdir}
|
|
|
|
%define _fillupdir /var/adm/fillup-templates
|
|
|
|
%endif
|
|
|
|
|
2018-08-24 10:10:17 +02:00
|
|
|
# MANUAL: Update the git_version.
|
2021-10-06 05:05:55 +02:00
|
|
|
%define git_version 5b46e404f6b9f661a205e28d59c982d3634148f8
|
|
|
|
%define git_short 5b46e404f6b9
|
2017-12-19 04:42:51 +01:00
|
|
|
|
2021-02-02 23:19:50 +01:00
|
|
|
Name: containerd
|
2021-10-06 05:05:55 +02:00
|
|
|
Version: 1.4.11
|
2016-03-27 12:27:18 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: Standalone OCI Container Daemon
|
2016-06-17 16:40:17 +02:00
|
|
|
License: Apache-2.0
|
2019-10-17 20:16:23 +02:00
|
|
|
Group: System/Management
|
2020-06-03 13:37:55 +02:00
|
|
|
URL: https://containerd.tools
|
2021-02-02 23:19:50 +01:00
|
|
|
Source: %{name}-%{version}_%{git_short}.tar.xz
|
|
|
|
Source1: %{name}-rpmlintrc
|
2017-10-26 20:00:35 +02:00
|
|
|
BuildRequires: fdupes
|
2018-08-15 09:09:11 +02:00
|
|
|
BuildRequires: glibc-devel-static
|
|
|
|
BuildRequires: go-go-md2man
|
|
|
|
BuildRequires: libbtrfs-devel >= 3.8
|
|
|
|
BuildRequires: libseccomp-devel >= 2.2
|
|
|
|
BuildRequires: pkg-config
|
2020-06-26 13:38:45 +02:00
|
|
|
# Due to a limitation in openSUSE's Go packaging we cannot have a BuildRequires
|
2021-10-06 05:05:55 +02:00
|
|
|
# for 'golang(API) >= 1.16' here, so just require 1.16 exactly. bsc#1172608
|
|
|
|
BuildRequires: go1.16
|
2017-12-19 04:42:51 +01:00
|
|
|
# We provide a git revision so that Docker can require it properly.
|
|
|
|
Provides: %{name}-git = %{git_version}
|
2019-02-08 11:37:59 +01:00
|
|
|
# Currently runc is the only supported runtime for containerd. We pin the same
|
|
|
|
# flavour as us, to avoid mixing (the version pinning is done by docker.spec).
|
2021-02-04 01:26:14 +01:00
|
|
|
Requires: runc
|
2016-10-25 14:11:15 +02:00
|
|
|
Requires(post): %fillup_prereq
|
2021-02-02 23:19:50 +01:00
|
|
|
# KUBIC-SPECIFIC: There used to be a kubic-specific containerd package, but now
|
|
|
|
# it's been merged into the one package. bsc#1181677
|
|
|
|
Obsoletes: %{name}-kubic < %{version}
|
|
|
|
Provides: %{name}-kubic = %{version}
|
|
|
|
Obsoletes: %{name} = 0.2.5+gitr569_2a5e70c
|
|
|
|
Obsoletes: %{name}_2a5e70c
|
2018-02-02 11:30:25 +01:00
|
|
|
ExcludeArch: s390
|
2016-08-23 18:06:44 +02:00
|
|
|
|
2016-03-27 12:27:18 +02:00
|
|
|
%description
|
2016-04-01 14:49:25 +02:00
|
|
|
Containerd is a daemon with an API and a command line client, to manage
|
2016-03-27 12:27:18 +02:00
|
|
|
containers on one machine. It uses runC to run containers according to the OCI
|
2016-04-01 14:49:25 +02:00
|
|
|
specification. Containerd has advanced features such as seccomp and user
|
2016-03-27 12:27:18 +02:00
|
|
|
namespace support as well as checkpoint and restore for cloning and live
|
|
|
|
migration of containers.
|
|
|
|
|
2016-03-27 13:20:12 +02:00
|
|
|
%package ctr
|
2016-03-27 13:14:42 +02:00
|
|
|
Summary: Client for %{name}
|
2019-10-17 20:16:23 +02:00
|
|
|
Group: System/Management
|
2016-03-27 13:14:42 +02:00
|
|
|
Requires: %{name} = %{version}
|
2021-02-02 23:19:50 +01:00
|
|
|
# KUBIC-SPECIFIC: There used to be a kubic-specific containerd package, but now
|
|
|
|
# it's been merged into the one package.
|
|
|
|
Obsoletes: %{name}-ctr = 0.2.5+gitr569_2a5e70c
|
|
|
|
Obsoletes: %{name}-ctr-kubic <= %{version}
|
|
|
|
Obsoletes: %{name}-ctr_2a5e70c
|
2016-03-27 13:14:42 +02:00
|
|
|
|
2016-03-27 13:20:12 +02:00
|
|
|
%description ctr
|
2016-03-27 13:14:42 +02:00
|
|
|
Standalone client for containerd, which allows management of containerd containers
|
|
|
|
separately from Docker.
|
|
|
|
|
2016-03-27 12:27:18 +02:00
|
|
|
%prep
|
2021-02-02 23:19:50 +01:00
|
|
|
%setup -q -n %{name}-%{version}_%{git_short}
|
2016-03-27 12:27:18 +02:00
|
|
|
|
|
|
|
%build
|
2021-02-01 02:07:51 +01:00
|
|
|
# NOTE: containerd will switch to go.mod in 1.5.x so this can be removed after
|
|
|
|
# we update to that version.
|
|
|
|
|
2016-08-18 11:49:59 +02:00
|
|
|
# Do not use symlinks. If you want to run the unit tests for this package at
|
|
|
|
# some point during the build and you need to directly use go list directly it
|
|
|
|
# will get confused by symlinks.
|
2017-12-19 04:42:51 +01:00
|
|
|
export GOPATH=$HOME/go
|
|
|
|
export PROJECT=$HOME/go/src/github.com/containerd/containerd
|
2021-10-06 05:17:01 +02:00
|
|
|
export GO111MODULE=off
|
2017-12-19 04:42:51 +01:00
|
|
|
mkdir -p $PROJECT
|
|
|
|
rm -rf $PROJECT/*
|
|
|
|
cp -ar * $PROJECT
|
2016-03-27 12:27:18 +02:00
|
|
|
|
2018-08-15 09:09:11 +02:00
|
|
|
BUILDTAGS="apparmor selinux seccomp"
|
2021-02-01 02:07:51 +01:00
|
|
|
make -C "$PROJECT"\
|
2018-08-15 09:09:11 +02:00
|
|
|
BUILDTAGS="$BUILDTAGS" \
|
|
|
|
VERSION="v%{version}" \
|
|
|
|
REVISION="%{git_version}"
|
2020-12-21 08:22:35 +01:00
|
|
|
# TODO: Fix man-page generation.
|
|
|
|
#make man
|
2018-08-15 09:09:11 +02:00
|
|
|
|
2021-02-01 02:07:51 +01:00
|
|
|
cp -r "$PROJECT/bin" bin
|
2016-03-27 12:27:18 +02:00
|
|
|
|
|
|
|
%install
|
2018-08-15 09:09:11 +02:00
|
|
|
# Install binaries.
|
2021-02-01 02:07:51 +01:00
|
|
|
pushd bin/
|
|
|
|
for bin in containerd{,-shim*}
|
|
|
|
do
|
|
|
|
install -D -m755 "$bin" "%{buildroot}/%{_sbindir}/$bin"
|
|
|
|
done
|
|
|
|
# "ctr" is a bit too generic.
|
2021-02-02 23:19:50 +01:00
|
|
|
install -D -m755 ctr %{buildroot}/%{_sbindir}/%{name}-ctr
|
2021-02-01 02:07:51 +01:00
|
|
|
popd
|
|
|
|
|
2018-08-15 09:09:11 +02:00
|
|
|
# Set up dummy configuration.
|
2021-02-02 23:19:50 +01:00
|
|
|
install -d -m755 %{buildroot}/%{_sysconfdir}/%{name}
|
|
|
|
echo "# See containerd-config.toml(5) for documentation." >%{buildroot}/%{_sysconfdir}/%{name}/config.toml
|
2018-08-15 09:09:11 +02:00
|
|
|
|
|
|
|
# Man pages.
|
2020-12-21 08:22:35 +01:00
|
|
|
# TODO: Fix man page generation.
|
|
|
|
#for file in man/*
|
|
|
|
#do
|
|
|
|
# section="${file##*.}"
|
|
|
|
# install -D -m644 "$file" "%{buildroot}/%{_mandir}/man$section/$(basename "$file")"
|
|
|
|
#done
|
2021-02-02 23:19:50 +01:00
|
|
|
#ln -s ctr.1 %{buildroot}/%{_mandir}/man1/%{name}-ctr.1
|
2018-08-15 09:09:11 +02:00
|
|
|
|
2017-10-26 20:00:35 +02:00
|
|
|
%fdupes %{buildroot}
|
|
|
|
|
2016-03-27 12:27:18 +02:00
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2018-06-13 12:19:14 +02:00
|
|
|
%doc README.md
|
2018-08-15 09:09:11 +02:00
|
|
|
%license LICENSE
|
2021-02-02 23:19:50 +01:00
|
|
|
%dir %{_sysconfdir}/%{name}
|
|
|
|
%config %{_sysconfdir}/%{name}/config.toml
|
2021-02-01 02:07:51 +01:00
|
|
|
%{_sbindir}/containerd
|
|
|
|
%{_sbindir}/containerd-shim*
|
2020-12-21 08:22:35 +01:00
|
|
|
# TODO: Fix man page generation.
|
2021-02-02 23:19:50 +01:00
|
|
|
#%{_mandir}/man*/%{name}*
|
2020-12-21 08:22:35 +01:00
|
|
|
#%exclude %{_mandir}/man1/*ctr.1*
|
2016-03-27 13:14:42 +02:00
|
|
|
|
2016-03-27 13:20:12 +02:00
|
|
|
%files ctr
|
2021-02-01 02:07:51 +01:00
|
|
|
%{_sbindir}/containerd-ctr
|
2020-12-21 08:22:35 +01:00
|
|
|
# TODO: Fix man page generation.
|
|
|
|
#%{_mandir}/man1/*ctr.1*
|
2016-06-17 16:40:17 +02:00
|
|
|
|
|
|
|
%changelog
|