xref: /illumos-gate/usr/src/pkg/transforms/defaults (revision b23a7923)
1#
2# CDDL HEADER START
3#
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.
7#
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.
12#
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]
18#
19# CDDL HEADER END
20#
21
22#
23# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
24#
25
26#
27# For kernel/drv, set .conf files to mode 0644.  Assume all other
28# files there are drivers, and give them mode 0755 and reboot-needed.
29#
30# The (?<!r) construct in the reboot-needed transform is a negative
31# lookbehind assertion: it says "only match this regex if the
32# previously matched text does NOT match regex r."  So it will match
33# all files in the various kernel trees, except for .conf files.
34#
35<transform file path=.*kernel/drv/.+\.conf -> default mode 0644>
36<transform file path=.*kernel/drv/.+ -> default mode 0755>
37<transform file path=.*kernel/.+(?<!\.conf)$ -> default reboot-needed true>
38
39
40#
41# Non-global zones should not have content in kernel, usr/kernel (and
42# other kernel dirs) or in boot/.
43#
44<transform file dir link hardlink path=.*kernel/.* -> set variant.opensolaris.zone global>
45<transform dir path=kernel$ -> set variant.opensolaris.zone global>
46<transform dir path=.*/kernel$ -> set variant.opensolaris.zone global>
47
48<transform file dir link hardlink path=boot/.* -> set variant.opensolaris.zone global>
49<transform dir path=boot$ -> set variant.opensolaris.zone global>
50
51#
52# shared objects should generally have mode 0755
53#
54<transform file path=.*lib/.*\.so.* -> default mode 0755>
55
56#
57# Catch some of the collections of largely read-only files
58#
59<transform file path=usr/lib/help/.+ -> default mode 0444>
60<transform file path=usr/share/doc/ksh/.+ -> default mode 0644>
61<transform file path=usr/share/ipfilter/.+ -> default mode 0644>
62<transform file path=usr/share/lib/ccs/.+ -> default mode 0644>
63<transform file path=usr/share/lib/java/.+ -> default mode 0644>
64<transform file path=usr/share/lib/locale/com/sun/dhcpmgr/.+\.properties -> default mode 0644>
65<transform file path=usr/share/lib/locale/com/sun/dhcpmgr/.+ -> default mode 0444>
66<transform file path=usr/share/lib/locale/com/sun/.+ -> default mode 0644>
67<transform file path=usr/share/lib/mailx/.+ -> default mode 0644>
68<transform file path=usr/share/lib/nterm/.+ -> default mode 0644>
69<transform file path=usr/share/lib/pub/.+ -> default mode 0644>
70<transform file path=usr/share/lib/sgml/.+ -> default mode 0644>
71<transform file path=usr/share/lib/slp/.+ -> default mode 0644>
72<transform file path=usr/share/lib/tabset/.+ -> default mode 0644>
73<transform file path=usr/share/lib/t.+ -> default mode 0644>
74<transform file path=usr/share/lib/unittab/.+ -> default mode 0644>
75<transform file path=usr/share/lib/zoneinfo/.+ -> default mode 0644>
76<transform file path=usr/share/src/grub/.+ -> default mode 0644>
77<transform file path=usr/share/.+ -> default mode 0444>
78
79
80#
81# For what's left, go with root:bin 0644, +x for directories
82#
83#
84<transform file dir -> default owner root>
85<transform file dir -> default group bin>
86<transform file -> default mode 0644>
87<transform dir -> default mode 0755>
88