2019-10-12 03:11:07 +03:00
|
|
|
%define debug_package %{nil}
|
|
|
|
%define import_path github.com/opencontainers/runc
|
2017-09-08 11:31:49 +03:00
|
|
|
|
2019-10-12 03:11:07 +03:00
|
|
|
Summary: CLI for running Open Containers
|
|
|
|
Name: runc
|
2021-08-31 16:49:47 +03:00
|
|
|
Version: 1.0.2
|
2021-12-01 05:02:32 +00:00
|
|
|
Release: 2
|
2019-10-12 03:11:07 +03:00
|
|
|
Epoch: 1
|
|
|
|
License: ASL 2.0
|
|
|
|
Group: System/Kernel and hardware
|
|
|
|
Url: https://github.com/opencontainers/runc
|
2021-08-31 16:49:47 +03:00
|
|
|
Source0: https://github.com/opencontainers/runc/archive/refs/tags/v%{version}.tar.gz?/%{name}-%{version}.tar.gz
|
2019-10-12 03:11:07 +03:00
|
|
|
BuildRequires: go-md2man
|
|
|
|
BuildRequires: golang
|
|
|
|
BuildRequires: git
|
|
|
|
BuildRequires: glibc-static-devel
|
|
|
|
BuildRequires: pkgconfig(libseccomp)
|
2017-09-08 11:31:49 +03:00
|
|
|
|
|
|
|
# need xz to work with ubuntu images
|
|
|
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1045220
|
2021-08-31 16:49:47 +03:00
|
|
|
Requires: xz
|
2017-09-08 11:31:49 +03:00
|
|
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1034919
|
|
|
|
# No longer needed in Fedora because of libcontainer
|
2021-12-01 05:02:32 +00:00
|
|
|
Requires: libcgroup-tools
|
2021-08-31 16:49:47 +03:00
|
|
|
Requires: e2fsprogs
|
|
|
|
Requires: iptables
|
2017-09-08 11:31:49 +03:00
|
|
|
|
2017-09-21 12:46:56 +03:00
|
|
|
%rename opencontainers-runc
|
|
|
|
|
2017-09-08 11:31:49 +03:00
|
|
|
%description
|
2019-10-12 03:11:07 +03:00
|
|
|
The runc command can be used to start containers which are packaged
|
|
|
|
in accordance with the Open Container Initiative's specifications,
|
|
|
|
and to manage containers running under runc.
|
2017-09-08 11:31:49 +03:00
|
|
|
|
2019-10-12 03:11:07 +03:00
|
|
|
%files
|
|
|
|
%{_bindir}/%{name}
|
|
|
|
%{_bindir}/docker-%{name}
|
|
|
|
%{_mandir}/man8/%{name}*
|
|
|
|
%{_datadir}/bash-completion/completions/%{name}
|
|
|
|
|
|
|
|
#----------------------------------------------------------------
|
2017-09-08 11:31:49 +03:00
|
|
|
|
2019-10-12 03:11:07 +03:00
|
|
|
%prep
|
2021-08-31 16:49:47 +03:00
|
|
|
%setup -q
|
2017-09-08 11:31:49 +03:00
|
|
|
|
|
|
|
%build
|
|
|
|
mkdir -p GOPATH
|
|
|
|
pushd GOPATH
|
2019-10-12 03:11:07 +03:00
|
|
|
mkdir -p src/github.com/opencontainers
|
|
|
|
ln -s $(dirs +1 -l) src/%{import_path}
|
2017-09-08 11:31:49 +03:00
|
|
|
popd
|
|
|
|
|
2019-10-12 03:11:07 +03:00
|
|
|
pushd GOPATH/src/%{import_path}
|
|
|
|
export GOPATH=%{_builddir}:$(pwd)/GOPATH
|
|
|
|
|
|
|
|
make BUILDTAGS="seccomp selinux" all
|
|
|
|
|
|
|
|
sed -i '/\#\!\/bin\/bash/d' contrib/completions/bash/%{name}
|
|
|
|
popd
|
2017-09-08 11:31:49 +03:00
|
|
|
|
|
|
|
%install
|
2019-10-12 03:11:07 +03:00
|
|
|
install -d -p %{buildroot}%{_bindir}
|
|
|
|
install -p -m 755 %{name} %{buildroot}%{_bindir}
|
2017-09-08 11:31:49 +03:00
|
|
|
|
2019-10-12 03:11:07 +03:00
|
|
|
# generate man pages
|
|
|
|
man/md2man-all.sh
|
|
|
|
|
|
|
|
# install man pages
|
|
|
|
install -d -p %{buildroot}%{_mandir}/man8
|
|
|
|
install -p -m 0644 man/man8/*.8 %{buildroot}%{_mandir}/man8/.
|
|
|
|
# install bash completion
|
|
|
|
install -d -p %{buildroot}%{_datadir}/bash-completion/completions
|
|
|
|
install -p -m 0644 contrib/completions/bash/%{name} %{buildroot}%{_datadir}/bash-completion/completions
|
|
|
|
|
|
|
|
ln -s %{name} %{buildroot}%{_bindir}/docker-%{name}
|