6396 remove SVM
[unleashed.git] / usr / src / cmd / svc / seed / Makefile
blob937362605d11391a89d8e147cab80fb725f03278
2 # CDDL HEADER START
4 # The contents of this file are subject to the terms of the
5 # Common Development and Distribution License (the "License").
6 # You may not use this file except in compliance with the License.
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 # or http://www.opensolaris.org/os/licensing.
10 # See the License for the specific language governing permissions
11 # and limitations under the License.
13 # When distributing Covered Code, include this CDDL HEADER in each
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 # If applicable, add the following below this CDDL HEADER, with the
16 # fields enclosed by brackets "[]" replaced with your own identifying
17 # information: Portions Copyright [yyyy] [name of copyright owner]
19 # CDDL HEADER END
23 # Copyright 2010 Sun Microsystems, Inc. All rights reserved.
24 # Use is subject to license terms.
25 # Copyright 2016 Nexenta Systems, Inc.
28 include ../../Makefile.cmd
30 ETCSVC = $(ROOTETC)/svc
31 LIBSVCSEED = $(ROOT)/lib/svc/seed
32 INSTALLSEED = $(ROOT)/usr/sadm/install
35 # Because seed repository construction requires a functioning repository, a
36 # working svccfg(1) binary, and XML support, the following libraries must exist
37 # on the build system or in the proto area: libscf, libuutil, and libxml2.
41 # We build and deliver 3 seed repositories:
42 # global.db -- for a standalone Solaris (global zone)
43 # nonglobal.db -- for a Solaris Zone
44 # miniroot.db -- for the install miniroot
45 # COMMON_DESCRIPTIONS contains manifests needed by all 3 repositories.
46 # GLOBAL_ZONE_DESCRIPTIONS/NONGLOBAL_ZONE_DESCRIPTIONS/MINIROOT_DESCRIPTIONS
47 # contain additional manifests needed.
51 # Manifests needed by all seed repositories. If you change this, you
52 # must test Solaris standalone, Solaris zone, and Install miniroot.
54 COMMON_DESCRIPTIONS = \
55 ../milestone/boot-archive.xml \
56 ../milestone/devices-local.xml \
57 ../milestone/global.xml \
58 ../milestone/identity.xml \
59 ../milestone/local-fs.xml \
60 ../milestone/manifest-import.xml \
61 ../milestone/minimal-fs.xml \
62 ../milestone/multi-user.xml \
63 ../milestone/name-services.xml \
64 ../milestone/network-initial.xml \
65 ../milestone/network-loopback.xml \
66 ../milestone/network-netcfg.xml \
67 ../milestone/network-physical.xml \
68 ../milestone/restarter.xml \
69 ../milestone/root-fs.xml \
70 ../milestone/single-user.xml \
71 ../milestone/usr-fs.xml \
72 ../../dlmgmtd/dlmgmt.xml \
73 ../../cmd-inet/lib/ipmgmtd/network-ipmgmt.xml \
74 ../../rpcbind/bind.xml
77 # Additional manifests for standalone Solaris
79 GLOBAL_ZONE_DESCRIPTIONS = \
80 ../milestone/console-login.xml \
81 ../milestone/multi-user-server.xml \
82 ../../cmd-inet/usr.lib/inetd/inetd-upgrade.xml \
83 ../../utmpd/utmp.xml
86 # Additional manifests for a Solaris zone
88 NONGLOBAL_ZONE_DESCRIPTIONS = \
89 ../milestone/console-login.xml \
90 ../milestone/multi-user-server.xml \
91 ../../utmpd/utmp.xml
94 # Additional manifests for the install miniroot.
96 MINIROOT_DESCRIPTIONS= \
97 ../milestone/sysconfig.xml \
98 ../../cmd-inet/usr.lib/inetd/inetd.xml \
99 ../../cmd-inet/usr.sbin/login.xml \
100 ../milestone/network-service.xml \
101 ../../cmd-inet/usr.sbin/telnet.xml \
102 ../../../lib/libresolv2/client.xml \
103 ../../ldapcachemgr/client.xml \
104 ../../ypcmd/client.xml \
105 ../../ypcmd/server.xml \
106 ../../keyserv/keyserv.xml \
107 ../../cmd-crypto/scripts/cryptosvc.xml \
108 ../../nscd/name-service-cache.xml \
109 ../../syslogd/system-log.xml
111 FILEMODE = 0600
112 SEEDFILEMODE = 0444 # seeds are not intended for editing, but may
113 # be copied
115 CONFIGD = ../configd/svc.configd-native
116 SVCCFG = ../svccfg/svccfg-native
118 .KEEP_STATE:
120 all: global.db nonglobal.db miniroot.db
122 $(CONFIGD): FRC
123 @cd ../configd; pwd; $(MAKE) $(MFLAGS) native
125 $(SVCCFG): FRC
126 @cd ../svccfg; pwd; $(MAKE) $(MFLAGS) native
128 ../milestone/console-login.xml:
129 @cd ../milestone; pwd; $(MAKE) $(MFLAGS) console-login.xml
131 common.db: $(COMMON_DESCRIPTIONS) $(CONFIGD) $(SVCCFG)
132 $(RM) -f common.db common.db-journal
133 for m in $(COMMON_DESCRIPTIONS); do \
134 echo $$m; \
135 SVCCFG_DTD=../dtd/service_bundle.dtd.1 \
136 SVCCFG_REPOSITORY=$(SRC)/cmd/svc/seed/common.db \
137 SVCCFG_CONFIGD_PATH=$(CONFIGD) \
138 $(SVCCFG) import $$m; \
139 done
141 global.db: common.db $(GLOBAL_ZONE_DESCRIPTIONS) $(CONFIGD) $(SVCCFG)
142 $(RM) -f global.db global.db-journal
143 $(CP) common.db global.db
144 for m in $(GLOBAL_ZONE_DESCRIPTIONS); do \
145 echo $$m; \
146 SVCCFG_DTD=../dtd/service_bundle.dtd.1 \
147 SVCCFG_REPOSITORY=$(SRC)/cmd/svc/seed/global.db \
148 SVCCFG_CONFIGD_PATH=$(CONFIGD) \
149 $(SVCCFG) import $$m; \
150 done
152 nonglobal.db: common.db $(NONGLOBAL_ZONE_DESCRIPTIONS) $(CONFIGD) $(SVCCFG)
153 $(RM) -f nonglobal.db nonglobal.db-journal
154 $(CP) common.db nonglobal.db
155 for m in $(NONGLOBAL_ZONE_DESCRIPTIONS); do \
156 echo $$m; \
157 SVCCFG_DTD=../dtd/service_bundle.dtd.1 \
158 SVCCFG_REPOSITORY=$(SRC)/cmd/svc/seed/nonglobal.db \
159 SVCCFG_CONFIGD_PATH=$(CONFIGD) \
160 $(SVCCFG) import $$m; \
161 done
163 miniroot.db: common.db $(MINIROOT_DESCRIPTIONS) $(CONFIGD) $(SVCCFG)
164 $(RM) -f miniroot.db miniroot.db-journal
165 $(CP) common.db miniroot.db
166 for m in $(MINIROOT_DESCRIPTIONS); do \
167 echo $$m; \
168 SVCCFG_DTD=../dtd/service_bundle.dtd.1 \
169 SVCCFG_REPOSITORY=$(SRC)/cmd/svc/seed/miniroot.db \
170 SVCCFG_CONFIGD_PATH=$(CONFIGD) \
171 $(SVCCFG) import $$m; \
172 done
174 # Make sure the miniroot's syslogd and rpcbind do not respond
175 # to packets from outside the machine. Since we cannot set property
176 # values by applying a profile yet, we need to set them explicitly
177 # with svccfg commands.
179 SVCCFG_DTD=../dtd/service_bundle.dtd.1 \
180 SVCCFG_REPOSITORY=$(SRC)/cmd/svc/seed/miniroot.db \
181 SVCCFG_CONFIGD_PATH=$(CONFIGD) \
182 $(SVCCFG) -s svc:/system/system-log \
183 setprop config/log_from_remote = false
185 SVCCFG_DTD=../dtd/service_bundle.dtd.1 \
186 SVCCFG_REPOSITORY=$(SRC)/cmd/svc/seed/miniroot.db \
187 SVCCFG_CONFIGD_PATH=$(CONFIGD) \
188 $(SVCCFG) -s svc:/network/rpc/bind setprop config/local_only = true
190 install: install_global install_nonglobal install_miniroot
192 install_global: global.db
193 $(RM) $(LIBSVCSEED)/global.db
194 $(INS) -f $(LIBSVCSEED) -m $(SEEDFILEMODE) -s global.db
196 install_nonglobal: nonglobal.db
197 $(RM) $(LIBSVCSEED)/nonglobal.db
198 $(INS) -f $(LIBSVCSEED) -m $(SEEDFILEMODE) -s nonglobal.db
200 install_miniroot: $(INSTALLSEED) miniroot.db
201 $(RM) $(INSTALLSEED)/miniroot.db
202 $(INS) -f $(INSTALLSEED) -m $(SEEDFILEMODE) -s miniroot.db
204 $(INSTALLSEED):
205 $(INS.dir)
207 clean lint:
208 $(RM) common.db
210 clobber:
211 $(RM) common.db global.db nonglobal.db miniroot.db
213 FRC: