25534788 Resync gnome/desktop patches with upstream efforts
authorAlan Coopersmith <Alan.Coopersmith@Oracle.COM>
Fri, 10 Feb 2017 10:03:57 -0800
changeset 7661 aff9737ef6ba
parent 7659 dbbf26a1a66d
child 7662 e9ad40e73ba5
25534788 Resync gnome/desktop patches with upstream efforts
components/desktop/brltty/patches/brltty-01-solaris-headers.patch
components/desktop/brltty/patches/brltty-02-memory-leak.patch
components/desktop/brltty/patches/brltty-04-xopen_source.patch
components/desktop/polkit/patches/10-mozjs.patch
components/desktop/polkit/patches/11-mozjs.patch
components/desktop/polkit/patches/12-mozjs.patch
components/desktop/polkit/patches/13-mozjs.patch
components/gnome/gcr/patches/01-mismatch-decl.patch
components/gnome/gjs/patches/01-uint32.patch
components/gnome/glib2/patches/06-ld-nodelete.patch
components/gnome/glib2/patches/07-gvariant-syntax.patch
components/gnome/glib2/patches/08-python34.patch
components/gnome/gnome-shell/patches/02-proc-cmdline.patch
components/gnome/gvfs/patches/01-major-minor.patch
components/gnome/tracker/patches/04-process.patch
--- a/components/desktop/brltty/patches/brltty-01-solaris-headers.patch	Thu Feb 09 23:00:57 2017 -0800
+++ b/components/desktop/brltty/patches/brltty-01-solaris-headers.patch	Fri Feb 10 10:03:57 2017 -0800
@@ -47,7 +47,8 @@
          logMessage(errorLevel, "Cannot set audio info: %s", strerror(errno));
                                                                       ^
 
-Need to submit upstream.
+Accepted upstream for release after 5.4:
+https://github.com/brltty/brltty/pull/84
 
 --- brltty-5.4/Programs/beep_solaris.c
 +++ brltty-5.4/Programs/beep_solaris.c
--- a/components/desktop/brltty/patches/brltty-02-memory-leak.patch	Thu Feb 09 23:00:57 2017 -0800
+++ b/components/desktop/brltty/patches/brltty-02-memory-leak.patch	Fri Feb 10 10:03:57 2017 -0800
@@ -1,6 +1,7 @@
 Patch for Oracle bug 15797932
 
-Submitted upstream as: https://github.com/brltty/brltty/pull/72
+Accepted upstream for release after 5.4:
+https://github.com/brltty/brltty/pull/72
 
 --- brltty-4.2/Drivers/Braille/VisioBraille/vstp_main.c	2010-05-04 20:42:36.000000000 +0800
 +++ brltty-4.2/Drivers/Braille/VisioBraille/vstp_main.c.mod	2012-06-14 00:11:33.561690986 +0800
--- a/components/desktop/brltty/patches/brltty-04-xopen_source.patch	Thu Feb 09 23:00:57 2017 -0800
+++ b/components/desktop/brltty/patches/brltty-04-xopen_source.patch	Fri Feb 10 10:03:57 2017 -0800
@@ -1,37 +1,50 @@
 brltty sets -std=gnu99 which the Solaris headers view as incompatible with
 _XOPEN_SOURCE < 600, since XPG5 and prior standards required C89, not C99.
 
-Need to either relax system header checks (bug 23506995) or submit upstream.
+This could be avoided if we'd relax system header checks (bug 23506995).
+
+Accepted upstream for release after 5.4:
+https://github.com/brltty/brltty/pull/84
 
---- brltty-5.4/configure.ac
-+++ brltty-5.4/configure.ac
-@@ -288,7 +288,7 @@ in
+diff --git a/configure.ac b/configure.ac
+index c28a9da..97c9828 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -287,6 +287,9 @@ in
+    linux*|gnu*|kfreebsd*)
        brltty_prog_cc_sysflags="-D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=2 -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_XOPEN_SOURCE_EXTENDED -D_GNU_SOURCE"
        ;;
++   solaris2.1?) # Solaris 10 & 11 require _XOPEN_SOURCE=600 if using C99
++      brltty_prog_cc_sysflags="-D_XOPEN_SOURCE=600 -D__EXTENSIONS__"
++      ;;
     solaris*)
--      brltty_prog_cc_sysflags="-D_XOPEN_SOURCE=500 -D__EXTENSIONS__"
-+      brltty_prog_cc_sysflags="-D_XOPEN_SOURCE=600 -D__EXTENSIONS__"
+       brltty_prog_cc_sysflags="-D_XOPEN_SOURCE=500 -D__EXTENSIONS__"
        ;;
-    hpux*)
-       brltty_prog_cc_sysflags="-D_XOPEN_SOURCE_EXTENDED -D_HPUX_SOURCE"
---- brltty-5.4/Drivers/Braille/EuroBraille/eutp_brl.c
-+++ brltty-5.4/Drivers/Braille/EuroBraille/eutp_brl.c
-@@ -5,8 +5,6 @@
+diff --git a/Drivers/Braille/EuroBraille/eutp_brl.c b/Drivers/Braille/EuroBraille/eutp_brl.c
+index c9f5b29..69ea68b 100644
+--- a/Drivers/Braille/EuroBraille/eutp_brl.c
++++ b/Drivers/Braille/EuroBraille/eutp_brl.c
+@@ -5,7 +5,9 @@
  ** Login   <[email protected]>
  */
  
--#define _XOPEN_SOURCE 500
--
++#ifndef _XOPEN_SOURCE
+ #define _XOPEN_SOURCE 500
++#endif
+ 
  /* globals */
  unsigned char extensions[] = {'K', 'L', 'B', 'T', 'A'};
- unsigned char positions[] = {3, 7, 16};
---- brltty-5.4/Drivers/Braille/EuroBraille/eutp_transfer.c
-+++ brltty-5.4/Drivers/Braille/EuroBraille/eutp_transfer.c
-@@ -7,7 +7,6 @@
+diff --git a/Drivers/Braille/EuroBraille/eutp_transfer.c b/Drivers/Braille/EuroBraille/eutp_transfer.c
+index c5c0745..266c4f9 100644
+--- a/Drivers/Braille/EuroBraille/eutp_transfer.c
++++ b/Drivers/Braille/EuroBraille/eutp_transfer.c
+@@ -7,7 +7,9 @@
  ** Started on  Sun Mar 20 16:10:06 2005 Olivier BERT
  Last update Fri Jun  1 15:23:17 2007 Olivier BERT
  */
--#define _XOPEN_SOURCE 500
++#ifndef _XOPEN_SOURCE
+ #define _XOPEN_SOURCE 500
++#endif
  #include <sys/types.h>
  #include <dirent.h>
  #include <string.h>
--- a/components/desktop/polkit/patches/10-mozjs.patch	Thu Feb 09 23:00:57 2017 -0800
+++ b/components/desktop/polkit/patches/10-mozjs.patch	Fri Feb 10 10:03:57 2017 -0800
@@ -1,6 +1,9 @@
 This is an upstream patch that moves us to using mozjs in Solaris instead
 of duktape. When we update to a version of polkit that includes this, we
-should be able to delete this set of 4 patches 
+should be able to delete this set of 4 patches
+
+This was committed upstream for a release after 0.113:
+https://cgit.freedesktop.org/polkit/commit/?id=0676f33aa741a87634ffc3b9ef82c7d092c997ec
 
 The JSAPI is now a full C++ interface. Convert the polkit
 to JavaScript interface module to C++ compilation in order to
--- a/components/desktop/polkit/patches/11-mozjs.patch	Thu Feb 09 23:00:57 2017 -0800
+++ b/components/desktop/polkit/patches/11-mozjs.patch	Fri Feb 10 10:03:57 2017 -0800
@@ -2,6 +2,9 @@
 of duktape. When we update to a version of polkit that includes this, we
 should be able to delete this set of 4 patches 
 
+This was committed upstream for a release after 0.113:
+https://cgit.freedesktop.org/polkit/commit/?id=03dafd1fac8154c0a581395f1b7bf29e56a83491
+
 Remove mozjs185 and mozjs17 from autoconf and replace them
 with mozjs24.
 
--- a/components/desktop/polkit/patches/12-mozjs.patch	Thu Feb 09 23:00:57 2017 -0800
+++ b/components/desktop/polkit/patches/12-mozjs.patch	Fri Feb 10 10:03:57 2017 -0800
@@ -1,6 +1,9 @@
 This is an upstream patch that moves us to using mozjs in Solaris instead
 of duktape. When we update to a version of polkit that includes this, we
-should be able to delete this set of 4 patches 
+should be able to delete this set of 4 patches
+
+This was committed upstream for a release after 0.113:
+https://cgit.freedesktop.org/polkit/commit/?id=e845ef53aec8ec502c8edac957929e2d337b2302
 
 C++ needs explicit casts for many pointer type conversions
 For example char * to void * should have a cast. Fix a
--- a/components/desktop/polkit/patches/13-mozjs.patch	Thu Feb 09 23:00:57 2017 -0800
+++ b/components/desktop/polkit/patches/13-mozjs.patch	Fri Feb 10 10:03:57 2017 -0800
@@ -2,6 +2,9 @@
 of duktape. When we update to a version of polkit that includes this, we
 should be able to delete this set of 4 patches 
 
+This was committed upstream for a release after 0.113:
+https://cgit.freedesktop.org/polkit/commit/?id=2d4d117eeadde9b56ac49e82a2d701a6f6e387b5
+
 The autocompartment definition in the previous patches seems to be fine, but
 constructing the autocompartment for the lifetime of the global object is probably
 a better way to handle this.
--- a/components/gnome/gcr/patches/01-mismatch-decl.patch	Thu Feb 09 23:00:57 2017 -0800
+++ b/components/gnome/gcr/patches/01-mismatch-decl.patch	Fri Feb 10 10:03:57 2017 -0800
@@ -1,4 +1,9 @@
-Without this, the compiler complains about a prototype mismatch and the build fails.  Potentially send upstream
+Without this, the compiler complains about a prototype mismatch between the
+*.h prototype and *.c definition of these functions and the build fails.
+
+Submitted upstream: https://bugzilla.gnome.org/show_bug.cgi?id=777282
+Accepted for a release after 3.20.0:
+https://git.gnome.org/browse/gcr/commit/?id=bb05b11bef51ce54d125da4ecee15f1fda8fe66f
 
 --- gcr-3.16.0/gcr/gcr-certificate-chain.h	2015-04-06 11:28:46.000000000 -0700
 +++ gcr-3.16.0/gcr/gcr-certificate-chain.h	2015-05-27 15:23:54.276255958 -0700
--- a/components/gnome/gjs/patches/01-uint32.patch	Thu Feb 09 23:00:57 2017 -0800
+++ b/components/gnome/gjs/patches/01-uint32.patch	Fri Feb 10 10:03:57 2017 -0800
@@ -1,6 +1,8 @@
 Use standard datatype instead of Linux/BSD "bit type".
 
-XXX file upstream bug
+Submitted upstream: https://bugzilla.gnome.org/show_bug.cgi?id=776193
+Accepted upstream for 1.47.4:
+https://git.gnome.org/browse/gjs/commit/?id=38c067d62de927466d95fd8a5dbc3fd57a0ceaf1
 
 --- gjs-1.43.3/gjs/coverage.cpp	2014-12-21 09:37:11.000000000 -0800
 +++ gjs-1.43.3/gjs/coverage.cpp	2015-06-27 19:39:27.290756286 -0700
--- a/components/gnome/glib2/patches/06-ld-nodelete.patch	Thu Feb 09 23:00:57 2017 -0800
+++ b/components/gnome/glib2/patches/06-ld-nodelete.patch	Fri Feb 10 10:03:57 2017 -0800
@@ -1,7 +1,7 @@
 This fixes configure tests that mistakenly omit the -shared flag when
 testing whether -znodelete can be used.
 
-Need to file upstream bug
+Submitted upstream: https://bugzilla.gnome.org/show_bug.cgi?id=776195
 
 --- glib-2.44.0/configure.ac	2015-04-19 19:15:34.588825144 -0700
 +++ glib-2.44.0/configure.ac	2015-04-19 19:18:29.068222772 -0700
--- a/components/gnome/glib2/patches/07-gvariant-syntax.patch	Thu Feb 09 23:00:57 2017 -0800
+++ b/components/gnome/glib2/patches/07-gvariant-syntax.patch	Fri Feb 10 10:03:57 2017 -0800
@@ -1,6 +1,8 @@
 Stray semicolon.
 
-Need to file upstream bug
+Submitted upstream: https://bugzilla.gnome.org/show_bug.cgi?id=776198
+Accepted upstream for release after 2.51.0:
+https://git.gnome.org/browse/glib/commit/?id=9b3cb4470d1d3458dd2ee78ab675123a37fa332a
 
 --- glib-2.44.0/glib/gvariant.c	2015-04-19 18:47:21.907638721 -0700
 +++ glib-2.44.0/glib/gvariant.c	2015-04-19 18:47:36.209115010 -0700
--- a/components/gnome/glib2/patches/08-python34.patch	Thu Feb 09 23:00:57 2017 -0800
+++ b/components/gnome/glib2/patches/08-python34.patch	Fri Feb 10 10:03:57 2017 -0800
@@ -1,6 +1,7 @@
 Python 3.x compatibility patch.
 
-Need to determine if we should file an upstream bug.
+Upstream bug: https://bugzilla.gnome.org/show_bug.cgi?id=696324
+Fixed in glib 2.48
 
 --- glib-2.44.0/glib/gtester-report	2015-04-19 20:30:04.062159597 -0700
 +++ glib-2.44.0/glib/gtester-report	2015-04-19 20:29:10.670933155 -0700
--- a/components/gnome/gnome-shell/patches/02-proc-cmdline.patch	Thu Feb 09 23:00:57 2017 -0800
+++ b/components/gnome/gnome-shell/patches/02-proc-cmdline.patch	Fri Feb 10 10:03:57 2017 -0800
@@ -2,7 +2,9 @@
 support for it via PSARC/2015/207, instead of falling through to no-op case in
 shell_global_reexec_self().
 
-Need to submit upstream.
+Submitted upstream: https://bugzilla.gnome.org/show_bug.cgi?id=776199
+Accepted for 3.24 release cycle:
+https://git.gnome.org/browse/gnome-shell/commit/?id=ddfdfaed785e9ef4291a2bd921009a79191ff760
 
 diff --git a/src/shell-global.c b/src/shell-global.c
 index 6dda352..a698f0e 100644
--- a/components/gnome/gvfs/patches/01-major-minor.patch	Thu Feb 09 23:00:57 2017 -0800
+++ b/components/gnome/gvfs/patches/01-major-minor.patch	Fri Feb 10 10:03:57 2017 -0800
@@ -1,43 +1,68 @@
-From 3be9a4eb3a024f7adf605fe57da1491f7549c3a2 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Sun, 20 Dec 2015 19:33:37 -0800
-Subject: [PATCH] metadata: need to include <sys/mkdev.h> on Solaris for
- major() & minor()
+This is the version upstream committed to replace the patch we submitted.
+Should be included in a release after 1.31.3.
+
+From 3424bef7ef71dc3a8c2c71310671cd6d39e7b3e7 Mon Sep 17 00:00:00 2001
+From: Ondrej Holy <[email protected]>
+Date: Mon, 2 Jan 2017 11:31:35 +0100
+Subject: [PATCH] metadata: Include headers for device number functionality
 
-Signed-off-by: Alan Coopersmith <[email protected]>
+The implicit sys/sysmacros.h (resp. sys/mkdev.h) includes via sys/types.h
+is being deprecated. Use AC_HEADER_MAJOR and include necessary header
+files for major(), minor(), and makedev() functions.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=776213
 ---
- configure.ac        | 2 +-
- metadata/metatree.c | 4 ++++
- 2 files changed, 5 insertions(+), 1 deletion(-)
+ configure.ac           | 1 +
+ metadata/meta-daemon.c | 6 ++++++
+ metadata/metatree.c    | 6 ++++++
+ 3 files changed, 13 insertions(+)
 
 diff --git a/configure.ac b/configure.ac
-index bb358c6..3672b00 100644
+index 6fe62db..c4253b2 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -772,7 +772,7 @@ AC_PATH_PROG([GLIB_GENMARSHAL], [glib-genmarshal])
+@@ -760,6 +760,7 @@ AC_PATH_PROG([GLIB_GENMARSHAL], [glib-genmarshal])
  dnl ==========================================================================
  dnl Look for various fs info getters
  
--AC_CHECK_HEADERS([sys/statfs.h sys/statvfs.h sys/vfs.h sys/mount.h sys/param.h])
-+AC_CHECK_HEADERS([sys/statfs.h sys/statvfs.h sys/vfs.h sys/mount.h sys/param.h sys/mkdev.h])
++AC_HEADER_MAJOR
+ AC_CHECK_HEADERS([sys/statfs.h sys/statvfs.h sys/vfs.h sys/mount.h sys/param.h])
  AC_CHECK_FUNCS(statvfs statfs)
  AC_CHECK_MEMBERS([struct statfs.f_fstypename, struct statfs.f_bavail],,, [#include <sys/types.h>
- #include <sys/stat.h>
+diff --git a/metadata/meta-daemon.c b/metadata/meta-daemon.c
+index 16a7219..17402df 100644
+--- a/metadata/meta-daemon.c
++++ b/metadata/meta-daemon.c
+@@ -36,6 +36,12 @@
+ #include <libudev.h>
+ #endif
+ 
++#if MAJOR_IN_MKDEV
++#include <sys/mkdev.h>
++#elif MAJOR_IN_SYSMACROS
++#include <sys/sysmacros.h>
++#endif
++
+ #define WRITEOUT_TIMEOUT_SECS 60
+ #define WRITEOUT_TIMEOUT_SECS_NFS 15
+ 
 diff --git a/metadata/metatree.c b/metadata/metatree.c
-index 89942cb..b5eeb36 100644
+index 89942cb..0ba9dba 100644
 --- a/metadata/metatree.c
 +++ b/metadata/metatree.c
-@@ -9,6 +9,10 @@
- #include <stdlib.h>
- #include <time.h>
+@@ -18,6 +18,12 @@
+ #include "metadata-dbus.h"
+ #include "gvfsdaemonprotocol.h"
  
-+#if HAVE_SYS_MKDEV_H
-+#include <sys/mkdev.h> /* needed for major() & minor() on Solaris */
++#if MAJOR_IN_MKDEV
++#include <sys/mkdev.h>
++#elif MAJOR_IN_SYSMACROS
++#include <sys/sysmacros.h>
 +#endif
 +
- #include "metatree.h"
- #include "metabuilder.h"
- #include <glib.h>
+ #define MAGIC "\xda\x1ameta"
+ #define MAGIC_LEN 6
+ #define MAJOR_VERSION 1
 -- 
-2.6.1
+2.7.4
 
--- a/components/gnome/tracker/patches/04-process.patch	Thu Feb 09 23:00:57 2017 -0800
+++ b/components/gnome/tracker/patches/04-process.patch	Fri Feb 10 10:03:57 2017 -0800
@@ -1,7 +1,8 @@
 To use psinfo_t structure, Tracker needs to also include procfs.h on
 Solaris.
 
-Need to file upstream bug
+Upstream bug: https://bugzilla.gnome.org/show_bug.cgi?id=761177
+Fixed in 1.8.1
 
 --- tracker-1.4.0/src/tracker/tracker-process.c 2015-01-26 15:58:43.000000000 -0800
 +++ tracker-1.4.0/src/tracker/tracker-process.c     2015-07-08 18:28:17.031064501 -0700