fwupd: 1.2.10 → 1.3.3 (#73700)

fwupd: 1.2.10 → 1.3.3

authored by Jan Tojnar and committed by GitHub 91b02cd8 a80f1c41

+87 -53
+1 -5
nixos/modules/services/hardware/fwupd.nix
··· 74 default = false; 75 description = '' 76 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>. 78 ''; 79 }; 80 ··· 115 services.udev.packages = [ cfg.package ]; 116 117 systemd.packages = [ cfg.package ]; 118 - 119 - systemd.tmpfiles.rules = [ 120 - "d /var/lib/fwupd 0755 root root -" 121 - ]; 122 }; 123 124 meta = {
··· 74 default = false; 75 description = '' 76 Whether to enable test remote. This is used by 77 + <link xlink:href="https://github.com/fwupd/fwupd/blob/master/data/installed-tests/README.md">installed tests</link>. 78 ''; 79 }; 80 ··· 115 services.udev.packages = [ cfg.package ]; 116 117 systemd.packages = [ cfg.package ]; 118 }; 119 120 meta = {
+35 -31
pkgs/os-specific/linux/firmware/fwupd/add-option-for-installation-sysconfdir.patch
··· 1 diff --git a/data/meson.build b/data/meson.build 2 - index 61664cd6..f10abbba 100644 3 --- a/data/meson.build 4 +++ b/data/meson.build 5 - @@ -11,7 +11,7 @@ if get_option('daemon') 6 endif 7 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') 23 diff --git a/data/pki/meson.build b/data/pki/meson.build 24 index eefcc914..dc801fa1 100644 25 --- a/data/pki/meson.build 26 +++ b/data/pki/meson.build 27 - @@ -4,14 +4,14 @@ if get_option('gpg') 28 'GPG-KEY-Linux-Foundation-Firmware', 29 'GPG-KEY-Linux-Vendor-Firmware-Service', 30 ], ··· 41 ) 42 endif 43 44 - @@ -19,12 +19,12 @@ if get_option('pkcs7') 45 install_data([ 46 'LVFS-CA.pem', 47 ], ··· 57 endif 58 59 diff --git a/data/remotes.d/meson.build b/data/remotes.d/meson.build 60 - index a27c31ef..374e09b6 100644 61 --- a/data/remotes.d/meson.build 62 +++ b/data/remotes.d/meson.build 63 - @@ -3,7 +3,7 @@ if get_option('daemon') and get_option('lvfs') 64 'lvfs.conf', 65 'lvfs-testing.conf', 66 ], ··· 69 ) 70 i18n.merge_file( 71 input: 'lvfs.metainfo.xml', 72 - @@ -37,12 +37,12 @@ configure_file( 73 output : 'vendor.conf', 74 configuration : con2, 75 install: true, ··· 85 + install_dir: join_paths(sysconfdir_install, 'fwupd', 'remotes.d'), 86 ) 87 diff --git a/meson.build b/meson.build 88 - index a89f9b3f..736896eb 100644 89 --- a/meson.build 90 +++ b/meson.build 91 - @@ -145,6 +145,12 @@ localstatedir = join_paths(prefix, get_option('localstatedir')) 92 mandir = join_paths(prefix, get_option('mandir')) 93 localedir = join_paths(prefix, get_option('localedir')) 94 ··· 99 +endif 100 + 101 gio = dependency('gio-2.0', version : '>= 2.45.8') 102 if gio.version().version_compare ('>= 2.55.0') 103 - conf.set('HAVE_GIO_2_55_0', '1') 104 diff --git a/meson_options.txt b/meson_options.txt 105 - index 5d4163e8..db81fd1f 100644 106 --- a/meson_options.txt 107 +++ b/meson_options.txt 108 - @@ -21,6 +21,7 @@ option('plugin_modem_manager', type : 'boolean', value : false, description : 'e 109 option('systemd', type : 'boolean', value : true, description : 'enable systemd support') 110 option('systemdunitdir', type: 'string', value: '', description: 'Directory for systemd units') 111 option('elogind', type : 'boolean', value : false, description : 'enable elogind support') ··· 117 index cb9f4555..b972d7fb 100644 118 --- a/plugins/dell-esrt/meson.build 119 +++ b/plugins/dell-esrt/meson.build 120 - @@ -36,5 +36,5 @@ configure_file( 121 output : 'dell-esrt.conf', 122 configuration : con2, 123 install: true, ··· 128 index 5c88504e..7706da71 100644 129 --- a/plugins/redfish/meson.build 130 +++ b/plugins/redfish/meson.build 131 - @@ -26,7 +26,7 @@ shared_module('fu_plugin_redfish', 132 ) 133 134 install_data(['redfish.conf'], ··· 137 ) 138 139 if get_option('tests') 140 diff --git a/plugins/uefi/meson.build b/plugins/uefi/meson.build 141 - index ac9f5dd8..1ab51b5e 100644 142 --- a/plugins/uefi/meson.build 143 +++ b/plugins/uefi/meson.build 144 - @@ -79,7 +79,7 @@ executable( 145 ) 146 147 install_data(['uefi.conf'],
··· 1 diff --git a/data/meson.build b/data/meson.build 2 + index 25db9509..f394eb25 100644 3 --- a/data/meson.build 4 +++ b/data/meson.build 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 + ) 12 endif 13 14 diff --git a/data/pki/meson.build b/data/pki/meson.build 15 index eefcc914..dc801fa1 100644 16 --- a/data/pki/meson.build 17 +++ b/data/pki/meson.build 18 + @@ -4,14 +4,14 @@ 19 'GPG-KEY-Linux-Foundation-Firmware', 20 'GPG-KEY-Linux-Vendor-Firmware-Service', 21 ], ··· 32 ) 33 endif 34 35 + @@ -19,12 +19,12 @@ 36 install_data([ 37 'LVFS-CA.pem', 38 ], ··· 48 endif 49 50 diff --git a/data/remotes.d/meson.build b/data/remotes.d/meson.build 51 + index 826a3c1d..b78db663 100644 52 --- a/data/remotes.d/meson.build 53 +++ b/data/remotes.d/meson.build 54 + @@ -3,7 +3,7 @@ 55 'lvfs.conf', 56 'lvfs-testing.conf', 57 ], ··· 60 ) 61 i18n.merge_file( 62 input: 'lvfs.metainfo.xml', 63 + @@ -37,12 +37,12 @@ 64 output : 'vendor.conf', 65 configuration : con2, 66 install: true, ··· 76 + install_dir: join_paths(sysconfdir_install, 'fwupd', 'remotes.d'), 77 ) 78 diff --git a/meson.build b/meson.build 79 + index 8e1de887..a5bb1fe6 100644 80 --- a/meson.build 81 +++ b/meson.build 82 + @@ -158,6 +158,12 @@ 83 mandir = join_paths(prefix, get_option('mandir')) 84 localedir = join_paths(prefix, get_option('localedir')) 85 ··· 90 +endif 91 + 92 gio = dependency('gio-2.0', version : '>= 2.45.8') 93 + giounix = dependency('gio-unix-2.0', version : '>= 2.45.8') 94 if gio.version().version_compare ('>= 2.55.0') 95 diff --git a/meson_options.txt b/meson_options.txt 96 + index 71b50c6a..561c2031 100644 97 --- a/meson_options.txt 98 +++ b/meson_options.txt 99 + @@ -24,6 +24,7 @@ 100 option('systemd', type : 'boolean', value : true, description : 'enable systemd support') 101 option('systemdunitdir', type: 'string', value: '', description: 'Directory for systemd units') 102 option('elogind', type : 'boolean', value : false, description : 'enable elogind support') ··· 108 index cb9f4555..b972d7fb 100644 109 --- a/plugins/dell-esrt/meson.build 110 +++ b/plugins/dell-esrt/meson.build 111 + @@ -36,5 +36,5 @@ 112 output : 'dell-esrt.conf', 113 configuration : con2, 114 install: true, ··· 119 index 5c88504e..7706da71 100644 120 --- a/plugins/redfish/meson.build 121 +++ b/plugins/redfish/meson.build 122 + @@ -26,7 +26,7 @@ 123 ) 124 125 install_data(['redfish.conf'], ··· 128 ) 129 130 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') 144 diff --git a/plugins/uefi/meson.build b/plugins/uefi/meson.build 145 + index 45b18d7d..ef8e0b04 100644 146 --- a/plugins/uefi/meson.build 147 +++ b/plugins/uefi/meson.build 148 + @@ -85,7 +85,7 @@ 149 ) 150 151 install_data(['uefi.conf'],
+20 -6
pkgs/os-specific/linux/firmware/fwupd/default.nix
··· 45 , freetype 46 , fontconfig 47 , pango 48 , bubblewrap 49 , efibootmgr 50 , flashrom ··· 79 80 # # Currently broken on Aarch64 81 # haveFlashrom = isx86; 82 - # Experimental in 1.2.10 83 haveFlashrom = false; 84 85 in 86 87 stdenv.mkDerivation rec { 88 pname = "fwupd"; 89 - version = "1.2.10"; 90 91 src = fetchurl { 92 url = "https://people.freedesktop.org/~hughsient/releases/fwupd-${version}.tar.xz"; 93 - sha256 = "0inngs7i48akm9c7fmdsf9zjif595rkaba69rl76jfwfv8r21vjb"; 94 }; 95 96 outputs = [ "out" "lib" "dev" "devdoc" "man" "installedTests" ]; ··· 137 freetype 138 fontconfig 139 pango 140 efivar 141 ] ++ stdenv.lib.optionals haveDell [ 142 libsmbios ··· 145 patches = [ 146 ./fix-paths.patch 147 ./add-option-for-installation-sysconfdir.patch 148 149 # installed tests are installed to different output 150 # we also cannot have fwupd-tests.conf in $out/etc since it would form a cycle ··· 195 ''; 196 197 mesonFlags = [ 198 "-Dplugin_dummy=true" 199 "-Dudevdir=lib/udev" 200 "-Dsystemdunitdir=lib/systemd/system" ··· 209 "-Dplugin_synaptics=false" 210 ] ++ stdenv.lib.optionals (!haveRedfish) [ 211 "-Dplugin_redfish=false" 212 - ] ++ stdenv.lib.optionals (!haveFlashrom) [ 213 - "-Dplugin_flashrom=false" 214 ]; 215 216 # TODO: We need to be able to override the directory flags from meson setup hook ··· 230 # error: “PolicyKit files are missing” 231 # https://github.com/NixOS/nixpkgs/pull/67625#issuecomment-525788428 232 PKG_CONFIG_POLKIT_GOBJECT_1_ACTIONDIR = "/run/current-system/sw/share/polkit-1/actions"; 233 234 # TODO: wrapGAppsHook wraps efi capsule even though it is not elf 235 dontWrapGApps = true; ··· 247 # /etc/fwupd/uefi.conf is created by the services.hardware.fwupd NixOS module 248 passthru = { 249 filesInstalledToEtc = [ 250 "fwupd/remotes.d/dell-esrt.conf" 251 "fwupd/remotes.d/lvfs-testing.conf" 252 "fwupd/remotes.d/lvfs.conf" 253 "fwupd/remotes.d/vendor.conf" 254 "fwupd/remotes.d/vendor-directory.conf" 255 "pki/fwupd/GPG-KEY-Hughski-Limited" 256 "pki/fwupd/GPG-KEY-Linux-Foundation-Firmware" 257 "pki/fwupd/GPG-KEY-Linux-Vendor-Firmware-Service" ··· 267 }; 268 269 meta = with stdenv.lib; { 270 - homepage = https://fwupd.org/; 271 maintainers = with maintainers; [ jtojnar ]; 272 license = [ licenses.gpl2 ]; 273 platforms = platforms.linux;
··· 45 , freetype 46 , fontconfig 47 , pango 48 + , tpm2-tss 49 , bubblewrap 50 , efibootmgr 51 , flashrom ··· 80 81 # # Currently broken on Aarch64 82 # haveFlashrom = isx86; 83 + # Experimental 84 haveFlashrom = false; 85 86 in 87 88 stdenv.mkDerivation rec { 89 pname = "fwupd"; 90 + version = "1.3.3"; 91 92 src = fetchurl { 93 url = "https://people.freedesktop.org/~hughsient/releases/fwupd-${version}.tar.xz"; 94 + sha256 = "0nqzqvx8nzflhb4kzvkdcv7kixb50vh6h21kpkd7pjxp942ndzql"; 95 }; 96 97 outputs = [ "out" "lib" "dev" "devdoc" "man" "installedTests" ]; ··· 138 freetype 139 fontconfig 140 pango 141 + tpm2-tss 142 efivar 143 ] ++ stdenv.lib.optionals haveDell [ 144 libsmbios ··· 147 patches = [ 148 ./fix-paths.patch 149 ./add-option-for-installation-sysconfdir.patch 150 + 151 + # do not require which 152 + # https://github.com/fwupd/fwupd/pull/1568 153 + ./no-which.patch 154 155 # installed tests are installed to different output 156 # we also cannot have fwupd-tests.conf in $out/etc since it would form a cycle ··· 201 ''; 202 203 mesonFlags = [ 204 + "-Dgtkdoc=true" 205 "-Dplugin_dummy=true" 206 "-Dudevdir=lib/udev" 207 "-Dsystemdunitdir=lib/systemd/system" ··· 216 "-Dplugin_synaptics=false" 217 ] ++ stdenv.lib.optionals (!haveRedfish) [ 218 "-Dplugin_redfish=false" 219 + ] ++ stdenv.lib.optionals haveFlashrom [ 220 + "-Dplugin_flashrom=true" 221 ]; 222 223 # TODO: We need to be able to override the directory flags from meson setup hook ··· 237 # error: “PolicyKit files are missing” 238 # https://github.com/NixOS/nixpkgs/pull/67625#issuecomment-525788428 239 PKG_CONFIG_POLKIT_GOBJECT_1_ACTIONDIR = "/run/current-system/sw/share/polkit-1/actions"; 240 + 241 + # cannot install to systemd prefix 242 + PKG_CONFIG_SYSTEMD_SYSTEMDSYSTEMPRESETDIR = "${placeholder "out"}/lib/systemd/system-preset"; 243 244 # TODO: wrapGAppsHook wraps efi capsule even though it is not elf 245 dontWrapGApps = true; ··· 257 # /etc/fwupd/uefi.conf is created by the services.hardware.fwupd NixOS module 258 passthru = { 259 filesInstalledToEtc = [ 260 + # "fwupd/daemon.conf" # already created by the module 261 + "fwupd/redfish.conf" 262 "fwupd/remotes.d/dell-esrt.conf" 263 "fwupd/remotes.d/lvfs-testing.conf" 264 "fwupd/remotes.d/lvfs.conf" 265 "fwupd/remotes.d/vendor.conf" 266 "fwupd/remotes.d/vendor-directory.conf" 267 + "fwupd/thunderbolt.conf" 268 + # "fwupd/uefi.conf" # already created by the module 269 "pki/fwupd/GPG-KEY-Hughski-Limited" 270 "pki/fwupd/GPG-KEY-Linux-Foundation-Firmware" 271 "pki/fwupd/GPG-KEY-Linux-Vendor-Firmware-Service" ··· 281 }; 282 283 meta = with stdenv.lib; { 284 + homepage = "https://fwupd.org/"; 285 maintainers = with maintainers; [ jtojnar ]; 286 license = [ licenses.gpl2 ]; 287 platforms = platforms.linux;
-11
pkgs/os-specific/linux/firmware/fwupd/fix-paths.patch
··· 6 -install_data('README.md', 7 - install_dir : join_paths(localstatedir, 'lib', 'fwupd', 'builder') 8 -) 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
··· 6 -install_data('README.md', 7 - install_dir : join_paths(localstatedir, 'lib', 'fwupd', 'builder') 8 -)
+31
pkgs/os-specific/linux/firmware/fwupd/no-which.patch
···
··· 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