From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id 2ALzDuOUWWYWFgAAe85BDQ:P1 (envelope-from ) for ; Fri, 31 May 2024 11:14:11 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id 2ALzDuOUWWYWFgAAe85BDQ (envelope-from ) for ; Fri, 31 May 2024 11:14:11 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=lIaYVC2r; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1717146851; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=fN6k6wlUDj4shtWZjUevKvp50J01ui9w+zi3cjrx2gM=; b=Ze8RtOq1JyBjALwGmYvx3ukDbsCYhqKxdArLft7idIfQcIA1EyK5qXMePEHh0mfq1sMx2J BdFQf5a/Kj6M+6d+O6PiE8J7r0y6ReDkPTGWdGkqdnkRWPLjO569Vg/B6cpikD3BE/uFpN HuV0CdsvZx1amdnd/bb6LPp9ZyvkwQe4ivc1ZeH3behbVaT4nRC1yAkC2QyvCZ27LutBLy LIkbs6WCbty4yRQUf5t0y3VMmox6Pqboi/WqnAGk833UbfdCRnlXxdLrp3PoUCHKsmKUz7 jtF15N2tJycayUj+i/0xIZkeuVxKt75dKh/W1VpbT9Qqo6Z+Ec48ALMN4FYBTw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=lIaYVC2r; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1717146851; a=rsa-sha256; cv=none; b=QHmJF3x6N4zUetSDpjKpgnH96p3+AbI4bHxaEpSLwDtu67TJ6fHwq1/a0xjx9/TenuTkCq wlDvCy/ahvREDu4ePgJV96hwEG6p0yQX5Pm78Odn1shG2JJ3C8ofQbZJczYFgrzAe3ZcDc w+4Rh9J5AIZY/L/MdFQBpAIh4d39BePuoVlGvTjm+3W+9QKLAuPBxSoCHo8gNo9hYx59VH r+gHNHqDo+OqOzkqsgIxsIxw/cYefBqZM2KheLI3uxai9+ikgsrVia0BMK0oSGWsz7MxJk 9/R+uFRTOzzgu+q/+afvS41Nn6ePMlUkbGL8IwK8Bl6ro+jy0NemTmvFDti+Tw== 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 A0770D150 for ; Fri, 31 May 2024 11:14:10 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sCyKf-0000WA-48; Fri, 31 May 2024 05:13:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sCyKd-0000Vn-Rn for guix-patches@gnu.org; Fri, 31 May 2024 05:13:52 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sCyKd-0006Ab-Jc for guix-patches@gnu.org; Fri, 31 May 2024 05:13:51 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sCyKo-0003CI-7s for guix-patches@gnu.org; Fri, 31 May 2024 05:14:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#71287] [PATCH] etc: Add explicit =?UTF-8?Q?=E2=80=98--substitute-urls=E2=80=99?= in guix-daemon service files. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 31 May 2024 09:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 71287 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 71287@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.171714679112224 (code B ref -1); Fri, 31 May 2024 09:14:02 +0000 Received: (at submit) by debbugs.gnu.org; 31 May 2024 09:13:11 +0000 Received: from localhost ([127.0.0.1]:53158 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sCyJy-0003B5-Qr for submit@debbugs.gnu.org; Fri, 31 May 2024 05:13:11 -0400 Received: from lists.gnu.org ([209.51.188.17]:43766) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sCyJt-0003At-JU for submit@debbugs.gnu.org; Fri, 31 May 2024 05:13:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sCyJi-0000R9-58 for guix-patches@gnu.org; Fri, 31 May 2024 05:12:54 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sCyJg-00066m-Tz; Fri, 31 May 2024 05:12:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to: references; bh=fN6k6wlUDj4shtWZjUevKvp50J01ui9w+zi3cjrx2gM=; b=lIaYVC2rJHoPFT sHvJSQHeyvsPRG05P61v2bMXmLWt2n/4SxRPh1mrV9Fl5GBvD0tbJYIZA+w8j14ZgEF2x/c9mFhlW ImahW6oWQWJVFWjSQR0LjGc7Exa8rCsOHa2p5CCOoNRNEXejZgRZSkuqJyDhardBPMoUtOX5ltCgp O+nToQ44dMIY9NMj2l9OOY09D/6gK7ZFArfTXdIQLyfI6ZZqbelIuq1b8AvLs3LMEPWuN9CzYpcEy TrQHcMX4p+7AF0/qlnFOmGEqYFW639je40Afrkq/d3BSoTNmxiMkA5mpyihBZq99Tnx2X74I0rMtE Wa/0/GZaQMM+fuwjZTvA==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Fri, 31 May 2024 11:12:45 +0200 Message-ID: X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Spam-Score: -6.25 X-Migadu-Queue-Id: A0770D150 X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -6.25 X-TUID: DvDw6suGY9iZ Having substitute URLs explicitly listed in the service startup file makes it clearer what should be modified to permanently change the list of substitute URLs. * config-daemon.ac: Rename ‘guix_substitute_urls’ to ‘GUIX_SUBSTITUTE_URLS’ and substitute it. * nix/local.mk (etc/guix-%.service, etc/init.d/guix-daemon) (etc/guix-%.conf): Substitute it. * etc/guix-daemon.conf.in, etc/guix-daemon.service.in, etc/init.d/guix-daemon.in: Add an explicit ‘--substitute-urls’ option. Change-Id: Ie491b7fab5c42e54dca582801c03805a85de2bf9 --- config-daemon.ac | 7 ++++--- etc/guix-daemon.conf.in | 2 +- etc/guix-daemon.service.in | 3 ++- etc/init.d/guix-daemon.in | 4 +++- nix/local.mk | 17 ++++++++++------- 5 files changed, 20 insertions(+), 13 deletions(-) Hello! The goal is to improve transparency: one will now easily see in their .service file (or similar) where the URLs are, allowing them to add new URLs without first having to look up the Guix manual for the right option and then the systemd (or similar) manual for the right syntax. Thoughts? Ludo’. diff --git a/config-daemon.ac b/config-daemon.ac index 9188f93bda8..9854f1d694f 100644 --- a/config-daemon.ac +++ b/config-daemon.ac @@ -106,12 +106,13 @@ if test "x$guix_build_daemon" = "xyes"; then dnl Determine the appropriate default list of substitute URLs (GnuTLS dnl is required so we can default to 'https'.) - guix_substitute_urls="https://bordeaux.guix.gnu.org https://ci.guix.gnu.org" + GUIX_SUBSTITUTE_URLS="https://bordeaux.guix.gnu.org https://ci.guix.gnu.org" AC_MSG_CHECKING([for default substitute URLs]) - AC_MSG_RESULT([$guix_substitute_urls]) + AC_MSG_RESULT([$GUIX_SUBSTITUTE_URLS]) + AC_SUBST([GUIX_SUBSTITUTE_URLS]) - AC_DEFINE_UNQUOTED([GUIX_SUBSTITUTE_URLS], ["$guix_substitute_urls"], + AC_DEFINE_UNQUOTED([GUIX_SUBSTITUTE_URLS], ["$GUIX_SUBSTITUTE_URLS"], [Default list of substitute URLs used by 'guix-daemon'.]) dnl Check for Guile-SSH, which is required by 'guix offload'. diff --git a/etc/guix-daemon.conf.in b/etc/guix-daemon.conf.in index fb681d1f802..aa368d6272c 100644 --- a/etc/guix-daemon.conf.in +++ b/etc/guix-daemon.conf.in @@ -7,4 +7,4 @@ start on runlevel [2345] stop on runlevel [016] -exec @localstatedir@/guix/profiles/per-user/root/current-guix/bin/guix-daemon --build-users-group=guixbuild --discover=no +exec @localstatedir@/guix/profiles/per-user/root/current-guix/bin/guix-daemon --build-users-group=guixbuild --discover=no --substitute-urls='@GUIX_SUBSTITUTE_URLS@' diff --git a/etc/guix-daemon.service.in b/etc/guix-daemon.service.in index 5e75379b5e4..5c43d9b7f1b 100644 --- a/etc/guix-daemon.service.in +++ b/etc/guix-daemon.service.in @@ -7,7 +7,8 @@ Description=Build daemon for GNU Guix [Service] ExecStart=@localstatedir@/guix/profiles/per-user/root/current-guix/bin/guix-daemon \ - --build-users-group=guixbuild --discover=no + --build-users-group=guixbuild --discover=no \ + --substitute-urls='@GUIX_SUBSTITUTE_URLS@' Environment='GUIX_LOCPATH=@localstatedir@/guix/profiles/per-user/root/guix-profile/lib/locale' LC_ALL=en_US.utf8 StandardOutput=journal StandardError=journal diff --git a/etc/init.d/guix-daemon.in b/etc/init.d/guix-daemon.in index b7d4bb72bbb..913210a5434 100644 --- a/etc/init.d/guix-daemon.in +++ b/etc/init.d/guix-daemon.in @@ -36,7 +36,9 @@ start) -E LC_ALL=en_US.utf8 \ -p "/var/run/guix-daemon.pid" \ @localstatedir@/guix/profiles/per-user/root/current-guix/bin/guix-daemon \ - --build-users-group=guixbuild --discover=no + --build-users-group=guixbuild --discover=no \ + --substitute-urls='@GUIX_SUBSTITUTE_URLS@' + fi ;; stop) diff --git a/nix/local.mk b/nix/local.mk index 44a26dd2c8f..8a2b2b88e86 100644 --- a/nix/local.mk +++ b/nix/local.mk @@ -1,5 +1,5 @@ # GNU Guix --- Functional package management for GNU -# Copyright © 2012, 2013, 2014, 2015, 2016, 2018, 2019, 2020 Ludovic Courtès +# Copyright © 2012-2016, 2018-2020, 2024 Ludovic Courtès # Copyright © 2016 Mathieu Lirzin # Copyright © 2020 Tobias Geerinckx-Rice # @@ -166,8 +166,9 @@ etc/%.mount: etc/%.mount.in \ etc/guix-%.service: etc/guix-%.service.in \ $(top_builddir)/config.status $(AM_V_GEN)$(MKDIR_P) "`dirname $@`"; \ - $(SED) -e 's|@''localstatedir''@|$(localstatedir)|' < \ - "$<" > "$@.tmp"; \ + $(SED) -e 's|@''localstatedir''@|$(localstatedir)|' \ + -e 's|@''GUIX_SUBSTITUTE_URLS''@|$(GUIX_SUBSTITUTE_URLS)|' \ + < "$<" > "$@.tmp"; \ mv "$@.tmp" "$@" # The service script for sysvinit. @@ -177,8 +178,9 @@ nodist_sysvinitservice_DATA = etc/init.d/guix-daemon etc/init.d/guix-daemon: etc/init.d/guix-daemon.in \ $(top_builddir)/config.status $(AM_V_GEN)$(MKDIR_P) "`dirname $@`"; \ - $(SED) -e 's|@''localstatedir''@|$(localstatedir)|' < \ - "$<" > "$@.tmp"; \ + $(SED) -e 's|@''localstatedir''@|$(localstatedir)|' \ + -e 's|@''GUIX_SUBSTITUTE_URLS''@|$(GUIX_SUBSTITUTE_URLS)|' \ + < "$<" > "$@.tmp"; \ mv "$@.tmp" "$@" # The service script for openrc. @@ -199,8 +201,9 @@ nodist_upstartjob_DATA = etc/guix-daemon.conf etc/guix-publish.conf etc/guix-%.conf: etc/guix-%.conf.in \ $(top_builddir)/config.status $(AM_V_GEN)$(MKDIR_P) "`dirname $@`"; \ - $(SED) -e 's|@''localstatedir''@|$(localstatedir)|' < \ - "$<" > "$@.tmp"; \ + $(SED) -e 's|@''localstatedir''@|$(localstatedir)|' \ + -e 's|@''GUIX_SUBSTITUTE_URLS''@|$(GUIX_SUBSTITUTE_URLS)|' \ + < "$<" > "$@.tmp"; \ mv "$@.tmp" "$@" CLEANFILES += \ base-commit: cca25a67693bb68a1884a081b415a43fad1e8641 -- 2.41.0