Merge pull request #161935 from tomfitzhenry/fwupd-1.7.6

fwupd: 1.7.2 -> 1.7.6
This commit is contained in:
Jan Tojnar 2022-03-08 21:33:33 +01:00 committed by GitHub
commit 8b250c5d7f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 84 additions and 39 deletions

View file

@ -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'],

View file

@ -12,6 +12,7 @@
, libgudev
, polkit
, libxmlb
, glib
, gusb
, sqlite
, libarchive
@ -50,6 +51,9 @@
, nixosTests
, runCommand
, unstableGitUpdater
, modemmanager
, libqmi
, libmbim
}:
let
@ -112,7 +116,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 +125,7 @@ let
src = fetchurl {
url = "https://people.freedesktop.org/~hughsient/releases/fwupd-${version}.tar.xz";
sha256 = "sha256-hjLfacO6/Fk4fNy1F8POMaWXoJAm5E9ZB9g4RnG5+DQ=";
sha256 = "sha256-fr4VFKy2iNJknOzDktuSkJTaPwPPyYqcD6zKuwhJEvo=";
};
patches = [
@ -136,15 +140,26 @@ let
# they are not really part of the library.
./install-fwupdplugin-to-out.patch
# Fix detection of installed tests
# https://github.com/fwupd/fwupd/issues/3880
(fetchpatch {
url = "https://github.com/fwupd/fwupd/commit/5bc546221331feae9cedc1892219a25d8837955f.patch";
sha256 = "XcLhcDrB2/MFCXjKAyhftQgvJG4BBkp07geM9eK3q1g=";
})
# Installed tests are installed to different output
# we also cannot have fwupd-tests.conf in $out/etc since it would form a cycle.
./installed-tests-path.patch
# Tests detect fwupd is installed when prefix is /usr.
./fix-install-detection.patch
# 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 = [
@ -187,6 +202,9 @@ let
efivar
fwupd-efi
protobufc
modemmanager
libmbim
libqmi
] ++ lib.optionals haveDell [
libsmbios
];
@ -206,6 +224,7 @@ let
"--sysconfdir=/etc"
"-Dsysconfdir_install=${placeholder "out"}/etc"
"-Defi_os_dir=nixos"
"-Dplugin_modem_manager=true"
# We do not want to place the daemon into lib (cyclic reference)
"--libexecdir=${placeholder "out"}/libexec"
@ -250,6 +269,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 +323,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"

View file

@ -1,13 +0,0 @@
diff --git a/plugins/redfish/fu-self-test.c b/plugins/redfish/fu-self-test.c
index 4710c769..1c68fdb9 100644
--- a/plugins/redfish/fu-self-test.c
+++ b/plugins/redfish/fu-self-test.c
@@ -27,7 +27,7 @@ fu_test_is_installed_test(void)
const gchar *builddir = g_getenv("G_TEST_BUILDDIR");
if (builddir == NULL)
return FALSE;
- return g_str_has_prefix(builddir, "/usr");
+ return g_str_has_prefix(builddir, "/nix");
}
static void

View file

@ -1,8 +1,8 @@
diff --git a/data/installed-tests/meson.build b/data/installed-tests/meson.build
index adadbcdd..1b51bb9c 100644
index b8ec916f0..38209b363 100644
--- a/data/installed-tests/meson.build
+++ b/data/installed-tests/meson.build
@@ -65,5 +65,5 @@ configure_file(
@@ -83,5 +83,5 @@ configure_file(
output : 'fwupd-tests.conf',
configuration : con2,
install: true,
@ -10,10 +10,10 @@ index adadbcdd..1b51bb9c 100644
+ 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
index 32fe6e408..b35d741e0 100644
--- a/meson.build
+++ b/meson.build
@@ -177,8 +177,8 @@ else
@@ -183,8 +183,8 @@ else
datadir = join_paths(prefix, get_option('datadir'))
sysconfdir = join_paths(prefix, get_option('sysconfdir'))
localstatedir = join_paths(prefix, get_option('localstatedir'))
@ -24,6 +24,14 @@ index 772b7bbe..f59302cd 100644
endif
mandir = join_paths(prefix, get_option('mandir'))
localedir = join_paths(prefix, get_option('localedir'))
@@ -484,6 +484,7 @@ gnome = import('gnome')
i18n = import('i18n')
conf.set_quoted('FWUPD_PREFIX', prefix)
+conf.set_quoted('FWUPD_INSTALLED_TEST_PREFIX', get_option('installed_test_prefix'))
conf.set_quoted('FWUPD_BINDIR', bindir)
conf.set_quoted('FWUPD_LIBDIR', libdir)
conf.set_quoted('FWUPD_LIBEXECDIR', libexecdir)
diff --git a/meson_options.txt b/meson_options.txt
index 0a0e2853..5f68d78b 100644
--- a/meson_options.txt
@ -36,3 +44,16 @@ index 0a0e2853..5f68d78b 100644
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')
diff --git a/plugins/redfish/fu-self-test.c b/plugins/redfish/fu-self-test.c
index c507fabc8..0cddc3248 100644
--- a/plugins/redfish/fu-self-test.c
+++ b/plugins/redfish/fu-self-test.c
@@ -27,7 +27,7 @@ fu_test_is_installed_test(void)
const gchar *builddir = g_getenv("G_TEST_BUILDDIR");
if (builddir == NULL)
return FALSE;
- return g_str_has_prefix(builddir, FWUPD_PREFIX);
+ return g_str_has_prefix(builddir, FWUPD_INSTALLED_TEST_PREFIX);
}
static void