Blob Blame History Raw
%global debug_package   %{nil}
%global provider        github
%global provider_tld    com
%global project         docker
%global repo            libcontainer
%global import_path     %{provider}.%{provider_tld}/%{project}/%{repo}
%global commit          d7dea0e925315bab640115053204c16718839b1e
%global shortcommit     %(c=%{commit}; echo ${c:0:7})

Name:           golang-github-docker-libcontainer
Version:        1.4.0
Release:        2.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(github.com/codegangsta/cli) >= 1.1.0-1
BuildRequires:  golang(github.com/coreos/go-systemd/dbus)
BuildRequires:  golang(github.com/godbus/dbus)
BuildRequires:  docker-io-pkg-devel
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/syndtr/gocapability/capability)
Provides:       nsinit = %{version}-%{release}

%description
libcontainer specifies configuration options for what a container is. It
provides a native Go implementation for using Linux namespaces with no
external dependencies. libcontainer provides many convenience functions for
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.

%package devel
Summary:        Configuration options for containers
BuildRequires:  golang >= 1.2.1-3
BuildRequires:	golang(github.com/codegangsta/cli)
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/syndtr/gocapability/capability)
Requires:       golang >= 1.2.1-3
Requires:	golang(github.com/codegangsta/cli)
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)
Provides:       golang(%{import_path}) = %{version}-%{release}
Provides:       golang(%{import_path}/apparmor) = %{version}-%{release}
Provides:       golang(%{import_path}/cgroups) = %{version}-%{release}
Provides:       golang(%{import_path}/cgroups/fs) = %{version}-%{release}
Provides:       golang(%{import_path}/cgroups/systemd) = %{version}-%{release}
Provides:       golang(%{import_path}/console) = %{version}-%{release}
Provides:       golang(%{import_path}/devices) = %{version}-%{release}
Provides:       golang(%{import_path}/label) = %{version}-%{release}
Provides:       golang(%{import_path}/mount) = %{version}-%{release}
Provides:       golang(%{import_path}/mount/nodes) = %{version}-%{release}
Provides:       golang(%{import_path}/namespaces) = %{version}-%{release}
Provides:       golang(%{import_path}/namespaces/nsenter) = %{version}-%{release}
Provides:       golang(%{import_path}/netlink) = %{version}-%{release}
Provides:       golang(%{import_path}/network) = %{version}-%{release}
Provides:       golang(%{import_path}/nsinit) = %{version}-%{release}
Provides:       golang(%{import_path}/security/capabilities) = %{version}-%{release}
Provides:       golang(%{import_path}/security/restrict) = %{version}-%{release}
Provides:       golang(%{import_path}/selinux) = %{version}-%{release}
Provides:       golang(%{import_path}/syncpipe) = %{version}-%{release}
Provides:       golang(%{import_path}/system) = %{version}-%{release}
Provides:       golang(%{import_path}/user) = %{version}-%{release}
Provides:       golang(%{import_path}/utils) = %{version}-%{release}

%description devel
libcontainer specifies configuration options for what a container is. It
provides a native Go implementation for using Linux namespaces with no
external dependencies. libcontainer provides many convenience functions for
working with namespaces, networking, and management. 

This package contains library source intended for building other packages
which use libcontainer.

%prep
%setup -q -n %{repo}-%{commit}
rm -rf vendor

%build
mkdir -p ./_build/src/github.com/docker
ln -s $(pwd) ./_build/src/%{import_path}

export GOPATH=$(pwd)/_build:%{gopath}
pushd $(pwd)/_build/src
go build %{import_path}/nsinit
popd

%install
# Install nsinit
install -d %{buildroot}%{_bindir}
install -p -m 755 ./_build/src/nsinit %{buildroot}%{_bindir}/nsinit

rm -rf _build sample_configs
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

%check

%files
%doc LICENSE MAINTAINERS MAINTAINERS_GUIDE.md NOTICE
%doc PRINCIPLES.md README.md ROADMAP.md
%{_bindir}/nsinit

%files devel
%doc LICENSE MAINTAINERS MAINTAINERS_GUIDE.md NOTICE
%doc PRINCIPLES.md README.md ROADMAP.md
%dir %{gopath}/src/github.com/docker
%{gopath}/src/%{import_path}

%changelog
* Tue Mar 31 2015 jchaloup <jchaloup@redhat.com> - 1.4.0-2.gitd7dea0e
- Add [B]R to devel subpackage
  related: #1164989

* Mon Mar 09 2015 jchaloup <jchaloup@redhat.com> - 1.4.0-1.git83663f8
- Bump to upstream 83663f82e3d76f57ea57faf80b8fd7eb96933b9b
  related: #1164989

* Tue Nov 18 2014 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.2.0-3.git28cb5f9
- Resolves: rhbz#1164989 - update to atleast b9c834b7

* Mon Oct 20 2014 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.2.0-2.gitc907e40
- install namespaces/nsenter

* Mon Oct 20 2014 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.2.0-1.gitc907e40
- bump to v1.2.0 commit c907e406fe81320d87b58edf74953ceb08facc13

* Sat Aug 23 2014 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.1.0-10.git
- Include syncpipe, system and user dirs missed in previous build

* Fri Aug 22 2014 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.1.0-9.git
- Update to db65c35051d05f3fb218a0e84a11267e0894fe0a for docker 1.2.0

* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-8.git29363e2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

* Fri Aug 15 2014 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.1.0-7.git
- Resolves: rhbz#1130500
- update to upstream commit 29363e2d2d7b8f62a5f353be333758f83df540a9

* Thu Jul 31 2014 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.1.0-6
- Resolves: rhbz#1111916 - package review request
- remove attr for fedora
- correct NVR for codegangsta/cli 1.1.0-1

* Wed Jul 30 2014 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.1.0-5
- LICENSE file installed in main package
- defattr gotten rid of

* Wed Jul 30 2014 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.1.0-4
- Update BRs for main package

* Mon Jul 28 2014 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.1.0-3
- nsinit needs docker-io-pkg-devel to build

* Fri Jul 25 2014 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.1.0-2
- nsinit description: debugging only and no official support

* Fri Jul 25 2014 Lokesh Mandvekar <lsm5@fedoraproject.org> 1.1.0-1
- use v1.1.0
- do not own dirs owned by golang
- do not redefine macros defined in golang
- main package provides nsinit

* Sat Jun 21 2014 Lokesh Mandvekar <lsm5@fedoraproject.org> 1.0.1-1
- Initial fedora package