diff --git a/_service b/_service index 5340669..2a1d488 100644 --- a/_service +++ b/_service @@ -3,8 +3,8 @@ https://github.com/opencontainers/runc.git git runc - 0.1.1 - v0.1.1 + git.%h + cc29e3dded8e27ba8f65738f40d251c885030a28 .git diff --git a/runc-0.1.1.tar.xz b/runc-0.1.1.tar.xz deleted file mode 100644 index 8fd4ada..0000000 --- a/runc-0.1.1.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d97b2bc26851ce8b8bbad2c47f873baaf97b2098f74c254af0a8e3686a7968a7 -size 365364 diff --git a/runc-git.cc29e3d.tar.xz b/runc-git.cc29e3d.tar.xz new file mode 100644 index 0000000..199ad4a --- /dev/null +++ b/runc-git.cc29e3d.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c47ccde2967b47723fb5e035e571c55849d9d308543641af5b91e3efdff34ed8 +size 394544 diff --git a/runc.changes b/runc.changes index 55cdb64..eacd8aa 100644 --- a/runc.changes +++ b/runc.changes @@ -1,3 +1,20 @@ +------------------------------------------------------------------- +Thu Aug 18 10:35:29 UTC 2016 - jmassaguerpla@suse.com + +- use gcc6-go instead of gcc5-go (bsc#988408) +- build ppc64le with gc-go because this version builds with gc-go 1.6 + +------------------------------------------------------------------- +Thu Aug 18 10:34:29 UTC 2016 - cbrauner@suse.de + +- bump git commit id to the one required by docker v1.12.0 (bsc#995058) +- run unit tests during package build +- remove seccomp-use-pkg-config.patch + The patch is now upstream. +- remove GO_BUILD_FLAGS macro and substitute with BUILDFLAGS env variable to + allow for easier string appending. +- only run unit test on architectures that provide the go list and go test tools + ------------------------------------------------------------------- Wed Aug 17 10:29:15 UTC 2016 - cbrauner@suse.de diff --git a/runc.spec b/runc.spec index 13eb798..80b83e2 100644 --- a/runc.spec +++ b/runc.spec @@ -16,31 +16,28 @@ # -%define go_arches %ix86 x86_64 aarch64 +%define go_arches %ix86 x86_64 aarch64 ppc64le %ifarch %go_arches %define go_tool go -%define GO_BUILD_FLAGS %{nil} %else -%define go_tool go-5 -%define GO_BUILD_FLAGS "-gccgoflags=-Wl,--add-needed -Wl,--no-as-needed -static-libgo -ldl -lseccomp -lselinux -lapparmor" +%define go_tool go-6 %endif -%define version_unconverted 0.1.1 +%define git_version cc29e3d Name: runc -Version: 0.1.1 +Version: 0.1.1+git%{git_version} 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 +Source: %{name}-git.%{git_version}.tar.xz %ifarch %go_arches BuildRequires: go >= 1.5 BuildRequires: go-go-md2man %else -BuildRequires: gcc5-go >= 5.0 +BuildRequires: gcc6-go >= 6.1 %endif BuildRequires: libapparmor-devel # Seccomp isn't supported on aarch64. @@ -64,7 +61,7 @@ Group: System/Management Requires: go >= 1.5 Requires: go-go-md2man %else -Requires: gcc5-go >= 5.0 +Requires: gcc6-go >= 6.1 %endif Requires: libapparmor-devel # Seccomp isn't supported on aarch64. @@ -79,9 +76,8 @@ BuildArch: noarch Test package for runc. It contains the source code and the tests. %prep -%setup -q -n %{name}-%{version} +%setup -q -n %{name}-git.%{git_version} # Apply the vendor'd patch to the right subdirectory. -%patch0 -p1 -d Godeps/_workspace/src/github.com/seccomp/libseccomp-golang %build # Do not use symlinks. If you want to run the unit tests for this package at @@ -92,22 +88,38 @@ mkdir -pv $HOME/go/src/github.com/opencontainers/runc rm -rf $HOME/go/src/github.com/opencontainers/runc/* cp -avr * $HOME/go/src/github.com/opencontainers/runc +export BUILDFLAGS="-gccgoflags=-Wl,--add-needed -Wl,--no-as-needed -static-libgo -ldl -lselinux -lapparmor" # Build all features. export BUILDTAGS="apparmor selinux" # Seccomp isn't supported on aarch64. %ifnarch aarch64 export BUILDTAGS="$BUILDTAGS seccomp" +export BUILDFLAGS="$BUILDFLAGS -lseccomp" %endif # Build runc. -%go_tool build %GO_BUILD_FLAGS -tags "$BUILDTAGS" -x -o %{name}-%{version} github.com/opencontainers/%{name} +%go_tool build "$BUILDFLAGS" -tags "$BUILDTAGS" -x -o %{name}-%{version} github.com/opencontainers/%{name} # Build man pages, this can only be done on arches where we can build go-md2man. %ifarch %go_arches man/md2man-all.sh %endif +%ifarch %go_arches +%check +export GOPATH=$HOME/go/src/github.com/opencontainers/runc/Godeps/_workspace:$GOPATH +cd $HOME/go/src/github.com/opencontainers/runc +PKG_LIST=$(go list ./... \ + | grep -v 'github.com/opencontainers/runc/libcontainer/cgroups/fs$' \ + | grep -v 'github.com/opencontainers/runc/libcontainer$' \ + | grep -v 'github.com/opencontainers/runc/libcontainer/integration$' \ + | grep -v 'github.com/opencontainers/runc/libcontainer/nsenter$' \ + | grep -v 'github.com/opencontainers/runc/libcontainer/user$' \ + | grep -v 'github.com/opencontainers/runc/libcontainer/xattr$') +go test -timeout 3m -tags "$BUILDTAGS" -v $PKG_LIST +%endif + %install %{__install} -D -m755 %{name}-%{version} %{buildroot}%{_sbindir}/%{name} install -d -m755 %{buildroot}/usr/src/runc/ diff --git a/seccomp-use-pkg-config.patch b/seccomp-use-pkg-config.patch deleted file mode 100644 index 2ca9ec0..0000000 --- a/seccomp-use-pkg-config.patch +++ /dev/null @@ -1,45 +0,0 @@ -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 -