From 413a50ede61e06e17e160417bf743c881a48011e Mon Sep 17 00:00:00 2001 From: Tom Fitzhenry Date: Sat, 26 Feb 2022 17:53:14 +1100 Subject: [PATCH] fwupd: 1.7.2 -> 1.7.6 https://github.com/fwupd/fwupd/releases/tag/1.7.3 https://github.com/fwupd/fwupd/releases/tag/1.7.4 https://github.com/fwupd/fwupd/releases/tag/1.7.5 https://github.com/fwupd/fwupd/releases/tag/1.7.6 --- ...d-option-for-installation-sysconfdir.patch | 48 ++++++++++++------- .../linux/firmware/fwupd/default.nix | 16 ++++++- 2 files changed, 45 insertions(+), 19 deletions(-) diff --git a/pkgs/os-specific/linux/firmware/fwupd/add-option-for-installation-sysconfdir.patch b/pkgs/os-specific/linux/firmware/fwupd/add-option-for-installation-sysconfdir.patch index 66194430b251..bdb2fc34728a 100644 --- a/pkgs/os-specific/linux/firmware/fwupd/add-option-for-installation-sysconfdir.patch +++ b/pkgs/os-specific/linux/firmware/fwupd/add-option-for-installation-sysconfdir.patch @@ -1,28 +1,27 @@ diff --git a/data/meson.build b/data/meson.build -index f10d4ff6..2dc66fb6 100644 +index 2ae29ce5..342cac92 100644 --- a/data/meson.build +++ b/data/meson.build -@@ -21,7 +21,7 @@ endif +@@ -26,7 +26,7 @@ endif if build_standalone install_data(['daemon.conf'], - install_dir : join_paths(sysconfdir, 'fwupd') + install_dir : join_paths(sysconfdir_install, 'fwupd') ) - install_data(['power.quirk'], + install_data(['power.quirk', 'cfi.quirk'], install_dir: join_paths(datadir, 'fwupd', 'quirks.d')) diff --git a/data/pki/meson.build b/data/pki/meson.build -index dcd9e128..ff137f3a 100644 +index 2a7d0f24..091981f7 100644 --- a/data/pki/meson.build +++ b/data/pki/meson.build -@@ -2,24 +2,23 @@ install_data([ +@@ -12,13 +12,13 @@ install_data([ 'GPG-KEY-Linux-Foundation-Firmware', 'GPG-KEY-Linux-Vendor-Firmware-Service', ], - install_dir : join_paths(sysconfdir, 'pki', 'fwupd') + install_dir : join_paths(sysconfdir_install, 'pki', 'fwupd') ) - install_data([ 'GPG-KEY-Linux-Foundation-Metadata', 'GPG-KEY-Linux-Vendor-Firmware-Service', @@ -30,7 +29,9 @@ index dcd9e128..ff137f3a 100644 - install_dir : join_paths(sysconfdir, 'pki', 'fwupd-metadata') + install_dir : join_paths(sysconfdir_install, 'pki', 'fwupd-metadata') ) + endif +@@ -26,11 +26,11 @@ if supported_pkcs7 == '1' install_data([ 'LVFS-CA.pem', ], @@ -43,7 +44,7 @@ index dcd9e128..ff137f3a 100644 - install_dir : join_paths(sysconfdir, 'pki', 'fwupd-metadata') + install_dir : join_paths(sysconfdir_install, 'pki', 'fwupd-metadata') ) -- + endif diff --git a/data/remotes.d/meson.build b/data/remotes.d/meson.build index 02d8777b..2c89d593 100644 --- a/data/remotes.d/meson.build @@ -82,10 +83,10 @@ index 02d8777b..2c89d593 100644 + install_dir: join_paths(sysconfdir_install, 'fwupd', 'remotes.d'), ) diff --git a/meson.build b/meson.build -index 7557cd4a..4c98de6d 100644 +index 394f40fa..7b602c73 100644 --- a/meson.build +++ b/meson.build -@@ -190,6 +190,12 @@ endif +@@ -187,6 +187,12 @@ endif mandir = join_paths(prefix, get_option('mandir')) localedir = join_paths(prefix, get_option('localedir')) @@ -99,14 +100,14 @@ index 7557cd4a..4c98de6d 100644 gio = dependency('gio-2.0', version : '>= 2.45.8') giounix = dependency('gio-unix-2.0', version : '>= 2.45.8', required: false) diff --git a/meson_options.txt b/meson_options.txt -index 94f73898..5de6cc7b 100644 +index c1b483cb..047dbdd8 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,3 +1,4 @@ +option('sysconfdir_install', type: 'string', value: '', description: 'sysconfdir to use during installation') option('build', type : 'combo', choices : ['all', 'standalone', 'library'], value : 'all', description : 'build type') option('consolekit', type : 'boolean', value : true, description : 'enable ConsoleKit support') - option('firmware-packager', type : 'boolean', value : true, description : 'enable firmware-packager installation') + option('static_analysis', type : 'boolean', value : false, description : 'enable GCC static analysis support') diff --git a/plugins/dell-esrt/meson.build b/plugins/dell-esrt/meson.build index e9f12879..a0126dbb 100644 --- a/plugins/dell-esrt/meson.build @@ -119,8 +120,21 @@ index e9f12879..a0126dbb 100644 + install_dir: join_paths(sysconfdir_install, 'fwupd', 'remotes.d'), ) endif +diff --git a/plugins/msr/meson.build b/plugins/msr/meson.build +index 3ea47456..40dbd116 100644 +--- a/plugins/msr/meson.build ++++ b/plugins/msr/meson.build +@@ -12,7 +12,7 @@ install_data(['fwupd-msr.conf'], + endif + + install_data(['msr.conf'], +- install_dir: join_paths(sysconfdir, 'fwupd') ++ install_dir: join_paths(sysconfdir_install, 'fwupd') + ) + shared_module('fu_plugin_msr', + fu_hash, diff --git a/plugins/redfish/meson.build b/plugins/redfish/meson.build -index 5263048c..c46fac64 100644 +index 4a0a8664..7d9ba77d 100644 --- a/plugins/redfish/meson.build +++ b/plugins/redfish/meson.build @@ -53,7 +53,7 @@ shared_module('fu_plugin_redfish', @@ -129,14 +143,14 @@ index 5263048c..c46fac64 100644 install_data(['redfish.conf'], - install_dir: join_paths(sysconfdir, 'fwupd'), + install_dir: join_paths(sysconfdir_install, 'fwupd'), - install_mode: 'rw-r-----', ) + if get_option('tests') diff --git a/plugins/thunderbolt/meson.build b/plugins/thunderbolt/meson.build -index 646ed6cb..8d7c59aa 100644 +index 1ba9562f..c074f770 100644 --- a/plugins/thunderbolt/meson.build +++ b/plugins/thunderbolt/meson.build -@@ -35,7 +35,7 @@ fu_plugin_thunderbolt = shared_module('fu_plugin_thunderbolt', +@@ -37,7 +37,7 @@ fu_plugin_thunderbolt = shared_module('fu_plugin_thunderbolt', ) install_data(['thunderbolt.conf'], @@ -146,7 +160,7 @@ index 646ed6cb..8d7c59aa 100644 # we use functions from 2.52 in the tests if get_option('tests') and umockdev.found() and gio.version().version_compare('>= 2.52') diff --git a/plugins/uefi-capsule/meson.build b/plugins/uefi-capsule/meson.build -index 708586b0..f29536b1 100644 +index 04cbd51a..9a8c43de 100644 --- a/plugins/uefi-capsule/meson.build +++ b/plugins/uefi-capsule/meson.build @@ -21,7 +21,7 @@ if host_machine.system() == 'linux' @@ -158,7 +172,7 @@ index 708586b0..f29536b1 100644 ) elif host_machine.system() == 'freebsd' backend_srcs += 'fu-uefi-backend-freebsd.c' -@@ -116,7 +116,7 @@ if get_option('man') +@@ -114,7 +114,7 @@ if get_option('compat_cli') and get_option('man') endif install_data(['uefi_capsule.conf'], diff --git a/pkgs/os-specific/linux/firmware/fwupd/default.nix b/pkgs/os-specific/linux/firmware/fwupd/default.nix index 077c37a72cb3..e11543fe94ca 100644 --- a/pkgs/os-specific/linux/firmware/fwupd/default.nix +++ b/pkgs/os-specific/linux/firmware/fwupd/default.nix @@ -12,6 +12,7 @@ , libgudev , polkit , libxmlb +, glib , gusb , sqlite , libarchive @@ -112,7 +113,7 @@ let self = stdenv.mkDerivation rec { pname = "fwupd"; - version = "1.7.2"; + version = "1.7.6"; # libfwupd goes to lib # daemon, plug-ins and libfwupdplugin go to out @@ -121,7 +122,7 @@ let src = fetchurl { url = "https://people.freedesktop.org/~hughsient/releases/fwupd-${version}.tar.xz"; - sha256 = "sha256-hjLfacO6/Fk4fNy1F8POMaWXoJAm5E9ZB9g4RnG5+DQ="; + sha256 = "sha256-fr4VFKy2iNJknOzDktuSkJTaPwPPyYqcD6zKuwhJEvo="; }; patches = [ @@ -145,6 +146,13 @@ let # EFI capsule is located in fwupd-efi now. ./efi-app-path.patch + + # Drop hard-coded FHS path + # https://github.com/fwupd/fwupd/issues/4360 + (fetchpatch { + url = "https://github.com/fwupd/fwupd/commit/14cc2e7ee471b66ee2ef54741f4bec1f92204620.patch"; + sha256 = "47682oqE66Y6QKPtN2mYpnb2+TIJFqBgsgx60LmC3FM="; + }) ]; nativeBuildInputs = [ @@ -250,6 +258,9 @@ let contrib/generate-version-script.py \ meson_post_install.sh \ po/test-deps + + substituteInPlace data/installed-tests/fwupdmgr-p2p.sh \ + --replace "gdbus" ${glib.bin}/bin/gdbus ''; preCheck = '' @@ -301,6 +312,7 @@ let passthru = { filesInstalledToEtc = [ "fwupd/daemon.conf" + "fwupd/msr.conf" "fwupd/remotes.d/lvfs-testing.conf" "fwupd/remotes.d/lvfs.conf" "fwupd/remotes.d/vendor.conf"