From b67aa431ac0cb09d3dcb98ba2e001844fbad7674d59cd59266e56514192f02cf Mon Sep 17 00:00:00 2001 From: Aleksa Sarai Date: Sun, 27 Mar 2016 10:15:05 +0000 Subject: [PATCH] * Small updates to method of compilation to better match Makefile. OBS-URL: https://build.opensuse.org/package/show/Virtualization:containers/runc?expand=0&rev=3 --- runc.changes | 5 +++++ runc.spec | 18 +++++++++++------- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/runc.changes b/runc.changes index 91ea3f1..e05f50e 100644 --- a/runc.changes +++ b/runc.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sun Mar 27 10:14:32 UTC 2016 - asarai@suse.de + +* Small updates to method of compilation to better match Makefile. + ------------------------------------------------------------------- Mon Mar 21 12:04:59 UTC 2016 - asarai@suse.de diff --git a/runc.spec b/runc.spec index 28332a6..b8442b0 100644 --- a/runc.spec +++ b/runc.spec @@ -18,7 +18,7 @@ %define go_arches %ix86 x86_64 %ifarch %go_arches %define go_tool go -%define GO_BUILD_FLAGS "" +%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" @@ -58,16 +58,20 @@ and has grown to become a separate project entirely. %build # Create buildir, -export GOPATH=$PWD/go +export GOPATH=$PWD/Godeps/_workspace mkdir -pv $GOPATH/src/github.com/opencontainers/ - -# Copy the vendor directory into the GOPATH. -cp -rv $PWD/Godeps/_workspace/src/* $GOPATH/src/ ln -svfn $PWD $GOPATH/src/github.com/opencontainers/runc # Build all features. -export BUILDTAGS="seccomp apparmor selinux" -%go_tool build -tags "$BUILDTAGS" -x -o %{name}-%{version} %GO_BUILD_FLAGS +export BUILDTAGS="apparmor selinux" + +# Seccomp isn't supported on aarch64. +%ifnarch aarch64 +export BUILDTAGS="$BUILDTAGS seccomp" +%endif + +# Build runc. +%go_tool build %GO_BUILD_FLAGS -tags "$BUILDTAGS" -x -o %{name}-%{version} github.com/opencontainers/%{name} %install %{__install} -D -m755 %{name}-%{version} %{buildroot}/%{_bindir}/%{name}