Makefile revision 6ba597c56d749c61b4f783157f63196d7b2445f0
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington#
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews# CDDL HEADER START
a02a0a8a7eb461619931f4a0e896afa247b52c54Mark Andrews#
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews# The contents of this file are subject to the terms of the
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# Common Development and Distribution License (the "License").
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews# You may not use this file except in compliance with the License.
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews#
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# or http://www.opensolaris.org/os/licensing.
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# See the License for the specific language governing permissions
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# and limitations under the License.
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews#
0756445a735e2df39bf798d8de42ae5dd030aa3bMark Andrews# When distributing Covered Code, include this CDDL HEADER in each
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# If applicable, add the following below this CDDL HEADER, with the
f8f37672a57524560fbdde52484e6ae3de1c3354Mark Andrews# fields enclosed by brackets "[]" replaced with your own identifying
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# information: Portions Copyright [yyyy] [name of copyright owner]
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews#
a02a0a8a7eb461619931f4a0e896afa247b52c54Mark Andrews# CDDL HEADER END
0756445a735e2df39bf798d8de42ae5dd030aa3bMark Andrews#
0756445a735e2df39bf798d8de42ae5dd030aa3bMark Andrews# Copyright 2010 Sun Microsystems, Inc. All rights reserved.
a02a0a8a7eb461619931f4a0e896afa247b52c54Mark Andrews# Use is subject to license terms.
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson#
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrewsinclude ../../Makefile.cmd
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonETCSVC = $(ROOTETC)/svc
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark AndrewsLIBSVCSEED = $(ROOT)/lib/svc/seed
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonINSTALLSEED = $(ROOT)/usr/sadm/install
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews#
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# Because seed repository construction requires a functioning repository, a
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# working svccfg(1) binary, and XML support, the following libraries must exist
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# on the build system or in the proto area: libscf, libuutil, and libxml2.
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews#
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews
4038ab55037184d76153afd3c469aa8c85adf85dMark Andrews#
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# We build and deliver 3 seed repositories:
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# global.db -- for a standalone Solaris (global zone)
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# nonglobal.db -- for a Solaris Zone
a0624cf8d5711cca4e3907859fbc8062a7e460faMark Andrews# miniroot.db -- for the install miniroot
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# COMMON_DESCRIPTIONS contains manifests needed by all 3 repositories.
a0624cf8d5711cca4e3907859fbc8062a7e460faMark Andrews# GLOBAL_ZONE_DESCRIPTIONS/NONGLOBAL_ZONE_DESCRIPTIONS/MINIROOT_DESCRIPTIONS
a0624cf8d5711cca4e3907859fbc8062a7e460faMark Andrews# contain additional manifests needed.
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews#
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews#
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews# Manifests needed by all seed repositories. If you change this, you
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson# must test Solaris standalone, Solaris zone, and Install miniroot.
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews#
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark AndrewsCOMMON_DESCRIPTIONS = \
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson ../milestone/boot-archive.xml \
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews ../milestone/devices-local.xml \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington ../milestone/global.xml \
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews ../milestone/identity.xml \
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews ../milestone/local-fs.xml \
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews ../milestone/manifest-import.xml \
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews ../milestone/minimal-fs.xml \
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews ../milestone/multi-user.xml \
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews ../milestone/name-services.xml \
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews ../milestone/network-initial.xml \
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews ../milestone/network-loopback.xml \
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews ../milestone/network-netcfg.xml \
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews ../milestone/network-physical.xml \
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews ../milestone/restarter.xml \
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews ../milestone/root-fs.xml \
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews ../milestone/single-user.xml \
cf33609457c0d3bffe915db9a437290b2fcd04d5Mark Andrews ../milestone/usr-fs.xml \
eaccf5e805405de257b5a4840256c580fefe00e3Mark Andrews ../../dlmgmtd/dlmgmt.xml \
cf33609457c0d3bffe915db9a437290b2fcd04d5Mark Andrews ../../rpcbind/bind.xml \
cf33609457c0d3bffe915db9a437290b2fcd04d5Mark Andrews
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews#
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# Additional manifests for standalone Solaris
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson#
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonGLOBAL_ZONE_DESCRIPTIONS = \
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson ../milestone/console-login.xml \
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson ../milestone/multi-user-server.xml \
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson ../../cmd-inet/usr.lib/inetd/inetd-upgrade.xml \
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson ../../utmpd/utmp.xml \
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson ../../lvm/util/metainit.xml
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson#
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson# Additional manifests for a Solaris zone
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson#
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonNONGLOBAL_ZONE_DESCRIPTIONS = \
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson ../milestone/console-login.xml \
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson ../milestone/multi-user-server.xml \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington ../../utmpd/utmp.xml
c25080dc50542213058c240226c9f342186e6285Mark Andrews
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews#
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# Additional manifests for the install miniroot.
413988c8166976498250c0ebb2e3a645d0366bd3Mark Andrews#
0756445a735e2df39bf798d8de42ae5dd030aa3bMark AndrewsMINIROOT_DESCRIPTIONS= \
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews ../milestone/sysconfig.xml \
c25080dc50542213058c240226c9f342186e6285Mark Andrews ../../cmd-inet/usr.lib/inetd/inetd.xml \
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews ../../cmd-inet/usr.sbin/login.xml \
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews ../milestone/network-service.xml \
413988c8166976498250c0ebb2e3a645d0366bd3Mark Andrews ../../cmd-inet/usr.sbin/telnet.xml \
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews ../../../lib/libresolv2/client.xml \
c25080dc50542213058c240226c9f342186e6285Mark Andrews ../../ldapcachemgr/client.xml \
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews ../../ypcmd/client.xml \
413988c8166976498250c0ebb2e3a645d0366bd3Mark Andrews ../../ypcmd/server.xml \
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews ../../keyserv/keyserv.xml \
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews ../../cmd-crypto/scripts/cryptosvc.xml \
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews ../../nscd/name-service-cache.xml \
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews ../../syslogd/system-log.xml
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews
068a66979695c77359e7a9181bb3f831c965b21cMark AndrewsFILEMODE = 0600
068a66979695c77359e7a9181bb3f831c965b21cMark AndrewsSEEDFILEMODE = 0444 # seeds are not intended for editing, but may
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews # be copied
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark AndrewsCONFIGD = ../configd/svc.configd-native
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark AndrewsSVCCFG = ../svccfg/svccfg-native
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews.KEEP_STATE:
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrewsall: global.db nonglobal.db miniroot.db
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews$(CONFIGD): FRC
c25080dc50542213058c240226c9f342186e6285Mark Andrews @cd ../configd; pwd; $(MAKE) $(MFLAGS) native
413988c8166976498250c0ebb2e3a645d0366bd3Mark Andrews
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews$(SVCCFG): FRC
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews @cd ../svccfg; pwd; $(MAKE) $(MFLAGS) native
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews../milestone/console-login.xml:
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews @cd ../milestone; pwd; $(MAKE) $(MFLAGS) console-login.xml
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews
068a66979695c77359e7a9181bb3f831c965b21cMark Andrewscommon.db: $(COMMON_DESCRIPTIONS) $(CONFIGD) $(SVCCFG)
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews $(RM) -f common.db common.db-journal
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews for m in $(COMMON_DESCRIPTIONS); do \
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews echo $$m; \
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews SVCCFG_DTD=../dtd/service_bundle.dtd.1 \
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews SVCCFG_REPOSITORY=$(SRC)/cmd/svc/seed/common.db \
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews SVCCFG_CONFIGD_PATH=$(CONFIGD) \
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews $(SVCCFG) import $$m; \
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews done
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews
068a66979695c77359e7a9181bb3f831c965b21cMark Andrewsglobal.db: common.db $(GLOBAL_ZONE_DESCRIPTIONS) $(CONFIGD) $(SVCCFG)
5752b9e296f14034f103149f18188770c2cc5239Mark Andrews $(RM) -f global.db global.db-journal
c25080dc50542213058c240226c9f342186e6285Mark Andrews $(CP) common.db global.db
5752b9e296f14034f103149f18188770c2cc5239Mark Andrews for m in $(GLOBAL_ZONE_DESCRIPTIONS); do \
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews echo $$m; \
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews SVCCFG_DTD=../dtd/service_bundle.dtd.1 \
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews SVCCFG_REPOSITORY=$(SRC)/cmd/svc/seed/global.db \
ca12f7f4cf72e2368ee946f3eb4915ab73576cdcMark Andrews SVCCFG_CONFIGD_PATH=$(CONFIGD) \
c25080dc50542213058c240226c9f342186e6285Mark Andrews $(SVCCFG) import $$m; \
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews done
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews
068a66979695c77359e7a9181bb3f831c965b21cMark Andrewsnonglobal.db: common.db $(NONGLOBAL_ZONE_DESCRIPTIONS) $(CONFIGD) $(SVCCFG)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington $(RM) -f nonglobal.db nonglobal.db-journal
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews $(CP) common.db nonglobal.db
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews for m in $(NONGLOBAL_ZONE_DESCRIPTIONS); do \
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews echo $$m; \
0756445a735e2df39bf798d8de42ae5dd030aa3bMark Andrews SVCCFG_DTD=../dtd/service_bundle.dtd.1 \
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews SVCCFG_REPOSITORY=$(SRC)/cmd/svc/seed/nonglobal.db \
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews SVCCFG_CONFIGD_PATH=$(CONFIGD) \
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson $(SVCCFG) import $$m; \
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson done
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews
068a66979695c77359e7a9181bb3f831c965b21cMark Andrewsminiroot.db: common.db $(MINIROOT_DESCRIPTIONS) $(CONFIGD) $(SVCCFG)
ca12f7f4cf72e2368ee946f3eb4915ab73576cdcMark Andrews $(RM) -f miniroot.db miniroot.db-journal
7c40ffd67bd1e73907f83a79a6ff8c635f4a4a74Mark Andrews $(CP) common.db miniroot.db
0756445a735e2df39bf798d8de42ae5dd030aa3bMark Andrews for m in $(MINIROOT_DESCRIPTIONS); do \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington echo $$m; \
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews SVCCFG_DTD=../dtd/service_bundle.dtd.1 \
09344332cf7840e7e219215128fd52ea4c3d6942Mark Andrews SVCCFG_REPOSITORY=$(SRC)/cmd/svc/seed/miniroot.db \
eaccf5e805405de257b5a4840256c580fefe00e3Mark Andrews SVCCFG_CONFIGD_PATH=$(CONFIGD) \
fd42a013f17611b34cd49cc0abee0a6b0d251a6bMark Andrews $(SVCCFG) import $$m; \
09344332cf7840e7e219215128fd52ea4c3d6942Mark Andrews done
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson #
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson # Make sure the miniroot's syslogd and rpcbind do not respond
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews # to packets from outside the machine. Since we cannot set property
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington # values by applying a profile yet, we need to set them explicitly
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews # with svccfg commands.
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews #
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews SVCCFG_DTD=../dtd/service_bundle.dtd.1 \
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews SVCCFG_REPOSITORY=$(SRC)/cmd/svc/seed/miniroot.db \
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews SVCCFG_CONFIGD_PATH=$(CONFIGD) \
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews $(SVCCFG) -s svc:/system/system-log \
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews setprop config/log_from_remote = false
5752b9e296f14034f103149f18188770c2cc5239Mark Andrews #
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews SVCCFG_DTD=../dtd/service_bundle.dtd.1 \
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews SVCCFG_REPOSITORY=$(SRC)/cmd/svc/seed/miniroot.db \
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews SVCCFG_CONFIGD_PATH=$(CONFIGD) \
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews $(SVCCFG) -s svc:/network/rpc/bind setprop config/local_only = true
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews
068a66979695c77359e7a9181bb3f831c965b21cMark Andrewsinstall: install_global install_nonglobal install_miniroot
e076d0c88be69de7c190ab924d095e69d2e11f7aAndreas Gustafsson
068a66979695c77359e7a9181bb3f831c965b21cMark Andrewsinstall_global: global.db
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews $(RM) $(LIBSVCSEED)/global.db
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews $(INS) -f $(LIBSVCSEED) -m $(SEEDFILEMODE) -s global.db
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafssoninstall_nonglobal: nonglobal.db
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson $(RM) $(LIBSVCSEED)/nonglobal.db
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson $(INS) -f $(LIBSVCSEED) -m $(SEEDFILEMODE) -s nonglobal.db
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafssoninstall_miniroot: $(INSTALLSEED) miniroot.db
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson $(RM) $(INSTALLSEED)/miniroot.db
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews $(INS) -f $(INSTALLSEED) -m $(SEEDFILEMODE) -s miniroot.db
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington$(INSTALLSEED):
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington $(INS.dir)
eaccf5e805405de257b5a4840256c580fefe00e3Mark Andrews
068a66979695c77359e7a9181bb3f831c965b21cMark Andrewsclean lint:
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews $(RM) common.db
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews
068a66979695c77359e7a9181bb3f831c965b21cMark Andrewsclobber:
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews $(RM) common.db global.db nonglobal.db miniroot.db
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews
068a66979695c77359e7a9181bb3f831c965b21cMark AndrewsFRC:
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington