From a922ce8d7ba3741d59187cb838c6e2f43040d71a Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Wed, 16 Feb 2011 16:44:34 +0000 Subject: [PATCH 01/21] - Fix crasher when media keys GSettings value changes --- ...ys-Fix-crash-when-keybindings-change.patch | 28 +++++++++++++++++++ gnome-settings-daemon.spec | 7 ++++- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 0001-media-keys-Fix-crash-when-keybindings-change.patch diff --git a/0001-media-keys-Fix-crash-when-keybindings-change.patch b/0001-media-keys-Fix-crash-when-keybindings-change.patch new file mode 100644 index 0000000..4c6742c --- /dev/null +++ b/0001-media-keys-Fix-crash-when-keybindings-change.patch @@ -0,0 +1,28 @@ +From 89b4b516edfd5ec19f8987d63624c28fc2f30f8f Mon Sep 17 00:00:00 2001 +From: Bastien Nocera +Date: Wed, 16 Feb 2011 16:26:45 +0000 +Subject: [PATCH] media-keys: Fix crash when keybindings change + +We need to skip over hard-coded keys which don't have a +key name. +--- + plugins/media-keys/gsd-media-keys-manager.c | 3 +++ + 1 files changed, 3 insertions(+), 0 deletions(-) + +diff --git a/plugins/media-keys/gsd-media-keys-manager.c b/plugins/media-keys/gsd-media-keys-manager.c +index 1c1b2cf..7d42f49 100644 +--- a/plugins/media-keys/gsd-media-keys-manager.c ++++ b/plugins/media-keys/gsd-media-keys-manager.c +@@ -292,6 +292,9 @@ update_kbd_cb (GSettings *settings, + + /* Find the key that was modified */ + for (i = 0; i < HANDLED_KEYS; i++) { ++ /* Skip over hard-coded keys */ ++ if (keys[i].settings_key == NULL) ++ continue; + if (strcmp (key, keys[i].settings_key) == 0) { + char *tmp; + Key *key; +-- +1.7.4 + diff --git a/gnome-settings-daemon.spec b/gnome-settings-daemon.spec index 7920b6c..e434caf 100644 --- a/gnome-settings-daemon.spec +++ b/gnome-settings-daemon.spec @@ -1,6 +1,6 @@ Name: gnome-settings-daemon Version: 2.91.9 -Release: 5%{?dist} +Release: 6%{?dist} Summary: The daemon sharing settings from GNOME to GTK+/KDE applications Group: System Environment/Daemons @@ -36,6 +36,7 @@ BuildRequires: libxklavier-devel BuildRequires: gsettings-desktop-schemas-devel >= 0.1.2 Patch0: 0001-datetime-Fix-gsd_datetime_check_tz_name-never-workin.patch +Patch1: 0001-media-keys-Fix-crash-when-keybindings-change.patch # change font rendering #Patch3: slight-hinting.patch @@ -56,6 +57,7 @@ developing applications that use %{name}. %prep %setup -q %patch0 -p1 -b .tz-setting +%patch1 -p1 -b .media-keys #%patch3 -p1 -b .slight-hinting %build @@ -121,6 +123,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor >&/dev/null || : %{_libdir}/pkgconfig/gnome-settings-daemon.pc %changelog +* Wed Feb 16 2011 Bastien Nocera 2.91.9-6 +- Fix crasher when media keys GSettings value changes + * Sun Feb 13 2011 Christopher Aillon - 2.91.9-5 - Rebuild for new libxklavier From 52f2a86a178b28f9720d38c0027e239559cd2e9c Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 22 Feb 2011 01:21:13 -0500 Subject: [PATCH 02/21] 2.91.90 --- .gitignore | 1 + gnome-settings-daemon.spec | 17 ++++++----------- sources | 2 +- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index 57e9555..5da4be6 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ gnome-settings-daemon-2.31.6.tar.bz2 /gnome-settings-daemon-2.91.7.tar.bz2 /gnome-settings-daemon-2.91.8.tar.bz2 /gnome-settings-daemon-2.91.9.tar.bz2 +/gnome-settings-daemon-2.91.90.tar.bz2 diff --git a/gnome-settings-daemon.spec b/gnome-settings-daemon.spec index e434caf..7c4695d 100644 --- a/gnome-settings-daemon.spec +++ b/gnome-settings-daemon.spec @@ -1,6 +1,6 @@ Name: gnome-settings-daemon -Version: 2.91.9 -Release: 6%{?dist} +Version: 2.91.90 +Release: 1%{?dist} Summary: The daemon sharing settings from GNOME to GTK+/KDE applications Group: System Environment/Daemons @@ -33,12 +33,7 @@ BuildRequires: libcanberra-devel BuildRequires: polkit-devel BuildRequires: autoconf automake libtool BuildRequires: libxklavier-devel -BuildRequires: gsettings-desktop-schemas-devel >= 0.1.2 - -Patch0: 0001-datetime-Fix-gsd_datetime_check_tz_name-never-workin.patch -Patch1: 0001-media-keys-Fix-crash-when-keybindings-change.patch -# change font rendering -#Patch3: slight-hinting.patch +BuildRequires: gsettings-desktop-schemas-devel >= 0.1.7 %description A daemon to share settings from GNOME to other applications. It also @@ -56,9 +51,6 @@ developing applications that use %{name}. %prep %setup -q -%patch0 -p1 -b .tz-setting -%patch1 -p1 -b .media-keys -#%patch3 -p1 -b .slight-hinting %build # https://fedoraproject.org/wiki/Features/ChangeInImplicitDSOLinking @@ -123,6 +115,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor >&/dev/null || : %{_libdir}/pkgconfig/gnome-settings-daemon.pc %changelog +* Tue Feb 22 2011 Matthias Clasen 2.91.90-1 +- Update to 2.91.90 + * Wed Feb 16 2011 Bastien Nocera 2.91.9-6 - Fix crasher when media keys GSettings value changes diff --git a/sources b/sources index 761a0e0..5ee2f55 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -51ab015d3d08c7f0c85e3c60b733e179 gnome-settings-daemon-2.91.9.tar.bz2 +57a65d00ed96a42b2abaa6c21defdfe7 gnome-settings-daemon-2.91.90.tar.bz2 From 1990263ecd4c2e11b413473f8140631559dc278b Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 22 Feb 2011 01:29:13 -0500 Subject: [PATCH 03/21] fix file list --- gnome-settings-daemon.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/gnome-settings-daemon.spec b/gnome-settings-daemon.spec index 7c4695d..e50e2fd 100644 --- a/gnome-settings-daemon.spec +++ b/gnome-settings-daemon.spec @@ -95,7 +95,6 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor >&/dev/null || : %{_libexecdir}/gnome-settings-daemon %{_libexecdir}/gsd-locate-pointer %{_datadir}/gnome-settings-daemon/ -%{_datadir}/gnome-control-center/keybindings/50-accessibility.xml %{_datadir}/dbus-1/services/org.gnome.SettingsDaemon.service %{_sysconfdir}/xdg/autostart/gnome-settings-daemon.desktop %{_datadir}/icons/hicolor/*/apps/gsd-xrandr.* From 61ce8597e823d4aa1713dc701f9038f8149430e1 Mon Sep 17 00:00:00 2001 From: Cosimo Cecchi Date: Wed, 23 Feb 2011 10:36:59 -0500 Subject: [PATCH 04/21] Include an upstream patch to fix a possible crasher --- g-s-d-fix-crasher-screensaver-unlock.patch | 27 ++++++++++++++++++++++ gnome-settings-daemon.spec | 9 +++++++- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 g-s-d-fix-crasher-screensaver-unlock.patch diff --git a/g-s-d-fix-crasher-screensaver-unlock.patch b/g-s-d-fix-crasher-screensaver-unlock.patch new file mode 100644 index 0000000..f85db79 --- /dev/null +++ b/g-s-d-fix-crasher-screensaver-unlock.patch @@ -0,0 +1,27 @@ +commit 90c0f8676b06041c599fd941514e09ba8704f0ef +Author: Martin Pitt +Date: Tue Feb 22 08:35:37 2011 +0100 + + automount: Fix crash when unlocking screen saver + + Fix commit 71deedf: We _do_ expect that some volumes have queued up in + check_volume_queue() once the screen saver got inactive, so don't crash with an + assertion failure in this case. + + Just check whether the screen saver is active, and don't mount anything if so. + +diff --git a/plugins/automount/gsd-automount-manager.c b/plugins/automount/gsd-automount-manager.c +index 788a5fe..5988f2b 100644 +--- a/plugins/automount/gsd-automount-manager.c ++++ b/plugins/automount/gsd-automount-manager.c +@@ -184,8 +184,8 @@ check_volume_queue (GsdAutomountManager *manager) + + l = manager->priv->volume_queue; + +- if (!manager->priv->screensaver_active) { +- g_assert (l == NULL); ++ if (manager->priv->screensaver_active) { ++ return; + } + + while (l != NULL) { diff --git a/gnome-settings-daemon.spec b/gnome-settings-daemon.spec index e50e2fd..f58c244 100644 --- a/gnome-settings-daemon.spec +++ b/gnome-settings-daemon.spec @@ -1,6 +1,6 @@ Name: gnome-settings-daemon Version: 2.91.90 -Release: 1%{?dist} +Release: 2%{?dist} Summary: The daemon sharing settings from GNOME to GTK+/KDE applications Group: System Environment/Daemons @@ -35,6 +35,8 @@ BuildRequires: autoconf automake libtool BuildRequires: libxklavier-devel BuildRequires: gsettings-desktop-schemas-devel >= 0.1.7 +Patch1: g-s-d-fix-crasher-screensaver-unlock.patch + %description A daemon to share settings from GNOME to other applications. It also handles global keybindings, as well as a number of desktop-wide settings. @@ -52,6 +54,8 @@ developing applications that use %{name}. %prep %setup -q +%patch1 -p1 -b .unlock + %build # https://fedoraproject.org/wiki/Features/ChangeInImplicitDSOLinking #export LIBS="-lX11 -lm" @@ -114,6 +118,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor >&/dev/null || : %{_libdir}/pkgconfig/gnome-settings-daemon.pc %changelog +* Wed Feb 23 2011 Cosimo Cecchi - 2.91.90-2 +- Include an upstream patch to fix a possible crasher + * Tue Feb 22 2011 Matthias Clasen 2.91.90-1 - Update to 2.91.90 From 96bff0ab9c0d7d6809c73c7563b3bc1c2d569de2 Mon Sep 17 00:00:00 2001 From: Cosimo Cecchi Date: Wed, 23 Feb 2011 10:37:24 -0500 Subject: [PATCH 05/21] Drop unused patches --- ..._datetime_check_tz_name-never-workin.patch | 28 ------------------- ...ys-Fix-crash-when-keybindings-change.patch | 28 ------------------- slight-hinting.patch | 12 -------- 3 files changed, 68 deletions(-) delete mode 100644 0001-datetime-Fix-gsd_datetime_check_tz_name-never-workin.patch delete mode 100644 0001-media-keys-Fix-crash-when-keybindings-change.patch delete mode 100644 slight-hinting.patch diff --git a/0001-datetime-Fix-gsd_datetime_check_tz_name-never-workin.patch b/0001-datetime-Fix-gsd_datetime_check_tz_name-never-workin.patch deleted file mode 100644 index 69695b5..0000000 --- a/0001-datetime-Fix-gsd_datetime_check_tz_name-never-workin.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 967c7a9bb41ecde9293ccfd672f1b7c491e9a268 Mon Sep 17 00:00:00 2001 -From: Bastien Nocera -Date: Tue, 8 Feb 2011 23:11:08 +0000 -Subject: [PATCH] datetime: Fix gsd_datetime_check_tz_name() never working - -Wrong variable passed into g_file_new_for_path()... - -https://bugzilla.redhat.com/show_bug.cgi?id=674999 ---- - plugins/datetime/gsd-datetime-mechanism.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/plugins/datetime/gsd-datetime-mechanism.c b/plugins/datetime/gsd-datetime-mechanism.c -index 89f1c66..4f34f0b 100644 ---- a/plugins/datetime/gsd-datetime-mechanism.c -+++ b/plugins/datetime/gsd-datetime-mechanism.c -@@ -517,7 +517,7 @@ gsd_datetime_check_tz_name (const char *tz, - tz_path = g_build_filename (SYSTEM_ZONEINFODIR, tz, NULL); - - /* Get the actual resolved path */ -- file = g_file_new_for_path (tz); -+ file = g_file_new_for_path (tz_path); - actual_path = g_file_get_path (file); - g_object_unref (file); - --- -1.7.4 - diff --git a/0001-media-keys-Fix-crash-when-keybindings-change.patch b/0001-media-keys-Fix-crash-when-keybindings-change.patch deleted file mode 100644 index 4c6742c..0000000 --- a/0001-media-keys-Fix-crash-when-keybindings-change.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 89b4b516edfd5ec19f8987d63624c28fc2f30f8f Mon Sep 17 00:00:00 2001 -From: Bastien Nocera -Date: Wed, 16 Feb 2011 16:26:45 +0000 -Subject: [PATCH] media-keys: Fix crash when keybindings change - -We need to skip over hard-coded keys which don't have a -key name. ---- - plugins/media-keys/gsd-media-keys-manager.c | 3 +++ - 1 files changed, 3 insertions(+), 0 deletions(-) - -diff --git a/plugins/media-keys/gsd-media-keys-manager.c b/plugins/media-keys/gsd-media-keys-manager.c -index 1c1b2cf..7d42f49 100644 ---- a/plugins/media-keys/gsd-media-keys-manager.c -+++ b/plugins/media-keys/gsd-media-keys-manager.c -@@ -292,6 +292,9 @@ update_kbd_cb (GSettings *settings, - - /* Find the key that was modified */ - for (i = 0; i < HANDLED_KEYS; i++) { -+ /* Skip over hard-coded keys */ -+ if (keys[i].settings_key == NULL) -+ continue; - if (strcmp (key, keys[i].settings_key) == 0) { - char *tmp; - Key *key; --- -1.7.4 - diff --git a/slight-hinting.patch b/slight-hinting.patch deleted file mode 100644 index 31b4ae4..0000000 --- a/slight-hinting.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up gnome-settings-daemon-2.28.1/data/desktop_gnome_font_rendering.schemas.in.slight-hinting gnome-settings-daemon-2.28.1/data/desktop_gnome_font_rendering.schemas.in ---- gnome-settings-daemon-2.28.1/data/desktop_gnome_font_rendering.schemas.in.slight-hinting 2009-10-26 17:39:06.045797092 -0400 -+++ gnome-settings-daemon-2.28.1/data/desktop_gnome_font_rendering.schemas.in 2009-10-26 17:39:45.649802771 -0400 -@@ -35,7 +35,7 @@ - /desktop/gnome/font_rendering/hinting - gnome - string -- medium -+ slight - - Hinting - From 95b4d61f8360c2e674b88332d2a424fbeb7bfff0 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 23 Feb 2011 11:49:25 -0500 Subject: [PATCH 06/21] build all plugins --- gnome-settings-daemon.spec | 83 +++++++++++++++++++++++++++++++++++--- 1 file changed, 77 insertions(+), 6 deletions(-) diff --git a/gnome-settings-daemon.spec b/gnome-settings-daemon.spec index f58c244..8147da1 100644 --- a/gnome-settings-daemon.spec +++ b/gnome-settings-daemon.spec @@ -1,6 +1,6 @@ Name: gnome-settings-daemon Version: 2.91.90 -Release: 2%{?dist} +Release: 3%{?dist} Summary: The daemon sharing settings from GNOME to GTK+/KDE applications Group: System Environment/Daemons @@ -12,8 +12,6 @@ Source: http://download.gnome.org/sources/%{name}/2.91/%{name}-%{version Requires(pre): GConf2 >= 2.14 Requires(preun): GConf2 >= 2.14 Requires(post): GConf2 >= 2.14 -Requires(post): /usr/bin/gtk-update-icon-cache -Requires(postun): /usr/bin/gtk-update-icon-cache Requires: control-center-filesystem @@ -34,6 +32,8 @@ BuildRequires: polkit-devel BuildRequires: autoconf automake libtool BuildRequires: libxklavier-devel BuildRequires: gsettings-desktop-schemas-devel >= 0.1.7 +BuildRequires: PackageKit-glib-devel +BuildRequires: cups-devel Patch1: g-s-d-fix-crasher-screensaver-unlock.patch @@ -59,7 +59,9 @@ developing applications that use %{name}. %build # https://fedoraproject.org/wiki/Features/ChangeInImplicitDSOLinking #export LIBS="-lX11 -lm" -%configure --enable-static=no --enable-profiling +%configure --disable-static \ + --enable-profiling \ + --enable-packagekit make %{?_smp_mflags} @@ -95,7 +97,69 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor >&/dev/null || : %doc AUTHORS COPYING NEWS %dir %{_sysconfdir}/gnome-settings-daemon %dir %{_sysconfdir}/gnome-settings-daemon/xrandr -%{_libdir}/gnome-settings-daemon-3.0 + +# list plugins explicitly, so we notice if one goes missing +# some of these don't have a separate gschema +%{_libdir}/gnome-settings-daemon-3.0/a11y-keyboard.gnome-settings-plugin +%{_libdir}/gnome-settings-daemon-3.0/liba11y-keyboard.so + +%{_libdir}/gnome-settings-daemon-3.0/automount.gnome-settings-plugin +%{_libdir}/gnome-settings-daemon-3.0/libautomount.so + +%{_libdir}/gnome-settings-daemon-3.0/background.gnome-settings-plugin +%{_libdir}/gnome-settings-daemon-3.0/libbackground.so + +%{_libdir}/gnome-settings-daemon-3.0/clipboard.gnome-settings-plugin +%{_libdir}/gnome-settings-daemon-3.0/libclipboard.so + +%{_libdir}/gnome-settings-daemon-3.0/housekeeping.gnome-settings-plugin +%{_libdir}/gnome-settings-daemon-3.0/libhousekeeping.so +%{_datadir}/glib-2.0/schemas/org.gnome.settings-daemon.plugins.housekeeping.gschema.xml + +%{_libdir}/gnome-settings-daemon-3.0/keybindings.gnome-settings-plugin +%{_libdir}/gnome-settings-daemon-3.0/libkeybindings.so + +%{_libdir}/gnome-settings-daemon-3.0/keyboard.gnome-settings-plugin +%{_libdir}/gnome-settings-daemon-3.0/libkeyboard.so +%{_datadir}/glib-2.0/schemas/org.gnome.settings-daemon.plugins.keyboard.gschema.xml + +%{_libdir}/gnome-settings-daemon-3.0/media-keys.gnome-settings-plugin +%{_libdir}/gnome-settings-daemon-3.0/libmedia-keys.so +%{_datadir}/glib-2.0/schemas/org.gnome.settings-daemon.plugins.media-keys.gschema.xml + +%{_libdir}/gnome-settings-daemon-3.0/mouse.gnome-settings-plugin +%{_libdir}/gnome-settings-daemon-3.0/libmouse.so + +# no power plugin yet, just a schema +%{_datadir}/glib-2.0/schemas/org.gnome.settings-daemon.plugins.power.gschema.xml + +%{_libdir}/gnome-settings-daemon-3.0/print-notifications.gnome-settings-plugin +%{_libdir}/gnome-settings-daemon-3.0/libprint-notifications.so +%{_datadir}/glib-2.0/schemas/org.gnome.settings-daemon.plugins.print-notifications.gschema.xml + +%{_libdir}/gnome-settings-daemon-3.0/smartcard.gnome-settings-plugin +%{_libdir}/gnome-settings-daemon-3.0/libsmartcard.so + +%{_libdir}/gnome-settings-daemon-3.0/sound.gnome-settings-plugin +%{_libdir}/gnome-settings-daemon-3.0/libsound.so + +%{_libdir}/gnome-settings-daemon-3.0/updates.gnome-settings-plugin +%{_libdir}/gnome-settings-daemon-3.0/libupdates.so +%{_datadir}/glib-2.0/schemas/org.gnome.settings-daemon.plugins.updates.gschema.xml + +%{_libdir}/gnome-settings-daemon-3.0/wacom.gnome-settings-plugin +%{_libdir}/gnome-settings-daemon-3.0/libwacom.so +%{_datadir}/glib-2.0/schemas/org.gnome.settings-daemon.peripherals.gschema.xml +%{_datadir}/glib-2.0/schemas/org.gnome.settings-daemon.peripherals.wacom.gschema.xml + +%{_libdir}/gnome-settings-daemon-3.0/xrandr.gnome-settings-plugin +%{_libdir}/gnome-settings-daemon-3.0/libxrandr.so +%{_datadir}/glib-2.0/schemas/org.gnome.settings-daemon.plugins.xrandr.gschema.xml + +%{_libdir}/gnome-settings-daemon-3.0/xsettings.gnome-settings-plugin +%{_libdir}/gnome-settings-daemon-3.0/libxsettings.so +%{_datadir}/glib-2.0/schemas/org.gnome.settings-daemon.plugins.xsettings.gschema.xml + %{_libexecdir}/gnome-settings-daemon %{_libexecdir}/gsd-locate-pointer %{_datadir}/gnome-settings-daemon/ @@ -108,7 +172,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor >&/dev/null || : %{_datadir}/dbus-1/system-services/org.gnome.SettingsDaemon.DateTimeMechanism.service %{_datadir}/polkit-1/actions/org.gnome.settingsdaemon.datetimemechanism.policy %{_datadir}/GConf/gsettings/gnome-settings-daemon.convert -%{_datadir}/glib-2.0/schemas/*.xml + +%{_datadir}/glib-2.0/schemas/org.gnome.settings-daemon.enums.xml +%{_datadir}/glib-2.0/schemas/org.gnome.settings-daemon.plugins.gschema.xml + %{_datadir}/man/man1/gnome-settings-daemon.1.gz @@ -118,6 +185,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor >&/dev/null || : %{_libdir}/pkgconfig/gnome-settings-daemon.pc %changelog +* Wed Feb 23 2011 Matthias Clasen - 2.91.90-3 +- BR PackageKit and cups +- Explicitly list plugins so we notice if they go missing + * Wed Feb 23 2011 Cosimo Cecchi - 2.91.90-2 - Include an upstream patch to fix a possible crasher From e048f1bda201f4466b1df00323512828d910caca Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 23 Feb 2011 12:12:53 -0500 Subject: [PATCH 07/21] more BRs --- gnome-settings-daemon.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/gnome-settings-daemon.spec b/gnome-settings-daemon.spec index 8147da1..3e0d1d9 100644 --- a/gnome-settings-daemon.spec +++ b/gnome-settings-daemon.spec @@ -34,6 +34,7 @@ BuildRequires: libxklavier-devel BuildRequires: gsettings-desktop-schemas-devel >= 0.1.7 BuildRequires: PackageKit-glib-devel BuildRequires: cups-devel +BuildRequires: upower-devel Patch1: g-s-d-fix-crasher-screensaver-unlock.patch From 45c6d52804d865a190b046bba08689d1f3f5751e Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 23 Feb 2011 12:32:24 -0500 Subject: [PATCH 08/21] More BRs --- gnome-settings-daemon.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gnome-settings-daemon.spec b/gnome-settings-daemon.spec index 3e0d1d9..89096af 100644 --- a/gnome-settings-daemon.spec +++ b/gnome-settings-daemon.spec @@ -35,6 +35,8 @@ BuildRequires: gsettings-desktop-schemas-devel >= 0.1.7 BuildRequires: PackageKit-glib-devel BuildRequires: cups-devel BuildRequires: upower-devel +BuildRequires: libgudev1-devel +BuildRequires: nss-devel Patch1: g-s-d-fix-crasher-screensaver-unlock.patch From 2063955cdcff55fe0485d6fd0d863f12c7bc2de1 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 25 Feb 2011 22:35:55 -0500 Subject: [PATCH 09/21] fix undefined symbols in the updates plugin --- g-s-d-undefined-symbols.patch | 12 ++++++++++++ gnome-settings-daemon.spec | 9 ++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 g-s-d-undefined-symbols.patch diff --git a/g-s-d-undefined-symbols.patch b/g-s-d-undefined-symbols.patch new file mode 100644 index 0000000..4d7db9b --- /dev/null +++ b/g-s-d-undefined-symbols.patch @@ -0,0 +1,12 @@ +diff -up gnome-settings-daemon-2.91.90/configure.ac.undefined gnome-settings-daemon-2.91.90/configure.ac +--- gnome-settings-daemon-2.91.90/configure.ac.undefined 2011-02-25 22:33:12.551043059 -0500 ++++ gnome-settings-daemon-2.91.90/configure.ac 2011-02-25 22:34:05.670378974 -0500 +@@ -281,7 +281,7 @@ AC_ARG_ENABLE(packagekit, + + if test x$WANT_PACKAGEKIT = xyes ; then + PK_REQUIRED_VERSION=0.6.4 +- PKG_CHECK_MODULES(PACKAGEKIT, glib-2.0 packagekit-glib2 >= $PK_REQUIRED_VERSION upower-glib >= 0.9.1, ++ PKG_CHECK_MODULES(PACKAGEKIT, glib-2.0 packagekit-glib2 >= $PK_REQUIRED_VERSION upower-glib >= 0.9.1 gudev-1.0 libnotify >= $LIBNOTIFY_REQUIRED_VERSION, + [have_packagekit=true + AC_DEFINE(HAVE_PACKAGEKIT, 1, [Define if PackageKit should be used])], + [have_packagekit=false]) diff --git a/gnome-settings-daemon.spec b/gnome-settings-daemon.spec index 89096af..8d182e7 100644 --- a/gnome-settings-daemon.spec +++ b/gnome-settings-daemon.spec @@ -1,6 +1,6 @@ Name: gnome-settings-daemon Version: 2.91.90 -Release: 3%{?dist} +Release: 4%{?dist} Summary: The daemon sharing settings from GNOME to GTK+/KDE applications Group: System Environment/Daemons @@ -39,6 +39,7 @@ BuildRequires: libgudev1-devel BuildRequires: nss-devel Patch1: g-s-d-fix-crasher-screensaver-unlock.patch +Patch2: g-s-d-undefined-symbols.patch %description A daemon to share settings from GNOME to other applications. It also @@ -58,6 +59,9 @@ developing applications that use %{name}. %setup -q %patch1 -p1 -b .unlock +%patch2 -p1 -b .undefined-symbols + +autoreconf -i -f %build # https://fedoraproject.org/wiki/Features/ChangeInImplicitDSOLinking @@ -188,6 +192,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor >&/dev/null || : %{_libdir}/pkgconfig/gnome-settings-daemon.pc %changelog +* Fri Feb 25 2011 Matthias Clasen - 2.91.90-4 +- Fix undefined symbols in the updates plugin + * Wed Feb 23 2011 Matthias Clasen - 2.91.90-3 - BR PackageKit and cups - Explicitly list plugins so we notice if they go missing From 303468f336c241a69018335d84130ddc18a1eb06 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Tue, 8 Mar 2011 08:40:48 +0000 Subject: [PATCH 10/21] Update to 2.91.91 --- .gitignore | 1 + g-s-d-fix-crasher-screensaver-unlock.patch | 27 ---------------------- g-s-d-undefined-symbols.patch | 12 ---------- gnome-settings-daemon.spec | 7 ++++-- sources | 2 +- 5 files changed, 7 insertions(+), 42 deletions(-) delete mode 100644 g-s-d-fix-crasher-screensaver-unlock.patch delete mode 100644 g-s-d-undefined-symbols.patch diff --git a/.gitignore b/.gitignore index 5da4be6..6282984 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ gnome-settings-daemon-2.31.6.tar.bz2 /gnome-settings-daemon-2.91.8.tar.bz2 /gnome-settings-daemon-2.91.9.tar.bz2 /gnome-settings-daemon-2.91.90.tar.bz2 +/gnome-settings-daemon-2.91.91.tar.bz2 diff --git a/g-s-d-fix-crasher-screensaver-unlock.patch b/g-s-d-fix-crasher-screensaver-unlock.patch deleted file mode 100644 index f85db79..0000000 --- a/g-s-d-fix-crasher-screensaver-unlock.patch +++ /dev/null @@ -1,27 +0,0 @@ -commit 90c0f8676b06041c599fd941514e09ba8704f0ef -Author: Martin Pitt -Date: Tue Feb 22 08:35:37 2011 +0100 - - automount: Fix crash when unlocking screen saver - - Fix commit 71deedf: We _do_ expect that some volumes have queued up in - check_volume_queue() once the screen saver got inactive, so don't crash with an - assertion failure in this case. - - Just check whether the screen saver is active, and don't mount anything if so. - -diff --git a/plugins/automount/gsd-automount-manager.c b/plugins/automount/gsd-automount-manager.c -index 788a5fe..5988f2b 100644 ---- a/plugins/automount/gsd-automount-manager.c -+++ b/plugins/automount/gsd-automount-manager.c -@@ -184,8 +184,8 @@ check_volume_queue (GsdAutomountManager *manager) - - l = manager->priv->volume_queue; - -- if (!manager->priv->screensaver_active) { -- g_assert (l == NULL); -+ if (manager->priv->screensaver_active) { -+ return; - } - - while (l != NULL) { diff --git a/g-s-d-undefined-symbols.patch b/g-s-d-undefined-symbols.patch deleted file mode 100644 index 4d7db9b..0000000 --- a/g-s-d-undefined-symbols.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up gnome-settings-daemon-2.91.90/configure.ac.undefined gnome-settings-daemon-2.91.90/configure.ac ---- gnome-settings-daemon-2.91.90/configure.ac.undefined 2011-02-25 22:33:12.551043059 -0500 -+++ gnome-settings-daemon-2.91.90/configure.ac 2011-02-25 22:34:05.670378974 -0500 -@@ -281,7 +281,7 @@ AC_ARG_ENABLE(packagekit, - - if test x$WANT_PACKAGEKIT = xyes ; then - PK_REQUIRED_VERSION=0.6.4 -- PKG_CHECK_MODULES(PACKAGEKIT, glib-2.0 packagekit-glib2 >= $PK_REQUIRED_VERSION upower-glib >= 0.9.1, -+ PKG_CHECK_MODULES(PACKAGEKIT, glib-2.0 packagekit-glib2 >= $PK_REQUIRED_VERSION upower-glib >= 0.9.1 gudev-1.0 libnotify >= $LIBNOTIFY_REQUIRED_VERSION, - [have_packagekit=true - AC_DEFINE(HAVE_PACKAGEKIT, 1, [Define if PackageKit should be used])], - [have_packagekit=false]) diff --git a/gnome-settings-daemon.spec b/gnome-settings-daemon.spec index 8d182e7..f781a4e 100644 --- a/gnome-settings-daemon.spec +++ b/gnome-settings-daemon.spec @@ -1,6 +1,6 @@ Name: gnome-settings-daemon -Version: 2.91.90 -Release: 4%{?dist} +Version: 2.91.91 +Release: 1%{?dist} Summary: The daemon sharing settings from GNOME to GTK+/KDE applications Group: System Environment/Daemons @@ -192,6 +192,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor >&/dev/null || : %{_libdir}/pkgconfig/gnome-settings-daemon.pc %changelog +* Tue Mar 08 2011 Bastien Nocera 2.91.91-1 +- Update to 2.91.91 + * Fri Feb 25 2011 Matthias Clasen - 2.91.90-4 - Fix undefined symbols in the updates plugin diff --git a/sources b/sources index 5ee2f55..b3758c5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -57a65d00ed96a42b2abaa6c21defdfe7 gnome-settings-daemon-2.91.90.tar.bz2 +e5aab6a08f57f9336464be8fc39a7f15 gnome-settings-daemon-2.91.91.tar.bz2 From 26668cfb3939737d1f77f83a6951eee6fcc08eaa Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Tue, 8 Mar 2011 08:45:04 +0000 Subject: [PATCH 11/21] Remove patches from spec --- gnome-settings-daemon.spec | 6 ------ 1 file changed, 6 deletions(-) diff --git a/gnome-settings-daemon.spec b/gnome-settings-daemon.spec index f781a4e..025040b 100644 --- a/gnome-settings-daemon.spec +++ b/gnome-settings-daemon.spec @@ -38,9 +38,6 @@ BuildRequires: upower-devel BuildRequires: libgudev1-devel BuildRequires: nss-devel -Patch1: g-s-d-fix-crasher-screensaver-unlock.patch -Patch2: g-s-d-undefined-symbols.patch - %description A daemon to share settings from GNOME to other applications. It also handles global keybindings, as well as a number of desktop-wide settings. @@ -58,9 +55,6 @@ developing applications that use %{name}. %prep %setup -q -%patch1 -p1 -b .unlock -%patch2 -p1 -b .undefined-symbols - autoreconf -i -f %build From 42f3c74fd3d23e407697a8d705e95b7d5d344049 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Tue, 8 Mar 2011 09:10:25 +0000 Subject: [PATCH 12/21] Fix filelist --- gnome-settings-daemon.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gnome-settings-daemon.spec b/gnome-settings-daemon.spec index 025040b..1c0f112 100644 --- a/gnome-settings-daemon.spec +++ b/gnome-settings-daemon.spec @@ -177,6 +177,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor >&/dev/null || : %{_datadir}/glib-2.0/schemas/org.gnome.settings-daemon.enums.xml %{_datadir}/glib-2.0/schemas/org.gnome.settings-daemon.plugins.gschema.xml +%{_datadir}/dbus-1/interfaces/org.gnome.SettingsDaemonUpdates.xml + + %{_datadir}/man/man1/gnome-settings-daemon.1.gz From f76b0323d88aed5ed9d9f61cb4b6c22683145351 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Fri, 11 Mar 2011 12:25:09 +0000 Subject: [PATCH 13/21] Add libXxf86misc-devel requires so that key repeat/delay works --- gnome-settings-daemon.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gnome-settings-daemon.spec b/gnome-settings-daemon.spec index 1c0f112..567b32f 100644 --- a/gnome-settings-daemon.spec +++ b/gnome-settings-daemon.spec @@ -1,6 +1,6 @@ Name: gnome-settings-daemon Version: 2.91.91 -Release: 1%{?dist} +Release: 2%{?dist} Summary: The daemon sharing settings from GNOME to GTK+/KDE applications Group: System Environment/Daemons @@ -19,7 +19,7 @@ BuildRequires: dbus-glib-devel BuildRequires: GConf2-devel BuildRequires: gtk3-devel >= 2.99.0 BuildRequires: gnome-desktop3-devel -BuildRequires: xorg-x11-proto-devel +BuildRequires: xorg-x11-proto-devel libXxf86misc-devel BuildRequires: gstreamer-devel BuildRequires: gstreamer-plugins-base-devel BuildRequires: pulseaudio-libs-devel @@ -189,6 +189,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor >&/dev/null || : %{_libdir}/pkgconfig/gnome-settings-daemon.pc %changelog +* Fri Mar 11 2011 Bastien Nocera 2.91.91-2 +- Add libXxf86misc-devel requires so that key repeat/delay works + * Tue Mar 08 2011 Bastien Nocera 2.91.91-1 - Update to 2.91.91 From bc927754ee45d741140284c5fb7672fca2213109 Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Wed, 16 Mar 2011 10:30:10 +0000 Subject: [PATCH 14/21] Add a patch from upstream to fix the updates plugin. --- ...gs-daemon-2.91.91-fix-updates-plugin.patch | 64 +++++++++++++++++++ gnome-settings-daemon.spec | 9 ++- 2 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 gnome-settings-daemon-2.91.91-fix-updates-plugin.patch diff --git a/gnome-settings-daemon-2.91.91-fix-updates-plugin.patch b/gnome-settings-daemon-2.91.91-fix-updates-plugin.patch new file mode 100644 index 0000000..ca95455 --- /dev/null +++ b/gnome-settings-daemon-2.91.91-fix-updates-plugin.patch @@ -0,0 +1,64 @@ +diff --git a/plugins/updates/gsd-updates-manager.c b/plugins/updates/gsd-updates-manager.c +index d869712..64373bd 100644 +--- a/plugins/updates/gsd-updates-manager.c ++++ b/plugins/updates/gsd-updates-manager.c +@@ -350,15 +350,16 @@ notify_normal_updates_maybe (GsdUpdatesManager *manager, GPtrArray *array) + NotifyNotification *notification; + + /* find out if enough time has passed since the last notification */ +- time_now = g_get_real_time (); ++ time_now = g_get_real_time () / 1000000; + freq_updates_notify = g_settings_get_int (manager->priv->settings_gsd, + GSD_SETTINGS_FREQUENCY_UPDATES_NOTIFICATION); + g_settings_get (manager->priv->settings_gsd, + GSD_SETTINGS_LAST_UPDATES_NOTIFICATION, + "t", &time_last_notify); +- if ((guint64) freq_updates_notify < time_now - time_last_notify) { +- g_debug ("not showing non-critical notification as already shown %i days ago", +- (guint) (time_now - time_last_notify) / (24 * 60 * 60)); ++ if (time_last_notify > 0 && ++ (guint64) freq_updates_notify > time_now - time_last_notify) { ++ g_debug ("not showing non-critical notification as already shown %i hours ago", ++ (guint) (time_now - time_last_notify) / (60 * 60)); + return; + } + +@@ -835,6 +836,7 @@ get_updates_finished_cb (GObject *object, + if (update == GSD_UPDATE_TYPE_SECURITY) { + if (security_array->len == 0) { + g_debug ("policy security, but none available"); ++ notify_normal_updates_maybe (manager, array); + goto out; + } + +@@ -1405,7 +1407,7 @@ gsd_updates_manager_start (GsdUpdatesManager *manager, + set_install_root (manager); + + /* load introspection from file */ +- file = g_file_new_for_path (DATADIR "/dbus-1/interfaces/org.gnome.ColorManager.xml"); ++ file = g_file_new_for_path (DATADIR "/dbus-1/interfaces/org.gnome.SettingsDaemonUpdates.xml"); + ret = g_file_load_contents (file, NULL, &introspection_data, NULL, NULL, error); + if (!ret) + goto out; +diff --git a/plugins/updates/gsd-updates-refresh.c b/plugins/updates/gsd-updates-refresh.c +index 9193358..15e6917 100644 +--- a/plugins/updates/gsd-updates-refresh.c ++++ b/plugins/updates/gsd-updates-refresh.c +@@ -506,7 +506,7 @@ session_presence_signal_cb (GDBusProxy *proxy, + if (g_strcmp0 (signal_name, "StatusChanged") != 0) + return; + +- /* map stauts code into boolean */ ++ /* map status code into boolean */ + g_variant_get (parameters, "(u)", &status); + refresh->priv->session_idle = (status == PRESENCE_STATUS_IDLE); + g_debug ("setting is_idle %i", +@@ -578,7 +578,7 @@ gsd_updates_refresh_init (GsdUpdatesRefresh *refresh) + refresh); + status = g_dbus_proxy_get_cached_property (refresh->priv->proxy_session, + "status"); +- g_variant_get (status, "(u)", &status_code); ++ g_variant_get (status, "u", &status_code); + refresh->priv->session_idle = (status_code == PRESENCE_STATUS_IDLE); + g_variant_unref (status); + } diff --git a/gnome-settings-daemon.spec b/gnome-settings-daemon.spec index 567b32f..dddcd9c 100644 --- a/gnome-settings-daemon.spec +++ b/gnome-settings-daemon.spec @@ -1,6 +1,6 @@ Name: gnome-settings-daemon Version: 2.91.91 -Release: 2%{?dist} +Release: 3%{?dist} Summary: The daemon sharing settings from GNOME to GTK+/KDE applications Group: System Environment/Daemons @@ -9,6 +9,9 @@ URL: http://download.gnome.org/sources/%{name} #VCS: git:git://git.gnome.org/gnome-settings-daemon Source: http://download.gnome.org/sources/%{name}/2.91/%{name}-%{version}.tar.bz2 +# Already upstream +Patch0: gnome-settings-daemon-2.91.91-fix-updates-plugin.patch + Requires(pre): GConf2 >= 2.14 Requires(preun): GConf2 >= 2.14 Requires(post): GConf2 >= 2.14 @@ -54,6 +57,7 @@ developing applications that use %{name}. %prep %setup -q +%patch0 -p1 -b .fix-updates autoreconf -i -f @@ -189,6 +193,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor >&/dev/null || : %{_libdir}/pkgconfig/gnome-settings-daemon.pc %changelog +* Wed Mar 16 2011 Richard Hughes 2.91.91-3 +- Add a patch from upstream to fix the updates plugin. + * Fri Mar 11 2011 Bastien Nocera 2.91.91-2 - Add libXxf86misc-devel requires so that key repeat/delay works From 0e19217d7d5027967d92ec8fb5dd5c05cb485f0c Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 21 Mar 2011 21:31:46 -0400 Subject: [PATCH 15/21] 2.91.92 --- .gitignore | 1 + gnome-settings-daemon.spec | 11 +++++------ sources | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 6282984..01a0063 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ gnome-settings-daemon-2.31.6.tar.bz2 /gnome-settings-daemon-2.91.9.tar.bz2 /gnome-settings-daemon-2.91.90.tar.bz2 /gnome-settings-daemon-2.91.91.tar.bz2 +/gnome-settings-daemon-2.91.92.tar.bz2 diff --git a/gnome-settings-daemon.spec b/gnome-settings-daemon.spec index dddcd9c..d0f6ccf 100644 --- a/gnome-settings-daemon.spec +++ b/gnome-settings-daemon.spec @@ -1,6 +1,6 @@ Name: gnome-settings-daemon -Version: 2.91.91 -Release: 3%{?dist} +Version: 2.91.92 +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}/2.91/%{name}-%{version}.tar.bz2 -# Already upstream -Patch0: gnome-settings-daemon-2.91.91-fix-updates-plugin.patch - Requires(pre): GConf2 >= 2.14 Requires(preun): GConf2 >= 2.14 Requires(post): GConf2 >= 2.14 @@ -57,7 +54,6 @@ developing applications that use %{name}. %prep %setup -q -%patch0 -p1 -b .fix-updates autoreconf -i -f @@ -193,6 +189,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor >&/dev/null || : %{_libdir}/pkgconfig/gnome-settings-daemon.pc %changelog +* Mon Mar 21 2011 Matthias Clasen 2.91.92-1 +- Update 2.91.92 + * Wed Mar 16 2011 Richard Hughes 2.91.91-3 - Add a patch from upstream to fix the updates plugin. diff --git a/sources b/sources index b3758c5..c65aa06 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -e5aab6a08f57f9336464be8fc39a7f15 gnome-settings-daemon-2.91.91.tar.bz2 +174414410a6bafbadc364cc15bfaf3ec gnome-settings-daemon-2.91.92.tar.bz2 From 2969e08fe716f219eaf46b639724852b1161ae04 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 21 Mar 2011 21:47:45 -0400 Subject: [PATCH 16/21] Fix file lists --- gnome-settings-daemon.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gnome-settings-daemon.spec b/gnome-settings-daemon.spec index d0f6ccf..309a90f 100644 --- a/gnome-settings-daemon.spec +++ b/gnome-settings-daemon.spec @@ -163,6 +163,8 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor >&/dev/null || : %{_libexecdir}/gnome-settings-daemon %{_libexecdir}/gsd-locate-pointer +%{_libexecdir}/gsd-printer + %{_datadir}/gnome-settings-daemon/ %{_datadir}/dbus-1/services/org.gnome.SettingsDaemon.service %{_sysconfdir}/xdg/autostart/gnome-settings-daemon.desktop @@ -187,6 +189,8 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor >&/dev/null || : %defattr(-,root,root,-) %{_includedir}/gnome-settings-daemon-3.0 %{_libdir}/pkgconfig/gnome-settings-daemon.pc +%dir %{_datadir}/gnome-settings-daemon-3.0 +%{_datadir}/gnome-settings-daemon-3.0/input-device-example.sh %changelog * Mon Mar 21 2011 Matthias Clasen 2.91.92-1 From 19bb53f6ab134bce6c7551cabe45b408d114307e Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Fri, 25 Mar 2011 16:34:08 +0000 Subject: [PATCH 17/21] Update to 2.91.93 --- .gitignore | 1 + ...gs-daemon-2.91.91-fix-updates-plugin.patch | 64 ------------------- gnome-settings-daemon.spec | 5 +- sources | 2 +- 4 files changed, 6 insertions(+), 66 deletions(-) delete mode 100644 gnome-settings-daemon-2.91.91-fix-updates-plugin.patch diff --git a/.gitignore b/.gitignore index 01a0063..33bc7c4 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ gnome-settings-daemon-2.31.6.tar.bz2 /gnome-settings-daemon-2.91.90.tar.bz2 /gnome-settings-daemon-2.91.91.tar.bz2 /gnome-settings-daemon-2.91.92.tar.bz2 +/gnome-settings-daemon-2.91.93.tar.bz2 diff --git a/gnome-settings-daemon-2.91.91-fix-updates-plugin.patch b/gnome-settings-daemon-2.91.91-fix-updates-plugin.patch deleted file mode 100644 index ca95455..0000000 --- a/gnome-settings-daemon-2.91.91-fix-updates-plugin.patch +++ /dev/null @@ -1,64 +0,0 @@ -diff --git a/plugins/updates/gsd-updates-manager.c b/plugins/updates/gsd-updates-manager.c -index d869712..64373bd 100644 ---- a/plugins/updates/gsd-updates-manager.c -+++ b/plugins/updates/gsd-updates-manager.c -@@ -350,15 +350,16 @@ notify_normal_updates_maybe (GsdUpdatesManager *manager, GPtrArray *array) - NotifyNotification *notification; - - /* find out if enough time has passed since the last notification */ -- time_now = g_get_real_time (); -+ time_now = g_get_real_time () / 1000000; - freq_updates_notify = g_settings_get_int (manager->priv->settings_gsd, - GSD_SETTINGS_FREQUENCY_UPDATES_NOTIFICATION); - g_settings_get (manager->priv->settings_gsd, - GSD_SETTINGS_LAST_UPDATES_NOTIFICATION, - "t", &time_last_notify); -- if ((guint64) freq_updates_notify < time_now - time_last_notify) { -- g_debug ("not showing non-critical notification as already shown %i days ago", -- (guint) (time_now - time_last_notify) / (24 * 60 * 60)); -+ if (time_last_notify > 0 && -+ (guint64) freq_updates_notify > time_now - time_last_notify) { -+ g_debug ("not showing non-critical notification as already shown %i hours ago", -+ (guint) (time_now - time_last_notify) / (60 * 60)); - return; - } - -@@ -835,6 +836,7 @@ get_updates_finished_cb (GObject *object, - if (update == GSD_UPDATE_TYPE_SECURITY) { - if (security_array->len == 0) { - g_debug ("policy security, but none available"); -+ notify_normal_updates_maybe (manager, array); - goto out; - } - -@@ -1405,7 +1407,7 @@ gsd_updates_manager_start (GsdUpdatesManager *manager, - set_install_root (manager); - - /* load introspection from file */ -- file = g_file_new_for_path (DATADIR "/dbus-1/interfaces/org.gnome.ColorManager.xml"); -+ file = g_file_new_for_path (DATADIR "/dbus-1/interfaces/org.gnome.SettingsDaemonUpdates.xml"); - ret = g_file_load_contents (file, NULL, &introspection_data, NULL, NULL, error); - if (!ret) - goto out; -diff --git a/plugins/updates/gsd-updates-refresh.c b/plugins/updates/gsd-updates-refresh.c -index 9193358..15e6917 100644 ---- a/plugins/updates/gsd-updates-refresh.c -+++ b/plugins/updates/gsd-updates-refresh.c -@@ -506,7 +506,7 @@ session_presence_signal_cb (GDBusProxy *proxy, - if (g_strcmp0 (signal_name, "StatusChanged") != 0) - return; - -- /* map stauts code into boolean */ -+ /* map status code into boolean */ - g_variant_get (parameters, "(u)", &status); - refresh->priv->session_idle = (status == PRESENCE_STATUS_IDLE); - g_debug ("setting is_idle %i", -@@ -578,7 +578,7 @@ gsd_updates_refresh_init (GsdUpdatesRefresh *refresh) - refresh); - status = g_dbus_proxy_get_cached_property (refresh->priv->proxy_session, - "status"); -- g_variant_get (status, "(u)", &status_code); -+ g_variant_get (status, "u", &status_code); - refresh->priv->session_idle = (status_code == PRESENCE_STATUS_IDLE); - g_variant_unref (status); - } diff --git a/gnome-settings-daemon.spec b/gnome-settings-daemon.spec index 309a90f..295cfe6 100644 --- a/gnome-settings-daemon.spec +++ b/gnome-settings-daemon.spec @@ -1,5 +1,5 @@ Name: gnome-settings-daemon -Version: 2.91.92 +Version: 2.91.93 Release: 1%{?dist} Summary: The daemon sharing settings from GNOME to GTK+/KDE applications @@ -193,6 +193,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor >&/dev/null || : %{_datadir}/gnome-settings-daemon-3.0/input-device-example.sh %changelog +* Fri Mar 25 2011 Bastien Nocera 2.91.93-1 +- Update to 2.91.93 + * Mon Mar 21 2011 Matthias Clasen 2.91.92-1 - Update 2.91.92 diff --git a/sources b/sources index c65aa06..91ce341 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -174414410a6bafbadc364cc15bfaf3ec gnome-settings-daemon-2.91.92.tar.bz2 +840fc84829f4a9587546ad40dd2da39c gnome-settings-daemon-2.91.93.tar.bz2 From 0d3d561881a02e2ed847dc1d1559c925222eb838 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Fri, 25 Mar 2011 17:13:51 +0000 Subject: [PATCH 18/21] Add a11y-settings plugin to filelist --- gnome-settings-daemon.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gnome-settings-daemon.spec b/gnome-settings-daemon.spec index 295cfe6..6aa2e2f 100644 --- a/gnome-settings-daemon.spec +++ b/gnome-settings-daemon.spec @@ -161,6 +161,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor >&/dev/null || : %{_libdir}/gnome-settings-daemon-3.0/libxsettings.so %{_datadir}/glib-2.0/schemas/org.gnome.settings-daemon.plugins.xsettings.gschema.xml +%{_libdir}/gnome-settings-daemon-3.0/a11y-settings.gnome-settings-plugin +%{_libdir}/gnome-settings-daemon-3.0/liba11y-settings.so + %{_libexecdir}/gnome-settings-daemon %{_libexecdir}/gsd-locate-pointer %{_libexecdir}/gsd-printer From 08051e5c746763966f65fb160224d0dc6b359362 Mon Sep 17 00:00:00 2001 From: Marek Kasik Date: Wed, 30 Mar 2011 17:45:23 +0200 Subject: [PATCH 19/21] Make CUPS' subscriptions expirable --- gnome-settings-daemon.spec | 8 +- printing-expirable-subscriptions.patch | 294 +++++++++++++++++++++++++ 2 files changed, 301 insertions(+), 1 deletion(-) create mode 100644 printing-expirable-subscriptions.patch diff --git a/gnome-settings-daemon.spec b/gnome-settings-daemon.spec index 6aa2e2f..cfaea04 100644 --- a/gnome-settings-daemon.spec +++ b/gnome-settings-daemon.spec @@ -1,6 +1,6 @@ Name: gnome-settings-daemon Version: 2.91.93 -Release: 1%{?dist} +Release: 2%{?dist} Summary: The daemon sharing settings from GNOME to GTK+/KDE applications Group: System Environment/Daemons @@ -38,6 +38,8 @@ BuildRequires: upower-devel BuildRequires: libgudev1-devel BuildRequires: nss-devel +Patch0: printing-expirable-subscriptions.patch + %description A daemon to share settings from GNOME to other applications. It also handles global keybindings, as well as a number of desktop-wide settings. @@ -54,6 +56,7 @@ developing applications that use %{name}. %prep %setup -q +%patch0 -p1 -b .subscriptions autoreconf -i -f @@ -196,6 +199,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor >&/dev/null || : %{_datadir}/gnome-settings-daemon-3.0/input-device-example.sh %changelog +* Wed Mar 30 2011 Marek Kasik 2.91.93-2 +- Make CUPS' subscriptions expirable + * Fri Mar 25 2011 Bastien Nocera 2.91.93-1 - Update to 2.91.93 diff --git a/printing-expirable-subscriptions.patch b/printing-expirable-subscriptions.patch new file mode 100644 index 0000000..25a6b45 --- /dev/null +++ b/printing-expirable-subscriptions.patch @@ -0,0 +1,294 @@ +--- a/plugins/print-notifications/gsd-print-notifications-manager.c ++++ b/plugins/print-notifications/gsd-print-notifications-manager.c +@@ -45,6 +45,9 @@ + #define CUPS_DBUS_PATH "/org/cups/cupsd/Notifier" + #define CUPS_DBUS_INTERFACE "org.cups.cupsd.Notifier" + ++#define RENEW_INTERVAL 3500 ++#define SUBSCRIPTION_DURATION 3600 ++ + struct GsdPrintNotificationsManagerPrivate + { + GDBusProxy *cups_proxy; +@@ -512,14 +515,35 @@ scp_handler (GsdPrintNotificationsManager *manager, + } + } + +-gboolean +-gsd_print_notifications_manager_start (GsdPrintNotificationsManager *manager, +- GError **error) ++static void ++cancel_subscription (gint id) + { +- GError *lerror; +- ipp_t *request, *response; +- http_t *http; +- gint num_events = 7; ++ http_t *http; ++ ipp_t *request; ++ ++ if (id >= 0 && ++ ((http = httpConnectEncrypt (cupsServer (), ippPort (), ++ cupsEncryption ())) != NULL)) { ++ request = ippNewRequest (IPP_CANCEL_SUBSCRIPTION); ++ ippAddString (request, IPP_TAG_OPERATION, IPP_TAG_URI, ++ "printer-uri", NULL, "/"); ++ ippAddString (request, IPP_TAG_OPERATION, IPP_TAG_NAME, ++ "requesting-user-name", NULL, cupsUser ()); ++ ippAddInteger (request, IPP_TAG_OPERATION, IPP_TAG_INTEGER, ++ "notify-subscription-id", id); ++ ippDelete (cupsDoRequest (http, request, "/")); ++ } ++} ++ ++static gboolean ++renew_subscription (gpointer data) ++{ ++ GsdPrintNotificationsManager *manager = (GsdPrintNotificationsManager *) data; ++ ipp_attribute_t *attr = NULL; ++ http_t *http; ++ ipp_t *request; ++ ipp_t *response; ++ gint num_events = 7; + static const char * const events[] = { + "job-created", + "job-completed", +@@ -528,50 +552,177 @@ gsd_print_notifications_manager_start (GsdPrintNotificationsManager *manager, + "printer-added", + "printer-deleted", + "printer-state-changed"}; +- ipp_attribute_t *attr = NULL; + +- g_debug ("Starting print-notifications manager"); ++ if ((http = httpConnectEncrypt (cupsServer (), ippPort (), ++ cupsEncryption ())) == NULL) { ++ g_debug ("Connection to CUPS server \'%s\' failed.", cupsServer ()); ++ } ++ else { ++ if (manager->priv->subscription_id >= 0) { ++ request = ippNewRequest (IPP_RENEW_SUBSCRIPTION); ++ ippAddString (request, IPP_TAG_OPERATION, IPP_TAG_URI, ++ "printer-uri", NULL, "/"); ++ ippAddString (request, IPP_TAG_OPERATION, IPP_TAG_NAME, ++ "requesting-user-name", NULL, cupsUser ()); ++ ippAddInteger (request, IPP_TAG_OPERATION, IPP_TAG_INTEGER, ++ "notify-subscription-id", manager->priv->subscription_id); ++ ippAddInteger (request, IPP_TAG_SUBSCRIPTION, IPP_TAG_INTEGER, ++ "notify-lease-duration", SUBSCRIPTION_DURATION); ++ ippDelete (cupsDoRequest (http, request, "/")); ++ } ++ else { ++ request = ippNewRequest (IPP_CREATE_PRINTER_SUBSCRIPTION); ++ ippAddString (request, IPP_TAG_OPERATION, IPP_TAG_URI, ++ "printer-uri", NULL, ++ "/"); ++ ippAddString (request, IPP_TAG_OPERATION, IPP_TAG_NAME, ++ "requesting-user-name", NULL, cupsUser ()); ++ ippAddStrings (request, IPP_TAG_SUBSCRIPTION, IPP_TAG_KEYWORD, ++ "notify-events", num_events, NULL, events); ++ ippAddString (request, IPP_TAG_SUBSCRIPTION, IPP_TAG_KEYWORD, ++ "notify-pull-method", NULL, "ippget"); ++ ippAddString (request, IPP_TAG_SUBSCRIPTION, IPP_TAG_URI, ++ "notify-recipient-uri", NULL, "dbus://"); ++ ippAddInteger (request, IPP_TAG_SUBSCRIPTION, IPP_TAG_INTEGER, ++ "notify-lease-duration", SUBSCRIPTION_DURATION); ++ response = cupsDoRequest (http, request, "/"); ++ ++ if (response != NULL && response->request.status.status_code <= IPP_OK_CONFLICT) { ++ if ((attr = ippFindAttribute (response, "notify-subscription-id", ++ IPP_TAG_INTEGER)) == NULL) ++ g_debug ("No notify-subscription-id in response!\n"); ++ else ++ manager->priv->subscription_id = attr->values[0].integer; ++ } + +- gnome_settings_profile_start (NULL); ++ if (response) ++ ippDelete (response); ++ } ++ httpClose (http); ++ } ++ return TRUE; ++} + +- manager->priv->subscription_id = -1; +- manager->priv->dests = NULL; +- manager->priv->num_dests = 0; +- manager->priv->scp_handler_spawned = FALSE; ++static void ++cancel_old_subscriptions () ++{ ++ http_t *http; ++ ipp_t *request; ++ ipp_t *response; ++ static const char * const old_events[] = { ++ "printer-state-changed", ++ "printer-restarted", ++ "printer-shutdown", ++ "printer-stopped", ++ "printer-added", ++ "printer-deleted", ++ "job-state-changed", ++ "job-created", ++ "job-completed", ++ "job-stopped" }; + + if ((http = httpConnectEncrypt (cupsServer (), ippPort (), + cupsEncryption ())) == NULL) { + g_debug ("Connection to CUPS server \'%s\' failed.", cupsServer ()); + } + else { +- request = ippNewRequest(IPP_CREATE_PRINTER_SUBSCRIPTION); +- ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, +- "/"); +- ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name", +- NULL, cupsUser ()); +- ippAddStrings(request, IPP_TAG_SUBSCRIPTION, IPP_TAG_KEYWORD, "notify-events", +- num_events, NULL, events); +- ippAddString(request, IPP_TAG_SUBSCRIPTION, IPP_TAG_KEYWORD, +- "notify-pull-method", NULL, "ippget"); +- ippAddString(request, IPP_TAG_SUBSCRIPTION, IPP_TAG_URI, "notify-recipient-uri", +- NULL, "dbus://"); +- ippAddInteger(request, IPP_TAG_SUBSCRIPTION, IPP_TAG_INTEGER, +- "notify-lease-duration", 0); +- response = cupsDoRequest(http, request, "/"); ++ request = ippNewRequest (IPP_GET_SUBSCRIPTIONS); ++ ippAddString (request, IPP_TAG_OPERATION, IPP_TAG_URI, ++ "printer-uri", NULL, "/"); ++ ippAddString (request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name", ++ NULL, cupsUser ()); ++ ippAddBoolean (request, IPP_TAG_SUBSCRIPTION, "my-subscriptions", 1); ++ response = cupsDoRequest (http, request, "/"); + + if (response != NULL && response->request.status.status_code <= IPP_OK_CONFLICT) { +- if ((attr = ippFindAttribute(response, "notify-subscription-id", +- IPP_TAG_INTEGER)) == NULL) +- g_debug ("No notify-subscription-id in response!\n"); +- else +- manager->priv->subscription_id = attr->values[0].integer; +- } ++ ipp_attribute_t *events; ++ ipp_attribute_t *attr; ++ gchar *recipient_uri; ++ gint lease_duration; ++ gint id; ++ gint i, j; ++ ++ for (attr = response->attrs; attr; attr = attr->next) { ++ recipient_uri = NULL; ++ events = NULL; ++ id = -1; ++ lease_duration = -1; ++ ++ while (attr && attr->group_tag != IPP_TAG_SUBSCRIPTION) ++ attr = attr->next; ++ ++ while (attr && attr->group_tag == IPP_TAG_SUBSCRIPTION) { ++ if (g_strcmp0 (attr->name, "notify-subscription-id") == 0) ++ id = attr->values[0].integer; ++ else if (g_strcmp0 (attr->name, "notify-recipient-uri") == 0) ++ recipient_uri = attr->values[0].string.text; ++ else if (g_strcmp0 (attr->name, "notify-lease-duration") == 0) ++ lease_duration = attr->values[0].integer; ++ else if (g_strcmp0 (attr->name, "notify-events") == 0) ++ events = attr; ++ attr = attr->next; ++ } ++ ++ if (recipient_uri && events && id >= 0 && lease_duration >=0) { ++ gboolean remove = TRUE; ++ gboolean have; ++ gint length = 0; ++ ++ if (lease_duration != 0) ++ remove = FALSE; ++ ++ if (g_strcmp0 (recipient_uri, "dbus://") != 0) ++ remove = FALSE; ++ ++ length = G_N_ELEMENTS (old_events); ++ if (events->num_values != G_N_ELEMENTS (old_events)) ++ remove = FALSE; ++ else ++ for (i = 0; i < events->num_values; i++) { ++ have = FALSE; ++ for (j = 0; j < length; j++) { ++ if (g_strcmp0 (events->values[i].string.text, old_events[j]) == 0) ++ have = TRUE; ++ } ++ if (!have) ++ remove = FALSE; ++ } ++ ++ if (remove) ++ cancel_subscription (id); ++ } + +- if (response) +- ippDelete(response); ++ if (!attr) ++ break; ++ } ++ } + +- httpClose(http); ++ if (response) { ++ ippDelete (response); ++ response = NULL; ++ } + } ++} ++ ++gboolean ++gsd_print_notifications_manager_start (GsdPrintNotificationsManager *manager, ++ GError **error) ++{ ++ GError *lerror; ++ ++ g_debug ("Starting print-notifications manager"); ++ ++ gnome_settings_profile_start (NULL); ++ ++ manager->priv->subscription_id = -1; ++ manager->priv->dests = NULL; ++ manager->priv->num_dests = 0; ++ manager->priv->scp_handler_spawned = FALSE; ++ ++ cancel_old_subscriptions (); ++ ++ renew_subscription (manager); ++ g_timeout_add_seconds (RENEW_INTERVAL, renew_subscription, manager); + + manager->priv->num_dests = cupsGetDests (&manager->priv->dests); + +@@ -613,27 +764,14 @@ gsd_print_notifications_manager_start (GsdPrintNotificationsManager *manager, + void + gsd_print_notifications_manager_stop (GsdPrintNotificationsManager *manager) + { +- ipp_t *request; +- http_t *http; +- + g_debug ("Stopping print-notifications manager"); + + cupsFreeDests (manager->priv->num_dests, manager->priv->dests); + manager->priv->num_dests = 0; + manager->priv->dests = NULL; + +- if (manager->priv->subscription_id >= 0 && +- ((http = httpConnectEncrypt(cupsServer(), ippPort(), +- cupsEncryption())) != NULL)) { +- request = ippNewRequest(IPP_CANCEL_SUBSCRIPTION); +- ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, +- "/"); +- ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name", +- NULL, cupsUser ()); +- ippAddInteger(request, IPP_TAG_OPERATION, IPP_TAG_INTEGER, +- "notify-subscription-ids", manager->priv->subscription_id); +- ippDelete(cupsDoRequest(http, request, "/")); +- } ++ if (manager->priv->subscription_id >= 0) ++ cancel_subscription (manager->priv->subscription_id); + + manager->priv->cups_bus_connection = NULL; + +-- From 3c7275dcfb55fef5fc23e4b4871edd7ee1dc1b4d Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Mon, 4 Apr 2011 18:03:26 +0100 Subject: [PATCH 20/21] Update to 3.0.0 --- .gitignore | 1 + gnome-settings-daemon.spec | 12 +- printing-expirable-subscriptions.patch | 294 ------------------------- sources | 2 +- 4 files changed, 8 insertions(+), 301 deletions(-) delete mode 100644 printing-expirable-subscriptions.patch diff --git a/.gitignore b/.gitignore index 33bc7c4..093cbdc 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ gnome-settings-daemon-2.31.6.tar.bz2 /gnome-settings-daemon-2.91.91.tar.bz2 /gnome-settings-daemon-2.91.92.tar.bz2 /gnome-settings-daemon-2.91.93.tar.bz2 +/gnome-settings-daemon-3.0.0.tar.bz2 diff --git a/gnome-settings-daemon.spec b/gnome-settings-daemon.spec index cfaea04..6be0239 100644 --- a/gnome-settings-daemon.spec +++ b/gnome-settings-daemon.spec @@ -1,13 +1,13 @@ Name: gnome-settings-daemon -Version: 2.91.93 -Release: 2%{?dist} +Version: 3.0.0 +Release: 1%{?dist} Summary: The daemon sharing settings from GNOME to GTK+/KDE applications Group: System Environment/Daemons License: GPLv2+ URL: http://download.gnome.org/sources/%{name} #VCS: git:git://git.gnome.org/gnome-settings-daemon -Source: http://download.gnome.org/sources/%{name}/2.91/%{name}-%{version}.tar.bz2 +Source: http://download.gnome.org/sources/%{name}/3.0/%{name}-%{version}.tar.bz2 Requires(pre): GConf2 >= 2.14 Requires(preun): GConf2 >= 2.14 @@ -38,8 +38,6 @@ BuildRequires: upower-devel BuildRequires: libgudev1-devel BuildRequires: nss-devel -Patch0: printing-expirable-subscriptions.patch - %description A daemon to share settings from GNOME to other applications. It also handles global keybindings, as well as a number of desktop-wide settings. @@ -56,7 +54,6 @@ developing applications that use %{name}. %prep %setup -q -%patch0 -p1 -b .subscriptions autoreconf -i -f @@ -199,6 +196,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor >&/dev/null || : %{_datadir}/gnome-settings-daemon-3.0/input-device-example.sh %changelog +* Mon Apr 04 2011 Bastien Nocera 3.0.0-1 +- Update to 3.0.0 + * Wed Mar 30 2011 Marek Kasik 2.91.93-2 - Make CUPS' subscriptions expirable diff --git a/printing-expirable-subscriptions.patch b/printing-expirable-subscriptions.patch deleted file mode 100644 index 25a6b45..0000000 --- a/printing-expirable-subscriptions.patch +++ /dev/null @@ -1,294 +0,0 @@ ---- a/plugins/print-notifications/gsd-print-notifications-manager.c -+++ b/plugins/print-notifications/gsd-print-notifications-manager.c -@@ -45,6 +45,9 @@ - #define CUPS_DBUS_PATH "/org/cups/cupsd/Notifier" - #define CUPS_DBUS_INTERFACE "org.cups.cupsd.Notifier" - -+#define RENEW_INTERVAL 3500 -+#define SUBSCRIPTION_DURATION 3600 -+ - struct GsdPrintNotificationsManagerPrivate - { - GDBusProxy *cups_proxy; -@@ -512,14 +515,35 @@ scp_handler (GsdPrintNotificationsManager *manager, - } - } - --gboolean --gsd_print_notifications_manager_start (GsdPrintNotificationsManager *manager, -- GError **error) -+static void -+cancel_subscription (gint id) - { -- GError *lerror; -- ipp_t *request, *response; -- http_t *http; -- gint num_events = 7; -+ http_t *http; -+ ipp_t *request; -+ -+ if (id >= 0 && -+ ((http = httpConnectEncrypt (cupsServer (), ippPort (), -+ cupsEncryption ())) != NULL)) { -+ request = ippNewRequest (IPP_CANCEL_SUBSCRIPTION); -+ ippAddString (request, IPP_TAG_OPERATION, IPP_TAG_URI, -+ "printer-uri", NULL, "/"); -+ ippAddString (request, IPP_TAG_OPERATION, IPP_TAG_NAME, -+ "requesting-user-name", NULL, cupsUser ()); -+ ippAddInteger (request, IPP_TAG_OPERATION, IPP_TAG_INTEGER, -+ "notify-subscription-id", id); -+ ippDelete (cupsDoRequest (http, request, "/")); -+ } -+} -+ -+static gboolean -+renew_subscription (gpointer data) -+{ -+ GsdPrintNotificationsManager *manager = (GsdPrintNotificationsManager *) data; -+ ipp_attribute_t *attr = NULL; -+ http_t *http; -+ ipp_t *request; -+ ipp_t *response; -+ gint num_events = 7; - static const char * const events[] = { - "job-created", - "job-completed", -@@ -528,50 +552,177 @@ gsd_print_notifications_manager_start (GsdPrintNotificationsManager *manager, - "printer-added", - "printer-deleted", - "printer-state-changed"}; -- ipp_attribute_t *attr = NULL; - -- g_debug ("Starting print-notifications manager"); -+ if ((http = httpConnectEncrypt (cupsServer (), ippPort (), -+ cupsEncryption ())) == NULL) { -+ g_debug ("Connection to CUPS server \'%s\' failed.", cupsServer ()); -+ } -+ else { -+ if (manager->priv->subscription_id >= 0) { -+ request = ippNewRequest (IPP_RENEW_SUBSCRIPTION); -+ ippAddString (request, IPP_TAG_OPERATION, IPP_TAG_URI, -+ "printer-uri", NULL, "/"); -+ ippAddString (request, IPP_TAG_OPERATION, IPP_TAG_NAME, -+ "requesting-user-name", NULL, cupsUser ()); -+ ippAddInteger (request, IPP_TAG_OPERATION, IPP_TAG_INTEGER, -+ "notify-subscription-id", manager->priv->subscription_id); -+ ippAddInteger (request, IPP_TAG_SUBSCRIPTION, IPP_TAG_INTEGER, -+ "notify-lease-duration", SUBSCRIPTION_DURATION); -+ ippDelete (cupsDoRequest (http, request, "/")); -+ } -+ else { -+ request = ippNewRequest (IPP_CREATE_PRINTER_SUBSCRIPTION); -+ ippAddString (request, IPP_TAG_OPERATION, IPP_TAG_URI, -+ "printer-uri", NULL, -+ "/"); -+ ippAddString (request, IPP_TAG_OPERATION, IPP_TAG_NAME, -+ "requesting-user-name", NULL, cupsUser ()); -+ ippAddStrings (request, IPP_TAG_SUBSCRIPTION, IPP_TAG_KEYWORD, -+ "notify-events", num_events, NULL, events); -+ ippAddString (request, IPP_TAG_SUBSCRIPTION, IPP_TAG_KEYWORD, -+ "notify-pull-method", NULL, "ippget"); -+ ippAddString (request, IPP_TAG_SUBSCRIPTION, IPP_TAG_URI, -+ "notify-recipient-uri", NULL, "dbus://"); -+ ippAddInteger (request, IPP_TAG_SUBSCRIPTION, IPP_TAG_INTEGER, -+ "notify-lease-duration", SUBSCRIPTION_DURATION); -+ response = cupsDoRequest (http, request, "/"); -+ -+ if (response != NULL && response->request.status.status_code <= IPP_OK_CONFLICT) { -+ if ((attr = ippFindAttribute (response, "notify-subscription-id", -+ IPP_TAG_INTEGER)) == NULL) -+ g_debug ("No notify-subscription-id in response!\n"); -+ else -+ manager->priv->subscription_id = attr->values[0].integer; -+ } - -- gnome_settings_profile_start (NULL); -+ if (response) -+ ippDelete (response); -+ } -+ httpClose (http); -+ } -+ return TRUE; -+} - -- manager->priv->subscription_id = -1; -- manager->priv->dests = NULL; -- manager->priv->num_dests = 0; -- manager->priv->scp_handler_spawned = FALSE; -+static void -+cancel_old_subscriptions () -+{ -+ http_t *http; -+ ipp_t *request; -+ ipp_t *response; -+ static const char * const old_events[] = { -+ "printer-state-changed", -+ "printer-restarted", -+ "printer-shutdown", -+ "printer-stopped", -+ "printer-added", -+ "printer-deleted", -+ "job-state-changed", -+ "job-created", -+ "job-completed", -+ "job-stopped" }; - - if ((http = httpConnectEncrypt (cupsServer (), ippPort (), - cupsEncryption ())) == NULL) { - g_debug ("Connection to CUPS server \'%s\' failed.", cupsServer ()); - } - else { -- request = ippNewRequest(IPP_CREATE_PRINTER_SUBSCRIPTION); -- ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, -- "/"); -- ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name", -- NULL, cupsUser ()); -- ippAddStrings(request, IPP_TAG_SUBSCRIPTION, IPP_TAG_KEYWORD, "notify-events", -- num_events, NULL, events); -- ippAddString(request, IPP_TAG_SUBSCRIPTION, IPP_TAG_KEYWORD, -- "notify-pull-method", NULL, "ippget"); -- ippAddString(request, IPP_TAG_SUBSCRIPTION, IPP_TAG_URI, "notify-recipient-uri", -- NULL, "dbus://"); -- ippAddInteger(request, IPP_TAG_SUBSCRIPTION, IPP_TAG_INTEGER, -- "notify-lease-duration", 0); -- response = cupsDoRequest(http, request, "/"); -+ request = ippNewRequest (IPP_GET_SUBSCRIPTIONS); -+ ippAddString (request, IPP_TAG_OPERATION, IPP_TAG_URI, -+ "printer-uri", NULL, "/"); -+ ippAddString (request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name", -+ NULL, cupsUser ()); -+ ippAddBoolean (request, IPP_TAG_SUBSCRIPTION, "my-subscriptions", 1); -+ response = cupsDoRequest (http, request, "/"); - - if (response != NULL && response->request.status.status_code <= IPP_OK_CONFLICT) { -- if ((attr = ippFindAttribute(response, "notify-subscription-id", -- IPP_TAG_INTEGER)) == NULL) -- g_debug ("No notify-subscription-id in response!\n"); -- else -- manager->priv->subscription_id = attr->values[0].integer; -- } -+ ipp_attribute_t *events; -+ ipp_attribute_t *attr; -+ gchar *recipient_uri; -+ gint lease_duration; -+ gint id; -+ gint i, j; -+ -+ for (attr = response->attrs; attr; attr = attr->next) { -+ recipient_uri = NULL; -+ events = NULL; -+ id = -1; -+ lease_duration = -1; -+ -+ while (attr && attr->group_tag != IPP_TAG_SUBSCRIPTION) -+ attr = attr->next; -+ -+ while (attr && attr->group_tag == IPP_TAG_SUBSCRIPTION) { -+ if (g_strcmp0 (attr->name, "notify-subscription-id") == 0) -+ id = attr->values[0].integer; -+ else if (g_strcmp0 (attr->name, "notify-recipient-uri") == 0) -+ recipient_uri = attr->values[0].string.text; -+ else if (g_strcmp0 (attr->name, "notify-lease-duration") == 0) -+ lease_duration = attr->values[0].integer; -+ else if (g_strcmp0 (attr->name, "notify-events") == 0) -+ events = attr; -+ attr = attr->next; -+ } -+ -+ if (recipient_uri && events && id >= 0 && lease_duration >=0) { -+ gboolean remove = TRUE; -+ gboolean have; -+ gint length = 0; -+ -+ if (lease_duration != 0) -+ remove = FALSE; -+ -+ if (g_strcmp0 (recipient_uri, "dbus://") != 0) -+ remove = FALSE; -+ -+ length = G_N_ELEMENTS (old_events); -+ if (events->num_values != G_N_ELEMENTS (old_events)) -+ remove = FALSE; -+ else -+ for (i = 0; i < events->num_values; i++) { -+ have = FALSE; -+ for (j = 0; j < length; j++) { -+ if (g_strcmp0 (events->values[i].string.text, old_events[j]) == 0) -+ have = TRUE; -+ } -+ if (!have) -+ remove = FALSE; -+ } -+ -+ if (remove) -+ cancel_subscription (id); -+ } - -- if (response) -- ippDelete(response); -+ if (!attr) -+ break; -+ } -+ } - -- httpClose(http); -+ if (response) { -+ ippDelete (response); -+ response = NULL; -+ } - } -+} -+ -+gboolean -+gsd_print_notifications_manager_start (GsdPrintNotificationsManager *manager, -+ GError **error) -+{ -+ GError *lerror; -+ -+ g_debug ("Starting print-notifications manager"); -+ -+ gnome_settings_profile_start (NULL); -+ -+ manager->priv->subscription_id = -1; -+ manager->priv->dests = NULL; -+ manager->priv->num_dests = 0; -+ manager->priv->scp_handler_spawned = FALSE; -+ -+ cancel_old_subscriptions (); -+ -+ renew_subscription (manager); -+ g_timeout_add_seconds (RENEW_INTERVAL, renew_subscription, manager); - - manager->priv->num_dests = cupsGetDests (&manager->priv->dests); - -@@ -613,27 +764,14 @@ gsd_print_notifications_manager_start (GsdPrintNotificationsManager *manager, - void - gsd_print_notifications_manager_stop (GsdPrintNotificationsManager *manager) - { -- ipp_t *request; -- http_t *http; -- - g_debug ("Stopping print-notifications manager"); - - cupsFreeDests (manager->priv->num_dests, manager->priv->dests); - manager->priv->num_dests = 0; - manager->priv->dests = NULL; - -- if (manager->priv->subscription_id >= 0 && -- ((http = httpConnectEncrypt(cupsServer(), ippPort(), -- cupsEncryption())) != NULL)) { -- request = ippNewRequest(IPP_CANCEL_SUBSCRIPTION); -- ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, -- "/"); -- ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name", -- NULL, cupsUser ()); -- ippAddInteger(request, IPP_TAG_OPERATION, IPP_TAG_INTEGER, -- "notify-subscription-ids", manager->priv->subscription_id); -- ippDelete(cupsDoRequest(http, request, "/")); -- } -+ if (manager->priv->subscription_id >= 0) -+ cancel_subscription (manager->priv->subscription_id); - - manager->priv->cups_bus_connection = NULL; - --- diff --git a/sources b/sources index 91ce341..79551f4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -840fc84829f4a9587546ad40dd2da39c gnome-settings-daemon-2.91.93.tar.bz2 +f369c858df94ea81d19ecedba377d1f1 gnome-settings-daemon-3.0.0.tar.bz2 From 630fe717f2b59d9455c1348e6a76fd5133710438 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Wed, 6 Apr 2011 14:13:05 +0100 Subject: [PATCH 21/21] Update to 3.0.0.1 --- .gitignore | 1 + gnome-settings-daemon.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 093cbdc..5354494 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ gnome-settings-daemon-2.31.6.tar.bz2 /gnome-settings-daemon-2.91.92.tar.bz2 /gnome-settings-daemon-2.91.93.tar.bz2 /gnome-settings-daemon-3.0.0.tar.bz2 +/gnome-settings-daemon-3.0.0.1.tar.bz2 diff --git a/gnome-settings-daemon.spec b/gnome-settings-daemon.spec index 6be0239..5c15310 100644 --- a/gnome-settings-daemon.spec +++ b/gnome-settings-daemon.spec @@ -1,5 +1,5 @@ Name: gnome-settings-daemon -Version: 3.0.0 +Version: 3.0.0.1 Release: 1%{?dist} Summary: The daemon sharing settings from GNOME to GTK+/KDE applications @@ -196,6 +196,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor >&/dev/null || : %{_datadir}/gnome-settings-daemon-3.0/input-device-example.sh %changelog +* Wed Apr 06 2011 Bastien Nocera 3.0.0.1-1 +- Update to 3.0.0.1 + * Mon Apr 04 2011 Bastien Nocera 3.0.0-1 - Update to 3.0.0 diff --git a/sources b/sources index 79551f4..41aa8d3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f369c858df94ea81d19ecedba377d1f1 gnome-settings-daemon-3.0.0.tar.bz2 +58a43395204d84dfda08d6ee3020711d gnome-settings-daemon-3.0.0.1.tar.bz2