guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: linux-container: Remove hosts-service-type when n


From: guix-commits
Subject: branch master updated: linux-container: Remove hosts-service-type when network is shared.
Date: Sun, 26 Mar 2023 09:40:51 -0400

This is an automated email from the git hooks/post-receive script.

planglois pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new 42fbe62d52 linux-container: Remove hosts-service-type when network is 
shared.
42fbe62d52 is described below

commit 42fbe62d52a82d1003c3d7039d3c4a46806c5cee
Author: Pierre Langlois <pierre.langlois@gmx.com>
AuthorDate: Sun Mar 26 13:55:14 2023 +0100

    linux-container: Remove hosts-service-type when network is shared.
    
    Fixes <https://issues.guix.gnu.org/61627>.
    
    * gnu/system/linux-container.scm (container-essential-services): When
    shared-network? is true, remove the hosts-service-type service kind.
---
 gnu/system/linux-container.scm | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/gnu/system/linux-container.scm b/gnu/system/linux-container.scm
index c2fd55d48e..409386a84f 100644
--- a/gnu/system/linux-container.scm
+++ b/gnu/system/linux-container.scm
@@ -5,6 +5,7 @@
 ;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2020 Google LLC
 ;;; Copyright © 2022 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2023 Pierre Langlois <pierre.langlois@gmx.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -49,9 +50,12 @@ from OS that are needed on the bare metal and not in a 
container."
   (define base
     (remove (lambda (service)
               (memq (service-kind service)
-                    (list (service-kind %linux-bare-metal-service)
-                          firmware-service-type
-                          system-service-type)))
+                    (cons* (service-kind %linux-bare-metal-service)
+                           firmware-service-type
+                           system-service-type
+                           (if shared-network?
+                               (list hosts-service-type)
+                               '()))))
             (operating-system-default-essential-services os)))
 
   (cons (service system-service-type



reply via email to

[Prev in Thread] Current Thread [Next in Thread]