From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:700:3204::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id wAnjG3DRnmUjmgAAkFu2QA (envelope-from ) for ; Wed, 10 Jan 2024 18:18:40 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id oE+PF3DRnmVH0wAAe85BDQ (envelope-from ) for ; Wed, 10 Jan 2024 18:18:40 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1704907120; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=kTHDHZ/1j5bfwE5Zip696YTSePQkKNzoRY9Frr6nQNc=; b=dtabNfRPOL7sZ8WKHSF736r2CfZVH1zz6g1d10Z910t/23NRRmC42TyZrXQdnAooiUvtpJ lhvvUZvpNt4DMdlrcyK666NBfBo9hWV29MX+RGsJZvZBOuhmBJhb/ox4CzIC3BDYNeS4K6 z3CRwsGnsmof1wTnc4zL3Ynmu9af//EOP1hMEY88bKEm5PmD+JvM+BWAs90Pj5sVAgDwBH sIZxx5RC6Tj2XXRS8CZ8r/hitH0Q9tNTZmxGFZQmXtnfMOfLWE53KCjRQhr7LvjTbGT+Mi 7KbzpgwMyyv308lnXUR0ZU32YeeiS2GyUB8v2Dfc3GyFphypzT/zTAMzABf+Zg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1704907120; a=rsa-sha256; cv=none; b=nLWX75s2Z74k6pYRyjfzuED+D6r+e10fqXBYpA5NU/BRoKMcwmDE2h1hM0t4P5nxeNVWu5 luYaI+ijTmGi7JZaQcSUyGZtLiOJSVQVo0PCPhyho+JyZnd39IY/xpbeorg8kzNNzZ3VZn fMw/Q/9yLxPo1rObQy8RIeINdOpIq6GpSQqIRmfQ8XaugAJ9RMceDduu0tbyHRcFa5aa1+ oG0r8sDxw6Z7mluF/5F6970cjIohfpgvmw+RjStBbyWrrt9fPfoDsp1q9eGx/1hEJj9epD XtzuMG8Sloi0Ah22YCpjOnsL4+MH6nboQYX+dm8hYlfysxj4ouZKPPi/a3YxwA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 325BD6C2BE for ; Wed, 10 Jan 2024 18:18:40 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rNcDO-0000x6-Sj; Wed, 10 Jan 2024 12:18:07 -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 1rNcDM-0000wB-Rr for guix-patches@gnu.org; Wed, 10 Jan 2024 12:18:04 -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 1rNcDM-00049H-J2 for guix-patches@gnu.org; Wed, 10 Jan 2024 12:18:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rNcDK-0004mN-UH for guix-patches@gnu.org; Wed, 10 Jan 2024 12:18:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#68263] [PATCH v2 0/2] libsmbios: Restrict to only supported systems. References: In-Reply-To: Resent-From: Simon South Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 10 Jan 2024 17:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68263 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 68263@debbugs.gnu.org Cc: Vagrant Cascadian , Mathieu Othacehe , Efraim Flashner Received: via spool by 68263-submit@debbugs.gnu.org id=B68263.170490706618327 (code B ref 68263); Wed, 10 Jan 2024 17:18:02 +0000 Received: (at 68263) by debbugs.gnu.org; 10 Jan 2024 17:17:46 +0000 Received: from localhost ([127.0.0.1]:42704 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rNcD4-0004lX-4M for submit@debbugs.gnu.org; Wed, 10 Jan 2024 12:17:46 -0500 Received: from mailout.easymail.ca ([64.68.200.34]:39328) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rNcD1-0004lI-9i for 68263@debbugs.gnu.org; Wed, 10 Jan 2024 12:17:44 -0500 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 4335C659E4; Wed, 10 Jan 2024 17:17:09 +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 lyRFpnkcdkfi; Wed, 10 Jan 2024 17:17:08 +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 A9C8B659C0; Wed, 10 Jan 2024 17:17:08 +0000 (UTC) From: Simon South Date: Wed, 10 Jan 2024 12:16:53 -0500 Message-ID: X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: 325BD6C2BE X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -5.01 X-Spam-Score: -5.01 X-TUID: NLt0SP+UGub2 Here's a revised version of this patchset, incorporating Mathieu Othacehe's advice regarding the use of %current-target-system with supported-package? (but using and=> for compactness and efficiency). I've tested cross-building fwupd from AArch64 to x86-64 and vice-versa and things now work as expected, apart from the nspr package failing to build due to what appears to be a limitation of its own build script. The original cover letter follows. -------------------- 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 | 37 ++++++++++++++++++++++--------------- gnu/packages/hardware.scm | 1 + 2 files changed, 23 insertions(+), 15 deletions(-) base-commit: 5c0f77f4241c9beac0c82deae946bfdc70b49ff0 -- 2.41.0