diff --git a/0001-Fix-linking-with-Wl-z-defs.patch b/0001-Fix-linking-with-Wl-z-defs.patch new file mode 100644 index 0000000..4ca6e9e --- /dev/null +++ b/0001-Fix-linking-with-Wl-z-defs.patch @@ -0,0 +1,283 @@ +From 5178b600c63c2a32f7748a035a2fd08fa7cc253b Mon Sep 17 00:00:00 2001 +From: Richard Hughes +Date: Thu, 25 Jan 2018 14:22:52 +0000 +Subject: [PATCH] Fix linking with -Wl,-z,defs + +This is now being done by Fedora. +--- + meson.build | 1 + + plugins/altos/meson.build | 4 ++++ + plugins/amt/meson.build | 4 ++++ + plugins/colorhug/meson.build | 4 ++++ + plugins/dell/meson.build | 4 ++++ + plugins/dfu/meson.build | 4 ++++ + plugins/ebitdo/meson.build | 4 ++++ + plugins/nitrokey/meson.build | 4 ++++ + plugins/raspberrypi/meson.build | 4 ++++ + plugins/steelseries/meson.build | 4 ++++ + plugins/synapticsmst/meson.build | 4 ++++ + plugins/test/meson.build | 4 ++++ + plugins/thunderbolt-power/meson.build | 4 ++++ + plugins/thunderbolt/meson.build | 4 ++++ + plugins/udev/meson.build | 4 ++++ + plugins/uefi/meson.build | 4 ++++ + plugins/unifying/meson.build | 4 ++++ + plugins/upower/meson.build | 4 ++++ + 18 files changed, 69 insertions(+) + +diff --git a/meson.build b/meson.build +index 0f4793ae..ad9d68f5 100644 +--- a/meson.build ++++ b/meson.build +@@ -113,6 +113,7 @@ global_link_args = [] + test_link_args = [ + '-Wl,-z,relro', + '-Wl,-z,now', ++ '-Wl,-z,defs', + ] + foreach arg: test_link_args + if cc.has_argument(arg) +diff --git a/plugins/altos/meson.build b/plugins/altos/meson.build +index 6f3da747..18b8d945 100644 +--- a/plugins/altos/meson.build ++++ b/plugins/altos/meson.build +@@ -19,6 +19,10 @@ shared_module('fu_plugin_altos', + libelf, + plugin_deps, + ], ++ link_with : [ ++ fwupd, ++ libfwupdprivate, ++ ], + ) + + executable( +diff --git a/plugins/amt/meson.build b/plugins/amt/meson.build +index b3711974..98e7ae08 100644 +--- a/plugins/amt/meson.build ++++ b/plugins/amt/meson.build +@@ -16,4 +16,8 @@ shared_module('fu_plugin_amt', + plugin_deps, + uuid, + ], ++ link_with : [ ++ fwupd, ++ libfwupdprivate, ++ ], + ) +diff --git a/plugins/colorhug/meson.build b/plugins/colorhug/meson.build +index 691f2e4c..4d8ea02c 100644 +--- a/plugins/colorhug/meson.build ++++ b/plugins/colorhug/meson.build +@@ -17,4 +17,8 @@ shared_module('fu_plugin_colorhug', + plugin_deps, + colorhug, + ], ++ link_with : [ ++ fwupd, ++ libfwupdprivate, ++ ], + ) +diff --git a/plugins/dell/meson.build b/plugins/dell/meson.build +index 7f4c4807..6ce344c8 100644 +--- a/plugins/dell/meson.build ++++ b/plugins/dell/meson.build +@@ -26,6 +26,10 @@ shared_module('fu_plugin_dell', + libsmbios_c, + fwup, + ], ++ link_with : [ ++ fwupd, ++ libfwupdprivate, ++ ], + ) + + if get_option('tests') +diff --git a/plugins/dfu/meson.build b/plugins/dfu/meson.build +index be831797..aea1eb70 100644 +--- a/plugins/dfu/meson.build ++++ b/plugins/dfu/meson.build +@@ -31,6 +31,10 @@ dfu = static_library( + libm, + gusb, + ], ++ link_with : [ ++ fwupd, ++ libfwupdprivate, ++ ], + c_args : cargs, + include_directories : [ + include_directories('../..'), +diff --git a/plugins/ebitdo/meson.build b/plugins/ebitdo/meson.build +index a0909508..b5c081ba 100644 +--- a/plugins/ebitdo/meson.build ++++ b/plugins/ebitdo/meson.build +@@ -21,6 +21,10 @@ shared_module('fu_plugin_ebitdo', + dependencies : [ + plugin_deps, + ], ++ link_with : [ ++ fwupd, ++ libfwupdprivate, ++ ], + ) + + executable( +diff --git a/plugins/nitrokey/meson.build b/plugins/nitrokey/meson.build +index 06d3b26a..d3e5b4e4 100644 +--- a/plugins/nitrokey/meson.build ++++ b/plugins/nitrokey/meson.build +@@ -17,6 +17,10 @@ shared_module('fu_plugin_nitrokey', + dependencies : [ + plugin_deps, + ], ++ link_with : [ ++ fwupd, ++ libfwupdprivate, ++ ], + ) + + if get_option('tests') +diff --git a/plugins/raspberrypi/meson.build b/plugins/raspberrypi/meson.build +index f5d5b5cc..7cbafc69 100644 +--- a/plugins/raspberrypi/meson.build ++++ b/plugins/raspberrypi/meson.build +@@ -20,6 +20,10 @@ shared_module('fu_plugin_raspberrypi', + dependencies : [ + plugin_deps, + ], ++ link_with : [ ++ fwupd, ++ libfwupdprivate, ++ ], + ) + + if get_option('tests') +diff --git a/plugins/steelseries/meson.build b/plugins/steelseries/meson.build +index e949e11b..f0937477 100644 +--- a/plugins/steelseries/meson.build ++++ b/plugins/steelseries/meson.build +@@ -16,4 +16,8 @@ shared_module('fu_plugin_steelseries', + dependencies : [ + plugin_deps, + ], ++ link_with : [ ++ fwupd, ++ libfwupdprivate, ++ ], + ) +diff --git a/plugins/synapticsmst/meson.build b/plugins/synapticsmst/meson.build +index 516517bf..007f4ef8 100644 +--- a/plugins/synapticsmst/meson.build ++++ b/plugins/synapticsmst/meson.build +@@ -21,6 +21,10 @@ shared_module('fu_plugin_synapticsmst', + plugin_deps, + efivar, + ], ++ link_with : [ ++ fwupd, ++ libfwupdprivate, ++ ], + # https://github.com/hughsie/fwupd/issues/207 + override_options : [ + 'werror=false', +diff --git a/plugins/test/meson.build b/plugins/test/meson.build +index 7f07a596..076a0100 100644 +--- a/plugins/test/meson.build ++++ b/plugins/test/meson.build +@@ -20,4 +20,8 @@ shared_module('fu_plugin_test', + dependencies : [ + plugin_deps, + ], ++ link_with : [ ++ fwupd, ++ libfwupdprivate, ++ ], + ) +diff --git a/plugins/thunderbolt-power/meson.build b/plugins/thunderbolt-power/meson.build +index d9791c72..abcd3515 100644 +--- a/plugins/thunderbolt-power/meson.build ++++ b/plugins/thunderbolt-power/meson.build +@@ -16,4 +16,8 @@ fu_plugin_thunderbolt_power = shared_module('fu_plugin_thunderbolt_power', + plugin_deps, + gudev, + ], ++ link_with : [ ++ fwupd, ++ libfwupdprivate, ++ ], + ) +diff --git a/plugins/thunderbolt/meson.build b/plugins/thunderbolt/meson.build +index e5587a27..87be4722 100644 +--- a/plugins/thunderbolt/meson.build ++++ b/plugins/thunderbolt/meson.build +@@ -17,6 +17,10 @@ fu_plugin_thunderbolt = shared_module('fu_plugin_thunderbolt', + plugin_deps, + gudev, + ], ++ link_with : [ ++ fwupd, ++ libfwupdprivate, ++ ], + ) + + testdatadir_src = join_paths(meson.source_root(), 'data', 'tests') +diff --git a/plugins/udev/meson.build b/plugins/udev/meson.build +index c37d27ca..2f9e6058 100644 +--- a/plugins/udev/meson.build ++++ b/plugins/udev/meson.build +@@ -17,6 +17,10 @@ shared_module('fu_plugin_udev', + plugin_deps, + gudev, + ], ++ link_with : [ ++ fwupd, ++ libfwupdprivate, ++ ], + ) + + executable( +diff --git a/plugins/uefi/meson.build b/plugins/uefi/meson.build +index f30543e5..7347b0ef 100644 +--- a/plugins/uefi/meson.build ++++ b/plugins/uefi/meson.build +@@ -16,4 +16,8 @@ shared_module('fu_plugin_uefi', + plugin_deps, + fwup, + ], ++ link_with : [ ++ fwupd, ++ libfwupdprivate, ++ ], + ) +diff --git a/plugins/unifying/meson.build b/plugins/unifying/meson.build +index 5d8679b4..b22aaf11 100644 +--- a/plugins/unifying/meson.build ++++ b/plugins/unifying/meson.build +@@ -25,6 +25,10 @@ shared_module('fu_plugin_unifying', + plugin_deps, + gudev, + ], ++ link_with : [ ++ fwupd, ++ libfwupdprivate, ++ ], + ) + + executable( +diff --git a/plugins/upower/meson.build b/plugins/upower/meson.build +index 9d027744..79e9724e 100644 +--- a/plugins/upower/meson.build ++++ b/plugins/upower/meson.build +@@ -15,4 +15,8 @@ shared_module('fu_plugin_upower', + dependencies : [ + plugin_deps, + ], ++ link_with : [ ++ fwupd, ++ libfwupdprivate, ++ ], + ) +-- +2.14.3 + diff --git a/fwupd.spec b/fwupd.spec index 22f62c7..f500b63 100644 --- a/fwupd.spec +++ b/fwupd.spec @@ -30,6 +30,9 @@ Source0: http://people.freedesktop.org/~hughsient/releases/%{name}-%{version}. # lets test this with rawhide and see how the server copes Patch0: 0001-Do-not-use-the-CDN-when-getting-metadata.patch +# backport from master +Patch1: 0001-Fix-linking-with-Wl-z-defs.patch + BuildRequires: docbook-utils BuildRequires: gettext BuildRequires: glib2-devel >= %{glib2_version} @@ -123,6 +126,7 @@ Data files for installed tests. %prep %setup -q %patch0 -p1 -b .no-cdn +%patch1 -p1 -b .wl-z-defs %build