From 85a62d9b779bfb351e159f38c2fc95900a0532cd Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Thu, 13 Mar 2014 15:10:35 -0400 Subject: [PATCH 1/4] btrfs: build tags Default to the same build behavior, but allow a go build tag to disable building of the btrfs graphdriver go build -tags no_btrfs' ... $ go build $ objdump -S docker | grep btrfs | wc -l 194 $ go build -tags no_btrfs $ objdump -S docker | grep btrfs | wc -l 1 # that is a comment ;-) Docker-DCO-1.1-Signed-off-by: Vincent Batts (github: vbatts) --- runtime/runtime.go | 1 - runtime/runtime_btfs.go | 7 +++++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 runtime/runtime_btfs.go diff --git a/runtime/runtime.go b/runtime/runtime.go index 43230488a2..4408e13902 100644 --- a/runtime/runtime.go +++ b/runtime/runtime.go @@ -16,7 +16,6 @@ import ( "github.com/dotcloud/docker/runtime/execdriver/execdrivers" "github.com/dotcloud/docker/runtime/execdriver/lxc" "github.com/dotcloud/docker/runtime/graphdriver" - _ "github.com/dotcloud/docker/runtime/graphdriver/btrfs" _ "github.com/dotcloud/docker/runtime/graphdriver/vfs" _ "github.com/dotcloud/docker/runtime/networkdriver/lxc" "github.com/dotcloud/docker/runtime/networkdriver/portallocator" diff --git a/runtime/runtime_btfs.go b/runtime/runtime_btfs.go new file mode 100644 index 0000000000..5e941386c3 --- /dev/null +++ b/runtime/runtime_btfs.go @@ -0,0 +1,7 @@ +// +build !no_btrfs + +package runtime + +import ( + _ "github.com/dotcloud/docker/runtime/graphdriver/btrfs" +) From 5cfea26bcfc218ca72eac7115fa257833f28b9f2 Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Thu, 13 Mar 2014 17:38:54 -0400 Subject: [PATCH 2/4] btrfs: build tags correct filename and make the tag more readable Docker-DCO-1.1-Signed-off-by: Vincent Batts (github: vbatts) --- runtime/{runtime_btfs.go => runtime_btrfs.go} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename runtime/{runtime_btfs.go => runtime_btrfs.go} (70%) diff --git a/runtime/runtime_btfs.go b/runtime/runtime_btrfs.go similarity index 70% rename from runtime/runtime_btfs.go rename to runtime/runtime_btrfs.go index 5e941386c3..c59b103ff9 100644 --- a/runtime/runtime_btfs.go +++ b/runtime/runtime_btrfs.go @@ -1,4 +1,4 @@ -// +build !no_btrfs +// +build !exclude_graphdriver_btrfs package runtime From 29c45e7f4fc616290e416f1b541e1739820af60c Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Thu, 13 Mar 2014 17:39:25 -0400 Subject: [PATCH 3/4] packagers: btrfs build tag docs Docker-DCO-1.1-Signed-off-by: Vincent Batts (github: vbatts) --- hack/PACKAGERS.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/hack/PACKAGERS.md b/hack/PACKAGERS.md index 5afa381005..297d1500db 100644 --- a/hack/PACKAGERS.md +++ b/hack/PACKAGERS.md @@ -160,15 +160,23 @@ export DOCKER_BUILDTAGS='apparmor' There are build tags for disabling graphdrivers as well. By default, support for all graphdrivers are built in. -To disable devicemapper +To disable btrfs: +```bash +export DOCKER_BUILDTAGS='exclude_graphdriver_btrfs' +``` + +To disable devicemapper: ```bash export DOCKER_BUILDTAGS='exclude_graphdriver_devicemapper' ``` -To disable aufs + +To disable aufs: ```bash export DOCKER_BUILDTAGS='exclude_graphdriver_aufs' ``` +NOTE: if you need to set more than one build tag, space seperate them. + ### Static Daemon If it is feasible within the constraints of your distribution, you should From c76def2dd23cf90fdc80224f08530205b6dcba73 Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Fri, 14 Mar 2014 04:19:05 +0000 Subject: [PATCH 4/4] typo Docker-DCO-1.1-Signed-off-by: Vincent Batts (github: vbatts) --- hack/PACKAGERS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/PACKAGERS.md b/hack/PACKAGERS.md index 297d1500db..47e8413bf3 100644 --- a/hack/PACKAGERS.md +++ b/hack/PACKAGERS.md @@ -175,7 +175,7 @@ To disable aufs: export DOCKER_BUILDTAGS='exclude_graphdriver_aufs' ``` -NOTE: if you need to set more than one build tag, space seperate them. +NOTE: if you need to set more than one build tag, space separate them. ### Static Daemon