From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 2I03JnxGBmHA6AAAgWs5BA (envelope-from ) for ; Sun, 01 Aug 2021 09:00:12 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id Km+9IXxGBmFKegAAbx9fmQ (envelope-from ) for ; Sun, 01 Aug 2021 07:00:12 +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 BECA9B9E0 for ; Sun, 1 Aug 2021 09:00:11 +0200 (CEST) Received: from localhost ([::1]:33248 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mA5SE-00029I-AU for larch@yhetil.org; Sun, 01 Aug 2021 03:00:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52730) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mA5S7-00028O-Fu for guix-patches@gnu.org; Sun, 01 Aug 2021 03:00:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52138) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mA5S7-0002Ac-7q for guix-patches@gnu.org; Sun, 01 Aug 2021 03:00:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mA5S7-0000qo-7o for guix-patches@gnu.org; Sun, 01 Aug 2021 03:00:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47849] [PATCH v3 2/3] build: shepherd: Use autoload to lazily bind Shepherd modules. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 01 Aug 2021 07:00:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47849 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 47849@debbugs.gnu.org Cc: Maxime Devos , Maxim Cournoyer Received: via spool by 47849-submit@debbugs.gnu.org id=B47849.16278011703165 (code B ref 47849); Sun, 01 Aug 2021 07:00:03 +0000 Received: (at 47849) by debbugs.gnu.org; 1 Aug 2021 06:59:30 +0000 Received: from localhost ([127.0.0.1]:35448 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mA5Ra-0000oz-FL for submit@debbugs.gnu.org; Sun, 01 Aug 2021 02:59:30 -0400 Received: from mail-qk1-f175.google.com ([209.85.222.175]:42988) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mA5RZ-0000oN-3u for 47849@debbugs.gnu.org; Sun, 01 Aug 2021 02:59:29 -0400 Received: by mail-qk1-f175.google.com with SMTP id o13so13730313qkk.9 for <47849@debbugs.gnu.org>; Sat, 31 Jul 2021 23:59:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references:reply-to :mime-version:content-transfer-encoding; bh=mQAe+BVWygempM578fVV7sqhKF1hu/Nbl5Qo0VUFRZM=; b=nsGU22prLQAlXaM7jfWtMRG4Hjg1TldoaIunA9TcpkcIFP24IDep6h1gecw1i6A1Fw Yq4x2PW0P4WSUNIUWp5oUIfiIF7JwlHbNu4znzYx1vQCqPFy+LM3EkdawQ+YkhV33lYF +2346CauCXhdEFQ0v6uUYT2bqTsFOSKAg2N3ce+fzyTtZg5QkmbCSYxROTZtGYwfMA6B SqdW+0mmOxURyoNlhL68VTC1rdU+v/jS1i/EL70cIJyAMNc+inoioImAxLi1SibDvxOX Vln+y/5Tt2IPG129JNLPFFyROoAkZohSlz32ZSOL2L2QEuY0Gcc+HIbG05oeyO7hJzN+ HqYQ== 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:date:message-id:in-reply-to :references:reply-to:mime-version:content-transfer-encoding; bh=mQAe+BVWygempM578fVV7sqhKF1hu/Nbl5Qo0VUFRZM=; b=Yg0Gr+lm+2T7y2ZlL42gV73b3POL24oqbncBPpuYiCjCNTMozlQBYw1Ro1mdUpzs4M J/o9J1nmVBo1zqdRMKI1hto5jlQ/o7kXILPd2i4sCcul+Ie/3GSHDJC65ZuuPx+SOJX0 4BkAACBp3gFxy+ukky22lk5tsKQM7kfFmi5J2OMEpyJ4SWCGan5eWrAriN5sgJ9rSuw/ XFU7qI2UIBlPG66SBmuf5K1qB+ol7nRD5xfZ83yUMKY6S5DCkelWj0JL7pyiNkBb6ZHu yVwVrguXVKdX/rPoqjxqr7reO1SAgl6VDTbL8XWjGULa5NNCWmn8q3A5XcSQ6GjksCm9 wEBw== X-Gm-Message-State: AOAM532sIuulfIRfT4A8XzsTPUeVEIgwAyhLvA4ah0yQRYzzK1EZQb6v 6/MQSCzVAMbX/M3ZFBSIgw5Ws4qafStB7w== X-Google-Smtp-Source: ABdhPJwyWzmE52UTo6mX7hc3M3qmycNXcz19KTYKykyym4dY9i7VAO6acrDavuEGFZgkPZlWrWvHig== X-Received: by 2002:a37:e04:: with SMTP id 4mr9954975qko.281.1627801163567; Sat, 31 Jul 2021 23:59:23 -0700 (PDT) Received: from localhost.localdomain (dsl-10-135-95.b2b2c.ca. [72.10.135.95]) by smtp.gmail.com with ESMTPSA id d16sm2834823qtj.69.2021.07.31.23.59.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 31 Jul 2021 23:59:23 -0700 (PDT) From: Maxim Cournoyer Date: Sun, 1 Aug 2021 02:58:56 -0400 Message-Id: <20210801065857.27657-3-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210801065857.27657-1-maxim.cournoyer@gmail.com> References: <20210801065857.27657-1-maxim.cournoyer@gmail.com> MIME-Version: 1.0 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: , Reply-To: Maxime Devos Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1627801212; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=mQAe+BVWygempM578fVV7sqhKF1hu/Nbl5Qo0VUFRZM=; b=eGC/iMq92wLQcIdu94UCweJZZIo+6Xe02CMEKgOo1TD8HEiBUxqbLG2XDkmUjQgqERoedx LFSRjW75iGUbaJ7oGDCybX8MDxHiZjUxQEraXrRcWUz9ZWzTALyBXsfWmuOOfIrN5YQ41E pJfin2rhZZ0PncYLcj7l9prq5l5QM2zLSoOZIohPCUULUuwTqqy9XP5ipqFHEccqTu7T94 SXAs2FI7rVU+Jhcx2cBJ5CcsuhT6GDid3zti4jtZy6l/5f+2/Gjzx9SBq4Zgde3ANKv3ap mnUQgOMAxIiBw/Q+igEI316rwGg17BtPSNFMxar2ELm5UuUQ2Qkt0P9BIMiioQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1627801212; a=rsa-sha256; cv=none; b=izHiye1Gm+y0WGdH/J/E/uN1XiV2/3pNdb+KBsljAk8KlGMg0Qft4qzl5VaPbaTRnneiki o8yby/3jmWYCYHDRcVu2VVD8jr8oXyRcpLaKvmKc3D7pNl9jZwJPWZ8rcaymmkKo25i9F4 sBEPWpHvfVk0wF1+2y1ejzseNW9KJ3EWr6DGAq985zj84Y2Uh5aRaG3UwRDEKS9gnfho8I uHTPV74JTxcrbr0yY9KUjCURlOw1Hs+e4NcsyepuU66LVgPiugn5ImXXtsmhcloZkNV0Pj w/fTqsSVU71m/OAjDWAUKZ5VN1adHkJAUe6KsA/sMNzHJD+Eh3YZhuWg8xHc5A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=nsGU22pr; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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-Migadu-Spam-Score: 2.68 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=nsGU22pr; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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-Migadu-Queue-Id: BECA9B9E0 X-Spam-Score: 2.68 X-Migadu-Scanner: scn0.migadu.com X-TUID: J4VXKZZvA8qP Instead of imperative module-autoload! directives. * gnu/build/shepherd.scm: Replace module-autoload! directives by autoload arguments for define-module. --- gnu/build/shepherd.scm | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/gnu/build/shepherd.scm b/gnu/build/shepherd.scm index d7b858dea4..778e3fc627 100644 --- a/gnu/build/shepherd.scm +++ b/gnu/build/shepherd.scm @@ -24,6 +24,12 @@ #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) #:use-module (ice-9 match) + ;; XXX: Lazy-bind the Shepherd to avoid a compile-time dependency. + #:autoload (shepherd service) (fork+exec-command + read-pid-file + exec-command + %precious-signals) + #:autoload (shepherd system) (unblock-signals) #:export (make-forkexec-constructor/container fork+exec-command/container)) @@ -92,14 +98,6 @@ (file-exists? (file-system-mapping-source mapping))) mappings))))) -;; XXX: Lazy-bind the Shepherd to avoid a compile-time dependency. -(module-autoload! (current-module) - '(shepherd service) - '(fork+exec-command read-pid-file exec-command - %precious-signals)) -(module-autoload! (current-module) - '(shepherd system) '(unblock-signals)) - (define* (read-pid-file/container pid pid-file #:key (max-delay 5)) "Read PID-FILE in the container namespaces of PID, which exists in a separate mount and PID name space. Return the \"outer\" PID. " -- 2.32.0