From fe587c98535659ef1f637b68deef1ab0b42d7355505a36d93f97752298c8120e Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Fri, 2 Dec 2022 21:39:17 +0000 Subject: [PATCH] Accepting request 1038948 from home:dirkmueller:Factory - add devel subpackage, which is needed by open-vm-tools OBS-URL: https://build.opensuse.org/request/show/1038948 OBS-URL: https://build.opensuse.org/package/show/Virtualization:containers/containerd?expand=0&rev=136 --- containerd.changes | 5 +++++ containerd.spec | 25 ++++++++++++++++++++++--- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/containerd.changes b/containerd.changes index 00aca35..76b9288 100644 --- a/containerd.changes +++ b/containerd.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Nov 29 16:01:11 UTC 2022 - Dirk Müller + +- add devel subpackage, which is needed by open-vm-tools + ------------------------------------------------------------------- Tue Jun 7 07:22:02 UTC 2022 - Aleksa Sarai diff --git a/containerd.spec b/containerd.spec index 3bf118a..a2abcf8 100644 --- a/containerd.spec +++ b/containerd.spec @@ -26,6 +26,9 @@ %define git_version 10c12954828e7c7c9b6e0ea9b0c02b01407d3ae1 %define git_short 10c12954828e +%global provider_prefix github.com/containerd/containerd +%global import_path %{provider_prefix} + Name: containerd Version: 1.6.6 Release: 0 @@ -39,12 +42,11 @@ Source2: %{name}.service BuildRequires: fdupes BuildRequires: glibc-devel-static BuildRequires: go-go-md2man +BuildRequires: golang-packaging BuildRequires: libbtrfs-devel >= 3.8 BuildRequires: libseccomp-devel >= 2.2 BuildRequires: pkg-config -# Due to a limitation in openSUSE's Go packaging we cannot have a BuildRequires -# for 'golang(API) >= 1.18' here, so just require 1.18 exactly. bsc#1172608 -BuildRequires: go1.18 +BuildRequires: golang(API) = 1.18 # We provide a git revision so that Docker can require it properly. Provides: %{name}-git = %{git_version} # Currently runc is the only supported runtime for containerd. We pin the same @@ -80,10 +82,20 @@ Obsoletes: %{name}-ctr_2a5e70c Standalone client for containerd, which allows management of containerd containers separately from Docker. +%package devel +Summary: Source code for containerd +Group: Development/Libraries/Go +Requires: %{name} = %{version} + +%description devel +This package contains the source code needed for building packages that +reference the following Go import paths: github.com/containerd/containerd + %prep %setup -q -n %{name}-%{version}_%{git_short} %build +%goprep %{import_path} BUILDTAGS="apparmor selinux seccomp" make \ BUILDTAGS="$BUILDTAGS" \ @@ -95,6 +107,7 @@ make \ cp -r "$PROJECT/bin" bin %install +%gosrc # Install binaries. pushd bin/ for bin in containerd{,-shim*} @@ -153,4 +166,10 @@ install -Dp -m644 %{SOURCE2} %{buildroot}%{_unitdir}/%{name}.service # TODO: Fix man page generation. #%{_mandir}/man1/*ctr.1* +%files devel +%license LICENSE +%dir %{go_contribsrcdir}/github.com +%dir %{go_contribsrcdir}/github.com/containerd +%{go_contribsrcdir}/%{import_path} + %changelog