From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id WMtwILwUqV/TWAAA0tVLHw (envelope-from ) for ; Mon, 09 Nov 2020 10:06:52 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id +L9OHLwUqV91YQAA1q6Kng (envelope-from ) for ; Mon, 09 Nov 2020 10:06:52 +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 47FDB94011A for ; Mon, 9 Nov 2020 10:06:52 +0000 (UTC) Received: from localhost ([::1]:58628 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kc44Z-0005oC-2X for larch@yhetil.org; Mon, 09 Nov 2020 05:06:51 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37136) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kc44I-0005nF-4f for guix-devel@gnu.org; Mon, 09 Nov 2020 05:06:34 -0500 Received: from mx1.riseup.net ([198.252.153.129]:43444) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kc44G-0001pZ-3L; Mon, 09 Nov 2020 05:06:33 -0500 Received: from capuchin.riseup.net (capuchin-pn.riseup.net [10.0.1.176]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "Sectigo RSA Domain Validation Secure Server CA" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 4CV68b1PZNzFf3P; Mon, 9 Nov 2020 02:06:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1604916383; bh=etdXeoSbcdwA3H47LP4zL7VCeHsTQdiM16N5xCPbjW8=; h=References:From:To:Cc:Subject:In-reply-to:Date:From; b=k//tKy68gJfmLBveqF5xnsp5ZE15yMUvRbuMACjG2EkH+EW+vxFOgPIMNLROM/l5l 8Mi882AZT28Z2eHDLYVe9Cjn/Sv10mkt4G0FhqhBqT9d9qi0ajWRxY5ynTs15MgXNK i/nDXlJasnhTI3vZJQ1i5vvdQqsxAgbPd+JHj3ts= X-Riseup-User-ID: 2F3CE7A9F59216EEC1519C8BF93388F16661FC7B5B4EE333E30B8C1044229CCC Received: from [127.0.0.1] (localhost [127.0.0.1]) by capuchin.riseup.net (Postfix) with ESMTPSA id 4CV68T6SwLz8t5R; Mon, 9 Nov 2020 02:06:17 -0800 (PST) Received: from localhost (dinosaur [local]) by dinosaur (OpenSMTPD) with ESMTPA id bec9c8d8; Mon, 9 Nov 2020 02:59:29 +0000 (UTC) References: <87o8kdpl0z.fsf@pengmeiyu.com> <87mtzu24ii.fsf@gnu.org> From: Peng Mei Yu To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: Make guix-publish's URL identical to cache file name In-reply-to: <87mtzu24ii.fsf@gnu.org> Date: Mon, 09 Nov 2020 10:59:29 +0800 Message-ID: <87o8k7utf2.fsf@riseup.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=198.252.153.129; envelope-from=pengmeiyu@riseup.net; helo=mx1.riseup.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/09 05:06:25 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DATE_IN_PAST_06_12=1.543, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, UNPARSEABLE_RELAY=0.001 autolearn=no 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@gnu.org Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=riseup.net header.s=squak header.b=k//tKy68; dmarc=fail reason="SPF not aligned (relaxed)" header.from=riseup.net (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-Spam-Score: 0.09 X-TUID: KXftTrI81z/7 Hello, Ludovic Court=C3=A8s writes: >> Then a mirror site can simply pull the directory >> /var/cache/guix/publish/nar from the Berlin server and serve this >> directory through a static HTTP server. There will be cache misses. >> But guix-daemon will safely fallback to the next server in >> substitute-urls. > > The simplest solution for now (I think that=E2=80=99s what Ricardo & co. = had in > mind) would be for you to retrieve /var/cache/guix/publish on your > server, as is, and then run =E2=80=98guix publish=E2=80=99 on your sever:= it will know > where to find files. As I wrote to Jonathan, you can/should also run > nginx on top of that as a proxy to your local =E2=80=98guix publish=E2=80= =99. I am afraid having to install Guix and run 'guix publish' will be a major obstacle for most mirror sites, especially when their maintainers have no previous experience with Guix and have no interest in learning a new software and do not want to pollute their server with an unknown software and do not want to increase maintenance burden. This is the simplest solution on our side, but a complex solution on mirror site maintainers' side. I guess a complex Nginx URL rewrite rule might also convert the URL into real filename in the cache. Can anyone familiar with Nginx explain? -- Peng Mei Yu