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 gMRIEwTf2GZqXgAA62LTzQ:P1 (envelope-from ) for ; Wed, 04 Sep 2024 22:28:20 +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 gMRIEwTf2GZqXgAA62LTzQ (envelope-from ) for ; Thu, 05 Sep 2024 00:28:20 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=RLc2AQST; dkim=fail ("headers rsa verify failed") header.d=autistici.org header.s=stigmate header.b=lncECCmm; 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=1725488900; 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: 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=vT0v2NinRalB07FtU5TYR734hAVl9aFfeLVRv6hEXno=; b=Fxwf8SV1KmM+/ESok6Ste8XnxcI7l8x0xYt2r0wihiSnHsM7Hlzp/Y3gY9Tkkte5aHuX+h PyD6h0wwUi1fzZZrfW2Ay5ZsEXoxJNIkmiv/mjfMf3lX993WraUD47pp8BPCbjkY99IceI NJpZ/qNuWHAJLYm6hhgwmBH99uOL450BcsjJVO3erldcfc2V1a5soykrN2tMtRHyyTmrPW /0+7PIn3Zmb7ZZ7XQ1IsG3FKYFrTgTOe72jQmCx0A7GBlM/IVShD/OPMc/fi0gHLCS7lg/ mRRd/6FfXBnoezXR6+sutlO026vxfIdh3HCRfwQv/WUhFkyeOyhhVRDJksjcqQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1725488900; a=rsa-sha256; cv=none; b=jVPdtQRFrb59Y5I9cTD9IvkbIu09SJMDPM8lNJPv4D3/MmphANN6XJr4p6Y4tT6qlRzToZ 2ORU7EqybO29Wk/vgr2m+VTpT+TZW89jU4pEGaXJTSt8gHMsIpivBbA/KoG0aWckyuqhUd 83F6SakW0S4o8Iodn3ts7j7hl/FSSUzoMVNpCNtZLVUwW265+Qspl+u/Ivxa1n+cydAJmc k8rpat7dljfT3VDr866VmJ3XsKq1dTuhhL8nLCnYwnyH8p7S1ryKSlYgiNGQemF7LuDoqk 7nqRAm2Wz0yfAfNd6ugFhH7iAwpno6mMKdR2rJnrkHSl0s0bijr4aDH+Yixqdg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=RLc2AQST; dkim=fail ("headers rsa verify failed") header.d=autistici.org header.s=stigmate header.b=lncECCmm; 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" 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 133AC1853F for ; Thu, 5 Sep 2024 00:28:20 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1slyTn-0002Nw-UJ; Wed, 04 Sep 2024 18:28:00 -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 1slyTm-0002Nm-Fa for guix-patches@gnu.org; Wed, 04 Sep 2024 18:27:59 -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 1slyTm-000086-7G for guix-patches@gnu.org; Wed, 04 Sep 2024 18:27:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=In-Reply-To:From:References:MIME-Version:Date:To:Subject; bh=vT0v2NinRalB07FtU5TYR734hAVl9aFfeLVRv6hEXno=; b=RLc2AQSTYim0w2CWz719/eBBiI+0mBuRrpQ/U0LMgJlJ4mA4GqiMOJOu9VN6Qg5GkpXXWdb2U+h5m3+0+YT7iTJqxSJEEExNwq+stu6CFMHigeeTAJoKxsiPR6DTK6+lCRaj7Uo/D1v0viTtRmyApPcBLquEtUlkqub7d9JE8LLC+ucEK+SMnnWBqQu/X5ncti9oM3qC2wA6rpOk9yjLZvjLpuELFpZTAzuC1MOi5fqR1+XnO69qfNwkYOBR4etoFHI8EHmlWIzMWzaeTlxQcQQzp+XmpIh4jbtR7Q7WZ9CuQTqNazh4qSldjq+enwsk2cJlswkNQcEB+Xtaimll8A==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1slyUo-0003Yo-Ar for guix-patches@gnu.org; Wed, 04 Sep 2024 18:29:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#72803] Add restic commands to the restic-guix package Resent-From: paul Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 04 Sep 2024 22:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72803 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: Fabio Natali , 72803@debbugs.gnu.org Received: via spool by 72803-submit@debbugs.gnu.org id=B72803.172548891213639 (code B ref 72803); Wed, 04 Sep 2024 22:29:02 +0000 Received: (at 72803) by debbugs.gnu.org; 4 Sep 2024 22:28:32 +0000 Received: from localhost ([127.0.0.1]:35668 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1slyUJ-0003Xv-Qv for submit@debbugs.gnu.org; Wed, 04 Sep 2024 18:28:32 -0400 Received: from confino.investici.org ([93.190.126.19]:53753) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1slyUH-0003Xm-Gi for 72803@debbugs.gnu.org; Wed, 04 Sep 2024 18:28:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1725488370; bh=vT0v2NinRalB07FtU5TYR734hAVl9aFfeLVRv6hEXno=; h=Date:Subject:To:References:From:In-Reply-To:From; b=lncECCmmyp3dWmzhDEcJwQTx0Aa6wNMpMNhBc+23Px5F6NG6hSn2ru4mbLp0RlE1i sITSltcirCLPgiIg4ZQCp95wQ8RrVkfAN1GsqdMZ6CKP0vxlwPznRrQilwtezpPE/2 z0wsZaBdz+oJXbhYw2wtoFNDnJsVfc/NgnFIYqhQ= Received: from mx1.investici.org (unknown [127.0.0.1]) by confino.investici.org (Postfix) with ESMTP id 4WzcNf5PGGz1143; Wed, 4 Sep 2024 22:19:30 +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 4WzcNf4mcGz112X; Wed, 4 Sep 2024 22:19:30 +0000 (UTC) Message-ID: <2d83c75b-b750-b80d-5d7c-b4a6c89b4434@autistici.org> Date: Thu, 5 Sep 2024 00:19:30 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.0 References: <8734mhfz6e.fsf@fabionatali.com> Content-Language: en-US In-Reply-To: <8734mhfz6e.fsf@fabionatali.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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: paul X-ACL-Warn: , paul via Guix-patches From: paul 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-Queue-Id: 133AC1853F X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -7.09 X-Spam-Score: -7.09 X-TUID: I+45DZXUSOT+ Hi Fabio, thank you very much for your detailed testing and review. On 9/3/24 00:50, Fabio Natali wrote: > Perhaps this should now read "...the current job restic invokation..." > or "...the current restic invokation...", as the action is no longer > limited to "backup"? Definitely, good catch. >> (program-file >> - "restic-backup-job.scm" >> + (string-append "restic-" action "-" name "-program.scm") > Should 'name' be slug-ified in any way here? E.g. to avoid spaces, > capital letters, symbols that might be confusing when part of a file > name, etc. It should, right. I'll use the same approach used for the home-dotfiles-service-type (i.e. replacing illegal characters with "-"). >> + (define action-table >> + (map >> + (lambda (action) >> + (list action >> + (map (lambda (job) >> + (list (restic-backup-job-name job) >> + (restic-action-program job action))) >> + jobs))) >> + ;; run is an alias for backup >> + (filter (lambda (a) (not (string=? a "run"))) supported-actions))) > Could this be (marginally) simpler if we used two nested association > lists? That way, 'get-program' might simply use 'assoc-ref' (twice) and > 'assoc-table' would be redundant? I thought that as well, in fact my first implementation was with Guile's vhashes but it appears that neither alists nor vhashesh can be correctly ungexped, or at least I didn't find a way to do so. This is why I'm using plain lists and I need assoc-table. If you have some pointer where I could look how to lower alists it would be very helpful. > It'd be nice to have a little test suite for this, but in case this can > be part of a future patch. There are already some tests Richard made at #71639 , once they get in I'll make sure to expand them for additional restic-guix subcommands. Thank your for your review Fabio, I'm sending a patchset addressing your comments. giacomo