From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id uJomDv7C+GNDtAAAbAwnHQ (envelope-from ) for ; Fri, 24 Feb 2023 15:00:30 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id aLMrDv7C+GODBAEA9RJhRA (envelope-from ) for ; Fri, 24 Feb 2023 15:00:30 +0100 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 D569736F34 for ; Fri, 24 Feb 2023 15:00:29 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=RAypA9Wk; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1677247230; a=rsa-sha256; cv=none; b=kdmob3+vVC7zUnLIuDGoQkGBvfbgyqJM3h87SN8HDxpbk7uKkwbn9gxv1+K6zAJ+Dz33K1 gHgUPbdEndYhQeUBNat6C4MruUpNKDfHDIRlYcB6xV9HcZI96Gpir+HfSjDOT7br4zXsl4 wZzN6w5DiKxNRxaZZyUTDRmtaUnHnY2/kDWWKyO7L1YRmtLIleS4AD4kpzkdLl19DKetKl SfFpWqkgEcDMjS/qzyrwIloOBVSVHKsnNVDLExDmYKeedGrM265kQqHIQ8iOUnUWoJOUYo YvwCQIqGeNo8q7jzSgR2+cTSWu7SEIFtBQuWUfHKkTTXIeHk7R07LXRR/XI6Tg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=RAypA9Wk; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1677247230; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: 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=cW1kDcM9FnQppBFRKi3LH4srgJKmdBpX3Jc6bKkyY5E=; b=KhvyrERcZVUnCZ1PCp771hXl0K22jRsynQvQoLbYxxqLi2A7ucFsqGOPWIqbCvreIIL1Q0 T07BvsMTCiE64wt9J2M5rbKKItVRtiXuzjOc+cPVbqQ20VPm6Q06poxeiPQX8OSGJk/T+z 6ajOyElLpsTzSY4nCj3z8+0QxQLM72zB+t4GtAEs6XWp7snWahu2zVxLUyAbrY0TzpOQ/v QDdkiclAF3Ekvf4KuXrxoxZvW6siq8d/KxCgpzQFSBccpB8emZYNV6bhnpMHNMG1uDuBKz oEiErqpWvya8yuCqouLt/Qwj+XQf+456eGwwrNLM8n6PkY2s1fk1EVfvd2fRDw== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVYcH-0007Is-6L; Fri, 24 Feb 2023 09:00:05 -0500 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 1pVYcF-0007IL-1n for bug-guix@gnu.org; Fri, 24 Feb 2023 09:00:03 -0500 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 1pVYcE-0006Jh-OP for bug-guix@gnu.org; Fri, 24 Feb 2023 09:00:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pVYcE-0006nX-Hx for bug-guix@gnu.org; Fri, 24 Feb 2023 09:00:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#61684: can't compose 'with-patch' with 'with-source' Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 24 Feb 2023 14:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61684 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 61684@debbugs.gnu.org Received: via spool by 61684-submit@debbugs.gnu.org id=B61684.167724716926053 (code B ref 61684); Fri, 24 Feb 2023 14:00:02 +0000 Received: (at 61684) by debbugs.gnu.org; 24 Feb 2023 13:59:29 +0000 Received: from localhost ([127.0.0.1]:36358 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVYbg-0006m8-JH for submit@debbugs.gnu.org; Fri, 24 Feb 2023 08:59:29 -0500 Received: from mail-qt1-f171.google.com ([209.85.160.171]:47024) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVYbe-0006lw-Tb for 61684@debbugs.gnu.org; Fri, 24 Feb 2023 08:59:27 -0500 Received: by mail-qt1-f171.google.com with SMTP id c19so4119275qtn.13 for <61684@debbugs.gnu.org>; Fri, 24 Feb 2023 05:59:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=cW1kDcM9FnQppBFRKi3LH4srgJKmdBpX3Jc6bKkyY5E=; b=RAypA9Wkaji42QMq9CUfV2HVTN8GeZ7lwMDG6H6x8xkghvmP4iA3HfniwBfAKX4JHl UUaLsdFvM+hAAIga680vKdnHqvTjTUHYbH0V4gtgDuCbxERX2eWjzdu7gujRntfCyCCM sIX5zLVKa2r5UxCdRda0ti4s2LeScaQJfs9IGWYmNkHSBHSxSsX9OztFozbIZDtmba74 flCwe1SyXysQSckTXpxIE5eh67yUPRNAcwj2VlaqlVk8/rZ3fWM2hVhB5AKuc1a5qbss GH1prqgSttHtU3XYIeMQKiv95Arb16rXK2sCZDE/bPwn3veBdF5mvHYtDv7OiwJ5jmf9 Z1SA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=cW1kDcM9FnQppBFRKi3LH4srgJKmdBpX3Jc6bKkyY5E=; b=mB0VbICTwcubyhLghUGKpQvCdt1bmIE5R4aY7hBQFCbpZFLv41+xEwAn90FJW4DjUX L0RgmPWdQnrsguoAHXZCCu6fNLyGuVQECYxdmiyEhYoZo9E/PGjSnaKwnHmck44zgzLJ /F/MR3ti0nEamFP+3gwy9J6vKsL0Pa7PgXXfV8iJ/tOhdt2kB62spsoCgJTwyHtVgQcD 2za7+hhtDI1iPI8heqoh9UHyz/fBoLdUQ/puilB8ueUo+6sRVVu62KjaV3v9OuK5yuiu xjhrpKZxYkl525gcS0B3wQqApJ+M/115JWyBzJbiFyuiWWebfQ9nj9ISuJ9MAov3lBbq +u6A== X-Gm-Message-State: AO0yUKU5IW67pcjCk3J1DZQMrMuUbdH8+BDFYy7G6HC9UN8Grd0TrhHR SC1ZiskCbdMLFFE0IgAW7WH9PYckurpIOg== X-Google-Smtp-Source: AK7set9DVUrn/fw0sB+HHAN0LSb4Mbgs9Dd3C+NBdpd1aM6qVZvSwI+Fi8Ke2mLW5YRkQShfRUCXRQ== X-Received: by 2002:a05:622a:389:b0:3bd:1835:b00f with SMTP id j9-20020a05622a038900b003bd1835b00fmr26681548qtx.20.1677247160991; Fri, 24 Feb 2023 05:59:20 -0800 (PST) Received: from hurd (dsl-141-27.b2b2c.ca. [66.158.141.27]) by smtp.gmail.com with ESMTPSA id o186-20020a375ac3000000b0073b45004754sm3877889qkb.34.2023.02.24.05.59.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Feb 2023 05:59:20 -0800 (PST) From: Maxim Cournoyer References: <87mt56gac6.fsf@gmail.com> <871qmg79u7.fsf@gnu.org> Date: Fri, 24 Feb 2023 08:59:19 -0500 In-Reply-To: <871qmg79u7.fsf@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Thu, 23 Feb 2023 15:08:48 +0100") Message-ID: <877cw7go5k.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: X-Migadu-Queue-Id: D569736F34 X-Spam-Score: -2.38 X-Migadu-Spam-Score: -2.38 X-Migadu-Scanner: scn0.migadu.com List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-TUID: WGHhHZ2YCsEn Hi Ludovic, Ludovic Court=C3=A8s writes: > Hi Maxim, > > Maxim Cournoyer skribis: > >> Given 'with-source' discards any patch from the original source, I thoug= ht >> I could at least add them back via 'with-patch', but it appears this >> does not work: >> >> scheme@(gnu packages jami)> (options->transformation >> `((with-source . "libjami@20230220.0=3D/hom= e/maxim/src/jami/jami-20230220.0.tar.gz") >> (with-patch . ,(string-append >> "libjami=3D" (search-patch >> "jami-disable= -integration-tests.patch"))))) >> $6 =3D # >> scheme@(gnu packages jami)> ($6 libjami) >> $7 =3D # >> scheme@(gnu packages jami)> (package-source $7) >> $8 =3D #< uri: "/home/maxim/src/jami/jami-20230220.0.ta= r.gz" recursive?: #t> >> scheme@(gnu packages jami)> >> >> The downloaded-file resulting package source has lost the patch, and no >> error got produced, leaving the user to discover this limitation by >> themselves. > > The order of options matters; in this case, you need to do it the other > way around: > > scheme@(guile-user)> (options->transformation '((with-patch . "jami=3D/tm= p/t.patch") > (with-source . "jami=3Dhttp://example.org/foo.tar.gz"))) > $18 =3D # > scheme@(guile-user)> ($18 jami) > $19 =3D # > scheme@(guile-user)> (package-source $19) > $20 =3D #< name: "jami-20230206.0-source" gexp: # guile: #f options: (#:local-bui= ld? #t)> > > The bit comes from the =E2=80=98with-patch=E2=80=99 trans= formation, to > apply the patch to the . I tried to do that, like so: --8<---------------cut here---------------start------------->8--- (define (with-latest-sources name) (options->transformation ;; XXX: The ordering is important; with-patch must appear before ;; with-source, otherwise it is silently discarded. `(,@(if (string=3D? name "libjami") `((with-patch . ,(string-append name "=3D" (search-patch "jami-disable-integration-tests.patch"))) (with-patch . ,(string-append name "=3D" (search-patch "jami-libjami-headers-search.patch")))) '()) (with-source . ,(format #f "~a@~a=3D~a" name %release-version %release-file-name))))) (define libjami/latest ((with-latest-sources "libjami") libjami)) --8<---------------cut here---------------end--------------->8--- Unfortunately the source derivation fails because it attempts to apply a patch (a single one?) to a tarball: --8<---------------cut here---------------start------------->8--- (begin (use-modules (guix build utils)) (setenv "PATH" "/gnu/store/mp0syh29rjknflaiv0hkpdlb2mjk0rlx-patch-2.7.6/b= in") (copy-recursively "/gnu/store/ig8awlxbzrasp9p4f9vq8fqcidrma5qj-jami-20230= 224.0.tar.gz" ((@ (guile) getenv) "out")) (chdir ((@ (guile) getenv) "out")) (for-each (lambda (patch) (invoke "patch" "-p1" "--batch" "-i" patch)) (quote ("/gnu/store/iq7hd3f9kr2kvz7lvnygq51yxp85gxbn-jami-libjami-headers-sear= ch.patch")))) --8<---------------cut here---------------end--------------->8--- My expectation of the source rewriting options is that it should end up with something like what I'd write manually, e.g. an origin with an appropriate fetch method and its patches field populated, etc., so that it'd work the same. --=20 Thanks, Maxim