From patchwork Sat Oct 30 08:57:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Arun Isaac X-Patchwork-Id: 34150 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 C171027BBE4; Sat, 30 Oct 2021 09:59:11 +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=ham 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 9036927BBE3 for ; Sat, 30 Oct 2021 09:59:10 +0100 (BST) Received: from localhost ([::1]:54308 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mgkCj-0003ZR-Mc for patchwork@mira.cbaines.net; Sat, 30 Oct 2021 04:59:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38782) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mgkCc-0003Y3-HL for guix-patches@gnu.org; Sat, 30 Oct 2021 04:59:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:45077) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mgkCc-0004Kd-2i for guix-patches@gnu.org; Sat, 30 Oct 2021 04:59:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mgkCc-00082W-2T for guix-patches@gnu.org; Sat, 30 Oct 2021 04:59:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#51502] [PATCH] gnu: Add borgmatic. Resent-From: Arun Isaac Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 30 Oct 2021 08:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 51502 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 51502@debbugs.gnu.org Cc: Arun Isaac X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.163558429930840 (code B ref -1); Sat, 30 Oct 2021 08:59:01 +0000 Received: (at submit) by debbugs.gnu.org; 30 Oct 2021 08:58:19 +0000 Received: from localhost ([127.0.0.1]:56623 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mgkBn-00081F-F7 for submit@debbugs.gnu.org; Sat, 30 Oct 2021 04:58:19 -0400 Received: from lists.gnu.org ([209.51.188.17]:57716) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mgkBj-000810-Jm for submit@debbugs.gnu.org; Sat, 30 Oct 2021 04:58:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38754) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mgkBg-0003Sa-HY for guix-patches@gnu.org; Sat, 30 Oct 2021 04:58:05 -0400 Received: from mugam.systemreboot.net ([139.59.75.54]:50736) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mgkBd-0004HZ-6X for guix-patches@gnu.org; Sat, 30 Oct 2021 04:58:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=systemreboot.net; s=default; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: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=XjX1gLF56bg1J6eb/vDY3jgBhgKb7rTl1UYbhdVcasM=; b=DtY9bkDYhkUoxTry5N53hRZE3+ 5hmrlJdG/WTUVMRlddvxcCmsTnbVti/THhj88ptcPZoueQWtX4M9Kb73ffAc8jOTv+bZw/fzGedbi 9KIxfsIJ2IMUCROYxeoIMYJPRIk5OX5TXqS3MHN9zErNh/MEG5BqxSqueD1mz8A464ZMX5X++4Xm2 pc+JMm4sV5GPMepfXjL8uk0M36kzsxITYvjor8zhI/H3uQ1QXH+7m9KNY/S2XGtdyjkw2Jz9Myccx 5rzJIQPyS3z7+ELU5bOSeNA8/e+eu05E5wiJHp25n6z7zw8FGjnc7La7yD4aqC5sOTm4TGQRNWs0z dhTjP6RA==; Received: from [192.168.2.1] (port=59534 helo=localhost.localdomain) by systemreboot.net with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1mgkBT-0001Sy-5J; Sat, 30 Oct 2021 14:27:51 +0530 From: Arun Isaac Date: Sat, 30 Oct 2021 14:27:48 +0530 Message-Id: <20211030085748.24338-1-arunisaac@systemreboot.net> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Received-SPF: pass client-ip=139.59.75.54; envelope-from=arunisaac@systemreboot.net; helo=mugam.systemreboot.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/backup.scm (borgmatic): New variable. --- gnu/packages/backup.scm | 50 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm index 61d330e861..acde7e5b2f 100644 --- a/gnu/packages/backup.scm +++ b/gnu/packages/backup.scm @@ -4,7 +4,7 @@ ;;; Copyright © 2015, 2016, 2017 Leo Famulari ;;; Copyright © 2017–2021 Tobias Geerinckx-Rice ;;; Copyright © 2017 Thomas Danckaert -;;; Copyright © 2017 Arun Isaac +;;; Copyright © 2017, 2021 Arun Isaac ;;; Copyright © 2017 Kei Kebreau ;;; Copyright © 2017, 2020 Efraim Flashner ;;; Copyright © 2017 Christine Lemmer-Webber @@ -80,6 +80,7 @@ (define-module (gnu packages backup) #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) #:use-module (gnu packages rsync) + #:use-module (gnu packages serialization) #:use-module (gnu packages ssh) #:use-module (gnu packages tls) #:use-module (gnu packages valgrind) @@ -1174,3 +1175,50 @@ (define-public disarchive Gzip will need to describe the order of files in the tarball and the compression parameters used by Gzip.") (license license:gpl3+))) + +(define-public borgmatic + (package + (name "borgmatic") + (version "1.5.20") + (source + (origin + (method url-fetch) + (uri (pypi-uri "borgmatic" version)) + (sha256 + (base32 "1rdpj1mii4fbyprg56krf5k0xsd97ghybaabr7zdhsrcsxf719ha")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'configure + (lambda* (#:key inputs #:allow-other-keys) + ;; Set absolute store path to borg. + (substitute* "borgmatic/commands/borgmatic.py" + (("location\\.get\\('local_path', 'borg'\\)") + (string-append "location.get('local_path', '" + (assoc-ref inputs "borg") "/bin/borg" + "')"))))) + (replace 'check + (lambda* (#:key tests? inputs outputs #:allow-other-keys) + (when tests? + ;; Tests require the installed executable. + (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin" + ":" (getenv "PATH"))) + (invoke "pytest"))))))) + (inputs + `(("borg" ,borg) + ("python-colorama" ,python-colorama) + ("python-jsonschema" ,python-jsonschema) + ("python-requests" ,python-requests) + ("python-ruamel.yaml" ,python-ruamel.yaml))) + (native-inputs + `(("python-flexmock" ,python-flexmock) + ("python-pytest" ,python-pytest) + ("python-pytest-cov" ,python-pytest-cov))) + (home-page "https://torsion.org/borgmatic/") + (synopsis "Simple, configuration-driven backup software") + (description "borgmatic is simple, configuration-driven backup software +for servers and workstations. Protect your files with client-side encryption. +Backup your databases too. Monitor it all with integrated third-party +services. borgmatic is powered by borg.") + (license license:gpl3+)))