From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id 6CvZNTaHc2QFsQAASxT56A (envelope-from ) for ; Sun, 28 May 2023 18:54:14 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id eFDPNTaHc2SpJwAAauVa8A (envelope-from ) for ; Sun, 28 May 2023 18:54:14 +0200 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 4CF21353F3 for ; Sun, 28 May 2023 18:54:14 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q3Jeg-0007zh-43; Sun, 28 May 2023 12:54:06 -0400 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 1q3Jee-0007zT-WD for guix-patches@gnu.org; Sun, 28 May 2023 12:54:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q3Jed-0004p4-0C for guix-patches@gnu.org; Sun, 28 May 2023 12:54:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q3Jec-0007Yp-EM for guix-patches@gnu.org; Sun, 28 May 2023 12:54:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#61057] [PATCH v2 1/2] gnu: flashrom: Update to 1.3.0. Resent-From: Hilton Chain Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 28 May 2023 16:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61057 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61057@debbugs.gnu.org Cc: Hilton Chain Received: via spool by 61057-submit@debbugs.gnu.org id=B61057.168529284229061 (code B ref 61057); Sun, 28 May 2023 16:54:02 +0000 Received: (at 61057) by debbugs.gnu.org; 28 May 2023 16:54:02 +0000 Received: from localhost ([127.0.0.1]:54617 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q3Jea-0007YV-SQ for submit@debbugs.gnu.org; Sun, 28 May 2023 12:54:01 -0400 Received: from mail.boiledscript.com ([144.168.59.46]:55450) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q3JeZ-0007YM-9f for 61057@debbugs.gnu.org; Sun, 28 May 2023 12:54:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ultrarare.space; s=dkim; t=1685292704; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ga1uod3exoc2as74CruRomQ79wsOJroqk5huiM1N9UI=; b=JUywix2CWjdcg6V3byn+9lQTYCigVEtpscBgVfJrYs06NbCNtaeYZIqy9juhfHS+Hev7Xu m3Bzr9BuRTX/OpH7mD3zmftdVlM3xfAxqxHZmAW69Mw5ZyYke83M6XNmxydjlAHc5pW02I K+VOuVEArEj7aL6huNfOW2OOae6cyS8uMmxDzXlVZXj522/g9yp4UJfymtNb2Jp+lSEIvg RT1BKsqDkjhLIJzeE7gpisHWYotPQVgD+zn/1E3ayoHQQnW2YgVxG2LzCpJjPg6ELFUpNl jtpuJ99naI8Bz9Aitu9ihjDvcvSjX7E4QVcxt4oUbrxGiQp2Fxn3GNGKXfkBXg== Date: Mon, 29 May 2023 00:53:57 +0800 Message-Id: <20230528165358.13530-1-hako@ultrarare.space> In-Reply-To: <20230528165149.13011-1-hako@ultrarare.space> References: <20230528165149.13011-1-hako@ultrarare.space> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spamd-Bar: -- 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: , Reply-to: Hilton Chain X-ACL-Warn: , Hilton Chain via Guix-patches From: Hilton Chain via Guix-patches via 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 ARC-Seal: i=1; s=key1; d=yhetil.org; t=1685292854; a=rsa-sha256; cv=none; b=sdX5qK70i1v4xAExB8sTFFMmpFYdX59J1owcW6580wGXLTPksUqCKL9nBy7HmHDa7Fm9N8 t9QsFCbHKZc4vS2JQGvsOG09zNb4i6CCyuDO6E2GihIhhLXJmEsdHpF5863hwnoYfygWms +e90CftOMcOYjeNXeauqbVLEUaY73wFSxysUzeBWDoA/LCLNmR0RDUECgtONmA65Ms+egP AoVO5U7lPHly7pxnMjm39f7M/mBzr6gQsw9x8MUw0uQDQhVr4qPtqQCkDh+FyY+LXMPaa/ 2PtG0VtOg6vr6C5jjvO3Jxhv7Jt/5qKZ1+/z9cNTBR1K/LLxUPKHuJc19D7wdA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=ultrarare.space header.s=dkim header.b=JUywix2C; dmarc=pass (policy=none) header.from=gnu.org; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1685292854; h=from:from:sender:sender:reply-to: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:dkim-signature; bh=ga1uod3exoc2as74CruRomQ79wsOJroqk5huiM1N9UI=; b=oa/wyITHxtWEGL0TJJlVqx3VB6CJXfZOREDlIs7mEX8WZVomH3bxKlzmDcR/83W218DfZ/ fBRRxESMVHYGuM0ahW+xL1MLIc9zm/EEROSX2Eya29lVIAeWEe5yS+y0qnm17vRF5kKcEe bz9yzBst139YFRavNRG1sEmUecc0pDbKP66RuatjEjwv3VcTxTWz4Oy23C9+xvK0A1h7g2 4W8vl6h3mrWeAT6WlWXNJcOr7siMtD+WGPqB6Y6yIOCuP+tCHzfk1s0nHktzt3eQ4o43Lj mlFhUaZX4oRuNyVNoos2TxZp3M2Ke+1oPvH5F/U2qA61IcJyG4M7EyzeNG2i/w== X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=ultrarare.space header.s=dkim header.b=JUywix2C; dmarc=pass (policy=none) header.from=gnu.org; 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" X-Migadu-Spam-Score: -1.65 X-Spam-Score: -1.65 X-Migadu-Queue-Id: 4CF21353F3 X-TUID: blrewnd3DU6k * gnu/packages/patches/flashrom-fix-building-on-aarch64.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. * gnu/packages/flashing-tools.scm (flashrom): Update to 1.3.0. [build-system]: Switch to meson-build-system. [inputs]: Add libjaylink. [native-inputs]: Add cmocka. Actually, at least from 1.2, the exact \"dmidecode\" is not present in dmi.c. --- gnu/local.mk | 1 - gnu/packages/flashing-tools.scm | 40 +++------ .../flashrom-fix-building-on-aarch64.patch | 89 ------------------- 3 files changed, 11 insertions(+), 119 deletions(-) delete mode 100644 gnu/packages/patches/flashrom-fix-building-on-aarch64.patch diff --git a/gnu/local.mk b/gnu/local.mk index 73370dcc78..80b99c5986 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1131,7 +1131,6 @@ dist_patch_DATA = \ %D%/packages/patches/firebird-riscv64-support-pt1.patch \ %D%/packages/patches/firebird-riscv64-support-pt2.patch \ %D%/packages/patches/flann-cmake-3.11.patch \ - %D%/packages/patches/flashrom-fix-building-on-aarch64.patch \ %D%/packages/patches/flatpak-fix-path.patch \ %D%/packages/patches/flatpak-unset-gdk-pixbuf-for-sandbox.patch \ %D%/packages/patches/fluxbox-1.3.7-no-dynamic-cursor.patch \ diff --git a/gnu/packages/flashing-tools.scm b/gnu/packages/flashing-tools.scm index 028631cbd2..a1631b2940 100644 --- a/gnu/packages/flashing-tools.scm +++ b/gnu/packages/flashing-tools.scm @@ -29,20 +29,24 @@ (define-module (gnu packages flashing-tools) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix download) + #:use-module (guix gexp) #:use-module (guix git-download) #:use-module (guix packages) #:use-module (guix utils) #:use-module (gnu packages) #:use-module (guix build-system cmake) #:use-module (guix build-system gnu) + #:use-module (guix build-system meson) #:use-module (guix build-system python) #:use-module (gnu packages autotools) #:use-module (gnu packages admin) #:use-module (gnu packages base) #:use-module (gnu packages bison) #:use-module (gnu packages boost) + #:use-module (gnu packages check) #:use-module (gnu packages compression) #:use-module (gnu packages elf) + #:use-module (gnu packages embedded) #:use-module (gnu packages flex) #:use-module (gnu packages ghostscript) #:use-module (gnu packages gnupg) @@ -58,7 +62,7 @@ (define-module (gnu packages flashing-tools) (define-public flashrom (package (name "flashrom") - (version "1.2") + (version "1.3.0") (source (origin (method url-fetch) (uri (string-append @@ -66,35 +70,13 @@ (define-public flashrom version ".tar.bz2")) (sha256 (base32 - "0ax4kqnh7kd3z120ypgp73qy1knz47l6qxsqzrfkd97mh5cdky71")) - (patches - (search-patches "flashrom-fix-building-on-aarch64.patch")))) - (build-system gnu-build-system) - (inputs (list dmidecode pciutils libusb libftdi)) - (native-inputs (list pkg-config)) + "08wn2j5vxzzvigflrjypgxxzjp32c76bshrlkzki5l6cad226lx0")))) + (build-system meson-build-system) + (inputs (list dmidecode pciutils libusb libftdi libjaylink)) + (native-inputs (list cmocka pkg-config)) (arguments - '(#:make-flags - (list "CC=gcc" - (string-append "PREFIX=" %output) - "CONFIG_ENABLE_LIBUSB0_PROGRAMMERS=no") - #:tests? #f ; no 'check' target - #:phases - (modify-phases %standard-phases - (delete 'configure) ; no configure script - (add-before 'build 'patch-exec-paths - (lambda* (#:key inputs #:allow-other-keys) - (substitute* "dmi.c" - (("\"dmidecode\"") - (format #f "~S" - (search-input-file inputs "/sbin/dmidecode")))))) - (add-before 'build 'patch-type-error - (lambda _ - ;; See https://github.com/flashrom/flashrom/pull/133 - (substitute* "libflashrom.c" - (("supported_boards\\[i\\].working = binfo\\[i\\].working") - "supported_boards[i].working = (enum flashrom_test_state)binfo[i].working") - (("supported_chipsets\\[i\\].status = chipset\\[i\\].status") - "supported_chipsets[i].status = (enum flashrom_test_state)chipset[i].status"))))))) + (list #:configure-flags + #~'("-Dprogrammer=all"))) (home-page "https://flashrom.org/") (synopsis "Identify, read, write, erase, and verify ROM/flash chips") (description diff --git a/gnu/packages/patches/flashrom-fix-building-on-aarch64.patch b/gnu/packages/patches/flashrom-fix-building-on-aarch64.patch deleted file mode 100644 index 9f54305b47..0000000000 --- a/gnu/packages/patches/flashrom-fix-building-on-aarch64.patch +++ /dev/null @@ -1,89 +0,0 @@ -commit da6b3b70cb852dd8e9f9e21aef95fa83e7f7ab0d -Author: Pyry Kontio -Date: Mon Jul 6 12:57:35 2020 +0900 - - Makefile: Fix building on AArch64 NixOS - - The parsing of the output of archtest.c produced an unexpected - value on AArch64 NixOS. For example, the make variable ARCH was set to: - - ``` - bit outside of fd_set selected - arm - ``` - - This made the arch and OS checks fail. - - This commit simplifies the parsing, making it more robust. - - The C files archtest.c, endiantest.c and os.h used to set the - TARGET_OS, ARCH and ENDIAN variables, respectively, output - the result of the test as the final line, so just extracting - the final line and removing double quoting is enough. - - This commit also fixes a bug with debug_shell lacking escaping - single quotes, which prevented using the single quote in the - debug_shell calls. It used to work by accident before this fix; - the line in the call happened to contain a balanced pair of double - quotes and lacked other characters that needed escaping, which - didn't break the debug_shell, but this was accidental and very - brittle. - - Signed-off-by: Pyry Kontio - Change-Id: Iaa4477a71e758cf9ecad2c22f3b77bc6508a3510 - Reviewed-on: https://review.coreboot.org/c/flashrom/+/43140 - Tested-by: build bot (Jenkins) - Reviewed-by: Angel Pons - -diff --git a/Makefile b/Makefile -index f3f7717e..e475cbdb 100644 ---- a/Makefile -+++ b/Makefile -@@ -83,7 +83,8 @@ dummy_for_make_3_80:=$(shell printf "Build started on %s\n\n" "$$(date)" >$(BUIL - - # Provide an easy way to execute a command, print its output to stdout and capture any error message on stderr - # in the build details file together with the original stdout output. --debug_shell = $(shell export LC_ALL=C ; { echo 'exec: export LC_ALL=C ; { $(1) ; }' >&2; { $(1) ; } | tee -a $(BUILD_DETAILS_FILE) ; echo >&2 ; } 2>>$(BUILD_DETAILS_FILE)) -+debug_shell = $(shell export LC_ALL=C ; { echo 'exec: export LC_ALL=C ; { $(subst ','\'',$(1)) ; }' >&2; \ -+ { $(1) ; } | tee -a $(BUILD_DETAILS_FILE) ; echo >&2 ; } 2>>$(BUILD_DETAILS_FILE)) - - ############################################################################### - # General OS-specific settings. -@@ -106,7 +107,8 @@ endif - # IMPORTANT: The following line must be placed before TARGET_OS is ever used - # (of course), but should come after any lines setting CC because the line - # below uses CC itself. --override TARGET_OS := $(strip $(call debug_shell,$(CC) $(CPPFLAGS) -E os.h 2>/dev/null | grep -v '^\#' | grep '"' | cut -f 2 -d'"')) -+override TARGET_OS := $(strip $(call debug_shell,$(CC) $(CPPFLAGS) -E os.h 2>/dev/null \ -+ | tail -1 | cut -f 2 -d'"')) - - ifeq ($(TARGET_OS), Darwin) - override CPPFLAGS += -I/opt/local/include -I/usr/local/include -@@ -490,8 +492,10 @@ endif - # IMPORTANT: The following line must be placed before ARCH is ever used - # (of course), but should come after any lines setting CC because the line - # below uses CC itself. --override ARCH := $(strip $(call debug_shell,$(CC) $(CPPFLAGS) -E archtest.c 2>/dev/null | grep -v '^\#' | grep '"' | cut -f 2 -d'"')) --override ENDIAN := $(strip $(call debug_shell,$(CC) $(CPPFLAGS) -E endiantest.c 2>/dev/null | grep -v '^\#')) -+override ARCH := $(strip $(call debug_shell,$(CC) $(CPPFLAGS) -E archtest.c 2>/dev/null \ -+ | tail -1 | cut -f 2 -d'"')) -+override ENDIAN := $(strip $(call debug_shell,$(CC) $(CPPFLAGS) -E endiantest.c 2>/dev/null \ -+ | tail -1)) - - # Disable the internal programmer on unsupported architectures (everything but x86 and mipsel) - ifneq ($(ARCH)-little, $(filter $(ARCH),x86 mips)-$(ENDIAN)) -@@ -1299,12 +1303,12 @@ compiler: featuresavailable - @printf "Target arch is " - @# FreeBSD wc will output extraneous whitespace. - @echo $(ARCH)|wc -w|grep -q '^[[:blank:]]*1[[:blank:]]*$$' || \ -- ( echo "unknown. Aborting."; exit 1) -+ ( echo "unknown (\"$(ARCH)\"). Aborting."; exit 1) - @printf "%s\n" '$(ARCH)' - @printf "Target OS is " - @# FreeBSD wc will output extraneous whitespace. - @echo $(TARGET_OS)|wc -w|grep -q '^[[:blank:]]*1[[:blank:]]*$$' || \ -- ( echo "unknown. Aborting."; exit 1) -+ ( echo "unknown (\"$(TARGET_OS)\"). Aborting."; exit 1) - @printf "%s\n" '$(TARGET_OS)' - ifeq ($(TARGET_OS), libpayload) - @$(CC) --version 2>&1 | grep -q coreboot || \ -- 2.40.1