From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id SGHXKZwPY2YGewEAqHPOHw:P1 (envelope-from ) for ; Fri, 07 Jun 2024 15:48:12 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id SGHXKZwPY2YGewEAqHPOHw (envelope-from ) for ; Fri, 07 Jun 2024 15:48:12 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=lease-up.com header.s=2017 header.b=jKH6sLk7; dkim=fail ("headers rsa verify failed") header.d=lease-up.com header.s=2017 header.b=jKH6sLk7; 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=1717768092; 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=lnvlIBtb4qDCdxs5fewZcWPbXbooqJ+atBmuc//fqqY=; b=R0mc4lasdQ+vbH4nNOfDboijMS5L3TaQW/9I/jHp8upXQJyAEsK0nO+oChdfaVG3nYkIDZ phBpIt3k22MMVVomyyjgKa/gKoDfVFLDgR9eIeuLBz/SMcOy3P1UJcjsVIGdhxpwQBANuY /c0z4bwKjdwSE8pYldA0AMOUTm2fBwIE/G/jTjZFjViNJvByIhP6u1gC40eqaLAiYAq4Kd as9qaXi4cEiaS81cWaXjwJnlw8hy/IwpiToRHlP6RJVxAYKooohCipckBn3ymyo3/yQPMB dujNg84h09FvAHaiXNACIAQQK0+NBdO9zYDXKZg6XHIM0FCdoH1W/eJrkxxc0g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1717768092; a=rsa-sha256; cv=none; b=Abb838PYRMZErv7PohjbxVU/RsDlJEad5W7uMRKOeaqjU5YvuSgzbfQlQ9HXrN6DLXijhn QkR6vetGWwp7fPJ7KXkCLlSWo5hPSyykHpt1nFQgf6E81Ds3aQtBSs3ByuQ5LySt1JaIuo IvT/k0/hraAeW3YHZD3J9iB/LDo2lrNwBsWQ9tV8ah96W44yu8F5g35b7c8Wk1UtawU9Ew mBmdPPf5JX86XuNXprYUvGnTrkYI2gm83weU6LESyrEPm5uORy+RslD9BZIp2ACqbSQSrP RGL76rXR9s6xJAIz9AwusT6oBVanvAaIrYbonBGZeZGPonrwQ+C6mQGSNz0sfg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=lease-up.com header.s=2017 header.b=jKH6sLk7; dkim=fail ("headers rsa verify failed") header.d=lease-up.com header.s=2017 header.b=jKH6sLk7; 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" 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 2C53F94DE for ; Fri, 07 Jun 2024 15:48:12 +0200 (CEST) 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) 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 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: , Reply-to: Felix Lechner X-ACL-Warn: , Felix Lechner via Guix-patches From: Felix Lechner 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 X-Migadu-Spam-Score: -1.84 X-Spam-Score: -1.84 X-Migadu-Queue-Id: 2C53F94DE X-Migadu-Scanner: mx11.migadu.com X-TUID: VKjl59x+TF8Y 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 + -- 2.41.0