Browse Source

gnome-settings-daemon package update

Signed-off-by: guibuilder_pel7x64builder0 <guibuilder@powerel.org>
master
guibuilder_pel7x64builder0 6 years ago
parent
commit
bc8327955a
  1. 138
      SOURCES/0001-Revert-Revert-plugins-Work-around-startup-deadlock.patch
  2. 289
      SOURCES/0001-account-first-cut-at-account-plugin.patch
  3. 341
      SOURCES/0001-housekeeping-Add-a-GPU-memory-usage-notification.patch
  4. 6
      SOURCES/0001-smartcard-Wait-until-smartcards-are-inspected-before.patch
  5. 80
      SOURCES/0002-Revert-sharing-Fix-function-arguments.patch
  6. 60
      SOURCES/0002-account-reshow-the-notification-when-screen-unlocks.patch
  7. 6
      SOURCES/0002-smartcard-handle-a-smartcard-getting-removed-very-sh.patch
  8. 158
      SOURCES/0003-Revert-sharing-Use-systemd-to-track-running-services.patch
  9. 132
      SOURCES/0003-account-display-nag-screen-periodically.patch
  10. 16
      SOURCES/gnome-settings-daemon-python3.patch
  11. 3
      SOURCES/org.gnome.settings-daemon.plugins.power.gschema.override
  12. 58
      SPECS/gnome-settings-daemon.spec

138
SOURCES/0001-Revert-Revert-plugins-Work-around-startup-deadlock.patch

@ -1,33 +1,46 @@ @@ -1,33 +1,46 @@
From a89835db96703a861c14cc36211511ecfcb7d3d6 Mon Sep 17 00:00:00 2001
From 3b383ffcb65dcd318cdb9c1bf3e039007e628ec3 Mon Sep 17 00:00:00 2001
From: Rui Matos <tiagomatos@gmail.com>
Date: Wed, 11 Oct 2017 18:08:52 +0200
Subject: [PATCH 1/3] Revert "Revert "plugins: Work-around startup deadlock""

This reverts commit e0f230ce6124fac47bc0810d30ff78ec327152ca.
---
configure.ac | 2 +-
plugins/common/daemon-skeleton-gtk.h | 4 ++++
plugins/common/daemon-skeleton.h | 4 ++++
3 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index c74ba250..3073017d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -42,7 +42,7 @@ dnl ---------------------------------------------------------------------------
dnl - Dependencies
dnl ---------------------------------------------------------------------------
-GLIB_REQUIRED_VERSION=2.53.0
+GLIB_REQUIRED_VERSION=2.44.0
GIO_REQUIRED_VERSION=${GLIB_REQUIRED_VERSION}
GTK_REQUIRED_VERSION=3.15.3
GCONF_REQUIRED_VERSION=2.6.1
2 files changed, 8 insertions(+)

diff --git a/plugins/common/daemon-skeleton-gtk.h b/plugins/common/daemon-skeleton-gtk.h
index 27aade6c..46d0ed1a 100644
index 2194b3d6..500ff3de 100644
--- a/plugins/common/daemon-skeleton-gtk.h
+++ b/plugins/common/daemon-skeleton-gtk.h
@@ -199,6 +199,10 @@ main (int argc, char **argv)
@@ -172,60 +172,64 @@ set_empty_gtk_theme (gboolean set)
/* Override GTK_THEME to reduce overhead of CSS engine. By using
* GTK_THEME environment variable, GtkSettings is not allowed to
* initially parse the Adwaita theme.
*
* https://bugzilla.gnome.org/show_bug.cgi?id=780555 */
old_gtk_theme = g_strdup (g_getenv ("GTK_THEME"));
g_setenv ("GTK_THEME", "Disabled", TRUE);
} else {
/* GtkSettings has loaded, so we can drop GTK_THEME used to initialize
* our internal theme. Only the main thread accesses the GTK_THEME
* environment variable, so this is safe to release. */
if (old_gtk_theme != NULL)
g_setenv ("GTK_THEME", old_gtk_theme, TRUE);
else
g_unsetenv ("GTK_THEME");
}
}
int
main (int argc, char **argv)
{
GError *error;
bindtextdomain (GETTEXT_PACKAGE, GNOME_SETTINGS_LOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
setlocale (LC_ALL, "");
set_empty_gtk_theme (TRUE);
@ -38,11 +51,65 @@ index 27aade6c..46d0ed1a 100644 @@ -38,11 +51,65 @@ index 27aade6c..46d0ed1a 100644
gdk_set_allowed_backends ("x11");
error = NULL;
if (! gtk_init_with_args (&argc, &argv, PLUGIN_NAME, entries, NULL, &error)) {
if (error != NULL) {
fprintf (stderr, "%s\n", error->message);
g_error_free (error);
}
exit (1);
}
set_empty_gtk_theme (FALSE);
if (verbose) {
g_setenv ("G_MESSAGES_DEBUG", "all", TRUE);
/* Work around GLib not flushing the output for us by explicitly
* setting buffering to a sane behaviour. This is important
* during testing when the output is not going to a TTY and
* we are reading messages from g_debug on stdout.
*
* See also
* https://bugzilla.gnome.org/show_bug.cgi?id=792432
*/
setlinebuf (stdout);
}
if (timeout > 0) {
guint id;
id = g_timeout_add_seconds (timeout, (GSourceFunc) gtk_main_quit, NULL);
g_source_set_name_by_id (id, "[gnome-settings-daemon] gtk_main_quit");
diff --git a/plugins/common/daemon-skeleton.h b/plugins/common/daemon-skeleton.h
index e4641fcc..cdd7bc2a 100644
index 367ac1ec..83493ca1 100644
--- a/plugins/common/daemon-skeleton.h
+++ b/plugins/common/daemon-skeleton.h
@@ -174,6 +174,10 @@ main (int argc, char **argv)
@@ -147,60 +147,64 @@ on_client_registered (GObject *source_object,
static void
register_with_gnome_session (GMainLoop *loop)
{
GDBusProxy *proxy;
const char *startup_id;
proxy = G_DBUS_PROXY (gnome_settings_bus_get_session_proxy ());
startup_id = g_getenv ("DESKTOP_AUTOSTART_ID");
g_dbus_proxy_call (proxy,
"RegisterClient",
g_variant_new ("(ss)", dummy_name ? dummy_name : PLUGIN_NAME, startup_id ? startup_id : ""),
G_DBUS_CALL_FLAGS_NONE,
-1,
NULL,
(GAsyncReadyCallback) on_client_registered,
loop);
}
int
main (int argc, char **argv)
{
GError *error = NULL;
GOptionContext *context;
GMainLoop *loop;
bindtextdomain (GETTEXT_PACKAGE, GNOME_SETTINGS_LOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
setlocale (LC_ALL, "");
@ -53,6 +120,33 @@ index e4641fcc..cdd7bc2a 100644 @@ -53,6 +120,33 @@ index e4641fcc..cdd7bc2a 100644
context = g_option_context_new (NULL);
g_option_context_add_main_entries (context, entries, GETTEXT_PACKAGE);
if (!g_option_context_parse (context, &argc, &argv, &error)) {
fprintf (stderr, "%s\n", error->message);
g_error_free (error);
exit (1);
}
g_option_context_free (context);
loop = g_main_loop_new (NULL, FALSE);
if (verbose) {
g_setenv ("G_MESSAGES_DEBUG", "all", TRUE);
/* Work around GLib not flushing the output for us by explicitly
* setting buffering to a sane behaviour. This is important
* during testing when the output is not going to a TTY and
* we are reading messages from g_debug on stdout.
*
* See also
* https://bugzilla.gnome.org/show_bug.cgi?id=792432
*/
setlinebuf (stdout);
}
if (timeout > 0) {
guint id;
id = g_timeout_add_seconds (timeout, (GSourceFunc) g_main_loop_quit, loop);
g_source_set_name_by_id (id, "[gnome-settings-daemon] g_main_loop_quit");
}
--
2.13.5
2.17.0


289
SOURCES/0001-account-first-cut-at-account-plugin.patch

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
From 7816366e44e5bbf417cccfe0a7affad2f40db48f Mon Sep 17 00:00:00 2001
From 26a5916ed00260399454a2df3942b4349d74a607 Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Mon, 6 Nov 2017 14:43:46 -0500
Subject: [PATCH 1/3] account: first cut at account plugin
@ -9,25 +9,26 @@ Future commits will make it redisplay the notification after @@ -9,25 +9,26 @@ Future commits will make it redisplay the notification after
screen unlock and provide some configurability for regular
nags.
---
configure.ac | 6 +
plugins/Makefile.am | 1 +
plugins/account/Makefile.am | 68 +
plugins/account/gsd-account-manager.c | 422 ++
plugins/account/gsd-account-manager.h | 54 +
plugins/account/main.c | 7 +
plugins/account/org.freedesktop.Accounts.User.c | 6177 ++++++++++++++++++++
plugins/account/org.freedesktop.Accounts.User.h | 725 +++
plugins/account/org.freedesktop.Accounts.User.xml | 825 +++
plugins/account/org.freedesktop.Accounts.c | 3017 ++++++++++
plugins/account/meson.build | 39 +
.../account/org.freedesktop.Accounts.User.c | 6176 +++++++++++++++++
.../account/org.freedesktop.Accounts.User.h | 725 ++
.../account/org.freedesktop.Accounts.User.xml | 825 +++
plugins/account/org.freedesktop.Accounts.c | 3016 ++++++++
plugins/account/org.freedesktop.Accounts.h | 400 ++
plugins/account/org.freedesktop.Accounts.xml | 248 +
.../org.gnome.SettingsDaemon.Account.desktop | 9 +
.../org.gnome.SettingsDaemon.Account.desktop.in | 9 +
14 files changed, 11968 insertions(+)
...rg.gnome.SettingsDaemon.Account.desktop.in | 9 +
plugins/meson.build | 1 +
14 files changed, 11999 insertions(+)
create mode 100644 plugins/account/Makefile.am
create mode 100644 plugins/account/gsd-account-manager.c
create mode 100644 plugins/account/gsd-account-manager.h
create mode 100644 plugins/account/main.c
create mode 100644 plugins/account/meson.build
create mode 100644 plugins/account/org.freedesktop.Accounts.User.c
create mode 100644 plugins/account/org.freedesktop.Accounts.User.h
create mode 100644 plugins/account/org.freedesktop.Accounts.User.xml
@ -37,179 +38,6 @@ nags. @@ -37,179 +38,6 @@ nags.
create mode 100644 plugins/account/org.gnome.SettingsDaemon.Account.desktop
create mode 100644 plugins/account/org.gnome.SettingsDaemon.Account.desktop.in

diff --git a/configure.ac b/configure.ac
index 3073017d..5bd742e5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -128,60 +128,65 @@ dnl ---------------------------------------------------------------------------
dnl - Check for libwayland-client
dnl ---------------------------------------------------------------------------
AC_ARG_ENABLE(wayland,
AS_HELP_STRING([--disable-wayland],[Disable wayland support (default: auto)]),
enable_wayland=$enableval, enable_wayland=auto)
if test x$enable_wayland != xno; then
PKG_CHECK_MODULES(WAYLAND, wayland-client, have_wayland=yes, have_wayland=no)
if test x$have_wayland = xyes; then
AC_DEFINE(HAVE_WAYLAND, 1, [Define if libwayland-client is available])
else
if test x$enable_wayland = xyes; then
AC_MSG_ERROR([Wayland enabled but not found])
fi
fi
fi
dnl ================================================================
dnl Plugins
dnl ================================================================
PKG_CHECK_MODULES(A11Y_KEYBOARD,
gtk+-3.0
libnotify >= $LIBNOTIFY_REQUIRED_VERSION
gsettings-desktop-schemas >= $GSETTINGS_DESKTOP_SCHEMAS_REQUIRED_VERSION
x11)
PKG_CHECK_MODULES(A11Y_SETTINGS,
gio-2.0
gsettings-desktop-schemas >= $GSETTINGS_DESKTOP_SCHEMAS_REQUIRED_VERSION)
+PKG_CHECK_MODULES(ACCOUNT,
+ gtk+-3.0
+ gio-unix-2.0
+ libnotify >= $LIBNOTIFY_REQUIRED_VERSION)
+
PKG_CHECK_MODULES(CLIPBOARD,
gtk+-x11-3.0
x11)
PKG_CHECK_MODULES(COLOR,
colord >= 1.0.2
gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED_VERSION
libcanberra-gtk3
libgeoclue-2.0 >= $GEOCLUE_REQUIRED_VERSION
lcms2 >= $LCMS_REQUIRED_VERSION
libnotify)
PKG_CHECK_MODULES(DATETIME,
libnotify >= $LIBNOTIFY_REQUIRED_VERSION
libgeoclue-2.0 >= $GEOCLUE_REQUIRED_VERSION
geocode-glib-1.0 >= $GEOCODE_GLIB_REQUIRED_VERSION
gweather-3.0 >= $LIBGWEATHER_REQUIRED_VERSION
polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION)
PKG_CHECK_MODULES(DUMMY,
gio-2.0
glib-2.0)
PKG_CHECK_MODULES(HOUSEKEEPING,
gtk+-3.0
gio-unix-2.0
libnotify >= $LIBNOTIFY_REQUIRED_VERSION)
PKG_CHECK_MODULES(KEYBOARD,
gtk+-3.0)
@@ -480,60 +485,61 @@ if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
unset SAVE_CFLAGS
done
unset option
else
AC_MSG_RESULT(no)
fi
#
# Enable Debug
#
AC_ARG_ENABLE(debug,
[AS_HELP_STRING([--enable-debug],[turn on debugging])],
, enable_debug=yes)
if test "$enable_debug" = "yes"; then
DEBUG_CFLAGS="-DG_ENABLE_DEBUG"
else
if test "x$enable_debug" = "xno"; then
DEBUG_CFLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS"
else
DEBUG_CFLAGS=""
fi
fi
AC_SUBST(DEBUG_CFLAGS)
AC_CONFIG_FILES([
Makefile
gnome-settings-daemon/Makefile
plugins/Makefile
plugins/a11y-keyboard/Makefile
plugins/a11y-settings/Makefile
+plugins/account/Makefile
plugins/clipboard/Makefile
plugins/color/Makefile
plugins/common/Makefile
plugins/datetime/Makefile
plugins/dummy/Makefile
plugins/power/Makefile
plugins/housekeeping/Makefile
plugins/keyboard/Makefile
plugins/media-keys/Makefile
plugins/media-keys/gvc/Makefile
plugins/mouse/Makefile
plugins/print-notifications/Makefile
plugins/rfkill/Makefile
plugins/screensaver-proxy/Makefile
plugins/sharing/Makefile
plugins/smartcard/Makefile
plugins/sound/Makefile
plugins/wacom/Makefile
plugins/xsettings/Makefile
data/Makefile
data/gnome-settings-daemon.pc
data/org.gnome.settings-daemon.plugins.gschema.xml.in
data/org.gnome.settings-daemon.plugins.xsettings.gschema.xml.in
data/org.gnome.settings-daemon.plugins.power.gschema.xml.in
data/org.gnome.settings-daemon.plugins.color.gschema.xml.in
data/org.gnome.settings-daemon.plugins.media-keys.gschema.xml.in
data/org.gnome.settings-daemon.peripherals.gschema.xml.in
data/org.gnome.settings-daemon.plugins.housekeeping.gschema.xml.in
data/org.gnome.settings-daemon.plugins.sharing.gschema.xml.in
data/org.gnome.settings-daemon.peripherals.wacom.gschema.xml.in
diff --git a/plugins/Makefile.am b/plugins/Makefile.am
index 6de38f07..1f25b04a 100644
--- a/plugins/Makefile.am
+++ b/plugins/Makefile.am
@@ -1,35 +1,36 @@
NULL =
enabled_plugins = \
a11y-keyboard \
a11y-settings \
+ account \
clipboard \
color \
datetime \
dummy \
power \
housekeeping \
keyboard \
media-keys \
mouse \
screensaver-proxy \
sharing \
sound \
xsettings \
$(NULL)
disabled_plugins = $(NULL)
if SMARTCARD_SUPPORT
enabled_plugins += smartcard
else
disabled_plugins += smartcard
endif
if HAVE_WACOM
enabled_plugins += wacom
else
disabled_plugins += wacom
endif
if BUILD_PRINT_NOTIFICATIONS
diff --git a/plugins/account/Makefile.am b/plugins/account/Makefile.am
new file mode 100644
index 00000000..e06abcf5
@ -286,7 +114,7 @@ index 00000000..e06abcf5 @@ -286,7 +114,7 @@ index 00000000..e06abcf5
+DISTCLEANFILES = $(desktop_DATA)
diff --git a/plugins/account/gsd-account-manager.c b/plugins/account/gsd-account-manager.c
new file mode 100644
index 00000000..642d5bcc
index 00000000..40b91cb6
--- /dev/null
+++ b/plugins/account/gsd-account-manager.c
@@ -0,0 +1,422 @@
@ -785,12 +613,57 @@ index 00000000..9b854f65 @@ -785,12 +613,57 @@ index 00000000..9b854f65
+#include "gsd-account-manager.h"
+
+#include "daemon-skeleton.h"
diff --git a/plugins/account/meson.build b/plugins/account/meson.build
new file mode 100644
index 00000000..c70ac36e
--- /dev/null
+++ b/plugins/account/meson.build
@@ -0,0 +1,39 @@
+sources = files(
+ 'gsd-account-manager.c',
+ 'main.c'
+)
+
+sources += gnome.gdbus_codegen(
+ 'org.freedesktop.Accounts',
+ 'org.freedesktop.Accounts.xml',
+ interface_prefix: 'org.freedesktop.',
+ namespace: 'Gsd',
+ object_manager: false,
+ annotations: ['org.freedesktop.Accounts', 'org.gtk.GDBus.C.Name', 'Accounts']
+)
+
+sources += gnome.gdbus_codegen(
+ 'org.freedesktop.Accounts.User',
+ 'org.freedesktop.Accounts.User.xml',
+ interface_prefix: 'org.freedesktop.',
+ namespace: 'Gsd',
+ object_manager: false,
+ annotations: ['org.freedesktop.Accounts.User', 'org.gtk.GDBus.C.Name', 'AccountsUser']
+)
+
+deps = plugins_deps + [
+ gio_unix_dep,
+ libnotify_dep,
+ nss_dep
+]
+
+executable(
+ 'gsd-' + plugin_name,
+ sources,
+ include_directories: [top_inc, common_inc],
+ dependencies: deps,
+ c_args: cflags,
+ install: true,
+ install_rpath: gsd_pkglibdir,
+ install_dir: gsd_libexecdir
+)
diff --git a/plugins/account/org.freedesktop.Accounts.User.c b/plugins/account/org.freedesktop.Accounts.User.c
new file mode 100644
index 00000000..035eb7a4
index 00000000..3b18d185
--- /dev/null
+++ b/plugins/account/org.freedesktop.Accounts.User.c
@@ -0,0 +1,6177 @@
@@ -0,0 +1,6176 @@
+/*
+ * Generated by gdbus-codegen 2.54.1. DO NOT EDIT.
+ *
@ -6967,7 +6840,6 @@ index 00000000..035eb7a4 @@ -6967,7 +6840,6 @@ index 00000000..035eb7a4
+{
+ return GSD_ACCOUNTS_USER (g_object_new (GSD_TYPE_ACCOUNTS_USER_SKELETON, NULL));
+}
+
diff --git a/plugins/account/org.freedesktop.Accounts.User.h b/plugins/account/org.freedesktop.Accounts.User.h
new file mode 100644
index 00000000..f5a0ca0f
@ -8532,10 +8404,10 @@ index 00000000..4ab989a0 @@ -8532,10 +8404,10 @@ index 00000000..4ab989a0
+</node>
diff --git a/plugins/account/org.freedesktop.Accounts.c b/plugins/account/org.freedesktop.Accounts.c
new file mode 100644
index 00000000..d5d11f5d
index 00000000..669c43a8
--- /dev/null
+++ b/plugins/account/org.freedesktop.Accounts.c
@@ -0,0 +1,3017 @@
@@ -0,0 +1,3016 @@
+/*
+ * Generated by gdbus-codegen 2.54.1. DO NOT EDIT.
+ *
@ -11552,7 +11424,6 @@ index 00000000..d5d11f5d @@ -11552,7 +11424,6 @@ index 00000000..d5d11f5d
+{
+ return GSD_ACCOUNTS (g_object_new (GSD_TYPE_ACCOUNTS_SKELETON, NULL));
+}
+
diff --git a/plugins/account/org.freedesktop.Accounts.h b/plugins/account/org.freedesktop.Accounts.h
new file mode 100644
index 00000000..b8d0625e
@ -12243,6 +12114,44 @@ index 00000000..1a8ded7d @@ -12243,6 +12114,44 @@ index 00000000..1a8ded7d
+X-GNOME-Autostart-Phase=Initialization
+X-GNOME-Autostart-Notify=true
+X-GNOME-AutoRestart=true
diff --git a/plugins/meson.build b/plugins/meson.build
index 3db69da7..3c4d42ac 100644
--- a/plugins/meson.build
+++ b/plugins/meson.build
@@ -1,32 +1,33 @@
enabled_plugins = [
['a11y-settings', 'A11ySettings'],
+ ['account', 'Account'],
['clipboard', 'Clipboard'],
['color', 'Color'],
['datetime', 'Datetime'],
['dummy', ''],
['power', 'Power'],
['housekeeping', 'Housekeeping'],
['keyboard', 'Keyboard'],
['media-keys', 'MediaKeys'],
['mouse', 'Mouse'],
['screensaver-proxy', 'ScreensaverProxy'],
['sharing', 'Sharing'],
['sound', 'Sound'],
['xsettings', 'XSettings']
]
if enable_smartcard
enabled_plugins += [['smartcard', 'Smartcard']]
endif
if enable_wacom
enabled_plugins += [['wacom', 'Wacom']]
endif
if enable_cups
enabled_plugins += [['print-notifications', 'PrintNotifications']]
endif
if enable_rfkill
enabled_plugins += [['rfkill', 'Rfkill']]
endif
--
2.14.2
2.17.0


341
SOURCES/0001-housekeeping-Add-a-GPU-memory-usage-notification.patch

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
From 9f5afbaa94f7a6b466d0bfb2be257187cfc4cc18 Mon Sep 17 00:00:00 2001
From cacaa4836243264b1d8be579eed591a7dbe10d5f Mon Sep 17 00:00:00 2001
From: Rui Matos <tiagomatos@gmail.com>
Date: Thu, 31 Aug 2017 17:32:43 +0200
Subject: [PATCH] housekeeping: Add a GPU memory usage notification
@ -6,62 +6,83 @@ Subject: [PATCH] housekeeping: Add a GPU memory usage notification @@ -6,62 +6,83 @@ Subject: [PATCH] housekeeping: Add a GPU memory usage notification
Only works on supported nvidia GPUs and nvidia binary driver
combinations.
---
plugins/housekeeping/Makefile.am | 10 +-
plugins/housekeeping/gsd-gpu-mem.c | 261 ++
meson.build | 1 +
plugins/housekeeping/gsd-gpu-mem.c | 261 +
plugins/housekeeping/gsd-gpu-mem.h | 33 +
plugins/housekeeping/gsd-housekeeping-manager.c | 7 +
plugins/housekeeping/nvml/include/nvml.h | 4447 +++++++++++++++++++++++
5 files changed, 4754 insertions(+), 4 deletions(-)
.../housekeeping/gsd-housekeeping-manager.c | 7 +
plugins/housekeeping/meson.build | 7 +-
plugins/housekeeping/nvml/include/nvml.h | 4447 +++++++++++++++++
6 files changed, 4754 insertions(+), 2 deletions(-)
create mode 100644 plugins/housekeeping/gsd-gpu-mem.c
create mode 100644 plugins/housekeeping/gsd-gpu-mem.h
create mode 100644 plugins/housekeeping/nvml/include/nvml.h

diff --git a/plugins/housekeeping/Makefile.am b/plugins/housekeeping/Makefile.am
index 3841edf4..b01666ca 100644
--- a/plugins/housekeeping/Makefile.am
+++ b/plugins/housekeeping/Makefile.am
@@ -1,6 +1,8 @@
plugin_name = housekeeping
diff --git a/meson.build b/meson.build
index 5c66be4d..6067ec2e 100644
--- a/meson.build
+++ b/meson.build
@@ -76,60 +76,61 @@ endif
COMMON_FILES = \
+ gsd-gpu-mem.c \
+ gsd-gpu-mem.h \
gsd-disk-space.c \
gsd-disk-space.h \
gsd-disk-space-helper.h \
@@ -11,20 +13,20 @@ noinst_PROGRAMS = gsd-disk-space-test gsd-empty-trash-test gsd-purge-temp-test
gsd_disk_space_test_SOURCES = \
gsd-disk-space-test.c \
$(COMMON_FILES)
-gsd_disk_space_test_LDADD = $(HOUSEKEEPING_LIBS)
+gsd_disk_space_test_LDADD = $(HOUSEKEEPING_LIBS) -lm -ldl
gsd_disk_space_test_CFLAGS = \
$(HOUSEKEEPING_CFLAGS)
# Workaround for meson's bug
# https://github.com/mesonbuild/meson/pull/1896
if get_option('b_ndebug') == true
common_flags += ['-DG_DISABLE_ASSERT']
endif
gsd_empty_trash_test_SOURCES = \
gsd-empty-trash-test.c \
$(COMMON_FILES)
-gsd_empty_trash_test_LDADD = $(HOUSEKEEPING_LIBS)
+gsd_empty_trash_test_LDADD = $(HOUSEKEEPING_LIBS) -lm -ldl
gsd_empty_trash_test_CFLAGS = $(HOUSEKEEPING_CFLAGS)
add_project_arguments(common_flags + compiler_flags, language: 'c')
gsd_purge_temp_test_SOURCES = \
gsd-purge-temp-test.c \
$(COMMON_FILES)
-gsd_purge_temp_test_LDADD = $(HOUSEKEEPING_LIBS)
+gsd_purge_temp_test_LDADD = $(HOUSEKEEPING_LIBS) -lm -ldl
gsd_purge_temp_test_CFLAGS = $(HOUSEKEEPING_CFLAGS)
colord_dep = dependency('colord', version: '>= 1.0.2')
geocode_glib_dep = dependency('geocode-glib-1.0', version: '>= 3.10.0')
gio_dep = dependency('gio-2.0', version: '>= 2.53.0')
gio_unix_dep = dependency('gio-unix-2.0')
gnome_desktop_dep = dependency('gnome-desktop-3.0', version: '>= 3.11.1')
gsettings_desktop_dep = dependency('gsettings-desktop-schemas', version: '>= 3.23.3')
gtk_dep = dependency('gtk+-3.0', version: '>= 3.15.3')
gtk_x11_dep = dependency('gtk+-x11-3.0')
gweather_dep = dependency('gweather-3.0', version: '>= 3.9.5')
lcms_dep = dependency('lcms2', version: '>= 2.2')
libcanberra_gtk_dep = dependency('libcanberra-gtk3')
libgeoclue_dep = dependency('libgeoclue-2.0', version: '>= 2.3.1')
libnotify_dep = dependency('libnotify', version: '>= 0.7.3')
libpulse_mainloop_glib_dep = dependency('libpulse-mainloop-glib', version: '>= 2.0')
pango_dep = dependency('pango', version: '>= 1.20.0')
polkit_gobject_dep = dependency('polkit-gobject-1', version: '>= 0.103')
upower_glib_dep = dependency('upower-glib', version: '>= 0.99.0')
x11_dep = dependency('x11')
xtst_dep = dependency('xtst')
libexec_PROGRAMS = gsd-housekeeping
@@ -51,7 +53,7 @@ gsd_housekeeping_CFLAGS = \
gsd_housekeeping_LDADD = \
$(top_builddir)/gnome-settings-daemon/libgsd.la \
$(top_builddir)/plugins/common/libcommon.la \
- $(HOUSEKEEPING_LIBS)
+ $(HOUSEKEEPING_LIBS) -lm -ldl
m_dep = cc.find_library('m')
+dl_dep = cc.find_library('dl')
# ALSA integration (default enabled)
enable_alsa = get_option('alsa')
assert(enable_alsa or not host_is_linux, 'ALSA is not optional on Linux platforms')
libgvc = subproject(
'gvc',
default_options: [
'static=true',
'alsa=' + enable_alsa.to_string()
]
)
libgvc_dep = libgvc.get_variable('libgvc_dep')
# GUdev integration (default enabled)
enable_gudev = get_option('gudev')
if enable_gudev
assert(enable_gudev, 'GUdev is not optional on Linux platforms')
gudev_dep = dependency('gudev-1.0')
endif
config_h.set('HAVE_GUDEV', enable_gudev)
# Check for libwayland-client
enable_wayland = get_option('wayland')
if enable_wayland
assert(enable_gudev, 'GUDev support is required for wayland support.')
wayland_client_dep = dependency('wayland-client')
endif
config_h.set10('HAVE_WAYLAND', enable_wayland)
desktopdir = $(sysconfdir)/xdg/autostart
desktop_in_files = org.gnome.SettingsDaemon.Housekeeping.desktop.in
diff --git a/plugins/housekeeping/gsd-gpu-mem.c b/plugins/housekeeping/gsd-gpu-mem.c
new file mode 100644
index 00000000..a76579b6
@ -372,7 +393,32 @@ diff --git a/plugins/housekeeping/gsd-housekeeping-manager.c b/plugins/housekeep @@ -372,7 +393,32 @@ diff --git a/plugins/housekeeping/gsd-housekeeping-manager.c b/plugins/housekeep
index 2c94e35d..5efb0aaa 100644
--- a/plugins/housekeeping/gsd-housekeeping-manager.c
+++ b/plugins/housekeeping/gsd-housekeeping-manager.c
@@ -26,6 +26,7 @@
@@ -1,89 +1,92 @@
/*
* Copyright (C) 2008 Michael J. Chudobiak <mjc@avtechpulse.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*
*/
#include "config.h"
#include <gio/gio.h>
#include <glib/gstdio.h>
#include <string.h>
#include <libnotify/notify.h>
#include "gnome-settings-profile.h"
#include "gsd-housekeeping-manager.h"
#include "gsd-disk-space.h"
@ -380,7 +426,31 @@ index 2c94e35d..5efb0aaa 100644 @@ -380,7 +426,31 @@ index 2c94e35d..5efb0aaa 100644
/* General */
@@ -57,6 +58,8 @@ struct GsdHousekeepingManagerPrivate {
#define INTERVAL_ONCE_A_DAY 24*60*60
#define INTERVAL_TWO_MINUTES 2*60
/* Thumbnail cleaner */
#define THUMB_PREFIX "org.gnome.desktop.thumbnail-cache"
#define THUMB_AGE_KEY "maximum-age"
#define THUMB_SIZE_KEY "maximum-size"
#define GSD_HOUSEKEEPING_DBUS_PATH "/org/gnome/SettingsDaemon/Housekeeping"
static const gchar introspection_xml[] =
"<node>"
" <interface name='org.gnome.SettingsDaemon.Housekeeping'>"
" <method name='EmptyTrash'/>"
" <method name='RemoveTempFiles'/>"
" </interface>"
"</node>";
struct GsdHousekeepingManagerPrivate {
GSettings *settings;
guint long_term_cb;
guint short_term_cb;
GDBusNodeInfo *introspection_data;
GDBusConnection *connection;
GCancellable *bus_cancellable;
guint name_id;
@ -389,7 +459,61 @@ index 2c94e35d..5efb0aaa 100644 @@ -389,7 +459,61 @@ index 2c94e35d..5efb0aaa 100644
};
#define GSD_HOUSEKEEPING_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GSD_TYPE_HOUSEKEEPING_MANAGER, GsdHousekeepingManagerPrivate))
@@ -411,6 +414,8 @@ gsd_housekeeping_manager_start (GsdHousekeepingManager *manager,
static void gsd_housekeeping_manager_class_init (GsdHousekeepingManagerClass *klass);
static void gsd_housekeeping_manager_init (GsdHousekeepingManager *housekeeping_manager);
G_DEFINE_TYPE (GsdHousekeepingManager, gsd_housekeeping_manager, G_TYPE_OBJECT)
static gpointer manager_object = NULL;
typedef struct {
glong now;
glong max_age;
goffset total_size;
goffset max_size;
} PurgeData;
typedef struct {
time_t mtime;
char *path;
glong size;
} ThumbData;
static void
thumb_data_free (gpointer data)
{
@@ -384,101 +387,105 @@ gsd_housekeeping_manager_start (GsdHousekeepingManager *manager,
{
gchar *dir;
g_debug ("Starting housekeeping manager");
gnome_settings_profile_start (NULL);
/* Create ~/.local/ as early as possible */
(void) g_mkdir_with_parents(g_get_user_data_dir (), 0700);
/* Create ~/.local/share/applications/, see
* https://bugzilla.gnome.org/show_bug.cgi?id=703048 */
dir = g_build_filename (g_get_user_data_dir (), "applications", NULL);
(void) g_mkdir (dir, 0700);
g_free (dir);
gsd_ldsm_setup (FALSE);
manager->priv->settings = g_settings_new (THUMB_PREFIX);
g_signal_connect (G_OBJECT (manager->priv->settings), "changed",
G_CALLBACK (settings_changed_callback), manager);
/* Clean once, a few minutes after start-up */
do_cleanup_soon (manager);
/* Clean periodically, on a daily basis. */
manager->priv->long_term_cb = g_timeout_add_seconds (INTERVAL_ONCE_A_DAY,
(GSourceFunc) do_cleanup,
manager);
g_source_set_name_by_id (manager->priv->long_term_cb, "[gnome-settings-daemon] do_cleanup");
@ -398,7 +522,41 @@ index 2c94e35d..5efb0aaa 100644 @@ -398,7 +522,41 @@ index 2c94e35d..5efb0aaa 100644
gnome_settings_profile_end (NULL);
return TRUE;
@@ -452,6 +457,8 @@ gsd_housekeeping_manager_stop (GsdHousekeepingManager *manager)
}
void
gsd_housekeeping_manager_stop (GsdHousekeepingManager *manager)
{
GsdHousekeepingManagerPrivate *p = manager->priv;
g_debug ("Stopping housekeeping manager");
if (manager->priv->name_id != 0) {
g_bus_unown_name (manager->priv->name_id);
manager->priv->name_id = 0;
}
g_clear_object (&p->bus_cancellable);
g_clear_pointer (&p->introspection_data, g_dbus_node_info_unref);
g_clear_object (&p->connection);
if (p->short_term_cb) {
g_source_remove (p->short_term_cb);
p->short_term_cb = 0;
}
if (p->long_term_cb) {
g_source_remove (p->long_term_cb);
p->long_term_cb = 0;
/* Do a clean-up on shutdown if and only if the size or age
limits have been set to paranoid levels (zero) */
if ((g_settings_get_int (p->settings, THUMB_AGE_KEY) == 0) ||
(g_settings_get_int (p->settings, THUMB_SIZE_KEY) == 0)) {
do_cleanup (manager);
}
}
g_clear_object (&p->settings);
gsd_ldsm_clean ();
@ -407,9 +565,86 @@ index 2c94e35d..5efb0aaa 100644 @@ -407,9 +565,86 @@ index 2c94e35d..5efb0aaa 100644
}
static void
gsd_housekeeping_manager_finalize (GObject *object)
{
gsd_housekeeping_manager_stop (GSD_HOUSEKEEPING_MANAGER (object));
G_OBJECT_CLASS (gsd_housekeeping_manager_parent_class)->finalize (object);
}
static void
gsd_housekeeping_manager_class_init (GsdHousekeepingManagerClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->finalize = gsd_housekeeping_manager_finalize;
notify_init ("gnome-settings-daemon");
g_type_class_add_private (klass, sizeof (GsdHousekeepingManagerPrivate));
}
static void
gsd_housekeeping_manager_init (GsdHousekeepingManager *manager)
{
manager->priv = GSD_HOUSEKEEPING_MANAGER_GET_PRIVATE (manager);
}
GsdHousekeepingManager *
gsd_housekeeping_manager_new (void)
diff --git a/plugins/housekeeping/meson.build b/plugins/housekeeping/meson.build
index 5ac2455e..8582d10c 100644
--- a/plugins/housekeeping/meson.build
+++ b/plugins/housekeeping/meson.build
@@ -1,40 +1,43 @@
common_files = files(
'gsd-disk-space.c',
- 'gsd-disk-space-helper.c'
+ 'gsd-disk-space-helper.c',
+ 'gsd-gpu-mem.c'
)
sources = common_files + files(
'gsd-housekeeping-manager.c',
'main.c'
)
deps = plugins_deps + [
gtk_dep,
- libnotify_dep
+ libnotify_dep,
+ m_dep,
+ dl_dep
]
executable(
'gsd-' + plugin_name,
sources,
include_directories: [top_inc, common_inc],
dependencies: deps,
c_args: cflags,
install: true,
install_rpath: gsd_pkglibdir,
install_dir: gsd_libexecdir
)
programs = [
'gsd-disk-space-test',
'gsd-empty-trash-test',
'gsd-purge-temp-test'
]
foreach program: programs
executable(
program,
common_files + [program + '.c'],
include_directories: top_inc,
dependencies: deps
)
endforeach
diff --git a/plugins/housekeeping/nvml/include/nvml.h b/plugins/housekeeping/nvml/include/nvml.h
new file mode 100644
index 00000000..778b4bfb
index 00000000..f151007e
--- /dev/null
+++ b/plugins/housekeeping/nvml/include/nvml.h
@@ -0,0 +1,4447 @@
@ -4861,5 +5096,5 @@ index 00000000..778b4bfb @@ -4861,5 +5096,5 @@ index 00000000..778b4bfb
+
+#endif
--
2.14.2
2.17.0


6
SOURCES/0001-smartcard-Wait-until-smartcards-are-inspected-before.patch

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
From 0c5ef2671ad9e439ced820d0a5f6a26ed67cb6e8 Mon Sep 17 00:00:00 2001
From 0665bd86221d3c9012f0391d8e4939a2d12b6417 Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Fri, 9 Feb 2018 16:39:12 -0500
Subject: [PATCH 1/2] smartcard: Wait until smartcards are inspected before
@ -11,7 +11,7 @@ the smartcard's insertion status. @@ -11,7 +11,7 @@ the smartcard's insertion status.
This commit fixes the race by iterating through all smartcards at
startup and checking their status explicitly.
---
plugins/smartcard/gsd-smartcard-manager.c | 61 +++++++++++++++++++++++++------
plugins/smartcard/gsd-smartcard-manager.c | 61 ++++++++++++++++++-----
1 file changed, 49 insertions(+), 12 deletions(-)

diff --git a/plugins/smartcard/gsd-smartcard-manager.c b/plugins/smartcard/gsd-smartcard-manager.c
@ -335,5 +335,5 @@ index a6245425..94ffdd90 100644 @@ -335,5 +335,5 @@ index a6245425..94ffdd90 100644
else
g_task_return_new_error (task, GSD_SMARTCARD_MANAGER_ERROR,
--
2.14.3
2.17.0


80
SOURCES/0002-Revert-sharing-Fix-function-arguments.patch

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
From 12a9c6d06abcd8276612a982b98dbb757b0cd5d3 Mon Sep 17 00:00:00 2001
From 0d732317df634f7586cf6c5e34394082ea5ea931 Mon Sep 17 00:00:00 2001
From: Rui Matos <tiagomatos@gmail.com>
Date: Wed, 11 Oct 2017 18:10:40 +0200
Subject: [PATCH 2/3] Revert "sharing: Fix function arguments"
@ -12,7 +12,34 @@ diff --git a/plugins/sharing/gsd-sharing-manager.c b/plugins/sharing/gsd-sharing @@ -12,7 +12,34 @@ diff --git a/plugins/sharing/gsd-sharing-manager.c b/plugins/sharing/gsd-sharing
index a90df9a6..26663442 100644
--- a/plugins/sharing/gsd-sharing-manager.c
+++ b/plugins/sharing/gsd-sharing-manager.c
@@ -128,6 +128,7 @@ handle_unit_cb (GObject *source_object,
@@ -101,99 +101,102 @@ static const char * const services[] = {
"vino-server",
"gnome-remote-desktop",
"gnome-user-share-webdav"
};
static void
handle_unit_cb (GObject *source_object,
GAsyncResult *res,
gpointer user_data)
{
GError *error = NULL;
GVariant *ret;
const char *operation = user_data;
ret = g_dbus_connection_call_finish (G_DBUS_CONNECTION (source_object),
res, &error);
if (!ret) {
if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
g_warning ("Failed to %s service: %s", operation, error->message);
g_error_free (error);
return;
}
g_variant_unref (ret);
}
static void
gsd_sharing_manager_handle_service (GsdSharingManager *manager,
const char *method,
@ -20,7 +47,15 @@ index a90df9a6..26663442 100644 @@ -20,7 +47,15 @@ index a90df9a6..26663442 100644
ServiceInfo *service)
{
char *service_file;
@@ -143,8 +144,8 @@ gsd_sharing_manager_handle_service (GsdSharingManager *manager,
service_file = g_strdup_printf ("%s.service", service->name);
g_dbus_connection_call (manager->priv->connection,
"org.freedesktop.systemd1",
"/org/freedesktop/systemd1",
"org.freedesktop.systemd1.Manager",
method,
g_variant_new ("(ss)", service_file, "replace"),
NULL,
G_DBUS_CALL_FLAGS_NONE,
-1,
manager->priv->cancellable,
@ -31,7 +66,12 @@ index a90df9a6..26663442 100644 @@ -31,7 +66,12 @@ index a90df9a6..26663442 100644
g_free (service_file);
}
@@ -157,7 +158,8 @@ gsd_sharing_manager_start_service (GsdSharingManager *manager,
static void
gsd_sharing_manager_start_service (GsdSharingManager *manager,
ServiceInfo *service)
{
g_debug ("About to start %s", service->name);
/* We use StartUnit, not StartUnitReplace, since the latter would
* cancel any pending start we already have going from an
* earlier _start_service() call */
@ -41,7 +81,8 @@ index a90df9a6..26663442 100644 @@ -41,7 +81,8 @@ index a90df9a6..26663442 100644
}
static void
@@ -166,7 +168,8 @@ gsd_sharing_manager_stop_service (GsdSharingManager *manager,
gsd_sharing_manager_stop_service (GsdSharingManager *manager,
ServiceInfo *service)
{
g_debug ("About to stop %s", service->name);
@ -51,6 +92,33 @@ index a90df9a6..26663442 100644 @@ -51,6 +92,33 @@ index a90df9a6..26663442 100644
}
#ifdef HAVE_NETWORK_MANAGER
static gboolean
service_is_enabled_on_current_connection (GsdSharingManager *manager,
ServiceInfo *service)
{
char **connections;
int j;
gboolean ret;
connections = g_settings_get_strv (service->settings, "enabled-connections");
ret = FALSE;
for (j = 0; connections[j] != NULL; j++) {
if (g_strcmp0 (connections[j], manager->priv->current_network) == 0) {
ret = TRUE;
break;
}
}
g_strfreev (connections);
return ret;
}
#else
static gboolean
service_is_enabled_on_current_connection (GsdSharingManager *manager,
ServiceInfo *service)
{
return FALSE;
}
#endif /* HAVE_NETWORK_MANAGER */
--
2.13.5
2.17.0


60
SOURCES/0002-account-reshow-the-notification-when-screen-unlocks.patch

@ -1,62 +1,14 @@ @@ -1,62 +1,14 @@
From a7d9b55b339aa7b6833aa377a396157fa5a23cb1 Mon Sep 17 00:00:00 2001
From 1a3c72c8c6abcc3c08e69c5c238636a2dc56ed2d Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Mon, 6 Nov 2017 15:49:58 -0500
Subject: [PATCH 2/3] account: reshow the notification when screen unlocks

---
data/Makefile.am | 1 +
plugins/account/gsd-account-manager.c | 48 +++++++++++++++++++++++++++++++----
2 files changed, 44 insertions(+), 5 deletions(-)

diff --git a/data/Makefile.am b/data/Makefile.am
index 06fd2b38..c34b7a9c 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -1,41 +1,42 @@
NULL =
apidir = $(includedir)/gnome-settings-daemon-$(GSD_API_VERSION)/gnome-settings-daemon
api_DATA = gsd-enums.h
gsettings_ENUM_NAMESPACE = org.gnome.settings-daemon
gsettings_ENUM_FILES = $(top_srcdir)/data/$(api_DATA)
gsettings_SCHEMAS = \
org.gnome.settings-daemon.peripherals.gschema.xml \
org.gnome.settings-daemon.plugins.gschema.xml \
+ org.gnome.settings-daemon.plugins.account.gschema.xml \
org.gnome.settings-daemon.plugins.power.gschema.xml \
org.gnome.settings-daemon.plugins.color.gschema.xml \
org.gnome.settings-daemon.plugins.media-keys.gschema.xml \
org.gnome.settings-daemon.plugins.sharing.gschema.xml \
org.gnome.settings-daemon.plugins.xsettings.gschema.xml \
org.gnome.settings-daemon.plugins.housekeeping.gschema.xml \
org.gnome.settings-daemon.peripherals.wacom.gschema.xml
@INTLTOOL_XML_NOMERGE_RULE@
@GSETTINGS_RULES@
convertdir = $(datadir)/GConf/gsettings
convert_DATA = gnome-settings-daemon.convert
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = gnome-settings-daemon.pc
@INTLTOOL_XML_NOMERGE_RULE@
EXTRA_DIST = \
$(convert_DATA) \
$(gsettings_SCHEMAS:.xml=.xml.in.in) \
$(gsettings_ENUM_FILES) \
gnome-settings-daemon.pc.in \
$(api_DATA) \
$(NULL)
DISTCLEANFILES = \
$(gsettings_SCHEMAS) \
plugins/account/gsd-account-manager.c | 48 ++++++++++++++++++++++++---
1 file changed, 43 insertions(+), 5 deletions(-)

diff --git a/plugins/account/gsd-account-manager.c b/plugins/account/gsd-account-manager.c
index 642d5bcc..948679b1 100644
index 40b91cb6..cb37f466 100644
--- a/plugins/account/gsd-account-manager.c
+++ b/plugins/account/gsd-account-manager.c
@@ -11,72 +11,75 @@
@ -315,5 +267,5 @@ index 642d5bcc..948679b1 100644 @@ -315,5 +267,5 @@ index 642d5bcc..948679b1 100644
manager = GSD_ACCOUNT_MANAGER (object);
--
2.14.2
2.17.0


6
SOURCES/0002-smartcard-handle-a-smartcard-getting-removed-very-sh.patch

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
From 492b0d048e126b690754cb3cac29eabfa608a9d9 Mon Sep 17 00:00:00 2001
From 3aa4de5e6f2b698abf063ddbea5008f5b732aa18 Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Fri, 9 Feb 2018 16:40:53 -0500
Subject: [PATCH 2/2] smartcard: handle a smartcard getting removed very
@ -15,7 +15,7 @@ smartcard alias object that's around even if the login token isn't. @@ -15,7 +15,7 @@ smartcard alias object that's around even if the login token isn't.
Once the login token does show up it gets synchronized with it, so
both object paths refer to the same underlying token.
---
plugins/smartcard/gsd-smartcard-service.c | 82 +++++++++++++++++++++++++++++++
plugins/smartcard/gsd-smartcard-service.c | 82 +++++++++++++++++++++++
1 file changed, 82 insertions(+)

diff --git a/plugins/smartcard/gsd-smartcard-service.c b/plugins/smartcard/gsd-smartcard-service.c
@ -380,5 +380,5 @@ index 0710334b..6969ff34 100644 @@ -380,5 +380,5 @@ index 0710334b..6969ff34 100644
RegisterNewTokenOperation *operation;
SECMODModule *driver;
--
2.14.3
2.17.0


158
SOURCES/0003-Revert-sharing-Use-systemd-to-track-running-services.patch

@ -1,18 +1,45 @@ @@ -1,18 +1,45 @@
From dc9f7c0adc0b65aec010586e8b9848db5f0964de Mon Sep 17 00:00:00 2001
From 9b03a1eb04442c74dd990cda0f44ccf283413a75 Mon Sep 17 00:00:00 2001
From: Rui Matos <tiagomatos@gmail.com>
Date: Wed, 11 Oct 2017 18:10:54 +0200
Subject: [PATCH 3/3] Revert "sharing: Use systemd to track running services"

This reverts commit e0b7f4143bdd201c824499dd09159f5890a07c6a.
---
plugins/sharing/gsd-sharing-manager.c | 114 ++++++++++++++++------------------
plugins/sharing/gsd-sharing-manager.c | 114 +++++++++++++-------------
1 file changed, 55 insertions(+), 59 deletions(-)

diff --git a/plugins/sharing/gsd-sharing-manager.c b/plugins/sharing/gsd-sharing-manager.c
index 26663442..b24c4814 100644
--- a/plugins/sharing/gsd-sharing-manager.c
+++ b/plugins/sharing/gsd-sharing-manager.c
@@ -38,6 +38,8 @@
@@ -11,60 +11,62 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*
*/
#include "config.h"
#include <locale.h>
#include <glib.h>
#include <gio/gio.h>
#include <gio/gdesktopappinfo.h>
#include <glib/gstdio.h>
#ifdef HAVE_NETWORK_MANAGER
#include <NetworkManager.h>
#endif /* HAVE_NETWORK_MANAGER */
#include "gnome-settings-profile.h"
#include "gsd-sharing-manager.h"
#include "gsd-sharing-enums.h"
#define GSD_SHARING_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GSD_TYPE_SHARING_MANAGER, GsdSharingManagerPrivate))
typedef struct {
const char *name;
GSettings *settings;
@ -21,7 +48,61 @@ index 26663442..b24c4814 100644 @@ -21,7 +48,61 @@ index 26663442..b24c4814 100644
} ServiceInfo;
struct GsdSharingManagerPrivate
@@ -104,72 +106,48 @@ static const char * const services[] = {
{
GDBusNodeInfo *introspection_data;
guint name_id;
GDBusConnection *connection;
GCancellable *cancellable;
#ifdef HAVE_NETWORK_MANAGER
NMClient *client;
#endif /* HAVE_NETWORK_MANAGER */
GHashTable *services;
char *current_network;
char *current_network_name;
char *carrier_type;
GsdSharingStatus sharing_status;
};
#define GSD_DBUS_NAME "org.gnome.SettingsDaemon"
#define GSD_DBUS_PATH "/org/gnome/SettingsDaemon"
#define GSD_DBUS_BASE_INTERFACE "org.gnome.SettingsDaemon"
#define GSD_SHARING_DBUS_NAME GSD_DBUS_NAME ".Sharing"
#define GSD_SHARING_DBUS_PATH GSD_DBUS_PATH "/Sharing"
static const gchar introspection_xml[] =
"<node>"
@@ -77,176 +79,170 @@ static const gchar introspection_xml[] =
" <method name='EnableService'>"
" <arg name='service-name' direction='in' type='s'/>"
" </method>"
" <method name='DisableService'>"
" <arg name='service-name' direction='in' type='s'/>"
" <arg name='network' direction='in' type='s'/>"
" </method>"
" <method name='ListNetworks'>"
" <arg name='service-name' direction='in' type='s'/>"
" <arg name='networks' direction='out' type='a(sss)'/>"
" </method>"
" </interface>"
"</node>";
static void gsd_sharing_manager_class_init (GsdSharingManagerClass *klass);
static void gsd_sharing_manager_init (GsdSharingManager *manager);
static void gsd_sharing_manager_finalize (GObject *object);
G_DEFINE_TYPE (GsdSharingManager, gsd_sharing_manager, G_TYPE_OBJECT)
static gpointer manager_object = NULL;
static const char * const services[] = {
"rygel",
"vino-server",
"gnome-remote-desktop",
"gnome-user-share-webdav"
};
static void
@ -125,10 +206,35 @@ index 26663442..b24c4814 100644 @@ -125,10 +206,35 @@ index 26663442..b24c4814 100644
}
#ifdef HAVE_NETWORK_MANAGER
@@ -202,6 +180,22 @@ service_is_enabled_on_current_connection (GsdSharingManager *manager,
static gboolean
service_is_enabled_on_current_connection (GsdSharingManager *manager,
ServiceInfo *service)
{
char **connections;
int j;
gboolean ret;
connections = g_settings_get_strv (service->settings, "enabled-connections");
ret = FALSE;
for (j = 0; connections[j] != NULL; j++) {
if (g_strcmp0 (connections[j], manager->priv->current_network) == 0) {
ret = TRUE;
break;
}
}
g_strfreev (connections);
return ret;
}
#else
static gboolean
service_is_enabled_on_current_connection (GsdSharingManager *manager,
ServiceInfo *service)
{
return FALSE;
}
#endif /* HAVE_NETWORK_MANAGER */
static void
+static void
+gsd_sharing_manager_stop_service (GsdSharingManager *manager,
+ ServiceInfo *service)
+{
@ -144,11 +250,18 @@ index 26663442..b24c4814 100644 @@ -144,11 +250,18 @@ index 26663442..b24c4814 100644
+ service->started = FALSE;
+}
+
+static void
static void
gsd_sharing_manager_sync_services (GsdSharingManager *manager)
{
GList *services, *l;
@@ -216,10 +210,12 @@ gsd_sharing_manager_sync_services (GsdSharingManager *manager)
services = g_hash_table_get_values (manager->priv->services);
for (l = services; l != NULL; l = l->next) {
ServiceInfo *service = l->data;
gboolean should_be_started = FALSE;
if (manager->priv->sharing_status == GSD_SHARING_STATUS_AVAILABLE &&
service_is_enabled_on_current_connection (manager, service))
should_be_started = TRUE;
@ -165,6 +278,33 @@ index 26663442..b24c4814 100644 @@ -165,6 +278,33 @@ index 26663442..b24c4814 100644
}
g_list_free (services);
}
#ifdef HAVE_NETWORK_MANAGER
static void
properties_changed (GsdSharingManager *manager)
{
GVariantBuilder props_builder;
GVariant *props_changed = NULL;
/* not yet connected to the session bus */
if (manager->priv->connection == NULL)
return;
g_variant_builder_init (&props_builder, G_VARIANT_TYPE ("a{sv}"));
g_variant_builder_add (&props_builder, "{sv}", "CurrentNetwork",
g_variant_new_string (manager->priv->current_network));
g_variant_builder_add (&props_builder, "{sv}", "CurrentNetworkName",
g_variant_new_string (manager->priv->current_network_name));
g_variant_builder_add (&props_builder, "{sv}", "CarrierType",
g_variant_new_string (manager->priv->carrier_type));
g_variant_builder_add (&props_builder, "{sv}", "SharingStatus",
g_variant_new_uint32 (manager->priv->sharing_status));
props_changed = g_variant_new ("(s@a{sv}@as)", GSD_SHARING_DBUS_NAME,
g_variant_builder_end (&props_builder),
g_variant_new_strv (NULL, 0));
--
2.13.5
2.17.0


132
SOURCES/0003-account-display-nag-screen-periodically.patch

@ -1,99 +1,75 @@ @@ -1,99 +1,75 @@
From 457ca3295017c34c6805c9dd18599b760705afc5 Mon Sep 17 00:00:00 2001
From 0cc5343bdd13cd208e394bb430ecef43748dbc49 Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Mon, 6 Nov 2017 16:39:55 -0500
Subject: [PATCH 3/3] account: display nag screen periodically

This is configurable via a gsettings key.
---
configure.ac | 1 +
...ttings-daemon.plugins.account.gschema.xml.in.in | 9 ++++
plugins/account/gsd-account-manager.c | 55 ++++++++++++++++++++++
data/meson.build | 1 +
...ings-daemon.plugins.account.gschema.xml.in | 9 +++
plugins/account/gsd-account-manager.c | 55 +++++++++++++++++++
3 files changed, 65 insertions(+)
create mode 100644 data/org.gnome.settings-daemon.plugins.account.gschema.xml.in.in

diff --git a/configure.ac b/configure.ac
index 5bd742e5..ed5374db 100644
--- a/configure.ac
+++ b/configure.ac
@@ -508,60 +508,61 @@ AC_SUBST(DEBUG_CFLAGS)
AC_CONFIG_FILES([
Makefile
gnome-settings-daemon/Makefile
plugins/Makefile
plugins/a11y-keyboard/Makefile
plugins/a11y-settings/Makefile
plugins/account/Makefile
plugins/clipboard/Makefile
plugins/color/Makefile
plugins/common/Makefile
plugins/datetime/Makefile
plugins/dummy/Makefile
plugins/power/Makefile
plugins/housekeeping/Makefile
plugins/keyboard/Makefile
plugins/media-keys/Makefile
plugins/media-keys/gvc/Makefile
plugins/mouse/Makefile
plugins/print-notifications/Makefile
plugins/rfkill/Makefile
plugins/screensaver-proxy/Makefile
plugins/sharing/Makefile
plugins/smartcard/Makefile
plugins/sound/Makefile
plugins/wacom/Makefile
plugins/xsettings/Makefile
data/Makefile
data/gnome-settings-daemon.pc
data/org.gnome.settings-daemon.plugins.gschema.xml.in
+data/org.gnome.settings-daemon.plugins.account.gschema.xml.in
data/org.gnome.settings-daemon.plugins.xsettings.gschema.xml.in
data/org.gnome.settings-daemon.plugins.power.gschema.xml.in
data/org.gnome.settings-daemon.plugins.color.gschema.xml.in
data/org.gnome.settings-daemon.plugins.media-keys.gschema.xml.in
data/org.gnome.settings-daemon.peripherals.gschema.xml.in
data/org.gnome.settings-daemon.plugins.housekeeping.gschema.xml.in
data/org.gnome.settings-daemon.plugins.sharing.gschema.xml.in
data/org.gnome.settings-daemon.peripherals.wacom.gschema.xml.in
po/Makefile.in
tests/Makefile
])
AC_OUTPUT
dnl ---------------------------------------------------------------------------
dnl - Show summary
dnl ---------------------------------------------------------------------------
echo "
gnome-settings-daemon $VERSION
=============================
prefix: ${prefix}
exec_prefix: ${exec_prefix}
libdir: ${libdir}
bindir: ${bindir}
sbindir: ${sbindir}
sysconfdir: ${sysconfdir}
sysconfsubdir: ${sysconfsubdir}
localstatedir: ${localstatedir}
plugindir: ${plugindir}
diff --git a/data/org.gnome.settings-daemon.plugins.account.gschema.xml.in.in b/data/org.gnome.settings-daemon.plugins.account.gschema.xml.in.in
create mode 100644 data/org.gnome.settings-daemon.plugins.account.gschema.xml.in

diff --git a/data/meson.build b/data/meson.build
index 5c4fb507..37eea875 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -1,36 +1,37 @@
data_inc = include_directories('.')
schemas = [
'org.gnome.settings-daemon.peripherals.gschema.xml',
'org.gnome.settings-daemon.peripherals.wacom.gschema.xml',
'org.gnome.settings-daemon.plugins.gschema.xml',
+ 'org.gnome.settings-daemon.plugins.account.gschema.xml',
'org.gnome.settings-daemon.plugins.color.gschema.xml',
'org.gnome.settings-daemon.plugins.housekeeping.gschema.xml',
'org.gnome.settings-daemon.plugins.media-keys.gschema.xml',
'org.gnome.settings-daemon.plugins.power.gschema.xml',
'org.gnome.settings-daemon.plugins.sharing.gschema.xml',
'org.gnome.settings-daemon.plugins.xsettings.gschema.xml'
]
schema_conf = configuration_data()
schema_conf.set('GETTEXT_PACKAGE', meson.project_name())
foreach schema: schemas
configure_file(
input: schema + '.in',
output: schema,
configuration: schema_conf,
install: true,
install_dir: gsd_schemadir
)
endforeach
enums_header = files('gsd-enums.h')
gnome.mkenums(
'org.gnome.settings-daemon.enums.xml',
sources: enums_header,
comments: '<!-- @comment@ -->',
fhead: '<schemalist>',
vhead: ' <@type@ id="org.gnome.settings-daemon.@EnumName@">',
vprod: ' <value nick="@valuenick@" value="@valuenum@"/>',
diff --git a/data/org.gnome.settings-daemon.plugins.account.gschema.xml.in b/data/org.gnome.settings-daemon.plugins.account.gschema.xml.in
new file mode 100644
index 00000000..0b3a9d97
--- /dev/null
+++ b/data/org.gnome.settings-daemon.plugins.account.gschema.xml.in.in
+++ b/data/org.gnome.settings-daemon.plugins.account.gschema.xml.in
@@ -0,0 +1,9 @@
+<schemalist>
+ <schema gettext-domain="@GETTEXT_PACKAGE@" id="org.gnome.settings-daemon.plugins.account" path="/org/gnome/settings-daemon/plugins/account/">
+ <key name="notify-period" type="i">
+ <default>1440</default>
+ <_summary>Time before repeated warning about account password expiration</_summary>
+ <_description>If a user's account is expiring, a notification will get displayed periodically after the specified number of minutes</_description>
+ <summary>Time before repeated warning about account password expiration</summary>
+ <description>If a user's account is expiring, a notification will get displayed periodically after the specified number of minutes</description>
+ </key>
+ </schema>
+</schemalist>
diff --git a/plugins/account/gsd-account-manager.c b/plugins/account/gsd-account-manager.c
index 948679b1..f6db04f8 100644
index cb37f466..ff054edd 100644
--- a/plugins/account/gsd-account-manager.c
+++ b/plugins/account/gsd-account-manager.c
@@ -20,126 +20,135 @@
@ -471,5 +447,5 @@ index 948679b1..f6db04f8 100644 @@ -471,5 +447,5 @@ index 948679b1..f6db04f8 100644
g_return_if_fail (object != NULL);
--
2.14.2
2.17.0


16
SOURCES/gnome-settings-daemon-python3.patch

@ -0,0 +1,16 @@ @@ -0,0 +1,16 @@
--- gnome-settings-daemon-3.28.1/meson_post_install.py.python3 2018-04-12 19:08:48.000000000 +0200
+++ gnome-settings-daemon-3.28.1/meson_post_install.py 2018-05-16 22:30:01.512877876 +0200
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/env python
import os
import subprocess
--- gnome-settings-daemon-3.28.1/gnome-settings-daemon/codegen.py.python3 2018-04-12 19:08:48.000000000 +0200
+++ gnome-settings-daemon-3.28.1/gnome-settings-daemon/codegen.py 2018-05-16 22:30:21.080876549 +0200
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/env python
'''
FIXME

3
SOURCES/org.gnome.settings-daemon.plugins.power.gschema.override

@ -0,0 +1,3 @@ @@ -0,0 +1,3 @@
[org.gnome.settings-daemon.plugins.power]
sleep-inactive-ac-timeout=0
sleep-inactive-battery-timeout=0

58
SPECS/gnome-settings-daemon.spec

@ -1,19 +1,20 @@ @@ -1,19 +1,20 @@
%global glib2_version 2.53.0
%global gtk3_version 3.15.3
%global gnome_desktop_version 3.11.1
%global gnome_desktop_version 3.27.90
%global libgweather_version 3.9.5
%global gsettings_desktop_schemas_version 3.23.3
%global geocode_glib_version 3.10.0
%global geoclue_version 2.3.1

Name: gnome-settings-daemon
Version: 3.26.2
Release: 9%{?dist}
Version: 3.28.1
Release: 2%{?dist}
Summary: The daemon sharing settings from GNOME to GTK+/KDE applications

License: GPLv2+
URL: https://download.gnome.org/sources/%{name}
Source0: https://download.gnome.org/sources/%{name}/3.26/%{name}-%{version}.tar.xz
Source0: https://download.gnome.org/sources/%{name}/3.28/%{name}-%{version}.tar.xz
Source1: org.gnome.settings-daemon.plugins.power.gschema.override

Patch0: 0001-Revert-Revert-plugins-Work-around-startup-deadlock.patch
Patch1: 0002-Revert-sharing-Fix-function-arguments.patch
@ -24,13 +25,16 @@ Patch11: 0002-account-reshow-the-notification-when-screen-unlocks.patch @@ -24,13 +25,16 @@ Patch11: 0002-account-reshow-the-notification-when-screen-unlocks.patch
Patch12: 0003-account-display-nag-screen-periodically.patch

Patch20: 0001-housekeeping-Add-a-GPU-memory-usage-notification.patch
Patch21: 0001-common-Ensure-screen-integrated-devices-get-remapped.patch

Patch40: 0001-smartcard-Wait-until-smartcards-are-inspected-before.patch
Patch41: 0002-smartcard-handle-a-smartcard-getting-removed-very-sh.patch

BuildRequires: autoconf automake libtool gnome-common
BuildRequires: git
Patch50: gnome-settings-daemon-python3.patch

BuildRequires: cups-devel
BuildRequires: gettext
BuildRequires: meson
BuildRequires: perl
BuildRequires: pkgconfig(alsa)
BuildRequires: pkgconfig(colord) >= 1.0.2
BuildRequires: pkgconfig(fontconfig)
@ -56,13 +60,7 @@ BuildRequires: pkgconfig(upower-glib) @@ -56,13 +60,7 @@ BuildRequires: pkgconfig(upower-glib)
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xi)
BuildRequires: pkgconfig(xtst)
BuildRequires: gettext intltool
BuildRequires: cups-devel
%if 0%{?fedora}
BuildRequires: pkgconfig(wayland-client)
%endif
BuildRequires: libxslt
BuildRequires: docbook-style-xsl
%ifnarch s390 s390x
BuildRequires: pkgconfig(libwacom) >= 0.7
BuildRequires: pkgconfig(xorg-wacom)
@ -84,11 +82,14 @@ Obsoletes: %{name}-updates < 3.13.1 @@ -84,11 +82,14 @@ Obsoletes: %{name}-updates < 3.13.1
Obsoletes: drwright < 3.5.0-3
Obsoletes: gnome-settings-daemon-devel < 3.23.1

# The "org.gnome.SettingsDaemon.A11yKeyboard" has been been removed, now
# handled in gnome-shell/mutter instead; this conflict here makes sure not to
# break older gdm and gnome-session releases that expect the functionality
Conflicts: gdm < 1:3.27.90
Conflicts: gnome-session < 3.27.90
# The orientation and xrandr plugins were removed in 3.25.4 and their
# functionality was moved to mutter; this conflict here makes sure not to break
# older gdm, gnome-session and gnome-shell releases that expect the functionality
Conflicts: gdm < 1:3.25.4.1
Conflicts: gnome-session < 3.25.4
Conflicts: gnome-shell < 3.25.4

%description
@ -104,19 +105,16 @@ The %{name}-devel package contains libraries and header files for @@ -104,19 +105,16 @@ The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.

%prep
%autosetup -S git

autoreconf -f -i
%autosetup -p1

%build
%configure --disable-static \
--enable-profiling
make %{?_smp_mflags}

%meson
%meson_build

%install
%make_install
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
%meson_install

cp %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/glib-2.0/schemas

%find_lang %{name} --with-gnome

@ -142,9 +140,6 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : @@ -142,9 +140,6 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :

# list daemons explicitly, so we notice if one goes missing
# some of these don't have a separate gschema
%{_libexecdir}/gsd-a11y-keyboard
%{_sysconfdir}/xdg/autostart/org.gnome.SettingsDaemon.A11yKeyboard.desktop

%{_libexecdir}/gsd-account
%{_sysconfdir}/xdg/autostart/org.gnome.SettingsDaemon.Account.desktop
%{_datadir}/glib-2.0/schemas/org.gnome.settings-daemon.plugins.account.gschema.xml
@ -177,6 +172,7 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : @@ -177,6 +172,7 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
%{_libexecdir}/gsd-power
%{_sysconfdir}/xdg/autostart/org.gnome.SettingsDaemon.Power.desktop
%{_datadir}/glib-2.0/schemas/org.gnome.settings-daemon.plugins.power.gschema.xml
%{_datadir}/glib-2.0/schemas/org.gnome.settings-daemon.plugins.power.gschema.override

%{_libexecdir}/gsd-print-notifications
%{_sysconfdir}/xdg/autostart/org.gnome.SettingsDaemon.PrintNotifications.desktop
@ -235,6 +231,14 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : @@ -235,6 +231,14 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
%{_libexecdir}/gsd-test-input-helper

%changelog
* Thu Jul 26 2018 Ray Strode <rstrode@redhat.com> - 3.28.1-2
- Fix account schema
Resolves: #1597353

* Thu Apr 12 2018 Kalev Lember <klember@redhat.com> - 3.28.1-1
- Update to 3.28.1
- Resolves: #1568621

* Wed Feb 14 2018 Bastien Nocera <bnocera@redhat.com> - 3.26.2-9
+ gnome-settings-daemon-3.26.2-9
- Revert automatic suspend after inactivity, it was rejected

Loading…
Cancel
Save