From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id oHRJMximc2ZLaAAA62LTzQ:P1 (envelope-from ) for ; Thu, 20 Jun 2024 03:46:33 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id oHRJMximc2ZLaAAA62LTzQ (envelope-from ) for ; Thu, 20 Jun 2024 05:46:32 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=none ("invalid DKIM record") header.d=freakingpenguin.com header.s=x header.b=lW1HUPBS; 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"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1718855192; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=D/jSR4oJbdjWYkLbQ9/74+ANzsyVjGZypdjZdGeHSoQ=; b=C7UfmRiWSaAFZw1ut9zSxvZid6MNcy+1YBp9sm8K/7ksLtmYRd8UePPTPyh9GQcuF82s56 EDOgvPIq0z3pDGebZecVZd/uUmW/zkTjpUU1067BELST6rrfjl8Q8etyvp1GbaUJcUjD+x ldVkQjJc/VyFoORd/dgyEkM7RkV3Na6finjJXE58pfoCQXHCe/6AEK/+fVCqG1ahWXcUzL YsP3YMEwCuFlyyf+/bgeglxxAAJYWNjc3nPQGpg8JptPAokg6lPGcooLsHNPHF53H5P0Xx Ft999zBRhWVUfuxUnQFWFB6iC9aEYbjIIqcWitbxZCBI1DXSJXB5wrutKs3cUQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none ("invalid DKIM record") header.d=freakingpenguin.com header.s=x header.b=lW1HUPBS; 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"; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1718855192; a=rsa-sha256; cv=none; b=romelWKrIsMGxtLwrr0AH1uxQZIDVUI+kj2GfXUErh19jybgGX6VWoN/vhMJYYX4JHAGZf 81/8vhPxZg6MqR73t+sSU6abKopux9cG/683D4F2f6uzx9F482+NCKbKIYVt5axaDhtbCx pbjhdSdrn3SARgEy5R5+VSB+P53NIvEyr9M0jzRKItG8Ou+GSHEMq0b4lCLCedDuKo2ej/ F2Z1YVfsXAWQ32lY5zD2ju0z06ngYZ59EImOhxGUJ9zi+5mWRtu9ImsqcymhgnQJeSXXGh uj2eS0k7pOabAgqK3MXztwSxYsN33Cfh+5iqex2v1NO8Dl1utbGT+fVFf/17lA== 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 84416721CB for ; Thu, 20 Jun 2024 05:46:32 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sK8kL-0006tO-OX; Wed, 19 Jun 2024 23:46:01 -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 1sK8kK-0006tC-QL for guix-patches@gnu.org; Wed, 19 Jun 2024 23:46:00 -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 1sK8kK-0007Sn-IO; Wed, 19 Jun 2024 23:46:00 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sK8kO-0006aH-2c; Wed, 19 Jun 2024 23:46:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#71663] [PATCH v2 3/5] services: backup: Add extra-packages field to restic-backup-job Resent-From: Richard Sent Original-Sender: "Debbugs-submit" Resent-CC: pelzflorian@pelzflorian.de, ludo@gnu.org, matt@excalamus.com, maxim.cournoyer@gmail.com, guix-patches@gnu.org Resent-Date: Thu, 20 Jun 2024 03:46:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 71663 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 71663@debbugs.gnu.org, 71639@debbugs.gnu.org Cc: Richard Sent , Florian Pelz , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Matthew Trzcinski , Maxim Cournoyer X-Debbugs-Original-To: guix-patches@gnu.org, 71639@debbugs.gnu.org X-Debbugs-Original-Xcc: Florian Pelz , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Matthew Trzcinski , Maxim Cournoyer Received: via spool by submit@debbugs.gnu.org id=B.171885514125198 (code B ref -1); Thu, 20 Jun 2024 03:46:03 +0000 Received: (at submit) by debbugs.gnu.org; 20 Jun 2024 03:45:41 +0000 Received: from localhost ([127.0.0.1]:41536 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sK8k0-0006YK-Fc for submit@debbugs.gnu.org; Wed, 19 Jun 2024 23:45:40 -0400 Received: from lists.gnu.org ([209.51.188.17]:39452) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sK8jy-0006Y5-S3 for submit@debbugs.gnu.org; Wed, 19 Jun 2024 23:45:39 -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 1sK8ju-0006l1-W6 for guix-patches@gnu.org; Wed, 19 Jun 2024 23:45:35 -0400 Received: from mail-108-mta69.mxroute.com ([136.175.108.69]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sK8jl-0007F0-RZ for guix-patches@gnu.org; Wed, 19 Jun 2024 23:45:27 -0400 Received: from filter006.mxroute.com ([136.175.111.3] filter006.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta69.mxroute.com (ZoneMTA) with ESMTPSA id 19033bfb1bd00017a3.002 for (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Thu, 20 Jun 2024 03:45:19 +0000 X-Zone-Loop: c18af7abc3f24ac8dbfb0a74d32d2eaa381dc06cfe84 X-Originating-IP: [136.175.111.3] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=freakingpenguin.com; s=x; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=D/jSR4oJbdjWYkLbQ9/74+ANzsyVjGZypdjZdGeHSoQ=; b=lW1HUPBSX4Z0GxvZHPdeP9uvje xi2BogCkv7F9YMSRnmBkV+IUgdrxlquH30pIFRROK/v9yohA+pRTjluW7MM9B0vaP8Q09YfqGT77X 6CVMDtWITy8xUKhc/J5criMz25pQRfYFKHvMWYp1XCCNY+4kMW/mv6FgsgKtD3TTKZ6QMr9QA4Yhr iTc/F9X46+GDgd/MWw95DCsof9L/+rb58Ec93Die8OZSYpC8iL2wCX/qvcaDO/DBPnaSILQnmDO3W xCiJ+2Ca1uVKT++5UkxvgGI56OhGPAXJ6y4qoP3P6lVcVJbBP5iJRbxo4kMqo6c9/ffOx2JivDq0b vbwaULvg==; From: Richard Sent Date: Wed, 19 Jun 2024 23:44:14 -0400 Message-ID: In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Authenticated-Id: richard@freakingpenguin.com Received-SPF: pass client-ip=136.175.108.69; envelope-from=richard@freakingpenguin.com; helo=mail-108-mta69.mxroute.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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-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-Country: US X-Migadu-Flow: FLOW_IN X-Spam-Score: -3.56 X-Migadu-Queue-Id: 84416721CB X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -3.56 X-TUID: CLPQIphG35+i * gnu/services/backup.scm (restic-backup-job): Create extra-packages. (restic-guix-wrapper-package): Add the extra-packages field of every job as inputs. * doc/guix.texi (Miscellaneous Services): Document it. Change-Id: I4f0b070bc6dc895553ba69256d14e45898291c02 --- doc/guix.texi | 4 ++++ gnu/services/backup.scm | 33 ++++++++++++++++++++------------- 2 files changed, 24 insertions(+), 13 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index f22d679023..32ce0c86b9 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -41367,6 +41367,10 @@ Miscellaneous Services @item @code{verbose?} (default: @code{#f}) (type: boolean) Whether to enable verbose output for the current backup job. +@item @code{extra-packages} (default: @code{'()} (type: list-of-packages) +The list of extra packages needed for restic to run the current backup +job. + @item @code{extra-flags} (default: @code{'()}) (type: list-of-lowerables) A list of values that are lowered to strings. These will be passed as command-line arguments to the current job @command{restic backup} diff --git a/gnu/services/backup.scm b/gnu/services/backup.scm index fd904bc9a9..bfbacfe590 100644 --- a/gnu/services/backup.scm +++ b/gnu/services/backup.scm @@ -41,6 +41,7 @@ (define-module (gnu services backup) restic-backup-job-files restic-backup-job-init? restic-backup-job-verbose? + restic-backup-job-extra-packages restic-backup-job-extra-flags restic-backup-configuration @@ -102,6 +103,9 @@ (define-configuration/no-serialization restic-backup-job (list-of-lowerables '()) "The list of files or directories to be backed up. It must be a list of values that can be lowered to strings.") + (extra-packages + (list-of-packages '()) + "The list of extra packages needed for restic to run this backup job.") (verbose? (boolean #f) "Whether to enable verbose output for the current backup job.") @@ -237,22 +241,25 @@ (define (restic-backup-job->mcron-job config) #:user #$user))) (define (restic-guix-wrapper-package jobs) - (package - (name "restic-backup-service-wrapper") - (version "0.0.0") - (source (restic-guix jobs)) - (build-system copy-build-system) - (arguments - (list #:install-plan #~'(("./" "/bin")))) - (home-page "https://restic.net") - (synopsis - "Easily interact from the CLI with Guix configured backups") - (description - "This package provides a simple wrapper around @code{restic}, handled + (let ((extra-packages (append-map restic-backup-job-extra-packages + jobs))) + (package + (name "restic-backup-service-wrapper") + (version "0.0.0") + (source (restic-guix restic-package jobs)) + (build-system copy-build-system) + (arguments + (list #:install-plan #~'(("./" "/bin")))) + (home-page "https://restic.net") + (synopsis + "Easily interact from the CLI with Guix configured backups") + (description + "This package provides a simple wrapper around @code{restic}, handled by the @code{restic-backup-service-type}. It allows for easily interacting with Guix configured backup jobs, for example for manually triggering a backup without waiting for the scheduled job to run.") - (license license:gpl3+))) + (inputs extra-packages) + (license license:gpl3+)))) (define restic-backup-service-profile (lambda (config) -- 2.45.1