7072864 X needs to implement the 'unlock' facet feature nv_173
authorAlan Coopersmith <Alan.Coopersmith@Oracle.COM>
Mon, 15 Aug 2011 14:54:19 -0700
changeset 1190 faa50483142d
parent 1189 f3178ba616ba
child 1191 6ab513e20948
7072864 X needs to implement the 'unlock' facet feature
open-src/common/Makefile.init
open-src/driver/Makefile.inc
open-src/xserver/Makefile.inc
pkg/manifests/x11-server-xdmx.p5m
pkg/manifests/x11-server-xephyr.p5m
pkg/manifests/x11-server-xorg.p5m
pkg/manifests/x11-server-xserver-common.p5m
pkg/manifests/x11-server-xvfb.p5m
pkg/manifests/x11-server-xvnc.p5m
pkg/manifests/x11-trusted-trusted-xorg.p5m
pkg/transforms/extract_metadata
--- a/open-src/common/Makefile.init	Mon Aug 15 14:36:26 2011 -0700
+++ b/open-src/common/Makefile.init	Mon Aug 15 14:54:19 2011 -0700
@@ -344,6 +344,20 @@
 UNPACK_FILE = .unpack_done
 UNPACK_TARGET = $(SOURCE_DIR)/$(UNPACK_FILE)
 
+# Most module versions are in the individual makefiles, but the Xserver is
+# referenced in multiple places, so it's kept here for easy sharing.
+# 
+# Current Xorg server source tarball to use sources from:
+XORGSERVER_VERS=1.10.3
+# Minimum Xorg server version that we expect to be ABI compatible with.
+# Usually .99 of the previous minor release series, as that's the convention
+# for the development snapshots of the next release series.
+MIN_XSERVER_VERS=1.9.99
+# Next highest Xorg server version that we expect to be ABI incompatible with.
+# Usually .99 of the current release series, as Xorg tends to break ABI's
+# in each minor release train (1.8, 1.9, etc.)
+NEXT_XSERVER_VERS=1.10.99
+
 ### Misc rules
 
 # For use in debugging or calling from scripts like the code review helper
--- a/open-src/driver/Makefile.inc	Mon Aug 15 14:36:26 2011 -0700
+++ b/open-src/driver/Makefile.inc	Mon Aug 15 14:54:19 2011 -0700
@@ -95,5 +95,11 @@
 # Need to fix libtool interference with our linker flags
 DELIBTOOLIZE=yes
 
+# Mark packages as only compatible with the current Xorg minor release series,
+# since Xorg tends to break ABI's in each minor release train (1.8, 1.9, etc.)
+MODTYPE_ATTRDATA_COMMANDS = @$(START_CMD_ECHO) ; \
+	print "depend fmri=pkg:/x11/server/xorg@$(MIN_XSERVER_VERS) type=optional" >> $@ ; \
+	print "depend fmri=pkg:/x11/server/xorg@$(NEXT_XSERVER_VERS) type=exclude" >> $@
+
 ### Include common rules
 include $(TOP)/open-src/common/Makefile.inc
--- a/open-src/xserver/Makefile.inc	Mon Aug 15 14:36:26 2011 -0700
+++ b/open-src/xserver/Makefile.inc	Mon Aug 15 14:54:19 2011 -0700
@@ -38,9 +38,6 @@
 ### Include common definitions
 include $(TOP)/open-src/common/Makefile.init
 
-# Xorg server source tarball to use sources from
-XORGSERVER_VERS=1.10.3
-
 # Patches shared between Xorg & Xvnc builds
 XORG_SOURCE_PATCHES:sh=sed '/^\#/ d' ../xorg/patch-list
 
@@ -115,6 +112,12 @@
 MODTYPE_BUILD_ENV= PATH=$(PATH):/usr/sbin \
 	LD_LIBRARY_PATH=$(PROTODIR)$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR):$(PROTODIR)$(X11_DIR)/lib$(ARCHLIBSUBDIR)
 
+# Mark packages as only compatible with the current server minor release series,
+# since Xorg tends to break ABI's in each minor release train (1.8, 1.9, etc.)
+MODTYPE_ATTRDATA_COMMANDS = @$(START_CMD_ECHO) ; \
+	print "depend fmri=pkg:/x11/server/xserver-common@$(MIN_XSERVER_VERS) type=require" >> $@ ; \
+	print "depend fmri=pkg:/x11/server/xorg@$(NEXT_XSERVER_VERS) type=exclude" >> $@
+
 ### Include common rulesets
 include $(TOP)/open-src/common/Makefile.inc
 
--- a/pkg/manifests/x11-server-xdmx.p5m	Mon Aug 15 14:36:26 2011 -0700
+++ b/pkg/manifests/x11-server-xdmx.p5m	Mon Aug 15 14:54:19 2011 -0700
@@ -47,4 +47,3 @@
 # X servers require xkbcomp & data-xkb for keyboard layouts
 depend fmri=pkg:/x11/keyboard/data-xkb type=require
 depend fmri=pkg:/x11/keyboard/xkbcomp type=require
-depend fmri=pkg:/x11/server/xserver-common type=require
--- a/pkg/manifests/x11-server-xephyr.p5m	Mon Aug 15 14:36:26 2011 -0700
+++ b/pkg/manifests/x11-server-xephyr.p5m	Mon Aug 15 14:54:19 2011 -0700
@@ -32,4 +32,3 @@
 # X servers require xkbcomp & data-xkb for keyboard layouts
 depend fmri=pkg:/x11/keyboard/data-xkb type=require
 depend fmri=pkg:/x11/keyboard/xkbcomp type=require
-depend fmri=pkg:/x11/server/xserver-common type=require
--- a/pkg/manifests/x11-server-xorg.p5m	Mon Aug 15 14:36:26 2011 -0700
+++ b/pkg/manifests/x11-server-xorg.p5m	Mon Aug 15 14:54:19 2011 -0700
@@ -269,9 +269,8 @@
 depend fmri=pkg:/x11/keyboard/xkbcomp type=require
 
 # keyboard & mouse drivers used to be part of this package, so we preserve
-# the dependency to ensure they're not lost on upgrade
-depend fmri=pkg:/x11/server/xorg/driver/xorg-input-keyboard type=require
-depend fmri=pkg:/x11/server/xorg/driver/xorg-input-mouse type=require
-
-# X servers require several shared data files in xserver-common
-depend fmri=pkg:/x11/server/xserver-common type=require
+# the dependency to ensure they're not lost on upgrade, and normally installed
+# on fresh install, but make it a group dependency, so that users can choose
+# to exclude in cases they're not needed (systems with alternate or no input)
+depend fmri=pkg:/x11/server/xorg/driver/xorg-input-keyboard type=group
+depend fmri=pkg:/x11/server/xorg/driver/xorg-input-mouse type=group
--- a/pkg/manifests/x11-server-xserver-common.p5m	Mon Aug 15 14:36:26 2011 -0700
+++ b/pkg/manifests/x11-server-xserver-common.p5m	Mon Aug 15 14:54:19 2011 -0700
@@ -19,6 +19,12 @@
 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 # DEALINGS IN THE SOFTWARE.
 #
+
+# open-src/xserver/Makefile.inc makes all X server packages depend on
+# xorg-common, so we drop those to avoid silly self-referential dependencies.
+<transform depend fmri=pkg:/x11/server/xserver-common -> drop>
+
+
 set name=pkg.fmri \
     value=pkg:/x11/server/xserver-common@__version:xserver-common__
 set name=pkg.description \
--- a/pkg/manifests/x11-server-xvfb.p5m	Mon Aug 15 14:36:26 2011 -0700
+++ b/pkg/manifests/x11-server-xvfb.p5m	Mon Aug 15 14:54:19 2011 -0700
@@ -31,4 +31,3 @@
 # X servers require xkbcomp & data-xkb for keyboard layouts
 depend fmri=pkg:/x11/keyboard/data-xkb type=require
 depend fmri=pkg:/x11/keyboard/xkbcomp type=require
-depend fmri=pkg:/x11/server/xserver-common type=require
--- a/pkg/manifests/x11-server-xvnc.p5m	Mon Aug 15 14:36:26 2011 -0700
+++ b/pkg/manifests/x11-server-xvnc.p5m	Mon Aug 15 14:54:19 2011 -0700
@@ -51,4 +51,3 @@
 # X servers require xkbcomp & data-xkb for keyboard layouts
 depend fmri=pkg:/x11/keyboard/data-xkb type=require
 depend fmri=pkg:/x11/keyboard/xkbcomp type=require
-depend fmri=pkg:/x11/server/xserver-common type=require
--- a/pkg/manifests/x11-trusted-trusted-xorg.p5m	Mon Aug 15 14:36:26 2011 -0700
+++ b/pkg/manifests/x11-trusted-trusted-xorg.p5m	Mon Aug 15 14:54:19 2011 -0700
@@ -29,5 +29,6 @@
     name="Trusted Extensions, Xorg"
 # Requires Xorg itself of course
 depend fmri=pkg:/x11/server/xorg type=require
-# Requires the TrustedExtensionsPolicy file from xserver-common pkg
-depend fmri=pkg:/x11/server/xserver-common type=require
+# Requires the TrustedExtensionsPolicy file from xserver-common pkg, but
+# that is currently auto-added by open-src/xserver/Makefile.inc rules.
+# depend fmri=pkg:/x11/server/xserver-common type=require
--- a/pkg/transforms/extract_metadata	Mon Aug 15 14:36:26 2011 -0700
+++ b/pkg/transforms/extract_metadata	Mon Aug 15 14:54:19 2011 -0700
@@ -24,19 +24,46 @@
 <transform pkg -> default pkg.obsolete false>
 <transform pkg -> default pkg.renamed false>
 
+#
+# Generate a short package name for use in facet.version-lock
+#
+<transform pkg pkg.fmri=(pkg:/)?([^@]*) -> default pkg.name %<2>>
+
 # 
-# Non-obsolete packages should be included in the consolidation 
+# All packages should be included in the consolidation 
 # incorporation, unless marked otherwise
 #
 <transform pkg -> default org.opensolaris.noincorp false>
 <transform pkg -> default org.opensolaris.incorporation \
     pkg:/consolidation/X/X-incorporation>
-<transform pkg pkg.obsolete=false org.opensolaris.noincorp=false -> print \
-    %(org.opensolaris.incorporation): depend fmri=%{pkg.fmri} type=incorporate>
+
+#
+# Most packages should have a version-lock facet named after the package
+# in order to allow an escape hatch for systems which need a different 
+# version of the package and are willing to accept the risk of using an
+# untested combination.  Renamed packages do not need this facet.
+#
+
+<transform pkg pkg.renamed=true -> \
+    default org.opensolaris.version-lock-facet false>
+<transform pkg -> \
+    default org.opensolaris.version-lock-facet true>
+
+<transform pkg org.opensolaris.noincorp=false \
+    org.opensolaris.version-lock-facet=true -> print \
+    %(org.opensolaris.incorporation): depend fmri=%(pkg.fmri) type=incorporate \
+    facet.version-lock.%(pkg.name)=%(org.opensolaris.version-lock-facet)>
+<transform pkg org.opensolaris.noincorp=false \
+    org.opensolaris.version-lock-facet=false -> print \
+    %(org.opensolaris.incorporation): depend fmri=%(pkg.fmri) type=incorporate>
+
+# Add dependency on the incorporation to each non-obsolete package in it
 <transform pkg pkg.obsolete=false org.opensolaris.noincorp=false -> emit \
     depend fmri=%(org.opensolaris.incorporation) type=require>
+
 <transform set name=org.opensolaris.noincorp -> drop>
 <transform set name=org.opensolaris.incorporation -> drop>
+<transform set name=org.opensolaris.version-lock-facet -> drop>
 
 # 
 # Packages that are neither obsolete nor renamed should be included in