From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id z5kzNXroc2FuLgAAgWs5BA (envelope-from ) for ; Sat, 23 Oct 2021 12:48:26 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id SKdOMHroc2FaTgAAbx9fmQ (envelope-from ) for ; Sat, 23 Oct 2021 10:48:26 +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 926FC5F46 for ; Sat, 23 Oct 2021 12:48:26 +0200 (CEST) Received: from localhost ([::1]:33138 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1meEZd-0000hn-Ox for larch@yhetil.org; Sat, 23 Oct 2021 06:48:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58890) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1meDcF-0000bv-K4 for guix-patches@gnu.org; Sat, 23 Oct 2021 05:47:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51089) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1meDcE-0003Ma-PI for guix-patches@gnu.org; Sat, 23 Oct 2021 05:47:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1meDcE-00037H-KD for guix-patches@gnu.org; Sat, 23 Oct 2021 05:47:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#51346] [PATCH 0/1 core-updates-frozen] Rework swap device to add dependencies and flags Resent-From: Josselin Poiret Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 23 Oct 2021 09:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 51346 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 51346@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.163498237510009 (code B ref -1); Sat, 23 Oct 2021 09:47:02 +0000 Received: (at submit) by debbugs.gnu.org; 23 Oct 2021 09:46:15 +0000 Received: from localhost ([127.0.0.1]:34402 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1meDbS-0002b6-MK for submit@debbugs.gnu.org; Sat, 23 Oct 2021 05:46:15 -0400 Received: from lists.gnu.org ([209.51.188.17]:59520) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1meDbP-0002YX-N9 for submit@debbugs.gnu.org; Sat, 23 Oct 2021 05:46:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58686) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1meDbP-0000Fs-Fj for guix-patches@gnu.org; Sat, 23 Oct 2021 05:46:11 -0400 Received: from jpoiret.xyz ([206.189.101.64]:39642) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1meDbN-00025w-Ca for guix-patches@gnu.org; Sat, 23 Oct 2021 05:46:11 -0400 Received: from authenticated-user (jpoiret.xyz [206.189.101.64]) by jpoiret.xyz (Postfix) with ESMTPA id C9818184D67; Sat, 23 Oct 2021 09:46:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpoiret.xyz; s=dkim; t=1634982366; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=AhuXbSYs8EImhVdVzEFZkhxOk0BfJetVgsn5a3qU93Q=; b=G82vlKEVfRH2nYSISDZGsJcUadnLpbE/8hHFt43FDiULEjAgk2Ez5rV/zuO5KUUBvtvurS QLQm6+dlEptmjv8wKUlaoaAfOPESVjBzudv0VAFsz84ga16bR+x3K+H/4Es3fsb1CeFLoS NI8Ja+6YpirjdXT6Ub39w7wjjyEmltwd0D5XDd0S5tSDh/s+zfRUaz52HOCpEAAc4O7HAI TtIoBndQ8bL1pyDKvULFBWu9ElZ62E3CIonzmgKXJqJtZ8SDWPP8sFbrWMjABrPCnSycDk /y49+w3/lIvFhALDztDRfHhZWhF9rUhEjrIeI9n66IefE44RvvMPg7Xx6F2hgQ== Date: Sat, 23 Oct 2021 09:46:05 +0000 Message-ID: <87fsssdqg2.fsf@jpoiret.xyz> MIME-Version: 1.0 Content-Type: text/plain X-Spamd-Bar: / Received-SPF: pass client-ip=206.189.101.64; envelope-from=dev@jpoiret.xyz; helo=jpoiret.xyz X-Spam_score_int: 8 X-Spam_score: 0.8 X-Spam_bar: / X-Spam_report: (0.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FROM_SUSPICIOUS_NTLD=0.5, FROM_SUSPICIOUS_NTLD_FP=1.999, PDS_OTHER_BAD_TLD=0.449, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Mailman-Approved-At: Sat, 23 Oct 2021 06:48:21 -0400 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" Reply-to: Josselin Poiret X-ACL-Warn: , Josselin Poiret via Guix-patches From: Josselin Poiret via Guix-patches via X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1634986106; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:list-id:list-help:list-unsubscribe:list-subscribe: list-post:dkim-signature; bh=AhuXbSYs8EImhVdVzEFZkhxOk0BfJetVgsn5a3qU93Q=; b=XaQ9Zfu2glMgRkWJ9Z+nQWndhd8BDWj9g9VBlDEoJLP6JhqrYvQz5IiUeuZcWaOhpbtI5L Tbft3aOFm5POLMiXVZ3xrN8VQND737kaEYq/ue1OoVBOl3DHXrDKH+u0Pj3q50PoSTWZE0 ePBrUV8b8IWzXfH3VpHSLm25iRvIn2m3twn+bM4Lr841MmIxpTMdCWjq54KzdHLwEoshaN knwfssITQUaw8T2SYTo4cHO7JuYAtsbCY8y/SMuRPFYT204Kt3hhJRl1X8kgZz9x9kznfM MAbDeB4hCgCOyumJtvvdMoPPXeD5S/sqOI+joctvPz2Picw3T4JCcEOa/No4aw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1634986106; a=rsa-sha256; cv=none; b=hQ4xwU7meh3HVKFzcs1y4e3lqYU4h8J3Vg7AiVhr3hfXMlOU8sfJSN/2Ah1iH23/BTwePF Ft2ZnpTZhUnCd4cbkVOUp0PyUEDgDFaVKUmgImNI8znnkW9Q2u5im2zhT8Ozl9b0jgj1l2 dm7MMyIPz/PZZJS22b6a7P0XhL0bri2hGhwVcpN0SIL9arXaCGzZg+sFdoaXjjAWyqEEHh FwcJAC4lj1wSqEDknxWD4mVqYh5g2565WgJBbUCxfyu//kDukN2I28Wz2g7qJi4Bgk+0hN Xp+fifatOfvr0a21eQz35WCfM7I44PTGQyw6ooVVAjh9NTkvOKKvWMBo6jnn5Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=jpoiret.xyz header.s=dkim header.b=G82vlKEV; 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: -1.43 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=jpoiret.xyz header.s=dkim header.b=G82vlKEV; dmarc=pass (policy=none) header.from=gnu.org; 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: 926FC5F46 X-Spam-Score: -1.43 X-Migadu-Scanner: scn0.migadu.com X-TUID: mwJaIpn5LX2W Hi, This patchset adds new record types swap-partition and swap-file, to be used in the swap-devices field of operating-system. These support dependencies on mapped-device and file-system objects respectively, as well as swapon flags. I pulled those from GNU libc, and in the manual I refer to 'man 2 swapon' for the description of these flags. Support for the old style is kept for now, but I added deprecation warnings. This works well on my laptop, whereas my swap file used to never be swapon on boot because it wasn't available yet (on BTRFS on LUKS). I don't have a swap partition lying around though so testers welcome! I hope this can make it in time for the core-updates-frozen merge. I also plan to add swap file hibernation support eventually, where the file offsets are automatically determined by guix (or we could even write our own suspend/resume script in guile, see https://www.kernel.org/doc/html/latest/power/userland-swsusp.html). Josselin Poiret (1): gnu: system: Add support for swap dependencies and flags doc/guix.texi | 98 +++++++++++++++++++--------- gnu/build/file-systems.scm | 25 ++++++- gnu/services/base.scm | 126 ++++++++++++++++++++++++++---------- gnu/system.scm | 4 +- gnu/system/file-systems.scm | 34 +++++++++- guix/build/syscalls.scm | 12 ++++ 6 files changed, 230 insertions(+), 69 deletions(-) -- 2.33.1