fwupd: 1.4.6 → 1.5.1
* https://github.com/fwupd/fwupd/releases/tag/1.5.0 * https://github.com/fwupd/fwupd/releases/tag/1.5.1 * The changelog mentions removed dependency on efivar but we still need the package because it also contains efiboot required dependency. https://github.com/fwupd/fwupd/pull/2485 * Blacklist options were renamed. * Test firmware was moved to a separate repo. We need to install it or some tests will be skipped. https://github.com/fwupd/fwupd/pull/2330 * Initially, there was an option to configure dbx but in the end, it was removed in favour of bespoke dbxtool. https://github.com/fwupd/fwupd/pull/2061, https://github.com/fwupd/fwupd/pull/2318, https://github.com/fwupd/fwupd/pull/2329 * Fwupd now checks hashes of plug-ins and will complain loudly that it is tainted when “invalid” plug-in is loaded (during testing). * Installed tests complain about not being able to access cdn, even though we are not setting CI_NETWORK env var. We need a patch to fix that.
This commit is contained in:
parent
30b932e46b
commit
3a5ba30c13
|
@ -11,8 +11,8 @@ let
|
||||||
"fwupd/daemon.conf" = {
|
"fwupd/daemon.conf" = {
|
||||||
source = pkgs.writeText "daemon.conf" ''
|
source = pkgs.writeText "daemon.conf" ''
|
||||||
[fwupd]
|
[fwupd]
|
||||||
BlacklistDevices=${lib.concatStringsSep ";" cfg.blacklistDevices}
|
DisabledDevices=${lib.concatStringsSep ";" cfg.disabledDevices}
|
||||||
BlacklistPlugins=${lib.concatStringsSep ";" cfg.blacklistPlugins}
|
DisabledPlugins=${lib.concatStringsSep ";" cfg.disabledPlugins}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
"fwupd/uefi.conf" = {
|
"fwupd/uefi.conf" = {
|
||||||
|
@ -59,21 +59,21 @@ in {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
blacklistDevices = mkOption {
|
disabledDevices = mkOption {
|
||||||
type = types.listOf types.str;
|
type = types.listOf types.str;
|
||||||
default = [];
|
default = [];
|
||||||
example = [ "2082b5e0-7a64-478a-b1b2-e3404fab6dad" ];
|
example = [ "2082b5e0-7a64-478a-b1b2-e3404fab6dad" ];
|
||||||
description = ''
|
description = ''
|
||||||
Allow blacklisting specific devices by their GUID
|
Allow disabling specific devices by their GUID
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
blacklistPlugins = mkOption {
|
disabledPlugins = mkOption {
|
||||||
type = types.listOf types.str;
|
type = types.listOf types.str;
|
||||||
default = [];
|
default = [];
|
||||||
example = [ "udev" ];
|
example = [ "udev" ];
|
||||||
description = ''
|
description = ''
|
||||||
Allow blacklisting specific plugins
|
Allow disabling specific plugins
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -105,11 +105,15 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
imports = [
|
||||||
|
(mkRenamedOptionModule [ "services" "fwupd" "blacklistDevices"] [ "services" "fwupd" "disabledDevices" ])
|
||||||
|
(mkRenamedOptionModule [ "services" "fwupd" "blacklistPlugins"] [ "services" "fwupd" "disabledPlugins" ])
|
||||||
|
];
|
||||||
|
|
||||||
###### implementation
|
###### implementation
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
# Disable test related plug-ins implicitly so that users do not have to care about them.
|
# Disable test related plug-ins implicitly so that users do not have to care about them.
|
||||||
services.fwupd.blacklistPlugins = cfg.package.defaultBlacklistedPlugins;
|
services.fwupd.disabledPlugins = cfg.package.defaultDisabledPlugins;
|
||||||
|
|
||||||
environment.systemPackages = [ cfg.package ];
|
environment.systemPackages = [ cfg.package ];
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ makeInstalledTest {
|
||||||
|
|
||||||
testConfig = {
|
testConfig = {
|
||||||
services.fwupd.enable = true;
|
services.fwupd.enable = true;
|
||||||
services.fwupd.blacklistPlugins = lib.mkForce []; # don't blacklist test plugin
|
services.fwupd.disabledPlugins = lib.mkForce []; # don't disable test plugin
|
||||||
services.fwupd.enableTestRemote = true;
|
services.fwupd.enableTestRemote = true;
|
||||||
virtualisation.memorySize = 768;
|
virtualisation.memorySize = 768;
|
||||||
};
|
};
|
||||||
|
|
|
@ -93,14 +93,11 @@ diff --git a/meson_options.txt b/meson_options.txt
|
||||||
index 3da9b6c4..6c80275b 100644
|
index 3da9b6c4..6c80275b 100644
|
||||||
--- a/meson_options.txt
|
--- a/meson_options.txt
|
||||||
+++ b/meson_options.txt
|
+++ b/meson_options.txt
|
||||||
@@ -24,6 +24,7 @@ option('plugin_coreboot', type : 'boolean', value : true, description : 'enable
|
@@ -1,3 +1,4 @@
|
||||||
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')
|
|
||||||
+option('sysconfdir_install', type: 'string', value: '', description: 'sysconfdir to use during installation')
|
+option('sysconfdir_install', type: 'string', value: '', description: 'sysconfdir to use during installation')
|
||||||
option('tests', type : 'boolean', value : true, description : 'enable tests')
|
option('build', type : 'combo', choices : ['all', 'standalone', 'library'], value : 'all', description : 'build type')
|
||||||
option('udevdir', type: 'string', value: '', description: 'Directory for udev rules')
|
option('agent', type : 'boolean', value : true, description : 'enable the fwupd agent')
|
||||||
option('efi-cc', type : 'string', value : 'gcc', description : 'the compiler to use for EFI modules')
|
option('consolekit', type : 'boolean', value : true, description : 'enable ConsoleKit support')
|
||||||
diff --git a/plugins/ata/meson.build b/plugins/ata/meson.build
|
diff --git a/plugins/ata/meson.build b/plugins/ata/meson.build
|
||||||
index 8444bb8a..fa4a8ad1 100644
|
index 8444bb8a..fa4a8ad1 100644
|
||||||
--- a/plugins/ata/meson.build
|
--- a/plugins/ata/meson.build
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
{ stdenv
|
{ stdenv
|
||||||
, fetchurl
|
, fetchurl
|
||||||
, fetchpatch
|
, fetchpatch
|
||||||
|
, fetchFromGitHub
|
||||||
, substituteAll
|
, substituteAll
|
||||||
, gtk-doc
|
, gtk-doc
|
||||||
, pkg-config
|
, pkg-config
|
||||||
|
@ -88,7 +89,7 @@ let
|
||||||
|
|
||||||
self = stdenv.mkDerivation rec {
|
self = stdenv.mkDerivation rec {
|
||||||
pname = "fwupd";
|
pname = "fwupd";
|
||||||
version = "1.4.6";
|
version = "1.5.1";
|
||||||
|
|
||||||
# libfwupd goes to lib
|
# libfwupd goes to lib
|
||||||
# daemon, plug-ins and libfwupdplugin go to out
|
# daemon, plug-ins and libfwupdplugin go to out
|
||||||
|
@ -97,7 +98,7 @@ let
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://people.freedesktop.org/~hughsient/releases/fwupd-${version}.tar.xz";
|
url = "https://people.freedesktop.org/~hughsient/releases/fwupd-${version}.tar.xz";
|
||||||
sha256 = "AKG5stioIveQc7ooYb/2UoOaBzbPUFzYk8tZK0rzvK0=";
|
sha256 = "0fpxcl6bighiipyl4qspjhi0lwisrgq8jdahm68mk34rmrx50sgf";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
|
@ -118,6 +119,12 @@ let
|
||||||
# Needs a different set of modules than po/make-images.
|
# Needs a different set of modules than po/make-images.
|
||||||
inherit installedTestsPython;
|
inherit installedTestsPython;
|
||||||
})
|
})
|
||||||
|
|
||||||
|
# Skip tests requiring network.
|
||||||
|
(fetchpatch {
|
||||||
|
url = "https://github.com/fwupd/fwupd/commit/db15442c7c217610954786bd40779c14ed0e034b.patch";
|
||||||
|
sha256 = "/jzpGMJcqLisjecKpSUfA8ZCU53n7BOPR6tMgEX/qL8=";
|
||||||
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
@ -229,6 +236,19 @@ let
|
||||||
addToSearchPath XDG_DATA_DIRS "${shared-mime-info}/share"
|
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
|
preFixup = let
|
||||||
binPath = [
|
binPath = [
|
||||||
efibootmgr
|
efibootmgr
|
||||||
|
@ -254,6 +274,8 @@ let
|
||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
separateDebugInfo = true;
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
filesInstalledToEtc = [
|
filesInstalledToEtc = [
|
||||||
"fwupd/ata.conf"
|
"fwupd/ata.conf"
|
||||||
|
@ -277,8 +299,8 @@ let
|
||||||
"fwupd/remotes.d/dell-esrt.conf"
|
"fwupd/remotes.d/dell-esrt.conf"
|
||||||
];
|
];
|
||||||
|
|
||||||
# BlacklistPlugins key in fwupd/daemon.conf
|
# DisabledPlugins key in fwupd/daemon.conf
|
||||||
defaultBlacklistedPlugins = [
|
defaultDisabledPlugins = [
|
||||||
"test"
|
"test"
|
||||||
"invalid"
|
"invalid"
|
||||||
];
|
];
|
||||||
|
@ -302,9 +324,9 @@ let
|
||||||
|
|
||||||
config = configparser.RawConfigParser()
|
config = configparser.RawConfigParser()
|
||||||
config.read('${self}/etc/fwupd/daemon.conf')
|
config.read('${self}/etc/fwupd/daemon.conf')
|
||||||
package_blacklisted_plugins = config.get('fwupd', 'BlacklistPlugins').rstrip(';').split(';')
|
package_disabled_plugins = config.get('fwupd', 'DisabledPlugins').rstrip(';').split(';')
|
||||||
passthru_blacklisted_plugins = ${listToPy passthru.defaultBlacklistedPlugins}
|
passthru_disabled_plugins = ${listToPy passthru.defaultDisabledPlugins}
|
||||||
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}'
|
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()
|
pathlib.Path(os.getenv('out')).touch()
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -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
|
--- a/data/device-tests/hardware.py
|
||||||
+++ b/data/device-tests/hardware.py
|
+++ b/data/device-tests/hardware.py
|
||||||
@@ -1,4 +1,4 @@
|
@@ -1,4 +1,4 @@
|
||||||
|
@ -6,25 +8,41 @@
|
||||||
# pylint: disable=wrong-import-position,too-many-locals,unused-argument,wrong-import-order
|
# pylint: disable=wrong-import-position,too-many-locals,unused-argument,wrong-import-order
|
||||||
#
|
#
|
||||||
# Copyright (C) 2017 Richard Hughes <richard@hughsie.com>
|
# 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
|
--- a/data/installed-tests/meson.build
|
||||||
+++ b/data/installed-tests/meson.build
|
+++ b/data/installed-tests/meson.build
|
||||||
@@ -1,4 +1,4 @@
|
@@ -65,5 +65,5 @@ configure_file(
|
||||||
-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(
|
|
||||||
output : 'fwupd-tests.conf',
|
output : 'fwupd-tests.conf',
|
||||||
configuration : con2,
|
configuration : con2,
|
||||||
install: true,
|
install: true,
|
||||||
- install_dir: join_paths(sysconfdir, 'fwupd', 'remotes.d'),
|
- install_dir: join_paths(sysconfdir, 'fwupd', 'remotes.d'),
|
||||||
+ install_dir: join_paths(get_option('installed_test_prefix'), 'etc', '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
|
--- a/meson_options.txt
|
||||||
+++ b/meson_options.txt
|
+++ b/meson_options.txt
|
||||||
@@ -1,3 +1,4 @@
|
@@ -25,6 +26,7 @@ option('plugin_coreboot', type : 'boolean', value : true, description : 'enable
|
||||||
+option('installed_test_prefix', type: 'string', value: '', description: 'Prefix for installed tests')
|
option('systemd', type : 'boolean', value : true, description : 'enable systemd support')
|
||||||
option('build', type : 'combo', choices : ['all', 'standalone', 'library'], value : 'all', description : 'build type')
|
option('systemd_root_prefix', type: 'string', value: '', description: 'Directory to base systemd’s installation directories on')
|
||||||
option('agent', type : 'boolean', value : true, description : 'enable the fwupd agent')
|
option('elogind', type : 'boolean', value : false, description : 'enable elogind support')
|
||||||
option('consolekit', type : 'boolean', value : true, description : 'enable ConsoleKit 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')
|
||||||
|
|
Loading…
Reference in a new issue