From 1d0533acd1183ca99250561ba2259ae4ffcf0d7a Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Fri, 9 Feb 2018 16:11:54 +0100 Subject: [PATCH] + gnome-settings-daemon-3.27.90-3 Really fix gsd-* helper linkage Build fix for highly parallel builds --- ...workaround-for-D-Bus-code-generation.patch | 126 ++++++++ ...time-linkage-to-libgsd-and-libcommon.patch | 288 ++++++++++++++++++ gnome-settings-daemon.spec | 13 +- libcommon-static-library.patch | 13 - 4 files changed, 424 insertions(+), 16 deletions(-) create mode 100644 0001-build-Apply-a-workaround-for-D-Bus-code-generation.patch create mode 100644 0001-build-Fix-runtime-linkage-to-libgsd-and-libcommon.patch delete mode 100644 libcommon-static-library.patch diff --git a/0001-build-Apply-a-workaround-for-D-Bus-code-generation.patch b/0001-build-Apply-a-workaround-for-D-Bus-code-generation.patch new file mode 100644 index 0000000..3421da6 --- /dev/null +++ b/0001-build-Apply-a-workaround-for-D-Bus-code-generation.patch @@ -0,0 +1,126 @@ +From 5924d72931a030b24554116a48140a661a99652b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?I=C3=B1igo=20Mart=C3=ADnez?= +Date: Mon, 5 Feb 2018 19:38:36 +0100 +Subject: [PATCH] build: Apply a workaround for D-Bus code generation + +meson uses gdbus-codegen for D-Bus code generation. However, both +files are generated implicitly, so meson is not able to know how +many files are generated, so it does generate only one opaque +target that represents the two files. + +A new script has been created only to call gdbus-codegen and +simulate the generation of the source code and header as different +targets. + +Please see: + https://bugzilla.gnome.org/show_bug.cgi?id=791015 + https://github.com/mesonbuild/meson/pull/2930 + +https://bugzilla.gnome.org/show_bug.cgi?id=793087 +--- + gnome-settings-daemon/codegen.py | 31 +++++++++++++++++++++++++++++++ + gnome-settings-daemon/meson.build | 28 ++++++++++++++++++++++++++-- + 2 files changed, 57 insertions(+), 2 deletions(-) + create mode 100644 gnome-settings-daemon/codegen.py + +diff --git a/gnome-settings-daemon/codegen.py b/gnome-settings-daemon/codegen.py +new file mode 100644 +index 00000000..eb0b0ce0 +--- /dev/null ++++ b/gnome-settings-daemon/codegen.py +@@ -0,0 +1,31 @@ ++#!/usr/bin/env python3 ++ ++''' ++FIXME ++ ++This script is used only to call gdbus-codegen and simulate the ++generation of the source code and header as different targets. ++ ++Both are generated implicitly, so meson is not able to know how ++many files are generated, so it does generate only one opaque ++target that represents the two files. ++ ++Please see: ++ https://bugzilla.gnome.org/show_bug.cgi?id=791015 ++ https://github.com/mesonbuild/meson/pull/2930 ++''' ++ ++import subprocess ++import sys ++ ++name = 'org.gnome.' + sys.argv[1] ++ ++subprocess.call([ ++ 'gdbus-codegen', ++ '--interface-prefix=' + name + '.', ++ '--generate-c-code=' + sys.argv[2], ++ '--c-namespace=Gsd', ++ '--annotate', name, 'org.gtk.GDBus.C.Name', sys.argv[1], ++ '--output-directory=' + sys.argv[3], ++ sys.argv[4] ++]) +diff --git a/gnome-settings-daemon/meson.build b/gnome-settings-daemon/meson.build +index 7039fa53..6c179003 100644 +--- a/gnome-settings-daemon/meson.build ++++ b/gnome-settings-daemon/meson.build +@@ -9,15 +9,38 @@ dbus_ifaces = [ + ['Shell', 'gsd-shell-glue'] + ] + ++dbus_headers = [] ++ ++codegen = find_program('codegen.py') ++ + foreach iface: dbus_ifaces + name = 'org.gnome.' + iface[0] +- sources += gnome.gdbus_codegen( ++ ++ # FIXME: Opaque target return from gdbus_codegen ++ # Please see: ++ # https://bugzilla.gnome.org/show_bug.cgi?id=791015 ++ # https://github.com/mesonbuild/meson/pull/2930 ++ ''' ++ dbus_sources += gnome.gdbus_codegen( + iface[1], + name + '.xml', + interface_prefix: name + '.', + namespace: 'Gsd', + annotations: [name, 'org.gtk.GDBus.C.Name', iface[0]] + ) ++ ''' ++ ++ # FIXME: Ugly workaround that simulates the generation of ++ # two different targets. ++ dbus_sources = custom_target( ++ iface[1], ++ input: name + '.xml', ++ output: [iface[1] + '.h', iface[1] + '.c'], ++ command: [codegen, iface[0], iface[1], meson.current_build_dir(), '@INPUT@', '@OUTPUT@'] ++ ) ++ ++ dbus_headers += dbus_sources[0] ++ sources += dbus_sources[1] + endforeach + + deps = [gio_unix_dep] +@@ -28,7 +51,7 @@ endif + + libgsd = shared_library( + 'gsd', +- sources: sources, ++ sources: sources + dbus_headers, + include_directories: top_inc, + dependencies: deps, + install: true, +@@ -36,6 +59,7 @@ libgsd = shared_library( + ) + + libgsd_dep = declare_dependency( ++ sources: dbus_headers, + include_directories: include_directories('.'), + link_with: libgsd + ) +-- +2.14.3 + diff --git a/0001-build-Fix-runtime-linkage-to-libgsd-and-libcommon.patch b/0001-build-Fix-runtime-linkage-to-libgsd-and-libcommon.patch new file mode 100644 index 0000000..6f0009c --- /dev/null +++ b/0001-build-Fix-runtime-linkage-to-libgsd-and-libcommon.patch @@ -0,0 +1,288 @@ +From fce89d11ac538075e48923f5f3071f172c97dadc Mon Sep 17 00:00:00 2001 +From: Yanko Kaneti +Date: Fri, 9 Feb 2018 11:55:41 +0200 +Subject: [PATCH] build: Fix runtime linkage to libgsd and libcommon + +- turns libcommon to a static uninstalled library +- inject RPATH for libgsd in every installed plugin/executable +--- + plugins/a11y-settings/meson.build | 1 + + plugins/clipboard/meson.build | 1 + + plugins/color/meson.build | 1 + + plugins/common/meson.build | 3 ++- + plugins/datetime/meson.build | 1 + + plugins/dummy/meson.build | 1 + + plugins/housekeeping/meson.build | 1 + + plugins/keyboard/meson.build | 1 + + plugins/media-keys/meson.build | 1 + + plugins/mouse/meson.build | 2 ++ + plugins/power/meson.build | 2 ++ + plugins/print-notifications/meson.build | 2 ++ + plugins/rfkill/meson.build | 1 + + plugins/screensaver-proxy/meson.build | 1 + + plugins/sharing/meson.build | 1 + + plugins/smartcard/meson.build | 1 + + plugins/sound/meson.build | 1 + + plugins/wacom/meson.build | 2 ++ + plugins/xsettings/meson.build | 1 + + 19 files changed, 24 insertions(+), 1 deletion(-) + +diff --git a/plugins/a11y-settings/meson.build b/plugins/a11y-settings/meson.build +index 8b8c52b8..b4a0fb66 100644 +--- a/plugins/a11y-settings/meson.build ++++ b/plugins/a11y-settings/meson.build +@@ -15,5 +15,6 @@ executable( + dependencies: deps, + c_args: cflags, + install: true, ++ install_rpath: gsd_pkglibdir, + install_dir: gsd_libexecdir + ) +diff --git a/plugins/clipboard/meson.build b/plugins/clipboard/meson.build +index 8adc28ea..b56a9102 100644 +--- a/plugins/clipboard/meson.build ++++ b/plugins/clipboard/meson.build +@@ -17,5 +17,6 @@ executable( + dependencies: deps, + c_args: cflags, + install: true, ++ install_rpath: gsd_pkglibdir, + install_dir: gsd_libexecdir + ) +diff --git a/plugins/color/meson.build b/plugins/color/meson.build +index 969a17a1..6ca8a868 100644 +--- a/plugins/color/meson.build ++++ b/plugins/color/meson.build +@@ -29,6 +29,7 @@ executable( + dependencies: deps, + c_args: cflags, + install: true, ++ install_rpath: gsd_pkglibdir, + install_dir: gsd_libexecdir + ) + +diff --git a/plugins/common/meson.build b/plugins/common/meson.build +index ec54cc1a..65a0757c 100644 +--- a/plugins/common/meson.build ++++ b/plugins/common/meson.build +@@ -52,7 +52,7 @@ if enable_wacom + deps += libwacom_dep + endif + +-libcommon = shared_module( ++libcommon = static_library( + plugin_name, + sources: sources, + include_directories: [top_inc, data_inc], +@@ -73,5 +73,6 @@ executable( + dependencies: gtk_dep, + link_with: libcommon, + install: true, ++ install_rpath: gsd_pkglibdir, + install_dir: gsd_libexecdir + ) +diff --git a/plugins/datetime/meson.build b/plugins/datetime/meson.build +index e5f614b5..ed2d433f 100644 +--- a/plugins/datetime/meson.build ++++ b/plugins/datetime/meson.build +@@ -35,5 +35,6 @@ executable( + dependencies: deps, + c_args: cflags, + install: true, ++ install_rpath: gsd_pkglibdir, + install_dir: gsd_libexecdir + ) +diff --git a/plugins/dummy/meson.build b/plugins/dummy/meson.build +index a4e76187..f563efa6 100644 +--- a/plugins/dummy/meson.build ++++ b/plugins/dummy/meson.build +@@ -43,5 +43,6 @@ executable( + dependencies: deps, + c_args: cflags, + install: true, ++ install_rpath: gsd_pkglibdir, + install_dir: gsd_libexecdir + ) +diff --git a/plugins/housekeeping/meson.build b/plugins/housekeeping/meson.build +index f1593477..5ac2455e 100644 +--- a/plugins/housekeeping/meson.build ++++ b/plugins/housekeeping/meson.build +@@ -20,6 +20,7 @@ executable( + dependencies: deps, + c_args: cflags, + install: true, ++ install_rpath: gsd_pkglibdir, + install_dir: gsd_libexecdir + ) + +diff --git a/plugins/keyboard/meson.build b/plugins/keyboard/meson.build +index cd203a09..172193f6 100644 +--- a/plugins/keyboard/meson.build ++++ b/plugins/keyboard/meson.build +@@ -16,5 +16,6 @@ executable( + dependencies: deps, + c_args: cflags, + install: true, ++ install_rpath: gsd_pkglibdir, + install_dir: gsd_libexecdir + ) +diff --git a/plugins/media-keys/meson.build b/plugins/media-keys/meson.build +index f371d1f5..91848f9b 100644 +--- a/plugins/media-keys/meson.build ++++ b/plugins/media-keys/meson.build +@@ -43,6 +43,7 @@ executable( + dependencies: deps, + c_args: cflags, + install: true, ++ install_rpath: gsd_pkglibdir, + install_dir: gsd_libexecdir + ) + +diff --git a/plugins/mouse/meson.build b/plugins/mouse/meson.build +index 7dc58bac..9de6a1a8 100644 +--- a/plugins/mouse/meson.build ++++ b/plugins/mouse/meson.build +@@ -19,6 +19,7 @@ executable( + dependencies: deps, + c_args: cflags, + install: true, ++ install_rpath: gsd_pkglibdir, + install_dir: gsd_libexecdir + ) + +@@ -39,5 +40,6 @@ executable( + include_directories: top_inc, + dependencies: deps, + install: true, ++ install_rpath: gsd_pkglibdir, + install_dir: gsd_libexecdir + ) +diff --git a/plugins/power/meson.build b/plugins/power/meson.build +index e24ccd5b..202b6040 100644 +--- a/plugins/power/meson.build ++++ b/plugins/power/meson.build +@@ -30,6 +30,7 @@ gsd_power = executable( + dependencies: deps, + c_args: cflags, + install: true, ++ install_rpath: gsd_pkglibdir, + install_dir: gsd_libexecdir + ) + +@@ -91,6 +92,7 @@ if enable_gudev + include_directories: top_inc, + dependencies: deps, + install: true, ++ install_rpath: gsd_pkglibdir, + install_dir: gsd_libexecdir + ) + endif +diff --git a/plugins/print-notifications/meson.build b/plugins/print-notifications/meson.build +index dabd0588..89a78592 100644 +--- a/plugins/print-notifications/meson.build ++++ b/plugins/print-notifications/meson.build +@@ -18,6 +18,7 @@ executable( + dependencies: deps, + c_args: cflags, + install: true, ++ install_rpath: gsd_pkglibdir, + install_dir: gsd_libexecdir + ) + +@@ -30,5 +31,6 @@ executable( + dependencies: deps, + c_args: '-DGNOME_SETTINGS_LOCALEDIR="@0@"'.format(gsd_localedir), + install: true, ++ install_rpath: gsd_pkglibdir, + install_dir: gsd_libexecdir + ) +diff --git a/plugins/rfkill/meson.build b/plugins/rfkill/meson.build +index ef2dd7f0..b85620b4 100644 +--- a/plugins/rfkill/meson.build ++++ b/plugins/rfkill/meson.build +@@ -18,5 +18,6 @@ executable( + dependencies: deps, + c_args: cflags, + install: true, ++ install_rpath: gsd_pkglibdir, + install_dir: gsd_libexecdir + ) +diff --git a/plugins/screensaver-proxy/meson.build b/plugins/screensaver-proxy/meson.build +index 945a2525..5430eb8c 100644 +--- a/plugins/screensaver-proxy/meson.build ++++ b/plugins/screensaver-proxy/meson.build +@@ -12,5 +12,6 @@ executable( + dependencies: deps, + c_args: cflags, + install: true, ++ install_rpath: gsd_pkglibdir, + install_dir: gsd_libexecdir + ) +diff --git a/plugins/sharing/meson.build b/plugins/sharing/meson.build +index 5a407401..94843128 100644 +--- a/plugins/sharing/meson.build ++++ b/plugins/sharing/meson.build +@@ -19,5 +19,6 @@ executable( + dependencies: deps, + c_args: cflags, + install: true, ++ install_rpath: gsd_pkglibdir, + install_dir: gsd_libexecdir + ) +diff --git a/plugins/smartcard/meson.build b/plugins/smartcard/meson.build +index f0219f35..916a0fcb 100644 +--- a/plugins/smartcard/meson.build ++++ b/plugins/smartcard/meson.build +@@ -44,5 +44,6 @@ executable( + dependencies: deps, + c_args: cflags, + install: true, ++ install_rpath: gsd_pkglibdir, + install_dir: gsd_libexecdir + ) +diff --git a/plugins/sound/meson.build b/plugins/sound/meson.build +index 1b3940fc..300397f5 100644 +--- a/plugins/sound/meson.build ++++ b/plugins/sound/meson.build +@@ -15,5 +15,6 @@ executable( + dependencies: deps, + c_args: cflags, + install: true, ++ install_rpath: gsd_pkglibdir, + install_dir: gsd_libexecdir + ) +diff --git a/plugins/wacom/meson.build b/plugins/wacom/meson.build +index 29d12dc3..e5300cdb 100644 +--- a/plugins/wacom/meson.build ++++ b/plugins/wacom/meson.build +@@ -37,6 +37,7 @@ executable( + dependencies: deps, + c_args: cflags, + install: true, ++ install_rpath: gsd_pkglibdir, + install_dir: gsd_libexecdir + ) + +@@ -58,6 +59,7 @@ if enable_gudev + include_directories: top_inc, + dependencies: deps, + install: true, ++ install_rpath: gsd_pkglibdir, + install_dir: gsd_libexecdir + ) + endforeach +diff --git a/plugins/xsettings/meson.build b/plugins/xsettings/meson.build +index 8364d3b8..217ba947 100644 +--- a/plugins/xsettings/meson.build ++++ b/plugins/xsettings/meson.build +@@ -27,6 +27,7 @@ executable( + dependencies: deps, + c_args: cflags, + install: true, ++ install_rpath: gsd_pkglibdir, + install_dir: gsd_libexecdir + ) + +-- +2.14.3 + diff --git a/gnome-settings-daemon.spec b/gnome-settings-daemon.spec index 6742e49..3d5dad9 100644 --- a/gnome-settings-daemon.spec +++ b/gnome-settings-daemon.spec @@ -8,7 +8,7 @@ Name: gnome-settings-daemon Version: 3.27.90 -Release: 2%{?dist} +Release: 3%{?dist} Summary: The daemon sharing settings from GNOME to GTK+/KDE applications License: GPLv2+ @@ -16,8 +16,10 @@ URL: https://download.gnome.org/sources/%{name} Source0: https://download.gnome.org/sources/%{name}/3.27/%{name}-%{version}.tar.xz # Backported from upstream Patch0: 0001-build-Fix-error-when-doing-non-debug-builds.patch -# Fix missing libcommon.so library -Patch1: libcommon-static-library.patch +# https://gitlab.gnome.org/GNOME/gnome-settings-daemon/issues/1 +Patch1: 0001-build-Fix-runtime-linkage-to-libgsd-and-libcommon.patch +# https://bugzilla.gnome.org/show_bug.cgi?id=793087 +Patch2: 0001-build-Apply-a-workaround-for-D-Bus-code-generation.patch BuildRequires: cups-devel BuildRequires: gettext @@ -193,6 +195,11 @@ mkdir $RPM_BUILD_ROOT%{_libdir}/gnome-settings-daemon-3.0/gtk-modules %{_libexecdir}/gsd-test-input-helper %changelog +* Fri Feb 09 2018 Bastien Nocera - 3.27.90-3 ++ gnome-settings-daemon-3.27.90-3 +- Really fix gsd-* helper linkage +- Build fix for highly parallel builds + * Wed Feb 07 2018 Kalev Lember - 3.27.90-2 - Fix missing libcommon.so library diff --git a/libcommon-static-library.patch b/libcommon-static-library.patch deleted file mode 100644 index f16288b..0000000 --- a/libcommon-static-library.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/plugins/common/meson.build b/plugins/common/meson.build -index ec54cc1a3d65..f62d5a94a028 100644 ---- a/plugins/common/meson.build -+++ b/plugins/common/meson.build -@@ -52,7 +52,7 @@ if enable_wacom - deps += libwacom_dep - endif - --libcommon = shared_module( -+libcommon = static_library( - plugin_name, - sources: sources, - include_directories: [top_inc, data_inc],