# HG changeset patch # User Amit Krishnan # Date 1492708564 25200 # Node ID 1f1a5eef79251c8e32f3358efc22811053deccac # Parent 85d01b2eb34a19512e59d990e087adcd98f2b0da 25247803 Docker container restart fails 25809700 need docker support on SPARC 25796772 Revert to calling runz create + start instead of runz run in execdriver diff -r 85d01b2eb34a -r 1f1a5eef7925 components/docker/Makefile --- a/components/docker/Makefile Wed Apr 19 22:59:18 2017 -0700 +++ b/components/docker/Makefile Thu Apr 20 10:16:04 2017 -0700 @@ -22,7 +22,6 @@ # # Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. # -BUILD_ARCH= i386 BUILD_BITS= 64 include ../../make-rules/shared-macros.mk @@ -38,11 +37,8 @@ TPNO= 27475 BUILD_STYLE= justmake -# Remove the conditional when BUILD_ARCH is removed above. -ifeq ($(strip $(BUILD_ARCH)),$(MACH)) BUILD_TARGET= INSTALL_TARGET= -endif TEST_TARGET= $(NO_TESTS) # Requires S12-only changes from ON. @@ -57,8 +53,6 @@ PKG_PROTO_DIRS += $(COMPONENT_DIR)/files/man -# Remove the conditional when BUILD_ARCH is removed above. -ifeq ($(strip $(BUILD_ARCH)),$(MACH)) ifneq ($(BUILD_TYPE), evaluation) # common targets build: $(SOURCE_DIR)/.prep @@ -69,13 +63,10 @@ install: FRC $(TOUCH) $(SOURCE_DIR)/.installed endif -endif REQUIRED_PACKAGES += database/sqlite-3 -ifeq ($(MACH), i386) REQUIRED_PACKAGES += developer/golang -REQUIRED_PACKAGES += library/golang/sys-15 -endif +REQUIRED_PACKAGES += library/golang/sys-17 REQUIRED_PACKAGES += network/firewall REQUIRED_PACKAGES += system/core-os REQUIRED_PACKAGES += system/library diff -r 85d01b2eb34a -r 1f1a5eef7925 components/docker/patches/0001-Solaris-v1.10.3.patch --- a/components/docker/patches/0001-Solaris-v1.10.3.patch Wed Apr 19 22:59:18 2017 -0700 +++ b/components/docker/patches/0001-Solaris-v1.10.3.patch Thu Apr 20 10:16:04 2017 -0700 @@ -1,12 +1,282 @@ -From 1bf2c9d74d8e53335f4e36f66cd400f9dd0e8ac1 Mon Sep 17 00:00:00 2001 -From: Edward Pilatowicz -Date: Tue, 21 Mar 2017 22:27:52 -0700 +From 6a293987452dffd04df51fb75e2953dbd432a765 Mon Sep 17 00:00:00 2001 +From: Amit Krishnan +Date: Wed, 19 Apr 2017 13:49:33 -0700 Subject: [PATCH] Solaris-v1.10.3 +--- + Dockerfile.solaris | 26 + + Makefile | 35 +- + api/client/run.go | 1 + + api/client/version.go | 20 - + api/server/router/container/container_routes.go | 7 + + api/server/server_unix.go | 2 +- + container/container_solaris.go | 650 ++++++++++++ + container/monitor.go | 9 + + container/state_solaris.go | 9 + + contrib/docker-device-tool/device_tool.go | 2 +- + contrib/httpserver/Dockerfile | 2 +- + contrib/mkimage.sh | 11 + + contrib/mkimage/solaris | 120 +++ + daemon/commit.go | 22 +- + daemon/config.go | 4 + + daemon/config_solaris.go | 66 ++ + daemon/config_test.go | 30 +- + daemon/container_operations_solaris.go | 973 ++++++++++++++++++ + daemon/daemon.go | 6 +- + daemon/daemon_solaris.go | 576 +++++++++++ + daemon/daemon_test.go | 2 + + daemon/daemon_unix_test.go | 2 +- + daemon/daemon_unsupported.go | 2 +- + daemon/daemonbuilder/builder_unix.go | 2 +- + daemon/debugtrap_unsupported.go | 2 +- + daemon/exec_solaris.go | 18 + + daemon/execdriver/driver_solaris.go | 76 ++ + daemon/execdriver/driver_unix.go | 2 +- + .../execdriver/execdrivers/execdrivers_solaris.go | 13 + + daemon/execdriver/zones/driver.go | 807 +++++++++++++++ + daemon/execdriver/zones/driver_unsupported.go | 12 + + .../execdriver/zones/driver_unsupported_nocgo.go | 13 + + daemon/graphdriver/driver_solaris.go | 8 + + daemon/graphdriver/driver_unsupported.go | 2 +- + daemon/graphdriver/graphtest/graphtest_unix.go | 2 +- + daemon/graphdriver/register/register_zfs.go | 2 +- + daemon/graphdriver/zfs/zfs.go | 47 +- + daemon/graphdriver/zfs/zfs_freebsd.go | 36 + + daemon/graphdriver/zfs/zfs_linux.go | 37 + + daemon/graphdriver/zfs/zfs_solaris.go | 95 ++ + daemon/graphdriver/zfs/zfs_unsupported.go | 2 +- + daemon/info.go | 2 - + daemon/inspect_solaris.go | 30 + + daemon/inspect_unix.go | 2 +- + daemon/list_unix.go | 2 +- + daemon/network.go | 7 + + daemon/selinux_unsupported.go | 8 + + daemon/start.go | 16 + + daemon/stats_collector_solaris.go | 537 ++++++++++ + daemon/stats_collector_unix.go | 2 +- + daemon/stats_solaris.go | 84 ++ + docker/daemon_solaris.go | 58 ++ + docker/daemon_unix.go | 2 +- + hack/.vendor-helpers.sh | 8 +- + hack/make.sh | 14 +- + hack/make/.detect-daemon-osarch | 20 +- + hack/make/.ensure-httpserver | 2 +- + hack/make/.integration-daemon-setup | 6 +- + hack/make/.integration-daemon-start | 9 +- + integration-cli/docker_api_build_test.go | 4 +- + integration-cli/docker_api_events_test.go | 4 +- + integration-cli/docker_api_exec_test.go | 6 +- + integration-cli/docker_api_inspect_test.go | 14 +- + integration-cli/docker_api_volumes_test.go | 4 +- + integration-cli/docker_cli_attach_unix_test.go | 2 +- + integration-cli/docker_cli_authz_unix_test.go | 2 +- + integration-cli/docker_cli_build_test.go | 2 +- + integration-cli/docker_cli_build_unix_test.go | 2 +- + integration-cli/docker_cli_create_test.go | 4 +- + integration-cli/docker_cli_daemon_test.go | 14 + + integration-cli/docker_cli_events_test.go | 4 +- + integration-cli/docker_cli_events_unix_test.go | 54 +- + integration-cli/docker_cli_exec_unix_test.go | 2 +- + integration-cli/docker_cli_images_test.go | 8 +- + integration-cli/docker_cli_inspect_test.go | 24 +- + integration-cli/docker_cli_links_test.go | 2 + + integration-cli/docker_cli_links_unix_test.go | 2 +- + integration-cli/docker_cli_network_unix_test.go | 2 +- + integration-cli/docker_cli_ps_test.go | 15 +- + integration-cli/docker_cli_run_test.go | 341 +++---- + integration-cli/docker_cli_run_unix_test.go | 49 +- + integration-cli/docker_cli_save_load_unix_test.go | 2 +- + .../docker_cli_start_volume_driver_unix_test.go | 16 +- + .../docker_cli_volume_driver_compat_unix_test.go | 4 +- + integration-cli/docker_cli_volume_test.go | 12 +- + integration-cli/docker_cli_wait_test.go | 4 +- + integration-cli/docker_test_vars.go | 2 +- + integration-cli/docker_utils.go | 2 +- + integration-cli/test_vars_unix.go | 4 +- + layer/layer_unix.go | 2 +- + migrate/v1/migratev1_test.go | 2 + + opts/hosts.go | 3 - + opts/hosts_solaris.go | 10 + + opts/hosts_test.go | 4 +- + opts/hosts_unix.go | 6 +- + pkg/archive/archive_test.go | 38 +- + pkg/archive/changes_test.go | 12 +- + pkg/chrootarchive/archive_test.go | 54 +- + pkg/chrootarchive/diff_unix.go | 1 - + pkg/directory/directory_unix.go | 2 +- + pkg/fileutils/fileutils_solaris.go | 7 + + pkg/integration/utils_test.go | 11 +- + pkg/mount/flags_solaris.go | 42 + + pkg/mount/flags_unsupported.go | 2 +- + pkg/mount/mount.go | 3 +- + pkg/mount/mount_test.go | 2 + + pkg/mount/mounter_solaris.go | 33 + + pkg/mount/mounter_unsupported.go | 2 +- + pkg/mount/mountinfo_solaris.go | 35 + + pkg/mount/mountinfo_unsupported.go | 2 +- + pkg/parsers/kernel/uname_solaris.go | 14 + + pkg/parsers/kernel/uname_unsupported.go | 2 +- + .../operatingsystem/operatingsystem_solaris.go | 33 + + pkg/platform/architecture_solaris.go | 16 + + pkg/proxy/network_proxy_test.go | 40 +- + pkg/reexec/command_solaris.go | 23 + + pkg/reexec/command_unsupported.go | 2 +- + pkg/signal/signal_solaris.go | 42 + + pkg/signal/signal_unsupported.go | 2 +- + pkg/sysinfo/sysinfo_solaris.go | 117 +++ + pkg/system/meminfo_solaris.go | 127 +++ + pkg/system/meminfo_unsupported.go | 2 +- + pkg/system/stat_linux.go | 33 - + pkg/system/stat_solaris.go | 20 +- + pkg/system/stat_unix.go | 35 + + pkg/system/stat_unsupported.go | 2 +- + pkg/term/tc_other.go | 1 + + pkg/term/tc_solaris_cgo.go | 60 ++ + pkg/term/term.go | 22 - + pkg/term/term_solaris.go | 39 + + pkg/term/term_unix.go | 27 + + registry/auth_test.go | 2 + + registry/registry_mock_test.go | 2 + + registry/registry_test.go | 2 + + runconfig/hostconfig_solaris.go | 82 ++ + runconfig/hostconfig_unix.go | 1 + + runconfig/opts/parse.go | 2 + + .../github.com/Sirupsen/logrus/terminal_solaris.go | 15 + + vendor/src/github.com/boltdb/bolt/bolt_amd64.go | 3 + + vendor/src/github.com/boltdb/bolt/bolt_sparc64.go | 10 + + vendor/src/github.com/boltdb/bolt/bucket.go | 16 + + .../docker/engine-api/types/container/config.go | 4 + + .../engine-api/types/container/host_config.go | 1 + + .../github.com/docker/engine-api/types/types.go | 2 - + .../docker/go-connections/sockets/unix_socket.go | 2 +- + .../docker/libnetwork/default_gateway_solaris.go | 7 + + .../libnetwork/drivers/solaris/bridge/bridge.go | 1041 ++++++++++++++++++++ + .../drivers/solaris/bridge/bridge_store.go | 212 ++++ + .../libnetwork/drivers/solaris/bridge/errors.go | 341 +++++++ + .../drivers/solaris/bridge/port_mapping.go | 247 +++++ + .../docker/libnetwork/drivers_solaris.go | 13 + + .../docker/libnetwork/ipamutils/utils_solaris.go | 92 ++ + vendor/src/github.com/docker/libnetwork/network.go | 2 - + .../docker/libnetwork/osl/interface_solaris.go | 6 + + .../docker/libnetwork/osl/namespace_solaris.go | 41 + + .../docker/libnetwork/osl/namespace_unsupported.go | 2 +- + .../docker/libnetwork/osl/neigh_solaris.go | 6 + + .../docker/libnetwork/osl/sandbox_unsupported.go | 2 +- + .../libnetwork/portallocator/portallocator.go | 22 - + .../portallocator/portallocator_linux.go | 28 + + .../portallocator/portallocator_solaris.go | 5 + + .../docker/libnetwork/portmapper/mapper.go | 228 ----- + .../docker/libnetwork/portmapper/mapper_linux.go | 228 +++++ + .../docker/libnetwork/portmapper/mapper_solaris.go | 150 +++ + .../docker/libnetwork/portmapper/mock_proxy.go | 18 - + .../libnetwork/portmapper/mock_proxy_linux.go | 18 + + .../docker/libnetwork/portmapper/proxy.go | 209 ---- + .../docker/libnetwork/portmapper/proxy_linux.go | 209 ++++ + vendor/src/github.com/docker/libnetwork/sandbox.go | 7 +- + .../libnetwork/sandbox_externalkey_solaris.go | 45 + + .../docker/libnetwork/sandbox_externalkey_unix.go | 2 +- + .../src/github.com/godbus/dbus/transport_unix.go | 2 +- + vendor/src/github.com/kr/pty/ioctl.go | 2 + + vendor/src/github.com/kr/pty/util.go | 11 - + vendor/src/github.com/mistifyio/go-zfs/utils.go | 82 +- + .../mistifyio/go-zfs/utils_notsolaris.go | 82 ++ + .../github.com/mistifyio/go-zfs/utils_solaris.go | 85 ++ + vendor/src/github.com/mistifyio/go-zfs/zfs.go | 86 +- + .../github.com/mistifyio/go-zfs/zfs_notsolaris.go | 80 ++ + .../src/github.com/mistifyio/go-zfs/zfs_solaris.go | 87 ++ + vendor/src/github.com/mistifyio/go-zfs/zpool.go | 37 +- + .../mistifyio/go-zfs/zpool_notsolaris.go | 33 + + .../github.com/mistifyio/go-zfs/zpool_solaris.go | 40 + + .../runc/libcontainer/configs/cgroup_solaris.go | 6 + + .../libcontainer/configs/cgroup_unsupported.go | 2 +- + .../runc/libcontainer/configs/device_defaults.go | 4 +- + .../runc/libcontainer/console_solaris.go | 13 + + .../runc/libcontainer/container_solaris.go | 22 + + .../runc/libcontainer/stats_solaris.go | 8 + + .../runc/libcontainer/system/sysconfig.go | 2 +- + .../runc/libcontainer/zones/stats.go | 86 ++ + vendor/src/gopkg.in/fsnotify.v1/fen.go | 188 ++++ + vendor/src/gopkg.in/fsnotify.v1/fen_cgo.go | 82 ++ + vendor/src/gopkg.in/fsnotify.v1/fsnotify.go | 2 +- + volume/local/local_unix.go | 2 +- + volume/store/store_unix.go | 2 +- + 196 files changed, 9231 insertions(+), 1241 deletions(-) + create mode 100644 Dockerfile.solaris + create mode 100644 container/container_solaris.go + create mode 100644 container/state_solaris.go + create mode 100755 contrib/mkimage/solaris + create mode 100644 daemon/config_solaris.go + create mode 100644 daemon/container_operations_solaris.go + create mode 100644 daemon/daemon_solaris.go + create mode 100644 daemon/exec_solaris.go + create mode 100644 daemon/execdriver/driver_solaris.go + create mode 100644 daemon/execdriver/execdrivers/execdrivers_solaris.go + create mode 100644 daemon/execdriver/zones/driver.go + create mode 100644 daemon/execdriver/zones/driver_unsupported.go + create mode 100644 daemon/execdriver/zones/driver_unsupported_nocgo.go + create mode 100644 daemon/graphdriver/driver_solaris.go + create mode 100644 daemon/graphdriver/zfs/zfs_solaris.go + create mode 100644 daemon/inspect_solaris.go + create mode 100644 daemon/stats_collector_solaris.go + create mode 100644 daemon/stats_solaris.go + create mode 100644 docker/daemon_solaris.go + create mode 100644 opts/hosts_solaris.go + create mode 100644 pkg/fileutils/fileutils_solaris.go + create mode 100644 pkg/mount/flags_solaris.go + create mode 100644 pkg/mount/mounter_solaris.go + create mode 100644 pkg/mount/mountinfo_solaris.go + create mode 100644 pkg/parsers/kernel/uname_solaris.go + create mode 100644 pkg/parsers/operatingsystem/operatingsystem_solaris.go + create mode 100644 pkg/platform/architecture_solaris.go + create mode 100644 pkg/reexec/command_solaris.go + create mode 100644 pkg/signal/signal_solaris.go + create mode 100644 pkg/sysinfo/sysinfo_solaris.go + create mode 100644 pkg/system/meminfo_solaris.go + delete mode 100644 pkg/system/stat_linux.go + create mode 100644 pkg/system/stat_unix.go + create mode 100644 pkg/term/tc_solaris_cgo.go + create mode 100644 pkg/term/term_solaris.go + create mode 100644 pkg/term/term_unix.go + create mode 100644 runconfig/hostconfig_solaris.go + create mode 100644 vendor/src/github.com/Sirupsen/logrus/terminal_solaris.go + create mode 100644 vendor/src/github.com/boltdb/bolt/bolt_sparc64.go + create mode 100644 vendor/src/github.com/docker/libnetwork/default_gateway_solaris.go + create mode 100644 vendor/src/github.com/docker/libnetwork/drivers/solaris/bridge/bridge.go + create mode 100644 vendor/src/github.com/docker/libnetwork/drivers/solaris/bridge/bridge_store.go + create mode 100644 vendor/src/github.com/docker/libnetwork/drivers/solaris/bridge/errors.go + create mode 100644 vendor/src/github.com/docker/libnetwork/drivers/solaris/bridge/port_mapping.go + create mode 100644 vendor/src/github.com/docker/libnetwork/drivers_solaris.go + create mode 100644 vendor/src/github.com/docker/libnetwork/ipamutils/utils_solaris.go + create mode 100644 vendor/src/github.com/docker/libnetwork/osl/interface_solaris.go + create mode 100644 vendor/src/github.com/docker/libnetwork/osl/namespace_solaris.go + create mode 100644 vendor/src/github.com/docker/libnetwork/osl/neigh_solaris.go + create mode 100644 vendor/src/github.com/docker/libnetwork/portallocator/portallocator_linux.go + create mode 100644 vendor/src/github.com/docker/libnetwork/portallocator/portallocator_solaris.go + delete mode 100644 vendor/src/github.com/docker/libnetwork/portmapper/mapper.go + create mode 100644 vendor/src/github.com/docker/libnetwork/portmapper/mapper_linux.go + create mode 100644 vendor/src/github.com/docker/libnetwork/portmapper/mapper_solaris.go + delete mode 100644 vendor/src/github.com/docker/libnetwork/portmapper/mock_proxy.go + create mode 100644 vendor/src/github.com/docker/libnetwork/portmapper/mock_proxy_linux.go + delete mode 100644 vendor/src/github.com/docker/libnetwork/portmapper/proxy.go + create mode 100644 vendor/src/github.com/docker/libnetwork/portmapper/proxy_linux.go + create mode 100644 vendor/src/github.com/docker/libnetwork/sandbox_externalkey_solaris.go + create mode 100644 vendor/src/github.com/mistifyio/go-zfs/utils_notsolaris.go + create mode 100644 vendor/src/github.com/mistifyio/go-zfs/utils_solaris.go + create mode 100644 vendor/src/github.com/mistifyio/go-zfs/zfs_notsolaris.go + create mode 100644 vendor/src/github.com/mistifyio/go-zfs/zfs_solaris.go + create mode 100644 vendor/src/github.com/mistifyio/go-zfs/zpool_notsolaris.go + create mode 100644 vendor/src/github.com/mistifyio/go-zfs/zpool_solaris.go + create mode 100644 vendor/src/github.com/opencontainers/runc/libcontainer/configs/cgroup_solaris.go + create mode 100644 vendor/src/github.com/opencontainers/runc/libcontainer/console_solaris.go + create mode 100644 vendor/src/github.com/opencontainers/runc/libcontainer/container_solaris.go + create mode 100644 vendor/src/github.com/opencontainers/runc/libcontainer/stats_solaris.go + create mode 100644 vendor/src/github.com/opencontainers/runc/libcontainer/zones/stats.go + create mode 100644 vendor/src/gopkg.in/fsnotify.v1/fen.go + create mode 100644 vendor/src/gopkg.in/fsnotify.v1/fen_cgo.go diff --git a/Dockerfile.solaris b/Dockerfile.solaris new file mode 100644 -index 0000000..a4ad4d4 +index 0000000..65f3d63 --- /dev/null +++ b/Dockerfile.solaris @@ -0,0 +1,26 @@ @@ -31,7 +301,7 @@ + developer/gcc-* + +#ENV AUTO_GOPATH 1 -+ENV GOPATH /go/src/github.com/docker/docker/vendor:/go/:/usr/lib/gocode/1.5/ ++ENV GOPATH /go/src/github.com/docker/docker/vendor:/go/:/usr/lib/gocode/1.7/ +ENV DOCKER_CROSSPLATFORMS solaris/amd64 +ENV DOCKER_GITCOMMIT 45354ace9209befa0be9d01ee04894727bfde4cb +WORKDIR /go/src/github.com/docker/docker @@ -3058,10 +3328,10 @@ +} diff --git a/daemon/execdriver/zones/driver.go b/daemon/execdriver/zones/driver.go new file mode 100644 -index 0000000..5649ce1 +index 0000000..eaad4ae --- /dev/null +++ b/daemon/execdriver/zones/driver.go -@@ -0,0 +1,799 @@ +@@ -0,0 +1,807 @@ +// +build solaris,cgo + +package zones @@ -3608,7 +3878,7 @@ + }() + + ProfilesPath := filepath.Join(filepath.Dir(filepath.Dir(c.Rootfs)), "/.svc_bundle") -+ if err = os.Mkdir(ProfilesPath, 0700); err != nil { ++ if err = os.Mkdir(ProfilesPath, 0700); err != nil && !os.IsExist(err) { + return execdriver.ExitStatus{ExitCode: -1}, err + } + @@ -3678,7 +3948,16 @@ + return execdriver.ExitStatus{ExitCode: -1}, err + } + -+ cmd = exec.Command(RUNZ, "run", c.Name, filepath.Dir(filepath.Dir(c.Rootfs))) ++ cmd = exec.Command(RUNZ, "create", c.Name, filepath.Dir(filepath.Dir(c.Rootfs))) ++ cmd.Dir = filepath.Dir(filepath.Dir(c.Rootfs)) ++ cmd.Stdout = pipes.Stdout ++ cmd.Stderr = pipes.Stderr ++ if err = cmd.Run(); err != nil { ++ logrus.Errorf("Error listing property: %v", err) ++ return execdriver.ExitStatus{ExitCode: -1}, err ++ } ++ ++ cmd = exec.Command(RUNZ, "start", c.Name) + cmd.Dir = filepath.Dir(filepath.Dir(c.Rootfs)) + cmd.Stdout = pipes.Stdout + cmd.Stderr = pipes.Stderr @@ -3694,7 +3973,6 @@ + }() + cmd.Stdin = r + } -+ + /* + We do not have a way to pass in a console to runz right now. + If and when we do decide to have that we will need to implement @@ -5179,7 +5457,7 @@ + $find "$target" -name \*.go -exec gsed -i -e "s|\"${remove}|\"|g" {} \; } diff --git a/hack/make.sh b/hack/make.sh -index ca01fd8..464011a 100755 +index ca01fd8..2397afe 100755 --- a/hack/make.sh +++ b/hack/make.sh @@ -71,7 +71,7 @@ if command -v git &> /dev/null && git rev-parse &> /dev/null; then @@ -5199,7 +5477,7 @@ + if [ "$(go env GOOS)" = 'solaris' ]; then + # sys/unix is installed outside the standard library on solaris + # XXX need to allow for version change, need to get version from go -+ export GOPATH="${GOPATH}:/usr/lib/gocode/1.5" ++ export GOPATH="${GOPATH}:/usr/lib/gocode/1.7" + fi fi @@ -9125,6 +9403,60 @@ + _, err := unix.IoctlGetTermios(int(os.Stdout.Fd()), unix.TCGETA) + return err == nil +} +diff --git a/vendor/src/github.com/boltdb/bolt/bolt_amd64.go b/vendor/src/github.com/boltdb/bolt/bolt_amd64.go +index cca6b7e..f3536ec 100644 +--- a/vendor/src/github.com/boltdb/bolt/bolt_amd64.go ++++ b/vendor/src/github.com/boltdb/bolt/bolt_amd64.go +@@ -5,3 +5,6 @@ const maxMapSize = 0xFFFFFFFFFFFF // 256TB + + // maxAllocSize is the size used when creating array pointers. + const maxAllocSize = 0x7FFFFFFF ++ ++// are unaligned load/stores broken on this arch? ++var brokenUnaligned = false +diff --git a/vendor/src/github.com/boltdb/bolt/bolt_sparc64.go b/vendor/src/github.com/boltdb/bolt/bolt_sparc64.go +new file mode 100644 +index 0000000..b04c371 +--- /dev/null ++++ b/vendor/src/github.com/boltdb/bolt/bolt_sparc64.go +@@ -0,0 +1,10 @@ ++package bolt ++ ++// maxMapSize represents the largest mmap size supported by Bolt. ++const maxMapSize = 0xFFFFFFFFFFFF // 256TB ++ ++// maxAllocSize is the size used when creating array pointers. ++const maxAllocSize = 0x7FFFFFFF ++ ++// sparcv9 does not generally allow unaligned load/stores ++var brokenUnaligned = true +diff --git a/vendor/src/github.com/boltdb/bolt/bucket.go b/vendor/src/github.com/boltdb/bolt/bucket.go +index 2925288..4a65a8f 100644 +--- a/vendor/src/github.com/boltdb/bolt/bucket.go ++++ b/vendor/src/github.com/boltdb/bolt/bucket.go +@@ -130,6 +130,22 @@ func (b *Bucket) Bucket(name []byte) *Bucket { + func (b *Bucket) openBucket(value []byte) *Bucket { + var child = newBucket(b.tx) + ++ // If unaligned load/stores are broken on this arch and value is ++ // unaligned simply clone to an aligned byte array. ++ // NOTE: We need this for SPARC. This change has been introduced ++ // fully in an updated version of boltdb upstream but since that ++ // has not been pulled in by Docker we are not vendoring that in. ++ // We are just backporting this fix so that this runs on SPARC. ++ unaligned := false ++ if brokenUnaligned { ++ addr := uintptr(unsafe.Pointer(&value[0])) ++ unaligned = addr&(unsafe.Alignof(value)-1) != 0 ++ } ++ ++ if unaligned { ++ value = cloneBytes(value) ++ } ++ + // If this is a writable transaction then we need to copy the bucket entry. + // Read-only transactions can point directly at the mmap entry. + if b.tx.writable { diff --git a/vendor/src/github.com/docker/engine-api/types/container/config.go b/vendor/src/github.com/docker/engine-api/types/container/config.go index b4e6205..5a5f905 100644 --- a/vendor/src/github.com/docker/engine-api/types/container/config.go