From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 6l/1L4eyWGDPDAAA0tVLHw (envelope-from ) for ; Mon, 22 Mar 2021 15:06:47 +0000 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 6P11K4eyWGACPgAA1q6Kng (envelope-from ) for ; Mon, 22 Mar 2021 15:06:47 +0000 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 47EE51C21F for ; Mon, 22 Mar 2021 16:06:47 +0100 (CET) Received: from localhost ([::1]:45814 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lOM8k-0000pr-Ct for larch@yhetil.org; Mon, 22 Mar 2021 11:06:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44260) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lOLe3-0000hD-6z for guix-patches@gnu.org; Mon, 22 Mar 2021 10:35:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46699) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lOLe2-0006fU-U1 for guix-patches@gnu.org; Mon, 22 Mar 2021 10:35:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lOLe2-0001wT-Rr for guix-patches@gnu.org; Mon, 22 Mar 2021 10:35:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] [PATCH v3 2/3] gnu: Add zfs-auto-snapshot. References: In-Reply-To: Resent-From: raid5atemyhomework Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 22 Mar 2021 14:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45692 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.16164236817427 (code B ref 45692); Mon, 22 Mar 2021 14:35:02 +0000 Received: (at 45692) by debbugs.gnu.org; 22 Mar 2021 14:34:41 +0000 Received: from localhost ([127.0.0.1]:58244 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lOLdh-0001vj-A7 for submit@debbugs.gnu.org; Mon, 22 Mar 2021 10:34:41 -0400 Received: from mail-40141.protonmail.ch ([185.70.40.141]:34184) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lOLdf-0001vX-KP for 45692@debbugs.gnu.org; Mon, 22 Mar 2021 10:34:40 -0400 Date: Mon, 22 Mar 2021 14:34:25 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1616423673; bh=QQM+qwaT1UTcQHbQW8JOM7Zj5IQqKU2fIhbum0hDGSM=; h=Date:To:From:Reply-To:Subject:From; b=IE2RzgCDCj6AUqxMq/WkpEeEYxhA+hUlqW2gKt4E5xpGdjAQ+sJl4l4EupiS5waR/ ZRkkPsPmF3jIXBNUIF4FqXI5reNMxZNWw4WXMLfwFSGHzfRUmJ2KcziK3ieIDMYjNf N8tTGC0D8Hs9TaqJQpYvMiHUMwS6jG2OwVax5FzQ= Message-ID: <2c97vRukDGd4mnnPwPzLZOBq6qR5EqiBvaevyGcaoh1zc8NQkJO8y2DvtaMuafb6R9m5_Hhizx41nJjyggYPiHNXmnYKkQCejKsw_n1-wec=@protonmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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" Reply-to: raid5atemyhomework X-ACL-Warn: , raid5atemyhomework via Guix-patches From: raid5atemyhomework via Guix-patches via X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1616425607; 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=QQM+qwaT1UTcQHbQW8JOM7Zj5IQqKU2fIhbum0hDGSM=; b=C9OCESmesqNYMHJMU+7IppepaTgXwd0fjTKpZKUNGCA3VM85CN+iqIUzQ1QVy4ePc6HWqG 7LcN8FXmEivzpy0Vb4TIktfQnkudr4wDDoT1ZweXp1fkVJrP4K2dm9Iqx69dshc/vpJV7n a2qT4D7XKCRrH5af01FpdqZ6/GPDXLXxY8ylXWyzEg9gMvzHzqvfi7IskWi7YzJBDjKzvM VTnrqwMQeOvVdYCnW6Bz/orIQFvWBJT9a9NkuRCWMslbrZMFYaR8dzJ8s3XLPPLdissIaM UlbPNHuF43Y8jmB9jbfPe/mrgHxFiqltHN3Ok5CEIOtClxNsXUgLzS7OEeEiCA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1616425607; a=rsa-sha256; cv=none; b=NPJ4ELeVNu85/LIsSW0c8WK5K6wCJNWa8U6TmqlbfJ7bmkv8u9XDom++Ypa+vB/PVHoXUF xRJpKS3agu3TLqUQ8ZaLkF3gOmbqxlawXHdMKZpBchMQCXruw243DpCz0lna0YwKFi9/Zy RSptyHYdqMwR9VtU6CxhtU8DGyBnwpb6XIZGxM9oaFaoWeMD9HOG4jc0fVaD208s30nzA8 TZwgk/v3Up2MGIAUsMPaKZmNsIOrSiYuBII7SxjbX32gDFtCsP6xWd/s8rXyg6mo8xclNb TwpL+nQQmlr6Y2OzA0W6doX7SSMmpe0X71L4VuZBmCiD6O7zM1WPmSQWaQSLLA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=protonmail.com header.s=protonmail header.b=IE2RzgCD; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -2.92 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=protonmail.com header.s=protonmail header.b=IE2RzgCD; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 47EE51C21F X-Spam-Score: -2.92 X-Migadu-Scanner: scn0.migadu.com X-TUID: BnSDLAKMVu1v >From 481dc87f77743b7a282777656e78615ea57d19cc Mon Sep 17 00:00:00 2001 From: raid5atemyhomework Date: Sun, 14 Mar 2021 16:40:47 +0800 Subject: [PATCH 2/3] gnu: Add zfs-auto-snapshot. * gnu/packages/file-systems.scm (zfs-auto-snapshot): New variable. --- gnu/packages/file-systems.scm | 75 +++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) diff --git a/gnu/packages/file-systems.scm b/gnu/packages/file-systems.scm index 198653c639..6877f89f6e 100644 --- a/gnu/packages/file-systems.scm +++ b/gnu/packages/file-systems.scm @@ -976,6 +976,81 @@ 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/up= stream/" + version ".tar.gz")) + (sha256 + (base32 "16ry1w43i44xc67gr73x6fa48ninfhqxr498ad4m3kya93vp2zrh"))= )) + (build-system gnu-build-system) + (inputs + ;; Note: if you are inheriting from the above zfs package in order + ;; to provide a specific stable kernel version, you should also + ;; inherit this package and replace the sole input below. + `(("zfs" ,zfs))) + (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-scripts + (lambda* (#:key outputs inputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (zfs-auto-snapshot (string-append + out + "/sbin/zfs-auto-snapshot")) + (zfs-package (assoc-ref inputs "zfs")) + (zpool (string-append + zfs-package + "/sbin/zpool")) + (zfs (string-append + zfs-package + "/sbin/zfs"))) + (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)) + (substitute* "src/zfs-auto-snapshot.sh" + (("LC_ALL=3DC zfs list") + (string-append "LC_ALL=3DC " zfs " list")) + (("LC_ALL=3DC zpool status") + (string-append "LC_ALL=3DC " zpool " status")) + (("zfs snapshot") + (string-append zfs " snapshot")) + (("zfs destroy") + (string-append zfs " destroy")))))) + ;; 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=3D" + (string-append "DESTDIR=3D" out))) + #t))))) + (home-page "https://github.com/zfsonlinux/zfs-auto-snapshot") + (synopsis "Automatically create, rotate, and destroy periodic ZFS snap= shots") + (description + "An alternative implementation of the zfs-auto-snapshot service for = Linux +that is compatible with zfs-linux (now OpenZFS) and zfs-fuse. + +On Guix System, you will need to invoke the included shell scripts as @cod= e{job} +definitions in your @code{operating-system} declaration.") + (license license:gpl2+))) + (define-public mergerfs (package (name "mergerfs") -- 2.31.0