Alexander Pyhalov
2016-06-08 a51da0b91763320f046ff27d586252da8317f833
desktop-cache needs service to update giomodule.cache (upstream fix)
3 files added
1 files modified
7 files renamed
307 ■■■■■ changed files
components/desktop/desktop-cache/Makefile 15 ●●●●● patch | view | raw | blame | history
components/desktop/desktop-cache/desktop-cache.p5m 5 ●●●●● patch | view | raw | blame | history
components/desktop/desktop-cache/files/gio-module-cache.8s 69 ●●●●● patch | view | raw | blame | history
components/desktop/desktop-cache/files/gio-module-cache.sh 108 ●●●●● patch | view | raw | blame | history
components/desktop/desktop-cache/files/gio-module-cache.xml 106 ●●●●● patch | view | raw | blame | history
components/desktop/desktop-cache/patches/desktop-cache-01-python.patch patch | view | raw | blame | history
components/desktop/desktop-cache/patches/desktop-cache-02-gdk.patch patch | view | raw | blame | history
components/desktop/desktop-cache/patches/desktop-cache-03-gconf.patch patch | view | raw | blame | history
components/desktop/desktop-cache/patches/desktop-cache-04-input-method.patch patch | view | raw | blame | history
components/desktop/desktop-cache/patches/desktop-cache-05-gtk3-immodules.patch patch | view | raw | blame | history
transforms/actuators 4 ●●●● patch | view | raw | blame | history
components/desktop/desktop-cache/Makefile
File was renamed from components/desktop-cache/Makefile
@@ -10,14 +10,14 @@
#
#
# Copyright 2014 Alexander Pyhalov.  All rights reserved.
# Copyright 2016 Alexander Pyhalov
#
include ../../make-rules/shared-macros.mk
include ../../../make-rules/shared-macros.mk
COMPONENT_NAME= desktop-cache
COMPONENT_VERSION= 0.2.2
COMPONENT_REVISION= 2
COMPONENT_REVISION= 3
COMPONENT_SUMMARY= desktop-cache is a set of SMF services used to update the various GNOME desktop caches.
COMPONENT_SRC= desktop-cache-smf-services-$(COMPONENT_VERSION)
COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.bz2
@@ -26,9 +26,9 @@
COMPONENT_ARCHIVE_URL= \
  http://dlc.openindiana.org/oi/jds/downloads/sources/$(COMPONENT_ARCHIVE)
include ../../make-rules/prep.mk
include ../../make-rules/configure.mk
include ../../make-rules/ips.mk
include $(WS_MAKE_RULES)/prep.mk
include $(WS_MAKE_RULES)/configure.mk
include $(WS_MAKE_RULES)/ips.mk
CONFIGURE_OPTIONS = --libdir=/lib
CONFIGURE_OPTIONS += --datadir=/usr/share
@@ -39,3 +39,6 @@
install: $(INSTALL_32)
test: $(NO_TESTS)
REQUIRED_PACKAGES += SUNWcs
REQUIRED_PACKAGES += runtime/python-26
components/desktop/desktop-cache/desktop-cache.p5m
File was renamed from components/desktop-cache/desktop-cache.p5m
@@ -20,6 +20,11 @@
license COPYING license='CDDL'
file files/gio-module-cache.xml \
    path=lib/svc/manifest/application/desktop-cache/gio-module-cache.xml
file files/gio-module-cache.sh path=lib/svc/method/gio-module-cache
file files/gio-module-cache.8s path=usr/share/man/man8s/gio-module-cache.8s
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
components/desktop/desktop-cache/files/gio-module-cache.8s
New file
@@ -0,0 +1,69 @@
.\" Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
.\"
.\" 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
.TH gio-module-cache 8S "25 May 2016"
.SH NAME
.PP
svc:/application/desktop-cache/gio-module-cache \- GIO module cache update service
.SH DESCRIPTION
.PP
The
.B svc:/application/desktop-cache/gio-module-cache
transient
.BR smf (7)
service runs
.BR gio-querymodules (1)
to update the giomodule.cache file with information about
the installed GIO extension modules.
.PP
Packages that deliver GIO extension modules should set a
.I restart_fmri
attribute with the value
.B svc:/application/desktop-cache/gio-module-cache
on those module files.
.PP
This service has no configurable properties.
.PP
Administrative actions on this service, such as enabling, disabling, or
requesting restart, can be performed using \fBsvcadm\fR(8). The status of
the service can be queried using the \fBsvcs\fR(1) command.
.SH FILES
.TP 30
.B /usr/lib/gio/modules/
32-bit GIO module directory
.TP 30
.B /usr/lib/64/gio/modules/
64-bit GIO module directory
.TP 30
.B /usr/lib/gio/modules/giomodule.cache
32-bit GIO module cache
.TP 30
.B /usr/lib/64/gio/modules/giomodule.cache
64-bit GIO module cache
.SH SEE ALSO
.PP
.BR gio-querymodules (1),
.BR svcs (1),
.BR libgio-2\&.0 (3lib),
.BR attributes (7),
.BR pkg (7),
.BR smf (7),
.BR svcadm (8)
components/desktop/desktop-cache/files/gio-module-cache.sh
New file
@@ -0,0 +1,108 @@
#! /bin/ksh93
#
# 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.
#
PATH=/usr/bin:/usr/sbin
. /lib/svc/share/smf_include.sh
USAGE="Usage: $0 <method>"
if [[ $# -ne 1 ]] ; then
    print "$USAGE" >&2
    exit 2
fi
METHOD="$1"
case $METHOD in
    start|refresh)
        # Continue with rest of script
        ;;
    -*)
        print "$USAGE" >&2
        exit 2
        ;;
    *)
        print "Invalid method $METHOD" >&2
        exit 2
        ;;
esac
NEED_COMPILE=0
MODULE_DIR_32="/usr/lib/gio/modules"
MODULE_DIR_64="/usr/lib/64/gio/modules"
CACHE_FILE_32="${MODULE_DIR_32}/giomodule.cache"
CACHE_FILE_64="${MODULE_DIR_64}/giomodule.cache"
if [[ ! -r "${CACHE_FILE_32}" ]] ; then
    # Need to create initial file
    NEED_COMPILE=1
elif [[ ! -r "${CACHE_FILE_64}" ]] ; then
    # Need to create initial file
    NEED_COMPILE=1
elif [[ "${MODULE_DIR_32}" -nt "${CACHE_FILE_32}" ]] ; then
    # Directory has been updated - file may have been added or removed
    NEED_COMPILE=1
elif [[ "${MODULE_DIR_64}" -nt "${CACHE_FILE_64}" ]] ; then
    # Directory has been updated - file may have been added or removed
    NEED_COMPILE=1
elif [[ -n "$(find ${MODULE_DIR_32} -newer ${CACHE_FILE_32})" ]] ; then
    # At least one file has been updated
    NEED_COMPILE=1
elif [[ -n "$(find ${MODULE_DIR_64} -newer ${CACHE_FILE_64})" ]] ; then
    # At least one file has been updated
    NEED_COMPILE=1
fi
if [[ "${NEED_COMPILE}" -ne 0 ]] ; then
    umask 022
    /usr/bin/gio-querymodules "${MODULE_DIR_32}"
    result=$?
    if [[ $result -ne 0 ]] ; then
        print "/usr/bin/gio-querymodules failed with exit code $result"
        exit $SMF_EXIT_ERR_FATAL
    fi
    if [[ ! -r "${CACHE_FILE_32}" ]] ; then
        exit $SMF_EXIT_ERR_FATAL
    fi
    # Since gio-querymodules renames the result into place, update
    # the file mtime after moving so it matches the directory mtime.
    touch -c -r "${MODULE_DIR_32}" "${CACHE_FILE_32}"
    /usr/bin/amd64/gio-querymodules "${MODULE_DIR_64}"
    result=$?
    if [[ $result -ne 0 ]] ; then
        print "/usr/bin/amd64/gio-querymodules failed with exit code $result"
        exit $SMF_EXIT_ERR_FATAL
    fi
    if [[ ! -r "${CACHE_FILE_64}" ]] ; then
        exit $SMF_EXIT_ERR_FATAL
    fi
    touch -c -r "${MODULE_DIR_64}" "${CACHE_FILE_64}"
fi
exit $SMF_EXIT_OK
components/desktop/desktop-cache/files/gio-module-cache.xml
New file
@@ -0,0 +1,106 @@
<?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.
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
Service manifest for ensuring GIO module cache files are updated as needed
-->
<service_bundle type='manifest' name='gio-module-cache'>
<service
    name='application/desktop-cache/gio-module-cache'
    type='service'
    version='1'>
    <create_default_instance enabled='true' />
    <single_instance />
    <!-- Need / & /usr filesystems mounted -->
    <dependency
        name='usr'
        type='service'
        grouping='require_all'
        restart_on='none'>
        <service_fmri value='svc:/system/filesystem/minimal' />
    </dependency>
    <dependent
        name='gio-module-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='gio-module-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/gio-module-cache %m'
        timeout_seconds='600'>
    </exec_method>
    <exec_method
        type='method'
        name='refresh'
        exec='/lib/svc/method/gio-module-cache %m'
        timeout_seconds='600'>
    </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='Unstable' />
    <template>
        <common_name>
            <loctext xml:lang='C'>GNOME GIO module cache creation
                </loctext>
        </common_name>
        <documentation>
            <manpage
                title='gio-module-cache'
                section='8s'
                manpath='/usr/share/man' />
        </documentation>
    </template>
</service>
</service_bundle>
components/desktop/desktop-cache/patches/desktop-cache-01-python.patch
components/desktop/desktop-cache/patches/desktop-cache-02-gdk.patch
components/desktop/desktop-cache/patches/desktop-cache-03-gconf.patch
components/desktop/desktop-cache/patches/desktop-cache-04-input-method.patch
components/desktop/desktop-cache/patches/desktop-cache-05-gtk3-immodules.patch
transforms/actuators
@@ -69,6 +69,10 @@
<transform file path=usr/share/glib-2.0/schemas/.* ->  \
    default restart_fmri svc:/application/desktop-cache/gconf-cache:default>
# GNOME GIO modules
<transform file link hardlink path=usr/lib.*/gio/modules/.*\.so$ -> \
    default restart_fmri svc:/application/desktop-cache/gio-module-cache:default>
# RAD
<transform file path=usr/lib/rad/.* -> add restart_fmri \
    svc:/system/rad:local>