From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id sE4AKRVreWGEKwAAgWs5BA (envelope-from ) for ; Wed, 27 Oct 2021 17:07:01 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id GGC4JBVreWFSTwAAB5/wlQ (envelope-from ) for ; Wed, 27 Oct 2021 15:07:01 +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 53DFF16834 for ; Wed, 27 Oct 2021 17:07:01 +0200 (CEST) Received: from localhost ([::1]:59160 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mfkW2-0007Aa-Qq for larch@yhetil.org; Wed, 27 Oct 2021 11:07:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44976) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mfjet-0008OZ-1r for guix-patches@gnu.org; Wed, 27 Oct 2021 10:12:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:38558) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mfjes-0003Bc-GC for guix-patches@gnu.org; Wed, 27 Oct 2021 10:12:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mfjes-0002nF-CH for guix-patches@gnu.org; Wed, 27 Oct 2021 10:12:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#51441] [PATCH] substitutes: keep base's uri-path for Properly construct URL. Resent-From: Z572 <873216071@qq.com> Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 27 Oct 2021 14:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 51441 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 51441@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.163534388610685 (code B ref -1); Wed, 27 Oct 2021 14:12:02 +0000 Received: (at submit) by debbugs.gnu.org; 27 Oct 2021 14:11:26 +0000 Received: from localhost ([127.0.0.1]:50104 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mfjeD-0002m9-E3 for submit@debbugs.gnu.org; Wed, 27 Oct 2021 10:11:26 -0400 Received: from lists.gnu.org ([209.51.188.17]:50372) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <873216071@qq.com>) id 1mfje8-0002lw-Ut for submit@debbugs.gnu.org; Wed, 27 Oct 2021 10:11:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44810) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <873216071@qq.com>) id 1mfje8-00072U-0u for guix-patches@gnu.org; Wed, 27 Oct 2021 10:11:16 -0400 Received: from out203-205-221-242.mail.qq.com ([203.205.221.242]:48986) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <873216071@qq.com>) id 1mfjdz-0002Kh-P4 for guix-patches@gnu.org; Wed, 27 Oct 2021 10:11:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1635343850; bh=RkYVFctcq0KPd2wBmWZMLv0+GtcPHKjkwGGGI7viLA0=; h=From:To:Subject:Date; b=rVZBLgOMGknT3Fl48rG89fXhzga0SN52YXIJN4df9FTvrxLSsd02Nu9T0T9y6NK68 BY20pkzv66bDfvbQrCoqbEW/LJGubcoRt9TnZIZgAknmWdvcLTnR2ZoRIWJR9CBG/y wZaVbURaSliuANL8nj+G9PDlwB3wHsjVlFXp+g/0= Received: from asus ([2409:8928:124e:600:171f:1b40:5859:701f]) by newxmesmtplogicsvrsza7.qq.com (NewEsmtp) with SMTP id 2B081EC6; Wed, 27 Oct 2021 22:10:48 +0800 X-QQ-mid: xmsmtpt1635343848t610a92ji Message-ID: X-QQ-XMAILINFO: OQlRUX9+U3rMCUuAv0MznkBLdvQw349ygDWLvQ03SKs5054LSeK47fh33NbUSn pJtG6xUay1B2X8uOFNDWXKYVcmrSleoczwFsopnF0+TcrCmDjg3Cl4HebEBp1WS5mK//xthg7MSH 69E7ba09z8MBezJj9QvmFjaA8j+LHSx/MlnWmd5s/tZp2oOZ2ePWd1LPP6naMxz0H0VnliVD0mJo jfJdVdYE009KLCkrY5AsQFvC2kW9DlJCJjEr/5cOOEzNaeT7h0EfjsjE2GTynb7HjWw5g3i0OpeR dh010gs8KKYQB2VnkYMiq5lwKfJW95/1waJU15PhsIPtkSbzqgeGjuFPmrfPysySLtdgA8nMWWPC rGf9BYKpklw5H9/MPSVtVVL7zQd9+dt91G7LoPs+gy5KBA6fUeKrgyfK6ONfNuKk2tATK6Ww3LTB wFLtLYBK+1+aIeCyuOEArLVpfxNjy6Ucc0jgX55FUNOZkE714xdmydAYDN4B6xg48BZWC3T0CeoV XU7C5IOx2VvneKQ/oHfqs21+Ksc/k6fSj3HepCVhawT6ouZv0w7qDmyRlfxfSDTT25WpHY5inXlU biV5QE4nG4MXWCgpDZPPj9t+5CauzwoRC2gpQa7Iis+tJxQxKDP8MENzuEWz6SmfNf0lNXLAJn1r a/UN0PGl4DwNo/YHnTXLc5nmmwHuTxFiws/BJfZkfTVTV8y3BuGGH/7AMvG+dYojW8qWVVnWDW6L ptbip4emdWQ2WCd3vm4UKDaFgv6hT+0YXcdg3jbZtRGPz1tiI0RO5tcqfVLC7I8NguWOKOGZ246d Y= User-agent: mu4e 1.6.6; emacs 28.0.50 Date: Wed, 27 Oct 2021 21:53:55 +0800 X-OQ-MSGID: <87r1c6wobb.fsf@qq.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=203.205.221.242; envelope-from=873216071@qq.com; helo=out203-205-221-242.mail.qq.com X-Spam_score_int: 11 X-Spam_score: 1.1 X-Spam_bar: + X-Spam_report: (1.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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HELO_DYNAMIC_IPADDR=1.951, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, RDNS_DYNAMIC=0.982, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action 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" Reply-to: Z572 <873216071@qq.com> X-ACL-Warn: , Z572 via Guix-patches From: Z572 via Guix-patches via X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1635347221; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:list-id:list-help:list-unsubscribe:list-subscribe: list-post:dkim-signature; bh=RkYVFctcq0KPd2wBmWZMLv0+GtcPHKjkwGGGI7viLA0=; b=STOG1PNVBud0z+hhdq7uyB+rM9f+2xXIliw+xvmkodcSUipcYJiWUSbhqwhZJ2g7zKQede Ze5fBQN4pNlWAanVcla3pYlOokDrxYysEoD91NmoLtsvIMj3o7FZBULFlyvLikksTUAmzf c3NjwL+XtQKBEcko/a4IU2+YfVNy3j6jtTXfSOhKS/sEnoq8wbv7fCve1eTMq7nLDxItLA PI+Qf2ivsEmc3O8c+kf3ytVUEmgrBxkUfioVZPEtuWKvWjIlJIx5klCXRja3HCUb382Tog j/pln2kbo8vqOwCbndOgmIiKJo28EGb3fTsPURdQ1A+5NEf3h6M+y37JGAvJGQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1635347221; a=rsa-sha256; cv=none; b=MDyT2WO583mIIWEY83qJGG4ZEVqIKnkfzBVdNjZJOQH2lPU0GEw2LrMtvtaAUu09xJrybR A15bLc9321T6qSwgg+/OTvaixp0xIMJQh9mrVfSoiiNbI2rxZnHhYbOjKNVYPPvrjJloJ7 R28OQTxL8aNSh61t1pajr9VFVrEbLxPBh0MyRiIeFO0wGLreWkUDgwB9xgPBnlq3H3Nq6N Iq8dLOpRXzQI3fJzTetnVzKvU6y+cntHadfgpVjIT6dcBsMdZFMyC1mpNG2aG3XM9fatMe 2yT7CE5DZpiKHXYAJ2J0FFh/BGGnVr1QWXIAJ/e1fNFN6mq8fT0P6S+BCO/NdQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=qq.com header.s=s201512 header.b=rVZBLgOM; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -1.43 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=qq.com header.s=s201512 header.b=rVZBLgOM; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 53DFF16834 X-Spam-Score: -1.43 X-Migadu-Scanner: scn0.migadu.com X-TUID: HVuuEWA2uuL4 --=-=-= Content-Type: text/plain Hello, Sorry for my english, and i'm not sure ChangeLog is right. https://mirror.sjtu.edu.cn/guix use customize script to mirror official substitutes server, at /guix not in / . narinfo-request will forget add /guix to url, so i can't use substitutes from them, this patch fix it. --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-substitutes-keep-base-s-uri-path-for-Properly-constr.patch Content-Transfer-Encoding: quoted-printable >From 7fe17965d5336d55ec8b1b7471cbbb34b12e9a0b Mon Sep 17 00:00:00 2001 From: Z572 <873216071@qq.com> Date: Wed, 27 Oct 2021 21:28:24 +0800 Subject: [PATCH] substitutes: keep base's uri-path for Properly construct U= RL. substitutes (narinfo-request): keep BASE's uri-path for properly construct = url. some substitutes server don't use guix publish, them use customize scripts = to mirror official server, if them look likes https://example.com/guix , narinfo-request will lost /guix . --- guix/substitutes.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/guix/substitutes.scm b/guix/substitutes.scm index a5c554acff..bfbd29623e 100644 --- a/guix/substitutes.scm +++ b/guix/substitutes.scm @@ -3,6 +3,7 @@ ;;; Copyright =C2=A9 2014 Nikita Karetnikov ;;; Copyright =C2=A9 2018 Kyle Meyer ;;; Copyright =C2=A9 2020 Christopher Baines +;;; Copyright =C2=A9 2021 Zheng Junjie <873216071@qq.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -158,7 +159,8 @@ (define (narinfo-request cache-url path) "Return an HTTP request for the narinfo of PATH at CACHE-URL." (let* ((base (string->uri cache-url)) (ref (build-relative-ref - #:path (string-append (store-path-hash-part path) ".narinfo= "))) + #:path (string-append (uri-path base) "/" + (store-path-hash-part path) ".narinfo= "))) (url (resolve-uri-reference ref base)) (headers '((User-Agent . "GNU Guile")))) (build-request url #:method 'GET #:headers headers))) --=20 2.33.1 --=-=-= Content-Type: text/plain -- over --=-=-=--