Skip to content

Commit 3430fb1

Browse files
committed
Merge pull request #7 from pyhalov/oi-updates
Oi updates
2 parents 29ebc15 + bfd8f31 commit 3430fb1

File tree

532 files changed

+47182
-25441
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

532 files changed

+47182
-25441
lines changed

.hgtags

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,3 +154,5 @@ ff3c422dd0e3cfb3d9c554f878ed833134576533 s12b27
154154
8c4b7bd87647791770ab557c59df04102daf41b2 s12b34
155155
1082c7f263dc7f173300c310f4a3218c2d14946a s12b35
156156
20b83de1f13197e25a6ca3b025fc26a9cf0cdfde s12b36
157+
50bd24a7036854d736b270d61e86e89dac11910e s12b37
158+
0612a636198c6b059aae638559fee5d99fd584bb s12b38

doc/client_api_versions.txt

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,55 @@
1+
Version 80:
2+
Compatible with clients using versions 72-79.
3+
4+
pkg.client.api.ImageInterface has changed as follows:
5+
6+
* Added optional 'implicit' parameter to gen_facets() and
7+
gen_variants() methods to get effective value of facets and
8+
boolean variants.
9+
10+
Version 79:
11+
Compatible with clients using versions 72-78.
12+
13+
pkg.client.api.PlanDescription has changed as follows:
14+
15+
* Added get_editable_changes() function to return the list of
16+
"editable" files that will be moved, removed, installed, or
17+
updated during the planned operation.
18+
19+
Version 78:
20+
Compatible with clients using versions 72-77.
21+
22+
pkg.client.api.ImageInterface has changed as follows:
23+
24+
* Added 'li_recurse' parameter to
25+
- gen_plan_update()
26+
- gen_plan_uninstall()
27+
- gen_plan_install()
28+
- gen_plan_change_varcets()
29+
30+
These allow to run the above operations recursively in linked images.
31+
32+
* Added 'ignore_missing' parameter to
33+
- gen_plan_uninstall()
34+
- gen_plan_update()
35+
36+
This changes the behavior of uninstall and update to not fail if a
37+
package for the requested operation is not found.
38+
39+
Version 77:
40+
Compatible with clients using versions 72-76.
41+
42+
pkg.client.api.ImageInterface has changed as follows:
43+
44+
* Added 'act_timeout' parameter to
45+
- gen_plan_update()
46+
- gen_plan_uninstall()
47+
- gen_plan_install()
48+
- gen_plan_change_varcets()
49+
50+
These allow to use synchronous SMF actuators including a timeout.
51+
52+
153
Version 76:
254
Compatible with clients using versions 72-75 [1].
355

doc/facets.txt

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ Name values
2727
facet.locale.* true, false
2828
facet.doc.man true, false
2929
facet.doc true, false
30+
facet.debug.* true, false
3031
facet.devel.* true, false
32+
facet.optional.* true, false
3133
variant.arch sparc, i386, zos
3234
variant.debug.* true, false
3335

@@ -55,11 +57,11 @@ In order to simplify grouping of facets, wildcarding is supported
5557
when setting facets, but not variants. For example,
5658
facet.doc.* matches facet.doc.man, facet.doc.info and facet.doc.html.
5759
For ease of installation and backwards compatibility, facets that
58-
are unspecified in the image are automatically included; for the
59-
same reasons, any variant matching the name variant.debug.* is
60-
automatically set to false. When multiple image facet patterns
61-
match, the longest match is selected. For example, the image
62-
may have:
60+
are unspecified in the image are automatically included except for those
61+
starting with 'facet.debug.' or 'facet.optional.'; for the same reasons,
62+
any variant matching the name variant.debug.* is automatically set to
63+
false. When multiple image facet patterns match, the longest match is
64+
selected. For example, the image may have:
6365

6466

6567
facet.locale.* false
@@ -113,6 +115,8 @@ facet.doc.info true
113115
facet.doc.man true
114116
facet.doc.html true
115117
facet.devel true
118+
facet.debug.<all> false
119+
facet.optional.<all> false
116120
facet.platform.sun4u true
117121
facet.platform.sun4v true
118122
variant.arch one of sparc, i386 as set by platform code

exception_lists/copyright

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@
2020
#
2121

2222
#
23-
# Copyright 2010 Sun Microsystems, Inc. All rights reserved.
24-
# Use is subject to license terms.
23+
# Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved.
2524
#
2625

2726
syntax: glob
2827

2928
src/man/*.txt
3029
src/tests/baseline.txt
30+
doc/*

src/Makefile

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,12 @@
2020
#
2121

2222
#
23-
# Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
23+
# Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
2424
#
2525

26-
PYTHON = /usr/bin/python2.6
26+
PYTHON26 = /usr/bin/python2.6
27+
PYTHON27 = /usr/bin/python2.7
28+
PYTHON34 = /usr/bin/python3.4
2729

2830
all := TARGET = all
2931
install := TARGET = install
@@ -49,33 +51,36 @@ PYLINT_VER_CMD = PYTHONPATH= /usr/bin/pkg info pkg:/developer/python/pylint | \
4951
SUBDIRS=brand zoneproxy tsol
5052

5153
all: $(SUBDIRS)
52-
$(PYTHON) setup.py build
54+
$(PYTHON26) setup.py build
55+
$(PYTHON27) setup.py build
5356

5457
clean: $(SUBDIRS)
55-
$(PYTHON) setup.py clean
58+
$(PYTHON27) setup.py clean
5659
@cd pkg; pwd; make clean
5760

5861
clobber: $(SUBDIRS)
59-
$(PYTHON) setup.py clobber
62+
$(PYTHON27) setup.py clobber
6063
@cd pkg; pwd; make clobber
6164

6265
#
6366
# run pylint as part of the install target.
6467
# it's the best way to ensure things stay pylint clean.
6568
#
6669
install: $(SUBDIRS)
67-
$(PYTHON) setup.py install
70+
$(PYTHON26) setup.py install
71+
$(PYTHON27) setup.py install
6872

6973
lint:
70-
$(PYTHON) setup.py lint
74+
$(PYTHON27) setup.py lint
7175
@cd zoneproxy; pwd; make lint
7276

7377
clint:
74-
$(PYTHON) setup.py clint
78+
$(PYTHON27) setup.py clint
7579
@cd zoneproxy; pwd; make lint
7680

7781
pylint: install
78-
PYLINT_VER=$(PYLINT_VER_CMD:sh) $(PYTHON) setup.py pylint
82+
PYLINT_VER=$(PYLINT_VER_CMD:sh) $(PYTHON26) setup.py pylint
83+
PYLINT_VER=$(PYLINT_VER_CMD:sh) $(PYTHON27) setup.py pylint
7984

8085
#
8186
# This rule propagates the current make target through all of the
@@ -88,15 +93,15 @@ $(SUBDIRS): FRC
8893
packages: install pylint
8994
@cd pkg; pwd; $(MAKE) $(TARGET) check \
9095
PATH=$$(hg root 2>/dev/null || git rev-parse --show-toplevel)/proto/root_$$(uname -p)/usr/bin:$$PATH \
91-
PYTHONPATH=$$(hg root 2>/dev/null || git rev-parse --show-toplevel)/proto/root_$$(uname -p)/usr/lib/python2.6/vendor-packages
96+
PYTHONPATH=$$(hg root 2>/dev/null || git rev-parse --show-toplevel)/proto/root_$$(uname -p)/usr/lib/python2.7/vendor-packages
9297

9398
test:
94-
$(PYTHON) setup.py test
99+
$(PYTHON27) setup.py test
95100

96101
test-verbose:
97-
$(PYTHON) setup.py test -v
102+
$(PYTHON27) setup.py test -v
98103

99104
test-generate:
100-
$(PYTHON) setup.py test -g
105+
$(PYTHON27) setup.py test -g
101106

102107
FRC:

src/brand/attach

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
#
2424
# Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
25+
# Copyright 2015, OmniTI Computer Consulting, Inc. All rights reserved.
2526
#
2627

2728
. /usr/lib/brand/ipkg/common.ksh
@@ -196,6 +197,13 @@ gather_zone_publisher_details() {
196197
typeset publisher.name=$name
197198
typeset publisher.keyfile=""
198199
typeset publisher.certfile=""
200+
typeset publisher.sigpol=""
201+
202+
# Get the signature policy. This code assumes
203+
# specific output ( "signature-policy = <policy>"
204+
# or empty-string).
205+
publisher.sigpol=$($PKG publisher ${publisher.name} | \
206+
grep signature-policy | sed 's/ //g')
199207

200208
get_publisher_attrs ${publisher.name} origin | \
201209
IFS=" " read publisher.sticky publisher.preferred \
@@ -302,6 +310,10 @@ print_publisher_pkg_defn() {
302310

303311
eval publisher="${publishers[$pname]}"
304312

313+
if [[ "${publisher.sigpol}" != "" ]]; then
314+
args="$args --set-property ${publisher.sigpol}"
315+
fi
316+
305317
if [[ ${publisher.preferred} == "true" ]]; then
306318
args="$args -P"
307319
fi

src/brand/fmri_compare.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/python2.6
1+
#!/usr/bin/python
22
#
33
# CDDL HEADER START
44
#
@@ -24,6 +24,7 @@
2424
# Use is subject to license terms.
2525
#
2626

27+
from __future__ import print_function
2728
import pkg.fmri
2829
import sys
2930

@@ -38,22 +39,21 @@ def usage():
3839
x = pkg.fmri.PkgFmri(sys.argv[1])
3940
y = pkg.fmri.PkgFmri(sys.argv[2])
4041
except pkg.fmri.FmriError, e:
41-
print >> sys.stderr, "error: %s" % str(e)
42+
print ("error: %s" % str(e) , file=sys.stderr)
4243
sys.exit(1)
4344

4445
if not x.is_same_pkg(y):
45-
print >> sys.stderr, \
46-
"error: can only compare two versions of the same package."
46+
print ("error: can only compare two versions of the same package.", file=sys.stderr)
4747
sys.exit(1)
4848

4949
if x < y:
50-
print "<"
50+
print("<")
5151
elif x > y:
52-
print ">"
52+
print(">")
5353
elif x == y:
54-
print "="
54+
print("=")
5555
else:
56-
print >> sys.stderr, "panic"
56+
print ("panic", file=sys.stderr)
5757
sys.exit(1)
5858

5959
sys.exit(0)

src/brand/pkgcreatezone

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
#
2424
# Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
25+
# Copyright (c) 2015, OmniTI Computer Consulting, Inc. All rights reserved.
2526
#
2627

2728
#
@@ -398,6 +399,13 @@ LC_ALL=C $PKG image-create -f --no-refresh --zone --full \
398399
# Retrieve publisher attributes and update our new publisher
399400
attrs=$(get_publisher_attr_args $publisher "origin")
400401

402+
# Get the signature policy from the global zone. This code assumes
403+
# specific output ( "signature-policy = <policy>" or empty-string).
404+
sigpol=$($PKG publisher $publisher | grep signature-policy | sed 's/ = /=/')
405+
if [ "$sigpol" != "" ]; then
406+
sigpol="--set-property $sigpol"
407+
fi
408+
401409
# Change the value of PKG_IMAGE so that future PKG operation will work
402410
# on the newly created zone rather than the global zone
403411

@@ -407,7 +415,7 @@ export PKG_IMAGE
407415
# --no-refresh is used here so that update operations can be
408416
# coalesced.
409417
# Update our new publisher
410-
LC_ALL=C $PKG set-publisher --no-refresh $attrs $publisher \
418+
LC_ALL=C $PKG set-publisher --no-refresh $sigpol $attrs $publisher \
411419
|| fail_incomplete "$f_img"
412420

413421
# add extra publishers

0 commit comments

Comments
 (0)