From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A7B1E158089 for ; Wed, 1 Nov 2023 23:27:10 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 973182BC0F6; Wed, 1 Nov 2023 23:27:09 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6BE802BC0F5 for ; Wed, 1 Nov 2023 23:27:09 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 9BDAE335D49 for ; Wed, 1 Nov 2023 23:27:08 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 00DB8AA8 for ; Wed, 1 Nov 2023 23:27:06 +0000 (UTC) From: "Haelwenn Monnier" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Haelwenn Monnier" Message-ID: <1698837459.8ea5c347898972affed96249c439aaf52f035d5b.lanodan@gentoo> Subject: [gentoo-commits] repo/proj/guru:master commit in: sys-fs/zfs-auto-utils/ X-VCS-Repository: repo/proj/guru X-VCS-Files: sys-fs/zfs-auto-utils/Manifest sys-fs/zfs-auto-utils/metadata.xml sys-fs/zfs-auto-utils/zfs-auto-utils-1.0.0.ebuild X-VCS-Directories: sys-fs/zfs-auto-utils/ X-VCS-Committer: lanodan X-VCS-Committer-Name: Haelwenn Monnier X-VCS-Revision: 8ea5c347898972affed96249c439aaf52f035d5b X-VCS-Branch: master Date: Wed, 1 Nov 2023 23:27:06 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 6d18e4bc-50db-46a7-8dff-b97a58877ebb X-Archives-Hash: fba4a3c29f7e4241389a317fb269f6e9 commit: 8ea5c347898972affed96249c439aaf52f035d5b Author: Huang Rui gmail com> AuthorDate: Wed Nov 1 11:16:16 2023 +0000 Commit: Haelwenn Monnier hacktivis me> CommitDate: Wed Nov 1 11:17:39 2023 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=8ea5c347 sys-fs/zfs-auto-utils: new package, add 1.0.0 Signed-off-by: Huang Rui gmail.com> sys-fs/zfs-auto-utils/Manifest | 1 + sys-fs/zfs-auto-utils/metadata.xml | 51 +++++++++++++++++++++++ sys-fs/zfs-auto-utils/zfs-auto-utils-1.0.0.ebuild | 38 +++++++++++++++++ 3 files changed, 90 insertions(+) diff --git a/sys-fs/zfs-auto-utils/Manifest b/sys-fs/zfs-auto-utils/Manifest new file mode 100644 index 0000000000..e3795c5b10 --- /dev/null +++ b/sys-fs/zfs-auto-utils/Manifest @@ -0,0 +1 @@ +DIST zfs-auto-utils-1.0.0.tar.gz 9522 BLAKE2B 962ffac7b6630182009935a4d08e0a320e2c187dfed600024948c30f02fda95462112fe1cd15a49579d3147d6e3d103f0a6cf95ff3d5d7775809d50db6162681 SHA512 5e53d88d607a4b333ac969bb2c3a7e6fa3d5c7736327f22971f223fa26aaa9d079f91fd776dfa25324e01c93df5d87836a1998d62f5b95fb534652fdaa0b427d diff --git a/sys-fs/zfs-auto-utils/metadata.xml b/sys-fs/zfs-auto-utils/metadata.xml new file mode 100644 index 0000000000..e585ba76fa --- /dev/null +++ b/sys-fs/zfs-auto-utils/metadata.xml @@ -0,0 +1,51 @@ + + + + + vowstar@gmail.com + Huang Rui + + + vowstar/zfs-auto-utils + + + ZFS Automatic Scrub/Trim for Linux. + This package is ported from debian to facilitate use on other + distributions. This package renames some properties to make them more + consistent when used with zfs-auto-snapshot. + Auto TRIM is implemented using a custom per-pool property: + com.sun:auto-trim + By default, these TRIM jobs are scheduled on the first Sunday of every + month. The completion speed depends on the disks size, disk speed and + workload pattern. Cheap QLC disks could take considerable more time than + very expensive enterprise graded NVMe disks. + When com.sun:auto-trim is not present in pool, or the property is + present but value is empty/invalid, they are treated as auto. + Auto Scrub is implemented using a custom per-pool property: + com.sun:auto-scrub + By default this have a cron job entry to scrub all pools on the second + Sunday of every month at 24 minutes past midnight. + See /etc/cron.d/zfsutils-linux and /usr/libexec/zfs/scrub for details + It is possible to disable this by setting a zfs user defined property on + the root dataset for a pool. + + + 适用于 Linux 的 ZFS 自动清理/修剪。 + 这个包是从debian移植来的,方便在其他平台上使用。这个包重命名了一些属性, + 使它们与 zfs-auto-snapshot 一起使用时保持一致。 + 自动修剪 (TRIM) 是使用自定义的每个池属性来实现的: + com.sun:auto-trim + 默认情况下,这些 TRIM 作业安排在每个月的第一个星期日。完成速度取决于磁盘 + 大小、磁盘速度和工作负载模式。廉价的 QLC 磁盘可能比昂贵的企业级 NVMe + 磁盘花费更多的时间。 + 当 com.sun:auto-trim 不存在于池中,或者该属性是存在但值为空/无效,它们被 + 视为自动。 + 自动清理 (SCRUB) 是使用自定义的每个池属性来实现的: + com.sun:scrub + 默认情况下,它有一个 cron 作业条目,用于在每月第二个星期日午夜过后 + 24 分钟清理所有池。 + 有关详细信息,请参阅 /etc/cron.d/zfsutils-linux 和 + /usr/libexec/zfs/scrub. + 可以通过在池的根数据集上设置 zfs 用户定义的属性来禁用此功能。 + + diff --git a/sys-fs/zfs-auto-utils/zfs-auto-utils-1.0.0.ebuild b/sys-fs/zfs-auto-utils/zfs-auto-utils-1.0.0.ebuild new file mode 100644 index 0000000000..ebcb358cf9 --- /dev/null +++ b/sys-fs/zfs-auto-utils/zfs-auto-utils-1.0.0.ebuild @@ -0,0 +1,38 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +if [[ ${PV} == 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/vowstar/${PN}.git" +else + MY_P="${PN}-upstream-${PV}" + SRC_URI="https://github.com/vowstar/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv" +fi + +DESCRIPTION="ZFS Automatic Scrub/Trim for Linux" +HOMEPAGE="https://github.com/zfsonlinux" + +LICENSE="GPL-2+" +SLOT="0" + +RDEPEND=" + sys-fs/zfs + virtual/cron +" + +DOCS=( README ) + +src_install() { + emake PREFIX="${EPREFIX}/usr" DESTDIR="${D}" install + einstalldocs +} + +pkg_postinst() { + ewarn "jobs are enabled by default for ALL zfs pools" + ewarn "enable default-exclude flag, or" + ewarn "set com.sun:auto-scrub=false to disable auto scrub" + ewarn "set com.sun:auto-trim=false to disable auto trim" +}