From 4785f1a7ab7ec857dc3ca849ee6ecadf519ef30e Mon Sep 17 00:00:00 2001 From: Yong Tang Date: Wed, 1 Nov 2017 23:37:53 +0000 Subject: [PATCH] Remove solaris build tag and `contrib/mkimage/solaris Signed-off-by: Yong Tang --- client/client_unix.go | 2 +- cmd/dockerd/config_common_unix.go | 2 +- cmd/dockerd/config_unix.go | 2 +- cmd/dockerd/config_unix_test.go | 2 +- cmd/dockerd/daemon_unix.go | 2 +- cmd/dockerd/daemon_unix_test.go | 5 +- container/container_notlinux.go | 4 +- container/container_unix.go | 2 +- contrib/docker-device-tool/device_tool.go | 2 +- contrib/mkimage.sh | 8 -- contrib/mkimage/solaris | 89 ------------------- daemon/cluster/listen_addr_others.go | 2 +- daemon/config/config_common_unix.go | 2 +- daemon/daemon_test.go | 2 - daemon/daemon_unix_test.go | 2 +- daemon/daemon_unsupported.go | 2 +- daemon/debugtrap_unsupported.go | 2 +- daemon/getsize_unix.go | 2 +- daemon/graphdriver/driver_unsupported.go | 2 +- .../graphdriver/graphtest/graphtest_unix.go | 2 +- daemon/graphdriver/register/register_zfs.go | 2 +- daemon/graphdriver/zfs/zfs.go | 2 +- daemon/graphdriver/zfs/zfs_unsupported.go | 2 +- daemon/inspect_unix.go | 2 +- daemon/list_unix.go | 2 +- daemon/listeners/listeners_unix.go | 2 +- daemon/logger/plugin_unix.go | 2 +- daemon/logger/plugin_unsupported.go | 2 +- daemon/reload_test.go | 2 - daemon/stats/collector.go | 2 - daemon/stats/collector_unix.go | 2 +- daemon/volumes_unix.go | 2 - layer/layer_unix.go | 2 +- ..._daemon_unix.go => remote_daemon_linux.go} | 2 - ...unix.go => remote_daemon_options_linux.go} | 2 - ...unix.go => remote_daemon_process_linux.go} | 2 - pkg/directory/directory_unix.go | 2 +- pkg/mount/flags_unsupported.go | 2 +- pkg/mount/mount.go | 2 +- pkg/mount/mount_unix_test.go | 2 +- pkg/mount/mounter_unsupported.go | 2 +- pkg/mount/mountinfo_unsupported.go | 2 +- pkg/parsers/kernel/kernel_unix.go | 2 +- pkg/parsers/kernel/uname_unsupported.go | 2 +- pkg/platform/architecture_unix.go | 2 +- pkg/reexec/command_unix.go | 2 +- pkg/reexec/command_unsupported.go | 4 +- pkg/signal/signal_linux_test.go | 2 +- pkg/signal/signal_unsupported.go | 2 +- pkg/sysinfo/sysinfo_unix.go | 4 +- pkg/system/meminfo_unsupported.go | 2 +- pkg/system/process_unix.go | 2 +- pkg/term/tc.go | 1 - pkg/term/winsize.go | 2 +- registry/auth_test.go | 2 - registry/registry_mock_test.go | 2 - registry/registry_test.go | 2 - runconfig/hostconfig_unix.go | 2 +- volume/local/local_unix.go | 2 +- volume/store/store_unix.go | 2 +- volume/volume_unix.go | 2 +- 61 files changed, 51 insertions(+), 172 deletions(-) delete mode 100755 contrib/mkimage/solaris rename libcontainerd/{remote_daemon_unix.go => remote_daemon_linux.go} (97%) rename libcontainerd/{remote_daemon_options_unix.go => remote_daemon_options_linux.go} (96%) rename libcontainerd/{remote_daemon_process_unix.go => remote_daemon_process_linux.go} (97%) diff --git a/client/client_unix.go b/client/client_unix.go index 89de892c85..eba8d909a9 100644 --- a/client/client_unix.go +++ b/client/client_unix.go @@ -1,4 +1,4 @@ -// +build linux freebsd solaris openbsd darwin +// +build linux freebsd openbsd darwin package client diff --git a/cmd/dockerd/config_common_unix.go b/cmd/dockerd/config_common_unix.go index b29307b596..febf30ae9f 100644 --- a/cmd/dockerd/config_common_unix.go +++ b/cmd/dockerd/config_common_unix.go @@ -1,4 +1,4 @@ -// +build solaris linux freebsd +// +build linux freebsd package main diff --git a/cmd/dockerd/config_unix.go b/cmd/dockerd/config_unix.go index dcc7dc5e81..b3bd741c95 100644 --- a/cmd/dockerd/config_unix.go +++ b/cmd/dockerd/config_unix.go @@ -1,4 +1,4 @@ -// +build linux,!solaris freebsd,!solaris +// +build linux freebsd package main diff --git a/cmd/dockerd/config_unix_test.go b/cmd/dockerd/config_unix_test.go index 588ac19fbd..2705d671ba 100644 --- a/cmd/dockerd/config_unix_test.go +++ b/cmd/dockerd/config_unix_test.go @@ -1,4 +1,4 @@ -// +build linux,!solaris freebsd,!solaris +// +build linux freebsd package main diff --git a/cmd/dockerd/daemon_unix.go b/cmd/dockerd/daemon_unix.go index 324b299e18..41e6b61ffa 100644 --- a/cmd/dockerd/daemon_unix.go +++ b/cmd/dockerd/daemon_unix.go @@ -1,4 +1,4 @@ -// +build !windows,!solaris +// +build !windows package main diff --git a/cmd/dockerd/daemon_unix_test.go b/cmd/dockerd/daemon_unix_test.go index 5d99e51053..475ff9efa7 100644 --- a/cmd/dockerd/daemon_unix_test.go +++ b/cmd/dockerd/daemon_unix_test.go @@ -1,7 +1,4 @@ -// +build !windows,!solaris - -// TODO: Create new file for Solaris which tests config parameters -// as described in daemon/config_solaris.go +// +build !windows package main diff --git a/container/container_notlinux.go b/container/container_notlinux.go index 768c762d2f..246a146f0f 100644 --- a/container/container_notlinux.go +++ b/container/container_notlinux.go @@ -1,4 +1,4 @@ -// +build solaris freebsd +// +build freebsd package container @@ -7,7 +7,7 @@ import ( ) func detachMounted(path string) error { - //Solaris and FreeBSD do not support the lazy unmount or MNT_DETACH feature. + // FreeBSD do not support the lazy unmount or MNT_DETACH feature. // Therefore there are separate definitions for this. return unix.Unmount(path, 0) } diff --git a/container/container_unix.go b/container/container_unix.go index 98042f1308..77851946f3 100644 --- a/container/container_unix.go +++ b/container/container_unix.go @@ -1,4 +1,4 @@ -// +build linux freebsd solaris +// +build linux freebsd package container diff --git a/contrib/docker-device-tool/device_tool.go b/contrib/docker-device-tool/device_tool.go index 905b689581..d3ec46a8b4 100644 --- a/contrib/docker-device-tool/device_tool.go +++ b/contrib/docker-device-tool/device_tool.go @@ -1,4 +1,4 @@ -// +build !windows,!solaris +// +build !windows package main diff --git a/contrib/mkimage.sh b/contrib/mkimage.sh index 13298c8036..ae05d139c3 100755 --- a/contrib/mkimage.sh +++ b/contrib/mkimage.sh @@ -11,7 +11,6 @@ usage() { echo >&2 " $mkimg -t someuser/centos:5 rinse --distribution centos-5" echo >&2 " $mkimg -t someuser/mageia:4 mageia-urpmi --version=4" echo >&2 " $mkimg -t someuser/mageia:4 mageia-urpmi --version=4 --mirror=http://somemirror/" - echo >&2 " $mkimg -t someuser/solaris solaris" exit 1 } @@ -20,13 +19,6 @@ scriptDir="$(dirname "$(readlink -f "$BASH_SOURCE")")/mkimage" os= os=$(uname -o) -# set up path to gnu tools if solaris -[[ $os == "Solaris" ]] && export PATH=/usr/gnu/bin:$PATH -# TODO check for gnu-tar, gnu-getopt - -# TODO requires root/sudo due to some pkg operations. sigh. -[[ $os == "Solaris" && $EUID != "0" ]] && echo >&2 "image create on Solaris requires superuser privilege" - optTemp=$(getopt --options '+d:t:c:hC' --longoptions 'dir:,tag:,compression:,no-compression,help' --name "$mkimg" -- "$@") eval set -- "$optTemp" unset optTemp diff --git a/contrib/mkimage/solaris b/contrib/mkimage/solaris deleted file mode 100755 index 158970e69e..0000000000 --- a/contrib/mkimage/solaris +++ /dev/null @@ -1,89 +0,0 @@ -#!/usr/bin/env bash -# -# Solaris 12 base image build script. -# -set -e - -# TODO add optional package publisher origin - -rootfsDir="$1" -shift - -# base install -( - set -x - - pkg image-create --full --zone \ - --facet facet.locale.*=false \ - --facet facet.locale.POSIX=true \ - --facet facet.doc=false \ - --facet facet.doc.*=false \ - "$rootfsDir" - - pkg -R "$rootfsDir" set-property use-system-repo true - - pkg -R "$rootfsDir" set-property flush-content-cache-on-success true - - pkg -R "$rootfsDir" install core-os -) - -# Lay in stock configuration, set up milestone -# XXX This all may become optional in a base image -( - # faster to build repository database on tmpfs - REPO_DB=/system/volatile/repository.$$ - export SVCCFG_REPOSITORY=${REPO_DB} - export SVCCFG_DOOR_PATH=$rootfsDir/system/volatile/tmp_repo_door - - # Import base manifests. NOTE These are a combination of basic requirement - # and gleaned from container milestone manifest. They may change. - for m in $rootfsDir/lib/svc/manifest/system/environment.xml \ - $rootfsDir/lib/svc/manifest/system/svc/global.xml \ - $rootfsDir/lib/svc/manifest/system/svc/restarter.xml \ - $rootfsDir/lib/svc/manifest/network/dns/client.xml \ - $rootfsDir/lib/svc/manifest/system/name-service/switch.xml \ - $rootfsDir/lib/svc/manifest/system/name-service/cache.xml \ - $rootfsDir/lib/svc/manifest/milestone/container.xml ; do - svccfg import $m - done - - # Apply system layer profile, deleting unnecessary dependencies - svccfg apply $rootfsDir/etc/svc/profile/generic_container.xml - - # XXX Even if we keep a repo in the base image, this is definitely optional - svccfg apply $rootfsDir/etc/svc/profile/sysconfig/container_sc.xml - - for s in svc:/system/svc/restarter \ - svc:/system/environment \ - svc:/network/dns/client \ - svc:/system/name-service/switch \ - svc:/system/name-service/cache \ - svc:/system/svc/global \ - svc:/milestone/container ;do - svccfg -s $s refresh - done - - # now copy the built up repository into the base rootfs - mv $REPO_DB $rootfsDir/etc/svc/repository.db -) - -# pkg(1) needs the zoneproxy-client running in the container. -# use a simple wrapper to run it as needed. -# XXX maybe we go back to running this in SMF? -mv "$rootfsDir/usr/bin/pkg" "$rootfsDir/usr/bin/wrapped_pkg" -cat > "$rootfsDir/usr/bin/pkg" <<-'EOF' -#!/bin/sh -# -# THIS FILE CREATED DURING DOCKER BASE IMAGE CREATION -# -# The Solaris base image uses the sysrepo proxy mechanism. The -# IPS client pkg(1) requires the zoneproxy-client to reach the -# remote publisher origins through the host. This wrapper script -# enables and disables the proxy client as needed. This is a -# temporary solution. - -/usr/lib/zones/zoneproxy-client -s localhost:1008 -PKG_SYSREPO_URL=http://localhost:1008 /usr/bin/wrapped_pkg "$@" -pkill -9 zoneproxy-client -EOF -chmod +x "$rootfsDir/usr/bin/pkg" diff --git a/daemon/cluster/listen_addr_others.go b/daemon/cluster/listen_addr_others.go index 4e845f5c8f..ebf7daea24 100644 --- a/daemon/cluster/listen_addr_others.go +++ b/daemon/cluster/listen_addr_others.go @@ -1,4 +1,4 @@ -// +build !linux,!solaris +// +build !linux package cluster diff --git a/daemon/config/config_common_unix.go b/daemon/config/config_common_unix.go index cea3fffdda..d2fa2e035a 100644 --- a/daemon/config/config_common_unix.go +++ b/daemon/config/config_common_unix.go @@ -1,4 +1,4 @@ -// +build solaris linux freebsd +// +build linux freebsd package config diff --git a/daemon/daemon_test.go b/daemon/daemon_test.go index 13d1059c1c..4044fad836 100644 --- a/daemon/daemon_test.go +++ b/daemon/daemon_test.go @@ -1,5 +1,3 @@ -// +build !solaris - package daemon import ( diff --git a/daemon/daemon_unix_test.go b/daemon/daemon_unix_test.go index 2bdbd23290..a4db4733d4 100644 --- a/daemon/daemon_unix_test.go +++ b/daemon/daemon_unix_test.go @@ -1,4 +1,4 @@ -// +build !windows,!solaris +// +build !windows package daemon diff --git a/daemon/daemon_unsupported.go b/daemon/daemon_unsupported.go index cb1acf63d6..987528f476 100644 --- a/daemon/daemon_unsupported.go +++ b/daemon/daemon_unsupported.go @@ -1,4 +1,4 @@ -// +build !linux,!freebsd,!windows,!solaris +// +build !linux,!freebsd,!windows package daemon diff --git a/daemon/debugtrap_unsupported.go b/daemon/debugtrap_unsupported.go index f5b9170907..6ae9ebfde9 100644 --- a/daemon/debugtrap_unsupported.go +++ b/daemon/debugtrap_unsupported.go @@ -1,4 +1,4 @@ -// +build !linux,!darwin,!freebsd,!windows,!solaris +// +build !linux,!darwin,!freebsd,!windows package daemon diff --git a/daemon/getsize_unix.go b/daemon/getsize_unix.go index e47e646df3..fff90f2756 100644 --- a/daemon/getsize_unix.go +++ b/daemon/getsize_unix.go @@ -1,4 +1,4 @@ -// +build linux freebsd solaris +// +build linux freebsd package daemon diff --git a/daemon/graphdriver/driver_unsupported.go b/daemon/graphdriver/driver_unsupported.go index 4a875608b0..b3f6857309 100644 --- a/daemon/graphdriver/driver_unsupported.go +++ b/daemon/graphdriver/driver_unsupported.go @@ -1,4 +1,4 @@ -// +build !linux,!windows,!freebsd,!solaris +// +build !linux,!windows,!freebsd package graphdriver diff --git a/daemon/graphdriver/graphtest/graphtest_unix.go b/daemon/graphdriver/graphtest/graphtest_unix.go index 11dff48896..6b352ba69a 100644 --- a/daemon/graphdriver/graphtest/graphtest_unix.go +++ b/daemon/graphdriver/graphtest/graphtest_unix.go @@ -1,4 +1,4 @@ -// +build linux freebsd solaris +// +build linux freebsd package graphtest diff --git a/daemon/graphdriver/register/register_zfs.go b/daemon/graphdriver/register/register_zfs.go index 8f34e35537..8c31c415f4 100644 --- a/daemon/graphdriver/register/register_zfs.go +++ b/daemon/graphdriver/register/register_zfs.go @@ -1,4 +1,4 @@ -// +build !exclude_graphdriver_zfs,linux !exclude_graphdriver_zfs,freebsd, solaris +// +build !exclude_graphdriver_zfs,linux !exclude_graphdriver_zfs,freebsd package register diff --git a/daemon/graphdriver/zfs/zfs.go b/daemon/graphdriver/zfs/zfs.go index 4caedef0ee..52e2aa1d26 100644 --- a/daemon/graphdriver/zfs/zfs.go +++ b/daemon/graphdriver/zfs/zfs.go @@ -1,4 +1,4 @@ -// +build linux freebsd solaris +// +build linux freebsd package zfs diff --git a/daemon/graphdriver/zfs/zfs_unsupported.go b/daemon/graphdriver/zfs/zfs_unsupported.go index ce8daadaf6..643b169bc5 100644 --- a/daemon/graphdriver/zfs/zfs_unsupported.go +++ b/daemon/graphdriver/zfs/zfs_unsupported.go @@ -1,4 +1,4 @@ -// +build !linux,!freebsd,!solaris +// +build !linux,!freebsd package zfs diff --git a/daemon/inspect_unix.go b/daemon/inspect_unix.go index bd28481e6a..f073695e33 100644 --- a/daemon/inspect_unix.go +++ b/daemon/inspect_unix.go @@ -1,4 +1,4 @@ -// +build !windows,!solaris +// +build !windows package daemon diff --git a/daemon/list_unix.go b/daemon/list_unix.go index ebaae4560c..7b92c7c491 100644 --- a/daemon/list_unix.go +++ b/daemon/list_unix.go @@ -1,4 +1,4 @@ -// +build linux freebsd solaris +// +build linux freebsd package daemon diff --git a/daemon/listeners/listeners_unix.go b/daemon/listeners/listeners_unix.go index 0a4e5e4e31..3a7c0f85b0 100644 --- a/daemon/listeners/listeners_unix.go +++ b/daemon/listeners/listeners_unix.go @@ -1,4 +1,4 @@ -// +build !windows,!solaris +// +build !windows package listeners diff --git a/daemon/logger/plugin_unix.go b/daemon/logger/plugin_unix.go index f93d7af0ee..edf11af15e 100644 --- a/daemon/logger/plugin_unix.go +++ b/daemon/logger/plugin_unix.go @@ -1,4 +1,4 @@ -// +build linux solaris freebsd +// +build linux freebsd package logger diff --git a/daemon/logger/plugin_unsupported.go b/daemon/logger/plugin_unsupported.go index 0a2036c838..b649b0644e 100644 --- a/daemon/logger/plugin_unsupported.go +++ b/daemon/logger/plugin_unsupported.go @@ -1,4 +1,4 @@ -// +build !linux,!solaris,!freebsd +// +build !linux,!freebsd package logger diff --git a/daemon/reload_test.go b/daemon/reload_test.go index 3ff6b57735..96b1a2452d 100644 --- a/daemon/reload_test.go +++ b/daemon/reload_test.go @@ -1,5 +1,3 @@ -// +build !solaris - package daemon import ( diff --git a/daemon/stats/collector.go b/daemon/stats/collector.go index c930bc756c..f13a8045d4 100644 --- a/daemon/stats/collector.go +++ b/daemon/stats/collector.go @@ -1,5 +1,3 @@ -// +build !solaris - package stats import ( diff --git a/daemon/stats/collector_unix.go b/daemon/stats/collector_unix.go index cd522e07ce..6b1318a1bd 100644 --- a/daemon/stats/collector_unix.go +++ b/daemon/stats/collector_unix.go @@ -1,4 +1,4 @@ -// +build !windows,!solaris +// +build !windows package stats diff --git a/daemon/volumes_unix.go b/daemon/volumes_unix.go index 0a4cbf8493..0ab0c6d8a6 100644 --- a/daemon/volumes_unix.go +++ b/daemon/volumes_unix.go @@ -1,7 +1,5 @@ // +build !windows -// TODO(amitkris): We need to split this file for solaris. - package daemon import ( diff --git a/layer/layer_unix.go b/layer/layer_unix.go index 776b78ac02..d77e2fc66e 100644 --- a/layer/layer_unix.go +++ b/layer/layer_unix.go @@ -1,4 +1,4 @@ -// +build linux freebsd darwin openbsd solaris +// +build linux freebsd darwin openbsd package layer diff --git a/libcontainerd/remote_daemon_unix.go b/libcontainerd/remote_daemon_linux.go similarity index 97% rename from libcontainerd/remote_daemon_unix.go rename to libcontainerd/remote_daemon_linux.go index e0c56e83aa..e99a4fd355 100644 --- a/libcontainerd/remote_daemon_unix.go +++ b/libcontainerd/remote_daemon_linux.go @@ -1,5 +1,3 @@ -// +build linux solaris - package libcontainerd import ( diff --git a/libcontainerd/remote_daemon_options_unix.go b/libcontainerd/remote_daemon_options_linux.go similarity index 96% rename from libcontainerd/remote_daemon_options_unix.go rename to libcontainerd/remote_daemon_options_linux.go index e97789c4e5..1e5a98124a 100644 --- a/libcontainerd/remote_daemon_options_unix.go +++ b/libcontainerd/remote_daemon_options_linux.go @@ -1,5 +1,3 @@ -// +build linux solaris - package libcontainerd import "fmt" diff --git a/libcontainerd/remote_daemon_process_unix.go b/libcontainerd/remote_daemon_process_linux.go similarity index 97% rename from libcontainerd/remote_daemon_process_unix.go rename to libcontainerd/remote_daemon_process_linux.go index 38533df35f..fd54d01981 100644 --- a/libcontainerd/remote_daemon_process_unix.go +++ b/libcontainerd/remote_daemon_process_linux.go @@ -1,5 +1,3 @@ -// +build linux solaris - package libcontainerd import ( diff --git a/pkg/directory/directory_unix.go b/pkg/directory/directory_unix.go index d4f2970a64..25da197fc0 100644 --- a/pkg/directory/directory_unix.go +++ b/pkg/directory/directory_unix.go @@ -1,4 +1,4 @@ -// +build linux freebsd solaris +// +build linux freebsd package directory diff --git a/pkg/mount/flags_unsupported.go b/pkg/mount/flags_unsupported.go index 9ed741e3ff..43d5e339f0 100644 --- a/pkg/mount/flags_unsupported.go +++ b/pkg/mount/flags_unsupported.go @@ -1,4 +1,4 @@ -// +build !linux,!freebsd freebsd,!cgo solaris,!cgo +// +build !linux,!freebsd freebsd,!cgo package mount diff --git a/pkg/mount/mount.go b/pkg/mount/mount.go index eced0219fd..ee5833c49d 100644 --- a/pkg/mount/mount.go +++ b/pkg/mount/mount.go @@ -13,7 +13,7 @@ func GetMounts() ([]*Info, error) { } // Mounted determines if a specified mountpoint has been mounted. -// On Linux it looks at /proc/self/mountinfo and on Solaris at mnttab. +// On Linux it looks at /proc/self/mountinfo. func Mounted(mountpoint string) (bool, error) { entries, err := parseMountTable() if err != nil { diff --git a/pkg/mount/mount_unix_test.go b/pkg/mount/mount_unix_test.go index 253aff3b8e..90fa348b22 100644 --- a/pkg/mount/mount_unix_test.go +++ b/pkg/mount/mount_unix_test.go @@ -1,4 +1,4 @@ -// +build !windows,!solaris +// +build !windows package mount diff --git a/pkg/mount/mounter_unsupported.go b/pkg/mount/mounter_unsupported.go index a2a3bb457f..eb93365eb7 100644 --- a/pkg/mount/mounter_unsupported.go +++ b/pkg/mount/mounter_unsupported.go @@ -1,4 +1,4 @@ -// +build !linux,!freebsd,!solaris freebsd,!cgo solaris,!cgo +// +build !linux,!freebsd freebsd,!cgo package mount diff --git a/pkg/mount/mountinfo_unsupported.go b/pkg/mount/mountinfo_unsupported.go index 7fbcf19214..b8d9aa5c73 100644 --- a/pkg/mount/mountinfo_unsupported.go +++ b/pkg/mount/mountinfo_unsupported.go @@ -1,4 +1,4 @@ -// +build !windows,!linux,!freebsd,!solaris freebsd,!cgo solaris,!cgo +// +build !windows,!linux,!freebsd freebsd,!cgo package mount diff --git a/pkg/parsers/kernel/kernel_unix.go b/pkg/parsers/kernel/kernel_unix.go index 46ef7a622f..767ede2887 100644 --- a/pkg/parsers/kernel/kernel_unix.go +++ b/pkg/parsers/kernel/kernel_unix.go @@ -1,4 +1,4 @@ -// +build linux freebsd solaris openbsd +// +build linux freebsd openbsd // Package kernel provides helper function to get, parse and compare kernel // versions for different platforms. diff --git a/pkg/parsers/kernel/uname_unsupported.go b/pkg/parsers/kernel/uname_unsupported.go index 1da3f239fa..79c66b3228 100644 --- a/pkg/parsers/kernel/uname_unsupported.go +++ b/pkg/parsers/kernel/uname_unsupported.go @@ -1,4 +1,4 @@ -// +build !linux,!solaris +// +build !linux package kernel diff --git a/pkg/platform/architecture_unix.go b/pkg/platform/architecture_unix.go index 45bbcf1535..8db908682d 100644 --- a/pkg/platform/architecture_unix.go +++ b/pkg/platform/architecture_unix.go @@ -1,4 +1,4 @@ -// +build freebsd solaris darwin +// +build freebsd darwin // Package platform provides helper function to get the runtime architecture // for different platforms. diff --git a/pkg/reexec/command_unix.go b/pkg/reexec/command_unix.go index 778a720e3b..55c0c97d96 100644 --- a/pkg/reexec/command_unix.go +++ b/pkg/reexec/command_unix.go @@ -1,4 +1,4 @@ -// +build freebsd solaris darwin +// +build freebsd darwin package reexec diff --git a/pkg/reexec/command_unsupported.go b/pkg/reexec/command_unsupported.go index 76edd82427..6f5e55d001 100644 --- a/pkg/reexec/command_unsupported.go +++ b/pkg/reexec/command_unsupported.go @@ -1,4 +1,4 @@ -// +build !linux,!windows,!freebsd,!solaris,!darwin +// +build !linux,!windows,!freebsd,!darwin package reexec @@ -6,7 +6,7 @@ import ( "os/exec" ) -// Command is unsupported on operating systems apart from Linux, Windows, Solaris and Darwin. +// Command is unsupported on operating systems apart from Linux, Windows, and Darwin. func Command(args ...string) *exec.Cmd { return nil } diff --git a/pkg/signal/signal_linux_test.go b/pkg/signal/signal_linux_test.go index da0e010545..8dc913b4ed 100644 --- a/pkg/signal/signal_linux_test.go +++ b/pkg/signal/signal_linux_test.go @@ -1,4 +1,4 @@ -// +build darwin linux solaris +// +build darwin linux package signal diff --git a/pkg/signal/signal_unsupported.go b/pkg/signal/signal_unsupported.go index c592d37dfe..161ba27397 100644 --- a/pkg/signal/signal_unsupported.go +++ b/pkg/signal/signal_unsupported.go @@ -1,4 +1,4 @@ -// +build !linux,!darwin,!freebsd,!windows,!solaris +// +build !linux,!darwin,!freebsd,!windows package signal diff --git a/pkg/sysinfo/sysinfo_unix.go b/pkg/sysinfo/sysinfo_unix.go index 45f3ef1c65..beac32840c 100644 --- a/pkg/sysinfo/sysinfo_unix.go +++ b/pkg/sysinfo/sysinfo_unix.go @@ -1,8 +1,8 @@ -// +build !linux,!solaris,!windows +// +build !linux,!windows package sysinfo -// New returns an empty SysInfo for non linux nor solaris for now. +// New returns an empty SysInfo for non linux for now. func New(quiet bool) *SysInfo { sysInfo := &SysInfo{} return sysInfo diff --git a/pkg/system/meminfo_unsupported.go b/pkg/system/meminfo_unsupported.go index 3ce019dffd..82ddd30c1b 100644 --- a/pkg/system/meminfo_unsupported.go +++ b/pkg/system/meminfo_unsupported.go @@ -1,4 +1,4 @@ -// +build !linux,!windows,!solaris +// +build !linux,!windows package system diff --git a/pkg/system/process_unix.go b/pkg/system/process_unix.go index 26c8b42c17..02c138235a 100644 --- a/pkg/system/process_unix.go +++ b/pkg/system/process_unix.go @@ -1,4 +1,4 @@ -// +build linux freebsd solaris darwin +// +build linux freebsd darwin package system diff --git a/pkg/term/tc.go b/pkg/term/tc.go index 6d2dfd3a8a..19dbb1cb11 100644 --- a/pkg/term/tc.go +++ b/pkg/term/tc.go @@ -1,5 +1,4 @@ // +build !windows -// +build !solaris !cgo package term diff --git a/pkg/term/winsize.go b/pkg/term/winsize.go index 85c4d9d67e..1ef98d5996 100644 --- a/pkg/term/winsize.go +++ b/pkg/term/winsize.go @@ -1,4 +1,4 @@ -// +build !solaris,!windows +// +build !windows package term diff --git a/registry/auth_test.go b/registry/auth_test.go index 34f0c5564f..f5f213bf94 100644 --- a/registry/auth_test.go +++ b/registry/auth_test.go @@ -1,5 +1,3 @@ -// +build !solaris - package registry import ( diff --git a/registry/registry_mock_test.go b/registry/registry_mock_test.go index cf1cd19c1c..f814273d0f 100644 --- a/registry/registry_mock_test.go +++ b/registry/registry_mock_test.go @@ -1,5 +1,3 @@ -// +build !solaris - package registry import ( diff --git a/registry/registry_test.go b/registry/registry_test.go index 4cbfb110e3..56e362f8f9 100644 --- a/registry/registry_test.go +++ b/registry/registry_test.go @@ -1,5 +1,3 @@ -// +build !solaris - package registry import ( diff --git a/runconfig/hostconfig_unix.go b/runconfig/hostconfig_unix.go index 55df5da3ff..3527d29058 100644 --- a/runconfig/hostconfig_unix.go +++ b/runconfig/hostconfig_unix.go @@ -1,4 +1,4 @@ -// +build !windows,!solaris +// +build !windows package runconfig diff --git a/volume/local/local_unix.go b/volume/local/local_unix.go index 5bba5b7068..6226955717 100644 --- a/volume/local/local_unix.go +++ b/volume/local/local_unix.go @@ -1,4 +1,4 @@ -// +build linux freebsd solaris +// +build linux freebsd // Package local provides the default implementation for volumes. It // is used to mount data volume containers and directories local to diff --git a/volume/store/store_unix.go b/volume/store/store_unix.go index c024abbf9a..065cb28eb8 100644 --- a/volume/store/store_unix.go +++ b/volume/store/store_unix.go @@ -1,4 +1,4 @@ -// +build linux freebsd solaris +// +build linux freebsd package store diff --git a/volume/volume_unix.go b/volume/volume_unix.go index 0968fe37e1..1cb9317e7a 100644 --- a/volume/volume_unix.go +++ b/volume/volume_unix.go @@ -1,4 +1,4 @@ -// +build linux freebsd darwin solaris +// +build linux freebsd darwin package volume