From patchwork Fri Jun 7 13:44:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felix Lechner X-Patchwork-Id: 65235 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 85EB627BBEA; Fri, 7 Jun 2024 14:48:11 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 4206727BBE2 for ; Fri, 7 Jun 2024 14:48:10 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sFZwb-0002XX-FP; Fri, 07 Jun 2024 09:47:49 -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 1sFZwa-0002XE-0q for guix-patches@gnu.org; Fri, 07 Jun 2024 09:47:48 -0400 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 1sFZwZ-0007CJ-Oo; Fri, 07 Jun 2024 09:47:47 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sFZwo-0007ds-BT; Fri, 07 Jun 2024 09:48:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#54165] [PATCH v2 1/2] gnu: guile-bytestructures: Update to 2.0.1. Resent-From: Felix Lechner Original-Sender: "Debbugs-submit" Resent-CC: ludo@gnu.org, guix-patches@gnu.org Resent-Date: Fri, 07 Jun 2024 13:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54165 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 54165@patchwise.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= , Taylan Kammer , Ludovic =?utf-8?q?Court=C3=A8s?= X-Debbugs-Original-Xcc: Ludovic =?utf-8?q?Court=C3=A8s?= Received: via spool by 54165-submit@debbugs.gnu.org id=B54165.171776807529345 (code B ref 54165); Fri, 07 Jun 2024 13:48:02 +0000 Received: (at 54165) by debbugs.gnu.org; 7 Jun 2024 13:47:55 +0000 Received: from localhost ([127.0.0.1]:58407 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sFZwg-0007dD-Kr for submit@debbugs.gnu.org; Fri, 07 Jun 2024 09:47:55 -0400 Received: from sail-ipv4.us-core.com ([208.82.101.137]:53056) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sFZwe-0007cy-4E for 54165@debbugs.gnu.org; Fri, 07 Jun 2024 09:47:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=2017; bh=zAJU6/yBY9ds7Rf dUfyHaUqGf111hJA3ekRqJ1TJogs=; h=references:in-reply-to:date:subject: cc:to:from; d=lease-up.com; b=nLG3LolN1LBY73E8b6hoRzUN3KuZ0d/eiUawSBYH 47edwLgNCTZtvvU1ACQIbE212yN42KYJyWb9Y/vlRcj9O4Zn9JMM/fMLng5ha1AVKfA+xF tKF5vI+YKKPPfA1RJrGfUQ0N351WmAfLcSZF3omPU9yAC29ImN+KdAqC7qs84= Received: by localhost (OpenSMTPD) with ESMTPA id b70dd4b7 for <54165@debbugs.gnu.org>; Fri, 7 Jun 2024 13:47:35 +0000 (UTC) Delivered-To: 54165@patchwise.org DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=2017; bh=zAJU6/yBY9ds7Rf dUfyHaUqGf111hJA3ekRqJ1TJogs=; h=references:in-reply-to:date:subject: cc:to:from; d=lease-up.com; b=nLG3LolN1LBY73E8b6hoRzUN3KuZ0d/eiUawSBYH 47edwLgNCTZtvvU1ACQIbE212yN42KYJyWb9Y/vlRcj9O4Zn9JMM/fMLng5ha1AVKfA+xF tKF5vI+YKKPPfA1RJrGfUQ0N351WmAfLcSZF3omPU9yAC29ImN+KdAqC7qs84= Received: by sail-ipv4.us-core.com (OpenSMTPD) with ESMTPSA id 5fae9ca2 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Fri, 7 Jun 2024 13:47:34 +0000 (UTC) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id 763ed6b7; Fri, 7 Jun 2024 13:47:33 +0000 (UTC) Date: Fri, 7 Jun 2024 06:44:55 -0700 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: <87mti97vj9.fsf@gnu.org> References: <87mti97vj9.fsf@gnu.org> MIME-Version: 1.0 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: Felix Lechner X-ACL-Warn: , Felix Lechner via Guix-patches X-Patchwork-Original-From: Felix Lechner via Guix-patches via From: Felix Lechner 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 From: Taylan Kammer * gnu/packages/guile.scm (guile-bytestructures): Update to 2.0.1. Although the major version number is increased due to a small API-breaking change, all packages that depend on guile-bytestructures still build fine and pass their test suite if they have one, so it should not be necessary to create a bytestructures-2.0 package. The breaking change is that bs:pointer would previously implicitly dereference the pointer when any index other than '* was provided, whereas in this version the dereference must be explicit, and can be '* or an integer that represents an offset from the pointer address a la *(ptr + i) in C. --- gnu/packages/guile.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) base-commit: 580d77d0fb12448ef1621699cc0c56e787e2aadb diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm index e8705dc7d2..0bbd4a12ad 100644 --- a/gnu/packages/guile.scm +++ b/gnu/packages/guile.scm @@ -786,7 +786,7 @@ (define-public guile2.2-sqlite3 (define-public guile-bytestructures (package (name "guile-bytestructures") - (version "1.0.10") + (version "2.0.1") (home-page "https://github.com/TaylanUB/scheme-bytestructures") (source (origin (method git-fetch) @@ -796,7 +796,7 @@ (define-public guile-bytestructures (file-name (git-file-name name version)) (sha256 (base32 - "14k50jln32kkxv41hvsdgjkkfj6xlv06vc1caz01qkgk1fzh72nk")))) + "1gnh3p2042cch1nkapl0p4pv20q7qs8cxvvbp7a5h1dwqbrkdyss")))) (build-system gnu-build-system) (arguments `(#:make-flags '("GUILE_AUTO_COMPILE=0") ;to prevent guild warnings From patchwork Fri Jun 7 13:44:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felix Lechner X-Patchwork-Id: 65236 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 48D3927BBE2; Fri, 7 Jun 2024 14:48:14 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable 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 21B8327BBEA for ; Fri, 7 Jun 2024 14:48:12 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sFZwb-0002XY-Pg; Fri, 07 Jun 2024 09:47:49 -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 1sFZwa-0002XP-HK for guix-patches@gnu.org; Fri, 07 Jun 2024 09:47:48 -0400 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 1sFZwa-0007CN-8T; Fri, 07 Jun 2024 09:47:48 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sFZwo-0007e0-QK; Fri, 07 Jun 2024 09:48:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#54165] [PATCH v2 2/2] gnu: guile-bytestructures: add patch. (Closes: #54165) Resent-From: Felix Lechner Original-Sender: "Debbugs-submit" Resent-CC: ludo@gnu.org, guix-patches@gnu.org Resent-Date: Fri, 07 Jun 2024 13:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54165 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 54165@patchwise.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= , Taylan Kammer , Felix Lechner , Ludovic =?utf-8?q?Court=C3=A8s?= X-Debbugs-Original-Xcc: Ludovic =?utf-8?q?Court=C3=A8s?= Received: via spool by 54165-submit@debbugs.gnu.org id=B54165.171776807729360 (code B ref 54165); Fri, 07 Jun 2024 13:48:02 +0000 Received: (at 54165) by debbugs.gnu.org; 7 Jun 2024 13:47:57 +0000 Received: from localhost ([127.0.0.1]:58414 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sFZwj-0007dR-5Q for submit@debbugs.gnu.org; Fri, 07 Jun 2024 09:47:57 -0400 Received: from sail-ipv4.us-core.com ([208.82.101.137]:53056) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sFZwf-0007cy-7G for 54165@debbugs.gnu.org; Fri, 07 Jun 2024 09:47:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=2017; bh=Hi+RA7HckCr0HXh Hm5YhGEh25t5alTUiElEWHlhrM/U=; h=references:in-reply-to:date:subject: cc:to:from; d=lease-up.com; b=jKH6sLk7g/NWgWdVCOp9su7+XUpkOkpzfejnwq7M gES9G7AXu/DvXjdmOthRagc/Wdkn++4R4unT5dze9wL3lOOdIskf546VWCYTbVoSdoBdZw nnoNXELn1HYjj5kStvx/7J98+IzjMgBqtSrflO9XFyqJgXoAcHCi6EGpu9Cko= Received: by localhost (OpenSMTPD) with ESMTPA id 27dd4d28 for <54165@debbugs.gnu.org>; Fri, 7 Jun 2024 13:47:36 +0000 (UTC) Delivered-To: 54165@patchwise.org DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=2017; bh=Hi+RA7HckCr0HXh Hm5YhGEh25t5alTUiElEWHlhrM/U=; h=references:in-reply-to:date:subject: cc:to:from; d=lease-up.com; b=jKH6sLk7g/NWgWdVCOp9su7+XUpkOkpzfejnwq7M gES9G7AXu/DvXjdmOthRagc/Wdkn++4R4unT5dze9wL3lOOdIskf546VWCYTbVoSdoBdZw nnoNXELn1HYjj5kStvx/7J98+IzjMgBqtSrflO9XFyqJgXoAcHCi6EGpu9Cko= Received: by sail-ipv4.us-core.com (OpenSMTPD) with ESMTPSA id 67c7b5e1 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Fri, 7 Jun 2024 13:47:36 +0000 (UTC) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id a090640d; Fri, 7 Jun 2024 13:47:35 +0000 (UTC) Date: Fri, 7 Jun 2024 06:44:56 -0700 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: <87mti97vj9.fsf@gnu.org> References: <87mti97vj9.fsf@gnu.org> MIME-Version: 1.0 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: Felix Lechner X-ACL-Warn: , Felix Lechner via Guix-patches X-Patchwork-Original-From: Felix Lechner via Guix-patches via From: Felix Lechner 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 Adds the patch from a pull request recently submitted upstream. [1] The maintainer has not responded yet, so there could be further updates as time goes on. With this commit, nyacc 1.08.1 builds successfully.. [1] https://github.com/TaylanUB/scheme-bytestructures/pull/48 Change-Id: I8cd248e6e33efd36f54ca3b31c17badf54a863c5 --- gnu/packages/guile.scm | 3 +- .../guile-bytestructures-fix-54165.patch | 92 +++++++++++++++++++ 2 files changed, 94 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/guile-bytestructures-fix-54165.patch diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm index 0bbd4a12ad..f7ef0dceff 100644 --- a/gnu/packages/guile.scm +++ b/gnu/packages/guile.scm @@ -796,7 +796,8 @@ (define-public guile-bytestructures (file-name (git-file-name name version)) (sha256 (base32 - "1gnh3p2042cch1nkapl0p4pv20q7qs8cxvvbp7a5h1dwqbrkdyss")))) + "1gnh3p2042cch1nkapl0p4pv20q7qs8cxvvbp7a5h1dwqbrkdyss")) + (patches (search-patches "guile-bytestructures-fix-54165.patch")))) (build-system gnu-build-system) (arguments `(#:make-flags '("GUILE_AUTO_COMPILE=0") ;to prevent guild warnings diff --git a/gnu/packages/patches/guile-bytestructures-fix-54165.patch b/gnu/packages/patches/guile-bytestructures-fix-54165.patch new file mode 100644 index 0000000000..b91ca36df4 --- /dev/null +++ b/gnu/packages/patches/guile-bytestructures-fix-54165.patch @@ -0,0 +1,92 @@ +From 5082cdd2529f13286509a525a28f9d9917456fc1 Mon Sep 17 00:00:00 2001 +From: Felix Lechner +Date: Fri, 7 Jun 2024 04:51:17 -0700 +Subject: [PATCH] Fix alignment in unpacked structs containing unions. (Closes: + #47) + +The 2.0.1 release suffered from a test failure [1] that caused some +distributions to disable the test [2] but the underlying cause had yet +to be identified. + +Based on a preliminary review of the code, the author of this commit +believes there was a surplus line in the code [3] which is deleted +here. This is the proposed evidence: The line shadowed the +'alignment' variable in line immediately above it. [4] Then, the same +expression was used two lines down below. [5] In combination, the line +being removed here seems to have been left over from editing under +time pressure. It may also have been added inadvertently. + +On GNU Guix, this commit fixes the 'ref1' test for aligned struct +bytestructures containing union members, which was referenced via +"run-tests.body.scm:194: FAIL ref1" in Ludo's original report. [6] The +test output can be found at the bottom of this message. + +This commit closes Github issue #47. [7] + +[1] https://issues.guix.gnu.org/54165#1 +[2] https://github.com/alpinelinux/aports/commit/2d8604645ca38552343c61fbc65728a2881e6ddd +[3] https://github.com/TaylanUB/scheme-bytestructures/blob/a6d5d25b26c0c5ef1f5fa38e2472fbf6a32cdf89/bytestructures/body/struct.scm#L110 +[4] https://github.com/TaylanUB/scheme-bytestructures/blob/a6d5d25b26c0c5ef1f5fa38e2472fbf6a32cdf89/bytestructures/body/struct.scm#L109 +[5] https://github.com/TaylanUB/scheme-bytestructures/blob/a6d5d25b26c0c5ef1f5fa38e2472fbf6a32cdf89/bytestructures/body/struct.scm#L112 +[6] https://github.com/TaylanUB/scheme-bytestructures/blob/a6d5d25b26c0c5ef1f5fa38e2472fbf6a32cdf89/run-tests.body.scm#L194 +[7] https://github.com/TaylanUB/scheme-bytestructures/issues/47 + +* * * + +Group begin: aligned +Test begin: + test-name: "ref1" + source-file: "run-tests.body.scm" + source-line: 194 + source-form: (test-eqv "ref1" 321 (bytestructure-ref bs (quote a))) +Test end: + result-kind: pass + actual-value: 321 + expected-value: 321 +Test begin: + test-name: "ref2" + source-file: "run-tests.body.scm" + source-line: 196 + source-form: (test-eqv "ref2" 456 (bytestructure-ref bs (quote b))) +Test end: + result-kind: pass + actual-value: 456 + expected-value: 456 +Test begin: + test-name: "set1" + source-file: "run-tests.body.scm" + source-line: 197 + source-form: (test-eqv "set1" 789 (begin (bytestructure-set! bs (quote a) 789) (bytestructure-ref bs (quote a)))) +Test end: + result-kind: pass + actual-value: 789 + expected-value: 789 +Test begin: + test-name: "set2" + source-file: "run-tests.body.scm" + source-line: 199 + source-form: (test-eqv "set2" 987 (begin (bytestructure-set! bs (quote b) 987) (bytestructure-ref bs (quote b)))) +Test end: + result-kind: pass + actual-value: 987 + expected-value: 987 +Group end: aligned +--- + bytestructures/body/struct.scm | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/bytestructures/body/struct.scm b/bytestructures/body/struct.scm +index 07797b5..0113a17 100644 +--- a/bytestructures/body/struct.scm ++++ b/bytestructures/body/struct.scm +@@ -107,7 +107,6 @@ + (let ((descriptor (cadr field-spec))) + (bytestructure-descriptor-size descriptor))) + (let* ((alignment (apply max (map field-spec-alignment field-specs))) +- (alignment (pack-alignment pack alignment)) + (size (apply max (map field-spec-size field-specs))) + (position (align position size (pack-alignment pack alignment)))) + (let loop ((field-specs field-specs) +-- +2.41.0 +