From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id wGQSIyFCOmE+0gAAgWs5BA (envelope-from ) for ; Thu, 09 Sep 2021 19:19:29 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id cOt2HiFCOmErOAAA1q6Kng (envelope-from ) for ; Thu, 09 Sep 2021 17:19:29 +0000 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 21AC222DE5 for ; Thu, 9 Sep 2021 19:19:29 +0200 (CEST) Received: from localhost ([::1]:36040 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mONhw-0000Xq-5h for larch@yhetil.org; Thu, 09 Sep 2021 13:19:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36882) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mONhU-0000XZ-8f for guix-devel@gnu.org; Thu, 09 Sep 2021 13:19:05 -0400 Received: from mail-qv1-xf29.google.com ([2607:f8b0:4864:20::f29]:43999) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mONhS-00006m-Fc; Thu, 09 Sep 2021 13:19:00 -0400 Received: by mail-qv1-xf29.google.com with SMTP id z2so1607413qvl.10; Thu, 09 Sep 2021 10:18:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=/jUjMUwycJCjcJS5dxRDlZ9aXoNW9UufQ5C6QXhNbqA=; b=KCSxGAGYb0/cvUHtBvFk98S/5548b9R5XUgQ64sP+Mr1WXBiGNHeGc8NYg1MKWV8e7 GShCRIneQAu26UTnAvuVO49V+DZg2FxmphsGMLk8sY4UNUBPT2BEbAF0V97Shrkj5rkB mdYhME1mMcTMspEFDggrpWCrE4mV5Jk1yNcEv3/uqgRP+J/CHao0sU3W4vgnqS5UIJ7c AmeimuexH32y3iqNZQzXme0jEFbHhEp8jZtvUJynnpYSEfvxkzPhpAEjN6xgOZ3A9/sO gHx8eXBXYA1HIB9QC+gv2aN+6nWtDTG0lcb1mkHHHv5pNNN7kAFChK8E2hnb5SlyjAwX fSIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=/jUjMUwycJCjcJS5dxRDlZ9aXoNW9UufQ5C6QXhNbqA=; b=7xu1h7pOc69vpPmJk+rtAt67IS0RgcWu7/WCIcExpmJuE+t58NWh1FMVJF6/9SdtKX o+/KtSSSNvntES6lmq5jMFfirXSMoSW1CWdnPPfUpRB1d+/CxuNU+CZ7T56iCHEJQnV3 jGOJkgPDgsz/Dgui4MupZjuDYZJIDxufg98ZhQDdxIhv3p6eoWEKfDMytYbRLjd2tWCm sRb9Wo8d5ZmaOdezNIfQQijRRy01J/mV7TDbJ6yWFf7+p0CEc+Arb35UYqsdLc003VEY DQ7g992iOLioL2K5BUsGhFA/7a3lQo76TIfn/lF2mry/3hjbDSExlh4Ls2gvSCSC5M6Z /llQ== X-Gm-Message-State: AOAM533yEJAkull5o2Dov41TfdONvShcj3mRKe80hOxO3QlRSa+ESx/B mVBKBMKJIHjsLGcQDh+PMYcTfIH51oI86A+rCC4= X-Google-Smtp-Source: ABdhPJymM2IhMfYksJeHzKu9uRKhvK7eDta94MTxPbZym1tZBBCzkY2w1PxY1PlKu3wfPrnrTFVWzTPIOX8Rsh3Z9l4= X-Received: by 2002:a05:6214:1268:: with SMTP id r8mr4106855qvv.5.1631207937101; Thu, 09 Sep 2021 10:18:57 -0700 (PDT) MIME-Version: 1.0 References: <877dfqhgny.fsf@gnu.org> <86tuiu8wc7.fsf@gmail.com> <86lf468ai5.fsf@gmail.com> <76c52829993400ffb1f85dd30a3d63844a45540e.camel@telenet.be> In-Reply-To: <76c52829993400ffb1f85dd30a3d63844a45540e.camel@telenet.be> From: zimoun Date: Thu, 9 Sep 2021 19:18:46 +0200 Message-ID: Subject: Re: Why linux-libre source code is not in sources.json To: Maxime Devos Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::f29; envelope-from=zimon.toutoune@gmail.com; helo=mail-qv1-xf29.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Guix Devel Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1631207969; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=/jUjMUwycJCjcJS5dxRDlZ9aXoNW9UufQ5C6QXhNbqA=; b=CYNfaai3gGRqcZz4omxxjFkYqiBGhQNzymUSP7nxSJXGbKhAGSbdtltkN6j6kCEwlUgIIp ih10OHTBvhsc7qG6VtPmc1rGDyKLjIJpzjIV4mqpl0FuisEmZXXyw21/gS008SvjxpfHU0 oGI9yB0KNcwXZC/nN2m/06aWMrSA6AxUmlvfGcIu9oIZDbpyfAvUDxvTaBz0VLaeWsbffa HU6VdMBKW61rXjCvhftXylGsutZGLy2ARTr3Ulhuoj0HMdprrFvIB7285olhAX8flbvajz bmuUR64woZ3ihMuexivMwlqVTTEjFfA5FKhO9ufwh6OewBNvsMPRWssDxF+y/w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1631207969; a=rsa-sha256; cv=none; b=Mlp1GZtfocJBLb36jtdsCabdq9wHMOw1z8zm9/9d7gHDeNC/YAxEvlg3DHbp3lBRm2MgRl XjLj4eBlEZ1jL/C6hoN6FbFzq0O19VqBd/DNwvmytoOnngDJH6WCx2ve+yh+lmO0u/3Ltw Uya6ya8oNLyUG7p1sURafA+TgI4Vxyk5C+uN3ioTXXfMPkQ8ZGl8bOFspyj5TJoR459GhE G0VJXkhOtJKHDADnq/io48718sozr6RvOryelGs8diEYisyDmwcpqRTyRi5rmWN50AiXEO Dnz6ViPbU2Vzm4dSmRmg6dZli48BCIIZ8ZaI1BCDDXvNVgRBUW/gXpBeIcIQ5g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=KCSxGAGY; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Spam-Score: -1.31 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=KCSxGAGY; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Queue-Id: 21AC222DE5 X-Spam-Score: -1.31 X-Migadu-Scanner: scn1.migadu.com X-TUID: PVAHn1Yp1WNX Hi, On Thu, 9 Sept 2021 at 11:51, Maxime Devos wrote: > > where =E2=80=99make-linux-libre-source=E2=80=99 returns a =E2=80=99comp= uted-origin-method=E2=80=99. And > > the =E2=80=99origin-uri=E2=80=99 of =E2=80=99linux-libre-5.14-pristine-= source=E2=80=99 is a =E2=80=99gexp=E2=80=99. > > Then inside this =E2=80=99gexp=E2=80=99, you can read the =E2=80=99%ups= tream-linux-source=E2=80=99 URL: > > > > --8<---------------cut here---------------start------------->8--- > > # > # > #"mirror://kernel.org/linux/kernel/v5.x/linux-5.13.14.tar.xz" > > # > > --8<---------------cut here---------------end--------------->8--- > > > > and I do not know if it is possible to extract such thing. > > To extract the from the , use gexp-input-thing. > To extract the from the , use the unexported > gexp-references. Thanks! It does the job. :-) I will fix sources.json if no one beats me. With the (ugly) snippet below, I get almost the linux-libre, I guess. The question is now how does SWH ingest the script with the URL: Another story. :-) Cheers, simon --8<---------------cut here---------------start------------->8--- $ guix repl /tmp/linux.scm | grep linux-libre (mirror://kernel.org/linux/kernel/v5.x/linux-5.13.14.tar.xz https://linux-libre.fsfla.org/pub/linux-libre/releases/5.13.14-gnu1/deblob-= check https://linux-libre.fsfla.org/pub/linux-libre/releases/5.13.14-gnu1/deblob-= 5.13) (mirror://kernel.org/linux/kernel/v5.x/linux-5.13.14.tar.xz https://linux-libre.fsfla.org/pub/linux-libre/releases/5.13.14-gnu1/deblob-= check https://linux-libre.fsfla.org/pub/linux-libre/releases/5.13.14-gnu1/deblob-= 5.13) (mirror://kernel.org/linux/kernel/v4.x/linux-4.4.283.tar.xz https://linux-libre.fsfla.org/pub/linux-libre/releases/4.4.283-gnu1/deblob-= check https://linux-libre.fsfla.org/pub/linux-libre/releases/4.4.283-gnu1/deblob-= 4.4) (mirror://kernel.org/linux/kernel/v4.x/linux-4.19.206.tar.xz https://linux-libre.fsfla.org/pub/linux-libre/releases/4.19.206-gnu1/deblob= -check https://linux-libre.fsfla.org/pub/linux-libre/releases/4.19.206-gnu1/deblob= -4.19) [...] (https://linux-libre.fsfla.org/pub/linux-libre/releases/5.4.20-gnu/linux-li= bre-5.4.20-gnu.tar.xz ftp://alpha.gnu.org/gnu/guix/mirror/linux-libre-5.4.20-gnu.tar.xz mirror://gnu/linux-libre/5.4.20-gnu/linux-libre-5.4.20-gnu.tar.xz) (mirror://kernel.org/linux/kernel/v4.x/linux-4.14.246.tar.xz https://linux-libre.fsfla.org/pub/linux-libre/releases/4.14.246-gnu1/deblob= -check https://linux-libre.fsfla.org/pub/linux-libre/releases/4.14.246-gnu1/deblob= -4.14) (https://linux-libre.fsfla.org/pub/linux-libre/releases/5.4.20-gnu/linux-li= bre-5.4.20-gnu.tar.xz ftp://alpha.gnu.org/gnu/guix/mirror/linux-libre-5.4.20-gnu.tar.xz mirror://gnu/linux-libre/5.4.20-gnu/linux-libre-5.4.20-gnu.tar.xz) --8<---------------cut here---------------end--------------->8--- --8<---------------cut here---------------start------------->8--- (use-modules (guix packages) (guix gexp) (gnu packages) (gnu packages linux) (srfi srfi-1) (ice-9 match)) (define gexp-references (@@ (guix gexp) gexp-references)) (define (thing->string thing) (match thing ((? gexp-input? g) (match (gexp-input-thing g) ((? origin? o) (origin-uri o)) (_ #f))) (_ #f))) (define (get-uri pkg) (match (package-source pkg) ((? origin? o) (match (origin-uri o) ((? string? s) (list s)) ((? list? lst) lst) ((? promise? prom) (match (force prom) ((? gexp? g) (filter (lambda (x) x) (delete-duplicates (map thing->string (gexp-references g))))) (_ (list #f)))) (_ (list #f)))) (_ #f))) (define all-packages (sort (fold-packages (lambda (package lst) (if (or (package-superseded package) (package-replacement package)) lst (cons package lst))) '()) (lambda (p1 p2) (string8---