From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id 6CgqM+xnG2cxyQAA62LTzQ:P1 (envelope-from ) for ; Fri, 25 Oct 2024 09:42:04 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id 6CgqM+xnG2cxyQAA62LTzQ (envelope-from ) for ; Fri, 25 Oct 2024 11:42:04 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=tEcDkAvm; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=hs0SBYvt; dmarc=pass (policy=none) header.from=gnu.org; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1729849324; a=rsa-sha256; cv=none; b=g65MSnQpivW7smNB+lhq+bAbEunCdbEZ9o8RN3Gu0NSPWtGlJ+pr33Kj4Tgri6WFUYCZBm fJZZPT0iOPb5TWu4GrWqCKzwV8JoH2XVhrLJ8J86OBXvHBRRtCZT51i4JkCMEY4Pc8fuRz r8AkutfdHVdlVGO8hhldoynxH071NPQCdg176yoRB3c1OW8cbp+DMELTvQ/fAmWgslx4P4 0QNs22p4jFmd8bST+K+R4XkykKPhTNpWNeg5K3OiqSlaNcciSPZSX2beGggr3WUfxumMgz m0+zhJHG+gVXiyFLCnPpT0ny4wrJPhqGmDeSxumv4MUQOUQYD0M8S6Ype3H0Vg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=tEcDkAvm; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=hs0SBYvt; dmarc=pass (policy=none) header.from=gnu.org; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1729849324; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=dTzYYFac8op+rYUIIHwt/QGBGUyoFWbx3ZMvObbec1E=; b=qSpJbMIQfE7UTdkvafdaHqqJQeUIS8A1o3nUacWCX1O+iihoHcsrK0GAj5rH88EV8uSP9k uL/ZlnYFC8Mi0VikvOBe1a0ah4jENbkW4/bBbUzwMqdrxlM61g3LE59yNUcgFeQeKYyuZb Q1fEzKeHX1cpPPgsUtiUP8vv4QFnasRp3uImWclx2dSGfnOZIq9mBxKgyx4y9qG362NhCi qRM2XFAEZaKO902iNEzEizYmpheLiXj2G3WlJOwN7WOTstiVBNOchjh4hXAh/faSw1t6Mt 6FaVYSmaElEAFbeBf7gIgHiV6bK8iVLpvQKtEnOhwLSi32b8G16GfTuTNHxXNQ== 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 9D4FB8823F for ; Fri, 25 Oct 2024 11:42:04 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t4Gp4-0002PY-Kj; Fri, 25 Oct 2024 05:41:34 -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 1t4Gp2-0002P7-L6 for guix-patches@gnu.org; Fri, 25 Oct 2024 05:41:32 -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 1t4Gp2-0003tF-Al for guix-patches@gnu.org; Fri, 25 Oct 2024 05:41:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=dTzYYFac8op+rYUIIHwt/QGBGUyoFWbx3ZMvObbec1E=; b=tEcDkAvmR2UF1l0y1FLNCwFZb4sphSx6MC3PK6QwsCVqHYkIUDTTY19b4qiAIMUNKI2LYdqenLwBVpetK5UF5ezY7x9XkCQnsejRiSvffuqTrMrTPHcVXsrZE5yWsxB7UqNmCKeMP4WHPeJ6tOiCKocHy7LnSm7f18a/Jt7167YtpqOUh1uWu5t/TzbsSPy4iIzsAXah94BbiayHlJxxW5Peho7GOR5dgo/ygd6EjpfqeTbS7EmxCqkJecVRbZSrvyMJj8O9kDiVhcIb19K/Gr4iYkM/27ZEfu39FRMsXicVn6DCfiH5BhTb0k9JYaN0b35coVtK+4l/LlTuMQoaLw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t4GpY-00026A-3U for guix-patches@gnu.org; Fri, 25 Oct 2024 05:42:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#73927] [PATCH v3 05/17] system: hurd: Add swap-services to hurd-default-essential-services. Resent-From: Janneke Nieuwenhuizen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 25 Oct 2024 09:42:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73927 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 73927@debbugs.gnu.org Received: via spool by 73927-submit@debbugs.gnu.org id=B73927.17298492867883 (code B ref 73927); Fri, 25 Oct 2024 09:42:04 +0000 Received: (at 73927) by debbugs.gnu.org; 25 Oct 2024 09:41:26 +0000 Received: from localhost ([127.0.0.1]:37325 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t4Gow-000234-0v for submit@debbugs.gnu.org; Fri, 25 Oct 2024 05:41:26 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40738) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t4Gok-00020j-0j for 73927@debbugs.gnu.org; Fri, 25 Oct 2024 05:41:14 -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 1t4Go8-0003nA-SB; Fri, 25 Oct 2024 05:40:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=dTzYYFac8op+rYUIIHwt/QGBGUyoFWbx3ZMvObbec1E=; b=hs0SBYvtQ+GZN13JE50k OI4p8ifv6WPF5p37lOxbbTs/gornym8NEdVP2FMhX17ApsYZ49XRyVcx4gczlGUwh4jAW0SVZTkmj padwYBVE1u9NV0hQV+mfX3M/bIgzvSVzyH94Jzn/+HzQawKgYY17qJHlZW9SfFIuIrYVfK5BVl44h g2bAA7zRNjOLsRCezLIAUj99NaFRobUlwxwdBabjbI2FKlJJwxzz3JDbDf5qkegG9BCVF7ll1XAbY 4HXyS8eozjcc4761L/A01LCHdXh1pE02qXM4ynRBeV+9UuYjWf0luyhx/XmMJWH3kM7jwj+L+3uhY +cGV0ytLxy8+jQ==; From: Janneke Nieuwenhuizen Date: Fri, 25 Oct 2024 11:39:57 +0200 Message-ID: <20241025094011.8540-6-janneke@gnu.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20241025094011.8540-1-janneke@gnu.org> References: <20241025094011.8540-1-janneke@gnu.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: , 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: 1.82 X-Spam-Score: 1.82 X-Migadu-Queue-Id: 9D4FB8823F X-Migadu-Scanner: mx12.migadu.com X-TUID: TB7M2grUDS4I * gnu/services/base.scm (swap-service-type): Do not include 'udev' requirement for the Hurd. Use system* with "swapon", "swapoff" for the Hurd. * gnu/system.scm (hurd-default-essential-services): Add swap-services. * gnu/services/base.scm (swap-service-type): Change-Id: I1d4d445c614921752dc84aa0dd6ff42cdbf62aa8 --- gnu/services/base.scm | 20 +++++++++++++------- gnu/system.scm | 13 +++++++------ 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/gnu/services/base.scm b/gnu/services/base.scm index d0a57a8807..6201dea4b8 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -44,6 +44,7 @@ (define-module (gnu services base) #:autoload (guix diagnostics) (warning formatted-message &fix-hint) #:autoload (guix i18n) (G_) #:use-module (guix combinators) + #:use-module (guix utils) #:use-module (gnu services) #:use-module (gnu services admin) #:use-module (gnu services shepherd) @@ -2647,7 +2648,7 @@ (define device-lookup (with-imported-modules (source-module-closure '((gnu build file-systems))) (shepherd-service (provision (list (swap->shepherd-service-name swap))) - (requirement `(udev ,@requirements)) + (requirement `(,@(if (target-hurd?) '() '(udev)) ,@requirements)) (documentation "Enable the given swap space.") (modules `((gnu build file-systems) ,@%default-modules)) @@ -2655,16 +2656,21 @@ (define device-lookup (let ((device #$device-lookup)) (and device (begin - (restart-on-EINTR (swapon device - #$(if (swap-space? swap) - (swap-space->flags-bit-mask - swap) - 0))) + #$(if (target-hurd?) + #~(system* "swapon" device) + #~(restart-on-EINTR + (swapon device + #$(if (swap-space? swap) + (swap-space->flags-bit-mask + swap) + 0)))) #t))))) (stop #~(lambda _ (let ((device #$device-lookup)) (when device - (restart-on-EINTR (swapoff device))) + #$(if (target-hurd?) + #~(system* "swapoff" device) + #~(restart-on-EINTR (swapoff device)))) #f))) (respawn? #f)))) (description "Turn on the virtual memory swap area."))) diff --git a/gnu/system.scm b/gnu/system.scm index c19730b331..533a4154d6 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -845,11 +845,11 @@ (define (hurd-default-essential-services os) (let ((host-name (operating-system-host-name os)) (hosts-file (%operating-system-hosts-file os)) (entries (operating-system-directory-base-entries os))) - (list (service system-service-type entries) - %boot-service - %hurd-startup-service - %activation-service - (service shepherd-root-service-type) + (cons* (service system-service-type entries) + %boot-service + %hurd-startup-service + %activation-service + (service shepherd-root-service-type) (service user-processes-service-type) ;; Make sure that privileged-programs activation script @@ -873,7 +873,8 @@ (define (hurd-default-essential-services os) (list `("hosts" ,hosts-file))) (service hosts-service-type (local-host-entries host-name))) - (service profile-service-type (operating-system-packages os))))) + (service profile-service-type (operating-system-packages os)) + (swap-services os)))) (define* (operating-system-services os) "Return all the services of OS, including \"essential\" services." -- 2.46.0