From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 6K9xGfIJvV82VgAA0tVLHw (envelope-from ) for ; Tue, 24 Nov 2020 13:26:10 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 4CJ+FfIJvV/BGwAA1q6Kng (envelope-from ) for ; Tue, 24 Nov 2020 13:26:10 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 31BD99402DD for ; Tue, 24 Nov 2020 13:26:10 +0000 (UTC) Received: from localhost ([::1]:37670 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1khYKf-0005ep-6k for larch@yhetil.org; Tue, 24 Nov 2020 08:26:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:51496) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1khYHe-00049d-Al for guix-patches@gnu.org; Tue, 24 Nov 2020 08:23:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:46687) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1khYHe-00079Y-3d for guix-patches@gnu.org; Tue, 24 Nov 2020 08:23:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1khYHe-0007qt-08 for guix-patches@gnu.org; Tue, 24 Nov 2020 08:23:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#44800] [PATCH v2 0/3] publish: Add Avahi support. References: <20201122155659.67235-1-othacehe@gnu.org> In-Reply-To: <20201122155659.67235-1-othacehe@gnu.org> Resent-From: Mathieu Othacehe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 24 Nov 2020 13:23:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44800 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 44800@debbugs.gnu.org Cc: Mathieu Othacehe Received: via spool by 44800-submit@debbugs.gnu.org id=B44800.160622414630092 (code B ref 44800); Tue, 24 Nov 2020 13:23:01 +0000 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 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -3.3 (---) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: 3.49 X-TUID: 72ah9QPtt1jB 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