GNU bug report logs - #55792
[PATCH 0/3 maintenance] Web site at 10years.guix.gnu.org

Previous Next

Package: guix-patches;

Reported by: Ludovic Courtès <ludo <at> gnu.org>

Date: Sat, 4 Jun 2022 08:37:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 55792 in the body.
You can then email your comments to 55792 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-birthday-event <at> gnu.org, guix-sysadmin <at> gnu.org, guix-patches <at> gnu.org:
bug#55792; Package guix-patches. (Sat, 04 Jun 2022 08:37:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ludovic Courtès <ludo <at> gnu.org>:
New bug report received and forwarded. Copy sent to guix-birthday-event <at> gnu.org, guix-sysadmin <at> gnu.org, guix-patches <at> gnu.org. (Sat, 04 Jun 2022 08:37:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: guix-patches <at> gnu.org
Cc: Ludovic Courtès <ludo <at> gnu.org>
Subject: [PATCH 0/3 maintenance] Web site at 10years.guix.gnu.org
Date: Sat,  4 Jun 2022 10:36:19 +0200
Hello Guix!

These changes are about serving a web site for the 10-year event¹
at 10years.guix.gnu.org.  If there are no objections, I'd like to
push it by Monday.

(The web site is being hacked on at
<https://gitlab.com/zimoun/website-guix-10years>;
preview at <https://zimoun.gitlab.io/website-guix-10years/>).

Thoughts?

Ludo’.

¹ https://lists.gnu.org/archive/html/guix-devel/2022-04/msg00126.html

Ludovic Courtès (3):
  hydra: dns: Add entry for '10years'.
  hydra: bayfront: Serve the 10years.guix.gnu.org web site.
  hydra: web: Make mcron job derivations deterministic.

 hydra/bayfront.scm             | 13 ++++++++++++-
 hydra/modules/sysadmin/dns.scm |  4 +++-
 hydra/modules/sysadmin/web.scm | 12 ++++++++++--
 3 files changed, 25 insertions(+), 4 deletions(-)


base-commit: a0206512ec9309c6b69dd9aba8d2302925179a93
-- 
2.36.1





Information forwarded to guix-patches <at> gnu.org:
bug#55792; Package guix-patches. (Sat, 04 Jun 2022 08:38:02 GMT) Full text and rfc822 format available.

Message #8 received at 55792 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: 55792 <at> debbugs.gnu.org
Cc: Ludovic Courtès <ludo <at> gnu.org>
Subject: [PATCH 1/3] hydra: dns: Add entry for '10years'.
Date: Sat,  4 Jun 2022 10:37:34 +0200
* hydra/modules/sysadmin/dns.scm (guix.gnu.org.zone): Add "10years".
(guix.gnu.org-zone): Bump 'serial'.
---
 hydra/modules/sysadmin/dns.scm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/hydra/modules/sysadmin/dns.scm b/hydra/modules/sysadmin/dns.scm
index d0a7fd1..30e1563 100644
--- a/hydra/modules/sysadmin/dns.scm
+++ b/hydra/modules/sysadmin/dns.scm
@@ -123,6 +123,8 @@
               ""  "IN"  "AAAA"   bayfront-ip6)
   ("bordeaux" ""  "IN"  "A"      bayfront-ip4)
   ("bordeaux" ""  "IN"  "AAAA"   bayfront-ip6)
+  ("10years"  ""  "IN"  "A"      bayfront-ip4)
+  ("10years"  ""  "IN"  "AAAA"   bayfront-ip6)
 
   ;; This record is required in order to prove to Amazon ACM that we
   ;; own the domain.  As long as it exists, ACM will automatically
@@ -137,4 +139,4 @@
             (origin "guix.gnu.org")
             (ns primary-ns)
             (entries guix.gnu.org.zone)
-            (serial 2022050712)))))
+            (serial 2022060411)))))
-- 
2.36.1





Information forwarded to guix-patches <at> gnu.org:
bug#55792; Package guix-patches. (Sat, 04 Jun 2022 08:38:02 GMT) Full text and rfc822 format available.

Message #11 received at 55792 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: 55792 <at> debbugs.gnu.org
Cc: Ludovic Courtès <ludo <at> gnu.org>
Subject: [PATCH 3/3] hydra: web: Make mcron job derivations deterministic.
Date: Sat,  4 Jun 2022 10:37:36 +0200
The result of (hash config period) varies between runs.  Thus, starting
from bdb914a1242cb0c00957050c96d1e279d2eb5dec, each run of "guix system
build -d ..." would produce a different derivation.

This commit fixes that.

* hydra/modules/sysadmin/web.scm (static-web-site-mcron-jobs)[record->list]:
New procedure.
Use it.
---
 hydra/modules/sysadmin/web.scm | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/hydra/modules/sysadmin/web.scm b/hydra/modules/sysadmin/web.scm
index e04ac1b..f26ed24 100644
--- a/hydra/modules/sysadmin/web.scm
+++ b/hydra/modules/sysadmin/web.scm
@@ -179,11 +179,19 @@ that's built with Haunt or similar."
                            (basename
                             (static-web-site-configuration-directory config)))))
 
+  (define (record->list record)
+    (let ((fields (record-type-fields <static-web-site-configuration>)))
+      (map (lambda (n)
+             (struct-ref record n))
+           (iota (length fields)))))
+
   (map (lambda (config)
          ;; Add an offset to spread web site updates over the period to avoid I/O
-         ;; load peaks when there are several such jobs.
+         ;; load peaks when there are several such jobs.  Compute a hash over
+         ;; a list representation of CONFIG, rather than over CONFIG, because
+         ;; hash of a struct depends on the object identity of its vtable.
          (let* ((period (static-web-site-configuration-period config))
-                (offset (hash config period)))
+                (offset (hash (record->list config) period)))
            #~(job (lambda (now)
                     (let ((elapsed (modulo now #$period)))
                       (+ now (- #$period elapsed) #$offset)))
-- 
2.36.1





Information forwarded to guix-patches <at> gnu.org:
bug#55792; Package guix-patches. (Sat, 04 Jun 2022 08:39:02 GMT) Full text and rfc822 format available.

Message #14 received at 55792 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: 55792 <at> debbugs.gnu.org
Cc: Ludovic Courtès <ludo <at> gnu.org>
Subject: [PATCH 2/3] hydra: bayfront: Serve the 10years.guix.gnu.org web site.
Date: Sat,  4 Jun 2022 10:37:35 +0200
* hydra/bayfront.scm (ten-years-of-guix-web-site): New variable.
(services): Add instance via 'simple-service' call.
---
 hydra/bayfront.scm | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/hydra/bayfront.scm b/hydra/bayfront.scm
index e0f65ba..b5a1afc 100644
--- a/hydra/bayfront.scm
+++ b/hydra/bayfront.scm
@@ -1,5 +1,5 @@
 ;; OS configuration for bayfront
-;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo <at> gnu.org>
+;; Copyright © 2016-2022 Ludovic Courtès <ludo <at> gnu.org>
 ;; Copyright © 2016, 2017, 2018, 2019, 2020 Andreas Enge <andreas <at> enge.fr>
 ;; Copyright © 2017, 2019 Ricardo Wurmus <rekado <at> elephly.net>
 ;; Copyright © 2019 Julien Lepiller <julien <at> lepiller.eu>
@@ -94,6 +94,12 @@
    (git-url "https://gitlab.inria.fr/guix-hpc/website.git")
    (directory "/srv/guix-hpc-web")))
 
+(define ten-years-of-guix-web-site
+  (static-web-site-configuration
+   (git-url "https://gitlab.com/zimoun/website-guix-10years")
+   (directory "/srv/ten-years-of-guix")))
+
+
 (define %motd
   (plain-file "motd"
               "\
@@ -949,6 +955,11 @@ access_log  /var/log/nginx/bordeaux.access.log;"))
                     static-web-site-service-type
                     (list guix-hpc-web-site))
 
+    ;; Running 10years.guix.gnu.org.
+    (simple-service 'ten-years-of-guix-web-site
+                    static-web-site-service-type
+                    (list ten-years-of-guix-web-site))
+
     ;; hpcguix-web as it can be seen at
     ;; <https://hpc.guix.info/browse>.
     (service hpcguix-web-service-type
-- 
2.36.1





Information forwarded to guix-patches <at> gnu.org:
bug#55792; Package guix-patches. (Sat, 04 Jun 2022 21:16:02 GMT) Full text and rfc822 format available.

Message #17 received at 55792 <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 55792 <at> debbugs.gnu.org, guix-sysadmin <at> gnu.org, guix-birthday-event <at> gnu.org
Subject: Re: [bug#55792] [PATCH 0/3 maintenance] Web site at
 10years.guix.gnu.org
Date: Sat, 04 Jun 2022 23:13:45 +0200
[Message part 1 (text/plain, inline)]
Ludo',

SGTM!

Ludovic Courtès 写道:
>  hydra/modules/sysadmin/dns.scm |  4 +++-

(How) is this file actually used?  The previous serial:

-            (serial 2022050712)))))
+            (serial 2022060411)))))

is much newer than the one actually being served:

… SOA	ns1.gnu.org. hostmaster.guix.gnu.org. 2021101415 …

Kind regards,

T G-R
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#55792; Package guix-patches. (Mon, 06 Jun 2022 13:05:01 GMT) Full text and rfc822 format available.

Message #20 received at 55792 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Tobias Geerinckx-Rice <me <at> tobias.gr>
Cc: 55792 <at> debbugs.gnu.org, guix-sysadmin <at> gnu.org, guix-birthday-event <at> gnu.org
Subject: Re: bug#55792: [PATCH 0/3 maintenance] Web site at
 10years.guix.gnu.org
Date: Mon, 06 Jun 2022 15:03:43 +0200
Hi!

Tobias Geerinckx-Rice <me <at> tobias.gr> skribis:

> SGTM!

I noticed I forgot to add an nginx server block in the config, so I did
that and a few other things:

--8<---------------cut here---------------start------------->8---
b0675b8 * hydra: bayfront: Use the right branch for 10years.guix.
1d9995d * hydra: bayfront: Fix 10years.guix domain name in nginx config.
437e42c * hydra: bayfront: Serve the 10years.guix.gnu.org web site.
b09cfc2 * hydra: dns: Add entry for '10years'.
67aa0a5 * hydra: bayfront: Factorize common TLS options.
fc7a6a5 * hydra: bayfront: Update fallback URL for hpc.guix.info/browse.
644dc8f * hydra: bayfront: Limit embedding of hpc.guix.info in frames.
c5aaa57 * hydra: bayfront: Add 'Strict-Transport-Security' for hpc.guix.info.
6c969b4 * hydra: Drop TLSv1 and enable TLSv1.3.
4a9a90c * hydra: web: Make mcron job derivations deterministic.
--8<---------------cut here---------------end--------------->8---

I’ve now reconfigure bayfront, from the same channel commit that ‘guix
system describe’ reported, and the 10years.guix.gnu.org entry works.

I have yet to create Let’s Encrypt certificates and set up HTTPS.

> Ludovic Courtès 写道:
>>  hydra/modules/sysadmin/dns.scm |  4 +++-
>
> (How) is this file actually used?  The previous serial:
>
> -            (serial 2022050712)))))
> +            (serial 2022060411)))))
>
> is much newer than the one actually being served:
>
> … SOA	ns1.gnu.org. hostmaster.guix.gnu.org. 2021101415 …

Yes, it’s most likely used.  :-)

How d’you actually display the serial?  Is that an option of ‘dig’?

Thanks,
Ludo’.




Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Mon, 06 Jun 2022 13:39:02 GMT) Full text and rfc822 format available.

Notification sent to Ludovic Courtès <ludo <at> gnu.org>:
bug acknowledged by developer. (Mon, 06 Jun 2022 13:39:02 GMT) Full text and rfc822 format available.

Message #25 received at 55792-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Tobias Geerinckx-Rice <me <at> tobias.gr>
Cc: guix-birthday-event <at> gnu.org, 55792-done <at> debbugs.gnu.org,
 guix-sysadmin <at> gnu.org
Subject: Re: bug#55792: [PATCH 0/3 maintenance] Web site at
 10years.guix.gnu.org
Date: Mon, 06 Jun 2022 15:38:41 +0200
Ludovic Courtès <ludo <at> gnu.org> skribis:

> I have yet to create Let’s Encrypt certificates and set up HTTPS.

Done now!

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 05 Jul 2022 11:24:13 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 289 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.