mbox

[bug#44800,v2,0/3] publish: Add Avahi support.

Message ID 20201124132145.217751-1-othacehe@gnu.org
Headers show

Message

Mathieu Othacehe Nov. 24, 2020, 1:21 p.m. UTC
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

Comments

Ludovic Courtès Nov. 27, 2020, 4:54 p.m. UTC | #1
Hi Mathieu,

Mathieu Othacehe <othacehe@gnu.org> 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.