jchaloup pushed to golang-github-docker-libcontainer (f20). "Update to 2.1.1 (..more)"

notifications at fedoraproject.org notifications at fedoraproject.org
Thu Jun 11 11:36:01 UTC 2015


From d44a86ffeb10875e78359cef34131f0a9312bd2d Mon Sep 17 00:00:00 2001
From: Jan Chaloupka <jchaloup at redhat.com>
Date: Thu, 11 Jun 2015 11:39:05 +0200
Subject: Update to 2.1.1 Polish spec file Use license macro for LICENSE Remove
 runtime dependency on golang - resolves: #1230658


diff --git a/.gitignore b/.gitignore
index 530a9c6..32ab297 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1 @@
-/libcontainer-bada39c.tar.gz
+/libcontainer-c964368.tar.gz
diff --git a/golang-github-docker-libcontainer.spec b/golang-github-docker-libcontainer.spec
index 34853a5..1029a44 100644
--- a/golang-github-docker-libcontainer.spec
+++ b/golang-github-docker-libcontainer.spec
@@ -1,28 +1,52 @@
+%if 0%{?fedora}
+%global with_devel 1
+%global with_bundled 0
+%global with_debug 1
+# some tests are failing
+%global with_checks 0
+%else
+%global with_devel 0
+%global with_bundled 1
+%global with_debug 0
+%global with_checks 0
+%endif
+
+%if 0%{?with_debug}
+# https://bugzilla.redhat.com/show_bug.cgi?id=995136#c12
+%global _dwz_low_mem_die_limit 0
+%else
 %global debug_package   %{nil}
+%endif
 %global provider        github
 %global provider_tld    com
 %global project         docker
 %global repo            libcontainer
 %global import_path     %{provider}.%{provider_tld}/%{project}/%{repo}
-%global commit          bada39cf31c3305810c2575e036f594a7dc3c98f
+%global commit          c9643688cb73c2588a9c9b14357bda6c3a9df67f
 %global shortcommit     %(c=%{commit}; echo ${c:0:7})
 
 Name:           golang-github-docker-libcontainer
-Version:        1.4.0
-Release:        3.git%{shortcommit}%{?dist}
+Version:        2.1.1
+Release:        0.0.git%{shortcommit}%{?dist}
 Summary:        Configuration options for containers
 License:        ASL 2.0
 URL:            https://%{import_path}
 Source0:        https://%{import_path}/archive/%{commit}/libcontainer-%{shortcommit}.tar.gz
 ExclusiveArch:  x86_64
 
+BuildRequires: golang >= 1.2.1-3
+
+%if ! 0%{?with_bundled}
 BuildRequires: golang(github.com/Sirupsen/logrus)
 BuildRequires: golang(github.com/codegangsta/cli) >= 1.1.0-1
 BuildRequires: golang(github.com/coreos/go-systemd/dbus)
 BuildRequires: golang(github.com/docker/docker/pkg/mount)
+BuildRequires: golang(github.com/docker/docker/pkg/symlink)
 BuildRequires: golang(github.com/docker/docker/pkg/term)
 BuildRequires: golang(github.com/godbus/dbus)
+BuildRequires: golang(github.com/golang/protobuf/proto)
 BuildRequires: golang(github.com/syndtr/gocapability/capability) >= 0-0.9
+%endif
 
 Provides:       nsinit = %{version}-%{release}
 
@@ -35,6 +59,7 @@ working with namespaces, networking, and management.
 This package provides the nsinit binary as well, but it is currently for
 debugging purposes only and not officially supported.
 
+%if 0%{?with_devel}
 %package devel
 Summary:        Configuration options for containers
 BuildRequires: golang >= 1.2.1-3
@@ -42,18 +67,21 @@ BuildRequires: golang(github.com/Sirupsen/logrus)
 BuildRequires: golang(github.com/codegangsta/cli) >= 1.1.0-1
 BuildRequires: golang(github.com/coreos/go-systemd/dbus)
 BuildRequires: golang(github.com/docker/docker/pkg/mount)
+BuildRequires: golang(github.com/docker/docker/pkg/symlink)
 BuildRequires: golang(github.com/docker/docker/pkg/term)
 BuildRequires: golang(github.com/godbus/dbus)
+BuildRequires: golang(github.com/golang/protobuf/proto)
 BuildRequires: golang(github.com/syndtr/gocapability/capability) >= 0-0.9
 
-Requires: golang >= 1.2.1-3
 Requires: golang(github.com/Sirupsen/logrus)
-Requires: golang(github.com/codegangsta/cli)
+Requires: golang(github.com/codegangsta/cli) >= 1.1.0-1
 Requires: golang(github.com/coreos/go-systemd/dbus)
 Requires: golang(github.com/docker/docker/pkg/mount)
+Requires: golang(github.com/docker/docker/pkg/symlink)
 Requires: golang(github.com/docker/docker/pkg/term)
 Requires: golang(github.com/godbus/dbus)
-Requires: golang(github.com/syndtr/gocapability/capability)
+Requires: golang(github.com/golang/protobuf/proto)
+Requires: golang(github.com/syndtr/gocapability/capability) >= 0-0.9
 
 Provides: golang(%{import_path}) = %{version}-%{release}
 Provides: golang(%{import_path}/apparmor) = %{version}-%{release}
@@ -62,6 +90,7 @@ Provides: golang(%{import_path}/cgroups/fs) = %{version}-%{release}
 Provides: golang(%{import_path}/cgroups/systemd) = %{version}-%{release}
 Provides: golang(%{import_path}/configs) = %{version}-%{release}
 Provides: golang(%{import_path}/configs/validate) = %{version}-%{release}
+Provides: golang(%{import_path}/criurpc) = %{version}-%{release}
 Provides: golang(%{import_path}/devices) = %{version}-%{release}
 Provides: golang(%{import_path}/integration) = %{version}-%{release}
 Provides: golang(%{import_path}/label) = %{version}-%{release}
@@ -82,47 +111,99 @@ working with namespaces, networking, and management.
 
 This package contains library source intended for building other packages
 which use libcontainer.
+%endif
 
 %prep
 %setup -q -n %{repo}-%{commit}
-rm -rf vendor
 
 %build
 mkdir -p ./_build/src/github.com/docker
 ln -s $(pwd) ./_build/src/%{import_path}
-
+mkdir bin
+
+%if 0%{?with_debug}
+function gobuild { go build -a -ldflags "-B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n')" -v -x "$@"; }
+%else
+function gobuild { go build "$@"; }
+%endif
+
+%if 0%{?with_bundled}
+export GOPATH=$(pwd)/_build:$(pwd)/vendor:%{gopath}
+gobuild -o bin/nsinit %{import_path}/nsinit
+%else
 export GOPATH=$(pwd)/_build:%{gopath}
-pushd $(pwd)/_build/src
-go build %{import_path}/nsinit
-popd
+gobuild -o bin/nsinit %{import_path}/nsinit
+%endif
 
 %install
 # Install nsinit
 install -d %{buildroot}%{_bindir}
-install -p -m 755 ./_build/src/nsinit %{buildroot}%{_bindir}/nsinit
+install -p -m 755 bin/nsinit %{buildroot}%{_bindir}/nsinit
 
-rm -rf _build sample_configs
+%if 0%{?with_devel}
+rm -rf _build sample_configs vendor bin
 install -d -p %{buildroot}%{gopath}/src/%{import_path}
 cp -rpav ./*.go %{buildroot}%{gopath}/src/%{import_path}/
 
 for dir in */ ; do
     cp -rpav $dir %{buildroot}%{gopath}/src/%{import_path}/
 done
+%endif
 
+%if 0%{?with_checks}
 %check
+%if 0%{?with_bundled}
+export GOPATH=$(pwd)/_build:$(pwd)/vendor:%{gopath}
+%else
+export GOPATH=$(pwd)/_build:%{gopath}
+%endif
+go test %{import_path}
+go test %{import_path}/cgroups
+go test %{import_path}/cgroups/fs
+go test %{import_path}/configs
+go test %{import_path}/devices
+go test %{import_path}/integration
+go test %{import_path}/label
+go test %{import_path}/netlink
+go test %{import_path}/nsenter
+go test %{import_path}/selinux
+go test %{import_path}/stacktrace
+go test %{import_path}/user
+go test %{import_path}/utils
+go test %{import_path}/xattr
+%endif
 
 %files
-%doc LICENSE MAINTAINERS MAINTAINERS_GUIDE.md NOTICE
+%if 0%{?fedora}
+%license LICENSE
+%else
+%doc LICENSE
+%endif
+%doc MAINTAINERS MAINTAINERS_GUIDE.md NOTICE
 %doc PRINCIPLES.md README.md ROADMAP.md
 %{_bindir}/nsinit
 
+%if 0%{?with_devel}
 %files devel
-%doc LICENSE MAINTAINERS MAINTAINERS_GUIDE.md NOTICE
+%if 0%{?fedora}
+%license LICENSE
+%else
+%doc LICENSE
+%endif
+%doc MAINTAINERS MAINTAINERS_GUIDE.md NOTICE
 %doc PRINCIPLES.md README.md ROADMAP.md
 %dir %{gopath}/src/github.com/docker
 %{gopath}/src/%{import_path}
+%endif
 
 %changelog
+* Thu Jun 11 2015 jchaloup <jchaloup at redhat.com> - 2.1.1-0.1.gitc964368
+- Update to 2.1.1
+  Ppolish spec file
+  Use license macro for LICENSE
+  Remove runtime dependency on golang
+  resolves: #1230658
+
 * Mon Apr 20 2015 jchaloup <jchaloup at redhat.com> - 1.4.0-3.gitbada39c
 - Bump to upstream bada39cf31c3305810c2575e036f594a7dc3c98f
   related: #1164989
diff --git a/sources b/sources
index 49eb0cd..55b7ed2 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-4af50f91fdf2816cf52f9a0b07c50a6e  libcontainer-bada39c.tar.gz
+1777657acd9cff03ed8ba8d5e8f4fc00  libcontainer-c964368.tar.gz
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/golang-github-docker-libcontainer.git/commit/?h=f20&id=d44a86ffeb10875e78359cef34131f0a9312bd2d


More information about the scm-commits mailing list