From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:1008:1e59::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id MF5TGXRSoGXAoAAAkFu2QA (envelope-from ) for ; Thu, 11 Jan 2024 21:41:24 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id IB6KFHRSoGU5XAAA62LTzQ (envelope-from ) for ; Thu, 11 Jan 2024 21:41:24 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=autistici.org header.s=stigmate header.b=JAkXkhAh; 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=1705005684; 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=yrJSM07unALGLurAQx4P+SyGutdFXugjekWvX0puvs0=; b=egPvYdvuz3QmjTqTyNV2YuCzAAQgB/fzqfmOBaw2vC4IFWY5IRnQStopebmcKt66LhqKZ6 kKMgPxQcsDqMgCAZYMlf6kH2YMxAv4J8Cyc/TM3K9e4XLBz/8ifDHMwyNERur2jwv4vScC D6QZypYc9QezDSTws+hGXeuI97EnDxnDWTPK4Anqqm6Kwj98bdnO5Bigai1XIC4Scb7LLw lA4cL52vhFkN6z3mWX6oM38FxCFhO+0WYQX454qSrT7xv9aCTdYSiuwbyMGFhw8ClYXxX3 rmcsqMiQONbPXWvNaL09aUqLvx2IZZKyfmXl7tHTTTe5C6i4ev7t4yUiUp3dxw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=autistici.org header.s=stigmate header.b=JAkXkhAh; 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=1705005684; a=rsa-sha256; cv=none; b=r55oMNhO4HlG23ilLXDpqhZp71mEEE/O6nLpFpFLREEdV1QpDXp7hFVjqkZ52jd+haZkE+ ekIkyaPS20v7lHNfHDxjM2SUZu+IYfixuOMEQU61Zg/Y0WY4RTgeNsGgt84XAn/oaoEOqx AbIObiNZrLP76rUv2E8RCzNR1TA6zs5bV4aN/aA7VFRzhQ2nP6o9idGUKQIddJWrNl74hc 7tuvx5G/syr0MqXJ9wgtqunnAu0Wytaxz3+qD8TxNC3xZR8PMkBJoBgKIfuaxhgNNnvKIo w0qIiyirtnXIERn0Zmqp+mMEtusx7j7mh2G34wLQyYIUoctG2rYCA0Tl0VaXTQ== 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 3941E3AA64 for ; Thu, 11 Jan 2024 21:41:23 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rO1rY-0004rC-MH; Thu, 11 Jan 2024 15:41:16 -0500 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 1rO1rO-0004qE-EM for guix-patches@gnu.org; Thu, 11 Jan 2024 15:41:08 -0500 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 1rO1rO-0006Cd-5D for guix-patches@gnu.org; Thu, 11 Jan 2024 15:41:06 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rO1rL-0002lv-ML for guix-patches@gnu.org; Thu, 11 Jan 2024 15:41:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#67613] [PATCH v2 3/5] gnu: docker: Allow setting Shepherd dependencies in oci-container-configuration. Resent-From: Giacomo Leidi Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 11 Jan 2024 20:41:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67613 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 67613@debbugs.gnu.org Cc: Giacomo Leidi Received: via spool by 67613-submit@debbugs.gnu.org id=B67613.170500561710538 (code B ref 67613); Thu, 11 Jan 2024 20:41:03 +0000 Received: (at 67613) by debbugs.gnu.org; 11 Jan 2024 20:40:17 +0000 Received: from localhost ([127.0.0.1]:34046 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rO1qb-0002jo-2x for submit@debbugs.gnu.org; Thu, 11 Jan 2024 15:40:17 -0500 Received: from confino.investici.org ([2a11:7980:1::2:0]:33833) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rO1qX-0002j5-C6 for 67613@debbugs.gnu.org; Thu, 11 Jan 2024 15:40:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1705005615; bh=yrJSM07unALGLurAQx4P+SyGutdFXugjekWvX0puvs0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JAkXkhAhzCSqFOXDyfng/wBDftVvT7SGGV+Ih+B+OfdBKlv9t6GKpbV2epDqrCjjI IKtwD4ItGB9lSOsz4aQlylPPnsXNQSkzz4Qu5oMBlr5baatbotnBYbz9G7Sdo7/ZoK kfQpwLcvujcwk4F9z0tF8IIIFyvw0X/BjIV5U21M= Received: from mx1.investici.org (unknown [127.0.0.1]) by confino.investici.org (Postfix) with ESMTP id 4T9xPW1pMlz1132; Thu, 11 Jan 2024 20:40:15 +0000 (UTC) Received: from [93.190.126.19] (mx1.investici.org [93.190.126.19]) (Authenticated sender: goodoldpaul@autistici.org) by localhost (Postfix) with ESMTPSA id 4T9xPV6xLjz10w5; Thu, 11 Jan 2024 20:40:14 +0000 (UTC) Date: Thu, 11 Jan 2024 21:39:51 +0100 Message-ID: <20240111203954.29335-3-goodoldpaul@autistici.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240111203954.29335-1-goodoldpaul@autistici.org> References: <20240111203954.29335-1-goodoldpaul@autistici.org> 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: Giacomo Leidi X-ACL-Warn: , Giacomo Leidi via Guix-patches From: Giacomo Leidi via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -6.79 X-Spam-Score: -6.79 X-Migadu-Queue-Id: 3941E3AA64 X-Migadu-Scanner: mx11.migadu.com X-TUID: mhgUsuauWIiD * gnu/services/docker.scm (oci-container-configuration) [requirement]: New field; (list-of-symbols): sanitize it; (oci-container-shepherd-service): use it. Change-Id: Ic0ba336a2257d6ef7c658cfc6cd630116661f581 --- gnu/services/docker.scm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/gnu/services/docker.scm b/gnu/services/docker.scm index 7706b4a29a..43ffb71901 100644 --- a/gnu/services/docker.scm +++ b/gnu/services/docker.scm @@ -320,6 +320,9 @@ (define (valid? member) but ~a was found") el)))) value)) +(define list-of-symbols? + (list-of symbol?)) + (define-maybe/no-serialization string) (define-configuration/no-serialization oci-container-configuration @@ -376,6 +379,10 @@ (define-configuration/no-serialization oci-container-configuration (provision (maybe-string) "Set the name of the provisioned Shepherd service.") + (requirement + (list-of-symbols '()) + "Set additional Shepherd services dependencies to the provisioned Shepherd +service.") (network (maybe-string) "Set a Docker network for the spawned container.") @@ -477,6 +484,7 @@ (define (guess-name name image) (oci-container-configuration-host-environment config)) (command (oci-container-configuration-command config)) (provision (oci-container-configuration-provision config)) + (requirement (oci-container-configuration-requirement config)) (image (oci-container-configuration-image config)) (options (oci-container-configuration->options config)) (name (guess-name provision image)) @@ -484,7 +492,7 @@ (define (guess-name name image) (oci-container-configuration-extra-arguments config))) (shepherd-service (provision `(,(string->symbol name))) - (requirement '(dockerd user-processes)) + (requirement `(dockerd user-processes ,@requirement)) (respawn? #f) (documentation (string-append -- 2.41.0