diff options
-rw-r--r-- | gnome-base/gnome-settings-daemon/Manifest | 2 | ||||
-rw-r--r-- | gnome-base/gnome-settings-daemon/files/3.24.2-fix-color-tests.patch | 85 | ||||
-rw-r--r-- | gnome-base/gnome-settings-daemon/files/3.24.2-optional.patch (renamed from gnome-base/gnome-settings-daemon/files/gnome-settings-daemon-3.24.0-optional.patch) | 0 | ||||
-rw-r--r-- | gnome-base/gnome-settings-daemon/files/3.24.2-reduce-memory-usage.patch | 177 | ||||
-rw-r--r-- | gnome-base/gnome-settings-daemon/files/3.24.2-remove-unneeded-gtk-init.patch | 77 | ||||
-rw-r--r-- | gnome-base/gnome-settings-daemon/files/3.24.2-udevrulesdir-configure.patch | 48 | ||||
-rw-r--r-- | gnome-base/gnome-settings-daemon/gnome-settings-daemon-3.24.2.ebuild (renamed from gnome-base/gnome-settings-daemon/gnome-settings-daemon-3.24.0.ebuild) | 13 |
7 files changed, 398 insertions, 4 deletions
diff --git a/gnome-base/gnome-settings-daemon/Manifest b/gnome-base/gnome-settings-daemon/Manifest index d8c2242ce766..a5f3d72f07b2 100644 --- a/gnome-base/gnome-settings-daemon/Manifest +++ b/gnome-base/gnome-settings-daemon/Manifest @@ -1,2 +1,2 @@ DIST gnome-settings-daemon-3.22.2.tar.xz 1657132 SHA256 0a1c1f9bce59a86617c45f77bd9cb99c6db38b96678a89d7ad2ab6b7bc6a1a01 SHA512 7bbeb0b50d178bf951f5a8375703f3e2e88b7c5082ec7394df1f277dd08059e616118e003db23dcc175b92d803924b3927326d10a2101b7923dfb0e980d277e3 WHIRLPOOL edae1afc97a314f3d90c7d77d9a456e74e9fe9059353e15a5a9b8318c32d2ebad792e7c9b7acaf54a8f3ea11a5de629f06d7bdb9cb3d5bff4f0621fe6a50683a -DIST gnome-settings-daemon-3.24.0.tar.xz 1620184 SHA256 4f31a68aebdd4e0c37336306a4eea4cf219d46ed8fc59e3f3081b7a3088900c4 SHA512 94bf904cb424baa4201fc49e7ea978f86c6e7ede74794fefec784ca125e86b949e8ea7585284377a586d73d438a9fcf0ef9d9e0dc26c4fcba60250b384ec797a WHIRLPOOL e86332a1872bff33511d84d213f4ecb11be0510a1d1e87513f35efcc51a56b3c5d0233bb000671ccb3c5f49f975621a35a315b2353ccd3c02aaec135c0f842bb +DIST gnome-settings-daemon-3.24.2.tar.xz 1621368 SHA256 4aa9d72644e3ee8a30096a38986b0e9543fca92f586c561f6c8a11fb8148dcca SHA512 fa75a499750c9e8f8fd2c1af44d033e55f90f97ef39c4159fa58a2957aeae036b4ae505dede6333b640b0dfcd0400eacd3715aeb184fc021c1d787230b1a1f12 WHIRLPOOL 305f16567488b54be4f7ec359f4a1249c18de74e967a410e18fd4bc8b84748bd5146a3bd2b86852d9e6a37bc829b281e79a38c7a3cfcece5f80ae516d062780f diff --git a/gnome-base/gnome-settings-daemon/files/3.24.2-fix-color-tests.patch b/gnome-base/gnome-settings-daemon/files/3.24.2-fix-color-tests.patch new file mode 100644 index 000000000000..70069589dae7 --- /dev/null +++ b/gnome-base/gnome-settings-daemon/files/3.24.2-fix-color-tests.patch @@ -0,0 +1,85 @@ +From 63b73af23efd97de34a9dde58938c5c772040974 Mon Sep 17 00:00:00 2001 +From: Iain Lane <iain@orangesquash.org.uk> +Date: Fri, 19 May 2017 16:38:07 +0100 +Subject: [PATCH] color: Make the testcase able to run uninstalled + +Distributions might want to be able to run their tests during package +builds, for example. + +Compile the schema and set GSETTINGS_SCHEMA_DIR to the build dir. + +https://bugzilla.gnome.org/show_bug.cgi?id=782170 +--- + Makefile.am | 2 +- + plugins/color/Makefile.am | 11 ++++++++++- + plugins/color/gcm-self-test.c | 6 ++++++ + 3 files changed, 17 insertions(+), 2 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 0a32954..096c245 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -2,8 +2,8 @@ NULL = + + SUBDIRS = \ + gnome-settings-daemon \ +- plugins \ + data \ ++ plugins \ + po \ + tests \ + $(NULL) +diff --git a/plugins/color/Makefile.am b/plugins/color/Makefile.am +index a280ba8..35dcad4 100644 +--- a/plugins/color/Makefile.am ++++ b/plugins/color/Makefile.am +@@ -30,6 +30,15 @@ gcm_self_test_LDADD = \ + + TESTS = gcm-self-test + ++BUILT_SOURCES = gschemas.compiled ++ ++CLEANFILES = gschemas.compiled ++ ++gschemas.compiled: $(top_builddir)/data/org.gnome.settings-daemon.plugins.color.gschema.xml ++ $(AM_V_GEN) $(GLIB_COMPILE_SCHEMAS) --schema-file=$< --targetdir=$(builddir) ++ ++all-am: gschemas.compiled ++ + libexec_PROGRAMS = gsd-color + gsd_color_SOURCES = \ + main.c \ +@@ -80,7 +89,7 @@ EXTRA_DIST = \ + test-data/Lenovo-T61-Internal.bin \ + test-data/LG-L225W-External.bin + +-CLEANFILES = \ ++CLEANFILES += \ + $(desktop_DATA) + + DISTCLEANFILES = \ +diff --git a/plugins/color/gcm-self-test.c b/plugins/color/gcm-self-test.c +index 83c06c5..3f00b60 100644 +--- a/plugins/color/gcm-self-test.c ++++ b/plugins/color/gcm-self-test.c +@@ -281,11 +281,17 @@ gcm_test_frac_day (void) + int + main (int argc, char **argv) + { ++ char *schema_dir; ++ + g_setenv ("GSETTINGS_BACKEND", "memory", TRUE); + + gtk_init (&argc, &argv); + g_test_init (&argc, &argv, NULL); + ++ schema_dir = g_test_build_filename (G_TEST_BUILT, "", NULL); ++ g_setenv("GSETTINGS_SCHEMA_DIR", schema_dir, TRUE); ++ g_free (schema_dir); ++ + g_test_add_func ("/color/edid", gcm_test_edid_func); + g_test_add_func ("/color/sunset-sunrise", gcm_test_sunset_sunrise); + g_test_add_func ("/color/sunset-sunrise/fractional-timezone", gcm_test_sunset_sunrise_fractional_timezone); +-- +2.10.2 + diff --git a/gnome-base/gnome-settings-daemon/files/gnome-settings-daemon-3.24.0-optional.patch b/gnome-base/gnome-settings-daemon/files/3.24.2-optional.patch index 64c47a92e3f0..64c47a92e3f0 100644 --- a/gnome-base/gnome-settings-daemon/files/gnome-settings-daemon-3.24.0-optional.patch +++ b/gnome-base/gnome-settings-daemon/files/3.24.2-optional.patch diff --git a/gnome-base/gnome-settings-daemon/files/3.24.2-reduce-memory-usage.patch b/gnome-base/gnome-settings-daemon/files/3.24.2-reduce-memory-usage.patch new file mode 100644 index 000000000000..9e683b06d3ba --- /dev/null +++ b/gnome-base/gnome-settings-daemon/files/3.24.2-reduce-memory-usage.patch @@ -0,0 +1,177 @@ +From 386f456eda7a027dfc706ebb675602d6f067f5c6 Mon Sep 17 00:00:00 2001 +From: Christian Hergert <chergert@redhat.com> +Date: Mon, 27 Mar 2017 00:17:59 -0700 +Subject: [PATCH 5/5] common: avoid loading Adwaita CSS theme into memory + +The various Gtk programs are not dependent on any specific theme being +loaded. Therefore, the parsing the Adwaita CSS theme (which is quite a +detailed theme) is unnecessary and a few MB of overhead to each gsd +subprocess. + +By setting the GTK_THEME environment variable in main() and providing an +alternate CSS file (which is empty), we can force Gtk to never load the +default theme, but instead our empty theme. This is important as otherwise +GtkSettings can force-load Adwaita upon first use, and that fragments the +heap. + +https://bugzilla.gnome.org/show_bug.cgi?id=780555 +--- + configure.ac | 1 + + plugins/common/Makefile.am | 10 ++++++++++ + plugins/common/Makefile.am.gresources | 34 ++++++++++++++++++++++++++++++++++ + plugins/common/daemon-skeleton-gtk.h | 28 ++++++++++++++++++++++++++++ + plugins/common/gsd.gresources.xml | 6 ++++++ + plugins/common/gtk.css | 0 + 6 files changed, 79 insertions(+) + create mode 100644 plugins/common/Makefile.am.gresources + create mode 100644 plugins/common/gsd.gresources.xml + create mode 100644 plugins/common/gtk.css + +diff --git a/configure.ac b/configure.ac +index 475821d..df86831 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -73,6 +73,7 @@ AC_SUBST([GSD_PLUGIN_LDFLAGS]) + + AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal) + AC_PATH_PROG([GLIB_MKENUMS],[glib-mkenums]) ++AC_PATH_PROG([GLIB_COMPILE_RESOURCES], [glib-compile-resources]) + + LT_LIB_M + AC_SUBST(LIBM) +diff --git a/plugins/common/Makefile.am b/plugins/common/Makefile.am +index 239c601..706be12 100644 +--- a/plugins/common/Makefile.am ++++ b/plugins/common/Makefile.am +@@ -33,6 +33,8 @@ libcommon_la_SOURCES = \ + gsd-device-mapper.h \ + gsd-input-helper.c \ + gsd-input-helper.h \ ++ gsd-resources.c \ ++ gsd-resources.h \ + gsd-settings-migrate.c \ + gsd-settings-migrate.h \ + gsd-shell-helper.c \ +@@ -68,3 +70,11 @@ EXTRA_DIST = $(scripts_DATA) daemon-skeleton.h daemon-skeleton-gtk.h + + CLEANFILES = \ + $(GSD_COMMON_ENUM_FILES) ++ ++DISTCLEANFILES = ++ ++glib_resources_c = gsd-resources.c ++glib_resources_h = gsd-resources.h ++glib_resources_xml = gsd.gresources.xml ++glib_resources_namespace = gsd ++include Makefile.am.gresources +diff --git a/plugins/common/Makefile.am.gresources b/plugins/common/Makefile.am.gresources +new file mode 100644 +index 0000000..1441d0e +--- /dev/null ++++ b/plugins/common/Makefile.am.gresources +@@ -0,0 +1,34 @@ ++resources_xml=$(addprefix $(srcdir)/,$(glib_resources_xml)) ++resources_srcdir=$(dir $(resources_xml)) ++ ++DISTCLEANFILES += $(glib_resources_h) $(glib_resources_c) ++BUILT_SOURCES += $(glib_resources_h) $(glib_resources_c) ++CLEANFILES += stamp-resources $(glib_resources_c) $(glib_resources_h) ++EXTRA_DIST += \ ++ $(glib_resources_xml) \ ++ $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(resources_srcdir) --generate-dependencies $(resources_xml)) \ ++ $(NULL) ++ ++stamp-resources: $(glib_resources_c) $(resources_xml) ++ $(AM_V_GEN)$(GLIB_COMPILE_RESOURCES) \ ++ --target=xgen-gr.h \ ++ --sourcedir=$(resources_srcdir) \ ++ --generate-header \ ++ --c-name $(glib_resources_namespace) \ ++ $(resources_xml) \ ++ && (cmp -s xgen-gr.h $(glib_resources_h) || cp -f xgen-gr.h $(glib_resources_h)) \ ++ && rm -f xgen-gr.h \ ++ && echo timestamp > $(@F) ++ ++$(glib_resources_h): stamp-resources ++ @true ++ ++$(glib_resources_c): $(resources_xml) $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(resources_srcdir) --generate-dependencies $(resources_xml)) ++ $(AM_V_GEN)$(GLIB_COMPILE_RESOURCES) \ ++ --target=xgen-gr.c \ ++ --sourcedir=$(resources_srcdir) \ ++ --generate-source \ ++ --c-name $(glib_resources_namespace) \ ++ $(resources_xml) \ ++ && (cmp -s xgen-gr.c $(glib_resources_c) || cp -f xgen-gr.c $(glib_resources_c)) \ ++ && rm -f xgen-gr.c +diff --git a/plugins/common/daemon-skeleton-gtk.h b/plugins/common/daemon-skeleton-gtk.h +index 3bfd618..3ba0422 100644 +--- a/plugins/common/daemon-skeleton-gtk.h ++++ b/plugins/common/daemon-skeleton-gtk.h +@@ -163,6 +163,30 @@ register_with_gnome_session (void) + NULL); + } + ++static void ++set_empty_gtk_theme (gboolean set) ++{ ++ static char *old_gtk_theme = NULL; ++ ++ if (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) + { +@@ -172,6 +196,8 @@ main (int argc, char **argv) + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); + textdomain (GETTEXT_PACKAGE); + ++ set_empty_gtk_theme (TRUE); ++ + /* Work around https://bugzilla.gnome.org/show_bug.cgi?id=674885 */ + g_type_ensure (G_TYPE_DBUS_CONNECTION); + g_type_ensure (G_TYPE_DBUS_PROXY); +@@ -187,6 +213,8 @@ main (int argc, char **argv) + exit (1); + } + ++ set_empty_gtk_theme (FALSE); ++ + if (verbose) + g_setenv ("G_MESSAGES_DEBUG", "all", TRUE); + +diff --git a/plugins/common/gsd.gresources.xml b/plugins/common/gsd.gresources.xml +new file mode 100644 +index 0000000..e4ac1cd +--- /dev/null ++++ b/plugins/common/gsd.gresources.xml +@@ -0,0 +1,6 @@ ++<?xml version="1.0" encoding="UTF-8"?> ++<gresources> ++ <gresource prefix="/org/gtk/libgtk/theme/Disabled"> ++ <file>gtk.css</file> ++ </gresource> ++</gresources> +diff --git a/plugins/common/gtk.css b/plugins/common/gtk.css +new file mode 100644 +index 0000000..e69de29 +-- +2.10.2 + diff --git a/gnome-base/gnome-settings-daemon/files/3.24.2-remove-unneeded-gtk-init.patch b/gnome-base/gnome-settings-daemon/files/3.24.2-remove-unneeded-gtk-init.patch new file mode 100644 index 000000000000..e47ba34c60dc --- /dev/null +++ b/gnome-base/gnome-settings-daemon/files/3.24.2-remove-unneeded-gtk-init.patch @@ -0,0 +1,77 @@ +From b567ec92d5b3004ad52fa02fb02990fcafb63373 Mon Sep 17 00:00:00 2001 +From: Bastien Nocera <hadess@hadess.net> +Date: Mon, 27 Mar 2017 18:47:54 +0200 +Subject: [PATCH 1/3] housekeeping: Don't init GTK+ + +We don't use it. + +https://bugzilla.gnome.org/show_bug.cgi?id=780555 +--- + plugins/housekeeping/main.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/plugins/housekeeping/main.c b/plugins/housekeeping/main.c +index 5ccd83d..89c12f7 100644 +--- a/plugins/housekeeping/main.c ++++ b/plugins/housekeeping/main.c +@@ -4,4 +4,4 @@ + #define MANAGER GsdHousekeepingManager + #include "gsd-housekeeping-manager.h" + +-#include "daemon-skeleton-gtk.h" ++#include "daemon-skeleton.h" +-- +2.10.2 + + +From 92d45cd2ce2c4f252db21993f30777433ed84623 Mon Sep 17 00:00:00 2001 +From: Bastien Nocera <hadess@hadess.net> +Date: Mon, 27 Mar 2017 18:49:35 +0200 +Subject: [PATCH 2/3] print-notifications: Don't init GTK+ + +We don't use it. + +https://bugzilla.gnome.org/show_bug.cgi?id=780555 +--- + plugins/print-notifications/main.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/plugins/print-notifications/main.c b/plugins/print-notifications/main.c +index 57155d0..a0dd406 100644 +--- a/plugins/print-notifications/main.c ++++ b/plugins/print-notifications/main.c +@@ -4,4 +4,4 @@ + #define MANAGER GsdPrintNotificationsManager + #include "gsd-print-notifications-manager.h" + +-#include "daemon-skeleton-gtk.h" ++#include "daemon-skeleton.h" +-- +2.10.2 + + +From e7e4b2145efebf132f1398da77790849becd7f6b Mon Sep 17 00:00:00 2001 +From: Bastien Nocera <hadess@hadess.net> +Date: Mon, 27 Mar 2017 18:50:01 +0200 +Subject: [PATCH 3/3] wacom: Don't init GTK+ + +We don't use it. + +https://bugzilla.gnome.org/show_bug.cgi?id=780555 +--- + plugins/wacom/main.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/plugins/wacom/main.c b/plugins/wacom/main.c +index a19a71b..ad1367c 100644 +--- a/plugins/wacom/main.c ++++ b/plugins/wacom/main.c +@@ -4,4 +4,4 @@ + #define MANAGER GsdWacomManager + #include "gsd-wacom-manager.h" + +-#include "daemon-skeleton-gtk.h" ++#include "daemon-skeleton.h" +-- +2.10.2 + diff --git a/gnome-base/gnome-settings-daemon/files/3.24.2-udevrulesdir-configure.patch b/gnome-base/gnome-settings-daemon/files/3.24.2-udevrulesdir-configure.patch new file mode 100644 index 000000000000..16988f945d21 --- /dev/null +++ b/gnome-base/gnome-settings-daemon/files/3.24.2-udevrulesdir-configure.patch @@ -0,0 +1,48 @@ +From 04d399edc26bfa44d6053aba929e0776a193cea8 Mon Sep 17 00:00:00 2001 +From: Mart Raudsepp <leio@gentoo.org> +Date: Mon, 29 May 2017 00:38:57 +0300 +Subject: [PATCH 1/5] build: Get udevrulesdir from pkg-config + +Use the standard way to find the udev rules directory via pkg-config by default, +and support specifying it, should it be necessary. +This is the same logic as in colord. +--- + configure.ac | 9 +++++++++ + plugins/rfkill/Makefile.am | 1 - + 2 files changed, 9 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 1107578..475821d 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -104,6 +104,15 @@ fi + AM_CONDITIONAL(HAVE_GUDEV, test x$have_gudev = xyes) + + dnl --------------------------------------------------------------------------- ++dnl - Where to install udev rules ++dnl --------------------------------------------------------------------------- ++AC_ARG_WITH([udevrulesdir], ++ AS_HELP_STRING([--with-udevrulesdir=DIR], [Directory for udev rules files]), ++ [], ++ [with_udevrulesdir=$($PKG_CONFIG --variable=udevdir udev)/rules.d]) ++AC_SUBST([udevrulesdir], [$with_udevrulesdir]) ++ ++dnl --------------------------------------------------------------------------- + dnl - ALSA integration (default enabled) + dnl --------------------------------------------------------------------------- + ALSA_PKG="" +diff --git a/plugins/rfkill/Makefile.am b/plugins/rfkill/Makefile.am +index 3c5ec47..bfc34c6 100644 +--- a/plugins/rfkill/Makefile.am ++++ b/plugins/rfkill/Makefile.am +@@ -30,7 +30,6 @@ desktop_DATA = $(desktop_in_files:.desktop.in=.desktop) + org.gnome.SettingsDaemon.Rfkill.desktop: $(desktop_in_files) Makefile + $(AM_V_GEN) sed -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@ + +-udevrulesdir = $(prefix)/lib/udev/rules.d + udevrules_DATA = 61-gnome-settings-daemon-rfkill.rules + + EXTRA_DIST = $(udevrules_DATA) $(desktop_in_files) +-- +2.10.2 + diff --git a/gnome-base/gnome-settings-daemon/gnome-settings-daemon-3.24.0.ebuild b/gnome-base/gnome-settings-daemon/gnome-settings-daemon-3.24.2.ebuild index 640a918763b1..a64ae5b90a5d 100644 --- a/gnome-base/gnome-settings-daemon/gnome-settings-daemon-3.24.0.ebuild +++ b/gnome-base/gnome-settings-daemon/gnome-settings-daemon-3.24.2.ebuild @@ -4,7 +4,8 @@ EAPI=6 GNOME2_EAUTORECONF="yes" GNOME2_LA_PUNT="yes" -PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} ) +#PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} ) # https://bugzilla.gnome.org/show_bug.cgi?id=783186 +PYTHON_COMPAT=( python2_7 ) inherit gnome2 python-any-r1 systemd udev virtualx @@ -99,9 +100,15 @@ RESTRICT="test" PATCHES=( # Make colord and wacom optional; requires eautoreconf - "${FILESDIR}"/${P}-optional.patch + "${FILESDIR}"/${PV}-optional.patch # Allow specifying udevrulesdir via configure, bug 509484; requires eautoreconf - "${FILESDIR}"/3.22.2-udevrulesdir-configure.patch + "${FILESDIR}"/${PV}-udevrulesdir-configure.patch + # Fix uninstalled (during build) color plugin test run + "${FILESDIR}"/${PV}-fix-color-tests.patch + # Reduce memory usage by not initing GTK+ where not needed + "${FILESDIR}"/${PV}-remove-unneeded-gtk-init.patch + # Reduce memory usage by using a fake CSS theme instead of full Adwaita for GTK+ needing plugins; requires eautoreconf + "${FILESDIR}"/${PV}-reduce-memory-usage.patch ) python_check_deps() { |