From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <guix-patches-bounces+larch=yhetil.org@gnu.org>
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 sE3CIYoWmGX91QAAkFu2QA
	(envelope-from <guix-patches-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Fri, 05 Jan 2024 15:47:38 +0100
Received: from aspmx1.migadu.com ([2001:41d0:303:e224::])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	by mp2.migadu.com with LMTPS
	id GAjTG4oWmGXkYwEAe85BDQ
	(envelope-from <guix-patches-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Fri, 05 Jan 2024 15:47:38 +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=1704466058;
	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:list-id:list-help:
	 list-unsubscribe:list-subscribe:list-post;
	bh=X5LxKvzz01e1fPlIKqielTAQyG5iuEzBeM7TH/bo2R4=;
	b=NaeIg/GXnQUkJY8Bog7rmVol3dH7cggYQatZmH92Dr8gKu2xehbSg0Wx5MpM8n3PFUQc+y
	csGBA/xGqdJx5spXbvfUWQuEI4D8jJiZV0+C5XStCbGXImSAQyeZR0EXpgB6EA9wOrb12T
	UYhbrKY984JNwSlRZhvGyujqycvwZygIuy92Ivo29nkOXTaNcfHn4YzSAKhV2h3v+w7Grp
	hI2f7bblUeSi6enJDxyLpLWZ6dNMZlURnEV4snL1qf17yS1eJGuYppFHKscPHQ7/OBvZBZ
	WNIMKfmeyjMI+8PNThzvM/euOlKfTkF+iusrYghLR94h6VvGmWG3oM76LUBJZQ==
ARC-Seal: i=1; s=key1; d=yhetil.org; t=1704466058; a=rsa-sha256; cv=none;
	b=o4Z657+4CbHxJHoVWpstT2RQ+FYKJ2LJr7VwWmjIOBqVZ02Je7wGHaNusgajuQVodB1Xy8
	6maLsFr5Nwk8UIswWtk4FETMloGXY2QydZOArFEB2t2e7ypK6tSCj3SfzcWQW0WVWNpD2X
	GfOzPAqc7VnKbIONRb4XAkdp8xkNRsDTjo7es8x49E2PnsSyMPAB37ojw5u3OJx2UdThy5
	i9qSNWT9iw2gTdfr3LEf59xyO/5PR60BI87BVodgBc8THgWx6mYx5aVyAzdra2tG88cXGy
	qFeMzTXYph/DJ+K0361CG4PUzEFvzX1pGYvpJjRRxHmXHUfl4c+ZSd6Dm2HaIA==
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 35147167A4
	for <larch@yhetil.org>; Fri,  5 Jan 2024 15:47:38 +0100 (CET)
Received: from localhost ([::1] helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <guix-patches-bounces@gnu.org>)
	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 <Debian-debbugs@debbugs.gnu.org>)
 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 <Debian-debbugs@debbugs.gnu.org>)
 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 <Debian-debbugs@debbugs.gnu.org>)
 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 <simon@simonsouth.net>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
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: <handler.68263.B.170446601229383@debbugs.gnu.org>
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 <efraim@flashner.co.il>,
 Vagrant Cascadian <vagrant@debian.org>
X-Debbugs-Original-To: guix-patches@gnu.org
X-Debbugs-Original-Xcc: Efraim Flashner <efraim@flashner.co.il>,
 Vagrant Cascadian <vagrant@debian.org>
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 <debbugs-submit-bounces@debbugs.gnu.org>)
 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 <simon@simonsouth.net>) 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 <simon@simonsouth.net>)
 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 <simon@simonsouth.net>)
 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 <guix-patches@gnu.org>; 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 <guix-patches@gnu.org>;
 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 <guix-patches@gnu.org>; Fri,  5 Jan 2024 14:46:03 +0000 (UTC)
From: Simon South <simon@simonsouth.net>
Date: Fri,  5 Jan 2024 09:45:49 -0500
Message-ID: <cover.1704463873.git.simon@simonsouth.net>
X-Mailer: git-send-email 2.41.0
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
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: <guix-patches.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/guix-patches>,
 <mailto:guix-patches-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/guix-patches>
List-Post: <mailto:guix-patches@gnu.org>
List-Help: <mailto:guix-patches-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guix-patches>,
 <mailto:guix-patches-request@gnu.org?subject=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-Spam-Score: -4.99
X-Spam-Score: -4.99
X-Migadu-Queue-Id: 35147167A4
X-Migadu-Scanner: mx12.migadu.com
X-TUID: qJu3ZAZqAz61

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
-- 
2.41.0