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