commit 3ca11d47e4bc11c6b9337572c8aa11d23f7c3423
Author: Lokesh Mandvekar <lsm5(a)redhat.com>
Date: Thu Feb 6 10:57:33 2014 -0500
upstream bump to v0.8.0 BZ1062177
Signed-off-by: Lokesh Mandvekar <lsm5(a)redhat.com>
devicemapper-discard-freespace.patch | 137 ------------------
docker-io.spec | 49 ++++---
docker.service | 13 --
ignore-btrfs-for-rhel6.patch | 256 ++++++++++++++++++++++++++++++++++
sources | 2 +-
5 files changed, 282 insertions(+), 175 deletions(-)
---
diff --git a/docker-io.spec b/docker-io.spec
index b7e73af..8d43bbc 100644
--- a/docker-io.spec
+++ b/docker-io.spec
@@ -9,26 +9,25 @@
%global debug_package %{nil}
%global gopath %{_datadir}/gocode
-%global commit bc3b2ec0622f50879ae96f042056b6bd2e0b4fba
+%global commit cc3a8c8d8ec57e15b7b7316797132d770408ab1a
%global shortcommit %(c=%{commit}; echo ${c:0:7})
Name: docker-io
-Version: 0.7.6
-Release: 4%{?dist}
+Version: 0.8.0
+Release: 1%{?dist}
Summary: Automates deployment of containerized applications
License: ASL 2.0
-Patch0: devicemapper-discard-freespace.patch
+Patch0: ignore-btrfs-for-rhel6.patch
URL:
http://www.docker.io
# only x86_64 for now:
https://github.com/dotcloud/docker/issues/136
ExclusiveArch: x86_64
Source0:
https://github.com/dotcloud/docker/archive/v%{version}.tar.gz
-Source1: docker.service
# though final name for sysconf/sysvinit files is simply 'docker',
# having .sysvinit and .sysconfig makes things clear
-Source2: docker.sysconfig
-Source3: docker.sysvinit
-Source4: docker.1
+Source1: docker.sysconfig
+Source2: docker.sysvinit
+Source3: docker.1
BuildRequires: gcc
BuildRequires: glibc-static
# ensure build uses golang 1.2 and above
@@ -40,6 +39,10 @@ BuildRequires:
golang(code.google.com/p/go.net/websocket)
BuildRequires:
golang(code.google.com/p/gosqlite/sqlite3)
BuildRequires:
golang(github.com/syndtr/gocapability/capability)
BuildRequires: device-mapper-devel
+#btrfs not available for rhel6
+%if 0%{?fedora} || 0%{?rhel} > 7
+BuildRequires: btrfs-progs-devel
+%endif
%if %{with systemd}
BuildRequires: pkgconfig(systemd)
Requires: systemd-units
@@ -76,9 +79,9 @@ servers, OpenStack clusters, public instances, or combinations of the
above.
%prep
%setup -q -n docker-%{version}
rm -rf vendor
-# discard free space after deleting image
-#
https://bugzilla.redhat.com/show_bug.cgi?id=1055645
-%patch0 -p1 -b devicemapper-discard-freespace
+%if 0%{?rhel} >= 6 && 0%{?rhel} < 7
+%patch0 -p1 -b ignore-btrfs-for-rhel6
+%endif
%build
mkdir _build
@@ -86,6 +89,7 @@ mkdir _build
pushd _build
mkdir -p
src/github.com/dotcloud
ln -s $(dirs +1 -l)
src/github.com/dotcloud/docker
+
popd
export DOCKER_GITCOMMIT="%{shortcommit}/%{version}"
@@ -102,17 +106,17 @@ install -d %{buildroot}%{_datadir}/zsh/site-functions
install -d -m 700 %{buildroot}%{_sharedstatedir}/docker
install -p -m 755 bundles/%{version}/dynbinary/docker-%{version}
%{buildroot}%{_bindir}/docker
install -p -m 755 bundles/%{version}/dynbinary/dockerinit-%{version}
%{buildroot}%{_libexecdir}/docker/dockerinit
-install -p -m 644 %{SOURCE4} %{buildroot}%{_mandir}/man1
+install -p -m 644 %{SOURCE3} %{buildroot}%{_mandir}/man1
install -p -m 644 contrib/completion/bash/docker
%{buildroot}%{_sysconfdir}/bash_completion.d/docker.bash
install -p -m 644 contrib/completion/zsh/_docker
%{buildroot}%{_datadir}/zsh/site-functions
%if %{with systemd}
install -d %{buildroot}%{_unitdir}
-install -p -m 644 %{SOURCE1} %{buildroot}%{_unitdir}
+install -p -m 644 contrib/init/systemd/docker.service %{buildroot}%{_unitdir}
%else
install -d %{buildroot}%{_sysconfdir}/sysconfig/
-install -p -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/docker
+install -p -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/sysconfig/docker
install -d %{buildroot}%{_initddir}
-install -p -m 755 %{SOURCE3} %{buildroot}%{_initddir}/docker
+install -p -m 755 %{SOURCE2} %{buildroot}%{_initddir}/docker
%endif
install -d %{buildroot}%{_sysconfdir}/udev/rules.d
install -p -m 755 contrib/udev/80-docker.rules %{buildroot}%{_sysconfdir}/udev/rules.d
@@ -123,7 +127,7 @@ exit 0
%post
%if %{with systemd}
-%systemd_post %{SOURCE1}
+%systemd_post docker
%else
# install but don't activate
/sbin/chkconfig --add docker
@@ -131,7 +135,7 @@ exit 0
%preun
%if %{with systemd}
-%systemd_preun %{SOURCE1}
+%systemd_preun docker
%else
/sbin/service docker stop >/dev/null 2>&1
/sbin/chkconfig --del docker
@@ -139,7 +143,7 @@ exit 0
%postun
%if %{with systemd}
-%systemd_postun_with_restart %{SOURCE1}
+%systemd_postun_with_restart docker
%else
if [ "$1" -ge "1" ] ; then
/sbin/service docker condrestart >/dev/null 2>&1 || :
@@ -167,12 +171,9 @@ fi
%{_sysconfdir}/udev/rules.d/80-docker.rules
%changelog
-* Wed Jan 22 2014 Lokesh Mandvekar <lsm5(a)redhat.com> - 0.7.6-4
-- correct typos in manpage
-
-* Wed Jan 22 2014 Lokesh Mandvekar <lsm5(a)redhat.com> - 0.7.6-3
-- install fedora customized manpage instead of upstream provided version
-- get rid of python-sphinx* dependencies
+* Wed Feb 05 2014 Lokesh Mandvekar <lsm5(a)redhat.com> - 0.8.0-1
+- upstream version bump
+- don't use btrfs for rhel6 and clones (yet)
* Mon Jan 20 2014 Lokesh Mandvekar <lsm5(a)redhat.com> - 0.7.6-2
- bridge-utils only for rhel < 7
diff --git a/ignore-btrfs-for-rhel6.patch b/ignore-btrfs-for-rhel6.patch
new file mode 100644
index 0000000..5e8cfd5
--- /dev/null
+++ b/ignore-btrfs-for-rhel6.patch
@@ -0,0 +1,256 @@
+From 4502ce66c679c19d1e4c78eda417063ec87b0656 Mon Sep 17 00:00:00 2001
+From: Lokesh Mandvekar <lsm5(a)redhat.com>
+Date: Wed, 5 Feb 2014 14:29:41 -0500
+Subject: [PATCH] ignore btrfs for rhel6
+
+---
+ graphdriver/btrfs/btrfs.go | 213 ---------------------------------
+ graphdriver/btrfs/dummy_unsupported.go | 3 -
+ runtime.go | 1 -
+ 3 files changed, 217 deletions(-)
+ delete mode 100644 graphdriver/btrfs/btrfs.go
+ delete mode 100644 graphdriver/btrfs/dummy_unsupported.go
+
+diff --git a/graphdriver/btrfs/btrfs.go b/graphdriver/btrfs/btrfs.go
+deleted file mode 100644
+index 592e058..0000000
+--- a/graphdriver/btrfs/btrfs.go
++++ /dev/null
+@@ -1,213 +0,0 @@
+-// +build linux,amd64
+-
+-package btrfs
+-
+-/*
+-#include <stdlib.h>
+-#include <dirent.h>
+-#include <btrfs/ioctl.h>
+-*/
+-import "C"
+-
+-import (
+- "fmt"
+- "github.com/dotcloud/docker/graphdriver"
+- "os"
+- "path"
+- "syscall"
+- "unsafe"
+-)
+-
+-func init() {
+- graphdriver.Register("btrfs", Init)
+-}
+-
+-func Init(home string) (graphdriver.Driver, error) {
+- rootdir := path.Dir(home)
+-
+- var buf syscall.Statfs_t
+- if err := syscall.Statfs(rootdir, &buf); err != nil {
+- return nil, err
+- }
+-
+- if buf.Type != 0x9123683E {
+- return nil, fmt.Errorf("%s is not a btrfs filesystem", rootdir)
+- }
+-
+- return &Driver{
+- home: home,
+- }, nil
+-}
+-
+-type Driver struct {
+- home string
+-}
+-
+-func (d *Driver) String() string {
+- return "btrfs"
+-}
+-
+-func (d *Driver) Status() [][2]string {
+- return nil
+-}
+-
+-func (d *Driver) Cleanup() error {
+- return nil
+-}
+-
+-func free(p *C.char) {
+- C.free(unsafe.Pointer(p))
+-}
+-
+-func openDir(path string) (*C.DIR, error) {
+- Cpath := C.CString(path)
+- defer free(Cpath)
+-
+- dir := C.opendir(Cpath)
+- if dir == nil {
+- return nil, fmt.Errorf("Can't open dir")
+- }
+- return dir, nil
+-}
+-
+-func closeDir(dir *C.DIR) {
+- if dir != nil {
+- C.closedir(dir)
+- }
+-}
+-
+-func getDirFd(dir *C.DIR) uintptr {
+- return uintptr(C.dirfd(dir))
+-}
+-
+-func subvolCreate(path, name string) error {
+- dir, err := openDir(path)
+- if err != nil {
+- return err
+- }
+- defer closeDir(dir)
+-
+- var args C.struct_btrfs_ioctl_vol_args
+- for i, c := range []byte(name) {
+- args.name[i] = C.char(c)
+- }
+-
+- _, _, errno := syscall.Syscall(syscall.SYS_IOCTL, getDirFd(dir),
C.BTRFS_IOC_SUBVOL_CREATE,
+- uintptr(unsafe.Pointer(&args)))
+- if errno != 0 {
+- return fmt.Errorf("Failed to create btrfs subvolume: %v", errno.Error())
+- }
+- return nil
+-}
+-
+-func subvolSnapshot(src, dest, name string) error {
+- srcDir, err := openDir(src)
+- if err != nil {
+- return err
+- }
+- defer closeDir(srcDir)
+-
+- destDir, err := openDir(dest)
+- if err != nil {
+- return err
+- }
+- defer closeDir(destDir)
+-
+- var args C.struct_btrfs_ioctl_vol_args_v2
+- args.fd = C.__s64(getDirFd(srcDir))
+- for i, c := range []byte(name) {
+- args.name[i] = C.char(c)
+- }
+-
+- _, _, errno := syscall.Syscall(syscall.SYS_IOCTL, getDirFd(destDir),
C.BTRFS_IOC_SNAP_CREATE_V2,
+- uintptr(unsafe.Pointer(&args)))
+- if errno != 0 {
+- return fmt.Errorf("Failed to create btrfs snapshot: %v", errno.Error())
+- }
+- return nil
+-}
+-
+-func subvolDelete(path, name string) error {
+- dir, err := openDir(path)
+- if err != nil {
+- return err
+- }
+- defer closeDir(dir)
+-
+- var args C.struct_btrfs_ioctl_vol_args
+- for i, c := range []byte(name) {
+- args.name[i] = C.char(c)
+- }
+-
+- _, _, errno := syscall.Syscall(syscall.SYS_IOCTL, getDirFd(dir),
C.BTRFS_IOC_SNAP_DESTROY,
+- uintptr(unsafe.Pointer(&args)))
+- if errno != 0 {
+- return fmt.Errorf("Failed to destroy btrfs snapshot: %v", errno.Error())
+- }
+- return nil
+-}
+-
+-func (d *Driver) subvolumesDir() string {
+- return path.Join(d.home, "subvolumes")
+-}
+-
+-func (d *Driver) subvolumesDirId(id string) string {
+- return path.Join(d.subvolumesDir(), id)
+-}
+-
+-func (d *Driver) Create(id string, parent string) error {
+- subvolumes := path.Join(d.home, "subvolumes")
+- if err := os.MkdirAll(subvolumes, 0700); err != nil {
+- return err
+- }
+- if parent == "" {
+- if err := subvolCreate(subvolumes, id); err != nil {
+- return err
+- }
+- } else {
+- parentDir, err := d.Get(parent)
+- if err != nil {
+- return err
+- }
+- if err := subvolSnapshot(parentDir, subvolumes, id); err != nil {
+- return err
+- }
+- }
+- return nil
+-}
+-
+-func (d *Driver) Remove(id string) error {
+- dir := d.subvolumesDirId(id)
+- if _, err := os.Stat(dir); err != nil {
+- return err
+- }
+- if err := subvolDelete(d.subvolumesDir(), id); err != nil {
+- return err
+- }
+- return os.RemoveAll(dir)
+-}
+-
+-func (d *Driver) Get(id string) (string, error) {
+- dir := d.subvolumesDirId(id)
+- st, err := os.Stat(dir)
+- if err != nil {
+- return "", err
+- }
+-
+- if !st.IsDir() {
+- return "", fmt.Errorf("%s: not a directory", dir)
+- }
+-
+- return dir, nil
+-}
+-
+-func (d *Driver) Put(id string) {
+- // Get() creates no runtime resources (like e.g. mounts)
+- // so this doesn't need to do anything.
+-}
+-
+-func (d *Driver) Exists(id string) bool {
+- dir := d.subvolumesDirId(id)
+- _, err := os.Stat(dir)
+- return err == nil
+-}
+diff --git a/graphdriver/btrfs/dummy_unsupported.go
b/graphdriver/btrfs/dummy_unsupported.go
+deleted file mode 100644
+index 6c44615..0000000
+--- a/graphdriver/btrfs/dummy_unsupported.go
++++ /dev/null
+@@ -1,3 +0,0 @@
+-// +build !linux !amd64
+-
+-package btrfs
+diff --git a/runtime.go b/runtime.go
+index 7e4ae79..b8f315d 100644
+--- a/runtime.go
++++ b/runtime.go
+@@ -10,7 +10,6 @@ import (
+ "github.com/dotcloud/docker/execdriver/lxc"
+ "github.com/dotcloud/docker/graphdriver"
+ "github.com/dotcloud/docker/graphdriver/aufs"
+- _ "github.com/dotcloud/docker/graphdriver/btrfs"
+ _ "github.com/dotcloud/docker/graphdriver/devmapper"
+ _ "github.com/dotcloud/docker/graphdriver/vfs"
+ _ "github.com/dotcloud/docker/networkdriver/lxc"
+--
+1.8.5.3
+
diff --git a/sources b/sources
index 8b111eb..4c76ff3 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-4c189bce50dac608d0ab7d24f132a889 v0.7.6.tar.gz
+737aec190c2ad81b00192f858f9ed31b v0.8.0.tar.gz