From 39558c022f2955699878f58d29f47e77eaf380f1 Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Wed, 7 May 2014 22:01:07 +0000 Subject: [PATCH] community/docker: patch updates --- .../0001-ARM-as-allowed-architecture.patch | 25 +++++++++++++++++++ .../0002-Fix-btrfs-detection-on-ARM.patch | 25 +++++++++++++++++++ ...003-setBridgeMacAddress-ARM-support.patch} | 16 ++++++++++++ community/docker/PKGBUILD | 18 ++++++------- community/docker/btrfs-arm.patch | 24 ------------------ community/docker/docker-arm.patch | 13 ---------- 6 files changed, 75 insertions(+), 46 deletions(-) create mode 100644 community/docker/0001-ARM-as-allowed-architecture.patch create mode 100644 community/docker/0002-Fix-btrfs-detection-on-ARM.patch rename community/docker/{docker-setBridgeMacAddress-ARM.patch => 0003-setBridgeMacAddress-ARM-support.patch} (81%) delete mode 100644 community/docker/btrfs-arm.patch delete mode 100644 community/docker/docker-arm.patch diff --git a/community/docker/0001-ARM-as-allowed-architecture.patch b/community/docker/0001-ARM-as-allowed-architecture.patch new file mode 100644 index 000000000..c842f3974 --- /dev/null +++ b/community/docker/0001-ARM-as-allowed-architecture.patch @@ -0,0 +1,25 @@ +From aac5df4ecbb56c741afb63e2ca5d7ca42b59a736 Mon Sep 17 00:00:00 2001 +From: Kevin Mihelich +Date: Wed, 7 May 2014 15:42:38 -0600 +Subject: [PATCH 1/3] ARM as allowed architecture + +--- + docker/docker.go | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/docker/docker.go b/docker/docker.go +index 26ccd24..19de4a0 100644 +--- a/docker/docker.go ++++ b/docker/docker.go +@@ -251,7 +251,7 @@ func showVersion() { + + func checkKernelAndArch() error { + // Check for unsupported architectures +- if runtime.GOARCH != "amd64" { ++ if runtime.GOARCH != "amd64" && runtime.GOARCH != "arm" { + return fmt.Errorf("The docker runtime currently only supports amd64 (not %s). This will change in the future. Aborting.", runtime.GOARCH) + } + // Check for unsupported kernel versions +-- +1.9.0 + diff --git a/community/docker/0002-Fix-btrfs-detection-on-ARM.patch b/community/docker/0002-Fix-btrfs-detection-on-ARM.patch new file mode 100644 index 000000000..5d1b79839 --- /dev/null +++ b/community/docker/0002-Fix-btrfs-detection-on-ARM.patch @@ -0,0 +1,25 @@ +From 204b0076d78108a11e0b60c0dc3a62bb8a6472b6 Mon Sep 17 00:00:00 2001 +From: Kevin Mihelich +Date: Wed, 7 May 2014 15:44:57 -0600 +Subject: [PATCH 2/3] Fix btrfs detection on ARM + +--- + daemon/graphdriver/btrfs/btrfs.go | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/daemon/graphdriver/btrfs/btrfs.go b/daemon/graphdriver/btrfs/btrfs.go +index 4d19553..0b437b4 100644 +--- a/daemon/graphdriver/btrfs/btrfs.go ++++ b/daemon/graphdriver/btrfs/btrfs.go +@@ -30,7 +30,7 @@ func Init(home string) (graphdriver.Driver, error) { + return nil, err + } + +- if buf.Type != 0x9123683E { ++ if buf.Type != -1859950530 { + return nil, fmt.Errorf("%s is not a btrfs filesystem", rootdir) + } + +-- +1.9.0 + diff --git a/community/docker/docker-setBridgeMacAddress-ARM.patch b/community/docker/0003-setBridgeMacAddress-ARM-support.patch similarity index 81% rename from community/docker/docker-setBridgeMacAddress-ARM.patch rename to community/docker/0003-setBridgeMacAddress-ARM-support.patch index 3c80eb167..94a53e44c 100644 --- a/community/docker/docker-setBridgeMacAddress-ARM.patch +++ b/community/docker/0003-setBridgeMacAddress-ARM-support.patch @@ -1,3 +1,16 @@ +From 7348f406a6de412ef070d5e384e35a31e355564d Mon Sep 17 00:00:00 2001 +From: Kevin Mihelich +Date: Wed, 7 May 2014 15:47:33 -0600 +Subject: [PATCH 3/3] setBridgeMacAddress ARM support + +--- + pkg/netlink/netlink_linux.go | 19 ------------------- + pkg/netlink/setbridgemacaddress_amd64.go | 27 +++++++++++++++++++++++++++ + pkg/netlink/setbridgemacaddress_arm.go | 27 +++++++++++++++++++++++++++ + 3 files changed, 54 insertions(+), 19 deletions(-) + create mode 100644 pkg/netlink/setbridgemacaddress_amd64.go + create mode 100644 pkg/netlink/setbridgemacaddress_arm.go + diff --git a/pkg/netlink/netlink_linux.go b/pkg/netlink/netlink_linux.go index 6de293d..77a411b 100644 --- a/pkg/netlink/netlink_linux.go @@ -100,3 +113,6 @@ index 0000000..a5e59c5 + return nil +} \ No newline at end of file +-- +1.9.0 + diff --git a/community/docker/PKGBUILD b/community/docker/PKGBUILD index b6af533b9..9441a052a 100644 --- a/community/docker/PKGBUILD +++ b/community/docker/PKGBUILD @@ -20,23 +20,23 @@ optdepends=('btrfs-progs: btrfs backend support' options=('!strip') install=$pkgname.install source=("git+https://github.com/dotcloud/docker.git#tag=v$pkgver" - 'docker-arm.patch' - 'btrfs-arm.patch' - 'docker-setBridgeMacAddress-ARM.patch') + '0001-ARM-as-allowed-architecture.patch' + '0002-Fix-btrfs-detection-on-ARM.patch' + '0003-setBridgeMacAddress-ARM-support.patch') md5sums=('SKIP' - '47cc1cdf900af66660bfa3402012ea71' - '4683e045fd3f3ac40211c5b845bb693a' - '06d254bec427fa3f6b8a5846b60da1e6') + 'c003084f4cf0f754c868662a8bae95e8' + 'f3ed840798065ca2a40e40b07d5e4069' + 'f42c2001c85556830598a8ec07430d53') prepare() { cd "docker" - patch -p1 -i ../docker-arm.patch - patch -p1 -i ../btrfs-arm.patch + patch -p1 -i ../0001-ARM-as-allowed-architecture.patch + patch -p1 -i ../0002-Fix-btrfs-detection-on-ARM.patch find . -name '*.go' | xargs sed --in-place= -e 's/\/\/ +build amd64/\/\/ +build arm/' find . -name '*.go' | xargs sed --in-place= -e 's/\/\/ +build !linux !amd64/\/\/ +build !linux !arm/' find . -name '*.go' | xargs sed --in-place= -e 's/\/\/ +build linux,amd64/\/\/ +build linux,arm/' # This patch is applicable after the seds. - patch -p1 -i ../docker-setBridgeMacAddress-ARM.patch + patch -p1 -i ../0003-setBridgeMacAddress-ARM-support.patch } build() { diff --git a/community/docker/btrfs-arm.patch b/community/docker/btrfs-arm.patch deleted file mode 100644 index d5ec66a55..000000000 --- a/community/docker/btrfs-arm.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 23c1b0f9a91dcf3c7dc83dc0af44826cb8e96562 Mon Sep 17 00:00:00 2001 -From: Vladimir Pouzanov -Date: Sat, 22 Feb 2014 22:25:10 +0000 -Subject: [PATCH] Golang sucks so much sometimes - ---- - graphdriver/btrfs/btrfs.go | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/graphdriver/btrfs/btrfs.go b/graphdriver/btrfs/btrfs.go -index 592e058..03faf85 100644 ---- a/runtime/graphdriver/btrfs/btrfs.go -+++ b/runtime/graphdriver/btrfs/btrfs.go -@@ -30,7 +30,7 @@ func Init(home string) (graphdriver.Driver, error) { - return nil, err - } - -- if buf.Type != 0x9123683E { -+ if buf.Type != -1859950530 { - return nil, fmt.Errorf("%s is not a btrfs filesystem", rootdir) - } - --- -1.9.0 diff --git a/community/docker/docker-arm.patch b/community/docker/docker-arm.patch deleted file mode 100644 index b87a634d7..000000000 --- a/community/docker/docker-arm.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/engine/engine.go b/engine/engine.go -index 5da0a97..f468a59 100644 ---- a/engine/engine.go -+++ b/engine/engine.go -@@ -60,7 +60,7 @@ func (eng *Engine) Register(name string, handler Handler) error { - // behavior. - func New(root string) (*Engine, error) { - // Check for unsupported architectures -- if runtime.GOARCH != "amd64" { -+ if runtime.GOARCH != "amd64" && runtime.GOARCH != "arm" { - return nil, fmt.Errorf("The docker runtime currently only supports amd64 (not %s). This will change in the future. Aborting.", runtime.GOARCH) - } - // Check for unsupported kernel versions