From patchwork Fri Apr 8 16:49:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: itd X-Patchwork-Id: 1493 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 8130927BBEA; Fri, 8 Apr 2022 18:09:14 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id E1BB127BBE9 for ; Fri, 8 Apr 2022 18:09:13 +0100 (BST) Received: from localhost ([::1]:41290 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ncs6j-0003EO-2h for patchwork@mira.cbaines.net; Fri, 08 Apr 2022 13:09:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50730) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ncrp8-0001nw-Os for guix-patches@gnu.org; Fri, 08 Apr 2022 12:51:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41847) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ncrp7-0003Yr-UC for guix-patches@gnu.org; Fri, 08 Apr 2022 12:51:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ncrp7-00019J-Rq for guix-patches@gnu.org; Fri, 08 Apr 2022 12:51:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#54795] [PATCH] gnu: efivar: Fix build errors on i686-linux. Resent-From: itd Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 08 Apr 2022 16:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 54795 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 54795@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16494366264370 (code B ref -1); Fri, 08 Apr 2022 16:51:01 +0000 Received: (at submit) by debbugs.gnu.org; 8 Apr 2022 16:50:26 +0000 Received: from localhost ([127.0.0.1]:35743 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ncroY-00018Q-7v for submit@debbugs.gnu.org; Fri, 08 Apr 2022 12:50:26 -0400 Received: from lists.gnu.org ([209.51.188.17]:45746) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ncroX-00018J-EA for submit@debbugs.gnu.org; Fri, 08 Apr 2022 12:50:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50602) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ncroW-0001CC-RM for guix-patches@gnu.org; Fri, 08 Apr 2022 12:50:24 -0400 Received: from mailout3.rbg.tum.de ([131.159.0.8]:46109) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ncroU-0003DP-Ih for guix-patches@gnu.org; Fri, 08 Apr 2022 12:50:24 -0400 Received: from mailrelay1.rbg.tum.de (mailrelay1.in.tum.de [131.159.254.14]) by mailout3.rbg.tum.de (Postfix) with ESMTPS id 4A8C5100115 for ; Fri, 8 Apr 2022 18:49:56 +0200 (CEST) Received: by mailrelay1.rbg.tum.de (Postfix, from userid 112) id 4610F254; Fri, 8 Apr 2022 18:49:56 +0200 (CEST) Received: from mailrelay1.rbg.tum.de (localhost [127.0.0.1]) by mailrelay1.rbg.tum.de (Postfix) with ESMTP id DD4E4252 for ; Fri, 8 Apr 2022 18:49:55 +0200 (CEST) Received: from mail.net.in.tum.de (mail.net.in.tum.de [131.159.15.233]) by mailrelay1.rbg.tum.de (Postfix) with ESMTP id DBCEE24E for ; Fri, 8 Apr 2022 18:49:55 +0200 (CEST) Received: from amnesix.net.in.tum.de (amnesix.net.in.tum.de [131.159.20.238]) by mail.net.in.tum.de (Postfix) with ESMTP id B9E41282F031; Fri, 8 Apr 2022 18:49:55 +0200 (CEST) From: itd Date: Fri, 08 Apr 2022 18:49:47 +0200 Message-ID: <87lewf7c5w.fsf@localhost> MIME-Version: 1.0 Received-SPF: pass client-ip=131.159.0.8; envelope-from=itd@net.in.tum.de; helo=mailout3.rbg.tum.de X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches From a6a2c3b3eddbf4ff47e39cfe8265346265d22b00 Mon Sep 17 00:00:00 2001 * gnu/packages/patches/efivar-211.patch: New patch. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/linux.scm (efivar)[source]: Use it. --- Hi, currently, efivar on i686-linux does not build [0] due to format errors [1]. To my knowledge, the merged fix [2] is not part of a release yet. But, it [2] fixes the efivar build for me. Please consider applying it. Thanks! [0]: https://ci.guix.gnu.org/build/495200/details [1]: https://github.com/rhboot/efivar/issues/209 [2]: https://github.com/rhboot/efivar/pull/211 Regards itd gnu/local.mk | 1 + gnu/packages/linux.scm | 5 +- gnu/packages/patches/efivar-211.patch | 84 +++++++++++++++++++++++++++ 3 files changed, 89 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/efivar-211.patch diff --git a/gnu/local.mk b/gnu/local.mk index a44815bdbb..9cccc7e03a 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1018,6 +1018,7 @@ dist_patch_DATA = \ %D%/packages/patches/ecl-16-ignore-stderr-write-error.patch \ %D%/packages/patches/ecl-16-libffi.patch \ %D%/packages/patches/efibootmgr-remove-extra-decl.patch \ + %D%/packages/patches/efivar-211.patch \ %D%/packages/patches/eigen-remove-openmp-error-counting.patch \ %D%/packages/patches/eigen-stabilise-sparseqr-test.patch \ %D%/packages/patches/einstein-build.patch \ diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index e49bbfbe9c..9e64bb207c 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -6776,7 +6776,10 @@ (define-public efivar "-" version ".tar.bz2")) (sha256 (base32 - "0jaka7b4lccswjqiv4liclkj6w78gildg7vd6dnw3wf595pfs67h")))) + "0jaka7b4lccswjqiv4liclkj6w78gildg7vd6dnw3wf595pfs67h")) + (patches + (search-patches "efivar-211.patch")))) + (build-system gnu-build-system) (arguments (list diff --git a/gnu/packages/patches/efivar-211.patch b/gnu/packages/patches/efivar-211.patch new file mode 100644 index 0000000000..3df66d3f5c --- /dev/null +++ b/gnu/packages/patches/efivar-211.patch @@ -0,0 +1,84 @@ +From 15622b7e5761f3dde3f0e42081380b2b41639a48 Mon Sep 17 00:00:00 2001 +From: itd0 <69421122+itd0@users.noreply.github.com> +Date: Mon, 4 Apr 2022 19:59:58 +0200 +Subject: [PATCH] Avoid format error on i686 + +On i686 definition of off_t and ssize_t differ. Update format length +modifiers as needed to avoid format errors with GCC. + +Signed-off-by: itd0 <69421122+itd0@users.noreply.github.com> +--- + src/esl-iter.c | 18 +++++++++--------- + src/secdb-dump.c | 2 +- + 2 files changed, 10 insertions(+), 10 deletions(-) + +diff --git a/src/esl-iter.c b/src/esl-iter.c +index 26b5cb5e..4a1938ad 100644 +--- a/src/esl-iter.c ++++ b/src/esl-iter.c +@@ -308,13 +308,13 @@ esl_list_iter_next_with_size_correction(esl_list_iter *iter, efi_guid_t *type, + return -1; + } + if (iter->offset < 0) { +- efi_error("iter->offset (%zd) < 0", iter->offset); ++ efi_error("iter->offset (%jd) < 0", (intmax_t)iter->offset); + errno = EINVAL; + return -1; + } + if ((uint32_t)iter->offset >= iter->len) { +- efi_error("iter->offset (%zd) >= iter->len (%zd)", +- iter->offset, iter->len); ++ efi_error("iter->offset (%jd) >= iter->len (%zd)", ++ (intmax_t)iter->offset, iter->len); + errno = EINVAL; + return -1; + } +@@ -335,9 +335,9 @@ esl_list_iter_next_with_size_correction(esl_list_iter *iter, efi_guid_t *type, + iter->len - iter->offset, iter->len - iter->offset, + iter->esl->signature_list_size, iter->esl->signature_list_size); + if (correct_size && (iter->len - iter->offset) > 0) { +- warnx("correcting ESL size from %d to %zd at %lx", ++ warnx("correcting ESL size from %d to %jd at %lx", + iter->esl->signature_list_size, +- iter->len - iter->offset, iter->offset); ++ (intmax_t)(iter->len - iter->offset), iter->offset); + debug("correcting ESL size from %d to %zd at %lx", + iter->esl->signature_list_size, + iter->len - iter->offset, iter->offset); +@@ -360,9 +360,9 @@ esl_list_iter_next_with_size_correction(esl_list_iter *iter, efi_guid_t *type, + if (iter->len - iter->offset < iter->esl->signature_list_size) { + debug("EFI_SIGNATURE_LIST is malformed"); + if (correct_size && (iter->len - iter->offset) > 0) { +- warnx("correcting ESL size from %d to %zd at 0x%lx", ++ warnx("correcting ESL size from %d to %jd at 0x%lx", + iter->esl->signature_list_size, +- iter->len - iter->offset, iter->offset); ++ (intmax_t)(iter->len - iter->offset), iter->offset); + debug("correcting ESL size from %d to %zd at 0x%lx", + iter->esl->signature_list_size, + iter->len - iter->offset, iter->offset); +@@ -411,9 +411,9 @@ esl_list_iter_next_with_size_correction(esl_list_iter *iter, efi_guid_t *type, + if (iter->esl->signature_list_size > iter->len - iter->offset) { + debug("EFI_SIGNATURE_LIST is malformed"); + if (correct_size && (iter->len - iter->offset) > 0) { +- warnx("correcting ESL size from %d to %zd at 0x%lx", ++ warnx("correcting ESL size from %d to %jd at 0x%lx", + iter->esl->signature_list_size, +- iter->len - iter->offset, iter->offset); ++ (intmax_t)(iter->len - iter->offset), iter->offset); + debug("correcting ESL size from %d to %zd at 0x%lx", + iter->esl->signature_list_size, + iter->len - iter->offset, iter->offset); +diff --git a/src/secdb-dump.c b/src/secdb-dump.c +index 02fb915b..17f64411 100644 +--- a/src/secdb-dump.c ++++ b/src/secdb-dump.c +@@ -248,7 +248,7 @@ secdb_dump(efi_secdb_t *secdb, bool annotations) + esln += 1; + } + secdb_dump_finish(); +- printf("%08lx\n", offset); ++ printf("%08zx\n", offset); + + fflush(stdout); + }