From unknown Sun Jun 22 11:33:50 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#44800 <44800@debbugs.gnu.org> To: bug#44800 <44800@debbugs.gnu.org> Subject: Status: [PATCH 0/2] publish: Add Avahi support. Reply-To: bug#44800 <44800@debbugs.gnu.org> Date: Sun, 22 Jun 2025 18:33:50 +0000 retitle 44800 [PATCH 0/2] publish: Add Avahi support. reassign 44800 guix-patches submitter 44800 Mathieu Othacehe severity 44800 normal tag 44800 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 22 10:57:23 2020 Received: (at submit) by debbugs.gnu.org; 22 Nov 2020 15:57:23 +0000 Received: from localhost ([127.0.0.1]:48113 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kgrju-00062c-Ud for submit@debbugs.gnu.org; Sun, 22 Nov 2020 10:57:23 -0500 Received: from lists.gnu.org ([209.51.188.17]:48398) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kgrjq-00062Q-5N for submit@debbugs.gnu.org; Sun, 22 Nov 2020 10:57:21 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58564) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kgrjp-0001ev-Rm for guix-patches@gnu.org; Sun, 22 Nov 2020 10:57:17 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:46120) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kgrjp-00021t-Ks for guix-patches@gnu.org; Sun, 22 Nov 2020 10:57:17 -0500 Received: from [2a01:e0a:19b:d9a0:f0c7:1dab:64ad:1a4a] (port=49596 helo=localhost.localdomain) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kgrjn-0006Iv-Uz; Sun, 22 Nov 2020 10:57:16 -0500 From: Mathieu Othacehe To: guix-patches@gnu.org Subject: [PATCH 0/2] publish: Add Avahi support. Date: Sun, 22 Nov 2020 16:56:57 +0100 Message-Id: <20201122155659.67235-1-othacehe@gnu.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit Cc: Mathieu Othacehe 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: -3.3 (---) Hello, Here are two patches adding Avahi support to "guix publish". When the "--enable-avahi" option is passed to "guix publish", the server is advertised on the local network. Future patches will use this option to automatically add all the publish servers on the local network to the daemon "substitute-urls" list. Thanks, Mathieu Mathieu Othacehe (2): Add Avahi support. publish: Add avahi support. Makefile.am | 1 + configure.ac | 6 ++ doc/guix.texi | 5 + gnu/packages/package-management.scm | 2 + guix/avahi.scm | 162 ++++++++++++++++++++++++++++ guix/scripts/publish.scm | 23 ++++ guix/self.scm | 9 +- 7 files changed, 206 insertions(+), 2 deletions(-) create mode 100644 guix/avahi.scm -- 2.29.2 From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 23 17:05:48 2020 Received: (at 44800) by debbugs.gnu.org; 23 Nov 2020 22:05:48 +0000 Received: from localhost ([127.0.0.1]:51483 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1khJy0-0007l9-KA for submit@debbugs.gnu.org; Mon, 23 Nov 2020 17:05:48 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:36958) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1khJxy-0007kv-LR for 44800@debbugs.gnu.org; Mon, 23 Nov 2020 17:05:47 -0500 Received: by mail-wm1-f65.google.com with SMTP id h21so949247wmb.2 for <44800@debbugs.gnu.org>; Mon, 23 Nov 2020 14:05:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=UsiUtEYwShtIGJEonk9gh5DdrQ35SdTb53eKx357GTc=; b=t2pjf7mBiJ23KwR6BFBVtF8f5M4CzEywtnkRVsAgfaknP3kmPwQi6A4gUBHJHVHe2t gZNMJUciZtdjISxTFIWjJ/8yQQU4QFgpctzv580DaQ2iRQKMilf+rjMUtymsU3RLj0df SBggpGUodc85H/sx+oeYQRtoS6m4FC4OVF4DPMuII3hc66LPU6fH9k/wNCkol8NI6/Nv b6/tKPz3hhgZofxj/uTI6TZ8msEy6uqJFE5VcQYFDQWQXGiwYvZbCl6XE9M6n2pwy/fp sQQ7uY+3s/tRbmy12ZZTs7KcGSu9YWRSf9BIaCMyeXIZM+NIPPsV0yVCN+xyru5+0nUz 6BgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=UsiUtEYwShtIGJEonk9gh5DdrQ35SdTb53eKx357GTc=; b=a2+kNV4AJjpNJaajH53DWN+VYt/coKygsMZXK+Ddrz068/G+7D55BCeZ6z1gcHW9xn FtlD8nfnfZUVfDYaFP1VfiUyvRBL6Cl0CZ47SfCL+Cb2drQFGZgZXdquKOY/B38q2vMq OWskuf0qKSEp5s7/X1W1Ll7y9aK3aRH4vlRWdd99kyBgOGRXzw7Zt9nPiz9qQcjsQU10 hxUpeZf29+mjGnQvTZWgQA/oloB/xeLDxnoZQveyDygxE74M57OEzP67hIDq1Cp1fexV lS70o2u8N6sCp0nlDkFbXaj1JW+uA3EshquZQUvifjwzJVspnyo48aMpmC/p157g3kGa jUeg== X-Gm-Message-State: AOAM531i1M1sz6PJPYbra6ULXIpF78+x1KQ2wZNiLefQbopLZ4YnyUr+ jr9E7wSHrQ1/SJjehWKXyKQ= X-Google-Smtp-Source: ABdhPJynd8nUlsh0l9YAq6UL4pbc3SFiPQ0J61UetUIvdNH3Qine8TXDAUyDJH1xURn6J/NPZPSQWg== X-Received: by 2002:a1c:4006:: with SMTP id n6mr935902wma.135.1606169140754; Mon, 23 Nov 2020 14:05:40 -0800 (PST) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id c62sm1080182wme.22.2020.11.23.14.05.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Nov 2020 14:05:39 -0800 (PST) From: zimoun To: Mathieu Othacehe , 44800@debbugs.gnu.org Subject: Re: [bug#44800] [PATCH 0/2] publish: Add Avahi support. In-Reply-To: <20201122155659.67235-1-othacehe@gnu.org> References: <20201122155659.67235-1-othacehe@gnu.org> Date: Mon, 23 Nov 2020 23:04:53 +0100 Message-ID: <867dqbviey.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 44800 Cc: Mathieu Othacehe 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 (-) Hi Mathieu, On Sun, 22 Nov 2020 at 16:56, Mathieu Othacehe wrote: > Here are two patches adding Avahi support to "guix publish". When the > "--enable-avahi" option is passed to "guix publish", the server is advertised > on the local network. Is this part of your new design? > Future patches will use this option to automatically add all the publish > servers on the local network to the daemon "substitute-urls" list. What happen if the option is passed but the servers are not reliable (the connection is unstable)? All the best, simon From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 24 08:22:26 2020 Received: (at 44800) by debbugs.gnu.org; 24 Nov 2020 13:22:26 +0000 Received: from localhost ([127.0.0.1]:58225 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1khYH0-0007p8-C6 for submit@debbugs.gnu.org; Tue, 24 Nov 2020 08:22:26 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33026) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1khYGv-0007oq-L8 for 44800@debbugs.gnu.org; Tue, 24 Nov 2020 08:22:21 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:42950) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1khYGp-0006uB-4x for 44800@debbugs.gnu.org; Tue, 24 Nov 2020 08:22:12 -0500 Received: from [2a01:e0a:19b:d9a0:3c14:dca1:bc4:a96f] (port=50234 helo=localhost.localdomain) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1khYGi-0003Tw-CI; Tue, 24 Nov 2020 08:22:07 -0500 From: Mathieu Othacehe To: 44800@debbugs.gnu.org Subject: [PATCH v2 0/3] publish: Add Avahi support. Date: Tue, 24 Nov 2020 14:21:42 +0100 Message-Id: <20201124132145.217751-1-othacehe@gnu.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 44800 Cc: Mathieu Othacehe 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: -3.3 (---) Hello, Here's a v2 that now provides a complete chain. "guix publish" services that are started with "--enable-avahi" will be discovered by the "guix-daemon" when the "--use-local-publish" option is passed. A new "guix discover" script is used to discover publish services in the background. I have tested this setup by starting a guix-publish server in a VM. As suggested here: https://guix.gnu.org/blog/2017/reproducible-builds-a-status-update/ the local publish servers are prefixed to the substitute-url list, so that the daemon will try to use substitute from the local network first, before falling back to the CI build farm. Thanks, Mathieu Mathieu Othacehe (3): Add Avahi support. publish: Add avahi support. Use substitute servers on the local network. Makefile.am | 2 + configure.ac | 6 + doc/guix.texi | 13 +++ gnu/packages/package-management.scm | 5 +- gnu/services/base.scm | 17 ++- guix/avahi.scm | 170 ++++++++++++++++++++++++++++ guix/scripts/discover.scm | 158 ++++++++++++++++++++++++++ guix/scripts/publish.scm | 24 ++++ guix/scripts/substitute.scm | 11 +- guix/self.scm | 9 +- nix/libstore/globals.cc | 1 + nix/libstore/globals.hh | 4 + nix/nix-daemon/guix-daemon.cc | 20 ++++ 13 files changed, 433 insertions(+), 7 deletions(-) create mode 100644 guix/avahi.scm create mode 100644 guix/scripts/discover.scm -- 2.29.2 From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 24 08:22:32 2020 Received: (at 44800) by debbugs.gnu.org; 24 Nov 2020 13:22:32 +0000 Received: from localhost ([127.0.0.1]:58227 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1khYH5-0007pP-4E for submit@debbugs.gnu.org; Tue, 24 Nov 2020 08:22:32 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33048) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1khYH0-0007ow-5T for 44800@debbugs.gnu.org; Tue, 24 Nov 2020 08:22:25 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:42953) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1khYGu-0006vF-VR for 44800@debbugs.gnu.org; Tue, 24 Nov 2020 08:22:17 -0500 Received: from [2a01:e0a:19b:d9a0:3c14:dca1:bc4:a96f] (port=50234 helo=localhost.localdomain) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1khYGo-0003Tw-Dq; Tue, 24 Nov 2020 08:22:10 -0500 From: Mathieu Othacehe To: 44800@debbugs.gnu.org Subject: [PATCH v2 1/3] Add Avahi support. Date: Tue, 24 Nov 2020 14:21:43 +0100 Message-Id: <20201124132145.217751-2-othacehe@gnu.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201124132145.217751-1-othacehe@gnu.org> References: <20201124132145.217751-1-othacehe@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 44800 Cc: Mathieu Othacehe 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 (-) * guix/avahi.scm: New file. * Makefile.am (MODULES): Add it. * configure.ac: Add Guile-Avahi dependency. * doc/guix.texi (Requirements): Document it. * gnu/packages/package-management.scm (guix)[native-inputs]: Add "guile-avahi", [propagated-inputs]: ditto. * guix/self.scm (specification->package): Add guile-avahi. (compiled-guix): Ditto. --- Makefile.am | 1 + configure.ac | 6 + doc/guix.texi | 1 + gnu/packages/package-management.scm | 5 +- guix/avahi.scm | 170 ++++++++++++++++++++++++++++ guix/self.scm | 9 +- 6 files changed, 189 insertions(+), 3 deletions(-) create mode 100644 guix/avahi.scm diff --git a/Makefile.am b/Makefile.am index d63f2ae4b7..7049da9594 100644 --- a/Makefile.am +++ b/Makefile.am @@ -73,6 +73,7 @@ include gnu/local.mk include po/doc/local.mk MODULES = \ + guix/avahi.scm \ guix/base16.scm \ guix/base32.scm \ guix/base64.scm \ diff --git a/configure.ac b/configure.ac index 6e718afdd1..307e8b361f 100644 --- a/configure.ac +++ b/configure.ac @@ -161,6 +161,12 @@ if test "x$have_guile_lzlib" != "xyes"; then AC_MSG_ERROR([Guile-lzlib is missing; please install it.]) fi +dnl Check for Guile-Avahi. +GUILE_MODULE_AVAILABLE([have_guile_avahi], [(avahi)]) +if test "x$have_guile_avahi" != "xyes"; then + AC_MSG_ERROR([Guile-Avahi is missing; please install it.]) +fi + dnl Guile-newt is used by the graphical installer. GUILE_MODULE_AVAILABLE([have_guile_newt], [(newt)]) diff --git a/doc/guix.texi b/doc/guix.texi index ea220fbd63..e9cf25fc90 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -829,6 +829,7 @@ Guile,, gnutls-guile, GnuTLS-Guile}); or later; @item @uref{https://notabug.org/guile-zlib/guile-zlib, Guile-zlib}; @item @uref{https://notabug.org/guile-lzlib/guile-lzlib, Guile-lzlib}; +@item @uref{https://www.nongnu.org/guile-avahi/, Guile-Avahi}; @item @c FIXME: Specify a version number once a release has been made. @uref{https://gitlab.com/guile-git/guile-git, Guile-Git}, version 0.3.0 diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm index 4a6881d475..03abfdfee2 100644 --- a/gnu/packages/package-management.scm +++ b/gnu/packages/package-management.scm @@ -294,6 +294,7 @@ $(prefix)/etc/init.d\n"))) (guile ,@(if (%current-target-system) '((assoc-ref native-inputs "guile")) '((assoc-ref inputs "guile")))) + (avahi (assoc-ref inputs "guile-avahi")) (gcrypt (assoc-ref inputs "guile-gcrypt")) (json (assoc-ref inputs "guile-json")) (sqlite (assoc-ref inputs "guile-sqlite3")) @@ -305,7 +306,7 @@ $(prefix)/etc/init.d\n"))) (ssh (assoc-ref inputs "guile-ssh")) (gnutls (assoc-ref inputs "gnutls")) (locales (assoc-ref inputs "glibc-utf8-locales")) - (deps (list gcrypt json sqlite gnutls + (deps (list avahi gcrypt json sqlite gnutls git bs ssh zlib lzlib)) (effective (read-line @@ -349,6 +350,7 @@ $(prefix)/etc/init.d\n"))) ;; cross-compilation. ("guile" ,guile-3.0-latest) ;for faster builds ("gnutls" ,gnutls) + ("guile-avahi" ,guile-avahi) ("guile-gcrypt" ,guile-gcrypt) ("guile-json" ,guile-json-4) ("guile-sqlite3" ,guile-sqlite3) @@ -399,6 +401,7 @@ $(prefix)/etc/init.d\n"))) ("glibc-utf8-locales" ,glibc-utf8-locales))) (propagated-inputs `(("gnutls" ,(if (%current-target-system) gnutls-3.6.14 gnutls)) + ("guile-avahi" ,guile-avahi) ("guile-gcrypt" ,guile-gcrypt) ("guile-json" ,guile-json-4) ("guile-sqlite3" ,guile-sqlite3) diff --git a/guix/avahi.scm b/guix/avahi.scm new file mode 100644 index 0000000000..cd38619df6 --- /dev/null +++ b/guix/avahi.scm @@ -0,0 +1,170 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2020 Mathieu Othacehe +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (guix avahi) + #:use-module (guix records) + #:use-module (guix ui) + #:use-module (guix build syscalls) + #:use-module (avahi) + #:use-module (avahi client) + #:use-module (avahi client lookup) + #:use-module (avahi client publish) + #:use-module (ice-9 threads) + #:export (avahi-service + avahi-service? + avahi-service-name + avahi-service-type + avahi-service-interface + avahi-service-local-address + avahi-service-address + avahi-service-port + avahi-service-txt + + avahi-publish-service-thread + avahi-browse-service-thread)) + +(define-record-type* + avahi-service make-avahi-service + avahi-service? + (name avahi-service-name) + (type avahi-service-type) + (interface avahi-service-interface) + (local-address avahi-service-local-address) + (address avahi-service-address) + (port avahi-service-port) + (txt avahi-service-txt)) + +(define* (avahi-publish-service-thread name + #:key + type port + (stop-loop? (const #f)) + (timeout 100) + (txt '())) + "Publish the service TYPE using Avahi, for the given PORT, on all interfaces +and for all protocols. Also, advertise the given TXT record list. + +This procedure starts a new thread running the Avahi event loop. It exits +when STOP-LOOP? procedure returns true." + (define client-callback + (lambda (client state) + (when (eq? state client-state/s-running) + (let ((group (make-entry-group client (const #t)))) + (apply + add-entry-group-service! group interface/unspecified + protocol/unspecified '() + name type #f #f port txt) + (commit-entry-group group))))) + + (call-with-new-thread + (lambda () + (let* ((poll (make-simple-poll)) + (client (make-client (simple-poll poll) + (list + client-flag/ignore-user-config) + client-callback))) + (while (not (stop-loop?)) + (iterate-simple-poll poll timeout)))))) + +(define (interface->ip-address interface) + "Return the local IP address of the given INTERFACE." + (let ((address + (network-interface-address + (socket AF_INET SOCK_STREAM 0) interface))) + (inet-ntop (sockaddr:fam address) (sockaddr:addr address)))) + +(define* (avahi-browse-service-thread proc + #:key + types + (family AF_INET) + (stop-loop? (const #f)) + (timeout 100)) + "Browse services which type is part of the TYPES list, using Avahi. The +search is restricted to services with the given FAMILY. Each time a service +is found or removed, PROC is called and passed as argument the corresponding +AVAHI-SERVICE record. If a service is available on multiple network +interfaces, it will only be reported on the first interface found. + +This procedure starts a new thread running the Avahi event loop. It exits +when STOP-LOOP? procedure returns true." + (define %known-hosts + ;; Set of Avahi discovered hosts. + (make-hash-table)) + + (define (service-resolver-callback resolver interface protocol event + service-name service-type domain + host-name address-type address port + txt flags) + ;; Handle service resolution events. + (cond ((eq? event resolver-event/found) + (info (G_ "resolved service `~a' at `~a:~a'~%") + service-name (inet-ntop family address) port) + ;; Add the service if the host is unknown. This means that if a + ;; service is available on multiple network interfaces for a single + ;; host, only the first interface found will be considered. + (unless (hash-ref %known-hosts service-name) + (let* ((address (inet-ntop family address)) + (local-address (interface->ip-address interface)) + (service* (avahi-service + (name service-name) + (type service-type) + (interface interface) + (local-address local-address) + (address address) + (port port) + (txt txt)))) + (hash-set! %known-hosts service-name service*) + (proc 'new-service service*)))) + ((eq? event resolver-event/failure) + (report-error (G_ "failed to resolve service `~a'~%") + service-name))) + (free-service-resolver! resolver)) + + (define (service-browser-callback browser interface protocol event + service-name service-type + domain flags) + (cond + ((eq? event browser-event/new) + (make-service-resolver (service-browser-client browser) + interface protocol + service-name service-type domain + protocol/unspecified '() + service-resolver-callback)) + ((eq? event browser-event/remove) + (let ((service (hash-ref %known-hosts service-name))) + (when service + (proc 'remove-service service) + (hash-remove! %known-hosts service-name)))))) + + (define client-callback + (lambda (client state) + (if (eq? state client-state/s-running) + (for-each (lambda (type) + (make-service-browser client + interface/unspecified + protocol/inet + type #f '() + service-browser-callback)) + types)))) + + (let* ((poll (make-simple-poll)) + (client (make-client (simple-poll poll) + '() ;; no flags + client-callback))) + (and (client? client) + (while (not (stop-loop?)) + (iterate-simple-poll poll timeout))))) diff --git a/guix/self.scm b/guix/self.scm index 026dcd9c1a..257c8eefde 100644 --- a/guix/self.scm +++ b/guix/self.scm @@ -50,6 +50,7 @@ (module-ref (resolve-interface module) variable)))) (match-lambda ("guile" (ref '(gnu packages guile) 'guile-3.0/libgc-7)) + ("guile-avahi" (ref '(gnu packages guile) 'guile-avahi)) ("guile-json" (ref '(gnu packages guile) 'guile-json-4)) ("guile-ssh" (ref '(gnu packages ssh) 'guile-ssh)) ("guile-git" (ref '(gnu packages guile) 'guile-git)) @@ -784,6 +785,9 @@ Info manual." (xz (specification->package "xz")) (guix (specification->package "guix"))) "Return a file-like object that contains a compiled Guix." + (define guile-avahi + (specification->package "guile-avahi")) + (define guile-json (specification->package "guile-json")) @@ -812,8 +816,9 @@ Info manual." (match (append-map (lambda (package) (cons (list "x" package) (package-transitive-propagated-inputs package))) - (list guile-gcrypt gnutls guile-git guile-json - guile-ssh guile-sqlite3 guile-zlib guile-lzlib)) + (list guile-gcrypt gnutls guile-git guile-avahi + guile-json guile-ssh guile-sqlite3 guile-zlib + guile-lzlib)) (((labels packages _ ...) ...) packages))) -- 2.29.2 From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 24 08:22:33 2020 Received: (at 44800) by debbugs.gnu.org; 24 Nov 2020 13:22:33 +0000 Received: from localhost ([127.0.0.1]:58230 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1khYHB-0007pj-Ed for submit@debbugs.gnu.org; Tue, 24 Nov 2020 08:22:33 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33100) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1khYHA-0007pR-7B for 44800@debbugs.gnu.org; Tue, 24 Nov 2020 08:22:32 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:42956) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1khYH5-0006xg-1o for 44800@debbugs.gnu.org; Tue, 24 Nov 2020 08:22:27 -0500 Received: from [2a01:e0a:19b:d9a0:3c14:dca1:bc4:a96f] (port=50234 helo=localhost.localdomain) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1khYGr-0003Tw-4d; Tue, 24 Nov 2020 08:22:15 -0500 From: Mathieu Othacehe To: 44800@debbugs.gnu.org Subject: [PATCH v2 2/3] publish: Add avahi support. Date: Tue, 24 Nov 2020 14:21:44 +0100 Message-Id: <20201124132145.217751-3-othacehe@gnu.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201124132145.217751-1-othacehe@gnu.org> References: <20201124132145.217751-1-othacehe@gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 44800 Cc: Mathieu Othacehe 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: -3.3 (---) * guix/scripts/publish.scm (%options): Add "--enable-avahi" option. (show-help): Document it. (service-name): New procedure, (publish-service-type): new variable. (run-publish-server): Add "avahi?" and "port" parameters. Use them to publish the server using Avahi. (guix-publish): Pass the "avahi?" option to "run-publish-server". * gnu/services/base.scm (): Add "enable-avahi?" field. (guix-publish-shepherd-service): Honor it. --- doc/guix.texi | 4 ++++ gnu/services/base.scm | 8 +++++++- guix/scripts/publish.scm | 24 ++++++++++++++++++++++++ 3 files changed, 35 insertions(+), 1 deletion(-) diff --git a/doc/guix.texi b/doc/guix.texi index e9cf25fc90..f8efc34310 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -12170,6 +12170,10 @@ The signing key pair must be generated before @command{guix publish} is launched, using @command{guix archive --generate-key} (@pxref{Invoking guix archive}). +When the @option{--enable-avahi} option is passed, the publish server is +advertised on the local network as an Avahi service, using Guile-Avahi +bindings. + The general syntax is: @example diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 029df5ac16..87c247bdf1 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -1743,6 +1743,8 @@ proxy of 'guix-daemon'...~%") (default 80)) (host guix-publish-configuration-host ;string (default "localhost")) + (enable-avahi? guix-publish-enable-avahi? ;boolean + (default #f)) (compression guix-publish-configuration-compression (thunked) (default (default-compression this-record @@ -1789,7 +1791,8 @@ raise a deprecation warning if the 'compression-level' field was used." lst)))) (match-record config - (guix port host nar-path cache workers ttl cache-bypass-threshold) + (guix port host nar-path cache workers ttl cache-bypass-threshold + enable-avahi?) (list (shepherd-service (provision '(guix-publish)) (requirement '(guix-daemon)) @@ -1800,6 +1803,9 @@ raise a deprecation warning if the 'compression-level' field was used." #$@(config->compression-options config) (string-append "--nar-path=" #$nar-path) (string-append "--listen=" #$host) + #$@(if enable-avahi? + #~("--enable-avahi") + #~()) #$@(if workers #~((string-append "--workers=" #$(number->string diff --git a/guix/scripts/publish.scm b/guix/scripts/publish.scm index 2a2185e2b9..d2bb7ae982 100644 --- a/guix/scripts/publish.scm +++ b/guix/scripts/publish.scm @@ -42,6 +42,7 @@ #:use-module (web server) #:use-module (web uri) #:autoload (sxml simple) (sxml->xml) + #:use-module (guix avahi) #:use-module (guix base32) #:use-module (guix base64) #:use-module (guix config) @@ -70,6 +71,7 @@ signed-string open-server-socket + publish-service-type run-publish-server guix-publish)) @@ -83,6 +85,8 @@ Publish ~a over HTTP.\n") %store-directory) (display (G_ " -u, --user=USER change privileges to USER as soon as possible")) (display (G_ " + -a, --enable-avahi enable Avahi based discovery")) + (display (G_ " -C, --compression[=METHOD:LEVEL] compress archives with METHOD at LEVEL")) (display (G_ " @@ -157,6 +161,9 @@ usage." (option '(#\V "version") #f #f (lambda _ (show-version-and-exit "guix publish"))) + (option '(#\a "enable-avahi") #f #f + (lambda (opt name arg result) + (alist-cons 'enable-avahi? #t result))) (option '(#\u "user") #t #f (lambda (opt name arg result) (alist-cons 'user arg result))) @@ -1069,11 +1076,25 @@ methods, return the applicable compression." (x (not-found request))) (not-found request)))) +(define (service-name) + "Return the Avahi service name of the server." + (string-append "guix-publish-" (gethostname))) + +(define publish-service-type + ;; Return the Avahi service type of the server. + "_guix_publish._tcp") + (define* (run-publish-server socket store #:key + avahi? port (compressions (list %no-compression)) (nar-path "nar") narinfo-ttl cache pool) + (when avahi? + (avahi-publish-service-thread (service-name) + #:type publish-service-type + #:port port)) + (run-server (make-request-handler store #:cache cache #:pool pool @@ -1119,6 +1140,7 @@ methods, return the applicable compression." (lambda (arg result) (leave (G_ "~A: extraneous argument~%") arg)) %default-options)) + (avahi? (assoc-ref opts 'enable-avahi?)) (user (assoc-ref opts 'user)) (port (assoc-ref opts 'port)) (ttl (assoc-ref opts 'narinfo-ttl)) @@ -1179,6 +1201,8 @@ consider using the '--user' option!~%"))) (with-store store (run-publish-server socket store + #:avahi? avahi? + #:port port #:cache cache #:pool (and cache (make-pool workers #:thread-name -- 2.29.2 From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 24 08:22:42 2020 Received: (at 44800) by debbugs.gnu.org; 24 Nov 2020 13:22:42 +0000 Received: from localhost ([127.0.0.1]:58233 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1khYHJ-0007q5-R1 for submit@debbugs.gnu.org; Tue, 24 Nov 2020 08:22:42 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33130) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1khYHH-0007pr-IH for 44800@debbugs.gnu.org; Tue, 24 Nov 2020 08:22:40 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:42957) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1khYHC-0006zp-DR for 44800@debbugs.gnu.org; Tue, 24 Nov 2020 08:22:34 -0500 Received: from [2a01:e0a:19b:d9a0:3c14:dca1:bc4:a96f] (port=50234 helo=localhost.localdomain) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1khYGy-0003Tw-0D; Tue, 24 Nov 2020 08:22:23 -0500 From: Mathieu Othacehe To: 44800@debbugs.gnu.org Subject: [PATCH v2 3/3] Use substitute servers on the local network. Date: Tue, 24 Nov 2020 14:21:45 +0100 Message-Id: <20201124132145.217751-4-othacehe@gnu.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201124132145.217751-1-othacehe@gnu.org> References: <20201124132145.217751-1-othacehe@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 44800 Cc: Mathieu Othacehe 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: -3.3 (---) * guix/scripts/discover.scm: New file. * Makefile.am (MODULES): Add it. * nix/nix-daemon/guix-daemon.cc (options): Add "use-local-publish" option, (parse-opt): parse it, (main): start "guix discover" process when the option is set. * nix/libstore/globals.hh (Settings): Add "useLocalPublish" public member. * nix/libstore/globals.cc (Settings): Initialize it. * guix/scripts/substitute.scm (%local-substitute-urls): New variable, (substitute-urls): add it. * gnu/services/base.scm (): Add "use-local-publish?" field, (guix-shepherd-service): honor it. * doc/guix.texi (Invoking guix-daemon): Document "use-local-publish" option, (Base Services): ditto. --- Makefile.am | 1 + doc/guix.texi | 8 ++ gnu/services/base.scm | 9 +- guix/scripts/discover.scm | 158 ++++++++++++++++++++++++++++++++++ guix/scripts/substitute.scm | 11 ++- nix/libstore/globals.cc | 1 + nix/libstore/globals.hh | 4 + nix/nix-daemon/guix-daemon.cc | 20 +++++ 8 files changed, 209 insertions(+), 3 deletions(-) create mode 100644 guix/scripts/discover.scm diff --git a/Makefile.am b/Makefile.am index 7049da9594..41b366eb75 100644 --- a/Makefile.am +++ b/Makefile.am @@ -257,6 +257,7 @@ MODULES = \ guix/import/texlive.scm \ guix/import/utils.scm \ guix/scripts.scm \ + guix/scripts/discover.scm \ guix/scripts/download.scm \ guix/scripts/perform-download.scm \ guix/scripts/build.scm \ diff --git a/doc/guix.texi b/doc/guix.texi index f8efc34310..72531533ff 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -1584,6 +1584,10 @@ Unless @option{--lose-logs} is used, all the build logs are kept in the @var{localstatedir}. To save space, the daemon automatically compresses them with Bzip2 by default. +@item --use-local-publish[=yes|no] +Whether to use publish servers discovered a the local network, using +Avahi, for substitutution. + @item --disable-deduplication @cindex deduplication Disable automatic file ``deduplication'' in the store. @@ -14999,6 +15003,10 @@ disables the timeout. The type of compression used for build logs---one of @code{gzip}, @code{bzip2}, or @code{none}. +@item @code{use-local-publish?} (default: @code{#f}) +Whether to use publish servers discovered a the local network, using +Avahi, for substitutution. + @item @code{extra-options} (default: @code{'()}) List of extra command-line options for @command{guix-daemon}. diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 87c247bdf1..718fa4096a 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -1529,6 +1529,8 @@ archive' public keys, with GUIX." (default 0)) (log-compression guix-configuration-log-compression (default 'bzip2)) + (use-local-publish? guix-configuration-use-local-publish? + (default #f)) (extra-options guix-configuration-extra-options ;list of strings (default '())) (log-file guix-configuration-log-file ;string @@ -1570,8 +1572,8 @@ proxy of 'guix-daemon'...~%") (match-record config (guix build-group build-accounts authorize-key? authorized-keys use-substitutes? substitute-urls max-silent-time timeout - log-compression extra-options log-file http-proxy tmpdir - chroot-directories) + log-compression use-local-publish? extra-options log-file + http-proxy tmpdir chroot-directories) (list (shepherd-service (documentation "Run the Guix daemon.") (provision '(guix-daemon)) @@ -1605,6 +1607,9 @@ proxy of 'guix-daemon'...~%") #$@(if use-substitutes? '() '("--no-substitutes")) + #$@(if use-local-publish? + '("--use-local-publish=yes") + '()) "--substitute-urls" #$(string-join substitute-urls) #$@extra-options diff --git a/guix/scripts/discover.scm b/guix/scripts/discover.scm new file mode 100644 index 0000000000..d17b2bcfe4 --- /dev/null +++ b/guix/scripts/discover.scm @@ -0,0 +1,158 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2020 Mathieu Othacehe +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (guix scripts discover) + #:use-module (guix avahi) + #:use-module (guix config) + #:use-module (guix scripts) + #:use-module (guix ui) + #:use-module (guix build syscalls) + #:use-module (guix build utils) + #:use-module (guix scripts publish) + #:use-module (ice-9 rdelim) + #:use-module (srfi srfi-37) + #:export (read-publish-urls + + guix-discover)) + +(define (show-help) + (format #t (G_ "Usage: guix discover [OPTION]... +Discover Guix related services using Avahi.\n")) + (display (G_ " + -c, --cache=DIRECTORY cache discovery results in DIRECTORY")) + (display (G_ " + -h, --help display this help and exit")) + (display (G_ " + -V, --version display version information and exit")) + (newline) + (show-bug-report-information)) + +(define %options + (list (option '(#\c "cache") #t #f + (lambda (opt name arg result) + (alist-cons 'cache arg result))) + (option '(#\h "help") #f #f + (lambda _ + (show-help) + (exit 0))) + (option '(#\V "version") #f #f + (lambda _ + (show-version-and-exit "guix discover"))))) + +(define %default-options + `((cache . ,%state-directory))) + + +;;; +;;; Publish servers. +;;; + +(define %publish-services + ;; Set of discovered publish services. + (make-hash-table)) + +(define (publish-file cache-directory) + "Return the name of the file storing the discovered publish services inside +CACHE-DIRECTORY." + (let ((directory (string-append cache-directory "/discover"))) + (string-append directory "/publish"))) + +(define %publish-file + (make-parameter (publish-file %state-directory))) + +(define* (write-publish-file #:key (file (%publish-file))) + "Dump the content of %PUBLISH-SERVICES hash table into FILE. Use a write +lock on FILE to synchronize with any potential readers." + (with-file-lock file + (call-with-output-file file + (lambda (port) + (hash-for-each + (lambda (name service) + (format port "http://~a:~a~%" + (avahi-service-address service) + (avahi-service-port service))) + %publish-services))) + (chmod file #o644))) + +(define (call-with-read-file-lock file thunk) + "Call THUNK with a read lock on FILE." + (let ((port #f)) + (dynamic-wind + (lambda () + (set! port + (let ((port (open-file file "r0"))) + (fcntl-flock port 'read-lock) + port))) + thunk + (lambda () + (when port + (unlock-file port)))))) + +(define-syntax-rule (with-read-file-lock file exp ...) + "Wait to acquire a read lock on FILE and evaluate EXP in that context." + (call-with-read-file-lock file (lambda () exp ...))) + +(define* (read-publish-urls #:key (file (%publish-file))) + "Read publish urls list from FILE and return it. Use a read lock on FILE to +synchronize with the writer." + (with-read-file-lock file + (call-with-input-file file + (lambda (port) + (let loop ((url (read-line port)) + (urls '())) + (if (eof-object? url) + urls + (loop (read-line port) (cons url urls)))))))) + + +;;; +;;; Entry point. +;;; + +(define %services + ;; List of services we want to discover. + (list publish-service-type)) + +(define (service-proc action service) + (let ((name (avahi-service-name service)) + (type (avahi-service-type service))) + (when (string=? type publish-service-type) + (case action + ((new-service) + (hash-set! %publish-services name service)) + ((remove-service) + (hash-remove! %publish-services name))) + (write-publish-file)))) + +(define-command (guix-discover . args) + (category plumbing) + (synopsis "discover Guix related services using Avahi") + + (with-error-handling + (let* ((opts (args-fold* args %options + (lambda (opt name arg result) + (leave (G_ "~A: unrecognized option~%") name)) + (lambda (arg result) + (leave (G_ "~A: extraneous argument~%") arg)) + %default-options)) + (cache (assoc-ref opts 'cache)) + (publish-file (publish-file cache))) + (parameterize ((%publish-file publish-file)) + (mkdir-p (dirname publish-file)) + (avahi-browse-service-thread service-proc + #:types %services))))) diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm index ddb885d344..16e8fe6106 100755 --- a/guix/scripts/substitute.scm +++ b/guix/scripts/substitute.scm @@ -27,6 +27,7 @@ #:use-module (guix config) #:use-module (guix records) #:use-module ((guix serialization) #:select (restore-file)) + #:use-module (guix scripts discover) #:use-module (gcrypt hash) #:use-module (guix base32) #:use-module (guix base64) @@ -1078,9 +1079,17 @@ found." ;; daemon. '("http://ci.guix.gnu.org")))) +(define %local-substitute-urls + ;; If the following option is passed to the daemon, use the substitutes list + ;; provided by "guix discover" process. + (if (find-daemon-option "use-local-publish") + (read-publish-urls) + '())) + (define substitute-urls ;; List of substitute URLs. - (make-parameter %default-substitute-urls)) + (make-parameter (append %local-substitute-urls + %default-substitute-urls))) (define (client-terminal-columns) "Return the number of columns in the client's terminal, if it is known, or a diff --git a/nix/libstore/globals.cc b/nix/libstore/globals.cc index 0cc001fbe4..2b621af982 100644 --- a/nix/libstore/globals.cc +++ b/nix/libstore/globals.cc @@ -35,6 +35,7 @@ Settings::Settings() maxSilentTime = 0; buildTimeout = 0; useBuildHook = true; + useLocalPublish = false; printBuildTrace = false; multiplexedBuildOutput = false; reservedSize = 8 * 1024 * 1024; diff --git a/nix/libstore/globals.hh b/nix/libstore/globals.hh index 27616a2283..43653aef48 100644 --- a/nix/libstore/globals.hh +++ b/nix/libstore/globals.hh @@ -116,6 +116,10 @@ struct Settings { users want to disable this from the command-line. */ bool useBuildHook; + /* Whether to use publish servers found on the local network for + substitution. */ + bool useLocalPublish; + /* Whether buildDerivations() should print out lines on stderr in a fixed format to allow its progress to be monitored. Each line starts with a "@". The following are defined: diff --git a/nix/nix-daemon/guix-daemon.cc b/nix/nix-daemon/guix-daemon.cc index cd949aca67..f0ace9ce8b 100644 --- a/nix/nix-daemon/guix-daemon.cc +++ b/nix/nix-daemon/guix-daemon.cc @@ -89,6 +89,7 @@ builds derivations on behalf of its clients."); #define GUIX_OPT_TIMEOUT 18 #define GUIX_OPT_MAX_SILENT_TIME 19 #define GUIX_OPT_LOG_COMPRESSION 20 +#define GUIX_OPT_USE_LOCAL_PUBLISH 21 static const struct argp_option options[] = { @@ -129,6 +130,9 @@ static const struct argp_option options[] = n_("disable compression of the build logs") }, { "log-compression", GUIX_OPT_LOG_COMPRESSION, "TYPE", 0, n_("use the specified compression type for build logs") }, + { "use-local-publish", GUIX_OPT_USE_LOCAL_PUBLISH, + "yes/no", OPTION_ARG_OPTIONAL, + n_("use publish servers discovered on the local network") }, /* '--disable-deduplication' was known as '--disable-store-optimization' up to Guix 0.7 included, so keep the alias around. */ @@ -261,6 +265,10 @@ parse_opt (int key, char *arg, struct argp_state *state) case GUIX_OPT_NO_BUILD_HOOK: settings.useBuildHook = false; break; + case GUIX_OPT_USE_LOCAL_PUBLISH: + settings.useLocalPublish = string_to_bool (arg); + settings.set("use-local-publish", arg); + break; case GUIX_OPT_DEBUG: verbosity = lvlDebug; break; @@ -506,6 +514,18 @@ using `--build-users-group' is highly recommended\n")); format ("extra chroot directories: '%1%'") % chroot_dirs); } + if (settings.useLocalPublish) + { + Strings args; + + args.push_back("guix"); + args.push_back("discover"); + + startProcess([&]() { + execv(settings.guixProgram.c_str(), stringsToCharPtrs(args).data()); + }); + } + printMsg (lvlDebug, format ("automatic deduplication set to %1%") % settings.autoOptimiseStore); -- 2.29.2 From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 24 08:27:26 2020 Received: (at control) by debbugs.gnu.org; 24 Nov 2020 13:27:26 +0000 Received: from localhost ([127.0.0.1]:58241 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1khYLt-0007xY-Sz for submit@debbugs.gnu.org; Tue, 24 Nov 2020 08:27:26 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34262) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1khYLs-0007xF-Lm for control@debbugs.gnu.org; Tue, 24 Nov 2020 08:27:24 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:43023) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1khYLn-000087-G6 for control@debbugs.gnu.org; Tue, 24 Nov 2020 08:27:19 -0500 Received: from [2a01:e0a:19b:d9a0:3c14:dca1:bc4:a96f] (port=50300 helo=cervin) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1khYLc-0002zk-KR for control@debbugs.gnu.org; Tue, 24 Nov 2020 08:27:11 -0500 Date: Tue, 24 Nov 2020 14:27:06 +0100 Message-Id: <87r1oinavp.fsf@cervin.i-did-not-set--mail-host-address--so-tickle-me> To: control@debbugs.gnu.org From: Mathieu Othacehe Subject: control message for bug #44801 X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: control 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: -2.9 (--) merge 44801 44800 quit From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 24 08:27:37 2020 Received: (at control) by debbugs.gnu.org; 24 Nov 2020 13:27:37 +0000 Received: from localhost ([127.0.0.1]:58244 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1khYM5-0007y0-5A for submit@debbugs.gnu.org; Tue, 24 Nov 2020 08:27:37 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34274) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1khYM3-0007xj-Gt for control@debbugs.gnu.org; Tue, 24 Nov 2020 08:27:35 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:43024) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1khYLx-0000An-Go for control@debbugs.gnu.org; Tue, 24 Nov 2020 08:27:30 -0500 Received: from [2a01:e0a:19b:d9a0:3c14:dca1:bc4:a96f] (port=50304 helo=cervin) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1khYLw-0003px-BP for control@debbugs.gnu.org; Tue, 24 Nov 2020 08:27:29 -0500 Date: Tue, 24 Nov 2020 14:27:27 +0100 Message-Id: <87pn42nav4.fsf@cervin.i-did-not-set--mail-host-address--so-tickle-me> To: control@debbugs.gnu.org From: Mathieu Othacehe Subject: control message for bug #44802 X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: control 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: -2.9 (--) merge 44802 44800 quit From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 24 08:35:29 2020 Received: (at 44800) by debbugs.gnu.org; 24 Nov 2020 13:35:29 +0000 Received: from localhost ([127.0.0.1]:58253 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1khYTg-0001od-Uh for submit@debbugs.gnu.org; Tue, 24 Nov 2020 08:35:29 -0500 Received: from eggs.gnu.org ([209.51.188.92]:36596) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1khYTf-0001oM-6Z for 44800@debbugs.gnu.org; Tue, 24 Nov 2020 08:35:27 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:43123) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1khYTX-0002sU-W2; Tue, 24 Nov 2020 08:35:20 -0500 Received: from [2a01:e0a:19b:d9a0:3c14:dca1:bc4:a96f] (port=50384 helo=cervin) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1khYTT-0002L2-No; Tue, 24 Nov 2020 08:35:18 -0500 From: Mathieu Othacehe To: zimoun Subject: Re: [bug#44800] [PATCH 0/2] publish: Add Avahi support. References: <20201122155659.67235-1-othacehe@gnu.org> <867dqbviey.fsf@gmail.com> Date: Tue, 24 Nov 2020 14:35:14 +0100 In-Reply-To: <867dqbviey.fsf@gmail.com> (zimoun's message of "Mon, 23 Nov 2020 23:04:53 +0100") Message-ID: <87lfeqnai5.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 44800 Cc: 44800@debbugs.gnu.org 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: -3.3 (---) Hey zimoun, > Is this part of your new design? Somehow because it allows the machines on a local network to share substitutes between each other transparently. It not strictly needed however because the offloading workers directly add the offloading server to their substitute list in the design I'm proposing. > What happen if the option is passed but the servers are not reliable > (the connection is unstable)? The build fails with the following message: --8<---------------cut here---------------start------------->8--- guix substitute: error: connect: No route to host substitution of /gnu/store/pbaihd2k2dbv02s7aq3aybk29r00lg9h-abduco-0.6 failed guix build: error: some substitutes for the outputs of derivation `/gnu/store/xnfyilqfhk05rgxbq7hmx81d65bsnprh-abduco-0.6.drv' failed (usually happens due to networking issues); try `--fallback' to build derivation from source --8<---------------cut here---------------end--------------->8--- Thanks, Mathieu From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 27 11:54:42 2020 Received: (at 44800) by debbugs.gnu.org; 27 Nov 2020 16:54:42 +0000 Received: from localhost ([127.0.0.1]:46100 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kih18-0006kN-9i for submit@debbugs.gnu.org; Fri, 27 Nov 2020 11:54:42 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51102) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kih15-0006k9-7d for 44800@debbugs.gnu.org; Fri, 27 Nov 2020 11:54:40 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:54079) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kih0z-0005xj-ME for 44800@debbugs.gnu.org; Fri, 27 Nov 2020 11:54:33 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=47880 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kih0x-0003oM-T6; Fri, 27 Nov 2020 11:54:32 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Mathieu Othacehe Subject: Re: [bug#44800] [PATCH v2 0/3] publish: Add Avahi support. References: <20201122155659.67235-1-othacehe@gnu.org> <20201124132145.217751-1-othacehe@gnu.org> Date: Fri, 27 Nov 2020 17:54:30 +0100 In-Reply-To: <20201124132145.217751-1-othacehe@gnu.org> (Mathieu Othacehe's message of "Tue, 24 Nov 2020 14:21:42 +0100") Message-ID: <87pn3ysptl.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 44800 Cc: 44800@debbugs.gnu.org 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: -3.3 (---) Hi Mathieu, Mathieu Othacehe skribis: > Here's a v2 that now provides a complete chain. "guix publish" services that > are started with "--enable-avahi" will be discovered by the "guix-daemon" when > the "--use-local-publish" option is passed. > > A new "guix discover" script is used to discover publish services in the > background. I have tested this setup by starting a guix-publish server in a > VM. > > As suggested here: > https://guix.gnu.org/blog/2017/reproducible-builds-a-status-update/ the local > publish servers are prefixed to the substitute-url list, so that the daemon > will try to use substitute from the local network first, before falling back > to the CI build farm. As discussed on IRC, this is very cool stuff! Some comments follow. From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 27 12:04:58 2020 Received: (at 44800) by debbugs.gnu.org; 27 Nov 2020 17:04:58 +0000 Received: from localhost ([127.0.0.1]:46104 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kihB4-0006zX-CE for submit@debbugs.gnu.org; Fri, 27 Nov 2020 12:04:58 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54350) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kihB2-0006zJ-8m for 44800@debbugs.gnu.org; Fri, 27 Nov 2020 12:04:57 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:54310) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kihAw-0007sW-VE for 44800@debbugs.gnu.org; Fri, 27 Nov 2020 12:04:50 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=47902 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kihAs-0004i9-Bs; Fri, 27 Nov 2020 12:04:47 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Mathieu Othacehe Subject: Re: [bug#44800] [PATCH v2 1/3] Add Avahi support. References: <20201124132145.217751-1-othacehe@gnu.org> <20201124132145.217751-2-othacehe@gnu.org> Date: Fri, 27 Nov 2020 18:04:44 +0100 In-Reply-To: <20201124132145.217751-2-othacehe@gnu.org> (Mathieu Othacehe's message of "Tue, 24 Nov 2020 14:21:43 +0100") Message-ID: <87k0u6spcj.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 44800 Cc: 44800@debbugs.gnu.org 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: -3.3 (---) Mathieu Othacehe skribis: > * guix/avahi.scm: New file. > * Makefile.am (MODULES): Add it. > * configure.ac: Add Guile-Avahi dependency. > * doc/guix.texi (Requirements): Document it. > * gnu/packages/package-management.scm (guix)[native-inputs]: Add > "guile-avahi", > [propagated-inputs]: ditto. > * guix/self.scm (specification->package): Add guile-avahi. > (compiled-guix): Ditto. [...] > --- a/configure.ac > +++ b/configure.ac > @@ -161,6 +161,12 @@ if test "x$have_guile_lzlib" !=3D "xyes"; then > AC_MSG_ERROR([Guile-lzlib is missing; please install it.]) > fi >=20=20 > +dnl Check for Guile-Avahi. > +GUILE_MODULE_AVAILABLE([have_guile_avahi], [(avahi)]) > +if test "x$have_guile_avahi" !=3D "xyes"; then > + AC_MSG_ERROR([Guile-Avahi is missing; please install it.]) > +fi I wonder if we could/should make it an optional dependency. (guix avahi) would need to autoload (avahi), which might be slightly annoying. An argument in favor of making it mandatory is that it would help make the feature more widely used, and thus more widely useful. > +(define-record-type* > + avahi-service make-avahi-service > + avahi-service? > + (name avahi-service-name) > + (type avahi-service-type) > + (interface avahi-service-interface) > + (local-address avahi-service-local-address) > + (address avahi-service-address) > + (port avahi-service-port) > + (txt avahi-service-txt)) You could use (srfi srfi-9) =E2=80=98define-record-type=E2=80=99 since the = extra (guix records) features are not necessary here. > +(define* (avahi-publish-service-thread name > + #:key > + type port > + (stop-loop? (const #f)) > + (timeout 100) > + (txt '())) > + "Publish the service TYPE using Avahi, for the given PORT, on all inte= rfaces > +and for all protocols. Also, advertise the given TXT record list. > + > +This procedure starts a new thread running the Avahi event loop. It exi= ts > +when STOP-LOOP? procedure returns true." > + (define client-callback > + (lambda (client state) > + (when (eq? state client-state/s-running) > + (let ((group (make-entry-group client (const #t)))) > + (apply > + add-entry-group-service! group interface/unspecified > + protocol/unspecified '() > + name type #f #f port txt) > + (commit-entry-group group))))) > + > + (call-with-new-thread > + (lambda () > + (let* ((poll (make-simple-poll)) > + (client (make-client (simple-poll poll) > + (list > + client-flag/ignore-user-config) > + client-callback))) > + (while (not (stop-loop?)) > + (iterate-simple-poll poll timeout)))))) (I wanted to add an API in Guile-Avahi to =E2=80=9Cinvert inversion of cont= rol=E2=80=9D so that one could escape callback hell but never got around to completing it.) > +(define (interface->ip-address interface) > + "Return the local IP address of the given INTERFACE." > + (let ((address > + (network-interface-address > + (socket AF_INET SOCK_STREAM 0) interface))) > + (inet-ntop (sockaddr:fam address) (sockaddr:addr address)))) Make sure to close the socket. Can=E2=80=99t we obtain the IP address without creating a socket actually? = Noob here. > + ;; Handle service resolution events. > + (cond ((eq? event resolver-event/found) > + (info (G_ "resolved service `~a' at `~a:~a'~%") > + service-name (inet-ntop family address) port) IWBN to not add UI code in here. Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 27 12:10:50 2020 Received: (at 44800) by debbugs.gnu.org; 27 Nov 2020 17:10:50 +0000 Received: from localhost ([127.0.0.1]:46114 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kihGk-000785-4q for submit@debbugs.gnu.org; Fri, 27 Nov 2020 12:10:50 -0500 Received: from mail-wr1-f46.google.com ([209.85.221.46]:41381) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kihGi-00077r-Sj for 44800@debbugs.gnu.org; Fri, 27 Nov 2020 12:10:49 -0500 Received: by mail-wr1-f46.google.com with SMTP id 23so6296765wrc.8 for <44800@debbugs.gnu.org>; Fri, 27 Nov 2020 09:10:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding; bh=IYLyZP7iTxtFpsE8yX5eVQ6c4HIYQGvETUdfp9pfsYw=; b=Bvw/t6eQ0hDC4Klk1IZ8sVAELZoeOc8+ND6MQLKJxBWwurs6Fj4Caz3ZXFLtUQEc+w P4lCYWpzaTK1XvzNV9R7dNfZXLbGSiSlAoko5kvA24R5dgJGome0bQEZAZ8w49gjqnmv 1l0AgI9MKLD+E4akLQ+wPKNzBAUKM3gGpLn7XvpyfhbVKXsodMNgVQjG6HZT6ISgBNfW pm/0nuyBDajcbVMiJJjPKWQ7KqIdDw5YfLShofBLQAnw58vVUrBbAn043rTuE7Kpkpvq E97tsNhzTcnLmTKXdwL/70UfBDkJ9UFmPaU0j2O4gB3gdY3Iqsdv3MRyl1qUALMECrpV dYKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=IYLyZP7iTxtFpsE8yX5eVQ6c4HIYQGvETUdfp9pfsYw=; b=lz/5C4ChG/r+NObZ9oOfMwLgGOITpf+B+6k4fu8BBz8b61mg08BfItBmIJebZ+/AgG Xq+dWk8wR5w55p4Jl8j27MPS97JpS7YqhpkvS/b6xgpPXeL72BFPcN/MAFCRd0wd30Kj 88YGb6jD+BExvZexPkx9UBzx7JtcIYbXFLI24+UALabvd6pVmq/e31jc4VaPUtRK7UEv Dfkv4KZtatNZ7nxQKV3mMoSjAuHJsH5j3XMwQ0QpzJ/gf762Zc6//Sd/4McDFSiU24fU 7CpjlmWCyLoTbdNXem285irjvNoX2fUeEnIS6+90no0zcFNTdQFG2uHXMhZu8SMl1/Ag 2clg== X-Gm-Message-State: AOAM5328Lb3bljnzTI16Wqo37LNq4/p6CVL8PANlz4EwaRX1UdYnrb+r CMnnisgco5ex40DT7OvNUYmh5snGqxzUhg== X-Google-Smtp-Source: ABdhPJz5GPJQM3/iHRniLNEVJUwIRcSXuVX91C4V52oMu7HHzi59d/CM411xweFuTCvoI9l0KeXwuQ== X-Received: by 2002:adf:f0c3:: with SMTP id x3mr4535161wro.327.1606497042772; Fri, 27 Nov 2020 09:10:42 -0800 (PST) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id m9sm15723354wrx.59.2020.11.27.09.10.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Nov 2020 09:10:40 -0800 (PST) From: zimoun To: Ludovic =?utf-8?Q?Court=C3=A8s?= , Mathieu Othacehe Subject: Re: [bug#44800] [PATCH v2 1/3] Add Avahi support. In-Reply-To: <87k0u6spcj.fsf@gnu.org> References: <20201124132145.217751-1-othacehe@gnu.org> <20201124132145.217751-2-othacehe@gnu.org> <87k0u6spcj.fsf@gnu.org> Date: Fri, 27 Nov 2020 18:09:01 +0100 Message-ID: <86h7paraky.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 44800 Cc: 44800@debbugs.gnu.org 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 (-) Hi Ludo, On Fri, 27 Nov 2020 at 18:04, Ludovic Court=C3=A8s wrote: > (I wanted to add an API in Guile-Avahi to =E2=80=9Cinvert inversion of co= ntrol=E2=80=9D > so that one could escape callback hell but never got around to > completing it.) Out of curiosity, what do you mean by =E2=80=9Cinvert inversion of control= =E2=80=9D? Cheers, simon From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 27 12:12:36 2020 Received: (at 44800) by debbugs.gnu.org; 27 Nov 2020 17:12:36 +0000 Received: from localhost ([127.0.0.1]:46118 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kihIS-0007Aq-HS for submit@debbugs.gnu.org; Fri, 27 Nov 2020 12:12:36 -0500 Received: from eggs.gnu.org ([209.51.188.92]:56678) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kihIR-0007Ac-8q for 44800@debbugs.gnu.org; Fri, 27 Nov 2020 12:12:35 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:54507) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kihIM-0001A1-4H for 44800@debbugs.gnu.org; Fri, 27 Nov 2020 12:12:30 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=47908 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kihIJ-0008UV-6e; Fri, 27 Nov 2020 12:12:27 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Mathieu Othacehe Subject: Re: [bug#44800] [PATCH v2 2/3] publish: Add avahi support. References: <20201124132145.217751-1-othacehe@gnu.org> <20201124132145.217751-3-othacehe@gnu.org> Date: Fri, 27 Nov 2020 18:12:25 +0100 In-Reply-To: <20201124132145.217751-3-othacehe@gnu.org> (Mathieu Othacehe's message of "Tue, 24 Nov 2020 14:21:44 +0100") Message-ID: <87blfisozq.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 44800 Cc: 44800@debbugs.gnu.org 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: -3.3 (---) Hi, Mathieu Othacehe skribis: > * guix/scripts/publish.scm (%options): Add "--enable-avahi" option. > (show-help): Document it. > (service-name): New procedure, > (publish-service-type): new variable. > (run-publish-server): Add "avahi?" and "port" parameters. Use them to pub= lish > the server using Avahi. > (guix-publish): Pass the "avahi?" option to "run-publish-server". > * gnu/services/base.scm (): Add "enable-avahi= ?" > field. > (guix-publish-shepherd-service): Honor it. Neat! > +When the @option{--enable-avahi} option is passed, the publish server is > +advertised on the local network as an Avahi service, using Guile-Avahi > +bindings. s/bindings/(@pxref{Top,,, guile-avahi, Using Avahi in Guile Scheme Programs= }/ As discussed on IRC, I would avoid using the name Avahi on the CLI and to some extent in the API as well. The command-line option could be =E2=80=9C--advertise=E2=80=9D. The documentation would be something like: =E2=80=A6 the server advertises its availability on the local network usi= ng multicast DNS (mDNS) and DNS service discovery (DNS-SD), currently @i{via} Guile-Avahi =E2=80=A6 (I remember that Julien posted a DNS client implementation a few years ago, we never know what the future will be like=E2=80=A6 :-)) > + (enable-avahi? guix-publish-enable-avahi? ;boolean > + (default #f)) Same here. > (define* (run-publish-server socket store > #:key > + avahi? port > (compressions (list %no-compression)) > (nar-path "nar") narinfo-ttl > cache pool) > + (when avahi? > + (avahi-publish-service-thread (service-name) > + #:type publish-service-type > + #:port port)) Maybe add (info (_ "advertising =E2=80=A6")) here. Ideally, you=E2=80=99d = need a callback because you can=E2=80=99t tell what the actual advertised name is = since Avahi can pick one to avoid name clashes. Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 27 12:38:06 2020 Received: (at 44800) by debbugs.gnu.org; 27 Nov 2020 17:38:07 +0000 Received: from localhost ([127.0.0.1]:46129 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kihgu-0007mR-PE for submit@debbugs.gnu.org; Fri, 27 Nov 2020 12:38:06 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34798) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kihgs-0007mD-Df for 44800@debbugs.gnu.org; Fri, 27 Nov 2020 12:37:51 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:55619) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kihgn-0004z6-6W for 44800@debbugs.gnu.org; Fri, 27 Nov 2020 12:37:45 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=47928 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kihgm-0005ag-C6; Fri, 27 Nov 2020 12:37:44 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Mathieu Othacehe Subject: Re: [bug#44800] [PATCH v2 3/3] Use substitute servers on the local network. References: <20201124132145.217751-1-othacehe@gnu.org> <20201124132145.217751-4-othacehe@gnu.org> Date: Fri, 27 Nov 2020 18:37:42 +0100 In-Reply-To: <20201124132145.217751-4-othacehe@gnu.org> (Mathieu Othacehe's message of "Tue, 24 Nov 2020 14:21:45 +0100") Message-ID: <87lfemr995.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 44800 Cc: 44800@debbugs.gnu.org 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 (-) Mathieu Othacehe skribis: > * guix/scripts/discover.scm: New file. > * Makefile.am (MODULES): Add it. > * nix/nix-daemon/guix-daemon.cc (options): Add "use-local-publish" option, > (parse-opt): parse it, > (main): start "guix discover" process when the option is set. > * nix/libstore/globals.hh (Settings): Add "useLocalPublish" public member. > * nix/libstore/globals.cc (Settings): Initialize it. > * guix/scripts/substitute.scm (%local-substitute-urls): New variable, > (substitute-urls): add it. > * gnu/services/base.scm (): Add "use-local-publish?" > field, > (guix-shepherd-service): honor it. > * doc/guix.texi (Invoking guix-daemon): Document "use-local-publish" opti= on, > (Base Services): ditto. [...] > +@item --use-local-publish[=3Dyes|no] > +Whether to use publish servers discovered a the local network, using > +Avahi, for substitutution. How about =E2=80=98--discover-substitute-servers=E2=80=99 or =E2=80=98--dis= cover-substitutes=E2=80=99 or even =E2=80=98--discover=E2=80=99? s/publish servers/substitute servers/ I think we need a note about the performance, security, and privacy implications of this here, namely: 0. It might be faster/less expensive than fetching from remote servers;=20 1. There are no security risks, only genuine substitutes will be used (add cross-ref); 2. An attacker advertising =E2=80=98guix publish=E2=80=99 on your LAN can= not serve you malicious binaries, but they can learn what software you=E2=80=99re installing. 3. Servers may serve substitute over HTTP, unencrypted, so anyone on the LAN can see what software you=E2=80=99re installing. IWBN to have an action of the Shepherd service to turn it on and off; you might want to do that depending on how much you trust the LAN you=E2=80= =99re on. (That can come later though.) > +++ b/gnu/services/base.scm > @@ -1529,6 +1529,8 @@ archive' public keys, with GUIX." > (default 0)) > (log-compression guix-configuration-log-compression > (default 'bzip2)) > + (use-local-publish? guix-configuration-use-local-publish? > + (default #f)) Same here. > +(define %publish-services > + ;; Set of discovered publish services. > + (make-hash-table)) > + > +(define (publish-file cache-directory) > + "Return the name of the file storing the discovered publish services i= nside > +CACHE-DIRECTORY." > + (let ((directory (string-append cache-directory "/discover"))) > + (string-append directory "/publish"))) > + > +(define %publish-file > + (make-parameter (publish-file %state-directory))) > + > +(define* (write-publish-file #:key (file (%publish-file))) > + "Dump the content of %PUBLISH-SERVICES hash table into FILE. Use a wr= ite > +lock on FILE to synchronize with any potential readers." Aren=E2=80=99t we partly duplicating what avahi-daemon=E2=80=99s already do= ing? avahi-daemon maintains a list of currently valid advertisements, which can be seen with: avahi-browse --cache _workstation._tcp However, that cache first needs to be initialized by running the same command without =E2=80=98--cache=E2=80=99. Hmm, maybe there=E2=80=99s no o= ther choice. I wonder how others deal with that. > +(define-command (guix-discover . args) > + (category plumbing) Should be =E2=80=9Cinternal=E2=80=9D IMO. > +++ b/nix/libstore/globals.cc > @@ -35,6 +35,7 @@ Settings::Settings() > maxSilentTime =3D 0; > buildTimeout =3D 0; > useBuildHook =3D true; > + useLocalPublish =3D false; > printBuildTrace =3D false; > multiplexedBuildOutput =3D false; > reservedSize =3D 8 * 1024 * 1024; > diff --git a/nix/libstore/globals.hh b/nix/libstore/globals.hh > index 27616a2283..43653aef48 100644 > --- a/nix/libstore/globals.hh > +++ b/nix/libstore/globals.hh > @@ -116,6 +116,10 @@ struct Settings { > users want to disable this from the command-line. */ > bool useBuildHook; >=20=20 > + /* Whether to use publish servers found on the local network for > + substitution. */ > + bool useLocalPublish; I think you don=E2=80=99t even need to field here since the variable is only used in guix-daemon.cc. > + case GUIX_OPT_USE_LOCAL_PUBLISH: > + settings.useLocalPublish =3D string_to_bool (arg); > + settings.set("use-local-publish", arg); > + break; Just set a variable local to this file and that=E2=80=99s enough. You still need the second line so that (guix scripts substitute) knows whether it should read the thing. > diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm > index ddb885d344..16e8fe6106 100755 > --- a/guix/scripts/substitute.scm > +++ b/guix/scripts/substitute.scm > @@ -27,6 +27,7 @@ > #:use-module (guix config) > #:use-module (guix records) > #:use-module ((guix serialization) #:select (restore-file)) > + #:use-module (guix scripts discover) > #:use-module (gcrypt hash) > #:use-module (guix base32) > #:use-module (guix base64) > @@ -1078,9 +1079,17 @@ found." > ;; daemon. > '("http://ci.guix.gnu.org")))) >=20=20 > +(define %local-substitute-urls > + ;; If the following option is passed to the daemon, use the substitute= s list > + ;; provided by "guix discover" process. > + (if (find-daemon-option "use-local-publish") > + (read-publish-urls) > + '())) > + > (define substitute-urls > ;; List of substitute URLs. > - (make-parameter %default-substitute-urls)) > + (make-parameter (append %local-substitute-urls > + %default-substitute-urls))) As discussed on IRC, we should probably need to set an upper limit. on the number of local substitute URLs. Imagine: you=E2=80=99re at GuixCon 2021, there are 500 participants all of = which are running =E2=80=98guix publish --advertise=E2=80=99; every Guix operatio= n leads to everyone=E2=80=99s Guix talking to every other person=E2=80=99s Guix, the w= hole thing gets slow as hell, 500 people staring at =E2=80=9Cupdating list of substitu= tes=E2=80=9D, 500 people eventually giving up and signing up for CONDACon. Also, we must make sure =E2=80=98guix substitute=E2=80=99 gracefully handle= s disconnects and servers still advertised but no longer around (timeouts etc.) We=E2=80=99ll need real world tests to see how it behaves I think. In the meantime, we can describe it as a technology preview=E2=84=A2 in the manual. WDYT? Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 28 06:02:22 2020 Received: (at 44800) by debbugs.gnu.org; 28 Nov 2020 11:02:22 +0000 Received: from localhost ([127.0.0.1]:47014 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kixzi-0007pM-IP for submit@debbugs.gnu.org; Sat, 28 Nov 2020 06:02:22 -0500 Received: from eggs.gnu.org ([209.51.188.92]:48138) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kixzh-0007p9-3T for 44800@debbugs.gnu.org; Sat, 28 Nov 2020 06:02:21 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:42970) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kixzb-0006II-Sm; Sat, 28 Nov 2020 06:02:15 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=50148 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kixza-0007Qf-Tz; Sat, 28 Nov 2020 06:02:15 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: zimoun Subject: Re: [bug#44800] [PATCH v2 1/3] Add Avahi support. References: <20201124132145.217751-1-othacehe@gnu.org> <20201124132145.217751-2-othacehe@gnu.org> <87k0u6spcj.fsf@gnu.org> <86h7paraky.fsf@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 8 Frimaire an 229 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Sat, 28 Nov 2020 12:02:13 +0100 In-Reply-To: <86h7paraky.fsf@gmail.com> (zimoun's message of "Fri, 27 Nov 2020 18:09:01 +0100") Message-ID: <87a6v1rbgq.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 44800 Cc: Mathieu Othacehe , 44800@debbugs.gnu.org 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: -3.3 (---) Hi, zimoun skribis: > On Fri, 27 Nov 2020 at 18:04, Ludovic Court=C3=A8s wrote: > >> (I wanted to add an API in Guile-Avahi to =E2=80=9Cinvert inversion of c= ontrol=E2=80=9D >> so that one could escape callback hell but never got around to >> completing it.) > > Out of curiosity, what do you mean by =E2=80=9Cinvert inversion of contro= l=E2=80=9D? Users of the Avahi client library are supposed to pass =E2=80=9Ccallbacks= =E2=80=9D, which leads to =E2=80=9Cinversion of control=E2=80=9D: the library decides = when you code is called. See . Inverting it would mean providing a natural way for users to call the library. HTH! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 28 14:09:03 2020 Received: (at 44800) by debbugs.gnu.org; 28 Nov 2020 19:09:03 +0000 Received: from localhost ([127.0.0.1]:49080 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kj5aS-0007LL-PU for submit@debbugs.gnu.org; Sat, 28 Nov 2020 14:09:03 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:39117) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kj5aO-0007L6-IT for 44800@debbugs.gnu.org; Sat, 28 Nov 2020 14:08:47 -0500 Received: by mail-wm1-f67.google.com with SMTP id 3so6664255wmg.4 for <44800@debbugs.gnu.org>; Sat, 28 Nov 2020 11:08:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding; bh=O7ELwDtL+LW0KjLLLZpBQ1+Gbol5vA8wam/n1rKI2JE=; b=htiL8axZJWsBFQpSdTvw5oYon8xaovF60Fygg83wF48e3RUxl4vTHOySLjhBNR/5yN 1TpTdRad36+ea2b6m6LbjnodiW9ZFEjJPkZSrQakCUPvRJEDNkecAkJdZVPdcCvjfbLu Maks6x9z/MMsKL2xWuckGEKbosQxU7KqLYsneEgLDLfU7CK8A3pxqoUqJAsLkD6ZKOwM KeSaFoibJp5rSD7NSkA0D4nBrJ8OjAQDjqmKvNFvUXNpE41HyRzOKtSZq/DBu1WDHQF6 OKxnnI4mtZRo77NOx1sD3JG9f3ggPrRkZaWqDBhMaQL6XWU6IHh02iQlITtEtNGJD4Yn ZHIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=O7ELwDtL+LW0KjLLLZpBQ1+Gbol5vA8wam/n1rKI2JE=; b=Tuj351tEju3ZtCvypxkP4Iu2nWxy6rWYzJmcEIk2xIIC4fvHR9NdTST4HL0dInTIux QRSBFi3w7l3365RwUNjGtOlGYgd8xJtQeG0+Vgl9Nygt8I26d9lAlobUk8ORTpIopwNu 8aJQ516suBY3xWoAFsZzDA5f6RWLOO0eGx93QlQybZNaRWAeyxWGv9cJKGN6Iswe5O3T 1GTFGEEHv2OIYlofhvMkfm4sg9YewmdzGjuClBgbY/fDMPUSabZak76mto0tXGrSwViW yUKMbYwN3V2YhLAz7kDA8WTAg+J5a8Zegl/9WWWSxv29qkOmhJP7VjQSg7TsgLA79OYu iEdA== X-Gm-Message-State: AOAM531vUubsKLgY6Ngx+uiQE6E3ZhL5BztnVUSZswqrwffBg5B1jwN8 GYDN/D0Cpx30epmaum5ND/fxfGzmCNDvAg== X-Google-Smtp-Source: ABdhPJxeWIC6WLGMtu5s0XHAvEVkD+Dk7lw8sBncAaICV6bVEnZAXFk1zWHFiLurL8QXZopModrQhQ== X-Received: by 2002:a7b:cb8f:: with SMTP id m15mr15355475wmi.95.1606590518844; Sat, 28 Nov 2020 11:08:38 -0800 (PST) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id c2sm6205520wrv.41.2020.11.28.11.08.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Nov 2020 11:08:38 -0800 (PST) From: zimoun To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: [bug#44800] [PATCH v2 1/3] Add Avahi support. In-Reply-To: <87a6v1rbgq.fsf@gnu.org> References: <20201124132145.217751-1-othacehe@gnu.org> <20201124132145.217751-2-othacehe@gnu.org> <87k0u6spcj.fsf@gnu.org> <86h7paraky.fsf@gmail.com> <87a6v1rbgq.fsf@gnu.org> Date: Sat, 28 Nov 2020 19:59:10 +0100 Message-ID: <86360tqpdt.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 44800 Cc: Mathieu Othacehe , 44800@debbugs.gnu.org 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 (-) Hi, On Sat, 28 Nov 2020 at 12:02, Ludovic Court=C3=A8s wrote: > Users of the Avahi client library are supposed to pass =E2=80=9Ccallbacks= =E2=80=9D, > which leads to =E2=80=9Cinversion of control=E2=80=9D: the library decide= s when you code > is called. See . > > Inverting it would mean providing a natural way for users to call the > library. Thanks! I did not know the concept name and that it was so formalized. Really helpful. Cheers, simon From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 29 09:18:34 2020 Received: (at 44800) by debbugs.gnu.org; 29 Nov 2020 14:18:34 +0000 Received: from localhost ([127.0.0.1]:50099 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kjNX7-0001c7-Uj for submit@debbugs.gnu.org; Sun, 29 Nov 2020 09:18:34 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55996) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kjNX6-0001br-4g for 44800@debbugs.gnu.org; Sun, 29 Nov 2020 09:18:33 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:33874) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kjNX0-0000wR-GA; Sun, 29 Nov 2020 09:18:26 -0500 Received: from [2a01:e0a:19b:d9a0:1000:9314:5b51:f241] (port=41366 helo=cervin) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kjNX0-00007p-03; Sun, 29 Nov 2020 09:18:26 -0500 From: Mathieu Othacehe To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: [bug#44800] [PATCH v2 1/3] Add Avahi support. References: <20201124132145.217751-1-othacehe@gnu.org> <20201124132145.217751-2-othacehe@gnu.org> <87k0u6spcj.fsf@gnu.org> Date: Sun, 29 Nov 2020 15:18:24 +0100 In-Reply-To: <87k0u6spcj.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Fri, 27 Nov 2020 18:04:44 +0100") Message-ID: <87k0u4qma7.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 44800 Cc: 44800@debbugs.gnu.org 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: -3.3 (---) Hey Ludo, Thanks for the review :) > An argument in favor of making it mandatory is that it would help make > the feature more widely used, and thus more widely useful. Yes, and most of the other Guile dependencies are mandatory, so having Guile-Avahi also mandatory feels safer. Plus I'm sure that it can be useful for other use cases such as offloading. > You could use (srfi srfi-9) =E2=80=98define-record-type=E2=80=99 since th= e extra (guix > records) features are not necessary here. I use (guix records) feature allowing to call the record constructor with non positional arguments. > (I wanted to add an API in Guile-Avahi to =E2=80=9Cinvert inversion of co= ntrol=E2=80=9D > so that one could escape callback hell but never got around to > completing it.) Sure, it would be nice, but given libavahi design, not an easy task :). > Can=E2=80=99t we obtain the IP address without creating a socket actually= ? Noob > here. I think we can use "getifaddrs" and the its "network-interfaces" binding, but the resulting code does not seem more readable. > >> + ;; Handle service resolution events. >> + (cond ((eq? event resolver-event/found) >> + (info (G_ "resolved service `~a' at `~a:~a'~%") >> + service-name (inet-ntop family address) port) > > IWBN to not add UI code in here. Sure, removed! Mathieu From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 29 09:19:51 2020 Received: (at 44800) by debbugs.gnu.org; 29 Nov 2020 14:19:51 +0000 Received: from localhost ([127.0.0.1]:50105 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kjNYN-0001f8-9C for submit@debbugs.gnu.org; Sun, 29 Nov 2020 09:19:51 -0500 Received: from eggs.gnu.org ([209.51.188.92]:56160) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kjNYL-0001eo-Bo for 44800@debbugs.gnu.org; Sun, 29 Nov 2020 09:19:49 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:33900) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kjNYG-0001Kw-7A; Sun, 29 Nov 2020 09:19:44 -0500 Received: from [2a01:e0a:19b:d9a0:1000:9314:5b51:f241] (port=41372 helo=cervin) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kjNYF-0000B1-JI; Sun, 29 Nov 2020 09:19:43 -0500 From: Mathieu Othacehe To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: [bug#44800] [PATCH v2 2/3] publish: Add avahi support. References: <20201124132145.217751-1-othacehe@gnu.org> <20201124132145.217751-3-othacehe@gnu.org> <87blfisozq.fsf@gnu.org> Date: Sun, 29 Nov 2020 15:19:42 +0100 In-Reply-To: <87blfisozq.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Fri, 27 Nov 2020 18:12:25 +0100") Message-ID: <87ft4sqm81.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 44800 Cc: 44800@debbugs.gnu.org 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: -3.3 (---) > The documentation would be something like: > > =E2=80=A6 the server advertises its availability on the local network u= sing > multicast DNS (mDNS) and DNS service discovery (DNS-SD), currently > @i{via} Guile-Avahi =E2=80=A6 Right, fixed! > Maybe add (info (_ "advertising =E2=80=A6")) here. Ideally, you=E2=80=99= d need a > callback because you can=E2=80=99t tell what the actual advertised name i= s since > Avahi can pick one to avoid name clashes. Done! Thanks, Mathieu From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 29 09:30:07 2020 Received: (at 44800) by debbugs.gnu.org; 29 Nov 2020 14:30:07 +0000 Received: from localhost ([127.0.0.1]:50110 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kjNiI-0001zn-8R for submit@debbugs.gnu.org; Sun, 29 Nov 2020 09:30:06 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57382) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kjNiF-0001yy-Vd for 44800@debbugs.gnu.org; Sun, 29 Nov 2020 09:30:04 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:34030) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kjNiA-0004t3-8w; Sun, 29 Nov 2020 09:29:58 -0500 Received: from [2a01:e0a:19b:d9a0:1000:9314:5b51:f241] (port=41468 helo=cervin) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kjNi8-00088R-TA; Sun, 29 Nov 2020 09:29:57 -0500 From: Mathieu Othacehe To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: [bug#44800] [PATCH v2 3/3] Use substitute servers on the local network. References: <20201124132145.217751-1-othacehe@gnu.org> <20201124132145.217751-4-othacehe@gnu.org> <87lfemr995.fsf@gnu.org> Date: Sun, 29 Nov 2020 15:29:55 +0100 In-Reply-To: <87lfemr995.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Fri, 27 Nov 2020 18:37:42 +0100") Message-ID: <87blfgqlr0.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 44800 Cc: 44800@debbugs.gnu.org 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: -3.3 (---) Hey, > How about =E2=80=98--discover-substitute-servers=E2=80=99 or =E2=80=98--d= iscover-substitutes=E2=80=99 or > even =E2=80=98--discover=E2=80=99? "--discover" seems nice. > I think we need a note about the performance, security, and privacy > implications of this here, namely: > > 0. It might be faster/less expensive than fetching from remote > servers;=20 > > 1. There are no security risks, only genuine substitutes will be used > (add cross-ref); > > 2. An attacker advertising =E2=80=98guix publish=E2=80=99 on your LAN c= annot serve you > malicious binaries, but they can learn what software you=E2=80=99re > installing. > > 3. Servers may serve substitute over HTTP, unencrypted, so anyone on > the LAN can see what software you=E2=80=99re installing. I added a variant of this snippet to the documentation. > IWBN to have an action of the Shepherd service to turn it on and off; > you might want to do that depending on how much you trust the LAN you=E2= =80=99re > on. (That can come later though.) Yup, I agree. > Aren=E2=80=99t we partly duplicating what avahi-daemon=E2=80=99s already = doing? > avahi-daemon maintains a list of currently valid advertisements, which > can be seen with: > > avahi-browse --cache _workstation._tcp > > However, that cache first needs to be initialized by running the same > command without =E2=80=98--cache=E2=80=99. Hmm, maybe there=E2=80=99s no= other choice. I > wonder how others deal with that. If the local network machines are connected with multiple interfaces such as Wifi and Ethernet, then the discovered services will appear multiple times, regardless of the "cache" option I think. Couldn't find any useful resources about that, someone maybe? > Just set a variable local to this file and that=E2=80=99s enough. You st= ill > need the second line so that (guix scripts substitute) knows whether it > should read the thing. Right, fixed. > Imagine: you=E2=80=99re at GuixCon 2021, there are 500 participants all o= f which > are running =E2=80=98guix publish --advertise=E2=80=99; every Guix operat= ion leads to > everyone=E2=80=99s Guix talking to every other person=E2=80=99s Guix, the= whole thing > gets slow as hell, 500 people staring at =E2=80=9Cupdating list of substi= tutes=E2=80=9D, > 500 people eventually giving up and signing up for CONDACon. Haha, that would be a shame. I limited the number of local substitute servers to 50. Maybe that's too high. I think that we will be able to fine tune this value once we have more experience with it. Deploying this mechanism on berlin will probably help. > Also, we must make sure =E2=80=98guix substitute=E2=80=99 gracefully hand= les disconnects > and servers still advertised but no longer around (timeouts etc.) > > We=E2=80=99ll need real world tests to see how it behaves I think. In the > meantime, we can describe it as a technology preview=E2=84=A2 in the manu= al. Sure, I described this option as "experimental" in the documentation. Regarding the disconnections and timeouts, there's probably some work, but I think it's transverse to this development. Pushed the whole patchset, taking your remarks into account. Thanks again for reviewing. Thanks, Mathieu From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 30 08:46:38 2020 Received: (at 44800) by debbugs.gnu.org; 30 Nov 2020 13:46:38 +0000 Received: from localhost ([127.0.0.1]:54182 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kjjVl-0007eZ-Si for submit@debbugs.gnu.org; Mon, 30 Nov 2020 08:46:38 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49708) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kjjVj-0007eL-6D for 44800@debbugs.gnu.org; Mon, 30 Nov 2020 08:46:36 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:55506) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kjjVc-0002J9-Oc for 44800@debbugs.gnu.org; Mon, 30 Nov 2020 08:46:29 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=60936 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kjjVb-0001gH-Eu; Mon, 30 Nov 2020 08:46:27 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Mathieu Othacehe Subject: Re: [bug#44800] [PATCH v2 3/3] Use substitute servers on the local network. References: <20201124132145.217751-1-othacehe@gnu.org> <20201124132145.217751-4-othacehe@gnu.org> <87lfemr995.fsf@gnu.org> <87blfgqlr0.fsf@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 10 Frimaire an 229 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Mon, 30 Nov 2020 14:46:26 +0100 In-Reply-To: <87blfgqlr0.fsf@gnu.org> (Mathieu Othacehe's message of "Sun, 29 Nov 2020 15:29:55 +0100") Message-ID: <87o8jflzyl.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 44800 Cc: 44800@debbugs.gnu.org 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: -3.3 (---) Hi, Mathieu Othacehe skribis: > Pushed the whole patchset, taking your remarks into account. Thanks > again for reviewing. Woohoo, thanks! I=E2=80=99ll give it a spin in the coming days/weeks and we=E2=80=99ll see.= Can=E2=80=99t wait to be physically back at the office to see how it goes with more publishers/users. :-) Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 01 03:43:11 2020 Received: (at 44800-done) by debbugs.gnu.org; 1 Dec 2020 08:43:11 +0000 Received: from localhost ([127.0.0.1]:57695 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kk1Ff-0003Bt-J7 for submit@debbugs.gnu.org; Tue, 01 Dec 2020 03:43:11 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51696) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kk1Fd-0003Bg-NJ for 44800-done@debbugs.gnu.org; Tue, 01 Dec 2020 03:43:10 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:50307) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kk1FY-00064Y-AD; Tue, 01 Dec 2020 03:43:04 -0500 Received: from [2a01:e0a:19b:d9a0:d91d:e880:959c:e46b] (port=48554 helo=cervin) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kk1FW-0007nw-Pb; Tue, 01 Dec 2020 03:43:03 -0500 From: Mathieu Othacehe To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: [bug#44800] [PATCH v2 3/3] Use substitute servers on the local network. References: <20201124132145.217751-1-othacehe@gnu.org> <20201124132145.217751-4-othacehe@gnu.org> <87lfemr995.fsf@gnu.org> <87blfgqlr0.fsf@gnu.org> <87o8jflzyl.fsf@gnu.org> Date: Tue, 01 Dec 2020 09:43:01 +0100 In-Reply-To: <87o8jflzyl.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Mon, 30 Nov 2020 14:46:26 +0100") Message-ID: <875z5l533e.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 44800-done Cc: 44800-done@debbugs.gnu.org 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: -3.3 (---) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hey Ludo, > I=E2=80=99ll give it a spin in the coming days/weeks and we=E2=80=99ll se= e. Can=E2=80=99t wait > to be physically back at the office to see how it goes with more > publishers/users. :-) Great, I hope it will work fine :). Here's the system configuration I used to test this feature. Thanks, Mathieu --=-=-= Content-Type: application/octet-stream Content-Disposition: attachment; filename=advertise-os.scm Content-Transfer-Encoding: base64 OzsgVGhpcyBpcyBhbiBvcGVyYXRpbmcgc3lzdGVtIGNvbmZpZ3VyYXRpb24gdGVtcGxhdGUKOzsg Zm9yIGEgImJhcmUgYm9uZXMiIHNldHVwLCB3aXRoIG5vIFgxMSBkaXNwbGF5IHNlcnZlci4KCih1 c2UtbW9kdWxlcyAoZ251KSkKKHVzZS1zZXJ2aWNlLW1vZHVsZXMgYXZhaGkgYmFzZSBuZXR3b3Jr aW5nIHNzaCkKKHVzZS1wYWNrYWdlLW1vZHVsZXMgcGFja2FnZS1tYW5hZ2VtZW50IHNjcmVlbiBz c2gpCgooZGVmaW5lIChvcGVyYXRpbmctc3lzdGVtLXdpdGgtY3VycmVudC1ndWl4IG9zKQogICJS ZXR1cm4gYSB2YXJpYW50IG9mIE9TIHRoYXQgdXNlcyB0aGUgY3VycmVudCBHdWl4LiIKICAob3Bl cmF0aW5nLXN5c3RlbQogICAgKGluaGVyaXQgb3MpCiAgICAoc2VydmljZXMgKG1vZGlmeS1zZXJ2 aWNlcyAob3BlcmF0aW5nLXN5c3RlbS11c2VyLXNlcnZpY2VzIG9zKQogICAgICAgICAgICAgICAg KGd1aXgtc2VydmljZS10eXBlIGNvbmZpZyA9PgogICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIChndWl4LWNvbmZpZ3VyYXRpb24KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgKGluaGVyaXQgY29uZmlnKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAoZ3VpeCAoY3VycmVudC1ndWl4KSkpKSkpKSkKCihvcGVyYXRpbmctc3lzdGVtLXdpdGgtY3Vy cmVudC1ndWl4CiAob3BlcmF0aW5nLXN5c3RlbQogICAoaG9zdC1uYW1lICJrb21wdXRpbG8iKQog ICAodGltZXpvbmUgIkV1cm9wZS9CZXJsaW4iKQogICAobG9jYWxlICJlbl9VUy51dGY4IikKCiAg IChuYW1lLXNlcnZpY2Utc3dpdGNoICVtZG5zLWhvc3QtbG9va3VwLW5zcykKICAgOzsgQm9vdCBp biAibGVnYWN5IiBCSU9TIG1vZGUsIGFzc3VtaW5nIC9kZXYvc2RYIGlzIHRoZQogICA7OyB0YXJn ZXQgaGFyZCBkaXNrLCBhbmQgIm15LXJvb3QiIGlzIHRoZSBsYWJlbCBvZiB0aGUgdGFyZ2V0CiAg IDs7IHJvb3QgZmlsZSBzeXN0ZW0uCiAgIChib290bG9hZGVyIChib290bG9hZGVyLWNvbmZpZ3Vy YXRpb24KICAgICAgICAgICAgICAgIChib290bG9hZGVyIGdydWItYm9vdGxvYWRlcikKICAgICAg ICAgICAgICAgICh0YXJnZXQgIi9kZXYvc2RYIikpKQogICAoZmlsZS1zeXN0ZW1zIChjb25zIChm aWxlLXN5c3RlbQogICAgICAgICAgICAgICAgICAgICAgICAgKGRldmljZSAoZmlsZS1zeXN0ZW0t bGFiZWwgIm15LXJvb3QiKSkKICAgICAgICAgICAgICAgICAgICAgICAgIChtb3VudC1wb2ludCAi LyIpCiAgICAgICAgICAgICAgICAgICAgICAgICAodHlwZSAiZXh0NCIpKQogICAgICAgICAgICAg ICAgICAgICAgICViYXNlLWZpbGUtc3lzdGVtcykpCgogICA7OyBUaGlzIGlzIHdoZXJlIHVzZXIg YWNjb3VudHMgYXJlIHNwZWNpZmllZC4gIFRoZSAicm9vdCIKICAgOzsgYWNjb3VudCBpcyBpbXBs aWNpdCwgYW5kIGlzIGluaXRpYWxseSBjcmVhdGVkIHdpdGggdGhlCiAgIDs7IGVtcHR5IHBhc3N3 b3JkLgogICAodXNlcnMgKGNvbnMgKHVzZXItYWNjb3VudAogICAgICAgICAgICAgICAgIChuYW1l ICJhbGljZSIpCiAgICAgICAgICAgICAgICAgKGNvbW1lbnQgIkJvYidzIHNpc3RlciIpCiAgICAg ICAgICAgICAgICAgKGdyb3VwICJ1c2VycyIpCgogICAgICAgICAgICAgICAgIDs7IEFkZGluZyB0 aGUgYWNjb3VudCB0byB0aGUgIndoZWVsIiBncm91cAogICAgICAgICAgICAgICAgIDs7IG1ha2Vz IGl0IGEgc3Vkb2VyLiAgQWRkaW5nIGl0IHRvICJhdWRpbyIKICAgICAgICAgICAgICAgICA7OyBh bmQgInZpZGVvIiBhbGxvd3MgdGhlIHVzZXIgdG8gcGxheSBzb3VuZAogICAgICAgICAgICAgICAg IDs7IGFuZCBhY2Nlc3MgdGhlIHdlYmNhbS4KICAgICAgICAgICAgICAgICAoc3VwcGxlbWVudGFy eS1ncm91cHMgJygid2hlZWwiCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgImF1ZGlvIiAidmlkZW8iKSkpCiAgICAgICAgICAgICAgICAlYmFzZS11c2VyLWFjY291bnRz KSkKCiAgIDs7IEdsb2JhbGx5LWluc3RhbGxlZCBwYWNrYWdlcy4KICAgKHBhY2thZ2VzIChjb25z IHNjcmVlbiAlYmFzZS1wYWNrYWdlcykpCgogICA7OyBBZGQgc2VydmljZXMgdG8gdGhlIGJhc2Vs aW5lOiBhIERIQ1AgY2xpZW50IGFuZAogICA7OyBhbiBTU0ggc2VydmVyLgogICAoc2VydmljZXMg KGFwcGVuZCAobGlzdCAoc2VydmljZSBndWl4LXB1Ymxpc2gtc2VydmljZS10eXBlCiAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIChndWl4LXB1Ymxpc2gtY29uZmlndXJhdGlvbgog ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGhvc3QgIjAuMC4wLjAiKQogICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHBvcnQgMzAwMCkKICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIChhZHZlcnRpc2U/ICN0KQogICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgKGNhY2hlICNmKQogICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgKHR0bCAjZikKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IChjb21wcmVzc2lvbi1sZXZlbCA5KSkpCiAgICAgICAgICAgICAgICAgICAgICAgICAgIChzZXJ2 aWNlIGF2YWhpLXNlcnZpY2UtdHlwZQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAoYXZhaGktY29uZmlndXJhdGlvbiAoZGVidWc/ICN0KSkpCiAgICAgICAgICAgICAgICAgICAg ICAgICAgIChzZXJ2aWNlIGRoY3AtY2xpZW50LXNlcnZpY2UtdHlwZSkKICAgICAgICAgICAgICAg ICAgICAgICAgICAgKHNlcnZpY2Ugb3BlbnNzaC1zZXJ2aWNlLXR5cGUKICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgKG9wZW5zc2gtY29uZmlndXJhdGlvbgogICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgKG9wZW5zc2ggb3BlbnNzaC1zYW5zLXgpCiAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAocG9ydC1udW1iZXIgMjIyMikpKSkKICAgICAg ICAgICAgICAgICAgICAgJWJhc2Utc2VydmljZXMpKSkpCg== --=-=-=-- From unknown Sun Jun 22 11:33:50 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 29 Dec 2020 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator