public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/fwupd-efi/, sys-apps/fwupd-efi/files/
@ 2021-06-18 21:19 Thomas Deutschmann
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Deutschmann @ 2021-06-18 21:19 UTC (permalink / raw
  To: gentoo-commits

commit:     36eb40e0d1be521917a2e4836ac4bbd89f9787a0
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 18 21:19:14 2021 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Fri Jun 18 21:19:30 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=36eb40e0

sys-apps/fwupd-efi: fix building

Fixes

  PermissionError: [Errno 13] Permission denied: 'genpeimg'

Closes: https://bugs.gentoo.org/796569
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 .../fwupd-efi-1.0-add-genpeimg-parameter.patch     | 42 ++++++++++++++++++++++
 .../files/fwupd-efi-1.0-pass-genpeimg.patch        | 21 +++++++++++
 sys-apps/fwupd-efi/fwupd-efi-1.0.ebuild            |  5 +++
 3 files changed, 68 insertions(+)

diff --git a/sys-apps/fwupd-efi/files/fwupd-efi-1.0-add-genpeimg-parameter.patch b/sys-apps/fwupd-efi/files/fwupd-efi-1.0-add-genpeimg-parameter.patch
new file mode 100644
index 00000000000..a9791b4e114
--- /dev/null
+++ b/sys-apps/fwupd-efi/files/fwupd-efi-1.0-add-genpeimg-parameter.patch
@@ -0,0 +1,42 @@
+From 207e8bf4bdb8dbdf8800d4b5cbac5af746047f37 Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@arm.com>
+Date: Fri, 14 May 2021 14:06:31 +0100
+Subject: [PATCH] generate_binary: add genpeimg option
+
+Add a --genpeimg option as the meson.build uses find_program(), so the
+binary could be anywhere.
+---
+ efi/generate_binary.py | 9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/efi/generate_binary.py b/efi/generate_binary.py
+index 0193e50..907af9f 100755
+--- a/efi/generate_binary.py
++++ b/efi/generate_binary.py
+@@ -48,13 +48,15 @@ def _run_objcopy(args):
+ 
+ 
+ def _run_genpeimg(args):
++    if not args.genpeimg:
++        return
+ 
+-    # this is okay if it does not exist
+-    argv = ["genpeimg", "-d", "+d", "+n", "-d", "+s", args.outfile]
++    argv = [args.genpeimg, "-d", "+d", "+n", "-d", "+s", args.outfile]
+     try:
+         subprocess.run(argv, check=True)
+     except FileNotFoundError as _:
+-        pass
++        print(str(e))
++        sys.exit(1)
+ 
+ 
+ if __name__ == "__main__":
+@@ -63,6 +65,7 @@ def _run_genpeimg(args):
+     parser.add_argument(
+         "--objcopy", default="objcopy", help="Binary file to use for objcopy"
+     )
++    parser.add_argument("--genpeimg", help="Binary file to use for genpeimg")
+     parser.add_argument("--arch", default="x86_64", help="EFI architecture")
+     parser.add_argument("infile", help="Input file")
+     parser.add_argument("outfile", help="Output file")

diff --git a/sys-apps/fwupd-efi/files/fwupd-efi-1.0-pass-genpeimg.patch b/sys-apps/fwupd-efi/files/fwupd-efi-1.0-pass-genpeimg.patch
new file mode 100644
index 00000000000..7e4dd1af329
--- /dev/null
+++ b/sys-apps/fwupd-efi/files/fwupd-efi-1.0-pass-genpeimg.patch
@@ -0,0 +1,21 @@
+From 321f0750ee69cc62ab609f760769d880676f712b Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@arm.com>
+Date: Fri, 14 May 2021 14:07:11 +0100
+Subject: [PATCH] meson: pass the found genpeimg to generate_binary
+
+---
+ efi/meson.build | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/efi/meson.build b/efi/meson.build
+index a496210..7cc1da1 100644
+--- a/efi/meson.build
++++ b/efi/meson.build
+@@ -215,6 +215,7 @@ app = custom_target(efi_name,
+                       '@INPUT@', '@OUTPUT@',
+                       '--arch', gnu_efi_arch,
+                       '--objcopy', efi_objcopy,
++                      '--genpeimg', genpeimg.found() ? genpeimg : ''
+                     ],
+                     install : true,
+                     install_dir : efi_app_location)

diff --git a/sys-apps/fwupd-efi/fwupd-efi-1.0.ebuild b/sys-apps/fwupd-efi/fwupd-efi-1.0.ebuild
index fc3aa3397b2..1f99eec953e 100644
--- a/sys-apps/fwupd-efi/fwupd-efi-1.0.ebuild
+++ b/sys-apps/fwupd-efi/fwupd-efi-1.0.ebuild
@@ -29,6 +29,11 @@ DEPEND="sys-boot/gnu-efi"
 
 RDEPEND="!<sys-apps/fwupd-1.6.0"
 
+PATCHES=(
+	"${FILESDIR}"/${P}-add-genpeimg-parameter.patch
+	"${FILESDIR}"/${P}-pass-genpeimg.patch
+)
+
 src_prepare() {
 	default
 


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/fwupd-efi/, sys-apps/fwupd-efi/files/
@ 2021-06-20 16:03 Thomas Deutschmann
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Deutschmann @ 2021-06-20 16:03 UTC (permalink / raw
  To: gentoo-commits

commit:     2001212dfe03599d6ef7bcde1ff5ae90bf8df23b
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 20 15:57:32 2021 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sun Jun 20 16:03:45 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2001212d

sys-apps/fwupd-efi: drop old

Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 sys-apps/fwupd-efi/Manifest                        |  1 -
 .../fwupd-efi-1.0-add-genpeimg-parameter.patch     | 42 ----------------
 .../files/fwupd-efi-1.0-pass-genpeimg.patch        | 21 --------
 sys-apps/fwupd-efi/fwupd-efi-1.0.ebuild            | 56 ----------------------
 4 files changed, 120 deletions(-)

diff --git a/sys-apps/fwupd-efi/Manifest b/sys-apps/fwupd-efi/Manifest
index 69e486bfbc6..41334f096f0 100644
--- a/sys-apps/fwupd-efi/Manifest
+++ b/sys-apps/fwupd-efi/Manifest
@@ -1,2 +1 @@
-DIST fwupd-efi-1.0.tar.gz 37465 BLAKE2B 89824d2f32d618802f56ebdb67838eed2759a86556a54a9da4f303220d99fbd2465673181d3d2806f4665061746cf7faebf633d4de8249e2c3f269fe0c22b679 SHA512 fd2fde665e90f40fb8c2235f09fc17618d8cb3f87a23ef37f7940a36c4f4b0f9ccef90745bdca1dd8827f60060e5fd95c139883ce08aedb00a249f6e809703a4
 DIST fwupd-efi-1.1.tar.gz 37079 BLAKE2B 6f9d97f969aa8c4e7f220e7914163ddff31fa841469b30e9ca73c76d49b753edcfd6e76df68b408533deb14e230240c9d15278eb8d7d490e45f10f28a0993cd6 SHA512 ee2c1039de87a3580cbe47bb5818015936ad7ef00b3bc8fff644c858387e5c5b3fe84e075e01ff9069218b04474774abee4a13261a2d1dd786e0e6d3bfe5833b

diff --git a/sys-apps/fwupd-efi/files/fwupd-efi-1.0-add-genpeimg-parameter.patch b/sys-apps/fwupd-efi/files/fwupd-efi-1.0-add-genpeimg-parameter.patch
deleted file mode 100644
index a9791b4e114..00000000000
--- a/sys-apps/fwupd-efi/files/fwupd-efi-1.0-add-genpeimg-parameter.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 207e8bf4bdb8dbdf8800d4b5cbac5af746047f37 Mon Sep 17 00:00:00 2001
-From: Ross Burton <ross.burton@arm.com>
-Date: Fri, 14 May 2021 14:06:31 +0100
-Subject: [PATCH] generate_binary: add genpeimg option
-
-Add a --genpeimg option as the meson.build uses find_program(), so the
-binary could be anywhere.
----
- efi/generate_binary.py | 9 ++++++---
- 1 file changed, 6 insertions(+), 3 deletions(-)
-
-diff --git a/efi/generate_binary.py b/efi/generate_binary.py
-index 0193e50..907af9f 100755
---- a/efi/generate_binary.py
-+++ b/efi/generate_binary.py
-@@ -48,13 +48,15 @@ def _run_objcopy(args):
- 
- 
- def _run_genpeimg(args):
-+    if not args.genpeimg:
-+        return
- 
--    # this is okay if it does not exist
--    argv = ["genpeimg", "-d", "+d", "+n", "-d", "+s", args.outfile]
-+    argv = [args.genpeimg, "-d", "+d", "+n", "-d", "+s", args.outfile]
-     try:
-         subprocess.run(argv, check=True)
-     except FileNotFoundError as _:
--        pass
-+        print(str(e))
-+        sys.exit(1)
- 
- 
- if __name__ == "__main__":
-@@ -63,6 +65,7 @@ def _run_genpeimg(args):
-     parser.add_argument(
-         "--objcopy", default="objcopy", help="Binary file to use for objcopy"
-     )
-+    parser.add_argument("--genpeimg", help="Binary file to use for genpeimg")
-     parser.add_argument("--arch", default="x86_64", help="EFI architecture")
-     parser.add_argument("infile", help="Input file")
-     parser.add_argument("outfile", help="Output file")

diff --git a/sys-apps/fwupd-efi/files/fwupd-efi-1.0-pass-genpeimg.patch b/sys-apps/fwupd-efi/files/fwupd-efi-1.0-pass-genpeimg.patch
deleted file mode 100644
index 7e4dd1af329..00000000000
--- a/sys-apps/fwupd-efi/files/fwupd-efi-1.0-pass-genpeimg.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-From 321f0750ee69cc62ab609f760769d880676f712b Mon Sep 17 00:00:00 2001
-From: Ross Burton <ross.burton@arm.com>
-Date: Fri, 14 May 2021 14:07:11 +0100
-Subject: [PATCH] meson: pass the found genpeimg to generate_binary
-
----
- efi/meson.build | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/efi/meson.build b/efi/meson.build
-index a496210..7cc1da1 100644
---- a/efi/meson.build
-+++ b/efi/meson.build
-@@ -215,6 +215,7 @@ app = custom_target(efi_name,
-                       '@INPUT@', '@OUTPUT@',
-                       '--arch', gnu_efi_arch,
-                       '--objcopy', efi_objcopy,
-+                      '--genpeimg', genpeimg.found() ? genpeimg : ''
-                     ],
-                     install : true,
-                     install_dir : efi_app_location)

diff --git a/sys-apps/fwupd-efi/fwupd-efi-1.0.ebuild b/sys-apps/fwupd-efi/fwupd-efi-1.0.ebuild
deleted file mode 100644
index 1f99eec953e..00000000000
--- a/sys-apps/fwupd-efi/fwupd-efi-1.0.ebuild
+++ /dev/null
@@ -1,56 +0,0 @@
-# Copyright 2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-PYTHON_COMPAT=( python3_{7..10} )
-
-inherit meson python-any-r1 toolchain-funcs
-
-DESCRIPTION="EFI executable for fwupd"
-HOMEPAGE="https://fwupd.org"
-
-if [[ ${PV} = 9999 ]]; then
-	inherit git-r3
-	EGIT_REPO_URI="https://github.com/fwupd/fwupd-efi.git"
-else
-	SRC_URI="https://github.com/fwupd/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-fi
-
-LICENSE="LGPL-2.1+"
-SLOT="0"
-IUSE=""
-
-BDEPEND="${PYTHON_DEPS}
-	virtual/pkgconfig"
-
-DEPEND="sys-boot/gnu-efi"
-
-RDEPEND="!<sys-apps/fwupd-1.6.0"
-
-PATCHES=(
-	"${FILESDIR}"/${P}-add-genpeimg-parameter.patch
-	"${FILESDIR}"/${P}-pass-genpeimg.patch
-)
-
-src_prepare() {
-	default
-
-	python_fix_shebang "${S}/efi"
-}
-
-src_configure() {
-	local emesonargs=(
-		-Defi-cc="$(tc-getCC)"
-		-Defi-ld="$(tc-getLD)"
-		-Defi-objcopy="$(tc-getOBJCOPY)"
-		-Defi_sbat_distro_id="gentoo"
-		-Defi_sbat_distro_summary="Gentoo GNU/Linux"
-		-Defi_sbat_distro_pkgname="${PN}"
-		-Defi_sbat_distro_version="${PVR}"
-		-Defi_sbat_distro_url="https://packages.gentoo.org/packages/${CATEGORY}/${PN}"
-	)
-
-	meson_src_configure
-}


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/fwupd-efi/, sys-apps/fwupd-efi/files/
@ 2023-02-27 13:15 Marek Szuba
  0 siblings, 0 replies; 5+ messages in thread
From: Marek Szuba @ 2023-02-27 13:15 UTC (permalink / raw
  To: gentoo-commits

commit:     3e68014936059256d40d745a4e60dd46aeca52f9
Author:     Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 27 12:53:56 2023 +0000
Commit:     Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Mon Feb 27 13:15:23 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3e680149

sys-apps/fwupd-efi: restore the old option for setting the linker

Between 1.3 and 1.4, fwupd-efi upstream phased this option out in favour
of using standard Meson toolchain management for both the compiler and
the linker. However, the transition has not been completed yet and
the linking phase still involves a custom target explicitly calling the
linker executable - and the way the name of said executable is
determined at the moment is not entirely robust.

Closes: https://bugs.gentoo.org/892339
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>

 .../files/fwupd-efi-1.4-efi_ld_override.patch      | 26 ++++++++++++++++++++++
 sys-apps/fwupd-efi/fwupd-efi-1.4.ebuild            |  7 +++++-
 2 files changed, 32 insertions(+), 1 deletion(-)

diff --git a/sys-apps/fwupd-efi/files/fwupd-efi-1.4-efi_ld_override.patch b/sys-apps/fwupd-efi/files/fwupd-efi-1.4-efi_ld_override.patch
new file mode 100644
index 000000000000..0b703a41d2e6
--- /dev/null
+++ b/sys-apps/fwupd-efi/files/fwupd-efi-1.4-efi_ld_override.patch
@@ -0,0 +1,26 @@
+--- a/efi/meson.build
++++ b/efi/meson.build
+@@ -1,6 +1,7 @@
+ generate_sbat = find_program('generate_sbat.py', native: true)
+ generate_binary = find_program('generate_binary.py', native: true)
+ 
++efi_ld = get_option('efi-ld')
+ efi_ldsdir = get_option('efi-ldsdir')
+ efi_incdir = get_option('efi-includedir')
+ 
+@@ -226,7 +227,7 @@
+ so = custom_target('fwup.so',
+                    input : [o_file1, o_file2, o_file3, o_file4, o_file5],
+                    output : 'fwup.so',
+-                   command : [ld, '-o', '@OUTPUT@'] +
++                   command : [efi_ld, '-o', '@OUTPUT@'] +
+                              efi_ldflags + ['@INPUT@'] +
+                              ['-lefi', '-lgnuefi', libgcc_file_name],
+                    depends: fwupd_so_deps)
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -1,3 +1,4 @@
++option('efi-ld', type : 'string', value : 'ld', description : 'the linker 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')

diff --git a/sys-apps/fwupd-efi/fwupd-efi-1.4.ebuild b/sys-apps/fwupd-efi/fwupd-efi-1.4.ebuild
index d90dd1db3a4e..a10efcfde644 100644
--- a/sys-apps/fwupd-efi/fwupd-efi-1.4.ebuild
+++ b/sys-apps/fwupd-efi/fwupd-efi-1.4.ebuild
@@ -5,7 +5,7 @@ EAPI=8
 
 PYTHON_COMPAT=( python3_{9..11} )
 
-inherit meson python-any-r1
+inherit meson python-any-r1 toolchain-funcs
 
 DESCRIPTION="EFI executable for fwupd"
 HOMEPAGE="https://fwupd.org"
@@ -31,6 +31,10 @@ DEPEND="sys-boot/gnu-efi"
 
 RDEPEND="!<sys-apps/fwupd-1.6.0"
 
+PATCHES=(
+	"${FILESDIR}"/${PN}-1.4-efi_ld_override.patch	# Bug #892339
+)
+
 python_check_deps() {
 	python_has_version "dev-python/pefile[${PYTHON_USEDEP}]"
 }
@@ -43,6 +47,7 @@ src_prepare() {
 
 src_configure() {
 	local emesonargs=(
+		-Defi-ld="$(tc-getLD)"
 		-Defi-libdir="${EPREFIX}"/usr/$(get_libdir)
 		-Defi_sbat_distro_id="gentoo"
 		-Defi_sbat_distro_summary="Gentoo GNU/Linux"


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/fwupd-efi/, sys-apps/fwupd-efi/files/
@ 2023-12-05 15:57 Marek Szuba
  0 siblings, 0 replies; 5+ messages in thread
From: Marek Szuba @ 2023-12-05 15:57 UTC (permalink / raw
  To: gentoo-commits

commit:     606aeaebf581d0e5c8bd771d6413a64676fec9cf
Author:     Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Tue Dec  5 15:53:20 2023 +0000
Commit:     Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Tue Dec  5 15:56:55 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=606aeaeb

sys-apps/fwupd-efi: fix llvm-objcopy build error

Upstream began passing --section-alignment to objcopy before 1.4
and that option remains unsupported by llvm-objcopy. However, the
change has since been reverted as non-compliant.

Closes: https://bugs.gentoo.org/919118
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>

 .../files/fwupd-efi-1.4-uefi_210_fixes.patch       | 107 +++++++++++++++++++++
 sys-apps/fwupd-efi/fwupd-efi-1.4-r1.ebuild         |  71 ++++++++++++++
 2 files changed, 178 insertions(+)

diff --git a/sys-apps/fwupd-efi/files/fwupd-efi-1.4-uefi_210_fixes.patch b/sys-apps/fwupd-efi/files/fwupd-efi-1.4-uefi_210_fixes.patch
new file mode 100644
index 000000000000..d4de5f174857
--- /dev/null
+++ b/sys-apps/fwupd-efi/files/fwupd-efi-1.4-uefi_210_fixes.patch
@@ -0,0 +1,107 @@
+From bd958f2e8f03a85a7e1fe40a3ca7b78e0b24b79f Mon Sep 17 00:00:00 2001
+From: Callum Farmer <gmbr3@opensuse.org>
+Date: Sat, 11 Feb 2023 15:39:06 +0000
+Subject: [PATCH] UEFI 2.10 fixes
+
+Revert "Align sections to 512 bytes"
+
+This is not permitted according to the Microsoft
+guidelines which require section alignment to be
+the same as the page size of the architecture which
+for all supported archs is the default in Binutils
+
+https://techcommunity.microsoft.com/t5/hardware-dev-center/new-uefi-ca-memory-mitigation-requirements-for-signing/ba-p/3608714
+
+This reverts commit c60c0b8dfda71275ab40bdb316a6ca650c7a8948.
+
+Keep .areloc ARM32 section
+
+This is the psuedo .reloc section but renamed only on ARM32 to avoid
+a bad RELSZ value (gnu-efi 3.0.18+)
+
+Only use 4KiB pages on aarch64
+
+Binutils is currently configured by default
+to use 64KiB pages on aarch64, however this
+is not allowed by the UEFI specification
+
+Check if crt0 contains .note.GNU-stack section
+
+We need the .note.GNU-stack section for NX
+compat. If we don't have a new enough
+gnu-efi, error as the gnu-efi libraries
+themselves must have been built as NX
+for this to work
+
+Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
+---
+ efi/crt0/meson.build   |  1 +
+ efi/generate_binary.py |  4 ++--
+ efi/meson.build        | 12 +++++++++++-
+ 3 files changed, 14 insertions(+), 3 deletions(-)
+
+diff --git a/efi/crt0/meson.build b/efi/crt0/meson.build
+index f5f45c5..fbd943e 100644
+--- a/efi/crt0/meson.build
++++ b/efi/crt0/meson.build
+@@ -1,3 +1,4 @@
++arch_crt_source = 'crt0-efi-@0@.S'.format(gnu_efi_path_arch)
+ o_crt0 = custom_target('efi_crt0',
+                        input : arch_crt_source,
+                        output : arch_crt,
+diff --git a/efi/generate_binary.py b/efi/generate_binary.py
+index bd2d959..e27f926 100755
+--- a/efi/generate_binary.py
++++ b/efi/generate_binary.py
+@@ -31,9 +31,9 @@ def _run_objcopy(args):
+         "-j",
+         ".rodata",
+         "-j",
++        ".areloc",
++        "-j",
+         ".rel*",
+-        "--section-alignment",
+-        "512",
+         args.infile,
+         args.outfile,
+     ]
+diff --git a/efi/meson.build b/efi/meson.build
+index 1931855..a476884 100644
+--- a/efi/meson.build
++++ b/efi/meson.build
+@@ -95,6 +95,11 @@ else
+         coff_header_in_crt0 = false
+ endif
+ 
++# For NX compat, we must ensure we have .note.GNU-stack
++if run_command('grep', '-q', '.note.GNU-stack', join_paths(efi_crtdir, arch_crt), check: false).returncode() != 0
++    error('Cannot find NX section in @0@, update to gnu-efi 3.0.15+'.format(join_paths(efi_crtdir, arch_crt)))
++endif
++
+ # older objcopy for Aarch64 and ARM32 are not EFI capable.
+ # Use 'binary' instead, and add required symbols manually.
+ if host_cpu == 'arm' or (host_cpu == 'aarch64' and (objcopy_version.version_compare ('< 2.38') or coff_header_in_crt0))
+@@ -119,7 +124,6 @@ endif
+ # is the system crt0 for arm and aarch64 new enough to know about SBAT?
+ if objcopy_manualsymbols
+   if get_option('efi_sbat_distro_id') != ''
+-    arch_crt_source = 'crt0-efi-@0@.S'.format(gnu_efi_path_arch)
+     cmd = run_command('grep', '-q', 'sbat', join_paths(efi_crtdir, arch_crt))
+     if cmd.returncode() != 0
+       warning('Cannot find SBAT section in @0@, using local copy'.format(join_paths(efi_crtdir, arch_crt)))
+@@ -187,6 +191,12 @@ efi_ldflags = ['-T',
+                '-L', efi_libdir,
+                join_paths(efi_crtdir, arch_crt)]
+ 
++if host_cpu == 'aarch64'
++# Don't use 64KiB pages
++  efi_ldflags += ['-z', 'common-page-size=4096']
++  efi_ldflags += ['-z', 'max-page-size=4096']
++endif
++
+ if objcopy_manualsymbols
+   # older objcopy for Aarch64 and ARM32 are not EFI capable.
+   # Use 'binary' instead, and add required symbols manually.
+-- 
+2.34.1
+

diff --git a/sys-apps/fwupd-efi/fwupd-efi-1.4-r1.ebuild b/sys-apps/fwupd-efi/fwupd-efi-1.4-r1.ebuild
new file mode 100644
index 000000000000..5a890daf01a9
--- /dev/null
+++ b/sys-apps/fwupd-efi/fwupd-efi-1.4-r1.ebuild
@@ -0,0 +1,71 @@
+# Copyright 2021-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit meson python-any-r1 secureboot toolchain-funcs
+
+DESCRIPTION="EFI executable for fwupd"
+HOMEPAGE="https://fwupd.org"
+
+if [[ ${PV} = *9999 ]]; then
+	inherit git-r3
+	EGIT_REPO_URI="https://github.com/fwupd/fwupd-efi.git"
+else
+	SRC_URI="https://github.com/fwupd/${PN}/releases/download/${PV}/${P}.tar.xz"
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+fi
+
+LICENSE="LGPL-2.1+"
+SLOT="0"
+IUSE=""
+
+BDEPEND="$(python_gen_any_dep '
+		dev-python/pefile[${PYTHON_USEDEP}]
+	')
+	virtual/pkgconfig"
+
+DEPEND="sys-boot/gnu-efi"
+
+RDEPEND="!<sys-apps/fwupd-1.6.0"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-1.4-efi_ld_override.patch	# Bug #892339
+	"${FILESDIR}"/${PN}-1.4-uefi_210_fixes.patch
+)
+
+python_check_deps() {
+	python_has_version "dev-python/pefile[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+	python-any-r1_pkg_setup
+	secureboot_pkg_setup
+}
+
+src_prepare() {
+	default
+
+	python_fix_shebang "${S}/efi"
+}
+
+src_configure() {
+	local emesonargs=(
+		-Defi-ld="$(tc-getLD)"
+		-Defi-libdir="${EPREFIX}"/usr/$(get_libdir)
+		-Defi_sbat_distro_id="gentoo"
+		-Defi_sbat_distro_summary="Gentoo GNU/Linux"
+		-Defi_sbat_distro_pkgname="${PN}"
+		-Defi_sbat_distro_version="${PVR}"
+		-Defi_sbat_distro_url="https://packages.gentoo.org/packages/${CATEGORY}/${PN}"
+	)
+
+	meson_src_configure
+}
+
+src_install() {
+	meson_src_install
+	secureboot_auto_sign
+}


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/fwupd-efi/, sys-apps/fwupd-efi/files/
@ 2024-04-24 13:13 Marek Szuba
  0 siblings, 0 replies; 5+ messages in thread
From: Marek Szuba @ 2024-04-24 13:13 UTC (permalink / raw
  To: gentoo-commits

commit:     f4183f22a61fa11ddd19daf4eb141140f2bd0d51
Author:     Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 24 13:12:56 2024 +0000
Commit:     Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Wed Apr 24 13:12:56 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f4183f22

sys-apps/fwupd-efi: drop 1.4-r1

Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>

 .../files/fwupd-efi-1.4-uefi_210_fixes.patch       | 107 ---------------------
 sys-apps/fwupd-efi/fwupd-efi-1.4-r1.ebuild         |  71 --------------
 2 files changed, 178 deletions(-)

diff --git a/sys-apps/fwupd-efi/files/fwupd-efi-1.4-uefi_210_fixes.patch b/sys-apps/fwupd-efi/files/fwupd-efi-1.4-uefi_210_fixes.patch
deleted file mode 100644
index d4de5f174857..000000000000
--- a/sys-apps/fwupd-efi/files/fwupd-efi-1.4-uefi_210_fixes.patch
+++ /dev/null
@@ -1,107 +0,0 @@
-From bd958f2e8f03a85a7e1fe40a3ca7b78e0b24b79f Mon Sep 17 00:00:00 2001
-From: Callum Farmer <gmbr3@opensuse.org>
-Date: Sat, 11 Feb 2023 15:39:06 +0000
-Subject: [PATCH] UEFI 2.10 fixes
-
-Revert "Align sections to 512 bytes"
-
-This is not permitted according to the Microsoft
-guidelines which require section alignment to be
-the same as the page size of the architecture which
-for all supported archs is the default in Binutils
-
-https://techcommunity.microsoft.com/t5/hardware-dev-center/new-uefi-ca-memory-mitigation-requirements-for-signing/ba-p/3608714
-
-This reverts commit c60c0b8dfda71275ab40bdb316a6ca650c7a8948.
-
-Keep .areloc ARM32 section
-
-This is the psuedo .reloc section but renamed only on ARM32 to avoid
-a bad RELSZ value (gnu-efi 3.0.18+)
-
-Only use 4KiB pages on aarch64
-
-Binutils is currently configured by default
-to use 64KiB pages on aarch64, however this
-is not allowed by the UEFI specification
-
-Check if crt0 contains .note.GNU-stack section
-
-We need the .note.GNU-stack section for NX
-compat. If we don't have a new enough
-gnu-efi, error as the gnu-efi libraries
-themselves must have been built as NX
-for this to work
-
-Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
----
- efi/crt0/meson.build   |  1 +
- efi/generate_binary.py |  4 ++--
- efi/meson.build        | 12 +++++++++++-
- 3 files changed, 14 insertions(+), 3 deletions(-)
-
-diff --git a/efi/crt0/meson.build b/efi/crt0/meson.build
-index f5f45c5..fbd943e 100644
---- a/efi/crt0/meson.build
-+++ b/efi/crt0/meson.build
-@@ -1,3 +1,4 @@
-+arch_crt_source = 'crt0-efi-@0@.S'.format(gnu_efi_path_arch)
- o_crt0 = custom_target('efi_crt0',
-                        input : arch_crt_source,
-                        output : arch_crt,
-diff --git a/efi/generate_binary.py b/efi/generate_binary.py
-index bd2d959..e27f926 100755
---- a/efi/generate_binary.py
-+++ b/efi/generate_binary.py
-@@ -31,9 +31,9 @@ def _run_objcopy(args):
-         "-j",
-         ".rodata",
-         "-j",
-+        ".areloc",
-+        "-j",
-         ".rel*",
--        "--section-alignment",
--        "512",
-         args.infile,
-         args.outfile,
-     ]
-diff --git a/efi/meson.build b/efi/meson.build
-index 1931855..a476884 100644
---- a/efi/meson.build
-+++ b/efi/meson.build
-@@ -95,6 +95,11 @@ else
-         coff_header_in_crt0 = false
- endif
- 
-+# For NX compat, we must ensure we have .note.GNU-stack
-+if run_command('grep', '-q', '.note.GNU-stack', join_paths(efi_crtdir, arch_crt), check: false).returncode() != 0
-+    error('Cannot find NX section in @0@, update to gnu-efi 3.0.15+'.format(join_paths(efi_crtdir, arch_crt)))
-+endif
-+
- # older objcopy for Aarch64 and ARM32 are not EFI capable.
- # Use 'binary' instead, and add required symbols manually.
- if host_cpu == 'arm' or (host_cpu == 'aarch64' and (objcopy_version.version_compare ('< 2.38') or coff_header_in_crt0))
-@@ -119,7 +124,6 @@ endif
- # is the system crt0 for arm and aarch64 new enough to know about SBAT?
- if objcopy_manualsymbols
-   if get_option('efi_sbat_distro_id') != ''
--    arch_crt_source = 'crt0-efi-@0@.S'.format(gnu_efi_path_arch)
-     cmd = run_command('grep', '-q', 'sbat', join_paths(efi_crtdir, arch_crt))
-     if cmd.returncode() != 0
-       warning('Cannot find SBAT section in @0@, using local copy'.format(join_paths(efi_crtdir, arch_crt)))
-@@ -187,6 +191,12 @@ efi_ldflags = ['-T',
-                '-L', efi_libdir,
-                join_paths(efi_crtdir, arch_crt)]
- 
-+if host_cpu == 'aarch64'
-+# Don't use 64KiB pages
-+  efi_ldflags += ['-z', 'common-page-size=4096']
-+  efi_ldflags += ['-z', 'max-page-size=4096']
-+endif
-+
- if objcopy_manualsymbols
-   # older objcopy for Aarch64 and ARM32 are not EFI capable.
-   # Use 'binary' instead, and add required symbols manually.
--- 
-2.34.1
-

diff --git a/sys-apps/fwupd-efi/fwupd-efi-1.4-r1.ebuild b/sys-apps/fwupd-efi/fwupd-efi-1.4-r1.ebuild
deleted file mode 100644
index 5a890daf01a9..000000000000
--- a/sys-apps/fwupd-efi/fwupd-efi-1.4-r1.ebuild
+++ /dev/null
@@ -1,71 +0,0 @@
-# Copyright 2021-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{10..12} )
-
-inherit meson python-any-r1 secureboot toolchain-funcs
-
-DESCRIPTION="EFI executable for fwupd"
-HOMEPAGE="https://fwupd.org"
-
-if [[ ${PV} = *9999 ]]; then
-	inherit git-r3
-	EGIT_REPO_URI="https://github.com/fwupd/fwupd-efi.git"
-else
-	SRC_URI="https://github.com/fwupd/${PN}/releases/download/${PV}/${P}.tar.xz"
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-fi
-
-LICENSE="LGPL-2.1+"
-SLOT="0"
-IUSE=""
-
-BDEPEND="$(python_gen_any_dep '
-		dev-python/pefile[${PYTHON_USEDEP}]
-	')
-	virtual/pkgconfig"
-
-DEPEND="sys-boot/gnu-efi"
-
-RDEPEND="!<sys-apps/fwupd-1.6.0"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-1.4-efi_ld_override.patch	# Bug #892339
-	"${FILESDIR}"/${PN}-1.4-uefi_210_fixes.patch
-)
-
-python_check_deps() {
-	python_has_version "dev-python/pefile[${PYTHON_USEDEP}]"
-}
-
-pkg_setup() {
-	python-any-r1_pkg_setup
-	secureboot_pkg_setup
-}
-
-src_prepare() {
-	default
-
-	python_fix_shebang "${S}/efi"
-}
-
-src_configure() {
-	local emesonargs=(
-		-Defi-ld="$(tc-getLD)"
-		-Defi-libdir="${EPREFIX}"/usr/$(get_libdir)
-		-Defi_sbat_distro_id="gentoo"
-		-Defi_sbat_distro_summary="Gentoo GNU/Linux"
-		-Defi_sbat_distro_pkgname="${PN}"
-		-Defi_sbat_distro_version="${PVR}"
-		-Defi_sbat_distro_url="https://packages.gentoo.org/packages/${CATEGORY}/${PN}"
-	)
-
-	meson_src_configure
-}
-
-src_install() {
-	meson_src_install
-	secureboot_auto_sign
-}


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-04-24 13:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-18 21:19 [gentoo-commits] repo/gentoo:master commit in: sys-apps/fwupd-efi/, sys-apps/fwupd-efi/files/ Thomas Deutschmann
  -- strict thread matches above, loose matches on Subject: below --
2021-06-20 16:03 Thomas Deutschmann
2023-02-27 13:15 Marek Szuba
2023-12-05 15:57 Marek Szuba
2024-04-24 13:13 Marek Szuba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox