From patchwork Sun Mar 14 08:55:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: raid5atemyhomework X-Patchwork-Id: 27690 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 54EC127BC54; Sun, 14 Mar 2021 08:56:50 +0000 (GMT) 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, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable 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 79DFD27BC52 for ; Sun, 14 Mar 2021 08:56:16 +0000 (GMT) Received: from localhost ([::1]:57776 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lLMXm-0002db-19 for patchwork@mira.cbaines.net; Sun, 14 Mar 2021 04:56:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33042) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lLMXa-0002cz-9Y for guix-patches@gnu.org; Sun, 14 Mar 2021 04:56:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49636) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lLMXa-0003xo-2Y for guix-patches@gnu.org; Sun, 14 Mar 2021 04:56:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lLMXa-0002F8-0O for guix-patches@gnu.org; Sun, 14 Mar 2021 04:56:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47134] [PATCH] gnu: Add zfs-auto-snapshot. Resent-From: raid5atemyhomework Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 14 Mar 2021 08:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 47134 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 47134@debbugs.gnu.org X-Debbugs-Original-To: Guix Patches Received: via spool by submit@debbugs.gnu.org id=B.16157121428595 (code B ref -1); Sun, 14 Mar 2021 08:56:01 +0000 Received: (at submit) by debbugs.gnu.org; 14 Mar 2021 08:55:42 +0000 Received: from localhost ([127.0.0.1]:32949 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lLMXF-0002EZ-TF for submit@debbugs.gnu.org; Sun, 14 Mar 2021 04:55:42 -0400 Received: from lists.gnu.org ([209.51.188.17]:59388) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lLMXB-0002EP-US for submit@debbugs.gnu.org; Sun, 14 Mar 2021 04:55:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33014) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lLMXB-0002bD-DW for guix-patches@gnu.org; Sun, 14 Mar 2021 04:55:37 -0400 Received: from mail-40140.protonmail.ch ([185.70.40.140]:11868) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lLMX1-0003id-Mr for guix-patches@gnu.org; Sun, 14 Mar 2021 04:55:36 -0400 Date: Sun, 14 Mar 2021 08:55:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1615712122; bh=DMw6TTcXa+AnC7OnHjWQqx9a+gaJ61ZDGnqjEOTot44=; h=Date:To:From:Reply-To:Subject:From; b=lWW4XTVZA66XmQe/vqOtVAhhPcvQvxHMAad31PZmekqh72cC9G96TnwiY0VDE3Tep 28mMXNbpBNPbMCugzzAwWes1iklHGMoO5/82Imnmw7nor7RM9XOT2J9zCQslIUW6b8 GVUS0xiXFLg3mu0QYIuTFRby1zWRItGPU3u6QLpk= Message-ID: <8khDgDFm8YAH3rsudpda_ASV2o4CdQLmejmEXU3QkRkUFrMfewbzBrqrC4OO2mvpuQUckFSwYmSGadSjNy87Z7NKas5fupZILvGtvPJSa3Y=@protonmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=185.70.40.140; envelope-from=raid5atemyhomework@protonmail.com; helo=mail-40140.protonmail.ch 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-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" Reply-to: raid5atemyhomework X-ACL-Warn: , raid5atemyhomework via Guix-patches X-Patchwork-Original-From: raid5atemyhomework via Guix-patches via From: raid5atemyhomework X-getmail-retrieved-from-mailbox: Patches From be0c4d4ef73e68ace117f2a1b1396331a4fcdf84 Mon Sep 17 00:00:00 2001 From: raid5atemyhomework Date: Sun, 14 Mar 2021 16:40:47 +0800 Subject: [PATCH] gnu: Add zfs-auto-snapshot. * gnu/packages/file-systems.scm (zfs-auto-snapshot): New variable. --- gnu/packages/file-systems.scm | 54 +++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) -- 2.30.2 diff --git a/gnu/packages/file-systems.scm b/gnu/packages/file-systems.scm index e7d78e41fb..0543be2d82 100644 --- a/gnu/packages/file-systems.scm +++ b/gnu/packages/file-systems.scm @@ -975,6 +975,60 @@ originally developed for Solaris and is now maintained by the OpenZFS community.") (license license:cddl1.0))) +(define-public zfs-auto-snapshot + (package + (name "zfs-auto-snapshot") + (version "1.2.4") + (source + (origin + (method url-fetch) + (uri (string-append + "https://github.com/zfsonlinux/zfs-auto-snapshot/archive/upstream/" + version ".tar.gz")) + (sha256 + (base32 "16ry1w43i44xc67gr73x6fa48ninfhqxr498ad4m3kya93vp2zrh")))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ; No tests + #:phases + (modify-phases %standard-phases + (delete 'configure) + (delete 'build) + ;; Guix System may not have a traditional cron system, but + ;; the cron scripts installed by this package are convenient + ;; to use as targets for an mcron job specification, so make + ;; sure they can be run in-store. + (add-before 'install 'fix-cron-scripts + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (zfs-auto-snapshot (string-append + out + "/sbin/zfs-auto-snapshot"))) + (substitute* '("etc/zfs-auto-snapshot.cron.daily" + "etc/zfs-auto-snapshot.cron.frequent" + "etc/zfs-auto-snapshot.cron.hourly" + "etc/zfs-auto-snapshot.cron.monthly" + "etc/zfs-auto-snapshot.cron.weekly") + (("zfs-auto-snapshot") + zfs-auto-snapshot))))) + ;; Provide DESTDIR and PREFIX on make command. + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (invoke "make" "install" + "PREFIX=" + (string-append "DESTDIR=" out))) + #t))))) + (home-page "https://github.com/zfsonlinux/zfs-auto-snapshot") + (synopsis "Automatically create, rotate, and destroy periodic ZFS snapshots") + (description + "An alternative implementation of the zfs-auto-snapshot service for Linux +that is compatible with zfs-linux and zfs-fuse. + +On Guix System, you will need to invoke the installed shell scripts as @code{job} +declarations in your @code{operating-system} configuration.") + (license license:gpl2+))) + (define-public mergerfs (package (name "mergerfs")