Explorar o código

Remove solaris build tag and `contrib/mkimage/solaris

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Yong Tang %!s(int64=7) %!d(string=hai) anos
pai
achega
4785f1a7ab
Modificáronse 61 ficheiros con 51 adicións e 172 borrados
  1. 1 1
      client/client_unix.go
  2. 1 1
      cmd/dockerd/config_common_unix.go
  3. 1 1
      cmd/dockerd/config_unix.go
  4. 1 1
      cmd/dockerd/config_unix_test.go
  5. 1 1
      cmd/dockerd/daemon_unix.go
  6. 1 4
      cmd/dockerd/daemon_unix_test.go
  7. 2 2
      container/container_notlinux.go
  8. 1 1
      container/container_unix.go
  9. 1 1
      contrib/docker-device-tool/device_tool.go
  10. 0 8
      contrib/mkimage.sh
  11. 0 89
      contrib/mkimage/solaris
  12. 1 1
      daemon/cluster/listen_addr_others.go
  13. 1 1
      daemon/config/config_common_unix.go
  14. 0 2
      daemon/daemon_test.go
  15. 1 1
      daemon/daemon_unix_test.go
  16. 1 1
      daemon/daemon_unsupported.go
  17. 1 1
      daemon/debugtrap_unsupported.go
  18. 1 1
      daemon/getsize_unix.go
  19. 1 1
      daemon/graphdriver/driver_unsupported.go
  20. 1 1
      daemon/graphdriver/graphtest/graphtest_unix.go
  21. 1 1
      daemon/graphdriver/register/register_zfs.go
  22. 1 1
      daemon/graphdriver/zfs/zfs.go
  23. 1 1
      daemon/graphdriver/zfs/zfs_unsupported.go
  24. 1 1
      daemon/inspect_unix.go
  25. 1 1
      daemon/list_unix.go
  26. 1 1
      daemon/listeners/listeners_unix.go
  27. 1 1
      daemon/logger/plugin_unix.go
  28. 1 1
      daemon/logger/plugin_unsupported.go
  29. 0 2
      daemon/reload_test.go
  30. 0 2
      daemon/stats/collector.go
  31. 1 1
      daemon/stats/collector_unix.go
  32. 0 2
      daemon/volumes_unix.go
  33. 1 1
      layer/layer_unix.go
  34. 0 2
      libcontainerd/remote_daemon_linux.go
  35. 0 2
      libcontainerd/remote_daemon_options_linux.go
  36. 0 2
      libcontainerd/remote_daemon_process_linux.go
  37. 1 1
      pkg/directory/directory_unix.go
  38. 1 1
      pkg/mount/flags_unsupported.go
  39. 1 1
      pkg/mount/mount.go
  40. 1 1
      pkg/mount/mount_unix_test.go
  41. 1 1
      pkg/mount/mounter_unsupported.go
  42. 1 1
      pkg/mount/mountinfo_unsupported.go
  43. 1 1
      pkg/parsers/kernel/kernel_unix.go
  44. 1 1
      pkg/parsers/kernel/uname_unsupported.go
  45. 1 1
      pkg/platform/architecture_unix.go
  46. 1 1
      pkg/reexec/command_unix.go
  47. 2 2
      pkg/reexec/command_unsupported.go
  48. 1 1
      pkg/signal/signal_linux_test.go
  49. 1 1
      pkg/signal/signal_unsupported.go
  50. 2 2
      pkg/sysinfo/sysinfo_unix.go
  51. 1 1
      pkg/system/meminfo_unsupported.go
  52. 1 1
      pkg/system/process_unix.go
  53. 0 1
      pkg/term/tc.go
  54. 1 1
      pkg/term/winsize.go
  55. 0 2
      registry/auth_test.go
  56. 0 2
      registry/registry_mock_test.go
  57. 0 2
      registry/registry_test.go
  58. 1 1
      runconfig/hostconfig_unix.go
  59. 1 1
      volume/local/local_unix.go
  60. 1 1
      volume/store/store_unix.go
  61. 1 1
      volume/volume_unix.go

+ 1 - 1
client/client_unix.go

@@ -1,4 +1,4 @@
-// +build linux freebsd solaris openbsd darwin
+// +build linux freebsd openbsd darwin
 
 package client
 

+ 1 - 1
cmd/dockerd/config_common_unix.go

@@ -1,4 +1,4 @@
-// +build solaris linux freebsd
+// +build linux freebsd
 
 package main
 

+ 1 - 1
cmd/dockerd/config_unix.go

@@ -1,4 +1,4 @@
-// +build linux,!solaris freebsd,!solaris
+// +build linux freebsd
 
 package main
 

+ 1 - 1
cmd/dockerd/config_unix_test.go

@@ -1,4 +1,4 @@
-// +build linux,!solaris freebsd,!solaris
+// +build linux freebsd
 
 package main
 

+ 1 - 1
cmd/dockerd/daemon_unix.go

@@ -1,4 +1,4 @@
-// +build !windows,!solaris
+// +build !windows
 
 package main
 

+ 1 - 4
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
 

+ 2 - 2
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)
 }

+ 1 - 1
container/container_unix.go

@@ -1,4 +1,4 @@
-// +build linux freebsd solaris
+// +build linux freebsd
 
 package container
 

+ 1 - 1
contrib/docker-device-tool/device_tool.go

@@ -1,4 +1,4 @@
-// +build !windows,!solaris
+// +build !windows
 
 package main
 

+ 0 - 8
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

+ 0 - 89
contrib/mkimage/solaris

@@ -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"

+ 1 - 1
daemon/cluster/listen_addr_others.go

@@ -1,4 +1,4 @@
-// +build !linux,!solaris
+// +build !linux
 
 package cluster
 

+ 1 - 1
daemon/config/config_common_unix.go

@@ -1,4 +1,4 @@
-// +build solaris linux freebsd
+// +build linux freebsd
 
 package config
 

+ 0 - 2
daemon/daemon_test.go

@@ -1,5 +1,3 @@
-// +build !solaris
-
 package daemon
 
 import (

+ 1 - 1
daemon/daemon_unix_test.go

@@ -1,4 +1,4 @@
-// +build !windows,!solaris
+// +build !windows
 
 package daemon
 

+ 1 - 1
daemon/daemon_unsupported.go

@@ -1,4 +1,4 @@
-// +build !linux,!freebsd,!windows,!solaris
+// +build !linux,!freebsd,!windows
 
 package daemon
 

+ 1 - 1
daemon/debugtrap_unsupported.go

@@ -1,4 +1,4 @@
-// +build !linux,!darwin,!freebsd,!windows,!solaris
+// +build !linux,!darwin,!freebsd,!windows
 
 package daemon
 

+ 1 - 1
daemon/getsize_unix.go

@@ -1,4 +1,4 @@
-// +build linux freebsd solaris
+// +build linux freebsd
 
 package daemon
 

+ 1 - 1
daemon/graphdriver/driver_unsupported.go

@@ -1,4 +1,4 @@
-// +build !linux,!windows,!freebsd,!solaris
+// +build !linux,!windows,!freebsd
 
 package graphdriver
 

+ 1 - 1
daemon/graphdriver/graphtest/graphtest_unix.go

@@ -1,4 +1,4 @@
-// +build linux freebsd solaris
+// +build linux freebsd
 
 package graphtest
 

+ 1 - 1
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
 

+ 1 - 1
daemon/graphdriver/zfs/zfs.go

@@ -1,4 +1,4 @@
-// +build linux freebsd solaris
+// +build linux freebsd
 
 package zfs
 

+ 1 - 1
daemon/graphdriver/zfs/zfs_unsupported.go

@@ -1,4 +1,4 @@
-// +build !linux,!freebsd,!solaris
+// +build !linux,!freebsd
 
 package zfs
 

+ 1 - 1
daemon/inspect_unix.go

@@ -1,4 +1,4 @@
-// +build !windows,!solaris
+// +build !windows
 
 package daemon
 

+ 1 - 1
daemon/list_unix.go

@@ -1,4 +1,4 @@
-// +build linux freebsd solaris
+// +build linux freebsd
 
 package daemon
 

+ 1 - 1
daemon/listeners/listeners_unix.go

@@ -1,4 +1,4 @@
-// +build !windows,!solaris
+// +build !windows
 
 package listeners
 

+ 1 - 1
daemon/logger/plugin_unix.go

@@ -1,4 +1,4 @@
-// +build linux solaris freebsd
+// +build linux freebsd
 
 package logger
 

+ 1 - 1
daemon/logger/plugin_unsupported.go

@@ -1,4 +1,4 @@
-// +build !linux,!solaris,!freebsd
+// +build !linux,!freebsd
 
 package logger
 

+ 0 - 2
daemon/reload_test.go

@@ -1,5 +1,3 @@
-// +build !solaris
-
 package daemon
 
 import (

+ 0 - 2
daemon/stats/collector.go

@@ -1,5 +1,3 @@
-// +build !solaris
-
 package stats
 
 import (

+ 1 - 1
daemon/stats/collector_unix.go

@@ -1,4 +1,4 @@
-// +build !windows,!solaris
+// +build !windows
 
 package stats
 

+ 0 - 2
daemon/volumes_unix.go

@@ -1,7 +1,5 @@
 // +build !windows
 
-// TODO(amitkris): We need to split this file for solaris.
-
 package daemon
 
 import (

+ 1 - 1
layer/layer_unix.go

@@ -1,4 +1,4 @@
-// +build linux freebsd darwin openbsd solaris
+// +build linux freebsd darwin openbsd
 
 package layer
 

+ 0 - 2
libcontainerd/remote_daemon_unix.go → libcontainerd/remote_daemon_linux.go

@@ -1,5 +1,3 @@
-// +build linux solaris
-
 package libcontainerd
 
 import (

+ 0 - 2
libcontainerd/remote_daemon_options_unix.go → libcontainerd/remote_daemon_options_linux.go

@@ -1,5 +1,3 @@
-// +build linux solaris
-
 package libcontainerd
 
 import "fmt"

+ 0 - 2
libcontainerd/remote_daemon_process_unix.go → libcontainerd/remote_daemon_process_linux.go

@@ -1,5 +1,3 @@
-// +build linux solaris
-
 package libcontainerd
 
 import (

+ 1 - 1
pkg/directory/directory_unix.go

@@ -1,4 +1,4 @@
-// +build linux freebsd solaris
+// +build linux freebsd
 
 package directory
 

+ 1 - 1
pkg/mount/flags_unsupported.go

@@ -1,4 +1,4 @@
-// +build !linux,!freebsd freebsd,!cgo solaris,!cgo
+// +build !linux,!freebsd freebsd,!cgo
 
 package mount
 

+ 1 - 1
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 {

+ 1 - 1
pkg/mount/mount_unix_test.go

@@ -1,4 +1,4 @@
-// +build !windows,!solaris
+// +build !windows
 
 package mount
 

+ 1 - 1
pkg/mount/mounter_unsupported.go

@@ -1,4 +1,4 @@
-// +build !linux,!freebsd,!solaris freebsd,!cgo solaris,!cgo
+// +build !linux,!freebsd freebsd,!cgo
 
 package mount
 

+ 1 - 1
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
 

+ 1 - 1
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.

+ 1 - 1
pkg/parsers/kernel/uname_unsupported.go

@@ -1,4 +1,4 @@
-// +build !linux,!solaris
+// +build !linux
 
 package kernel
 

+ 1 - 1
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.

+ 1 - 1
pkg/reexec/command_unix.go

@@ -1,4 +1,4 @@
-// +build freebsd solaris darwin
+// +build freebsd darwin
 
 package reexec
 

+ 2 - 2
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
 }

+ 1 - 1
pkg/signal/signal_linux_test.go

@@ -1,4 +1,4 @@
-// +build darwin linux solaris
+// +build darwin linux
 
 package signal
 

+ 1 - 1
pkg/signal/signal_unsupported.go

@@ -1,4 +1,4 @@
-// +build !linux,!darwin,!freebsd,!windows,!solaris
+// +build !linux,!darwin,!freebsd,!windows
 
 package signal
 

+ 2 - 2
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

+ 1 - 1
pkg/system/meminfo_unsupported.go

@@ -1,4 +1,4 @@
-// +build !linux,!windows,!solaris
+// +build !linux,!windows
 
 package system
 

+ 1 - 1
pkg/system/process_unix.go

@@ -1,4 +1,4 @@
-// +build linux freebsd solaris darwin
+// +build linux freebsd darwin
 
 package system
 

+ 0 - 1
pkg/term/tc.go

@@ -1,5 +1,4 @@
 // +build !windows
-// +build !solaris !cgo
 
 package term
 

+ 1 - 1
pkg/term/winsize.go

@@ -1,4 +1,4 @@
-// +build !solaris,!windows
+// +build !windows
 
 package term
 

+ 0 - 2
registry/auth_test.go

@@ -1,5 +1,3 @@
-// +build !solaris
-
 package registry
 
 import (

+ 0 - 2
registry/registry_mock_test.go

@@ -1,5 +1,3 @@
-// +build !solaris
-
 package registry
 
 import (

+ 0 - 2
registry/registry_test.go

@@ -1,5 +1,3 @@
-// +build !solaris
-
 package registry
 
 import (

+ 1 - 1
runconfig/hostconfig_unix.go

@@ -1,4 +1,4 @@
-// +build !windows,!solaris
+// +build !windows
 
 package runconfig
 

+ 1 - 1
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

+ 1 - 1
volume/store/store_unix.go

@@ -1,4 +1,4 @@
-// +build linux freebsd solaris
+// +build linux freebsd
 
 package store
 

+ 1 - 1
volume/volume_unix.go

@@ -1,4 +1,4 @@
-// +build linux freebsd darwin solaris
+// +build linux freebsd darwin
 
 package volume