From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id 6GoCI8HNHmahLAAA62LTzQ:P1 (envelope-from ) for ; Tue, 16 Apr 2024 21:13:05 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id 6GoCI8HNHmahLAAA62LTzQ (envelope-from ) for ; Tue, 16 Apr 2024 21:13:05 +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=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1713294785; 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-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; bh=uCdtx6k1xLsiZRQ840t3WZd2vw4lokdaNdOuwwjNnGk=; b=Q2iatMuGX5kzVm25jisQyzxwq6APSqn6y14rKNTkfJCT60rZxfoj3VZxu2AwHmFJtGEWP7 To3k3GV+DiAbD7kZuHHiJYLc6RIC7IgirvdFzYjOYBVowJZ3tbsmwJkGkEqTAkD5s8yh0G WW77uFRadx1+SE5jNMwHNgzaP8D/9KePDy1UvkzvUJyC2atNNiT864W422aD24DBuFxIPF CMqeHW40smfH2wAJ9zOoh7tsKnJo3sPVVfqVGx+HFBpaMaRwIvdnnoE43WK4GKpcNnRFzk myehFFEJ6lvNlFcd2bDRzkuNp7+6vN/Dh6DmtTIkif3bO2BK1xVXTv4SgjeaRQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1713294785; a=rsa-sha256; cv=none; b=PJsYojhKb2ZHFoy09LEH1YWUqBPaQyOJ2clpFjr0Gvos4bLmEuRDCG+eeMp8wSJ7o+77cV c2U5EPA457BtvUNFMQiywySp+/SUdOoCQvF9khvvspeLrnTyHokXVgevIl7hpQRd7FTc3O XIYwwm2Fesh5LtlOqJpzKpHMtPUASC046UG42uQURZb5iRgzXhKzfZ5Vfs1vGNHgT0jD1K eicGcwWjxjaYVpGySzhhdsM8nyCHDWYNgyQWInqq12pxe/3i0HezndSfPc6DlFdrntf6Dd tPzPbUpxPZmsdJTGswORLoTEvwtRg+Ofr1If6ODy0Rbclm6htGbJTlXFPYI2fw== 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=pass (policy=none) header.from=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 35B9A626FD for ; Tue, 16 Apr 2024 21:13:05 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rwoEf-0004Xp-9T; Tue, 16 Apr 2024 15:12:53 -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 1rwoEd-0004Xa-4q for guix-patches@gnu.org; Tue, 16 Apr 2024 15:12:51 -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 1rwoEc-0007q1-3B for guix-patches@gnu.org; Tue, 16 Apr 2024 15:12:50 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rwoEo-000391-GM for guix-patches@gnu.org; Tue, 16 Apr 2024 15:13:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#62202] [PATCH v4 6/6] tests: juliahub: Add unit tests for (guix import juliahub). Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 16 Apr 2024 19:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62202 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch moreinfo To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: zimoun.toutoune@gmail.com, 62202@debbugs.gnu.org Received: via spool by 62202-submit@debbugs.gnu.org id=B62202.171329473311774 (code B ref 62202); Tue, 16 Apr 2024 19:13:02 +0000 Received: (at 62202) by debbugs.gnu.org; 16 Apr 2024 19:12:13 +0000 Received: from localhost ([127.0.0.1]:45042 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rwoDy-00033E-8v for submit@debbugs.gnu.org; Tue, 16 Apr 2024 15:12:13 -0400 Received: from 6.mo560.mail-out.ovh.net ([87.98.165.38]:36491) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rwoDs-00032B-IZ for 62202@debbugs.gnu.org; Tue, 16 Apr 2024 15:12:08 -0400 Received: from director5.ghost.mail-out.ovh.net (unknown [10.109.140.55]) by mo560.mail-out.ovh.net (Postfix) with ESMTP id 4VJtvB1B8Vz1ZML for <62202@debbugs.gnu.org>; Tue, 16 Apr 2024 19:11:50 +0000 (UTC) Received: from ghost-submission-6684bf9d7b-68qgb (unknown [10.110.178.25]) by director5.ghost.mail-out.ovh.net (Postfix) with ESMTPS id E2F3B1FDF4; Tue, 16 Apr 2024 19:11:49 +0000 (UTC) Received: from ngraves.fr ([37.59.142.99]) by ghost-submission-6684bf9d7b-68qgb with ESMTPSA id f8mpNHXNHmZorAEAVk6i2A (envelope-from ); Tue, 16 Apr 2024 19:11:49 +0000 X-OVh-ClientIp: 81.67.146.208 In-Reply-To: <875xwhmerp.fsf@gnu.org> References: <20240203230807.25751-1-ngraves@ngraves.fr> <20240203230807.25751-6-ngraves@ngraves.fr> <87plv8bye8.fsf@gnu.org> <87bk6jdmdk.fsf@ngraves.fr> <874jc8np51.fsf@ngraves.fr> <875xwhmerp.fsf@gnu.org> Date: Tue, 16 Apr 2024 21:11:49 +0200 Message-ID: <874jc1nmve.fsf@ngraves.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Ovh-Tracer-Id: 14805020826261971559 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvledrudejiedgjedvucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvvefujghffffkgggtgfesthhqredttddtjeenucfhrhhomheppfhitgholhgrshcuifhrrghvvghsuceonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqeenucggtffrrghtthgvrhhnpeffudelkeejveetleeuffejfefftefhhfffuedtteethfelueelveffjedvffdtffenucfkphepuddvjedrtddrtddruddpkedurdeijedrudegiedrvddtkedpfeejrdehledrudegvddrleelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpehnghhrrghvvghssehnghhrrghvvghsrdhfrhdpnhgspghrtghpthhtohepuddprhgtphhtthhopeeivddvtddvseguvggssghughhsrdhgnhhurdhorhhgpdfovfetjfhoshhtpehmohehiedtpdhmohguvgepshhmthhpohhuth 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: Nicolas Graves X-ACL-Warn: , Nicolas Graves via Guix-patches From: Nicolas Graves 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: -6.88 X-Spam-Score: -6.88 X-Migadu-Queue-Id: 35B9A626FD X-Migadu-Scanner: mx12.migadu.com X-TUID: yiuLVCQyS0R/ On 2024-04-16 18:52, Ludovic Court=C3=A8s wrote: > Hi, > > Nicolas Graves skribis: > >> I'm currently writing it, it'll result in a handy helper for tests, such >> as : >> >> (with-git-forge ; spawns a dumb but functional git server >> '(("MyPackage" . ((add "a.txt" "A") >> (commit "First commit") >> (tag "v1.0.0" "Release 1.0")))) >> (with-julia-test-servers >> `(("/juliahub/MyPackage/" 200 ,juliahub-redirect.html) >> ("/juliahub/MyPackage/" 200 ,juliahub-redirect.html) >> ("/juliahub/MyPackage/MySlg/1.0.0/pkg.json" 200 >> ,(lambda (port) (display (fixture-pkg.json) port))) >> ("/general/M/MyPackage/Package.toml" 200 >> ,(lambda (port) (display (pk 'd (general-Package.toml)) port)= ))) >> (juliahub->guix-package "MyPackage"))) > > Nice! > >> However, for that I'll need the http server to be able to respond with a >> (content-type . (application/x-git-upload-pack-advertisement)) >> header to git. But in guile's web server implementation, this is not >> possible because of sanitize-response's charset addition, which is not >> configurable.=20 > > D=E2=80=99oh. I=E2=80=99m not sure what this is about; it=E2=80=99s defi= nitely possible to add > pretty much any =E2=80=98content-type=E2=80=99 header (we do that in =E2= =80=98guix publish=E2=80=99 for > instance), but if it=E2=80=99s going too far, then maybe you should go ba= ck to > procedure mocks. Just to write that in a clearer way: libgit2, which is behind guile-git, expects this exact header or fails, with no additional charset field. The sanitize-response function in the guile web server implementation on its side ensures that a charset field is added no matter what. So indeed we can set (content-type . (application/x-git-upload-pack-advertisement)) =20=20=20=20 but in reality guile-git // libgit2 will read (content-type . (application/x-git-upload-pack-advertisement (charset . "utf-8")) =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 and will fail in this case.=20 Since it's exterior (expected by libgit2), I thought the more relevant would be to allow more flexibility on the guile web server side. But if you think it's way better to ask on the libgit2 or guile-git side, I'll be happy to. WDYT ? > >> That's outside my field, how can we progress further ? We do indeed need >> such a server to properly test juliahub since we go get the tag from the >> actual repo (this is justified in the patch series). >> >> ________________________________________________________________________= _____ >> ;;; Git Forge =3D Git HTTP Server with Dump transfer protocol and reposi= tories > > This work=E2=80=99s not lost: we can definitely switch back to it when the > limitations you encountered has been fixed on the Guile side, and/or in > other, simpler cases. > > Thanks! > > Ludo=E2=80=99. --=20 Best regards, Nicolas Graves