From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id D721E158046 for ; Thu, 10 Oct 2024 14:47:22 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0721AE2AF7; Thu, 10 Oct 2024 14:47:22 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E0745E2AF7 for ; Thu, 10 Oct 2024 14:47:21 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 033853430BC for ; Thu, 10 Oct 2024 14:47:21 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 8CA54B36 for ; Thu, 10 Oct 2024 14:47:19 +0000 (UTC) From: "Andrew Ammerlaan" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andrew Ammerlaan" Message-ID: <1728571607.dec7ddaabb47c81ecddc603fb2819c4c4f5066ea.andrewammerlaan@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/ X-VCS-Repository: repo/gentoo X-VCS-Files: eclass/kernel-install.eclass X-VCS-Directories: eclass/ X-VCS-Committer: andrewammerlaan X-VCS-Committer-Name: Andrew Ammerlaan X-VCS-Revision: dec7ddaabb47c81ecddc603fb2819c4c4f5066ea X-VCS-Branch: master Date: Thu, 10 Oct 2024 14:47:19 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 7ecee32e-e0a6-40ea-b465-a21daefc5de4 X-Archives-Hash: fcb4755a274e51157e5ace6c23a13e6c commit: dec7ddaabb47c81ecddc603fb2819c4c4f5066ea Author: Andrew Ammerlaan gentoo org> AuthorDate: Tue Oct 1 18:34:43 2024 +0000 Commit: Andrew Ammerlaan gentoo org> CommitDate: Thu Oct 10 14:46:47 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dec7ddaa kernel-install.eclass: fix objcopy overwriting uki >From the manual: If you do not specify outfile, objcopy creates a temporary file and destructively renames the result with the name of infile. We don't want that. Unfortunately we cannot use /dev/null as dump, objcopy complains, so we dump it in T instead. Signed-off-by: Andrew Ammerlaan gentoo.org> eclass/kernel-install.eclass | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/eclass/kernel-install.eclass b/eclass/kernel-install.eclass index c5f218a46b91..29abb9b419e6 100644 --- a/eclass/kernel-install.eclass +++ b/eclass/kernel-install.eclass @@ -650,7 +650,10 @@ kernel-install_extract_from_uki() { local uki=${2} local out=${3} - $(tc-getOBJCOPY) "${uki}" --dump-section ".${extract_type}=${out}" || + # objcopy overwrites input if there is no output, dump the output in T. + # We unfortunately cannot use /dev/null here + $(tc-getOBJCOPY) "${uki}" "${T}/dump.efi" \ + --dump-section ".${extract_type}=${out}" || die "Failed to extract ${extract_type}" chmod 644 "${out}" || die }