1*ebbab6bbSDan Price# 2*ebbab6bbSDan Price# CDDL HEADER START 3*ebbab6bbSDan Price# 4*ebbab6bbSDan Price# The contents of this file are subject to the terms of the 5*ebbab6bbSDan Price# Common Development and Distribution License (the "License"). 6*ebbab6bbSDan Price# You may not use this file except in compliance with the License. 7*ebbab6bbSDan Price# 8*ebbab6bbSDan Price# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*ebbab6bbSDan Price# or http://www.opensolaris.org/os/licensing. 10*ebbab6bbSDan Price# See the License for the specific language governing permissions 11*ebbab6bbSDan Price# and limitations under the License. 12*ebbab6bbSDan Price# 13*ebbab6bbSDan Price# When distributing Covered Code, include this CDDL HEADER in each 14*ebbab6bbSDan Price# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*ebbab6bbSDan Price# If applicable, add the following below this CDDL HEADER, with the 16*ebbab6bbSDan Price# fields enclosed by brackets "[]" replaced with your own identifying 17*ebbab6bbSDan Price# information: Portions Copyright [yyyy] [name of copyright owner] 18*ebbab6bbSDan Price# 19*ebbab6bbSDan Price# CDDL HEADER END 20*ebbab6bbSDan Price# 21*ebbab6bbSDan Price 22*ebbab6bbSDan Price# 23*ebbab6bbSDan Price# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. 24*ebbab6bbSDan Price# 25*ebbab6bbSDan Price 26*ebbab6bbSDan Price# 27*ebbab6bbSDan Price# For packagers: 28*ebbab6bbSDan Price# 29*ebbab6bbSDan Price# This ruleset is useful for "system" components-- ones which are expected 30*ebbab6bbSDan Price# to appear primarily in the global zone, but which may have some small 31*ebbab6bbSDan Price# pieces (man pages, header files) which may need to appear in all zones. 32*ebbab6bbSDan Price# 33*ebbab6bbSDan Price# The current rules specify that all payload-bearing actions (file, 34*ebbab6bbSDan Price# dir, hardlink, link) should appear *only* in the global zone, with 35*ebbab6bbSDan Price# the following exceptions: 36*ebbab6bbSDan Price# 37*ebbab6bbSDan Price# - man pages appear in all zones 38*ebbab6bbSDan Price# - header files appear in all zones 39*ebbab6bbSDan Price# - mdb(1) modules appear in all zones 40*ebbab6bbSDan Price# 41*ebbab6bbSDan Price# You may well have other actions which you wish to appear in all zones. 42*ebbab6bbSDan Price# An example would be an administrative utility for a driver which has 43*ebbab6bbSDan Price# been virtualized to work within zones. For those actions you wish to 44*ebbab6bbSDan Price# appear in all zones, add the following attribute to your action. 45*ebbab6bbSDan Price# 46*ebbab6bbSDan Price# variant.opensolaris.zone=__NODEFAULT 47*ebbab6bbSDan Price# 48*ebbab6bbSDan Price# You DO NOT need to specify __NODEFAULT for man pages, headers, or 49*ebbab6bbSDan Price# mdb modules, as those are covered by the automatic rules below. 50*ebbab6bbSDan Price# 51*ebbab6bbSDan Price# Note: When you specify variant.opensolaris.zone=__NODEFAULT, the 52*ebbab6bbSDan Price# net effect is that *no* variant.opensolaris.zone attribute will 53*ebbab6bbSDan Price# appear in the post-processed manifest. 54*ebbab6bbSDan Price# 55*ebbab6bbSDan Price 56*ebbab6bbSDan Price# 57*ebbab6bbSDan Price# For packaging nerds: 58*ebbab6bbSDan Price# 59*ebbab6bbSDan Price# We have a problem to solve here: To make an action appear in all zones, 60*ebbab6bbSDan Price# it should have *no* variant.opensolaris.zone attribute. So it's a bit 61*ebbab6bbSDan Price# more complicated to use "default". 62*ebbab6bbSDan Price# 63*ebbab6bbSDan Price# Here's what we do: we use "default" to set all payload bearing actions 64*ebbab6bbSDan Price# which have no variant.opensolaris.zone attribute to be 65*ebbab6bbSDan Price# variant.opensolaris.zone=global. For those actions which need to appear 66*ebbab6bbSDan Price# in all zones, the packager must specify 67*ebbab6bbSDan Price# variant.opensolaris.zone=__NODEFAULT. Additionally we have some rules 68*ebbab6bbSDan Price# which set __NODEFAULT for a few classes of well known things, like man 69*ebbab6bbSDan Price# pages and headers. 70*ebbab6bbSDan Price# 71*ebbab6bbSDan Price# We then go through and clean up all of the __NODEFAULTed attributes by 72*ebbab6bbSDan Price# simply deleting them. 73*ebbab6bbSDan Price# 74*ebbab6bbSDan Price 75*ebbab6bbSDan Price# Man pages should appear in all zones. 76*ebbab6bbSDan Price<transform dir file link hardlink path=.*/man/.* -> default variant.opensolaris.zone __NODEFAULT> 77*ebbab6bbSDan Price<transform dir path=.*/man$ -> default variant.opensolaris.zone __NODEFAULT> 78*ebbab6bbSDan Price 79*ebbab6bbSDan Price# Headers should appear in all zones. 80*ebbab6bbSDan Price<transform dir file link hardlink path=.*/include/.* -> default variant.opensolaris.zone __NODEFAULT> 81*ebbab6bbSDan Price<transform dir path=.*/include$ -> default variant.opensolaris.zone __NODEFAULT> 82*ebbab6bbSDan Price 83*ebbab6bbSDan Price# MDB modules should appear in all zones, as one might debug a crash dump 84*ebbab6bbSDan Price# in a zone. 85*ebbab6bbSDan Price<transform dir file link hardlink path=.*/mdb/.* -> default variant.opensolaris.zone __NODEFAULT> 86*ebbab6bbSDan Price<transform dir path=.*/mdb$ -> default variant.opensolaris.zone __NODEFAULT> 87*ebbab6bbSDan Price 88*ebbab6bbSDan Price# Everything else is global zone only unless the user overrides 89*ebbab6bbSDan Price# action-by-action with __NODEFAULT. 90*ebbab6bbSDan Price<transform dir file link hardlink -> default variant.opensolaris.zone global> 91*ebbab6bbSDan Price 92*ebbab6bbSDan Price# 93*ebbab6bbSDan Price# Buff out the __NODEFAULT attributes. 94*ebbab6bbSDan Price# 95*ebbab6bbSDan Price<transform dir file link hardlink -> delete variant.opensolaris.zone __NODEFAULT> 96