commit 47eb55f8be1dccf714965536aabb4dd649d8a705ae7de246d999dac7122337d9 Author: Aleksa Sarai Date: Mon Mar 21 08:36:29 2016 +0000 * initial import of runC 0.0.9 * add patch seccomp-use-pkg-config.patch which allows us to build runC, since they assume that the seccomp.h file lives at /usr/include/seccomp.h. OBS-URL: https://build.opensuse.org/package/show/Virtualization:containers/runc?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/_service b/_service new file mode 100644 index 0000000..34a026c --- /dev/null +++ b/_service @@ -0,0 +1,17 @@ + + + https://github.com/opencontainers/runc.git + git + runc + 0.0.9 + v0.0.9 + .git + + + *.tar + xz + + + runc + + diff --git a/runc-0.0.9.tar.xz b/runc-0.0.9.tar.xz new file mode 100644 index 0000000..834fbc8 --- /dev/null +++ b/runc-0.0.9.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:34655a93bd652a178a58cf04d8b2585ec0be37bf2fd047d9fbbcf45590cfe618 +size 351256 diff --git a/runc.changes b/runc.changes new file mode 100644 index 0000000..aad2a48 --- /dev/null +++ b/runc.changes @@ -0,0 +1,7 @@ +------------------------------------------------------------------- +Mon Mar 21 08:24:02 UTC 2016 - asarai@suse.de + +* initial import of runC 0.0.9 +* add patch seccomp-use-pkg-config.patch which allows us to build runC, since + they assume that the seccomp.h file lives at /usr/include/seccomp.h. + diff --git a/runc.spec b/runc.spec new file mode 100644 index 0000000..b6272d9 --- /dev/null +++ b/runc.spec @@ -0,0 +1,61 @@ +# +# spec file for package runc +# +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# +# 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. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + +%define version_unconverted 0.0.9 + +Name: runc +Version: 0.0.9 +Release: 0 +Summary: Tool for spawning and running OCI containers +License: Apache-2.0 +Group: System/Management +Url: https://github.com/opencontainers/runc +Source: %{name}-%{version}.tar.xz +Patch0: seccomp-use-pkg-config.patch +BuildRequires: go >= 1.5 +BuildRequires: libapparmor-devel +BuildRequires: libseccomp-devel +BuildRequires: libselinux-devel +BuildRoot: %{_tmppath}/%{name}-%{version}-build + +%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 +%setup -q -n %{name}-%{version} +# Apply the vendor'd patch to the right subdirectory. +%patch0 -p1 -d Godeps/_workspace/src/github.com/seccomp/libseccomp-golang + +%build +# TODO: Add support for gcc-go. +export BUILDTAGS="seccomp apparmor selinux" +make BUILDTAGS="$BUILDTAGS" all + +%install +%{__install} -D -m755 %{name} %{buildroot}/%{_bindir}/%{name} + +%post + +%postun + +%files +%defattr(-,root,root) +%doc README.md LICENSE +%{_bindir}/%{name} diff --git a/seccomp-use-pkg-config.patch b/seccomp-use-pkg-config.patch new file mode 100644 index 0000000..2ca9ec0 --- /dev/null +++ b/seccomp-use-pkg-config.patch @@ -0,0 +1,45 @@ +From 37d7332d4b4159cc3ca09a020319da2492b66a4e Mon Sep 17 00:00:00 2001 +From: Aleksa Sarai +Date: Mon, 21 Mar 2016 19:01:33 +1100 +Subject: [PATCH] seccomp: use pkg-config for cgo flag generation + +Not all distributions package libseccomp in the same way, but pkg-config +allows the same configuration to work on different distributions. Switch +to using pkg-config to automatically figure out what the correct +commandline flags are for libseccomp. + +Signed-off-by: Aleksa Sarai +--- + seccomp.go | 2 +- + seccomp_internal.go | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/seccomp.go b/seccomp.go +index cebafdfae841..de847378d927 100644 +--- a/seccomp.go ++++ b/seccomp.go +@@ -20,7 +20,7 @@ import ( + + // C wrapping code + +-// #cgo LDFLAGS: -lseccomp ++// #cgo pkg-config: libseccomp + // #include + // #include + import "C" +diff --git a/seccomp_internal.go b/seccomp_internal.go +index 306ed17570be..04095f664879 100644 +--- a/seccomp_internal.go ++++ b/seccomp_internal.go +@@ -15,7 +15,7 @@ import ( + // Get the seccomp header in scope + // Need stdlib.h for free() on cstrings + +-// #cgo LDFLAGS: -lseccomp ++// #cgo pkg-config: libseccomp + /* + #include + #include +-- +2.7.3 +