1# 2# CDDL HEADER START 3# 4# The contents of this file are subject to the terms of the 5# Common Development and Distribution License, Version 1.0 only 6# (the "License"). You may not use this file except in compliance 7# with the License. 8# 9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10# or http://www.opensolaris.org/os/licensing. 11# See the License for the specific language governing permissions 12# and limitations under the License. 13# 14# When distributing Covered Code, include this CDDL HEADER in each 15# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16# If applicable, add the following below this CDDL HEADER, with the 17# fields enclosed by brackets "[]" replaced with your own identifying 18# information: Portions Copyright [yyyy] [name of copyright owner] 19# 20# CDDL HEADER END 21# 22# 23# Copyright 2005 Sun Microsystems, Inc. All rights reserved. 24# Use is subject to license terms. 25# 26#ident "%Z%%M% %I% %E% SMI" 27 28include ../../Makefile.cmd 29 30ETCSVC = $(ROOTETC)/svc 31LIBSVCSEED = $(ROOT)/lib/svc/seed 32 33# 34# Because seed repository construction requires a functioning repository, a 35# working svccfg(1) binary, and XML support, the following libraries must exist 36# on the build system or in the proto area: libscf, libuutil, and libxml2. 37# 38 39# 40# GLOBAL_ZONE_DESCRIPTIONS and NONGLOBAL_ZONE_DESCRIPTIONS contain the 41# services used to define a 'seed repository' for a standalone Solaris 42# instance or for a zone, respectively. A service needed for either one of 43# these seeds must be added to the appropriate macro. The definition of a seed 44# repository is a self-consistent set of services that can boot. 45# 46GLOBAL_ZONE_DESCRIPTIONS = \ 47 ../milestone/boot-archive.xml \ 48 ../milestone/console-login.xml \ 49 ../milestone/datalink.xml \ 50 ../milestone/datalink-init.xml \ 51 ../milestone/devices-local.xml \ 52 ../milestone/identity.xml \ 53 ../milestone/local-fs.xml \ 54 ../milestone/manifest-import.xml \ 55 ../milestone/minimal-fs.xml \ 56 ../milestone/multi-user-server.xml \ 57 ../milestone/multi-user.xml \ 58 ../milestone/name-services.xml \ 59 ../milestone/aggregation.xml \ 60 ../milestone/network-initial.xml \ 61 ../milestone/network-loopback.xml \ 62 ../milestone/network-physical.xml \ 63 ../milestone/restarter.xml \ 64 ../milestone/root-fs.xml \ 65 ../milestone/single-user.xml \ 66 ../milestone/usr-fs.xml \ 67 ../../rpcbind/bind.xml \ 68 ../../cmd-inet/usr.lib/inetd/inetd-upgrade.xml \ 69 ../../utmpd/utmp.xml \ 70 ../../lvm/util/metainit.xml \ 71 ../../ipf/svc/pfil.xml 72 73NONGLOBAL_ZONE_DESCRIPTIONS = \ 74 ../milestone/boot-archive.xml \ 75 ../milestone/console-login.xml \ 76 ../milestone/datalink.xml \ 77 ../milestone/devices-local.xml \ 78 ../milestone/identity.xml \ 79 ../milestone/local-fs.xml \ 80 ../milestone/manifest-import.xml \ 81 ../milestone/minimal-fs.xml \ 82 ../milestone/multi-user-server.xml \ 83 ../milestone/multi-user.xml \ 84 ../milestone/name-services.xml \ 85 ../milestone/aggregation.xml \ 86 ../milestone/network-initial.xml \ 87 ../milestone/network-loopback.xml \ 88 ../milestone/network-physical.xml \ 89 ../milestone/restarter.xml \ 90 ../milestone/root-fs.xml \ 91 ../milestone/single-user.xml \ 92 ../milestone/usr-fs.xml \ 93 ../../rpcbind/bind.xml \ 94 ../../utmpd/utmp.xml 95 96OWNER = root 97GROUP = sys 98FILEMODE = 0600 99SEEDFILEMODE = 0444 # seeds are not intended for editing, but may 100 # be copied 101 102CONFIGD = ../configd/svc.configd-native 103SVCCFG = ../svccfg/svccfg-native 104 105.KEEP_STATE: 106 107all: global.db nonglobal.db 108 109$(CONFIGD): FRC 110 @cd ../configd; pwd; $(MAKE) $(MFLAGS) native 111 112$(SVCCFG): FRC 113 @cd ../svccfg; pwd; $(MAKE) $(MFLAGS) native 114 115../milestone/console-login.xml: 116 @cd ../milestone; pwd; $(MAKE) $(MFLAGS) console-login.xml 117 118global.db: $(GLOBAL_ZONE_DESCRIPTIONS) $(CONFIGD) $(SVCCFG) 119 $(RM) -f global.db global.db-journal 120 for m in $(GLOBAL_ZONE_DESCRIPTIONS); do \ 121 echo $$m; \ 122 SVCCFG_DTD=../dtd/service_bundle.dtd.1 \ 123 SVCCFG_REPOSITORY=$(SRC)/cmd/svc/seed/global.db \ 124 SVCCFG_CONFIGD_PATH=$(CONFIGD) \ 125 $(SVCCFG) import $$m; \ 126 done 127 128nonglobal.db: $(NONGLOBAL_ZONE_DESCRIPTIONS) $(CONFIGD) $(SVCCFG) 129 $(RM) -f nonglobal.db global.db-journal 130 for m in $(NONGLOBAL_ZONE_DESCRIPTIONS); do \ 131 echo $$m; \ 132 SVCCFG_DTD=../dtd/service_bundle.dtd.1 \ 133 SVCCFG_REPOSITORY=$(SRC)/cmd/svc/seed/nonglobal.db \ 134 SVCCFG_CONFIGD_PATH=$(CONFIGD) \ 135 $(SVCCFG) import $$m; \ 136 done 137 138install: install_global install_nonglobal 139 140install_global: global.db 141 $(RM) $(LIBSVCSEED)/global.db 142 $(INS) -f $(LIBSVCSEED) -m $(SEEDFILEMODE) -s global.db 143 144install_nonglobal: nonglobal.db 145 $(RM) $(LIBSVCSEED)/nonglobal.db 146 $(INS) -f $(LIBSVCSEED) -m $(SEEDFILEMODE) -s nonglobal.db 147 148clean lint: 149 150clobber: 151 $(RM) global.db nonglobal.db 152 153FRC: 154