fwupd: Fix daemon config not being found#48427
fwupd: Fix daemon config not being found#48427infinisil wants to merge 1 commit intoNixOS:masterfrom
Conversation
|
No attempt on x86_64-darwin (full log) The following builds were skipped because they don't evaluate on x86_64-darwin: fwupd Partial log (click to expand)
|
|
No attempt on aarch64-linux (full log) The following builds were skipped because they don't evaluate on aarch64-linux: fwupd Partial log (click to expand)
|
There was a problem hiding this comment.
Could you use a patch file instead? It will be more clear when the pattern no longer matches.
There was a problem hiding this comment.
I also just realized that there's a patch touching the config file already:
nixpkgs/pkgs/os-specific/linux/firmware/fwupd/fix-paths.patch
Lines 12 to 17 in 4207f01
I'll investigate further later
|
Success on x86_64-linux (full log) Attempted: fwupd Partial log (click to expand)
|
|
Something like this ought to do it: diff --git a/pkgs/os-specific/linux/firmware/fwupd/fix-paths.patch b/pkgs/os-specific/linux/firmware/fwupd/fix-paths.patch
index 1cd9eb0e8f1..212f30147c2 100644
--- a/pkgs/os-specific/linux/firmware/fwupd/fix-paths.patch
+++ b/pkgs/os-specific/linux/firmware/fwupd/fix-paths.patch
@@ -1,89 +1,49 @@
+diff --git a/data/builder/meson.build b/data/builder/meson.build
+index c7a430c0..e69de29b 100644
--- a/data/builder/meson.build
+++ b/data/builder/meson.build
@@ -1,3 +0,0 @@
-install_data('README.md',
- install_dir : join_paths(localstatedir, 'lib', 'fwupd', 'builder')
-)
---- a/data/meson.build
-+++ b/data/meson.build
-@@ -8,16 +8,12 @@
- subdir('installed-tests')
- endif
+diff --git a/meson.build b/meson.build
+index 96d752ae..fc5cb4dd 100644
+--- a/meson.build
++++ b/meson.build
+@@ -294,11 +294,17 @@
--install_data(['daemon.conf'],
-- install_dir : join_paths(sysconfdir, 'fwupd')
--)
--
- install_data(['org.freedesktop.fwupd.metainfo.xml'],
- install_dir: join_paths(datadir, 'metainfo')
- )
-
- install_data(['org.freedesktop.fwupd.conf'],
-- install_dir : join_paths(sysconfdir, 'dbus-1', 'system.d')
-+ install_dir : join_paths(get_option('prefix'), 'etc', 'dbus-1', 'system.d')
- )
+ plugin_dir = join_paths(libdir, 'fwupd-plugins-3')
- install_data(['metadata.xml'],
---- a/data/pki/meson.build
-+++ b/data/pki/meson.build
-@@ -4,14 +4,14 @@
- 'GPG-KEY-Linux-Foundation-Firmware',
- 'GPG-KEY-Linux-Vendor-Firmware-Service',
- ],
-- install_dir : join_paths(sysconfdir, 'pki', 'fwupd')
-+ install_dir : join_paths(get_option('prefix'), 'etc', 'pki', 'fwupd')
- )
++default_sysconfdir = get_option('sysconfdir')
++if default_sysconfdir == 'etc'
++ message('sysconfdir of etc makes no sense, using /etc')
++ default_sysconfdir = '/etc'
++endif
++
+ conf.set_quoted('BINDIR', bindir)
+ conf.set_quoted('LIBEXECDIR', libexecdir)
+ conf.set_quoted('DATADIR', datadir)
+ conf.set_quoted('LOCALSTATEDIR', localstatedir)
+-conf.set_quoted('SYSCONFDIR', sysconfdir)
++conf.set_quoted('SYSCONFDIR', default_sysconfdir)
+ conf.set_quoted('PLUGINDIR', plugin_dir)
- install_data([
- 'GPG-KEY-Linux-Foundation-Metadata',
- 'GPG-KEY-Linux-Vendor-Firmware-Service',
- ],
-- install_dir : join_paths(sysconfdir, 'pki', 'fwupd-metadata')
-+ install_dir : join_paths(get_option('prefix'), 'etc', 'pki', 'fwupd-metadata')
- )
- endif
-
-@@ -19,12 +19,12 @@
- install_data([
- 'LVFS-CA.pem',
- ],
-- install_dir : join_paths(sysconfdir, 'pki', 'fwupd')
-+ install_dir : join_paths(get_option('prefix'), 'etc', 'pki', 'fwupd')
- )
- install_data([
- 'LVFS-CA.pem',
- ],
-- install_dir : join_paths(sysconfdir, 'pki', 'fwupd-metadata')
-+ install_dir : join_paths(get_option('prefix'), 'etc', 'pki', 'fwupd-metadata')
- )
- endif
-
---- a/data/remotes.d/meson.build
-+++ b/data/remotes.d/meson.build
-@@ -3,7 +3,7 @@
- 'lvfs.conf',
- 'lvfs-testing.conf',
- ],
-- install_dir : join_paths(sysconfdir, 'fwupd', 'remotes.d')
-+ install_dir : join_paths(get_option('prefix'), 'etc', 'fwupd', 'remotes.d')
- )
- i18n.merge_file(
- input: 'lvfs.metainfo.xml',
-@@ -37,12 +37,12 @@
- output : 'fwupd.conf',
- configuration : con2,
- install: true,
-- install_dir: join_paths(sysconfdir, 'fwupd', 'remotes.d'),
-+ install_dir: join_paths(get_option('prefix'), 'etc', 'fwupd', 'remotes.d'),
- )
- configure_file(
- input : 'vendor.conf',
- output : 'vendor.conf',
- configuration : con2,
- install: true,
-- install_dir: join_paths(sysconfdir, 'fwupd', 'remotes.d'),
-+ install_dir: join_paths(get_option('prefix'), 'etc', 'fwupd', 'remotes.d'),
+ conf.set_quoted('GETTEXT_PACKAGE', meson.project_name())
+@@ -310,12 +316,6 @@
+ configuration : conf
)
+
+-default_sysconfdir = get_option('sysconfdir')
+-if default_sysconfdir == 'etc'
+- message('sysconfdir of etc makes no sense, using /etc')
+- default_sysconfdir = '/etc'
+-endif
+-
+ plugin_deps = []
+ plugin_deps += appstream_glib
+ plugin_deps += gio
+diff --git a/meson_post_install.sh b/meson_post_install.sh
+index 0cbb6f41..d757a81a 100755
--- a/meson_post_install.sh
+++ b/meson_post_install.sh
@@ -11,6 +11,4 @@
|
|
@jtojnar Um, could you please send the file directly instead of a diff of it (or commit it directly)? I can't apply it because git apply/patch isn't happy with it being a diff of a diff :P |
|
I do not see how would that be a problem, only the first character on each line should be considered. Try applying it to unstable. |
|
@jtojnar Ah yeah it worked, I just needed I'll test this PR again this evening (by just running the fwupd service). |
|
No attempt on x86_64-darwin (full log) The following builds were skipped because they don't evaluate on x86_64-darwin: fwupd Partial log (click to expand)
|
|
No attempt on aarch64-linux (full log) The following builds were skipped because they don't evaluate on aarch64-linux: fwupd Partial log (click to expand)
|
|
Success on x86_64-linux (full log) Attempted: fwupd Partial log (click to expand)
|
This comment has been minimized.
This comment has been minimized.
|
Could you add a comment with link to next to the patch? fwupd/fwupd#800 |
| LC_ALL = "en_US.UTF-8"; # For po/make-images | ||
|
|
||
| patches = [ | ||
| # https://github.com/hughsie/fwupd/issues/800 |
|
No attempt on x86_64-darwin (full log) The following builds were skipped because they don't evaluate on x86_64-darwin: fwupd Partial log (click to expand)
|
|
No attempt on aarch64-linux (full log) The following builds were skipped because they don't evaluate on aarch64-linux: fwupd Partial log (click to expand)
|
|
Success on x86_64-linux (full log) Attempted: fwupd Partial log (click to expand)
|
|
New patch (probably will not apply to release): fwupd/fwupd#824 |
|
Closing in favour of #48519 |
Motivation for this change
Fixes #48425
Fix by @dtzWill mentioned in #47057
Things done
sandboxinnix.confon non-NixOS)nix-shell -p nox --run "nox-review wip"./result/bin/)nix path-info -Sbefore and after)