openSUSE Commits
Threads by month
- ----- 2025 -----
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
December 2013
- 1 participants
- 1715 discussions
Hello community,
here is the log from the commit of package gimp-help for openSUSE:Factory checked in at 2013-12-28 09:14:23
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gimp-help (Old)
and /work/SRC/openSUSE:Factory/.gimp-help.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "gimp-help"
Changes:
--------
--- /work/SRC/openSUSE:Factory/gimp-help/gimp-help.changes 2013-02-15 18:44:53.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.gimp-help.new/gimp-help.changes 2013-12-28 09:14:28.000000000 +0100
@@ -1,0 +2,15 @@
+Sun Dec 1 21:50:17 UTC 2013 - dimstar(a)opensuse.org
+
+- Update to version 2.8.1:
+ + Online documentation (http://docs.gimp.org) now provides a
+ language menu which allows users to switch to other
+ translations of the same document if available (bgo#168256).
+ + Bugs fixed: bgo#168256, bgo#676683, bgo#679173, bgo#680243,
+ bgo#711318.
+ + Updated translations.
+- Drop gimp-help-2.8.0-missing-po-files.patch: fixed upstream.
+- Add Brazilian Portuguese -lang package (pt_BR).
+- Disable -lang packages that actually did not contain
+ translations (fi, hr, lt, pl).
+
+-------------------------------------------------------------------
Old:
----
gimp-help-2.8.0-missing-po-files.patch
gimp-help-2.8.0.tar.bz2
New:
----
gimp-help-2.8.1.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ gimp-help.spec ++++++
--- /var/tmp/diff_new_pack.ufYIcQ/_old 2013-12-28 09:14:32.000000000 +0100
+++ /var/tmp/diff_new_pack.ufYIcQ/_new 2013-12-28 09:14:32.000000000 +0100
@@ -17,7 +17,7 @@
Name: gimp-help
-Version: 2.8.0
+Version: 2.8.1
Release: 0
# FIXME: Check if parallel build reliably works again (last check: 2.6.1)
Summary: Help System Data for GIMP
@@ -25,8 +25,6 @@
Group: Productivity/Graphics/Bitmap Editors
Url: http://www.gimp.org/
Source0: ftp://ftp.gimp.org/pub/gimp/help/%{name}-%{version}.tar.bz2
-# PATCH-FIX-UPSTREAM gimp-help-2.8.0-missing-po-files.patch dimstar(a)opensuse.org -- Add missing .po files
-Patch0: gimp-help-2.8.0-missing-po-files.patch
BuildRequires: docbook-xsl-stylesheets
BuildRequires: fdupes
BuildRequires: gimp-devel
@@ -237,6 +235,18 @@
This package provides Polish data for gimp-help.
+%package pt_BR
+Summary: Brazilian Portuguese Help System Data for GIMP
+Group: System/Localization
+Requires: %{name} = %{version}
+Provides: locale(%{name}:pt_BR)
+
+%description pt_BR
+GIMP-Help is a help system designed for use with the internal GIMP help
+browser, external Web browser and HTML renderers, and human eyeballs.
+
+This package provides Brazilian Portuguese data for gimp-help.
+
%package ru
Summary: Russian Help System Data for GIMP
Group: System/Localization
@@ -287,7 +297,6 @@
%prep
%setup -q
-%patch0 -p1
%build
%configure
@@ -337,7 +346,7 @@
%files fi
%defattr (-,root,root)
-%lang(fi) %{_datadir}/gimp/2.0/help/fi/
+#lang(fi) %{_datadir}/gimp/2.0/help/fi/
%files fr
%defattr (-,root,root)
@@ -345,7 +354,7 @@
%files hr
%defattr (-,root,root)
-%lang(hr) %{_datadir}/gimp/2.0/help/hr/
+#lang(hr) %{_datadir}/gimp/2.0/help/hr/
%files it
%defattr (-,root,root)
@@ -361,7 +370,7 @@
%files lt
%defattr (-,root,root)
-%lang(lt) %{_datadir}/gimp/2.0/help/lt/
+#lang(lt) %{_datadir}/gimp/2.0/help/lt/
%files nl
%defattr (-,root,root)
@@ -373,7 +382,11 @@
%files pl
%defattr (-,root,root)
-%lang(pl) %{_datadir}/gimp/2.0/help/pl/
+#lang(pl) %{_datadir}/gimp/2.0/help/pl/
+
+%files pt_BR
+%defattr (-,root,root)
+%lang(pt_BR) %{_datadir}/gimp/2.0/help/pt_BR/
%files ru
%defattr (-,root,root)
++++++ gimp-help-2.8.0.tar.bz2 -> gimp-help-2.8.1.tar.bz2 ++++++
/work/SRC/openSUSE:Factory/gimp-help/gimp-help-2.8.0.tar.bz2 /work/SRC/openSUSE:Factory/.gimp-help.new/gimp-help-2.8.1.tar.bz2 differ: char 11, line 1
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package gedit-plugins for openSUSE:Factory checked in at 2013-12-28 09:12:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gedit-plugins (Old)
and /work/SRC/openSUSE:Factory/.gedit-plugins.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "gedit-plugins"
Changes:
--------
--- /work/SRC/openSUSE:Factory/gedit-plugins/gedit-plugins.changes 2013-09-27 17:10:58.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.gedit-plugins.new/gedit-plugins.changes 2013-12-28 09:12:22.000000000 +0100
@@ -1,0 +2,7 @@
+Wed Dec 4 19:34:14 UTC 2013 - dimstar(a)opensuse.org
+
+- Update to version 3.10.1:
+ + Misc bugfixes.
+ + Updated translations.
+
+-------------------------------------------------------------------
Old:
----
gedit-plugins-3.10.0.tar.xz
New:
----
gedit-plugins-3.10.1.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ gedit-plugins.spec ++++++
--- /var/tmp/diff_new_pack.K8DRgD/_old 2013-12-28 09:12:23.000000000 +0100
+++ /var/tmp/diff_new_pack.K8DRgD/_new 2013-12-28 09:12:23.000000000 +0100
@@ -21,7 +21,7 @@
Summary: A collection of plugins for gedit
License: GPL-2.0+
Group: Productivity/Editors/Other
-Version: 3.10.0
+Version: 3.10.1
Release: 0
Source: http://download.gnome.org/sources/gedit-plugins/3.10/%{name}-%{version}.tar…
Url: http://live.gnome.org/GeditPlugins
++++++ gedit-plugins-3.10.0.tar.xz -> gedit-plugins-3.10.1.tar.xz ++++++
++++ 3988 lines of diff (skipped)
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package gdm for openSUSE:Factory checked in at 2013-12-28 09:06:01
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gdm (Old)
and /work/SRC/openSUSE:Factory/.gdm.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "gdm"
Changes:
--------
--- /work/SRC/openSUSE:Factory/gdm/gdm.changes 2013-10-17 14:03:53.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.gdm.new/gdm.changes 2013-12-28 09:06:03.000000000 +0100
@@ -1,0 +2,7 @@
+Wed Nov 27 19:52:01 UTC 2013 - dimstar(a)opensuse.org
+
+- Add gdm-XDMCP-fixes.patch: Backports fixes in git
+ addressing XDMCP related issues (bnc#851160, bgo#690926,
+ bgo#711180).
+
+-------------------------------------------------------------------
New:
----
gdm-XDMCP-fixes.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ gdm.spec ++++++
--- /var/tmp/diff_new_pack.FPhfGJ/_old 2013-12-28 09:06:04.000000000 +0100
+++ /var/tmp/diff_new_pack.FPhfGJ/_new 2013-12-28 09:06:04.000000000 +0100
@@ -62,6 +62,8 @@
Patch35: gdm-xauthlocalhostname.patch
# PATCH-FIX-UPSTREAM gdm-look-at-runlevel.patch bnc540482 bgo599180 vuntz(a)opensuse.org -- Look at the current runlevel before managing the display again, so we don't do this when shutting down or rebooting
Patch40: gdm-look-at-runlevel.patch
+# PATCH-FIX-UPSTREAM gdm-XDMCP-fixes.patch bnc#851160 bgo#690926 dimstar(a)opensuse.org -- Backported fixes from git for XDMCP remote login
+Patch41: gdm-XDMCP-fixes.patch
BuildRequires: check-devel
# needed for directory ownership
BuildRequires: dconf
@@ -195,6 +197,7 @@
%patch34 -p1
%patch35 -p1
%patch40 -p1
+%patch41 -p1
%build
NOCONFIGURE=1 sh %{S:8}
++++++ gdm-XDMCP-fixes.patch ++++++
++++ 6247 lines (skipped)
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package clutter for openSUSE:Factory checked in at 2013-12-28 09:05:33
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/clutter (Old)
and /work/SRC/openSUSE:Factory/.clutter.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "clutter"
Changes:
--------
--- /work/SRC/openSUSE:Factory/clutter/clutter.changes 2013-09-27 17:07:28.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.clutter.new/clutter.changes 2013-12-28 09:05:34.000000000 +0100
@@ -1,0 +2,21 @@
+Tue Nov 19 18:17:33 UTC 2013 - dimstar(a)opensuse.org
+
+- Update to version 1.16.2:
+ + Allow creating intervals and transitions from ClutterScript
+ ClutterInterval now implements ClutterScriptable.
+ + X11 backend improvements: Update the device coordinate
+ handling; remove the dependency on the XFixes extension.
+ + Wayland backend improvements: Implement the
+ ClutterStage:cursor-visible property.
+ + Apply the correct opacity when painting ClutterImage.
+ + Throttle touch update events.
+ + Fix preferred size of TableLayout: Take account of the
+ visibility of the children when computing the preferred size of
+ a ClutterActor using a ClutterTableLayout as its layout
+ manager.
+ + Documentation fixes.
+ + Bugs fixed: bgo#707071, bgo#709762, bgo#709590, bgo#709761,
+ bgo#709620, bgo#708922, bgo#709434, bgo#708850.
+ + Updated translations.
+
+-------------------------------------------------------------------
Old:
----
clutter-1.16.0.tar.xz
New:
----
clutter-1.16.2.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ clutter.spec ++++++
--- /var/tmp/diff_new_pack.sKng7K/_old 2013-12-28 09:05:35.000000000 +0100
+++ /var/tmp/diff_new_pack.sKng7K/_new 2013-12-28 09:05:35.000000000 +0100
@@ -19,7 +19,7 @@
%define build_wayland_backend 0
Name: clutter
-Version: 1.16.0
+Version: 1.16.2
Release: 0
Summary: The clutter library
License: LGPL-2.1+
++++++ clutter-1.16.0.tar.xz -> clutter-1.16.2.tar.xz ++++++
++++ 24036 lines of diff (skipped)
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package brasero for openSUSE:Factory checked in at 2013-12-28 09:03:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/brasero (Old)
and /work/SRC/openSUSE:Factory/.brasero.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "brasero"
Changes:
--------
--- /work/SRC/openSUSE:Factory/brasero/brasero.changes 2013-05-16 09:43:41.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.brasero.new/brasero.changes 2013-12-28 09:03:41.000000000 +0100
@@ -1,0 +2,18 @@
+Thu Dec 26 12:18:44 UTC 2013 - zaitor(a)opensuse.org
+
+- Update to version 3.10.0:
+ + Fixed drawing issues in media selection combo boxes.
+ + Fix several crashers.
+ + Fixes for new autotools.
+ + Disable audio normalisation - it's broken since GStreamer 1.0.
+ + Updated translations.
+- Drop brasero-tracker-0.16.patch, fixed upstream.
+- Drop gnome-common BuildRequires, and stop using autoreconf, not
+ needed anymore since we do not carry any patches.
+- Stop passing --disable-scrollkeeper, no longer needed nor
+ recognized.
+- Add pkgconfig(libburn-1) and pkgconfig(libisofs-1) BuildRequires
+ in order to build the libburnia plugin, we already pass
+ --enable-libburnia to configure.
+
+-------------------------------------------------------------------
@@ -6 +24 @@
- + Add /usr/bin/cdrecird, /usr/bin/mkisofs and /usr/bin/readcd
+ + Add /usr/bin/cdrecord, /usr/bin/mkisofs and /usr/bin/readcd
Old:
----
brasero-3.8.0.tar.xz
brasero-tracker-0.16.patch
New:
----
brasero-3.10.0.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ brasero.spec ++++++
--- /var/tmp/diff_new_pack.nEDn9u/_old 2013-12-28 09:03:42.000000000 +0100
+++ /var/tmp/diff_new_pack.nEDn9u/_new 2013-12-28 09:03:42.000000000 +0100
@@ -17,19 +17,15 @@
Name: brasero
-Version: 3.8.0
+Version: 3.10.0
Release: 0
Summary: CD/DVD burning application for GNOME
License: GPL-2.0+
Group: Productivity/Multimedia/CD/Record
Url: http://gnome.org/projects/brasero
-Source: http://download.gnome.org/sources/brasero/3.8/%{name}-%{version}.tar.xz
-# PATCH-FIX-UPSTREAM brasero-tracker-0.16.patch bgo#692664 dimstar(a)opensuse.org -- Fix build with tracker 0.16
-Patch0: brasero-tracker-0.16.patch
+Source: http://download.gnome.org/sources/brasero/3.10/%{name}-%{version}.tar.xz
BuildRequires: fdupes
BuildRequires: gobject-introspection-devel
-# Needed for patch0
-BuildRequires: gnome-common
BuildRequires: gtk-doc
BuildRequires: intltool
BuildRequires: yelp-tools
@@ -48,8 +44,10 @@
BuildRequires: pkgconfig(gstreamer-video-1.0) >= 0.11.92
BuildRequires: pkgconfig(gtk+-3.0) >= 3.0.0
BuildRequires: pkgconfig(ice)
+BuildRequires: pkgconfig(libburn-1) >= 0.4.0
BuildRequires: pkgconfig(libcanberra)
BuildRequires: pkgconfig(libcanberra-gtk3)
+BuildRequires: pkgconfig(libisofs-1) >= 0.6.4
BuildRequires: pkgconfig(libnautilus-extension)
BuildRequires: pkgconfig(libnotify) >= 0.6.1
BuildRequires: pkgconfig(libxml-2.0) >= 2.6.0
@@ -186,15 +184,11 @@
%lang_package
%prep
%setup -q
-%patch0 -p1
translation-update-upstream
%build
-# Needed for patch0
-autoreconf -fiv
%configure \
--disable-static \
- --disable-scrollkeeper \
--enable-search \
--enable-playlist \
--enable-nautilus \
++++++ brasero-3.8.0.tar.xz -> brasero-3.10.0.tar.xz ++++++
++++ 96412 lines of diff (skipped)
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package almanah for openSUSE:Factory checked in at 2013-12-28 09:03:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/almanah (Old)
and /work/SRC/openSUSE:Factory/.almanah.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "almanah"
Changes:
--------
--- /work/SRC/openSUSE:Factory/almanah/almanah.changes 2013-04-19 15:23:09.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.almanah.new/almanah.changes 2013-12-28 09:03:28.000000000 +0100
@@ -1,0 +2,17 @@
+Sat Nov 30 22:57:49 UTC 2013 - dimstar(a)opensuse.org
+
+- Update to version 0.11.0:
+ + Improved the tagging accesibility.
+ + Enhanced the diary security.
+ + Changed the tagging look (new button with a symbolic link in
+ the toolbar and the tag bar shown integrated in the main
+ toolbar).
+ + Added a new 256x256 icon, that looks better in GNOME Shell.
+ + Added an AppData file to show a completed information in
+ Software App.
+ + Updated translations.
+- Drop almanah-includes.patch: fixed upstream.
+- Pass install_sh=$(pwd)/install-sh to make_install: for some weird
+ reason, the tarball fails to find it.
+
+-------------------------------------------------------------------
Old:
----
almanah-0.10.8.tar.xz
almanah-includes.patch
New:
----
almanah-0.11.0.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ almanah.spec ++++++
--- /var/tmp/diff_new_pack.X0JDgC/_old 2013-12-28 09:03:28.000000000 +0100
+++ /var/tmp/diff_new_pack.X0JDgC/_new 2013-12-28 09:03:28.000000000 +0100
@@ -17,16 +17,14 @@
Name: almanah
-Version: 0.10.8
+Version: 0.11.0
Release: 0
# FIXME: Remove -UE_CAL_DISABLE_DEPRECATED from CFLAGS (bgo#698259)
Summary: GTK+ application to allow you to keep a diary of your life
License: GPL-3.0+
Group: Productivity/Office/Other
Url: https://live.gnome.org/Almanah_Diary
-Source: http://download.gnome.org/sources/almanah/0.10/%{name}-%{version}.tar.xz
-# PATCH-FIX-UPSTREAM almanah-includes.patch bgo#698259 dimstar(a)opensuse.org -- Add missing includes
-Patch0: almanah-includes.patch
+Source: http://download.gnome.org/sources/almanah/0.11/%{name}-%{version}.tar.xz
BuildRequires: gpgme-devel
BuildRequires: hicolor-icon-theme
BuildRequires: intltool
@@ -55,7 +53,6 @@
%prep
%setup -q
-%patch0 -p1
%build
export CFLAGS="%{optflags} -UE_CAL_DISABLE_DEPRECATED"
@@ -63,7 +60,7 @@
make %{?_smp_mflags}
%install
-%make_install
+%make_install install_sh=$(pwd)/install-sh
%suse_update_desktop_file %{name} X-SuSE-DesktopUtility
%find_lang %{name} %{?no_lang_C}
@@ -82,8 +79,11 @@
%doc AUTHORS COPYING NEWS README ChangeLog
%{_bindir}/%{name}
%{_datadir}/%{name}/
-%{_datadir}/icons/hicolor/*/apps/%{name}.png
+%dir %{_datadir}/appdata
+%{_datadir}/appdata/almanah.appdata.xml
%{_datadir}/applications/%{name}.desktop
+%{_datadir}/icons/hicolor/*/actions/almanah-tags-symbolic.svg
+%{_datadir}/icons/hicolor/*/apps/%{name}.png
%dir %{_datadir}/GConf/
%dir %{_datadir}/GConf/gsettings/
%{_datadir}/GConf/gsettings/%{name}.convert
++++++ almanah-0.10.8.tar.xz -> almanah-0.11.0.tar.xz ++++++
++++ 22039 lines of diff (skipped)
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package patchinfo.2418 for openSUSE:12.2:Update checked in at 2013-12-27 11:17:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:12.2:Update/patchinfo.2418 (Old)
and /work/SRC/openSUSE:12.2:Update/.patchinfo.2418.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "patchinfo.2418"
Changes:
--------
New Changes file:
NO CHANGES FILE!!!
New:
----
_patchinfo
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ _patchinfo ++++++
<patchinfo>
<issue id="853846" tracker="bnc">VUL-0: CVE-2013-6424: xorg-x11-server: integer underflow when handling trapezoids</issue>
<issue id="CVE-2013-6424" tracker="cve" />
<category>security</category>
<rating>moderate</rating>
<packager>michalsrb</packager>
<description>
The X server was updated to fix a possible X server crash using invalid trapezoids.
(bnc#853846 CVE-2013-6424)
</description>
<summary>xorg-x11-server: fixed an overflow in trapezoid handling</summary>
</patchinfo>
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package xorg-x11-server for openSUSE:12.3:Update checked in at 2013-12-27 11:17:41
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:12.3:Update/xorg-x11-server (Old)
and /work/SRC/openSUSE:12.3:Update/.xorg-x11-server.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "xorg-x11-server"
Changes:
--------
New Changes file:
NO CHANGES FILE!!!
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ _link ++++++
--- /var/tmp/diff_new_pack.J6Wq8L/_old 2013-12-27 11:17:43.000000000 +0100
+++ /var/tmp/diff_new_pack.J6Wq8L/_new 2013-12-27 11:17:43.000000000 +0100
@@ -1 +1 @@
-<link package='xorg-x11-server.2115' cicount='copy' />
+<link package='xorg-x11-server.2418' cicount='copy' />
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package xorg-x11-server.2418 for openSUSE:12.3:Update checked in at 2013-12-27 11:17:39
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:12.3:Update/xorg-x11-server.2418 (Old)
and /work/SRC/openSUSE:12.3:Update/.xorg-x11-server.2418.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "xorg-x11-server.2418"
Changes:
--------
New Changes file:
--- /dev/null 2013-11-25 01:44:08.036031256 +0100
+++ /work/SRC/openSUSE:12.3:Update/.xorg-x11-server.2418.new/xorg-x11-server.changes 2013-12-27 11:17:41.000000000 +0100
@@ -0,0 +1,3366 @@
+-------------------------------------------------------------------
+Thu Dec 16 14:54:12 UTC 2013 - msrb(a)suse.com
+
+- u_exa-only-draw-valid-trapezoids.patch
+ * Fix possible x server crash using invalid trapezoids.
+ (bnc#853846 CVE-2013-6424)
+
+-------------------------------------------------------------------
+Mon Oct 21 12:23:57 UTC 2013 - sndirsch(a)suse.com
+
+- u_Avoid-use-after-free-in-dix-dixfonts.c-doImageText.patch
+ * Fixes a security issue, in which an authenticated X client
+ can cause an X server to use memory after it was freed,
+ potentially leading to crash and/or memory corruption.
+ (CVE-2013-4396, bnc#843652)
+
+-------------------------------------------------------------------
+Fri Jul 5 23:02:02 UTC 2013 - sweet_f_a(a)gmx.de
+
+- U_Revert-kinput-allocate-enough-space-for-null-charact.patch
+ * fix Xephyr incorrect commandline arguments parsing (bnc#828364)
+
+-------------------------------------------------------------------
+Wed Jun 19 15:01:51 UTC 2013 - sndirsch(a)suse.com
+
+- U_os-Reset-input-buffer-s-ignoreBytes-field.patch
+ * If a client sends a request larger than maxBigRequestSize,
+ the server is supposed to ignore it.
+ Before commit cf88363d, the server would simply disconnect
+ the client. After that commit, it attempts to gracefully
+ ignore the request by remembering how long the client
+ specified the request to be, and ignoring that many bytes.
+ However, if a client sends a BigReq header with a large size
+ and disconnects before actually sending the rest of the
+ specified request, the server will reuse the ConnectionInput
+ buffer without resetting the ignoreBytes field. This makes
+ the server ignore new X clients' requests.
+ This fixes that behavior by resetting the ignoreBytes field
+ when putting the ConnectionInput buffer back on the
+ FreeInputs list. (bnc#815583)
+
+-------------------------------------------------------------------
+Thu Jun 6 14:10:31 UTC 2013 - msrb(a)suse.com
+
+- u_xserver_xvfb-randr.patch
+ * Add randr support to Xvfb (bnc#823410)
+
+-------------------------------------------------------------------
+Mon Apr 29 16:27:06 CEST 2013 - sndirsch(a)suse.de
+
+- U_xf86-fix-flush-input-to-work-with-Linux-evdev-device.patch
+ * So when we VT switch back and attempt to flush the input
+ devices, we don't succeed because evdev won't return part
+ of an event, since we were only asking for 4 bytes, we'd
+ only get -EINVAL back. This could later cause events to be
+ flushed that we shouldn't have gotten.
+ This is a fix for CVE-2013-1940. (bnc#814653)
+
+-------------------------------------------------------------------
+Wed Feb 20 13:36:40 UTC 2013 - sndirsch(a)suse.com
+
+- added u_init_framebuffer_base.patch: initialize buffer.base to fix
+ Xorg segfault in virtualbox guest (bnc#799480)
+
+-------------------------------------------------------------------
+Thu Jan 31 18:09:30 UTC 2013 - tobias.johannes.klausmann(a)mni.thm.de
+
+- Update to version 1.13.2:
+ No commits since rc1.
+ Commits from rc1:
+ + EnableDisableExtensionError: Use ARRAY_SIZE rather than sentinel
+ + glx/dri2: initialise api to avoid indirect rendering failing randomly
+ + XQuartz: Avoid a possible deadlock with DRI on OS X 10.7.5 and OS
+ X 10.8.2
+ + XQuartz: Add some verbose logging to debug xp_lock_window being
+ unbalanced
+ + XQuartz: Don't add the 15bit visual any more
+ + version bump for 1.13.1.901 (rc1)
+ + vfb: Initialize the GLX extension again.
+
+-------------------------------------------------------------------
+Thu Jan 10 10:47:07 UTC 2013 - sndirsch(a)suse.com
+
+- disabled build of VNC (xf4vnc), which finally has been replaced
+ by the seperate xorg-x11-Xvnc source package (tigervnc)
+
+-------------------------------------------------------------------
+Tue Jan 8 11:46:23 UTC 2013 - sndirsch(a)suse.com
+
+- let xorg-x11-server require xkeyboard-config again, since Xvfb
+ is part of this package and requires keyboard files as well
+ (bnc#797124)
+
+-------------------------------------------------------------------
+Fri Dec 14 10:39:08 UTC 2012 - tobias.johannes.klausmann(a)mni.thm.de
+
+- Update to version 1.13.1:
+- Remove upstreamed patches: (double checked)
+ + U_EXA-Track-source-mask-pixmaps-more-explicitly-for-Co.patch
+- Removed unrecognized configure options
+ + "--enable-builddocs"
+
+-------------------------------------------------------------------
+Tue Nov 27 13:00:41 UTC 2012 - werner(a)suse.de
+
+- Let the old Xfig program find the ghostscript fonts (bnc#784305)
+
+-------------------------------------------------------------------
+Mon Nov 12 17:27:21 UTC 2012 - fcrozat(a)suse.com
+
+- Update N_autoconfig_fallback_fbdev_first.diff to ensure
+ modesetting driver is used before fbdev.
+
+-------------------------------------------------------------------
+Tue Oct 30 10:45:57 UTC 2012 - sndirsch(a)suse.com
+
+- U_EXA-Track-source-mask-pixmaps-more-explicitly-for-Co.patch
+ Track source/mask pixmaps more explicitly for Composite fallback regions.
+ In particular, make sure pExaScr->src/maskPix are cleared when the
+ corresponding pictures aren't associated with drawables, i.e. solid or
+ gradient pictures. Without this, we would in some cases associate the
+ source/mask region with unrelated pixmaps from previous Composite
+ fallbacks, resulting in random corruption. (bnc#786153, fdo#47266)
+
+-------------------------------------------------------------------
+Mon Oct 15 14:22:01 UTC 2012 - sndirsch(a)suse.com
+
+- u_vgaHW-no-legacy.patch
+ * likely fixes build on ppc
+
+-------------------------------------------------------------------
+Mon Sep 24 19:52:16 UTC 2012 - opensuse(a)cboltz.de
+
+- /usr/bin/Xorg is no longer listed in /etc/permissions - remove
+ %set_permissions and %verify_permissions and re-enable rpm permission
+ check (bnc#632737 #c27)
+
+-------------------------------------------------------------------
+Thu Sep 20 11:34:01 UTC 2012 - sndirsch(a)suse.com
+
+- N_driver-autoconfig.diff
+ * "ati" needs to be the second choice right after "fglrx"; there
+ must not be a gap between "fglrx" and "ati" introduced by
+ removing "radeonhd" from this list by the previous change
+
+-------------------------------------------------------------------
+Tue Sep 18 21:41:15 UTC 2012 - sndirsch(a)suse.com
+
+- N_driver-autoconfig.diff:
+ * removed radeonhd and unichrome from driver list, since no
+ longer supported upstream
+
+-------------------------------------------------------------------
+Wed Aug 8 20:15:33 UTC 2012 - tobias.johannes.klausmann(a)mni.thm.de
+
+- Update to version 1.13.0:
+ + Packaging changes:
+ - Unify naming of patches
+ - Drop upstreamed patches: 223, 224, 300 - 310 (double checked)
+ - Remove patch pio_ia64.diff - not applicable anymore
+ - Remove patch xserver-bg-none-root.patch - not applicable anymore
+ - Remove patch bug474071-fix1.diff - not appliable anymore
+ - Remove patch pci-legacy-mem-fallback.diff - not applicable anymore
+ - Remove patch pu_fixes.diff - not applicable anymore (xaa is gone)
+
+-------------------------------------------------------------------
+Sun Jul 22 10:35:59 UTC 2012 - sndirsch(a)suse.com
+
+- u_Do-not-use-intel-driver-on-Poulsbo-Oaktrail-Medfield.patch
+ * Do not use intel driver on Poulsbo, Oaktrail, Medfield, CDV.
+ IDs stolen from Kernel psb driver. (bnc#772279)
+ * obsoletes xorg-detect-psb.patch
+
+-------------------------------------------------------------------
+Tue Jul 17 01:42:30 UTC 2012 - sndirsch(a)suse.com
+
+- renamed patches of previous change according to our policy
+ u_* --> U_* (since these were rebased on upstream patches)
+
+-------------------------------------------------------------------
+Fri Jul 13 00:19:59 UTC 2012 - badshah400(a)gmail.com
+
+- Add patches u_dri2_add_DRI2CreateDrawable2.patch and
+ u_0012-glx_Free_reference_to_destroyed_GLX_drawable.patch to fix
+ seemingly random crashes of the X stack [bnc#769553]; patches
+ came from upstream git commits, and were rebased to apply to
+ present version cleanly.
+
+-------------------------------------------------------------------
+Mon Jul 9 21:28:59 UTC 2012 - tobias.johannes.klausmann(a)mni.thm.de
+
+- Update to Version 1.12.3
+ + The third stable update to the X.Org X server 1.12 series is now available.
+ A few smaller changes only since the second RC, some memory leak fixes and two
+ fixes to avoid out-of-bounds array access.
+
+-------------------------------------------------------------------
++++ 3169 more lines (skipped)
++++ between /dev/null
++++ and /work/SRC/openSUSE:12.3:Update/.xorg-x11-server.2418.new/xorg-x11-server.changes
New:
----
N_0001-Check-harder-for-primary-PCI-device.patch
N_0001-Fix-segfault-when-killing-X-with-ctrl-alt-backspace.patch
N_0001-Prevent-XSync-Alarms-from-senslessly-calling-CheckTr.patch
N_0001-Xinput-Catch-missing-configlayout-when-deleting-dev.patch
N_Use-external-tool-for-creating-backtraces-on-crashes.patch
N_autoconfig_fallback_fbdev_first.diff
N_bug-197858_dpms.diff
N_bug534768-prefer_local_symbols.patch
N_cache-xkbcomp-output-for-fast-start-up.patch
N_confine_to_shape.diff
N_dpms_screensaver.diff
N_driver-autoconfig.diff
N_edid_data_sanity_check.diff
N_fbdevhw.diff
N_fix-dpi-values.diff
N_fix_fglrx_screendepth_issue.patch
N_p_default-module-path.diff
N_p_xnest-ignore-getimage-errors.diff
N_randr1_1-sig11.diff
N_sync-fix.patch
N_vidmode-sig11.diff
N_xorg-server-xdmcp.patch
N_zap_warning_xserver.diff
README.updates
U_Revert-kinput-allocate-enough-space-for-null-charact.patch
U_os-Reset-input-buffer-s-ignoreBytes-field.patch
U_xf86-fix-flush-input-to-work-with-Linux-evdev-device.patch
modprobe.nvidia
n_VNC-Add-proto.diff
n_VNC-Add-support-for-VNC.patch
n_VNC-Don-t-let-VNC-access-the-framebuffer-directly-an.patch
n_VNC-Enable-use-of-all-keyboard-layouts-independent-o.patch
n_VNC-Fix-crash-due-to-unset-input-device-names.patch
n_VNC-Fix-crash-when-no-depth-translation-is-required.patch
n_VNC-Readd-timeout-when-vnc-viewer-connection-breaks.patch
n_Xvnc-pthread.diff
n_xorg-x11-server-rpmmacros.patch
pre_checkin.sh
sysconfig.displaymanager.template
u_Avoid-use-after-free-in-dix-dixfonts.c-doImageText.patch
u_Do-not-use-intel-driver-on-Poulsbo-Oaktrail-Medfield.patch
u_exa-only-draw-valid-trapezoids.patch
u_init_framebuffer_base.patch
u_vgaHW-no-legacy.patch
u_xserver_xvfb-randr.patch
xorg-backtrace
xorg-server-1.13.2.tar.bz2
xorg-server-provides
xorg-x11-server.changes
xorg-x11-server.macros.in
xorg-x11-server.spec
xorgcfg.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ xorg-x11-server.spec ++++++
#
# spec file for package xorg-x11-server
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: xorg-x11-server
%define dirsuffix 1.13.2
%define vnc 0
Summary: X
License: GPL-2.0+ and MIT
Group: System/X11/Servers/XF86_4
Source0: xorg-server-%{dirsuffix}.tar.bz2
Source1: sysconfig.displaymanager.template
Source3: README.updates
Source4: xorgcfg.tar.bz2
Source5: modprobe.nvidia
Source8: xorg-backtrace
# RPM Macros to be installed. The ABI Versions will be injected by configure.
Source96: xorg-x11-server.macros.in
# Source98 and Source99 are used to ensure proper ABI provides.
Source98: xorg-server-provides
Source99: pre_checkin.sh
# PATCH-FEATURE-OPENSUSE n_xorg-x11-server-rpmmacros.patch dimstar(a)opensuse.org -- Provide RPM macros to require correct ABI Versions.
Patch0: n_xorg-x11-server-rpmmacros.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch2: N_p_default-module-path.diff
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch16: N_p_xnest-ignore-getimage-errors.diff
BuildRequires: Mesa-devel
BuildRequires: bison
BuildRequires: flex
BuildRequires: libtool
BuildRequires: pkgconfig
BuildRequires: pkgconfig(bigreqsproto) >= 1.1.0
BuildRequires: pkgconfig(damageproto) >= 1.1
BuildRequires: pkgconfig(dmx) >= 1.0.99.1
BuildRequires: pkgconfig(fixesproto) >= 4.1
BuildRequires: pkgconfig(fontconfig)
BuildRequires: pkgconfig(fontenc)
BuildRequires: pkgconfig(fontsproto)
BuildRequires: pkgconfig(fontutil)
BuildRequires: pkgconfig(freetype2)
BuildRequires: pkgconfig(ice)
BuildRequires: pkgconfig(inputproto) >= 1.9.99.902
BuildRequires: pkgconfig(kbproto) >= 1.0.3
BuildRequires: pkgconfig(libdrm)
BuildRequires: pkgconfig(openssl)
BuildRequires: pkgconfig(pciaccess) >= 0.8.0
BuildRequires: pkgconfig(pixman-1) >= 0.24
BuildRequires: pkgconfig(randrproto) >= 1.2.99.3
BuildRequires: pkgconfig(renderproto) >= 0.11
BuildRequires: pkgconfig(sm)
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xau)
BuildRequires: pkgconfig(xau)
BuildRequires: pkgconfig(xaw7)
BuildRequires: pkgconfig(xcmiscproto) >= 1.2.0
BuildRequires: pkgconfig(xdmcp)
BuildRequires: pkgconfig(xext) >= 1.0.99.4
BuildRequires: pkgconfig(xextproto) >= 7.1.99
BuildRequires: pkgconfig(xfixes)
BuildRequires: pkgconfig(xfont) >= 1.4.2
BuildRequires: pkgconfig(xi) >= 1.2.99.1
BuildRequires: pkgconfig(xkbfile)
BuildRequires: pkgconfig(xmu)
BuildRequires: pkgconfig(xp)
BuildRequires: pkgconfig(xpm)
BuildRequires: pkgconfig(xprintutil)
BuildRequires: pkgconfig(xproto) >= 7.0.17
BuildRequires: pkgconfig(xrender)
BuildRequires: pkgconfig(xres)
BuildRequires: pkgconfig(xt)
BuildRequires: pkgconfig(xtrans) >= 1.2.2
BuildRequires: pkgconfig(xtst) >= 1.0.99.2
BuildRequires: pkgconfig(xv)
### udev support (broken on openSUSE 11.2, see also bnc #589997)
%if 0%{?suse_version} >= 1130
BuildRequires: pkgconfig(libudev) >= 143
%endif
%if %vnc
BuildRequires: libjpeg-devel
BuildRequires: pkgconfig(vncproto)
%endif
Version: 7.6_%{dirsuffix}
Release: 0
Url: http://xorg.freedesktop.org/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%ifnarch s390 s390x
Requires(pre): %fillup_prereq
%endif
Requires: pkgconfig
Requires: xkbcomp
Requires: xorg-x11-fonts-core
%ifnarch s390 s390x
Requires: libpixman-1-0 >= 0.24
%(cat %{SOURCE98})
%endif
Requires: Mesa
Provides: xorg-x11-Xvfb
Provides: xorg-x11-server-glx
Obsoletes: xorg-x11-Xvfb
Obsoletes: xorg-x11-server-glx
# Xvfb requires keyboard files as well (bnc#797124)
Requires: xkeyboard-config
%if %vnc
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch17: n_VNC-Add-support-for-VNC.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch18: n_VNC-Readd-timeout-when-vnc-viewer-connection-breaks.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch19: n_VNC-Fix-crash-when-no-depth-translation-is-required.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch20: n_VNC-Don-t-let-VNC-access-the-framebuffer-directly-an.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch21: n_VNC-Enable-use-of-all-keyboard-layouts-independent-o.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch22: n_VNC-Fix-crash-due-to-unset-input-device-names.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch23: n_Xvnc-pthread.diff
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch24: n_VNC-Add-proto.diff
%endif
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch45: N_bug-197858_dpms.diff
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch77: N_fbdevhw.diff
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch79: N_edid_data_sanity_check.diff
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch101: N_zap_warning_xserver.diff
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch103: N_confine_to_shape.diff
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch106: N_randr1_1-sig11.diff
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch112: N_fix-dpi-values.diff
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch123: N_vidmode-sig11.diff
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch125: N_0001-Xinput-Catch-missing-configlayout-when-deleting-dev.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch127: N_dpms_screensaver.diff
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch143: N_autoconfig_fallback_fbdev_first.diff
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch145: N_driver-autoconfig.diff
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch162: N_cache-xkbcomp-output-for-fast-start-up.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch200: N_bug534768-prefer_local_symbols.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch202: N_0001-Check-harder-for-primary-PCI-device.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch203: N_0001-Fix-segfault-when-killing-X-with-ctrl-alt-backspace.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch206: N_fix_fglrx_screendepth_issue.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch211: N_0001-Prevent-XSync-Alarms-from-senslessly-calling-CheckTr.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch213: N_xorg-server-xdmcp.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch220: N_Use-external-tool-for-creating-backtraces-on-crashes.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch222: N_sync-fix.patch
Patch225: u_Do-not-use-intel-driver-on-Poulsbo-Oaktrail-Medfield.patch
Patch226: u_vgaHW-no-legacy.patch
Patch227: u_init_framebuffer_base.patch
Patch228: U_xf86-fix-flush-input-to-work-with-Linux-evdev-device.patch
Patch229: u_xserver_xvfb-randr.patch
Patch230: U_os-Reset-input-buffer-s-ignoreBytes-field.patch
# PATCH-FIX-UPSTREAM -- bnc#828364, upstream has merged it already
Patch231: U_Revert-kinput-allocate-enough-space-for-null-charact.patch
Patch232: u_Avoid-use-after-free-in-dix-dixfonts.c-doImageText.patch
# PATCH-FIX-UPSTREAM u_exa-only-draw-valid-trapezoids.patch bnc#853846 msrb(a)suse.com -- Fixes possible crash of server using invalid trapezoids. 2013-12-12 patch is waiting in mailing list to be upstreamed.
Patch233: u_exa-only-draw-valid-trapezoids.patch
%description
This package contains the X.Org Server.
%package extra
Summary: Additional Xservers (Xdmx, Xephyr, Xnest)
Group: System/X11/Servers/XF86_4
Requires: Mesa
Requires: xkbcomp
Requires: xkeyboard-config
Requires: xorg-x11-fonts-core
Provides: xorg-x11-Xnest
Obsoletes: xorg-x11-Xnest
%description extra
This package contains additional Xservers (Xdmx, Xephyr, Xnest).
%package sdk
Summary: X
Group: System/Libraries
Requires: xorg-x11-proto-devel
Requires: xorg-x11-server
Requires: pkgconfig(fontconfig)
Requires: pkgconfig(fontenc)
Requires: pkgconfig(freetype2)
Requires: pkgconfig(ice)
Requires: pkgconfig(libdrm)
Requires: pkgconfig(sm)
Requires: pkgconfig(x11)
Requires: pkgconfig(xau)
Requires: pkgconfig(xdmcp)
Requires: pkgconfig(xext)
Requires: pkgconfig(xfixes)
Requires: pkgconfig(xkbfile)
Requires: pkgconfig(xmu)
Requires: pkgconfig(xp)
Requires: pkgconfig(xpm)
Requires: pkgconfig(xprintutil)
Requires: pkgconfig(xrender)
Requires: pkgconfig(xt)
Requires: pkgconfig(xtrans)
Requires: pkgconfig(xv)
Provides: xorg-x11-sdk
Obsoletes: xorg-x11-sdk
%description sdk
This package contains the X.Org Server SDK.
%if %vnc
%package -n xorg-x11-Xvnc
Summary: VNC Server for the X Window System
Group: System/X11/Servers/XF86_4
Requires: xkbcomp
Requires: xkeyboard-config
Requires: xorg-x11-fonts-core
Provides: XFree86-Xvnc
Provides: vnc:/usr/X11R6/bin/Xvnc
Obsoletes: XFree86-Xvnc
%ifarch ia64
Provides: vnc-x86
Obsoletes: vnc-x86
%endif
%description -n xorg-x11-Xvnc
An X Window System server for Virtual Network Computing (VNC).
%endif
%prep
%setup -q -n xorg-server-%{dirsuffix} -a4
# Early verification if the ABI Defines are correct. Let's not waste build cycles if the Provides are wrong at the end.
sh %{SOURCE99} --verify . %{SOURCE98}
cp %{SOURCE96} .
%patch0 -p1
%patch2
%patch16 -p1
%if %vnc
### Needs to be rebased
#%patch17 -p1
#%patch18 -p1
#%patch19 -p1
#%patch20 -p1
#%patch21 -p1
#%patch22 -p1
#%patch23 -p1
#%patch24 -p1
%endif
### Needs to be rebased
#%patch45 -p0
%patch77
%patch79 -p1
%patch101 -p1
%patch103
%patch106 -p1
%patch112 -p0
%patch123 -p0
### disabled for now
#%patch125 -p1
%patch127 -p1
%patch143 -p0
%patch145 -p0
### disabled for now
#%patch162 -p1
%patch200 -p1
%patch202 -p1
%patch203 -p1
%patch206 -p0
### disabled for now
#%patch211 -p1
%patch213 -p1
### Disable backtrace generation patch for now
#%patch220 -p1
### patch222 might not be applicable anymore
#%patch222 -p1
%patch225 -p1
%patch226 -p0
%patch227 -p1
%patch228 -p1
%patch229 -p1
%patch230 -p1
%patch231 -p1
%patch232 -p1
%patch233 -p1
%build
autoreconf -fi
%configure CFLAGS="%{optflags} -fno-strict-aliasing" \
--sysconfdir=/etc \
--enable-install-libxf86config \
--enable-xdmcp \
--enable-xdm-auth-1 \
--enable-dri \
--enable-dri2 \
--enable-dmx \
--enable-xnest \
--enable-kdrive \
--enable-kdrive-evdev \
--enable-xephyr \
--disable-xfake \
--disable-xfbdev \
--enable-record \
--enable-xcsecurity \
--with-sha1=libcrypto \
%ifarch s390 s390x
--disable-xorg \
--disable-aiglx \
%else
--enable-xorg \
%if 0%{?suse_version} > 1120
--enable-config-udev \
%endif
%endif
%if %vnc
--disable-xcliplist \
%endif
--with-log-dir="/var/log" \
--with-os-name="openSUSE" \
--with-os-vendor="SUSE LINUX" \
--with-fontrootdir="/usr/share/fonts" \
--with-xkb-path="/usr/share/X11/xkb" \
--with-xkb-output="/var/lib/xkb/compiled" \
--with-default-font-path="/usr/share/fonts/misc:unscaled,\
/usr/share/fonts/Type1/,/usr/share/fonts/100dpi:unscaled,\
%if 0%{?suse_version} > 1210
/usr/share/fonts/75dpi:unscaled,/usr/share/fonts/ghostscript/,\
%else
/usr/share/fonts/75dpi:unscaled,/usr/share/fonts/URW/,\
%endif
/usr/share/fonts/cyrillic:unscaled,\
/usr/share/fonts/misc/sgi:unscaled,\
/usr/share/fonts/truetype/,built-ins"
make %{?_smp_mflags}
make -C hw/kdrive %{?_smp_mflags}
%install
%make_install
make -C hw/kdrive install DESTDIR=%{buildroot}
%ifnarch s390 s390x
# remove .la files
find %{buildroot}%{_libdir}/xorg/modules/ -name "*.la" | \
xargs rm
install -m 644 hw/xfree86/parser/{xf86Parser.h,xf86Optrec.h} \
%{buildroot}%{_includedir}/xorg
# bnc #632737
chmod u-s %{buildroot}%{_bindir}/Xorg
mkdir -p %{buildroot}%{_localstatedir}/lib/X11
ln -snf ../../../usr/bin/Xorg %{buildroot}%{_localstatedir}/lib/X11/X
ln -snf ../../var/lib/X11/X %{buildroot}%{_bindir}/X
%if 0%{?suse_version} > 1120
%ifnarch s390 s390x
mkdir -p %{buildroot}%{_sysconfdir}/X11/xorg.conf.d
cp %{buildroot}/%{_datadir}/X11/xorg.conf.d/10-evdev.conf %{buildroot}%{_sysconfdir}/X11/xorg.conf.d/
%endif
%endif
mkdir -p %{buildroot}%{_libdir}/xorg/modules/updates/{fonts,input,linux,drivers,multimedia,extensions}
install -m 644 $RPM_SOURCE_DIR/README.updates %{buildroot}%{_libdir}/xorg/modules/updates
mkdir -p %{buildroot}%{_sysconfdir}/modprobe.d
install -m 644 $RPM_SOURCE_DIR/modprobe.nvidia %{buildroot}%{_sysconfdir}/modprobe.d/50-nvidia.conf
%else
rm -f %{buildroot}%{_datadir}/aclocal/*.m4
%endif
%if %vnc
mkdir -p %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services
cat > %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/%{name} << EOF
## Name: VNC Server
## Description: Opens ports for VNC Server
TCP="5801 5901"
EOF
%endif
%ifarch s390 s390x
rm -f %{buildroot}%{_sysconfdir}/X11/10-evdev.conf
make -C hw/xfree86/parser
mkdir -p %{buildroot}%{_includedir}/xorg \
%{buildroot}%{_libdir}
install -m 644 hw/xfree86/parser/{xf86Parser.h,xf86Optrec.h} \
%{buildroot}%{_includedir}/xorg
install -m 644 include/list.h \
%{buildroot}%{_includedir}/xorg
if [ -f hw/xfree86/parser/.libs/libxf86config.a ] ; then
install -m 644 hw/xfree86/parser/.libs/libxf86config.a \
%{buildroot}//usr/%{_lib}
else
install -m 644 hw/xfree86/parser/libxf86config.a \
%{buildroot}//usr/%{_lib}
fi
%endif
%ifnarch s390 s390x
mkdir -p %{buildroot}%{_localstatedir}/adm/fillup-templates
install -m 644 %_sourcedir/sysconfig.displaymanager.template \
%{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.displaymanager-%{name}
%endif
install -m 755 $RPM_SOURCE_DIR/xorg-backtrace %{buildroot}%{_bindir}/xorg-backtrace
install -D xorg-x11-server.macros %{buildroot}%{_sysconfdir}/rpm/macros.xorg-server
%post
%ifnarch s390 s390x
%{fillup_only -an displaymanager}
if [ -f etc/X11/xorg.conf ]; then
# Document how to restore previous input driver behaviour in xorg.conf files created
# on openSUSE <= 11.1
if ! grep -q "will be disabled unless 'Option \"AutoAddDevices\" \"off\"'" etc/X11/xorg.conf; then
if ! grep -q "\"AutoAddDevices\" \"off\"" etc/X11/xorg.conf; then
sed -i '
/Section "ServerFlags"/{
h
g
a\
# Uncomment the following option to reenable kbd/mouse driver input sections. \
# Otherwise evdev driver is used. \
#Option "AutoAddDevices" "off"
}
' etc/X11/xorg.conf
fi
fi
fi
%endif
exit 0
%files
%defattr(-,root,root)
%ifnarch s390 s390x
%if 0%{?suse_version} > 1120
%dir %{_sysconfdir}/X11/xorg.conf.d
%config(noreplace) %{_sysconfdir}/X11/xorg.conf.d/10-evdev.conf
%dir %{_datadir}/X11/xorg.conf.d
%{_datadir}/X11/xorg.conf.d/10-evdev.conf
%endif
%dir %{_sysconfdir}/modprobe.d
%dir %{_localstatedir}/lib/X11
%endif
%dir %{_localstatedir}/lib/xkb
%dir %{_localstatedir}/lib/xkb/compiled
%dir %{_libdir}/xorg
%{_libdir}/xorg/protocol.txt
%{_mandir}/man1/*
%exclude %{_mandir}/man1/Xdmx.1*
%exclude %{_mandir}/man1/Xephyr.1*
%exclude %{_mandir}/man1/Xnest.1*
%{_localstatedir}/lib/xkb/compiled/README.compiled
%ifnarch s390 s390x
%{_sysconfdir}/modprobe.d/50-nvidia.conf
%{_bindir}/Xorg
%{_bindir}/X
%{_bindir}/cvt
%{_bindir}/gtf
%{_libdir}/xorg/modules/
%{_mandir}/man4/*
%{_mandir}/man5/*
%{_localstatedir}/adm/fillup-templates/sysconfig.displaymanager-%{name}
%{_localstatedir}/lib/X11/X
%endif
%{_bindir}/Xvfb
%{_bindir}/xorg-backtrace
%files extra
%defattr(-,root,root)
%{_bindir}/Xephyr
%{_bindir}/Xnest
%{_bindir}/Xdmx
%{_bindir}/dmxaddinput
%{_bindir}/dmxaddscreen
%{_bindir}/dmxinfo
%{_bindir}/dmxreconfig
%{_bindir}/dmxresize
%{_bindir}/dmxrminput
%{_bindir}/dmxrmscreen
%{_bindir}/dmxtodmx
%{_bindir}/dmxwininfo
%{_bindir}/vdltodmx
%{_bindir}/xdmxconfig
%{_mandir}/man1/Xdmx.1*
%{_mandir}/man1/Xephyr.1*
%{_mandir}/man1/Xnest.1*
%files sdk
%defattr(-,root,root)
%{_includedir}/xorg/
%{_libdir}/*.a
%ifnarch s390 s390x
%exclude %{_libdir}/libxf86config.la
%{_libdir}/pkgconfig/*.pc
%{_datadir}/aclocal/*.m4
%endif
%{_sysconfdir}/rpm/macros.xorg-server
%if %vnc
%files -n xorg-x11-Xvnc
%defattr(-, root, root)
%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/%{name}
#%{_bindir}/Xvnc
%endif
%changelog
++++++ N_0001-Check-harder-for-primary-PCI-device.patch ++++++
>From 35540106538b24ca1765e752fe9d6efc968a88fa Mon Sep 17 00:00:00 2001
From: Egbert Eich <eich(a)linux-p1mv.site>
Date: Wed, 7 Oct 2009 16:31:44 +0200
Subject: [PATCH] Check harder for primary PCI device.
Primary PCI devices are identified by checking for an 'PCIINFOCLASSES'
device which is VGA and has access to the memory bars enabled.
If there should be more than one device for which this is true
redo the check and also check if IO resoures are also enabled,
if this still doesn't turn up a unique result also check for
the presence of a BIOS rom.
================================================================================
Index: xorg-server-1.12.1/hw/xfree86/common/xf86pciBus.c
===================================================================
--- xorg-server-1.12.1.orig/hw/xfree86/common/xf86pciBus.c
+++ xorg-server-1.12.1/hw/xfree86/common/xf86pciBus.c
@@ -134,9 +134,50 @@ xf86PciProbe(void)
primaryBus.id.pci = info;
}
else {
- xf86Msg(X_NOTICE,
- "More than one possible primary device found\n");
- primaryBus.type ^= (BusType) (-1);
+ /*
+ * Ok, we found more than one possible primary device with this heuristic
+ * Now also check if IO is enabled.
+ */
+ int j;
+
+ primaryBus.type = BUS_NONE;
+ for (j = 0; j < num; j++) {
+ info = xf86PciVideoInfo[j];
+ pci_device_cfg_read_u16(info, & command, 4);
+
+ if ((command & PCI_CMD_MEM_ENABLE)
+ && (command & PCI_CMD_IO_ENABLE)
+ && (IS_VGA(info->device_class))) {
+ if (primaryBus.type == BUS_NONE) {
+ primaryBus.type = BUS_PCI;
+ primaryBus.id.pci = info;
+ } else {
+ primaryBus.type = BUS_NONE;
+ for (j = 0; j < num; j++) {
+ info = xf86PciVideoInfo[j];
+ pci_device_cfg_read_u16(info, & command, 4);
+
+ if ((command & PCI_CMD_MEM_ENABLE)
+ && (command & PCI_CMD_IO_ENABLE)
+ && (IS_VGA(info->device_class))
+ && info->rom_size) {
+ if (primaryBus.type == BUS_NONE) {
+ primaryBus.type = BUS_PCI;
+ primaryBus.id.pci = info;
+ } else {
+ xf86Msg(X_NOTICE,
+ "More than one possible primary device found\n");
+ primaryBus.type ^= (BusType)(-1);
+ break;
+ }
+ }
+ }
+ break;
+ }
+ }
+ }
+ break;
+
}
}
}
++++++ N_0001-Fix-segfault-when-killing-X-with-ctrl-alt-backspace.patch ++++++
Index: xorg-server-1.12.1/mi/misprite.c
===================================================================
--- xorg-server-1.12.1.orig/mi/misprite.c
+++ xorg-server-1.12.1/mi/misprite.c
@@ -378,6 +378,7 @@ miSpriteCloseScreen(int i, ScreenPtr pSc
pScreen->InstallColormap = pScreenPriv->InstallColormap;
pScreen->StoreColors = pScreenPriv->StoreColors;
+ miSpriteDisableDamage(pScreen, pScreenPriv);
DamageDestroy(pScreenPriv->pDamage);
free(pScreenPriv);
++++++ N_0001-Prevent-XSync-Alarms-from-senslessly-calling-CheckTr.patch ++++++
>From d1d9d4e5f8f9ac1d22e1258759d6ee9e49c7fe90 Mon Sep 17 00:00:00 2001
From: Egbert Eich <eich(a)freedesktop.org>
Date: Fri, 9 Apr 2010 15:10:32 +0200
Subject: [PATCH] Prevent XSync Alarms from senslessly calling CheckTrigger() when inactive.
If an XSync Alarm is set to inactive there is no need to check if a trigger
needs to fire. Doing so if the counter is the IdleCounter will put the
server on 100 percent CPU load since the select timeout is set to 0.
---
xorg-server-1.8.0/Xext/sync.c | 11 +++++++++--
xorg-server-1.8.0/Xext/syncsrv.h | 1 +
2 files changed, 10 insertions(+), 2 deletions(-)
Index: xorg-server-1.8.0/Xext/sync.c
===================================================================
--- xorg-server-1.8.0.orig/Xext/sync.c
+++ xorg-server-1.8.0/Xext/sync.c
@@ -518,6 +518,10 @@ SyncAlarmTriggerFired(SyncTrigger *pTrig
pAlarm->state = XSyncAlarmInactive;
}
}
+ /* Stop server from looping! */
+ if (pAlarm->state == XSyncAlarmInactive)
+ SyncDeleteTriggerFromCounter(&pAlarm->trigger);
+
/* The AlarmNotify event has to have the "new state of the alarm"
* which we can't be sure of until this point. However, it has
* to have the "old" trigger test value. That's the reason for
@@ -730,7 +734,7 @@ SyncChangeAlarmAttributes(ClientPtr clie
XSyncCounter counter;
Mask origmask = mask;
- counter = pAlarm->trigger.pCounter ? pAlarm->trigger.pCounter->id : None;
+ counter = pAlarm->counter_id;
while (mask)
{
@@ -741,7 +745,7 @@ SyncChangeAlarmAttributes(ClientPtr clie
case XSyncCACounter:
mask &= ~XSyncCACounter;
/* sanity check in SyncInitTrigger */
- counter = *values++;
+ counter = pAlarm->counter_id = *values++;
break;
case XSyncCAValueType:
@@ -808,6 +812,14 @@ SyncChangeAlarmAttributes(ClientPtr clie
return BadMatch;
}
}
+ if (pAlarm->state == XSyncAlarmInactive) {
+ /*
+ * If we are inactive the trigger has been deleted from the counter.
+ * Persuade SyncInitTrigger() to readd it.
+ */
+ origmask |= XSyncCACounter;
+ pAlarm->trigger.pCounter = NULL;
+ }
/* postpone this until now, when we're sure nothing else can go wrong */
if ((status = SyncInitTrigger(client, &pAlarm->trigger, counter,
@@ -815,6 +827,7 @@ SyncChangeAlarmAttributes(ClientPtr clie
return status;
/* XXX spec does not really say to do this - needs clarification */
+ /* It's the only place where it is set to XSyncAlarmActive! */
pAlarm->state = XSyncAlarmActive;
return Success;
}
@@ -1617,8 +1630,10 @@ ProcSyncCreateAlarm(ClientPtr client)
pAlarm->client = client;
pAlarm->alarm_id = stuff->id;
+ pAlarm->counter_id = None;
XSyncIntToValue(&pAlarm->delta, 1L);
pAlarm->events = TRUE;
+ /* SyncChangeAlarmAttributes() changes this - no need to set this here! */
pAlarm->state = XSyncAlarmInactive;
pAlarm->pEventClients = NULL;
status = SyncChangeAlarmAttributes(client, pAlarm, vmask,
Index: xorg-server-1.8.0/Xext/syncsrv.h
===================================================================
--- xorg-server-1.8.0.orig/Xext/syncsrv.h
+++ xorg-server-1.8.0/Xext/syncsrv.h
@@ -129,6 +129,7 @@ typedef struct _SyncAlarm {
int events;
int state;
SyncAlarmClientList *pEventClients;
+ XSyncCounter counter_id;
} SyncAlarm;
typedef struct {
++++++ N_0001-Xinput-Catch-missing-configlayout-when-deleting-dev.patch ++++++
>From 829037395f8b93e69a30852a95e378f78c3ccd6b Mon Sep 17 00:00:00 2001
From: Luc Verhaegen <libv(a)skynet.be>
Date: Wed, 12 Nov 2008 17:09:33 +0100
Subject: [PATCH] Xinput: Catch missing configlayout when deleting device.
In DeleteInputDeviceRequest (xf86Xinput.c), we access idev members
even if idev is null. This takes down the xserver hard in some cases
(kernel SIGABRT), and segfaults on other cases.
================================================================================
--- xorg-server-1.7.99/hw/xfree86/common/xf86Xinput.c
+++ xorg-server-1.7.99/hw/xfree86/common/xf86Xinput.c
@@ -870,17 +870,20 @@
else
xf86DeleteInput(pInfo, 0);
- /* devices added through HAL aren't in the config layout */
- it = xf86ConfigLayout.inputs;
- while(*it && *it != idev)
- it++;
-
- if (!(*it)) /* end of list, not in the layout */
+ if (idev)
{
- free(idev->driver);
- free(idev->identifier);
- xf86optionListFree(idev->commonOptions);
- free(idev);
+ /* devices added through HAL aren't in the config layout */
+ it = xf86ConfigLayout.inputs;
+ while(*it && *it != idev)
+ it++;
+
+ if (!(*it)) /* end of list, not in the layout */
+ {
+ free(idev->driver);
+ free(idev->identifier);
+ xf86optionListFree(idev->commonOptions);
+ free(idev);
+ }
}
}
OsReleaseSignals();
++++++ N_Use-external-tool-for-creating-backtraces-on-crashes.patch ++++++
>From bb4e768eaf8025d3ccf369cbad9a9b8be721e7ac Mon Sep 17 00:00:00 2001
From: Matthias Hopf <mhopf(a)suse.de>
Date: Wed, 25 Aug 2010 14:12:48 +0200
Subject: [PATCH] Use external tool for creating backtraces on crashes if available.
This calls /usr/bin/xorg-backtrace to create reasonable commented backtraces
with gdb. On errors it falls back to the generic method.
Signed-off-by: Matthias Hopf <mhopf(a)suse.de>
---
os/backtrace.c | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 82 insertions(+), 0 deletions(-)
diff --git a/os/backtrace.c b/os/backtrace.c
index 7ca6dab..1e3201a 100644
--- a/os/backtrace.c
+++ b/os/backtrace.c
@@ -28,6 +28,81 @@
#include "os.h"
#include "misc.h"
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <errno.h>
+
+#define XORG_BACKTRACE "/usr/bin/xorg-backtrace"
+
+/* Call gdb to create reasonable(!) backtrace. Returns 0 if successfull. */
+static int xorg_backtrace_gdb(void)
+{
+ static const char *xorg_backtrace = XORG_BACKTRACE;
+ char pidstr[12];
+ char fdname[] = "/tmp/xorg.XXXXXX";
+ char buf[256];
+ pid_t pid;
+ int fd, status = -1, ret;
+ FILE *f;
+
+ if (access (xorg_backtrace, R_OK | X_OK) != 0) {
+ ErrorF ("%s not found, using internal backtrace system\n", xorg_backtrace);
+ return 1;
+ }
+ if ( (fd = mkstemp (fdname)) == -1) {
+ ErrorF ("xorg_backtrace_gdb internal error 1\n");
+ return 1;
+ }
+ unlink (fdname);
+ snprintf (pidstr, 12, "%d", getpid());
+
+ switch ( (pid = fork()) ) {
+ case 0:
+ close (0);
+ close (1);
+ close (2);
+ dup2 (fd, 1);
+ dup2 (fd, 2);
+ close (fd);
+ execl (xorg_backtrace, xorg_backtrace, pidstr, NULL);
+ exit (-1);
+ case -1:
+ close (fd);
+ return 1;
+ }
+
+ while (waitpid (pid, &status, 0) == -1 && errno == EINTR)
+ ;
+ if (WIFEXITED (status) && WEXITSTATUS (status) == 0)
+ ret = 0;
+ else {
+ ErrorF ("%s failed with returncode %d\n", xorg_backtrace, WEXITSTATUS (status));
+ ret = 1;
+ }
+
+ lseek (fd, 0, SEEK_SET);
+ if (! (f = fdopen (fd, "r"))) {
+ ErrorF ("xorg_backtrace_gdb internal error 2\n");
+ close (fd);
+ return 1;
+ }
+ status = 0;
+ while (fgets (buf, 256, f)) {
+ status++;
+ ErrorF("%s", buf);
+ }
+ fclose (f);
+ if (status < 10 && ret == 0) {
+ ErrorF ("%s only produced %d lines of output\n", xorg_backtrace, status);
+ return 1;
+ }
+
+ return ret;
+}
+
#ifdef HAVE_BACKTRACE
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
@@ -41,6 +116,10 @@ void xorg_backtrace(void)
const char *mod;
int size, i;
Dl_info info;
+
+ if (xorg_backtrace_gdb () == 0)
+ return;
+
ErrorF("\nBacktrace:\n");
size = backtrace(array, 64);
for (i = 0; i < size; i++) {
@@ -182,6 +261,9 @@ static int xorg_backtrace_pstack(void) {
void xorg_backtrace(void) {
+ if (xorg_backtrace_gdb () == 0)
+ return;
+
ErrorF("\nBacktrace:\n");
# ifdef HAVE_PSTACK
--
1.6.0.2
++++++ N_autoconfig_fallback_fbdev_first.diff ++++++
Index: hw/xfree86/common/xf86AutoConfig.c
===================================================================
--- hw/xfree86/common/xf86AutoConfig.c.orig
+++ hw/xfree86/common/xf86AutoConfig.c
@@ -267,26 +267,26 @@ listPossibleVideoDrivers(char *matches[]
if (i < (nmatches - 1))
i = xf86PciMatchDriver(matches, nmatches);
#endif
+
+#if defined(__linux__)
+ matches[i++] = xnfstrdup("modesetting");
+#endif
/* Fallback to platform default hardware */
if (i < (nmatches - 1)) {
#if defined(__i386__) || defined(__amd64__) || defined(__hurd__)
- matches[i++] = xnfstrdup("vesa");
+ matches[i++] = xnfstrdup("fbdev");
#elif defined(__sparc__) && !defined(sun)
matches[i++] = xnfstrdup("sunffb");
#endif
}
-#if defined(__linux__)
- matches[i++] = xnfstrdup("modesetting");
-#endif
-
#if !defined(sun)
/* Fallback to platform default frame buffer driver */
if (i < (nmatches - 1)) {
#if !defined(__linux__) && defined(__sparc__)
matches[i++] = xnfstrdup("wsfb");
#else
- matches[i++] = xnfstrdup("fbdev");
+ matches[i++] = xnfstrdup("vesa");
#endif
}
#endif /* !sun */
++++++ N_bug-197858_dpms.diff ++++++
Index: hw/xfree86/common/xf86Events.c
===================================================================
--- hw/xfree86/common/xf86Events.c.orig
+++ hw/xfree86/common/xf86Events.c
@@ -115,6 +115,7 @@ typedef struct x_IHRec {
InputHandlerProc ihproc;
pointer data;
Bool enabled;
+ Bool is_input;
struct x_IHRec *next;
} IHRec, *IHPtr;
@@ -445,9 +446,13 @@ xf86VTSwitch(void)
* Keep the order: Disable Device > LeaveVT
* EnterVT > EnableDevice
*/
- for (ih = InputHandlers; ih; ih = ih->next)
+ for (ih = InputHandlers; ih; ih = ih->next) {
+ if (ih->is_input)
xf86DisableInputHandler(ih);
- for (pInfo = xf86InputDevs; pInfo; pInfo = pInfo->next) {
+ else
+ xf86DisableGeneralHandler(ih);
+ }
+ for (pInfo = xf86InputDevs; pInfo; pInfo = pInfo->next) {
if (pInfo->dev) {
xf86ReleaseKeys(pInfo->dev);
ProcessInputEvents();
@@ -486,8 +491,12 @@ xf86VTSwitch(void)
EnableDevice(pInfo->dev, TRUE);
pInfo = pInfo->next;
}
- for (ih = InputHandlers; ih; ih = ih->next)
- xf86EnableInputHandler(ih);
+ for (ih = InputHandlers; ih; ih = ih->next) {
+ if (ih->is_input)
+ xf86EnableInputHandler(ih);
+ else
+ xf86EnableGeneralHandler(ih);
+ }
xf86UnblockSIGIO(prevSIGIO);
@@ -542,8 +551,12 @@ xf86VTSwitch(void)
pInfo = pInfo->next;
}
- for (ih = InputHandlers; ih; ih = ih->next)
- xf86EnableInputHandler(ih);
+ for (ih = InputHandlers; ih; ih = ih->next) {
+ if (ih->is_input)
+ xf86EnableInputHandler(ih);
+ else
+ xf86EnableGeneralHandler(ih);
+ }
xf86UnblockSIGIO(prevSIGIO);
}
@@ -579,8 +592,10 @@ xf86AddInputHandler(int fd, InputHandler
{
IHPtr ih = addInputHandler(fd, proc, data);
- if (ih)
+ if (ih) {
AddEnabledDevice(fd);
+ ih->is_input = TRUE;
+ }
return ih;
}
++++++ N_bug534768-prefer_local_symbols.patch ++++++
Index: xorg-server-1.12.1/hw/xfree86/loader/loader.c
===================================================================
--- xorg-server-1.12.1.orig/hw/xfree86/loader/loader.c
+++ xorg-server-1.12.1/hw/xfree86/loader/loader.c
@@ -152,7 +152,7 @@ LoaderSymbol(const char *name)
return p;
if (!global_scope)
- global_scope = dlopen(NULL, DLOPEN_LAZY | DLOPEN_GLOBAL);
+ global_scope = dlopen(NULL, DLOPEN_LAZY | DLOPEN_GLOBAL | RTLD_DEEPBIND);
if (global_scope)
return dlsym(global_scope, name);
++++++ N_cache-xkbcomp-output-for-fast-start-up.patch ++++++
>From 0f70ba9d3412b17ac4e08e33e1be3c226c06ea54 Mon Sep 17 00:00:00 2001
From: Yan Li <yan.i.li(a)intel.com>
Date: Tue, 12 May 2009 17:49:07 +0800
Subject: [PATCH] XKB: cache xkbcomp output for fast start-up v5 for 1.6.1
Organization: Intel
xkbcomp outputs will be cached in files with hashed keymap as
names. This saves boot time for around 1s on commodity netbooks.
Signed-off-by: Yan Li <yan.i.li(a)intel.com>
================================================================================
--- xorg-server-1.7.99/configure.ac
+++ xorg-server-1.7.99/configure.ac
@@ -527,9 +527,9 @@
AC_ARG_WITH(xkb-path, AS_HELP_STRING([--with-xkb-path=PATH], [Path to XKB base dir (default: ${datadir}/X11/xkb)]),
[ XKBPATH="$withval" ],
[ XKBPATH="${datadir}/X11/xkb" ])
-AC_ARG_WITH(xkb-output, AS_HELP_STRING([--with-xkb-output=PATH], [Path to XKB output dir (default: ${datadir}/X11/xkb/compiled)]),
+AC_ARG_WITH(xkb-output, AS_HELP_STRING([--with-xkb-output=PATH], [Path to XKB output dir (default: ${localstatedir}/cache/xkb)]),
[ XKBOUTPUT="$withval" ],
- [ XKBOUTPUT="compiled" ])
+ [ XKBOUTPUT="${localstatedir}/cache/xkb" ])
AC_ARG_WITH(default-xkb-rules, AS_HELP_STRING([--with-default-xkb-rules=RULES],
[Keyboard ruleset (default: base/evdev)]),
[ XKB_DFLT_RULES="$withval" ],
@@ -1160,7 +1160,7 @@
dnl Make sure XKM_OUTPUT_DIR is an absolute path
XKBOUTPUT_FIRSTCHAR=`echo $XKBOUTPUT | cut -b 1`
if [[ x$XKBOUTPUT_FIRSTCHAR != x/ -a x$XKBOUTPUT_FIRSTCHAR != 'x$' ]] ; then
- XKBOUTPUT="$XKB_BASE_DIRECTORY/$XKBOUTPUT"
+ AC_MSG_ERROR([xkb-output must be an absolute path.])
fi
dnl XKM_OUTPUT_DIR (used in code) must end in / or file names get hosed
--- xorg-server-1.7.99/xkb/README.compiled
+++ xorg-server-1.7.99/xkb/README.compiled
@@ -4,10 +4,10 @@
or some other tool might destroy or replace the files in this directory,
so it is not a safe place to store compiled keymaps for long periods of
time. The default keymap for any server is usually stored in:
- X<num>-default.xkm
-where <num> is the display number of the server in question, which makes
-it possible for several servers *on the same host* to share the same
-directory.
+ server-<SHA1>.xkm
+
+where <SHA1> is the SHA1 hash of keymap source, so that compiled
+keymap of different keymap sources are stored in different files.
Unless the X server is modified, sharing this directory between servers on
different hosts could cause problems.
--- xorg-server-1.9.0/xkb/ddxLoad.c.orig 2010-07-14 22:23:17.000000000 +0200
+++ xorg-server-1.9.0/xkb/ddxLoad.c 2010-08-23 15:23:47.000000000 +0200
@@ -30,6 +30,12 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <xkb-config.h>
+#ifdef HAVE_SHA1_IN_LIBMD /* Use libmd for SHA1 */
+# include <sha1.h>
+#else /* Use OpenSSL's libcrypto */
+# include <stddef.h> /* buggy openssl/sha.h wants size_t */
+# include <openssl/sha.h>
+#endif
#include <stdio.h>
#include <ctype.h>
#include <X11/X.h>
@@ -43,24 +49,13 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define XKBSRV_NEED_FILE_FUNCS
#include <xkbsrv.h>
#include <X11/extensions/XI.h>
+#include <errno.h>
#include "xkb.h"
#if defined(CSRG_BASED) || defined(linux) || defined(__GNU__)
#include <paths.h>
#endif
- /*
- * If XKM_OUTPUT_DIR specifies a path without a leading slash, it is
- * relative to the top-level XKB configuration directory.
- * Making the server write to a subdirectory of that directory
- * requires some work in the general case (install procedure
- * has to create links to /var or somesuch on many machines),
- * so we just compile into /usr/tmp for now.
- */
-#ifndef XKM_OUTPUT_DIR
-#define XKM_OUTPUT_DIR "compiled/"
-#endif
-
#define PRE_ERROR_MSG "\"The XKEYBOARD keymap compiler (xkbcomp) reports:\""
#define ERROR_PREFIX "\"> \""
#define POST_ERROR_MSG1 "\"Errors from xkbcomp are not fatal to the X server\""
@@ -175,6 +170,45 @@ OutputDirectory(
}
static Bool
+Sha1Asc(char sha1Asc[SHA_DIGEST_LENGTH*2+1], const char * input)
+{
+ int i;
+ unsigned char sha1[SHA_DIGEST_LENGTH];
+
+#ifdef HAVE_SHA1_IN_LIBMD /* Use libmd for SHA1 */
+ SHA1_CTX ctx;
+
+ SHA1Init (&ctx);
+ SHA1Update (&ctx, input, strlen(input));
+ SHA1Final (sha1, &ctx);
+#else /* Use OpenSSL's libcrypto */
+ SHA_CTX ctx;
+ int success;
+
+ success = SHA1_Init (&ctx);
+ if (! success)
+ return BadAlloc;
+
+ success = SHA1_Update (&ctx, input, strlen(input));
+ if (! success)
+ return BadAlloc;
+
+ success = SHA1_Final (sha1, &ctx);
+ if (! success)
+ return BadAlloc;
+#endif
+
+ /* convert sha1 to sha1_asc */
+ for(i=0; i<SHA_DIGEST_LENGTH; ++i) {
+ sprintf(sha1Asc+i*2, "%02X", sha1[i]);
+ }
+
+ return Success;
+}
+
+/* call xkbcomp and compile XKB keymap, return xkm file name in
+ nameRtrn */
+static Bool
XkbDDXCompileKeymapByNames( XkbDescPtr xkb,
XkbComponentNamesPtr names,
unsigned want,
@@ -183,7 +217,11 @@ XkbDDXCompileKeymapByNames( XkbDescPtr
int nameRtrnLen)
{
FILE * out;
- char *buf = NULL, keymap[PATH_MAX], xkm_output_dir[PATH_MAX];
+ char * buf = NULL, xkmfile[PATH_MAX], xkm_output_dir[PATH_MAX];
+ char * tmpXkmFile = NULL;
+ char * canonicalXkmFileName = NULL;
+ char sha1Asc[SHA_DIGEST_LENGTH*2+1], xkbKeyMapBuf[100*1024];
+ int ret, result;
const char *emptystring = "";
char *xkbbasedirflag = NULL;
@@ -194,15 +232,70 @@ XkbDDXCompileKeymapByNames( XkbDescPtr
/* WIN32 has no popen. The input must be stored in a file which is
used as input for xkbcomp. xkbcomp does not read from stdin. */
char tmpname[PATH_MAX];
- const char *xkmfile = tmpname;
+ const char *xkbfile = tmpname;
#else
- const char *xkmfile = "-";
+ const char *xkbfile = "-";
+#endif
+
+ /* Write keymap source (xkbfile) to memory buffer `xkbKeyMapBuf',
+ of which SHA1 is generated and used as result xkm file name */
+ memset(xkbKeyMapBuf, 0, sizeof(xkbKeyMapBuf));
+ out = fmemopen(xkbKeyMapBuf, sizeof(xkbKeyMapBuf), "w");
+ if (NULL == out) {
+ ErrorF("[xkb] Open xkbKeyMapBuf for writing failed\n");
+ return FALSE;
+ }
+ ret = XkbWriteXKBKeymapForNames(out, names, xkb, want, need);
+ if (fclose(out) !=0)
+ {
+ ErrorF("[xkb] XkbWriteXKBKeymapForNames error, perhaps xkbKeyMapBuf is too small\n");
+ return FALSE;
+ }
+#ifdef DEBUG
+ if (xkbDebugFlags) {
+ ErrorF("[xkb] XkbDDXCompileKeymapByNames compiling keymap:\n");
+ fputs(xkbKeyMapBuf, stderr);
+ }
#endif
+ if (!ret) {
+ ErrorF("[xkb] Generating XKB Keymap failed, giving up compiling keymap\n");
+ return FALSE;
+ }
- snprintf(keymap, sizeof(keymap), "server-%s", display);
+ DebugF("[xkb] computing SHA1 of keymap\n");
+ if (Success == Sha1Asc(sha1Asc, xkbKeyMapBuf)) {
+ snprintf(xkmfile, sizeof(xkmfile), "server-%s", sha1Asc);
+ }
+ else {
+ ErrorF("[xkb] Computing SHA1 of keymap failed, "
+ "using display name instead as xkm file name\n");
+ snprintf(xkmfile, sizeof(xkmfile), "server-%s", display);
+ }
OutputDirectory(xkm_output_dir, sizeof(xkm_output_dir));
+ /* set nameRtrn, fail if it's too small */
+ if ((strlen(xkmfile)+1 > nameRtrnLen) && nameRtrn) {
+ ErrorF("[xkb] nameRtrn too small to hold xkmfile name\n");
+ return FALSE;
+ }
+ strncpy(nameRtrn, xkmfile, nameRtrnLen);
+
+ /* if the xkm file already exists, reuse it */
+ canonicalXkmFileName = Xprintf("%s%s.xkm", xkm_output_dir, xkmfile);
+ if (access(canonicalXkmFileName, R_OK) == 0) {
+ /* yes, we can reuse the old xkm file */
+ LogMessage(X_INFO, "XKB: reuse xkmfile %s\n", canonicalXkmFileName);
+ result = TRUE;
+ goto _ret;
+ }
+ LogMessage(X_INFO, "XKB: generating xkmfile %s\n", canonicalXkmFileName);
+
+ /* continue to call xkbcomp to compile the keymap. to avoid race
+ condition, we compile it to a tmpfile then rename it to
+ xkmfile */
+
+
#ifdef WIN32
strcpy(tmpname, Win32TempDir());
strcat(tmpname, "\\xkb_XXXXXX");
@@ -225,14 +318,20 @@ XkbDDXCompileKeymapByNames( XkbDescPtr
}
}
+ if ( (tmpXkmFile = tempnam(xkm_output_dir, NULL)) == NULL ) {
+ ErrorF("[xkb] Can't generate temp xkm file name");
+ result = FALSE;
+ goto _ret;
+ }
+
buf = Xprintf("\"%s%sxkbcomp\" -w %d %s -xkm \"%s\" "
- "-em1 %s -emp %s -eml %s \"%s%s.xkm\"",
+ "-em1 %s -emp %s -eml %s \"%s\"",
xkbbindir, xkbbindirsep,
( (xkbDebugFlags < 2) ? 1 :
((xkbDebugFlags > 10) ? 10 : (int)xkbDebugFlags) ),
- xkbbasedirflag ? xkbbasedirflag : "", xkmfile,
+ xkbbasedirflag ? xkbbasedirflag : "", xkbfile,
PRE_ERROR_MSG, ERROR_PREFIX, POST_ERROR_MSG1,
- xkm_output_dir, keymap);
+ tmpXkmFile);
free(xkbbasedirflag);
@@ -240,7 +339,12 @@ XkbDDXCompileKeymapByNames( XkbDescPtr
LogMessage(X_ERROR, "XKB: Could not invoke xkbcomp: not enough memory\n");
return FALSE;
}
-
+
+ /* there's a potential race condition between calling tempnam()
+ and invoking xkbcomp to write the result file (potential temp
+ file name conflicts), but since xkbcomp is a standalone
+ program, we have to live with this */
+
#ifndef WIN32
out= Popen(buf,"w");
#else
@@ -248,31 +352,42 @@ XkbDDXCompileKeymapByNames( XkbDescPtr
#endif
if (out!=NULL) {
-#ifdef DEBUG
- if (xkbDebugFlags) {
- ErrorF("[xkb] XkbDDXCompileKeymapByNames compiling keymap:\n");
- XkbWriteXKBKeymapForNames(stderr,names,xkb,want,need);
- }
-#endif
- XkbWriteXKBKeymapForNames(out,names,xkb,want,need);
+ /* write XKBKeyMapBuf to xkbcomp */
+ if (EOF==fputs(xkbKeyMapBuf, out))
+ {
+ ErrorF("[xkb] Sending keymap to xkbcomp failed\n");
+ result = FALSE;
+ goto _ret;
+ }
#ifndef WIN32
if (Pclose(out)==0)
#else
if (fclose(out)==0 && System(buf) >= 0)
#endif
{
+ /* xkbcomp success */
if (xkbDebugFlags)
DebugF("[xkb] xkb executes: %s\n",buf);
- if (nameRtrn) {
- strncpy(nameRtrn,keymap,nameRtrnLen);
- nameRtrn[nameRtrnLen-1]= '\0';
+ /* if canonicalXkmFileName already exists now, we simply
+ overwrite it, this is OK */
+ ret = rename(tmpXkmFile, canonicalXkmFileName);
+ if (0 != ret) {
+ ErrorF("[xkb] Can't rename %s to %s, error: %s\n",
+ tmpXkmFile, canonicalXkmFileName,
+ strerror(errno));
+
+ /* in case of error, don't unlink tmpXkmFile, leave it
+ for debugging */
+
+ result = FALSE;
+ goto _ret;
}
- if (buf != NULL)
- free(buf);
- return TRUE;
+
+ result = TRUE;
+ goto _ret;
}
else
- LogMessage(X_ERROR, "Error compiling keymap (%s)\n", keymap);
+ LogMessage(X_ERROR, "Error compiling keymap (%s)\n", xkbfile);
#ifdef WIN32
/* remove the temporary file */
unlink(tmpname);
@@ -289,7 +404,17 @@ XkbDDXCompileKeymapByNames( XkbDescPtr
nameRtrn[0]= '\0';
if (buf != NULL)
free(buf);
- return FALSE;
+ result = FALSE;
+
+_ret:
+ if (tmpXkmFile)
+ free(tmpXkmFile);
+ if (canonicalXkmFileName)
+ xfree(canonicalXkmFileName);
+ if (buf != NULL)
+ xfree (buf);
+
+ return result;
}
static FILE *
@@ -373,7 +498,6 @@ unsigned missing;
DebugF("Loaded XKB keymap %s, defined=0x%x\n",fileName,(*xkbRtrn)->defined);
}
fclose(file);
- (void) unlink (fileName);
return (need|want)&(~missing);
}
++++++ N_confine_to_shape.diff ++++++
--- dix/events.c.orig 2012-04-17 11:34:39.714915372 -0500
+++ dix/events.c 2012-04-17 11:26:54.735728478 -0500
@@ -671,32 +671,77 @@
{
BoxRec box;
int x = *px, y = *py;
- int incx = 1, incy = 1;
+ int nbox;
+ BoxPtr pbox;
+ int d, min = (~0U >> 1), dx2, dy2, x_r, y_r;
if (RegionContainsPoint(shape, x, y, &box))
return;
- box = *RegionExtents(shape);
- /* this is rather crude */
- do {
- x += incx;
- if (x >= box.x2) {
- incx = -1;
- x = *px - 1;
+
+ for (nbox = REGION_NUM_RECTS (shape),
+ pbox = REGION_RECTS(shape);
+ nbox--;
+ pbox++)
+ {
+ if (pbox->x1 < x && pbox->x2 > x) {
+ d = pbox->y1 - y;
+ if (d >= 0) {
+ d *= d;
+ if (d < min) {
+ *px = x;
+ *py = pbox->y1 + 1;
+ min = d;
+ }
+ } else {
+ d = pbox->y2 - y; d *= d;
+ if (d < min) {
+ *px = x;
+ *py = pbox->y2 - 1;
+ min = d;
+ }
+ }
}
- else if (x < box.x1) {
- incx = 1;
- x = *px;
- y += incy;
- if (y >= box.y2) {
- incy = -1;
- y = *py - 1;
+ else if (pbox->y1 < y && pbox->y2 > y) {
+ d = pbox->x1 - x;
+ if (d >= 0) {
+ d *= d;
+ if (d < min) {
+ *px = pbox->x1 + 1;
+ *py = y;
+ min = d;
+ }
+ } else {
+ d = pbox->x2 - x; d *= d;
+ if (d < min) {
+ *px = pbox->x2 - 1;
+ *py = y;
+ min = d;
+ }
+ }
+ } else {
+ dx2 = pbox->x1 - x;
+ if (dx2 >= 0) {
+ dx2 *= dx2;
+ x_r = pbox->x1 + 1;
+ } else {
+ dx2 = pbox->x2 - x; dx2 *= dx2;
+ x_r = pbox->x2 - 1;
+ }
+ dy2 = pbox->y1 - y;
+ if (dy2 >= 0) {
+ dy2 *= dy2;
+ y_r = pbox->y1 + 1;
+ } else {
+ dy2 = pbox->y2 - y; dy2 *= dy2;
+ y_r = pbox->y2 - 1;
+ }
+ if ((d = dx2 + dy2) < min) {
+ *px = x_r;
+ *py = y_r;
+ min = d;
}
- else if (y < box.y1)
- return; /* should never get here! */
}
- } while (!RegionContainsPoint(shape, x, y, &box));
- *px = x;
- *py = y;
+ }
}
static void
++++++ N_dpms_screensaver.diff ++++++
Index: xorg-server-1.12.1/hw/xfree86/common/xf86DPMS.c
===================================================================
--- xorg-server-1.12.1.orig/hw/xfree86/common/xf86DPMS.c
+++ xorg-server-1.12.1/hw/xfree86/common/xf86DPMS.c
@@ -151,7 +151,8 @@ DPMSSet(ClientPtr client, int level)
rc = dixSaveScreens(client, SCREEN_SAVER_FORCER, ScreenSaverActive);
if (rc != Success)
return rc;
- }
+ } else
+ dixSaveScreens(client, SCREEN_SAVER_FORCER, ScreenSaverReset);
/* For each screen, set the DPMS level */
for (i = 0; i < xf86NumScreens; i++) {
++++++ N_driver-autoconfig.diff ++++++
Index: hw/xfree86/common/xf86pciBus.c
===================================================================
--- hw/xfree86/common/xf86pciBus.c.orig
+++ hw/xfree86/common/xf86pciBus.c
@@ -1107,7 +1107,8 @@ videoPtrToDriverList(struct pci_device *
driverList[0] = "ast";
break;
case 0x1002:
- driverList[0] = "ati";
+ driverList[0] = "fglrx";
+ driverList[1] = "ati";
break;
case 0x102c:
driverList[0] = "chips";
@@ -1139,6 +1141,13 @@ videoPtrToDriverList(struct pci_device *
driverList[0] = "neomagic";
break;
case 0x10de:
+ driverList[0] = "nvidia";
+ driverList[1] = "nouveau";
+ /* GeForce 6150SE support broken (bnc #465190/544674) */
+ if (dev->device_id != 0x03D0) {
+ driverList[2] = "nv";
+ }
+ break;
case 0x12d2:
{
int idx = 0;
@@ -1150,7 +1159,8 @@ videoPtrToDriverList(struct pci_device *
break;
}
case 0x1106:
- driverList[0] = "openchrome";
+ driverList[0] = "via";
+ driverList[1] = "openchrome";
break;
case 0x1b36:
driverList[0] = "qxl";
++++++ N_edid_data_sanity_check.diff ++++++
Index: xorg-server-1.6.3.901/hw/xfree86/modes/xf86Crtc.c
================================================================================
--- xorg-server-1.7.99/hw/xfree86/modes/xf86Crtc.c
+++ xorg-server-1.7.99/hw/xfree86/modes/xf86Crtc.c
@@ -2916,8 +2916,14 @@
p->output->MonInfo->features.vsize);
if (det_mon->type == DT &&
det_mon->section.d_timings.h_size != 0 &&
- det_mon->section.d_timings.v_size != 0) {
-
+ det_mon->section.d_timings.v_size != 0 &&
+ det_mon->section.d_timings.v_size != 0 &&
+ /* some sanity checking for aspect ration */
+ ((det_mon->section.d_timings.h_size /
+ det_mon->section.d_timings.v_size) < 2) &&
+ ((det_mon->section.d_timings.v_size /
+ det_mon->section.d_timings.h_size) < 2)
+ ) {
p->output->mm_width = det_mon->section.d_timings.h_size;
p->output->mm_height = det_mon->section.d_timings.v_size;
p->ret = TRUE;
++++++ N_fbdevhw.diff ++++++
Index: hw/xfree86/fbdevhw/fbdevhw.c
===================================================================
--- hw/xfree86/fbdevhw/fbdevhw.c.orig
+++ hw/xfree86/fbdevhw/fbdevhw.c
@@ -858,9 +858,10 @@ fbdevHWDPMSSet(ScrnInfoPtr pScrn, int mo
return;
}
+ /* Novell Bug #146462 */
if (-1 == ioctl(fPtr->fd, FBIOBLANK, (void *) fbmode))
- xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
- "FBIOBLANK: %s\n", strerror(errno));
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "FBIOBLANK: %s (Screen blanking not supported by vesafb of Linux Kernel)\n", strerror(errno));
}
Bool
@@ -875,9 +876,10 @@ fbdevHWSaveScreen(ScreenPtr pScreen, int
unblank = xf86IsUnblank(mode);
+ /* Novell Bug #146462 */
if (-1 == ioctl(fPtr->fd, FBIOBLANK, (void *) (1 - unblank))) {
- xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
- "FBIOBLANK: %s\n", strerror(errno));
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "FBIOBLANK: %s (Screen blanking not supported by vesafb of Linux Kernel)\n", strerror(errno));
return FALSE;
}
++++++ N_fix-dpi-values.diff ++++++
Index: hw/xfree86/common/xf86Helper.c
===================================================================
--- hw/xfree86/common/xf86Helper.c.orig
+++ hw/xfree86/common/xf86Helper.c
@@ -922,12 +922,22 @@ xf86SetDpi(ScrnInfoPtr pScrn, int x, int
else if (pScrn->widthmm > 0 || pScrn->heightmm > 0) {
from = X_CONFIG;
if (pScrn->widthmm > 0) {
- pScrn->xDpi =
- (int) ((double) pScrn->virtualX * MMPERINCH / pScrn->widthmm);
+ if (pScrn->modes && pScrn->modes->HDisplay > 0) {
+ pScrn->xDpi =
+ (int)((double) pScrn->modes->HDisplay * MMPERINCH / pScrn->widthmm);
+ } else {
+ pScrn->xDpi =
+ (int)((double)pScrn->virtualX * MMPERINCH / pScrn->widthmm);
+ }
}
if (pScrn->heightmm > 0) {
- pScrn->yDpi =
- (int) ((double) pScrn->virtualY * MMPERINCH / pScrn->heightmm);
+ if (pScrn->modes && pScrn->modes->VDisplay > 0) {
+ pScrn->yDpi =
+ (int)((double)pScrn->modes->VDisplay * MMPERINCH / pScrn->heightmm);
+ } else {
+ pScrn->yDpi =
+ (int)((double)pScrn->virtualY * MMPERINCH / pScrn->heightmm);
+ }
}
if (pScrn->xDpi > 0 && pScrn->yDpi <= 0)
pScrn->yDpi = pScrn->xDpi;
@@ -966,12 +976,22 @@ xf86SetDpi(ScrnInfoPtr pScrn, int x, int
pScrn->widthmm = ddcWidthmm;
pScrn->heightmm = ddcHeightmm;
if (pScrn->widthmm > 0) {
- pScrn->xDpi =
- (int) ((double) pScrn->virtualX * MMPERINCH / pScrn->widthmm);
+ if (pScrn->modes && pScrn->modes->HDisplay > 0) {
+ pScrn->xDpi =
+ (int)((double) pScrn->modes->HDisplay * MMPERINCH / pScrn->widthmm);
+ } else {
+ pScrn->xDpi =
+ (int)((double)pScrn->virtualX * MMPERINCH / pScrn->widthmm);
+ }
}
if (pScrn->heightmm > 0) {
- pScrn->yDpi =
- (int) ((double) pScrn->virtualY * MMPERINCH / pScrn->heightmm);
+ if (pScrn->modes && pScrn->modes->VDisplay > 0) {
+ pScrn->yDpi =
+ (int)((double)pScrn->modes->VDisplay * MMPERINCH / pScrn->heightmm);
+ } else {
+ pScrn->yDpi =
+ (int)((double)pScrn->virtualY * MMPERINCH / pScrn->heightmm);
+ }
}
if (pScrn->xDpi > 0 && pScrn->yDpi <= 0)
pScrn->yDpi = pScrn->xDpi;
++++++ N_fix_fglrx_screendepth_issue.patch ++++++
Index: hw/xfree86/common/xf86AutoConfig.c
===================================================================
--- hw/xfree86/common/xf86AutoConfig.c.orig
+++ hw/xfree86/common/xf86AutoConfig.c
@@ -75,6 +75,13 @@
"\tDevice\t" BUILTIN_DEVICE_NAME "\n" \
"EndSection\n\n"
+#define BUILTIN_SCREEN_SECTION_FOR_FGLRX \
+ "Section \"Screen\"\n" \
+ "\tIdentifier\t" BUILTIN_SCREEN_NAME "\n" \
+ "\tDevice\t" BUILTIN_DEVICE_NAME "\n" \
+ "\tDefaultDepth\t24\n" \
+ "EndSection\n\n"
+
#define BUILTIN_LAYOUT_SECTION_PRE \
"Section \"ServerLayout\"\n" \
"\tIdentifier\t\"Builtin Default Layout\"\n"
@@ -153,7 +160,10 @@ xf86AutoConfig(void)
for (p = deviceList; *p; p++) {
snprintf(buf, sizeof(buf), BUILTIN_DEVICE_SECTION, *p, 0, *p);
AppendToConfig(buf);
- snprintf(buf, sizeof(buf), BUILTIN_SCREEN_SECTION, *p, 0, *p, 0);
+ if( strcmp(*p, "fglrx") == 0 )
+ snprintf(buf, sizeof(buf), BUILTIN_SCREEN_SECTION_FOR_FGLRX, *p, 0, *p, 0);
+ else
+ snprintf(buf, sizeof(buf), BUILTIN_SCREEN_SECTION, *p, 0, *p, 0);
AppendToConfig(buf);
}
++++++ N_p_default-module-path.diff ++++++
Index: hw/xfree86/common/xf86Globals.c
===================================================================
--- hw/xfree86/common/xf86Globals.c.orig
+++ hw/xfree86/common/xf86Globals.c
@@ -135,7 +135,7 @@ xf86InfoRec xf86Info = {
const char *xf86ConfigFile = NULL;
const char *xf86ConfigDir = NULL;
-const char *xf86ModulePath = DEFAULT_MODULE_PATH;
+const char *xf86ModulePath = DEFAULT_MODULE_PATH "/updates," DEFAULT_MODULE_PATH;
MessageType xf86ModPathFrom = X_DEFAULT;
const char *xf86LogFile = DEFAULT_LOGPREFIX;
MessageType xf86LogFileFrom = X_DEFAULT;
++++++ N_p_xnest-ignore-getimage-errors.diff ++++++
Index: xorg-server-1.12.1/hw/xnest/GCOps.c
===================================================================
--- xorg-server-1.12.1.orig/hw/xnest/GCOps.c
+++ xorg-server-1.12.1/hw/xnest/GCOps.c
@@ -94,15 +94,26 @@ xnestPutImage(DrawablePtr pDrawable, GCP
}
}
+static int
+xnestIgnoreErrorHandler (Display *display,
+ XErrorEvent *event)
+{
+ return False; /* return value is ignored */
+}
+
void
xnestGetImage(DrawablePtr pDrawable, int x, int y, int w, int h,
unsigned int format, unsigned long planeMask, char *pImage)
{
XImage *ximage;
int length;
+ int (*old_handler)(Display*, XErrorEvent*);
+ /* we may get BadMatch error when xnest window is minimized */
+ old_handler = XSetErrorHandler (xnestIgnoreErrorHandler);
ximage = XGetImage(xnestDisplay, xnestDrawable(pDrawable),
x, y, w, h, planeMask, format);
+ XSetErrorHandler (old_handler);
if (ximage) {
length = ximage->bytes_per_line * ximage->height;
++++++ N_randr1_1-sig11.diff ++++++
Index: xorg-server-1.12.1/hw/xfree86/common/xf86RandR.c
===================================================================
--- xorg-server-1.12.1.orig/hw/xfree86/common/xf86RandR.c
+++ xorg-server-1.12.1/hw/xfree86/common/xf86RandR.c
@@ -237,6 +237,9 @@ xf86RandRSetConfig(ScreenPtr pScreen,
DeviceIntPtr dev;
Bool view_adjusted = FALSE;
+ if (!scrp->vtSema)
+ return FALSE;
+
for (dev = inputInfo.devices; dev; dev = dev->next) {
if (!IsMaster(dev) && !IsFloating(dev))
continue;
++++++ N_sync-fix.patch ++++++
Index: xorg-server-1.12.1/Xext/sync.c
===================================================================
--- xorg-server-1.12.1.orig/Xext/sync.c
+++ xorg-server-1.12.1/Xext/sync.c
@@ -2615,9 +2615,43 @@ static XSyncValue *pIdleTimeValueGreater
static void
IdleTimeQueryValue(pointer pCounter, CARD64 * pValue_return)
{
- CARD32 idle = GetTimeInMillis() - lastDeviceEventTime.milliseconds;
+ static CARD32 previousLastDeviceEventTimeMilliseconds = 0;
+ CARD32 now = GetTimeInMillis();
+ CARD32 idle = now - lastDeviceEventTime.milliseconds;
+ CARD32 previousIdle = now - previousLastDeviceEventTimeMilliseconds;
+ SyncCounter *pIdleTimeCounter = (SyncCounter*)pCounter;
XSyncIntsToValue(pValue_return, idle, 0);
+ if (pCounter == NULL)
+ {
+ return;
+ }
+ if (previousLastDeviceEventTimeMilliseconds == 0)
+ {
+ /* initialize static var when this function is invoked the first time. */
+ previousLastDeviceEventTimeMilliseconds = lastDeviceEventTime.milliseconds;
+ return;
+ }
+
+ if (previousLastDeviceEventTimeMilliseconds == lastDeviceEventTime.milliseconds)
+ {
+ /* no new user event, no need to change idle counter. */
+ return;
+ }
+ previousLastDeviceEventTimeMilliseconds = lastDeviceEventTime.milliseconds;
+
+ /*
+ * Some user event occured; now update idle counter with previous
+ * event time, so idle counter has the most up-to-date value with
+ * respect to previous user event (we need old and new counter
+ * value to compute if a transition occured). Recompute bracket
+ * values if this is system counter.
+ */
+
+ XSyncIntsToValue (&pIdleTimeCounter->value, previousIdle, 0);
+ if (IsSystemCounter(pIdleTimeCounter)) {
+ SyncComputeBracketValues(pIdleTimeCounter);
+ }
}
static void
@@ -2700,7 +2734,7 @@ IdleTimeWakeupHandler(pointer env, int r
if (!pIdleTimeValueLess && !pIdleTimeValueGreater)
return;
- IdleTimeQueryValue(NULL, &idle);
+ IdleTimeQueryValue(IdleTimeCounter, &idle);
if ((pIdleTimeValueGreater &&
XSyncValueGreaterOrEqual(idle, *pIdleTimeValueGreater)) ||
++++++ N_vidmode-sig11.diff ++++++
Index: hw/xfree86/common/xf86VidMode.c
===================================================================
--- hw/xfree86/common/xf86VidMode.c.orig
+++ hw/xfree86/common/xf86VidMode.c
@@ -224,6 +224,8 @@ VidModeGetFirstModeline(int scrnIndex, p
return FALSE;
pVidMode = VMPTR(pScrn->pScreen);
+ if (!pScrn->modes)
+ return FALSE;
pVidMode->First = pScrn->modes;
pVidMode->Next = pVidMode->First->next;
++++++ N_xorg-server-xdmcp.patch ++++++
Index: xorg-server-1.12.1/os/access.c
===================================================================
--- xorg-server-1.12.1.orig/os/access.c
+++ xorg-server-1.12.1/os/access.c
@@ -714,7 +714,9 @@ DefineSelf(int fd)
/*
* ignore 'localhost' entries as they're not useful
- * on the other end of the wire
+ * on the other end of the wire and because on hosts
+ * with shared home dirs they'll result in conflicting
+ * entries in ~/.Xauthority
*/
if (ifr->ifa_flags & IFF_LOOPBACK)
continue;
@@ -735,6 +737,14 @@ DefineSelf(int fd)
else if (family == FamilyInternet6 &&
IN6_IS_ADDR_LOOPBACK((struct in6_addr *) addr))
continue;
+
+ /* Ignore IPv6 link local addresses (fe80::/10), because
+ * they need a scope identifier, which we have no way
+ * of telling to the other end.
+ */
+ if (family == FamilyInternet6 &&
+ IN6_IS_ADDR_LINKLOCAL((struct in6_addr *)addr))
+ continue;
#endif
XdmcpRegisterConnection(family, (char *) addr, len);
#if defined(IPv6) && defined(AF_INET6)
++++++ N_zap_warning_xserver.diff ++++++
Index: xorg-server-1.12.1/hw/xfree86/common/xf86Config.c
===================================================================
--- xorg-server-1.12.1.orig/hw/xfree86/common/xf86Config.c
+++ xorg-server-1.12.1/hw/xfree86/common/xf86Config.c
@@ -685,6 +685,7 @@ typedef enum {
FLAG_NOTRAPSIGNALS,
FLAG_DONTVTSWITCH,
FLAG_DONTZAP,
+ FLAG_ZAPWARNING,
FLAG_DONTZOOM,
FLAG_DISABLEVIDMODE,
FLAG_ALLOWNONLOCAL,
@@ -721,6 +722,8 @@ static OptionInfoRec FlagOptions[] = {
{0}, FALSE},
{FLAG_DONTZAP, "DontZap", OPTV_BOOLEAN,
{0}, FALSE},
+ { FLAG_ZAPWARNING, "ZapWarning", OPTV_BOOLEAN,
+ {0}, FALSE },
{FLAG_DONTZOOM, "DontZoom", OPTV_BOOLEAN,
{0}, FALSE},
{FLAG_DISABLEVIDMODE, "DisableVidModeExtension", OPTV_BOOLEAN,
@@ -807,6 +810,7 @@ configServerFlags(XF86ConfFlagsPtr flags
xf86GetOptValBool(FlagOptions, FLAG_NOTRAPSIGNALS, &xf86Info.notrapSignals);
xf86GetOptValBool(FlagOptions, FLAG_DONTVTSWITCH, &xf86Info.dontVTSwitch);
xf86GetOptValBool(FlagOptions, FLAG_DONTZAP, &xf86Info.dontZap);
+ xf86GetOptValBool(FlagOptions, FLAG_ZAPWARNING, &xf86Info.ZapWarning);
xf86GetOptValBool(FlagOptions, FLAG_DONTZOOM, &xf86Info.dontZoom);
xf86GetOptValBool(FlagOptions, FLAG_IGNORE_ABI, &xf86Info.ignoreABI);
Index: xorg-server-1.12.1/hw/xfree86/common/xf86Events.c
===================================================================
--- xorg-server-1.12.1.orig/hw/xfree86/common/xf86Events.c
+++ xorg-server-1.12.1/hw/xfree86/common/xf86Events.c
@@ -180,12 +180,25 @@ xf86ProcessActionEvent(ActionEvent actio
DebugF("ProcessActionEvent(%d,%x)\n", (int) action, arg);
switch (action) {
case ACTION_TERMINATE:
- if (!xf86Info.dontZap) {
+ if (xf86Info.dontZap)
+ break;
+
+ if (xf86Info.ZapWarning) {
+ static struct timeval LastZap = { 0, 0};
+ struct timeval NewZap;
+
+ gettimeofday(&NewZap, NULL);
+
+ if ((NewZap.tv_sec - LastZap.tv_sec) >= 2) {
+ xf86OSRingBell(30, 1000, 50);
+ LastZap = NewZap;
+ break;
+ }
+ }
#ifdef XFreeXDGA
- DGAShutdown();
+ DGAShutdown();
#endif
- GiveUp(0);
- }
+ GiveUp(0);
break;
case ACTION_NEXT_MODE:
if (!xf86Info.dontZoom)
Index: xorg-server-1.12.1/hw/xfree86/common/xf86Globals.c
===================================================================
--- xorg-server-1.12.1.orig/hw/xfree86/common/xf86Globals.c
+++ xorg-server-1.12.1/hw/xfree86/common/xf86Globals.c
@@ -104,6 +104,7 @@ xf86InfoRec xf86Info = {
.autoVTSwitch = TRUE,
.ShareVTs = FALSE,
.dontZap = FALSE,
+ .ZapWarning = TRUE,
.dontZoom = FALSE,
.notrapSignals = FALSE,
.caughtSignal = FALSE,
Index: xorg-server-1.12.1/hw/xfree86/common/xf86Privstr.h
===================================================================
--- xorg-server-1.12.1.orig/hw/xfree86/common/xf86Privstr.h
+++ xorg-server-1.12.1/hw/xfree86/common/xf86Privstr.h
@@ -68,6 +68,7 @@ typedef struct {
Bool autoVTSwitch;
Bool ShareVTs;
Bool dontZap;
+ Bool ZapWarning;
Bool dontZoom;
Bool notrapSignals; /* don't exit cleanly - die at fault */
Bool caughtSignal;
++++++ README.updates ++++++
Xserver module update mechanism
-------------------------------
If any corresponding Xserver module is found below
"/usr/lib/xorg/modules/updates/" ("/usr/lib64/xorg/modules/updates/"
on biarch 32/64 bit platforms) it will be favored over the one in
"/usr/lib/xorg/modules/" ("/usr/lib64/xorg/modules/" on biarch 32/64
bit platforms).
++++++ U_Revert-kinput-allocate-enough-space-for-null-charact.patch ++++++
>From 09f1e5b15b769e1122f0a8d7cae0820038992312 Mon Sep 17 00:00:00 2001
From: Julien Cristau <jcristau(a)debian.org>
Date: Sun, 7 Oct 2012 18:40:35 +0200
Subject: [PATCH] Revert "kinput: allocate enough space for null character."
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This reverts commit 531785dd746d64ef7f473a83ca73bb20e74b6fca.
The above commit breaks Xephyr option parsing. Andrzej writes:
Xephyr -retro -keybd evdev,,device=/dev/input/event2,xkbrules=evdev,xkbmodel=evdev,xkblayout=pl -mouse evdev,,device=/dev/input/event1 :3
results in:
<snip>
Pointer option key (device=) of value (/dev/input/event1) not assigned!
Kbd option key (device=) of value (/dev/input/event2) not assigned!
Kbd option key (xkbrules=) of value (evdev) not assigned!
Kbd option key (xkbmodel=) of value (evdev) not assigned!
Kbd option key (xkblayout=) of value (pl) not assigned!
<snip>
The effect of the patch is that the "key=value" pairs are parsed in such
a way that the key is added an "equals" sign to it and we end up with
keys like "device=" instead of "device". This in turn has effect on
KdParsePointerOptions and KdParseKbdOptions: the key does not match
any choice presented in the "switch" statement, and so "Pointer/Kbd
option key (...) of value (...) not assigned!" happens, making all
"key=value" options inaccessible to the user. Reverting the patch makes
them available again.
Reference: http://bugs.debian.org/689246
Reported-by: Andrzej Pietrasiewicz <andrzejtp2010(a)gmail.com>
Signed-off-by: Julien Cristau <jcristau(a)debian.org>
Cc: Dave Airlie <airlied(a)redhat.com>
Reviewed-by: Søren Sandmann <ssp(a)redhat.com>
Signed-off-by: Keith Packard <keithp(a)keithp.com>
Signed-off-by: Ruediger Meier <ruediger.meier(a)ga-group.nl>
---
hw/kdrive/src/kinput.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/hw/kdrive/src/kinput.c b/hw/kdrive/src/kinput.c
index d35dcf8..b1068bb 100644
--- a/hw/kdrive/src/kinput.c
+++ b/hw/kdrive/src/kinput.c
@@ -1034,7 +1034,7 @@ KdGetOptions(InputOption **options, char *string)
if (strchr(string, '=')) {
tam_key = (strchr(string, '=') - string);
- key = strndup(string, tam_key + 1);
+ key = strndup(string, tam_key);
if (!key)
goto out;
--
1.7.6.1
++++++ U_os-Reset-input-buffer-s-ignoreBytes-field.patch ++++++
>From 67c66606c760c263d7a4c2d1bba43ed6225a4e7c Mon Sep 17 00:00:00 2001
From: Robert Morell <rmorell(a)nvidia.com>
Date: Thu, 9 May 2013 13:09:02 -0700
Subject: [PATCH] os: Reset input buffer's 'ignoreBytes' field
If a client sends a request larger than maxBigRequestSize, the server is
supposed to ignore it.
Before commit cf88363d, the server would simply disconnect the client. After
that commit, it attempts to gracefully ignore the request by remembering how
long the client specified the request to be, and ignoring that many bytes.
However, if a client sends a BigReq header with a large size and disconnects
before actually sending the rest of the specified request, the server will
reuse the ConnectionInput buffer without resetting the ignoreBytes field. This
makes the server ignore new X clients' requests.
This fixes that behavior by resetting the ignoreBytes field when putting the
ConnectionInput buffer back on the FreeInputs list.
Signed-off-by: Robert Morell <rmorell(a)nvidia.com>
Reviewed-by: Peter Hutterer <peter.hutterer(a)who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer(a)who-t.net>
---
os/io.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/os/io.c b/os/io.c
index 2f091c4..0d980ab 100644
--- a/os/io.c
+++ b/os/io.c
@@ -1063,6 +1063,7 @@ FreeOsBuffers(OsCommPtr oc)
oci->bufptr = oci->buffer;
oci->bufcnt = 0;
oci->lenLastReq = 0;
+ oci->ignoreBytes = 0;
}
}
if ((oco = oc->output)) {
--
1.8.1.4
++++++ U_xf86-fix-flush-input-to-work-with-Linux-evdev-device.patch ++++++
>From 6ca03b9161d33b1d2b55a3a1a913cf88deb2343f Mon Sep 17 00:00:00 2001
From: Dave Airlie <airlied(a)gmail.com>
Date: Wed, 10 Apr 2013 16:09:01 +1000
Subject: [PATCH] xf86: fix flush input to work with Linux evdev devices.
So when we VT switch back and attempt to flush the input devices,
we don't succeed because evdev won't return part of an event,
since we were only asking for 4 bytes, we'd only get -EINVAL back.
This could later cause events to be flushed that we shouldn't have
gotten.
This is a fix for CVE-2013-1940.
Signed-off-by: Dave Airlie <airlied(a)redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer(a)who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer(a)who-t.net>
---
hw/xfree86/os-support/shared/posix_tty.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/xfree86/os-support/shared/posix_tty.c b/hw/xfree86/os-support/shared/posix_tty.c
index ab3757a..4d08c1e 100644
--- a/hw/xfree86/os-support/shared/posix_tty.c
+++ b/hw/xfree86/os-support/shared/posix_tty.c
@@ -421,7 +421,8 @@ xf86FlushInput(int fd)
{
fd_set fds;
struct timeval timeout;
- char c[4];
+ /* this needs to be big enough to flush an evdev event. */
+ char c[256];
DebugF("FlushingSerial\n");
if (tcflush(fd, TCIFLUSH) == 0)
--
1.8.1.4
++++++ modprobe.nvidia ++++++
options nvidia NVreg_DeviceFileUID=0 NVreg_DeviceFileGID=33 NVreg_DeviceFileMode=0660
++++++ n_VNC-Add-proto.diff ++++++
From: Mike Gorse <mgorse(a)suse.com>
Date: Wed Apr 18 22:52:23 UTC 2012
Subject: [PATCH] VNC: Add a missing prototype
Patch-Mainline: Currently no upstream project.
---
diff -ur xorg-server-1.12.1.orig/hw/vnc/rfbkeyb.c xorg-server-1.12.1/hw/vnc/rfbkeyb.c
--- xorg-server-1.12.1.orig/hw/vnc/rfbkeyb.c 2012-04-18 17:38:08.302219053 -0500
+++ xorg-server-1.12.1/hw/vnc/rfbkeyb.c 2012-04-18 16:44:12.873667473 -0500
@@ -44,6 +44,7 @@
#endif
#else
#include <dix.h>
+#include <extinit.h>
#include <mipointer.h>
#endif
#include "rfb.h"
diff -ur xorg-server-1.12.1.orig/hw/vnc/rfbmouse.c xorg-server-1.12.1/hw/vnc/rfbmouse.c
--- xorg-server-1.12.1.orig/hw/vnc/rfbmouse.c 2012-04-18 17:38:08.302219053 -0500
+++ xorg-server-1.12.1/hw/vnc/rfbmouse.c 2012-04-18 16:43:28.843217928 -0500
@@ -46,6 +46,7 @@
#else
#include <dix.h>
+#include <extinit.h>
#include <mipointer.h>
#endif
#include "rfb.h"
++++++ n_VNC-Add-support-for-VNC.patch ++++++
++++ 23495 lines (skipped)
++++++ n_VNC-Don-t-let-VNC-access-the-framebuffer-directly-an.patch ++++++
From: Michal Srb <msrb(a)suse.cz>
Date: Tue, 6 Sep 2011 13:08:25 +0200
Subject: [PATCH 4/6] VNC: Don't let VNC access the framebuffer directly any more.
Patch-Mainline: Currently no upstream project.
Git-commit: 3e0de1d95b3ffd3988016b2d3f40f577393ad046
Signed-off: Egbert Eich <eich(a)suse.de>
References: bnc #653915
It seems that accessing the framebuffer directly is not a good idea anymore.
This patch will let the tight encoding read the screen data using GetImage. It
may be little slower, but not dramatically - it already does few GetImage calls
on every repaint now.
Signed-off-by: Egbert Eich <eich(a)freedesktop.org>
---
hw/vnc/tight.c | 69 ++++++++++++++++++++++++++++++---------------
hw/vnc/vncext.c | 19 ++----------
hw/xfree86/vnc/vncInit.c | 11 ++-----
hw/xfree86/vnc/vncint.h | 2 -
4 files changed, 53 insertions(+), 48 deletions(-)
diff --git a/hw/vnc/tight.c b/hw/vnc/tight.c
index 5c54736..f27c73e 100644
--- a/hw/vnc/tight.c
+++ b/hw/vnc/tight.c
@@ -109,15 +109,17 @@ static unsigned char *tightAfterBuf = NULL;
static int *prevRowBuf = NULL;
+static unsigned char* fakeFrameBuffer = NULL;
+
/* Prototypes for static functions. */
-static void FindBestSolidArea (ScreenPtr pScreen, int x, int y, int w, int h,
+static void FindBestSolidArea (rfbClientPtr cl, int x, int y, int w, int h,
CARD32 colorValue, int *w_ptr, int *h_ptr);
-static void ExtendSolidArea (ScreenPtr pScreen, int x, int y, int w, int h,
+static void ExtendSolidArea (rfbClientPtr cl, int x, int y, int w, int h,
CARD32 colorValue,
int *x_ptr, int *y_ptr, int *w_ptr, int *h_ptr);
-static Bool CheckSolidTile (ScreenPtr pScreen, int x, int y, int w, int h,
+static Bool CheckSolidTile (rfbClientPtr cl, int x, int y, int w, int h,
CARD32 *colorPtr, Bool needSameColor);
static Bool CheckSolidTile8 (ScreenPtr pScreen, int x, int y, int w, int h,
CARD32 *colorPtr, Bool needSameColor);
@@ -126,6 +128,7 @@ static Bool CheckSolidTile16 (ScreenPtr pScreen, int x, int y, int w, int h,
static Bool CheckSolidTile32 (ScreenPtr pScreen, int x, int y, int w, int h,
CARD32 *colorPtr, Bool needSameColor);
+static Bool SendRectEncodingTight(rfbClientPtr cl, int x, int y, int w, int h);
static Bool SendRectSimple (rfbClientPtr cl, int x, int y, int w, int h);
static Bool SendSubrect (rfbClientPtr cl, int x, int y, int w, int h);
static Bool SendTightHeader (rfbClientPtr cl, int x, int y, int w, int h);
@@ -211,6 +214,25 @@ rfbSendRectEncodingTight(rfbClientPtr cl,
int x, int y, int w, int h)
{
VNCSCREENPTR(cl->pScreen);
+
+ /* Copy the rectangle to the fake buffer for CheckSolidTile functions. */
+
+ if(!fakeFrameBuffer) fakeFrameBuffer = malloc(pVNC->width * pVNC->height * cl->format.bitsPerPixel / 8);
+ (*cl->translateFn)(cl->pScreen, cl->translateLookupTable,
+ &pVNC->rfbServerFormat,
+ &cl->format, fakeFrameBuffer + (y * pVNC->width * cl->format.bitsPerPixel / 8),
+ pVNC->paddedWidthInBytes, pVNC->width, h, 0, y);
+
+ /* Call the inner part */
+
+ return SendRectEncodingTight(cl, x, y, w, h);
+}
+
+static Bool
+SendRectEncodingTight(rfbClientPtr cl,
+ int x, int y, int w, int h)
+{
+ VNCSCREENPTR(cl->pScreen);
int nMaxRows;
CARD32 colorValue;
int dx, dy, dw, dh;
@@ -247,7 +269,7 @@ rfbSendRectEncodingTight(rfbClientPtr cl,
nMaxWidth = (w > maxRectWidth) ? maxRectWidth : w;
nMaxRows = maxRectSize / nMaxWidth;
}
-
+
/* Try to find large solid-color areas and send them separately. */
for (dy = y; dy < y + h; dy += MAX_SPLIT_TILE_SIZE) {
@@ -269,11 +291,11 @@ rfbSendRectEncodingTight(rfbClientPtr cl,
dw = (dx + MAX_SPLIT_TILE_SIZE <= x + w) ?
MAX_SPLIT_TILE_SIZE : (x + w - dx);
- if (CheckSolidTile(cl->pScreen, dx, dy, dw, dh, &colorValue, FALSE)) {
+ if (CheckSolidTile(cl, dx, dy, dw, dh, &colorValue, FALSE)) {
/* Get dimensions of solid-color area. */
- FindBestSolidArea(cl->pScreen, dx, dy, w - (dx - x), h - (dy - y),
+ FindBestSolidArea(cl, dx, dy, w - (dx - x), h - (dy - y),
colorValue, &w_best, &h_best);
/* Make sure a solid rectangle is large enough
@@ -286,7 +308,7 @@ rfbSendRectEncodingTight(rfbClientPtr cl,
/* Try to extend solid rectangle to maximum size. */
x_best = dx; y_best = dy;
- ExtendSolidArea(cl->pScreen, x, y, w, h, colorValue,
+ ExtendSolidArea(cl, x, y, w, h, colorValue,
&x_best, &y_best, &w_best, &h_best);
/* Send rectangles at top and left to solid-color area. */
@@ -295,7 +317,7 @@ rfbSendRectEncodingTight(rfbClientPtr cl,
!SendRectSimple(cl, x, y, w, y_best-y) )
return FALSE;
if ( x_best != x &&
- !rfbSendRectEncodingTight(cl, x, y_best,
+ !SendRectEncodingTight(cl, x, y_best,
x_best-x, h_best) )
return FALSE;
@@ -316,11 +338,11 @@ rfbSendRectEncodingTight(rfbClientPtr cl,
/* Send remaining rectangles (at right and bottom). */
if ( x_best + w_best != x + w &&
- !rfbSendRectEncodingTight(cl, x_best+w_best, y_best,
+ !SendRectEncodingTight(cl, x_best+w_best, y_best,
w-(x_best-x)-w_best, h_best) )
return FALSE;
if ( y_best + h_best != y + h &&
- !rfbSendRectEncodingTight(cl, x, y_best+h_best,
+ !SendRectEncodingTight(cl, x, y_best+h_best,
w, h-(y_best-y)-h_best) )
return FALSE;
@@ -339,7 +361,7 @@ rfbSendRectEncodingTight(rfbClientPtr cl,
}
static void
-FindBestSolidArea(ScreenPtr pScreen,
+FindBestSolidArea(rfbClientPtr cl,
int x, int y, int w, int h,
CARD32 colorValue,
int *w_ptr, int *h_ptr)
@@ -357,13 +379,13 @@ FindBestSolidArea(ScreenPtr pScreen,
dw = (w_prev > MAX_SPLIT_TILE_SIZE) ?
MAX_SPLIT_TILE_SIZE : w_prev;
- if (!CheckSolidTile(pScreen, x, dy, dw, dh, &colorValue, TRUE))
+ if (!CheckSolidTile(cl, x, dy, dw, dh, &colorValue, TRUE))
break;
for (dx = x + dw; dx < x + w_prev;) {
dw = (dx + MAX_SPLIT_TILE_SIZE <= x + w_prev) ?
MAX_SPLIT_TILE_SIZE : (x + w_prev - dx);
- if (!CheckSolidTile(pScreen, dx, dy, dw, dh, &colorValue, TRUE))
+ if (!CheckSolidTile(cl, dx, dy, dw, dh, &colorValue, TRUE))
break;
dx += dw;
}
@@ -380,7 +402,7 @@ FindBestSolidArea(ScreenPtr pScreen,
}
static void
-ExtendSolidArea(ScreenPtr pScreen, int x, int y, int w, int h,
+ExtendSolidArea(rfbClientPtr cl, int x, int y, int w, int h,
CARD32 colorValue,
int *x_ptr, int *y_ptr, int *w_ptr, int *h_ptr)
{
@@ -388,7 +410,7 @@ ExtendSolidArea(ScreenPtr pScreen, int x, int y, int w, int h,
/* Try to extend the area upwards. */
for ( cy = *y_ptr - 1;
- cy >= y && CheckSolidTile(pScreen, *x_ptr, cy, *w_ptr, 1, &colorValue, TRUE);
+ cy >= y && CheckSolidTile(cl, *x_ptr, cy, *w_ptr, 1, &colorValue, TRUE);
cy-- );
*h_ptr += *y_ptr - (cy + 1);
*y_ptr = cy + 1;
@@ -396,13 +418,13 @@ ExtendSolidArea(ScreenPtr pScreen, int x, int y, int w, int h,
/* ... downwards. */
for ( cy = *y_ptr + *h_ptr;
cy < y + h &&
- CheckSolidTile(pScreen, *x_ptr, cy, *w_ptr, 1, &colorValue, TRUE);
+ CheckSolidTile(cl, *x_ptr, cy, *w_ptr, 1, &colorValue, TRUE);
cy++ );
*h_ptr += cy - (*y_ptr + *h_ptr);
/* ... to the left. */
for ( cx = *x_ptr - 1;
- cx >= x && CheckSolidTile(pScreen, cx, *y_ptr, 1, *h_ptr, &colorValue, TRUE);
+ cx >= x && CheckSolidTile(cl, cx, *y_ptr, 1, *h_ptr, &colorValue, TRUE);
cx-- );
*w_ptr += *x_ptr - (cx + 1);
*x_ptr = cx + 1;
@@ -410,7 +432,7 @@ ExtendSolidArea(ScreenPtr pScreen, int x, int y, int w, int h,
/* ... to the right. */
for ( cx = *x_ptr + *w_ptr;
cx < x + w &&
- CheckSolidTile(pScreen, cx, *y_ptr, 1, *h_ptr, &colorValue, TRUE);
+ CheckSolidTile(cl, cx, *y_ptr, 1, *h_ptr, &colorValue, TRUE);
cx++ );
*w_ptr += cx - (*x_ptr + *w_ptr);
}
@@ -423,11 +445,12 @@ ExtendSolidArea(ScreenPtr pScreen, int x, int y, int w, int h,
*/
static Bool
-CheckSolidTile(ScreenPtr pScreen, int x, int y, int w, int h, CARD32 *colorPtr,
+CheckSolidTile(rfbClientPtr cl, int x, int y, int w, int h, CARD32 *colorPtr,
Bool needSameColor)
{
- VNCSCREENPTR(pScreen);
- switch(pVNC->rfbServerFormat.bitsPerPixel) {
+ ScreenPtr pScreen = cl->pScreen;
+
+ switch(cl->format.bitsPerPixel) {
case 32:
return CheckSolidTile32(pScreen, x, y, w, h, colorPtr, needSameColor);
case 16:
@@ -449,7 +472,7 @@ static Bool \
int dx, dy; \
\
fbptr = (CARD##bpp *) \
- &pVNC->pfbMemory[y * pVNC->paddedWidthInBytes + x * (bpp/8)]; \
+ &fakeFrameBuffer[(y * pVNC->width + x) * (bpp/8)]; \
\
colorValue = *fbptr; \
if (needSameColor && (CARD32)colorValue != *colorPtr) \
@@ -460,7 +483,7 @@ static Bool \
if (colorValue != fbptr[dx]) \
return FALSE; \
} \
- fbptr = (CARD##bpp *)((CARD8 *)fbptr + pVNC->paddedWidthInBytes); \
+ fbptr = (CARD##bpp *)((CARD8 *)fbptr + pVNC->width * (bpp/8)); \
} \
\
*colorPtr = (CARD32)colorValue; \
diff --git a/hw/vnc/vncext.c b/hw/vnc/vncext.c
index ea913b7..534f3f5 100644
--- a/hw/vnc/vncext.c
+++ b/hw/vnc/vncext.c
@@ -702,15 +702,7 @@ CreateResourceTypes(void)
static unsigned long vncExtGeneration = 0;
#if XFREE86VNC
-extern Bool VNCInit(ScreenPtr pScreen, unsigned char *FBStart);
-
-/* copied from miscrinit.c */
-typedef struct
-{
- pointer pbits; /* pointer to framebuffer */
- int width; /* delta to add to a framebuffer addr to move one row down */
-} miScreenInitParmsRec, *miScreenInitParmsPtr;
-
+extern Bool VNCInit(ScreenPtr pScreen);
static Bool
vncCreateScreenResources(ScreenPtr pScreen)
@@ -719,9 +711,6 @@ vncCreateScreenResources(ScreenPtr pScreen)
CreateScreenResourcesProcPtr CreateScreenResources =
(CreateScreenResourcesProcPtr)
dixLookupPrivate(&pScreen->devPrivates, vncCreateScreenResourcesKey);
- miScreenInitParmsPtr pScrInitParms;
-
- pScrInitParms = (miScreenInitParmsPtr)pScreen->devPrivate;
if ( pScreen->CreateScreenResources != vncCreateScreenResources ) {
/* Can't find hook we are hung on */
@@ -732,9 +721,6 @@ vncCreateScreenResources(ScreenPtr pScreen)
(void *) pScreen->CreateScreenResources );
}
- /* Now do our stuff */
- VNCInit(pScreen, pScrInitParms->pbits);
-
/* Unhook this function ... */
pScreen->CreateScreenResources = CreateScreenResources;
dixSetPrivate(&pScreen->devPrivates, vncCreateScreenResourcesKey, NULL);
@@ -744,6 +730,9 @@ vncCreateScreenResources(ScreenPtr pScreen)
ret = (*pScreen->CreateScreenResources)(pScreen);
}
+ /* Now do our stuff */
+ VNCInit(pScreen);
+
#ifdef DEBUG
ErrorF("vncCreateScreenResources() returns %d\n", ret);
#endif
diff --git a/hw/xfree86/vnc/vncInit.c b/hw/xfree86/vnc/vncInit.c
index 4a124fb..8b2fa5f 100644
--- a/hw/xfree86/vnc/vncInit.c
+++ b/hw/xfree86/vnc/vncInit.c
@@ -49,7 +49,7 @@ extern void VncExtensionInit(void);
extern void vncInitMouse(void);
extern void vncInitKeyb(void);
-Bool VNCInit(ScreenPtr pScreen, unsigned char *FBStart);
+Bool VNCInit(ScreenPtr pScreen);
#ifndef XFree86LOADER
static unsigned long VNCGeneration = 0;
@@ -151,7 +151,7 @@ void rfbLogPerror(char *str)
* Called by vncCreateScreenResources()
*/
Bool
-VNCInit(ScreenPtr pScreen, unsigned char *FBStart)
+VNCInit(ScreenPtr pScreen)
{
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
VisualPtr visual;
@@ -164,9 +164,6 @@ VNCInit(ScreenPtr pScreen, unsigned char *FBStart)
PictureScreenPtr ps;
#endif
- if (!FBStart)
- return FALSE;
-
#ifndef XFree86LOADER
if (VNCGeneration != serverGeneration) {
VncExtensionInit();
@@ -287,9 +284,7 @@ VNCInit(ScreenPtr pScreen, unsigned char *FBStart)
pScreenPriv->depth = pScrn->depth;
pScreenPriv->paddedWidthInBytes = PixmapBytePad(pScrn->displayWidth, pScrn->depth);
pScreenPriv->bitsPerPixel = rfbBitsPerPixel(pScrn->depth);
- pScreenPriv->pfbMemory = FBStart;
- pScreenPriv->oldpfbMemory = FBStart;
-
+
pScreenPriv->cursorIsDrawn = TRUE;
pScreenPriv->dontSendFramebufferUpdate = FALSE;
diff --git a/hw/xfree86/vnc/vncint.h b/hw/xfree86/vnc/vncint.h
index 18a3630..9e4a36f 100644
--- a/hw/xfree86/vnc/vncint.h
+++ b/hw/xfree86/vnc/vncint.h
@@ -44,13 +44,11 @@ typedef struct {
size_t buf_filled;
int maxFd;
fd_set allFds;
- unsigned char * oldpfbMemory;
Bool rfbAlwaysShared;
Bool rfbNeverShared;
Bool rfbDontDisconnect;
Bool rfbUserAccept;
Bool rfbViewOnly;
- unsigned char * pfbMemory;
int paddedWidthInBytes;
ColormapPtr rfbInstalledColormap;
ColormapPtr savedColormap;
--
1.7.3.4
++++++ n_VNC-Enable-use-of-all-keyboard-layouts-independent-o.patch ++++++
From: Matthias Hopf <mhopf(a)suse.de>
Date: Tue, 6 Sep 2011 08:35:57 +0200
Subject: [PATCH 5/6] VNC: Enable use of all keyboard layouts, independent of remotely set layout
Patch-Mainline: Currently no upstream project.
Git-commit: 6885b927a6065e6379cfaa3ebbf6c51445a015d9
Signed-off: Egbert Eich <eich(a)suse.de>
References: bnc #400520, #605015, #660797
Changes:
- Use virtual core keyboard for events and key state lookup:
Make layout changes work again - see discussion on
https://defect.opensolaris.org/bz/show_bug.cgi?id=8687
- keycode lookup:
Don't use any static keyboard layout any more.
- ISO-Level3-Shift handling:
Enable the use of keyboard layouts that use AltGr for 3rd and 4th level.
- Make keyboard handling more XKB aware:
Previous code was e.g. not multi-group aware.
- Nuke use of legacy keymap as far as possible:
Creating legacy keymap takes time, and it has to be freed again afterwards.
- Free index lookup:
Make XKB aware.
- Ignore calls for NoSymbol:
This destroys otherwise valid entries.
- Fix analysis for shift/level3 event faking:
Previous broken version lead to e.g. Shift+PgUp not being recognized.
- Add tons of debug output (disabled).
Signed-off-by: Egbert Eich <eich(a)freedesktop.org>
Rebased to 1.12.1 by Mike Gorse <mgorse(a)suse.com>
---
diff -pruN xorg-server-1.12.1.orig/hw/vnc/kbdptr.c xorg-server-1.12.1/hw/vnc/kbdptr.c
--- xorg-server-1.12.1.orig/hw/vnc/kbdptr.c 2012-04-18 14:14:07.436250934 -0500
+++ xorg-server-1.12.1/hw/vnc/kbdptr.c 2012-04-18 14:15:27.656248047 -0500
@@ -34,6 +34,8 @@
#include "X11/Xproto.h"
#include "inputstr.h"
#include "inpututils.h"
+#include "xkbsrv.h"
+#include "xkbstr.h"
#define XK_CYRILLIC
#include <X11/keysym.h>
#include <X11/Xatom.h>
@@ -46,6 +48,7 @@
#include "dmxinput.h"
#endif
+#if 0
#if !XFREE86VNC
#define MIN_KEY_CODE 8
@@ -196,21 +199,20 @@ static KeySym map[MAX_KEY_CODE * GLYPHS_
#define N_PREDEFINED_KEYS (sizeof(map) / (sizeof(KeySym) * GLYPHS_PER_KEY))
#endif
+#endif
#define KEY_IS_PRESSED(keycode) \
- (kbdDevice->key->down[(keycode) >> 3] & (1 << ((keycode) & 7)))
+ (inputInfo.keyboard->key->down[(keycode) >> 3] & (1 << ((keycode) & 7)))
static void vncXConvertCase(KeySym sym, KeySym *lower, KeySym *upper);
-static DeviceIntPtr ptrDevice = NULL, kbdDevice = NULL;
+static DeviceIntPtr ptrDevice = NULL;
void
vncSetKeyboardDevice(DeviceIntPtr kbd)
{
- if (kbdDevice && kbd)
- return; /* set once */
- kbdDevice = kbd;
+ // obsoleted by inputInfo
}
@@ -263,6 +265,29 @@ EnqueueKey(DeviceIntPtr kbdDev, int type
QueueKeyboardEvents(kbdDev, type, detail, NULL);
}
+/* In-server and highly changed version of XkbKeycodeToKeysym */
+static KeySym
+_XkbKeycodeToKeysym(XkbDescPtr xkb, KeyCode kc, int group, int level)
+{
+ KeySym ks;
+
+ if ((kc<xkb->min_key_code)||(kc>xkb->max_key_code))
+ return NoSymbol;
+ /* Treat single group elements as present in all groups */
+ if (XkbKeyNumGroups (xkb,kc) == 1)
+ group = 0;
+ if ((group<0)||(level<0)||(group>=XkbKeyNumGroups(xkb,kc)))
+ return NoSymbol;
+ if (level < XkbKeyGroupWidth(xkb, kc, group))
+ ks = XkbKeySymEntry(xkb, kc, level, group);
+ else
+ ks = NoSymbol;
+ /* Treat 'K' as 'K K', */
+ if (ks == NoSymbol && (level & 1) && level-1 < XkbKeyGroupWidth(xkb, kc, group))
+ ks = XkbKeySymEntry(xkb, kc, level-1, group);
+ return ks;
+}
+
/*
* Called when the rfbserver receives a rfbKeyEvent event from a client.
* Put an X keyboard event into the event queue.
@@ -271,21 +296,35 @@ void
KbdAddEvent(Bool down, KeySym keySym, rfbClientPtr cl)
{
const int type = down ? KeyPress : KeyRelease;
- KeySymsPtr keySyms;
- XkbStateRec *xkb;
- int i;
+ XkbSrvInfoPtr xkbInfo;
+ int i, group, level;
int keyCode = 0;
- int freeIndex = -1;
Bool fakeShiftPress = FALSE;
Bool fakeShiftLRelease = FALSE;
Bool fakeShiftRRelease = FALSE;
Bool shiftMustBeReleased = FALSE;
Bool shiftMustBePressed = FALSE;
+ Bool fakeLevel3Press = FALSE;
+ Bool fakeLevel3Release = FALSE;
+ Bool level3MustBeReleased = FALSE;
+ Bool level3MustBePressed = FALSE;
+
+ /* Incomplete maps may create NoSymbol - which lets us
+ * select and/or overwrite otherwise valid entries.
+ * E.g Level3+a in serbian layout creates NoSymbol on os11.4
+ * 2011-05-24 mhopf(a)suse.de */
+ if (keySym == NoSymbol) {
+ ErrorF("KbdAddEvent: ignoring illegal NoSymbol\n");
+ return;
+ }
- if (!kbdDevice)
- return;
-
- keySyms = XkbGetCoreMap(kbdDevice);
+ xkbInfo = inputInfo.keyboard->key->xkbInfo;
+ group = xkbInfo->state.group;
+ level = (KEY_IS_PRESSED(ISO_LEVEL3_KEY_CODE) ? 2 : 0) |
+ (XkbStateFieldFromRec(&xkbInfo->state) & ShiftMask ? 1 : 0);
+#ifdef DEBUG
+ ErrorF ("VNCkbd:\t%s Sym %04x\n", down ? "+":"-", (int)keySym);
+#endif
#ifdef CORBA
if (cl) {
@@ -303,6 +342,12 @@ KbdAddEvent(Bool down, KeySym keySym, rf
*
* Alan.
*/
+ /* Never use predefined keys.
+ * This is inherently incapable of dealing with changing
+ * keyboard layouts. Not being able to work with non-local xmodmaps
+ * is a nuisance at worst, and probably even preferred.
+ * 2011-04-15 mhopf(a)suse.de */
+#ifdef NOTANYMORE
#if !XFREE86VNC
/* First check if it's one of our predefined keys. If so then we can make
some attempt at allowing an xmodmap inside a VNC desktop behave
@@ -329,107 +374,227 @@ KbdAddEvent(Bool down, KeySym keySym, rf
}
}
#endif
+#endif
if (!keyCode) {
/* not one of our predefined keys - see if it's in the current keyboard
mapping (i.e. we've already allocated an extra keycode for it) */
- if (keySyms->mapWidth < 2) {
- ErrorF("KbdAddEvent: Sanity check failed - Keyboard mapping has "
- "less than 2 keysyms per keycode (KeySym 0x%x)\n", (int)keySym);
- return;
- }
+ for (keyCode = MIN_KEY_CODE; keyCode < MIN_KEY_CODE + NO_OF_KEYS; keyCode++) {
+ /* Check all keycodes, but only continue on those where
+ * backconversion results in keySym.
+ * 2011-05-20 mhopf(a)suse.de */
+
+#ifdef DEBUG
+ int j;
+ ErrorF (" keyCode %3d map# %4d++ level %d of %d: keySyms",
+ keyCode, (i / keySyms->mapWidth) * keySyms->mapWidth,
+ i % keySyms->mapWidth, keySyms->mapWidth);
+ for (j = 0; j < keySyms->mapWidth; j++)
+ ErrorF (" %02x", (int)keySyms->map[(i / keySyms->mapWidth) * keySyms->mapWidth + j]);
+ ErrorF ("\n");
+ ErrorF (" group %d of %d width %d: keySyms",
+ group, XkbKeyNumGroups(xkbInfo->desc, keyCode),
+ XkbKeyGroupWidth(xkbInfo->desc, keyCode, group));
+ if (XkbKeyNumGroups(xkbInfo->desc, keyCode) > group)
+ for (j = 0; j < XkbKeyGroupWidth(xkbInfo->desc, keyCode, group); j++)
+ ErrorF (" %02x", (int) XkbKeySymEntry(xkbInfo->desc, keyCode, j, group));
+ ErrorF ("\n");
+#endif
- for (i = 0; i < NO_OF_KEYS * keySyms->mapWidth; i++) {
- if (keySym == keySyms->map[i]) {
- keyCode = MIN_KEY_CODE + i / keySyms->mapWidth;
-
- if (keySyms->map[(i / keySyms->mapWidth)
- * keySyms->mapWidth + 1] != NoSymbol) {
-
- /* this keycode has more than one symbol associated with
- it, so shift state is important */
-
- if ((i % keySyms->mapWidth) == 0)
- shiftMustBeReleased = TRUE;
- else
- shiftMustBePressed = TRUE;
- }
+ /* Check whether keySym is reachable in current group
+ * by any shift/Level3_shift state (preferrable w/o change).
+ * This doesn't do real modifyer analysis, only Shift and Level3_Shift.
+ * 2011-05-23 mhopf(a)suse.de */
+ if (_XkbKeycodeToKeysym(xkbInfo->desc, keyCode, group, level) == keySym)
+ break;
+ if (_XkbKeycodeToKeysym(xkbInfo->desc, keyCode, group, level ^ 2) == keySym) {
+ if (level & 2)
+ level3MustBeReleased = TRUE;
+ else
+ level3MustBePressed = TRUE;
break;
}
- if ((freeIndex == -1) && (keySyms->map[i] == NoSymbol)
- && (i % keySyms->mapWidth) == 0)
- {
- freeIndex = i;
+ if (_XkbKeycodeToKeysym(xkbInfo->desc, keyCode, group, level ^ 1) == keySym) {
+ if (level & 1)
+ shiftMustBeReleased = TRUE;
+ else
+ shiftMustBePressed = TRUE;
+ break;
+ }
+ if (_XkbKeycodeToKeysym(xkbInfo->desc, keyCode, group, level ^ 3) == keySym) {
+ if (level & 2)
+ level3MustBeReleased = TRUE;
+ else
+ level3MustBePressed = TRUE;
+ if (level & 1)
+ shiftMustBeReleased = TRUE;
+ else
+ shiftMustBePressed = TRUE;
+ break;
}
}
+ if (keyCode == MIN_KEY_CODE + NO_OF_KEYS)
+ keyCode = 0;
}
if (!keyCode) {
KeySym lower, upper;
+ KeySymsPtr keySyms = XkbGetCoreMap(inputInfo.keyboard);
/* we don't have an existing keycode - make one up on the fly and add
it to the keyboard mapping. Thanks to Vlad Harchev for pointing
out problems with non-ascii capitalisation. */
- if (freeIndex == -1) {
+ /* Find free index for current group. */
+ for (keyCode = MIN_KEY_CODE; keyCode < MIN_KEY_CODE + NO_OF_KEYS; keyCode++) {
+ /* A keyCode is free if no groups are assigned at all */
+ if (XkbKeyNumGroups(xkbInfo->desc, keyCode) == 0)
+ break;
+#ifdef NOTANYMORE
+ /* We can use exact map positions for group 1+2, but only partially
+ * filling out xkb legacy maps may suddenly change the # of groups.
+ * Reason for that is unknown yet. Might be related to (fixed) NoSymbol issue.
+ * 2011-05-24 mhopf(a)suse.de */
+ /* For primary groups: A keyCode is free if current group is empty */
+ if (XkbKeyGroupWidth(xkbInfo->desc, keyCode, group) < 1 && group < 2)
+ break;
+ /* Never touch groups that have a single level only (weird group?!?) */
+ if (XkbKeyGroupWidth(xkbInfo->desc, keyCode, group) < 2)
+ continue;
+ /* For primary groups: A keyCode is free if only NoSymbol is assigned
+ * to available levels (only validating levels 0-3) */
+ if (group < 2 &&
+ XkbKeySymEntry(xkbInfo->desc, keyCode, 0, group) == NoSymbol &&
+ XkbKeySymEntry(xkbInfo->desc, keyCode, 1, group) == NoSymbol &&
+ (XkbKeyGroupWidth(xkbInfo->desc, keyCode, group) < 3 ||
+ (XkbKeySymEntry(xkbInfo->desc, keyCode, 2, group) == NoSymbol &&
+ (XkbKeyGroupWidth(xkbInfo->desc, keyCode, group) < 4 ||
+ XkbKeySymEntry(xkbInfo->desc, keyCode, 3, group) == NoSymbol))))
+ break;
+#endif
+ }
+
+ if (keyCode == MIN_KEY_CODE + NO_OF_KEYS) {
ErrorF("KbdAddEvent: ignoring KeySym 0x%x - no free KeyCodes\n",
(int)keySym);
+ free (keySyms->map);
+ free (keySyms);
return;
}
- keyCode = MIN_KEY_CODE + freeIndex / keySyms->mapWidth;
-
vncXConvertCase(keySym, &lower, &upper);
- if (lower == upper) {
- keySyms->map[freeIndex] = keySym;
-
- } else {
- keySyms->map[freeIndex] = lower;
- keySyms->map[freeIndex+1] = upper;
-
+ /* Adding keys is not using xkb mechanisms yet, but relying on support
+ * for changing keys in the legacy map. Should be changed, eventually.
+ * 2011-05-19 mhopf(a)suse.de */
+#ifdef NOTANYMORE
+ if (group < 2) {
+ /* Only set mapping for active group. Will only work with dual layouts.
+ * 2011-05-23 mhopf(a)suse.de */
+ int active_group_offset = group ? 2 : 0;
+
+ if (lower == upper) {
+ keySyms->map[(keyCode - MIN_KEY_CODE) * keySyms->mapWidth + active_group_offset] = keySym;
+ keySyms->map[(keyCode - MIN_KEY_CODE) * keySyms->mapWidth + active_group_offset + 1] = NoSymbol;
+ } else {
+ keySyms->map[(keyCode - MIN_KEY_CODE) * keySyms->mapWidth + active_group_offset] = lower;
+ keySyms->map[(keyCode - MIN_KEY_CODE) * keySyms->mapWidth + active_group_offset + 1] = upper;
+ }
+ }
+#endif
+ /* Generic layouts needs to set the full map width.
+ * Weird enough, mapWidth seems too big...
+ * 2011-05-23 mhopf(a)suse.de */
+ for (i = 0; i < (keySyms->mapWidth & ~1); i += 2) {
+ if (lower == upper) {
+ keySyms->map[(keyCode - MIN_KEY_CODE) * keySyms->mapWidth + i] = keySym;
+ keySyms->map[(keyCode - MIN_KEY_CODE) * keySyms->mapWidth + i + 1] = NoSymbol;
+ } else {
+ keySyms->map[(keyCode - MIN_KEY_CODE) * keySyms->mapWidth + i] = lower;
+ keySyms->map[(keyCode - MIN_KEY_CODE) * keySyms->mapWidth + i + 1] = upper;
+ }
+ }
+ if (lower != upper) {
if (keySym == lower)
shiftMustBeReleased = TRUE;
else
shiftMustBePressed = TRUE;
}
+ level3MustBeReleased = TRUE;
- XkbApplyMappingChange(kbdDevice, keySyms, keyCode, 1, NULL, serverClient);
+ XkbApplyMappingChange(inputInfo.keyboard, keySyms, keyCode, 1, NULL, serverClient);
ErrorF("KbdAddEvent: unknown KeySym 0x%x - allocating KeyCode %d\n",
(int)keySym, keyCode);
+ free (keySyms->map);
+ free (keySyms);
}
- xkb = &kbdDevice->key->xkbInfo->state;
+#ifdef DEBUG
+ ErrorF ("\t%s Sym %04x Code%3d\tState x%02x %s%s%s\tSh %s%s\tL3 %s%s\n",
+ down ? "+":"-", (int)keySym, keyCode, XkbStateFieldFromRec(&xkbInfo->state),
+ KEY_IS_PRESSED(SHIFT_L_KEY_CODE) ? "Sl":"",
+ KEY_IS_PRESSED(SHIFT_R_KEY_CODE) ? "Sr":"",
+ KEY_IS_PRESSED(ISO_LEVEL3_KEY_CODE) ? "L3":"",
+ shiftMustBePressed ? "+":"", shiftMustBeReleased ? "-":"",
+ level3MustBePressed ? "+":"", level3MustBeReleased ? "-":"");
+#endif
+#ifdef NOTANYMORE
+ int back = _XkbKeycodeToKeysym (xkbInfo->desc, keyCode, group,
+ ((level3MustBePressed || (!level3MustBeReleased && (level & 2))) ? 2 : 0) |
+ ((shiftMustBePressed || (!shiftMustBeReleased && (level & 1))) ? 1 : 0));
+ ErrorF ("\tvalidate code %d %-2s%-2s -> sym %04x %s\n\n", keyCode,
+ (shiftMustBePressed || (!shiftMustBeReleased && (level & 1))) ? "Sh" : "",
+ (level3MustBePressed || (!level3MustBeReleased && (level & 2))) ? "L3" : "",
+ back, (back == keySym ? "ok" : "FAILED"));
+#endif
+
if (down) {
- if (shiftMustBePressed && !(XkbStateFieldFromRec(xkb) & ShiftMask)) {
+ /* TODO: would require to check which keycodes are actually
+ * bound to ISO_Level3_Shift and/or Shift_L.
+ * 2011-04-18 mhopf(a)suse.de */
+ if (level3MustBePressed && !(level & 2)) {
+ fakeLevel3Press = TRUE;
+ EnqueueKey(inputInfo.keyboard, KeyPress, ISO_LEVEL3_KEY_CODE);
+ }
+ if (level3MustBeReleased && (level & 2)) {
+ fakeLevel3Release = TRUE;
+ EnqueueKey(inputInfo.keyboard, KeyRelease, ISO_LEVEL3_KEY_CODE);
+ }
+ if (shiftMustBePressed && !(level & 1)) {
fakeShiftPress = TRUE;
- EnqueueKey(kbdDevice, KeyPress, SHIFT_L_KEY_CODE);
+ EnqueueKey(inputInfo.keyboard, KeyPress, SHIFT_L_KEY_CODE);
}
- if (shiftMustBeReleased && (XkbStateFieldFromRec(xkb) & ShiftMask)) {
+ if (shiftMustBeReleased && (level & 1)) {
if (KEY_IS_PRESSED(SHIFT_L_KEY_CODE)) {
fakeShiftLRelease = TRUE;
- EnqueueKey(kbdDevice, KeyRelease, SHIFT_L_KEY_CODE);
+ EnqueueKey(inputInfo.keyboard, KeyRelease, SHIFT_L_KEY_CODE);
}
if (KEY_IS_PRESSED(SHIFT_R_KEY_CODE)) {
fakeShiftRRelease = TRUE;
- EnqueueKey(kbdDevice, KeyRelease, SHIFT_R_KEY_CODE);
+ EnqueueKey(inputInfo.keyboard, KeyRelease, SHIFT_R_KEY_CODE);
}
}
}
- EnqueueKey(kbdDevice, type, keyCode);
+ EnqueueKey(inputInfo.keyboard, type, keyCode);
if (fakeShiftPress) {
- EnqueueKey(kbdDevice, KeyRelease, SHIFT_L_KEY_CODE);
+ EnqueueKey(inputInfo.keyboard, KeyRelease, SHIFT_L_KEY_CODE);
}
if (fakeShiftLRelease) {
- EnqueueKey(kbdDevice, KeyPress, SHIFT_L_KEY_CODE);
+ EnqueueKey(inputInfo.keyboard, KeyPress, SHIFT_L_KEY_CODE);
}
if (fakeShiftRRelease) {
- EnqueueKey(kbdDevice, KeyPress, SHIFT_R_KEY_CODE);
+ EnqueueKey(inputInfo.keyboard, KeyPress, SHIFT_R_KEY_CODE);
+ }
+ if (fakeLevel3Press) {
+ EnqueueKey(inputInfo.keyboard, KeyRelease, ISO_LEVEL3_KEY_CODE);
+ }
+ if (fakeLevel3Release) {
+ EnqueueKey(inputInfo.keyboard, KeyPress, ISO_LEVEL3_KEY_CODE);
}
}
@@ -480,15 +645,15 @@ KbdReleaseAllKeys(void)
{
int i, j;
- if (!kbdDevice)
+ if (!inputInfo.keyboard)
return;
for (i = 0; i < DOWN_LENGTH; i++) {
- if (kbdDevice->key->down[i] != 0) {
+ if (inputInfo.keyboard->key->down[i] != 0) {
for (j = 0; j < 8; j++) {
- if (kbdDevice->key->down[i] & (1 << j)) {
+ if (inputInfo.keyboard->key->down[i] & (1 << j)) {
int detail = (i << 3) | j;
- EnqueueKey(kbdDevice, KeyRelease, detail);
+ EnqueueKey(inputInfo.keyboard, KeyRelease, detail);
}
}
}
diff -pruN xorg-server-1.12.1.orig/hw/vnc/keyboard.h xorg-server-1.12.1/hw/vnc/keyboard.h
--- xorg-server-1.12.1.orig/hw/vnc/keyboard.h 2012-04-18 14:14:07.437250922 -0500
+++ xorg-server-1.12.1/hw/vnc/keyboard.h 2012-04-18 14:15:27.657248035 -0500
@@ -32,3 +32,4 @@
#define META_R_KEY_CODE (MIN_KEY_CODE + 108)
#define ALT_L_KEY_CODE (MIN_KEY_CODE + 56)
#define ALT_R_KEY_CODE (MIN_KEY_CODE + 105)
+#define ISO_LEVEL3_KEY_CODE ALT_R_KEY_CODE
++++++ n_VNC-Fix-crash-due-to-unset-input-device-names.patch ++++++
From: Egbert Eich <eich(a)freedesktop.org>
Date: Tue, 6 Sep 2011 14:58:28 +0200
Subject: [PATCH 6/6] VNC: Fix crash due to unset input device names.
Patch-Mainline: Currently no upstream project.
Git-commit: b756a7efff37021ca503fe1e63084daae4082e9d
Signed-off: Egbert Eich <eich(a)suse.de>
References: bnc #716074
Signed-off-by: Egbert Eich <eich(a)freedesktop.org>
---
hw/vnc/init.c | 2 +-
hw/vnc/rfb.h | 2 +-
hw/vnc/rfbkeyb.c | 7 +++++--
hw/vnc/rfbmouse.c | 9 +++++++--
4 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/hw/vnc/init.c b/hw/vnc/init.c
index 0977fee..6f83aa8 100644
--- a/hw/vnc/init.c
+++ b/hw/vnc/init.c
@@ -816,7 +816,7 @@ rfbMouseProc(DeviceIntPtr pDevice, int onoff)
switch (onoff)
{
case DEVICE_INIT:
- PtrDeviceInit();
+ PtrDeviceInit(pDevice, "vncMouse");
map[1] = 1;
map[2] = 2;
map[3] = 3;
diff --git a/hw/vnc/rfb.h b/hw/vnc/rfb.h
index 70b1a45..aa9abab 100644
--- a/hw/vnc/rfb.h
+++ b/hw/vnc/rfb.h
@@ -578,7 +578,7 @@ extern void rfbGotXCutText(char *str, int len);
extern Bool compatibleKbd;
extern unsigned char ptrAcceleration;
-extern void PtrDeviceInit(void);
+extern void PtrDeviceInit(DeviceIntPtr pDevice, char *name);
extern void PtrDeviceOn(DeviceIntPtr pDev);
extern void PtrDeviceOff(void);
extern void PtrDeviceControl(DeviceIntPtr dev, PtrCtrl *ctrl);
diff --git a/hw/vnc/rfbkeyb.c b/hw/vnc/rfbkeyb.c
index 4da29c2..6d97999 100644
--- a/hw/vnc/rfbkeyb.c
+++ b/hw/vnc/rfbkeyb.c
@@ -36,6 +36,7 @@
#endif
#include <xf86Xinput.h>
#include <exevents.h> /* Needed for InitValuator/Proximity stuff */
+#include <extinit.h>
#include <mipointer.h>
#ifdef XFree86LOADER
@@ -49,7 +50,6 @@
extern void rfbSendBell(void);
-extern DeviceIntPtr kbdDevice;
extern void vncInitKeyb(void);
#include <X11/keysym.h>
@@ -212,11 +212,15 @@ static KeySym map[MAX_KEY_CODE * GLYPHS_PER_KEY] = {
};
#define N_PREDEFINED_KEYS (sizeof(map) / (sizeof(KeySym) * GLYPHS_PER_KEY))
+#define RFB_KEYB "rfbKeyb"
void
KbdDeviceInit(DeviceIntPtr pDevice, KeySymsPtr pKeySyms, CARD8 *pModMap)
{
int i;
+ Atom atom = MakeAtom(RFB_KEYB, strlen(RFB_KEYB), TRUE);
+
+ AssignTypeAndName(pDevice, atom, RFB_KEYB);
for (i = 0; i < MAP_LENGTH; i++)
pModMap[i] = NoSymbol;
@@ -359,7 +363,6 @@ xf86rfbKeybInit(struct _InputDriverRec *drv,
pInfo->control_proc = NULL;
pInfo->switch_mode = NULL;
pInfo->fd = -1;
- pInfo->dev = NULL;
/* Collect the options, and process the common options. */
xf86CollectInputOptions(pInfo, (const char**)drv->default_options);
diff --git a/hw/vnc/rfbmouse.c b/hw/vnc/rfbmouse.c
index 4657128..86e8f2f 100644
--- a/hw/vnc/rfbmouse.c
+++ b/hw/vnc/rfbmouse.c
@@ -37,6 +37,7 @@
#endif
#include <xf86Xinput.h>
#include <exevents.h> /* Needed for InitValuator/Proximity stuff */
+#include <extinit.h>
#include <mipointer.h>
#ifdef XFree86LOADER
@@ -63,8 +64,12 @@ PtrDeviceOn(DeviceIntPtr pDev)
}
void
-PtrDeviceInit(void)
+PtrDeviceInit(DeviceIntPtr pDevice, char *name)
{
+ Atom atom = MakeAtom(name, strlen(name), TRUE);
+
+ AssignTypeAndName(pDevice, atom, name);
+
}
void
@@ -119,7 +124,7 @@ xf86rfbMouseControlProc(DeviceIntPtr dev, int onoff)
{
case DEVICE_INIT:
vncSetPointerDevice(dev);
- PtrDeviceInit();
+ // PtrDeviceInit(dev, "rfbPointer");
map[1] = 1;
map[2] = 2;
map[3] = 3;
--
1.7.3.4
++++++ n_VNC-Fix-crash-when-no-depth-translation-is-required.patch ++++++
From: Michael Schroeder <mls(a)suse.de>
Date: Tue, 6 Sep 2011 07:58:33 +0200
Subject: [PATCH 3/6] VNC: Fix crash when no depth translation is required.
Patch-Mainline: Currently no upstream project.
Git-commit: 74d5e3115cd955b7ee1acc64c6b8b42198ed894b
Signed-off: Egbert Eich <eich(a)suse.de>
References: bnc #389386
Signed-off-by: Egbert Eich <eich(a)freedesktop.org>
---
hw/vnc/translate.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/hw/vnc/translate.c b/hw/vnc/translate.c
index 5cc57a3..78030ed 100644
--- a/hw/vnc/translate.c
+++ b/hw/vnc/translate.c
@@ -168,17 +168,18 @@ rfbTranslateNone(ScreenPtr pScreen, char *table, rfbPixelFormat *in, rfbPixelFor
{
VNCSCREENPTR(pScreen);
DrawablePtr pDraw = (DrawablePtr)pScreen->root;
- int truewidth = PixmapBytePad(width, in->bitsPerPixel) / 4;
+ int truewidth = PixmapBytePad(width, in->bitsPerPixel);
- if ((x + truewidth > pVNC->width) || truewidth != width) {
- unsigned char *buffer = malloc(truewidth * height * in->bitsPerPixel / 8);
+ if ((x + width > pVNC->width) || truewidth != width * in->bitsPerPixel / 8) {
+ unsigned char *buffer = malloc(truewidth * height);
unsigned char *buf = buffer;
- (*pScreen->GetImage)(pDraw, x, y, truewidth, height, ZPixmap, ~0, (char*)buf);
+ (*pScreen->GetImage)(pDraw, x, y, width, height, ZPixmap, ~0, (char*)buf);
+
while (height--) {
memcpy(optr, buf, width * in->bitsPerPixel / 8);
optr += width * in->bitsPerPixel / 8;
- buf += truewidth * in->bitsPerPixel / 8;
+ buf += truewidth;
}
free(buffer);
return;
--
1.7.3.4
++++++ n_VNC-Readd-timeout-when-vnc-viewer-connection-breaks.patch ++++++
From: Egbert Eich <eich(a)freedesktop.org>
Date: Tue, 6 Sep 2011 07:02:11 +0200
Subject: [PATCH 2/6] VNC: Readd timeout when vnc viewer connection breaks.
Patch-Mainline: Currently no upstream project.
Git-commit: 759b49ed1c4ea03e45433c92c2fb8c44a60db34a
Signed-off: Egbert Eich <eich(a)suse.de>
References: bnc #441935, bnc #403901
This prevents Xvnc busy loop forever waiting for a viewer that no longer
response due to network or other issues.
Signed-off-by: Egbert Eich <eich(a)freedesktop.org>
---
hw/vnc/sockets.c | 19 +++++--------------
1 files changed, 5 insertions(+), 14 deletions(-)
diff --git a/hw/vnc/sockets.c b/hw/vnc/sockets.c
index 39eb88a..ae43ed0 100644
--- a/hw/vnc/sockets.c
+++ b/hw/vnc/sockets.c
@@ -442,9 +442,7 @@ WriteExact(int sock, char *buf, int len)
int n;
fd_set fds;
struct timeval tv;
-#if 0
int totalTimeWaited = 0;
-#endif
while (len > 0) {
n = write(sock, buf, len);
@@ -464,7 +462,6 @@ WriteExact(int sock, char *buf, int len)
return n;
}
-#if 0
/* Retry every 5 seconds until we exceed rfbMaxClientWait. We
need to do this because select doesn't necessarily return
immediately when the other end has gone away */
@@ -473,19 +470,14 @@ WriteExact(int sock, char *buf, int len)
FD_SET(sock, &fds);
tv.tv_sec = 5;
tv.tv_usec = 0;
-#else
- /* We're in the WakeupHandler now, so don't wait */
- FD_ZERO(&fds);
- FD_SET(sock, &fds);
- tv.tv_sec = 0;
- tv.tv_usec = 0;
-#endif
n = select(sock+1, NULL, &fds, NULL, &tv);
-#if 0
+
if (n < 0) {
- rfbLogPerror("WriteExact: select");
- return n;
+ if (errno != EINTR) {
+ rfbLogPerror("WriteExact: select");
+ return n;
+ }
}
if (n == 0) {
totalTimeWaited += 5000;
@@ -496,7 +488,6 @@ WriteExact(int sock, char *buf, int len)
} else {
totalTimeWaited = 0;
}
-#endif
}
}
return 1;
--
1.7.3.4
++++++ n_Xvnc-pthread.diff ++++++
--- xorg-server-1.10.4/hw/vnc/Makefile.am.orig 2011-09-06 15:25:27.000000000 +0000
+++ xorg-server-1.10.4/hw/vnc/Makefile.am 2011-09-06 15:26:40.000000000 +0000
@@ -37,6 +37,7 @@
JPEG_LIBS = -ljpeg
CRYPT_LIBS = -lcrypt
Z_LIBS = -lz
+PTHREAD_LIBS = -lpthread
AM_CFLAGS = $(DIX_CFLAGS) $(XVNC_CFLAGS) -I$(top_srcdir)/hw/dmx/vnc -DCHROMIUM=1
@@ -48,7 +49,8 @@
$(CRYPT_LIBS) \
$(XSERVER_SYS_LIBS) \
$(VNCMODULES_LIBS) \
- $(Z_LIBS)
+ $(Z_LIBS) \
+ $(PTHREAD_LIBS)
relink:
++++++ n_xorg-x11-server-rpmmacros.patch ++++++
Index: xorg-server-1.12.1/configure.ac
===================================================================
--- xorg-server-1.12.1.orig/configure.ac
+++ xorg-server-1.12.1/configure.ac
@@ -2232,4 +2232,5 @@ test/Makefile
test/xi2/Makefile
xserver.ent
xorg-server.pc
+xorg-x11-server.macros
])
++++++ pre_checkin.sh ++++++
#!/bin/sh
# pre_checking.sh
# Licensed under the same condition as the xorg-server.
# This script updates the .spec file (based on .spec.in) and inject versioned ABI Symbols from the X-Server,
# stored in a template file xorg-server-provides. The content of this file is verified during build, as the
# same script runs then again, extracting ABI versions from the source to be built. This ensures we can't
# publish a package with wrong ABI Versions being provided as part of the RPM Metadata.
# Driver-, Input and extension-packages are supposed to use the provided macros to ensure correct Requires.
# extract ABI Versions... this function is copied from configure.ac
extract_abi() {
grep ^.define.*${1}_VERSION ${xorg_src}/hw/xfree86/common/xf86Module.h | tr '(),' ' .' | awk '{ print $4$5 }'
}
if [ "$1" == "--tar" ]; then
tmpdir=$(mktemp -d)
tar xf "$2" -C ${tmpdir}
xorg_src=${tmpdir}/*
elif [ "$1" == "--verify" ]; then
xorg_src="$2"
prv_ext=".build"
else
echo "Wrong usage of this script"
echo "$0 can be started in two ways:"
echo "1: $0 --tar {xorg-server-xxxx.tar.bz2}"
echo "2: $0 --verify {source-folder}"
echo "Variant 1 creates the file xorg-server-provides to be included in the src rpm"
echo "Variant 2 is being called during build to ensure the ABI provides match the expectations."
echo ""
echo ""
echo "Trying to guess the right tarball"
sh $0 --tar xorg-server-*.tar.bz2
echo "... Please verify if the result makes sense"
exit 2
fi
abi_ansic=`extract_abi ANSIC`
abi_videodrv=`extract_abi VIDEODRV`
abi_xinput=`extract_abi XINPUT`
abi_extension=`extract_abi EXTENSION`
A="Provides: X11_ABI_XINPUT = ${abi_xinput}\nProvides: X11_ABI_VIDEODRV = ${abi_videodrv}\nProvides: X11_ABI_ANSIC = ${abi_ansic}\nProvides: X11_ABI_EXTENSION = ${abi_extension}"
echo -e $A > xorg-server-provides${prv_ext}
if [ "$1" == "--tar" ]; then
if [ -d ${tmpdir} ]; then
rm -rf ${tmpdir}
fi
elif [ "$1" == "--verify" ]; then
diff "$3" xorg-server-provides${prv_ext}
if [ $? -gt 0 ]; then
echo "The ABI verification failed... please run $0 before checking in"
exit 1
fi
fi
++++++ sysconfig.displaymanager.template ++++++
## Type: string(Xorg)
## Path: Desktop/Display manager
## Default: "Xorg"
#
DISPLAYMANAGER_XSERVER="Xorg"
++++++ u_Avoid-use-after-free-in-dix-dixfonts.c-doImageText.patch ++++++
>From a4d9bf1259ad28f54b6d59a480b2009cc89ca623 Mon Sep 17 00:00:00 2001
From: Alan Coopersmith <alan.coopersmith(a)oracle.com>
Date: Mon, 16 Sep 2013 21:47:16 -0700
Subject: [PATCH] Avoid use-after-free in dix/dixfonts.c: doImageText()
Save a pointer to the passed in closure structure before copying it
and overwriting the *c pointer to point to our copy instead of the
original. If we hit an error, once we free(c), reset c to point to
the original structure before jumping to the cleanup code that
references *c.
Since one of the errors being checked for is whether the server was
able to malloc(c->nChars * itemSize), the client can potentially pass
a number of characters chosen to cause the malloc to fail and the
error path to be taken, resulting in the read from freed memory.
Since the memory is accessed almost immediately afterwards, and the
X server is mostly single threaded, the odds of the free memory having
invalid contents are low with most malloc implementations when not using
memory debugging features, but some allocators will definitely overwrite
the memory there, leading to a likely crash.
Reported-by: Pedro Ribeiro <pedrib(a)gmail.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith(a)oracle.com>
Reviewed-by: Julien Cristau <jcristau(a)debian.org>
---
dix/dixfonts.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/dix/dixfonts.c b/dix/dixfonts.c
index feb765d..2e34d37 100644
--- a/dix/dixfonts.c
+++ b/dix/dixfonts.c
@@ -1425,6 +1425,7 @@ doImageText(ClientPtr client, ITclosurePtr c)
GC *pGC;
unsigned char *data;
ITclosurePtr new_closure;
+ ITclosurePtr old_closure;
/* We're putting the client to sleep. We need to
save some state. Similar problem to that handled
@@ -1436,12 +1437,14 @@ doImageText(ClientPtr client, ITclosurePtr c)
err = BadAlloc;
goto bail;
}
+ old_closure = c;
*new_closure = *c;
c = new_closure;
data = malloc(c->nChars * itemSize);
if (!data) {
free(c);
+ c = old_closure;
err = BadAlloc;
goto bail;
}
@@ -1452,6 +1455,7 @@ doImageText(ClientPtr client, ITclosurePtr c)
if (!pGC) {
free(c->data);
free(c);
+ c = old_closure;
err = BadAlloc;
goto bail;
}
@@ -1464,6 +1468,7 @@ doImageText(ClientPtr client, ITclosurePtr c)
FreeScratchGC(pGC);
free(c->data);
free(c);
+ c = old_closure;
err = BadAlloc;
goto bail;
}
--
1.7.9.2
++++++ u_Do-not-use-intel-driver-on-Poulsbo-Oaktrail-Medfield.patch ++++++
>From ec3ce5493ec00ca0a9304b705a58a40e364f88fb Mon Sep 17 00:00:00 2001
From: Stefan Dirsch <sndirsch(a)suse.de>
Date: Sun, 22 Jul 2012 12:29:51 +0200
Subject: [PATCH 3/3] Do not use intel driver on Poulsbo, Oaktrail, Medfield, CDV.
IDs stolen from Kernel psb driver.
---
hw/xfree86/common/xf86pciBus.c | 64 +++++++++++++++++++++++++++++++++++-----
1 files changed, 56 insertions(+), 8 deletions(-)
diff --git a/hw/xfree86/common/xf86pciBus.c b/hw/xfree86/common/xf86pciBus.c
index a2c18eb..258988a 100644
--- a/hw/xfree86/common/xf86pciBus.c
+++ b/hw/xfree86/common/xf86pciBus.c
@@ -1147,14 +1147,62 @@ xf86VideoPtrToDriverList(struct pci_device *dev,
driverList[0] = "i128";
break;
case 0x8086:
- if ((dev->device_id == 0x00d1) || (dev->device_id == 0x7800)) {
- driverList[0] = "i740";
- }
- else if (dev->device_id == 0x8108) {
- break; /* "hooray" for poulsbo */
- }
- else {
- driverList[0] = "intel";
+ switch (dev->device_id)
+ {
+ /* Intel i740 */
+ case 0x00d1:
+ case 0x7800:
+ driverList[0] = "i740";
+ break;
+ /* GMA500/Poulsbo */
+ case 0x8108:
+ case 0x8109:
+ /* Try psb driver on Poulsbo - if available */
+ driverList[0] = "psb";
+ driverList[1] = "psb_drv";
+ break;
+ /* GMA600/Oaktrail */
+ case 0x4100:
+ case 0x4101:
+ case 0x4102:
+ case 0x4103:
+ case 0x4104:
+ case 0x4105:
+ case 0x4106:
+ case 0x4107:
+ /* Atom E620/Oaktrail */
+ case 0x4108:
+ /* Medfield */
+ case 0x0130:
+ case 0x0131:
+ case 0x0132:
+ case 0x0133:
+ case 0x0134:
+ case 0x0135:
+ case 0x0136:
+ case 0x0137:
+ /* GMA 3600/CDV */
+ case 0x0be0:
+ case 0x0be1:
+ case 0x0be2:
+ case 0x0be3:
+ case 0x0be4:
+ case 0x0be5:
+ case 0x0be6:
+ case 0x0be7:
+ case 0x0be8:
+ case 0x0be9:
+ case 0x0bea:
+ case 0x0beb:
+ case 0x0bec:
+ case 0x0bed:
+ case 0x0bee:
+ case 0x0bef:
+ /* Use fbdev/vesa driver on Oaktrail, Medfield, CDV */
+ break;
+ default:
+ driverList[0] = "intel";
+ break;
}
break;
case 0x102b:
--
1.7.3.4
++++++ u_exa-only-draw-valid-trapezoids.patch ++++++
Author: Maarten Lankhorst <maarten.lankhorst(a)canonical.com>
Subject: exa: only draw valid trapezoids
Patch-Mainline: To be upstreamed
References: bnc#853846 CVE-2013-6424
Signed-off-by: Michal Srb <msrb(a)suse.com>
diff --git a/exa/exa_render.c b/exa/exa_render.c
index 172e2b5..807eeba 100644
--- a/exa/exa_render.c
+++ b/exa/exa_render.c
@@ -1141,7 +1141,8 @@ exaTrapezoids(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
exaPrepareAccess(pPicture->pDrawable, EXA_PREPARE_DEST);
for (; ntrap; ntrap--, traps++)
- (*ps->RasterizeTrapezoid) (pPicture, traps, -bounds.x1, -bounds.y1);
+ if (xTrapezoidValid(traps))
+ (*ps->RasterizeTrapezoid) (pPicture, traps, -bounds.x1, -bounds.y1);
exaFinishAccess(pPicture->pDrawable, EXA_PREPARE_DEST);
xRel = bounds.x1 + xSrc - xDst;
diff --git a/render/picture.h b/render/picture.h
index c85353a..fcd6401 100644
--- a/render/picture.h
+++ b/render/picture.h
@@ -211,7 +211,7 @@ typedef pixman_fixed_t xFixed;
/* whether 't' is a well defined not obviously empty trapezoid */
#define xTrapezoidValid(t) ((t)->left.p1.y != (t)->left.p2.y && \
(t)->right.p1.y != (t)->right.p2.y && \
- (int) ((t)->bottom - (t)->top) > 0)
+ ((t)->bottom > (t)->top))
/*
* Standard NTSC luminance conversions:
++++++ u_init_framebuffer_base.patch ++++++
Index: xorg-server-1.13.2/glx/glxdri.c
===================================================================
--- xorg-server-1.13.2/glx/glxdri.c
+++ xorg-server-1.13.2/glx/glxdri.c
@@ -971,13 +971,15 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
size_t buffer_size;
ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
+ framebuffer.base = NULL;
+
if (!xf86LoaderCheckSymbol("DRIQueryDirectRenderingCapable") ||
!DRIQueryDirectRenderingCapable(pScreen, &isCapable) || !isCapable) {
LogMessage(X_INFO,
"AIGLX: Screen %d is not DRI capable\n", pScreen->myNum);
return NULL;
}
-
+
screen = calloc(1, sizeof *screen);
if (screen == NULL)
return NULL;
++++++ u_vgaHW-no-legacy.patch ++++++
Author: Andreas Schwab <schwab(a)suse.de>
Subject: disable DACDelay on non-vga-hardware users
Patch-Mainline: To be upstreamed
Signed-Off-By: Marcus Meissner <meissner(a)suse.de>
--- hw/xfree86/vgahw/vgaHW.h
+++ hw/xfree86/vgahw/vgaHW.h
@@ -168,11 +168,15 @@ typedef struct _vgaHWRec {
#define BITS_PER_GUN 6
#define COLORMAP_SIZE 256
+#if defined(__powerpc__) || defined(__arm__) || defined(__s390__) || defined(__nds32__)
+#define DACDelay(hw) /* No legacy VGA support */
+#else
#define DACDelay(hw) \
do { \
(hw)->readST01((hw)); \
(hw)->readST01((hw)); \
} while (0)
+#endif
/* Function Prototypes */
++++++ u_xserver_xvfb-randr.patch ++++++
Author: Lambros Lambrou <lambroslambrou(a)google.com>
Subject: xvfb: add randr support
Patch-Mainline: To be upstreamed
References: bnc#823410 fdo#26391
Signed-off-by: Michal Srb <msrb(a)suse.cz>
--- a/hw/vfb/InitOutput.c
+++ b/hw/vfb/InitOutput.c
@@ -66,6 +66,7 @@
#include "dix.h"
#include "miline.h"
#include "glx_extinit.h"
+#include "randrstr.h"
#define VFB_DEFAULT_WIDTH 1280
#define VFB_DEFAULT_HEIGHT 1024
@@ -812,6 +813,165 @@
}
static Bool
+vfbRROutputValidateMode(ScreenPtr pScreen,
+ RROutputPtr output,
+ RRModePtr mode)
+{
+ rrScrPriv(pScreen);
+
+ if (pScrPriv->minWidth <= mode->mode.width &&
+ pScrPriv->maxWidth >= mode->mode.width &&
+ pScrPriv->minHeight <= mode->mode.height &&
+ pScrPriv->maxHeight >= mode->mode.height)
+ return TRUE;
+ else
+ return FALSE;
+}
+
+static Bool
+vfbRRScreenSetSize(ScreenPtr pScreen,
+ CARD16 width,
+ CARD16 height,
+ CARD32 mmWidth,
+ CARD32 mmHeight)
+{
+ WindowPtr root = pScreen->root;
+ WindowPtr layer;
+ WindowPtr child;
+ BoxRec box;
+
+ pScreen->width = width;
+ pScreen->height = height;
+ pScreen->mmWidth = mmWidth;
+ pScreen->mmHeight = mmHeight;
+
+ // Resize the root window & adjust its clipping
+ box.x1 = 0;
+ box.y1 = 0;
+ box.x2 = pScreen->width;
+ box.y2 = pScreen->height;
+ REGION_INIT(pScreen, &root->winSize, &box, 1);
+ REGION_INIT(pScreen, &root->borderSize, &box, 1);
+ REGION_RESET(pScreen, &root->borderClip, &box);
+ root->drawable.width = pScreen->width;
+ root->drawable.height = pScreen->height;
+ REGION_BREAK (pScreen, &root->clipList);
+
+ // Update the clipping regions of all windows
+ for (child = root->firstChild; child; child = child->nextSib)
+ (*pScreen->MarkOverlappedWindows)(child, child, &layer);
+
+ if (root->firstChild)
+ {
+ (*pScreen->MarkOverlappedWindows)(root->firstChild,
+ root->firstChild,
+ (WindowPtr *)NULL);
+ }
+ else
+ {
+ (*pScreen->MarkWindow) (root);
+ }
+
+ (*pScreen->ValidateTree)(root, NullWindow, VTOther);
+ (*pScreen->HandleExposures)(root);
+
+ // Reposition top-level windows to fit new root size
+ // XXX I assume this is what it does, but I'm not sure
+ ResizeChildrenWinSize (root, 0, 0, 0, 0);
+
+
+ // Check the pointer position
+ WindowsRestructured ();
+
+ RRScreenSizeNotify (pScreen);
+ RRTellChanged(pScreen);
+
+ // Flush resulting events, etc to clients
+ FlushAllOutput ();
+
+ return TRUE;
+}
+
+static Bool
+vfbRRCrtcSet(ScreenPtr pScreen,
+ RRCrtcPtr crtc,
+ RRModePtr mode,
+ int x,
+ int y,
+ Rotation rotation,
+ int numOutput,
+ RROutputPtr *outputs)
+{
+ return RRCrtcNotify(crtc, mode, x, y, rotation, NULL, numOutput, outputs);
+}
+
+static Bool
+vfbRRGetInfo(ScreenPtr pScreen, Rotation *rotations)
+{
+ return TRUE;
+}
+
+static Bool
+vfbRandRInit(ScreenPtr pScreen)
+{
+ rrScrPrivPtr pScrPriv;
+#if RANDR_12_INTERFACE
+ RRModePtr mode;
+ RRCrtcPtr crtc;
+ RROutputPtr output;
+ xRRModeInfo modeInfo;
+ char name[64];
+#endif
+
+ if (!RRScreenInit (pScreen))
+ return FALSE;
+ pScrPriv = rrGetScrPriv(pScreen);
+ pScrPriv->rrGetInfo = vfbRRGetInfo;
+#if RANDR_12_INTERFACE
+ pScrPriv->rrCrtcSet = vfbRRCrtcSet;
+ pScrPriv->rrScreenSetSize = vfbRRScreenSetSize;
+ pScrPriv->rrOutputSetProperty = NULL;
+#if RANDR_13_INTERFACE
+ pScrPriv->rrOutputGetProperty = NULL;
+#endif
+ pScrPriv->rrOutputValidateMode = vfbRROutputValidateMode;
+ pScrPriv->rrModeDestroy = NULL;
+
+ RRScreenSetSizeRange (pScreen,
+ 1, 1,
+ pScreen->width, pScreen->height);
+
+ sprintf (name, "%dx%d", pScreen->width, pScreen->height);
+ memset (&modeInfo, '\0', sizeof (modeInfo));
+ modeInfo.width = pScreen->width;
+ modeInfo.height = pScreen->height;
+ modeInfo.nameLength = strlen (name);
+
+ mode = RRModeGet (&modeInfo, name);
+ if (!mode)
+ return FALSE;
+
+ crtc = RRCrtcCreate (pScreen, NULL);
+ if (!crtc)
+ return FALSE;
+
+ output = RROutputCreate (pScreen, "screen", 6, NULL);
+ if (!output)
+ return FALSE;
+ if (!RROutputSetClones (output, NULL, 0))
+ return FALSE;
+ if (!RROutputSetModes (output, &mode, 1, 0))
+ return FALSE;
+ if (!RROutputSetCrtcs (output, &crtc, 1))
+ return FALSE;
+ if (!RROutputSetConnection (output, RR_Connected))
+ return FALSE;
+ RRCrtcNotify (crtc, mode, 0, 0, RR_Rotate_0, NULL, 1, &output);
+#endif
+ return TRUE;
+}
+
+static Bool
vfbScreenInit(ScreenPtr pScreen, int argc, char **argv)
{
vfbScreenInfoPtr pvfb = &vfbScreens[pScreen->myNum];
@@ -885,6 +1045,9 @@
if (!ret)
return FALSE;
+ if (!vfbRandRInit(pScreen))
+ return FALSE;
+
pScreen->InstallColormap = vfbInstallColormap;
pScreen->UninstallColormap = vfbUninstallColormap;
pScreen->ListInstalledColormaps = vfbListInstalledColormaps;
++++++ xorg-backtrace ++++++
#!/usr/bin/perl
$version = "1.0";
$timeout = 5;
@pkgs = ( "xorg-x11-server", "xorg-x11-driver-video", "xorg-x11-driver-input",
"libpixman-1-0", "libpciaccess0" );
$xtracmds= "/etc/X11/xorg-backtrace-cmds";
$pid=$ARGV[0];
if ($pid == 0) {
print "Usage: $0 <pid>\n";
exit 1;
}
if (! -e "/usr/bin/gdb") {
print "Install gdb to get reasonable backtraces\n";
exit 2;
}
$SIG{ALRM} = sub { die "timeout starting gdb" };
alarm $timeout;
open STDERR, ">&STDOUT";
use FileHandle;
use IPC::Open2;
$gdb = open2 (*R, *W, "/usr/bin/gdb -n -p $pid");
$SIG{ALRM} = sub { kill QUIT, $gdb; sleep 1; kill KILL, $gdb; die "timeout using gdb" };
alarm $timeout;
print "\n==================== GDB Backtrace ============\n\n";
print "Done by $0 V$version\n\n";
$needpkgs=0;
for $p (@pkgs) {
next if system ("rpm", "-q", "--quiet", "$p-debuginfo") == 0 &&
system ("rpm", "-q", "--quiet", "$p-debugsource") == 0;
print "Install following debug packages to improve backtrace:\n" unless $needpkgs;
$needpkgs++;
print "\t$p-debug*\n";
}
print "\n" if $needpkgs;
print W "set prompt\necho \\n===info\\n\n";
#print W "info files\necho ===files\\n\n";
print W "thread apply all bt full\necho ===btend\\n\n";
$_=<R>; # GNU gdb version
print;
while (<R>) {
last if /^===info/;
print if /^This GDB was configured as/;
}
#print "\n==================== Files ====================\n\n";
#while (<R>) {
# last if /^===files/;
# print;
#}
print "\n==================== Backtrace ================\n";
$fno = "";
$fls = 0;
$o = "";
$use = 0;
while (<R>) {
last if /^===btend/;
if (/^#(\d+)\s/) {
$fno = $1;
$o .= "\n";
$o .= "===l".($fno-1)."\n" if $use;
$o .= "\n";
$fls = $fno+1 if /\bxorg_backtrace \(/ || /\bOsSigHandler \(/;
$use = 1;
}
$line{$fno} = $1 if $line{$fno} == 0 && /:(\d+)\s*$/;
$o .= $_;
$use = 0 if /^No symbol table info available/;
}
$o .="\n===l$fno";
for $i ($fls..$fno) {
print W "frame $i\necho ===fs$i\\n\nlist\necho ===fe$i\\n\n";
while (<R>) {
last if /^===fs$i\b/;
}
$r = "";
while (<R>) {
last if /^===fe$i\b/;
$r .= $_;
}
if ($line{$i} > 0) {
$r =~ s/^$line{$i}\b/$line{$i} */m;
}
$o =~ s/^===l$i$/$r/m;
}
if ($fls > 0) {
for $i (0..$fls-1) {
$o =~ s/^(#$i\s.*?)\n.*?\n#/$1\n\n#/ms;
}
}
$o =~ s/^===l.*$//mg;
print "$o";
if (-e $xtracmds) {
print W "source -v $xtracmds\necho ===cmds\\n\n";
print "\n==================== Extra Commands ===========\n\n";
while (<R>) {
last if /^===cmds/;
print unless /^\+echo ===cmds/;
}
}
print "\n==================== Backtrace End ============\n\n";
close R;
close W;
exit 0;
++++++ xorg-server-provides ++++++
Provides: X11_ABI_XINPUT = 18.0
Provides: X11_ABI_VIDEODRV = 13.1
Provides: X11_ABI_ANSIC = 0.4
Provides: X11_ABI_EXTENSION = 7.0
++++++ xorg-x11-server.macros.in ++++++
# RPM macros for XOrg ABI Definitions
# Add a Requires for the correct VIDEO Driver ABI
%x11_abi_videodrv_req \
Requires: X11_ABI_VIDEODRV = @abi_videodrv@
%x11_abi_xinput_req \
Requires: X11_ABI_XINPUT = @abi_xinput@
%x11_abi_ansic_req \
Requires: X11_ABI_ANSIC = @abi_ansic@
%x11_abi_extension_req \
Requires: X11_ABI_EXTENSION = @abi_extension@
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package xorg-x11-server.2418 for openSUSE:12.2:Update checked in at 2013-12-27 11:17:35
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:12.2:Update/xorg-x11-server.2418 (Old)
and /work/SRC/openSUSE:12.2:Update/.xorg-x11-server.2418.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "xorg-x11-server.2418"
Changes:
--------
New Changes file:
--- /dev/null 2013-11-25 01:44:08.036031256 +0100
+++ /work/SRC/openSUSE:12.2:Update/.xorg-x11-server.2418.new/xorg-x11-server.changes 2013-12-27 11:17:38.000000000 +0100
@@ -0,0 +1,3293 @@
+-------------------------------------------------------------------
+Mon Dec 16 14:54:12 UTC 2013 - msrb(a)suse.com
+
+- u_exa-only-draw-valid-trapezoids.patch
+ * Fix possible x server crash using invalid trapezoids.
+ (bnc#853846 CVE-2013-6424)
+
+-------------------------------------------------------------------
+Mon Oct 21 12:36:13 UTC 2013 - sndirsch(a)suse.com
+
+- u_Avoid-use-after-free-in-dix-dixfonts.c-doImageText.patch
+ * Fixes a security issue, in which an authenticated X client
+ can cause an X server to use memory after it was freed,
+ potentially leading to crash and/or memory corruption.
+ (CVE-2013-4396, bnc#843652)
+- n_Xvnc-fix-use-after-free-in-rfbauthreenable.patch
+ * rfbAuthReenable is accessing rfbClient structure that was in
+ most cases already freed. It actually needs only ScreenPtr,
+ so pass it directly. (bnc#816813)
+
+-------------------------------------------------------------------
+Wed Jun 19 15:09:09 UTC 2013 - sndirsch(a)suse.com
+
+- U_os-Reset-input-buffer-s-ignoreBytes-field.patch
+ * If a client sends a request larger than maxBigRequestSize,
+ the server is supposed to ignore it.
+ Before commit cf88363d, the server would simply disconnect
+ the client. After that commit, it attempts to gracefully
+ ignore the request by remembering how long the client
+ specified the request to be, and ignoring that many bytes.
+ However, if a client sends a BigReq header with a large size
+ and disconnects before actually sending the rest of the
+ specified request, the server will reuse the ConnectionInput
+ buffer without resetting the ignoreBytes field. This makes
+ the server ignore new X clients' requests.
+ This fixes that behavior by resetting the ignoreBytes field
+ when putting the ConnectionInput buffer back on the
+ FreeInputs list. (bnc#815583)
+
+-------------------------------------------------------------------
+Thu Jun 6 14:10:31 UTC 2013 - msrb(a)suse.com
+
+- u_xserver_xvfb-randr.patch
+ * Add randr support to Xvfb (bnc#823410)
+
+-------------------------------------------------------------------
+Mon Apr 29 15:12:31 UTC 2013 - sndirsch(a)suse.com
+
+- U_xf86-fix-flush-input-to-work-with-Linux-evdev-device.patch
+ * So when we VT switch back and attempt to flush the input
+ devices, we don't succeed because evdev won't return part
+ of an event, since we were only asking for 4 bytes, we'd
+ only get -EINVAL back. This could later cause events to be
+ flushed that we shouldn't have gotten.
+ This is a fix for CVE-2013-1940. (bnc#814653)
+
+-------------------------------------------------------------------
+Fri Mar 1 13:55:03 UTC 2013 - msrb(a)suse.com
+
+- N-VNC-Add-Xvnc-man-page.patch (bnc#798995)
+
+-------------------------------------------------------------------
+Mon Jan 7 17:31:18 CET 2013 - ohering(a)suse.de
+
+- 0001-dix-set-the-device-transformation-matrix.patch (bnc#776385)
+ fix mouse pointer jumping to edge of screen inside virtual machines
+
+-------------------------------------------------------------------
+Mon Oct 29 17:39:48 CET 2012 - fcrozat(a)suse.com
+
+- U_fix_exa_glyph_corruption.patch:
+ * fix glyph corruption with some drivers (like nouveau)
+ (bnc#786153 fdo#47266).
+
+-------------------------------------------------------------------
+Sat Oct 13 09:33:55 UTC 2012 - meissner(a)suse.com
+
+- N_vgaHW-no-legacy.patch
+ * make DACDelay an empty macro for non-VGA platforms. (bnc#784981)
+
+-------------------------------------------------------------------
+Thu Sep 27 14:00:01 CEST 2012 - msrb(a)suse.com
+
+- u_dix_make-sure-the-mask-is-set-for-emulated-scroll-events.patch
+ * Make evdev wheel emulation work in all axes again. (bnc#779322)
+
+-------------------------------------------------------------------
+Fri Sep 07 16:10:12 CEST 2012 - msrb(a)suse.com
+
+- u_VNC_build-with-damage-extension.patch
+ * Build VNC with DAMAGE extension. (bnc#771745)
+
+-------------------------------------------------------------------
+Sun Jul 22 10:35:59 UTC 2012 - sndirsch(a)suse.com
+
+- u_Do-not-use-intel-driver-on-Poulsbo-Oaktrail-Medfield.patch
+ * Do not use intel driver on Poulsbo, Oaktrail, Medfield, CDV.
+ IDs stolen from Kernel psb driver. (bnc#772279)
+ * obsoletes xorg-detect-psb.patch
+
+-------------------------------------------------------------------
+Tue Jul 17 01:42:30 UTC 2012 - sndirsch(a)suse.com
+
+- renamed patches of previous change according to our policy
+ u_* --> U_* (since these were rebased on upstream patches)
+
+-------------------------------------------------------------------
+Fri Jul 13 00:19:59 UTC 2012 - badshah400(a)gmail.com
+
+- Add patches u_dri2_add_DRI2CreateDrawable2.patch and
+ u_0012-glx_Free_reference_to_destroyed_GLX_drawable.patch to fix
+ seemingly random crashes of the X stack [bnc#769553]; patches
+ came from upstream git commits, and were rebased to apply to
+ present version cleanly.
+
+-------------------------------------------------------------------
+Mon Jul 9 21:28:59 UTC 2012 - tobias.johannes.klausmann(a)mni.thm.de
+
+- Update to Version 1.12.3
+ + The third stable update to the X.Org X server 1.12 series is now available.
+ A few smaller changes only since the second RC, some memory leak fixes and two
+ fixes to avoid out-of-bounds array access.
+
+-------------------------------------------------------------------
+Tue Jun 26 10:38:40 UTC 2012 - sndirsch(a)suse.com
+
+- removed redundant buildrequires to xorg-x11 meta package
+
+-------------------------------------------------------------------
+Thu Jun 14 14:07:14 UTC 2012 - sndirsch(a)suse.com
+
+- change xorg-x11 requires to a requires for xkbcomp (xorg-x11 is
+ meanwhile a meta package, which requires any X sample app
+ package); background: Xserver uses xkbcomp on startup for
+ creating the cache file for xkb keyboard map.
+
+-------------------------------------------------------------------
+Fri Jun 8 14:12:48 UTC 2012 - sndirsch(a)suse.com
+
+- let xorg-x11-server require Mesa, since that package includes
+ the DRI drivers (including the "swrast" DRI driver for software
+ rendering), which are required by GLX and AIGLX extensions
+ (bnc#765241)
+
+-------------------------------------------------------------------
+Wed May 30 14:56:53 UTC 2012 - tobias.johannes.klausmann(a)mni.thm.de
+
+- Update to version 1.12.2
+
+-------------------------------------------------------------------
+Fri May 25 14:44:36 UTC 2012 - sndirsch(a)suse.com
+
+- no longer use obsolete %run_permissions; replaced it by
+ %set_permissions (bnc#764101)
+
+-------------------------------------------------------------------
+Tue May 22 08:50:21 UTC 2012 - sndirsch(a)suse.com
+
+- added patches to implement GLX_ARB_create_context extensions
+ required for OpenGL 3.0 support (not upstream yet)
+
+-------------------------------------------------------------------
+Wed May 9 16:40:01 UTC 2012 - sndirsch(a)suse.com
+
+- changed pixman-1-0 requires to version 0.24 (bnc#759537)
+
+-------------------------------------------------------------------
+Wed Apr 25 12:44:12 UTC 2012 - sndirsch(a)suse.com
+
+- remove BuildRequires to ghostscript-library, since it conflicts
+ with ghostscript-mini apparently now required by some other
+ package
+
+-------------------------------------------------------------------
+Wed Apr 18 22:52:23 UTC 2012 - mgorse(a)suse.com
+
+- Rebase VNC patches
+ Rebase confine_to_shape.diff
+
+-------------------------------------------------------------------
+Sun Apr 15 12:35:03 UTC 2012 - dimstar(a)opensuse.org
+
+- Update to version 1.12.1
+- Drop xorg-docs-1.6.tar.bz2: the docs are provided in a sep.
+ package.
+- Add ABI Provides verification:
+ + pre_checkin.sh to be launched with --tar before checkin (no
+ parameter given will try to do the right thing).
+ + pre_checkin.sh is used during build to verify that the ABI
+ values match the expectations, to ensure we provide by rpm what
+ the binaries do.
+- Add rpm macro file, allowing driver and input packages to specify
+ %x11_abi_videodrv_req, %x11_abi_xinput_req.
+- Rebased patches to apply on 1.12.1 code base:
+ + 0001-Check-harder-for-primary-PCI-device.patch
+ + 0001-Fix-segfault-when-killing-X-with-ctrl-alt-backspace.patch
+ + autoconfig_fallback_fbdev_first.diff
++++ 3096 more lines (skipped)
++++ between /dev/null
++++ and /work/SRC/openSUSE:12.2:Update/.xorg-x11-server.2418.new/xorg-x11-server.changes
New:
----
0001-Check-harder-for-primary-PCI-device.patch
0001-Fix-segfault-when-killing-X-with-ctrl-alt-backspace.patch
0001-Prevent-XSync-Alarms-from-senslessly-calling-CheckTr.patch
0001-Xinput-Catch-missing-configlayout-when-deleting-dev.patch
0001-dix-set-the-device-transformation-matrix.patch
N-VNC-Add-Xvnc-man-page.patch
N-VNC-Add-proto.diff
N-VNC-Add-support-for-VNC.patch
N-VNC-Don-t-let-VNC-access-the-framebuffer-directly-an.patch
N-VNC-Enable-use-of-all-keyboard-layouts-independent-o.patch
N-VNC-Fix-crash-due-to-unset-input-device-names.patch
N-VNC-Fix-crash-when-no-depth-translation-is-required.patch
N-VNC-Readd-timeout-when-vnc-viewer-connection-breaks.patch
N_vgaHW-no-legacy.patch
README.updates
U_dri2_add_DRI2CreateDrawable2.patch
U_fix_exa_glyph_corruption.patch
U_glx_Free_reference_to_destroyed_GLX_drawable.patch
U_os-Reset-input-buffer-s-ignoreBytes-field.patch
U_xf86-fix-flush-input-to-work-with-Linux-evdev-device.patch
Use-external-tool-for-creating-backtraces-on-crashes.patch
Xvnc-pthread.diff
autoconfig_fallback_fbdev_first.diff
bug-197858_dpms.diff
bug474071-fix1.diff
bug534768-prefer_local_symbols.patch
cache-xkbcomp-output-for-fast-start-up.patch
confine_to_shape.diff
dpms_screensaver.diff
driver-autoconfig.diff
edid_data_sanity_check.diff
fbdevhw.diff
fix-dpi-values.diff
fix_fglrx_screendepth_issue.patch
modprobe.nvidia
n_Xvnc-fix-use-after-free-in-rfbauthreenable.patch
p_default-module-path.diff
p_xnest-ignore-getimage-errors.diff
pci-legacy-mem-fallback.diff
pio_ia64.diff
pre_checkin.sh
pu_fixes.diff
randr1_1-sig11.diff
sync-fix.patch
sysconfig.displaymanager.template
u_0001-glx-Fix-mishandling-of-shared-contexts.patch
u_0002-glx-Don-t-track-GLClientmajorVersion-or-GLClientmino.patch
u_0003-glx-Extend-__GLXscreen-createContext-to-take-attribu.patch
u_0004-glx-Add-tracking-for-GLX_ARB_create_context-and-GLX_.patch
u_0005-glx-Optionally-call-DRI2-createContextAttribs-from-_.patch
u_0006-glx-Implement-GLX-SetClientInfoARB-protocol.patch
u_0007-glx-Initialize-all-context-fields-together.patch
u_0008-glx-Initialize-remaining-context-fields.patch
u_0009-glx-Use-one-function-to-add-a-context-to-all-global-.patch
u_0010-glx-Make-several-functions-available-outside-the-glx.patch
u_0011-glx-Implement-protocol-for-glXCreateContextAttribsAR.patch
u_Avoid-use-after-free-in-dix-dixfonts.c-doImageText.patch
u_Do-not-use-intel-driver-on-Poulsbo-Oaktrail-Medfield.patch
u_VNC_build-with-damage-extension.patch
u_dix_make-sure-the-mask-is-set-for-emulated-scroll-events.patch
u_exa-only-draw-valid-trapezoids.patch
u_xserver_xvfb-randr.patch
vidmode-sig11.diff
xorg-backtrace
xorg-server-1.12.3.tar.bz2
xorg-server-provides
xorg-server-xdmcp.patch
xorg-x11-server-rpmmacros.patch
xorg-x11-server.changes
xorg-x11-server.macros.in
xorg-x11-server.spec
xorgcfg.tar.bz2
xserver-bg-none-root.patch
zap_warning_xserver.diff
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ xorg-x11-server.spec ++++++
#
# spec file for package xorg-x11-server
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: xorg-x11-server
%define dirsuffix 1.12.3
%define vnc 1
Summary: X
License: GPL-2.0+ and MIT
Group: System/X11/Servers/XF86_4
Source0: xorg-server-%{dirsuffix}.tar.bz2
Source1: sysconfig.displaymanager.template
Source3: README.updates
Source4: xorgcfg.tar.bz2
Source5: modprobe.nvidia
Source8: xorg-backtrace
# RPM Macros to be installed. The ABI Versions will be injected by configure.
Source96: xorg-x11-server.macros.in
# Source98 and Source99 are used to ensure proper ABI provides.
Source98: xorg-server-provides
Source99: pre_checkin.sh
# PATCH-FEATURE-OPENSUSE xorg-x11-server-rpmmacros.patch dimstar(a)opensuse.org -- Provide RPM macros to require correct ABI Versions.
Patch0: xorg-x11-server-rpmmacros.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch2: p_default-module-path.diff
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch6: pu_fixes.diff
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch16: p_xnest-ignore-getimage-errors.diff
BuildRequires: Mesa-devel
BuildRequires: bison
BuildRequires: flex
BuildRequires: libtool
BuildRequires: pkgconfig
BuildRequires: pkgconfig(bigreqsproto) >= 1.1.0
BuildRequires: pkgconfig(damageproto) >= 1.1
BuildRequires: pkgconfig(dmx) >= 1.0.99.1
BuildRequires: pkgconfig(fixesproto) >= 4.1
BuildRequires: pkgconfig(fontconfig)
BuildRequires: pkgconfig(fontenc)
BuildRequires: pkgconfig(fontsproto)
BuildRequires: pkgconfig(fontutil)
BuildRequires: pkgconfig(freetype2)
BuildRequires: pkgconfig(ice)
BuildRequires: pkgconfig(inputproto) >= 1.9.99.902
BuildRequires: pkgconfig(kbproto) >= 1.0.3
BuildRequires: pkgconfig(libdrm)
BuildRequires: pkgconfig(openssl)
BuildRequires: pkgconfig(pciaccess) >= 0.8.0
BuildRequires: pkgconfig(pixman-1) >= 0.24
BuildRequires: pkgconfig(randrproto) >= 1.2.99.3
BuildRequires: pkgconfig(renderproto) >= 0.11
BuildRequires: pkgconfig(sm)
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xau)
BuildRequires: pkgconfig(xau)
BuildRequires: pkgconfig(xaw7)
BuildRequires: pkgconfig(xcmiscproto) >= 1.2.0
BuildRequires: pkgconfig(xdmcp)
BuildRequires: pkgconfig(xext) >= 1.0.99.4
BuildRequires: pkgconfig(xextproto) >= 7.1.99
BuildRequires: pkgconfig(xfixes)
BuildRequires: pkgconfig(xfont) >= 1.4.2
BuildRequires: pkgconfig(xi) >= 1.2.99.1
BuildRequires: pkgconfig(xkbfile)
BuildRequires: pkgconfig(xmu)
BuildRequires: pkgconfig(xp)
BuildRequires: pkgconfig(xpm)
BuildRequires: pkgconfig(xprintutil)
BuildRequires: pkgconfig(xproto) >= 7.0.17
BuildRequires: pkgconfig(xrender)
BuildRequires: pkgconfig(xres)
BuildRequires: pkgconfig(xt)
BuildRequires: pkgconfig(xtrans) >= 1.2.2
BuildRequires: pkgconfig(xtst) >= 1.0.99.2
BuildRequires: pkgconfig(xv)
### udev support (broken on openSUSE 11.2, see also bnc #589997)
%if 0%{?suse_version} >= 1130
BuildRequires: pkgconfig(libudev) >= 143
%endif
%if %vnc
BuildRequires: libjpeg-devel
BuildRequires: pkgconfig(vncproto)
%endif
Version: 7.6_%{dirsuffix}
Release: 0
Url: http://xorg.freedesktop.org/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%ifnarch s390 s390x
Requires(pre): %fillup_prereq
%endif
Requires: pkgconfig
Requires: xkbcomp
Requires: xorg-x11-fonts-core
%ifnarch s390 s390x
Requires: libpixman-1-0 >= 0.24
%(cat %{SOURCE98})
%endif
Requires: Mesa
Provides: xorg-x11-Xvfb
Provides: xorg-x11-server-glx
Obsoletes: xorg-x11-Xvfb
Obsoletes: xorg-x11-server-glx
%if %vnc
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch17: N-VNC-Add-support-for-VNC.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch18: N-VNC-Readd-timeout-when-vnc-viewer-connection-breaks.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch19: N-VNC-Fix-crash-when-no-depth-translation-is-required.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch20: N-VNC-Don-t-let-VNC-access-the-framebuffer-directly-an.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch21: N-VNC-Enable-use-of-all-keyboard-layouts-independent-o.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch22: N-VNC-Fix-crash-due-to-unset-input-device-names.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch23: Xvnc-pthread.diff
Patch24: N-VNC-Add-proto.diff
Patch25: u_VNC_build-with-damage-extension.patch
Patch26: N-VNC-Add-Xvnc-man-page.patch
Patch27: n_Xvnc-fix-use-after-free-in-rfbauthreenable.patch
%endif
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch45: bug-197858_dpms.diff
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch77: fbdevhw.diff
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch79: edid_data_sanity_check.diff
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch101: zap_warning_xserver.diff
# PATCH-NEEDS-REBASE
Patch103: confine_to_shape.diff
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch106: randr1_1-sig11.diff
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch112: fix-dpi-values.diff
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch123: vidmode-sig11.diff
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch125: 0001-Xinput-Catch-missing-configlayout-when-deleting-dev.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch127: dpms_screensaver.diff
# PATCH-NEEDS-REBASE (might not be applicable at all anymore)
Patch128: pci-legacy-mem-fallback.diff
# PATCH-NEEDS-REBASE (might not be applicable at all anymore)
Patch129: bug474071-fix1.diff
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch143: autoconfig_fallback_fbdev_first.diff
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch145: driver-autoconfig.diff
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch162: cache-xkbcomp-output-for-fast-start-up.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch163: xserver-bg-none-root.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch200: bug534768-prefer_local_symbols.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch202: 0001-Check-harder-for-primary-PCI-device.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch203: 0001-Fix-segfault-when-killing-X-with-ctrl-alt-backspace.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch206: fix_fglrx_screendepth_issue.patch
# PATCH-NEEDS-REBASE (might not be applicable at all anymore)
Patch210: pio_ia64.diff
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch211: 0001-Prevent-XSync-Alarms-from-senslessly-calling-CheckTr.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch213: xorg-server-xdmcp.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch220: Use-external-tool-for-creating-backtraces-on-crashes.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch222: sync-fix.patch
Patch223: U_glx_Free_reference_to_destroyed_GLX_drawable.patch
Patch224: U_dri2_add_DRI2CreateDrawable2.patch
Patch225: u_Do-not-use-intel-driver-on-Poulsbo-Oaktrail-Medfield.patch
Patch226: u_dix_make-sure-the-mask-is-set-for-emulated-scroll-events.patch
# # PATCH-FIX-UPSTREAM N_vgaHW-no-legacy.patch bnc#784981 meissner(a)suse.de
Patch227: N_vgaHW-no-legacy.patch
# PATCH-FIX-UPSTREAM U_fix_exa_glyph_corruption.patch fcrozat(a)suse.com -- fix EXA glyph corruption (bnc#786153 fdo#47266)
Patch228: U_fix_exa_glyph_corruption.patch
Patch229: U_xf86-fix-flush-input-to-work-with-Linux-evdev-device.patch
Patch230: u_xserver_xvfb-randr.patch
Patch231: U_os-Reset-input-buffer-s-ignoreBytes-field.patch
Patch232: u_Avoid-use-after-free-in-dix-dixfonts.c-doImageText.patch
# PATCH-FIX-UPSTREAM u_exa-only-draw-valid-trapezoids.patch bnc#853846 msrb(a)suse.com -- Fixes possible crash of server using invalid trapezoids. 2013-12-12 patch is waiting in mailing list to be upstreamed.
Patch233: u_exa-only-draw-valid-trapezoids.patch
# Patches to implement GLX_ARB_create_context extensions required for OpenGL 3.0 support
# http://lists.x.org/archives/xorg-devel/2012-April/030452.html
# git://people.freedesktop.org/~idr/xserver.git
Patch300: u_0001-glx-Fix-mishandling-of-shared-contexts.patch
Patch301: u_0002-glx-Don-t-track-GLClientmajorVersion-or-GLClientmino.patch
Patch302: u_0003-glx-Extend-__GLXscreen-createContext-to-take-attribu.patch
Patch303: u_0004-glx-Add-tracking-for-GLX_ARB_create_context-and-GLX_.patch
Patch304: u_0005-glx-Optionally-call-DRI2-createContextAttribs-from-_.patch
Patch305: u_0006-glx-Implement-GLX-SetClientInfoARB-protocol.patch
Patch306: u_0007-glx-Initialize-all-context-fields-together.patch
Patch307: u_0008-glx-Initialize-remaining-context-fields.patch
Patch308: u_0009-glx-Use-one-function-to-add-a-context-to-all-global-.patch
Patch309: u_0010-glx-Make-several-functions-available-outside-the-glx.patch
Patch310: u_0011-glx-Implement-protocol-for-glXCreateContextAttribsAR.patch
# PATCH-FIX-UPSTREAM 0001-dix-set-the-device-transformation-matrix.patch bnc#776385 ohering(a)suse.de -- mouse pointer keeps jumping to 0x0
Patch776385: 0001-dix-set-the-device-transformation-matrix.patch
%description
This package contains the X.Org Server.
%package extra
Summary: Additional Xservers (Xdmx, Xephyr, Xnest)
Group: System/X11/Servers/XF86_4
Requires: Mesa
Requires: xkbcomp
Requires: xkeyboard-config
Requires: xorg-x11-fonts-core
Provides: xorg-x11-Xnest
Obsoletes: xorg-x11-Xnest
%description extra
This package contains additional Xservers (Xdmx, Xephyr, Xnest).
%package sdk
Summary: X
Group: System/Libraries
Requires: xorg-x11-proto-devel
Requires: xorg-x11-server
Requires: pkgconfig(fontconfig)
Requires: pkgconfig(fontenc)
Requires: pkgconfig(freetype2)
Requires: pkgconfig(ice)
Requires: pkgconfig(libdrm)
Requires: pkgconfig(sm)
Requires: pkgconfig(x11)
Requires: pkgconfig(xau)
Requires: pkgconfig(xdmcp)
Requires: pkgconfig(xext)
Requires: pkgconfig(xfixes)
Requires: pkgconfig(xkbfile)
Requires: pkgconfig(xmu)
Requires: pkgconfig(xp)
Requires: pkgconfig(xpm)
Requires: pkgconfig(xprintutil)
Requires: pkgconfig(xrender)
Requires: pkgconfig(xt)
Requires: pkgconfig(xtrans)
Requires: pkgconfig(xv)
Provides: xorg-x11-sdk
Obsoletes: xorg-x11-sdk
%description sdk
This package contains the X.Org Server SDK.
%if %vnc
%package -n xorg-x11-Xvnc
Summary: VNC Server for the X Window System
Group: System/X11/Servers/XF86_4
Requires: xkbcomp
Requires: xkeyboard-config
Requires: xorg-x11-fonts-core
Provides: XFree86-Xvnc
Provides: vnc:/usr/X11R6/bin/Xvnc
Obsoletes: XFree86-Xvnc
%ifarch ia64
Provides: vnc-x86
Obsoletes: vnc-x86
%endif
%description -n xorg-x11-Xvnc
An X Window System server for Virtual Network Computing (VNC).
%endif
%prep
%setup -q -n xorg-server-%{dirsuffix} -a4
# Early verification if the ABI Defines are correct. Let's not waste build cycles if the Provides are wrong at the end.
sh %{SOURCE99} --verify . %{SOURCE98}
cp %{SOURCE96} .
%patch0 -p1
%patch2
%patch6
%patch16 -p1
%if %vnc
%patch17 -p1
%patch18 -p1
%patch19 -p1
%patch20 -p1
%patch21 -p1
%patch22 -p1
%patch23 -p1
%patch24 -p1
%patch25 -p1
%patch26 -p1
%patch27 -p1
%endif
%patch45 -p0
%patch77
%patch79 -p1
%patch101 -p1
%patch103
%patch106 -p1
%patch112 -p0
%patch123 -p0
### disabled for now
#%patch125 -p1
%patch127 -p1
# NEeds rebase
#%patch128
# Needs rebase
#%patch129 -p0
%patch143 -p0
%patch145 -p0
### disabled for now
#%patch162 -p1
### disabled for now
#%patch163 -p1
%patch200 -p1
%patch202 -p1
%patch203 -p1
%patch206 -p0
# Needs Rebase
#%patch210 -p1
### disabled for now
#%patch211 -p1
%patch213 -p1
### Disable backtrace generation patch for now
#%patch220 -p1
%patch222 -p1
%patch223 -p1
%patch224 -p1
%patch225 -p1
%patch226 -p1
%patch227
%patch228 -p1
%patch229 -p1
%patch230 -p1
%patch231 -p1
%patch232 -p1
%patch233 -p1
%patch300 -p1
%patch301 -p1
%patch302 -p1
%patch303 -p1
%patch304 -p1
%patch305 -p1
%patch306 -p1
%patch307 -p1
%patch308 -p1
%patch309 -p1
%patch310 -p1
%patch776385 -p1
%build
autoreconf -fi
%configure CFLAGS="%{optflags} -fno-strict-aliasing" \
--sysconfdir=/etc \
--enable-builddocs \
--enable-install-libxf86config \
--enable-xdmcp \
--enable-xdm-auth-1 \
--enable-dri \
--enable-dri2 \
--enable-dmx \
--enable-xnest \
--enable-kdrive \
--enable-kdrive-evdev \
--enable-xephyr \
--disable-xfake \
--disable-xfbdev \
--enable-record \
--enable-xcsecurity \
--with-sha1=libcrypto \
%ifarch s390 s390x
--disable-xorg \
--disable-aiglx \
%else
--enable-xorg \
%if 0%{?suse_version} > 1120
--enable-config-udev \
%endif
%endif
%if %vnc
--disable-xcliplist \
%endif
--with-log-dir="/var/log" \
--with-os-name="openSUSE" \
--with-os-vendor="SUSE LINUX" \
--with-fontrootdir="/usr/share/fonts" \
--with-xkb-path="/usr/share/X11/xkb" \
--with-xkb-output="/var/lib/xkb/compiled" \
--with-default-font-path="/usr/share/fonts/misc:unscaled,\
/usr/share/fonts/Type1/,/usr/share/fonts/100dpi:unscaled,\
/usr/share/fonts/75dpi:unscaled,/usr/share/fonts/URW/,\
/usr/share/fonts/cyrillic:unscaled,\
/usr/share/fonts/misc/sgi:unscaled,\
/usr/share/fonts/truetype/,built-ins"
make %{?_smp_mflags}
make -C hw/kdrive %{?_smp_mflags}
%install
%make_install
make -C hw/kdrive install DESTDIR=%{buildroot}
%ifnarch s390 s390x
# remove .la files
find %{buildroot}%{_libdir}/xorg/modules/ -name "*.la" | \
xargs rm
install -m 644 hw/xfree86/parser/{xf86Parser.h,xf86Optrec.h} \
%{buildroot}%{_includedir}/xorg
# bnc #632737
chmod u-s %{buildroot}%{_bindir}/Xorg
mkdir -p %{buildroot}%{_localstatedir}/lib/X11
ln -snf ../../../usr/bin/Xorg %{buildroot}%{_localstatedir}/lib/X11/X
ln -snf ../../var/lib/X11/X %{buildroot}%{_bindir}/X
%if 0%{?suse_version} > 1120
%ifnarch s390 s390x
mkdir -p %{buildroot}%{_sysconfdir}/X11/xorg.conf.d
cp %{buildroot}/%{_datadir}/X11/xorg.conf.d/10-evdev.conf %{buildroot}%{_sysconfdir}/X11/xorg.conf.d/
%endif
%endif
mkdir -p %{buildroot}%{_libdir}/xorg/modules/updates/{fonts,input,linux,drivers,multimedia,extensions}
install -m 644 $RPM_SOURCE_DIR/README.updates %{buildroot}%{_libdir}/xorg/modules/updates
mkdir -p %{buildroot}%{_sysconfdir}/modprobe.d
install -m 644 $RPM_SOURCE_DIR/modprobe.nvidia %{buildroot}%{_sysconfdir}/modprobe.d/50-nvidia.conf
%else
rm -f %{buildroot}%{_datadir}/aclocal/*.m4
%endif
%if %vnc
mkdir -p %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services
cat > %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/%{name} << EOF
## Name: VNC Server
## Description: Opens ports for VNC Server
TCP="5801 5901"
EOF
%endif
%ifarch s390 s390x
rm -f %{buildroot}%{_sysconfdir}/X11/10-evdev.conf
make -C hw/xfree86/parser
mkdir -p %{buildroot}%{_includedir}/xorg \
%{buildroot}%{_libdir}
install -m 644 hw/xfree86/parser/{xf86Parser.h,xf86Optrec.h} \
%{buildroot}%{_includedir}/xorg
install -m 644 include/list.h \
%{buildroot}%{_includedir}/xorg
if [ -f hw/xfree86/parser/.libs/libxf86config.a ] ; then
install -m 644 hw/xfree86/parser/.libs/libxf86config.a \
%{buildroot}//usr/%{_lib}
else
install -m 644 hw/xfree86/parser/libxf86config.a \
%{buildroot}//usr/%{_lib}
fi
%endif
%ifnarch s390 s390x
mkdir -p %{buildroot}%{_localstatedir}/adm/fillup-templates
install -m 644 %_sourcedir/sysconfig.displaymanager.template \
%{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.displaymanager-%{name}
%endif
install -m 755 $RPM_SOURCE_DIR/xorg-backtrace %{buildroot}%{_bindir}/xorg-backtrace
install -D xorg-x11-server.macros %{buildroot}%{_sysconfdir}/rpm/macros.xorg-server
%ifnarch s390 s390x
%verifyscript
%verify_permissions -e /usr/bin/Xorg
%endif
%post
%ifnarch s390 s390x
%{fillup_only -an displaymanager}
%set_permissions /usr/bin/Xorg
if [ -f etc/X11/xorg.conf ]; then
# Document how to restore previous input driver behaviour in xorg.conf files created
# on openSUSE <= 11.1
if ! grep -q "will be disabled unless 'Option \"AutoAddDevices\" \"off\"'" etc/X11/xorg.conf; then
if ! grep -q "\"AutoAddDevices\" \"off\"" etc/X11/xorg.conf; then
sed -i '
/Section "ServerFlags"/{
h
g
a\
# Uncomment the following option to reenable kbd/mouse driver input sections. \
# Otherwise evdev driver is used. \
#Option "AutoAddDevices" "off"
}
' etc/X11/xorg.conf
fi
fi
fi
%endif
exit 0
%files
%defattr(-,root,root)
%ifnarch s390 s390x
%if 0%{?suse_version} > 1120
%dir %{_sysconfdir}/X11/xorg.conf.d
%config(noreplace) %{_sysconfdir}/X11/xorg.conf.d/10-evdev.conf
%dir %{_datadir}/X11/xorg.conf.d
%{_datadir}/X11/xorg.conf.d/10-evdev.conf
%endif
%dir %{_sysconfdir}/modprobe.d
%dir %{_localstatedir}/lib/X11
%endif
%dir %{_localstatedir}/lib/xkb
%dir %{_localstatedir}/lib/xkb/compiled
%dir %{_libdir}/xorg
%{_libdir}/xorg/protocol.txt
%{_mandir}/man1/*
%exclude %{_mandir}/man1/Xdmx.1*
%exclude %{_mandir}/man1/Xephyr.1*
%exclude %{_mandir}/man1/Xnest.1*
%{_localstatedir}/lib/xkb/compiled/README.compiled
%ifnarch s390 s390x
%{_sysconfdir}/modprobe.d/50-nvidia.conf
%verify(not mode) %{_bindir}/Xorg
%{_bindir}/X
%{_bindir}/cvt
%{_bindir}/gtf
%{_libdir}/xorg/modules/
%{_mandir}/man4/*
%{_mandir}/man5/*
%{_localstatedir}/adm/fillup-templates/sysconfig.displaymanager-%{name}
%{_localstatedir}/lib/X11/X
%endif
%{_bindir}/Xvfb
%{_bindir}/xorg-backtrace
%files extra
%defattr(-,root,root)
%{_bindir}/Xephyr
%{_bindir}/Xnest
%{_bindir}/Xdmx
%{_bindir}/dmxaddinput
%{_bindir}/dmxaddscreen
%{_bindir}/dmxinfo
%{_bindir}/dmxreconfig
%{_bindir}/dmxresize
%{_bindir}/dmxrminput
%{_bindir}/dmxrmscreen
%{_bindir}/dmxtodmx
%{_bindir}/dmxwininfo
%{_bindir}/vdltodmx
%{_bindir}/xdmxconfig
%{_mandir}/man1/Xdmx.1*
%{_mandir}/man1/Xephyr.1*
%{_mandir}/man1/Xnest.1*
%files sdk
%defattr(-,root,root)
%{_includedir}/xorg/
%{_libdir}/*.a
%ifnarch s390 s390x
%exclude %{_libdir}/libxf86config.la
%{_libdir}/pkgconfig/*.pc
%{_datadir}/aclocal/*.m4
%endif
%{_sysconfdir}/rpm/macros.xorg-server
%if %vnc
%files -n xorg-x11-Xvnc
%defattr(-, root, root)
%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/%{name}
%{_bindir}/Xvnc
%endif
%changelog
++++++ 0001-Check-harder-for-primary-PCI-device.patch ++++++
>From 35540106538b24ca1765e752fe9d6efc968a88fa Mon Sep 17 00:00:00 2001
From: Egbert Eich <eich(a)linux-p1mv.site>
Date: Wed, 7 Oct 2009 16:31:44 +0200
Subject: [PATCH] Check harder for primary PCI device.
Primary PCI devices are identified by checking for an 'PCIINFOCLASSES'
device which is VGA and has access to the memory bars enabled.
If there should be more than one device for which this is true
redo the check and also check if IO resoures are also enabled,
if this still doesn't turn up a unique result also check for
the presence of a BIOS rom.
================================================================================
Index: xorg-server-1.12.1/hw/xfree86/common/xf86pciBus.c
===================================================================
--- xorg-server-1.12.1.orig/hw/xfree86/common/xf86pciBus.c
+++ xorg-server-1.12.1/hw/xfree86/common/xf86pciBus.c
@@ -134,9 +134,50 @@ xf86PciProbe(void)
primaryBus.id.pci = info;
}
else {
- xf86Msg(X_NOTICE,
- "More than one possible primary device found\n");
- primaryBus.type ^= (BusType) (-1);
+ /*
+ * Ok, we found more than one possible primary device with this heuristic
+ * Now also check if IO is enabled.
+ */
+ int j;
+
+ primaryBus.type = BUS_NONE;
+ for (j = 0; j < num; j++) {
+ info = xf86PciVideoInfo[j];
+ pci_device_cfg_read_u16(info, & command, 4);
+
+ if ((command & PCI_CMD_MEM_ENABLE)
+ && (command & PCI_CMD_IO_ENABLE)
+ && (IS_VGA(info->device_class))) {
+ if (primaryBus.type == BUS_NONE) {
+ primaryBus.type = BUS_PCI;
+ primaryBus.id.pci = info;
+ } else {
+ primaryBus.type = BUS_NONE;
+ for (j = 0; j < num; j++) {
+ info = xf86PciVideoInfo[j];
+ pci_device_cfg_read_u16(info, & command, 4);
+
+ if ((command & PCI_CMD_MEM_ENABLE)
+ && (command & PCI_CMD_IO_ENABLE)
+ && (IS_VGA(info->device_class))
+ && info->rom_size) {
+ if (primaryBus.type == BUS_NONE) {
+ primaryBus.type = BUS_PCI;
+ primaryBus.id.pci = info;
+ } else {
+ xf86Msg(X_NOTICE,
+ "More than one possible primary device found\n");
+ primaryBus.type ^= (BusType)(-1);
+ break;
+ }
+ }
+ }
+ break;
+ }
+ }
+ }
+ break;
+
}
}
}
++++++ 0001-Fix-segfault-when-killing-X-with-ctrl-alt-backspace.patch ++++++
Index: xorg-server-1.12.1/mi/misprite.c
===================================================================
--- xorg-server-1.12.1.orig/mi/misprite.c
+++ xorg-server-1.12.1/mi/misprite.c
@@ -378,6 +378,7 @@ miSpriteCloseScreen(int i, ScreenPtr pSc
pScreen->InstallColormap = pScreenPriv->InstallColormap;
pScreen->StoreColors = pScreenPriv->StoreColors;
+ miSpriteDisableDamage(pScreen, pScreenPriv);
DamageDestroy(pScreenPriv->pDamage);
free(pScreenPriv);
++++++ 0001-Prevent-XSync-Alarms-from-senslessly-calling-CheckTr.patch ++++++
>From d1d9d4e5f8f9ac1d22e1258759d6ee9e49c7fe90 Mon Sep 17 00:00:00 2001
From: Egbert Eich <eich(a)freedesktop.org>
Date: Fri, 9 Apr 2010 15:10:32 +0200
Subject: [PATCH] Prevent XSync Alarms from senslessly calling CheckTrigger() when inactive.
If an XSync Alarm is set to inactive there is no need to check if a trigger
needs to fire. Doing so if the counter is the IdleCounter will put the
server on 100 percent CPU load since the select timeout is set to 0.
---
xorg-server-1.8.0/Xext/sync.c | 11 +++++++++--
xorg-server-1.8.0/Xext/syncsrv.h | 1 +
2 files changed, 10 insertions(+), 2 deletions(-)
Index: xorg-server-1.8.0/Xext/sync.c
===================================================================
--- xorg-server-1.8.0.orig/Xext/sync.c
+++ xorg-server-1.8.0/Xext/sync.c
@@ -518,6 +518,10 @@ SyncAlarmTriggerFired(SyncTrigger *pTrig
pAlarm->state = XSyncAlarmInactive;
}
}
+ /* Stop server from looping! */
+ if (pAlarm->state == XSyncAlarmInactive)
+ SyncDeleteTriggerFromCounter(&pAlarm->trigger);
+
/* The AlarmNotify event has to have the "new state of the alarm"
* which we can't be sure of until this point. However, it has
* to have the "old" trigger test value. That's the reason for
@@ -730,7 +734,7 @@ SyncChangeAlarmAttributes(ClientPtr clie
XSyncCounter counter;
Mask origmask = mask;
- counter = pAlarm->trigger.pCounter ? pAlarm->trigger.pCounter->id : None;
+ counter = pAlarm->counter_id;
while (mask)
{
@@ -741,7 +745,7 @@ SyncChangeAlarmAttributes(ClientPtr clie
case XSyncCACounter:
mask &= ~XSyncCACounter;
/* sanity check in SyncInitTrigger */
- counter = *values++;
+ counter = pAlarm->counter_id = *values++;
break;
case XSyncCAValueType:
@@ -808,6 +812,14 @@ SyncChangeAlarmAttributes(ClientPtr clie
return BadMatch;
}
}
+ if (pAlarm->state == XSyncAlarmInactive) {
+ /*
+ * If we are inactive the trigger has been deleted from the counter.
+ * Persuade SyncInitTrigger() to readd it.
+ */
+ origmask |= XSyncCACounter;
+ pAlarm->trigger.pCounter = NULL;
+ }
/* postpone this until now, when we're sure nothing else can go wrong */
if ((status = SyncInitTrigger(client, &pAlarm->trigger, counter,
@@ -815,6 +827,7 @@ SyncChangeAlarmAttributes(ClientPtr clie
return status;
/* XXX spec does not really say to do this - needs clarification */
+ /* It's the only place where it is set to XSyncAlarmActive! */
pAlarm->state = XSyncAlarmActive;
return Success;
}
@@ -1617,8 +1630,10 @@ ProcSyncCreateAlarm(ClientPtr client)
pAlarm->client = client;
pAlarm->alarm_id = stuff->id;
+ pAlarm->counter_id = None;
XSyncIntToValue(&pAlarm->delta, 1L);
pAlarm->events = TRUE;
+ /* SyncChangeAlarmAttributes() changes this - no need to set this here! */
pAlarm->state = XSyncAlarmInactive;
pAlarm->pEventClients = NULL;
status = SyncChangeAlarmAttributes(client, pAlarm, vmask,
Index: xorg-server-1.8.0/Xext/syncsrv.h
===================================================================
--- xorg-server-1.8.0.orig/Xext/syncsrv.h
+++ xorg-server-1.8.0/Xext/syncsrv.h
@@ -129,6 +129,7 @@ typedef struct _SyncAlarm {
int events;
int state;
SyncAlarmClientList *pEventClients;
+ XSyncCounter counter_id;
} SyncAlarm;
typedef struct {
++++++ 0001-Xinput-Catch-missing-configlayout-when-deleting-dev.patch ++++++
>From 829037395f8b93e69a30852a95e378f78c3ccd6b Mon Sep 17 00:00:00 2001
From: Luc Verhaegen <libv(a)skynet.be>
Date: Wed, 12 Nov 2008 17:09:33 +0100
Subject: [PATCH] Xinput: Catch missing configlayout when deleting device.
In DeleteInputDeviceRequest (xf86Xinput.c), we access idev members
even if idev is null. This takes down the xserver hard in some cases
(kernel SIGABRT), and segfaults on other cases.
================================================================================
--- xorg-server-1.7.99/hw/xfree86/common/xf86Xinput.c
+++ xorg-server-1.7.99/hw/xfree86/common/xf86Xinput.c
@@ -870,17 +870,20 @@
else
xf86DeleteInput(pInfo, 0);
- /* devices added through HAL aren't in the config layout */
- it = xf86ConfigLayout.inputs;
- while(*it && *it != idev)
- it++;
-
- if (!(*it)) /* end of list, not in the layout */
+ if (idev)
{
- free(idev->driver);
- free(idev->identifier);
- xf86optionListFree(idev->commonOptions);
- free(idev);
+ /* devices added through HAL aren't in the config layout */
+ it = xf86ConfigLayout.inputs;
+ while(*it && *it != idev)
+ it++;
+
+ if (!(*it)) /* end of list, not in the layout */
+ {
+ free(idev->driver);
+ free(idev->identifier);
+ xf86optionListFree(idev->commonOptions);
+ free(idev);
+ }
}
}
OsReleaseSignals();
++++++ 0001-dix-set-the-device-transformation-matrix.patch ++++++
>From 171059409177652b9b7af31506dd8ee0e018330d Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer(a)who-t.net>
Date: Thu, 20 Sep 2012 01:22:32 +1000
Subject: [PATCH] dix: set the device transformation matrix
References: bnc#776385, rh##852841
Upstream: submitted
The property handler is registered after setting the property, so
dev->transform remains as all-zeros. That causes pixman_f_transform_invert()
to fail (transformAbsolute()) and invert remains as garbage. In some cases,
this may then cause a cursor jump to 0,0.
Signed-off-by: Peter Hutterer <peter.hutterer(a)who-t.net>
Acked-by: <ohering(a)suse.de>
---
dix/devices.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/dix/devices.c b/dix/devices.c
index 46c759c..3cacbeb 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -306,6 +306,9 @@ AddInputDevice(ClientPtr client, DeviceProc deviceProc, Bool autoStart)
/* unity matrix */
memset(transform, 0, sizeof(transform));
transform[0] = transform[4] = transform[8] = 1.0f;
+ dev->transform.m[0][0] = 1.0;
+ dev->transform.m[1][1] = 1.0;
+ dev->transform.m[2][2] = 1.0;
XIChangeDeviceProperty(dev, XIGetKnownProperty(XI_PROP_TRANSFORM),
XIGetKnownProperty(XATOM_FLOAT), 32,
--
1.7.11.2
++++++ N-VNC-Add-Xvnc-man-page.patch ++++++
--- xorg-server-1.12.3.orig/configure.ac 2013-02-28 20:04:18.000000000 +0100
+++ xorg-server-1.12.3/configure.ac 2013-02-28 20:05:04.000000000 +0100
@@ -2261,6 +2261,7 @@
hw/dmx/man/Makefile
hw/dmx/vnc/Makefile
hw/vnc/Makefile
+hw/vnc/man/Makefile
hw/vfb/Makefile
hw/vfb/man/Makefile
hw/xnest/Makefile
--- xorg-server-1.12.3.orig/hw/vnc/Makefile.am 2013-02-28 19:51:59.000000000 +0100
+++ xorg-server-1.12.3/hw/vnc/Makefile.am 2013-02-28 19:52:14.000000000 +0100
@@ -1,5 +1,7 @@
# XXX This Makefile.am probably needs some work.
+SUBDIRS = man
+
bin_PROGRAMS = Xvnc
Xvnc_SOURCES = \
--- /dev/null 2013-02-18 14:59:34.961000208 +0100
+++ xorg-server-1.12.3/hw/vnc/man/Xvnc.man 2013-02-28 18:43:58.000000000 +0100
@@ -0,0 +1,155 @@
+'\" t
+.\" ** The above line should force tbl to be a preprocessor **
+.\" Man page for Xvnc
+.\"
+.\" Copyright (C) 1998 Marcus.Brinkmann(a)ruhr-uni-bochum.de
+.\" Copyright (C) 2000, 2001 Red Hat, Inc.
+.\" Copyright (C) 2001, 2002 Constantin Kaplinsky <const(a)ce.cctpu.edu.ru>
+.\"
+.\" You may distribute under the terms of the GNU General Public
+.\" License as specified in the file LICENCE.TXT that comes with the
+.\" TightVNC distribution.
+.\"
+.TH Xvnc 1 "August 2002" "" "TightVNC"
+.SH NAME
+Xvnc \- an X server providing VNC connectivity
+.SH SYNOPSIS
+.TP
+\fBXvnc\fR
+[:\fIdisplay\fR]
+[\-geometry \fIwidth\fRx\fIheight\fR] [\-depth \fIdepth\fR]
+[\-pixelformat rgb\fINNN\fR|bgr\fINNN\fR] [\-udpinputport \fIport\fR]
+[\-rfbport \fIport\fR] [\-rfbwait \fItime\fR] [\-nocursor]
+[\-rfbauth \fIpasswd-file\fR] [\-httpd \fIdir\fR]
+[\-httpport \fIport\fR] [\-deferupdate \fItime\fR]
+[\-economictranslate] [\-lazytight] [\-desktop \fIname\fR] [\-alwaysshared]
+[\-nevershared] [\-dontdisconnect] [\-viewonly] [\-localhost]
+[\-interface ipaddr] [\-inetd]
+[\fIX-options\fR...]
+.SH DESCRIPTION
+\fBXvnc\fR is a VNC (Virtual Network Computing) server. It acts like
+an X server with a virtual display. The display can be seen by a VNC
+viewer application, which may be running on a different machine: see
+\fBvncviewer\fR(1). Xvnc is built inside the source code tree of
+XFree86, and shares many options with it.
+
+Normally, you don't need to start Xvnc manually; use the
+\fBvncserver\fR(1) wrapper script instead. This script sets reasonable
+defaults for Xvnc session, checks many error conditions etc.
+
+Please read the \fBBUGS\fR section if you plan to use VNC on an
+untrusted network.
+.SH OPTIONS
+Xvnc supports many standard X server options and a number of
+VNC-specific options. To see what standard X server options are
+supported, please look at the \fBXvnc\fR \fI\-help\fR output and read
+the \fBXserver\fR(1) manual page for details on those options.
+
+The VNC-specific options are as follows:
+.TP
+\fB\-geometry\fR \fIwidth\fR\fBx\fR\fIheight\fR
+Set desktop width and height.
+.TP
+\fB\-depth\fR \fIdepth\fR
+Set the colour depth of the visual to provide, in bits per pixel. Must
+be a value between 8 and 32.
+.TP
+\fB\-pixelformat\fR \fBrgb\fR\fINNN\fR|\fBbgr\fR\fINNN\fR
+Set colour format for pixels representation. The viewer can do the
+conversion to any other pixel format, but it is faster if the depth
+and pixel format of the server is the same as the equivalent values on
+the viewer display.
+.TP
+\fB\-udpinputport\fR \fIport\fR
+UDP port for keyboard/pointer data.
+.TP
+\fB\-rfbport\fR \fIport\fR
+TCP port for RFB protocol. The RFB protocol is used for commnunication
+between VNC server and clients.
+.TP
+\fB\-rfbwait\fR \fItime\fR
+Maximum time, in milliseconds, to wait for an RFB client (VNC viewer).
+.TP
+\fB\-nocursor\fR
+Don't put up a pointer cursor on the desktop.
+.TP
+\fB\-rfbauth\fR \fIpasswd-file\fR
+Use authentication on RFB protocol from the specified file. The
+\fIpasswd-file\fR can be created using the \fBvncpasswd\fR(1) utility.
+.TP
+\fB\-httpd\fR \fIdir\fR
+Serve files via HTTP protocol from the specified directory. Normally,
+Java viewer classes are stored in such directory.
+.TP
+\fB\-httpport\fR \fIport\fR
+TCP port on which Xvnc should listen for incoming HTTP connections (to
+allow access to the desktop from any Java-capable browser).
+.TP
+\fB\-deferupdate\fR \fItime\fR
+Time in milliseconds, to defer screen updates (default 40). Deferring
+updates helps to coalesce many small desktop changes into a few larger
+updates thus saving network bandwidth.
+.TP
+\fB\-economictranslate\fR
+Use less memory-hungry pixel format translation.
+.TP
+\fB\-lazytight\fR
+Disable the "gradient" filter in Tight encoding (TightVNC-specific).
+The "gradient" filter often helps to improve data compression ratios,
+but may slow down the server performance. Please note that this filter
+is never used when a client enables JPEG compression in the Tight
+encoding.
+.TP
+\fB\-desktop\fR \fIname\fR
+Set VNC desktop name ("x11" by default).
+.TP
+\fB\-alwaysshared\fR
+Always treat new clients as shared, never disconnect existing client
+on a new client connection.
+.TP
+\fB\-nevershared\fR
+Never treat new clients as shared, do not allow several simultaneous
+client connections.
+.TP
+\fB\-dontdisconnect\fR
+Don't disconnect existing clients when a new non-shared connection
+comes in, refuse new connection instead.
+.TP
+\fB\-viewonly\fR
+Don't accept keboard and pointer events from clients. All clients will
+be able to see the desktop but won't be able to control it.
+.TP
+\fB\-localhost\fR
+Only allow loopback connections from localhost. This option is useful
+in conjunction with SSH tunneling.
+.TP
+\fB\-interface\fR \fIipaddr\fR
+Listen for client connections only on the network interface with given
+\fIipaddr\fR.
+.TP
+\fB\-inetd\fR
+Xvnc is launched by inetd. This option causes \fBXvnc\fR to redirect
+network input/output to stdin/stdout.
+.SH BUGS
+There are many security problems in current Xvnc implementation. It's
+recommended to restrict network access to Xvnc servers from untrusted
+network adresses. Probably, the best way to secure Xvnc server is to
+allow only loopback connections from the server machine (the
+\fI\-localhost\fR option) and to use SSH tunneling for remote access
+to the Xvnc server. For details on SSH tunneling, see
+<URL:http://www.uk.research.att.com/vnc/sshvnc.html> .
+.SH SEE ALSO
+\fBvncserver\fR(1), \fBvncviewer\fR(1), \fBvncpasswd\fR(1),
+\fBvncconnect\fR(1), \fBsshd\fR(1)
+.SH AUTHORS
+Original VNC was developed in AT&T Laboratories Cambridge. TightVNC
+additions was implemented by Constantin Kaplinsky. Many other people
+participated in development, testing and support.
+
+\fBMan page authors:\fR
+.br
+Marcus Brinkmann <Marcus.Brinkmann(a)ruhr-uni-bochum.de>,
+.br
+Tim Waugh <twaugh(a)redhat.com>,
+.br
+Constantin Kaplinsky <const(a)ce.cctpu.edu.ru>
--- /dev/null 2013-02-18 14:59:34.961000208 +0100
+++ xorg-server-1.12.3/hw/vnc/man/Makefile.am 2012-07-09 02:44:01.000000000 +0200
@@ -0,0 +1,2 @@
+include $(top_srcdir)/manpages.am
+appman_PRE = Xvnc.man
++++++ N-VNC-Add-proto.diff ++++++
From: Mike Gorse <mgorse(a)suse.com>
Date: Wed Apr 18 22:52:23 UTC 2012
Subject: [PATCH] VNC: Add a missing prototype
Patch-Mainline: Currently no upstream project.
---
diff -ur xorg-server-1.12.1.orig/hw/vnc/rfbkeyb.c xorg-server-1.12.1/hw/vnc/rfbkeyb.c
--- xorg-server-1.12.1.orig/hw/vnc/rfbkeyb.c 2012-04-18 17:38:08.302219053 -0500
+++ xorg-server-1.12.1/hw/vnc/rfbkeyb.c 2012-04-18 16:44:12.873667473 -0500
@@ -44,6 +44,7 @@
#endif
#else
#include <dix.h>
+#include <extinit.h>
#include <mipointer.h>
#endif
#include "rfb.h"
diff -ur xorg-server-1.12.1.orig/hw/vnc/rfbmouse.c xorg-server-1.12.1/hw/vnc/rfbmouse.c
--- xorg-server-1.12.1.orig/hw/vnc/rfbmouse.c 2012-04-18 17:38:08.302219053 -0500
+++ xorg-server-1.12.1/hw/vnc/rfbmouse.c 2012-04-18 16:43:28.843217928 -0500
@@ -46,6 +46,7 @@
#else
#include <dix.h>
+#include <extinit.h>
#include <mipointer.h>
#endif
#include "rfb.h"
++++++ N-VNC-Add-support-for-VNC.patch ++++++
++++ 23494 lines (skipped)
++++++ N-VNC-Don-t-let-VNC-access-the-framebuffer-directly-an.patch ++++++
From: Michal Srb <msrb(a)suse.cz>
Date: Tue, 6 Sep 2011 13:08:25 +0200
Subject: [PATCH 4/6] VNC: Don't let VNC access the framebuffer directly any more.
Patch-Mainline: Currently no upstream project.
Git-commit: 3e0de1d95b3ffd3988016b2d3f40f577393ad046
Signed-off: Egbert Eich <eich(a)suse.de>
References: bnc #653915
It seems that accessing the framebuffer directly is not a good idea anymore.
This patch will let the tight encoding read the screen data using GetImage. It
may be little slower, but not dramatically - it already does few GetImage calls
on every repaint now.
Signed-off-by: Egbert Eich <eich(a)freedesktop.org>
---
hw/vnc/tight.c | 69 ++++++++++++++++++++++++++++++---------------
hw/vnc/vncext.c | 19 ++----------
hw/xfree86/vnc/vncInit.c | 11 ++-----
hw/xfree86/vnc/vncint.h | 2 -
4 files changed, 53 insertions(+), 48 deletions(-)
diff --git a/hw/vnc/tight.c b/hw/vnc/tight.c
index 5c54736..f27c73e 100644
--- a/hw/vnc/tight.c
+++ b/hw/vnc/tight.c
@@ -109,15 +109,17 @@ static unsigned char *tightAfterBuf = NULL;
static int *prevRowBuf = NULL;
+static unsigned char* fakeFrameBuffer = NULL;
+
/* Prototypes for static functions. */
-static void FindBestSolidArea (ScreenPtr pScreen, int x, int y, int w, int h,
+static void FindBestSolidArea (rfbClientPtr cl, int x, int y, int w, int h,
CARD32 colorValue, int *w_ptr, int *h_ptr);
-static void ExtendSolidArea (ScreenPtr pScreen, int x, int y, int w, int h,
+static void ExtendSolidArea (rfbClientPtr cl, int x, int y, int w, int h,
CARD32 colorValue,
int *x_ptr, int *y_ptr, int *w_ptr, int *h_ptr);
-static Bool CheckSolidTile (ScreenPtr pScreen, int x, int y, int w, int h,
+static Bool CheckSolidTile (rfbClientPtr cl, int x, int y, int w, int h,
CARD32 *colorPtr, Bool needSameColor);
static Bool CheckSolidTile8 (ScreenPtr pScreen, int x, int y, int w, int h,
CARD32 *colorPtr, Bool needSameColor);
@@ -126,6 +128,7 @@ static Bool CheckSolidTile16 (ScreenPtr pScreen, int x, int y, int w, int h,
static Bool CheckSolidTile32 (ScreenPtr pScreen, int x, int y, int w, int h,
CARD32 *colorPtr, Bool needSameColor);
+static Bool SendRectEncodingTight(rfbClientPtr cl, int x, int y, int w, int h);
static Bool SendRectSimple (rfbClientPtr cl, int x, int y, int w, int h);
static Bool SendSubrect (rfbClientPtr cl, int x, int y, int w, int h);
static Bool SendTightHeader (rfbClientPtr cl, int x, int y, int w, int h);
@@ -211,6 +214,25 @@ rfbSendRectEncodingTight(rfbClientPtr cl,
int x, int y, int w, int h)
{
VNCSCREENPTR(cl->pScreen);
+
+ /* Copy the rectangle to the fake buffer for CheckSolidTile functions. */
+
+ if(!fakeFrameBuffer) fakeFrameBuffer = malloc(pVNC->width * pVNC->height * cl->format.bitsPerPixel / 8);
+ (*cl->translateFn)(cl->pScreen, cl->translateLookupTable,
+ &pVNC->rfbServerFormat,
+ &cl->format, fakeFrameBuffer + (y * pVNC->width * cl->format.bitsPerPixel / 8),
+ pVNC->paddedWidthInBytes, pVNC->width, h, 0, y);
+
+ /* Call the inner part */
+
+ return SendRectEncodingTight(cl, x, y, w, h);
+}
+
+static Bool
+SendRectEncodingTight(rfbClientPtr cl,
+ int x, int y, int w, int h)
+{
+ VNCSCREENPTR(cl->pScreen);
int nMaxRows;
CARD32 colorValue;
int dx, dy, dw, dh;
@@ -247,7 +269,7 @@ rfbSendRectEncodingTight(rfbClientPtr cl,
nMaxWidth = (w > maxRectWidth) ? maxRectWidth : w;
nMaxRows = maxRectSize / nMaxWidth;
}
-
+
/* Try to find large solid-color areas and send them separately. */
for (dy = y; dy < y + h; dy += MAX_SPLIT_TILE_SIZE) {
@@ -269,11 +291,11 @@ rfbSendRectEncodingTight(rfbClientPtr cl,
dw = (dx + MAX_SPLIT_TILE_SIZE <= x + w) ?
MAX_SPLIT_TILE_SIZE : (x + w - dx);
- if (CheckSolidTile(cl->pScreen, dx, dy, dw, dh, &colorValue, FALSE)) {
+ if (CheckSolidTile(cl, dx, dy, dw, dh, &colorValue, FALSE)) {
/* Get dimensions of solid-color area. */
- FindBestSolidArea(cl->pScreen, dx, dy, w - (dx - x), h - (dy - y),
+ FindBestSolidArea(cl, dx, dy, w - (dx - x), h - (dy - y),
colorValue, &w_best, &h_best);
/* Make sure a solid rectangle is large enough
@@ -286,7 +308,7 @@ rfbSendRectEncodingTight(rfbClientPtr cl,
/* Try to extend solid rectangle to maximum size. */
x_best = dx; y_best = dy;
- ExtendSolidArea(cl->pScreen, x, y, w, h, colorValue,
+ ExtendSolidArea(cl, x, y, w, h, colorValue,
&x_best, &y_best, &w_best, &h_best);
/* Send rectangles at top and left to solid-color area. */
@@ -295,7 +317,7 @@ rfbSendRectEncodingTight(rfbClientPtr cl,
!SendRectSimple(cl, x, y, w, y_best-y) )
return FALSE;
if ( x_best != x &&
- !rfbSendRectEncodingTight(cl, x, y_best,
+ !SendRectEncodingTight(cl, x, y_best,
x_best-x, h_best) )
return FALSE;
@@ -316,11 +338,11 @@ rfbSendRectEncodingTight(rfbClientPtr cl,
/* Send remaining rectangles (at right and bottom). */
if ( x_best + w_best != x + w &&
- !rfbSendRectEncodingTight(cl, x_best+w_best, y_best,
+ !SendRectEncodingTight(cl, x_best+w_best, y_best,
w-(x_best-x)-w_best, h_best) )
return FALSE;
if ( y_best + h_best != y + h &&
- !rfbSendRectEncodingTight(cl, x, y_best+h_best,
+ !SendRectEncodingTight(cl, x, y_best+h_best,
w, h-(y_best-y)-h_best) )
return FALSE;
@@ -339,7 +361,7 @@ rfbSendRectEncodingTight(rfbClientPtr cl,
}
static void
-FindBestSolidArea(ScreenPtr pScreen,
+FindBestSolidArea(rfbClientPtr cl,
int x, int y, int w, int h,
CARD32 colorValue,
int *w_ptr, int *h_ptr)
@@ -357,13 +379,13 @@ FindBestSolidArea(ScreenPtr pScreen,
dw = (w_prev > MAX_SPLIT_TILE_SIZE) ?
MAX_SPLIT_TILE_SIZE : w_prev;
- if (!CheckSolidTile(pScreen, x, dy, dw, dh, &colorValue, TRUE))
+ if (!CheckSolidTile(cl, x, dy, dw, dh, &colorValue, TRUE))
break;
for (dx = x + dw; dx < x + w_prev;) {
dw = (dx + MAX_SPLIT_TILE_SIZE <= x + w_prev) ?
MAX_SPLIT_TILE_SIZE : (x + w_prev - dx);
- if (!CheckSolidTile(pScreen, dx, dy, dw, dh, &colorValue, TRUE))
+ if (!CheckSolidTile(cl, dx, dy, dw, dh, &colorValue, TRUE))
break;
dx += dw;
}
@@ -380,7 +402,7 @@ FindBestSolidArea(ScreenPtr pScreen,
}
static void
-ExtendSolidArea(ScreenPtr pScreen, int x, int y, int w, int h,
+ExtendSolidArea(rfbClientPtr cl, int x, int y, int w, int h,
CARD32 colorValue,
int *x_ptr, int *y_ptr, int *w_ptr, int *h_ptr)
{
@@ -388,7 +410,7 @@ ExtendSolidArea(ScreenPtr pScreen, int x, int y, int w, int h,
/* Try to extend the area upwards. */
for ( cy = *y_ptr - 1;
- cy >= y && CheckSolidTile(pScreen, *x_ptr, cy, *w_ptr, 1, &colorValue, TRUE);
+ cy >= y && CheckSolidTile(cl, *x_ptr, cy, *w_ptr, 1, &colorValue, TRUE);
cy-- );
*h_ptr += *y_ptr - (cy + 1);
*y_ptr = cy + 1;
@@ -396,13 +418,13 @@ ExtendSolidArea(ScreenPtr pScreen, int x, int y, int w, int h,
/* ... downwards. */
for ( cy = *y_ptr + *h_ptr;
cy < y + h &&
- CheckSolidTile(pScreen, *x_ptr, cy, *w_ptr, 1, &colorValue, TRUE);
+ CheckSolidTile(cl, *x_ptr, cy, *w_ptr, 1, &colorValue, TRUE);
cy++ );
*h_ptr += cy - (*y_ptr + *h_ptr);
/* ... to the left. */
for ( cx = *x_ptr - 1;
- cx >= x && CheckSolidTile(pScreen, cx, *y_ptr, 1, *h_ptr, &colorValue, TRUE);
+ cx >= x && CheckSolidTile(cl, cx, *y_ptr, 1, *h_ptr, &colorValue, TRUE);
cx-- );
*w_ptr += *x_ptr - (cx + 1);
*x_ptr = cx + 1;
@@ -410,7 +432,7 @@ ExtendSolidArea(ScreenPtr pScreen, int x, int y, int w, int h,
/* ... to the right. */
for ( cx = *x_ptr + *w_ptr;
cx < x + w &&
- CheckSolidTile(pScreen, cx, *y_ptr, 1, *h_ptr, &colorValue, TRUE);
+ CheckSolidTile(cl, cx, *y_ptr, 1, *h_ptr, &colorValue, TRUE);
cx++ );
*w_ptr += cx - (*x_ptr + *w_ptr);
}
@@ -423,11 +445,12 @@ ExtendSolidArea(ScreenPtr pScreen, int x, int y, int w, int h,
*/
static Bool
-CheckSolidTile(ScreenPtr pScreen, int x, int y, int w, int h, CARD32 *colorPtr,
+CheckSolidTile(rfbClientPtr cl, int x, int y, int w, int h, CARD32 *colorPtr,
Bool needSameColor)
{
- VNCSCREENPTR(pScreen);
- switch(pVNC->rfbServerFormat.bitsPerPixel) {
+ ScreenPtr pScreen = cl->pScreen;
+
+ switch(cl->format.bitsPerPixel) {
case 32:
return CheckSolidTile32(pScreen, x, y, w, h, colorPtr, needSameColor);
case 16:
@@ -449,7 +472,7 @@ static Bool \
int dx, dy; \
\
fbptr = (CARD##bpp *) \
- &pVNC->pfbMemory[y * pVNC->paddedWidthInBytes + x * (bpp/8)]; \
+ &fakeFrameBuffer[(y * pVNC->width + x) * (bpp/8)]; \
\
colorValue = *fbptr; \
if (needSameColor && (CARD32)colorValue != *colorPtr) \
@@ -460,7 +483,7 @@ static Bool \
if (colorValue != fbptr[dx]) \
return FALSE; \
} \
- fbptr = (CARD##bpp *)((CARD8 *)fbptr + pVNC->paddedWidthInBytes); \
+ fbptr = (CARD##bpp *)((CARD8 *)fbptr + pVNC->width * (bpp/8)); \
} \
\
*colorPtr = (CARD32)colorValue; \
diff --git a/hw/vnc/vncext.c b/hw/vnc/vncext.c
index ea913b7..534f3f5 100644
--- a/hw/vnc/vncext.c
+++ b/hw/vnc/vncext.c
@@ -702,15 +702,7 @@ CreateResourceTypes(void)
static unsigned long vncExtGeneration = 0;
#if XFREE86VNC
-extern Bool VNCInit(ScreenPtr pScreen, unsigned char *FBStart);
-
-/* copied from miscrinit.c */
-typedef struct
-{
- pointer pbits; /* pointer to framebuffer */
- int width; /* delta to add to a framebuffer addr to move one row down */
-} miScreenInitParmsRec, *miScreenInitParmsPtr;
-
+extern Bool VNCInit(ScreenPtr pScreen);
static Bool
vncCreateScreenResources(ScreenPtr pScreen)
@@ -719,9 +711,6 @@ vncCreateScreenResources(ScreenPtr pScreen)
CreateScreenResourcesProcPtr CreateScreenResources =
(CreateScreenResourcesProcPtr)
dixLookupPrivate(&pScreen->devPrivates, vncCreateScreenResourcesKey);
- miScreenInitParmsPtr pScrInitParms;
-
- pScrInitParms = (miScreenInitParmsPtr)pScreen->devPrivate;
if ( pScreen->CreateScreenResources != vncCreateScreenResources ) {
/* Can't find hook we are hung on */
@@ -732,9 +721,6 @@ vncCreateScreenResources(ScreenPtr pScreen)
(void *) pScreen->CreateScreenResources );
}
- /* Now do our stuff */
- VNCInit(pScreen, pScrInitParms->pbits);
-
/* Unhook this function ... */
pScreen->CreateScreenResources = CreateScreenResources;
dixSetPrivate(&pScreen->devPrivates, vncCreateScreenResourcesKey, NULL);
@@ -744,6 +730,9 @@ vncCreateScreenResources(ScreenPtr pScreen)
ret = (*pScreen->CreateScreenResources)(pScreen);
}
+ /* Now do our stuff */
+ VNCInit(pScreen);
+
#ifdef DEBUG
ErrorF("vncCreateScreenResources() returns %d\n", ret);
#endif
diff --git a/hw/xfree86/vnc/vncInit.c b/hw/xfree86/vnc/vncInit.c
index 4a124fb..8b2fa5f 100644
--- a/hw/xfree86/vnc/vncInit.c
+++ b/hw/xfree86/vnc/vncInit.c
@@ -49,7 +49,7 @@ extern void VncExtensionInit(void);
extern void vncInitMouse(void);
extern void vncInitKeyb(void);
-Bool VNCInit(ScreenPtr pScreen, unsigned char *FBStart);
+Bool VNCInit(ScreenPtr pScreen);
#ifndef XFree86LOADER
static unsigned long VNCGeneration = 0;
@@ -151,7 +151,7 @@ void rfbLogPerror(char *str)
* Called by vncCreateScreenResources()
*/
Bool
-VNCInit(ScreenPtr pScreen, unsigned char *FBStart)
+VNCInit(ScreenPtr pScreen)
{
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
VisualPtr visual;
@@ -164,9 +164,6 @@ VNCInit(ScreenPtr pScreen, unsigned char *FBStart)
PictureScreenPtr ps;
#endif
- if (!FBStart)
- return FALSE;
-
#ifndef XFree86LOADER
if (VNCGeneration != serverGeneration) {
VncExtensionInit();
@@ -287,9 +284,7 @@ VNCInit(ScreenPtr pScreen, unsigned char *FBStart)
pScreenPriv->depth = pScrn->depth;
pScreenPriv->paddedWidthInBytes = PixmapBytePad(pScrn->displayWidth, pScrn->depth);
pScreenPriv->bitsPerPixel = rfbBitsPerPixel(pScrn->depth);
- pScreenPriv->pfbMemory = FBStart;
- pScreenPriv->oldpfbMemory = FBStart;
-
+
pScreenPriv->cursorIsDrawn = TRUE;
pScreenPriv->dontSendFramebufferUpdate = FALSE;
diff --git a/hw/xfree86/vnc/vncint.h b/hw/xfree86/vnc/vncint.h
index 18a3630..9e4a36f 100644
--- a/hw/xfree86/vnc/vncint.h
+++ b/hw/xfree86/vnc/vncint.h
@@ -44,13 +44,11 @@ typedef struct {
size_t buf_filled;
int maxFd;
fd_set allFds;
- unsigned char * oldpfbMemory;
Bool rfbAlwaysShared;
Bool rfbNeverShared;
Bool rfbDontDisconnect;
Bool rfbUserAccept;
Bool rfbViewOnly;
- unsigned char * pfbMemory;
int paddedWidthInBytes;
ColormapPtr rfbInstalledColormap;
ColormapPtr savedColormap;
--
1.7.3.4
++++++ N-VNC-Enable-use-of-all-keyboard-layouts-independent-o.patch ++++++
From: Matthias Hopf <mhopf(a)suse.de>
Date: Tue, 6 Sep 2011 08:35:57 +0200
Subject: [PATCH 5/6] VNC: Enable use of all keyboard layouts, independent of remotely set layout
Patch-Mainline: Currently no upstream project.
Git-commit: 6885b927a6065e6379cfaa3ebbf6c51445a015d9
Signed-off: Egbert Eich <eich(a)suse.de>
References: bnc #400520, #605015, #660797
Changes:
- Use virtual core keyboard for events and key state lookup:
Make layout changes work again - see discussion on
https://defect.opensolaris.org/bz/show_bug.cgi?id=8687
- keycode lookup:
Don't use any static keyboard layout any more.
- ISO-Level3-Shift handling:
Enable the use of keyboard layouts that use AltGr for 3rd and 4th level.
- Make keyboard handling more XKB aware:
Previous code was e.g. not multi-group aware.
- Nuke use of legacy keymap as far as possible:
Creating legacy keymap takes time, and it has to be freed again afterwards.
- Free index lookup:
Make XKB aware.
- Ignore calls for NoSymbol:
This destroys otherwise valid entries.
- Fix analysis for shift/level3 event faking:
Previous broken version lead to e.g. Shift+PgUp not being recognized.
- Add tons of debug output (disabled).
Signed-off-by: Egbert Eich <eich(a)freedesktop.org>
Rebased to 1.12.1 by Mike Gorse <mgorse(a)suse.com>
---
diff -pruN xorg-server-1.12.1.orig/hw/vnc/kbdptr.c xorg-server-1.12.1/hw/vnc/kbdptr.c
--- xorg-server-1.12.1.orig/hw/vnc/kbdptr.c 2012-04-18 14:14:07.436250934 -0500
+++ xorg-server-1.12.1/hw/vnc/kbdptr.c 2012-04-18 14:15:27.656248047 -0500
@@ -34,6 +34,8 @@
#include "X11/Xproto.h"
#include "inputstr.h"
#include "inpututils.h"
+#include "xkbsrv.h"
+#include "xkbstr.h"
#define XK_CYRILLIC
#include <X11/keysym.h>
#include <X11/Xatom.h>
@@ -46,6 +48,7 @@
#include "dmxinput.h"
#endif
+#if 0
#if !XFREE86VNC
#define MIN_KEY_CODE 8
@@ -196,21 +199,20 @@ static KeySym map[MAX_KEY_CODE * GLYPHS_
#define N_PREDEFINED_KEYS (sizeof(map) / (sizeof(KeySym) * GLYPHS_PER_KEY))
#endif
+#endif
#define KEY_IS_PRESSED(keycode) \
- (kbdDevice->key->down[(keycode) >> 3] & (1 << ((keycode) & 7)))
+ (inputInfo.keyboard->key->down[(keycode) >> 3] & (1 << ((keycode) & 7)))
static void vncXConvertCase(KeySym sym, KeySym *lower, KeySym *upper);
-static DeviceIntPtr ptrDevice = NULL, kbdDevice = NULL;
+static DeviceIntPtr ptrDevice = NULL;
void
vncSetKeyboardDevice(DeviceIntPtr kbd)
{
- if (kbdDevice && kbd)
- return; /* set once */
- kbdDevice = kbd;
+ // obsoleted by inputInfo
}
@@ -263,6 +265,29 @@ EnqueueKey(DeviceIntPtr kbdDev, int type
QueueKeyboardEvents(kbdDev, type, detail, NULL);
}
+/* In-server and highly changed version of XkbKeycodeToKeysym */
+static KeySym
+_XkbKeycodeToKeysym(XkbDescPtr xkb, KeyCode kc, int group, int level)
+{
+ KeySym ks;
+
+ if ((kc<xkb->min_key_code)||(kc>xkb->max_key_code))
+ return NoSymbol;
+ /* Treat single group elements as present in all groups */
+ if (XkbKeyNumGroups (xkb,kc) == 1)
+ group = 0;
+ if ((group<0)||(level<0)||(group>=XkbKeyNumGroups(xkb,kc)))
+ return NoSymbol;
+ if (level < XkbKeyGroupWidth(xkb, kc, group))
+ ks = XkbKeySymEntry(xkb, kc, level, group);
+ else
+ ks = NoSymbol;
+ /* Treat 'K' as 'K K', */
+ if (ks == NoSymbol && (level & 1) && level-1 < XkbKeyGroupWidth(xkb, kc, group))
+ ks = XkbKeySymEntry(xkb, kc, level-1, group);
+ return ks;
+}
+
/*
* Called when the rfbserver receives a rfbKeyEvent event from a client.
* Put an X keyboard event into the event queue.
@@ -271,21 +296,35 @@ void
KbdAddEvent(Bool down, KeySym keySym, rfbClientPtr cl)
{
const int type = down ? KeyPress : KeyRelease;
- KeySymsPtr keySyms;
- XkbStateRec *xkb;
- int i;
+ XkbSrvInfoPtr xkbInfo;
+ int i, group, level;
int keyCode = 0;
- int freeIndex = -1;
Bool fakeShiftPress = FALSE;
Bool fakeShiftLRelease = FALSE;
Bool fakeShiftRRelease = FALSE;
Bool shiftMustBeReleased = FALSE;
Bool shiftMustBePressed = FALSE;
+ Bool fakeLevel3Press = FALSE;
+ Bool fakeLevel3Release = FALSE;
+ Bool level3MustBeReleased = FALSE;
+ Bool level3MustBePressed = FALSE;
+
+ /* Incomplete maps may create NoSymbol - which lets us
+ * select and/or overwrite otherwise valid entries.
+ * E.g Level3+a in serbian layout creates NoSymbol on os11.4
+ * 2011-05-24 mhopf(a)suse.de */
+ if (keySym == NoSymbol) {
+ ErrorF("KbdAddEvent: ignoring illegal NoSymbol\n");
+ return;
+ }
- if (!kbdDevice)
- return;
-
- keySyms = XkbGetCoreMap(kbdDevice);
+ xkbInfo = inputInfo.keyboard->key->xkbInfo;
+ group = xkbInfo->state.group;
+ level = (KEY_IS_PRESSED(ISO_LEVEL3_KEY_CODE) ? 2 : 0) |
+ (XkbStateFieldFromRec(&xkbInfo->state) & ShiftMask ? 1 : 0);
+#ifdef DEBUG
+ ErrorF ("VNCkbd:\t%s Sym %04x\n", down ? "+":"-", (int)keySym);
+#endif
#ifdef CORBA
if (cl) {
@@ -303,6 +342,12 @@ KbdAddEvent(Bool down, KeySym keySym, rf
*
* Alan.
*/
+ /* Never use predefined keys.
+ * This is inherently incapable of dealing with changing
+ * keyboard layouts. Not being able to work with non-local xmodmaps
+ * is a nuisance at worst, and probably even preferred.
+ * 2011-04-15 mhopf(a)suse.de */
+#ifdef NOTANYMORE
#if !XFREE86VNC
/* First check if it's one of our predefined keys. If so then we can make
some attempt at allowing an xmodmap inside a VNC desktop behave
@@ -329,107 +374,227 @@ KbdAddEvent(Bool down, KeySym keySym, rf
}
}
#endif
+#endif
if (!keyCode) {
/* not one of our predefined keys - see if it's in the current keyboard
mapping (i.e. we've already allocated an extra keycode for it) */
- if (keySyms->mapWidth < 2) {
- ErrorF("KbdAddEvent: Sanity check failed - Keyboard mapping has "
- "less than 2 keysyms per keycode (KeySym 0x%x)\n", (int)keySym);
- return;
- }
+ for (keyCode = MIN_KEY_CODE; keyCode < MIN_KEY_CODE + NO_OF_KEYS; keyCode++) {
+ /* Check all keycodes, but only continue on those where
+ * backconversion results in keySym.
+ * 2011-05-20 mhopf(a)suse.de */
+
+#ifdef DEBUG
+ int j;
+ ErrorF (" keyCode %3d map# %4d++ level %d of %d: keySyms",
+ keyCode, (i / keySyms->mapWidth) * keySyms->mapWidth,
+ i % keySyms->mapWidth, keySyms->mapWidth);
+ for (j = 0; j < keySyms->mapWidth; j++)
+ ErrorF (" %02x", (int)keySyms->map[(i / keySyms->mapWidth) * keySyms->mapWidth + j]);
+ ErrorF ("\n");
+ ErrorF (" group %d of %d width %d: keySyms",
+ group, XkbKeyNumGroups(xkbInfo->desc, keyCode),
+ XkbKeyGroupWidth(xkbInfo->desc, keyCode, group));
+ if (XkbKeyNumGroups(xkbInfo->desc, keyCode) > group)
+ for (j = 0; j < XkbKeyGroupWidth(xkbInfo->desc, keyCode, group); j++)
+ ErrorF (" %02x", (int) XkbKeySymEntry(xkbInfo->desc, keyCode, j, group));
+ ErrorF ("\n");
+#endif
- for (i = 0; i < NO_OF_KEYS * keySyms->mapWidth; i++) {
- if (keySym == keySyms->map[i]) {
- keyCode = MIN_KEY_CODE + i / keySyms->mapWidth;
-
- if (keySyms->map[(i / keySyms->mapWidth)
- * keySyms->mapWidth + 1] != NoSymbol) {
-
- /* this keycode has more than one symbol associated with
- it, so shift state is important */
-
- if ((i % keySyms->mapWidth) == 0)
- shiftMustBeReleased = TRUE;
- else
- shiftMustBePressed = TRUE;
- }
+ /* Check whether keySym is reachable in current group
+ * by any shift/Level3_shift state (preferrable w/o change).
+ * This doesn't do real modifyer analysis, only Shift and Level3_Shift.
+ * 2011-05-23 mhopf(a)suse.de */
+ if (_XkbKeycodeToKeysym(xkbInfo->desc, keyCode, group, level) == keySym)
+ break;
+ if (_XkbKeycodeToKeysym(xkbInfo->desc, keyCode, group, level ^ 2) == keySym) {
+ if (level & 2)
+ level3MustBeReleased = TRUE;
+ else
+ level3MustBePressed = TRUE;
break;
}
- if ((freeIndex == -1) && (keySyms->map[i] == NoSymbol)
- && (i % keySyms->mapWidth) == 0)
- {
- freeIndex = i;
+ if (_XkbKeycodeToKeysym(xkbInfo->desc, keyCode, group, level ^ 1) == keySym) {
+ if (level & 1)
+ shiftMustBeReleased = TRUE;
+ else
+ shiftMustBePressed = TRUE;
+ break;
+ }
+ if (_XkbKeycodeToKeysym(xkbInfo->desc, keyCode, group, level ^ 3) == keySym) {
+ if (level & 2)
+ level3MustBeReleased = TRUE;
+ else
+ level3MustBePressed = TRUE;
+ if (level & 1)
+ shiftMustBeReleased = TRUE;
+ else
+ shiftMustBePressed = TRUE;
+ break;
}
}
+ if (keyCode == MIN_KEY_CODE + NO_OF_KEYS)
+ keyCode = 0;
}
if (!keyCode) {
KeySym lower, upper;
+ KeySymsPtr keySyms = XkbGetCoreMap(inputInfo.keyboard);
/* we don't have an existing keycode - make one up on the fly and add
it to the keyboard mapping. Thanks to Vlad Harchev for pointing
out problems with non-ascii capitalisation. */
- if (freeIndex == -1) {
+ /* Find free index for current group. */
+ for (keyCode = MIN_KEY_CODE; keyCode < MIN_KEY_CODE + NO_OF_KEYS; keyCode++) {
+ /* A keyCode is free if no groups are assigned at all */
+ if (XkbKeyNumGroups(xkbInfo->desc, keyCode) == 0)
+ break;
+#ifdef NOTANYMORE
+ /* We can use exact map positions for group 1+2, but only partially
+ * filling out xkb legacy maps may suddenly change the # of groups.
+ * Reason for that is unknown yet. Might be related to (fixed) NoSymbol issue.
+ * 2011-05-24 mhopf(a)suse.de */
+ /* For primary groups: A keyCode is free if current group is empty */
+ if (XkbKeyGroupWidth(xkbInfo->desc, keyCode, group) < 1 && group < 2)
+ break;
+ /* Never touch groups that have a single level only (weird group?!?) */
+ if (XkbKeyGroupWidth(xkbInfo->desc, keyCode, group) < 2)
+ continue;
+ /* For primary groups: A keyCode is free if only NoSymbol is assigned
+ * to available levels (only validating levels 0-3) */
+ if (group < 2 &&
+ XkbKeySymEntry(xkbInfo->desc, keyCode, 0, group) == NoSymbol &&
+ XkbKeySymEntry(xkbInfo->desc, keyCode, 1, group) == NoSymbol &&
+ (XkbKeyGroupWidth(xkbInfo->desc, keyCode, group) < 3 ||
+ (XkbKeySymEntry(xkbInfo->desc, keyCode, 2, group) == NoSymbol &&
+ (XkbKeyGroupWidth(xkbInfo->desc, keyCode, group) < 4 ||
+ XkbKeySymEntry(xkbInfo->desc, keyCode, 3, group) == NoSymbol))))
+ break;
+#endif
+ }
+
+ if (keyCode == MIN_KEY_CODE + NO_OF_KEYS) {
ErrorF("KbdAddEvent: ignoring KeySym 0x%x - no free KeyCodes\n",
(int)keySym);
+ free (keySyms->map);
+ free (keySyms);
return;
}
- keyCode = MIN_KEY_CODE + freeIndex / keySyms->mapWidth;
-
vncXConvertCase(keySym, &lower, &upper);
- if (lower == upper) {
- keySyms->map[freeIndex] = keySym;
-
- } else {
- keySyms->map[freeIndex] = lower;
- keySyms->map[freeIndex+1] = upper;
-
+ /* Adding keys is not using xkb mechanisms yet, but relying on support
+ * for changing keys in the legacy map. Should be changed, eventually.
+ * 2011-05-19 mhopf(a)suse.de */
+#ifdef NOTANYMORE
+ if (group < 2) {
+ /* Only set mapping for active group. Will only work with dual layouts.
+ * 2011-05-23 mhopf(a)suse.de */
+ int active_group_offset = group ? 2 : 0;
+
+ if (lower == upper) {
+ keySyms->map[(keyCode - MIN_KEY_CODE) * keySyms->mapWidth + active_group_offset] = keySym;
+ keySyms->map[(keyCode - MIN_KEY_CODE) * keySyms->mapWidth + active_group_offset + 1] = NoSymbol;
+ } else {
+ keySyms->map[(keyCode - MIN_KEY_CODE) * keySyms->mapWidth + active_group_offset] = lower;
+ keySyms->map[(keyCode - MIN_KEY_CODE) * keySyms->mapWidth + active_group_offset + 1] = upper;
+ }
+ }
+#endif
+ /* Generic layouts needs to set the full map width.
+ * Weird enough, mapWidth seems too big...
+ * 2011-05-23 mhopf(a)suse.de */
+ for (i = 0; i < (keySyms->mapWidth & ~1); i += 2) {
+ if (lower == upper) {
+ keySyms->map[(keyCode - MIN_KEY_CODE) * keySyms->mapWidth + i] = keySym;
+ keySyms->map[(keyCode - MIN_KEY_CODE) * keySyms->mapWidth + i + 1] = NoSymbol;
+ } else {
+ keySyms->map[(keyCode - MIN_KEY_CODE) * keySyms->mapWidth + i] = lower;
+ keySyms->map[(keyCode - MIN_KEY_CODE) * keySyms->mapWidth + i + 1] = upper;
+ }
+ }
+ if (lower != upper) {
if (keySym == lower)
shiftMustBeReleased = TRUE;
else
shiftMustBePressed = TRUE;
}
+ level3MustBeReleased = TRUE;
- XkbApplyMappingChange(kbdDevice, keySyms, keyCode, 1, NULL, serverClient);
+ XkbApplyMappingChange(inputInfo.keyboard, keySyms, keyCode, 1, NULL, serverClient);
ErrorF("KbdAddEvent: unknown KeySym 0x%x - allocating KeyCode %d\n",
(int)keySym, keyCode);
+ free (keySyms->map);
+ free (keySyms);
}
- xkb = &kbdDevice->key->xkbInfo->state;
+#ifdef DEBUG
+ ErrorF ("\t%s Sym %04x Code%3d\tState x%02x %s%s%s\tSh %s%s\tL3 %s%s\n",
+ down ? "+":"-", (int)keySym, keyCode, XkbStateFieldFromRec(&xkbInfo->state),
+ KEY_IS_PRESSED(SHIFT_L_KEY_CODE) ? "Sl":"",
+ KEY_IS_PRESSED(SHIFT_R_KEY_CODE) ? "Sr":"",
+ KEY_IS_PRESSED(ISO_LEVEL3_KEY_CODE) ? "L3":"",
+ shiftMustBePressed ? "+":"", shiftMustBeReleased ? "-":"",
+ level3MustBePressed ? "+":"", level3MustBeReleased ? "-":"");
+#endif
+#ifdef NOTANYMORE
+ int back = _XkbKeycodeToKeysym (xkbInfo->desc, keyCode, group,
+ ((level3MustBePressed || (!level3MustBeReleased && (level & 2))) ? 2 : 0) |
+ ((shiftMustBePressed || (!shiftMustBeReleased && (level & 1))) ? 1 : 0));
+ ErrorF ("\tvalidate code %d %-2s%-2s -> sym %04x %s\n\n", keyCode,
+ (shiftMustBePressed || (!shiftMustBeReleased && (level & 1))) ? "Sh" : "",
+ (level3MustBePressed || (!level3MustBeReleased && (level & 2))) ? "L3" : "",
+ back, (back == keySym ? "ok" : "FAILED"));
+#endif
+
if (down) {
- if (shiftMustBePressed && !(XkbStateFieldFromRec(xkb) & ShiftMask)) {
+ /* TODO: would require to check which keycodes are actually
+ * bound to ISO_Level3_Shift and/or Shift_L.
+ * 2011-04-18 mhopf(a)suse.de */
+ if (level3MustBePressed && !(level & 2)) {
+ fakeLevel3Press = TRUE;
+ EnqueueKey(inputInfo.keyboard, KeyPress, ISO_LEVEL3_KEY_CODE);
+ }
+ if (level3MustBeReleased && (level & 2)) {
+ fakeLevel3Release = TRUE;
+ EnqueueKey(inputInfo.keyboard, KeyRelease, ISO_LEVEL3_KEY_CODE);
+ }
+ if (shiftMustBePressed && !(level & 1)) {
fakeShiftPress = TRUE;
- EnqueueKey(kbdDevice, KeyPress, SHIFT_L_KEY_CODE);
+ EnqueueKey(inputInfo.keyboard, KeyPress, SHIFT_L_KEY_CODE);
}
- if (shiftMustBeReleased && (XkbStateFieldFromRec(xkb) & ShiftMask)) {
+ if (shiftMustBeReleased && (level & 1)) {
if (KEY_IS_PRESSED(SHIFT_L_KEY_CODE)) {
fakeShiftLRelease = TRUE;
- EnqueueKey(kbdDevice, KeyRelease, SHIFT_L_KEY_CODE);
+ EnqueueKey(inputInfo.keyboard, KeyRelease, SHIFT_L_KEY_CODE);
}
if (KEY_IS_PRESSED(SHIFT_R_KEY_CODE)) {
fakeShiftRRelease = TRUE;
- EnqueueKey(kbdDevice, KeyRelease, SHIFT_R_KEY_CODE);
+ EnqueueKey(inputInfo.keyboard, KeyRelease, SHIFT_R_KEY_CODE);
}
}
}
- EnqueueKey(kbdDevice, type, keyCode);
+ EnqueueKey(inputInfo.keyboard, type, keyCode);
if (fakeShiftPress) {
- EnqueueKey(kbdDevice, KeyRelease, SHIFT_L_KEY_CODE);
+ EnqueueKey(inputInfo.keyboard, KeyRelease, SHIFT_L_KEY_CODE);
}
if (fakeShiftLRelease) {
- EnqueueKey(kbdDevice, KeyPress, SHIFT_L_KEY_CODE);
+ EnqueueKey(inputInfo.keyboard, KeyPress, SHIFT_L_KEY_CODE);
}
if (fakeShiftRRelease) {
- EnqueueKey(kbdDevice, KeyPress, SHIFT_R_KEY_CODE);
+ EnqueueKey(inputInfo.keyboard, KeyPress, SHIFT_R_KEY_CODE);
+ }
+ if (fakeLevel3Press) {
+ EnqueueKey(inputInfo.keyboard, KeyRelease, ISO_LEVEL3_KEY_CODE);
+ }
+ if (fakeLevel3Release) {
+ EnqueueKey(inputInfo.keyboard, KeyPress, ISO_LEVEL3_KEY_CODE);
}
}
@@ -480,15 +645,15 @@ KbdReleaseAllKeys(void)
{
int i, j;
- if (!kbdDevice)
+ if (!inputInfo.keyboard)
return;
for (i = 0; i < DOWN_LENGTH; i++) {
- if (kbdDevice->key->down[i] != 0) {
+ if (inputInfo.keyboard->key->down[i] != 0) {
for (j = 0; j < 8; j++) {
- if (kbdDevice->key->down[i] & (1 << j)) {
+ if (inputInfo.keyboard->key->down[i] & (1 << j)) {
int detail = (i << 3) | j;
- EnqueueKey(kbdDevice, KeyRelease, detail);
+ EnqueueKey(inputInfo.keyboard, KeyRelease, detail);
}
}
}
diff -pruN xorg-server-1.12.1.orig/hw/vnc/keyboard.h xorg-server-1.12.1/hw/vnc/keyboard.h
--- xorg-server-1.12.1.orig/hw/vnc/keyboard.h 2012-04-18 14:14:07.437250922 -0500
+++ xorg-server-1.12.1/hw/vnc/keyboard.h 2012-04-18 14:15:27.657248035 -0500
@@ -32,3 +32,4 @@
#define META_R_KEY_CODE (MIN_KEY_CODE + 108)
#define ALT_L_KEY_CODE (MIN_KEY_CODE + 56)
#define ALT_R_KEY_CODE (MIN_KEY_CODE + 105)
+#define ISO_LEVEL3_KEY_CODE ALT_R_KEY_CODE
++++++ N-VNC-Fix-crash-due-to-unset-input-device-names.patch ++++++
From: Egbert Eich <eich(a)freedesktop.org>
Date: Tue, 6 Sep 2011 14:58:28 +0200
Subject: [PATCH 6/6] VNC: Fix crash due to unset input device names.
Patch-Mainline: Currently no upstream project.
Git-commit: b756a7efff37021ca503fe1e63084daae4082e9d
Signed-off: Egbert Eich <eich(a)suse.de>
References: bnc #716074
Signed-off-by: Egbert Eich <eich(a)freedesktop.org>
---
hw/vnc/init.c | 2 +-
hw/vnc/rfb.h | 2 +-
hw/vnc/rfbkeyb.c | 7 +++++--
hw/vnc/rfbmouse.c | 9 +++++++--
4 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/hw/vnc/init.c b/hw/vnc/init.c
index 0977fee..6f83aa8 100644
--- a/hw/vnc/init.c
+++ b/hw/vnc/init.c
@@ -816,7 +816,7 @@ rfbMouseProc(DeviceIntPtr pDevice, int onoff)
switch (onoff)
{
case DEVICE_INIT:
- PtrDeviceInit();
+ PtrDeviceInit(pDevice, "vncMouse");
map[1] = 1;
map[2] = 2;
map[3] = 3;
diff --git a/hw/vnc/rfb.h b/hw/vnc/rfb.h
index 70b1a45..aa9abab 100644
--- a/hw/vnc/rfb.h
+++ b/hw/vnc/rfb.h
@@ -578,7 +578,7 @@ extern void rfbGotXCutText(char *str, int len);
extern Bool compatibleKbd;
extern unsigned char ptrAcceleration;
-extern void PtrDeviceInit(void);
+extern void PtrDeviceInit(DeviceIntPtr pDevice, char *name);
extern void PtrDeviceOn(DeviceIntPtr pDev);
extern void PtrDeviceOff(void);
extern void PtrDeviceControl(DeviceIntPtr dev, PtrCtrl *ctrl);
diff --git a/hw/vnc/rfbkeyb.c b/hw/vnc/rfbkeyb.c
index 4da29c2..6d97999 100644
--- a/hw/vnc/rfbkeyb.c
+++ b/hw/vnc/rfbkeyb.c
@@ -36,6 +36,7 @@
#endif
#include <xf86Xinput.h>
#include <exevents.h> /* Needed for InitValuator/Proximity stuff */
+#include <extinit.h>
#include <mipointer.h>
#ifdef XFree86LOADER
@@ -49,7 +50,6 @@
extern void rfbSendBell(void);
-extern DeviceIntPtr kbdDevice;
extern void vncInitKeyb(void);
#include <X11/keysym.h>
@@ -212,11 +212,15 @@ static KeySym map[MAX_KEY_CODE * GLYPHS_PER_KEY] = {
};
#define N_PREDEFINED_KEYS (sizeof(map) / (sizeof(KeySym) * GLYPHS_PER_KEY))
+#define RFB_KEYB "rfbKeyb"
void
KbdDeviceInit(DeviceIntPtr pDevice, KeySymsPtr pKeySyms, CARD8 *pModMap)
{
int i;
+ Atom atom = MakeAtom(RFB_KEYB, strlen(RFB_KEYB), TRUE);
+
+ AssignTypeAndName(pDevice, atom, RFB_KEYB);
for (i = 0; i < MAP_LENGTH; i++)
pModMap[i] = NoSymbol;
@@ -359,7 +363,6 @@ xf86rfbKeybInit(struct _InputDriverRec *drv,
pInfo->control_proc = NULL;
pInfo->switch_mode = NULL;
pInfo->fd = -1;
- pInfo->dev = NULL;
/* Collect the options, and process the common options. */
xf86CollectInputOptions(pInfo, (const char**)drv->default_options);
diff --git a/hw/vnc/rfbmouse.c b/hw/vnc/rfbmouse.c
index 4657128..86e8f2f 100644
--- a/hw/vnc/rfbmouse.c
+++ b/hw/vnc/rfbmouse.c
@@ -37,6 +37,7 @@
#endif
#include <xf86Xinput.h>
#include <exevents.h> /* Needed for InitValuator/Proximity stuff */
+#include <extinit.h>
#include <mipointer.h>
#ifdef XFree86LOADER
@@ -63,8 +64,12 @@ PtrDeviceOn(DeviceIntPtr pDev)
}
void
-PtrDeviceInit(void)
+PtrDeviceInit(DeviceIntPtr pDevice, char *name)
{
+ Atom atom = MakeAtom(name, strlen(name), TRUE);
+
+ AssignTypeAndName(pDevice, atom, name);
+
}
void
@@ -119,7 +124,7 @@ xf86rfbMouseControlProc(DeviceIntPtr dev, int onoff)
{
case DEVICE_INIT:
vncSetPointerDevice(dev);
- PtrDeviceInit();
+ // PtrDeviceInit(dev, "rfbPointer");
map[1] = 1;
map[2] = 2;
map[3] = 3;
--
1.7.3.4
++++++ N-VNC-Fix-crash-when-no-depth-translation-is-required.patch ++++++
From: Michael Schroeder <mls(a)suse.de>
Date: Tue, 6 Sep 2011 07:58:33 +0200
Subject: [PATCH 3/6] VNC: Fix crash when no depth translation is required.
Patch-Mainline: Currently no upstream project.
Git-commit: 74d5e3115cd955b7ee1acc64c6b8b42198ed894b
Signed-off: Egbert Eich <eich(a)suse.de>
References: bnc #389386
Signed-off-by: Egbert Eich <eich(a)freedesktop.org>
---
hw/vnc/translate.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/hw/vnc/translate.c b/hw/vnc/translate.c
index 5cc57a3..78030ed 100644
--- a/hw/vnc/translate.c
+++ b/hw/vnc/translate.c
@@ -168,17 +168,18 @@ rfbTranslateNone(ScreenPtr pScreen, char *table, rfbPixelFormat *in, rfbPixelFor
{
VNCSCREENPTR(pScreen);
DrawablePtr pDraw = (DrawablePtr)pScreen->root;
- int truewidth = PixmapBytePad(width, in->bitsPerPixel) / 4;
+ int truewidth = PixmapBytePad(width, in->bitsPerPixel);
- if ((x + truewidth > pVNC->width) || truewidth != width) {
- unsigned char *buffer = malloc(truewidth * height * in->bitsPerPixel / 8);
+ if ((x + width > pVNC->width) || truewidth != width * in->bitsPerPixel / 8) {
+ unsigned char *buffer = malloc(truewidth * height);
unsigned char *buf = buffer;
- (*pScreen->GetImage)(pDraw, x, y, truewidth, height, ZPixmap, ~0, (char*)buf);
+ (*pScreen->GetImage)(pDraw, x, y, width, height, ZPixmap, ~0, (char*)buf);
+
while (height--) {
memcpy(optr, buf, width * in->bitsPerPixel / 8);
optr += width * in->bitsPerPixel / 8;
- buf += truewidth * in->bitsPerPixel / 8;
+ buf += truewidth;
}
free(buffer);
return;
--
1.7.3.4
++++++ N-VNC-Readd-timeout-when-vnc-viewer-connection-breaks.patch ++++++
From: Egbert Eich <eich(a)freedesktop.org>
Date: Tue, 6 Sep 2011 07:02:11 +0200
Subject: [PATCH 2/6] VNC: Readd timeout when vnc viewer connection breaks.
Patch-Mainline: Currently no upstream project.
Git-commit: 759b49ed1c4ea03e45433c92c2fb8c44a60db34a
Signed-off: Egbert Eich <eich(a)suse.de>
References: bnc #441935, bnc #403901
This prevents Xvnc busy loop forever waiting for a viewer that no longer
response due to network or other issues.
Signed-off-by: Egbert Eich <eich(a)freedesktop.org>
---
hw/vnc/sockets.c | 19 +++++--------------
1 files changed, 5 insertions(+), 14 deletions(-)
diff --git a/hw/vnc/sockets.c b/hw/vnc/sockets.c
index 39eb88a..ae43ed0 100644
--- a/hw/vnc/sockets.c
+++ b/hw/vnc/sockets.c
@@ -442,9 +442,7 @@ WriteExact(int sock, char *buf, int len)
int n;
fd_set fds;
struct timeval tv;
-#if 0
int totalTimeWaited = 0;
-#endif
while (len > 0) {
n = write(sock, buf, len);
@@ -464,7 +462,6 @@ WriteExact(int sock, char *buf, int len)
return n;
}
-#if 0
/* Retry every 5 seconds until we exceed rfbMaxClientWait. We
need to do this because select doesn't necessarily return
immediately when the other end has gone away */
@@ -473,19 +470,14 @@ WriteExact(int sock, char *buf, int len)
FD_SET(sock, &fds);
tv.tv_sec = 5;
tv.tv_usec = 0;
-#else
- /* We're in the WakeupHandler now, so don't wait */
- FD_ZERO(&fds);
- FD_SET(sock, &fds);
- tv.tv_sec = 0;
- tv.tv_usec = 0;
-#endif
n = select(sock+1, NULL, &fds, NULL, &tv);
-#if 0
+
if (n < 0) {
- rfbLogPerror("WriteExact: select");
- return n;
+ if (errno != EINTR) {
+ rfbLogPerror("WriteExact: select");
+ return n;
+ }
}
if (n == 0) {
totalTimeWaited += 5000;
@@ -496,7 +488,6 @@ WriteExact(int sock, char *buf, int len)
} else {
totalTimeWaited = 0;
}
-#endif
}
}
return 1;
--
1.7.3.4
++++++ N_vgaHW-no-legacy.patch ++++++
Author: Andreas Schwab <schwab(a)suse.de>
Subject: disable DACDelay on non-vga-hardware users
Patch-Mainline: To be upstreamed
Signed-Off-By: Marcus Meissner <meissner(a)suse.de>
--- hw/xfree86/vgahw/vgaHW.h
+++ hw/xfree86/vgahw/vgaHW.h
@@ -168,11 +168,15 @@ typedef struct _vgaHWRec {
#define BITS_PER_GUN 6
#define COLORMAP_SIZE 256
+#if defined(__powerpc__) || defined(__arm__) || defined(__s390__) || defined(__nds32__)
+#define DACDelay(hw) /* No legacy VGA support */
+#else
#define DACDelay(hw) \
do { \
(hw)->readST01((hw)); \
(hw)->readST01((hw)); \
} while (0)
+#endif
/* Function Prototypes */
++++++ README.updates ++++++
Xserver module update mechanism
-------------------------------
If any corresponding Xserver module is found below
"/usr/lib/xorg/modules/updates/" ("/usr/lib64/xorg/modules/updates/"
on biarch 32/64 bit platforms) it will be favored over the one in
"/usr/lib/xorg/modules/" ("/usr/lib64/xorg/modules/" on biarch 32/64
bit platforms).
++++++ U_dri2_add_DRI2CreateDrawable2.patch ++++++
>From 8a87acc9e57be740e3bd252567622246051a0723 Mon Sep 17 00:00:00 2001
From: Michel Dänzer <michel.daenzer(a)amd.com>
Date: Thu, 12 Jul 2012 11:16:36 +0000
Subject: dri2: Add DRI2CreateDrawable2.
Same as DRI2CreateDrawable, except it can return the DRI2 specific XID of the
DRI2 drawable reference to the base drawable.
Signed-off-by: Michel Dänzer <michel.daenzer(a)amd.com>
Reviewed-by: Kristian Høgsberg <krh(a)bitplanet.net>
Signed-off-by: Keith Packard <keithp(a)keithp.com>
---
Index: xorg-server-1.12.3/hw/xfree86/dri2/dri2.c
===================================================================
--- xorg-server-1.12.3.orig/hw/xfree86/dri2/dri2.c
+++ xorg-server-1.12.3/hw/xfree86/dri2/dri2.c
@@ -280,8 +280,9 @@ DRI2AddDrawableRef(DRI2DrawablePtr pPriv
}
int
-DRI2CreateDrawable(ClientPtr client, DrawablePtr pDraw, XID id,
- DRI2InvalidateProcPtr invalidate, void *priv)
+DRI2CreateDrawable2(ClientPtr client, DrawablePtr pDraw, XID id,
+ DRI2InvalidateProcPtr invalidate, void *priv,
+ XID *dri2_id_out)
{
DRI2DrawablePtr pPriv;
XID dri2_id;
@@ -298,9 +299,19 @@ DRI2CreateDrawable(ClientPtr client, Dra
if (rc != Success)
return rc;
+ if (dri2_id_out)
+ *dri2_id_out = dri2_id;
+
return Success;
}
+int
+DRI2CreateDrawable(ClientPtr client, DrawablePtr pDraw, XID id,
+ DRI2InvalidateProcPtr invalidate, void *priv)
+{
+ return DRI2CreateDrawable2(client, pDraw, id, invalidate, priv, NULL);
+}
+
static int
DRI2DrawableGone(pointer p, XID id)
{
Index: xorg-server-1.12.3/hw/xfree86/dri2/dri2.h
===================================================================
--- xorg-server-1.12.3.orig/hw/xfree86/dri2/dri2.h
+++ xorg-server-1.12.3/hw/xfree86/dri2/dri2.h
@@ -237,6 +237,13 @@ extern _X_EXPORT int DRI2CreateDrawable(
extern _X_EXPORT void DRI2DestroyDrawable(DrawablePtr pDraw);
+extern _X_EXPORT int DRI2CreateDrawable2(ClientPtr client,
+ DrawablePtr pDraw,
+ XID id,
+ DRI2InvalidateProcPtr invalidate,
+ void *priv,
+ XID *dri2_id_out);
+
extern _X_EXPORT DRI2BufferPtr *DRI2GetBuffers(DrawablePtr pDraw,
int *width,
int *height,
++++++ U_fix_exa_glyph_corruption.patch ++++++
>From 1ca096d5e07221025c4c4110528772b7d94f15ee Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michel=20D=C3=A4nzer?= <michel.daenzer(a)amd.com>
Date: Mon, 29 Oct 2012 12:57:54 +0100
Subject: [PATCH] EXA: Track source/mask pixmaps more explicitly for Composite
fallback regions.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
In particular, make sure pExaScr->src/maskPix are cleared when the
corresponding pictures aren't associated with drawables, i.e. solid or gradient
pictures. Without this, we would in some cases associate the source/mask region
with unrelated pixmaps from previous Composite fallbacks, resulting in random
corruption.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=47266
Signed-off-by: Michel Dänzer <michel.daenzer(a)amd.com>
Reviewed-by: Alex Deucher <alexander.deucher(a)amd.com>
Signed-off-by: Keith Packard <keithp(a)keithp.com>
---
exa/exa_priv.h | 1 +
exa/exa_unaccel.c | 16 ++++++++++++----
2 files changed, 13 insertions(+), 4 deletions(-)
Index: xorg-server-1.12.3/exa/exa_priv.h
===================================================================
--- xorg-server-1.12.3.orig/exa/exa_priv.h
+++ xorg-server-1.12.3/exa/exa_priv.h
@@ -207,6 +207,7 @@ typedef struct {
RegionRec srcReg;
RegionRec maskReg;
PixmapPtr srcPix;
+ PixmapPtr maskPix;
} ExaScreenPrivRec, *ExaScreenPrivPtr;
Index: xorg-server-1.12.3/exa/exa_unaccel.c
===================================================================
--- xorg-server-1.12.3.orig/exa/exa_unaccel.c
+++ xorg-server-1.12.3/exa/exa_unaccel.c
@@ -442,6 +442,13 @@ ExaSrcValidate(DrawablePtr pDrawable,
RegionPtr dst;
int xoff, yoff;
+ if (pExaScr->srcPix == pPix)
+ dst = &pExaScr->srcReg;
+ else if (pExaScr->maskPix == pPix)
+ dst = &pExaScr->maskReg;
+ else
+ return;
+
exaGetDrawableDeltas(pDrawable, pPix, &xoff, &yoff);
box.x1 = x + xoff;
@@ -449,8 +456,6 @@ ExaSrcValidate(DrawablePtr pDrawable,
box.x2 = box.x1 + width;
box.y2 = box.y1 + height;
- dst = (pExaScr->srcPix == pPix) ? &pExaScr->srcReg : &pExaScr->maskReg;
-
RegionInit(®, &box, 1);
RegionUnion(dst, dst, ®);
RegionUninit(®);
@@ -495,16 +500,19 @@ ExaPrepareCompositeReg(ScreenPtr pScreen
if (pSrc != pDst)
RegionTranslate(pSrc->pCompositeClip,
-pSrc->pDrawable->x, -pSrc->pDrawable->y);
- }
+ } else
+ pExaScr->srcPix = NULL;
if (pMask && pMask->pDrawable) {
pMaskPix = exaGetDrawablePixmap(pMask->pDrawable);
RegionNull(&pExaScr->maskReg);
maskReg = &pExaScr->maskReg;
+ pExaScr->maskPix = pMaskPix;
if (pMask != pDst && pMask != pSrc)
RegionTranslate(pMask->pCompositeClip,
-pMask->pDrawable->x, -pMask->pDrawable->y);
- }
+ } else
+ pExaScr->maskPix = NULL;
RegionTranslate(pDst->pCompositeClip,
-pDst->pDrawable->x, -pDst->pDrawable->y);
++++++ U_glx_Free_reference_to_destroyed_GLX_drawable.patch ++++++
>From a2d0829531249e24dbca25fc20ed30a2bb2d8ed8 Mon Sep 17 00:00:00 2001
From: Michel Dänzer <michel.daenzer(a)amd.com>
Date: Thu, 12 Jul 2012 11:16:37 +0000
Subject: glx: Free DRI2 drawable reference to destroyed GLX drawable.
Otherwise the reference can lead to use after free in
__glXDRIinvalidateBuffers().
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50019
Signed-off-by: Michel Dänzer <michel.daenzer(a)amd.com>
Reviewed-by: Kristian Høgsberg <krh(a)bitplanet.net>
Signed-off-by: Keith Packard <keithp(a)keithp.com>
---
Index: xorg-server-1.12.3/glx/glxdri2.c
===================================================================
--- xorg-server-1.12.3.orig/glx/glxdri2.c
+++ xorg-server-1.12.3/glx/glxdri2.c
@@ -96,6 +96,7 @@ struct __GLXDRIdrawable {
int height;
__DRIbuffer buffers[MAX_DRAWABLE_BUFFERS];
int count;
+ XID dri2_id;
};
static void
@@ -104,6 +105,8 @@ __glXDRIdrawableDestroy(__GLXdrawable *
__GLXDRIdrawable *private = (__GLXDRIdrawable *) drawable;
const __DRIcoreExtension *core = private->screen->core;
+ FreeResource(private->dri2_id, FALSE);
+
(*core->destroyDrawable) (private->driDrawable);
__glXDrawableRelease(drawable);
@@ -597,8 +600,9 @@ __glXDRIscreenCreateDrawable(ClientPtr c
private->base.waitGL = __glXDRIdrawableWaitGL;
private->base.waitX = __glXDRIdrawableWaitX;
- if (DRI2CreateDrawable(client, pDraw, drawId,
- __glXDRIinvalidateBuffers, private)) {
+ if (DRI2CreateDrawable2(client, pDraw, drawId,
+ __glXDRIinvalidateBuffers, private,
+ &private->dri2_id)) {
free(private);
return NULL;
}
++++++ U_os-Reset-input-buffer-s-ignoreBytes-field.patch ++++++
>From 67c66606c760c263d7a4c2d1bba43ed6225a4e7c Mon Sep 17 00:00:00 2001
From: Robert Morell <rmorell(a)nvidia.com>
Date: Thu, 9 May 2013 13:09:02 -0700
Subject: [PATCH] os: Reset input buffer's 'ignoreBytes' field
If a client sends a request larger than maxBigRequestSize, the server is
supposed to ignore it.
Before commit cf88363d, the server would simply disconnect the client. After
that commit, it attempts to gracefully ignore the request by remembering how
long the client specified the request to be, and ignoring that many bytes.
However, if a client sends a BigReq header with a large size and disconnects
before actually sending the rest of the specified request, the server will
reuse the ConnectionInput buffer without resetting the ignoreBytes field. This
makes the server ignore new X clients' requests.
This fixes that behavior by resetting the ignoreBytes field when putting the
ConnectionInput buffer back on the FreeInputs list.
Signed-off-by: Robert Morell <rmorell(a)nvidia.com>
Reviewed-by: Peter Hutterer <peter.hutterer(a)who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer(a)who-t.net>
---
os/io.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/os/io.c b/os/io.c
index 2f091c4..0d980ab 100644
--- a/os/io.c
+++ b/os/io.c
@@ -1063,6 +1063,7 @@ FreeOsBuffers(OsCommPtr oc)
oci->bufptr = oci->buffer;
oci->bufcnt = 0;
oci->lenLastReq = 0;
+ oci->ignoreBytes = 0;
}
}
if ((oco = oc->output)) {
--
1.8.1.4
++++++ U_xf86-fix-flush-input-to-work-with-Linux-evdev-device.patch ++++++
>From 6ca03b9161d33b1d2b55a3a1a913cf88deb2343f Mon Sep 17 00:00:00 2001
From: Dave Airlie <airlied(a)gmail.com>
Date: Wed, 10 Apr 2013 16:09:01 +1000
Subject: [PATCH] xf86: fix flush input to work with Linux evdev devices.
So when we VT switch back and attempt to flush the input devices,
we don't succeed because evdev won't return part of an event,
since we were only asking for 4 bytes, we'd only get -EINVAL back.
This could later cause events to be flushed that we shouldn't have
gotten.
This is a fix for CVE-2013-1940.
Signed-off-by: Dave Airlie <airlied(a)redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer(a)who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer(a)who-t.net>
---
hw/xfree86/os-support/shared/posix_tty.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/xfree86/os-support/shared/posix_tty.c b/hw/xfree86/os-support/shared/posix_tty.c
index ab3757a..4d08c1e 100644
--- a/hw/xfree86/os-support/shared/posix_tty.c
+++ b/hw/xfree86/os-support/shared/posix_tty.c
@@ -421,7 +421,8 @@ xf86FlushInput(int fd)
{
fd_set fds;
struct timeval timeout;
- char c[4];
+ /* this needs to be big enough to flush an evdev event. */
+ char c[256];
DebugF("FlushingSerial\n");
if (tcflush(fd, TCIFLUSH) == 0)
--
1.8.1.4
++++++ Use-external-tool-for-creating-backtraces-on-crashes.patch ++++++
>From bb4e768eaf8025d3ccf369cbad9a9b8be721e7ac Mon Sep 17 00:00:00 2001
From: Matthias Hopf <mhopf(a)suse.de>
Date: Wed, 25 Aug 2010 14:12:48 +0200
Subject: [PATCH] Use external tool for creating backtraces on crashes if available.
This calls /usr/bin/xorg-backtrace to create reasonable commented backtraces
with gdb. On errors it falls back to the generic method.
Signed-off-by: Matthias Hopf <mhopf(a)suse.de>
---
os/backtrace.c | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 82 insertions(+), 0 deletions(-)
diff --git a/os/backtrace.c b/os/backtrace.c
index 7ca6dab..1e3201a 100644
--- a/os/backtrace.c
+++ b/os/backtrace.c
@@ -28,6 +28,81 @@
#include "os.h"
#include "misc.h"
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <errno.h>
+
+#define XORG_BACKTRACE "/usr/bin/xorg-backtrace"
+
+/* Call gdb to create reasonable(!) backtrace. Returns 0 if successfull. */
+static int xorg_backtrace_gdb(void)
+{
+ static const char *xorg_backtrace = XORG_BACKTRACE;
+ char pidstr[12];
+ char fdname[] = "/tmp/xorg.XXXXXX";
+ char buf[256];
+ pid_t pid;
+ int fd, status = -1, ret;
+ FILE *f;
+
+ if (access (xorg_backtrace, R_OK | X_OK) != 0) {
+ ErrorF ("%s not found, using internal backtrace system\n", xorg_backtrace);
+ return 1;
+ }
+ if ( (fd = mkstemp (fdname)) == -1) {
+ ErrorF ("xorg_backtrace_gdb internal error 1\n");
+ return 1;
+ }
+ unlink (fdname);
+ snprintf (pidstr, 12, "%d", getpid());
+
+ switch ( (pid = fork()) ) {
+ case 0:
+ close (0);
+ close (1);
+ close (2);
+ dup2 (fd, 1);
+ dup2 (fd, 2);
+ close (fd);
+ execl (xorg_backtrace, xorg_backtrace, pidstr, NULL);
+ exit (-1);
+ case -1:
+ close (fd);
+ return 1;
+ }
+
+ while (waitpid (pid, &status, 0) == -1 && errno == EINTR)
+ ;
+ if (WIFEXITED (status) && WEXITSTATUS (status) == 0)
+ ret = 0;
+ else {
+ ErrorF ("%s failed with returncode %d\n", xorg_backtrace, WEXITSTATUS (status));
+ ret = 1;
+ }
+
+ lseek (fd, 0, SEEK_SET);
+ if (! (f = fdopen (fd, "r"))) {
+ ErrorF ("xorg_backtrace_gdb internal error 2\n");
+ close (fd);
+ return 1;
+ }
+ status = 0;
+ while (fgets (buf, 256, f)) {
+ status++;
+ ErrorF("%s", buf);
+ }
+ fclose (f);
+ if (status < 10 && ret == 0) {
+ ErrorF ("%s only produced %d lines of output\n", xorg_backtrace, status);
+ return 1;
+ }
+
+ return ret;
+}
+
#ifdef HAVE_BACKTRACE
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
@@ -41,6 +116,10 @@ void xorg_backtrace(void)
const char *mod;
int size, i;
Dl_info info;
+
+ if (xorg_backtrace_gdb () == 0)
+ return;
+
ErrorF("\nBacktrace:\n");
size = backtrace(array, 64);
for (i = 0; i < size; i++) {
@@ -182,6 +261,9 @@ static int xorg_backtrace_pstack(void) {
void xorg_backtrace(void) {
+ if (xorg_backtrace_gdb () == 0)
+ return;
+
ErrorF("\nBacktrace:\n");
# ifdef HAVE_PSTACK
--
1.6.0.2
++++++ Xvnc-pthread.diff ++++++
--- xorg-server-1.10.4/hw/vnc/Makefile.am.orig 2011-09-06 15:25:27.000000000 +0000
+++ xorg-server-1.10.4/hw/vnc/Makefile.am 2011-09-06 15:26:40.000000000 +0000
@@ -37,6 +37,7 @@
JPEG_LIBS = -ljpeg
CRYPT_LIBS = -lcrypt
Z_LIBS = -lz
+PTHREAD_LIBS = -lpthread
AM_CFLAGS = $(DIX_CFLAGS) $(XVNC_CFLAGS) -I$(top_srcdir)/hw/dmx/vnc -DCHROMIUM=1
@@ -48,7 +49,8 @@
$(CRYPT_LIBS) \
$(XSERVER_SYS_LIBS) \
$(VNCMODULES_LIBS) \
- $(Z_LIBS)
+ $(Z_LIBS) \
+ $(PTHREAD_LIBS)
relink:
++++++ autoconfig_fallback_fbdev_first.diff ++++++
Index: hw/xfree86/common/xf86AutoConfig.c
===================================================================
--- hw/xfree86/common/xf86AutoConfig.c.orig
+++ hw/xfree86/common/xf86AutoConfig.c
@@ -264,7 +264,7 @@ listPossibleVideoDrivers(char *matches[]
/* Fallback to platform default hardware */
if (i < (nmatches - 1)) {
#if defined(__i386__) || defined(__amd64__) || defined(__hurd__)
- matches[i++] = xnfstrdup("vesa");
+ matches[i++] = xnfstrdup("fbdev");
#elif defined(__sparc__) && !defined(sun)
matches[i++] = xnfstrdup("sunffb");
#endif
@@ -276,7 +276,7 @@ listPossibleVideoDrivers(char *matches[]
#if !defined(__linux__) && defined(__sparc__)
matches[i++] = xnfstrdup("wsfb");
#else
- matches[i++] = xnfstrdup("fbdev");
+ matches[i++] = xnfstrdup("vesa");
#endif
}
#endif /* !sun */
++++++ bug-197858_dpms.diff ++++++
Index: hw/xfree86/common/xf86Events.c
===================================================================
--- hw/xfree86/common/xf86Events.c.orig
+++ hw/xfree86/common/xf86Events.c
@@ -115,6 +115,7 @@ typedef struct x_IHRec {
InputHandlerProc ihproc;
pointer data;
Bool enabled;
+ Bool is_input;
struct x_IHRec *next;
} IHRec, *IHPtr;
@@ -445,9 +446,13 @@ xf86VTSwitch(void)
* Keep the order: Disable Device > LeaveVT
* EnterVT > EnableDevice
*/
- for (ih = InputHandlers; ih; ih = ih->next)
+ for (ih = InputHandlers; ih; ih = ih->next) {
+ if (ih->is_input)
xf86DisableInputHandler(ih);
- for (pInfo = xf86InputDevs; pInfo; pInfo = pInfo->next) {
+ else
+ xf86DisableGeneralHandler(ih);
+ }
+ for (pInfo = xf86InputDevs; pInfo; pInfo = pInfo->next) {
if (pInfo->dev) {
xf86ReleaseKeys(pInfo->dev);
ProcessInputEvents();
@@ -486,8 +491,12 @@ xf86VTSwitch(void)
EnableDevice(pInfo->dev, TRUE);
pInfo = pInfo->next;
}
- for (ih = InputHandlers; ih; ih = ih->next)
- xf86EnableInputHandler(ih);
+ for (ih = InputHandlers; ih; ih = ih->next) {
+ if (ih->is_input)
+ xf86EnableInputHandler(ih);
+ else
+ xf86EnableGeneralHandler(ih);
+ }
xf86UnblockSIGIO(prevSIGIO);
@@ -542,8 +551,12 @@ xf86VTSwitch(void)
pInfo = pInfo->next;
}
- for (ih = InputHandlers; ih; ih = ih->next)
- xf86EnableInputHandler(ih);
+ for (ih = InputHandlers; ih; ih = ih->next) {
+ if (ih->is_input)
+ xf86EnableInputHandler(ih);
+ else
+ xf86EnableGeneralHandler(ih);
+ }
xf86UnblockSIGIO(prevSIGIO);
}
@@ -579,8 +592,10 @@ xf86AddInputHandler(int fd, InputHandler
{
IHPtr ih = addInputHandler(fd, proc, data);
- if (ih)
+ if (ih) {
AddEnabledDevice(fd);
+ ih->is_input = TRUE;
+ }
return ih;
}
++++++ bug474071-fix1.diff ++++++
Index: linuxPci.c
================================================================================
--- linuxPci.c
+++ linuxPci.c
@@ -195,7 +195,7 @@
struct pci_id_match bridge_match = {
PCI_MATCH_ANY, PCI_MATCH_ANY, PCI_MATCH_ANY, PCI_MATCH_ANY,
(PCI_CLASS_BRIDGE << 16) | (PCI_SUBCLASS_BRIDGE_PCI << 8),
- 0
+ (PCI_CLASS_BRIDGE << 16) | (PCI_SUBCLASS_BRIDGE_PCI << 8)
};
struct pci_device *bridge;
struct pci_device_iterator *iter;
@@ -433,7 +433,6 @@
xf86MapLegacyIO(struct pci_device *dev)
{
const int domain = dev->domain;
- struct pci_device *bridge = get_parent_bridge(dev);
int fd;
if (domain >= MAX_DOMAINS)
@@ -441,9 +440,11 @@
if (DomainMmappedIO[domain] == NULL) {
/* Permanently map all of I/O space */
- fd = linuxOpenLegacy(bridge, "legacy_io");
+ fd = linuxOpenLegacy(dev, "legacy_io");
if (fd < 0) {
- DomainMmappedIO[domain] = linuxMapPci(-1, VIDMEM_MMIO, bridge,
+ struct pci_device *bridge = get_parent_bridge(dev);
+ if (bridge != NULL)
+ DomainMmappedIO[domain] = linuxMapPci(-1, VIDMEM_MMIO, bridge,
0, linuxGetIOSize(bridge),
PCIIOC_MMAP_IS_IO);
}
++++++ bug534768-prefer_local_symbols.patch ++++++
Index: xorg-server-1.12.1/hw/xfree86/loader/loader.c
===================================================================
--- xorg-server-1.12.1.orig/hw/xfree86/loader/loader.c
+++ xorg-server-1.12.1/hw/xfree86/loader/loader.c
@@ -152,7 +152,7 @@ LoaderSymbol(const char *name)
return p;
if (!global_scope)
- global_scope = dlopen(NULL, DLOPEN_LAZY | DLOPEN_GLOBAL);
+ global_scope = dlopen(NULL, DLOPEN_LAZY | DLOPEN_GLOBAL | RTLD_DEEPBIND);
if (global_scope)
return dlsym(global_scope, name);
++++++ cache-xkbcomp-output-for-fast-start-up.patch ++++++
>From 0f70ba9d3412b17ac4e08e33e1be3c226c06ea54 Mon Sep 17 00:00:00 2001
From: Yan Li <yan.i.li(a)intel.com>
Date: Tue, 12 May 2009 17:49:07 +0800
Subject: [PATCH] XKB: cache xkbcomp output for fast start-up v5 for 1.6.1
Organization: Intel
xkbcomp outputs will be cached in files with hashed keymap as
names. This saves boot time for around 1s on commodity netbooks.
Signed-off-by: Yan Li <yan.i.li(a)intel.com>
================================================================================
--- xorg-server-1.7.99/configure.ac
+++ xorg-server-1.7.99/configure.ac
@@ -527,9 +527,9 @@
AC_ARG_WITH(xkb-path, AS_HELP_STRING([--with-xkb-path=PATH], [Path to XKB base dir (default: ${datadir}/X11/xkb)]),
[ XKBPATH="$withval" ],
[ XKBPATH="${datadir}/X11/xkb" ])
-AC_ARG_WITH(xkb-output, AS_HELP_STRING([--with-xkb-output=PATH], [Path to XKB output dir (default: ${datadir}/X11/xkb/compiled)]),
+AC_ARG_WITH(xkb-output, AS_HELP_STRING([--with-xkb-output=PATH], [Path to XKB output dir (default: ${localstatedir}/cache/xkb)]),
[ XKBOUTPUT="$withval" ],
- [ XKBOUTPUT="compiled" ])
+ [ XKBOUTPUT="${localstatedir}/cache/xkb" ])
AC_ARG_WITH(default-xkb-rules, AS_HELP_STRING([--with-default-xkb-rules=RULES],
[Keyboard ruleset (default: base/evdev)]),
[ XKB_DFLT_RULES="$withval" ],
@@ -1160,7 +1160,7 @@
dnl Make sure XKM_OUTPUT_DIR is an absolute path
XKBOUTPUT_FIRSTCHAR=`echo $XKBOUTPUT | cut -b 1`
if [[ x$XKBOUTPUT_FIRSTCHAR != x/ -a x$XKBOUTPUT_FIRSTCHAR != 'x$' ]] ; then
- XKBOUTPUT="$XKB_BASE_DIRECTORY/$XKBOUTPUT"
+ AC_MSG_ERROR([xkb-output must be an absolute path.])
fi
dnl XKM_OUTPUT_DIR (used in code) must end in / or file names get hosed
--- xorg-server-1.7.99/xkb/README.compiled
+++ xorg-server-1.7.99/xkb/README.compiled
@@ -4,10 +4,10 @@
or some other tool might destroy or replace the files in this directory,
so it is not a safe place to store compiled keymaps for long periods of
time. The default keymap for any server is usually stored in:
- X<num>-default.xkm
-where <num> is the display number of the server in question, which makes
-it possible for several servers *on the same host* to share the same
-directory.
+ server-<SHA1>.xkm
+
+where <SHA1> is the SHA1 hash of keymap source, so that compiled
+keymap of different keymap sources are stored in different files.
Unless the X server is modified, sharing this directory between servers on
different hosts could cause problems.
--- xorg-server-1.9.0/xkb/ddxLoad.c.orig 2010-07-14 22:23:17.000000000 +0200
+++ xorg-server-1.9.0/xkb/ddxLoad.c 2010-08-23 15:23:47.000000000 +0200
@@ -30,6 +30,12 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <xkb-config.h>
+#ifdef HAVE_SHA1_IN_LIBMD /* Use libmd for SHA1 */
+# include <sha1.h>
+#else /* Use OpenSSL's libcrypto */
+# include <stddef.h> /* buggy openssl/sha.h wants size_t */
+# include <openssl/sha.h>
+#endif
#include <stdio.h>
#include <ctype.h>
#include <X11/X.h>
@@ -43,24 +49,13 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define XKBSRV_NEED_FILE_FUNCS
#include <xkbsrv.h>
#include <X11/extensions/XI.h>
+#include <errno.h>
#include "xkb.h"
#if defined(CSRG_BASED) || defined(linux) || defined(__GNU__)
#include <paths.h>
#endif
- /*
- * If XKM_OUTPUT_DIR specifies a path without a leading slash, it is
- * relative to the top-level XKB configuration directory.
- * Making the server write to a subdirectory of that directory
- * requires some work in the general case (install procedure
- * has to create links to /var or somesuch on many machines),
- * so we just compile into /usr/tmp for now.
- */
-#ifndef XKM_OUTPUT_DIR
-#define XKM_OUTPUT_DIR "compiled/"
-#endif
-
#define PRE_ERROR_MSG "\"The XKEYBOARD keymap compiler (xkbcomp) reports:\""
#define ERROR_PREFIX "\"> \""
#define POST_ERROR_MSG1 "\"Errors from xkbcomp are not fatal to the X server\""
@@ -175,6 +170,45 @@ OutputDirectory(
}
static Bool
+Sha1Asc(char sha1Asc[SHA_DIGEST_LENGTH*2+1], const char * input)
+{
+ int i;
+ unsigned char sha1[SHA_DIGEST_LENGTH];
+
+#ifdef HAVE_SHA1_IN_LIBMD /* Use libmd for SHA1 */
+ SHA1_CTX ctx;
+
+ SHA1Init (&ctx);
+ SHA1Update (&ctx, input, strlen(input));
+ SHA1Final (sha1, &ctx);
+#else /* Use OpenSSL's libcrypto */
+ SHA_CTX ctx;
+ int success;
+
+ success = SHA1_Init (&ctx);
+ if (! success)
+ return BadAlloc;
+
+ success = SHA1_Update (&ctx, input, strlen(input));
+ if (! success)
+ return BadAlloc;
+
+ success = SHA1_Final (sha1, &ctx);
+ if (! success)
+ return BadAlloc;
+#endif
+
+ /* convert sha1 to sha1_asc */
+ for(i=0; i<SHA_DIGEST_LENGTH; ++i) {
+ sprintf(sha1Asc+i*2, "%02X", sha1[i]);
+ }
+
+ return Success;
+}
+
+/* call xkbcomp and compile XKB keymap, return xkm file name in
+ nameRtrn */
+static Bool
XkbDDXCompileKeymapByNames( XkbDescPtr xkb,
XkbComponentNamesPtr names,
unsigned want,
@@ -183,7 +217,11 @@ XkbDDXCompileKeymapByNames( XkbDescPtr
int nameRtrnLen)
{
FILE * out;
- char *buf = NULL, keymap[PATH_MAX], xkm_output_dir[PATH_MAX];
+ char * buf = NULL, xkmfile[PATH_MAX], xkm_output_dir[PATH_MAX];
+ char * tmpXkmFile = NULL;
+ char * canonicalXkmFileName = NULL;
+ char sha1Asc[SHA_DIGEST_LENGTH*2+1], xkbKeyMapBuf[100*1024];
+ int ret, result;
const char *emptystring = "";
char *xkbbasedirflag = NULL;
@@ -194,15 +232,70 @@ XkbDDXCompileKeymapByNames( XkbDescPtr
/* WIN32 has no popen. The input must be stored in a file which is
used as input for xkbcomp. xkbcomp does not read from stdin. */
char tmpname[PATH_MAX];
- const char *xkmfile = tmpname;
+ const char *xkbfile = tmpname;
#else
- const char *xkmfile = "-";
+ const char *xkbfile = "-";
+#endif
+
+ /* Write keymap source (xkbfile) to memory buffer `xkbKeyMapBuf',
+ of which SHA1 is generated and used as result xkm file name */
+ memset(xkbKeyMapBuf, 0, sizeof(xkbKeyMapBuf));
+ out = fmemopen(xkbKeyMapBuf, sizeof(xkbKeyMapBuf), "w");
+ if (NULL == out) {
+ ErrorF("[xkb] Open xkbKeyMapBuf for writing failed\n");
+ return FALSE;
+ }
+ ret = XkbWriteXKBKeymapForNames(out, names, xkb, want, need);
+ if (fclose(out) !=0)
+ {
+ ErrorF("[xkb] XkbWriteXKBKeymapForNames error, perhaps xkbKeyMapBuf is too small\n");
+ return FALSE;
+ }
+#ifdef DEBUG
+ if (xkbDebugFlags) {
+ ErrorF("[xkb] XkbDDXCompileKeymapByNames compiling keymap:\n");
+ fputs(xkbKeyMapBuf, stderr);
+ }
#endif
+ if (!ret) {
+ ErrorF("[xkb] Generating XKB Keymap failed, giving up compiling keymap\n");
+ return FALSE;
+ }
- snprintf(keymap, sizeof(keymap), "server-%s", display);
+ DebugF("[xkb] computing SHA1 of keymap\n");
+ if (Success == Sha1Asc(sha1Asc, xkbKeyMapBuf)) {
+ snprintf(xkmfile, sizeof(xkmfile), "server-%s", sha1Asc);
+ }
+ else {
+ ErrorF("[xkb] Computing SHA1 of keymap failed, "
+ "using display name instead as xkm file name\n");
+ snprintf(xkmfile, sizeof(xkmfile), "server-%s", display);
+ }
OutputDirectory(xkm_output_dir, sizeof(xkm_output_dir));
+ /* set nameRtrn, fail if it's too small */
+ if ((strlen(xkmfile)+1 > nameRtrnLen) && nameRtrn) {
+ ErrorF("[xkb] nameRtrn too small to hold xkmfile name\n");
+ return FALSE;
+ }
+ strncpy(nameRtrn, xkmfile, nameRtrnLen);
+
+ /* if the xkm file already exists, reuse it */
+ canonicalXkmFileName = Xprintf("%s%s.xkm", xkm_output_dir, xkmfile);
+ if (access(canonicalXkmFileName, R_OK) == 0) {
+ /* yes, we can reuse the old xkm file */
+ LogMessage(X_INFO, "XKB: reuse xkmfile %s\n", canonicalXkmFileName);
+ result = TRUE;
+ goto _ret;
+ }
+ LogMessage(X_INFO, "XKB: generating xkmfile %s\n", canonicalXkmFileName);
+
+ /* continue to call xkbcomp to compile the keymap. to avoid race
+ condition, we compile it to a tmpfile then rename it to
+ xkmfile */
+
+
#ifdef WIN32
strcpy(tmpname, Win32TempDir());
strcat(tmpname, "\\xkb_XXXXXX");
@@ -225,14 +318,20 @@ XkbDDXCompileKeymapByNames( XkbDescPtr
}
}
+ if ( (tmpXkmFile = tempnam(xkm_output_dir, NULL)) == NULL ) {
+ ErrorF("[xkb] Can't generate temp xkm file name");
+ result = FALSE;
+ goto _ret;
+ }
+
buf = Xprintf("\"%s%sxkbcomp\" -w %d %s -xkm \"%s\" "
- "-em1 %s -emp %s -eml %s \"%s%s.xkm\"",
+ "-em1 %s -emp %s -eml %s \"%s\"",
xkbbindir, xkbbindirsep,
( (xkbDebugFlags < 2) ? 1 :
((xkbDebugFlags > 10) ? 10 : (int)xkbDebugFlags) ),
- xkbbasedirflag ? xkbbasedirflag : "", xkmfile,
+ xkbbasedirflag ? xkbbasedirflag : "", xkbfile,
PRE_ERROR_MSG, ERROR_PREFIX, POST_ERROR_MSG1,
- xkm_output_dir, keymap);
+ tmpXkmFile);
free(xkbbasedirflag);
@@ -240,7 +339,12 @@ XkbDDXCompileKeymapByNames( XkbDescPtr
LogMessage(X_ERROR, "XKB: Could not invoke xkbcomp: not enough memory\n");
return FALSE;
}
-
+
+ /* there's a potential race condition between calling tempnam()
+ and invoking xkbcomp to write the result file (potential temp
+ file name conflicts), but since xkbcomp is a standalone
+ program, we have to live with this */
+
#ifndef WIN32
out= Popen(buf,"w");
#else
@@ -248,31 +352,42 @@ XkbDDXCompileKeymapByNames( XkbDescPtr
#endif
if (out!=NULL) {
-#ifdef DEBUG
- if (xkbDebugFlags) {
- ErrorF("[xkb] XkbDDXCompileKeymapByNames compiling keymap:\n");
- XkbWriteXKBKeymapForNames(stderr,names,xkb,want,need);
- }
-#endif
- XkbWriteXKBKeymapForNames(out,names,xkb,want,need);
+ /* write XKBKeyMapBuf to xkbcomp */
+ if (EOF==fputs(xkbKeyMapBuf, out))
+ {
+ ErrorF("[xkb] Sending keymap to xkbcomp failed\n");
+ result = FALSE;
+ goto _ret;
+ }
#ifndef WIN32
if (Pclose(out)==0)
#else
if (fclose(out)==0 && System(buf) >= 0)
#endif
{
+ /* xkbcomp success */
if (xkbDebugFlags)
DebugF("[xkb] xkb executes: %s\n",buf);
- if (nameRtrn) {
- strncpy(nameRtrn,keymap,nameRtrnLen);
- nameRtrn[nameRtrnLen-1]= '\0';
+ /* if canonicalXkmFileName already exists now, we simply
+ overwrite it, this is OK */
+ ret = rename(tmpXkmFile, canonicalXkmFileName);
+ if (0 != ret) {
+ ErrorF("[xkb] Can't rename %s to %s, error: %s\n",
+ tmpXkmFile, canonicalXkmFileName,
+ strerror(errno));
+
+ /* in case of error, don't unlink tmpXkmFile, leave it
+ for debugging */
+
+ result = FALSE;
+ goto _ret;
}
- if (buf != NULL)
- free(buf);
- return TRUE;
+
+ result = TRUE;
+ goto _ret;
}
else
- LogMessage(X_ERROR, "Error compiling keymap (%s)\n", keymap);
+ LogMessage(X_ERROR, "Error compiling keymap (%s)\n", xkbfile);
#ifdef WIN32
/* remove the temporary file */
unlink(tmpname);
@@ -289,7 +404,17 @@ XkbDDXCompileKeymapByNames( XkbDescPtr
nameRtrn[0]= '\0';
if (buf != NULL)
free(buf);
- return FALSE;
+ result = FALSE;
+
+_ret:
+ if (tmpXkmFile)
+ free(tmpXkmFile);
+ if (canonicalXkmFileName)
+ xfree(canonicalXkmFileName);
+ if (buf != NULL)
+ xfree (buf);
+
+ return result;
}
static FILE *
@@ -373,7 +498,6 @@ unsigned missing;
DebugF("Loaded XKB keymap %s, defined=0x%x\n",fileName,(*xkbRtrn)->defined);
}
fclose(file);
- (void) unlink (fileName);
return (need|want)&(~missing);
}
++++++ confine_to_shape.diff ++++++
--- dix/events.c.orig 2012-04-17 11:34:39.714915372 -0500
+++ dix/events.c 2012-04-17 11:26:54.735728478 -0500
@@ -671,32 +671,77 @@
{
BoxRec box;
int x = *px, y = *py;
- int incx = 1, incy = 1;
+ int nbox;
+ BoxPtr pbox;
+ int d, min = (~0U >> 1), dx2, dy2, x_r, y_r;
if (RegionContainsPoint(shape, x, y, &box))
return;
- box = *RegionExtents(shape);
- /* this is rather crude */
- do {
- x += incx;
- if (x >= box.x2) {
- incx = -1;
- x = *px - 1;
+
+ for (nbox = REGION_NUM_RECTS (shape),
+ pbox = REGION_RECTS(shape);
+ nbox--;
+ pbox++)
+ {
+ if (pbox->x1 < x && pbox->x2 > x) {
+ d = pbox->y1 - y;
+ if (d >= 0) {
+ d *= d;
+ if (d < min) {
+ *px = x;
+ *py = pbox->y1 + 1;
+ min = d;
+ }
+ } else {
+ d = pbox->y2 - y; d *= d;
+ if (d < min) {
+ *px = x;
+ *py = pbox->y2 - 1;
+ min = d;
+ }
+ }
}
- else if (x < box.x1) {
- incx = 1;
- x = *px;
- y += incy;
- if (y >= box.y2) {
- incy = -1;
- y = *py - 1;
+ else if (pbox->y1 < y && pbox->y2 > y) {
+ d = pbox->x1 - x;
+ if (d >= 0) {
+ d *= d;
+ if (d < min) {
+ *px = pbox->x1 + 1;
+ *py = y;
+ min = d;
+ }
+ } else {
+ d = pbox->x2 - x; d *= d;
+ if (d < min) {
+ *px = pbox->x2 - 1;
+ *py = y;
+ min = d;
+ }
+ }
+ } else {
+ dx2 = pbox->x1 - x;
+ if (dx2 >= 0) {
+ dx2 *= dx2;
+ x_r = pbox->x1 + 1;
+ } else {
+ dx2 = pbox->x2 - x; dx2 *= dx2;
+ x_r = pbox->x2 - 1;
+ }
+ dy2 = pbox->y1 - y;
+ if (dy2 >= 0) {
+ dy2 *= dy2;
+ y_r = pbox->y1 + 1;
+ } else {
+ dy2 = pbox->y2 - y; dy2 *= dy2;
+ y_r = pbox->y2 - 1;
+ }
+ if ((d = dx2 + dy2) < min) {
+ *px = x_r;
+ *py = y_r;
+ min = d;
}
- else if (y < box.y1)
- return; /* should never get here! */
}
- } while (!RegionContainsPoint(shape, x, y, &box));
- *px = x;
- *py = y;
+ }
}
static void
++++++ dpms_screensaver.diff ++++++
Index: xorg-server-1.12.1/hw/xfree86/common/xf86DPMS.c
===================================================================
--- xorg-server-1.12.1.orig/hw/xfree86/common/xf86DPMS.c
+++ xorg-server-1.12.1/hw/xfree86/common/xf86DPMS.c
@@ -151,7 +151,8 @@ DPMSSet(ClientPtr client, int level)
rc = dixSaveScreens(client, SCREEN_SAVER_FORCER, ScreenSaverActive);
if (rc != Success)
return rc;
- }
+ } else
+ dixSaveScreens(client, SCREEN_SAVER_FORCER, ScreenSaverReset);
/* For each screen, set the DPMS level */
for (i = 0; i < xf86NumScreens; i++) {
++++++ driver-autoconfig.diff ++++++
Index: hw/xfree86/common/xf86pciBus.c
===================================================================
--- hw/xfree86/common/xf86pciBus.c.orig
+++ hw/xfree86/common/xf86pciBus.c
@@ -1107,7 +1107,9 @@ videoPtrToDriverList(struct pci_device *
driverList[0] = "ast";
break;
case 0x1002:
- driverList[0] = "ati";
+ driverList[0] = "fglrx";
+ driverList[1] = "radeonhd";
+ driverList[2] = "ati";
break;
case 0x102c:
driverList[0] = "chips";
@@ -1139,6 +1141,13 @@ videoPtrToDriverList(struct pci_device *
driverList[0] = "neomagic";
break;
case 0x10de:
+ driverList[0] = "nvidia";
+ driverList[1] = "nouveau";
+ /* GeForce 6150SE support broken (bnc #465190/544674) */
+ if (dev->device_id != 0x03D0) {
+ driverList[2] = "nv";
+ }
+ break;
case 0x12d2:
{
int idx = 0;
@@ -1150,7 +1159,9 @@ videoPtrToDriverList(struct pci_device *
break;
}
case 0x1106:
- driverList[0] = "openchrome";
+ driverList[0] = "via";
+ driverList[1] = "openchrome";
+ driverList[2] = "unichrome";
break;
case 0x1b36:
driverList[0] = "qxl";
++++++ edid_data_sanity_check.diff ++++++
Index: xorg-server-1.6.3.901/hw/xfree86/modes/xf86Crtc.c
================================================================================
--- xorg-server-1.7.99/hw/xfree86/modes/xf86Crtc.c
+++ xorg-server-1.7.99/hw/xfree86/modes/xf86Crtc.c
@@ -2916,8 +2916,14 @@
p->output->MonInfo->features.vsize);
if (det_mon->type == DT &&
det_mon->section.d_timings.h_size != 0 &&
- det_mon->section.d_timings.v_size != 0) {
-
+ det_mon->section.d_timings.v_size != 0 &&
+ det_mon->section.d_timings.v_size != 0 &&
+ /* some sanity checking for aspect ration */
+ ((det_mon->section.d_timings.h_size /
+ det_mon->section.d_timings.v_size) < 2) &&
+ ((det_mon->section.d_timings.v_size /
+ det_mon->section.d_timings.h_size) < 2)
+ ) {
p->output->mm_width = det_mon->section.d_timings.h_size;
p->output->mm_height = det_mon->section.d_timings.v_size;
p->ret = TRUE;
++++++ fbdevhw.diff ++++++
Index: hw/xfree86/fbdevhw/fbdevhw.c
===================================================================
--- hw/xfree86/fbdevhw/fbdevhw.c.orig
+++ hw/xfree86/fbdevhw/fbdevhw.c
@@ -858,9 +858,10 @@ fbdevHWDPMSSet(ScrnInfoPtr pScrn, int mo
return;
}
+ /* Novell Bug #146462 */
if (-1 == ioctl(fPtr->fd, FBIOBLANK, (void *) fbmode))
- xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
- "FBIOBLANK: %s\n", strerror(errno));
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "FBIOBLANK: %s (Screen blanking not supported by vesafb of Linux Kernel)\n", strerror(errno));
}
Bool
@@ -875,9 +876,10 @@ fbdevHWSaveScreen(ScreenPtr pScreen, int
unblank = xf86IsUnblank(mode);
+ /* Novell Bug #146462 */
if (-1 == ioctl(fPtr->fd, FBIOBLANK, (void *) (1 - unblank))) {
- xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
- "FBIOBLANK: %s\n", strerror(errno));
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "FBIOBLANK: %s (Screen blanking not supported by vesafb of Linux Kernel)\n", strerror(errno));
return FALSE;
}
++++++ fix-dpi-values.diff ++++++
Index: hw/xfree86/common/xf86Helper.c
===================================================================
--- hw/xfree86/common/xf86Helper.c.orig
+++ hw/xfree86/common/xf86Helper.c
@@ -922,12 +922,22 @@ xf86SetDpi(ScrnInfoPtr pScrn, int x, int
else if (pScrn->widthmm > 0 || pScrn->heightmm > 0) {
from = X_CONFIG;
if (pScrn->widthmm > 0) {
- pScrn->xDpi =
- (int) ((double) pScrn->virtualX * MMPERINCH / pScrn->widthmm);
+ if (pScrn->modes && pScrn->modes->HDisplay > 0) {
+ pScrn->xDpi =
+ (int)((double) pScrn->modes->HDisplay * MMPERINCH / pScrn->widthmm);
+ } else {
+ pScrn->xDpi =
+ (int)((double)pScrn->virtualX * MMPERINCH / pScrn->widthmm);
+ }
}
if (pScrn->heightmm > 0) {
- pScrn->yDpi =
- (int) ((double) pScrn->virtualY * MMPERINCH / pScrn->heightmm);
+ if (pScrn->modes && pScrn->modes->VDisplay > 0) {
+ pScrn->yDpi =
+ (int)((double)pScrn->modes->VDisplay * MMPERINCH / pScrn->heightmm);
+ } else {
+ pScrn->yDpi =
+ (int)((double)pScrn->virtualY * MMPERINCH / pScrn->heightmm);
+ }
}
if (pScrn->xDpi > 0 && pScrn->yDpi <= 0)
pScrn->yDpi = pScrn->xDpi;
@@ -966,12 +976,22 @@ xf86SetDpi(ScrnInfoPtr pScrn, int x, int
pScrn->widthmm = ddcWidthmm;
pScrn->heightmm = ddcHeightmm;
if (pScrn->widthmm > 0) {
- pScrn->xDpi =
- (int) ((double) pScrn->virtualX * MMPERINCH / pScrn->widthmm);
+ if (pScrn->modes && pScrn->modes->HDisplay > 0) {
+ pScrn->xDpi =
+ (int)((double) pScrn->modes->HDisplay * MMPERINCH / pScrn->widthmm);
+ } else {
+ pScrn->xDpi =
+ (int)((double)pScrn->virtualX * MMPERINCH / pScrn->widthmm);
+ }
}
if (pScrn->heightmm > 0) {
- pScrn->yDpi =
- (int) ((double) pScrn->virtualY * MMPERINCH / pScrn->heightmm);
+ if (pScrn->modes && pScrn->modes->VDisplay > 0) {
+ pScrn->yDpi =
+ (int)((double)pScrn->modes->VDisplay * MMPERINCH / pScrn->heightmm);
+ } else {
+ pScrn->yDpi =
+ (int)((double)pScrn->virtualY * MMPERINCH / pScrn->heightmm);
+ }
}
if (pScrn->xDpi > 0 && pScrn->yDpi <= 0)
pScrn->yDpi = pScrn->xDpi;
++++++ fix_fglrx_screendepth_issue.patch ++++++
Index: hw/xfree86/common/xf86AutoConfig.c
===================================================================
--- hw/xfree86/common/xf86AutoConfig.c.orig
+++ hw/xfree86/common/xf86AutoConfig.c
@@ -75,6 +75,13 @@
"\tDevice\t" BUILTIN_DEVICE_NAME "\n" \
"EndSection\n\n"
+#define BUILTIN_SCREEN_SECTION_FOR_FGLRX \
+ "Section \"Screen\"\n" \
+ "\tIdentifier\t" BUILTIN_SCREEN_NAME "\n" \
+ "\tDevice\t" BUILTIN_DEVICE_NAME "\n" \
+ "\tDefaultDepth\t24\n" \
+ "EndSection\n\n"
+
#define BUILTIN_LAYOUT_SECTION_PRE \
"Section \"ServerLayout\"\n" \
"\tIdentifier\t\"Builtin Default Layout\"\n"
@@ -153,7 +160,10 @@ xf86AutoConfig(void)
for (p = deviceList; *p; p++) {
snprintf(buf, sizeof(buf), BUILTIN_DEVICE_SECTION, *p, 0, *p);
AppendToConfig(buf);
- snprintf(buf, sizeof(buf), BUILTIN_SCREEN_SECTION, *p, 0, *p, 0);
+ if( strcmp(*p, "fglrx") == 0 )
+ snprintf(buf, sizeof(buf), BUILTIN_SCREEN_SECTION_FOR_FGLRX, *p, 0, *p, 0);
+ else
+ snprintf(buf, sizeof(buf), BUILTIN_SCREEN_SECTION, *p, 0, *p, 0);
AppendToConfig(buf);
}
++++++ modprobe.nvidia ++++++
options nvidia NVreg_DeviceFileUID=0 NVreg_DeviceFileGID=33 NVreg_DeviceFileMode=0660
++++++ n_Xvnc-fix-use-after-free-in-rfbauthreenable.patch ++++++
Subject: Fix use after free in rfbAuthReenable.
Author: Michal Srb <msrb(a)suse.cz>
References: bnc#816813
Patch-Mainline: Never
rfbAuthReenable is accessing rfbClient structure that wass in most cases already freed.
It actually needs only ScreenPtr, so pass it directly.
diff -ur xorg-server-1.6.5.orig/hw/vnc/auth.c xorg-server-1.6.5/hw/vnc/auth.c
--- xorg-server-1.6.5.orig/hw/vnc/auth.c 2013-05-15 18:18:51.000000000 +0200
+++ xorg-server-1.6.5/hw/vnc/auth.c 2013-05-15 18:17:08.000000000 +0200
@@ -505,9 +505,8 @@
static CARD32
rfbAuthReenable(OsTimerPtr timer, CARD32 now, pointer arg)
{
- rfbClientPtr cl = (rfbClientPtr) arg;
- VNCSCREENPTR(cl->pScreen);
- (void)cl;
+ ScreenPtr pScreen = (ScreenPtr) arg;
+ VNCSCREENPTR(pScreen);
pVNC->rfbAuthTooManyTries = FALSE;
return 0;
}
@@ -529,7 +528,7 @@
CARD32 delay = AUTH_TOO_MANY_BASE_DELAY;
for (i = MAX_AUTH_TRIES; i < pVNC->rfbAuthTries; i++)
delay *= 2;
- pVNC->timer = TimerSet(pVNC->timer, 0, delay, rfbAuthReenable, cl);
+ pVNC->timer = TimerSet(pVNC->timer, 0, delay, rfbAuthReenable, cl->pScreen);
pVNC->rfbAuthTooManyTries = TRUE;
return TRUE;
}
++++++ p_default-module-path.diff ++++++
Index: hw/xfree86/common/xf86Globals.c
===================================================================
--- hw/xfree86/common/xf86Globals.c.orig
+++ hw/xfree86/common/xf86Globals.c
@@ -135,7 +135,7 @@ xf86InfoRec xf86Info = {
const char *xf86ConfigFile = NULL;
const char *xf86ConfigDir = NULL;
-const char *xf86ModulePath = DEFAULT_MODULE_PATH;
+const char *xf86ModulePath = DEFAULT_MODULE_PATH "/updates," DEFAULT_MODULE_PATH;
MessageType xf86ModPathFrom = X_DEFAULT;
const char *xf86LogFile = DEFAULT_LOGPREFIX;
MessageType xf86LogFileFrom = X_DEFAULT;
++++++ p_xnest-ignore-getimage-errors.diff ++++++
Index: xorg-server-1.12.1/hw/xnest/GCOps.c
===================================================================
--- xorg-server-1.12.1.orig/hw/xnest/GCOps.c
+++ xorg-server-1.12.1/hw/xnest/GCOps.c
@@ -94,15 +94,26 @@ xnestPutImage(DrawablePtr pDrawable, GCP
}
}
+static int
+xnestIgnoreErrorHandler (Display *display,
+ XErrorEvent *event)
+{
+ return False; /* return value is ignored */
+}
+
void
xnestGetImage(DrawablePtr pDrawable, int x, int y, int w, int h,
unsigned int format, unsigned long planeMask, char *pImage)
{
XImage *ximage;
int length;
+ int (*old_handler)(Display*, XErrorEvent*);
+ /* we may get BadMatch error when xnest window is minimized */
+ old_handler = XSetErrorHandler (xnestIgnoreErrorHandler);
ximage = XGetImage(xnestDisplay, xnestDrawable(pDrawable),
x, y, w, h, planeMask, format);
+ XSetErrorHandler (old_handler);
if (ximage) {
length = ximage->bytes_per_line * ximage->height;
++++++ pci-legacy-mem-fallback.diff ++++++
Index: hw/xfree86/os-support/bus/linuxPci.c
================================================================================
--- hw/xfree86/os-support/bus/linuxPci.c
+++ hw/xfree86/os-support/bus/linuxPci.c
@@ -397,6 +397,7 @@
* legacy_mem interface is unavailable.
*/
if ((Base > 1024*1024) || ((fd = linuxOpenLegacy(dev, "legacy_mem")) < 0))
+ fallback:
return linuxMapPci(ScreenNum, Flags, dev, Base, Size,
PCIIOC_MMAP_IS_MEM);
else
@@ -405,6 +406,8 @@
if (fd >= 0)
close(fd);
if (addr == NULL || addr == MAP_FAILED) {
+ if (errno == ENXIO)
+ goto fallback;
perror("mmap failure");
FatalError("xf86MapDomainMem(): mmap() failure\n");
}
++++++ pio_ia64.diff ++++++
Index: xorg-server-1.8.0/hw/xfree86/common/compiler.h
===================================================================
--- xorg-server-1.8.0.orig/hw/xfree86/common/compiler.h
+++ xorg-server-1.8.0/hw/xfree86/common/compiler.h
@@ -409,12 +409,18 @@ extern _X_EXPORT unsigned int inl(unsign
# undef inb
# undef inw
# undef inl
-extern _X_EXPORT void outb(unsigned long port, unsigned char val);
-extern _X_EXPORT void outw(unsigned long port, unsigned short val);
-extern _X_EXPORT void outl(unsigned long port, unsigned int val);
-extern _X_EXPORT unsigned int inb(unsigned long port);
-extern _X_EXPORT unsigned int inw(unsigned long port);
-extern _X_EXPORT unsigned int inl(unsigned long port);
+#define outb(p,v) outb_ia64(p,v)
+#define outw(p,v) outw_ia64(p,v)
+#define outl(p,v) outl_ia64(p,v)
+#define inb(p) inb_ia64(p)
+#define inw(p) inw_ia64(p)
+#define inl(p) inl_ia64(p)
+extern _X_EXPORT void outb_ia64(unsigned long port, unsigned char val);
+extern _X_EXPORT void outw_ia64(unsigned long port, unsigned short val);
+extern _X_EXPORT void outl_ia64(unsigned long port, unsigned int val);
+extern _X_EXPORT unsigned int inb_ia64(unsigned long port);
+extern _X_EXPORT unsigned int inw_ia64(unsigned long port);
+extern _X_EXPORT unsigned int inl_ia64(unsigned long port);
# elif (defined(linux) || defined(__FreeBSD__)) && defined(__amd64__)
Index: xorg-server-1.8.0/hw/xfree86/os-support/shared/ia64Pci.c
===================================================================
--- xorg-server-1.8.0.orig/hw/xfree86/os-support/shared/ia64Pci.c
+++ xorg-server-1.8.0/hw/xfree86/os-support/shared/ia64Pci.c
@@ -60,7 +60,7 @@ static int ia64_port_to_fd(unsigned long
return (port >> 24) & 0xffffffff;
}
-void outb(unsigned long port, unsigned char val)
+void outb_ia64(unsigned long port, unsigned char val)
{
int fd = ia64_port_to_fd(port);
@@ -80,7 +80,7 @@ void outb(unsigned long port, unsigned c
return;
}
-void outw(unsigned long port, unsigned short val)
+void outw_ia64(unsigned long port, unsigned short val)
{
int fd = ia64_port_to_fd(port);
@@ -100,7 +100,7 @@ void outw(unsigned long port, unsigned s
return;
}
-void outl(unsigned long port, unsigned int val)
+void outl_ia64(unsigned long port, unsigned int val)
{
int fd = ia64_port_to_fd(port);
@@ -120,7 +120,7 @@ void outl(unsigned long port, unsigned i
return;
}
-unsigned int inb(unsigned long port)
+unsigned int inb_ia64(unsigned long port)
{
int fd = ia64_port_to_fd(port);
unsigned char val;
@@ -142,7 +142,7 @@ unsigned int inb(unsigned long port)
return val;
}
-unsigned int inw(unsigned long port)
+unsigned int inw_ia64(unsigned long port)
{
int fd = ia64_port_to_fd(port);
unsigned short val;
@@ -164,7 +164,7 @@ unsigned int inw(unsigned long port)
return val;
}
-unsigned int inl(unsigned long port)
+unsigned int inl_ia64(unsigned long port)
{
int fd = ia64_port_to_fd(port);
unsigned int val;
++++++ pre_checkin.sh ++++++
#!/bin/sh
# pre_checking.sh
# Licensed under the same condition as the xorg-server.
# This script updates the .spec file (based on .spec.in) and inject versioned ABI Symbols from the X-Server,
# stored in a template file xorg-server-provides. The content of this file is verified during build, as the
# same script runs then again, extracting ABI versions from the source to be built. This ensures we can't
# publish a package with wrong ABI Versions being provided as part of the RPM Metadata.
# Driver-, Input and extension-packages are supposed to use the provided macros to ensure correct Requires.
# extract ABI Versions... this function is copied from configure.ac
extract_abi() {
grep ^.define.*${1}_VERSION ${xorg_src}/hw/xfree86/common/xf86Module.h | tr '(),' ' .' | awk '{ print $4$5 }'
}
if [ "$1" == "--tar" ]; then
tmpdir=$(mktemp -d)
tar xf "$2" -C ${tmpdir}
xorg_src=${tmpdir}/*
elif [ "$1" == "--verify" ]; then
xorg_src="$2"
prv_ext=".build"
else
echo "Wrong usage of this script"
echo "$0 can be started in two ways:"
echo "1: $0 --tar {xorg-server-xxxx.tar.bz2}"
echo "2: $0 --verify {source-folder}"
echo "Variant 1 creates the file xorg-server-provides to be included in the src rpm"
echo "Variant 2 is being called during build to ensure the ABI provides match the expectations."
echo ""
echo ""
echo "Trying to guess the right tarball"
sh $0 --tar xorg-server-*.tar.bz2
echo "... Please verify if the result makes sense"
exit 2
fi
abi_ansic=`extract_abi ANSIC`
abi_videodrv=`extract_abi VIDEODRV`
abi_xinput=`extract_abi XINPUT`
abi_extension=`extract_abi EXTENSION`
A="Provides: X11_ABI_XINPUT = ${abi_xinput}\nProvides: X11_ABI_VIDEODRV = ${abi_videodrv}\nProvides: X11_ABI_ANSIC = ${abi_ansic}\nProvides: X11_ABI_EXTENSION = ${abi_extension}"
echo -e $A > xorg-server-provides${prv_ext}
if [ "$1" == "--tar" ]; then
if [ -d ${tmpdir} ]; then
rm -rf ${tmpdir}
fi
elif [ "$1" == "--verify" ]; then
diff "$3" xorg-server-provides${prv_ext}
if [ $? -gt 0 ]; then
echo "The ABI verification failed... please run $0 before checking in"
exit 1
fi
fi
++++++ pu_fixes.diff ++++++
Index: hw/xfree86/xaa/xaaImage.c
===================================================================
--- hw/xfree86/xaa/xaaImage.c.orig
+++ hw/xfree86/xaa/xaaImage.c
@@ -240,6 +240,7 @@ XAAWritePixmap(ScrnInfoPtr pScrn, int x,
(*infoRec->SetupForImageWrite) (pScrn, rop, planemask, trans, bpp, depth);
(*infoRec->SubsequentImageWriteRect) (pScrn, x, y, w, h, skipleft);
+#if 0
if (beCareful) {
/* in cases with bad alignment we have to be careful not
to read beyond the end of the source */
@@ -248,6 +249,9 @@ XAAWritePixmap(ScrnInfoPtr pScrn, int x,
else
beCareful = FALSE;
}
+#endif
+ if (beCareful)
+ h--;
if (dwords > infoRec->ImageWriteRange) {
while (h--) {
++++++ randr1_1-sig11.diff ++++++
Index: xorg-server-1.12.1/hw/xfree86/common/xf86RandR.c
===================================================================
--- xorg-server-1.12.1.orig/hw/xfree86/common/xf86RandR.c
+++ xorg-server-1.12.1/hw/xfree86/common/xf86RandR.c
@@ -237,6 +237,9 @@ xf86RandRSetConfig(ScreenPtr pScreen,
DeviceIntPtr dev;
Bool view_adjusted = FALSE;
+ if (!scrp->vtSema)
+ return FALSE;
+
for (dev = inputInfo.devices; dev; dev = dev->next) {
if (!IsMaster(dev) && !IsFloating(dev))
continue;
++++++ sync-fix.patch ++++++
Index: xorg-server-1.12.1/Xext/sync.c
===================================================================
--- xorg-server-1.12.1.orig/Xext/sync.c
+++ xorg-server-1.12.1/Xext/sync.c
@@ -2615,9 +2615,43 @@ static XSyncValue *pIdleTimeValueGreater
static void
IdleTimeQueryValue(pointer pCounter, CARD64 * pValue_return)
{
- CARD32 idle = GetTimeInMillis() - lastDeviceEventTime.milliseconds;
+ static CARD32 previousLastDeviceEventTimeMilliseconds = 0;
+ CARD32 now = GetTimeInMillis();
+ CARD32 idle = now - lastDeviceEventTime.milliseconds;
+ CARD32 previousIdle = now - previousLastDeviceEventTimeMilliseconds;
+ SyncCounter *pIdleTimeCounter = (SyncCounter*)pCounter;
XSyncIntsToValue(pValue_return, idle, 0);
+ if (pCounter == NULL)
+ {
+ return;
+ }
+ if (previousLastDeviceEventTimeMilliseconds == 0)
+ {
+ /* initialize static var when this function is invoked the first time. */
+ previousLastDeviceEventTimeMilliseconds = lastDeviceEventTime.milliseconds;
+ return;
+ }
+
+ if (previousLastDeviceEventTimeMilliseconds == lastDeviceEventTime.milliseconds)
+ {
+ /* no new user event, no need to change idle counter. */
+ return;
+ }
+ previousLastDeviceEventTimeMilliseconds = lastDeviceEventTime.milliseconds;
+
+ /*
+ * Some user event occured; now update idle counter with previous
+ * event time, so idle counter has the most up-to-date value with
+ * respect to previous user event (we need old and new counter
+ * value to compute if a transition occured). Recompute bracket
+ * values if this is system counter.
+ */
+
+ XSyncIntsToValue (&pIdleTimeCounter->value, previousIdle, 0);
+ if (IsSystemCounter(pIdleTimeCounter)) {
+ SyncComputeBracketValues(pIdleTimeCounter);
+ }
}
static void
@@ -2700,7 +2734,7 @@ IdleTimeWakeupHandler(pointer env, int r
if (!pIdleTimeValueLess && !pIdleTimeValueGreater)
return;
- IdleTimeQueryValue(NULL, &idle);
+ IdleTimeQueryValue(IdleTimeCounter, &idle);
if ((pIdleTimeValueGreater &&
XSyncValueGreaterOrEqual(idle, *pIdleTimeValueGreater)) ||
++++++ sysconfig.displaymanager.template ++++++
## Type: string(Xorg)
## Path: Desktop/Display manager
## Default: "Xorg"
#
DISPLAYMANAGER_XSERVER="Xorg"
++++++ u_0001-glx-Fix-mishandling-of-shared-contexts.patch ++++++
>From 277985e545626c9a9bd82aafddac4f935d95a4e2 Mon Sep 17 00:00:00 2001
From: Ian Romanick <ian.d.romanick(a)intel.com>
Date: Mon, 5 Dec 2011 10:55:20 -0800
Subject: [PATCH 01/11] glx: Fix mishandling of shared contexts
Signed-off-by: Ian Romanick <ian.d.romanick(a)intel.com>
Reviewed-by: Eric Anholt <eric(a)anholt.net>
Reviewed-by: Christopher James Halse Rogers <christopher.halse.rogers(a)canonical.com>
---
glx/glxcmds.c | 22 +++++++++++-----------
1 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/glx/glxcmds.c b/glx/glxcmds.c
index 24fed8f..6fa10fe 100644
--- a/glx/glxcmds.c
+++ b/glx/glxcmds.c
@@ -251,20 +251,20 @@ DoCreateContext(__GLXclientState * cl, GLXContextID gcId,
&shareglxc, &err))
return err;
- if (shareglxc->isDirect) {
- /*
- ** NOTE: no support for sharing display lists between direct
- ** contexts, even if they are in the same address space.
- */
-#if 0
- /* Disabling this code seems to allow shared display lists
- * and texture objects to work. We'll leave it disabled for now.
- */
+ /* Page 26 (page 32 of the PDF) of the GLX 1.4 spec says:
+ *
+ * "The server context state for all sharing contexts must exist
+ * in a single address space or a BadMatch error is generated."
+ *
+ * If the share context is indirect, force the new context to also be
+ * indirect. If the shard context is direct but the new context
+ * cannot be direct, generate BadMatch.
+ */
+ if (shareglxc->isDirect && !isDirect) {
client->errorValue = shareList;
return BadMatch;
-#endif
}
- else {
+ else if (!shareglxc->isDirect) {
/*
** Create an indirect context regardless of what the client asked
** for; this way we can share display list space with shareList.
--
1.7.3.4
++++++ u_0002-glx-Don-t-track-GLClientmajorVersion-or-GLClientmino.patch ++++++
>From 2bbacf1fb21b98e8b9481931f131c176a0f78dc5 Mon Sep 17 00:00:00 2001
From: Ian Romanick <ian.d.romanick(a)intel.com>
Date: Fri, 2 Dec 2011 21:14:46 -0800
Subject: [PATCH 02/11] glx: Don't track GLClientmajorVersion or GLClientminorVersion
Nothing uses these fields anywhere in the server.
Signed-off-by: Ian Romanick <ian.d.romanick(a)intel.com>
Reviewed-by: Jesse Barnes <jbarnes(a)virtuousgeek.org>
Reviewed-by: Christopher James Halse Rogers <christopher.halse.rogers(a)canonical.com>
---
glx/glxcmds.c | 2 --
glx/glxext.c | 2 --
glx/glxserver.h | 2 --
3 files changed, 0 insertions(+), 6 deletions(-)
diff --git a/glx/glxcmds.c b/glx/glxcmds.c
index 6fa10fe..5c70afa 100644
--- a/glx/glxcmds.c
+++ b/glx/glxcmds.c
@@ -2396,8 +2396,6 @@ __glXDisp_ClientInfo(__GLXclientState * cl, GLbyte * pc)
if (!memchr(buf, 0, (client->req_len << 2) - sizeof(xGLXClientInfoReq)))
return BadLength;
- cl->GLClientmajorVersion = req->major;
- cl->GLClientminorVersion = req->minor;
free(cl->GLClientextensions);
cl->GLClientextensions = strdup(buf);
diff --git a/glx/glxext.c b/glx/glxext.c
index acd696e..599f029 100644
--- a/glx/glxext.c
+++ b/glx/glxext.c
@@ -281,8 +281,6 @@ glxClientCallback(CallbackListPtr *list, pointer closure, pointer data)
** By default, assume that the client supports
** GLX major version 1 minor version 0 protocol.
*/
- cl->GLClientmajorVersion = 1;
- cl->GLClientminorVersion = 0;
cl->client = pClient;
break;
diff --git a/glx/glxserver.h b/glx/glxserver.h
index 7076848..87c94d9 100644
--- a/glx/glxserver.h
+++ b/glx/glxserver.h
@@ -145,8 +145,6 @@ struct __GLXclientStateRec {
/* Back pointer to X client record */
ClientPtr client;
- int GLClientmajorVersion;
- int GLClientminorVersion;
char *GLClientextensions;
};
--
1.7.3.4
++++++ u_0003-glx-Extend-__GLXscreen-createContext-to-take-attribu.patch ++++++
>From 71a819742edf386ace3cfaacc7dfe24b00f5ff7e Mon Sep 17 00:00:00 2001
From: Ian Romanick <ian.d.romanick(a)intel.com>
Date: Mon, 5 Dec 2011 10:56:07 -0800
Subject: [PATCH 03/11] glx: Extend __GLXscreen::createContext to take attributes
The attributes will be used for glXCreateContextAttribsARB additions
in follow-on patches.
v2: Add missing 'int *error' parameters noticed by Christopher James
Halse Rogers.
v3: Remove redundant 'int err;' declaration noticed by Christopher
James Halse Rogers. This was supposed to be in v2, but I missed it.
Signed-off-by: Ian Romanick <ian.d.romanick(a)intel.com>
Reviewed-by: Jesse Barnes <jbarnes(a)virtuousgeek.org>
Reviewed-by: Christopher James Halse Rogers <christopher.halse.rogers(a)canonical.com>
---
glx/glxcmds.c | 10 ++++++++--
glx/glxdri.c | 12 +++++++++++-
glx/glxdri2.c | 5 ++++-
glx/glxdriswrast.c | 12 +++++++++++-
glx/glxscreens.h | 5 ++++-
5 files changed, 38 insertions(+), 6 deletions(-)
diff --git a/glx/glxcmds.c b/glx/glxcmds.c
index 5c70afa..308c14a 100644
--- a/glx/glxcmds.c
+++ b/glx/glxcmds.c
@@ -276,8 +276,14 @@ DoCreateContext(__GLXclientState * cl, GLXContextID gcId,
/*
** Allocate memory for the new context
*/
- if (!isDirect)
- glxc = pGlxScreen->createContext(pGlxScreen, config, shareglxc);
+ if (!isDirect) {
+ /* Without any attributes, the only error that the driver should be
+ * able to generate is BadAlloc. As result, just drop the error
+ * returned from the driver on the floor.
+ */
+ glxc = pGlxScreen->createContext(pGlxScreen, config, shareglxc,
+ 0, NULL, &err);
+ }
else
glxc = __glXdirectContextCreate(pGlxScreen, config, shareglxc);
if (!glxc) {
diff --git a/glx/glxdri.c b/glx/glxdri.c
index 9b8b66f..bc49f29 100644
--- a/glx/glxdri.c
+++ b/glx/glxdri.c
@@ -599,7 +599,10 @@ __glXDRIscreenDestroy(__GLXscreen * baseScreen)
static __GLXcontext *
__glXDRIscreenCreateContext(__GLXscreen * baseScreen,
__GLXconfig * glxConfig,
- __GLXcontext * baseShareContext)
+ __GLXcontext * baseShareContext,
+ unsigned num_attribs,
+ const uint32_t *attribs,
+ int *error)
{
__GLXDRIscreen *screen = (__GLXDRIscreen *) baseScreen;
__GLXDRIcontext *context, *shareContext;
@@ -611,6 +614,13 @@ __glXDRIscreenCreateContext(__GLXscreen * baseScreen,
drm_context_t hwContext;
ScreenPtr pScreen = baseScreen->pScreen;
+ /* DRI1 cannot support createContextAttribs, so these parameters will
+ * never be used.
+ */
+ (void) num_attribs;
+ (void) attribs;
+ (void) error;
+
shareContext = (__GLXDRIcontext *) baseShareContext;
if (shareContext)
driShare = shareContext->driContext;
diff --git a/glx/glxdri2.c b/glx/glxdri2.c
index aa38295..656b577 100644
--- a/glx/glxdri2.c
+++ b/glx/glxdri2.c
@@ -380,7 +380,10 @@ __glXDRIscreenDestroy(__GLXscreen * baseScreen)
static __GLXcontext *
__glXDRIscreenCreateContext(__GLXscreen * baseScreen,
__GLXconfig * glxConfig,
- __GLXcontext * baseShareContext)
+ __GLXcontext * baseShareContext,
+ unsigned num_attribs,
+ const uint32_t *attribs,
+ int *error)
{
__GLXDRIscreen *screen = (__GLXDRIscreen *) baseScreen;
__GLXDRIcontext *context, *shareContext;
diff --git a/glx/glxdriswrast.c b/glx/glxdriswrast.c
index c69b4d2..b478398 100644
--- a/glx/glxdriswrast.c
+++ b/glx/glxdriswrast.c
@@ -257,7 +257,10 @@ __glXDRIscreenDestroy(__GLXscreen * baseScreen)
static __GLXcontext *
__glXDRIscreenCreateContext(__GLXscreen * baseScreen,
__GLXconfig * glxConfig,
- __GLXcontext * baseShareContext)
+ __GLXcontext * baseShareContext,
+ unsigned num_attribs,
+ const uint32_t *attribs,
+ int *error)
{
__GLXDRIscreen *screen = (__GLXDRIscreen *) baseScreen;
__GLXDRIcontext *context, *shareContext;
@@ -265,6 +268,13 @@ __glXDRIscreenCreateContext(__GLXscreen * baseScreen,
const __DRIcoreExtension *core = screen->core;
__DRIcontext *driShare;
+ /* DRISWRAST won't support createContextAttribs, so these parameters will
+ * never be used.
+ */
+ (void) num_attribs;
+ (void) attribs;
+ (void) error;
+
shareContext = (__GLXDRIcontext *) baseShareContext;
if (shareContext)
driShare = shareContext->driContext;
diff --git a/glx/glxscreens.h b/glx/glxscreens.h
index d5420ee..7ef4657 100644
--- a/glx/glxscreens.h
+++ b/glx/glxscreens.h
@@ -117,7 +117,10 @@ struct __GLXscreen {
__GLXcontext *(*createContext) (__GLXscreen * screen,
__GLXconfig * modes,
- __GLXcontext * shareContext);
+ __GLXcontext * shareContext,
+ unsigned num_attribs,
+ const uint32_t *attribs,
+ int *error);
__GLXdrawable *(*createDrawable) (ClientPtr client,
__GLXscreen * context,
--
1.7.3.4
++++++ u_0004-glx-Add-tracking-for-GLX_ARB_create_context-and-GLX_.patch ++++++
>From e453ac810a2020d0b8a21f67bd0e4712558fd57b Mon Sep 17 00:00:00 2001
From: Ian Romanick <ian.d.romanick(a)intel.com>
Date: Mon, 5 Dec 2011 13:48:19 -0800
Subject: [PATCH 04/11] glx: Add tracking for GLX_ARB_create_context and GLX_ARB_create_context_profile
The formatting of the extension data table was mangled by indent.
This patch also undoes that and adds approripate control comments so
that indent won't do it again.
Signed-off-by: Ian Romanick <ian.d.romanick(a)intel.com>
Reviewed-by: Dave Airlie <airlied(a)redhat.com>
Reviewed-by: Christopher James Halse Rogers <christopher.halse.rogers(a)canonical.com>
---
glx/extension_string.c | 34 +++++++++++++++++++---------------
glx/extension_string.h | 4 +++-
2 files changed, 22 insertions(+), 16 deletions(-)
diff --git a/glx/extension_string.c b/glx/extension_string.c
index 866f8bf..6a1a6c6 100644
--- a/glx/extension_string.c
+++ b/glx/extension_string.c
@@ -67,23 +67,27 @@ struct extension_info {
static const struct extension_info known_glx_extensions[] = {
/* GLX_ARB_get_proc_address is implemented on the client. */
- {GLX(ARB_multisample), VER(1, 4), Y,},
-
- {GLX(EXT_import_context), VER(0, 0), Y,},
- {GLX(EXT_texture_from_pixmap), VER(0, 0), Y,},
- {GLX(EXT_visual_info), VER(0, 0), Y,},
- {GLX(EXT_visual_rating), VER(0, 0), Y,},
-
- {GLX(MESA_copy_sub_buffer), VER(0, 0), N,},
- {GLX(OML_swap_method), VER(0, 0), Y,},
- {GLX(SGI_make_current_read), VER(1, 3), N,},
- {GLX(SGI_swap_control), VER(0, 0), N,},
- {GLX(SGIS_multisample), VER(0, 0), Y,},
- {GLX(SGIX_fbconfig), VER(1, 3), Y,},
- {GLX(SGIX_pbuffer), VER(1, 3), Y,},
- {GLX(SGIX_visual_select_group), VER(0, 0), Y,},
- {GLX(INTEL_swap_event), VER(1, 4), N,},
- {NULL}
+ /* *INDENT-OFF* */
+ { GLX(ARB_create_context), VER(0,0), N, },
+ { GLX(ARB_create_context_profile), VER(0,0), N, },
+ { GLX(ARB_multisample), VER(1,4), Y, },
+
+ { GLX(EXT_import_context), VER(0,0), Y, },
+ { GLX(EXT_texture_from_pixmap), VER(0,0), Y, },
+ { GLX(EXT_visual_info), VER(0,0), Y, },
+ { GLX(EXT_visual_rating), VER(0,0), Y, },
+
+ { GLX(MESA_copy_sub_buffer), VER(0,0), N, },
+ { GLX(OML_swap_method), VER(0,0), Y, },
+ { GLX(SGI_make_current_read), VER(1,3), N, },
+ { GLX(SGI_swap_control), VER(0,0), N, },
+ { GLX(SGIS_multisample), VER(0,0), Y, },
+ { GLX(SGIX_fbconfig), VER(1,3), Y, },
+ { GLX(SGIX_pbuffer), VER(1,3), Y, },
+ { GLX(SGIX_visual_select_group), VER(0,0), Y, },
+ { GLX(INTEL_swap_event), VER(1,4), N, },
+ { NULL }
+ /* *INDENT-ON* */
};
/**
diff --git a/glx/extension_string.h b/glx/extension_string.h
index e02213f..947bf89 100644
--- a/glx/extension_string.h
+++ b/glx/extension_string.h
@@ -36,7 +36,9 @@
enum {
/* GLX_ARB_get_proc_address is implemented on the client. */
- ARB_multisample_bit = 0,
+ ARB_create_context_bit = 0,
+ ARB_create_context_profile_bit,
+ ARB_multisample_bit,
EXT_import_context_bit,
EXT_texture_from_pixmap_bit,
EXT_visual_info_bit,
--
1.7.3.4
++++++ u_0005-glx-Optionally-call-DRI2-createContextAttribs-from-_.patch ++++++
>From 228d954789f97baf230c97c29a515abb8fd4b6d1 Mon Sep 17 00:00:00 2001
From: Ian Romanick <ian.d.romanick(a)intel.com>
Date: Mon, 5 Dec 2011 13:52:01 -0800
Subject: [PATCH 05/11] glx: Optionally call DRI2 createContextAttribs from __glXDRIscreenCreateContext
Signed-off-by: Ian Romanick <ian.d.romanick(a)intel.com>
Reviewed-by: Christopher James Halse Rogers <christopher.halse.rogers(a)canonical.com>
---
glx/glxdri2.c | 156 +++++++++++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 151 insertions(+), 5 deletions(-)
diff --git a/glx/glxdri2.c b/glx/glxdri2.c
index 656b577..ba09cbd 100644
--- a/glx/glxdri2.c
+++ b/glx/glxdri2.c
@@ -47,6 +47,7 @@
#include "glxserver.h"
#include "glxutil.h"
#include "glxdricommon.h"
+#include <GL/glxtokens.h>
#include "glapitable.h"
#include "glapi.h"
@@ -377,6 +378,143 @@ __glXDRIscreenDestroy(__GLXscreen * baseScreen)
free(screen);
}
+static Bool
+dri2_convert_glx_attribs(unsigned num_attribs, const uint32_t *attribs,
+ unsigned *major_ver, unsigned *minor_ver,
+ uint32_t *flags, unsigned *error)
+{
+ unsigned i;
+
+ if (num_attribs == 0)
+ return True;
+
+ if (attribs == NULL) {
+ *error = BadImplementation;
+ return False;
+ }
+
+ *major_ver = 1;
+ *minor_ver = 0;
+
+ for (i = 0; i < num_attribs; i++) {
+ switch (attribs[i * 2]) {
+ case GLX_CONTEXT_MAJOR_VERSION_ARB:
+ *major_ver = attribs[i * 2 + 1];
+ break;
+ case GLX_CONTEXT_MINOR_VERSION_ARB:
+ *minor_ver = attribs[i * 2 + 1];
+ break;
+ case GLX_CONTEXT_FLAGS_ARB:
+ *flags = attribs[i * 2 + 1];
+ break;
+ case GLX_RENDER_TYPE:
+ break;
+ default:
+ /* If an unknown attribute is received, fail.
+ */
+ *error = BadValue;
+ return False;
+ }
+ }
+
+ /* Unknown flag value.
+ */
+ if (*flags & ~(__DRI_CTX_FLAG_DEBUG | __DRI_CTX_FLAG_FORWARD_COMPATIBLE)) {
+ *error = BadValue;
+ return False;
+ }
+
+ *error = Success;
+ return True;
+}
+
+static void
+create_driver_context(__GLXDRIcontext * context,
+ __GLXDRIscreen * screen,
+ __GLXDRIconfig * config,
+ __DRIcontext * driShare,
+ unsigned num_attribs,
+ const uint32_t *attribs,
+ int *error)
+{
+ context->driContext = NULL;
+
+#if __DRI_DRI2_VERSION >= 3
+ if (screen->dri2->base.version >= 3) {
+ uint32_t ctx_attribs[3 * 2];
+ unsigned num_ctx_attribs = 0;
+ unsigned dri_err = 0;
+ unsigned major_ver;
+ unsigned minor_ver;
+ uint32_t flags;
+
+ if (num_attribs != 0) {
+ if (!dri2_convert_glx_attribs(num_attribs, attribs,
+ &major_ver, &minor_ver,
+ &flags, (unsigned *) error))
+ return NULL;
+
+ ctx_attribs[num_ctx_attribs++] = __DRI_CTX_ATTRIB_MAJOR_VERSION;
+ ctx_attribs[num_ctx_attribs++] = major_ver;
+ ctx_attribs[num_ctx_attribs++] = __DRI_CTX_ATTRIB_MINOR_VERSION;
+ ctx_attribs[num_ctx_attribs++] = minor_ver;
+
+ if (flags != 0) {
+ ctx_attribs[num_ctx_attribs++] = __DRI_CTX_ATTRIB_FLAGS;
+
+ /* The current __DRI_CTX_FLAG_* values are identical to the
+ * GLX_CONTEXT_*_BIT values.
+ */
+ ctx_attribs[num_ctx_attribs++] = flags;
+ }
+ }
+
+ context->driContext =
+ (*screen->dri2->createContextAttribs)(screen->driScreen,
+ __DRI_API_OPENGL,
+ config->driConfig,
+ driShare,
+ num_ctx_attribs / 2,
+ ctx_attribs,
+ &dri_err,
+ context);
+
+ switch (dri_err) {
+ case __DRI_CTX_ERROR_SUCCESS:
+ *error = Success;
+ break;
+ case __DRI_CTX_ERROR_NO_MEMORY:
+ *error = BadAlloc;
+ break;
+ case __DRI_CTX_ERROR_BAD_API:
+ *error = __glXError(GLXBadProfileARB);
+ break;
+ case __DRI_CTX_ERROR_BAD_VERSION:
+ case __DRI_CTX_ERROR_BAD_FLAG:
+ *error = __glXError(GLXBadFBConfig);
+ break;
+ case __DRI_CTX_ERROR_UNKNOWN_ATTRIBUTE:
+ case __DRI_CTX_ERROR_UNKNOWN_FLAG:
+ default:
+ *error = BadValue;
+ break;
+ }
+
+ return;
+ }
+#endif
+
+ if (num_attribs != 0) {
+ *error = BadValue;
+ return;
+ }
+
+ context->driContext =
+ (*screen->dri2->createNewContext) (screen->driScreen,
+ config->driConfig,
+ driShare, context);
+}
+
static __GLXcontext *
__glXDRIscreenCreateContext(__GLXscreen * baseScreen,
__GLXconfig * glxConfig,
@@ -397,8 +535,10 @@ __glXDRIscreenCreateContext(__GLXscreen * baseScreen,
driShare = NULL;
context = calloc(1, sizeof *context);
- if (context == NULL)
+ if (context == NULL) {
+ *error = BadAlloc;
return NULL;
+ }
context->base.destroy = __glXDRIcontextDestroy;
context->base.makeCurrent = __glXDRIcontextMakeCurrent;
@@ -407,10 +547,8 @@ __glXDRIscreenCreateContext(__GLXscreen * baseScreen,
context->base.textureFromPixmap = &__glXDRItextureFromPixmap;
context->base.wait = __glXDRIcontextWait;
- context->driContext =
- (*screen->dri2->createNewContext) (screen->driScreen,
- config->driConfig,
- driShare, context);
+ create_driver_context(context, screen, config, driShare, num_attribs,
+ attribs, error);
if (context->driContext == NULL) {
free(context);
return NULL;
@@ -646,6 +784,14 @@ initializeExtensions(__GLXDRIscreen * screen)
__glXEnableExtension(screen->glx_enable_bits, "GLX_INTEL_swap_event");
LogMessage(X_INFO, "AIGLX: enabled GLX_INTEL_swap_event\n");
+#if __DRI_DRI2_VERSION >= 3
+ if (screen->dri2->base.version >= 3) {
+ __glXEnableExtension(screen->glx_enable_bits,
+ "GLX_ARB_create_context");
+ LogMessage(X_INFO, "AIGLX: enabled GLX_ARB_create_context\n");
+ }
+#endif
+
if (DRI2HasSwapControl(pScreen)) {
__glXEnableExtension(screen->glx_enable_bits, "GLX_SGI_swap_control");
__glXEnableExtension(screen->glx_enable_bits, "GLX_MESA_swap_control");
--
1.7.3.4
++++++ u_0006-glx-Implement-GLX-SetClientInfoARB-protocol.patch ++++++
>From 975f069a92f8bd85f9d0ce4916f2c1c4a3cea339 Mon Sep 17 00:00:00 2001
From: Ian Romanick <ian.d.romanick(a)intel.com>
Date: Fri, 9 Dec 2011 17:28:21 -0800
Subject: [PATCH 06/11] glx: Implement GLX SetClientInfoARB protocol
v2: Bump glproto version to 1.4.15. This patch uses structure names
that only exist in that glproto version and later. Noticed by
Christopher James Halse Rogers.
Signed-off-by: Ian Romanick <ian.d.romanick(a)intel.com>
Reviewed-by: Dave Airlie <airlied(a)redhat.com>
Reviewed-by: Christopher James Halse Rogers <christopher.halse.rogers(a)canonical.com>
---
configure.ac | 2 +-
glx/clientinfo.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++--
2 files changed, 48 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
index 6a41ea8..de7526f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -777,7 +777,7 @@ DRI2PROTO="dri2proto >= 2.6"
XINERAMAPROTO="xineramaproto"
BIGFONTPROTO="xf86bigfontproto >= 1.2.0"
DGAPROTO="xf86dgaproto >= 2.0.99.1"
-GLPROTO="glproto >= 1.4.14"
+GLPROTO="glproto >= 1.4.15"
DMXPROTO="dmxproto >= 2.2.99.1"
VIDMODEPROTO="xf86vidmodeproto >= 2.2.99.1"
WINDOWSWMPROTO="windowswmproto"
diff --git a/glx/clientinfo.c b/glx/clientinfo.c
index 15bbf15..b26ac1a 100644
--- a/glx/clientinfo.c
+++ b/glx/clientinfo.c
@@ -26,17 +26,62 @@
#include "glxserver.h"
#include "indirect_dispatch.h"
+#include "glxbyteorder.h"
+#include "unpack.h"
int
__glXDisp_SetClientInfoARB(__GLXclientState * cl, GLbyte * pc)
{
- return BadRequest;
+ xGLXSetClientInfoARBReq *req = (xGLXSetClientInfoARBReq *) pc;
+ char *gl_extensions;
+ char *glx_extensions;
+
+ /* Verify that the size of the packet matches the size inferred from the
+ * sizes specified for the various fields.
+ */
+ const unsigned expected_size = sz_xGLXSetClientInfoARBReq
+ + (req->numVersions * 8)
+ + __GLX_PAD(req->numGLExtensionBytes)
+ + __GLX_PAD(req->numGLXExtensionBytes);
+
+ if (req->length != (expected_size / 4))
+ return BadLength;
+
+ /* Verify that the actual length of the GL extension string matches what's
+ * encoded in protocol packet.
+ */
+ gl_extensions = (char *) (req + 1) + (req->numVersions * 8);
+ if (req->numGLExtensionBytes != 0
+ && memchr(gl_extensions, 0,
+ __GLX_PAD(req->numGLExtensionBytes)) == NULL)
+ return BadLength;
+
+ /* Verify that the actual length of the GLX extension string matches
+ * what's encoded in protocol packet.
+ */
+ glx_extensions = gl_extensions + __GLX_PAD(req->numGLExtensionBytes);
+ if (req->numGLXExtensionBytes != 0
+ && memchr(glx_extensions, 0,
+ __GLX_PAD(req->numGLXExtensionBytes)) == NULL)
+ return BadLength;
+
+ free(cl->GLClientextensions);
+ cl->GLClientextensions = strdup(gl_extensions);
+
+ return 0;
}
int
__glXDispSwap_SetClientInfoARB(__GLXclientState * cl, GLbyte * pc)
{
- return BadRequest;
+ xGLXSetClientInfoARBReq *req = (xGLXSetClientInfoARBReq *) pc;
+
+ req->length = bswap_16(req->length);
+ req->numVersions = bswap_32(req->numVersions);
+ req->numGLExtensionBytes = bswap_32(req->numGLExtensionBytes);
+ req->numGLXExtensionBytes = bswap_32(req->numGLXExtensionBytes);
+
+ return __glXDisp_SetClientInfoARB(cl, pc);
}
int
--
1.7.3.4
++++++ u_0007-glx-Initialize-all-context-fields-together.patch ++++++
>From 232ab8f5869905e7a8eb736b4625366c9f316e9c Mon Sep 17 00:00:00 2001
From: Ian Romanick <ian.d.romanick(a)intel.com>
Date: Sat, 10 Dec 2011 15:09:57 -0800
Subject: [PATCH 07/11] glx: Initialize all context fields together
v2: Fix whitespace error noticed by Christopher James Halse Rogers.
Signed-off-by: Ian Romanick <ian.d.romanick(a)intel.com>
Reviewed-by: Jesse Barnes <jbarnes(a)virtuousgeek.org>
Reviewed-by: Christopher James Halse Rogers <christopher.halse.rogers(a)canonical.com>
---
glx/glxcmds.c | 26 +++++++++-----------------
1 files changed, 9 insertions(+), 17 deletions(-)
diff --git a/glx/glxcmds.c b/glx/glxcmds.c
index 308c14a..571ae50 100644
--- a/glx/glxcmds.c
+++ b/glx/glxcmds.c
@@ -290,26 +290,10 @@ DoCreateContext(__GLXclientState * cl, GLXContextID gcId,
return BadAlloc;
}
- /*
- ** Initially, setup the part of the context that could be used by
- ** a GL core that needs windowing information (e.g., Mesa).
+ /* Initialize the GLXcontext structure.
*/
glxc->pGlxScreen = pGlxScreen;
glxc->config = config;
-
- /*
- ** Register this context as a resource.
- */
- if (!AddResource(gcId, __glXContextRes, (pointer) glxc)) {
- (*glxc->destroy) (glxc);
- client->errorValue = gcId;
- return BadAlloc;
- }
-
- /*
- ** Finally, now that everything is working, setup the rest of the
- ** context.
- */
glxc->id = gcId;
glxc->share_id = shareList;
glxc->idExists = GL_TRUE;
@@ -317,6 +301,14 @@ DoCreateContext(__GLXclientState * cl, GLXContextID gcId,
glxc->isDirect = isDirect;
glxc->renderMode = GL_RENDER;
+ /* Register this context as a resource.
+ */
+ if (!AddResource(gcId, __glXContextRes, (pointer)glxc)) {
+ (*glxc->destroy) (glxc);
+ client->errorValue = gcId;
+ return BadAlloc;
+ }
+
__glXAddToContextList(glxc);
return Success;
--
1.7.3.4
++++++ u_0008-glx-Initialize-remaining-context-fields.patch ++++++
>From e18884c868215b5dabc1f2fac73dd9c763074394 Mon Sep 17 00:00:00 2001
From: Ian Romanick <ian.d.romanick(a)intel.com>
Date: Sat, 10 Dec 2011 15:11:57 -0800
Subject: [PATCH 08/11] glx: Initialize remaining context fields
There is no reason to assume the screen's context allocated
initialized these fields, so don't.
Signed-off-by: Ian Romanick <ian.d.romanick(a)intel.com>
Reviewed-by: Jesse Barnes <jbarnes(a)virtuousgeek.org>
Reviewed-by: Christopher James Halse Rogers <christopher.halse.rogers(a)canonical.com>
---
glx/glxcmds.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/glx/glxcmds.c b/glx/glxcmds.c
index 571ae50..8a9a1d3 100644
--- a/glx/glxcmds.c
+++ b/glx/glxcmds.c
@@ -299,7 +299,14 @@ DoCreateContext(__GLXclientState * cl, GLXContextID gcId,
glxc->idExists = GL_TRUE;
glxc->isCurrent = GL_FALSE;
glxc->isDirect = isDirect;
+ glxc->hasUnflushedCommands = GL_FALSE;
glxc->renderMode = GL_RENDER;
+ glxc->feedbackBuf = NULL;
+ glxc->feedbackBufSize = 0;
+ glxc->selectBuf = NULL;
+ glxc->selectBufSize = 0;
+ glxc->drawPriv = NULL;
+ glxc->readPriv = NULL;
/* Register this context as a resource.
*/
--
1.7.3.4
++++++ u_0009-glx-Use-one-function-to-add-a-context-to-all-global-.patch ++++++
>From 660e48e6c6a9df08655c286ac3a9ffa45eb44c26 Mon Sep 17 00:00:00 2001
From: Ian Romanick <ian.d.romanick(a)intel.com>
Date: Sat, 10 Dec 2011 15:15:18 -0800
Subject: [PATCH 09/11] glx: Use one function to add a context to all global tables
Instead of having separate __glXAddContextToList and AddResource
functions, just have one function that does both steps.
Signed-off-by: Ian Romanick <ian.d.romanick(a)intel.com>
Reviewed-by: Jesse Barnes <jbarnes(a)virtuousgeek.org>
Reviewed-by: Christopher James Halse Rogers <christopher.halse.rogers(a)canonical.com>
---
glx/glxcmds.c | 6 ++----
glx/glxext.c | 11 +++++++++--
glx/glxext.h | 2 +-
3 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/glx/glxcmds.c b/glx/glxcmds.c
index 8a9a1d3..d9d2201 100644
--- a/glx/glxcmds.c
+++ b/glx/glxcmds.c
@@ -308,16 +308,14 @@ DoCreateContext(__GLXclientState * cl, GLXContextID gcId,
glxc->drawPriv = NULL;
glxc->readPriv = NULL;
- /* Register this context as a resource.
+ /* Add the new context to the various global tables of GLX contexts.
*/
- if (!AddResource(gcId, __glXContextRes, (pointer)glxc)) {
+ if (!__glXAddContext(glxc)) {
(*glxc->destroy) (glxc);
client->errorValue = gcId;
return BadAlloc;
}
- __glXAddToContextList(glxc);
-
return Success;
}
diff --git a/glx/glxext.c b/glx/glxext.c
index 599f029..8d168d8 100644
--- a/glx/glxext.c
+++ b/glx/glxext.c
@@ -157,11 +157,18 @@ DrawableGone(__GLXdrawable * glxPriv, XID xid)
return True;
}
-void
-__glXAddToContextList(__GLXcontext * cx)
+Bool
+__glXAddContext(__GLXcontext * cx)
{
+ /* Register this context as a resource.
+ */
+ if (!AddResource(cx->id, __glXContextRes, (pointer)cx)) {
+ return False;
+ }
+
cx->next = glxAllContexts;
glxAllContexts = cx;
+ return True;
}
static void
diff --git a/glx/glxext.h b/glx/glxext.h
index 7cd5cb4..9b0978b 100644
--- a/glx/glxext.h
+++ b/glx/glxext.h
@@ -38,7 +38,7 @@
extern GLboolean __glXFreeContext(__GLXcontext * glxc);
extern void __glXFlushContextCache(void);
-extern void __glXAddToContextList(__GLXcontext * cx);
+extern Bool __glXAddContext(__GLXcontext * cx);
extern void __glXErrorCallBack(GLenum code);
extern void __glXClearErrorOccured(void);
extern GLboolean __glXErrorOccured(void);
--
1.7.3.4
++++++ u_0010-glx-Make-several-functions-available-outside-the-glx.patch ++++++
>From ce0cf92a76cb220a89b10b8f6b0a57c5cf69a97f Mon Sep 17 00:00:00 2001
From: Ian Romanick <ian.d.romanick(a)intel.com>
Date: Fri, 16 Dec 2011 14:42:51 -0800
Subject: [PATCH 10/11] glx: Make several functions available outside the glxcmds.c compilation unit
validGlxScreen, validGlxFBConfig, validGlxContext, and
__glXdirectContextCreate will soon be used by createcontext.c.
Signed-off-by: Ian Romanick <ian.d.romanick(a)intel.com>
Reviewed-by: Dave Airlie <airlied(a)redhat.com>
Reviewed-by: Christopher James Halse Rogers <christopher.halse.rogers(a)canonical.com>
---
glx/glxcmds.c | 8 ++++----
glx/glxcontext.h | 13 +++++++++++++
2 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/glx/glxcmds.c b/glx/glxcmds.c
index d9d2201..d483bbf 100644
--- a/glx/glxcmds.c
+++ b/glx/glxcmds.c
@@ -50,7 +50,7 @@
#include "indirect_table.h"
#include "indirect_util.h"
-static int
+_X_HIDDEN int
validGlxScreen(ClientPtr client, int screen, __GLXscreen ** pGlxScreen,
int *err)
{
@@ -67,7 +67,7 @@ validGlxScreen(ClientPtr client, int screen, __GLXscreen ** pGlxScreen,
return TRUE;
}
-static int
+_X_HIDDEN int
validGlxFBConfig(ClientPtr client, __GLXscreen * pGlxScreen, XID id,
__GLXconfig ** config, int *err)
{
@@ -131,7 +131,7 @@ validGlxFBConfigForWindow(ClientPtr client, __GLXconfig * config,
return TRUE;
}
-static int
+_X_HIDDEN int
validGlxContext(ClientPtr client, XID id, int access_mode,
__GLXcontext ** context, int *err)
{
@@ -200,7 +200,7 @@ __glXdirectContextDestroy(__GLXcontext * context)
free(context);
}
-static __GLXcontext *
+_X_HIDDEN __GLXcontext *
__glXdirectContextCreate(__GLXscreen * screen,
__GLXconfig * modes, __GLXcontext * shareContext)
{
diff --git a/glx/glxcontext.h b/glx/glxcontext.h
index ef2c4db..b803a7f 100644
--- a/glx/glxcontext.h
+++ b/glx/glxcontext.h
@@ -121,4 +121,17 @@ struct __GLXcontext {
void __glXContextDestroy(__GLXcontext * context);
+extern int validGlxScreen(ClientPtr client, int screen,
+ __GLXscreen ** pGlxScreen, int *err);
+
+extern int validGlxFBConfig(ClientPtr client, __GLXscreen * pGlxScreen,
+ XID id, __GLXconfig ** config, int *err);
+
+extern int validGlxContext(ClientPtr client, XID id, int access_mode,
+ __GLXcontext ** context, int *err);
+
+extern __GLXcontext *__glXdirectContextCreate(__GLXscreen * screen,
+ __GLXconfig * modes,
+ __GLXcontext * shareContext);
+
#endif /* !__GLX_context_h__ */
--
1.7.3.4
++++++ u_0011-glx-Implement-protocol-for-glXCreateContextAttribsAR.patch ++++++
>From feae6434d2653bcfcaf617932c1b4893d51a1ef4 Mon Sep 17 00:00:00 2001
From: Ian Romanick <ian.d.romanick(a)intel.com>
Date: Fri, 16 Dec 2011 14:44:55 -0800
Subject: [PATCH 11/11] glx: Implement protocol for glXCreateContextAttribsARB
Signed-off-by: Ian Romanick <ian.d.romanick(a)intel.com>
Reviewed-by: Dave Airlie <airlied(a)redhat.com>
Reviewed-by: Christopher James Halse Rogers <christopher.halse.rogers(a)canonical.com>
---
glx/createcontext.c | 213 ++++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 212 insertions(+), 1 deletions(-)
diff --git a/glx/createcontext.c b/glx/createcontext.c
index 9c1eab3..025c423 100644
--- a/glx/createcontext.c
+++ b/glx/createcontext.c
@@ -24,13 +24,224 @@
#include <dix-config.h>
#endif
+#include <GL/glxtokens.h>
#include "glxserver.h"
+#include "glxext.h"
#include "indirect_dispatch.h"
+#define ALL_VALID_FLAGS \
+ (GLX_CONTEXT_DEBUG_BIT_ARB | GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB)
+
+static Bool
+validate_GL_version(int major_version, int minor_version)
+{
+ if (major_version <= 0 || minor_version < 0)
+ return False;
+
+ switch (major_version) {
+ case 1:
+ if (minor_version > 5)
+ return False;
+ break;
+
+ case 2:
+ if (minor_version > 1)
+ return False;
+ break;
+
+ case 3:
+ if (minor_version > 3)
+ return False;
+ break;
+
+ default:
+ break;
+ }
+
+ return True;
+}
+
+static Bool
+validate_render_type(uint32_t render_type)
+{
+ switch (render_type) {
+ case GLX_RGBA_TYPE:
+ case GLX_COLOR_INDEX_TYPE:
+ return True;
+ default:
+ return False;
+ }
+}
+
int
__glXDisp_CreateContextAttribsARB(__GLXclientState * cl, GLbyte * pc)
{
- return BadRequest;
+ ClientPtr client = cl->client;
+ xGLXCreateContextAttribsARBReq *req = (xGLXCreateContextAttribsARBReq *) pc;
+ int32_t *attribs = (req->numAttribs != 0) ? (int32_t *) (req + 1) : NULL;
+ unsigned i;
+ int major_version = 1;
+ int minor_version = 0;
+ uint32_t flags = 0;
+ uint32_t render_type = GLX_RGBA_TYPE;
+ __GLXcontext *ctx = NULL;
+ __GLXcontext *shareCtx = NULL;
+ __GLXscreen *glxScreen;
+ __GLXconfig *config;
+ int err;
+
+ /* Verify that the size of the packet matches the size inferred from the
+ * sizes specified for the various fields.
+ */
+ const unsigned expected_size = (sz_xGLXCreateContextAttribsARBReq
+ + (req->numAttribs * 8)) / 4;
+
+ if (req->length != expected_size)
+ return BadLength;
+
+ LEGAL_NEW_RESOURCE(req->context, client);
+
+ /* The GLX_ARB_create_context spec says:
+ *
+ * "* If <config> is not a valid GLXFBConfig, GLXBadFBConfig is
+ * generated."
+ *
+ * On the client, the screen comes from the FBConfig, so GLXBadFBConfig
+ * should be issued if the screen is nonsense.
+ */
+ if (!validGlxScreen(client, req->screen, &glxScreen, &err))
+ return __glXError(GLXBadFBConfig);
+
+ if (!validGlxFBConfig(client, glxScreen, req->fbconfig, &config, &err))
+ return __glXError(GLXBadFBConfig);
+
+ /* Validate the context with which the new context should share resources.
+ */
+ if (req->shareList != None) {
+ if (!validGlxContext(client, req->shareList, DixReadAccess,
+ &shareCtx, &err))
+ return err;
+
+ /* The crazy condition is because C doesn't have a logical XOR
+ * operator. Comparing directly for equality may fail if one is 1 and
+ * the other is 2 even though both are logically true.
+ */
+ if (!!req->isDirect != !!shareCtx->isDirect) {
+ client->errorValue = req->shareList;
+ return BadMatch;
+ }
+
+ /* The GLX_ARB_create_context spec says:
+ *
+ * "* If the server context state for <share_context>...was
+ * created on a different screen than the one referenced by
+ * <config>...BadMatch is generated."
+ */
+ if (glxScreen != shareCtx->pGlxScreen) {
+ client->errorValue = shareCtx->pGlxScreen->pScreen->myNum;
+ return BadMatch;
+ }
+ }
+
+ for (i = 0; i < req->numAttribs; i++) {
+ switch (attribs[i * 2]) {
+ case GLX_CONTEXT_MAJOR_VERSION_ARB:
+ major_version = attribs[2 * i + 1];
+ break;
+
+ case GLX_CONTEXT_MINOR_VERSION_ARB:
+ minor_version = attribs[2 * i + 1];
+ break;
+
+ case GLX_CONTEXT_FLAGS_ARB:
+ flags = attribs[2 * i + 1];
+ break;
+
+ case GLX_RENDER_TYPE:
+ render_type = attribs[2 * i + 1];
+ break;
+
+ default:
+ return BadValue;
+ }
+ }
+
+ /* The GLX_ARB_create_context spec says:
+ *
+ * "If attributes GLX_CONTEXT_MAJOR_VERSION_ARB and
+ * GLX_CONTEXT_MINOR_VERSION_ARB, when considered together
+ * with attributes GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB and
+ * GLX_RENDER_TYPE, specify an OpenGL version and feature set
+ * that are not defined, BadMatch is generated.
+ *
+ * ...Feature deprecation was introduced with OpenGL 3.0, so
+ * forward-compatible contexts may only be requested for
+ * OpenGL 3.0 and above. Thus, examples of invalid
+ * combinations of attributes include:
+ *
+ * - Major version < 1 or > 3
+ * - Major version == 1 and minor version < 0 or > 5
+ * - Major version == 2 and minor version < 0 or > 1
+ * - Major version == 3 and minor version > 2
+ * - Forward-compatible flag set and major version < 3
+ * - Color index rendering and major version >= 3"
+ */
+ if (!validate_GL_version(major_version, minor_version))
+ return BadMatch;
+
+ if (major_version < 3
+ && ((flags & GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB) != 0))
+ return BadMatch;
+
+ if (major_version >= 3 && render_type == GLX_COLOR_INDEX_TYPE)
+ return BadMatch;
+
+ if (!validate_render_type(render_type))
+ return BadValue;
+
+ if ((flags & ~ALL_VALID_FLAGS) != 0)
+ return BadValue;
+
+ /* Allocate memory for the new context
+ */
+ if (req->isDirect) {
+ ctx = __glXdirectContextCreate(glxScreen, config, shareCtx);
+ err = BadAlloc;
+ }
+ else {
+ ctx = glxScreen->createContext(glxScreen, config, shareCtx,
+ req->numAttribs, (uint32_t *) attribs,
+ &err);
+ }
+
+ if (ctx == NULL)
+ return err;
+
+ ctx->pGlxScreen = glxScreen;
+ ctx->config = config;
+ ctx->id = req->context;
+ ctx->share_id = req->shareList;
+ ctx->idExists = True;
+ ctx->isCurrent = False;
+ ctx->isDirect = req->isDirect;
+ ctx->hasUnflushedCommands = False;
+ ctx->renderMode = GL_RENDER;
+ ctx->feedbackBuf = NULL;
+ ctx->feedbackBufSize = 0;
+ ctx->selectBuf = NULL;
+ ctx->selectBufSize = 0;
+ ctx->drawPriv = NULL;
+ ctx->readPriv = NULL;
+
+ /* Add the new context to the various global tables of GLX contexts.
+ */
+ if (!__glXAddContext(ctx)) {
+ (*ctx->destroy) (ctx);
+ client->errorValue = req->context;
+ return BadAlloc;
+ }
+
+ return Success;
}
int
--
1.7.3.4
++++++ u_Avoid-use-after-free-in-dix-dixfonts.c-doImageText.patch ++++++
>From a4d9bf1259ad28f54b6d59a480b2009cc89ca623 Mon Sep 17 00:00:00 2001
From: Alan Coopersmith <alan.coopersmith(a)oracle.com>
Date: Mon, 16 Sep 2013 21:47:16 -0700
Subject: [PATCH] Avoid use-after-free in dix/dixfonts.c: doImageText()
Save a pointer to the passed in closure structure before copying it
and overwriting the *c pointer to point to our copy instead of the
original. If we hit an error, once we free(c), reset c to point to
the original structure before jumping to the cleanup code that
references *c.
Since one of the errors being checked for is whether the server was
able to malloc(c->nChars * itemSize), the client can potentially pass
a number of characters chosen to cause the malloc to fail and the
error path to be taken, resulting in the read from freed memory.
Since the memory is accessed almost immediately afterwards, and the
X server is mostly single threaded, the odds of the free memory having
invalid contents are low with most malloc implementations when not using
memory debugging features, but some allocators will definitely overwrite
the memory there, leading to a likely crash.
Reported-by: Pedro Ribeiro <pedrib(a)gmail.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith(a)oracle.com>
Reviewed-by: Julien Cristau <jcristau(a)debian.org>
---
dix/dixfonts.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/dix/dixfonts.c b/dix/dixfonts.c
index feb765d..2e34d37 100644
--- a/dix/dixfonts.c
+++ b/dix/dixfonts.c
@@ -1425,6 +1425,7 @@ doImageText(ClientPtr client, ITclosurePtr c)
GC *pGC;
unsigned char *data;
ITclosurePtr new_closure;
+ ITclosurePtr old_closure;
/* We're putting the client to sleep. We need to
save some state. Similar problem to that handled
@@ -1436,12 +1437,14 @@ doImageText(ClientPtr client, ITclosurePtr c)
err = BadAlloc;
goto bail;
}
+ old_closure = c;
*new_closure = *c;
c = new_closure;
data = malloc(c->nChars * itemSize);
if (!data) {
free(c);
+ c = old_closure;
err = BadAlloc;
goto bail;
}
@@ -1452,6 +1455,7 @@ doImageText(ClientPtr client, ITclosurePtr c)
if (!pGC) {
free(c->data);
free(c);
+ c = old_closure;
err = BadAlloc;
goto bail;
}
@@ -1464,6 +1468,7 @@ doImageText(ClientPtr client, ITclosurePtr c)
FreeScratchGC(pGC);
free(c->data);
free(c);
+ c = old_closure;
err = BadAlloc;
goto bail;
}
--
1.7.9.2
++++++ u_Do-not-use-intel-driver-on-Poulsbo-Oaktrail-Medfield.patch ++++++
>From ec3ce5493ec00ca0a9304b705a58a40e364f88fb Mon Sep 17 00:00:00 2001
From: Stefan Dirsch <sndirsch(a)suse.de>
Date: Sun, 22 Jul 2012 12:29:51 +0200
Subject: [PATCH 3/3] Do not use intel driver on Poulsbo, Oaktrail, Medfield, CDV.
IDs stolen from Kernel psb driver.
---
hw/xfree86/common/xf86pciBus.c | 64 +++++++++++++++++++++++++++++++++++-----
1 files changed, 56 insertions(+), 8 deletions(-)
diff --git a/hw/xfree86/common/xf86pciBus.c b/hw/xfree86/common/xf86pciBus.c
index a2c18eb..258988a 100644
--- a/hw/xfree86/common/xf86pciBus.c
+++ b/hw/xfree86/common/xf86pciBus.c
@@ -1147,14 +1147,62 @@ xf86VideoPtrToDriverList(struct pci_device *dev,
driverList[0] = "i128";
break;
case 0x8086:
- if ((dev->device_id == 0x00d1) || (dev->device_id == 0x7800)) {
- driverList[0] = "i740";
- }
- else if (dev->device_id == 0x8108) {
- break; /* "hooray" for poulsbo */
- }
- else {
- driverList[0] = "intel";
+ switch (dev->device_id)
+ {
+ /* Intel i740 */
+ case 0x00d1:
+ case 0x7800:
+ driverList[0] = "i740";
+ break;
+ /* GMA500/Poulsbo */
+ case 0x8108:
+ case 0x8109:
+ /* Try psb driver on Poulsbo - if available */
+ driverList[0] = "psb";
+ driverList[1] = "psb_drv";
+ break;
+ /* GMA600/Oaktrail */
+ case 0x4100:
+ case 0x4101:
+ case 0x4102:
+ case 0x4103:
+ case 0x4104:
+ case 0x4105:
+ case 0x4106:
+ case 0x4107:
+ /* Atom E620/Oaktrail */
+ case 0x4108:
+ /* Medfield */
+ case 0x0130:
+ case 0x0131:
+ case 0x0132:
+ case 0x0133:
+ case 0x0134:
+ case 0x0135:
+ case 0x0136:
+ case 0x0137:
+ /* GMA 3600/CDV */
+ case 0x0be0:
+ case 0x0be1:
+ case 0x0be2:
+ case 0x0be3:
+ case 0x0be4:
+ case 0x0be5:
+ case 0x0be6:
+ case 0x0be7:
+ case 0x0be8:
+ case 0x0be9:
+ case 0x0bea:
+ case 0x0beb:
+ case 0x0bec:
+ case 0x0bed:
+ case 0x0bee:
+ case 0x0bef:
+ /* Use fbdev/vesa driver on Oaktrail, Medfield, CDV */
+ break;
+ default:
+ driverList[0] = "intel";
+ break;
}
break;
case 0x102b:
--
1.7.3.4
++++++ u_VNC_build-with-damage-extension.patch ++++++
Author: Michal Srb <msrb(a)suse.cz>
Subject: Build XVnc with DAMAGE extension.
Patch-Mainline: To be upstreamed
Referencs: bnc#771745
diff -ur xorg-server-1.12.3.orig/mi/miinitext.c xorg-server-1.12.3/mi/miinitext.c
--- xorg-server-1.12.3.orig/mi/miinitext.c 2012-08-08 12:02:31.000000000 +0200
+++ xorg-server-1.12.3/mi/miinitext.c 2012-08-08 12:02:57.000000000 +0200
@@ -90,7 +90,6 @@
#ifdef VNCSERVER
#undef COMPOSITE
-#undef DAMAGE
#undef DBE
#undef RANDR
#undef XF86MISC
++++++ u_dix_make-sure-the-mask-is-set-for-emulated-scroll-events.patch ++++++
Git-Commit: cb306a8f174bec9ded95191b91797f59250e6808
Path-Mainline: Upstream
From: Peter Hutterer <peter.hutterer(a)who-t.net>
Date: Tue, 31 Jul 2012 16:09:38 +1000
Subject: [PATCH] dix: make sure the mask is set for emulated scroll events
References: bnc#779322 fdo#52508
Signed-off-by: Michal Srb <msrb(a)suse.com>
If a device has smooth scrolling axes, but submits scroll button events, we
convert those to motion events and update the valuators. For legacy button
events, the valuator mask is likely unset though, causing
add_to_scroll_valuator() to return early, leaving us with an empty mask.
That again skipped the rest of the code and no events were generated.
Fix it by making sure that the scroll valuator in the mask is at least
initialized to 0.
Broke evdev wheel emulation, introduced by
54476b5e4461ff523e935961affabcf0de12c556.
X.Org Bug 52508 <http://bugs.freedesktop.org/show_bug.cgi?id=52508>
Signed-off-by: Peter Hutterer <peter.hutterer(a)who-t.net>
Reviewed-by: Chase Douglas <chase.douglas(a)canonical.com>
diff --git a/dix/getevents.c b/dix/getevents.c
index 27c2e04..b3bb162 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -1625,6 +1625,8 @@ GetPointerEvents(InternalEvent *events, DeviceIntPtr pDev, int type,
if (adj != 0.0 && axis != -1) {
adj *= pDev->valuator->axes[axis].scroll.increment;
+ if (!valuator_mask_isset(&mask, axis))
+ valuator_mask_set(&mask, axis, 0);
add_to_scroll_valuator(pDev, &mask, axis, adj);
type = MotionNotify;
buttons = 0;
++++++ u_exa-only-draw-valid-trapezoids.patch ++++++
Author: Maarten Lankhorst <maarten.lankhorst(a)canonical.com>
Subject: exa: only draw valid trapezoids
Patch-Mainline: To be upstreamed
References: bnc#853846 CVE-2013-6424
Signed-off-by: Michal Srb <msrb(a)suse.com>
diff --git a/exa/exa_render.c b/exa/exa_render.c
index 172e2b5..807eeba 100644
--- a/exa/exa_render.c
+++ b/exa/exa_render.c
@@ -1141,7 +1141,8 @@ exaTrapezoids(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
exaPrepareAccess(pPicture->pDrawable, EXA_PREPARE_DEST);
for (; ntrap; ntrap--, traps++)
- (*ps->RasterizeTrapezoid) (pPicture, traps, -bounds.x1, -bounds.y1);
+ if (xTrapezoidValid(traps))
+ (*ps->RasterizeTrapezoid) (pPicture, traps, -bounds.x1, -bounds.y1);
exaFinishAccess(pPicture->pDrawable, EXA_PREPARE_DEST);
xRel = bounds.x1 + xSrc - xDst;
diff --git a/render/picture.h b/render/picture.h
index c85353a..fcd6401 100644
--- a/render/picture.h
+++ b/render/picture.h
@@ -211,7 +211,7 @@ typedef pixman_fixed_t xFixed;
/* whether 't' is a well defined not obviously empty trapezoid */
#define xTrapezoidValid(t) ((t)->left.p1.y != (t)->left.p2.y && \
(t)->right.p1.y != (t)->right.p2.y && \
- (int) ((t)->bottom - (t)->top) > 0)
+ ((t)->bottom > (t)->top))
/*
* Standard NTSC luminance conversions:
++++++ u_xserver_xvfb-randr.patch ++++++
Author: Lambros Lambrou <lambroslambrou(a)google.com>
Subject: xvfb: add randr support
Patch-Mainline: To be upstreamed
References: bnc#823410 fdo#26391
Signed-off-by: Michal Srb <msrb(a)suse.cz>
--- a/hw/vfb/InitOutput.c
+++ b/hw/vfb/InitOutput.c
@@ -65,6 +65,7 @@
#endif /* HAS_SHM */
#include "dix.h"
#include "miline.h"
+#include "randrstr.h"
#define VFB_DEFAULT_WIDTH 1280
#define VFB_DEFAULT_HEIGHT 1024
@@ -812,6 +813,165 @@
}
static Bool
+vfbRROutputValidateMode(ScreenPtr pScreen,
+ RROutputPtr output,
+ RRModePtr mode)
+{
+ rrScrPriv(pScreen);
+
+ if (pScrPriv->minWidth <= mode->mode.width &&
+ pScrPriv->maxWidth >= mode->mode.width &&
+ pScrPriv->minHeight <= mode->mode.height &&
+ pScrPriv->maxHeight >= mode->mode.height)
+ return TRUE;
+ else
+ return FALSE;
+}
+
+static Bool
+vfbRRScreenSetSize(ScreenPtr pScreen,
+ CARD16 width,
+ CARD16 height,
+ CARD32 mmWidth,
+ CARD32 mmHeight)
+{
+ WindowPtr root = pScreen->root;
+ WindowPtr layer;
+ WindowPtr child;
+ BoxRec box;
+
+ pScreen->width = width;
+ pScreen->height = height;
+ pScreen->mmWidth = mmWidth;
+ pScreen->mmHeight = mmHeight;
+
+ // Resize the root window & adjust its clipping
+ box.x1 = 0;
+ box.y1 = 0;
+ box.x2 = pScreen->width;
+ box.y2 = pScreen->height;
+ REGION_INIT(pScreen, &root->winSize, &box, 1);
+ REGION_INIT(pScreen, &root->borderSize, &box, 1);
+ REGION_RESET(pScreen, &root->borderClip, &box);
+ root->drawable.width = pScreen->width;
+ root->drawable.height = pScreen->height;
+ REGION_BREAK (pScreen, &root->clipList);
+
+ // Update the clipping regions of all windows
+ for (child = root->firstChild; child; child = child->nextSib)
+ (*pScreen->MarkOverlappedWindows)(child, child, &layer);
+
+ if (root->firstChild)
+ {
+ (*pScreen->MarkOverlappedWindows)(root->firstChild,
+ root->firstChild,
+ (WindowPtr *)NULL);
+ }
+ else
+ {
+ (*pScreen->MarkWindow) (root);
+ }
+
+ (*pScreen->ValidateTree)(root, NullWindow, VTOther);
+ (*pScreen->HandleExposures)(root);
+
+ // Reposition top-level windows to fit new root size
+ // XXX I assume this is what it does, but I'm not sure
+ ResizeChildrenWinSize (root, 0, 0, 0, 0);
+
+
+ // Check the pointer position
+ WindowsRestructured ();
+
+ RRScreenSizeNotify (pScreen);
+ RRTellChanged(pScreen);
+
+ // Flush resulting events, etc to clients
+ FlushAllOutput ();
+
+ return TRUE;
+}
+
+static Bool
+vfbRRCrtcSet(ScreenPtr pScreen,
+ RRCrtcPtr crtc,
+ RRModePtr mode,
+ int x,
+ int y,
+ Rotation rotation,
+ int numOutput,
+ RROutputPtr *outputs)
+{
+ return RRCrtcNotify(crtc, mode, x, y, rotation, NULL, numOutput, outputs);
+}
+
+static Bool
+vfbRRGetInfo(ScreenPtr pScreen, Rotation *rotations)
+{
+ return TRUE;
+}
+
+static Bool
+vfbRandRInit(ScreenPtr pScreen)
+{
+ rrScrPrivPtr pScrPriv;
+#if RANDR_12_INTERFACE
+ RRModePtr mode;
+ RRCrtcPtr crtc;
+ RROutputPtr output;
+ xRRModeInfo modeInfo;
+ char name[64];
+#endif
+
+ if (!RRScreenInit (pScreen))
+ return FALSE;
+ pScrPriv = rrGetScrPriv(pScreen);
+ pScrPriv->rrGetInfo = vfbRRGetInfo;
+#if RANDR_12_INTERFACE
+ pScrPriv->rrCrtcSet = vfbRRCrtcSet;
+ pScrPriv->rrScreenSetSize = vfbRRScreenSetSize;
+ pScrPriv->rrOutputSetProperty = NULL;
+#if RANDR_13_INTERFACE
+ pScrPriv->rrOutputGetProperty = NULL;
+#endif
+ pScrPriv->rrOutputValidateMode = vfbRROutputValidateMode;
+ pScrPriv->rrModeDestroy = NULL;
+
+ RRScreenSetSizeRange (pScreen,
+ 1, 1,
+ pScreen->width, pScreen->height);
+
+ sprintf (name, "%dx%d", pScreen->width, pScreen->height);
+ memset (&modeInfo, '\0', sizeof (modeInfo));
+ modeInfo.width = pScreen->width;
+ modeInfo.height = pScreen->height;
+ modeInfo.nameLength = strlen (name);
+
+ mode = RRModeGet (&modeInfo, name);
+ if (!mode)
+ return FALSE;
+
+ crtc = RRCrtcCreate (pScreen, NULL);
+ if (!crtc)
+ return FALSE;
+
+ output = RROutputCreate (pScreen, "screen", 6, NULL);
+ if (!output)
+ return FALSE;
+ if (!RROutputSetClones (output, NULL, 0))
+ return FALSE;
+ if (!RROutputSetModes (output, &mode, 1, 0))
+ return FALSE;
+ if (!RROutputSetCrtcs (output, &crtc, 1))
+ return FALSE;
+ if (!RROutputSetConnection (output, RR_Connected))
+ return FALSE;
+ RRCrtcNotify (crtc, mode, 0, 0, RR_Rotate_0, NULL, 1, &output);
+#endif
+ return TRUE;
+}
+
+static Bool
vfbScreenInit(int index, ScreenPtr pScreen, int argc, char **argv)
{
vfbScreenInfoPtr pvfb = &vfbScreens[index];
@@ -885,6 +1045,9 @@
if (!ret)
return FALSE;
+ if (!vfbRandRInit(pScreen))
+ return FALSE;
+
pScreen->InstallColormap = vfbInstallColormap;
pScreen->UninstallColormap = vfbUninstallColormap;
pScreen->ListInstalledColormaps = vfbListInstalledColormaps;
++++++ vidmode-sig11.diff ++++++
Index: hw/xfree86/common/xf86VidMode.c
===================================================================
--- hw/xfree86/common/xf86VidMode.c.orig
+++ hw/xfree86/common/xf86VidMode.c
@@ -224,6 +224,8 @@ VidModeGetFirstModeline(int scrnIndex, p
return FALSE;
pVidMode = VMPTR(pScrn->pScreen);
+ if (!pScrn->modes)
+ return FALSE;
pVidMode->First = pScrn->modes;
pVidMode->Next = pVidMode->First->next;
++++++ xorg-backtrace ++++++
#!/usr/bin/perl
$version = "1.0";
$timeout = 5;
@pkgs = ( "xorg-x11-server", "xorg-x11-driver-video", "xorg-x11-driver-input",
"libpixman-1-0", "libpciaccess0" );
$xtracmds= "/etc/X11/xorg-backtrace-cmds";
$pid=$ARGV[0];
if ($pid == 0) {
print "Usage: $0 <pid>\n";
exit 1;
}
if (! -e "/usr/bin/gdb") {
print "Install gdb to get reasonable backtraces\n";
exit 2;
}
$SIG{ALRM} = sub { die "timeout starting gdb" };
alarm $timeout;
open STDERR, ">&STDOUT";
use FileHandle;
use IPC::Open2;
$gdb = open2 (*R, *W, "/usr/bin/gdb -n -p $pid");
$SIG{ALRM} = sub { kill QUIT, $gdb; sleep 1; kill KILL, $gdb; die "timeout using gdb" };
alarm $timeout;
print "\n==================== GDB Backtrace ============\n\n";
print "Done by $0 V$version\n\n";
$needpkgs=0;
for $p (@pkgs) {
next if system ("rpm", "-q", "--quiet", "$p-debuginfo") == 0 &&
system ("rpm", "-q", "--quiet", "$p-debugsource") == 0;
print "Install following debug packages to improve backtrace:\n" unless $needpkgs;
$needpkgs++;
print "\t$p-debug*\n";
}
print "\n" if $needpkgs;
print W "set prompt\necho \\n===info\\n\n";
#print W "info files\necho ===files\\n\n";
print W "thread apply all bt full\necho ===btend\\n\n";
$_=<R>; # GNU gdb version
print;
while (<R>) {
last if /^===info/;
print if /^This GDB was configured as/;
}
#print "\n==================== Files ====================\n\n";
#while (<R>) {
# last if /^===files/;
# print;
#}
print "\n==================== Backtrace ================\n";
$fno = "";
$fls = 0;
$o = "";
$use = 0;
while (<R>) {
last if /^===btend/;
if (/^#(\d+)\s/) {
$fno = $1;
$o .= "\n";
$o .= "===l".($fno-1)."\n" if $use;
$o .= "\n";
$fls = $fno+1 if /\bxorg_backtrace \(/ || /\bOsSigHandler \(/;
$use = 1;
}
$line{$fno} = $1 if $line{$fno} == 0 && /:(\d+)\s*$/;
$o .= $_;
$use = 0 if /^No symbol table info available/;
}
$o .="\n===l$fno";
for $i ($fls..$fno) {
print W "frame $i\necho ===fs$i\\n\nlist\necho ===fe$i\\n\n";
while (<R>) {
last if /^===fs$i\b/;
}
$r = "";
while (<R>) {
last if /^===fe$i\b/;
$r .= $_;
}
if ($line{$i} > 0) {
$r =~ s/^$line{$i}\b/$line{$i} */m;
}
$o =~ s/^===l$i$/$r/m;
}
if ($fls > 0) {
for $i (0..$fls-1) {
$o =~ s/^(#$i\s.*?)\n.*?\n#/$1\n\n#/ms;
}
}
$o =~ s/^===l.*$//mg;
print "$o";
if (-e $xtracmds) {
print W "source -v $xtracmds\necho ===cmds\\n\n";
print "\n==================== Extra Commands ===========\n\n";
while (<R>) {
last if /^===cmds/;
print unless /^\+echo ===cmds/;
}
}
print "\n==================== Backtrace End ============\n\n";
close R;
close W;
exit 0;
++++++ xorg-server-provides ++++++
Provides: X11_ABI_XINPUT = 16.0
Provides: X11_ABI_VIDEODRV = 12.0
Provides: X11_ABI_ANSIC = 0.4
Provides: X11_ABI_EXTENSION = 6.0
++++++ xorg-server-xdmcp.patch ++++++
Index: xorg-server-1.12.1/os/access.c
===================================================================
--- xorg-server-1.12.1.orig/os/access.c
+++ xorg-server-1.12.1/os/access.c
@@ -714,7 +714,9 @@ DefineSelf(int fd)
/*
* ignore 'localhost' entries as they're not useful
- * on the other end of the wire
+ * on the other end of the wire and because on hosts
+ * with shared home dirs they'll result in conflicting
+ * entries in ~/.Xauthority
*/
if (ifr->ifa_flags & IFF_LOOPBACK)
continue;
@@ -735,6 +737,14 @@ DefineSelf(int fd)
else if (family == FamilyInternet6 &&
IN6_IS_ADDR_LOOPBACK((struct in6_addr *) addr))
continue;
+
+ /* Ignore IPv6 link local addresses (fe80::/10), because
+ * they need a scope identifier, which we have no way
+ * of telling to the other end.
+ */
+ if (family == FamilyInternet6 &&
+ IN6_IS_ADDR_LINKLOCAL((struct in6_addr *)addr))
+ continue;
#endif
XdmcpRegisterConnection(family, (char *) addr, len);
#if defined(IPv6) && defined(AF_INET6)
++++++ xorg-x11-server-rpmmacros.patch ++++++
Index: xorg-server-1.12.1/configure.ac
===================================================================
--- xorg-server-1.12.1.orig/configure.ac
+++ xorg-server-1.12.1/configure.ac
@@ -2232,4 +2232,5 @@ test/Makefile
test/xi2/Makefile
xserver.ent
xorg-server.pc
+xorg-x11-server.macros
])
++++++ xorg-x11-server.macros.in ++++++
# RPM macros for XOrg ABI Definitions
# Add a Requires for the correct VIDEO Driver ABI
%x11_abi_videodrv_req \
Requires: X11_ABI_VIDEODRV = @abi_videodrv@
%x11_abi_xinput_req \
Requires: X11_ABI_XINPUT = @abi_xinput@
%x11_abi_ansic_req \
Requires: X11_ABI_ANSIC = @abi_ansic@
%x11_abi_extension_req \
Requires: X11_ABI_EXTENSION = @abi_extension@
++++++ xserver-bg-none-root.patch ++++++
>From a3e15680da24cb8259f6a83dee0c930dab024290 Mon Sep 17 00:00:00 2001
From: Kristian <krh(a)redhat.com>
Date: Fri, 15 Aug 2008 15:15:14 +1000
Subject: [PATCH] Add nr for background=none root
---
dix/globals.c | 1 +
dix/window.c | 22 ++++++++++++----------
hw/xfree86/common/xf86Init.c | 11 +++++++++++
hw/xfree86/common/xf86str.h | 5 ++++-
include/opaque.h | 1 +
os/utils.c | 3 +++
6 files changed, 32 insertions(+), 11 deletions(-)
Index: xorg-server-1.8.0/dix/globals.c
===================================================================
Index: xorg-server-1.8.0/dix/window.c
===================================================================
--- xorg-server-1.8.0.orig/dix/window.c
+++ xorg-server-1.8.0/dix/window.c
@@ -465,23 +465,24 @@ InitRootWindow(WindowPtr pWin)
pWin->cursorIsNone = FALSE;
pWin->optional->cursor = rootCursor;
rootCursor->refcnt++;
-
+ pWin->backingStore = defaultBackingStore;
+ pWin->forcedBS = (defaultBackingStore != NotUseful);
if (party_like_its_1989) {
MakeRootTile(pWin);
backFlag |= CWBackPixmap;
+ pScreen->ChangeWindowAttributes(pWin, backFlag);
+ } else if (bgNoneRoot) {
+ /* nothing, handled in xf86CreateRootWindow */
} else {
if (whiteRoot)
pWin->background.pixel = pScreen->whitePixel;
else
pWin->background.pixel = pScreen->blackPixel;
backFlag |= CWBackPixel;
- }
- pWin->backingStore = defaultBackingStore;
- pWin->forcedBS = (defaultBackingStore != NotUseful);
- /* We SHOULD check for an error value here XXX */
- (*pScreen->ChangeWindowAttributes)(pWin, backFlag);
+ pScreen->ChangeWindowAttributes(pWin, backFlag);
+ }
MapWindow(pWin, serverClient);
}
Index: xorg-server-1.8.0/hw/xfree86/common/xf86Init.c
===================================================================
Index: xorg-server-1.8.0/hw/xfree86/common/xf86str.h
===================================================================
--- xorg-server-1.8.0.orig/hw/xfree86/common/xf86str.h
+++ xorg-server-1.8.0/hw/xfree86/common/xf86str.h
@@ -503,7 +503,7 @@ typedef struct _confdrirec {
} confDRIRec, *confDRIPtr;
/* These values should be adjusted when new fields are added to ScrnInfoRec */
-#define NUM_RESERVED_INTS 16
+#define NUM_RESERVED_INTS 15
#define NUM_RESERVED_POINTERS 14
#define NUM_RESERVED_FUNCS 11
@@ -775,6 +775,9 @@ typedef struct _ScrnInfoRec {
ClockRangePtr clockRanges;
int adjustFlags;
+ /* -nr support */
+ int canDoBGNoneRoot;
+
/*
* These can be used when the minor ABI version is incremented.
* The NUM_* parameters must be reduced appropriately to keep the
Index: xorg-server-1.8.0/include/opaque.h
===================================================================
--- xorg-server-1.8.0.orig/include/opaque.h
+++ xorg-server-1.8.0/include/opaque.h
@@ -71,6 +71,7 @@ extern _X_EXPORT Bool defeatAccessContro
extern _X_EXPORT long maxBigRequestSize;
extern _X_EXPORT Bool party_like_its_1989;
extern _X_EXPORT Bool whiteRoot;
+extern _X_EXPORT Bool bgNoneRoot;
extern _X_EXPORT Bool CoreDump;
Index: xorg-server-1.8.0/os/utils.c
===================================================================
--- xorg-server-1.8.0.orig/os/utils.c
+++ xorg-server-1.8.0/os/utils.c
@@ -511,6 +511,7 @@ void UseMsg(void)
#endif
ErrorF("-nolisten string don't listen on protocol\n");
ErrorF("-noreset don't reset after last client exists\n");
+ ErrorF("-nr create root window with no background\n");
ErrorF("-reset reset after last client exists\n");
ErrorF("-p # screen-saver pattern duration (minutes)\n");
ErrorF("-pn accept failure to listen on all ports\n");
@@ -852,6 +853,8 @@ ProcessCommandLine(int argc, char *argv[
defaultBackingStore = WhenMapped;
else if ( strcmp( argv[i], "-wr") == 0)
whiteRoot = TRUE;
+ else if ( strcmp( argv[i], "-nr") == 0)
+ bgNoneRoot = TRUE;
else if ( strcmp( argv[i], "-maxbigreqsize") == 0) {
if(++i < argc) {
long reqSizeArg = atol(argv[i]);
--- xorg-server-1.9.0/dix/globals.c.orig 2010-06-06 19:53:51.000000000 +0200
+++ xorg-server-1.9.0/dix/globals.c 2010-08-23 15:27:52.000000000 +0200
@@ -122,6 +122,7 @@ FontPtr defaultFont; /* not declared i
CursorPtr rootCursor;
Bool party_like_its_1989 = FALSE;
Bool whiteRoot = FALSE;
+Bool bgNoneRoot = FALSE;
TimeStamp currentTime;
TimeStamp lastDeviceEventTime;
--- xorg-server-1.9.0/hw/xfree86/common/xf86Init.c.orig 2010-06-10 16:07:55.000000000 +0200
+++ xorg-server-1.9.0/hw/xfree86/common/xf86Init.c 2010-08-23 15:32:56.000000000 +0200
@@ -76,6 +76,7 @@
#include "xf86Xinput.h"
#include "xf86InPriv.h"
#include "picturestr.h"
+#include "xace.h"
#include "xf86Bus.h"
#include "xf86VGAarbiter.h"
@@ -242,6 +243,7 @@ xf86CreateRootWindow(WindowPtr pWin)
int ret = TRUE;
int err = Success;
ScreenPtr pScreen = pWin->drawable.pScreen;
+ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
RootWinPropPtr pProp;
CreateWindowProcPtr CreateWindow = (CreateWindowProcPtr)
dixLookupPrivate(&pScreen->devPrivates, xf86CreateRootWindowKey);
@@ -293,6 +295,17 @@ xf86CreateRootWindow(WindowPtr pWin)
}
}
+ if (bgNoneRoot) {
+ if (pScrn->canDoBGNoneRoot) {
+ pWin->backgroundState = XaceBackgroundNoneState(pWin);
+ pWin->background.pixel = pScreen->whitePixel;
+ pScreen->ChangeWindowAttributes(pWin, CWBackPixmap | CWBorderPixel | CWCursor | CWBackingStore);
+ } else {
+ pWin->background.pixel = pScreen->blackPixel;
+ pScreen->ChangeWindowAttributes(pWin, CWBackPixel | CWBorderPixel | CWCursor | CWBackingStore);
+ }
+ }
+
DebugF("xf86CreateRootWindow() returns %d\n", ret);
return ret;
}
++++++ zap_warning_xserver.diff ++++++
Index: xorg-server-1.12.1/hw/xfree86/common/xf86Config.c
===================================================================
--- xorg-server-1.12.1.orig/hw/xfree86/common/xf86Config.c
+++ xorg-server-1.12.1/hw/xfree86/common/xf86Config.c
@@ -685,6 +685,7 @@ typedef enum {
FLAG_NOTRAPSIGNALS,
FLAG_DONTVTSWITCH,
FLAG_DONTZAP,
+ FLAG_ZAPWARNING,
FLAG_DONTZOOM,
FLAG_DISABLEVIDMODE,
FLAG_ALLOWNONLOCAL,
@@ -721,6 +722,8 @@ static OptionInfoRec FlagOptions[] = {
{0}, FALSE},
{FLAG_DONTZAP, "DontZap", OPTV_BOOLEAN,
{0}, FALSE},
+ { FLAG_ZAPWARNING, "ZapWarning", OPTV_BOOLEAN,
+ {0}, FALSE },
{FLAG_DONTZOOM, "DontZoom", OPTV_BOOLEAN,
{0}, FALSE},
{FLAG_DISABLEVIDMODE, "DisableVidModeExtension", OPTV_BOOLEAN,
@@ -807,6 +810,7 @@ configServerFlags(XF86ConfFlagsPtr flags
xf86GetOptValBool(FlagOptions, FLAG_NOTRAPSIGNALS, &xf86Info.notrapSignals);
xf86GetOptValBool(FlagOptions, FLAG_DONTVTSWITCH, &xf86Info.dontVTSwitch);
xf86GetOptValBool(FlagOptions, FLAG_DONTZAP, &xf86Info.dontZap);
+ xf86GetOptValBool(FlagOptions, FLAG_ZAPWARNING, &xf86Info.ZapWarning);
xf86GetOptValBool(FlagOptions, FLAG_DONTZOOM, &xf86Info.dontZoom);
xf86GetOptValBool(FlagOptions, FLAG_IGNORE_ABI, &xf86Info.ignoreABI);
Index: xorg-server-1.12.1/hw/xfree86/common/xf86Events.c
===================================================================
--- xorg-server-1.12.1.orig/hw/xfree86/common/xf86Events.c
+++ xorg-server-1.12.1/hw/xfree86/common/xf86Events.c
@@ -180,12 +180,25 @@ xf86ProcessActionEvent(ActionEvent actio
DebugF("ProcessActionEvent(%d,%x)\n", (int) action, arg);
switch (action) {
case ACTION_TERMINATE:
- if (!xf86Info.dontZap) {
+ if (xf86Info.dontZap)
+ break;
+
+ if (xf86Info.ZapWarning) {
+ static struct timeval LastZap = { 0, 0};
+ struct timeval NewZap;
+
+ gettimeofday(&NewZap, NULL);
+
+ if ((NewZap.tv_sec - LastZap.tv_sec) >= 2) {
+ xf86OSRingBell(30, 1000, 50);
+ LastZap = NewZap;
+ break;
+ }
+ }
#ifdef XFreeXDGA
- DGAShutdown();
+ DGAShutdown();
#endif
- GiveUp(0);
- }
+ GiveUp(0);
break;
case ACTION_NEXT_MODE:
if (!xf86Info.dontZoom)
Index: xorg-server-1.12.1/hw/xfree86/common/xf86Globals.c
===================================================================
--- xorg-server-1.12.1.orig/hw/xfree86/common/xf86Globals.c
+++ xorg-server-1.12.1/hw/xfree86/common/xf86Globals.c
@@ -104,6 +104,7 @@ xf86InfoRec xf86Info = {
.autoVTSwitch = TRUE,
.ShareVTs = FALSE,
.dontZap = FALSE,
+ .ZapWarning = TRUE,
.dontZoom = FALSE,
.notrapSignals = FALSE,
.caughtSignal = FALSE,
Index: xorg-server-1.12.1/hw/xfree86/common/xf86Privstr.h
===================================================================
--- xorg-server-1.12.1.orig/hw/xfree86/common/xf86Privstr.h
+++ xorg-server-1.12.1/hw/xfree86/common/xf86Privstr.h
@@ -68,6 +68,7 @@ typedef struct {
Bool autoVTSwitch;
Bool ShareVTs;
Bool dontZap;
+ Bool ZapWarning;
Bool dontZoom;
Bool notrapSignals; /* don't exit cleanly - die at fault */
Bool caughtSignal;
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0