Accepting request 91378 from home:dimstar:GNOME:Next
Resubmit, part of the patch resurrected OBS-URL: https://build.opensuse.org/request/show/91378 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-session?expand=0&rev=136
This commit is contained in:
parent
884f0cba53
commit
cbeb7991de
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:cd333238585c28b01373f1630523277a640675f2374e3694e07de28092ac4772
|
|
||||||
size 822857
|
|
3
gnome-session-3.3.1.tar.bz2
Normal file
3
gnome-session-3.3.1.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:adbaf8fd4b9da8c9ff50aabe6502c25b2069e70fbeafb0e2dcaba6ce24a49a48
|
||||||
|
size 824493
|
@ -4,240 +4,6 @@ Date: Wed, 19 Oct 2011 14:27:25 +0200
|
|||||||
Subject: [PATCH 1/2] tools: Use whitelist/blacklist regexps when evaluating
|
Subject: [PATCH 1/2] tools: Use whitelist/blacklist regexps when evaluating
|
||||||
renderer
|
renderer
|
||||||
|
|
||||||
The regexps are in a file that we also ship.
|
|
||||||
|
|
||||||
https://bugzilla.gnome.org/show_bug.cgi?id=644325
|
|
||||||
---
|
|
||||||
data/Makefile.am | 5 +-
|
|
||||||
data/hardware-compatibility | 20 +++++
|
|
||||||
tools/Makefile.am | 3 +-
|
|
||||||
tools/gnome-session-check-accelerated-helper.c | 95 ++++++++++++++++++++++--
|
|
||||||
4 files changed, 115 insertions(+), 8 deletions(-)
|
|
||||||
create mode 100644 data/hardware-compatibility
|
|
||||||
|
|
||||||
diff --git a/data/Makefile.am b/data/Makefile.am
|
|
||||||
index cdd3201..6f0fb33 100644
|
|
||||||
--- a/data/Makefile.am
|
|
||||||
+++ b/data/Makefile.am
|
|
||||||
@@ -5,6 +5,9 @@ ui_DATA = \
|
|
||||||
session-properties.ui \
|
|
||||||
gsm-inhibit-dialog.ui
|
|
||||||
|
|
||||||
+hwcompatdir = $(pkgdatadir)
|
|
||||||
+hwcompat_DATA = hardware-compatibility
|
|
||||||
+
|
|
||||||
xsessiondir = $(datadir)/xsessions
|
|
||||||
xsession_in_files = gnome.desktop.in
|
|
||||||
xsession_DATA = $(xsession_in_files:.desktop.in=.desktop)
|
|
||||||
@@ -39,7 +42,7 @@ EXTRA_DIST = \
|
|
||||||
$(session_in_in_files) \
|
|
||||||
$(gsettings_SCHEMAS:.xml=.xml.in) \
|
|
||||||
$(ui_DATA) \
|
|
||||||
- $(pixmap_DATA_dist)
|
|
||||||
+ $(hwcompat_DATA)
|
|
||||||
|
|
||||||
CLEANFILES = \
|
|
||||||
$(gsettings_SCHEMAS) \
|
|
||||||
diff --git a/data/hardware-compatibility b/data/hardware-compatibility
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..b311898
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/data/hardware-compatibility
|
|
||||||
@@ -0,0 +1,20 @@
|
|
||||||
+##
|
|
||||||
+## This file contains a list of blacklist/whitelist regular expressions for
|
|
||||||
+## renderer strings.
|
|
||||||
+##
|
|
||||||
+## The regular expressions are case-insensitive POSIX Extended Regular
|
|
||||||
+## Expressions. See regex(7) for details.
|
|
||||||
+##
|
|
||||||
+## Syntax:
|
|
||||||
+## - Comment lines start with '#'
|
|
||||||
+## - Lines starting with '+' are whitelisting.
|
|
||||||
+## - Lines starting with '-' are blacklisting.
|
|
||||||
+## - Lines not starting with '#', '+', '-' are ignored.
|
|
||||||
+##
|
|
||||||
+
|
|
||||||
+# Old Mesa software GL renderer
|
|
||||||
+-software rasterizer
|
|
||||||
+
|
|
||||||
+# Gallium has softpipe and llvmpipe
|
|
||||||
+-softpipe
|
|
||||||
+-llvmpipe
|
|
||||||
diff --git a/tools/Makefile.am b/tools/Makefile.am
|
|
||||||
index aaf1ca1..dc85836 100644
|
|
||||||
--- a/tools/Makefile.am
|
|
||||||
+++ b/tools/Makefile.am
|
|
||||||
@@ -26,7 +26,8 @@ gnome_session_quit_LDADD = \
|
|
||||||
gnome_session_check_accelerated_helper_SOURCES = \
|
|
||||||
gnome-session-check-accelerated-helper.c
|
|
||||||
|
|
||||||
-gnome_session_check_accelerated_helper_CPPFLAGS = \
|
|
||||||
+gnome_session_check_accelerated_helper_CPPFLAGS = \
|
|
||||||
+ -DPKGDATADIR=\""$(pkgdatadir)"\" \
|
|
||||||
$(GL_TEST_CFLAGS)
|
|
||||||
|
|
||||||
gnome_session_check_accelerated_helper_LDADD = \
|
|
||||||
diff --git a/tools/gnome-session-check-accelerated-helper.c b/tools/gnome-session-check-accelerated-helper.c
|
|
||||||
index c1b49e2..c0fa1e5 100644
|
|
||||||
--- a/tools/gnome-session-check-accelerated-helper.c
|
|
||||||
+++ b/tools/gnome-session-check-accelerated-helper.c
|
|
||||||
@@ -75,6 +75,8 @@
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
+#include <regex.h>
|
|
||||||
+
|
|
||||||
#include <X11/Xlib.h>
|
|
||||||
#include <X11/extensions/Xcomposite.h>
|
|
||||||
#include <GL/gl.h>
|
|
||||||
@@ -148,6 +150,92 @@ _has_composite (Display *display)
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
|
||||||
+_is_comment (const char *line)
|
|
||||||
+{
|
|
||||||
+ while (*line && isspace(*line))
|
|
||||||
+ line++;
|
|
||||||
+
|
|
||||||
+ if (*line == '#' || *line == '\0')
|
|
||||||
+ return 0;
|
|
||||||
+ else
|
|
||||||
+ return 1;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static int
|
|
||||||
+_is_gl_renderer_blacklisted (const char *renderer)
|
|
||||||
+{
|
|
||||||
+ FILE *blacklist;
|
|
||||||
+ char *line = NULL;
|
|
||||||
+ size_t line_len = 0;
|
|
||||||
+ int ret = 1;
|
|
||||||
+
|
|
||||||
+ blacklist = fopen(PKGDATADIR "/hardware-compatibility", "r");
|
|
||||||
+ if (blacklist == NULL)
|
|
||||||
+ goto out;
|
|
||||||
+
|
|
||||||
+ while (getline (&line, &line_len, blacklist) != -1) {
|
|
||||||
+ int whitelist = 0;
|
|
||||||
+ const char *re_str;
|
|
||||||
+ regex_t re;
|
|
||||||
+ int status;
|
|
||||||
+
|
|
||||||
+ if (line == NULL)
|
|
||||||
+ break;
|
|
||||||
+
|
|
||||||
+ /* Drop trailing \n */
|
|
||||||
+ line[strlen(line) - 1] = '\0';
|
|
||||||
+
|
|
||||||
+ if (_is_comment (line) == 0) {
|
|
||||||
+ free (line);
|
|
||||||
+ line = NULL;
|
|
||||||
+ continue;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ if (line[0] == '+')
|
|
||||||
+ whitelist = 1;
|
|
||||||
+ else if (line[0] == '-')
|
|
||||||
+ whitelist = 0;
|
|
||||||
+ else {
|
|
||||||
+ _print_error ("Invalid syntax in this line for hardware compatibility:");
|
|
||||||
+ _print_error (line);
|
|
||||||
+ free (line);
|
|
||||||
+ line = NULL;
|
|
||||||
+ continue;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ re_str = line + 1;
|
|
||||||
+
|
|
||||||
+ if (regcomp (&re, re_str, REG_EXTENDED|REG_ICASE|REG_NOSUB) != 0) {
|
|
||||||
+ _print_error ("Cannot use this regular expression for hardware compatibility:");
|
|
||||||
+ _print_error (re_str);
|
|
||||||
+ } else {
|
|
||||||
+ status = regexec (&re, renderer, 0, NULL, 0);
|
|
||||||
+ regfree(&re);
|
|
||||||
+
|
|
||||||
+ if (status == 0) {
|
|
||||||
+ if (whitelist)
|
|
||||||
+ ret = 0;
|
|
||||||
+ goto out;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ free (line);
|
|
||||||
+ line = NULL;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ ret = 0;
|
|
||||||
+
|
|
||||||
+out:
|
|
||||||
+ if (line != NULL)
|
|
||||||
+ free (line);
|
|
||||||
+
|
|
||||||
+ if (blacklist != NULL)
|
|
||||||
+ fclose (blacklist);
|
|
||||||
+
|
|
||||||
+ return ret;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static int
|
|
||||||
_has_hardware_gl (Display *display)
|
|
||||||
{
|
|
||||||
int screen;
|
|
||||||
@@ -193,12 +281,7 @@ _has_hardware_gl (Display *display)
|
|
||||||
goto out;
|
|
||||||
|
|
||||||
renderer = (const char *) glGetString (GL_RENDERER);
|
|
||||||
- /* The current Mesa software GL renderer string is
|
|
||||||
- * "Software Rasterizer".
|
|
||||||
- * Gallium has softpipe and llvmpipe. */
|
|
||||||
- if (strcasestr (renderer, "software rasterizer") != NULL ||
|
|
||||||
- strcasestr (renderer, "softpipe") != NULL ||
|
|
||||||
- strcasestr (renderer, "llvmpipe") != NULL)
|
|
||||||
+ if (_is_gl_renderer_blacklisted (renderer) != 0)
|
|
||||||
goto out;
|
|
||||||
|
|
||||||
/* we need to get the max texture size while we have a context,
|
|
||||||
--
|
|
||||||
1.7.7
|
|
||||||
|
|
||||||
|
|
||||||
From 5762becdbb2a308647067e0e09617b3f91f0ac0e Mon Sep 17 00:00:00 2001
|
|
||||||
From: Vincent Untz <vuntz@gnome.org>
|
|
||||||
Date: Wed, 19 Oct 2011 14:36:57 +0200
|
|
||||||
Subject: [PATCH 2/2] data: Blacklist Intel 830-865 hardware
|
|
||||||
|
|
||||||
https://bugzilla.gnome.org/show_bug.cgi?id=644325
|
|
||||||
---
|
|
||||||
data/hardware-compatibility | 3 +++
|
|
||||||
1 files changed, 3 insertions(+), 0 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/data/hardware-compatibility b/data/hardware-compatibility
|
|
||||||
index b311898..ddbfe07 100644
|
|
||||||
--- a/data/hardware-compatibility
|
|
||||||
+++ b/data/hardware-compatibility
|
|
||||||
@@ -12,6 +12,9 @@
|
|
||||||
## - Lines not starting with '#', '+', '-' are ignored.
|
|
||||||
##
|
|
||||||
|
|
||||||
+# Intel 830-865
|
|
||||||
+-Intel(R) 8[[:digit:]]{2,2}[^[:digit:]]
|
|
||||||
+
|
|
||||||
# Old Mesa software GL renderer
|
|
||||||
-software rasterizer
|
|
||||||
|
|
||||||
--
|
|
||||||
1.7.7
|
|
||||||
|
|
||||||
From b7db5c55424a3ce0b0c4d24cb02862402a70ff29 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Vincent Untz <vuntz@gnome.org>
|
|
||||||
Date: Tue, 25 Oct 2011 21:37:36 +0200
|
|
||||||
Subject: [PATCH] data: Fix regexp for Intel 830-865 hardware blacklisting
|
|
||||||
|
|
||||||
---
|
|
||||||
data/hardware-compatibility | 2 +-
|
|
||||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/data/hardware-compatibility b/data/hardware-compatibility
|
diff --git a/data/hardware-compatibility b/data/hardware-compatibility
|
||||||
index ddbfe07..5adc072 100644
|
index ddbfe07..5adc072 100644
|
||||||
--- a/data/hardware-compatibility
|
--- a/data/hardware-compatibility
|
||||||
|
@ -1,102 +0,0 @@
|
|||||||
commit 2613036679b7691c93f5bbd1e15379d80fbb9bf6
|
|
||||||
Author: Vincent Untz <vuntz@gnome.org>
|
|
||||||
Date: Wed Oct 19 13:14:50 2011 +0200
|
|
||||||
|
|
||||||
tools: Look at gnome.fallback argument in kernel boot line
|
|
||||||
|
|
||||||
This is a quick way to let users easily force the fallback (or
|
|
||||||
non-fallback mode) with gnome.fallback=0/1 on boot.
|
|
||||||
|
|
||||||
diff --git a/tools/gnome-session-check-accelerated-helper.c b/tools/gnome-session-check-accelerated-helper.c
|
|
||||||
index 3f83f76..c1fbe9d 100644
|
|
||||||
--- a/tools/gnome-session-check-accelerated-helper.c
|
|
||||||
+++ b/tools/gnome-session-check-accelerated-helper.c
|
|
||||||
@@ -70,7 +70,9 @@
|
|
||||||
/* for strcasestr */
|
|
||||||
#define _GNU_SOURCE
|
|
||||||
|
|
||||||
+#include <ctype.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
+#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#include <X11/Xlib.h>
|
|
||||||
@@ -87,6 +89,54 @@ _print_error (const char *str)
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
|
||||||
+_parse_kcmdline (void)
|
|
||||||
+{
|
|
||||||
+ FILE *kcmdline;
|
|
||||||
+ char *line = NULL;
|
|
||||||
+ size_t line_len = 0;
|
|
||||||
+ int ret = -1;
|
|
||||||
+
|
|
||||||
+ kcmdline = fopen("/proc/cmdline", "r");
|
|
||||||
+ if (kcmdline == NULL)
|
|
||||||
+ return ret;
|
|
||||||
+
|
|
||||||
+ while (getline (&line, &line_len, kcmdline) != -1) {
|
|
||||||
+ const char *arg;
|
|
||||||
+ const char *str;
|
|
||||||
+ int key_len = strlen ("gnome.fallback=");
|
|
||||||
+
|
|
||||||
+ if (line == NULL)
|
|
||||||
+ break;
|
|
||||||
+
|
|
||||||
+ /* don't break if we found the argument once: last mention wins */
|
|
||||||
+
|
|
||||||
+ str = line;
|
|
||||||
+ do {
|
|
||||||
+ arg = strstr (str, "gnome.fallback=");
|
|
||||||
+ str = arg + key_len;
|
|
||||||
+
|
|
||||||
+ if (arg &&
|
|
||||||
+ (arg == line || isspace (arg[-1])) && /* gnome.fallback= is really the beginning of an argument */
|
|
||||||
+ (isdigit (arg[key_len]))) { /* the first character of the value of this argument is an integer */
|
|
||||||
+ if ((arg[key_len+1] == '\0' || isspace (arg[key_len+1]))) /* the value of this argument is only one character long */
|
|
||||||
+ ret = arg[key_len] - '0';
|
|
||||||
+ else /* invalid value */
|
|
||||||
+ ret = 0xDEAD;
|
|
||||||
+
|
|
||||||
+ }
|
|
||||||
+ } while (arg != NULL);
|
|
||||||
+
|
|
||||||
+ free (line);
|
|
||||||
+ line = NULL;
|
|
||||||
+ line_len = 0;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ fclose (kcmdline);
|
|
||||||
+
|
|
||||||
+ return ret;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static int
|
|
||||||
_has_composite (Display *display)
|
|
||||||
{
|
|
||||||
int dummy1, dummy2;
|
|
||||||
@@ -257,9 +307,23 @@ _is_max_texture_size_big_enough (Display *display)
|
|
||||||
int
|
|
||||||
main (int argc, char **argv)
|
|
||||||
{
|
|
||||||
+ int kcmdline_parsed;
|
|
||||||
Display *display = NULL;
|
|
||||||
int ret = 1;
|
|
||||||
|
|
||||||
+ kcmdline_parsed = _parse_kcmdline ();
|
|
||||||
+ if (kcmdline_parsed >= 0) {
|
|
||||||
+ if (kcmdline_parsed == 0) {
|
|
||||||
+ _print_error ("Non-fallback mode forced by kernel command line.");
|
|
||||||
+ ret = 0;
|
|
||||||
+ goto out;
|
|
||||||
+ } else if (kcmdline_parsed == 1) {
|
|
||||||
+ _print_error ("Fallback mode forced by kernel command line.");
|
|
||||||
+ goto out;
|
|
||||||
+ } else
|
|
||||||
+ _print_error ("Invalid value for gnome.fallback passed in kernel command line.");
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
display = XOpenDisplay (NULL);
|
|
||||||
if (!display) {
|
|
||||||
_print_error ("No X display.");
|
|
@ -1,3 +1,19 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Oct 26 20:40:45 UTC 2011 - dimstar@opensuse.org
|
||||||
|
|
||||||
|
- Update to version 3.3.1:
|
||||||
|
+ Tools:
|
||||||
|
- Look at gnome.fallback={0,1} argument in kernel boot line to
|
||||||
|
determine if fallback mode should be enforced or ignored
|
||||||
|
- Use whitelist/blacklist regexps in an external file when
|
||||||
|
evaluating renderer for accelerated check
|
||||||
|
- Blacklist Intel 830-865 hardware when checking for
|
||||||
|
accelerated hardware
|
||||||
|
+ Updated translations.
|
||||||
|
- Rebase gnome-session-blacklist-hardware.patch: mostly fixed
|
||||||
|
upstream, except the regex form in hardware-compatibility.
|
||||||
|
- Drop gnome-session-gnome.fallback-boot-arg.patch: fixed upstream.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Oct 25 19:40:14 UTC 2011 - vuntz@opensuse.org
|
Tue Oct 25 19:40:14 UTC 2011 - vuntz@opensuse.org
|
||||||
|
|
||||||
|
@ -18,13 +18,13 @@
|
|||||||
|
|
||||||
|
|
||||||
Name: gnome-session
|
Name: gnome-session
|
||||||
Version: 3.2.1
|
Version: 3.3.1
|
||||||
Release: 1
|
Release: 1
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Summary: Session Tools for the GNOME Desktop
|
Summary: Session Tools for the GNOME Desktop
|
||||||
Url: http://www.gnome.org
|
Url: http://www.gnome.org
|
||||||
Group: System/GUI/GNOME
|
Group: System/GUI/GNOME
|
||||||
Source: http://download.gnome.org/sources/gnome-session/3.2/%{name}-%{version}.tar.bz2
|
Source: http://download.gnome.org/sources/gnome-session/3.3/%{name}-%{version}.tar.bz2
|
||||||
Source1: gnome
|
Source1: gnome
|
||||||
Source2: gnome.desktop
|
Source2: gnome.desktop
|
||||||
# Temporarly needed until we get upstream to ship the right icon for suspend
|
# Temporarly needed until we get upstream to ship the right icon for suspend
|
||||||
@ -37,8 +37,6 @@ Patch1: gnome-session-kdm-support.patch
|
|||||||
Patch2: gnome-session-wm-switch.patch
|
Patch2: gnome-session-wm-switch.patch
|
||||||
# PATCH-NEEDS-REBASE gnome-session-bgo507101-tile-ui.patch bgo507101 vuntz@novell.com -- Tile UI for logout dialog. (Was: PATCH-FIX-UPSTREAM)
|
# PATCH-NEEDS-REBASE gnome-session-bgo507101-tile-ui.patch bgo507101 vuntz@novell.com -- Tile UI for logout dialog. (Was: PATCH-FIX-UPSTREAM)
|
||||||
Patch3: gnome-session-bgo507101-tile-ui.patch
|
Patch3: gnome-session-bgo507101-tile-ui.patch
|
||||||
# PATCH-FEATURE-UPSTREAM gnome-session-gnome.fallback-boot-arg.patch vuntz@opensuse.org -- Let users be able to pass gnome.fallback at boot to choose fallback/non-fallback
|
|
||||||
Patch4: gnome-session-gnome.fallback-boot-arg.patch
|
|
||||||
# PATCH-FEATURE-UPSTREAM gnome-session-blacklist-hardware.patch bgo#644325 vuntz@opensuse.org -- Use an external file to easily blacklist/whitelist some hardware
|
# PATCH-FEATURE-UPSTREAM gnome-session-blacklist-hardware.patch bgo#644325 vuntz@opensuse.org -- Use an external file to easily blacklist/whitelist some hardware
|
||||||
Patch5: gnome-session-blacklist-hardware.patch
|
Patch5: gnome-session-blacklist-hardware.patch
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
@ -141,7 +139,6 @@ translation-update-upstream
|
|||||||
#%patch2 -p1
|
#%patch2 -p1
|
||||||
# needs-rebase
|
# needs-rebase
|
||||||
#%patch3 -p0
|
#%patch3 -p0
|
||||||
%patch4 -p1
|
|
||||||
%patch5 -p1
|
%patch5 -p1
|
||||||
# gnome-patch-translation-update
|
# gnome-patch-translation-update
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user