2016-03-21 09:36:29 +01:00
|
|
|
#
|
|
|
|
# spec file for package runc
|
|
|
|
#
|
2024-01-02 04:04:06 +01:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2016-03-21 09:36:29 +01: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-02-12 15:09:26 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2016-03-21 09:36:29 +01:00
|
|
|
#
|
2017-08-16 21:16:32 +02:00
|
|
|
# nodebuginfo
|
2016-03-21 09:36:29 +01:00
|
|
|
|
2016-08-17 12:45:55 +02:00
|
|
|
|
2021-02-02 23:19:53 +01:00
|
|
|
# MANUAL: Make sure you update this each time you update runc.
|
2024-04-05 08:50:38 +02:00
|
|
|
%define git_version 275e6d85f78a9d0a90d9a714ba5f667561a4b0b9
|
|
|
|
%define git_short 275e6d85f78a
|
2017-08-16 21:16:32 +02:00
|
|
|
|
2017-08-11 14:10:02 +02:00
|
|
|
%define project github.com/opencontainers/runc
|
|
|
|
|
2016-03-21 09:36:29 +01:00
|
|
|
Name: runc
|
2024-04-05 08:50:38 +02:00
|
|
|
# RPM doesn't handle semver rc releases nicely, so for rc releases we need to
|
|
|
|
# do something different.
|
|
|
|
%define upstream_version 1.2.0-rc.1
|
|
|
|
Version: 1.2.0~rc1
|
2016-03-21 09:36:29 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: Tool for spawning and running OCI containers
|
|
|
|
License: Apache-2.0
|
|
|
|
Group: System/Management
|
2020-01-14 05:49:43 +01:00
|
|
|
URL: https://github.com/opencontainers/runc
|
2024-04-05 08:50:38 +02:00
|
|
|
Source0: https://github.com/opencontainers/runc/releases/download/v%{upstream_version}/runc.tar.xz#/runc-%{upstream_version}.tar.xz
|
|
|
|
Source1: https://github.com/opencontainers/runc/releases/download/v%{upstream_version}/runc.tar.xz.asc#/runc-%{upstream_version}.tar.xz.asc
|
2017-08-19 15:24:20 +02:00
|
|
|
Source2: runc.keyring
|
2023-04-27 11:57:52 +02:00
|
|
|
BuildRequires: diffutils
|
2016-09-23 16:37:04 +02:00
|
|
|
BuildRequires: fdupes
|
2023-03-29 09:12:21 +02:00
|
|
|
BuildRequires: go
|
2016-03-27 17:19:30 +02:00
|
|
|
BuildRequires: go-go-md2man
|
2016-03-21 09:36:29 +01:00
|
|
|
BuildRequires: libseccomp-devel
|
|
|
|
BuildRequires: libselinux-devel
|
2016-03-27 17:19:30 +02:00
|
|
|
Recommends: criu
|
2021-02-02 23:19:53 +01:00
|
|
|
# There used to be a docker-runc package which was specifically for Docker.
|
|
|
|
# Since Docker now tracks upstream more consistently, we use the same package
|
|
|
|
# but we need to obsolete the old one. bsc#1181677
|
2021-07-20 11:40:45 +02:00
|
|
|
Obsoletes: docker-runc < %{version}
|
|
|
|
Provides: docker-runc = %{version}
|
2021-02-02 23:19:53 +01:00
|
|
|
# KUBIC-SPECIFIC: There used to be a kubic-specific docker-runc package, but
|
|
|
|
# now it's been merged into the one package. bsc#1181677
|
2021-07-20 11:40:45 +02:00
|
|
|
Obsoletes: docker-runc-kubic < %{version}
|
|
|
|
Provides: docker-runc-kubic = %{version}
|
2021-02-02 23:19:53 +01:00
|
|
|
Obsoletes: docker-runc = 0.1.1+gitr2819_50a19c6
|
|
|
|
Obsoletes: docker-runc_50a19c6
|
2022-05-23 05:15:57 +02:00
|
|
|
ExcludeArch: s390
|
2016-03-21 09:36:29 +01:00
|
|
|
|
2021-12-14 06:24:53 +01:00
|
|
|
# Construct "git describe --dirty --long --always".
|
2024-04-05 08:50:38 +02:00
|
|
|
%define git_describe v%{upstream_version}-0-g%{git_short}
|
2021-12-14 06:24:53 +01:00
|
|
|
|
2016-03-21 09:36:29 +01:00
|
|
|
%description
|
|
|
|
runc is a CLI tool for spawning and running containers according to the OCI
|
|
|
|
specification. It is designed to be as minimal as possible, and is the workhorse
|
|
|
|
of Docker. It was originally designed to be a replacement for LXC within Docker,
|
|
|
|
and has grown to become a separate project entirely.
|
|
|
|
|
|
|
|
%prep
|
2024-04-05 08:50:38 +02:00
|
|
|
%setup -q -n %{name}-%{upstream_version}
|
2024-03-21 04:51:32 +01:00
|
|
|
%autopatch -p1
|
2016-03-21 09:36:29 +01:00
|
|
|
|
|
|
|
%build
|
2021-02-02 23:19:53 +01:00
|
|
|
# build runc
|
2021-12-14 06:24:53 +01:00
|
|
|
make BUILDTAGS="seccomp" COMMIT="%{git_describe}" runc
|
2021-02-02 23:19:53 +01:00
|
|
|
# build man pages
|
2016-03-27 17:19:30 +02:00
|
|
|
man/md2man-all.sh
|
|
|
|
|
2023-04-27 11:57:52 +02:00
|
|
|
# make sure that our keyring copy is identical to upstream.
|
|
|
|
our_keyring=$(sha256sum <"%{SOURCE2}")
|
|
|
|
src_keyring=$(sha256sum <runc.keyring)
|
|
|
|
if [ "$our_keyring" != "$src_keyring" ]; then
|
|
|
|
echo "keyring file doesn't match upstream"
|
|
|
|
diff -u "%{SOURCE2}" runc.keyring
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2016-03-21 09:36:29 +01:00
|
|
|
%install
|
2021-02-02 23:19:53 +01:00
|
|
|
# We install to /usr/sbin/runc as per upstream and create a symlink in /usr/bin
|
2018-10-31 16:30:13 +01:00
|
|
|
# for rootless tools.
|
2021-02-02 23:19:53 +01:00
|
|
|
install -D -m0755 %{name} %{buildroot}%{_sbindir}/%{name}
|
|
|
|
install -m0755 -d %{buildroot}%{_bindir}
|
2018-10-31 16:30:13 +01:00
|
|
|
ln -s %{_sbindir}/%{name} %{buildroot}%{_bindir}/%{name}
|
2016-12-28 11:08:10 +01:00
|
|
|
|
2017-08-11 14:10:02 +02:00
|
|
|
# Man pages.
|
2021-02-02 23:19:53 +01:00
|
|
|
install -d -m0755 %{buildroot}%{_mandir}/man8
|
|
|
|
install -m0644 man/man8/runc*.8 %{buildroot}%{_mandir}/man8
|
2016-03-27 17:19:30 +02:00
|
|
|
|
2017-08-11 14:10:02 +02:00
|
|
|
%fdupes %{buildroot}
|
2016-09-23 16:37:04 +02:00
|
|
|
|
2016-03-21 09:36:29 +01:00
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2018-06-13 17:25:29 +02:00
|
|
|
%doc README.md
|
|
|
|
%license LICENSE
|
2016-03-30 16:18:58 +02:00
|
|
|
%{_sbindir}/%{name}
|
2018-10-31 16:30:13 +01:00
|
|
|
%{_bindir}/%{name}
|
2016-03-27 17:19:30 +02:00
|
|
|
%{_mandir}/man8/runc*.8.gz
|
2016-08-17 12:45:55 +02:00
|
|
|
|
|
|
|
%changelog
|