git.iko.soy/typeable/nixpkgs
on master help sign in
fwupd: 1.2.10 → 1.3.3

https://github.com/fwupd/fwupd/blob/1.3.3/data/org.freedesktop.fwupd.metainfo.xml#L35-L125 systemd.tmpfiles should not be necessary, as the systemd service switched to StateDirectory.

commit5b8998fdc469c9a203baa2d042b2b9ca0c6e1724 authorJan Tojnar <jtojnar@gmail.com> dateMon 18 Nov 2019, 18:44 (7 years ago) parent41d9212
5 files changed+87−53
nixos/modules/services/hardware/fwupd.nix+1−5 pkgs/os-specific/linux/firmware/fwupd/add-option-for-installation-sysconfdir.patch+35−31 pkgs/os-specific/linux/firmware/fwupd/default.nix+20−6 pkgs/os-specific/linux/firmware/fwupd/fix-paths.patch−11 pkgs/os-specific/linux/firmware/fwupd/no-which.patch+31
nixos/modules/services/hardware/fwupd.nix+1−5
@@ -74,7 +74,7 @@ in {
7474 default = false;
7575 description = ''
7676 Whether to enable test remote. This is used by
77− <link xlink:href="https://github.com/hughsie/fwupd/blob/master/data/installed-tests/README.md">installed tests</link>.
77+ <link xlink:href="https://github.com/fwupd/fwupd/blob/master/data/installed-tests/README.md">installed tests</link>.
7878 '';
7979 };
8080
@@ -115,10 +115,6 @@ in {
115115 services.udev.packages = [ cfg.package ];
116116
117117 systemd.packages = [ cfg.package ];
118−
119− systemd.tmpfiles.rules = [
120− "d /var/lib/fwupd 0755 root root -"
121− ];
122118 };
123119
124120 meta = {
pkgs/os-specific/linux/firmware/fwupd/add-option-for-installation-sysconfdir.patch+35−31
@@ -1,30 +1,21 @@
11diff --git a/data/meson.build b/data/meson.build
2−index 61664cd6..f10abbba 100644
2+index 25db9509..f394eb25 100644
33--- a/data/meson.build
44+++ b/data/meson.build
5−@@ -11,7 +11,7 @@ if get_option('daemon')
5+@@ -13,7 +13,7 @@
6+ if build_daemon
7+ subdir('installed-tests')
8+ install_data(['daemon.conf'],
9+- install_dir : join_paths(sysconfdir, 'fwupd')
10++ install_dir : join_paths(sysconfdir_install, 'fwupd')
11+ )
612 endif
713
8− install_data(['daemon.conf'],
9−- install_dir : join_paths(sysconfdir, 'fwupd')
10−+ install_dir : join_paths(sysconfdir_install, 'fwupd')
11− )
12−
13− install_data(['org.freedesktop.fwupd.metainfo.xml'],
14−@@ -23,7 +23,7 @@ install_data(['org.freedesktop.fwupd.svg'],
15− )
16−
17− install_data(['org.freedesktop.fwupd.conf'],
18−- install_dir : join_paths(sysconfdir, 'dbus-1', 'system.d')
19−+ install_dir : join_paths(sysconfdir_install, 'dbus-1', 'system.d')
20− )
21−
22− if get_option('daemon')
2314diff --git a/data/pki/meson.build b/data/pki/meson.build
2415index eefcc914..dc801fa1 100644
2516--- a/data/pki/meson.build
2617+++ b/data/pki/meson.build
27−@@ -4,14 +4,14 @@ if get_option('gpg')
18+@@ -4,14 +4,14 @@
2819 'GPG-KEY-Linux-Foundation-Firmware',
2920 'GPG-KEY-Linux-Vendor-Firmware-Service',
3021 ],
@@ -41,7 +32,7 @@ index eefcc914..dc801fa1 100644
4132 )
4233 endif
4334
44−@@ -19,12 +19,12 @@ if get_option('pkcs7')
35+@@ -19,12 +19,12 @@
4536 install_data([
4637 'LVFS-CA.pem',
4738 ],
@@ -57,10 +48,10 @@ index eefcc914..dc801fa1 100644
5748 endif
5849
5950diff --git a/data/remotes.d/meson.build b/data/remotes.d/meson.build
60−index a27c31ef..374e09b6 100644
51+index 826a3c1d..b78db663 100644
6152--- a/data/remotes.d/meson.build
6253+++ b/data/remotes.d/meson.build
63−@@ -3,7 +3,7 @@ if get_option('daemon') and get_option('lvfs')
54+@@ -3,7 +3,7 @@
6455 'lvfs.conf',
6556 'lvfs-testing.conf',
6657 ],
@@ -69,7 +60,7 @@ index a27c31ef..374e09b6 100644
6960 )
7061 i18n.merge_file(
7162 input: 'lvfs.metainfo.xml',
72−@@ -37,12 +37,12 @@ configure_file(
63+@@ -37,12 +37,12 @@
7364 output : 'vendor.conf',
7465 configuration : con2,
7566 install: true,
@@ -85,10 +76,10 @@ index a27c31ef..374e09b6 100644
8576+ install_dir: join_paths(sysconfdir_install, 'fwupd', 'remotes.d'),
8677 )
8778diff --git a/meson.build b/meson.build
88−index a89f9b3f..736896eb 100644
79+index 8e1de887..a5bb1fe6 100644
8980--- a/meson.build
9081+++ b/meson.build
91−@@ -145,6 +145,12 @@ localstatedir = join_paths(prefix, get_option('localstatedir'))
82+@@ -158,6 +158,12 @@
9283 mandir = join_paths(prefix, get_option('mandir'))
9384 localedir = join_paths(prefix, get_option('localedir'))
9485
@@ -99,13 +90,13 @@ index a89f9b3f..736896eb 100644
9990+endif
10091+
10192 gio = dependency('gio-2.0', version : '>= 2.45.8')
93+ giounix = dependency('gio-unix-2.0', version : '>= 2.45.8')
10294 if gio.version().version_compare ('>= 2.55.0')
103− conf.set('HAVE_GIO_2_55_0', '1')
10495diff --git a/meson_options.txt b/meson_options.txt
105−index 5d4163e8..db81fd1f 100644
96+index 71b50c6a..561c2031 100644
10697--- a/meson_options.txt
10798+++ b/meson_options.txt
108−@@ -21,6 +21,7 @@ option('plugin_modem_manager', type : 'boolean', value : false, description : 'e
99+@@ -24,6 +24,7 @@
109100 option('systemd', type : 'boolean', value : true, description : 'enable systemd support')
110101 option('systemdunitdir', type: 'string', value: '', description: 'Directory for systemd units')
111102 option('elogind', type : 'boolean', value : false, description : 'enable elogind support')
@@ -117,7 +108,7 @@ diff --git a/plugins/dell-esrt/meson.build b/plugins/dell-esrt/meson.build
117108index cb9f4555..b972d7fb 100644
118109--- a/plugins/dell-esrt/meson.build
119110+++ b/plugins/dell-esrt/meson.build
120−@@ -36,5 +36,5 @@ configure_file(
111+@@ -36,5 +36,5 @@
121112 output : 'dell-esrt.conf',
122113 configuration : con2,
123114 install: true,
@@ -128,7 +119,7 @@ diff --git a/plugins/redfish/meson.build b/plugins/redfish/meson.build
128119index 5c88504e..7706da71 100644
129120--- a/plugins/redfish/meson.build
130121+++ b/plugins/redfish/meson.build
131−@@ -26,7 +26,7 @@ shared_module('fu_plugin_redfish',
122+@@ -26,7 +26,7 @@
132123 )
133124
134125 install_data(['redfish.conf'],
@@ -137,11 +128,24 @@ index 5c88504e..7706da71 100644
137128 )
138129
139130 if get_option('tests')
131+diff --git a/plugins/thunderbolt/meson.build b/plugins/thunderbolt/meson.build
132+index 42718abf..bc815491 100644
133+--- a/plugins/thunderbolt/meson.build
134++++ b/plugins/thunderbolt/meson.build
135+@@ -46,7 +46,7 @@
136+ )
137+
138+ install_data(['thunderbolt.conf'],
139+- install_dir: join_paths(sysconfdir, 'fwupd')
140++ install_dir: join_paths(sysconfdir_install, 'fwupd')
141+ )
142+ # we use functions from 2.52 in the tests
143+ if get_option('tests') and umockdev.found() and gio.version().version_compare('>= 2.52')
140144diff --git a/plugins/uefi/meson.build b/plugins/uefi/meson.build
141−index ac9f5dd8..1ab51b5e 100644
145+index 45b18d7d..ef8e0b04 100644
142146--- a/plugins/uefi/meson.build
143147+++ b/plugins/uefi/meson.build
144−@@ -79,7 +79,7 @@ executable(
148+@@ -85,7 +85,7 @@
145149 )
146150
147151 install_data(['uefi.conf'],
pkgs/os-specific/linux/firmware/fwupd/default.nix+20−6
@@ -45,6 +45,7 @@
4545, freetype
4646, fontconfig
4747, pango
48+, tpm2-tss
4849, bubblewrap
4950, efibootmgr
5051, flashrom
@@ -79,18 +80,18 @@ let
7980
8081 # # Currently broken on Aarch64
8182 # haveFlashrom = isx86;
82− # Experimental in 1.2.10
83+ # Experimental
8384 haveFlashrom = false;
8485
8586in
8687
8788stdenv.mkDerivation rec {
8889 pname = "fwupd";
89− version = "1.2.10";
90+ version = "1.3.3";
9091
9192 src = fetchurl {
9293 url = "https://people.freedesktop.org/~hughsient/releases/fwupd-${version}.tar.xz";
93− sha256 = "0inngs7i48akm9c7fmdsf9zjif595rkaba69rl76jfwfv8r21vjb";
94+ sha256 = "0nqzqvx8nzflhb4kzvkdcv7kixb50vh6h21kpkd7pjxp942ndzql";
9495 };
9596
9697 outputs = [ "out" "lib" "dev" "devdoc" "man" "installedTests" ];
@@ -137,6 +138,7 @@ stdenv.mkDerivation rec {
137138 freetype
138139 fontconfig
139140 pango
141+ tpm2-tss
140142 efivar
141143 ] ++ stdenv.lib.optionals haveDell [
142144 libsmbios
@@ -146,6 +148,10 @@ stdenv.mkDerivation rec {
146148 ./fix-paths.patch
147149 ./add-option-for-installation-sysconfdir.patch
148150
151+ # do not require which
152+ # https://github.com/fwupd/fwupd/pull/1568
153+ ./no-which.patch
154+
149155 # installed tests are installed to different output
150156 # we also cannot have fwupd-tests.conf in $out/etc since it would form a cycle
151157 (substituteAll {
@@ -195,6 +201,7 @@ stdenv.mkDerivation rec {
195201 '';
196202
197203 mesonFlags = [
204+ "-Dgtkdoc=true"
198205 "-Dplugin_dummy=true"
199206 "-Dudevdir=lib/udev"
200207 "-Dsystemdunitdir=lib/systemd/system"
@@ -209,8 +216,8 @@ stdenv.mkDerivation rec {
209216 "-Dplugin_synaptics=false"
210217 ] ++ stdenv.lib.optionals (!haveRedfish) [
211218 "-Dplugin_redfish=false"
212− ] ++ stdenv.lib.optionals (!haveFlashrom) [
213− "-Dplugin_flashrom=false"
219+ ] ++ stdenv.lib.optionals haveFlashrom [
220+ "-Dplugin_flashrom=true"
214221 ];
215222
216223 # TODO: We need to be able to override the directory flags from meson setup hook
@@ -231,6 +238,9 @@ stdenv.mkDerivation rec {
231238 # https://github.com/NixOS/nixpkgs/pull/67625#issuecomment-525788428
232239 PKG_CONFIG_POLKIT_GOBJECT_1_ACTIONDIR = "/run/current-system/sw/share/polkit-1/actions";
233240
241+ # cannot install to systemd prefix
242+ PKG_CONFIG_SYSTEMD_SYSTEMDSYSTEMPRESETDIR = "${placeholder "out"}/lib/systemd/system-preset";
243+
234244 # TODO: wrapGAppsHook wraps efi capsule even though it is not elf
235245 dontWrapGApps = true;
236246 # so we need to wrap the executables manually
@@ -247,11 +257,15 @@ stdenv.mkDerivation rec {
247257 # /etc/fwupd/uefi.conf is created by the services.hardware.fwupd NixOS module
248258 passthru = {
249259 filesInstalledToEtc = [
260+ # "fwupd/daemon.conf" # already created by the module
261+ "fwupd/redfish.conf"
250262 "fwupd/remotes.d/dell-esrt.conf"
251263 "fwupd/remotes.d/lvfs-testing.conf"
252264 "fwupd/remotes.d/lvfs.conf"
253265 "fwupd/remotes.d/vendor.conf"
254266 "fwupd/remotes.d/vendor-directory.conf"
267+ "fwupd/thunderbolt.conf"
268+ # "fwupd/uefi.conf" # already created by the module
255269 "pki/fwupd/GPG-KEY-Hughski-Limited"
256270 "pki/fwupd/GPG-KEY-Linux-Foundation-Firmware"
257271 "pki/fwupd/GPG-KEY-Linux-Vendor-Firmware-Service"
@@ -267,7 +281,7 @@ stdenv.mkDerivation rec {
267281 };
268282
269283 meta = with stdenv.lib; {
270− homepage = https://fwupd.org/;
284+ homepage = "https://fwupd.org/";
271285 maintainers = with maintainers; [ jtojnar ];
272286 license = [ licenses.gpl2 ];
273287 platforms = platforms.linux;
pkgs/os-specific/linux/firmware/fwupd/fix-paths.patch−11
@@ -6,14 +6,3 @@ index c7a430c0..e69de29b 100644
66-install_data('README.md',
77- install_dir : join_paths(localstatedir, 'lib', 'fwupd', 'builder')
88-)
9−diff --git a/meson_post_install.sh b/meson_post_install.sh
10−index 0cbb6f41..d757a81a 100755
11−--- a/meson_post_install.sh
12−+++ b/meson_post_install.sh
13−@@ -11,6 +11,4 @@ LOCALSTATEDIR=$2
14− echo 'Updating systemd deps'
15− mkdir -p ${DESTDIR}${SYSTEMDUNITDIR}/system-update.target.wants
16− ln -sf ../fwupd-offline-update.service ${DESTDIR}${SYSTEMDUNITDIR}/system-update.target.wants/fwupd-offline-update.service
17−- echo 'Creating stateful directory'
18−- mkdir -p ${DESTDIR}${LOCALSTATEDIR}/lib/fwupd
19− #fi
pkgs/os-specific/linux/firmware/fwupd/no-which.patchnew file+31
@@ -0,0 +1,31 @@
1+--- a/plugins/uefi/efi/generate_binary.sh
2++++ b/plugins/uefi/efi/generate_binary.sh
3+@@ -1,9 +1,9 @@
4+ #!/bin/sh
5+ output=$2
6+-objcopy_cmd=$(which objcopy)
7+-genpeimg_cmd=$(which genpeimg)
8++objcopy_cmd=$(command -v objcopy)
9++genpeimg_cmd=$(command -v genpeimg)
10+
11+-$objcopy_cmd -j .text \
12++"$objcopy_cmd" -j .text \
13+ -j .sdata \
14+ -j .data \
15+ -j .dynamic \
16+@@ -11,7 +11,7 @@
17+ -j .rel \
18+ -j .rela \
19+ -j .reloc \
20+- $*
21++ "$@"
22+
23+ if [ -n "${genpeimg_cmd}" ]; then
24+ $genpeimg_cmd -d \
25+@@ -20,5 +20,5 @@
26+ +n \
27+ -d \
28+ +s \
29+- $output
30++ "$output"
31+ fi