From patchwork Tue Nov 24 13:21:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Othacehe X-Patchwork-Id: 25344 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 3956B27BBF8; Tue, 24 Nov 2020 13:26:08 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id B65FF27BBF7 for ; Tue, 24 Nov 2020 13:26:07 +0000 (GMT) Received: from localhost ([::1]:37670 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1khYKc-0005ep-Tq for patchwork@mira.cbaines.net; Tue, 24 Nov 2020 08:26:06 -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 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches 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