From patchwork Wed Oct 27 15:09:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josselin Poiret X-Patchwork-Id: 415 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id DD2FF27BBE3; Wed, 27 Oct 2021 16:51:04 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id A1A0227BBE1 for ; Wed, 27 Oct 2021 16:51:04 +0100 (BST) Received: from localhost ([::1]:41886 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mflCg-0005kI-If for patchwork@mira.cbaines.net; Wed, 27 Oct 2021 11:51:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57876) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mfkZ0-0004P9-La for guix-patches@gnu.org; Wed, 27 Oct 2021 11:10:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:38648) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mfkZ0-00077y-B3 for guix-patches@gnu.org; Wed, 27 Oct 2021 11:10:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mfkYz-0000P8-WC for guix-patches@gnu.org; Wed, 27 Oct 2021 11:10:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#51346] [PATCH v2 0/4] Rework swap, add flags and dependencies. Resent-From: Josselin Poiret Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 27 Oct 2021 15:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51346 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Tobias Geerinckx-Rice Cc: Josselin Poiret , 51346@debbugs.gnu.org Received: via spool by 51346-submit@debbugs.gnu.org id=B51346.16353473781464 (code B ref 51346); Wed, 27 Oct 2021 15:10:01 +0000 Received: (at 51346) by debbugs.gnu.org; 27 Oct 2021 15:09:38 +0000 Received: from localhost ([127.0.0.1]:50178 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mfkYc-0000NY-Hx for submit@debbugs.gnu.org; Wed, 27 Oct 2021 11:09:38 -0400 Received: from jpoiret.xyz ([206.189.101.64]:34570) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mfkYa-0000NO-Rq for 51346@debbugs.gnu.org; Wed, 27 Oct 2021 11:09:37 -0400 Received: from authenticated-user (jpoiret.xyz [206.189.101.64]) by jpoiret.xyz (Postfix) with ESMTPA id 4F09D184BC9; Wed, 27 Oct 2021 15:09:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpoiret.xyz; s=dkim; t=1635347375; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oIE9R1TjsTaFgqYj9Pk1B/x0cG5UYXvtORcKGtZuraw=; b=KaVxDMvUk+tZLLFfkhGpwlDFdcDbuNREi2XEPFfQryG8l45ia8EdzFoI4CqauogDTBiUQb X1qbiGYrl9cOU0+dCmjNfKT3728gucrazfKtQGNzFjIbcphDpwU1zduJlEdmElfrcCJ8gK BlQO7xzZCO5V+64Y37bygVp5SmnNpKou7z4A9C+2YT+SG4iex9vIF/35wvURTVhWt0Mp1s 3QI7KDKs59GGWLMuIKg4x9dVbPQl5SnMrgRFMRsZG059KyFh/3B3KOTxoseNcG8Cip80Aw nSw9VQNezhh2v1uOYdK+WXb/gaVd14wQXGaCERZmmHTk9A1WZham7V+DyskpCg== Date: Wed, 27 Oct 2021 15:09:09 +0000 Message-Id: <20211027150913.6038-1-dev@jpoiret.xyz> In-Reply-To: <87tuh6ifwe.fsf@nckx> References: <87tuh6ifwe.fsf@nckx> MIME-Version: 1.0 X-Spamd-Bar: ++++ Authentication-Results: jpoiret.xyz; auth=pass smtp.auth=jpoiret@jpoiret.xyz smtp.mailfrom=dev@jpoiret.xyz 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: Josselin Poiret X-ACL-Warn: , Josselin Poiret via Guix-patches X-Patchwork-Original-From: Josselin Poiret via Guix-patches via From: Josselin Poiret X-getmail-retrieved-from-mailbox: Patches Hi, Alright, this new revised and expanded patchset should take into account most of the previous remarks, as well as fix some corner cases. Akin to what is done for file system services, I've modified swap-services so that it filters out boot-time dependencies which cannot be managed by Shepherd. In doing so, I noticed that the non-boot-file-system-services procedure automagically adds mapped devices dependencies that it detects: is that documented behaviour, are we trying to support it or are we trying to move away from it? The documentation should now be self-sufficient, with the example desktop configuration updated to contain a swap file. Josselin Poiret (4): gnu: system: Rework swap space support, add dependencies. gnu: system: Add swap flags. gnu: system: Filter out boot dependencies from swap-space. doc: Add new Swap Space section. doc/guix.texi | 136 ++++++++++++++++++++++--------- gnu/build/file-systems.scm | 35 +++++++- gnu/services/base.scm | 109 +++++++++++++++++-------- gnu/system.scm | 20 ++++- gnu/system/examples/desktop.tmpl | 7 +- gnu/system/file-systems.scm | 24 +++++- guix/build/syscalls.scm | 12 +++ 7 files changed, 267 insertions(+), 76 deletions(-)