Skip to content

Commit

Permalink
fwupd: 1.9.25 -> 2.0.1 (NixOS#351772)
Browse files Browse the repository at this point in the history
  • Loading branch information
r-vdp authored Nov 24, 2024
2 parents 3c8b622 + 9e346f6 commit d717982
Show file tree
Hide file tree
Showing 5 changed files with 334 additions and 191 deletions.
118 changes: 97 additions & 21 deletions pkgs/by-name/fw/fwupd/add-option-for-installation-sysconfdir.patch
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
commit e798ff19cd36daaed68b86edc7ebdb9dcfe1c057
Author: r-vdp <[email protected]>
Date: Tue Oct 15 11:46:38 2024 +0200

Add option for installation sysconfdir

diff --git a/data/bios-settings.d/meson.build b/data/bios-settings.d/meson.build
index b0ff5b106..13ac380d0 100644
index b0ff5b106..29b60a3be 100644
--- a/data/bios-settings.d/meson.build
+++ b/data/bios-settings.d/meson.build
@@ -1,5 +1,5 @@
if build_standalone and host_machine.system() == 'linux'
install_data('README.md',
- install_dir: join_paths(sysconfdir, 'fwupd', 'bios-settings.d')
+ install_dir: join_paths(sysconfdir_install, 'fwupd', 'bios-settings.d')
+ install_dir: join_paths(datadir, 'fwupd', 'bios-settings.d')
)
endif
diff --git a/data/meson.build b/data/meson.build
index e13da4adf..6858c240f 100644
index 9db5cd756..cf3181c8b 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -26,7 +26,7 @@ endif

@@ -27,7 +27,7 @@ endif
if build_standalone
install_data(['fwupd.conf'],
- install_dir: join_paths(sysconfdir, 'fwupd'),
Expand All @@ -23,10 +29,10 @@ index e13da4adf..6858c240f 100644
)
plugin_quirks += files([
diff --git a/data/pki/meson.build b/data/pki/meson.build
index 3649fecea..c3462744b 100644
index 686064195..72ae401bd 100644
--- a/data/pki/meson.build
+++ b/data/pki/meson.build
@@ -12,13 +12,13 @@ install_data([
@@ -7,13 +7,13 @@ install_data([
'GPG-KEY-Linux-Foundation-Firmware',
'GPG-KEY-Linux-Vendor-Firmware-Service',
],
Expand All @@ -41,8 +47,8 @@ index 3649fecea..c3462744b 100644
+ install_dir: join_paths(sysconfdir_install, 'pki', 'fwupd-metadata')
)
endif

@@ -26,11 +26,11 @@ if supported_pkcs7
@@ -21,11 +21,11 @@ if supported_pkcs7
install_data([
'LVFS-CA.pem',
],
Expand All @@ -57,10 +63,10 @@ index 3649fecea..c3462744b 100644
)
endif
diff --git a/data/remotes.d/meson.build b/data/remotes.d/meson.build
index c20a1a05e..5354bac7f 100644
index 10201bc9a..fba712491 100644
--- a/data/remotes.d/meson.build
+++ b/data/remotes.d/meson.build
@@ -15,14 +15,14 @@ if build_standalone and get_option('lvfs') != 'false'
@@ -11,14 +11,14 @@ if build_standalone and get_option('lvfs') != 'false'
output: 'lvfs.conf',
configuration: con3,
install: true,
Expand All @@ -77,7 +83,7 @@ index c20a1a05e..5354bac7f 100644
)
i18n.merge_file(
input: 'lvfs.metainfo.xml',
@@ -56,12 +56,12 @@ configure_file(
@@ -52,12 +52,12 @@ configure_file(
output: 'vendor.conf',
configuration: con2,
install: get_option('vendor_metadata'),
Expand All @@ -92,29 +98,85 @@ index c20a1a05e..5354bac7f 100644
- install_dir: join_paths(sysconfdir, 'fwupd', 'remotes.d'),
+ install_dir: join_paths(sysconfdir_install, 'fwupd', 'remotes.d'),
)
diff --git a/docs/meson.build b/docs/meson.build
index 5693edcc8..181c359a4 100644
--- a/docs/meson.build
+++ b/docs/meson.build
@@ -124,7 +124,7 @@ if build_docs
],
build_by_default: true,
install: true,
- install_dir: join_paths(datadir, 'doc'),
+ install_dir: join_paths(sysconfdir_install, 'doc'),
)

subdir('hsi-tests.d')
@@ -182,7 +182,7 @@ if build_docs
],
build_by_default: true,
install: true,
- install_dir: join_paths(datadir, 'doc'),
+ install_dir: join_paths(sysconfdir_install, 'doc'),
)
man_cmd = []
foreach man: man_md
@@ -196,7 +196,7 @@ if build_docs
man_cmd,
],
install: true,
- install_dir: join_paths(datadir, 'doc', 'fwupd')
+ install_dir: join_paths(sysconfdir_install, 'doc', 'fwupd')
)
if hsi
install_data(['hsi.html'],
@@ -204,18 +204,18 @@ if build_docs
)
endif
install_data(['urlmap_fwupd.js'],
- install_dir: join_paths(datadir, 'doc', 'libfwupd')
+ install_dir: join_paths(sysconfdir_install, 'doc', 'libfwupd')
)
install_data(['urlmap_fwupdplugin.js'],
- install_dir: join_paths(datadir, 'doc', 'libfwupdplugin')
+ install_dir: join_paths(sysconfdir_install, 'doc', 'libfwupdplugin')
)
#make devhelp work
install_symlink('libfwupd',
- install_dir: join_paths(datadir, 'doc', 'fwupd'),
+ install_dir: join_paths(sysconfdir_install, 'doc', 'fwupd'),
pointing_to: join_paths('..', 'libfwupd'),
)
install_symlink('libfwupdplugin',
- install_dir: join_paths(datadir, 'doc', 'fwupd'),
+ install_dir: join_paths(sysconfdir_install, 'doc', 'fwupd'),
pointing_to: join_paths('..', 'libfwupdplugin'),
)
endif
diff --git a/meson.build b/meson.build
index ca6ccdf92..0a3097d90 100644
index 2ceaf531c..e4e764b97 100644
--- a/meson.build
+++ b/meson.build
@@ -195,6 +195,12 @@ endif
@@ -201,6 +201,12 @@ endif
mandir = join_paths(prefix, get_option('mandir'))
localedir = join_paths(prefix, get_option('localedir'))

+if get_option('sysconfdir_install') != ''
+ sysconfdir_install = join_paths(prefix, get_option('sysconfdir_install'))
+else
+ sysconfdir_install = sysconfdir
+endif
+
diffcmd = find_program('diff')
gio = dependency('gio-2.0', version: '>= 2.68.0')
giounix = dependency('gio-unix-2.0', version: '>= 2.68.0', required: false)

gio = dependency('gio-2.0', version: '>= 2.72.0')
giounix = dependency('gio-unix-2.0', version: '>= 2.72.0', required: false)
diff --git a/meson_options.txt b/meson_options.txt
index 877891126..986d0ee31 100644
index a4a211fbb..6197fe502 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,3 +1,8 @@
@@ -7,6 +7,11 @@ option('bluez',
type: 'feature',
description: 'BlueZ support',
)
+option('sysconfdir_install',
+ type: 'string',
+ value: '',
Expand All @@ -124,7 +186,7 @@ index 877891126..986d0ee31 100644
type: 'combo',
choices: [
diff --git a/plugins/uefi-capsule/meson.build b/plugins/uefi-capsule/meson.build
index eb196c21e..c9a29f680 100644
index 2dfc4d2f0..e5ac73edd 100644
--- a/plugins/uefi-capsule/meson.build
+++ b/plugins/uefi-capsule/meson.build
@@ -20,7 +20,7 @@ if host_machine.system() == 'linux'
Expand All @@ -136,3 +198,17 @@ index eb196c21e..c9a29f680 100644
)
elif host_machine.system() == 'freebsd'
backend_srcs += 'fu-uefi-backend-freebsd.c'
@@ -93,7 +93,7 @@ if get_option('plugin_uefi_capsule_splash')
'--out', '@OUTPUT@',
],
install: true,
- install_dir: join_paths(datadir, 'fwupd'),
+ install_dir: join_paths(sysconfdir_install, 'fwupd'),
)
endif

@@ -146,4 +146,3 @@ summary({
'capsule splash': get_option('plugin_uefi_capsule_splash'),
}, section:'uefi capsule options')
endif
-
12 changes: 9 additions & 3 deletions pkgs/by-name/fw/fwupd/efi-app-path.patch
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
commit 1770b1871a567dfa78ae1e32094b6007bb7639e9
Author: r-vdp <[email protected]>
Date: Mon Oct 28 12:08:49 2024 +0100

Get the efi app from fwupd-efi

diff --git a/meson.build b/meson.build
index b18108c74..7e674b4d2 100644
index e4e764b97..8acaa3d2d 100644
--- a/meson.build
+++ b/meson.build
@@ -404,7 +404,7 @@ endif

@@ -482,7 +482,7 @@ endif
# EFI
if build_standalone
- efi_app_location = join_paths(libexecdir, 'fwupd', 'efi')
Expand Down
13 changes: 9 additions & 4 deletions pkgs/by-name/fw/fwupd/install-fwupdplugin-to-out.patch
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
commit 50827b154728a97e5dfcb7d41e5c7155752919c3
Author: r-vdp <[email protected]>
Date: Mon Oct 28 12:07:51 2024 +0100

Install fwupdplugin to out

diff --git a/meson.build b/meson.build
index 9ae278b66..7cddf1a0d 100644
index 250b76107..62c127c35 100644
--- a/meson.build
+++ b/meson.build
@@ -507,7 +507,7 @@ if build_standalone
@@ -553,7 +553,7 @@ if build_standalone
if host_machine.system() == 'windows'
libdir_pkg = 'fwupd-@0@'.format(fwupd_version)
libdir_pkg = bindir
else
- libdir_pkg = join_paths(libdir, 'fwupd-@0@'.format(fwupd_version))
+ libdir_pkg = join_paths(prefix, 'lib', 'fwupd-@0@'.format(fwupd_version))
endif
conf.set_quoted('FWUPD_LIBDIR_PKG', libdir_pkg)
endif

65 changes: 53 additions & 12 deletions pkgs/by-name/fw/fwupd/installed-tests-path.patch
Original file line number Diff line number Diff line change
@@ -1,19 +1,47 @@
diff --git a/data/installed-tests/meson.build b/data/installed-tests/meson.build
index dfce86b1c..5e34c4fa6 100644
--- a/data/installed-tests/meson.build
+++ b/data/installed-tests/meson.build
@@ -86,5 +86,5 @@ configure_file(
commit 27ddb6910ec9027f8f502f5240fb33cddd9fd16b
Author: r-vdp <[email protected]>
Date: Tue Oct 15 14:49:53 2024 +0200

Add output for installed tests

diff --git a/data/device-tests/meson.build b/data/device-tests/meson.build
index 4f3a5f2da..b0d21c8bd 100644
--- a/data/device-tests/meson.build
+++ b/data/device-tests/meson.build
@@ -67,5 +67,5 @@ install_data([
'wacom-intuos-bt-s.json',
'wistron-dock-40b7.json',
],
- install_dir: join_paths(datadir, 'fwupd', 'device-tests'),
+ install_dir: join_paths(get_option('installed_test_prefix'), 'etc', 'fwupd', 'device-tests'),
)
diff --git a/data/tests/meson.build b/data/tests/meson.build
index 3da184010..8606c9280 100644
--- a/data/tests/meson.build
+++ b/data/tests/meson.build
@@ -2,7 +2,7 @@ con2 = configuration_data()
con2.set('installedtestsdir', installed_test_datadir)
con2.set('installedtestsbindir', installed_test_bindir)
con2.set('installedtestsdatadir', installed_test_datadir)
-con2.set('devicetestdir', join_paths(datadir, 'fwupd', 'device-tests'))
+con2.set('devicetestdir', join_paths(installed_test_datadir, 'fwupd', 'device-tests'))
con2.set('bindir', bindir)
con2.set('libexecdir', libexecdir)

@@ -105,7 +105,7 @@ configure_file(
output: 'fwupd-tests.conf',
configuration: con2,
install: true,
- install_dir: join_paths(datadir, 'fwupd', 'remotes.d'),
+ install_dir: join_paths(get_option('installed_test_prefix'), 'etc', 'fwupd', 'remotes.d'),
)

if umockdev_integration_tests.allowed()
diff --git a/meson.build b/meson.build
index ca6ccdf92..36b1b47b0 100644
index 62c127c35..2ceaf531c 100644
--- a/meson.build
+++ b/meson.build
@@ -188,8 +188,8 @@ else
@@ -194,8 +194,8 @@ else
datadir = join_paths(prefix, get_option('datadir'))
sysconfdir = join_paths(prefix, get_option('sysconfdir'))
localstatedir = join_paths(prefix, get_option('localstatedir'))
Expand All @@ -24,7 +52,7 @@ index ca6ccdf92..36b1b47b0 100644
daemon_dir = join_paths(libexecdir, 'fwupd')
endif
mandir = join_paths(prefix, get_option('mandir'))
@@ -497,6 +497,7 @@ gnome = import('gnome')
@@ -541,6 +541,7 @@ gnome = import('gnome')
i18n = import('i18n')

conf.set_quoted('FWUPD_PREFIX', prefix)
Expand All @@ -33,12 +61,12 @@ index ca6ccdf92..36b1b47b0 100644
conf.set_quoted('FWUPD_LIBDIR', libdir)
conf.set_quoted('FWUPD_LIBEXECDIR', libexecdir)
diff --git a/meson_options.txt b/meson_options.txt
index 877891126..bfc5d1afd 100644
index 769a5b655..a4a211fbb 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -452,6 +452,10 @@ option('elogind',
'false': 'disabled',
},
@@ -328,6 +328,10 @@ option('systemd_unit_user',
value: 'fwupd-refresh',
description: 'User account to use for fwupd-refresh.service (empty for DynamicUser)',
)
+option('installed_test_prefix',
+ type: 'string',
Expand All @@ -47,3 +75,16 @@ index 877891126..bfc5d1afd 100644
option('tests',
type: 'boolean',
value: true,
diff --git a/src/tests/host-emulate/meson.build b/src/tests/host-emulate/meson.build
index 4bc02e46e..17bc2270d 100644
--- a/src/tests/host-emulate/meson.build
+++ b/src/tests/host-emulate/meson.build
@@ -9,7 +9,7 @@ if build_standalone
capture: true,
command: [gzip, '-k', '--stdout', '@INPUT@'],
install: true,
- install_dir: join_paths(datadir, 'fwupd', 'host-emulate.d'),
+ install_dir: join_paths(get_option('installed_test_prefix'), 'etc', 'fwupd', 'host-emulate.d'),
)
endforeach
endif
Loading

0 comments on commit d717982

Please sign in to comment.