From patchwork Fri Jan 5 14:45:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon South X-Patchwork-Id: 1524 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 3F80227BBEA; Fri, 5 Jan 2024 14:47:42 +0000 (GMT) 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=ham 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 7B8DB27BBE2 for ; Fri, 5 Jan 2024 14:47:38 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rLlTT-00082o-Mm; Fri, 05 Jan 2024 09:47:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rLlTP-0007zl-Lf for guix-patches@gnu.org; Fri, 05 Jan 2024 09:47:01 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rLlTP-0003d2-DG for guix-patches@gnu.org; Fri, 05 Jan 2024 09:46:59 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rLlTS-0007eI-Eo; Fri, 05 Jan 2024 09:47:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#68263] [PATCH 0/2] libsmbios: Restrict to only supported systems. Resent-From: Simon South Original-Sender: "Debbugs-submit" Resent-CC: efraim@flashner.co.il, vagrant@debian.org, guix-patches@gnu.org Resent-Date: Fri, 05 Jan 2024 14:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 68263 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 68263@debbugs.gnu.org Cc: Efraim Flashner , Vagrant Cascadian X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: Efraim Flashner , Vagrant Cascadian Received: via spool by submit@debbugs.gnu.org id=B.170446601229383 (code B ref -1); Fri, 05 Jan 2024 14:47:02 +0000 Received: (at submit) by debbugs.gnu.org; 5 Jan 2024 14:46:52 +0000 Received: from localhost ([127.0.0.1]:56738 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rLlTI-0007dr-7e for submit@debbugs.gnu.org; Fri, 05 Jan 2024 09:46:52 -0500 Received: from lists.gnu.org ([2001:470:142::17]:53000) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rLlTF-0007de-Pb for submit@debbugs.gnu.org; Fri, 05 Jan 2024 09:46:51 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rLlT6-0007sl-1h for guix-patches@gnu.org; Fri, 05 Jan 2024 09:46:40 -0500 Received: from mailout.easymail.ca ([64.68.200.34]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rLlT3-0003bo-Qr for guix-patches@gnu.org; Fri, 05 Jan 2024 09:46:39 -0500 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id D921665EFA for ; Fri, 5 Jan 2024 14:46:05 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at emo09-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo09-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cDn-Z9m53Msx for ; Fri, 5 Jan 2024 14:46:03 +0000 (UTC) Received: from jupiter.smallsystems.net (23-233-96-210.cpe.pppoe.ca [23.233.96.210]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id C4D1265C4B for ; Fri, 5 Jan 2024 14:46:03 +0000 (UTC) From: Simon South Date: Fri, 5 Jan 2024 09:45:49 -0500 Message-ID: X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Received-SPF: pass client-ip=64.68.200.34; envelope-from=simon@simonsouth.net; helo=mailout.easymail.ca 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_H4=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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches Here are a couple patches that fix build failures of libsmbios, a library for accessing System Management BIOS[0] data, by restricting its package to only platforms the library supports (Linux on x86 and x86-64). They also make libsmbios an optional input to fwupd (its only dependent), allowing fwupd to build successfully on non-Intel/AMD platforms. I've tested this on AArch64 and x86-64 and everything appears fine. I've been unable to test cross-building fwupd, though, as this fails with guix build: error: gnu/packages/gnome.scm:3504:2: librsvg@2.56.4: build system `cargo' does not support cross builds By way of justification for these changes: libsmbios is intended for PCs and expects[1] to find a sys/io.h header file on the host. This is supplied by glibc only for architectures that support peripheral I/O via ports: x86, x86-64 and DEC Alpha using Linux; and i386 using the Hurd[2]. Of these Guix does not support Linux on Alpha, while libsmbios does not support the Hurd at all[3]. --- Simon South simon@simonsouth.net [0] https://en.wikipedia.org/wiki/System_Management_BIOS [1] https://github.com/dell/libsmbios/blob/v2.4.3/src/libsmbios_c/cmos/cmos_linux.c#L25 [2] "find -type f -name 'io.h'" at the top level of glibc's source tree makes this apparent. [3] https://github.com/dell/libsmbios/blob/v2.4.3/src/libsmbios_c/common/select_platform_config.h Simon South (2): gnu: libsmbios: Restrict to only supported systems. gnu: fwupd: Depend on libsmbios only on supported systems. gnu/packages/firmware.scm | 34 +++++++++++++++++++--------------- gnu/packages/hardware.scm | 1 + 2 files changed, 20 insertions(+), 15 deletions(-) base-commit: ac69b423865f12310cef5662d9c303aa4b90c869