From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 4CwRGcAuG2DSHwAA0tVLHw (envelope-from ) for ; Wed, 03 Feb 2021 23:16:16 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id cAfYFMAuG2A2XgAA1q6Kng (envelope-from ) for ; Wed, 03 Feb 2021 23:16:16 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 8E973940481 for ; Wed, 3 Feb 2021 23:16:15 +0000 (UTC) Received: from localhost ([::1]:59662 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l7RNe-0000VC-H1 for larch@yhetil.org; Wed, 03 Feb 2021 18:16:14 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41600) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l7RNT-0000Uq-Ly for guix-patches@gnu.org; Wed, 03 Feb 2021 18:16:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:55835) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l7RNT-0000sG-E0 for guix-patches@gnu.org; Wed, 03 Feb 2021 18:16:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l7RNT-0007WL-A6 for guix-patches@gnu.org; Wed, 03 Feb 2021 18:16:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#46278] [PATCH 2/2] gnu: Add fwupd. Resent-From: =?UTF-8?Q?L=C3=A9o?= Le Bouter Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 03 Feb 2021 23:16:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 46278 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 46278@debbugs.gnu.org Cc: =?UTF-8?Q?L=C3=A9o?= Le Bouter X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.161239411228814 (code B ref -1); Wed, 03 Feb 2021 23:16:03 +0000 Received: (at submit) by debbugs.gnu.org; 3 Feb 2021 23:15:12 +0000 Received: from localhost ([127.0.0.1]:39144 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l7RMb-0007UZ-9w for submit@debbugs.gnu.org; Wed, 03 Feb 2021 18:15:12 -0500 Received: from lists.gnu.org ([209.51.188.17]:53760) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l7RMU-0007U2-Tq for submit@debbugs.gnu.org; Wed, 03 Feb 2021 18:15:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41296) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l7RMU-0000IK-OO for guix-patches@gnu.org; Wed, 03 Feb 2021 18:15:02 -0500 Received: from mail.zaclys.net ([178.33.93.72]:43509) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l7RMK-0000Ut-If for guix-patches@gnu.org; Wed, 03 Feb 2021 18:15:02 -0500 Received: from localhost.localdomain (lam21-1_migr-78-196-200-185.fbx.proxad.net [78.196.200.185] (may be forged)) (authenticated bits=0) by mail.zaclys.net (8.14.7/8.14.7) with ESMTP id 113NEZcu058902 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Thu, 4 Feb 2021 00:14:49 +0100 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.zaclys.net 113NEZcu058902 Authentication-Results: mail.zaclys.net; spf=fail smtp.mailfrom=lle-bout@zaclys.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zaclys.net; s=default; t=1612394089; bh=cw+tzYDzuZHMk4xjYF50v86mMLBOvr2YKskdPtblBZM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fX4/0SVtDQLhaCWNfxUSeTeyl8gNigLCoA3J9W+gib994cMb3xonO+ZKCLhvFPsLQ v4KVDxGPbsyMf+mB4ujRqLQXDqGIgxrBVQ90d+7p0yDVKFwq47wBz9xduCkGZChC5G MPnBSBuSqAhxZ0+WFG7eJ8f47TLVlDU9k0Doi+CM= Date: Thu, 4 Feb 2021 00:14:19 +0100 Message-Id: <20210203231419.26724-3-lle-bout@zaclys.net> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210203231419.26724-1-lle-bout@zaclys.net> References: <20210203231419.26724-1-lle-bout@zaclys.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=178.33.93.72; envelope-from=lle-bout@zaclys.net; helo=mail.zaclys.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" Reply-to: =?UTF-8?Q?L=C3=A9o?= Le Bouter X-ACL-Warn: , =?UTF-8?Q?L=C3=A9o?= Le Bouter via Guix-patches From: guix-patches--- via X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -2.86 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=zaclys.net header.s=default header.b="fX4/0SVt"; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 8E973940481 X-Spam-Score: -2.86 X-Migadu-Scanner: scn0.migadu.com X-TUID: wPg3gj4mO+qP * gnu/packages/firmware.scm (fwupd): New variable. * gnu/packages/patches/fwupd-add-option-for-installation-sysconfdir.patch, gnu/packages/patches/fwupd-do-not-write-to-var.patch, gnu/packages/patches/fwupd-installed-tests-path.patch, gnu/packages/patches/fwupd-remove-nonfree-lvfs-repo.patch: New patches. * gnu/local.mk (dist_patch_DATA): Register them. --- gnu/local.mk | 5 + gnu/packages/firmware.scm | 120 ++++++++++++- ...d-option-for-installation-sysconfdir.patch | 161 ++++++++++++++++++ .../patches/fwupd-do-not-write-to-var.patch | 8 + .../patches/fwupd-installed-tests-path.patch | 48 ++++++ .../fwupd-remove-nonfree-lvfs-repo.patch | 147 ++++++++++++++++ 6 files changed, 488 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/fwupd-add-option-for-installation-sysconfdir.patch create mode 100644 gnu/packages/patches/fwupd-do-not-write-to-var.patch create mode 100644 gnu/packages/patches/fwupd-installed-tests-path.patch create mode 100644 gnu/packages/patches/fwupd-remove-nonfree-lvfs-repo.patch diff --git a/gnu/local.mk b/gnu/local.mk index 5ef82650c7..3c0e313d2a 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1002,6 +1002,10 @@ dist_patch_DATA = \ %D%/packages/patches/freedink-engine-fix-sdl-hints.patch \ %D%/packages/patches/freeimage-unbundle.patch \ %D%/packages/patches/fuse-overlapping-headers.patch \ + %D%/packages/patches/fwupd-add-option-for-installation-sysconfdir.patch \ + %D%/packages/patches/fwupd-do-not-write-to-var.patch \ + %D%/packages/patches/fwupd-installed-tests-path.patch \ + %D%/packages/patches/fwupd-remove-nonfree-lvfs-repo.patch \ %D%/packages/patches/gajim-honour-GAJIM_PLUGIN_PATH.patch \ %D%/packages/patches/ganeti-deterministic-manual.patch \ %D%/packages/patches/ganeti-disable-version-symlinks.patch \ @@ -1760,5 +1764,6 @@ dist_patch_DATA = \ %D%/packages/patches/yggdrasil-extra-config.patch \ %D%/packages/patches/zziplib-CVE-2018-16548.patch + MISC_DISTRO_FILES = \ %D%/packages/ld-wrapper.in diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm index fcdb5a801e..30afda1796 100644 --- a/gnu/packages/firmware.scm +++ b/gnu/packages/firmware.scm @@ -30,18 +30,46 @@ #:use-module (guix utils) #:use-module (guix git-download) #:use-module (guix build-system gnu) + #:use-module (guix build-system meson) #:use-module (gnu packages) #:use-module (gnu packages admin) #:use-module (gnu packages assembly) + #:use-module (gnu packages autotools) + #:use-module (gnu packages backup) #:use-module (gnu packages base) #:use-module (gnu packages bison) + #:use-module (gnu packages check) #:use-module (gnu packages cmake) + #:use-module (gnu packages compression) #:use-module (gnu packages cross-base) + #:use-module (gnu packages curl) + #:use-module (gnu packages efi) + #:use-module (gnu packages elf) #:use-module (gnu packages flex) #:use-module (gnu packages gcc) + #:use-module (gnu packages gettext) + #:use-module (gnu packages glib) + #:use-module (gnu packages gnome) + #:use-module (gnu packages gnupg) + #:use-module (gnu packages gtk) + #:use-module (gnu packages hardware) #:use-module (gnu packages linux) + #:use-module (gnu packages linux) + #:use-module (gnu packages man) + #:use-module (gnu packages mingw) + #:use-module (gnu packages package-management) + #:use-module (gnu packages perl) #:use-module (gnu packages perl) - #:use-module (gnu packages python)) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages polkit) + #:use-module (gnu packages python) + #:use-module (gnu packages python) + #:use-module (gnu packages python-xyz) + #:use-module (gnu packages sqlite) + #:use-module (gnu packages tls) + #:use-module (gnu packages version-control) + #:use-module (gnu packages web) + #:use-module (gnu packages xml)) (define-public ath9k-htc-firmware (package @@ -621,3 +649,93 @@ switching support).\n") #t))))) (native-inputs `(("cross-gcc" ,(cross-gcc "arm-none-eabi" #:xgcc gcc-7)) ("cross-binutils" ,(cross-binutils "arm-none-eabi")))))) + +(define-public fwupd + (package + (name "fwupd") + (version "1.5.5") + (source + (origin + (method git-fetch) + (uri + (git-reference + (url "https://github.com/fwupd/fwupd") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0hrxp3hl1sm0gb1200qwyb330pknxicf5p0x5vgdv8ha4jf9zygc")) + (patches (search-patches + "fwupd-do-not-write-to-var.patch" + "fwupd-add-option-for-installation-sysconfdir.patch" + "fwupd-installed-tests-path.patch" + "fwupd-remove-nonfree-lvfs-repo.patch")))) + (build-system meson-build-system) + (outputs (list "out" "installed-tests")) + (arguments + `(#:configure-flags + (list "--wrap-mode=nofallback" + "-Dsystemd=false" + (string-append + "-Defi-libdir=" (assoc-ref %build-inputs "gnu-efi") "/lib") + (string-append + "-Defi-ldsdir=" (assoc-ref %build-inputs "gnu-efi") "/lib") + (string-append + "-Defi-includedir=" (assoc-ref %build-inputs "gnu-efi") + "/include/efi") + (string-append + "-Dudevdir=" (assoc-ref %outputs "out") "/lib/udev") + "--localstatedir=/var" + "--sysconfdir=/etc" + (string-append + "-Dsysconfdir_install=" (assoc-ref %outputs "out") "/etc") + (string-append + "--libexecdir=" (assoc-ref %outputs "out") "/libexec") + "-Dsupported_build=true" + (string-append + "-Dinstalled_test_prefix=" + (assoc-ref %outputs "installed-tests"))) + #:phases + (modify-phases %standard-phases + (add-before 'install 'no-polkit-magic + ;; Meson ‘magically’ invokes pkexec, which fails (not setuid). + (lambda _ + (setenv "PKEXEC_UID" "something") + #t))))) + (native-inputs + `(("gobject-introspection" ,gobject-introspection) + ("python-pygobject" ,python-pygobject) + ("python-pillow" ,python-pillow) + ("python-pycairo" ,python-pycairo) + ("pkg-config" ,pkg-config) + ("vala" ,vala) + ("umockdev" ,umockdev) + ("glib:bin" ,glib "bin") + ("help2man" ,help2man) + ("gettext" ,gettext-minimal))) + (inputs + `(("glib" ,glib) + ("libgudev" ,libgudev) + ("libxmlb" ,libxmlb) + ("gusb" ,gusb) + ("sqlite" ,sqlite) + ("libarchive" ,libarchive) + ("libjcat" ,libjcat) + ("json-glib" ,json-glib) + ("curl" ,curl) + ("polkit" ,polkit) + ("eudev" ,eudev) + ("gcab" ,gcab) + ("gnutls" ,gnutls) + ("libelf" ,libelf) + ("tpm2-tss" ,tpm2-tss) + ("cairo" ,cairo) + ("efivar" ,efivar) + ("pango" ,pango) + ("mingw-w64-tools", mingw-w64-tools) + ("libsmbios" ,libsmbios) + ("gnu-efi" ,gnu-efi))) + (home-page "https://fwupd.org/") + (synopsis "A simple daemon to allow session software to update firmware") + (description "This package aims to make updating firmware on Linux +automatic, safe and reliable.") + (license license:lgpl2.1+))) diff --git a/gnu/packages/patches/fwupd-add-option-for-installation-sysconfdir.patch b/gnu/packages/patches/fwupd-add-option-for-installation-sysconfdir.patch new file mode 100644 index 0000000000..0cb397ca47 --- /dev/null +++ b/gnu/packages/patches/fwupd-add-option-for-installation-sysconfdir.patch @@ -0,0 +1,161 @@ +diff --git a/data/meson.build b/data/meson.build +index 50154569..f8058a8e 100644 +--- a/data/meson.build ++++ b/data/meson.build +@@ -17,7 +17,7 @@ endif + + if build_standalone + install_data(['daemon.conf'], +- install_dir : join_paths(sysconfdir, 'fwupd') ++ install_dir : join_paths(sysconfdir_install, 'fwupd') + ) + endif + +diff --git a/data/pki/meson.build b/data/pki/meson.build +index 94bb0b6f..1ea6a9ac 100644 +--- a/data/pki/meson.build ++++ b/data/pki/meson.build +@@ -3,24 +3,23 @@ install_data([ + 'GPG-KEY-Linux-Foundation-Firmware', + 'GPG-KEY-Linux-Vendor-Firmware-Service', + ], +- install_dir : join_paths(sysconfdir, 'pki', 'fwupd') ++ install_dir : join_paths(sysconfdir_install, 'pki', 'fwupd') + ) + + 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(sysconfdir_install, 'pki', 'fwupd-metadata') + ) + + install_data([ + 'LVFS-CA.pem', + ], +- install_dir : join_paths(sysconfdir, 'pki', 'fwupd') ++ install_dir : join_paths(sysconfdir_install, 'pki', 'fwupd') + ) + install_data([ + 'LVFS-CA.pem', + ], +- install_dir : join_paths(sysconfdir, 'pki', 'fwupd-metadata') ++ install_dir : join_paths(sysconfdir_install, 'pki', 'fwupd-metadata') + ) +- +diff --git a/data/remotes.d/meson.build b/data/remotes.d/meson.build +index 826a3c1d..b78db663 100644 +--- a/data/remotes.d/meson.build ++++ b/data/remotes.d/meson.build +@@ -3,7 +3,7 @@ if build_daemon and get_option('lvfs') + 'lvfs.conf', + 'lvfs-testing.conf', + ], +- install_dir : join_paths(sysconfdir, 'fwupd', 'remotes.d') ++ install_dir : join_paths(sysconfdir_install, 'fwupd', 'remotes.d') + ) + i18n.merge_file( + input: 'lvfs.metainfo.xml', +@@ -37,12 +37,12 @@ configure_file( + output : 'vendor.conf', + configuration : con2, + install: true, +- install_dir: join_paths(sysconfdir, 'fwupd', 'remotes.d'), ++ install_dir: join_paths(sysconfdir_install, 'fwupd', 'remotes.d'), + ) + configure_file( + input : 'vendor-directory.conf', + output : 'vendor-directory.conf', + configuration : con2, + install: true, +- install_dir: join_paths(sysconfdir, 'fwupd', 'remotes.d'), ++ install_dir: join_paths(sysconfdir_install, 'fwupd', 'remotes.d'), + ) +diff --git a/meson.build b/meson.build +index 1ab6519b..0f2fcea6 100644 +--- a/meson.build ++++ b/meson.build +@@ -196,6 +196,12 @@ endif + mandir = join_paths(prefix, get_option('mandir')) + localedir = join_paths(prefix, get_option('localedir')) + ++if get_option('sysconfdir_install') != '' ++ sysconfdir_install = join_paths(prefix, get_option('sysconfdir_install')) ++else ++ sysconfdir_install = sysconfdir ++endif ++ + diffcmd = find_program('diff') + gio = dependency('gio-2.0', version : '>= 2.45.8') + giounix = dependency('gio-unix-2.0', version : '>= 2.45.8', required: false) +diff --git a/meson_options.txt b/meson_options.txt +index 87e76870..16cb876c 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -1,3 +1,4 @@ ++option('sysconfdir_install', type: 'string', value: '', description: 'sysconfdir to use during installation') + option('build', type : 'combo', choices : ['all', 'standalone', 'library'], value : 'all', description : 'build type') + option('agent', type : 'boolean', value : true, description : 'enable the fwupd agent') + option('consolekit', type : 'boolean', value : true, description : 'enable ConsoleKit support') +diff --git a/plugins/dell-esrt/meson.build b/plugins/dell-esrt/meson.build +index ed4eee70..76dbdb1d 100644 +--- a/plugins/dell-esrt/meson.build ++++ b/plugins/dell-esrt/meson.build +@@ -37,5 +37,5 @@ configure_file( + output : 'dell-esrt.conf', + configuration : con2, + install: true, +- install_dir: join_paths(sysconfdir, 'fwupd', 'remotes.d'), ++ install_dir: join_paths(sysconfdir_install, 'fwupd', 'remotes.d'), + ) +diff --git a/plugins/redfish/meson.build b/plugins/redfish/meson.build +index 205d1394..3223f404 100644 +--- a/plugins/redfish/meson.build ++++ b/plugins/redfish/meson.build +@@ -27,7 +27,7 @@ shared_module('fu_plugin_redfish', + ) + + install_data(['redfish.conf'], +- install_dir: join_paths(sysconfdir, 'fwupd') ++ install_dir: join_paths(sysconfdir_install, 'fwupd') + ) + + if get_option('tests') +diff --git a/plugins/thunderbolt/meson.build b/plugins/thunderbolt/meson.build +index 6b2368fb..2bd06fed 100644 +--- a/plugins/thunderbolt/meson.build ++++ b/plugins/thunderbolt/meson.build +@@ -31,7 +31,7 @@ fu_plugin_thunderbolt = shared_module('fu_plugin_thunderbolt', + ) + + install_data(['thunderbolt.conf'], +- install_dir: join_paths(sysconfdir, 'fwupd') ++ install_dir: join_paths(sysconfdir_install, 'fwupd') + ) + # we use functions from 2.52 in the tests + if get_option('tests') and umockdev.found() and gio.version().version_compare('>= 2.52') +diff --git a/plugins/uefi-capsule/meson.build b/plugins/uefi-capsule/meson.build +index 675de181..a02c7754 100644 +--- a/plugins/uefi-capsule/meson.build ++++ b/plugins/uefi-capsule/meson.build +@@ -94,7 +94,7 @@ if get_option('man') + endif + + install_data(['uefi_capsule.conf'], +- install_dir: join_paths(sysconfdir, 'fwupd') ++ install_dir: join_paths(sysconfdir_install, 'fwupd') + ) + + # add all the .po files as inputs to watch +diff --git a/plugins/upower/meson.build b/plugins/upower/meson.build +index 290a3eb6..9ab2f452 100644 +--- a/plugins/upower/meson.build ++++ b/plugins/upower/meson.build +@@ -23,5 +23,5 @@ shared_module('fu_plugin_upower', + ) + + install_data(['upower.conf'], +- install_dir: join_paths(sysconfdir, 'fwupd') ++ install_dir: join_paths(sysconfdir_install, 'fwupd') + ) diff --git a/gnu/packages/patches/fwupd-do-not-write-to-var.patch b/gnu/packages/patches/fwupd-do-not-write-to-var.patch new file mode 100644 index 0000000000..474b250097 --- /dev/null +++ b/gnu/packages/patches/fwupd-do-not-write-to-var.patch @@ -0,0 +1,8 @@ +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') +-) diff --git a/gnu/packages/patches/fwupd-installed-tests-path.patch b/gnu/packages/patches/fwupd-installed-tests-path.patch new file mode 100644 index 0000000000..d8f1a533b8 --- /dev/null +++ b/gnu/packages/patches/fwupd-installed-tests-path.patch @@ -0,0 +1,48 @@ +diff --git a/data/device-tests/hardware.py b/data/device-tests/hardware.py +index 7f1e1907..10fee1b8 100755 +--- a/data/device-tests/hardware.py ++++ b/data/device-tests/hardware.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/python3 ++#!@installedTestsPython@/bin/python3 + # pylint: disable=wrong-import-position,too-many-locals,unused-argument,wrong-import-order + # + # Copyright (C) 2017 Richard Hughes +diff --git a/data/installed-tests/meson.build b/data/installed-tests/meson.build +index adadbcdd..1b51bb9c 100644 +--- a/data/installed-tests/meson.build ++++ b/data/installed-tests/meson.build +@@ -65,5 +65,5 @@ configure_file( + output : 'fwupd-tests.conf', + configuration : con2, + install: true, +- install_dir: join_paths(sysconfdir, 'fwupd', 'remotes.d'), ++ install_dir: join_paths(get_option('installed_test_prefix'), 'etc', 'fwupd', 'remotes.d'), + ) +diff --git a/meson.build b/meson.build +index 772b7bbe..f59302cd 100644 +--- a/meson.build ++++ b/meson.build +@@ -177,8 +177,8 @@ else + datadir = join_paths(prefix, get_option('datadir')) + sysconfdir = join_paths(prefix, get_option('sysconfdir')) + localstatedir = join_paths(prefix, get_option('localstatedir')) +- installed_test_bindir = join_paths(libexecdir, 'installed-tests', meson.project_name()) +- installed_test_datadir = join_paths(datadir, 'installed-tests', meson.project_name()) ++ installed_test_bindir = join_paths(get_option('installed_test_prefix'), 'libexec', 'installed-tests', meson.project_name()) ++ installed_test_datadir = join_paths(get_option('installed_test_prefix'), 'share', 'installed-tests', meson.project_name()) + endif + mandir = join_paths(prefix, get_option('mandir')) + localedir = join_paths(prefix, get_option('localedir')) +diff --git a/meson_options.txt b/meson_options.txt +index 0a0e2853..5f68d78b 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -25,6 +26,7 @@ option('plugin_coreboot', type : 'boolean', value : true, description : 'enable + option('systemd', type : 'boolean', value : true, description : 'enable systemd support') + option('systemd_root_prefix', type: 'string', value: '', description: 'Directory to base systemd’s installation directories on') + option('elogind', type : 'boolean', value : false, description : 'enable elogind support') ++option('installed_test_prefix', type: 'string', description: 'Prefix for installed tests') + option('tests', type : 'boolean', value : true, description : 'enable tests') + option('tpm', type : 'boolean', value : true, description : 'enable TPM support') + option('udevdir', type: 'string', value: '', description: 'Directory for udev rules') diff --git a/gnu/packages/patches/fwupd-remove-nonfree-lvfs-repo.patch b/gnu/packages/patches/fwupd-remove-nonfree-lvfs-repo.patch new file mode 100644 index 0000000000..3efe523703 --- /dev/null +++ b/gnu/packages/patches/fwupd-remove-nonfree-lvfs-repo.patch @@ -0,0 +1,147 @@ +diff --git a/data/remotes.d/lvfs-testing.conf b/data/remotes.d/lvfs-testing.conf +deleted file mode 100644 +index 740a793e..00000000 +--- a/data/remotes.d/lvfs-testing.conf ++++ /dev/null +@@ -1,12 +0,0 @@ +-[fwupd Remote] +- +-# this remote provides metadata and firmware marked as 'testing' from the LVFS +-Enabled=false +-Title=Linux Vendor Firmware Service (testing) +-MetadataURI=https://cdn.fwupd.org/downloads/firmware-testing.xml.gz +-ReportURI=https://fwupd.org/lvfs/firmware/report +-Username= +-Password= +-OrderBefore=lvfs,fwupd +-AutomaticReports=false +-ApprovalRequired=false +diff --git a/data/remotes.d/lvfs-testing.metainfo.xml b/data/remotes.d/lvfs-testing.metainfo.xml +deleted file mode 100644 +index 3e36aab7..00000000 +--- a/data/remotes.d/lvfs-testing.metainfo.xml ++++ /dev/null +@@ -1,35 +0,0 @@ +- +- +- +- +- org.freedesktop.fwupd.remotes.lvfs-testing +- Linux Vendor Firmware Service (testing firmware) +- CC0-1.0 +- +- +- +- +-

+- The LVFS is a free service that operates as an independent legal +- entity and has no connection with $OS_RELEASE:NAME$. +- Your distributor may not have verified any of the firmware updates for +- compatibility with your system or connected devices. +- All firmware is provided only by the original equipment manufacturer. +-

+-

+- This remote contains firmware which is not embargoed, but is still being +- tested by the hardware vendor. +- You should ensure you have a way to manually downgrade the firmware if +- the firmware update fails. +-

+-

+- Enabling this functionality is done at your own risk, which means you +- have to contact your original equipment manufacturer regarding any +- problems caused by these updates. +- Only problems with the update process itself should be filed at +- $OS_RELEASE:BUG_REPORT_URL$. +-

+-
+-
+-
+-
+diff --git a/data/remotes.d/lvfs.conf b/data/remotes.d/lvfs.conf +deleted file mode 100644 +index f956bc97..00000000 +--- a/data/remotes.d/lvfs.conf ++++ /dev/null +@@ -1,12 +0,0 @@ +-[fwupd Remote] +- +-# this remote provides metadata and firmware marked as 'stable' from the LVFS +-Enabled=true +-Title=Linux Vendor Firmware Service +-MetadataURI=https://cdn.fwupd.org/downloads/firmware.xml.gz +-ReportURI=https://fwupd.org/lvfs/firmware/report +-SecurityReportURI=https://fwupd.org/lvfs/hsireports/upload +-OrderBefore=fwupd +-AutomaticReports=false +-AutomaticSecurityReports=false +-ApprovalRequired=false +diff --git a/data/remotes.d/lvfs.metainfo.xml b/data/remotes.d/lvfs.metainfo.xml +deleted file mode 100644 +index d9565ddd..00000000 +--- a/data/remotes.d/lvfs.metainfo.xml ++++ /dev/null +@@ -1,29 +0,0 @@ +- +- +- +- +- org.freedesktop.fwupd.remotes.lvfs +- Linux Vendor Firmware Service (stable firmware) +- CC0-1.0 +- +- +- +- +-

+- The LVFS is a free service that operates as an independent legal +- entity and has no connection with $OS_RELEASE:NAME$. +- Your distributor may not have verified any of the firmware updates for +- compatibility with your system or connected devices. +- All firmware is provided only by the original equipment manufacturer. +-

+-

+- Enabling this functionality is done at your own risk, which means you +- have to contact your original equipment manufacturer regarding any +- problems caused by these updates. +- Only problems with the update process itself should be filed at +- $OS_RELEASE:BUG_REPORT_URL$. +-

+-
+-
+-
+-
+diff --git a/data/remotes.d/meson.build b/data/remotes.d/meson.build +index 826a3c1d..1f585c09 100644 +--- a/data/remotes.d/meson.build ++++ b/data/remotes.d/meson.build +@@ -1,30 +1,3 @@ +-if build_daemon and get_option('lvfs') +- install_data([ +- 'lvfs.conf', +- 'lvfs-testing.conf', +- ], +- install_dir : join_paths(sysconfdir, 'fwupd', 'remotes.d') +- ) +- i18n.merge_file( +- input: 'lvfs.metainfo.xml', +- output: 'org.freedesktop.fwupd.remotes.lvfs.metainfo.xml', +- type: 'xml', +- po_dir: join_paths(meson.source_root(), 'po'), +- data_dirs: join_paths(meson.source_root(), 'po'), +- install: true, +- install_dir: join_paths(get_option('datadir'), 'fwupd', 'metainfo') +- ) +- i18n.merge_file( +- input: 'lvfs-testing.metainfo.xml', +- output: 'org.freedesktop.fwupd.remotes.lvfs-testing.metainfo.xml', +- type: 'xml', +- po_dir: join_paths(meson.source_root(), 'po'), +- data_dirs: join_paths(meson.source_root(), 'po'), +- install: true, +- install_dir: join_paths(get_option('datadir'), 'fwupd', 'metainfo') +- ) +-endif +- + install_data('README.md', + install_dir : join_paths(datadir, 'fwupd', 'remotes.d', 'vendor', 'firmware') + ) -- 2.30.0