From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id uMm0N70ykWYXSwAA62LTzQ:P1 (envelope-from ) for ; Fri, 12 Jul 2024 13:42:22 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id uMm0N70ykWYXSwAA62LTzQ (envelope-from ) for ; Fri, 12 Jul 2024 15:42:21 +0200 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=1720791741; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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; bh=L9PCK78WSVhL+JaymOKOilk4Fj2qh/LFljG9uaOE5o4=; b=t8eR03EUAq4FAjPEc3IaW7daeKCxomPkle268J8j47C27tqujrgEA5UYH/GYOJSiF5IOEJ iTfWxCJyWu+HwRRR6xAfGNH20vZkm3+FBePGHOZrsnDhlaPq0Ocyj0qywO42olYzp+NyvC SaJUqPv0RhAN6Z4+oULHRTA5weuW0/KpLNTY0gZm0nvWD5npxVpyPkm0DJb9bRrny2/dTG oy21wpiZ7iwi5XA+W/ksjpUkDrOfnK5hW58gFfRPkFxymToqd6LvTRVU4UMog9RsuLLq8j Eee6aaAVsC6Ot4Z54AAowATcoD/5ccL93udUp93JZbWV83OrEz+vxgXUELtL/w== 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 ARC-Seal: i=1; s=key1; d=yhetil.org; t=1720791741; a=rsa-sha256; cv=none; b=tRpfT7OHGiA/OyI5YUXPZTmc+hX04t3Ia8RGCDjV6Z+Q/kw89m/uUfqdPQru3LnmIuXW5o x1rGCRxh5IWJOZRo/7gfOb4Cx9Lk3zL/os3YXMQxXm/R+ixrAjrognKzTwdDGqj24KRAgs zOAUep8Yo5Jej9d4kXaRv6BTvpa1y0PDG/pvvaLB1uBx5W6KmCgLpQt3P3Ot30uCSoWQRP mefC79aaU0uCi9W0Udw2E5XS2bX99Twnnu6aRsWNFzo8OKdwE4d0FCYmnwyZK5g85VfD5q NnQSJSN8haO5TkWOeNRiGywju95Nrqy0VGu+gxbFpW2jeJxhDr2fd3AX2RaQrA== 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 B8D333F369 for ; Fri, 12 Jul 2024 15:42:21 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sSGXF-00030U-NW; Fri, 12 Jul 2024 09:42:05 -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 1sSGXD-0002s1-KP for guix-patches@gnu.org; Fri, 12 Jul 2024 09:42:03 -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 1sSGXD-0001O5-9N for guix-patches@gnu.org; Fri, 12 Jul 2024 09:42:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sSGXD-0001E7-8I for guix-patches@gnu.org; Fri, 12 Jul 2024 09:42:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70985] [PATCH v3 2/6] gnu: tls: Raise conditions from target->openssl-target. Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 12 Jul 2024 13:42:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70985 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70985@debbugs.gnu.org Received: via spool by 70985-submit@debbugs.gnu.org id=B70985.17207917144671 (code B ref 70985); Fri, 12 Jul 2024 13:42:03 +0000 Received: (at 70985) by debbugs.gnu.org; 12 Jul 2024 13:41:54 +0000 Received: from localhost ([127.0.0.1]:53514 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sSGX3-0001DA-LB for submit@debbugs.gnu.org; Fri, 12 Jul 2024 09:41:53 -0400 Received: from mira.cbaines.net ([212.71.252.8]:43940) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sSGWy-0001CM-OW for 70985@debbugs.gnu.org; Fri, 12 Jul 2024 09:41:51 -0400 Received: from localhost (unknown [213.31.211.195]) by mira.cbaines.net (Postfix) with ESMTPSA id 02C7427BBE9 for <70985@debbugs.gnu.org>; Fri, 12 Jul 2024 14:41:46 +0100 (BST) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id 4d6ee562 for <70985@debbugs.gnu.org>; Fri, 12 Jul 2024 13:41:46 +0000 (UTC) From: Christopher Baines Date: Fri, 12 Jul 2024 14:41:41 +0100 Message-ID: <4d8b7bd0e26cfda50e1f772ae9541b97d1c3c128.1720791705.git.mail@cbaines.net> X-Mailer: git-send-email 2.45.2 In-Reply-To: <7783ce71e892ea74f025323e0a4d323ee8e720fc.1720791705.git.mail@cbaines.net> References: <7783ce71e892ea74f025323e0a4d323ee8e720fc.1720791705.git.mail@cbaines.net> 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: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Queue-Id: B8D333F369 X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: -4.90 X-Spam-Score: -4.90 X-TUID: 6jBOIlUk0imy Rather than rasising generic errors. * gnu/packages/tls.scm (target->openssl-target): Raise conditions rather than generic errors. (openssl-1.1): Call target->openssl-target with the package. Change-Id: I13c63328cdf6bc177b20879805246ad94ff2665b --- gnu/packages/tls.scm | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index 760b917768..fdc003731d 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -84,7 +84,9 @@ (define-module (gnu packages tls) #:use-module (gnu packages time) #:use-module (gnu packages version-control) #:use-module (gnu packages base) - #:use-module (srfi srfi-1)) + #:use-module (srfi srfi-1) + #:use-module (srfi srfi-34) + #:use-module (srfi srfi-35)) (define-public libtasn1 (package @@ -390,7 +392,7 @@ (define-public guile2.2-gnutls (modify-inputs (package-inputs guile-gnutls) (replace "guile" guile-2.2))))) -(define (target->openssl-target target) +(define (target->openssl-target pkg target) "Return the value to set CONFIGURE_TARGET_ARCH to when cross-compiling OpenSSL for TARGET." ;; Keep this code outside the build code, @@ -411,7 +413,10 @@ (define (target->openssl-target target) ((target-linux? target) "linux") (else - (error "unsupported openssl target kernel")))) + (raise (condition + (&package-unsupported-target-error + (package pkg) + (target target))))))) (arch (cond ((target-x86-32? target) @@ -438,7 +443,10 @@ (define (target->openssl-target target) ((target-64bit? target) "generic64") (else - (error "unsupported openssl target architecture"))))) + (raise (condition + (&package-unsupported-target-error + (package pkg) + (target target)))))))) (string-append kernel "-" arch)))) (define-public openssl-1.1 @@ -488,6 +496,7 @@ (define-public openssl-1.1 (setenv "CROSS_COMPILE" (string-append target "-")) (setenv "CONFIGURE_TARGET_ARCH" #$(target->openssl-target + this-package (%current-target-system)))))) #~()) #$@(if (target-hurd?) -- 2.45.2