Message ID | cover.1723386101.git.rodion.goritskov@gmail.com |
---|---|
Headers |
Return-Path: <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org> X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 757F127BBE2; Sun, 11 Aug 2024 15:33:51 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 573AB27BBE9 for <patchwork@mira.cbaines.net>; Sun, 11 Aug 2024 15:33:49 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <guix-patches-bounces@gnu.org>) id 1sd9dX-0007Jf-U9; Sun, 11 Aug 2024 10:33:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1sd9dV-0007JJ-Vy for guix-patches@gnu.org; Sun, 11 Aug 2024 10:33:34 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1sd9dV-00010W-Mv; Sun, 11 Aug 2024 10:33:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=ouO71yfQIjVL6LOQYyqURMOC5SYJvrX+ussxdWS4uls=; b=LlWKkivSmz+V8rNCz6oLjqhXtknFvbFizaS1VBaYQCeVlUc1j0fo1D3FhawagTHSNoJ17cSjwga1/4MdO+4BbDJbIwSNIMWx/z1AHSljHDjhWYLSKCMRYKzzukCUuVzu/eShXKsJ3XMbsXeHYHxenMayOhnzxEtM54jffkVwdIogZj1furc7FY9iqnh2VGqFRNvnZLzhDWxh3zLTevYJGafLFY0XMQjPeKhLrkRj4CVJAcLzoKBA5E2v6QUEXmGLl9JbWgyjJvJoWkcZ1DVgN8X1wtWx3TjpT+vzV5mVn6dWNaZjM6gU2ROUbzcwaBZdygmtb2d37zEDqWC8+R+HSA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1sd9dy-0006od-Lq; Sun, 11 Aug 2024 10:34:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#72577] [PATCH 0/1] services: agate: Change variable names and add system test. Resent-From: Rodion Goritskov <rodion.goritskov@gmail.com> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org> Resent-CC: pelzflorian@pelzflorian.de, ludo@gnu.org, matt@excalamus.com, maxim.cournoyer@gmail.com, guix-patches@gnu.org Resent-Date: Sun, 11 Aug 2024 14:34:02 +0000 Resent-Message-ID: <handler.72577.B.172338681226151@debbugs.gnu.org> Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 72577 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 72577@debbugs.gnu.org Cc: Rodion Goritskov <rodion.goritskov@gmail.com>, Florian Pelz <pelzflorian@pelzflorian.de>, Ludovic =?utf-8?q?Court=C3=A8s?= <ludo@gnu.org>, Matthew Trzcinski <matt@excalamus.com>, Maxim Cournoyer <maxim.cournoyer@gmail.com> X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: Florian Pelz <pelzflorian@pelzflorian.de>, Ludovic =?utf-8?q?Court=C3=A8s?= <ludo@gnu.org>, Matthew Trzcinski <matt@excalamus.com>, Maxim Cournoyer <maxim.cournoyer@gmail.com> Received: via spool by submit@debbugs.gnu.org id=B.172338681226151 (code B ref -1); Sun, 11 Aug 2024 14:34:02 +0000 Received: (at submit) by debbugs.gnu.org; 11 Aug 2024 14:33:32 +0000 Received: from localhost ([127.0.0.1]:41827 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>) id 1sd9dU-0006nj-3U for submit@debbugs.gnu.org; Sun, 11 Aug 2024 10:33:32 -0400 Received: from lists.gnu.org ([209.51.188.17]:38476) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <rodion.goritskov@gmail.com>) id 1sd9dS-0006na-9n for submit@debbugs.gnu.org; Sun, 11 Aug 2024 10:33:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <rodion.goritskov@gmail.com>) id 1sd9cx-0007Fa-7X for guix-patches@gnu.org; Sun, 11 Aug 2024 10:32:59 -0400 Received: from mail-ed1-x532.google.com ([2a00:1450:4864:20::532]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <rodion.goritskov@gmail.com>) id 1sd9cv-0000xX-Gr for guix-patches@gnu.org; Sun, 11 Aug 2024 10:32:58 -0400 Received: by mail-ed1-x532.google.com with SMTP id 4fb4d7f45d1cf-5b3fff87e6bso3956548a12.0 for <guix-patches@gnu.org>; Sun, 11 Aug 2024 07:32:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1723386775; x=1723991575; darn=gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=ouO71yfQIjVL6LOQYyqURMOC5SYJvrX+ussxdWS4uls=; b=Fdteluca992LoCrkob//krgisB2D8p6tRdNdnS/EqYsPYjRqz0BdAVI8N/pt+TZqTJ x7S1lAU/w557kFCCM0BHV0hPfQWqQNnpaA8x93sK7cDrYOR0Bx9mcQK8dpz9uxQV5usO z3Bo7rfoRVzKA5mJNDzjfU/Vl3n9vW5S+Brbyx7zL66T/bC50wloB9k8j6ocNlLGdlvm VwOJPFuLXIJB4fxKHVgYdeJwo0axy8GP/dmTFGZRQbG5EFJTaAl4p2Et7CXiUZuZKX0V NaENLKmWsNr3koDomEi8rVzhMLFT1HxGqrFq/5w+VUM1bUfDArcVtstNQepev2Ky/YvJ 5vpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723386775; x=1723991575; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ouO71yfQIjVL6LOQYyqURMOC5SYJvrX+ussxdWS4uls=; b=iQRQFRqOqeEnI0JK1UbH/W8QJAlHuCqjyTgoEgUaFQG2XLNHLN8qeSsXQXg2TxukMs FpruUvXpd83yUMGafLACC3tC15xkPh9ZkgaggrEjSuT/vB+OEIh2ytPMAafXL4fbZYI8 v11ZJuvB6lH7TgsoEUYefnwIz2dsMNjoGP9ehD+cIUPUqgVdGcg+6ZC5UeoQpgJUl6R8 bxTY73/3Rpz5gQmww0UILRKTVqHVcsNkZhpIlEXBkNbzYrIqKXTQYoKW1Y4Nkq+ovtL+ GY0Wwt9M4GuLMGQq/cwPjWxA7iso0/rKfJPvS5eTjeYczCFSrNdaovBEADJYoVSgY3pY Ar1A== X-Gm-Message-State: AOJu0Yx8fG6ahDEBZMGkFQGuyQ4McmbNzF2dLxlzOVRsZGQSoJZwU02Z ed6OpvaPvyDQ22FxbfQ/FCHQ55K/+Bw2WzZoZrUGTeHv5twC1W9FM7gUZefG X-Google-Smtp-Source: AGHT+IEYZ0fmJsvCCT92EFuNxwycvssj/I2NP3qKfyq3XcdYhBNU3Jdjnvl2qPVhI1equyicwkvY9Q== X-Received: by 2002:a17:907:3f21:b0:a7d:c9fa:e3b3 with SMTP id a640c23a62f3a-a80aa654b90mr518855766b.54.1723386774607; Sun, 11 Aug 2024 07:32:54 -0700 (PDT) Received: from bumblebee-mighty.lan ([92.51.75.166]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a80bb1d24f4sm152359866b.140.2024.08.11.07.32.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Aug 2024 07:32:54 -0700 (PDT) From: Rodion Goritskov <rodion.goritskov@gmail.com> Date: Sun, 11 Aug 2024 18:32:22 +0400 Message-ID: <cover.1723386101.git.rodion.goritskov@gmail.com> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::532; envelope-from=rodion.goritskov@gmail.com; helo=mail-ed1-x532.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.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_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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: <guix-patches.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=unsubscribe> List-Archive: <https://lists.gnu.org/archive/html/guix-patches> List-Post: <mailto:guix-patches@gnu.org> List-Help: <mailto:guix-patches-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=subscribe> Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches |
Series |
services: agate: Change variable names and add system test.
|
|
Message
Rodion Goritskov
Aug. 11, 2024, 2:32 p.m. UTC
This is a follow up to the patchset in [1], which updated the configuration record to make agate service work again. However, the original ticket had some improvement suggestions, so this patch addresses them. Short option names are renamed to a long ones, documentation is updated and system test added. Compatibility of the service breaks again, so it is not OK now, please notify me on deprecation policy, I will update the patchset accordingly. 1: https://issues.guix.gnu.org/71722 Rodion Goritskov (1): services: agate: Change variable names and add system test. doc/guix.texi | 8 ++-- gnu/services/web.scm | 38 ++++++++-------- gnu/tests/web.scm | 105 ++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 127 insertions(+), 24 deletions(-) base-commit: 174ecf5b1077d29498d9de22e27b13047f314feb
Comments
Hi, I'm testing these patches in a qemu VM. I thought I should share that, if I explicitly set the certs field, I get an error: ``` /home/user/config.scm:52:35: error: (agate-configuration (content "/srv/gemini") (certs "/srv/gemini-tls") (log-ip? #f)): extraneous field initializers (certs) ``` Here is the config file: ``` ;; -*- mode: scheme; -*- ;; This is an operating system configuration template ;; for a "bare bones" setup, with no X11 display server. (use-modules (gnu)) (use-service-modules networking ssh web) (use-package-modules screen ssh) (operating-system (host-name "guix") (timezone "America/Anchorage") (locale "en_US.utf8") ;; Boot in "legacy" BIOS mode, assuming /dev/sdX is the ;; target hard disk, and "my-root" is the label of the target ;; root file system. (bootloader (bootloader-configuration (bootloader grub-bootloader) (targets '("/dev/sda")))) ;; It's fitting to support the equally bare bones ‘-nographic’ ;; QEMU option, which also nicely sidesteps forcing QWERTY. (kernel-arguments (list "console=ttyS0,115200")) (file-systems (cons (file-system (device (file-system-label "my-root")) (mount-point "/") (type "ext4")) %base-file-systems)) ;; This is where user accounts are specified. The "root" ;; account is implicit, and is initially created with the ;; empty password. (users (cons (user-account (name "user") (comment "Generic user") (group "users") ;; Adding the account to the "wheel" group ;; makes it a sudoer. Adding it to "audio" ;; and "video" allows the user to play sound ;; and access the webcam. (supplementary-groups '("wheel" "audio" "video"))) %base-user-accounts)) ;; Globally-installed packages. (packages (cons screen %base-packages)) ;; Add services to the baseline: a DHCP client and an SSH ;; server. You may wish to add an NTP service here. (services (append (list (service dhcp-client-service-type) (service agate-service-type (agate-configuration (content "/srv/gemini") (certs "/srv/gemini-tls") (log-ip? #f))) (service openssh-service-type (openssh-configuration (openssh openssh-sans-x) (port-number 2222)))) %base-services))) ```
Hi! Christopher Howard <christopher@librehacker.com> writes: >Hi, I'm testing these patches in a qemu VM. I thought I should share that, if I explicitly set the certs field, I get an error: > > ``` > /home/user/config.scm:52:35: error: (agate-configuration (content "/srv/gemini") (certs "/srv/gemini-tls") (log-ip? #f)): extraneous field initializers (certs) > ``` > This patch (intentionally) renames the field "certs" to the "certificates", as was advised in [1]. I could maintain the compatibility here, but taking into account how long the Agate service was broken, I thought there are not a lot of users, so we could just rename the field. Good to know you are interested in the Agate service too! So, in your case you could change the configuration to something like that: (service agate-service-type (agate-configuration (content "/srv/gemini") (certificates "/srv/gemini-tls") (log-ip? #f))) 1: https://issues.guix.gnu.org/71722
Another little detail perhaps worth noting: the guix documentation specifies that if no valid key and certificate is available, then Agate will try to generate them on its own. However, if you attempt to go this route, you get an error: ``` 2024-08-16 10:58:21 No keys or certificates were found in the given directory. 2024-08-16 10:58:21 Specify the --hostname option to generate these automatically. ``` But there does not appear to be a hostname field available to agate-configuration, or at least it is not documented. Only the "hostnames" field for virtual hosts.
Christopher Howard <christopher@librehacker.com> writes: > Another little detail perhaps worth noting: the guix documentation > specifies that if no valid key and certificate is available, then > Agate will try to generate them on its own. However, if you attempt to > go this route, you get an error: > > ``` > 2024-08-16 10:58:21 No keys or certificates were found in the given directory. > 2024-08-16 10:58:21 Specify the --hostname option to generate these automatically. > ``` > > But there does not appear to be a hostname field available to agate-configuration, or at least it is not documented. Only the "hostnames" field for virtual hosts. Actually, "hostnames" field in agate-configuration is a list of hostnames that are passed as --hostname options to Agate. I am going to update documentation pointing out that certificates are going to be generated only if any hostnames are present in the "hostnames" field.
Tested v3 patch inside qemu VM. Works correctly so far. ``` user@guix ~$ gmni gemini://localhost # Hello World! ```
I was finally was able to upgrade my agate production server, using the v3 patch! Capsule pages are serving out fine. Thanks! It is great to be up-to-date again.