Accepting request 419903 from Virtualization:containers

1

OBS-URL: https://build.opensuse.org/request/show/419903
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/containerd?expand=0&rev=5
This commit is contained in:
Dominique Leuenberger 2016-08-20 10:27:21 +00:00 committed by Git OBS Bridge
commit 0cd45967ee
2 changed files with 37 additions and 4 deletions

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Thu Aug 18 09:44:56 UTC 2016 - cbrauner@suse.de
- Add containerd-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.
-------------------------------------------------------------------
Tue Aug 16 09:51:37 UTC 2016 - asarai@suse.com

View File

@ -82,6 +82,19 @@ BuildRequires: gcc5-go >= 5.0
Standalone client for containerd, which allows management of containerd containers
separately from Docker.
%package test
Summary: Test package for containerd
Group: System/Management
%ifarch %go_arches
Requires: go >= 1.5
%else
Requires: gcc5-go >= 5.0
%endif
BuildArch: noarch
%description test
Test package for containerd. It contains the source code and the tests.
%prep
%setup -q
# Systemd socket activation patches.
@ -90,10 +103,13 @@ separately from Docker.
%patch103 -p1
%build
# Create buildir,
export GOPATH=$PWD/vendor
mkdir -pv $GOPATH/src/github.com/docker/
ln -svfn $PWD $GOPATH/src/github.com/docker/containerd
# 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/docker/containerd/vendor:${GOPATH}
mkdir -pv $HOME/go/src/github.com/docker/containerd
rm -rf $HOME/go/src/github.com/docker/containerd/*
cp -avr * $HOME/go/src/github.com/docker/containerd
# Build deamon.
%go_tool build %GO_BUILD_FLAGS -x -o %{daemon}-%{version} github.com/docker/%{name}/%{daemon}
@ -115,6 +131,9 @@ ln -svfn $PWD $GOPATH/src/github.com/docker/containerd
ln -sf %{_sbindir}/service %{buildroot}/%{_sbindir}/rccontainerd
%{__install} -D -m644 %SOURCE3 %{buildroot}/var/adm/fillup-templates/sysconfig.%{name}
install -d -m755 %{buildroot}/usr/src/containerd/
cp -avr $HOME/go/src/github.com/docker/containerd/* %{buildroot}/usr/src/containerd/
%pre
%service_add_pre %{name}.service %{name}.socket
@ -141,4 +160,9 @@ ln -sf %{_sbindir}/service %{buildroot}/%{_sbindir}/rccontainerd
%files ctr
%{_sbindir}/%{name}-%{client}
%files test
%defattr(-,root,root)
/usr/src/containerd/
%exclude /usr/src/containerd/bin
%changelog