aboutsummaryrefslogtreecommitdiff
path: root/pkgs/os-specific/linux/firmware/fwupd
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/os-specific/linux/firmware/fwupd')
-rw-r--r--pkgs/os-specific/linux/firmware/fwupd/add-option-for-installation-sysconfdir.patch59
-rw-r--r--pkgs/os-specific/linux/firmware/fwupd/default.nix36
-rw-r--r--pkgs/os-specific/linux/firmware/fwupd/installed-tests-path.patch42
3 files changed, 100 insertions, 37 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 a727e5f4a85b..6faa6079355c 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,5 +1,5 @@
diff --git a/data/meson.build b/data/meson.build
-index bb749fd4..b611875b 100644
+index 14454458..12a798c0 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -17,7 +17,7 @@ endif
@@ -73,10 +73,10 @@ index 826a3c1d..b78db663 100644
+ install_dir: join_paths(sysconfdir_install, 'fwupd', 'remotes.d'),
)
diff --git a/meson.build b/meson.build
-index 87ea67e5..3a4374db 100644
+index a6fb55dd..aedb7530 100644
--- a/meson.build
+++ b/meson.build
-@@ -175,6 +175,12 @@ endif
+@@ -183,6 +183,12 @@ endif
mandir = join_paths(prefix, get_option('mandir'))
localedir = join_paths(prefix, get_option('localedir'))
@@ -90,19 +90,16 @@ index 87ea67e5..3a4374db 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 3da9b6c4..6c80275b 100644
+index 0a0e2853..198ae930 100644
--- a/meson_options.txt
+++ b/meson_options.txt
-@@ -24,6 +24,7 @@ option('plugin_coreboot', type : 'boolean', value : true, description : 'enable
- option('systemd', type : 'boolean', value : true, description : 'enable systemd support')
- option('systemdunitdir', type: 'string', value: '', description: 'Directory for systemd units')
- option('elogind', type : 'boolean', value : false, description : 'enable elogind support')
+@@ -1,3 +1,4 @@
+option('sysconfdir_install', type: 'string', value: '', description: 'sysconfdir to use during installation')
- option('tests', type : 'boolean', value : true, description : 'enable tests')
- option('udevdir', type: 'string', value: '', description: 'Directory for udev rules')
- option('efi-cc', type : 'string', value : 'gcc', description : 'the compiler to use for EFI modules')
+ option('build', type : 'combo', choices : ['all', 'standalone', 'library'], value : 'all', description : 'build type')
+ option('agent', type : 'boolean', value : true, description : 'enable the fwupd agent')
+ option('consolekit', type : 'boolean', value : true, description : 'enable ConsoleKit support')
diff --git a/plugins/ata/meson.build b/plugins/ata/meson.build
-index 8444bb8a..fa4a8ad1 100644
+index f32b97fe..679ccc7b 100644
--- a/plugins/ata/meson.build
+++ b/plugins/ata/meson.build
@@ -7,7 +7,7 @@ install_data([
@@ -125,11 +122,37 @@ index ed4eee70..76dbdb1d 100644
- install_dir: join_paths(sysconfdir, 'fwupd', 'remotes.d'),
+ install_dir: join_paths(sysconfdir_install, 'fwupd', 'remotes.d'),
)
+diff --git a/plugins/msr/meson.build b/plugins/msr/meson.build
+index d829e153..e2917bbe 100644
+--- a/plugins/msr/meson.build
++++ b/plugins/msr/meson.build
+@@ -5,7 +5,7 @@ install_data(['msr.quirk'],
+ )
+
+ install_data(['fwupd-msr.conf'],
+- install_dir: join_paths(sysconfdir, 'modules-load.d')
++ install_dir: join_paths(sysconfdir_install, 'modules-load.d')
+ )
+
+ shared_module('fu_plugin_msr',
+diff --git a/plugins/platform-integrity/meson.build b/plugins/platform-integrity/meson.build
+index 6f1c4bc5..c5d043fc 100644
+--- a/plugins/platform-integrity/meson.build
++++ b/plugins/platform-integrity/meson.build
+@@ -7,7 +7,7 @@ install_data([
+ )
+
+ install_data(['fwupd-platform-integrity.conf'],
+- install_dir: join_paths(sysconfdir, 'modules-load.d')
++ install_dir: join_paths(sysconfdir_install, 'modules-load.d')
+ )
+
+ shared_module('fu_plugin_platform_integrity',
diff --git a/plugins/redfish/meson.build b/plugins/redfish/meson.build
-index 25fc5c7d..77eb9a83 100644
+index 92762791..08bb37ea 100644
--- a/plugins/redfish/meson.build
+++ b/plugins/redfish/meson.build
-@@ -27,7 +27,7 @@ shared_module('fu_plugin_redfish',
+@@ -26,7 +26,7 @@ shared_module('fu_plugin_redfish',
)
install_data(['redfish.conf'],
@@ -139,10 +162,10 @@ index 25fc5c7d..77eb9a83 100644
if get_option('tests')
diff --git a/plugins/thunderbolt/meson.build b/plugins/thunderbolt/meson.build
-index 06ab34ee..297a9182 100644
+index 6b2368fb..2bd06fed 100644
--- a/plugins/thunderbolt/meson.build
+++ b/plugins/thunderbolt/meson.build
-@@ -46,7 +46,7 @@ executable('tbtfwucli',
+@@ -31,7 +31,7 @@ fu_plugin_thunderbolt = shared_module('fu_plugin_thunderbolt',
)
install_data(['thunderbolt.conf'],
@@ -152,10 +175,10 @@ index 06ab34ee..297a9182 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/meson.build b/plugins/uefi/meson.build
-index 5838cecc..9ba3d5cd 100644
+index 2d1b2d22..c4217a72 100644
--- a/plugins/uefi/meson.build
+++ b/plugins/uefi/meson.build
-@@ -101,7 +101,7 @@ if get_option('man')
+@@ -97,7 +97,7 @@ if get_option('man')
endif
install_data(['uefi.conf'],
diff --git a/pkgs/os-specific/linux/firmware/fwupd/default.nix b/pkgs/os-specific/linux/firmware/fwupd/default.nix
index d502d049ace4..85f5bbbf5b18 100644
--- a/pkgs/os-specific/linux/firmware/fwupd/default.nix
+++ b/pkgs/os-specific/linux/firmware/fwupd/default.nix
@@ -3,6 +3,7 @@
{ stdenv
, fetchurl
, fetchpatch
+, fetchFromGitHub
, substituteAll
, gtk-doc
, pkg-config
@@ -88,7 +89,7 @@ let
self = stdenv.mkDerivation rec {
pname = "fwupd";
- version = "1.4.6";
+ version = "1.5.1";
# libfwupd goes to lib
# daemon, plug-ins and libfwupdplugin go to out
@@ -97,7 +98,7 @@ let
src = fetchurl {
url = "https://people.freedesktop.org/~hughsient/releases/fwupd-${version}.tar.xz";
- sha256 = "AKG5stioIveQc7ooYb/2UoOaBzbPUFzYk8tZK0rzvK0=";
+ sha256 = "0fpxcl6bighiipyl4qspjhi0lwisrgq8jdahm68mk34rmrx50sgf";
};
patches = [
@@ -118,6 +119,12 @@ let
# Needs a different set of modules than po/make-images.
inherit installedTestsPython;
})
+
+ # Skip tests requiring network.
+ (fetchpatch {
+ url = "https://github.com/fwupd/fwupd/commit/db15442c7c217610954786bd40779c14ed0e034b.patch";
+ sha256 = "/jzpGMJcqLisjecKpSUfA8ZCU53n7BOPR6tMgEX/qL8=";
+ })
];
nativeBuildInputs = [
@@ -229,6 +236,19 @@ let
addToSearchPath XDG_DATA_DIRS "${shared-mime-info}/share"
'';
+ postInstall =
+ let
+ testFw = fetchFromGitHub {
+ owner = "fwupd";
+ repo = "fwupd-test-firmware";
+ rev = "42b62c62dc85ecfb8e38099fe5de0625af87a722";
+ sha256 = "XUpxE003DZSeLJMtyV5UN5CNHH89/nEVKpCbMStm91Q=";
+ };
+ in ''
+ # These files have weird licenses so they are shipped separately.
+ cp --recursive --dereference "${testFw}/installed-tests/tests" "$installedTests/libexec/installed-tests/fwupd"
+ '';
+
preFixup = let
binPath = [
efibootmgr
@@ -254,6 +274,8 @@ let
done
'';
+ separateDebugInfo = true;
+
passthru = {
filesInstalledToEtc = [
"fwupd/ata.conf"
@@ -277,8 +299,8 @@ let
"fwupd/remotes.d/dell-esrt.conf"
];
- # BlacklistPlugins key in fwupd/daemon.conf
- defaultBlacklistedPlugins = [
+ # DisabledPlugins key in fwupd/daemon.conf
+ defaultDisabledPlugins = [
"test"
"invalid"
];
@@ -302,9 +324,9 @@ let
config = configparser.RawConfigParser()
config.read('${self}/etc/fwupd/daemon.conf')
- package_blacklisted_plugins = config.get('fwupd', 'BlacklistPlugins').rstrip(';').split(';')
- passthru_blacklisted_plugins = ${listToPy passthru.defaultBlacklistedPlugins}
- assert package_blacklisted_plugins == passthru_blacklisted_plugins, f'Default blacklisted plug-ins in the package {package_blacklisted_plugins} do not match those listed in passthru.defaultBlacklistedPlugins {passthru_blacklisted_plugins}'
+ package_disabled_plugins = config.get('fwupd', 'DisabledPlugins').rstrip(';').split(';')
+ passthru_disabled_plugins = ${listToPy passthru.defaultDisabledPlugins}
+ assert package_disabled_plugins == passthru_disabled_plugins, f'Default disabled plug-ins in the package {package_disabled_plugins} do not match those listed in passthru.defaultDisabledPlugins {passthru_disabled_plugins}'
pathlib.Path(os.getenv('out')).touch()
'';
diff --git a/pkgs/os-specific/linux/firmware/fwupd/installed-tests-path.patch b/pkgs/os-specific/linux/firmware/fwupd/installed-tests-path.patch
index 432056cbe7fe..d8f1a533b824 100644
--- a/pkgs/os-specific/linux/firmware/fwupd/installed-tests-path.patch
+++ b/pkgs/os-specific/linux/firmware/fwupd/installed-tests-path.patch
@@ -1,3 +1,5 @@
+diff --git a/data/device-tests/hardware.py b/data/device-tests/hardware.py
+index 7f1e1907..10fee1b8 100755
--- a/data/device-tests/hardware.py
+++ b/data/device-tests/hardware.py
@@ -1,4 +1,4 @@
@@ -6,25 +8,41 @@
# pylint: disable=wrong-import-position,too-many-locals,unused-argument,wrong-import-order
#
# Copyright (C) 2017 Richard Hughes <richard@hughsie.com>
+diff --git a/data/installed-tests/meson.build b/data/installed-tests/meson.build
+index adadbcdd..1b51bb9c 100644
--- a/data/installed-tests/meson.build
+++ b/data/installed-tests/meson.build
-@@ -1,4 +1,4 @@
--installed_test_datadir = join_paths(datadir, 'installed-tests', 'fwupd')
-+installed_test_datadir = join_paths(get_option('installed_test_prefix'), 'share', 'installed-tests', 'fwupd')
-
- con2 = configuration_data()
- con2.set('installedtestsdir', installed_test_datadir)
-@@ -52,5 +52,5 @@ configure_file(
+@@ -65,5 +65,5 @@ configure_file(
output : 'fwupd-tests.conf',
configuration : con2,
install: true,
- install_dir: join_paths(sysconfdir, 'fwupd', 'remotes.d'),
+ install_dir: join_paths(get_option('installed_test_prefix'), 'etc', 'fwupd', 'remotes.d'),
)
+diff --git a/meson.build b/meson.build
+index 772b7bbe..f59302cd 100644
+--- a/meson.build
++++ b/meson.build
+@@ -177,8 +177,8 @@ else
+ datadir = join_paths(prefix, get_option('datadir'))
+ sysconfdir = join_paths(prefix, get_option('sysconfdir'))
+ localstatedir = join_paths(prefix, get_option('localstatedir'))
+- installed_test_bindir = join_paths(libexecdir, 'installed-tests', meson.project_name())
+- installed_test_datadir = join_paths(datadir, 'installed-tests', meson.project_name())
++ installed_test_bindir = join_paths(get_option('installed_test_prefix'), 'libexec', 'installed-tests', meson.project_name())
++ installed_test_datadir = join_paths(get_option('installed_test_prefix'), 'share', 'installed-tests', meson.project_name())
+ endif
+ mandir = join_paths(prefix, get_option('mandir'))
+ localedir = join_paths(prefix, get_option('localedir'))
+diff --git a/meson_options.txt b/meson_options.txt
+index 0a0e2853..5f68d78b 100644
--- a/meson_options.txt
+++ b/meson_options.txt
-@@ -1,3 +1,4 @@
-+option('installed_test_prefix', type: 'string', value: '', description: 'Prefix for installed tests')
- option('build', type : 'combo', choices : ['all', 'standalone', 'library'], value : 'all', description : 'build type')
- option('agent', type : 'boolean', value : true, description : 'enable the fwupd agent')
- option('consolekit', type : 'boolean', value : true, description : 'enable ConsoleKit support')
+@@ -25,6 +26,7 @@ option('plugin_coreboot', type : 'boolean', value : true, description : 'enable
+ option('systemd', type : 'boolean', value : true, description : 'enable systemd support')
+ option('systemd_root_prefix', type: 'string', value: '', description: 'Directory to base systemd’s installation directories on')
+ option('elogind', type : 'boolean', value : false, description : 'enable elogind support')
++option('installed_test_prefix', type: 'string', description: 'Prefix for installed tests')
+ option('tests', type : 'boolean', value : true, description : 'enable tests')
+ option('tpm', type : 'boolean', value : true, description : 'enable TPM support')
+ option('udevdir', type: 'string', value: '', description: 'Directory for udev rules')