1494N/A#
1494N/A# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
1494N/A#
1494N/A# Permission is hereby granted, free of charge, to any person obtaining a
1494N/A# copy of this software and associated documentation files (the "Software"),
1494N/A# to deal in the Software without restriction, including without limitation
1494N/A# the rights to use, copy, modify, merge, publish, distribute, sublicense,
1494N/A# and/or sell copies of the Software, and to permit persons to whom the
1494N/A# Software is furnished to do so, subject to the following conditions:
1494N/A#
1494N/A# The above copyright notice and this permission notice (including the next
1494N/A# paragraph) shall be included in all copies or substantial portions of the
1494N/A# Software.
1494N/A#
1494N/A# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1494N/A# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1494N/A# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
1494N/A# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1494N/A# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
1494N/A# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
1494N/A# DEALINGS IN THE SOFTWARE.
1494N/A
1494N/A#
1494N/A# For packagers:
1494N/A#
1494N/A# This ruleset is useful for "system" components-- ones which are expected
1494N/A# to appear primarily in the global zone, but which may have some small
1494N/A# pieces (man pages, header files) which may need to appear in all zones.
1494N/A#
1494N/A# The current rules specify that all payload-bearing actions (file,
1494N/A# dir, hardlink, link) should appear *only* in the global zone, with
1494N/A# the following exceptions:
1494N/A#
1494N/A# - man pages appear in all zones
1494N/A# - header files appear in all zones
1494N/A# - mdb(1) modules appear in all zones
1494N/A#
1494N/A# You may well have other actions which you wish to appear in all zones.
1494N/A# An example would be an administrative utility for a driver which has
1494N/A# been virtualized to work within zones. For those actions you wish to
1494N/A# appear in all zones, add the following attribute to your action.
1494N/A#
1494N/A# variant.opensolaris.zone=__NODEFAULT
1494N/A#
1494N/A# You DO NOT need to specify __NODEFAULT for man pages, headers, or
1494N/A# mdb modules, as those are covered by the automatic rules below.
1494N/A#
1494N/A# Note: When you specify variant.opensolaris.zone=__NODEFAULT, the
1494N/A# net effect is that *no* variant.opensolaris.zone attribute will
1494N/A# appear in the post-processed manifest.
1494N/A#
1494N/A
1494N/A#
1494N/A# For packaging nerds:
1494N/A#
1494N/A# We have a problem to solve here: To make an action appear in all zones,
1494N/A# it should have *no* variant.opensolaris.zone attribute. So it's a bit
1494N/A# more complicated to use "default".
1494N/A#
1494N/A# Here's what we do: we use "default" to set all payload bearing actions
1494N/A# which have no variant.opensolaris.zone attribute to be
1494N/A# variant.opensolaris.zone=global. For those actions which need to appear
1494N/A# in all zones, the packager must specify
1494N/A# variant.opensolaris.zone=__NODEFAULT. Additionally we have some rules
1494N/A# which set __NODEFAULT for a few classes of well known things, like man
1494N/A# pages and headers.
1494N/A#
1494N/A# We then go through and clean up all of the __NODEFAULTed attributes by
1494N/A# simply deleting them.
1494N/A#
1494N/A
1494N/A# Man pages should appear in all zones.
1494N/A<transform dir file link hardlink path=.*/man/.* -> default variant.opensolaris.zone __NODEFAULT>
1494N/A<transform dir path=.*/man$ -> default variant.opensolaris.zone __NODEFAULT>
1494N/A
1494N/A# Headers should appear in all zones.
1494N/A<transform dir file link hardlink path=.*/include/.* -> default variant.opensolaris.zone __NODEFAULT>
1494N/A<transform dir path=.*/include$ -> default variant.opensolaris.zone __NODEFAULT>
1494N/A
1494N/A# MDB modules should appear in all zones, as one might debug a crash dump
1494N/A# in a zone.
1494N/A<transform dir file link hardlink path=.*/mdb/.* -> default variant.opensolaris.zone __NODEFAULT>
1494N/A<transform dir path=.*/mdb$ -> default variant.opensolaris.zone __NODEFAULT>
1494N/A
1494N/A# Everything else is global zone only unless the user overrides
1494N/A# action-by-action with __NODEFAULT.
1494N/A<transform dir file link hardlink -> default variant.opensolaris.zone global>
1494N/A
1494N/A#
1494N/A# Buff out the __NODEFAULT attributes.
1494N/A#
1494N/A<transform dir file link hardlink -> delete variant.opensolaris.zone __NODEFAULT>