23169122 Move desktop-cache package to Userland
authorAlan Coopersmith <Alan.Coopersmith@Oracle.COM>
Wed, 27 Apr 2016 22:34:47 -0700
changeset 5889 d78a523a8925
parent 5888 09b82e3ff500
child 5890 e3686c085735
23169122 Move desktop-cache package to Userland
components/desktop/desktop-cache/Makefile
components/desktop/desktop-cache/README
components/desktop/desktop-cache/desktop-cache.license
components/desktop/desktop-cache/desktop-cache.p5m
components/desktop/desktop-cache/files/ChangeLog
components/desktop/desktop-cache/files/TODO
components/desktop/desktop-cache/files/desktop-mime-cache
components/desktop/desktop-cache/files/desktop-mime-cache.xml
components/desktop/desktop-cache/files/find_newer
components/desktop/desktop-cache/files/gconf-cache
components/desktop/desktop-cache/files/gconf-cache.xml
components/desktop/desktop-cache/files/icon-cache
components/desktop/desktop-cache/files/icon-cache.xml
components/desktop/desktop-cache/files/input-method-cache
components/desktop/desktop-cache/files/input-method-cache.xml
components/desktop/desktop-cache/files/mime-types-cache
components/desktop/desktop-cache/files/mime-types-cache.xml
components/desktop/desktop-cache/files/pixbuf-loaders-installer
components/desktop/desktop-cache/files/pixbuf-loaders-installer.xml
components/desktop/desktop-cache/files/restart_fmri
components/meta-packages/incorporation-cache
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/desktop-cache/Makefile	Wed Apr 27 22:34:47 2016 -0700
@@ -0,0 +1,48 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+#
+
+BUILD_BITS= NO_ARCH
+include ../../../make-rules/shared-macros.mk
+
+COMPONENT_NAME=         desktop-cache
+COMPONENT_VERSION=      0.2.8
+COMPONENT_SRC=          # all files under files/
+COMPONENT_BUGDB=	gnome/install
+
+# nothing to download or build; just package
+BUILD_STYLE= pkg
+include $(WS_MAKE_RULES)/common.mk
+
+# Make sure SMF manifests are valid
+$(BUILD_DIR)/.validated-smf-manifests-$(MACH): $(BUILD_DIR)
+	@for f in files/*.xml ; do \
+	    (set -ex ; /usr/sbin/svccfg validate "$$f") ; \
+	done
+	$(TOUCH) $@
+
+validate-smf:	$(BUILD_DIR)/.validated-smf-manifests-$(MACH)
+build:		$(BUILD_DIR)/.validated-smf-manifests-$(MACH)
+
+REQUIRED_PACKAGES += system/core-os
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/desktop-cache/README	Wed Apr 27 22:34:47 2016 -0700
@@ -0,0 +1,17 @@
+This package is a collected set of SMF services for building various desktop
+cache/metadata files after install - long term I suspect each service should
+be moved into the package it's building the cache for, but this is how it was
+packaged so far.
+
+Versions 0.2.7 and earlier were maintained as a standalone project in a
+separate source repository on opensolaris.org, including GNU autoconf &
+automake scripts & Makefiles that just installed the SMF manifests & method
+scripts to a proto area for packaging.  After opensolaris.org was shut
+down, further updates were made as patches applied in the desktop spec-files.
+
+Version 0.2.8 drops the configure script & Makefiles, incorporates the
+patches previously applied in the spec-files, and just checks the files
+directly into the Userland gate, allowing the package publication step
+to take care of putting them into the right places.  The ChangeLog from
+the prior versions is provided to retain some history - for more history,
+there is a mirror on github of the former opensolaris.org svn repo.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/desktop-cache/desktop-cache.license	Wed Apr 27 22:34:47 2016 -0700
@@ -0,0 +1,1 @@
+Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/desktop-cache/desktop-cache.p5m	Wed Apr 27 22:34:47 2016 -0700
@@ -0,0 +1,52 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+#
+
+# Look for all files under files directory
+<transform file path=.*/(.*) -> set action.hash files/%<1>>
+#
+set name=pkg.fmri \
+    value=pkg:/service/gnome/desktop-cache@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
+set name=pkg.summary \
+    value="desktop-cache is a set of desktop related SMF services"
+set name=com.oracle.info.description value=desktop-cache
+set name=info.classification value=org.opensolaris.category.2008:System/Services
+set name=org.opensolaris.arc-caseid value=LSARC/2009/273
+set name=org.opensolaris.consolidation value=$(CONSOLIDATION)
+#
+file path=lib/svc/manifest/application/desktop-cache/desktop-mime-cache.xml
+file path=lib/svc/manifest/application/desktop-cache/gconf-cache.xml
+file path=lib/svc/manifest/application/desktop-cache/icon-cache.xml
+file path=lib/svc/manifest/application/desktop-cache/input-method-cache.xml
+file path=lib/svc/manifest/application/desktop-cache/mime-types-cache.xml
+file path=lib/svc/manifest/application/desktop-cache/pixbuf-loaders-installer.xml
+file path=lib/svc/method/desktop-mime-cache
+file path=lib/svc/method/gconf-cache
+file path=lib/svc/method/icon-cache
+file path=lib/svc/method/input-method-cache
+file path=lib/svc/method/mime-types-cache
+file path=lib/svc/method/pixbuf-loaders-installer
+file path=usr/share/desktop-cache/find_newer mode=0555
+file path=usr/share/desktop-cache/restart_fmri mode=0555
+license desktop-cache.license license=Oracle
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/desktop-cache/files/ChangeLog	Wed Apr 27 22:34:47 2016 -0700
@@ -0,0 +1,321 @@
+2015-09-21 Rohini S <[email protected]>
+	* Added patch desktop-cache-03-py27.diff to fix bug 21874338:
+	  21874338 Remove python 2.6 references from gimp, accerciser,
+	             notify-python and desktop-cache
+
+2014-05-07 ssadare <[email protected]>
+	* Added patch desktop-cache-01-pixbuf-loaders-installer-maintenance.diff
+	  to fix bug 15968709:
+	  15968709 pixbuf-loaders-installer:default went into maintenance
+	* Modified patch desktop-cache-01-pixbuf-loaders-installer.diff
+	  to fix bug 18264366:
+	  18264366 ibus-sunpinyin: icons can not be loaded in language-panel
+
+2013-06-05 [email protected]
+	* Added patch desktop-cache-01-pixbuf-loaders-installer.diff
+	  to fix bugs 16429912 & 16482493:
+	  16429912 Icons in Visual Effects tab are missing
+          16482493 'Input Method- IBus' icon missing
+
+2011-08-18 Erwann Chenede - <[email protected]>
+
+	 * configure.in: version 0.2.7
+	 * pixbuf-loaders/pixbuf-loaders-installer,
+	   icon-cache/icon-cache,
+	   mime-types-cache/mime-types-cache,
+	   gconf-cache/gconf-cache,
+	   desktop-mime-cache/desktop-mime-cache,
+	   input-method/input-method-cache: test is directory
+	   is writable. This is needed for Read Only Zone setups (ROZR)
+	   Fixes CR #7075751
+
+2011-07-25  Brian Cameron - <[email protected]>
+
+	* configure.in: version 0.2.6
+	* desktop-mime-cache/desktop-mime-cache: Add the -q (quiet)
+	  argument to calls to update-desktop-database so that warning
+	  messages do not get placed into the SMF logs.   Fixes CR
+	  #7065973.
+
+2011-07-18  Laszlo (Laca) Peter  <[email protected]>
+
+	* configure.in: version 0.2.5
+
+2011-07-18  Laszlo (Laca) Peter  <[email protected]>
+
+	* desktop-mime-cache/desktop-mime-cache.xml,
+	  gconf-cache/gconf-cache.xml, icon-cache/icon-cache.xml,
+	  input-method/input-method-cache.xml,
+	  mime-types-cache/mime-types-cache.xml,
+	  pixbuf-loaders/pixbuf-loaders-installer.xml: move "dependent"
+	  element to after "dependency" elements, fixes 7068018
+
+2011-06-24 Erwann Chenede - <[email protected]>
+
+	* pixbuf-loaders/pixbuf-loaders-installer.xml
+	* icon-cache/icon-cache.xml
+	* mime-types-cache/mime-types-cache.xml
+	* gconf-cache/gconf-cache.xml
+	* desktop-mime-cache/desktop-mime-cache.xml
+	* input-method/input-method-cache.xml:
+	  added dependent close to work in ROZR setup (Read Only Zone)
+	* configure.in: bump to 0.2.4
+
+2011-02-02  Laszlo (Laca) Peter  <[email protected]>
+
+	* COPYING: Oraclify
+	* configure.in: version bump
+	* find_newer: use python 2.6
+	* desktop-mime-cache/desktop-mime-cache.xml,
+	  gconf-cache/gconf-cache.xml, icon-cache/icon-cache.xml,
+	  input-method/input-method-cache.xml,
+	  mime-types-cache/mime-types-cache.xml,
+	  pixbuf-loaders/pixbuf-loaders-installer.xml: depend on
+	  filesystem/minimal instead of filesystem/local.  Apparently
+	  minimal > local.  Otherwise it is possible that the services are
+	  started before the files they use are available.
+
+2009-05-21  Laszlo (Laca) Peter  <[email protected]>
+
+	* configure.in: bump to 0.2.2
+	* restart_fmri: handle the case of offline services that are about
+	  to go online (start method is still running)
+
+2009-04-29  Laszlo (Laca) Peter  <[email protected]>
+
+	* configure.in: bump to 0.2.1
+	* desktop-mime-cache/desktop-mime-cache, gconf-cache/gconf-cache,
+	  icon-cache/icon-cache, input-method/input-method-cache,
+	  mime-types-cache/mime-types-cache,
+	  pixbuf-loaders/pixbuf-loaders-installer: check if the corresponding
+	  executables exist before trying to call them.
+
+2009-04-02  Laszlo (Laca) Peter  <[email protected]>
+
+	* Makefile.am: add find_newer and restart_fmri
+	* configure.in: bump to 0.2.0
+	* desktop-mime-cache/desktop-mime-cache: use find_newer
+	* find_newer: (new) script for finding files based on various
+	  filesystem stat times and names
+	* gconf-cache/gconf-cache: use find_newer
+	* icon-cache/icon-cache: use find_newer
+	* input-method/input-method-cache: use find_newer
+	* mime-types-cache/mime-types-cache: use find_newer
+	* pixbuf-loaders/pixbuf-loaders-installer: use find_newer
+	* restart_fmri: (new) script for starting/restarting smf services
+
+2009-03-13 Erwann Chenede - <[email protected]>
+
+	* */*.xml : integrated stability value patch
+
+2009-03-13 Erwann Chenede - <[email protected]>
+
+	fix for 6617
+
+	* icon-cache/icon-cache.xml : added dependency on pixbuf-loaders
+	* icon-cache/icon-cache : don't stop the service as failue isn't
+	  fatal only an error in the log should be reported.
+	* configure.in : bump version to 0.1.7
+
+2009-02-02  Ghee Teo  <[email protected]>
+
+	Uprev to 0.1.6. Now provide 'refresh' method properly and this is the
+	one to use as svcadm restart <fmri> boiled down to a 'stop' and 'start'
+	calls for these services and is not what is required.
+	* configure.in:
+	* desktop-mime-cache/desktop-mime-cache:
+	* desktop-mime-cache/desktop-mime-cache.xml:
+	* gconf-cache/gconf-cache:
+	* gconf-cache/gconf-cache.xml:
+	* icon-cache/icon-cache:
+	* icon-cache/icon-cache.xml:
+	* input-method/input-method-cache:
+	* input-method/input-method-cache.xml:
+	* mime-types-cache/mime-types-cache:
+	* mime-types-cache/mime-types-cache.xml:
+	* pixbuf-loaders/pixbuf-loaders-installer:
+	* pixbuf-loaders/pixbuf-loaders-installer.xml:
+
+2009-01-28  Ghee Teo  <[email protected]>
+
+	More changes required to fix 2399.
+	Changed refresh option to restart instead to fit into SMF philosophy.
+	bumped version to 0.1.5
+	* configure.in:
+	* desktop-mime-cache/desktop-mime-cache.xml:
+	* gconf-cache/gconf-cache.xml:
+	* icon-cache/icon-cache.xml:
+	* input-method/input-method-cache.xml:
+	* mime-types-cache/mime-types-cache.xml:
+	* pixbuf-loaders/pixbuf-loaders-installer.xml:
+
+2009-01-28  Ghee Teo  <[email protected]>
+
+	Fixes d.o.o 2399 by adding in refresh option.
+	bump version to 0.1.4
+	* configure.in:
+	* desktop-mime-cache/desktop-mime-cache:
+	* gconf-cache/gconf-cache:
+	* icon-cache/icon-cache:
+	* input-method/input-method-cache:
+	* mime-types-cache/mime-types-cache:
+	* pixbuf-loaders/pixbuf-loaders-installer:
+
+2008-11-07 Erwann Chenede - <[email protected]>
+
+       * configure.in: bump to 0.1.3
+
+2008-11-04 Erwann Chenede - <[email protected]>
+
+       * icon-cache/icon-cache: fix for 4058
+
+2008-09-17  Ghee Teo <[email protected]>
+
+	Create new tarball with CDDL COPYING file.
+	* configure.in: bump to 0.1.2
+	* COPYING: CDDL license file.
+
+2008-06-27  Laszlo (Laca) Peter  <[email protected]>
+
+	* configure.in: bump to 0.1.1
+
+2008-06-27 Erwann Chenede - <[email protected]>
+
+	* icon-cache/icon-cache : removed debug statement
+
+2008-06-15 Erwann Chenede - <[email protected]>
+
+	* */all scripts : removed unneeded -print argument
+	(suggested by Peter Tribble)
+
+2008-06-15 Erwann Chenede - <[email protected]>
+
+	* */*.xml : changes dependency from usr to fs-local
+	and added comments. Changed the classification from
+	evolving to Uncommitted (changes suggested by Dave Miner)
+	* */all scripts : removed all SMF_EXIT_MON_DEGRADE
+	to SMF_EXIT_ERR_FATAL
+
+2008-06-15 Erwann Chenede - <[email protected]>
+
+	* desktop-mime-cache/desktop-mime-cache
+	* desktop-mime-cache/desktop-mime-cache.xml
+	* gconf-cache/gconf-cache :
+	  added minor changes suggested by David Bustos
+
+2008-06-11 Erwann Chenede - <[email protected]>
+
+	* SUNWdesktop-cache.copyright
+	* SUNWdesktop-cache.spec : removed as the package
+	  is integrated in the spec-files repo now
+
+2008-06-11  Laszlo (Laca) Peter  <[email protected]>
+
+	* desktop-mime-cache/desktop-mime-cache: delete bogus ``s
+	* gconf-cache/gconf-cache: s/NON_DEGRADE/MON_DEGRADE/
+	* input-method/input-method-cache: delete bogus ``s;
+	  s/NON_DEGRADE/MON_DEGRADE/; use the 64-bit gtk-query-immodules-2.0
+	  against the 64-bit immodules when generating the 64-bit config file
+	* mime-types-cache/mime-types-cache: look for new config files
+	  under /usr/share/mime/packages only; delete bogus ``s;
+	  s/NON_DEGRADE/MON_DEGRADE/
+	* pixbuf-loaders/pixbuf-loaders-installer: s/2.10.0/*/ so it's a bit
+	  more future-proof; delete bogus ``s; use the 64-bit
+	  gdk-pixbuf-query-loaders when generating the 64-bit config file
+
+2008-06-08 Erwann Chenede - <[email protected]>
+
+	* COPYING: CDDL
+
+2008-06-06  Darren Kenny  <[email protected]>
+
+	* gconf-cache/gconf-cache:
+	  Fix a bad merge by me...
+
+2008-06-06  Darren Kenny  <[email protected]>
+
+	* pixbuf-loaders/pixbuf-loaders-installer:
+	  Missed one script when updating exit codes.
+
+2008-06-06  Darren Kenny  <[email protected]>
+
+	* desktop-mime-cache/desktop-mime-cache:
+	* gconf-cache/gconf-cache:
+	* icon-cache/icon-cache:
+	* input-method/input-method-cache:
+	* mime-types-cache/mime-types-cache:
+	  After re-reading the smf_method manpage, I was mistaken about the exit
+	  codes - should be OK for success, and NON_DEGRADE for error here.
+
+2008-06-06  Darren Kenny  <[email protected]>
+
+	* desktop-mime-cache/desktop-mime-cache:
+	* icon-cache/icon-cache:
+	* input-method/input-method-cache:
+	* mime-types-cache/mime-types-cache:
+	* pixbuf-loaders/pixbuf-loaders-installer:
+	  Change exit codes to exit with ERR_FATAL on error, otherwise always
+	  NON_DEGRADE - since all went well.
+
+2008-06-06  Darren Kenny  <[email protected]>
+
+	* desktop-mime-cache/desktop-mime-cache:
+	* gconf-cache/gconf-cache:
+	* icon-cache/icon-cache:
+	* input-method/input-method-cache:
+	* mime-types-cache/mime-types-cache:
+	* pixbuf-loaders/pixbuf-loaders-installer:
+	  Quote "$RESULT" and use -n instead of !-z.
+	  Also moved the exit codes, were exiting non-degrade on a failure,
+	  should be exiting that on success - still missing some exits though.
+
+2008-06-06  Laszlo (Laca) Peter  <[email protected]>
+
+	* gconf-cache/gconf-cache: import schemas and entries separately
+	  as the command is different and other minor changes.
+
+2008-06-05 Erwann Chenede - <[email protected]>
+
+	* pixbuf-loaders/* : initial implementation of pixbuf loaders installer
+	* mime-types-cache/* : initial implementation of mime types cache
+	* desktop-mime-cache/* : initial implementation of desktop file cache
+	* input-method/* : initial implementation of the input method cache
+	* Makefile.am
+	* configure.in : added new directories
+
+2008-06-05 Erwann Chenede - <[email protected]>
+
+	* icon-cache/TODO
+	* gconf-cache/TODO : added TODO list
+	* gconf-cache/* : initial implementation of gconf cache update
+	* Makefile.am : added new directory
+
+2008-06-05  Laszlo (Laca) Peter  <[email protected]>
+
+	* icon-cache/icon-cache: update some messages/typos; set IFS just
+	  to be sure; quote "$RESULT"
+
+2008-06-05  Laszlo (Laca) Peter  <[email protected]>
+
+	* SUNWdesktop-cache.spec: fix %files and delete unnecessary
+	  autotools calls to speed up build
+
+2008-06-04 Erwann Chenede - <[email protected]>
+
+	* icon-cache/icon-cache: don't generate cache if the directory
+	  doesn't contain subdirectory (hence no icons).
+
+2008-06-03  Darren Kenny  <[email protected]>
+
+	* Makefile.am:  Add missing continuation (\) to EXTRA_DIST
+	* icon-cache/Makefile.am: Make icon-cache be SCRIPTS rather than
+	  data, to maintain executable status.
+
+2008-06-03 Erwann Chenede - <[email protected]>
+
+	* icon-cache/icon-cache: added check for missing icon cache
+	* icon-cache/Makefile.am: mixed up method and manifest
+
+2008-06-03 Erwann Chenede - <[email protected]>
+
+	* initial import of the desktop cache update services
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/desktop-cache/files/TODO	Wed Apr 27 22:34:47 2016 -0700
@@ -0,0 +1,18 @@
+desktop-mime-cache:
+
+
+gconf-cache:
+SVR4 package : set SMF properties in post install which describe the schema to merge or use the inode creation time (e.g ls -lct ref_file all_other_files and sort from there)
+
+icon-cache:
+- get the icon directory names for this servicefrom smf properties
+
+input-method:
+Take care of multiple gtk version (2.10.0)
+
+mime-types-cache:
+
+
+pixbuf-loaders:
+Take care of multiple gtk version (2.10.0)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/desktop-cache/files/desktop-mime-cache	Wed Apr 27 22:34:47 2016 -0700
@@ -0,0 +1,136 @@
+#!/bin/ksh -p
+#
+# Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, and/or sell copies of the Software, and to permit persons
+# to whom the Software is furnished to do so, provided that the above
+# copyright notice(s) and this permission notice appear in all copies of
+# the Software and that both the above copyright notice(s) and this
+# permission notice appear in supporting documentation.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
+# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
+# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+# Except as contained in this notice, the name of a copyright holder
+# shall not be used in advertising or otherwise to promote the sale, use
+# or other dealings in this Software without prior written authorization
+# of the copyright holder.
+#
+###########################################################################
+#
+PATH=/usr/bin:/usr/sbin
+
+. /lib/svc/share/smf_include.sh
+
+USAGE="Usage: $0 { start | refresh }"
+FIND_NEWER=/usr/share/desktop-cache/find_newer
+
+if [ $# -ne 1 ] ; then
+    echo $USAGE
+    exit 2
+fi
+
+#
+# IF the mime cache exist then :
+#   get the list of mime type files newer than the cache file
+# ELSE
+#   make list greater than zero to generate a cache
+#
+# generate the cache
+#
+
+MIMEFILE="/usr/share/applications/mimeinfo.cache"
+MIMEDIR="/usr/share/applications"
+
+start_desktop_mime_cache () {
+
+test -w $MIMEDIR || { 
+  echo "$MIMEDIR is not writable, skipping."
+  return
+}
+
+if [ -a $MIMEFILE ]; then
+  RESULT=`${FIND_NEWER} -f -c -m \
+      --newer $MIMEFILE \
+      /usr/share/applications 2>/dev/null`
+else
+  RESULT="no cache found"
+fi
+
+if [ -n "$RESULT" ]; then 
+  test -x /usr/bin/update-desktop-database || {
+    echo "update-desktop-database not installed"
+    return
+  }
+  echo "updating desktop file cache" 
+  /usr/bin/update-desktop-database -q
+  if [ $? -ne 0 ]; then
+    echo "update-mime-database exited with an error while generating the desktop file cache $MIMEFILE"
+    exit $SMF_EXIT_ERR_FATAL
+  else
+    echo "desktop file cache $MIMEFILE generated"
+  fi
+fi
+}
+
+refresh_desktop_mime_cache () {
+
+test -w $MIMEDIR || { 
+  echo "$MIMEDIR is not writable, skipping."
+  return
+}
+
+if [ -a $MIMEFILE ]; then
+  RESULT=`/usr/bin/find /usr/share/applications ! -type d -follow 2>/dev/null`
+else
+  RESULT="no cache found"
+fi
+
+if [ -n "$RESULT" ]; then 
+  test -x /usr/bin/update-desktop-database || {
+    echo "update-desktop-database not installed"
+    return
+  }
+  echo "updating desktop file cache" 
+  /usr/bin/update-desktop-database -q
+  if [ $? -ne 0 ]; then
+    echo "update-mime-database exited with an error while generating the desktop file cache $MIMEFILE"
+    exit $SMF_EXIT_ERR_FATAL
+  else
+    echo "desktop file cache $MIMEFILE generated"
+  fi
+fi
+}
+
+METHOD="$1"
+
+case "$METHOD" in
+    'start')
+	# Continue with rest of script
+	;;
+    'refresh')
+	;;
+    -*)
+	echo $USAGE
+	exit 2
+	;;
+    *)
+	echo "Invalid method $METHOD"
+	exit 2
+	;;
+esac
+
+${METHOD}_desktop_mime_cache
+
+exit $SMF_EXIT_OK
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/desktop-cache/files/desktop-mime-cache.xml	Wed Apr 27 22:34:47 2016 -0700
@@ -0,0 +1,118 @@
+<?xml version="1.0"?>
+<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
+<!--
+    Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
+
+    Permission is hereby granted, free of charge, to any person obtaining a
+    copy of this software and associated documentation files (the
+    "Software"), to deal in the Software without restriction, including
+    without limitation the rights to use, copy, modify, merge, publish,
+    distribute, and/or sell copies of the Software, and to permit persons
+    to whom the Software is furnished to do so, provided that the above
+    copyright notice(s) and this permission notice appear in all copies of
+    the Software and that both the above copyright notice(s) and this
+    permission notice appear in supporting documentation.
+
+    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+    OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+    OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+    HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
+    INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
+    FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+    NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+    WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+    Except as contained in this notice, the name of a copyright holder
+    shall not be used in advertising or otherwise to promote the sale, use
+    or other dealings in this Software without prior written authorization
+    of the copyright holder.
+
+    Service manifest for ensuring GNOME desktop file cache is up to date.
+    see update-desktop-database manpage for details.
+-->
+
+<service_bundle type='manifest' name='SUNWdesktop-cache:desktop-mime-cache'>
+
+<service
+	name='application/desktop-cache/desktop-mime-cache'
+	type='service'
+	version='1'>
+
+	<create_default_instance enabled='true' />
+
+	<single_instance />
+
+	<!-- Need / & /usr filesystems mounted, /var mounted read/write -->
+	<dependency
+		name='usr'
+		type='service'
+		grouping='require_all'
+		restart_on='none'>
+		<service_fmri value='svc:/system/filesystem/minimal' />
+	</dependency>
+
+        <dependent
+                name='desktop_mime_cache-assembly-complete'
+                grouping='optional_all'
+                restart_on='none'>
+                <service_fmri value='svc:/milestone/self-assembly-complete' />
+        </dependent>
+
+	<!-- Need to be run before gdm is started -->
+	<dependent
+         name='desktop-mime-cache_gdm'
+         grouping='optional_all'
+         restart_on='none'>
+            <service_fmri value='svc:/application/graphical-login/gdm' />
+	 </dependent>
+
+	<exec_method
+		type='method'
+		name='start'
+		exec='/lib/svc/method/desktop-mime-cache %m'
+		timeout_seconds='600'>
+		<method_context>
+                        <method_credential user='root' group='root' />
+                </method_context>
+        </exec_method>
+
+	<exec_method
+		type='method'
+		name='refresh'
+		exec='/lib/svc/method/desktop-mime-cache %m'
+		timeout_seconds='600'>
+		<method_context>
+                        <method_credential user='root' group='root' />
+                </method_context>
+        </exec_method>
+
+	<exec_method
+		type='method'
+		name='stop'
+		exec=':true'
+		timeout_seconds='60' />
+
+	<property_group name='startd' type='framework'>
+		<propval name='duration' type='astring'
+			value='transient' />
+	</property_group>
+
+	<stability value='Evolving' />
+
+	<template>
+		<common_name>
+			<loctext xml:lang='C'>GNOME Desktop file Cache Builder
+				</loctext>
+		</common_name>
+
+		<documentation>
+			<manpage
+				title='update-desktop-database'
+				section='1'
+				manpath='/usr/share/man' />
+		</documentation>
+	</template>
+</service>
+
+</service_bundle>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/desktop-cache/files/find_newer	Wed Apr 27 22:34:47 2016 -0700
@@ -0,0 +1,180 @@
+#!/usr/bin/python2.7
+#
+# Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, and/or sell copies of the Software, and to permit persons
+# to whom the Software is furnished to do so, provided that the above
+# copyright notice(s) and this permission notice appear in all copies of
+# the Software and that both the above copyright notice(s) and this
+# permission notice appear in supporting documentation.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
+# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
+# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+# Except as contained in this notice, the name of a copyright holder
+# shall not be used in advertising or otherwise to promote the sale, use
+# or other dealings in this Software without prior written authorization
+# of the copyright holder.
+#
+###########################################################################
+#
+
+
+import os, sys
+import getopt
+import fnmatch, re
+
+class Usage(Exception):
+    def __init__(self, msg=None):
+        if msg:
+            self.msg = "Error: " + str(msg) + "\n\n"
+        else:
+            self.msg = ""
+        self.msg = self.msg + "Usage: find_newer.py [options] dir...\n\n"
+        self.msg = self.msg + "Options:\n"
+	self.msg = self.msg + "   --name glob  find files matching glob\n"
+        self.msg = self.msg + "   --newer ref  find files newer than a reference file"
+        self.msg = self.msg + "   -c           compare ctimes (the time the file status was last changed)\n"
+        self.msg = self.msg + "                This is the default.\n"
+        self.msg = self.msg + "   -m           compare mtimes (the time the file was last modified)\n"
+        self.msg = self.msg + "   -a           compare atimes (the time the file was last accessed)\n"
+        self.msg = self.msg + "   -f           follow symlinks\n"
+        self.msg = self.msg + "\nNote: if more than one of -c -m and -a are specified, find_newer will\n"
+        self.msg = self.msg + "compare the most recent of the given times\n"
+
+
+def get_file_time(stat, type):
+    time = None
+    if "c" in type:
+        time = stat.st_ctime;
+    if "m" in type:
+        if time:
+            if time < stat.st_mtime:
+                time = stat.st_mtime
+        else:
+            time = stat.st_mtime;
+    elif "a" in type:
+        if time:
+            if time < stat.st_atime:
+                time = stat.st_atime
+        else:
+            time = stat.st_atime;
+    return time
+
+dirs_seen = []
+def find_newer_files(dir, comp_time, ref_time, reobj, follow_links):
+    dir = os.path.abspath(dir)
+    if dir in dirs_seen:
+        print >>sys.stderr, "Warning: infinite loop of symlinks"
+        return
+    dirs_seen.append(dir)
+    for root, dirs, files in os.walk(dir):
+        for file in files:
+            try:
+                file = os.path.abspath(os.path.join(root, file))
+                stat = os.stat (file)
+                if ref_time:
+                    if get_file_time (stat, comp_time) > ref_time:
+                        if reobj:
+                            if reobj.match (file):
+                                print file
+                        else:
+                            print file
+                else:
+                    # no reference time, print all files that match the regex
+                    if reobj:
+                        if reobj.match (file):
+                            print file
+                    else:
+                        print file
+            except:
+                pass
+        if follow_links:
+            # descend into subdirectories that are really symlinks
+            for d in dirs:
+                d = os.path.join(root, d)
+                if os.path.islink(d) and os.path.lexists(d):
+                    d = os.path.abspath(os.path.join(root, os.readlink(d)))
+                    find_newer_files(d, comp_time, ref_time, reobj, follow_links)
+    
+
+def main(argv=None):
+    comp_time = []
+    follow_links = False
+    glob = None
+    ref_file = None
+
+    # parse the command line args
+    if argv is None:
+        argv = sys.argv
+    try:
+        try:
+            opts, args = getopt.getopt(argv[1:], "hcmaf", ["help", "newer=", "name="])
+        except getopt.error, msg:
+            raise Usage(msg)
+        for o, a in opts:
+            if o == "-c":
+                comp_time.append("c")
+            elif o == "-m":
+                comp_time.append("m")
+            elif o == "-a":
+                comp_time.append("a")
+            elif o in ("-h", "--help"):
+                raise Usage()
+            elif o in "-f":
+                follow_links = True
+            elif o in "--name":
+                glob = a
+            elif o in "--newer":
+                ref_file = a
+        if len(args) < 1:
+            raise Usage("invalid arguments")
+
+    except Usage, err:
+        print >>sys.stderr, err.msg
+        print >>sys.stderr, "Use --help for usage information"
+        return 2
+
+    # default: compare ctime
+    if not comp_time:
+        comp_time = ["c"]
+
+    # return stat time as floats
+    os.stat_float_times (True)
+
+    if ref_file:
+        try:
+            ref_stat = os.stat(ref_file)
+        except:
+            print >>sys.stderr, "Cannot stat reference file: %s" % ref_file
+            return 1
+        ref_time = get_file_time (ref_stat, comp_time)
+    else:
+        ref_time = None
+
+    for dir in args:
+        if not os.path.isdir(dir):
+            print >>sys.stderr, "Directory not found: %s" % dir
+            return 1
+
+        if glob:
+            regex = fnmatch.translate(glob)
+            reobj = re.compile (regex)
+        else:
+            reobj = None
+
+        find_newer_files(dir, comp_time, ref_time, reobj, follow_links)
+
+if __name__ == "__main__":
+    sys.exit(main())
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/desktop-cache/files/gconf-cache	Wed Apr 27 22:34:47 2016 -0700
@@ -0,0 +1,188 @@
+#!/bin/ksh -p
+#
+# Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, and/or sell copies of the Software, and to permit persons
+# to whom the Software is furnished to do so, provided that the above
+# copyright notice(s) and this permission notice appear in all copies of
+# the Software and that both the above copyright notice(s) and this
+# permission notice appear in supporting documentation.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
+# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
+# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+# Except as contained in this notice, the name of a copyright holder
+# shall not be used in advertising or otherwise to promote the sale, use
+# or other dealings in this Software without prior written authorization
+# of the copyright holder.
+#
+###########################################################################
+#
+
+PATH=/usr/bin:/usr/sbin
+
+. /lib/svc/share/smf_include.sh
+
+USAGE="Usage: $0 { start | refresh }"
+FIND_NEWER=/usr/share/desktop-cache/find_newer
+
+if [ $# -ne 1 ] ; then
+    echo $USAGE
+    exit 2
+fi
+
+#
+# IF the gconf cache exist then :
+#   find schema files newer than the cache 
+# ELSE
+#   get all schema file
+#
+# generate/merge schema files in the gconf cache
+#
+GCONFDIR="/etc/gconf"
+start_gconf_cache ()
+{
+test -w $GCONFDIR || { 
+  echo "$GCONFDIR is not writable, skipping."
+  return
+}
+if [ -a "/etc/gconf/gconf.xml.defaults/%gconf-tree.xml" ]; then
+  SCHEMAS=`${FIND_NEWER} -f -m -c --name '*.schemas' \
+      --newer /etc/gconf/gconf.xml.defaults/%gconf-tree.xml \
+      /etc/gconf/schemas 2>/dev/null`
+  ENTRIES=`${FIND_NEWER} -f -m -c --name '*.entries' \
+      --newer /etc/gconf/gconf.xml.defaults/%gconf-tree.xml \
+      /etc/gconf/schemas 2>/dev/null`
+else
+  SCHEMAS=`/usr/bin/find /etc/gconf/schemas -name '*.schemas' ! -type d`
+  ENTRIES=`/usr/bin/find /etc/gconf/schemas -name '*.entries' ! -type d`
+fi
+
+if [ -n "$SCHEMAS" ]; then 
+  test -x /usr/bin/gconftool-2 || {
+    echo "gconftool-2 not installed"
+    return
+  }
+  echo "Updating GConf cache for the following schemas:"
+  echo "$SCHEMAS" | /bin/sed -e 's/^/    /'
+  # redirect stdout to /dev/null because gconftool is too verbose
+  # errors are printed to stderr
+  GCONF_CONFIG_SOURCE=xml:merged:/etc/gconf/gconf.xml.defaults \
+    /usr/bin/gconftool-2 --makefile-install-rule $SCHEMAS > /dev/null
+  if [ $? -ne 0 ]; then
+    echo "gconftool-2 exited with an error while installing schemas"
+    exit $SMF_EXIT_ERR_FATAL
+  else
+    echo "Schema files merged in the GConf cache"
+  fi
+fi
+
+if [ -n "$ENTRIES" ]; then 
+  test -x /usr/bin/gconftool-2 || {
+    echo "gconftool-2 not installed"
+    return
+  }
+  echo "Updating GConf cache for the following entries:"
+  echo "$ENTRIES" | /bin/sed -e 's/^/    /'
+  # redirect stdout to /dev/null because gconftool is too verbose
+  # errors are printed to stderr
+  /usr/bin/gconftool-2 --direct \
+      --config-source=xml:merged:/etc/gconf/gconf.xml.defaults \
+      --load $ENTRIES > /dev/null
+  if [ $? -ne 0 ]; then
+    echo "gconftool-2 exited with an error while adding entries"
+    exit $SMF_EXIT_ERR_FATAL
+  else
+    echo "Entries merged into the GConf cache"
+  fi
+fi
+}
+
+refresh_gconf_cache ()
+{
+test -w $GCONFDIR || { 
+  echo "$GCONFDIR is not writable, skipping."
+  return
+}
+if [ -a "/etc/gconf/gconf.xml.defaults/%gconf-tree.xml" ]; then
+  SCHEMAS=`/usr/bin/find /etc/gconf/schemas ! -type d -follow \
+    -name '*.schemas' 2>/dev/null`
+  ENTRIES=`/usr/bin/find /etc/gconf/schemas ! -type d -follow \
+    -name '*.entries' 2>/dev/null`
+else
+  SCHEMAS=`/usr/bin/find /etc/gconf/schemas -name '*.schemas' ! -type d`
+  ENTRIES=`/usr/bin/find /etc/gconf/schemas -name '*.entries' ! -type d`
+fi
+
+if [ -n "$SCHEMAS" ]; then 
+  test -x /usr/bin/gconftool-2 || {
+    echo "gconftool-2 not installed"
+    return
+  }
+  echo "Updating GConf cache for the following schemas:"
+  echo "$SCHEMAS" | /bin/sed -e 's/^/    /'
+  # redirect stdout to /dev/null because gconftool is too verbose
+  # errors are printed to stderr
+  GCONF_CONFIG_SOURCE=xml:merged:/etc/gconf/gconf.xml.defaults \
+    /usr/bin/gconftool-2 --makefile-install-rule $SCHEMAS > /dev/null
+  if [ $? -ne 0 ]; then
+    echo "gconftool-2 exited with an error while installing schemas"
+    exit $SMF_EXIT_ERR_FATAL
+  else
+    echo "Schema files merged in the GConf cache"
+  fi
+fi
+
+if [ -n "$ENTRIES" ]; then 
+  test -x /usr/bin/gconftool-2 || {
+    echo "gconftool-2 not installed"
+    return
+  }
+  echo "Updating GConf cache for the following entries:"
+  echo "$ENTRIES" | /bin/sed -e 's/^/    /'
+  # redirect stdout to /dev/null because gconftool is too verbose
+  # errors are printed to stderr
+  /usr/bin/gconftool-2 --direct \
+      --config-source=xml:merged:/etc/gconf/gconf.xml.defaults \
+      --load $ENTRIES > /dev/null
+  if [ $? -ne 0 ]; then
+    echo "gconftool-2 exited with an error while adding entries"
+    exit $SMF_EXIT_ERR_FATAL
+  else
+    echo "Entries merged into the GConf cache"
+  fi
+fi
+}
+
+METHOD=$1
+
+case "$METHOD" in
+    'start')
+	# Continue with rest of script
+	;;
+    'refresh')
+	;;
+    -*)
+	echo $USAGE
+	exit 2
+	;;
+    *)
+	echo "Invalid method $METHOD"
+	exit 2
+	;;
+esac
+
+${METHOD}_gconf_cache
+
+exit $SMF_EXIT_OK
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/desktop-cache/files/gconf-cache.xml	Wed Apr 27 22:34:47 2016 -0700
@@ -0,0 +1,117 @@
+<?xml version="1.0"?>
+<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
+<!--
+    Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
+
+    Permission is hereby granted, free of charge, to any person obtaining a
+    copy of this software and associated documentation files (the
+    "Software"), to deal in the Software without restriction, including
+    without limitation the rights to use, copy, modify, merge, publish,
+    distribute, and/or sell copies of the Software, and to permit persons
+    to whom the Software is furnished to do so, provided that the above
+    copyright notice(s) and this permission notice appear in all copies of
+    the Software and that both the above copyright notice(s) and this
+    permission notice appear in supporting documentation.
+
+    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+    OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+    OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+    HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
+    INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
+    FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+    NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+    WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+    Except as contained in this notice, the name of a copyright holder
+    shall not be used in advertising or otherwise to promote the sale, use
+    or other dealings in this Software without prior written authorization
+    of the copyright holder.
+
+    Service manifest for ensuring GNOME gconf cache is up to date.
+-->
+
+<service_bundle type='manifest' name='SUNWdesktop-cache:gconf-cache'>
+
+<service
+	name='application/desktop-cache/gconf-cache'
+	type='service'
+	version='1'>
+
+	<create_default_instance enabled='true' />
+
+	<single_instance />
+
+	<!-- Need / & /usr filesystems mounted, /var mounted read/write -->
+	<dependency
+		name='usr'
+		type='service'
+		grouping='require_all'
+		restart_on='none'>
+		<service_fmri value='svc:/system/filesystem/minimal' />
+	</dependency>
+ 
+	<dependent
+                name='gconf_cache-assembly-complete'
+                grouping='optional_all'
+                restart_on='none'>
+                <service_fmri value='svc:/milestone/self-assembly-complete' />
+        </dependent>
+
+	<!-- Need to be run before gdm is started -->
+	<dependent
+         name='gconf-cache_gdm'
+         grouping='optional_all'
+         restart_on='none'>
+            <service_fmri value='svc:/application/graphical-login/gdm' />
+	 </dependent>
+
+	<exec_method
+		type='method'
+		name='start'
+		exec='/lib/svc/method/gconf-cache %m'
+		timeout_seconds='600'>
+		<method_context>
+                        <method_credential user='root' group='root' />
+                </method_context>
+        </exec_method>
+
+	<exec_method
+		type='method'
+		name='refresh'
+		exec='/lib/svc/method/gconf-cache %m'
+		timeout_seconds='600'>
+		<method_context>
+                        <method_credential user='root' group='root' />
+                </method_context>
+        </exec_method>
+
+	<exec_method
+		type='method'
+		name='stop'
+		exec=':true'
+		timeout_seconds='60' />
+
+	<property_group name='startd' type='framework'>
+		<propval name='duration' type='astring'
+			value='transient' />
+	</property_group>
+
+	<stability value='Evolving' />
+
+	<template>
+		<common_name>
+			<loctext xml:lang='C'>GNOME Gconf Cache Builder
+				</loctext>
+		</common_name>
+
+		<documentation>
+			<manpage
+				title='gconftool-2'
+				section='1'
+				manpath='/usr/share/man' />
+		</documentation>
+	</template>
+</service>
+
+</service_bundle>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/desktop-cache/files/icon-cache	Wed Apr 27 22:34:47 2016 -0700
@@ -0,0 +1,160 @@
+#!/bin/ksh -p
+#
+# Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, and/or sell copies of the Software, and to permit persons
+# to whom the Software is furnished to do so, provided that the above
+# copyright notice(s) and this permission notice appear in all copies of
+# the Software and that both the above copyright notice(s) and this
+# permission notice appear in supporting documentation.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
+# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
+# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+# Except as contained in this notice, the name of a copyright holder
+# shall not be used in advertising or otherwise to promote the sale, use
+# or other dealings in this Software without prior written authorization
+# of the copyright holder.
+#
+###########################################################################
+#
+
+PATH=/usr/bin:/usr/sbin
+
+. /lib/svc/share/smf_include.sh
+
+USAGE="Usage: $0 { start | refresh }"
+FIND_NEWER=/usr/share/desktop-cache/find_newer
+
+if [ $# -ne 1 ] ; then
+    echo $USAGE
+    exit 2
+fi
+
+#
+# for each icon directory update the icon cache if:
+#  - a index.theme file exist 
+# AND 
+#  - icons in the directory tree are newer than the icon cache
+# OR
+#  - if no cache exist but subdirectories (hence icons) are present
+#
+ICONDIR="/usr/share/icons"
+
+start_icon_cache ()
+{
+test -x /usr/bin/gtk-update-icon-cache || {
+    echo "gtk-update-icon-cache not installed"
+    return
+}
+test -w $ICONDIR || { 
+  echo "$ICONDIR is not writable, skipping."
+  return
+}
+for DIR in /usr/share/icons/*; do
+     if [ -a "$DIR/index.theme" ] ; then
+      if [ -a "$DIR/icon-theme.cache" ] ; then
+	RESULT=`${FIND_NEWER} -f -m -c --newer $DIR/icon-theme.cache $DIR 2>/dev/null`
+      else
+	RESULT=`/usr/bin/find $DIR -type d`
+	if [ ${#RESULT} == ${#DIR} ]; then
+	  echo "$DIR doesn't contain subdirectories.  No icon cache is needed"
+	  RESULT=""
+	else
+	  RESULT="nocache"
+	fi
+      fi
+      if [ -n "$RESULT" ]; then
+	  if [ "$RESULT" == "nocache" ]; then 
+	    echo "No icon cache found in $DIR.  Generating one."
+	  else
+	    echo "Icons newer than the cache found in $DIR.  Updating the cache." 
+	  fi
+	  rm -f $DIR/.icon-theme.cache
+	  /usr/bin/gtk-update-icon-cache $DIR 
+	  if [ $? -ne 0 ]; then
+	    echo "/usr/bin/gtk-update-icon-cache exited with an error while \
+generating the icon cache for $DIR." 
+	  else
+	    echo "Icon cache successfully generated in $DIR"
+	  fi
+      fi
+     fi
+done
+}
+
+refresh_icon_cache ()
+{
+test -x /usr/bin/gtk-update-icon-cache || {
+    echo "gtk-update-icon-cache not installed"
+    return
+}
+test -w $ICONDIR || { 
+  echo "$ICONDIR is not writable, skipping."
+  return
+}
+for DIR in /usr/share/icons/*; do
+     if [ -a "$DIR/index.theme" ] ; then
+      if [ -a "$DIR/icon-theme.cache" ] ; then
+	rm -f $DIR/icon-theme.cache
+	RESULT=`/usr/bin/find $DIR ! -type d -follow 2>/dev/null`
+      else
+	RESULT=`/usr/bin/find $DIR -type d`
+	if [ ${#RESULT} == ${#DIR} ]; then
+	  echo "$DIR doesn't contain subdirectories.  No icon cache is needed"
+	  RESULT=""
+	else
+	  RESULT="nocache"
+	fi
+      fi
+      if [ -n "$RESULT" ]; then
+	  if [ "$RESULT" == "nocache" ]; then 
+	    echo "No icon cache found in $DIR.  Generating one."
+	  else
+	    echo "Icons newer than the cache found in $DIR.  Updating the cache." 
+	  fi
+	  rm -f $DIR/.icon-theme.cache
+	  /usr/bin/gtk-update-icon-cache $DIR 
+	  if [ $? -ne 0 ]; then
+	    echo "/usr/bin/gtk-update-icon-cache exited with an error while \
+generating the icon cache for $DIR." 
+	  else
+	    echo "Icon cache successfully generated in $DIR"
+	  fi
+      fi
+     fi
+done
+}
+
+METHOD=$1
+
+case $METHOD in
+    'start')
+	# Continue with rest of script
+	;;
+    'refresh')
+	;;
+    -*)
+	echo $USAGE
+	exit 2
+	;;
+    *)
+	echo "Invalid method $METHOD"
+	exit 2
+	;;
+esac
+
+${METHOD}_icon_cache
+
+exit $SMF_EXIT_OK
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/desktop-cache/files/icon-cache.xml	Wed Apr 27 22:34:47 2016 -0700
@@ -0,0 +1,127 @@
+<?xml version="1.0"?>
+<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
+<!--
+    Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
+
+    Permission is hereby granted, free of charge, to any person obtaining a
+    copy of this software and associated documentation files (the
+    "Software"), to deal in the Software without restriction, including
+    without limitation the rights to use, copy, modify, merge, publish,
+    distribute, and/or sell copies of the Software, and to permit persons
+    to whom the Software is furnished to do so, provided that the above
+    copyright notice(s) and this permission notice appear in all copies of
+    the Software and that both the above copyright notice(s) and this
+    permission notice appear in supporting documentation.
+
+    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+    OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+    OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+    HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
+    INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
+    FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+    NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+    WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+    Except as contained in this notice, the name of a copyright holder
+    shall not be used in advertising or otherwise to promote the sale, use
+    or other dealings in this Software without prior written authorization
+    of the copyright holder.
+
+    Service manifest for ensuring gtk icon caches are up to date.
+-->
+
+<service_bundle type='manifest' name='SUNWdesktop-cache:icon-cache'>
+
+<service
+	name='application/desktop-cache/icon-cache'
+	type='service'
+	version='1'>
+
+	<create_default_instance enabled='true' />
+
+	<single_instance />
+
+
+	<!-- Need / & /usr filesystems mounted, /var mounted read/write -->
+	<dependency
+		name='usr'
+		type='service'
+		grouping='require_all'
+		restart_on='none'>
+		<service_fmri value='svc:/system/filesystem/minimal' />
+	</dependency>
+
+	<!-- Need pixbuf-loaders installed before running -->
+	<dependency
+		name='pixbuf-loaders'
+		type='service'
+		grouping='require_all'
+		restart_on='none'>
+		<service_fmri value='svc:/application/desktop-cache/pixbuf-loaders-installer' />
+	</dependency>
+
+        <dependent
+                name='icon_cache-assembly-complete'
+                grouping='optional_all'
+                restart_on='none'>
+                <service_fmri value='svc:/milestone/self-assembly-complete' />
+        </dependent>
+
+	<!-- Need to be run before gdm is started -->
+	<dependent
+         name='icon-cache_gdm'
+         grouping='optional_all'
+         restart_on='none'>
+            <service_fmri value='svc:/application/graphical-login/gdm' />
+	 </dependent>
+
+	<exec_method
+		type='method'
+		name='start'
+		exec='/lib/svc/method/icon-cache %m'
+		timeout_seconds='600'>
+		<method_context>
+                        <method_credential user='root' group='root' />
+                </method_context>
+        </exec_method>
+
+	<exec_method
+		type='method'
+		name='refresh'
+		exec='/lib/svc/method/icon-cache %m'
+		timeout_seconds='600'>
+		<method_context>
+                        <method_credential user='root' group='root' />
+                </method_context>
+        </exec_method>
+
+	<exec_method
+		type='method'
+		name='stop'
+		exec=':true'
+		timeout_seconds='60' />
+
+	<property_group name='startd' type='framework'>
+		<propval name='duration' type='astring'
+			value='transient' />
+	</property_group>
+
+	<stability value='Evolving' />
+
+	<template>
+		<common_name>
+			<loctext xml:lang='C'>Gtk Icon Cache Builder
+				</loctext>
+		</common_name>
+
+		<documentation>
+			<manpage
+				title='gtk-update-icon-cache'
+				section='1'
+				manpath='/usr/share/man' />
+		</documentation>
+	</template>
+</service>
+
+</service_bundle>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/desktop-cache/files/input-method-cache	Wed Apr 27 22:34:47 2016 -0700
@@ -0,0 +1,148 @@
+#!/bin/ksh -p
+#
+# Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, and/or sell copies of the Software, and to permit persons
+# to whom the Software is furnished to do so, provided that the above
+# copyright notice(s) and this permission notice appear in all copies of
+# the Software and that both the above copyright notice(s) and this
+# permission notice appear in supporting documentation.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
+# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
+# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+# Except as contained in this notice, the name of a copyright holder
+# shall not be used in advertising or otherwise to promote the sale, use
+# or other dealings in this Software without prior written authorization
+# of the copyright holder.
+#
+###########################################################################
+#
+
+PATH=/usr/bin:/usr/sbin
+
+. /lib/svc/share/smf_include.sh
+
+USAGE="Usage: $0 { start | refresh }"
+FIND_NEWER=/usr/share/desktop-cache/find_newer
+
+if [ $# -ne 1 ] ; then
+    echo $USAGE
+    exit 2
+fi
+
+
+#
+# for each architecture 
+#   if cache file exist 
+#      get the list of modules newer than the cache file
+#   else
+#      make list greater than zero
+#
+#   if list generate cache
+#
+
+ARCH64=`/bin/isainfo -k`
+
+if [[ $ARCH64 != "amd64" ]] && [[ "$ARCH64" != "sparcv9" ]]; then
+  ARCH64=""
+fi
+
+start_input_method_cache ()
+{
+for DIR in "" $ARCH64; do
+  test -x /usr/bin/$DIR/gtk-query-immodules-2.0 || {
+      echo "gtk-query-immodules-2.0 not installed"
+      continue
+  }
+  test -w /etc/$DIR/gtk-2.0 || {
+      echo "/etc/$DIR/gtk-2.0 is not writable, skipping."
+      return
+  }
+  if [ -a "/etc/$DIR/gtk-2.0/gtk.immodules" ]; then
+    RESULT=`${FIND_NEWER} -c -f -m --name '*.so' \
+	--newer /etc/$DIR/gtk-2.0/gtk.immodules \
+	/usr/lib/$DIR/gtk-2.0/*/immodules 2>/dev/null`
+  else
+    RESULT="no cache file"
+  fi
+
+  if [ -n "$RESULT" ]; then 
+    echo "updating/creating im modules cache file"
+    /usr/bin/$DIR/gtk-query-immodules-2.0 /usr/lib/$DIR/gtk-2.0/*/immodules/*.so \
+	> /etc/$DIR/gtk-2.0/gtk.immodules
+    if [ $? -ne 0 ]; then
+      echo "gtk-query-immodules-2.0 exited with an error while generating the cache file /etc/$DIR/gtk-2.0/gtk.immodules"
+      exit $SMF_EXIT_ERR_FATAL
+    else
+      echo "input method cache installed in /etc/$DIR/gtk-2.0/gtk.immodules"
+    fi
+  fi
+done
+}
+
+refresh_input_method_cache ()
+{
+for DIR in "" $ARCH64; do
+  test -x /usr/bin/$DIR/gtk-query-immodules-2.0 || {
+      echo "gtk-query-immodules-2.0 not installed"
+      continue
+  }
+  test -w /etc/$DIR/gtk-2.0 || {
+      echo "/etc/$DIR/gtk-2.0 is not writable, skipping."
+      return
+  }
+  if [ -a "/etc/$DIR/gtk-2.0/gtk.immodules" ]; then
+    RESULT=`/usr/bin/find /usr/lib/$DIR/gtk-2.0/*/immodules/*.so ! -type d \
+	    -follow 2>/dev/null`
+  else
+    RESULT="no cache file"
+  fi
+
+  if [ -n "$RESULT" ]; then 
+    echo "updating/creating im modules cache file"
+    /usr/bin/$DIR/gtk-query-immodules-2.0 /usr/lib/$DIR/gtk-2.0/*/immodules/*.so \
+	> /etc/$DIR/gtk-2.0/gtk.immodules
+    if [ $? -ne 0 ]; then
+      echo "gtk-query-immodules-2.0 exited with an error while generating the cache file /etc/$DIR/gtk-2.0/gtk.immodules"
+      exit $SMF_EXIT_ERR_FATAL
+    else
+      echo "input method cache installed in /etc/$DIR/gtk-2.0/gtk.immodules"
+    fi
+  fi
+done
+}
+
+METHOD=$1
+
+case "$METHOD" in
+    'start')
+	# Continue with rest of script
+	;;
+    'refresh')
+	# Continue with rest of script
+	;;
+    -*)
+	echo $USAGE
+	exit 2
+	;;
+    *)
+	echo "Invalid method $METHOD"
+	exit 2
+	;;
+esac
+
+${METHOD}_input_method_cache
+
+exit $SMF_EXIT_OK
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/desktop-cache/files/input-method-cache.xml	Wed Apr 27 22:34:47 2016 -0700
@@ -0,0 +1,118 @@
+<?xml version="1.0"?>
+<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
+<!--
+    Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
+
+    Permission is hereby granted, free of charge, to any person obtaining a
+    copy of this software and associated documentation files (the
+    "Software"), to deal in the Software without restriction, including
+    without limitation the rights to use, copy, modify, merge, publish,
+    distribute, and/or sell copies of the Software, and to permit persons
+    to whom the Software is furnished to do so, provided that the above
+    copyright notice(s) and this permission notice appear in all copies of
+    the Software and that both the above copyright notice(s) and this
+    permission notice appear in supporting documentation.
+
+    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+    OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+    OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+    HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
+    INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
+    FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+    NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+    WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+    Except as contained in this notice, the name of a copyright holder
+    shall not be used in advertising or otherwise to promote the sale, use
+    or other dealings in this Software without prior written authorization
+    of the copyright holder.
+
+    Service manifest to create input method modules cache used by GTK+
+    default
+-->
+
+<service_bundle type='manifest' name='SUNWdesktop-cache:input-method-cache'>
+
+<service
+	name='application/desktop-cache/input-method-cache'
+	type='service'
+	version='1'>
+
+	<create_default_instance enabled='true' />
+
+	<single_instance />
+
+	<!-- Need / & /usr filesystems mounted, /var mounted read/write -->
+	<dependency
+		name='usr'
+		type='service'
+		grouping='require_all'
+		restart_on='none'>
+		<service_fmri value='svc:/system/filesystem/minimal' />
+	</dependency>
+
+	<dependent
+                name='input_method_cache-assembly-complete'
+                grouping='optional_all'
+                restart_on='none'>
+                <service_fmri value='svc:/milestone/self-assembly-complete' />
+        </dependent>
+
+	<!-- Need to be run before gdm is started -->
+	<dependent
+         name='input-method-cache_gdm'
+         grouping='optional_all'
+         restart_on='none'>
+            <service_fmri value='svc:/application/graphical-login/gdm' />
+	 </dependent>
+
+	<exec_method
+		type='method'
+		name='start'
+		exec='/lib/svc/method/input-method-cache %m'
+		timeout_seconds='600'>
+		<method_context>
+                        <method_credential user='root' group='root' />
+                </method_context>
+        </exec_method>
+
+	<exec_method
+		type='method'
+		name='refresh'
+		exec='/lib/svc/method/input-method-cache %m'
+		timeout_seconds='600'>
+		<method_context>
+                        <method_credential user='root' group='root' />
+                </method_context>
+        </exec_method>
+
+	<exec_method
+		type='method'
+		name='stop'
+		exec=':true'
+		timeout_seconds='60' />
+
+	<property_group name='startd' type='framework'>
+		<propval name='duration' type='astring'
+			value='transient' />
+	</property_group>
+
+	<stability value='Evolving' />
+
+	<template>
+		<common_name>
+			<loctext xml:lang='C'>Gtk input method cache builder 
+				</loctext>
+		</common_name>
+
+		<documentation>
+			<manpage
+				title='gtk-query-immodules-2.0'
+				section='1'
+				manpath='/usr/share/man' />
+		</documentation>
+	</template>
+</service>
+
+</service_bundle>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/desktop-cache/files/mime-types-cache	Wed Apr 27 22:34:47 2016 -0700
@@ -0,0 +1,133 @@
+#!/bin/ksh -p
+#
+# Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, and/or sell copies of the Software, and to permit persons
+# to whom the Software is furnished to do so, provided that the above
+# copyright notice(s) and this permission notice appear in all copies of
+# the Software and that both the above copyright notice(s) and this
+# permission notice appear in supporting documentation.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
+# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
+# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+# Except as contained in this notice, the name of a copyright holder
+# shall not be used in advertising or otherwise to promote the sale, use
+# or other dealings in this Software without prior written authorization
+# of the copyright holder.
+#
+###########################################################################
+#
+PATH=/usr/bin:/usr/sbin
+
+. /lib/svc/share/smf_include.sh
+
+USAGE="Usage: $0 { start | refresh }"
+FIND_NEWER=/usr/share/desktop-cache/find_newer
+
+if [ $# -ne 1 ] ; then
+    echo $USAGE
+    exit 2
+fi
+
+#
+# IF the mime cache exist then :
+#   get the list of mime type files newer than the cache file
+# ELSE
+#   make list greater than zero to generate a cache
+#
+# generate the cache
+#
+MIMEDIR="/usr/share/mime"
+
+start_mime_types_cache ()
+{
+test -w $MIMEDIR || { 
+  echo "$MIMEDIR is not writable, skipping."
+  return
+}
+if [ -a "/usr/share/mime/mime.cache" ]; then
+  RESULT=`${FIND_NEWER} -f -c -m \
+      --newer /usr/share/mime/mime.cache \
+      /usr/share/mime/packages 2>/dev/null`
+else
+  RESULT="no cache found"
+fi
+
+if [ -n "$RESULT" ]; then 
+  test -x /usr/bin/update-mime-database || {
+    echo "update-mime-database not installed"
+    return
+  }
+  echo "updating mime type cache" 
+  /usr/bin/update-mime-database /usr/share/mime
+  if [ $? -ne 0 ]; then
+    echo "update-mime-database exited with an error while generating the mime type cache /usr/share/mime/mime.cache"
+    exit $SMF_EXIT_ERR_FATAL
+  else
+    echo "mime type cache /usr/share/mime/mime.cache generated"
+  fi
+fi
+}
+
+refresh_mime_types_cache ()
+{
+test -w $MIMEDIR || { 
+  echo "$MIMEDIR is not writable, skipping."
+  return
+}
+if [ -a "/usr/share/mime/mime.cache" ]; then
+  RESULT=`/usr/bin/find /usr/share/mime/packages ! -type d -follow 2>/dev/null`
+else
+  RESULT="no cache found"
+fi
+
+if [ -n "$RESULT" ]; then 
+  test -x /usr/bin/update-mime-database || {
+    echo "update-mime-database not installed"
+    return
+  }
+  echo "updating mime type cache" 
+  /usr/bin/update-mime-database /usr/share/mime
+  if [ $? -ne 0 ]; then
+    echo "update-mime-database exited with an error while generating the mime type cache /usr/share/mime/mime.cache"
+    exit $SMF_EXIT_ERR_FATAL
+  else
+    echo "mime type cache /usr/share/mime/mime.cache generated"
+  fi
+fi
+}
+
+METHOD=$1
+
+case "$METHOD" in
+    'start')
+	# Continue with rest of script
+	;;
+    'refresh')
+	# Continue with rest of script
+	;;
+    -*)
+	echo $USAGE
+	exit 2
+	;;
+    *)
+	echo "Invalid method $METHOD"
+	exit 2
+	;;
+esac
+
+${METHOD}_mime_types_cache
+
+exit $SMF_EXIT_OK
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/desktop-cache/files/mime-types-cache.xml	Wed Apr 27 22:34:47 2016 -0700
@@ -0,0 +1,117 @@
+<?xml version="1.0"?>
+<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
+<!--
+    Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
+
+    Permission is hereby granted, free of charge, to any person obtaining a
+    copy of this software and associated documentation files (the
+    "Software"), to deal in the Software without restriction, including
+    without limitation the rights to use, copy, modify, merge, publish,
+    distribute, and/or sell copies of the Software, and to permit persons
+    to whom the Software is furnished to do so, provided that the above
+    copyright notice(s) and this permission notice appear in all copies of
+    the Software and that both the above copyright notice(s) and this
+    permission notice appear in supporting documentation.
+
+    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+    OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+    OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+    HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
+    INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
+    FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+    NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+    WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+    Except as contained in this notice, the name of a copyright holder
+    shall not be used in advertising or otherwise to promote the sale, use
+    or other dealings in this Software without prior written authorization
+    of the copyright holder.
+
+    Service manifest for ensuring GNOME mime-types cache is up to date.
+-->
+
+<service_bundle type='manifest' name='SUNWdesktop-cache:mime-types-cache'>
+
+<service
+	name='application/desktop-cache/mime-types-cache'
+	type='service'
+	version='1'>
+
+	<create_default_instance enabled='true' />
+
+	<single_instance />
+
+	<!-- Need / & /usr filesystems mounted, /var mounted read/write -->
+	<dependency
+		name='usr'
+		type='service'
+		grouping='require_all'
+		restart_on='none'>
+		<service_fmri value='svc:/system/filesystem/minimal' />
+	</dependency>
+
+	<dependent
+                name='mime_types_cache-assembly-complete'
+                grouping='optional_all'
+                restart_on='none'>
+                <service_fmri value='svc:/milestone/self-assembly-complete' />
+        </dependent>
+
+	<!-- Need to be run before gdm is started -->
+	<dependent
+         name='mime-types-cache_gdm'
+         grouping='optional_all'
+         restart_on='none'>
+            <service_fmri value='svc:/application/graphical-login/gdm' />
+	 </dependent>
+
+	<exec_method
+		type='method'
+		name='start'
+		exec='/lib/svc/method/mime-types-cache %m'
+		timeout_seconds='600'>
+		<method_context>
+                        <method_credential user='root' group='root' />
+                </method_context>
+        </exec_method>
+
+	<exec_method
+		type='method'
+		name='refresh'
+		exec='/lib/svc/method/mime-types-cache %m'
+		timeout_seconds='600'>
+		<method_context>
+                        <method_credential user='root' group='root' />
+                </method_context>
+        </exec_method>
+
+	<exec_method
+		type='method'
+		name='stop'
+		exec=':true'
+		timeout_seconds='60' />
+
+	<property_group name='startd' type='framework'>
+		<propval name='duration' type='astring'
+			value='transient' />
+	</property_group>
+
+	<stability value='Evolving' />
+
+	<template>
+		<common_name>
+			<loctext xml:lang='C'>GNOME Mime Types Cache Builder
+				</loctext>
+		</common_name>
+
+		<documentation>
+			<manpage
+				title='update-mime-database'
+				section='1'
+				manpath='/usr/share/man' />
+		</documentation>
+	</template>
+</service>
+
+</service_bundle>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/desktop-cache/files/pixbuf-loaders-installer	Wed Apr 27 22:34:47 2016 -0700
@@ -0,0 +1,206 @@
+#!/bin/ksh -p
+#
+# Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, and/or sell copies of the Software, and to permit persons
+# to whom the Software is furnished to do so, provided that the above
+# copyright notice(s) and this permission notice appear in all copies of
+# the Software and that both the above copyright notice(s) and this
+# permission notice appear in supporting documentation.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
+# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
+# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+# Except as contained in this notice, the name of a copyright holder
+# shall not be used in advertising or otherwise to promote the sale, use
+# or other dealings in this Software without prior written authorization
+# of the copyright holder.
+#
+###########################################################################
+#
+
+PATH=/usr/bin:/usr/sbin
+
+. /lib/svc/share/smf_include.sh
+
+USAGE="Usage: $0 { start | refresh }"
+FIND_NEWER=/usr/share/desktop-cache/find_newer
+
+if [ $# -ne 1 ] ; then
+    echo $USAGE
+    exit 2
+fi
+
+#
+# for each architecture 
+#   if loader file exist 
+#      get the list of modules newer than the loader file
+#   else
+#      make list greater than zero
+#
+#   if list generate loader list     
+#
+
+ARCH64=`/bin/isainfo -k`
+
+if [[ $ARCH64 != "amd64" ]] && [[ "$ARCH64" != "sparcv9" ]]; then
+  ARCH64=""
+fi
+
+start_pixbuf_loaders_installer ()
+{
+for DIR in "" $ARCH64; do
+  test -x /usr/bin/$DIR/gdk-pixbuf-query-loaders || {
+      echo "gdk-pixbuf-query-loaders not installed"
+      continue
+  }
+  test -w /etc/$DIR/gtk-2.0 || {
+      echo "/etc/$DIR/gtk-2.0 is not writable, skipping."
+      return
+  }
+  if [ -a "/etc/$DIR/gtk-2.0/gdk-pixbuf.loaders" ] && [ ! -w "/etc/$DIR/gtk-2.0/gdk-pixbuf.loaders" ]; then
+    echo "/etc/$DIR/gtk-2.0/gdk-pixbuf.loaders is not writable, skipping."
+    return
+  fi
+  if [ -a "/etc/$DIR/gtk-2.0/gdk-pixbuf.loaders" ]; then
+    RESULT=`${FIND_NEWER} -f -c -m --name '*.so' \
+	--newer /etc/$DIR/gtk-2.0/gdk-pixbuf.loaders \
+	/usr/lib/$DIR/gdk-pixbuf-2.0/*/loaders 2>/dev/null`
+  else
+    RESULT="no gdk pixbuf loaders file"
+  fi
+
+  if [ -n "$RESULT" ]; then 
+    echo "updating/creating gdk pixbuf loaders file"
+    /usr/bin/$DIR/gdk-pixbuf-query-loaders > /etc/$DIR/gtk-2.0/gdk-pixbuf.loaders
+    if [ $? -ne 0 ]; then
+      echo "gdk-pixbuf-query-loaders exited with an error while generating the installer file /etc/$DIR/gtk-2.0/gdk-pixbuf.loaders"
+      exit $SMF_EXIT_ERR_FATAL
+    else
+      echo "gdk pixbuf loaders installed in /etc/$DIR/gtk-2.0/gdk-pixbuf.loaders"
+    fi
+  fi
+
+  test -w /usr/lib/$DIR/gdk-pixbuf-2.0/2.10.0 || {
+      echo "/usr/lib/$DIR/gdk-pixbuf-2.0/2.10.0 is not writable, skipping."
+      return
+  }
+  if [ -a "/usr/lib/$DIR/gdk-pixbuf-2.0/2.10.0/loaders.cache" ] && [ ! -w "/usr/lib/$DIR/gdk-pixbuf-2.0/2.10.0/loaders.cache" ]; then
+    echo "/usr/lib/$DIR/gdk-pixbuf-2.0/2.10.0/loaders.cache is not writable, skipping."
+    return
+  fi
+  if [ -a "/usr/lib/$DIR/gdk-pixbuf-2.0/2.10.0/loaders.cache" ]; then
+    RESULT=`${FIND_NEWER} -f -c -m --name '*.so' \
+	--newer /usr/lib/$DIR/gdk-pixbuf-2.0/2.10.0/loaders.cache \
+	/usr/lib/$DIR/gdk-pixbuf-2.0/*/loaders 2>/dev/null`
+  else
+    RESULT="no loaders cache file"
+  fi
+
+  if [ -n "$RESULT" ]; then
+    echo "updating/creating loaders cache file"
+    /usr/bin/$DIR/gdk-pixbuf-query-loaders > /usr/lib/$DIR/gdk-pixbuf-2.0/2.10.0/loaders.cache
+    if [ $? -ne 0 ]; then
+      echo "gdk-pixbuf-query-loaders exited with an error while generating the installer file /usr/lib/$DIR/gdk-pixbuf-2.0/2.10.0/loaders.cache"
+      exit $SMF_EXIT_ERR_FATAL
+    else
+      echo "loaders cache installed in /usr/lib/$DIR/gdk-pixbuf-2.0/2.10.0/loaders.cache"
+    fi
+  fi
+done
+}
+
+refresh_pixbuf_loaders_installer ()
+{
+for DIR in "" $ARCH64; do
+  test -x /usr/bin/$DIR/gdk-pixbuf-query-loaders || {
+      echo "gdk-pixbuf-query-loaders not installed"
+      continue
+  }
+  test -w /etc/$DIR/gtk-2.0 || {
+      echo "/etc/$DIR/gtk-2.0 is not writable, skipping."
+      return
+  }
+  if [ -a "/etc/$DIR/gtk-2.0/gdk-pixbuf.loaders" ] && [ ! -w "/etc/$DIR/gtk-2.0/gdk-pixbuf.loaders" ]; then
+    echo "/etc/$DIR/gtk-2.0/gdk-pixbuf.loaders is not writable, skipping."
+    return
+  fi
+  if [ -a "/etc/$DIR/gtk-2.0/gdk-pixbuf.loaders" ]; then
+    RESULT=`/usr/bin/find /usr/lib/$DIR/gdk-pixbuf-2.0/*/loaders/*.so ! -type d \
+	   -follow -print 2>/dev/null`
+  else
+    RESULT="no gdk pixbuf loaders file"
+  fi
+
+  if [ -n "$RESULT" ]; then 
+    echo "updating/creating gdk pixbuf loaders file"
+    /usr/bin/$DIR/gdk-pixbuf-query-loaders > /etc/$DIR/gtk-2.0/gdk-pixbuf.loaders
+    if [ $? -ne 0 ]; then
+      echo "gdk-pixbuf-query-loaders exited with an error while generating the installer file /etc/$DIR/gtk-2.0/gdk-pixbuf.loaders"
+      exit $SMF_EXIT_ERR_FATAL
+    else
+      echo "gdk pixbuf loaders installed in /etc/$DIR/gtk-2.0/gdk-pixbuf.loaders"
+    fi
+  fi
+
+  test -w /usr/lib/$DIR/gdk-pixbuf-2.0/2.10.0 || {
+      echo "/usr/lib/$DIR/gdk-pixbuf-2.0/2.10.0 is not writable, skipping."
+      return
+  }
+  if [ -a "/usr/lib/$DIR/gdk-pixbuf-2.0/2.10.0/loaders.cache" ] && [ ! -w "/usr/lib/$DIR/gdk-pixbuf-2.0/2.10.0/loaders.cache" ]; then
+    echo "/usr/lib/$DIR/gdk-pixbuf-2.0/2.10.0/loaders.cache is not writable, skipping."
+    return
+  fi
+  if [ -a "/usr/lib/$DIR/gdk-pixbuf-2.0/2.10.0/loaders.cache" ]; then
+    RESULT=`/usr/bin/find /usr/lib/$DIR/gdk-pixbuf-2.0/*/loaders/*.so ! -type d \
+           -follow -print 2>/dev/null`
+  else
+    RESULT="no loaders cache file"
+  fi
+
+  if [ -n "$RESULT" ]; then
+    echo "updating/creating loaders cache file"
+    /usr/bin/$DIR/gdk-pixbuf-query-loaders > /usr/lib/$DIR/gdk-pixbuf-2.0/2.10.0/loaders.cache
+    if [ $? -ne 0 ]; then
+      echo "gdk-pixbuf-query-loaders exited with an error while generating the installer file /usr/lib/$DIR/gdk-pixbuf-2.0/2.10.0/loaders.cache"
+      exit $SMF_EXIT_ERR_FATAL
+    else
+      echo "loaders cache installed in /usr/lib/$DIR/gdk-pixbuf-2.0/2.10.0/loaders.cache"
+    fi
+  fi
+done
+}
+
+METHOD=$1
+
+case "$METHOD" in
+    'start')
+	# Continue with rest of script
+	;;
+    'refresh')
+	# Continue with rest of script
+	;;
+    -*)
+	echo $USAGE
+	exit 2
+	;;
+    *)
+	echo "Invalid method $METHOD"
+	exit 2
+	;;
+esac
+
+${METHOD}_pixbuf_loaders_installer
+
+exit $SMF_EXIT_OK
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/desktop-cache/files/pixbuf-loaders-installer.xml	Wed Apr 27 22:34:47 2016 -0700
@@ -0,0 +1,118 @@
+<?xml version="1.0"?>
+<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
+<!--
+    Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
+
+    Permission is hereby granted, free of charge, to any person obtaining a
+    copy of this software and associated documentation files (the
+    "Software"), to deal in the Software without restriction, including
+    without limitation the rights to use, copy, modify, merge, publish,
+    distribute, and/or sell copies of the Software, and to permit persons
+    to whom the Software is furnished to do so, provided that the above
+    copyright notice(s) and this permission notice appear in all copies of
+    the Software and that both the above copyright notice(s) and this
+    permission notice appear in supporting documentation.
+
+    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+    OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+    OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+    HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
+    INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
+    FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+    NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+    WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+    Except as contained in this notice, the name of a copyright holder
+    shall not be used in advertising or otherwise to promote the sale, use
+    or other dealings in this Software without prior written authorization
+    of the copyright holder.
+
+    Service manifest to install gdk pixbuf-loaders to be used bu GTK+ by 
+    default
+-->
+
+<service_bundle type='manifest' name='SUNWdesktop-cache:pixbuf-loaders-installer'>
+
+<service
+	name='application/desktop-cache/pixbuf-loaders-installer'
+	type='service'
+	version='1'>
+
+	<create_default_instance enabled='true' />
+
+	<single_instance />
+
+	<!-- Need / & /usr filesystems mounted, /var mounted read/write -->
+	<dependency
+		name='usr'
+		type='service'
+		grouping='require_all'
+		restart_on='none'>
+		<service_fmri value='svc:/system/filesystem/minimal' />
+	</dependency>
+
+	<dependent
+                name='pixbuf_loaders_installer-assembly-complete'
+                grouping='optional_all'
+                restart_on='none'>
+                <service_fmri value='svc:/milestone/self-assembly-complete' />
+        </dependent>
+
+	<!-- Need to be run before gdm is started -->
+	<dependent
+         name='pixbuf-loaders-installer_gdm'
+         grouping='optional_all'
+         restart_on='none'>
+            <service_fmri value='svc:/application/graphical-login/gdm' />
+	 </dependent>
+
+	<exec_method
+		type='method'
+		name='start'
+		exec='/lib/svc/method/pixbuf-loaders-installer %m'
+		timeout_seconds='600'>
+		<method_context>
+                        <method_credential user='root' group='root' />
+                </method_context>
+        </exec_method>
+
+	<exec_method
+		type='method'
+		name='refresh'
+		exec='/lib/svc/method/pixbuf-loaders-installer %m'
+		timeout_seconds='600'>
+		<method_context>
+                        <method_credential user='root' group='root' />
+                </method_context>
+        </exec_method>
+
+	<exec_method
+		type='method'
+		name='stop'
+		exec=':true'
+		timeout_seconds='60' />
+
+	<property_group name='startd' type='framework'>
+		<propval name='duration' type='astring'
+			value='transient' />
+	</property_group>
+
+	<stability value='Evolving' />
+
+	<template>
+		<common_name>
+			<loctext xml:lang='C'>Gdk pixbuf loader installer
+				</loctext>
+		</common_name>
+
+		<documentation>
+			<manpage
+				title='gdk-pixbuf-query-loaders'
+				section='1'
+				manpath='/usr/share/man' />
+		</documentation>
+	</template>
+</service>
+
+</service_bundle>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/desktop-cache/files/restart_fmri	Wed Apr 27 22:34:47 2016 -0700
@@ -0,0 +1,147 @@
+#!/bin/ksh
+#
+# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
+# Use is subject to license terms.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, and/or sell copies of the Software, and to permit persons
+# to whom the Software is furnished to do so, provided that the above
+# copyright notice(s) and this permission notice appear in all copies of
+# the Software and that both the above copyright notice(s) and this
+# permission notice appear in supporting documentation.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
+# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
+# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+# Except as contained in this notice, the name of a copyright holder
+# shall not be used in advertising or otherwise to promote the sale, use
+# or other dealings in this Software without prior written authorization
+# of the copyright holder.
+#
+###########################################################################
+#
+
+if [ "$LUBIN" != "" ]; then
+    #
+    # Live Upgrade.
+    #
+    # No need to restart any services, we will do that at system boot
+    #
+    echo "Postinstall actions deferred until the next system boot"
+    exit 0
+elif [ "$PKG_INSTALL_ROOT" != "" -a "$PKG_INSTALL_ROOT" != "/" -a \
+       "x$postrun_alt_root_okay" != xyes ]; then
+    # 
+    # Installation to an alternate root directory
+    #
+    # Not safe to restart the services in the altroot, wait for the next
+    # system boot
+    #
+    echo "Postinstall actions deferred until the next system boot"
+    exit 0
+fi
+
+usage() {
+    echo "Usage: $0 [options] [sevices]"
+    echo
+    echo "Options:"
+    echo
+    echo "  -h, --help   display this usage information"
+    echo "  -n           test mode; print what would be done, but don't do it"
+}
+
+check_svc() {
+    svc_fmri=unknown
+    svc_state=unknown
+    svc_next_state=unknown
+    cmd_out="$(LC_ALL=C /usr/bin/svcs -l "$1" 2>&1)"
+    if [ $? != 0 ]; then
+	svc_exists=0
+	return
+    fi
+    svc_exists=1
+    svc_fmri=$(echo "$cmd_out" | /bin/grep "^fmri " | /bin/awk '{ print $2 }')
+    svc_state=$(echo "$cmd_out" | /bin/grep "^state " | /bin/awk '{ print $2 }')
+    svc_next_state=$(echo "$cmd_out" | /bin/grep "^next_state " | /bin/awk '{ print $2 }')
+}
+
+test_mode=0
+svcs_to_restart=
+svcs_to_enable=
+retval=0
+
+for arg in "${@}"; do
+    if [ "x$arg" == "x-h" -o "x$arg" == "x--help" ]; then
+	usage
+	exit 0
+    fi
+
+    if [ "x$arg" == "x-n" ]; then
+	test_mode=1
+	continue
+    fi
+
+    # sets svc_exists, svc_state, svc_fmri
+    check_svc "$arg"
+
+    if [ $svc_exists == 0 ]; then
+	echo "ERROR: smf service not found: $arg"
+	retval=1
+	continue
+    fi
+
+    if [ "$svc_state" == "online" ]; then
+	svcs_to_restart="$svcs_to_restart $svc_fmri"
+    elif [ "$svc_state" == "offline" -a "$svc_next_state" == "online" ]; then
+        # the service is still running its start method
+        svcs_to_restart="$svcs_to_restart $svc_fmri"
+    elif [ "$svc_state" == "disabled" ]; then
+	svcs_to_enable="$svcs_to_enable $svc_fmri"
+    elif [ "$svc_state" == "maintenance" ]; then
+	echo "ERROR: smf service $svc_fmri is in maintenance mode, try svcadm clear"
+	retval=1
+    else
+	echo "ERROR: smf service $svc_fmri is in $svc_state state."
+	retval=1
+    fi
+done
+
+if [ -n "$svcs_to_restart" ]; then
+    if [ $test_mode == 1 ]; then
+	echo "Restarting services [test mode, not actually restarting them]:"
+    else
+	echo "Restarting services:"
+    fi
+fi
+for fmri in $svcs_to_restart; do
+    echo "    $fmri"
+    if [ $test_mode == 0 ]; then
+	/usr/sbin/svcadm restart $fmri
+    fi
+done
+
+if [ -n "$svcs_to_enable" ]; then
+    if [ $test_mode == 1 ]; then
+	echo "Enabling services [test mode, not actually enabling them]:"
+    else
+	echo "Enabling services:"
+    fi
+fi
+for fmri in $svcs_to_enable; do
+    echo "    $fmri"
+    if [ $test_mode == 0 ]; then
+	/usr/sbin/svcadm enable $fmri
+    fi
+done
+
+return $retval
--- a/components/meta-packages/incorporation-cache	Fri Apr 29 14:55:13 2016 -0700
+++ b/components/meta-packages/incorporation-cache	Wed Apr 27 22:34:47 2016 -0700
@@ -208,7 +208,6 @@
 consolidation/userland/userland-incorporation:library/spell-checking/[email protected]
 consolidation/userland/userland-incorporation:library/xdg/[email protected]
 consolidation/userland/userland-incorporation:release/[email protected]
-consolidation/userland/userland-incorporation:service/gnome/[email protected]
 consolidation/userland/userland-incorporation:service/[email protected]
 consolidation/userland/userland-incorporation:system/display-manager/[email protected]
 consolidation/userland/userland-incorporation:system/display-manager/[email protected]