Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package fwupd-efi for openSUSE:Factory checked in at 2022-03-18 16:41:21 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/fwupd-efi (Old) and /work/SRC/openSUSE:Factory/.fwupd-efi.new.25692 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "fwupd-efi" Fri Mar 18 16:41:21 2022 rev:3 rq:962031 version:1.2 Changes: -------- --- /work/SRC/openSUSE:Factory/fwupd-efi/fwupd-efi.changes 2022-01-11 00:01:37.821226493 +0100 +++ /work/SRC/openSUSE:Factory/.fwupd-efi.new.25692/fwupd-efi.changes 2022-03-18 16:41:22.737148800 +0100 @@ -1,0 +2,21 @@ +Fri Mar 11 14:44:21 UTC 2022 - Frederic Crozat <fcro...@suse.com> + +- Update to version 1.2: + * Release fwupd-efi 1.2 + * meson: use stadard objcopy binary + * meson: use find_program() to find the helper scripts we run + * meson: using local copy ldscript when local copy crt0 be used for SBAT + * sbat: clarify project URL + * trivial: Ignore some markdown issues + * Wait 5 seconds to reboot on errors + * Port pre-commit clang-format, codespell, markdownlint from fwupd + * trivial: fixup python errors by codacity/precommit + * trivial: fixup markdown format + * trivial: spelling errors + * Sleep longer when no updates to process + * README: fix typo and URL + * trivial: post release version bump +- Remove 0001-meson-using-local-copy-ldscript-when-local-copy-crt0.patch + (merged upstream) + +------------------------------------------------------------------- Old: ---- 0001-meson-using-local-copy-ldscript-when-local-copy-crt0.patch fwupd-efi-1.1.tar.xz New: ---- fwupd-efi-1.2.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ fwupd-efi.spec ++++++ --- /var/tmp/diff_new_pack.Mq4Q1p/_old 2022-03-18 16:41:23.373149256 +0100 +++ /var/tmp/diff_new_pack.Mq4Q1p/_new 2022-03-18 16:41:23.377149259 +0100 @@ -1,7 +1,7 @@ # # spec file for package fwupd-efi # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,8 +16,9 @@ # # needssslcertforbuild + Name: fwupd-efi -Version: 1.1 +Version: 1.2 Release: 0 Summary: Firmware update EFI binaries License: GPL-2.0-or-later AND LGPL-2.1-or-later @@ -26,11 +27,10 @@ # Do not use upstream tarball, we are using source service! Source: %{name}-%{version}.tar.xz -Patch1: 0001-meson-using-local-copy-ldscript-when-local-copy-crt0.patch -BuildRequires: meson >= 0.47.0 -BuildRequires: pkgconfig BuildRequires: gnu-efi +BuildRequires: meson >= 0.47.0 BuildRequires: pesign-obs-integration +BuildRequires: pkgconfig BuildRequires: pkgconfig(efiboot) BuildRequires: pkgconfig(efivar) >= 33 Requires: shim >= 11 ++++++ _service ++++++ --- /var/tmp/diff_new_pack.Mq4Q1p/_old 2022-03-18 16:41:23.417149287 +0100 +++ /var/tmp/diff_new_pack.Mq4Q1p/_new 2022-03-18 16:41:23.421149290 +0100 @@ -4,7 +4,7 @@ <param name="scm">git</param> <param name="versionformat">@PARENT_TAG@</param> <param name="changesgenerate">enable</param> - <param name="revision">1.1</param> + <param name="revision">1.2</param> </service> <service name="recompress" mode="disabled"> <param name="file">*.tar</param> ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.Mq4Q1p/_old 2022-03-18 16:41:23.441149304 +0100 +++ /var/tmp/diff_new_pack.Mq4Q1p/_new 2022-03-18 16:41:23.445149307 +0100 @@ -1,5 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/fwupd/fwupd-efi.git</param> - <param name="changesrevision">fee1b8f6473cb403b8ae7a56961ba0557e3f3efa</param></service></servicedata> + <param name="changesrevision">8de5918507dcc797e612aac688d6b60b90053f54</param></service></servicedata> +(No newline at EOF) ++++++ fwupd-efi-1.1.tar.xz -> fwupd-efi-1.2.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fwupd-efi-1.1/.clang-format new/fwupd-efi-1.2/.clang-format --- old/fwupd-efi-1.1/.clang-format 1970-01-01 01:00:00.000000000 +0100 +++ new/fwupd-efi-1.2/.clang-format 2022-01-23 18:52:39.000000000 +0100 @@ -0,0 +1,50 @@ +--- +AlignAfterOpenBracket: 'Align' +AlignConsecutiveAssignments: 'false' +AlignConsecutiveDeclarations: 'false' +AlignConsecutiveMacros: 'true' +AlignOperands: 'true' +AlignTrailingComments: 'true' +AllowAllArgumentsOnNextLine: 'false' +AllowAllParametersOfDeclarationOnNextLine: 'false' +AllowShortBlocksOnASingleLine: 'false' +AllowShortCaseLabelsOnASingleLine: 'false' +AllowShortFunctionsOnASingleLine: 'Inline' +AllowShortIfStatementsOnASingleLine: 'false' +AlwaysBreakAfterReturnType: 'All' +BinPackParameters: 'false' +BinPackArguments: 'false' +BreakBeforeBraces: 'Linux' +ColumnLimit: '100' +DerivePointerAlignment: 'false' +IndentCaseLabels: 'false' +IndentWidth: '8' +IncludeBlocks: 'Regroup' +KeepEmptyLinesAtTheStartOfBlocks: 'false' +Language: 'Cpp' +MaxEmptyLinesToKeep: '1' +PointerAlignment: 'Right' +SortIncludes: 'true' +SpaceAfterCStyleCast: 'false' +SpaceBeforeAssignmentOperators : 'true' +SpaceBeforeParens: 'ControlStatements' +SpaceInEmptyParentheses: 'false' +SpacesInSquareBrackets: 'false' +TabWidth: '8' +UseTab: 'Always' + +PenaltyBreakAssignment: '3' +PenaltyBreakBeforeFirstCallParameter: '15' + +IncludeCategories: + - Regex: '^"config.h"$' + Priority: '0' + - Regex: '<fwupdplugin.h>' + Priority: '1' + - Regex: '^<' + Priority: '2' + - Regex: 'fwupd' + Priority: '3' + - Regex: '.*' + Priority: '4' +... diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fwupd-efi-1.1/.github/workflows/main.yml new/fwupd-efi-1.2/.github/workflows/main.yml --- old/fwupd-efi-1.1/.github/workflows/main.yml 2021-06-19 15:29:03.000000000 +0200 +++ new/fwupd-efi-1.2/.github/workflows/main.yml 2022-01-23 18:52:39.000000000 +0100 @@ -18,7 +18,7 @@ run: | ./contrib/setup source venv/bin/activate - sed -i "/no-commit-to-branch/d; /args: [--branch, main]/d" .pre-commit-config.yaml + sed -i "/no-commit-to-branch/,+1d" .pre-commit-config.yaml pre-commit run --all-files build: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fwupd-efi-1.1/.markdownlint.json new/fwupd-efi-1.2/.markdownlint.json --- old/fwupd-efi-1.1/.markdownlint.json 1970-01-01 01:00:00.000000000 +0100 +++ new/fwupd-efi-1.2/.markdownlint.json 2022-01-23 18:52:39.000000000 +0100 @@ -0,0 +1,7 @@ +{ + "default": true, + "MD013": { + "tables": false, + "line_length": 1000 + } +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fwupd-efi-1.1/.pre-commit-config.yaml new/fwupd-efi-1.2/.pre-commit-config.yaml --- old/fwupd-efi-1.1/.pre-commit-config.yaml 2021-06-19 15:29:03.000000000 +0200 +++ new/fwupd-efi-1.2/.pre-commit-config.yaml 2022-01-23 18:52:39.000000000 +0100 @@ -20,8 +20,13 @@ - id: check-merge-conflict - id: mixed-line-ending args: [--fix=lf] +- repo: https://github.com/codespell-project/codespell + rev: v2.1.0 + hooks: + - id: codespell + args: ['--config', './contrib/codespell.cfg', --write-changes] - repo: https://github.com/ambv/black - rev: 20.8b1 + rev: 21.6b0 hooks: - id: black - repo: local @@ -31,3 +36,13 @@ language: system entry: shellcheck --severity=error -e SC2068 types: [shell] + - id: clang-format + name: clang-format + language: script + entry: ./contrib/reformat-code.py + types: [c] +- repo: https://github.com/igorshubovych/markdownlint-cli + rev: v0.27.1 + hooks: + - id: markdownlint + args: ['--fix', '--ignore', '.github'] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fwupd-efi-1.1/CONTRIBUTING.md new/fwupd-efi-1.2/CONTRIBUTING.md --- old/fwupd-efi-1.1/CONTRIBUTING.md 2021-06-19 15:29:03.000000000 +0200 +++ new/fwupd-efi-1.2/CONTRIBUTING.md 2022-01-23 18:52:39.000000000 +0100 @@ -1,7 +1,8 @@ -Getting started -=============== +# Getting started + To set up your local environment, from the top level of the checkout run -``` + +```shell ./contrib/setup ``` @@ -11,45 +12,44 @@ On some Linux distributions this will install all build dependencies needed to compile fwupd as well. -Coding Style -============ +## Coding Style The coding style to respect in this project is very similar to most GLib projects. In particular, the following rules are largely adapted from the PackageKit Coding Style. - * 8-space tabs for indentation +* 8-space tabs for indentation - * Prefer lines of less than <= 80 columns +* Prefer lines of less than <= 80 columns - * 1-space between function name and braces (both calls and macro +* 1-space between function name and braces (both calls and macro declarations) - * If function signature/call fits in a single line, do not break it +* If function signature/call fits in a single line, do not break it into multiple lines - * Prefer descriptive names over abbreviations (unless well-known) +* Prefer descriptive names over abbreviations (unless well-known) and shortening of names. e.g `device` not `dev` - * Single statements inside if/else should not be enclosed by '{}' +* Single statements inside if/else should not be enclosed by '{}' - * Use comments to explain why something is being done, but also avoid +* Use comments to explain why something is being done, but also avoid over-documenting the obvious. Here is an example of useless comment: // Fetch the document fetch_the_document (); - * Comments should not start with a capital letter or end with a full stop and +* Comments should not start with a capital letter or end with a full stop and should be C-style, not C++-style, e.g. `/* this */` not `// this` - * Each object should go in a separate .c file and be named according +* Each object should go in a separate .c file and be named according to the class - * Use g_autoptr() and g_autofree whenever possible, and avoid `goto out` +* Use g_autoptr() and g_autofree whenever possible, and avoid `goto out` error handling - * Failing methods should return FALSE with a suitable `GError` set +* Failing methods should return FALSE with a suitable `GError` set - * Trailing whitespace is forbidden +* Trailing whitespace is forbidden - * Pointers should be checked for NULL explicitly, e.g. `foo != NULL` not `!foo` +* Pointers should be checked for NULL explicitly, e.g. `foo != NULL` not `!foo` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fwupd-efi-1.1/README.md new/fwupd-efi-1.2/README.md --- old/fwupd-efi-1.1/README.md 2021-06-19 15:29:03.000000000 +0200 +++ new/fwupd-efi-1.2/README.md 2022-01-23 18:52:39.000000000 +0100 @@ -1,26 +1,37 @@ # EFI executable for fwupd -This repository contains the source used for the fwupd project to generate a UEFI binary for installing updates using the `UpdateCapsule` runtime service. +This repository contains the source used for the fwupd project to generate a +UEFI binary for installing updates using the `UpdateCapsule` runtime service. -It was originally imported from the combined fwupd project, and is now maintained separately to allow fwupd userspace releases and fwupd-efi UEFI executable releases to follow a different candence. +It was originally imported from the combined fwupd project, and is now maintained +separately to allow fwupd userspace releases and fwupd-efi UEFI executable releases +to follow a different cadence. ## Compatibility ### 1.1.x through 1.5.x -This UEFI executable is compatible will all fwupd releases from `1_1_X` and newer. In these fwupd sustaining releases, the EFI source continues to be distributed, but a new *fwupd* meson build option `-Defi_binary=false` is introduced which will allow disabling the compilation of built-in fwupd EFI binary. +This UEFI executable is compatible will all fwupd releases from `1_1_X` and newer. +In these fwupd sustaining releases, the EFI source continues to be distributed, +but a new *fwupd* meson build option `-Defi_binary=false` is introduced which +will allow disabling the compilation of built-in fwupd EFI binary. ### 1.6.x and newer -The fwupd EFI source has been removed from the releases and is now distributed by this repository. +The fwupd EFI source has been removed from the releases and is now distributed +by this repository. -Hand-building fwupd will perform a subproject checkout of *fwupd-efi* and build the binary at the same time. +Hand-building fwupd will perform a subproject checkout of *fwupd-efi* and build +the binary at the same time. -All packagers should generate separate source packages for *fwupd* and *fwupd-efi*. In the *fwupd* package, the subproject behavior should be explicitly disabled using `-Defi_binary=false`. +All packagers should generate separate source packages for *fwupd* and +*fwupd-efi*. In the *fwupd* package, the subproject behavior should be explicitly +disabled using `-Defi_binary=false`. ## Standalone compilation -`fwupd-efi` uses the `meson` system to build EFI executables. Install `gnu-efi` and then follow these instructions to build and install locally: +`fwupd-efi` uses the `meson` system to build EFI executables. Install `gnu-efi` +and then follow these instructions to build and install locally: ```bash meson build @@ -31,7 +42,8 @@ ## UEFI SBAT Support The packager should also specify the SBAT metadata required for the secure boot -revocation support. See the [specification](https://github.com/rhboot/shim/blob/sbat/SBAT.md) for more information. +revocation support. See the [specification](https://github.com/rhboot/shim/blob/main/SBAT.md) +for more information. Typically, this will be set as part of the packager build script, e.g. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fwupd-efi-1.1/RELEASE new/fwupd-efi-1.2/RELEASE --- old/fwupd-efi-1.1/RELEASE 2021-06-19 15:29:03.000000000 +0200 +++ new/fwupd-efi-1.2/RELEASE 2022-01-23 18:52:39.000000000 +0100 @@ -2,14 +2,14 @@ Write release entries: -git log --format="%s" --cherry-pick --right-only 1.0... | grep -i -v trivial | grep -v Merge | sort | uniq +git log --format="%s" --cherry-pick --right-only 1.1... | grep -i -v trivial | grep -v Merge | sort | uniq Add any user visible changes into ../contrib/org.freedesktop.fwupd.efi.metainfo.xml appstream-util appdata-to-news ../contrib/org.freedesktop.fwupd.efi.metainfo.xml > NEWS 2. Commit changes to git: # MAKE SURE THIS IS CORRECT -export release_ver="1.1" +export release_ver="1.2" git commit -a -m "Release fwupd-efi ${release_ver}" --no-verify git tag -s -f -m "Release fwupd-efi ${release_ver}" "${release_ver}" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fwupd-efi-1.1/contrib/codespell.cfg new/fwupd-efi-1.2/contrib/codespell.cfg --- old/fwupd-efi-1.1/contrib/codespell.cfg 1970-01-01 01:00:00.000000000 +0100 +++ new/fwupd-efi-1.2/contrib/codespell.cfg 2022-01-23 18:52:39.000000000 +0100 @@ -0,0 +1,4 @@ +[codespell] +builtin = clear,informal,en-GB_to_en-US +skip = *.po,*.csv,*.svg,*.p7c,subprojects,.git,pcrs,build*,.ossfuzz,*/tests/* +ignore-words-list = conexant,Conexant,gir,GIR,hsi,HSI,cancelled,Cancelled,te diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fwupd-efi-1.1/contrib/org.freedesktop.fwupd.efi.metainfo.xml new/fwupd-efi-1.2/contrib/org.freedesktop.fwupd.efi.metainfo.xml --- old/fwupd-efi-1.1/contrib/org.freedesktop.fwupd.efi.metainfo.xml 2021-06-19 15:29:03.000000000 +0200 +++ new/fwupd-efi-1.2/contrib/org.freedesktop.fwupd.efi.metainfo.xml 2022-01-23 18:52:39.000000000 +0100 @@ -23,9 +23,14 @@ <update_contact>richard_at_hughsie.com</update_contact> <content_rating type="oars-1.0"/> <releases> - <release version="1.0" date="2021-04-23"> + <release version="1.2" date="2022-01-23"> <description> - <p>This is the first release split from the fwupd parent project.</p> + <p>This release fixes the following bugs:</p> + <ul> + <li>Sleep longer when no updates to process or event of error</li> + <li>Use the correct ldscript when the local crt0 is used for SBAT</li> + <li>Use the standard objcopy binary</li> + </ul> </description> </release> <release version="1.1" date="2021-06-19"> @@ -38,5 +43,10 @@ </ul> </description> </release> + <release version="1.0" date="2021-04-23"> + <description> + <p>This is the first release split from the fwupd parent project.</p> + </description> + </release> </releases> </component> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fwupd-efi-1.1/contrib/reformat-code.py new/fwupd-efi-1.2/contrib/reformat-code.py --- old/fwupd-efi-1.1/contrib/reformat-code.py 1970-01-01 01:00:00.000000000 +0100 +++ new/fwupd-efi-1.2/contrib/reformat-code.py 2022-01-23 18:52:39.000000000 +0100 @@ -0,0 +1,90 @@ +#!/usr/bin/python3 +# +# Copyright (C) 2017 Dell Inc. +# +# SPDX-License-Identifier: LGPL-2.1+ +# + +import os +import sys +import subprocess +import argparse + +CLANG_DIFF_FORMATTERS = [ + "clang-format-diff-11", + "clang-format-diff-13", + "clang-format-diff", +] + + +def parse_args(): + parser = argparse.ArgumentParser( + description="Reformat C code to match project style", + epilog="Call with no argument to reformat uncommitted code.", + ) + parser.add_argument( + "commit", nargs="*", default="", help="Reformat all changes since this commit" + ) + parser.add_argument( + "--debug", action="store_true", help="Display all launched commands" + ) + return parser.parse_args() + + +def select_clang_version(formatters): + for formatter in formatters: + try: + ret = subprocess.check_call( + [formatter, "--help"], stdout=subprocess.PIPE, stderr=subprocess.PIPE + ) + if ret == 0: + return formatter + except FileNotFoundError: + continue + print("No clang formatter installed") + sys.exit(1) + + +## Entry Point ## +if __name__ == "__main__": + args = parse_args() + base = os.getenv("GITHUB_BASE_REF") + if base: + base = "origin/%s" % base + else: + if args.commit: + base = args.commit[0] + else: + base = "HEAD" + cmd = ["git", "describe", base] + if args.debug: + print(cmd) + ret = subprocess.run(cmd, capture_output=True) + if ret.returncode: + if args.debug: + print(ret.stderr) + base = "HEAD" + print("Reformatting code against %s" % base) + formatter = select_clang_version(CLANG_DIFF_FORMATTERS) + cmd = ["git", "diff", "-U0", base] + if args.debug: + print(cmd) + ret = subprocess.run(cmd, capture_output=True, text=True) + if ret.returncode: + print("Failed to run %s\n%s" % (cmd, ret.stderr.strip())) + sys.exit(1) + cmd = [formatter, "-p1"] + if args.debug: + print(cmd) + ret = subprocess.run(cmd, input=ret.stdout, capture_output=True, text=True) + if ret.returncode: + print("Failed to run %s\n%s" % (cmd, ret.stderr.strip())) + sys.exit(1) + cmd = ["patch", "-p0"] + if args.debug: + print(cmd) + ret = subprocess.run(cmd, input=ret.stdout, capture_output=True, text=True) + if ret.returncode: + print("Failed to run %s\n%s" % (cmd, ret.stderr.strip())) + sys.exit(1) + sys.exit(0) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fwupd-efi-1.1/efi/crt0/crt0-efi-aarch64.S new/fwupd-efi-1.2/efi/crt0/crt0-efi-aarch64.S --- old/fwupd-efi-1.1/efi/crt0/crt0-efi-aarch64.S 2021-06-19 15:29:03.000000000 +0200 +++ new/fwupd-efi-1.2/efi/crt0/crt0-efi-aarch64.S 2022-01-23 18:52:39.000000000 +0100 @@ -1,7 +1,7 @@ /* * crt0-efi-aarch64.S - PE/COFF header for AArch64 EFI applications * - * Copright (C) 2014 Linaro Ltd. <ard.biesheu...@linaro.org> + * Copyright (C) 2014 Linaro Ltd. <ard.biesheu...@linaro.org> * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fwupd-efi-1.1/efi/crt0/crt0-efi-arm.S new/fwupd-efi-1.2/efi/crt0/crt0-efi-arm.S --- old/fwupd-efi-1.1/efi/crt0/crt0-efi-arm.S 2021-06-19 15:29:03.000000000 +0200 +++ new/fwupd-efi-1.2/efi/crt0/crt0-efi-arm.S 2022-01-23 18:52:39.000000000 +0100 @@ -1,7 +1,7 @@ /* * crt0-efi-arm.S - PE/COFF header for ARM EFI applications * - * Copright (C) 2014 Linaro Ltd. <ard.biesheu...@linaro.org> + * Copyright (C) 2014 Linaro Ltd. <ard.biesheu...@linaro.org> * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fwupd-efi-1.1/efi/fwupdate.c new/fwupd-efi-1.2/efi/fwupdate.c --- old/fwupd-efi-1.1/efi/fwupdate.c 2021-06-19 15:29:03.000000000 +0200 +++ new/fwupd-efi-1.2/efi/fwupdate.c 2022-01-23 18:52:39.000000000 +0100 @@ -561,7 +561,8 @@ return rc; } if (n_updates == 0) { - fwup_warning(L"No updates to process. Called in error?"); + fwup_warning(L"No updates to process, exiting in 10 seconds."); + fwup_msleep(10 * SECONDS); return EFI_INVALID_PARAMETER; } @@ -604,10 +605,8 @@ /* step 4: apply the capsules */ rc = fwup_apply_capsules(capsules, cbd_data, n_updates, &reset_type); - if (EFI_ERROR(rc)) { + if (EFI_ERROR(rc)) fwup_warning(L"Could not apply capsules: %r", rc); - return rc; - } /* step 5: if #4 didn't reboot us, do it manually */ fwup_info(L"Reset System"); @@ -616,5 +615,5 @@ fwup_msleep(30 * SECONDS); uefi_call_wrapper(RT->ResetSystem, 4, reset_type, EFI_SUCCESS, 0, NULL); - return EFI_SUCCESS; + return rc; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fwupd-efi-1.1/efi/generate_binary.py new/fwupd-efi-1.2/efi/generate_binary.py --- old/fwupd-efi-1.1/efi/generate_binary.py 2021-06-19 15:29:03.000000000 +0200 +++ new/fwupd-efi-1.2/efi/generate_binary.py 2022-01-23 18:52:39.000000000 +0100 @@ -59,7 +59,7 @@ argv = [args.genpeimg, "-d", "+d", "+n", "-d", "+s", args.outfile] try: subprocess.run(argv, check=True) - except FileNotFoundError as _: + except FileNotFoundError as e: print(str(e)) sys.exit(1) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fwupd-efi-1.1/efi/generate_sbat.py new/fwupd-efi-1.2/efi/generate_sbat.py --- old/fwupd-efi-1.1/efi/generate_sbat.py 2021-06-19 15:29:03.000000000 +0200 +++ new/fwupd-efi-1.2/efi/generate_sbat.py 2022-01-23 18:52:39.000000000 +0100 @@ -14,9 +14,9 @@ def _generate_sbat(args): - """ append SBAT metadata """ + """append SBAT metadata""" FWUPD_SUMMARY = "Firmware update daemon" - FWUPD_URL = "https://github.com/fwupd/fwupd" + FWUPD_URL = "https://github.com/fwupd/fwupd-efi" subprocess.run( [args.cc, "-x", "c", "-c", "-o", args.outfile, "/dev/null"], check=True diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fwupd-efi-1.1/efi/meson.build new/fwupd-efi-1.2/efi/meson.build --- old/fwupd-efi-1.1/efi/meson.build 2021-06-19 15:29:03.000000000 +0200 +++ new/fwupd-efi-1.2/efi/meson.build 2022-01-23 18:52:39.000000000 +0100 @@ -1,6 +1,8 @@ +generate_sbat = find_program('generate_sbat.py', native: true) +generate_binary = find_program('generate_binary.py', native: true) + efi_cc = get_option('efi-cc') efi_ld = get_option('efi-ld') -efi_objcopy = get_option('efi-objcopy') efi_ldsdir = get_option('efi-ldsdir') efi_incdir = get_option('efi-includedir') @@ -88,6 +90,7 @@ # The gnuefi libraries are still needed efi_libdir = efi_crtdir efi_crtdir = join_paths(meson.current_build_dir(), 'crt0') + efi_ldsdir = join_paths(meson.current_source_dir(), 'lds') endif endif endif @@ -182,10 +185,10 @@ o_file5 = custom_target('fwup-sbat.o', output : 'fwup-sbat.o', command : [ - join_paths(meson.current_source_dir(), 'generate_sbat.py'), + generate_sbat, '@OUTPUT@', '--cc', efi_cc, - '--objcopy', efi_objcopy, + '--objcopy', objcopy, '--project-name', meson.project_name(), '--project-version', meson.project_version(), '--sbat-version', '1', @@ -217,11 +220,11 @@ input : so, output : efi_name, command : [ - join_paths(meson.current_source_dir(), 'generate_binary.py'), + generate_binary, '@INPUT@', '@OUTPUT@', '--arch', gnu_efi_arch, '--os', host_machine.system(), - '--objcopy', efi_objcopy, + '--objcopy', objcopy, '--genpeimg', genpeimg.found() ? genpeimg : '' ], install : true, @@ -230,7 +233,7 @@ dbg = custom_target('efi_debug', input : so, output : efi_name + '.debug', - command : [efi_objcopy, + command : [objcopy, '-j', '.text', '-j', '.sdata', '-j', '.data', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fwupd-efi-1.1/meson.build new/fwupd-efi-1.2/meson.build --- old/fwupd-efi-1.1/meson.build 2021-06-19 15:29:03.000000000 +0200 +++ new/fwupd-efi-1.2/meson.build 2022-01-23 18:52:39.000000000 +0100 @@ -1,11 +1,12 @@ project('fwupd-efi', 'c', - version : '1.1', + version : '1.2', license : 'LGPL-2.1+', meson_version : '>=0.53.0', default_options : ['warning_level=2', 'c_std=c99'], ) cc = meson.get_compiler('c') +objcopy = find_program('objcopy') prefix = get_option('prefix') libdir = join_paths(prefix, get_option('libdir')) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fwupd-efi-1.1/meson_options.txt new/fwupd-efi-1.2/meson_options.txt --- old/fwupd-efi-1.1/meson_options.txt 2021-06-19 15:29:03.000000000 +0200 +++ new/fwupd-efi-1.2/meson_options.txt 2022-01-23 18:52:39.000000000 +0100 @@ -1,6 +1,5 @@ option('efi-cc', type : 'string', value : 'gcc', description : 'the compiler to use for EFI modules') option('efi-ld', type : 'string', value : 'ld', description : 'the linker to use for EFI modules') -option('efi-objcopy', type : 'string', value : 'objcopy', description : 'the objcopy utility to use for EFI modules') option('efi-libdir', type : 'string', description : 'path to the EFI lib directory') option('efi-ldsdir', type : 'string', description : 'path to the EFI lds directory') option('efi-includedir', type : 'string', value : '/usr/include/efi', description : 'path to the EFI header directory')