unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Hilton Chain via Guix-patches via <guix-patches@gnu.org>
To: 61057@debbugs.gnu.org
Subject: [bug#61057] [PATCH 1/3] gnu: flashrom: Update to 1.2.1.
Date: Wed, 25 Jan 2023 20:04:50 +0800	[thread overview]
Message-ID: <87o7qm3jml.wl-hako@ultrarare.space> (raw)
In-Reply-To: <87r0vi3jr3.wl-hako@ultrarare.space>


* 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.2.1.
[arguments]<#:phases>: Remove 'patch-exec-paths and 'patch-type-error phases.

Actually, at least from 1.2, the exact "dmidecode" is not present in dmi.c.
---
 gnu/local.mk                                  |  1 -
 gnu/packages/flashing-tools.scm               | 22 +----
 .../flashrom-fix-building-on-aarch64.patch    | 89 -------------------
 3 files changed, 3 insertions(+), 109 deletions(-)
 delete mode 100644 gnu/packages/patches/flashrom-fix-building-on-aarch64.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 7fd658abac..778b725256 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1114,7 +1114,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/fontconfig-cache-ignore-mtime.patch	\
diff --git a/gnu/packages/flashing-tools.scm b/gnu/packages/flashing-tools.scm
index e7165efe79..de4b477be8 100644
--- a/gnu/packages/flashing-tools.scm
+++ b/gnu/packages/flashing-tools.scm
@@ -58,7 +58,7 @@ (define-module (gnu packages flashing-tools)
 (define-public flashrom
   (package
     (name "flashrom")
-    (version "1.2")
+    (version "1.2.1")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -66,9 +66,7 @@ (define-public flashrom
                     version ".tar.bz2"))
               (sha256
                (base32
-                "0ax4kqnh7kd3z120ypgp73qy1knz47l6qxsqzrfkd97mh5cdky71"))
-              (patches
-               (search-patches "flashrom-fix-building-on-aarch64.patch"))))
+                "0rbdqnxmcsr908rpjcachrx58lwl3fjm7lmvjn3rpj08xddzz9w9"))))
     (build-system gnu-build-system)
     (inputs (list dmidecode pciutils libusb libftdi))
     (native-inputs (list pkg-config))
@@ -80,21 +78,7 @@ (define-public flashrom
        #: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")))))))
+         (delete 'configure))))         ; no configure script
     (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 <pyry.kontio@drasa.eu>
-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 <pyry.kontio@drasa.eu>
-    Change-Id: Iaa4477a71e758cf9ecad2c22f3b77bc6508a3510
-    Reviewed-on: https://review.coreboot.org/c/flashrom/+/43140
-    Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
-    Reviewed-by: Angel Pons <th3fanbus@gmail.com>
-
-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.39.1





  reply	other threads:[~2023-01-25 12:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-25 12:02 [bug#61057] [PATCH 0/3] gnu: flashrom: Update to 1.2.1 Hilton Chain via Guix-patches via
2023-01-25 12:04 ` Hilton Chain via Guix-patches via [this message]
2023-01-25 12:05   ` [bug#61057] [PATCH 2/3] gnu: flashrom: Use G-Expressions Hilton Chain via Guix-patches via
2023-01-25 12:06     ` [bug#61057] [PATCH 3/3] gnu: flashrom: Wrap PATH to find dmidecode Hilton Chain via Guix-patches via
2023-05-28 16:51 ` [bug#61057] [PATCH v2 0/2] gnu: flashrom: Update to 1.3.0 Hilton Chain via Guix-patches via
2023-05-28 16:53   ` [bug#61057] [PATCH v2 1/2] " Hilton Chain via Guix-patches via
2023-05-28 16:53     ` [bug#61057] [PATCH v2 2/2] gnu: flashrom: Wrap PATH to find dmidecode Hilton Chain via Guix-patches via
2023-06-08 21:19   ` bug#61057: [PATCH 0/3] gnu: flashrom: Update to 1.2.1 Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o7qm3jml.wl-hako@ultrarare.space \
    --to=guix-patches@gnu.org \
    --cc=61057@debbugs.gnu.org \
    --cc=hako@ultrarare.space \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).