From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 19 23:45:41 2024 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 To: guix-patches@gnu.org, 71639@debbugs.gnu.org Subject: [PATCH v2 3/5] services: backup: Add extra-packages field to restic-backup-job Date: Wed, 19 Jun 2024 23:44:14 -0400 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Debbugs-Cc: Florian Pelz , Ludovic Courtès , Matthew Trzcinski , Maxim Cournoyer 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-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit Cc: Richard Sent X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) * 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 From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 20 16:58:37 2024 Received: (at control) by debbugs.gnu.org; 20 Jun 2024 20:58:37 +0000 Received: from localhost ([127.0.0.1]:43933 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sKOrc-0004Ym-OU for submit@debbugs.gnu.org; Thu, 20 Jun 2024 16:58:36 -0400 Received: from mail-108-mta228.mxroute.com ([136.175.108.228]:40479) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sKOrb-0004YW-1K for control@debbugs.gnu.org; Thu, 20 Jun 2024 16:58:35 -0400 Received: from filter006.mxroute.com ([136.175.111.3] filter006.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta228.mxroute.com (ZoneMTA) with ESMTPSA id 1903771968b00017a3.001 for (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Thu, 20 Jun 2024 20:58:29 +0000 X-Zone-Loop: 5ddfee50dbf1dce48980a9bd07c136df37f2517ab447 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=Subject:From:To:Message-Id:Date:Sender:Reply-To :Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=gowV3POMZ6fWwBJE2wkz6LwSiSpvMsK3iKBkO+8DGcs=; b=fY3m53HKn4vTwIdY7L63MD38QE +iFHhUb2zpydx1pCs/g8J/7/MtypyuMVLEjF/ZCNTgdIp9U985J8sGiXmlQggj9xVVpg0SNQYvXAh p5SYsz/4qdjy3U9ttyXDp8yeMtW+RnoTjZW95j0MFibwGzZmh/yJLtbDE7VkTbwuqAWwo7WwcQgB+ hhHjAAVrtDJG2zecLZkoxrQFU9McwGWeBj+sokRd+aJ08C9O7aKG0veLLNSPf4n5waTh6j4e2lhcP 3ppxeT5Dz0mJiTSnYJUWfAhBt5hNV8uFxksJrzpjvae0cATpMOAfZlP2+rBeDfSoyuka2h0HiGvaM ypnTq5GA==; Date: Thu, 20 Jun 2024 16:58:26 -0400 Message-Id: <87a5jfqqkt.fsf@freakingpenguin.com> To: control@debbugs.gnu.org From: Richard Sent Subject: control message for bug #71663 X-Authenticated-Id: richard@freakingpenguin.com X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) close 71663 quit From unknown Sat Jun 21 12:11:01 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 20 Jul 2024 11:24:11 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator