17c478bd9Sstevel@tonic-gate# 27c478bd9Sstevel@tonic-gate# CDDL HEADER START 37c478bd9Sstevel@tonic-gate# 47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the 50ea5e3a5Sjjj# Common Development and Distribution License (the "License"). 60ea5e3a5Sjjj# You may not use this file except in compliance with the License. 77c478bd9Sstevel@tonic-gate# 87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing. 107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions 117c478bd9Sstevel@tonic-gate# and limitations under the License. 127c478bd9Sstevel@tonic-gate# 137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each 147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the 167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying 177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner] 187c478bd9Sstevel@tonic-gate# 197c478bd9Sstevel@tonic-gate# CDDL HEADER END 207c478bd9Sstevel@tonic-gate# 21*e373b6e4SYuri Pankov 22*e373b6e4SYuri Pankov# 236ba597c5SAnurag S. Maskey# Copyright 2010 Sun Microsystems, Inc. All rights reserved. 247c478bd9Sstevel@tonic-gate# Use is subject to license terms. 25*e373b6e4SYuri Pankov# Copyright 2016 Nexenta Systems, Inc. 267c478bd9Sstevel@tonic-gate# 277c478bd9Sstevel@tonic-gate 287c478bd9Sstevel@tonic-gateinclude ../../Makefile.cmd 297c478bd9Sstevel@tonic-gate 307c478bd9Sstevel@tonic-gateETCSVC = $(ROOTETC)/svc 317c478bd9Sstevel@tonic-gateLIBSVCSEED = $(ROOT)/lib/svc/seed 322269adc8SszhouINSTALLSEED = $(ROOT)/usr/sadm/install 337c478bd9Sstevel@tonic-gate 347c478bd9Sstevel@tonic-gate# 357c478bd9Sstevel@tonic-gate# Because seed repository construction requires a functioning repository, a 367c478bd9Sstevel@tonic-gate# working svccfg(1) binary, and XML support, the following libraries must exist 377c478bd9Sstevel@tonic-gate# on the build system or in the proto area: libscf, libuutil, and libxml2. 387c478bd9Sstevel@tonic-gate# 397c478bd9Sstevel@tonic-gate 407c478bd9Sstevel@tonic-gate# 412269adc8Sszhou# We build and deliver 3 seed repositories: 422269adc8Sszhou# global.db -- for a standalone Solaris (global zone) 432269adc8Sszhou# nonglobal.db -- for a Solaris Zone 442269adc8Sszhou# miniroot.db -- for the install miniroot 452269adc8Sszhou# COMMON_DESCRIPTIONS contains manifests needed by all 3 repositories. 462269adc8Sszhou# GLOBAL_ZONE_DESCRIPTIONS/NONGLOBAL_ZONE_DESCRIPTIONS/MINIROOT_DESCRIPTIONS 472269adc8Sszhou# contain additional manifests needed. 487c478bd9Sstevel@tonic-gate# 492269adc8Sszhou 502269adc8Sszhou# 512269adc8Sszhou# Manifests needed by all seed repositories. If you change this, you 522269adc8Sszhou# must test Solaris standalone, Solaris zone, and Install miniroot. 532269adc8Sszhou# 542269adc8SszhouCOMMON_DESCRIPTIONS = \ 557c478bd9Sstevel@tonic-gate ../milestone/boot-archive.xml \ 567c478bd9Sstevel@tonic-gate ../milestone/devices-local.xml \ 571f6eb021SLiane Praza ../milestone/global.xml \ 587c478bd9Sstevel@tonic-gate ../milestone/identity.xml \ 597c478bd9Sstevel@tonic-gate ../milestone/local-fs.xml \ 607c478bd9Sstevel@tonic-gate ../milestone/manifest-import.xml \ 617c478bd9Sstevel@tonic-gate ../milestone/minimal-fs.xml \ 627c478bd9Sstevel@tonic-gate ../milestone/multi-user.xml \ 637c478bd9Sstevel@tonic-gate ../milestone/name-services.xml \ 647c478bd9Sstevel@tonic-gate ../milestone/network-initial.xml \ 657c478bd9Sstevel@tonic-gate ../milestone/network-loopback.xml \ 666ba597c5SAnurag S. Maskey ../milestone/network-netcfg.xml \ 677c478bd9Sstevel@tonic-gate ../milestone/network-physical.xml \ 687c478bd9Sstevel@tonic-gate ../milestone/restarter.xml \ 697c478bd9Sstevel@tonic-gate ../milestone/root-fs.xml \ 707c478bd9Sstevel@tonic-gate ../milestone/single-user.xml \ 717c478bd9Sstevel@tonic-gate ../milestone/usr-fs.xml \ 72d62bc4baSyz147064 ../../dlmgmtd/dlmgmt.xml \ 736e91bba0SGirish Moodalbail ../../cmd-inet/lib/ipmgmtd/network-ipmgmt.xml \ 746e91bba0SGirish Moodalbail ../../rpcbind/bind.xml 752269adc8Sszhou 762269adc8Sszhou# 772269adc8Sszhou# Additional manifests for standalone Solaris 782269adc8Sszhou# 792269adc8SszhouGLOBAL_ZONE_DESCRIPTIONS = \ 802269adc8Sszhou ../milestone/console-login.xml \ 812269adc8Sszhou ../milestone/multi-user-server.xml \ 827c478bd9Sstevel@tonic-gate ../../cmd-inet/usr.lib/inetd/inetd-upgrade.xml \ 83*e373b6e4SYuri Pankov ../../utmpd/utmp.xml 847c478bd9Sstevel@tonic-gate 852269adc8Sszhou# 862269adc8Sszhou# Additional manifests for a Solaris zone 872269adc8Sszhou# 887c478bd9Sstevel@tonic-gateNONGLOBAL_ZONE_DESCRIPTIONS = \ 897c478bd9Sstevel@tonic-gate ../milestone/console-login.xml \ 907c478bd9Sstevel@tonic-gate ../milestone/multi-user-server.xml \ 917c478bd9Sstevel@tonic-gate ../../utmpd/utmp.xml 927c478bd9Sstevel@tonic-gate 932269adc8Sszhou# 942269adc8Sszhou# Additional manifests for the install miniroot. 952269adc8Sszhou# 962269adc8SszhouMINIROOT_DESCRIPTIONS= \ 972269adc8Sszhou ../milestone/sysconfig.xml \ 982269adc8Sszhou ../../cmd-inet/usr.lib/inetd/inetd.xml \ 992269adc8Sszhou ../../cmd-inet/usr.sbin/login.xml \ 1002269adc8Sszhou ../milestone/network-service.xml \ 1012269adc8Sszhou ../../cmd-inet/usr.sbin/telnet.xml \ 1022269adc8Sszhou ../../../lib/libresolv2/client.xml \ 1032269adc8Sszhou ../../ldapcachemgr/client.xml \ 1042269adc8Sszhou ../../ypcmd/client.xml \ 1052269adc8Sszhou ../../ypcmd/server.xml \ 1062269adc8Sszhou ../../keyserv/keyserv.xml \ 1072269adc8Sszhou ../../cmd-crypto/scripts/cryptosvc.xml \ 1082269adc8Sszhou ../../nscd/name-service-cache.xml \ 1092269adc8Sszhou ../../syslogd/system-log.xml 1102269adc8Sszhou 1117c478bd9Sstevel@tonic-gateFILEMODE = 0600 1127c478bd9Sstevel@tonic-gateSEEDFILEMODE = 0444 # seeds are not intended for editing, but may 1137c478bd9Sstevel@tonic-gate # be copied 1147c478bd9Sstevel@tonic-gate 1157c478bd9Sstevel@tonic-gateCONFIGD = ../configd/svc.configd-native 1167c478bd9Sstevel@tonic-gateSVCCFG = ../svccfg/svccfg-native 1177c478bd9Sstevel@tonic-gate 1187c478bd9Sstevel@tonic-gate.KEEP_STATE: 1197c478bd9Sstevel@tonic-gate 1202269adc8Sszhouall: global.db nonglobal.db miniroot.db 1217c478bd9Sstevel@tonic-gate 1227c478bd9Sstevel@tonic-gate$(CONFIGD): FRC 1237c478bd9Sstevel@tonic-gate @cd ../configd; pwd; $(MAKE) $(MFLAGS) native 1247c478bd9Sstevel@tonic-gate 1257c478bd9Sstevel@tonic-gate$(SVCCFG): FRC 1267c478bd9Sstevel@tonic-gate @cd ../svccfg; pwd; $(MAKE) $(MFLAGS) native 1277c478bd9Sstevel@tonic-gate 1287c478bd9Sstevel@tonic-gate../milestone/console-login.xml: 1297c478bd9Sstevel@tonic-gate @cd ../milestone; pwd; $(MAKE) $(MFLAGS) console-login.xml 1307c478bd9Sstevel@tonic-gate 1312269adc8Sszhoucommon.db: $(COMMON_DESCRIPTIONS) $(CONFIGD) $(SVCCFG) 1322269adc8Sszhou $(RM) -f common.db common.db-journal 1332269adc8Sszhou for m in $(COMMON_DESCRIPTIONS); do \ 1342269adc8Sszhou echo $$m; \ 1352269adc8Sszhou SVCCFG_DTD=../dtd/service_bundle.dtd.1 \ 1362269adc8Sszhou SVCCFG_REPOSITORY=$(SRC)/cmd/svc/seed/common.db \ 1372269adc8Sszhou SVCCFG_CONFIGD_PATH=$(CONFIGD) \ 1382269adc8Sszhou $(SVCCFG) import $$m; \ 1392269adc8Sszhou done 1402269adc8Sszhou 1412269adc8Sszhouglobal.db: common.db $(GLOBAL_ZONE_DESCRIPTIONS) $(CONFIGD) $(SVCCFG) 1427c478bd9Sstevel@tonic-gate $(RM) -f global.db global.db-journal 1432269adc8Sszhou $(CP) common.db global.db 1447c478bd9Sstevel@tonic-gate for m in $(GLOBAL_ZONE_DESCRIPTIONS); do \ 1457c478bd9Sstevel@tonic-gate echo $$m; \ 1467c478bd9Sstevel@tonic-gate SVCCFG_DTD=../dtd/service_bundle.dtd.1 \ 1477c478bd9Sstevel@tonic-gate SVCCFG_REPOSITORY=$(SRC)/cmd/svc/seed/global.db \ 1487c478bd9Sstevel@tonic-gate SVCCFG_CONFIGD_PATH=$(CONFIGD) \ 1497c478bd9Sstevel@tonic-gate $(SVCCFG) import $$m; \ 1507c478bd9Sstevel@tonic-gate done 1517c478bd9Sstevel@tonic-gate 1522269adc8Sszhounonglobal.db: common.db $(NONGLOBAL_ZONE_DESCRIPTIONS) $(CONFIGD) $(SVCCFG) 1532269adc8Sszhou $(RM) -f nonglobal.db nonglobal.db-journal 1542269adc8Sszhou $(CP) common.db nonglobal.db 1557c478bd9Sstevel@tonic-gate for m in $(NONGLOBAL_ZONE_DESCRIPTIONS); do \ 1567c478bd9Sstevel@tonic-gate echo $$m; \ 1577c478bd9Sstevel@tonic-gate SVCCFG_DTD=../dtd/service_bundle.dtd.1 \ 1587c478bd9Sstevel@tonic-gate SVCCFG_REPOSITORY=$(SRC)/cmd/svc/seed/nonglobal.db \ 1597c478bd9Sstevel@tonic-gate SVCCFG_CONFIGD_PATH=$(CONFIGD) \ 1607c478bd9Sstevel@tonic-gate $(SVCCFG) import $$m; \ 1617c478bd9Sstevel@tonic-gate done 1627c478bd9Sstevel@tonic-gate 1632269adc8Sszhouminiroot.db: common.db $(MINIROOT_DESCRIPTIONS) $(CONFIGD) $(SVCCFG) 1642269adc8Sszhou $(RM) -f miniroot.db miniroot.db-journal 1652269adc8Sszhou $(CP) common.db miniroot.db 1662269adc8Sszhou for m in $(MINIROOT_DESCRIPTIONS); do \ 1672269adc8Sszhou echo $$m; \ 1682269adc8Sszhou SVCCFG_DTD=../dtd/service_bundle.dtd.1 \ 1692269adc8Sszhou SVCCFG_REPOSITORY=$(SRC)/cmd/svc/seed/miniroot.db \ 1702269adc8Sszhou SVCCFG_CONFIGD_PATH=$(CONFIGD) \ 1712269adc8Sszhou $(SVCCFG) import $$m; \ 1722269adc8Sszhou done 1730ea5e3a5Sjjj # 1740ea5e3a5Sjjj # Make sure the miniroot's syslogd and rpcbind do not respond 1750ea5e3a5Sjjj # to packets from outside the machine. Since we cannot set property 1760ea5e3a5Sjjj # values by applying a profile yet, we need to set them explicitly 1770ea5e3a5Sjjj # with svccfg commands. 1780ea5e3a5Sjjj # 1790ea5e3a5Sjjj SVCCFG_DTD=../dtd/service_bundle.dtd.1 \ 1800ea5e3a5Sjjj SVCCFG_REPOSITORY=$(SRC)/cmd/svc/seed/miniroot.db \ 1810ea5e3a5Sjjj SVCCFG_CONFIGD_PATH=$(CONFIGD) \ 1820ea5e3a5Sjjj $(SVCCFG) -s svc:/system/system-log \ 1830ea5e3a5Sjjj setprop config/log_from_remote = false 1840ea5e3a5Sjjj # 1850ea5e3a5Sjjj SVCCFG_DTD=../dtd/service_bundle.dtd.1 \ 1860ea5e3a5Sjjj SVCCFG_REPOSITORY=$(SRC)/cmd/svc/seed/miniroot.db \ 1870ea5e3a5Sjjj SVCCFG_CONFIGD_PATH=$(CONFIGD) \ 1880ea5e3a5Sjjj $(SVCCFG) -s svc:/network/rpc/bind setprop config/local_only = true 1892269adc8Sszhou 1902269adc8Sszhouinstall: install_global install_nonglobal install_miniroot 1917c478bd9Sstevel@tonic-gate 1927c478bd9Sstevel@tonic-gateinstall_global: global.db 1937c478bd9Sstevel@tonic-gate $(RM) $(LIBSVCSEED)/global.db 1947c478bd9Sstevel@tonic-gate $(INS) -f $(LIBSVCSEED) -m $(SEEDFILEMODE) -s global.db 1957c478bd9Sstevel@tonic-gate 1967c478bd9Sstevel@tonic-gateinstall_nonglobal: nonglobal.db 1977c478bd9Sstevel@tonic-gate $(RM) $(LIBSVCSEED)/nonglobal.db 1987c478bd9Sstevel@tonic-gate $(INS) -f $(LIBSVCSEED) -m $(SEEDFILEMODE) -s nonglobal.db 1997c478bd9Sstevel@tonic-gate 2002269adc8Sszhouinstall_miniroot: $(INSTALLSEED) miniroot.db 2012269adc8Sszhou $(RM) $(INSTALLSEED)/miniroot.db 2022269adc8Sszhou $(INS) -f $(INSTALLSEED) -m $(SEEDFILEMODE) -s miniroot.db 2032269adc8Sszhou 2042269adc8Sszhou$(INSTALLSEED): 2052269adc8Sszhou $(INS.dir) 2062269adc8Sszhou 2077c478bd9Sstevel@tonic-gateclean lint: 2082269adc8Sszhou $(RM) common.db 2097c478bd9Sstevel@tonic-gate 2107c478bd9Sstevel@tonic-gateclobber: 2112269adc8Sszhou $(RM) common.db global.db nonglobal.db miniroot.db 2127c478bd9Sstevel@tonic-gate 2137c478bd9Sstevel@tonic-gateFRC: 214