Accepting request 431523 from GNOME:Factory
1 OBS-URL: https://build.opensuse.org/request/show/431523 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gnome-control-center?expand=0&rev=149
This commit is contained in:
commit
9e494dbff4
@ -0,0 +1,66 @@
|
||||
From 8da6fa28e1c5e6eab551585ecdbd914b08936d5e Mon Sep 17 00:00:00 2001
|
||||
From: Bastien Nocera <hadess@hadess.net>
|
||||
Date: Fri, 23 Sep 2016 13:36:20 +0200
|
||||
Subject: display: Fix possible crash on startup
|
||||
|
||||
If no items are added to the GVariantBuilder, g_variant_builder_close()
|
||||
would throw a critical, g_variant_builder_end() would throw a
|
||||
segmentation fault.
|
||||
|
||||
As this can only happen when there are no items added to the output_ids
|
||||
hashtable, this should only happen if there are no displays known to
|
||||
libgnome-desktop (and therefore mutter).
|
||||
|
||||
See https://bugzilla.redhat.com/show_bug.cgi?id=1280075
|
||||
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=771875
|
||||
---
|
||||
panels/display/cc-display-panel.c | 14 ++++++++++++--
|
||||
1 file changed, 12 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/panels/display/cc-display-panel.c b/panels/display/cc-display-panel.c
|
||||
index 72720fa..5edec89 100644
|
||||
--- a/panels/display/cc-display-panel.c
|
||||
+++ b/panels/display/cc-display-panel.c
|
||||
@@ -123,12 +123,12 @@ monitor_labeler_show (CcDisplayPanel *self)
|
||||
GnomeRROutput *output;
|
||||
GVariantBuilder builder;
|
||||
gint number;
|
||||
+ gboolean has_outputs;
|
||||
|
||||
if (!priv->shell_proxy)
|
||||
return;
|
||||
|
||||
- g_variant_builder_init (&builder, G_VARIANT_TYPE_TUPLE);
|
||||
- g_variant_builder_open (&builder, G_VARIANT_TYPE_ARRAY);
|
||||
+ has_outputs = FALSE;
|
||||
|
||||
infos = gnome_rr_config_get_outputs (priv->current_configuration);
|
||||
for (info = infos; *info; info++)
|
||||
@@ -137,6 +137,13 @@ monitor_labeler_show (CcDisplayPanel *self)
|
||||
if (number == 0)
|
||||
continue;
|
||||
|
||||
+ if (!has_outputs)
|
||||
+ {
|
||||
+ g_variant_builder_init (&builder, G_VARIANT_TYPE_TUPLE);
|
||||
+ g_variant_builder_open (&builder, G_VARIANT_TYPE_ARRAY);
|
||||
+ has_outputs = TRUE;
|
||||
+ }
|
||||
+
|
||||
output = gnome_rr_screen_get_output_by_name (priv->screen,
|
||||
gnome_rr_output_info_get_name (*info));
|
||||
g_variant_builder_add (&builder, "{uv}",
|
||||
@@ -144,6 +151,9 @@ monitor_labeler_show (CcDisplayPanel *self)
|
||||
g_variant_new_int32 (number));
|
||||
}
|
||||
|
||||
+ if (!has_outputs)
|
||||
+ return;
|
||||
+
|
||||
g_variant_builder_close (&builder);
|
||||
|
||||
g_dbus_proxy_call (priv->shell_proxy,
|
||||
--
|
||||
cgit v0.12
|
||||
|
26
gnome-control-center-printers-fix-compilation-warning.patch
Normal file
26
gnome-control-center-printers-fix-compilation-warning.patch
Normal file
@ -0,0 +1,26 @@
|
||||
From 77750c507615788d46ec66a25368fe4aa4a83966 Mon Sep 17 00:00:00 2001
|
||||
From: Marek Kasik <mkasik@redhat.com>
|
||||
Date: Tue, 20 Sep 2016 12:29:09 +0200
|
||||
Subject: printers: Fix compilation warning
|
||||
|
||||
We need to include cups/ppd.h explicitly due to some modification
|
||||
of structure of CUPS headers
|
||||
---
|
||||
panels/printers/cc-printers-panel.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/panels/printers/cc-printers-panel.c b/panels/printers/cc-printers-panel.c
|
||||
index 4c88223..fb55608 100644
|
||||
--- a/panels/printers/cc-printers-panel.c
|
||||
+++ b/panels/printers/cc-printers-panel.c
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <gdesktop-enums.h>
|
||||
|
||||
#include <cups/cups.h>
|
||||
+#include <cups/ppd.h>
|
||||
|
||||
#include <math.h>
|
||||
|
||||
--
|
||||
cgit v0.12
|
||||
|
@ -1,3 +1,13 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Sep 24 22:30:19 UTC 2016 - zaitor@opensuse.org
|
||||
|
||||
- Add gnome-control-center-printers-fix-compilation-warning.patch:
|
||||
Adapt to changes in cups.
|
||||
- Add
|
||||
gnome-control-center-display-fix-possible-crash-on-startup.patch:
|
||||
Display: Fix possible crash on startup (bgo#771875).
|
||||
- Stop passing V=1 to make, we do debugging locally.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Sep 20 16:06:53 UTC 2016 - dimstar@opensuse.org
|
||||
|
||||
|
@ -50,6 +50,10 @@ Patch18: gnome-control-center-890979-change-remote-passwd.patch
|
||||
Patch20: gnome-control-center-disable-error-message-for-NM.patch
|
||||
# PATCH-FIX-OPENSUSE gnome-control-center-info-never-use-gnome-software.patch bsc#999336 fezhang@suse.com -- info: Never search for gnome-software as an option when checking for updates on SLE and Leap 42.2, because we use gpk-update-viewer.
|
||||
Patch21: gnome-control-center-info-never-use-gnome-software.patch
|
||||
# PATCH-FIX-UPSTREAM gnome-control-center-printers-fix-compilation-warning.patch zaitor@opensuse.org -- Adapt to changes in cups
|
||||
Patch22: gnome-control-center-printers-fix-compilation-warning.patch
|
||||
# PATCH-FIX-UPSTREAM gnome-control-center-display-fix-possible-crash-on-startup.patch bgo#771875 zaitor@opensuse.org -- Display: Fix possible crash on startup
|
||||
Patch23: gnome-control-center-display-fix-possible-crash-on-startup.patch
|
||||
BuildRequires: cups-devel
|
||||
BuildRequires: desktop-file-utils
|
||||
BuildRequires: fdupes
|
||||
@ -82,7 +86,7 @@ BuildRequires: pkgconfig(goa-backend-1.0)
|
||||
BuildRequires: pkgconfig(gobject-introspection-1.0)
|
||||
BuildRequires: pkgconfig(grilo-0.3)
|
||||
BuildRequires: pkgconfig(gsettings-desktop-schemas) >= 3.21.4
|
||||
BuildRequires: pkgconfig(gtk+-3.0) >= 3.21.4
|
||||
BuildRequires: pkgconfig(gtk+-3.0) >= 3.22.0
|
||||
BuildRequires: pkgconfig(gudev-1.0)
|
||||
%if %{with_ibus}
|
||||
BuildRequires: pkgconfig(ibus-1.0) >= 1.5.2
|
||||
@ -215,6 +219,8 @@ translation-update-upstream
|
||||
%if 0%{?suse_version} == 1315
|
||||
%patch21 -p1
|
||||
%endif
|
||||
%patch22 -p1
|
||||
%patch23 -p1
|
||||
|
||||
%build
|
||||
ACLOCAL_FLAGS="-I libgd" NOCONFIGURE=1 gnome-autogen.sh
|
||||
@ -230,7 +236,7 @@ ACLOCAL_FLAGS="-I libgd" NOCONFIGURE=1 gnome-autogen.sh
|
||||
pushd panels/common
|
||||
make gsd-common-enums.h
|
||||
popd
|
||||
make %{?_smp_mflags} V=1
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
%make_install
|
||||
|
Loading…
Reference in New Issue
Block a user