From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 29 02:12:05 2019 Received: (at 37207) by debbugs.gnu.org; 29 Aug 2019 06:12:05 +0000 Received: from localhost ([127.0.0.1]:51504 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i3DfB-0002GG-AY for submit@debbugs.gnu.org; Thu, 29 Aug 2019 02:12:05 -0400 Received: from mail-ed1-f46.google.com ([209.85.208.46]:35122) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i3Df9-0002Fl-9j for 37207@debbugs.gnu.org; Thu, 29 Aug 2019 02:12:03 -0400 Received: by mail-ed1-f46.google.com with SMTP id t50so2727747edd.2 for <37207@debbugs.gnu.org>; Wed, 28 Aug 2019 23:12:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=q2rMsfVvKopPkZqdKsCOWd50IiJ/pAVTxJs7EoHHkcg=; b=A5X+fx9+4ihajCMns+4EKgIoUv56/DeFXSAFUMxm0JypEBckUtueiS4lI2dVSBsSZE Zgp94FBmShRun94MdkMdmhN1eRuisoSsTtJ7rlHdcSnjrq3ZY6917rgQjzdosCEMNiYz Fq7OWwsdOk2Bif5Skz6M9wYpPBpEx2UBUlRXD9VXI4NzMAy9BzZLFRDsttwPq4MyjoRS GZBRsPBmeTiKI9Fp1GehgET7bRMd9DFPLFHszbO+jTpIJx2Q7G5k78OjIIK0ii5PdlNC 0Vhlk3F7JlS3AAIRKoCbyv9kCPRoMmyhorOCFmCJUlXdbUUKhq6DPvu3TR3VfgHB5CJ9 cjqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=q2rMsfVvKopPkZqdKsCOWd50IiJ/pAVTxJs7EoHHkcg=; b=e9Fr4JaxPWeb/PIBrOojGVrD2W29beClz8o9P4y/7wMBRUG0jdXZTjm8yvX26C6I/U 3NDbTjyQcU7JYhbf1+Y9mJyadhw58J1RUqsx891eMiQZjT7NdV8v+pOS2gmKXQEzrhAX YdX93Ry6VyIoZZKeQ9JdQyFfd+3o/3oZ+m5aM9J3XxN4+qxRySk20wXX2GGhirBLHMqs ZlcQV/jGlqbcBwQU8WrlzdPfknVRymRkEmR5GmP21qO7bbOUdAhuaKJm0u0M+yYnc3jJ NLtYLLMUF/iKsznxOv7kyFX0o+R4jY8JCQtP/HvkznRhsqCS5XvINt/VKGKf8DvfckFf +RvQ== X-Gm-Message-State: APjAAAX6j7LVqjF7ZzO3jfC1YSKgzPrMo1udQxmuLrIGPiTT9kHtrrKm nNVX7BdLePCdVt7THD8RlVABKLlsNYJiCKITQA== X-Google-Smtp-Source: APXvYqx49uQRjkekVyVjsRvYpRYl4UliJP78jDi892eDzviosTnNFmWNA3+WKAh1IAVARuz39xosHJ75DjBGAaaYhsA= X-Received: by 2002:a17:906:2f0d:: with SMTP id v13mr6303437eji.99.1567059117317; Wed, 28 Aug 2019 23:11:57 -0700 (PDT) MIME-Version: 1.0 References: <875zmhliqj.fsf@gnu.org> <877e6xqrtw.fsf@nckx> <87o909f2tx.fsf@gnu.org> In-Reply-To: <87o909f2tx.fsf@gnu.org> From: =?UTF-8?Q?G=C3=A1bor_Boskovits?= Date: Thu, 29 Aug 2019 08:11:46 +0200 Message-ID: Subject: Re: bug#37207: guix.gnu.org Last Modified at epoch To: =?UTF-8?Q?Ludovic_Court=C3=A8s?= Content-Type: multipart/alternative; boundary="00000000000007a3a705913b62ec" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 37207 Cc: 37207@debbugs.gnu.org, Tobias Geerinckx-Rice X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --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--