fwupd: 1.9.12 -> 1.9.13

Changelog: https://github.com/fwupd/fwupd/releases/tag/1.9.13
This commit is contained in:
r-vdp 2024-02-09 12:38:29 +01:00
parent 6ddcfabd59
commit 12de1b3a38
No known key found for this signature in database
5 changed files with 22 additions and 32 deletions

View file

@ -51,7 +51,9 @@ let
# to install it because it would create a cyclic dependency between # to install it because it would create a cyclic dependency between
# the outputs. We also need to enable the remote, # the outputs. We also need to enable the remote,
# which should not be done by default. # which should not be done by default.
lib.optionalAttrs cfg.enableTestRemote (enableRemote cfg.package.installedTests "fwupd-tests") lib.optionalAttrs
(cfg.daemonSettings.TestDevices or false)
(enableRemote cfg.package.installedTests "fwupd-tests")
); );
in { in {
@ -86,15 +88,6 @@ in {
''; '';
}; };
enableTestRemote = mkOption {
type = types.bool;
default = false;
description = lib.mdDoc ''
Whether to enable test remote. This is used by
[installed tests](https://github.com/fwupd/fwupd/blob/master/data/installed-tests/README.md).
'';
};
package = mkPackageOption pkgs "fwupd" { }; package = mkPackageOption pkgs "fwupd" { };
daemonSettings = mkOption { daemonSettings = mkOption {
@ -128,6 +121,15 @@ in {
or if this partition is not mounted at /boot/efi, /boot, or /efi or if this partition is not mounted at /boot/efi, /boot, or /efi
''; '';
}; };
TestDevices = mkOption {
type = types.bool;
default = false;
description = lib.mdDoc ''
Create virtual test devices and remote for validating daemon flows.
This is only intended for CI testing and development purposes.
'';
};
}; };
}; };
default = {}; default = {};
@ -159,7 +161,6 @@ in {
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.daemonSettings = { services.fwupd.daemonSettings = {
DisabledPlugins = cfg.package.defaultDisabledPlugins;
EspLocation = config.boot.loader.efi.efiSysMountPoint; EspLocation = config.boot.loader.efi.efiSysMountPoint;
}; };

View file

@ -1,11 +1,12 @@
{ pkgs, lib, makeInstalledTest, ... }: { pkgs, makeInstalledTest, ... }:
makeInstalledTest { makeInstalledTest {
tested = pkgs.fwupd; tested = pkgs.fwupd;
testConfig = { testConfig = {
services.fwupd.enable = true; services.fwupd = {
services.fwupd.daemonSettings.DisabledPlugins = lib.mkForce [ ]; # don't disable test plugin enable = true;
services.fwupd.enableTestRemote = true; daemonSettings.TestDevices = true;
};
}; };
} }

View file

@ -80,7 +80,7 @@ index c20a1a05e..5354bac7f 100644
@@ -56,12 +56,12 @@ configure_file( @@ -56,12 +56,12 @@ configure_file(
output: 'vendor.conf', output: 'vendor.conf',
configuration: con2, configuration: con2,
install: true, install: get_option('vendor_metadata'),
- install_dir: join_paths(sysconfdir, 'fwupd', 'remotes.d'), - install_dir: join_paths(sysconfdir, 'fwupd', 'remotes.d'),
+ install_dir: join_paths(sysconfdir_install, 'fwupd', 'remotes.d'), + install_dir: join_paths(sysconfdir_install, 'fwupd', 'remotes.d'),
) )

View file

@ -6,7 +6,7 @@ index dfce86b1c..5e34c4fa6 100644
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(datadir, '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 diff --git a/meson.build b/meson.build

View file

@ -11,7 +11,6 @@
, libdrm , libdrm
, polkit , polkit
, libxmlb , libxmlb
, glib
, gusb , gusb
, sqlite , sqlite
, libarchive , libarchive
@ -121,7 +120,7 @@ let
in in
stdenv.mkDerivation (finalAttrs: { stdenv.mkDerivation (finalAttrs: {
pname = "fwupd"; pname = "fwupd";
version = "1.9.12"; version = "1.9.13";
# libfwupd goes to lib # libfwupd goes to lib
# daemon, plug-ins and libfwupdplugin go to out # daemon, plug-ins and libfwupdplugin go to out
@ -132,7 +131,7 @@ stdenv.mkDerivation (finalAttrs: {
owner = "fwupd"; owner = "fwupd";
repo = "fwupd"; repo = "fwupd";
rev = finalAttrs.version; rev = finalAttrs.version;
hash = "sha256-hPRp61m/XTXFacYkBOb4SsG4fcFvWrdMfc+sxLk5/sQ="; hash = "sha256-h2e9MFTb777xbNRlzKWXc5GUdu/BHSkJTaogEE5byjo=";
}; };
patches = [ patches = [
@ -214,6 +213,7 @@ stdenv.mkDerivation (finalAttrs: {
"-Dsysconfdir_install=${placeholder "out"}/etc" "-Dsysconfdir_install=${placeholder "out"}/etc"
"-Defi_os_dir=nixos" "-Defi_os_dir=nixos"
"-Dplugin_modem_manager=enabled" "-Dplugin_modem_manager=enabled"
"-Dvendor_metadata=true"
# We do not want to place the daemon into lib (cyclic reference) # We do not want to place the daemon into lib (cyclic reference)
"--libexecdir=${placeholder "out"}/libexec" "--libexecdir=${placeholder "out"}/libexec"
] ++ lib.optionals (!enablePassim) [ ] ++ lib.optionals (!enablePassim) [
@ -341,12 +341,6 @@ stdenv.mkDerivation (finalAttrs: {
"grub.d/35_fwupd" "grub.d/35_fwupd"
]; ];
# DisabledPlugins key in fwupd/daemon.conf
defaultDisabledPlugins = [
"test"
"test_ble"
];
# For updating. # For updating.
inherit test-firmware; inherit test-firmware;
@ -372,12 +366,6 @@ stdenv.mkDerivation (finalAttrs: {
assert len(package_etc - passthru_etc) == 0, f'fwupd package contains the following paths in /etc that are not listed in passthru.filesInstalledToEtc: {package_etc - passthru_etc}' assert len(package_etc - passthru_etc) == 0, f'fwupd package contains the following paths in /etc that are not listed in passthru.filesInstalledToEtc: {package_etc - passthru_etc}'
assert len(passthru_etc - package_etc) == 0, f'fwupd package lists the following paths in passthru.filesInstalledToEtc that are not contained in /etc: {passthru_etc - package_etc}' assert len(passthru_etc - package_etc) == 0, f'fwupd package lists the following paths in passthru.filesInstalledToEtc that are not contained in /etc: {passthru_etc - package_etc}'
config = configparser.RawConfigParser()
config.read('${finalAttrs.finalPackage}/etc/fwupd/fwupd.conf')
package_disabled_plugins = config.get('fwupd', 'DisabledPlugins').rstrip(';').split(';')
passthru_disabled_plugins = ${listToPy finalAttrs.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() pathlib.Path(os.getenv('out')).touch()
''; '';
}; };