--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/xdg-utils/Makefile Sat Oct 01 21:55:12 2016 -0700
@@ -0,0 +1,45 @@
+#
+# 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= 64
+include ../../../make-rules/shared-macros.mk
+
+COMPONENT_NAME= xdg-utils
+COMPONENT_VERSION= 1.0.2
+COMPONENT_PROJECT_URL= http://portland.freedesktop.org/download/
+COMPONENT_ARCHIVE= $(COMPONENT_SRC).tgz
+COMPONENT_ARCHIVE_HASH= \
+ sha256:21aeb7d16b2529b8d3975118f59eec09953e09f9a68d718159e98c90474b01ac
+COMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)$(COMPONENT_ARCHIVE)
+COMPONENT_BUGDB= gnome/interop
+
+TPNO= 9368
+
+# Tests require a window system to be up and running
+TEST_TARGET = $(SKIP_TEST)
+
+include $(WS_MAKE_RULES)/common.mk
+
+COMPONENT_PRE_CONFIGURE_ACTION = ($(CLONEY) $(SOURCE_DIR) $(@D))
+
+REQUIRED_PACKAGES += shell/bash
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/xdg-utils/patches/0001-xdg-utils-01-bash.patch Sat Oct 01 21:55:12 2016 -0700
@@ -0,0 +1,66 @@
+Existing set of desktop patches
+Not suitable for upstream
+
+diff -r d75a7365fc3b scripts/xdg-desktop-icon
+--- a/scripts/xdg-desktop-icon Sun Sep 30 18:38:14 2007 +0530
++++ b/scripts/xdg-desktop-icon Sun Sep 30 18:39:32 2007 +0530
[email protected]@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/usr/bin/bash
+ #---------------------------------------------
+ # xdg-desktop-icon
+ #
+diff -r d75a7365fc3b scripts/xdg-desktop-menu
+--- a/scripts/xdg-desktop-menu Sun Sep 30 18:38:14 2007 +0530
++++ b/scripts/xdg-desktop-menu Sun Sep 30 18:39:36 2007 +0530
[email protected]@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/usr/bin/bash
+ #---------------------------------------------
+ # xdg-desktop-menu
+ #
+diff -r d75a7365fc3b scripts/xdg-email
+--- a/scripts/xdg-email Sun Sep 30 18:38:14 2007 +0530
++++ b/scripts/xdg-email Sun Sep 30 18:39:39 2007 +0530
[email protected]@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/usr/bin/bash
+ #---------------------------------------------
+ # xdg-email
+ #
+diff -r d75a7365fc3b scripts/xdg-icon-resource
+--- a/scripts/xdg-icon-resource Sun Sep 30 18:38:14 2007 +0530
++++ b/scripts/xdg-icon-resource Sun Sep 30 18:39:41 2007 +0530
[email protected]@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/usr/bin/bash
+ #---------------------------------------------
+ # xdg-icon-resource
+ #
+diff -r d75a7365fc3b scripts/xdg-mime
+--- a/scripts/xdg-mime Sun Sep 30 18:38:14 2007 +0530
++++ b/scripts/xdg-mime Sun Sep 30 18:39:43 2007 +0530
[email protected]@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/usr/bin/bash
+ #---------------------------------------------
+ # xdg-mime
+ #
+diff -r d75a7365fc3b scripts/xdg-open
+--- a/scripts/xdg-open Sun Sep 30 18:38:14 2007 +0530
++++ b/scripts/xdg-open Sun Sep 30 18:39:48 2007 +0530
[email protected]@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/usr/bin/bash
+ #---------------------------------------------
+ # xdg-open
+ #
+diff -r d75a7365fc3b scripts/xdg-screensaver
+--- a/scripts/xdg-screensaver Sun Sep 30 18:38:14 2007 +0530
++++ b/scripts/xdg-screensaver Sun Sep 30 18:39:53 2007 +0530
[email protected]@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/usr/bin/bash
+ #---------------------------------------------
+ # xdg-screensaver
+ #
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/xdg-utils/patches/0003-xdg-utils-03-nawk.patch Sat Oct 01 21:55:12 2016 -0700
@@ -0,0 +1,105 @@
+Existing set of desktop patches
+Not suitable for upstream
+
+diff -up xdg-utils-1.0.2/scripts/xdg-desktop-menu.orig xdg-utils-1.0.2/scripts/xdg-desktop-menu
+--- xdg-utils-1.0.2/scripts/xdg-desktop-menu.orig 2008-02-13 12:19:40.000000000 +0000
++++ xdg-utils-1.0.2/scripts/xdg-desktop-menu 2008-02-13 12:32:47.396025000 +0000
[email protected]@ -641,7 +641,7 @@ update_desktop_database()
+ fixup_mandriva_categories()
+ {
+ DEBUG 1 "fixup_mandriva_categories $1"
+- awk '
++ nawk '
+ BEGIN {
+ xlat["AudioVideo"]="X-Mandrakelinux-Multimedia;X-MandrivaLinux-Multimedia"
+ xlat["Development"]="X-Mandrakelinux-MoreApplications-Development;X-MandrivaLinux-MoreApplications-Development"
[email protected]@ -685,7 +685,7 @@ make_lazy_default()
+ local xdg_default_dirs
+
+ DEBUG 1 "make_lazy_default $1/$2"
+- mimetypes=`awk '
++ mimetypes=`nawk '
+ {
+ if (match($0,/MimeType=/)) {
+ split(substr($0,RSTART+9),mimetypes,";")
[email protected]@ -832,7 +832,7 @@ update_submenu()
+ tmpfile=`mktemp $TMPDIR/tmp.XXXXXXXXXX`
+ orig_desktop_files=
+ if [ -r "$orig_menu_file" ] ; then
+- awk '
++ nawk '
+ # List all files within <Filename> tags
+ BEGIN {
+ RS="<"
[email protected]@ -926,7 +926,7 @@ BEGIN {
+ tmpfile=`mktemp $TMPDIR/tmp.XXXXXXXXXX`
+ for menu_file in $xdg_dir/*; do
+ if grep 'generated and managed by xdg-desktop-menu' $menu_file > /dev/null 2> /dev/null; then
+- awk '
++ nawk '
+ # List all files within <Directory> tags
+ BEGIN {
+ RS="<"
+
+diff -up xdg-utils-1.0.2/scripts/xdg-email.orig xdg-utils-1.0.2/scripts/xdg-email
+--- xdg-utils-1.0.2/scripts/xdg-email.orig 2008-02-13 12:19:40.000000000 +0000
++++ xdg-utils-1.0.2/scripts/xdg-email 2008-02-13 12:32:52.343450000 +0000
[email protected]@ -454,7 +454,7 @@ open_generic()
+
+ url_encode()
+ {
+-result=$(echo "$1" | $utf8 | awk '
++result=$(echo "$1" | $utf8 | nawk '
+ BEGIN {
+ for ( i=1; i<=255; ++i ) ord [ sprintf ("%c", i) "" ] = i + 0
+ e = ""
+
+diff -up xdg-utils-1.0.2/scripts/xdg-mime.orig xdg-utils-1.0.2/scripts/xdg-mime
+--- xdg-utils-1.0.2/scripts/xdg-mime.orig 2008-02-13 12:19:40.000000000 +0000
++++ xdg-utils-1.0.2/scripts/xdg-mime 2008-02-13 12:32:56.308218000 +0000
[email protected]@ -508,7 +508,7 @@ make_default_kde()
+ DEBUG 1 "Updating $default_file"
+ mkdir -p "$HOME/.kde/share/config"
+ [ -f $default_file ] || touch $default_file
+- awk -v application="$1" -v mimetype="$2" '
++ nawk -v application="$1" -v mimetype="$2" '
+ BEGIN {
+ header_start="[" mimetype " - "
+ supress=0
[email protected]@ -894,7 +894,7 @@ mimetypes=
+ if [ -n "$kde_dir" ] ; then
+ DEBUG 2 "KDE3 mimelnk directory found, extracting mimetypes from XML file"
+
+- mimetypes=`awk < "$filename" '
++ mimetypes=`nawk < "$filename" '
+ # Strip XML comments
+ BEGIN {
+ supress=0
[email protected]@ -923,7 +923,7 @@ BEGIN {
+ }
+ while(1)
+ }
+-' | awk '
++' | nawk '
+ # List MIME types listed in <mime-type> tags
+ BEGIN {
+ RS="<"
[email protected]@ -954,7 +954,7 @@ case $action in
+ for x in $mimetypes ; do
+ DEBUG 1 "Installing $kde_dir/$x.desktop (KDE 3.x support)"
+ mkdir -p `dirname $kde_dir/$x.desktop`
+- awk < "$filename" '
++ nawk < "$filename" '
+ # Strip XML comments
+ BEGIN {
+ supress=0
[email protected]@ -983,7 +983,7 @@ BEGIN {
+ }
+ while(1)
+ }
+-' | awk > $kde_dir/$x.desktop '
++' | nawk > $kde_dir/$x.desktop '
+ # Extract mimetype $x from the XML file $filename
+ # Note that bash requires us to escape a single quote as '"'"'
+ BEGIN {
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/xdg-utils/patches/0005-xdg-utils-05-CVE-2008-0386.patch Sat Oct 01 21:55:12 2016 -0700
@@ -0,0 +1,30 @@
+Existing set of desktop patches
+When we update to a version from upstream that has this fix, this
+can be dropped
+
+--- xdg-utils-1.0.2/scripts/xdg-email.orig 2013-09-16 16:47:36.187915000 +0530
++++ xdg-utils-1.0.2/scripts/xdg-email 2013-09-16 16:49:52.658651000 +0530
[email protected]@ -438,8 +438,8 @@ open_generic()
+ for browser in $BROWSER; do
+ if [ x"$browser" != x"" ]; then
+
+- browser_with_arg=`echo "$browser" | sed s#%s#"$1"#`
+-
++ IFS=' '
++ browser_with_arg=${browser//'%s'/"$1"}
+ if [ x"$browser_with_arg" = x"$browser" ]; then "$browser" "$1";
+ else $browser_with_arg;
+ fi
+--- xdg-utils-1.0.2/scripts/xdg-open.orig 2013-09-16 16:50:17.667487000 +0530
++++ xdg-utils-1.0.2/scripts/xdg-open 2013-09-16 16:51:03.313433000 +0530
[email protected]@ -367,8 +367,8 @@ open_generic()
+ for browser in $BROWSER; do
+ if [ x"$browser" != x"" ]; then
+
+- browser_with_arg=`echo "$browser" | sed s#%s#"$1"#`
+-
++ IFS=' '
++ browser_with_arg=${browser//'%s'/"$1"}
+ if [ x"$browser_with_arg" = x"$browser" ]; then "$browser" "$1";
+ else $browser_with_arg;
+ fi
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/xdg-utils/xdg-utils.license Sat Oct 01 21:55:12 2016 -0700
@@ -0,0 +1,18 @@
+Open Source Initiative OSI - The MIT License:Licensing
+The MIT License
+Copyright (c) <year> <copyright holders>
+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, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+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. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/xdg-utils/xdg-utils.p5m Sat Oct 01 21:55:12 2016 -0700
@@ -0,0 +1,53 @@
+#
+# 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.
+#
+<transform file path=usr.*/man/.+ -> \
+ default mangler.man.stability "pass-through volatile">
+set name=pkg.fmri \
+ value=pkg:/desktop/xdg/[email protected]$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
+set name=pkg.summary value="The Portland Project's desktop integration tools"
+set name=com.oracle.info.description \
+ value="The Portland Project's desktop integration tools"
+set name=com.oracle.info.tpno value=$(TPNO)
+set name=info.classification \
+ value="org.opensolaris.category.2008:Applications/System Utilities"
+set name=info.source-url value=$(COMPONENT_ARCHIVE_URL)
+set name=info.upstream-url value=$(COMPONENT_PROJECT_URL)
+set name=org.opensolaris.arc-caseid value=PSARC/2010/143
+set name=org.opensolaris.consolidation value=$(CONSOLIDATION)
+file path=usr/bin/xdg-desktop-icon
+file path=usr/bin/xdg-desktop-menu
+file path=usr/bin/xdg-email
+file path=usr/bin/xdg-icon-resource
+file path=usr/bin/xdg-mime
+file path=usr/bin/xdg-open
+file path=usr/bin/xdg-screensaver
+file path=usr/share/man/man1/xdg-desktop-icon.1
+file path=usr/share/man/man1/xdg-desktop-menu.1
+file path=usr/share/man/man1/xdg-email.1
+file path=usr/share/man/man1/xdg-icon-resource.1
+file path=usr/share/man/man1/xdg-mime.1
+file path=usr/share/man/man1/xdg-open.1
+file path=usr/share/man/man1/xdg-screensaver.1
+license xdg-utils.license license=MIT