-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathpkg.7
1526 lines (1523 loc) · 91.6 KB
/
pkg.7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE refentry PUBLIC "-//Sun Microsystems//DTD SolBook-XML 3.7//EN" "xsolbook.dtd" [
<!ENTITY % ent SYSTEM "entities.ent">
%ent;
]>
<refentry id="pkg-7">
<refmeta><refentrytitle>pkg</refentrytitle><manvolnum>7</manvolnum>
<refmiscinfo class="date">28 Jan 2025</refmiscinfo>
<refmiscinfo class="sectdesc">&man7;</refmiscinfo>
<refmiscinfo class="software">&release;</refmiscinfo>
<refmiscinfo class="arch">generic</refmiscinfo>
<refmiscinfo class="copyright">Copyright (c) 2009, 2025, Oracle and/or its affiliates.</refmiscinfo>
</refmeta>
<refnamediv>
<refname>pkg</refname><refpurpose>Image Packaging System</refpurpose>
</refnamediv>
<refsect1 id="GLHDA" role="description"><title></title>
<para>The Image Packaging System, <literal>pkg</literal>(7), is a framework
that provides for software lifecycle management (installation, upgrade, and
removal). Image packaging manages software in units of packages, which are
collections of actions, defined by a set of key/value pairs and possibly a
data payload. In many cases, actions are files found in a file system, but
they also represent other installable objects, such as drivers, services,
and users.</para>
</refsect1>
<refsect1 role="other"><title>Package FMRIs and Versions</title>
<para>Each package is represented by a fault management resource identifier
(FMRI) with the scheme <literal>pkg:</literal>. The full FMRI for a package
consists of the scheme, a publisher, the package name, and a version string in
the following format:</para>
<screen>pkg://solaris/system/library/c++-runtime@11.4-11.4.0.0.1.1.2:20170919T184404Z</screen>
<para><literal>solaris</literal> is the publisher.
<literal>system/library/c++-runtime</literal> is the package name. Although the
namespace is hierarchical and arbitrarily deep, there is no enforced
containment; the name is arbitrary. The publisher information is optional, but
must be preceded by <literal>pkg://</literal> if present. An FMRI that includes
the publisher is often referred to as being “fully qualified.” If
publisher information is not present, then the package name should generally be
preceded by <literal>pkg:/</literal>.</para>
<para>Packaging clients often allow the scheme of an FMRI to be omitted if it
does not contain publisher information. For example,
<literal>pkg:/system/library/c++-runtime</literal> can be written as
<literal>system/library/c++-runtime</literal>. If the scheme is omitted,
clients also allow omission of all but the last component of a package name for
matching purposes. For example, <literal>system/library/c++-runtime</literal>
could be written as <literal>library/c++-runtime</literal> or
<literal>c++-runtime</literal>, which would then match packages named
<literal>c++-runtime</literal> or package names ending in
<literal>/c++-runtime</literal>.</para>
<para>A publisher name identifies a person, group of persons, or an
organization as the source of one or more packages. To avoid publisher name
collisions and help identify the publisher, a best practice is to use a domain
name that represents the entity publishing the packages as a publisher name.</para>
<para>The version follows the package name, separated by an at (@) sign. The
version consists of a component version, a branch version, and a timestamp. The
component version and branch version are separated by a hyphen (-). The branch
version and timestamp are separated by a colon (:). Leading zeros (for example,
01.1 or 1.01) are not permitted in elements of the component version or branch
version. Trailing zeros (for example, 1.10) are permitted.</para>
<para><emphasis role="strong">Component version: 11.4.</emphasis> For components
tightly bound to the operating system, the component version number is
<replaceable>minor.update</replaceable>. Components with their own development
lifecycle, such as FOSS components, have their own version numbers, such as
2.4.10. The component version can be arbitrarily long.</para>
<para><emphasis role="strong">Branch version: 11.4.0.0.1.1.2.</emphasis> The
branch version, if present, must follow a hyphen (-). The branch version string
is the same as the “Branch” in <command>pkg info</command> output.</para>
<para>Oracle Solaris packages show the following information in the branch
version portion of the version string of a package FMRI:</para>
<programlisting><replaceable>minor.update.sru.order.platform.build.rev</replaceable></programlisting>
<variablelist termlength="wholeline">
<varlistentry><term><emphasis role="strong">Minor release number: 11</emphasis></term>
<listitem><para>The <replaceable>minor</replaceable> portion of
<replaceable>major.minor</replaceable> that is output by the
<command>uname -r</command>.</para></listitem></varlistentry>
<varlistentry><term><emphasis role="strong">Update release number: 4</emphasis></term>
<listitem><para>The update release number for this Oracle Solaris release.</para></listitem></varlistentry>
<varlistentry><term><emphasis role="strong">SRU number: 0</emphasis></term>
<listitem><para>The Support Repository Update (SRU) number for this update
release. SRUs are approximately monthly updates that fix bugs, fix security
issues, or provide support for new hardware. The Oracle Support Repository is
available only to systems under a support contract.</para></listitem></varlistentry>
<varlistentry><term><emphasis role="strong">Order: 0</emphasis></term>
<listitem><para>This value is used internally.</para></listitem></varlistentry>
<varlistentry><term><emphasis role="strong">Platform: 1</emphasis></term>
<listitem><para>This value is used internally.</para></listitem></varlistentry>
<varlistentry><term><emphasis role="strong">Release or SRU build number: 1</emphasis></term>
<listitem><para>The build number of the SRU, or the respin number for the release.</para></listitem></varlistentry>
<varlistentry><term><emphasis role="strong">Revision or nightly build number: 2</emphasis></term>
<listitem><para>The build number for the individual nightly builds.</para></listitem></varlistentry>
</variablelist>
<para>If the package is an Interim Diagnostic or Relief (IDR) update, then the
branch version of the package FMRI contains the following two additional fields.
IDRs are package updates that help diagnose customer issues or provide temporary
relief for a problem until a formal package update is issued. The following
examples are for idr824, which has FMRI
<literal>pkg://solaris/idr824@4,5.11:20131114T034951Z</literal> and contains
packages such as
<literal>pkg://solaris/system/library@11.4-11.4.0.0.1.1.2.824.4</literal>:</para>
<variablelist termlength="wholeline">
<varlistentry><term><emphasis role="strong">IDR: 824</emphasis></term>
<listitem><para>The name of the IDR.</para></listitem></varlistentry>
<varlistentry><term><emphasis role="strong">IDR ID: 4</emphasis></term>
<listitem><para>The version of the IDR.</para></listitem></varlistentry>
</variablelist>
<para><emphasis role="strong">Timestamp: 20170919T184404Z.</emphasis> The timestamp must follow a colon (:). The timestamp is the time the package was published in ISO-8601 basic format: <replaceable>YYYYMMDDTHHMMSSZ</replaceable>.</para>
<para>When performing comparisons between versions, no component of the full
version is considered unless the components to its left are the same. Thus,
<literal>4.3-1</literal> is greater than <literal>4.2-7</literal> because
<literal>4.3</literal> is greater than <literal>4.2</literal>, and
<literal>4.3-3</literal> is greater than <literal>4.3-1</literal> because
<literal>3</literal> is greater than <literal>1</literal>.</para>
<para>The <literal>pkg.human-version</literal> attribute can be used to provide
a human-readable version string. The value of the
<literal>pkg.human-version</literal> attribute can be provided in addition to
the package version described above for the package FMRI but cannot replace the
package FMRI version. The human-readable version string is only used for
display purposes. See “Set Actions” for more information.</para>
<para>Many parts of the system, when appropriate, abridge FMRIs when displaying
them, and accept input in shorter forms to reduce the volume of information
displayed or required. Typically, the scheme, publisher, build version, and
timestamp can be elided. Sometimes all of the versioning information can be
omitted.</para>
</refsect1>
<refsect1 role="other"><title>Actions</title>
<para>Actions represent the installable objects on a system. Actions are described in the manifest of a package.</para>
<para>To remove a file or other installable object from the image, remove the associated action from the package manifest. The object will be removed from the image when the package is updated by using the <command>pkg update</command> command. For more information, see <olink targetdoc="PKDEV"><citetitle remap="book">Packaging and Delivering Software With the Image Packaging System in Oracle Solaris 11.4</citetitle></olink>.</para>
<para>Every action consists primarily of its name and a key attribute. Together, these refer to a unique object as it follows a version history. Actions can have other attributes. Some attributes are interpreted directly by the packaging system. Other attributes might be useful only to the system administrator or the end-user.</para>
<para>Actions have a simple text representation:</para>
<programlisting><replaceable>action_name</replaceable> <replaceable>attribute1</replaceable>=<replaceable>value1</replaceable> <replaceable>attribute2</replaceable>=<replaceable>value2</replaceable> ...</programlisting>
<para>Names of attributes cannot have whitespace, quotation marks, or equals
signs (=) in them. All characters after the first equals sign belong to the
value. Values can have all of those, though spaces must be enclosed in single
or double quotation marks. Single quotation marks do not need to be escaped
inside a string that is enclosed in double quotation marks, and double quotation
marks do not need to be escaped inside a string that is enclosed in single
quotation marks. A quotation mark can be prefixed with a backslash (\)
character to avoid terminating the quoted string. A backslash can be escaped
with a backslash.</para>
<para>Actions can have multiple attributes. Some attributes can be named multiple
times with different values for a single action. Multiple attributes with
the same name are treated as unordered lists.</para>
<para>Actions with many attributes can create long lines in a manifest file.
Such lines can be wrapped by terminating each incomplete line with a backslash.
Note that this continuation character must occur between attribute/value pairs.
Neither attributes nor their values nor the combination can be split.</para>
<para>The attributes listed below are not an exhaustive set. In fact, the
attributes that can be attached to an action are arbitrary, and the standard
sets of attributes are easy to augment to incorporate future developments.</para>
<para>Some attributes cause additional operations to be executed outside of
the packaging context. These attributes are documented in the “Actuators”
section below.</para>
<para>Actions that are installed to a path must not deliver content to any of
the following paths:</para>
<programlisting>/system/volatile
/tmp
/var/share
/var/tmp</programlisting>
<para>Additionally, the following directories are reserved for use by the system
and should also not be used by actions:</para>
<programlisting>/var/pkg</programlisting>
<refsect2><title>File Actions</title>
<para>The <literal>file</literal> action represents an ordinary file. The <literal>
file</literal> action references a payload, and has four standard attributes:</para>
<variablelist>
<varlistentry><term><literal>path</literal></term>
<listitem><para>The file system path where the file is installed. This is
a <literal>file</literal> action's key attribute.</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>mode</literal></term>
<listitem><para>The access permissions (in numeric form) of the file. These
are simple permissions only, not ACLs.</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>owner</literal></term>
<listitem><para>The name of the user that owns the file.</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>group</literal></term>
<listitem><para>The name of the group that owns the file.</para>
</listitem>
</varlistentry>
</variablelist>
<para>The payload is a positional attribute in that it is not named. It is
the first word after the action name. In a published manifest, it is the <literal>
SHA-1</literal> hash of the file contents. If present in a manifest that has
yet to be published, it represents the path where the payload can be found.
See <olink targetdoc="refman" targetptr="pkgsend-1"><citerefentry><refentrytitle>pkgsend</refentrytitle><manvolnum>1</manvolnum></citerefentry></olink>. The hash attribute can be used instead
of the positional attribute, should the value include an equals sign. Both
can be used in the same action. However, the hashes must be identical.</para>
<para>The <literal>preserve</literal> and <literal>overlay</literal> attributes
affect whether and how a <literal>file</literal> action is installed.</para>
<variablelist termlength="wholeline">
<varlistentry><term><literal>preserve</literal></term>
<listitem><para>Specifies when and how files are preserved during package
operations.</para>
<para>When a package is initially installed, if a file delivered by the package
has a <literal>preserve</literal> attribute defined with any value except
<literal>abandon</literal> or <literal>install-only</literal> and the file
already exists in the image, the existing file is stored in
<filename>/var/pkg/lost+found</filename> and the packaged file is
installed.</para>
<para>When a package is initially installed, if a file
delivered by the package has a <literal>preserve</literal> attribute
defined and the file does not already exist in the image, whether that file
is installed depends on the value of the <literal>preserve</literal>
attribute:</para>
<itemizedlist>
<listitem><para>If the value of <literal>preserve</literal> is
<literal>abandon</literal> or <literal>legacy</literal>, the packaged file
is not installed.</para></listitem>
<listitem><para>If the value of <literal>preserve</literal> is not
<literal>abandon</literal> or <literal>legacy</literal>, the packaged file
is installed.</para></listitem>
</itemizedlist>
<para>When a package is downgraded, if a file delivered by the downgraded
version of the package has a <literal>preserve</literal> attribute defined
with any value except <literal>abandon</literal> or
<literal>install-only</literal> and all of the following conditions are
true, the file that currently exists in the image is renamed with the
extension <filename>.update</filename>, and the file from the downgraded
package is installed.</para>
<itemizedlist>
<listitem><para>The file exists in the image.</para></listitem>
<listitem><para>The content of the file delivered by the downgraded version
of the package is different from the content of the file delivered by the
currently installed version of the package.</para></listitem>
<listitem><para>The content of the file delivered by the downgraded version
of the package is different from the content of the file that exists in the
image.</para></listitem>
</itemizedlist>
<para>If any of the above conditions is not true, the file is treated the
same as if the package is being upgraded, rather than downgraded.</para>
<para>When a package is upgraded, if a <literal>file</literal> action delivered
by the upgraded version of the package has a <literal>preserve</literal> attribute
defined with any value and the <literal>file</literal> action is the same
as the <literal>file</literal> action delivered by the currently installed
version of the package, the file is not installed, and the file that exists
in the image is not modified. Any modifications made since the previous version
was installed are preserved.</para>
<para>When a package is upgraded, if a <literal>file</literal> action delivered
by the upgraded version of the package has a <literal>preserve</literal> attribute
defined and the <literal>file</literal> action is new or is different from
the <literal>file</literal> action delivered by the currently installed version
of the package, the upgrade is done in the following way:</para>
<itemizedlist>
<listitem><para>If the file delivered by the upgraded version of the package has
a <literal>preserve</literal> value of <literal>abandon</literal> or
<literal>install-only</literal> in the upgraded package, the new file will
not be installed and the existing file will not be modified.
</para></listitem>
<listitem><para>If the file delivered by the package has a
<literal>preserve</literal> value of <literal>abandon</literal> then any
attempt to revert the file will not restore the file. Any
<literal>revert-tag</literal> associated with the file will be ignored.
</para></listitem>
<listitem><para>If the file does not exist in the image, the new file is installed.
</para></listitem>
<listitem><para>If the file delivered by the upgraded version of the package
exists in the image, did not exist in the currently installed version of the
package, and was not renamed or moved by using the <literal>original_name</literal> attribute
(see below), then the existing file is stored in <filename>/var/pkg/lost+found</filename> and
the file delivered by the upgraded version of the package is installed.</para>
</listitem>
<listitem><para>If the file delivered by the upgraded version of the package
exists in the image and has different content from the file delivered by the
currently installed version of the package, the upgrade is done according
to the value of the <literal>preserve</literal> attribute:</para>
<itemizedlist>
<listitem><para>If the file delivered by the upgraded version of the package
has a <literal>preserve</literal> value of <literal>renameold</literal>, the
existing file is renamed with the extension <filename>.old</filename>, and
the new file is installed with updated permissions and timestamp (if present).
See the <literal>timestamp</literal> attribute description below.</para>
</listitem>
<listitem><para>If the file delivered by the upgraded version of the package
has a <literal>preserve</literal> value of <literal>renamenew</literal>, the
new file is installed with the extension <filename>.new</filename> and the
existing file is not modified.</para></listitem>
<listitem><para>If the file delivered by the upgraded version of the package
has a <literal>preserve</literal> value of <literal>true</literal>, the new
file is not installed, but the permissions and timestamp (if present) are
reset on the existing file.</para></listitem>
</itemizedlist>
</listitem>
<listitem><para>If the file delivered by the upgraded version of the package
exists in the image, has the same content as the file delivered by the currently
installed version of the package, and has a <literal>preserve</literal> value
of either <literal>renameold</literal> or <literal>renamenew</literal>, the
existing file is replaced by the file delivered by the upgraded version of
the package, including replacing permissions and timestamp (if present).</para>
</listitem>
<listitem><para>If the file delivered by the upgraded version of the package
exists in the image, has a <literal>preserve</literal> value of <literal>legacy</literal> in
the upgraded package, and has a different <literal>preserve</literal> value
in the currently installed version of the package, the existing file is renamed
with the extension <literal>.legacy</literal>, and the new file is installed
with updated permissions and timestamp (if present).</para></listitem>
<listitem><para>If the file delivered by the upgraded version of the package
exists in the image and has a <literal>preserve</literal> value of <literal>legacy
</literal> in both the upgraded package and the currently installed version
of the package, the permissions and timestamp (if present) are reset on the
existing file.</para></listitem>
</itemizedlist>
<para>Unless otherwise specified above, when a package is downgraded or
upgraded, any <literal>file</literal> action previously delivered by a package
that is not listed in the new package version is removed from the system.
Additionally, when the package is uninstalled, any <literal>file</literal>
action delivered by the package is removed.</para>
<para>When a package is uninstalled, if a <literal>file</literal> action
delivered by the currently installed version of the package has a
<literal>preserve</literal> value of <literal>abandon</literal> and the file
exists in the image, the file is not removed. However, any other
<literal>file</literal> action delivered by that package that is removed, that
has a <literal>preserve</literal> attribute specified, and that has been
modified since it was originally installed is moved to
<filename>/var/pkg/lost+found</filename>.</para></listitem>
</varlistentry>
<varlistentry><term><literal>overlay</literal></term>
<listitem><para>Specifies whether the action allows other packages to deliver
a file at the same location or whether it delivers a file intended to overlay
another file. This functionality is intended for use with configuration files
that do not participate in any self-assembly (for example, <filename>/etc/motd</filename>)
and that can be safely overwritten.</para>
<para>If <literal>overlay</literal> is not specified, multiple packages cannot
deliver files to the same location.</para>
<para>The <literal>overlay</literal> attribute can have one of the following
values:</para>
<variablelist>
<varlistentry><term><literal>allow</literal></term>
<listitem><para>One other package is allowed to deliver a file to the same
location. This value has no effect unless the <literal>preserve</literal> attribute
is also set.</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>true</literal></term>
<listitem><para>The file delivered by the action overwrites any other action
that has specified <literal>allow</literal>.</para>
</listitem>
</varlistentry>
</variablelist>
<para>Changes to the installed file are preserved based on the value of the <literal>
preserve</literal> attribute of the overlaying file. On removal, the contents
of the file are preserved if the action being overlaid is still installed,
regardless of whether the <literal>preserve</literal> attribute was specified.
Only one action can overlay another, and the <literal>mode</literal>, <literal>owner
</literal>, and <literal>group</literal> attributes must match.</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>overlay-attributes</literal></term>
<listitem><para>Specifies whether image-modifying operations such as install,
update, etc. should report errors when an overlaying action has a different
<literal>owner</literal>, <literal>group</literal>, <literal>mode</literal>
or <literal>sysattr</literal> from its overlaid action.
<literal>overlay-attributes</literal> is usually used in actions with
<literal>overlay</literal> equal to <literal>allow</literal> or
<literal>deny</literal>. When the value of
<literal>overlay-attributes</literal> for either overlaying action or overlaid
action is <literal>deny</literal>, an error will be generated during image-modifying
operations. Also verification operations will generate an error on those mismatched attributes:
<literal>owner</literal>, <literal>group</literal> and <literal>mode</literal>
if <literal>overlay</literal> is equal to <literal>deny</literal> for a pair of
overlaid and overlaying action. Otherwise, an info message will be generated on
the above mismatched attributes for the pair. Regardless of the value of
<literal>overlay-attributes</literal>, mismatched attributes
when comparing the on-disk attributes of a file to its packaged
version will always be reported as errors.
</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>dehydrate</literal></term>
<listitem><para>Specifies whether this action should be removed when a package publisher's packages are dehydrated or when a dehydrated publisher's packages are modified. The value of the <literal>dehydrate</literal> attribute can be <literal>true</literal> or <literal>false</literal>. If the value of the <literal>dehydrate</literal> attribute is <literal>false</literal>, the action will not be removed during dehydrate operations. Otherwise, the action will be removed. File actions tagged with the <literal>preserve</literal> or <literal>overlay</literal> attributes are implicitly excluded from dehydration operations and do not need this attribute.
</para>
<programlisting>file path=etc/zones/SYSdefault.xml dehydrate=false ...</programlisting>
</listitem>
</varlistentry>
</variablelist>
<para>The following attributes are recognized for ELF files:</para>
<variablelist termlength="wholeline">
<varlistentry><term><literal>elfarch</literal></term>
<listitem><para>The architecture of the ELF file. This is the output of <command>
uname -p</command> on the architecture for which the file is built.</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>elfbits</literal></term>
<listitem><para>This is <literal>32</literal> or <literal>64</literal>.</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>elfhash</literal></term>
<listitem><para>This is the hash of the “interesting” ELF sections
in the file. These are the sections that are mapped into memory when the binary
is loaded. These are the only sections necessary to consider when determining
whether the executable behavior of two binaries will differ.</para>
</listitem>
</varlistentry>
</variablelist>
<para>The following additional attributes are recognized for <literal>file</literal> actions:</para>
<variablelist termlength="wholeline">
<varlistentry><term><literal>original_name</literal></term>
<listitem><para>This attribute is used to handle editable files moving from
package to package or from place to place, or both. The form this takes is
the name of the originating package, followed by a colon and the original
path to the file. Any file being deleted is recorded either with its package
and path, or with the value of the <literal>original_name</literal> attribute
if specified. Any editable file being installed that has the <literal>original_name
</literal> attribute set uses the file of that name if it is deleted as part
of the same packaging operation.</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>release-note</literal></term>
<listitem><para>This attribute is used to indicate that this file contains
release note text. The value of this attribute is a package FMRI. If the FMRI
specifies a package name that is present in the original image and a version
that is newer than the version of the package in the original image, this
file will be part of the release notes. A special FMRI of <literal>feature/pkg/self
</literal> refers to the containing package. If the version of <literal>feature/pkg/self
</literal> is 0, this file will only be part of the release notes on initial
installation.</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>revert-tag</literal></term>
<listitem><para>This attribute is used to tag editable files that should be
reverted as a set. The value of the <literal>revert-tag</literal> attribute
is a <replaceable>tagname</replaceable>. Multiple <literal>revert-tag</literal> attributes
can be specified for a single <literal>file</literal> action. The file reverts
to its manifest-defined state when <command>pkg revert</command> is invoked
with any of those tags specified. See the <olink targetdoc="refman" targetptr="pkg-1"><citerefentry><refentrytitle>pkg</refentrytitle><manvolnum>1</manvolnum></citerefentry></olink> man page
for information about the <command>pkg revert</command> command.</para>
<para>The <literal>revert-tag</literal> attribute can also be specified at the directory level. See “Directory Actions” below.</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>sysattr</literal></term>
<listitem><para>This attribute is used to specify any system attributes that should be set for this file. The value of the <literal>sysattr</literal> attribute can be a comma-separated list of verbose system attributes or a string sequence of compact system attribute options, as shown in the following examples. Supported system attributes are explained in the <olink targetdoc="refman" targetptr="chmod-1"><citerefentry><refentrytitle>chmod</refentrytitle><manvolnum>1</manvolnum></citerefentry></olink> man page. System attributes specified in the manifest are set additionally to system attributes that might have been set by other subsystems of the operating system.</para>
<programlisting>file path=opt/secret_file sysattr=hidden,sensitive
file path=opt/secret_file sysattr=HT</programlisting>
</listitem>
</varlistentry>
<varlistentry><term><literal>timestamp</literal></term>
<listitem><para>This attribute is used to set the access and modification
time on the file. The <literal>timestamp</literal> attribute value must be
expressed in UTC in ISO-8601 format, omitting the colons and hyphens.</para>
<para>The <literal>timestamp</literal> attribute is essential when packaging <filename>.pyc</filename> or <filename>.pyo</filename> files for Python. The related <filename>.py</filename> file for the <filename>.pyc</filename> or <filename>.pyo</filename> files must be marked with the timestamp embedded within those files, as shown in the following example:</para>
<programlisting>file path=usr/lib/python2.7/vendor-packages/pkg/__init__.pyc ...
file path=usr/lib/python2.7/vendor-packages/pkg/__init__.py \
timestamp=20130311T221521Z ...</programlisting>
</listitem>
</varlistentry>
</variablelist>
<para>The following attributes for <literal>file</literal> actions are automatically generated by the system and should not be specified by package developers:</para>
<variablelist termlength="wholeline">
<varlistentry><term><literal>hash</literal></term>
<listitem><para>The SHA-1 hash of the uncompressed file.</para></listitem>
</varlistentry>
<varlistentry><term><literal>chash</literal></term>
<listitem><para>The SHA-1 hash of the compressed file.</para></listitem>
</varlistentry>
<varlistentry><term><literal>pkg.size</literal></term>
<listitem><para>The size in bytes of the uncompressed file.</para></listitem>
</varlistentry>
<varlistentry><term><literal>pkg.csize</literal></term>
<listitem><para>The size in bytes of the compressed file.</para></listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2><title>Directory Actions</title>
<para>The <literal>dir</literal> action is like the <command>file</command> action in that it
represents a file system object. The <literal>dir</literal> action represents a directory instead of
an ordinary file. The <literal>dir</literal> action has the same <literal>path</literal>,
<literal>mode</literal>, <literal>owner</literal>, and <literal>group</literal> attributes that the
<literal>file</literal> action has, and <literal>path</literal> is the key attribute. The <literal>dir</literal> action also accepts the <literal>revert-tag</literal> attribute. The value of the <literal>revert-tag</literal> attribute is different for <literal>file</literal> and <literal>dir</literal> actions.</para>
<para>Directories are reference counted in IPS. When the last package that either explicitly or
implicitly references a directory no longer does so, that directory is removed. If that directory
contains unpackaged file system objects, those items are moved into
<filename>$IMAGE_META/lost+found</filename>. See the “Files” section for more
information about <literal>$IMAGE_META</literal>.</para>
<variablelist termlength="wholeline">
<varlistentry>
<term><literal>revert-tag</literal></term>
<listitem>
<para>This attribute is used to identify unpackaged files that should be removed as a set. See
“File Actions” above for a description of how to specify this attribute for
<literal>file</literal> actions. For directories, the value of the <literal>revert-tag</literal>
attribute is
<replaceable>tagname</replaceable><literal>=</literal><replaceable>pattern</replaceable>. Multiple
<literal>revert-tag</literal> attributes can be specified for a single <literal>dir</literal>
action. When <command>pkg revert</command> is invoked with a matching
<replaceable>tagname</replaceable>, any unpackaged files or directories under this
<literal>dir</literal> directory that match <replaceable>pattern</replaceable> (using shell globbing
characters) are removed. See the <olink targetdoc="refman" targetptr="pkg-1"><citerefentry><refentrytitle>pkg</refentrytitle><manvolnum>1</manvolnum></citerefentry></olink> man page for information about the
<command>pkg revert</command> command.</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>salvage-from</literal></term>
<listitem><para>This attribute can be used to move unpackaged contents into a new directory. The value of this
attribute is the name of a directory of salvaged items. A directory with a
<literal>salvage-from</literal> attribute inherits on creation any contents of the directory named
in the value of the <literal>salvage-from</literal> attribute.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2><title>Link Actions</title>
<para>The <literal>link</literal> action represents a symbolic link. The <literal>link</literal>
action has the following standard attributes:</para>
<variablelist termlength="wholeline">
<varlistentry><term><literal>path</literal></term>
<listitem><para>The file system path where the symbolic link is installed.
This is a <literal>link</literal> action's key attribute.</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>target</literal></term>
<listitem><para>The target of the symbolic link. The file system object to
which the link resolves.</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>mediator</literal></term>
<listitem><para>Specifies the entry in the mediation namespace shared by all
path names participating in a given mediation group (for example, <literal>python
</literal>). Link mediation can be performed based on <literal>mediator-version</literal> and/or <literal>
mediator-implementation</literal>. All mediated links for a given path name
must specify the same mediator. However, not all mediator versions and implementations
need to provide a link at a given path. If a mediation does not provide a
link, then the link is removed when that mediation is selected. A <literal>mediator
</literal>, in combination with a specific version and/or implementation represents
a mediation that can be selected for use by the packaging system.</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>mediator-version</literal></term>
<listitem><para>Specifies the version (expressed as a dot-separated sequence
of nonnegative integers) of the interface described by the <literal>mediator</literal> attribute.
This attribute is required if <literal>mediator</literal> is specified and <literal>
mediator-implementation</literal> is not. A local system administrator can
set the version to use explicitly. The value specified should generally match
the version of the package delivering the link (for example, <literal>runtime/python-27
</literal> should use <literal>mediator-version=2.7</literal>), although this
is not required.</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>mediator-implementation</literal></term>
<listitem><para>Specifies the implementation of the mediator for use in addition
to or instead of the <literal>mediator-version</literal>. Implementation strings
are not considered to be ordered and a string is arbitrary selected by <literal>pkg
</literal>(7) if not explicitly specified by a system administrator.</para>
<para>The value can be a string of arbitrary length composed of alphanumeric
characters and spaces. If the implementation itself can be versioned or is
versioned, then the version should be specified at the end of the string,
after an at (@) sign (expressed as a dot-separated sequence of nonnegative integers).
If multiple versions of an implementation exist, the default behavior is to
select the implementation with the greatest version.</para>
<para>If only one instance of an implementation mediation link at a particular
path is installed on a system, then that one is chosen automatically. If future
links at the path are installed, the link is not switched unless a vendor,
site, or local override applies, or if one of the links is version mediated.</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>mediator-priority</literal></term>
<listitem><para>When resolving conflicts in mediated links, <literal>pkg</literal>(7)
normally chooses the link with the greatest value of <literal>mediator-version</literal> or
based on <literal>mediator-implementation</literal> if that is not possible.
This attribute is used to specify an override for the normal conflict resolution
process.</para>
<para>If this attribute is not specified, the default mediator selection logic
is applied.</para>
<para>If the value is <literal>vendor</literal>, the link is preferred over
those that do not have a <literal>mediator-priority</literal> specified.</para>
<para>If the value is <literal>site</literal>, the link is preferred over
those that have a value of <literal>vendor</literal> or that do not have a <literal>
mediator-priority</literal> specified.</para>
<para>A local system administrator can override the selection logic described
above.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2><title>Hardlink Actions</title>
<para>The <literal>hardlink</literal> action represents a hard link. It has
the same attributes as the <literal>link</literal> action, and <literal>path</literal> is
also its key attribute.</para>
</refsect2>
<refsect2><title>Driver Actions</title>
<para>The <literal>driver</literal> action represents a device driver. The <literal>
driver</literal> action does not reference a payload. The driver files themselves
must be installed as <literal>file</literal> actions. The following attributes
are recognized (see <olink targetdoc="refman" targetptr="add-drv-8"><citerefentry><refentrytitle>add_drv</refentrytitle><manvolnum>8</manvolnum></citerefentry></olink> for more information):</para>
<variablelist termlength="wholeline">
<varlistentry><term><literal>name</literal></term>
<listitem><para>The name of the driver. This is usually, but not always, the
file name of the driver binary. This is the <literal>driver</literal> action's
key attribute.</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>alias</literal></term>
<listitem><para>This represents an alias for the driver. A given driver can
have more than one <literal>alias</literal> attribute. No special quoting
rules are necessary.</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>class</literal></term>
<listitem><para>This represents a driver class. A given driver can have more
than one <literal>class</literal> attribute.</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>perms</literal></term>
<listitem><para>This represents the file system permissions for the driver's
device nodes.</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>clone_perms</literal></term>
<listitem><para>This represents the file system permissions for the clone
driver's minor nodes for this driver.</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>policy</literal></term>
<listitem><para>This specifies additional security policy for the device.
A given driver can have more than one <literal>policy</literal> attribute,
but no minor device specification can be present in more than one attribute.</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>privs</literal></term>
<listitem><para>This specifies privileges used by the driver. A given driver
can have more than one <literal>privs</literal> attribute.</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>devlink</literal></term>
<listitem><para>This specifies an entry in <filename>/etc/devlink.tab</filename>. The value is the exact line to go into the file, with tabs denoted by <literal>\t</literal>. See <olink targetdoc="refman" targetptr="devlinks-8"><citerefentry><refentrytitle>devlinks</refentrytitle><manvolnum>8</manvolnum></citerefentry></olink> for more information. A given driver can have more than one <literal>devlink</literal> attribute.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2><title>Depend Actions</title>
<para>The <command>depend</command> action represents an inter-package dependency.
A package can depend on another package because the first requires functionality
in the second for the functionality in the first to work, or even to install.
Dependencies can be optional. If a dependency is not met at the time of installation,
the packaging system attempts to install or update the dependent package to
a sufficiently new version, subject to other constraints.</para>
<para>The following attributes are recognized:</para>
<variablelist termlength="wholeline">
<varlistentry><term><literal>fmri</literal></term>
<listitem><para>The FMRI representing the dependent package. This is the <literal>
dependency</literal> action's key attribute. The <literal>fmri</literal> value
must not include the publisher. The package name is assumed to be complete.
Dependencies of type <literal>group-any</literal> and <literal>require-any</literal>
can have multiple <literal>fmri</literal> attributes. A version is optional on
the <literal>fmri</literal> value, though for some types of dependencies, an
<literal>fmri</literal> with no version has no meaning or the version is
ignored.</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>type</literal></term>
<listitem><para>The type of the dependency.</para>
<variablelist termlength="wholeline">
<varlistentry><term><literal>require</literal></term>
<listitem><para>The dependency is required and must have a version equal to
or greater than the version specified in the <literal>fmri</literal> attribute.
If the version is not specified, any version satisfies the dependency. A package
cannot be installed if any of its required dependencies cannot be satisfied.</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>optional</literal></term>
<listitem><para>The dependency, if present, must be at the specified version
level or greater.</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>exclude</literal></term>
<listitem><para>The containing package cannot be installed if the dependency
is present at the specified version level or greater. If no version is specified,
the dependent package cannot be installed concurrently with the package specifying
the dependency.</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>incorporate</literal></term>
<listitem><para>The dependency is optional, but the version of the dependent
package is constrained. See “Constraints and Freezing” below.</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>require-any</literal></term>
<listitem><para>Any one of the packages specified by multiple <literal>fmri</literal>
attributes can satisfy the dependency, following the same rules as the <literal>require</literal>
dependency type.</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>conditional</literal></term>
<listitem><para>The dependency is required only if the package defined by
the <literal>predicate</literal> attribute is present on the system.</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>origin</literal></term>
<listitem><para>Prior to installation of this package, the dependency target
must, if installed, be at the specified value or greater in the image to be
modified. If the value of the <literal>root-image</literal> attribute is
<literal>true</literal>, this applies to the image mounted at / instead.</para>
<para>If the value of the <literal>root-image</literal> attribute is
<literal>true</literal> and the value of the <literal>fmri</literal> attribute
starts with <literal>pkg:/feature/firmware/</literal>, the remainder of the
<literal>fmri</literal> value is treated as a command in
<filename>/usr/lib/fwenum</filename> that evaluates the firmware dependency. See
<olink targetdoc="PKDEV"><citetitle remap="book">Packaging and Delivering Software With the Image Packaging System in Oracle Solaris 11.4</citetitle></olink> for examples.</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>group</literal></term>
<listitem><para>The dependency is required unless the package is on the image
avoid list. Note that obsolete packages silently satisfy the group dependency.
See the <command>avoid</command> subcommand in <olink targetdoc="refman" targetptr="pkg-1"><citerefentry><refentrytitle>pkg</refentrytitle><manvolnum>1</manvolnum></citerefentry></olink>.</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>group-any</literal></term>
<listitem><para>Any one of multiple dependent packages as specified by multiple
<literal>fmri</literal> attributes can satisfy the dependency, following the
same rules as the <literal>group</literal> dependency type with the exception
that non-obsolete package stems are preferred over obsolete ones.</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>parent</literal></term>
<listitem><para>The dependency is ignored if the image is not a child image.
If the image is a child image then the dependency is required to be present
in the parent image. The package version matching for a <literal>parent</literal> dependency
is the same as that used for <literal>incorporate</literal> dependencies.</para>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>
<varlistentry><term><literal>predicate</literal></term>
<listitem><para>The FMRI representing the predicate for <literal>conditional</literal> dependencies.
</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>root-image</literal></term>
<listitem><para>Has an effect only for <literal>origin</literal> dependencies
as mentioned above.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2><title>License Actions</title>
<para>The <literal>license</literal> action represents a license or other
informational file associated with the package contents. A package can deliver
licenses, disclaimers, or other guidance to the package installer through
the use of the <literal>license</literal> action.</para>
<para>The payload of the <literal>license</literal> action is delivered into
the image metadata directory related to the package, and should only contain
human-readable text data. It should not contain HTML or any other form of
markup. Through attributes, <literal>license</literal> actions can indicate
to clients that the related payload must be displayed and/or require acceptance
of it. The method of display and/or acceptance is at the discretion of clients.</para>
<para>The following attributes are recognized:</para>
<variablelist termlength="wholeline">
<varlistentry><term><literal>license</literal></term>
<listitem><para>This is a <literal>license</literal> action's key attribute.
This attribute provides a meaningful description for the license to assist
users in determining the contents without reading the license text itself.
Some example values include:</para>
<itemizedlist>
<listitem><para>ABC Co. Copyright Notice</para></listitem>
<listitem><para>ABC Co. Custom License</para></listitem>
<listitem><para>Common Development and Distribution License 1.0 (CDDL)</para>
</listitem>
<listitem><para>GNU General Public License 2.0 (GPL)</para></listitem>
<listitem><para>GNU General Public License 2.0 (GPL) Only</para></listitem>
<listitem><para>MIT License</para></listitem>
<listitem><para>Mozilla Public License 1.1 (MPL)</para></listitem>
<listitem><para>Simplified BSD License</para></listitem>
</itemizedlist>
<para>The <literal>license</literal> value must be unique within a package.
Including the version of the license in the description, as shown in several
of the examples above, is recommended. If a package has code under multiple
licenses, use multiple <literal>license</literal> actions. The length of the
license attribute value should not be more than 64 characters.</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>must-accept</literal></term>
<listitem><para>When <literal>true</literal>, this license must be accepted
by a user before the related package can be installed or updated. Omission
of this attribute is equivalent to <literal>false</literal>. The method of
acceptance (interactive or configuration-based, for example) is at the discretion
of clients. For package updates, this attribute is ignored if the license
action or payload has not changed.</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>must-display</literal></term>
<listitem><para>When <literal>true</literal>, the action's payload must be
displayed by clients during packaging operations. Omission of this value is
equivalent to <literal>false</literal>. This attribute should not be used
for copyright notices. This attribute should only be used for licenses or
other material that must be displayed during operations. The method of display
is at the discretion of clients. For package updates, this attribute is ignored
if the license action or payload has not changed.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2><title>Legacy Actions</title>
<para>The <literal>legacy</literal> action represents package data used by
a legacy packaging system. The attributes associated with this action are
added into the legacy system's databases so that the tools querying those
databases can operate as if the legacy package were actually installed. In
particular, this should be sufficient to convince the legacy system that the
package named by the <literal>pkg</literal> attribute is installed on the
system, so that the package can be used to satisfy dependencies.</para>
<para>The following attributes, named in accordance with the parameters on
<olink targetdoc="refman" targetptr="pkginfo-5"><citerefentry><refentrytitle>pkginfo</refentrytitle><manvolnum>5</manvolnum></citerefentry></olink>, are recognized:</para>
<variablelist termlength="wholeline">
<varlistentry><term><literal>category</literal></term>
<listitem><para>The value for the <literal>CATEGORY</literal> parameter. The
default value is <literal>system</literal>.</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>desc</literal></term>
<listitem><para>The value for the <literal>DESC</literal> parameter.</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>hotline</literal></term>
<listitem><para>The value for the <literal>HOTLINE</literal> parameter.</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>name</literal></term>
<listitem><para>The value for the <literal>NAME</literal> parameter. The default
value is <literal>none provided</literal>.</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>pkg</literal></term>
<listitem><para>The abbreviation for the package being installed. The default
value is the name from the FMRI of the package. This is a <literal>legacy</literal> action's
key attribute.</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>vendor</literal></term>
<listitem><para>The value for the <literal>VENDOR</literal> parameter.</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>version</literal></term>
<listitem><para>The value for the VERSION parameter. The default value is
the version from the FMRI of the package.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2><title>Set Actions</title>
<para>The <literal>set</literal> action represents a package-level attribute,
or metadata, such as the package description.</para>
<para>The following attributes are recognized:</para>
<variablelist>
<varlistentry><term><literal>name</literal></term>
<listitem><para>The name of the attribute.</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>value</literal></term>
<listitem><para>The value given to the attribute.</para>
</listitem>
</varlistentry>
</variablelist>
<para>The <literal>set</literal> action can deliver any metadata the package
author chooses. However, there are a number of well defined attribute names
that have specific meaning to the packaging system.</para>
<variablelist termlength="wholeline">
<varlistentry><term><literal>info.classification</literal></term>
<listitem><para>One or more tokens that a <literal>pkg</literal>(7) client
can use to classify the package. The value should have a scheme (such as “org.opensolaris.category.2008”
or “org.acm.class.1998”) and the actual classification, such as “Applications/Games”,
separated by a colon (:).</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>pkg.description</literal></term>
<listitem><para>A detailed description of the contents and functionality of
the package, typically a paragraph or so in length.</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>pkg.fmri</literal></term>
<listitem><para>The name and version of the containing package. See
“Package FMRIs and Versions” in the “Description”
section.</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>pkg.human-version</literal></term>
<listitem><para>The version scheme used by IPS is strict. See “Package
FMRIs and Versions” in the “Description” section. A more
flexible version can be provided as the value of the
<literal>pkg.human-version</literal> attribute. The value is displayed by IPS
tools such as <command>pkg info</command>, <command>pkg contents</command>, and
<command>pkg search</command>. The <literal>pkg.human-version</literal> value
is not used as a basis for version comparison and cannot be used in place of
the <literal>pkg.fmri</literal> version.</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>pkg.obsolete</literal></term>
<listitem><para>When <literal>true</literal>, the package is marked obsolete.
An obsolete package can have no actions other than more set actions, and must
not be marked renamed.</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>pkg.renamed</literal></term>
<listitem><para>When <literal>true</literal>, the package has been renamed.
There must be one or more <literal>depend</literal> actions in the package
as well that point to the package versions to which this package has been
renamed. A package cannot be marked both renamed and obsolete, but otherwise
can have any number of set actions.</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>pkg.legacy</literal></term>
<listitem><para>When <literal>true</literal>, the package is marked legacy,
meaning that it will be removed in the future.</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>pkg.summary</literal></term>
<listitem><para>A short, one-line description of the package.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2><title>Group Actions</title>
<para>The <literal>group</literal> action defines a UNIX group as defined
in <olink targetdoc="refman" targetptr="group-5"><citerefentry><refentrytitle>group</refentrytitle><manvolnum>5</manvolnum></citerefentry></olink>. No support is present for group passwords.
Groups defined with this action initially have no user list. Users can be
added with the <literal>user</literal> action.</para>
<para>A delivered <literal>group</literal> action, with or without associated
<literal>facet</literal> or <literal>variant</literal> values, will override
any <literal>group</literal> entry manually added to the system. Subsequent package removals or
fixes will use the package definition for the <literal>group</literal>.</para>
<para>The following attributes are recognized:</para>
<variablelist termlength="wholeline">
<varlistentry><term><literal>groupname</literal></term>
<listitem><para>The value for the name of the group.</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>gid</literal></term>
<listitem><para>The group's unique numerical id.
If not specified the first free value in the dynamic allocation range
100-499 in the install image is used. The range 0-99 is reserved for
static allocation by the operating system vendor only.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2><title>User Actions</title>
<para>The <literal>user</literal> action defines a local account as defined in <filename>
/etc/passwd</filename>, <filename>/etc/shadow</filename>, <filename>/etc/group</filename>,
and <filename>/etc/ftpd/ftpusers</filename> files. Entries are added to the
appropriate files for users defined with this <literal>user</literal> action.</para>
<para>The <literal>user</literal> action is intended to define a user or role account for
use by a system commonent or application. The <literal>user</literal> action should not
be used for end user or administrator accounts.</para>
<para>A delivered <literal>user</literal> action, with or without associated
<literal>facet</literal> or <literal>variant</literal> values, will override
any <literal>user</literal> entry manually added to the system. Subsequent package removals or
fixes will use the package definition for the <literal>user</literal>.</para>
<para>The following attributes are recognized:</para>
<variablelist termlength="wholeline">
<varlistentry><term><literal>username</literal></term>
<listitem><para>The unique name of the user</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>password</literal></term>
<listitem><para>The encrypted password of the user. Default value is <literal>*LK*
</literal>. See
<olink targetdoc="refman" targetptr="shadow-5"><citerefentry><refentrytitle>shadow</refentrytitle><manvolnum>5</manvolnum></citerefentry></olink>.
</para>
<para>The special value "UP" can be used to indicate that the
<olink targetdoc="refman" targetptr="passwd-1"><citerefentry><refentrytitle>passwd</refentrytitle><manvolnum>1</manvolnum></citerefentry></olink> command
may be used to set a login password for the user/role account. When the
value of "UP" is listed in the manifest a <literal>pkg verify</literal>
will not report an unexpected change and <literal>pkg fix</literal> will not
change the value back to that of the manifest.</para>
<para>Best practice is to deliver role accounts with password="NP" and deliver a
<olink targetdoc="refman" targetptr="user-attr-5"><citerefentry><refentrytitle>user_attr</refentrytitle><manvolnum>5</manvolnum></citerefentry></olink> file that sets <literal>roleauth=user</literal>.
</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>uid</literal></term>
<listitem><para>The unique uid of the user.
If not specified the first free value in the dynamic allocation range:
100-499 in the install image is used. The range 0-99 is reserved for
static allocation by the operating system vendor only.</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>group</literal></term>
<listitem><para>The name of the user's primary group. Must be found in <filename>
/etc/group</filename>.</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>gcos-field</literal></term>
<listitem><para>The value of the <literal>gcos</literal> field in <filename>/etc/passwd
</filename>. Default value is <literal>username</literal>.</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>home-dir</literal></term>
<listitem><para>The user's home directory. This directory must be in the system
image directories and not under another mount point such as <filename>/home</filename>.
Default value is <literal>/</literal>.</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>login-shell</literal></term>
<listitem><para>The user's default shell. Default value is empty.</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>group-list</literal></term>
<listitem><para>Secondary groups to which the user belongs. See <olink targetdoc="refman" targetptr="group-5"><citerefentry><refentrytitle>group</refentrytitle><manvolnum>5</manvolnum></citerefentry></olink>.
</para>