From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?G=C3=A1bor?= Boskovits Subject: bug#37207: guix.gnu.org Last Modified at epoch Date: Thu, 29 Aug 2019 08:11:46 +0200 Message-ID: References: <875zmhliqj.fsf@gnu.org> <877e6xqrtw.fsf@nckx> <87o909f2tx.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000007a3a705913b62ec" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:36007) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i3Dg7-0000pk-Nq for bug-guix@gnu.org; Thu, 29 Aug 2019 02:13:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i3Dg6-00064K-E2 for bug-guix@gnu.org; Thu, 29 Aug 2019 02:13:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:42683) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i3Dg6-000649-Aq for bug-guix@gnu.org; Thu, 29 Aug 2019 02:13:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1i3Dg6-0002Hc-1h for bug-guix@gnu.org; Thu, 29 Aug 2019 02:13:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87o909f2tx.fsf@gnu.org> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 37207@debbugs.gnu.org --00000000000007a3a705913b62ec Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello Ludo, Ludovic Court=C3=A8s ezt =C3=ADrta (id=C5=91pont: 2019. aug.= 28., Sze, 22:32): > Hello, > > G=C3=A1bor Boskovits skribis: > > > we should create a file with the git last modification time of the file= s, > > updated when there is a new commit in the repo =3D> last-modified > > we should create a file with some hash of the files, updated when there > is > > a new commit in the repo =3D> etag > > we could restrict these operations to the files modified since the last > > checkout. > > > > Retrieve these with embededd perl. > > Wdyt? > > What would the config look like? AFAICS our =E2=80=98nginx=E2=80=99 pack= age doesn=E2=80=99t > embed Perl, and I think it=E2=80=99s better this way. :-) Can we do tha= t with > pure nginx directives? > > We create /srv/guix.gnu.org (as a symlink) with the correct mtime=C2=B9. = If > we can tell nginx to use it as the =E2=80=98Last-Modified=E2=80=99 date, = that=E2=80=99s perfect. > > I was thinking about this. Yes, we can solve that with pure nginx. There is an issue however. It invalidates all cached entries on update, so files not modified will also need to be downloaded again. The easiest way to do that would be to simply generate an nginx config snippet at a configurable location, setting up the mtime and etags variable, and include that from the main config. If this would be ok, then I will have a look at implementing this. Ludo=E2=80=99. > > =C2=B9 > https://git.savannah.gnu.org/cgit/guix/maintenance.git/tree/hydra/berlin.= scm#n212 > Best regards, g_bor --=20 OpenPGP Key Fingerprint: 7988:3B9F:7D6A:4DBF:3719:0367:2506:A96C:CF63:0B21 --00000000000007a3a705913b62ec Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello Ludo,

Ludovic Court=C3=A8s= <ludo@gnu.org> ezt =C3=ADrta (id= =C5=91pont: 2019. aug. 28., Sze, 22:32):
Hello,

G=C3=A1bor Boskovits <boskovits@gmail.com> skribis:

> we should create a file with the git last modification time of the fil= es,
> updated when there is a new commit in the repo =3D> last-modified > we should create a file with some hash of the files, updated when ther= e is
> a new commit in the repo =3D> etag
> we could restrict these operations to the files modified since the las= t
> checkout.
>
> Retrieve these with embededd perl.
> Wdyt?

What would the config look like?=C2=A0 AFAICS our =E2=80=98nginx=E2=80=99 p= ackage doesn=E2=80=99t
embed Perl, and I think it=E2=80=99s better this way.=C2=A0 :-)=C2=A0 Can w= e do that with
pure nginx directives?

We create /srv/guix.gnu.org (as a symlink) with the correct mtime=C2=B9.=C2= =A0 If
we can tell nginx to use it as the =E2=80=98Last-Modified=E2=80=99 date, th= at=E2=80=99s perfect.


I was thinking about this. Yes, we can= solve that with pure nginx. There is an issue however.
It invali= dates all cached entries on update, so files not modified will also need to= be downloaded again.

The easiest way to do that w= ould be to simply generate an nginx config snippet at a configurable locati= on,
setting up the mtime and etags variable, and include that fro= m the main config.
=C2=A0
If this would be ok, then= I will have a look at implementing this.

Ludo=E2=80=99.

=C2=B9 https://git.= savannah.gnu.org/cgit/guix/maintenance.git/tree/hydra/berlin.scm#n212

Best regards,
g_b= or

--
OpenPGP Key Fingerprint: 7988:3B9F:7D6A:4DBF:3719:0367:= 2506:A96C:CF63:0B21
--00000000000007a3a705913b62ec--