Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pkgs/os-specific/linux/firmware/fwupd/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jtojnar Like this?

./fix-paths.patch
];

Expand Down
112 changes: 36 additions & 76 deletions pkgs/os-specific/linux/firmware/fwupd/fix-paths.patch
Original file line number Diff line number Diff line change
@@ -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 @@
Expand Down