%global domain github.com %global org kata-containers %global repo runtime %global download %{domain}/%{org}/%{repo} %global importname %{download} %global qemu qemu-kvm Name: kata-%{repo} Version: 1.8.2 Release: 1%{?dist} Url: https://%{download} Source0: https://%{download}/archive/%{version}/%{name}-%{version}.tar.gz Summary: Kata runtime to run containers in virtual machines License: ASL 2.0 # F31: Add BuildRequires: go-rpm-macros BuildRequires: %{?suse_version:go1.12} %{!?suse_version:golang} Requires: qemu-kvm Requires: kata-proxy = %{version} Requires: kata-shim = %{version} Requires: kata-ksm-throttler = %{version} # Minor local patches Patch0001: 0001-Remove-shebang-in-non-executable-completion-script.patch %description The runtime for the Kata Containers project. Kata Containers is an open source project and community working to build a standard implementation of lightweight Virtual Machines (VMs) that feel and perform like containers, but provide the workload isolation and security advantages of VMs. # F31: Use %gopkg %prep # Future: Use %goprep for F31 %autosetup -p1 -n %{repo}-%{version} %build # Adjust for go build requirements # Future: Use %gopkginstall # export GOROOT="$(pwd)/go" export PATH=$PATH:"$(pwd)/go/bin" export GOPATH="$(pwd)/go" mkdir -p go/src/%{domain}/%{org} ln -s $(pwd)/../%{repo}-%{version} go/src/%{importname} cd go/src/%{importname} make \ QEMUPATH=%{_bindir}/%{qemu} \ not_check_version=certainly_not %install export GOPATH=$(pwd)/go export PATH=$PATH:$GOPATH/bin cd go/src/%{importname} make \ DESTTARGET=%{buildroot}%{_bindir}/kata-runtime \ DESTCONFIG=%{buildroot}%{_datadir}/defaults/kata-containers/configuration.toml \ SCRIPTS_DIR=%{_bindir} \ QEMUPATH=%{_bindir}/%{qemu} \ DESTDIR=%{buildroot} \ PREFIX=/usr \ BINDIR=/usr/libexec/kata-containers \ not_check_version=still_not_checking \ install sed -i -e '/^initrd =/d' %{buildroot}/usr/share/defaults/kata-containers/configuration.toml %files %license LICENSE %dir %{_libexecdir}/kata-containers %{_libexecdir}/kata-containers/kata-runtime %{_libexecdir}/kata-containers/containerd-shim-kata-v2 %{_libexecdir}/kata-containers/kata-netmon %{_bindir}/kata-collect-data.sh %dir %{_datadir}/defaults/kata-containers %{_datadir}/defaults/kata-containers/configuration*.toml %{_datadir}/bash-completion/completions/kata-runtime %changelog * Fri Sep 20 2019 Christophe de Dinechin - 1.8.2-1 - Update to 1.8.2 release * Fri Sep 13 2019 Christophe de Dinechin - 1.8.0-5 - Move binaries to libexec (no man page, not directly accessible) * Thu Sep 12 2019 Christophe de Dinechin - 1.8.0-4 - Remove shebang in bash completion script * Wed Aug 28 2019 Christophe de Dinechin - 1.8.0-2 - Remove nonexistent packages * Tue Jul 30 2019 Christophe de Dinechin - 1.8.0-1 - Update to 1.8.0 release * Fri Jul 12 2019 Christophe de Dinechin - 1.7.3-5 - Update to 1.7.3 release, cleanup spec file