make-rules/build-zone.mk
author Vladimir Marek <Vladimir.Marek@oracle.com>
Mon, 04 Mar 2013 21:41:55 +0100
branchs11u1-sru
changeset 2511 4a3540719f56
parent 11 0839bb401298
child 3770 ca450a806cc1
permissions -rw-r--r--
16195225 use _getgroupsbymember() instead of slow getgrent() calls
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
     1
#
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
     2
# CDDL HEADER START
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
     3
#
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
     7
#
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    11
# and limitations under the License.
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    12
#
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    18
#
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    19
# CDDL HEADER END
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    20
#
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    21
# Copyright (c) 2010, Oracle and/or it's affiliates.  All rights reserved.
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    22
#
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    23
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    24
#
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    25
# Rules and Macros for creating a template build zone from the installed system
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    26
# and a set of build zones that are clones of the template build zone.
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    27
#
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    28
# To use these rules to create a template build zone
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    29
#  $ gmake -f make-rules/build-zone.mk template-build-zone
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    30
#
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    31
# To use these rules to clone the template zone
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    32
#  $ gmake -f make-rules/build-zone.mk build-zone-[1-9]
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    33
# or
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    34
#  $ gmake -f make-rules/build-zone.mk \
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    35
#		/rpool/zones/build-zone-{*}/root/etc/sysidcfg
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    36
#
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    37
# Before you create any cloned build zones, it is recommended that you create
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    38
# the template build zone, boot it, and make any customizations to it first.
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    39
# The act of booting the template zone will cause it to perform any "first boot"
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    40
# tasks that might othwise slow down the initial boot of a new build zone.
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    41
# Also, all customizations of the template zone will only propagate to the build
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    42
# zones when they are created.
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    43
#
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    44
5
b0dcdd332e2c update the base build packages
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 4
diff changeset
    45
ZONECFG =		/usr/sbin/zonecfg
b0dcdd332e2c update the base build packages
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 4
diff changeset
    46
ZONEADM =		/usr/sbin/zoneadm
b0dcdd332e2c update the base build packages
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 4
diff changeset
    47
TZ=			$(shell sed -e '/^TZ=/!d' -e 's;TZ=;;' /etc/default/init)
4
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    48
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    49
ZONESCFG_DIR =		/etc/zones
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    50
BUILD_ZONE_SPACE =	/rpool/zones
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    51
5
b0dcdd332e2c update the base build packages
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 4
diff changeset
    52
TOUCH =			/usr/bin/touch
4
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    53
5
b0dcdd332e2c update the base build packages
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 4
diff changeset
    54
SYSIDCFG =		root/etc/sysidcfg
b0dcdd332e2c update the base build packages
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 4
diff changeset
    55
ZI_TAG =		root/.installed
4
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    56
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    57
# the name of the template build zone
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    58
TMPL_ZONE_NAME =	template-build-zone
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    59
11
0839bb401298 update base build zone packages based on SFW component build analysis
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 5
diff changeset
    60
#
0839bb401298 update base build zone packages based on SFW component build analysis
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 5
diff changeset
    61
# The template build zone will start with 'entire' installed.  We include
0839bb401298 update base build zone packages based on SFW component build analysis
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 5
diff changeset
    62
# additional packages to make the build zones more closely match most
0839bb401298 update base build zone packages based on SFW component build analysis
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 5
diff changeset
    63
# components' build requirements.  This makes build zone preparation quicker.
0839bb401298 update base build zone packages based on SFW component build analysis
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 5
diff changeset
    64
#
0839bb401298 update base build zone packages based on SFW component build analysis
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 5
diff changeset
    65
#TMPL_ZONE_TOOLS +=	developer/gcc-3
0839bb401298 update base build zone packages based on SFW component build analysis
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 5
diff changeset
    66
#TMPL_ZONE_TOOLS +=	developer/gnu-binutils
0839bb401298 update base build zone packages based on SFW component build analysis
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 5
diff changeset
    67
#TMPL_ZONE_TOOLS +=	developer/sunstudio12u1
0839bb401298 update base build zone packages based on SFW component build analysis
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 5
diff changeset
    68
TMPL_ZONE_TOOLS +=	archiver/gnu-tar
0839bb401298 update base build zone packages based on SFW component build analysis
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 5
diff changeset
    69
TMPL_ZONE_TOOLS +=	compress/p7zip
0839bb401298 update base build zone packages based on SFW component build analysis
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 5
diff changeset
    70
TMPL_ZONE_TOOLS +=	compress/unzip
0839bb401298 update base build zone packages based on SFW component build analysis
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 5
diff changeset
    71
TMPL_ZONE_TOOLS +=	developer/build/ant
0839bb401298 update base build zone packages based on SFW component build analysis
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 5
diff changeset
    72
TMPL_ZONE_TOOLS +=	developer/build/autoconf
0839bb401298 update base build zone packages based on SFW component build analysis
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 5
diff changeset
    73
TMPL_ZONE_TOOLS +=	developer/build/automake-110
0839bb401298 update base build zone packages based on SFW component build analysis
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 5
diff changeset
    74
TMPL_ZONE_TOOLS +=	developer/build/gnu-make
0839bb401298 update base build zone packages based on SFW component build analysis
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 5
diff changeset
    75
TMPL_ZONE_TOOLS +=	developer/build/libtool
0839bb401298 update base build zone packages based on SFW component build analysis
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 5
diff changeset
    76
TMPL_ZONE_TOOLS +=	developer/build/make
0839bb401298 update base build zone packages based on SFW component build analysis
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 5
diff changeset
    77
TMPL_ZONE_TOOLS +=	developer/gnome/gettext
0839bb401298 update base build zone packages based on SFW component build analysis
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 5
diff changeset
    78
TMPL_ZONE_TOOLS +=	developer/java/jdk
0839bb401298 update base build zone packages based on SFW component build analysis
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 5
diff changeset
    79
TMPL_ZONE_TOOLS +=	developer/lexer/flex
0839bb401298 update base build zone packages based on SFW component build analysis
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 5
diff changeset
    80
TMPL_ZONE_TOOLS +=	developer/macro/cpp
0839bb401298 update base build zone packages based on SFW component build analysis
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 5
diff changeset
    81
TMPL_ZONE_TOOLS +=	developer/macro/gnu-m4
0839bb401298 update base build zone packages based on SFW component build analysis
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 5
diff changeset
    82
TMPL_ZONE_TOOLS +=	developer/object-file
0839bb401298 update base build zone packages based on SFW component build analysis
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 5
diff changeset
    83
TMPL_ZONE_TOOLS +=	developer/parser/bison
0839bb401298 update base build zone packages based on SFW component build analysis
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 5
diff changeset
    84
TMPL_ZONE_TOOLS +=	file/gnu-coreutils
0839bb401298 update base build zone packages based on SFW component build analysis
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 5
diff changeset
    85
TMPL_ZONE_TOOLS +=	file/gnu-findutils
0839bb401298 update base build zone packages based on SFW component build analysis
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 5
diff changeset
    86
TMPL_ZONE_TOOLS +=	library/libxslt
0839bb401298 update base build zone packages based on SFW component build analysis
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 5
diff changeset
    87
TMPL_ZONE_TOOLS +=	library/pcre
0839bb401298 update base build zone packages based on SFW component build analysis
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 5
diff changeset
    88
TMPL_ZONE_TOOLS +=	text/gawk
0839bb401298 update base build zone packages based on SFW component build analysis
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 5
diff changeset
    89
TMPL_ZONE_TOOLS +=	text/gnu-diffutils
0839bb401298 update base build zone packages based on SFW component build analysis
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 5
diff changeset
    90
TMPL_ZONE_TOOLS +=	text/gnu-gettext
0839bb401298 update base build zone packages based on SFW component build analysis
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 5
diff changeset
    91
TMPL_ZONE_TOOLS +=	text/gnu-grep
0839bb401298 update base build zone packages based on SFW component build analysis
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 5
diff changeset
    92
TMPL_ZONE_TOOLS +=	text/gnu-patch
0839bb401298 update base build zone packages based on SFW component build analysis
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 5
diff changeset
    93
TMPL_ZONE_TOOLS +=	text/gnu-sed
0839bb401298 update base build zone packages based on SFW component build analysis
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 5
diff changeset
    94
TMPL_ZONE_TOOLS +=	text/groff
0839bb401298 update base build zone packages based on SFW component build analysis
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 5
diff changeset
    95
TMPL_ZONE_TOOLS +=	text/texinfo
0839bb401298 update base build zone packages based on SFW component build analysis
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 5
diff changeset
    96
0839bb401298 update base build zone packages based on SFW component build analysis
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 5
diff changeset
    97
TMPL_ZONE_PKGS =	$(TMPL_ZONE_TOOLS)
4
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    98
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    99
template-build-zone:	$(BUILD_ZONE_SPACE)/$(TMPL_ZONE_NAME)/$(SYSIDCFG)
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   100
build-zone-1:		$(BUILD_ZONE_SPACE)/build-zone-1/$(SYSIDCFG)
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   101
build-zone-2:		$(BUILD_ZONE_SPACE)/build-zone-2/$(SYSIDCFG)
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   102
build-zone-3:		$(BUILD_ZONE_SPACE)/build-zone-3/$(SYSIDCFG)
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   103
build-zone-4:		$(BUILD_ZONE_SPACE)/build-zone-4/$(SYSIDCFG)
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   104
build-zone-5:		$(BUILD_ZONE_SPACE)/build-zone-5/$(SYSIDCFG)
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   105
build-zone-6:		$(BUILD_ZONE_SPACE)/build-zone-6/$(SYSIDCFG)
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   106
build-zone-7:		$(BUILD_ZONE_SPACE)/build-zone-7/$(SYSIDCFG)
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   107
build-zone-8:		$(BUILD_ZONE_SPACE)/build-zone-8/$(SYSIDCFG)
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   108
build-zone-9:		$(BUILD_ZONE_SPACE)/build-zone-9/$(SYSIDCFG)
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   109
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   110
# zone install options.  The template zone uses "install", while the build
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   111
# zones "clone" the template zone.
5
b0dcdd332e2c update the base build packages
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 4
diff changeset
   112
ZI_OPT =				clone $(TMPL_ZONE_NAME)
4
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   113
$(BUILD_ZONE_SPACE)/$(TMPL_ZONE_NAME)/$(ZI_TAG): \
5
b0dcdd332e2c update the base build packages
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 4
diff changeset
   114
	ZI_OPT = 			install $(TMPL_ZONE_PKGS:%=-e %)
4
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   115
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   116
$(BUILD_ZONE_SPACE):
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   117
	$(MKDIR) [email protected]
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   118
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   119
# configure a zone
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   120
$(ZONECFG_DIR)/%.xml:	$(BUILD_ZONE_SPACE)
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   121
	( echo "create -b"; \
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   122
	  echo "set zonepath=$(BUILD_ZONE_SPACE)/$(@:$(ZONECFG_DIR)/%.xml=%)"; \
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   123
	  echo "set brand=ipkg"; \
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   124
	  echo "set autoboot=false"; \
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   125
	  echo "verify"; \
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   126
	  echo "commit" ) | $(ZONECFG) -z $(@:$(ZONECFG_DIR)/%.xml=%)
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   127
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   128
# install a zone
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   129
$(BUILD_ZONE_SPACE)/%/$(ZI_TAG):	$(ZONECFG_DIR)/%.xml
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   130
	$(ZONEADM) -z $(@:$(BUILD_ZONE_SPACE)/%/$(ZI_TAG)=%) $(ZI_OPT)
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   131
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   132
$(BUILD_ZONE_SPACE)/%/$(SYSIDCFG):	$(BUILD_ZONE_SPACE)/%/$(ZI_TAG)
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   133
	( echo "system_locale=C"; \
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   134
	  echo "timezone=$(TZ)"; \
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   135
	  echo "terminal=xterms"; \
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   136
	  echo "security_policy=NONE"; \
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   137
	  echo "timeserver=localhost"; \
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   138
	  echo "name_service=NONE"; \
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   139
	  echo "network_interface=none {"; \
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   140
	  echo "    hostname=$(@:$(BUILD_ZONE_SPACE)/%/$(SYSIDCFG)=%)"; \
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   141
	  echo "}"; \
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   142
	  echo "nfs4_domain=dynamic"; \
3d5acfe9dab4 build zone creation rules
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   143
	  echo "root_password=NP" ) > [email protected]