From c89ca3bde7df386e17e2eadd4777be1cf98d61be Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Mon, 4 Jul 2011 13:34:56 +0100 Subject: [PATCH] Update to 3.1.3 --- .gitignore | 1 + ...ttings-daemon-3.1.3-color-widestring.patch | 81 ------------------- gnome-settings-daemon.spec | 23 ++++-- sources | 2 +- 4 files changed, 19 insertions(+), 88 deletions(-) delete mode 100644 gnome-settings-daemon-3.1.3-color-widestring.patch diff --git a/.gitignore b/.gitignore index 8a02711..ad5b3aa 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,4 @@ gnome-settings-daemon-2.31.6.tar.bz2 /gnome-settings-daemon-3.0.1.tar.bz2 /gnome-settings-daemon-3.1.1.tar.bz2 /gnome-settings-daemon-3.1.2.tar.xz +/gnome-settings-daemon-3.1.3.tar.xz diff --git a/gnome-settings-daemon-3.1.3-color-widestring.patch b/gnome-settings-daemon-3.1.3-color-widestring.patch deleted file mode 100644 index 03ca675..0000000 --- a/gnome-settings-daemon-3.1.3-color-widestring.patch +++ /dev/null @@ -1,81 +0,0 @@ -From ac60d0ae037096859cf452d074e9bd345974c786 Mon Sep 17 00:00:00 2001 -From: Richard Hughes -Date: Mon, 20 Jun 2011 16:41:28 +0000 -Subject: color: Fix a potential buffer-overflow when converting to wide text - -Thanks to fortify protection, g-s-d fails to build for some distros. -Copy the fix from Colin that went into colord a few days ago. ---- -diff --git a/plugins/color/gsd-color-manager.c b/plugins/color/gsd-color-manager.c -index 0b1c882..0391175 100644 ---- a/plugins/color/gsd-color-manager.c -+++ b/plugins/color/gsd-color-manager.c -@@ -87,10 +87,10 @@ typedef struct { - GQuark - gsd_color_manager_error_quark (void) - { -- static GQuark quark = 0; -- if (!quark) -- quark = g_quark_from_static_string ("gsd_color_manager_error"); -- return quark; -+ static GQuark quark = 0; -+ if (!quark) -+ quark = g_quark_from_static_string ("gsd_color_manager_error"); -+ return quark; - } - - static GcmEdid * -@@ -492,17 +492,46 @@ out: - } - - #ifdef HAVE_NEW_LCMS -+static wchar_t * -+utf8_to_wchar_t (const char *src) -+{ -+ gsize len; -+ gsize converted; -+ wchar_t *buf = NULL; -+ -+ len = mbstowcs (NULL, src, 0); -+ if (len < 0) { -+ g_warning ("Invalid UTF-8 in string %s", src); -+ goto out; -+ } -+ len += 1; -+ buf = g_malloc (sizeof (wchar_t) * len); -+ converted = mbstowcs (buf, src, len - 1); -+ g_assert (converted != -1); -+ buf[converted] = '\0'; -+out: -+ return buf; -+} -+ - static cmsBool - _cmsDictAddEntryAscii (cmsHANDLE dict, - const gchar *key, - const gchar *value) - { -- cmsBool ret; -- wchar_t mb_key[1024]; -- wchar_t mb_value[1024]; -- mbstowcs (mb_key, key, sizeof (mb_key)); -- mbstowcs (mb_value, value, sizeof (mb_value)); -+ cmsBool ret = FALSE; -+ wchar_t *mb_key = NULL; -+ wchar_t *mb_value = NULL; -+ -+ mb_key = utf8_to_wchar_t (key); -+ if (mb_key == NULL) -+ goto out; -+ mb_value = utf8_to_wchar_t (value); -+ if (mb_value == NULL) -+ goto out; - ret = cmsDictAddEntry (dict, mb_key, mb_value, NULL, NULL); -+out: -+ g_free (mb_key); -+ g_free (mb_value); - return ret; - } - #endif /* HAVE_NEW_LCMS */ --- -cgit v0.9 diff --git a/gnome-settings-daemon.spec b/gnome-settings-daemon.spec index 38b4113..2e00c26 100644 --- a/gnome-settings-daemon.spec +++ b/gnome-settings-daemon.spec @@ -1,6 +1,6 @@ Name: gnome-settings-daemon -Version: 3.1.2 -Release: 2%{?dist} +Version: 3.1.3 +Release: 1%{?dist} Summary: The daemon sharing settings from GNOME to GTK+/KDE applications Group: System Environment/Daemons @@ -9,9 +9,6 @@ URL: http://download.gnome.org/sources/%{name} #VCS: git:git://git.gnome.org/gnome-settings-daemon Source: http://download.gnome.org/sources/%{name}/3.1/%{name}-%{version}.tar.xz -# from upstream -Patch0: gnome-settings-daemon-3.1.3-color-widestring.patch - Requires(pre): GConf2 >= 2.14 Requires(preun): GConf2 >= 2.14 Requires(post): GConf2 >= 2.14 @@ -23,6 +20,7 @@ BuildRequires: GConf2-devel BuildRequires: gtk3-devel >= 2.99.3 BuildRequires: gnome-desktop3-devel >= 3.1.2 BuildRequires: xorg-x11-proto-devel libXxf86misc-devel +BuildRequires: xorg-x11-proto-devel libXxf86misc-devel BuildRequires: gstreamer-devel BuildRequires: gstreamer-plugins-base-devel BuildRequires: pulseaudio-libs-devel @@ -60,7 +58,6 @@ developing applications that use %{name}. %prep %setup -q -%patch0 -p1 -b .color-wide # autoreconf -i -f @@ -182,6 +179,17 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : %{_libdir}/gnome-settings-daemon-3.0/a11y-settings.gnome-settings-plugin %{_libdir}/gnome-settings-daemon-3.0/liba11y-settings.so +%{_libdir}/gnome-settings-daemon-3.0/color.gnome-settings-plugin +%{_libdir}/gnome-settings-daemon-3.0/libcolor.so +%{_datadir}/glib-2.0/schemas/org.gnome.settings-daemon.plugins.color.gschema.xml + +%{_libdir}/gnome-settings-daemon-3.0/liborientation.so +%{_libdir}/gnome-settings-daemon-3.0/orientation.gnome-settings-plugin +%{_datadir}/glib-2.0/schemas/org.gnome.settings-daemon.plugins.orientation.gschema.xml + +%{_libdir}/gnome-settings-daemon-3.0/libcursor.so +%{_libdir}/gnome-settings-daemon-3.0/cursor.gnome-settings-plugin + %{_libexecdir}/gnome-settings-daemon %{_libexecdir}/gsd-locate-pointer %{_libexecdir}/gsd-printer @@ -214,6 +222,9 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : %{_datadir}/gnome-settings-daemon-3.0/input-device-example.sh %changelog +* Mon Jul 04 2011 Bastien Nocera 3.1.3.-1 +- Update to 3.1.3 + * Tue Jun 21 2011 Tomas Bzatek - 3.1.2-2 - Fix fortify fail in gsd-color-manager.c (#714625) diff --git a/sources b/sources index f3f263e..da009c0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -a381c7d555284382c8f2e696d7c84252 gnome-settings-daemon-3.1.2.tar.xz +97b053b5281c16879afc695b402343c8 gnome-settings-daemon-3.1.3.tar.xz