Accepting request 419732 from Virtualization:containers

1

OBS-URL: https://build.opensuse.org/request/show/419732
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/runc?expand=0&rev=3
This commit is contained in:
Dominique Leuenberger 2016-08-18 07:18:07 +00:00 committed by Git OBS Bridge
commit b0d1354899
2 changed files with 45 additions and 4 deletions

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Wed Aug 17 10:29:15 UTC 2016 - cbrauner@suse.de
- Add runc-test package which contains the source code and the test. This
package will be used to run the integration tests.
- Simplify package build and check sections: Instead of symlinking we default to
cp -avr. go list gets confused by symlinks hence, we need to copy the source
code anyway if we want to run unit tests during package build at some point.
-------------------------------------------------------------------
Fri Apr 29 09:03:24 UTC 2016 - asarai@suse.de

View File

@ -57,16 +57,40 @@ 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.
%package test
Summary: Test package for runc
Group: System/Management
%ifarch %go_arches
Requires: go >= 1.5
Requires: go-go-md2man
%else
Requires: gcc5-go >= 5.0
%endif
Requires: libapparmor-devel
# Seccomp isn't supported on aarch64.
%ifnarch aarch64
Requires: libseccomp-devel
%endif
Requires: libselinux-devel
Recommends: criu
BuildArch: noarch
%description test
Test package for runc. It contains the source code and the tests.
%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
# Create buildir,
export GOPATH=$PWD/Godeps/_workspace
mkdir -pv $GOPATH/src/github.com/opencontainers/
ln -svfn $PWD $GOPATH/src/github.com/opencontainers/runc
# Do not use symlinks. If you want to run the unit tests for this package at
# some point during the build and you need to directly use go list directly it
# will get confused by symlinks.
export GOPATH=${HOME}/go:${HOME}/go/src/github.com/opencontainers/runc/Godeps/_workspace:${GOPATH}
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
# Build all features.
export BUILDTAGS="apparmor selinux"
@ -86,6 +110,8 @@ man/md2man-all.sh
%install
%{__install} -D -m755 %{name}-%{version} %{buildroot}%{_sbindir}/%{name}
install -d -m755 %{buildroot}/usr/src/runc/
cp -avr $HOME/go/src/github.com/opencontainers/runc/* %{buildroot}/usr/src/runc/
%ifarch %go_arches
%{__install} -d -m755 %{buildroot}%{_mandir}/man8
@ -101,4 +127,10 @@ man/md2man-all.sh
%{_mandir}/man8/runc*.8.gz
%endif
%files test
%defattr(-,root,root)
/usr/src/runc/
%exclude /usr/src/runc/runc
%exclude /usr/src/runc/runc/Godeps/_workspace/pkg
%changelog