-
-
Notifications
You must be signed in to change notification settings - Fork 15.5k
fwupd: Fix daemon config not being found #48427
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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)
|
@@ -46,6 +46,11 @@ in stdenv.mkDerivation { | |||
|
|||
patchShebangs . | |||
substituteInPlace data/installed-tests/fwupdmgr.test.in --subst-var-by installedtestsdir "$installedTests/share/installed-tests/fwupd" | |||
|
|||
# /etc/daemon.conf | |||
substituteInPlace meson.build --replace \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
-install_data(['daemon.conf'], | |
- install_dir : join_paths(sysconfdir, 'fwupd') | |
-) | |
- | |
install_data(['org.freedesktop.fwupd.metainfo.xml'], |
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 |
@@ -36,6 +36,7 @@ in stdenv.mkDerivation { | |||
LC_ALL = "en_US.UTF-8"; # For po/make-images | |||
|
|||
patches = [ | |||
# https://github.com/hughsie/fwupd/issues/800 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jtojnar Like this?
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
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)