Remove solaris build tag and `contrib/mkimage/solaris
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
This commit is contained in:
parent
deae428632
commit
4785f1a7ab
61 changed files with 51 additions and 172 deletions
|
@ -1,4 +1,4 @@
|
|||
// +build linux freebsd solaris openbsd darwin
|
||||
// +build linux freebsd openbsd darwin
|
||||
|
||||
package client
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// +build solaris linux freebsd
|
||||
// +build linux freebsd
|
||||
|
||||
package main
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// +build linux,!solaris freebsd,!solaris
|
||||
// +build linux freebsd
|
||||
|
||||
package main
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// +build linux,!solaris freebsd,!solaris
|
||||
// +build linux freebsd
|
||||
|
||||
package main
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// +build !windows,!solaris
|
||||
// +build !windows
|
||||
|
||||
package main
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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,4 +1,4 @@
|
|||
// +build linux freebsd solaris
|
||||
// +build linux freebsd
|
||||
|
||||
package container
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// +build !windows,!solaris
|
||||
// +build !windows
|
||||
|
||||
package main
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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,4 +1,4 @@
|
|||
// +build !linux,!solaris
|
||||
// +build !linux
|
||||
|
||||
package cluster
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// +build solaris linux freebsd
|
||||
// +build linux freebsd
|
||||
|
||||
package config
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
// +build !solaris
|
||||
|
||||
package daemon
|
||||
|
||||
import (
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// +build !windows,!solaris
|
||||
// +build !windows
|
||||
|
||||
package daemon
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// +build !linux,!freebsd,!windows,!solaris
|
||||
// +build !linux,!freebsd,!windows
|
||||
|
||||
package daemon
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// +build !linux,!darwin,!freebsd,!windows,!solaris
|
||||
// +build !linux,!darwin,!freebsd,!windows
|
||||
|
||||
package daemon
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// +build linux freebsd solaris
|
||||
// +build linux freebsd
|
||||
|
||||
package daemon
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// +build !linux,!windows,!freebsd,!solaris
|
||||
// +build !linux,!windows,!freebsd
|
||||
|
||||
package graphdriver
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// +build linux freebsd solaris
|
||||
// +build linux freebsd
|
||||
|
||||
package graphtest
|
||||
|
||||
|
|
|
@ -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,4 +1,4 @@
|
|||
// +build linux freebsd solaris
|
||||
// +build linux freebsd
|
||||
|
||||
package zfs
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// +build !linux,!freebsd,!solaris
|
||||
// +build !linux,!freebsd
|
||||
|
||||
package zfs
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// +build !windows,!solaris
|
||||
// +build !windows
|
||||
|
||||
package daemon
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// +build linux freebsd solaris
|
||||
// +build linux freebsd
|
||||
|
||||
package daemon
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// +build !windows,!solaris
|
||||
// +build !windows
|
||||
|
||||
package listeners
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// +build linux solaris freebsd
|
||||
// +build linux freebsd
|
||||
|
||||
package logger
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// +build !linux,!solaris,!freebsd
|
||||
// +build !linux,!freebsd
|
||||
|
||||
package logger
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
// +build !solaris
|
||||
|
||||
package daemon
|
||||
|
||||
import (
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
// +build !solaris
|
||||
|
||||
package stats
|
||||
|
||||
import (
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// +build !windows,!solaris
|
||||
// +build !windows
|
||||
|
||||
package stats
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
// +build !windows
|
||||
|
||||
// TODO(amitkris): We need to split this file for solaris.
|
||||
|
||||
package daemon
|
||||
|
||||
import (
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// +build linux freebsd darwin openbsd solaris
|
||||
// +build linux freebsd darwin openbsd
|
||||
|
||||
package layer
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
// +build linux solaris
|
||||
|
||||
package libcontainerd
|
||||
|
||||
import (
|
|
@ -1,5 +1,3 @@
|
|||
// +build linux solaris
|
||||
|
||||
package libcontainerd
|
||||
|
||||
import "fmt"
|
|
@ -1,5 +1,3 @@
|
|||
// +build linux solaris
|
||||
|
||||
package libcontainerd
|
||||
|
||||
import (
|
|
@ -1,4 +1,4 @@
|
|||
// +build linux freebsd solaris
|
||||
// +build linux freebsd
|
||||
|
||||
package directory
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// +build !linux,!freebsd freebsd,!cgo solaris,!cgo
|
||||
// +build !linux,!freebsd freebsd,!cgo
|
||||
|
||||
package mount
|
||||
|
||||
|
|
|
@ -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,4 +1,4 @@
|
|||
// +build !windows,!solaris
|
||||
// +build !windows
|
||||
|
||||
package mount
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// +build !linux,!freebsd,!solaris freebsd,!cgo solaris,!cgo
|
||||
// +build !linux,!freebsd freebsd,!cgo
|
||||
|
||||
package mount
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// +build !windows,!linux,!freebsd,!solaris freebsd,!cgo solaris,!cgo
|
||||
// +build !windows,!linux,!freebsd freebsd,!cgo
|
||||
|
||||
package mount
|
||||
|
||||
|
|
|
@ -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,4 +1,4 @@
|
|||
// +build !linux,!solaris
|
||||
// +build !linux
|
||||
|
||||
package kernel
|
||||
|
||||
|
|
|
@ -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,4 +1,4 @@
|
|||
// +build freebsd solaris darwin
|
||||
// +build freebsd darwin
|
||||
|
||||
package reexec
|
||||
|
||||
|
|
|
@ -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,4 +1,4 @@
|
|||
// +build darwin linux solaris
|
||||
// +build darwin linux
|
||||
|
||||
package signal
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// +build !linux,!darwin,!freebsd,!windows,!solaris
|
||||
// +build !linux,!darwin,!freebsd,!windows
|
||||
|
||||
package signal
|
||||
|
||||
|
|
|
@ -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,4 +1,4 @@
|
|||
// +build !linux,!windows,!solaris
|
||||
// +build !linux,!windows
|
||||
|
||||
package system
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// +build linux freebsd solaris darwin
|
||||
// +build linux freebsd darwin
|
||||
|
||||
package system
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// +build !windows
|
||||
// +build !solaris !cgo
|
||||
|
||||
package term
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// +build !solaris,!windows
|
||||
// +build !windows
|
||||
|
||||
package term
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
// +build !solaris
|
||||
|
||||
package registry
|
||||
|
||||
import (
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
// +build !solaris
|
||||
|
||||
package registry
|
||||
|
||||
import (
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
// +build !solaris
|
||||
|
||||
package registry
|
||||
|
||||
import (
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// +build !windows,!solaris
|
||||
// +build !windows
|
||||
|
||||
package runconfig
|
||||
|
||||
|
|
|
@ -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,4 +1,4 @@
|
|||
// +build linux freebsd solaris
|
||||
// +build linux freebsd
|
||||
|
||||
package store
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// +build linux freebsd darwin solaris
|
||||
// +build linux freebsd darwin
|
||||
|
||||
package volume
|
||||
|
||||
|
|
Loading…
Reference in a new issue