From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id gIy1M0keC2Qg/gAASxT56A (envelope-from ) for ; Fri, 10 Mar 2023 13:10:49 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id UMPCM0keC2QfJwAA9RJhRA (envelope-from ) for ; Fri, 10 Mar 2023 13:10:49 +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 9FC5FEC8E for ; Fri, 10 Mar 2023 13:10:49 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=ECMW7mtz; 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=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=1678450249; 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=KdGCUy7uza2hNlqdj+iZSzz2fkcinNd8dbLWbOMG6Jg=; b=X/Q+8cSjLi6ffxpBpY9vL6AEn4iKNBCoCGmjwMC1RQSono6HfAGavP/lFfhh0qmsZVFXpo eQU62q968oJnIUGKsp3S42XOouY4VDUtWwwWzyvwTpn2Tyj30BSYXKIB/r0/oyyxTDjs77 VHnMevY9O0uT1XKn1zwKAvrTRVPFW6Psh5PoPQ2U4lAnda7/rgjEeHUoTZdWJxsXltHyvd ZHzloHwIe8y0AhT8V/QRFUYqR/X56elZCcjioqth+T5l9g3MdeqaGtp2gA0Nrm+SeoMMFl HDfnM4zUTvF6ZvWzxa2nNZlGD+JM7Qpkhnb7u0cfU/cZB21apG8nWp0eY/tYig== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1678450249; a=rsa-sha256; cv=none; b=JNt3r9Qhv/sH7dD3JYy+otXaYVjB3ogeziVbUjVfagrK7VuxbYb/aUGQeLIJY80iZqnk5z QbXctCmP7zWUfmpys78a8rY6ZMadu1hWohN+a/IQlEgev1hsItEgsi5yaXQ+TKn75yZVnT 4Kqt+w6SgLsZ9MTxFUBRNsRLEe0urSKbZbpJJbqi+DjPAvfRABYRePSpsst8UNcifXtiv6 3u/XI7twLlABVzPyDhr0faJcjHM7kNvEKAsb6zhHiIZxMl7Au9GzDS+4KofGCYJbY7IEWS ab4pQGEBGKX6Ajxz7eRRSrwVMeyS8DQRxAQAp4HodPGJrYT1/cYaMxNUc2V/dg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=ECMW7mtz; 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=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pabZZ-0002hM-KD; Fri, 10 Mar 2023 07:10:09 -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 1pabZS-0002fr-Th for guix-patches@gnu.org; Fri, 10 Mar 2023 07:10: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 1pabZS-0003aq-Kh for guix-patches@gnu.org; Fri, 10 Mar 2023 07:10:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pabZS-0005YL-HP for guix-patches@gnu.org; Fri, 10 Mar 2023 07:10:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#62036] [PATCH] guix: packages: Consider 'patches' by 'package-direct-sources'. Resent-From: Simon Tournier Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 10 Mar 2023 12:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62036 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Josselin Poiret , 62036@debbugs.gnu.org Cc: Ricardo Wurmus , Mathieu Othacehe , ludo@gnu.org, Tobias Geerinckx-Rice , Christopher Baines Received: via spool by 62036-submit@debbugs.gnu.org id=B62036.167845016421244 (code B ref 62036); Fri, 10 Mar 2023 12:10:02 +0000 Received: (at 62036) by debbugs.gnu.org; 10 Mar 2023 12:09:24 +0000 Received: from localhost ([127.0.0.1]:53931 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pabYp-0005WN-Ej for submit@debbugs.gnu.org; Fri, 10 Mar 2023 07:09:24 -0500 Received: from mail-wm1-f42.google.com ([209.85.128.42]:36861) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pabYn-0005Vn-18 for 62036@debbugs.gnu.org; Fri, 10 Mar 2023 07:09:21 -0500 Received: by mail-wm1-f42.google.com with SMTP id j19-20020a05600c191300b003eb3e1eb0caso5843302wmq.1 for <62036@debbugs.gnu.org>; Fri, 10 Mar 2023 04:09:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678450155; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=KdGCUy7uza2hNlqdj+iZSzz2fkcinNd8dbLWbOMG6Jg=; b=ECMW7mtzcrFhH1EMkR5Pzlq0fTWeBcoX1vxyTPUUrXXUakK3b63XJERoCb5N+Qlxrx EdhGLnw93zYLoTCdWP4V9T0RQEpSmY1bhKkSaVZf1OvfeO2k9t1aAkLo1dMgyiswQfHK uuWEMntpRCq4UOD79lq3+4LQBWeWXifQentX3yb/BXmGPrOrubtm84uKEhxkWd/2MhGU 539JvbX74asInrjTqbiCPLHorIo+Bq6LvohQJA6e/tvt5bw8KoIA6GvKc5EkL2AIkxcN LeFZ+zf4NUw1nInl+7oytnmyu7+hQklJi/vkn1toDI4xr2v9eIRCD1DFoTkEBylDpv5G E8WQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678450155; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KdGCUy7uza2hNlqdj+iZSzz2fkcinNd8dbLWbOMG6Jg=; b=ecA8BYUh6X5UGVwdpeG1BlNr549LRS+FOGYP+79PdVZWrKQKBOSHa3IvGs7X0uBNZS COA3ybG8C+50J/Pwfj83ft+Yq5VjsUnGS6cxXgUN7WFNFaK/ZCgl3HGnFSY6v87LNdE6 thImHOYDAEyXB5QhF3+tGzHrjIivbDPvpjA34zulrMj4pJ5/DKIf2g/B+6v8CGsTp9yL k3NGQgfeB17T18M/7d30+hOvW6B+9avpMKwQSTJCkFKQ7jat9QiK6bLUPvlyHlJZoHMJ FCvESK7Sg+T2HGRcDOY6quCgc5yxfeSZYr0iVUCFA5QpEo8EEtmHAxd4sCbyPyUw7UhJ 7UqQ== X-Gm-Message-State: AO0yUKWec1lzHrFBjC5LrjogQ85MMbGFDgfKDgACRdhchWRafQcF5tLc UQTuINkF4FPr7xNI+3izX9o= X-Google-Smtp-Source: AK7set/qayeoKXuTYxKNb75AoyGprlyK1nCaCGyDVhxsEZLalQ8a7l+3RgTCBevY/bkEu5Bhsra4cw== X-Received: by 2002:a05:600c:3b15:b0:3eb:3986:9c03 with SMTP id m21-20020a05600c3b1500b003eb39869c03mr2254294wms.4.1678450154733; Fri, 10 Mar 2023 04:09:14 -0800 (PST) Received: from pfiuh07 ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id v8-20020a5d6108000000b002c5804b6afasm1993911wrt.67.2023.03.10.04.09.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Mar 2023 04:09:14 -0800 (PST) From: Simon Tournier In-Reply-To: <87lek5d82p.fsf@jpoiret.xyz> References: <20230307171833.4170067-1-zimon.toutoune@gmail.com> <87lek5d82p.fsf@jpoiret.xyz> Date: Fri, 10 Mar 2023 12:33:06 +0100 Message-ID: <87jzzoon7x.fsf@gmail.com> 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: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: X-Migadu-Scanner: scn0.migadu.com X-Migadu-Queue-Id: 9FC5FEC8E X-Spam-Score: 4.81 X-Migadu-Spam-Score: 4.81 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-Flow: FLOW_IN X-Migadu-Country: US X-TUID: gq12yVHGfb2r Hi Josselin, On jeu., 09 mars 2023 at 20:43, Josselin Poiret via Guix-patches via wrote: >> + (append >> + (list source) >> + (filter origin? (origin-patches source)))) > > * cough * (cons source (filter ...)) * cough * Ahah! Somehow I removed from my mental toolbox cons, car and cdr because I am spending too much time explaining to non-lispers. :-) Thanks for showing me the light. ;-) > Other than that, LGTM! Tests worked fine on my end. No idea what this > is used for though :p For instance, it can be used to list all the =E2=80=99origin=E2=80=99 of a = package. Consider the package =E2=80=99tensorflow=E2=80=99, it reads, --8<---------------cut here---------------start------------->8--- (native-inputs [...] ;; The commit hashes and URLs for third-party source code are taken ;; from "tensorflow/workspace.bzl". ("boringssl-src" ,(let ((commit "ee7aa02") (revision "1")) (origin (method git-fetch) (uri (git-reference (url "https://boringssl.googlesource.com/boringssl") --8<---------------cut here---------------end--------------->8--- where some inputs are not packages but just =E2=80=99origin=E2=80=99. Ther= efore, the procedure allows to get all the =E2=80=99origin=E2=80=99, the one from the = field =E2=80=99origin=E2=80=99 and also the ones from inputs. --8<---------------cut here---------------start------------->8--- scheme@(guix-user)> ,use(gnu packages machine-learning) scheme@(guix-user)> ,pp (map origin-uri (package-direct-sources tensorflow)) $1 =3D (#< url: "https://github.com/tensorflow/tensorflow" c= ommit: "v1.9.0" recursive?: #f> #< url: "https://boringssl.googlesource.com/boringssl" comm= it: "ee7aa02" recursive?: #f> [...] --8<---------------cut here---------------end--------------->8--- For some packages as =E2=80=99ntp=E2=80=99, the patches are also a list of = =E2=80=99origin=E2=80=99, --8<---------------cut here---------------start------------->8--- (origin (method url-fetch) (uri (list (string-append "https://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-" [...] ;; Add an upstream patch to fix build with GCC 10. Taken from ;; . (patches (list (origin (method url-fetch) (uri "https://bugs.ntp.org/attachment.cgi?id=3D1760= &action=3Ddiff&context=3Dpatch&collapsed=3D&headers=3D1&format=3Draw") [...] --8<---------------cut here---------------end--------------->8--- and the patch allows to also extract them: --8<---------------cut here---------------start------------->8--- scheme@(guix-user)> ,use(gnu packages ntp) scheme@(guix-user)> ,pp (map origin-uri (package-direct-sources ntp)) $2 =3D (("https://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-4.2.8p= 15.tar.gz" "http://archive.ntp.org/ntp4/ntp-4.2/ntp-4.2.8p15.tar.gz") "https://bugs.ntp.org/attachment.cgi?id=3D1760&action=3Ddiff&context=3Dpat= ch&collapsed=3D&headers=3D1&format=3Draw" "https://bugs.ntp.org/attachment.cgi?id=3D1814&action=3Ddiff&collapsed=3D&= headers=3D1&format=3Draw") --8<---------------cut here---------------end--------------->8--- This way it improves the coverage with Software Heritage. All the source code (origin) is extracted and feed some SWH loader. The code is there: https://git.savannah.gnu.org/cgit/guix/maintenance.git/tree/hydra/build-pac= kage-metadata.scm#n58 Cheers, simon