[gentoo-commits] repo/gentoo:master commit in: sys-fs/zfs/, sys-fs/zfs/files/

2024-02-22 Thread Sam James
commit: bda8ae7ff2bba3e341c010c67009aa403985656d
Author: Sam James  gentoo  org>
AuthorDate: Fri Feb 23 05:04:44 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Fri Feb 23 06:33:04 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bda8ae7f

sys-fs/zfs: add 2.2.3

Bug: https://bugs.gentoo.org/925290
Closes: https://bugs.gentoo.org/925281
Signed-off-by: Sam James  gentoo.org>

 sys-fs/zfs/Manifest  |  2 ++
 sys-fs/zfs/files/2.2.3-musl.patch| 34 
 sys-fs/zfs/{zfs-.ebuild => zfs-2.2.3.ebuild} |  4 ++-
 sys-fs/zfs/zfs-.ebuild   |  2 +-
 4 files changed, 40 insertions(+), 2 deletions(-)

diff --git a/sys-fs/zfs/Manifest b/sys-fs/zfs/Manifest
index 4591d964e4e4..15f09f09fd54 100644
--- a/sys-fs/zfs/Manifest
+++ b/sys-fs/zfs/Manifest
@@ -2,3 +2,5 @@ DIST zfs-2.1.14.tar.gz 35167471 BLAKE2B 
a7b22eaf05e4fbf416ebe4d7b884c515942fc937
 DIST zfs-2.1.14.tar.gz.asc 836 BLAKE2B 
f01bc58bf6c3d367c494ed4ea9f3fb1141f3aafdbf4f913b9e0d60d31557076d5ae0e25ca93b013f5fd85e21ba5ae9f61e1a03af54bb0c743869c0ce3d5519df
 SHA512 
be0f386cce952b4047dc2448e356078668e8d4392802dd3bb1a426741f15f4d9fb689cd1cb09972bdbc9fe2e4e782ec4b4754fe811c5657bc1f5308bd38e3926
 DIST zfs-2.2.2.tar.gz 33816541 BLAKE2B 
f0619ae42d898d18077096217d0a9ddd7c7378424707aa51d3645661b2889a1459bc4a5e9fe42b6860b2d26e4600da35765b0e741725dafacc2ead2370cad866
 SHA512 
bba252cbf7986f2cce154dd18a34aa478cf98f70106337188dc894de2446d60a58fa643706927757d1787506b44d4ff404897a2d0e16aacb0a7bf27765703332
 DIST zfs-2.2.2.tar.gz.asc 836 BLAKE2B 
bdc86492b2bf45d329e34e89ea7796f5cbf518d32ab114c909321b1d0d8040b9ce4e25b3b85fcbc5ea62ee10a2d716b5b27e37c2c005b307c0b593815c49d625
 SHA512 
110be1aa90f4749106717165a3cb5116379e2d170146a2b3d2601f04212450da9327e028d6e1e5de7f8a46c6bb7a15e2bcdd09e3e760590fbc695f9562f1440b
+DIST zfs-2.2.3.tar.gz 33854765 BLAKE2B 
f83439aa929609191a048dd326b2a15e0f57c72d2901cbfb205b81a29aa42dab49b42eb61647ca3eaed17518b8c907e81343364bfecf83ed441271648f8efd4b
 SHA512 
e6c3df531a33f4bd198429e61b7630f1e965a03fd60d1b847bdf0d55c6d2af3abc38b5e8a63aa9ef9f969cc7eca36cb24a7641f6fb8c41ef2fa024d76cd28f3d
+DIST zfs-2.2.3.tar.gz.asc 836 BLAKE2B 
86e1adc393d1f4643a6fd8c188b555e9dc0fdf7e25690f37ff0a04ff8826eb4fe3c125b54f0c5b9ab33f1daff43c4b44373ee9a4df506f6714f98d77782e6c3c
 SHA512 
fe23ddb9bde78416776411d66a56aa662fa051c8544b4be01ba238b8c1a85ccde1c55329f228fe8ab2681b54a4e4cb08d4e927c597c117242f0b536a40921dc9

diff --git a/sys-fs/zfs/files/2.2.3-musl.patch 
b/sys-fs/zfs/files/2.2.3-musl.patch
new file mode 100644
index ..41ce14633667
--- /dev/null
+++ b/sys-fs/zfs/files/2.2.3-musl.patch
@@ -0,0 +1,34 @@
+https://github.com/openzfs/zfs/pull/15925
+
+From 3fa84afb3f4334b6609f0dcb141e5d10095e585b Mon Sep 17 00:00:00 2001
+From: Sam James 
+Date: Fri, 23 Feb 2024 05:12:09 +
+Subject: [PATCH] tests: use  instead of 
+
+When building on musl, we get:
+```
+In file included from tests/zfs-tests/cmd/getversion.c:22:
+/usr/include/sys/fcntl.h:1:2: error: #warning redirecting incorrect #include 
 to  [-Werror=cpp]
+1 | #warning redirecting incorrect #include  to 
+  |  ^~~
+```
+
+There's some other use of  in the codebase, but they're on the
+module side, where libspl seems to handle it all, so not touching that.
+
+Bug: https://bugs.gentoo.org/925235
+Signed-off-by: Sam James 
+--- a/tests/zfs-tests/cmd/getversion.c
 b/tests/zfs-tests/cmd/getversion.c
+@@ -19,9 +19,9 @@
+  */
+ 
+ #include 
+-#include 
+ #include 
+ #include 
++#include 
+ #include 
+ #include 
+ #include 
+

diff --git a/sys-fs/zfs/zfs-.ebuild b/sys-fs/zfs/zfs-2.2.3.ebuild
similarity index 98%
copy from sys-fs/zfs/zfs-.ebuild
copy to sys-fs/zfs/zfs-2.2.3.ebuild
index 3f4ecf0f9b94..71e2889ab794 100644
--- a/sys-fs/zfs/zfs-.ebuild
+++ b/sys-fs/zfs/zfs-2.2.3.ebuild
@@ -5,7 +5,7 @@ EAPI=8
 
 DISTUTILS_OPTIONAL=1
 DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{10..11} )
+PYTHON_COMPAT=( python3_{10..12} )
 
 inherit autotools bash-completion-r1 dist-kernel-utils distutils-r1 
flag-o-matic linux-info pam systemd udev usr-ldscript
 
@@ -105,6 +105,8 @@ RESTRICT="test"
 
 PATCHES=(
"${FILESDIR}"/2.1.5-dracut-zfs-missing.patch
+   "${FILESDIR}"/2.2.2-no-USER_NS.patch
+   "${FILESDIR}"/2.2.3-musl.patch
 )
 
 pkg_pretend() {

diff --git a/sys-fs/zfs/zfs-.ebuild b/sys-fs/zfs/zfs-.ebuild
index 3f4ecf0f9b94..7b38a676beca 100644
--- a/sys-fs/zfs/zfs-.ebuild
+++ b/sys-fs/zfs/zfs-.ebuild
@@ -5,7 +5,7 @@ EAPI=8
 
 DISTUTILS_OPTIONAL=1
 DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{10..11} )
+PYTHON_COMPAT=( python3_{10..12} )
 
 inherit autotools bash-completion-r1 dist-kernel-utils distutils-r1 
flag-o-matic linux-info pam systemd udev usr-ldscript
 



[gentoo-commits] repo/gentoo:master commit in: sys-fs/zfs/, sys-fs/zfs/files/

2023-12-16 Thread Sam James
commit: 1558e62d2db5a3c783628fcca2c4cd9cd3cb4144
Author: Sam James  gentoo  org>
AuthorDate: Sat Dec 16 10:05:32 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Sat Dec 16 10:06:07 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1558e62d

sys-fs/zfs: fix runtime breakage w/o CONFIG_USER_NS

Prompted by https://forums.gentoo.org/viewtopic-p-8810010.html.

Bug: https://github.com/openzfs/zfs/issues/15241
Signed-off-by: Sam James  gentoo.org>

 sys-fs/zfs/files/2.2.2-no-USER_NS.patch |  39 
 sys-fs/zfs/zfs-2.2.2-r1.ebuild  | 307 
 2 files changed, 346 insertions(+)

diff --git a/sys-fs/zfs/files/2.2.2-no-USER_NS.patch 
b/sys-fs/zfs/files/2.2.2-no-USER_NS.patch
new file mode 100644
index ..b132db9d4bf6
--- /dev/null
+++ b/sys-fs/zfs/files/2.2.2-no-USER_NS.patch
@@ -0,0 +1,39 @@
+https://github.com/openzfs/zfs/issues/15241
+https://github.com/openzfs/zfs/pull/15560
+
+From e0a7ec29d91b79adfd81073f229241351ed0ae21 Mon Sep 17 00:00:00 2001
+From: Ilkka Sovanto 
+Date: Wed, 22 Nov 2023 20:24:47 +0200
+Subject: [PATCH] Fix zoneid when USER_NS is disabled
+
+getzoneid() should return GLOBAL_ZONEID instead of 0 when USER_NS is disabled.
+
+Signed-off-by: Ilkka Sovanto 
+--- a/lib/libspl/os/linux/zone.c
 b/lib/libspl/os/linux/zone.c
+@@ -42,20 +42,20 @@ getzoneid(void)
+   int c = snprintf(path, sizeof (path), "/proc/self/ns/user");
+   /* This API doesn't have any error checking... */
+   if (c < 0 || c >= sizeof (path))
+-  return (0);
++  return (GLOBAL_ZONEID);
+ 
+   ssize_t r = readlink(path, buf, sizeof (buf) - 1);
+   if (r < 0)
+-  return (0);
++  return (GLOBAL_ZONEID);
+ 
+   cp = strchr(buf, '[');
+   if (cp == NULL)
+-  return (0);
++  return (GLOBAL_ZONEID);
+   cp++;
+ 
+   unsigned long n = strtoul(cp, NULL, 10);
+   if (n == ULONG_MAX && errno == ERANGE)
+-  return (0);
++  return (GLOBAL_ZONEID);
+   zoneid_t z = (zoneid_t)n;
+ 
+   return (z);
+

diff --git a/sys-fs/zfs/zfs-2.2.2-r1.ebuild b/sys-fs/zfs/zfs-2.2.2-r1.ebuild
new file mode 100644
index ..086ac897e35e
--- /dev/null
+++ b/sys-fs/zfs/zfs-2.2.2-r1.ebuild
@@ -0,0 +1,307 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_OPTIONAL=1
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{10..11} )
+
+inherit autotools bash-completion-r1 dist-kernel-utils distutils-r1 
flag-o-matic linux-info pam systemd udev usr-ldscript
+
+DESCRIPTION="Userland utilities for ZFS Linux kernel module"
+HOMEPAGE="https://github.com/openzfs/zfs;
+
+if [[ ${PV} == "" ]]; then
+   inherit git-r3
+   EGIT_REPO_URI="https://github.com/openzfs/zfs.git;
+else
+   VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/openzfs.asc
+   inherit verify-sig
+
+   MY_P="${P/_rc/-rc}"
+   
SRC_URI="https://github.com/openzfs/${PN}/releases/download/${MY_P}/${MY_P}.tar.gz;
+   SRC_URI+=" verify-sig? ( 
https://github.com/openzfs/${PN}/releases/download/${MY_P}/${MY_P}.tar.gz.asc )"
+   S="${WORKDIR}/${MY_P}"
+
+   if [[ ${PV} != *_rc* ]]; then
+   KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv ~sparc"
+   fi
+fi
+
+LICENSE="BSD-2 CDDL MIT"
+# just libzfs soname major for now.
+# possible candidates: libuutil, libzpool, libnvpair. Those do not provide 
stable abi, but are considered.
+# see libsoversion_check() below as well
+SLOT="0/5"
+IUSE="custom-cflags debug dist-kernel kernel-builtin minimal nls pam python 
+rootfs selinux test-suite"
+
+DEPEND="
+   dev-libs/openssl:=
+   net-libs/libtirpc:=
+   sys-apps/util-linux
+   sys-libs/zlib
+   virtual/libudev:=
+   !minimal? ( ${PYTHON_DEPS} )
+   pam? ( sys-libs/pam )
+   python? (
+   $(python_gen_cond_dep 'dev-python/cffi[${PYTHON_USEDEP}]' 
'python*')
+   )
+"
+
+BDEPEND="
+   app-alternatives/awk
+   virtual/pkgconfig
+   nls? ( sys-devel/gettext )
+   python? (
+   ${DISTUTILS_DEPS}
+   || (
+   dev-python/packaging[${PYTHON_USEDEP}]
+   dev-python/distlib[${PYTHON_USEDEP}]
+   )
+   )
+"
+
+if [[ ${PV} != "" ]] ; then
+   BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-openzfs )"
+fi
+
+# awk is used for some scripts, completions, and the Dracut module
+RDEPEND="
+   ${DEPEND}
+   !kernel-builtin? ( ~sys-fs/zfs-kmod-${PV}:= )
+   !prefix? ( virtual/udev )
+   app-alternatives/awk
+   sys-fs/udev-init-scripts
+   dist-kernel? ( virtual/dist-kernel:= )
+   rootfs? (
+   app-arch/cpio
+   app-misc/pax-utils
+   )
+   selinux? ( sec-policy/selinux-zfs )
+   test-suite? (
+   app-shells/ksh
+   

[gentoo-commits] repo/gentoo:master commit in: sys-fs/zfs/, sys-fs/zfs/files/

2023-07-03 Thread Sam James
commit: 16b8ce28ee4bcdc9c97eb56a6b9fd4ebe39a3f86
Author: Sam James  gentoo  org>
AuthorDate: Mon Jul  3 21:02:12 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Mon Jul  3 21:02:12 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=16b8ce28

sys-fs/zfs: drop 2.1.7-r1, 2.1.10

Signed-off-by: Sam James  gentoo.org>

 sys-fs/zfs/Manifest   |   4 -
 sys-fs/zfs/files/2.1.5-dracut-mount.patch |  29 --
 sys-fs/zfs/files/2.1.7-ppc64-ieee128-compat.patch | 217 --
 sys-fs/zfs/zfs-2.1.10.ebuild  | 326 -
 sys-fs/zfs/zfs-2.1.7-r1.ebuild| 337 --
 5 files changed, 913 deletions(-)

diff --git a/sys-fs/zfs/Manifest b/sys-fs/zfs/Manifest
index c2835e7dc8d2..591c3082e3c1 100644
--- a/sys-fs/zfs/Manifest
+++ b/sys-fs/zfs/Manifest
@@ -1,11 +1,7 @@
-DIST zfs-2.1.10.tar.gz 35101856 BLAKE2B 
5b1a17d192097f5eab1ef3192217fa34b276b6f344a5114a5411be43208616ac682ae2129ae9da15b4ba6207171ae82140f823041a8067441459d51d994df271
 SHA512 
3189c6f822c7b6caba650a43f321114ef0bd42b72f566c44ba245c61cc3d420149a72520aed5b94494c51c35629a6f645273941774d964f2b61c31c366b2
-DIST zfs-2.1.10.tar.gz.asc 836 BLAKE2B 
5a6b408932cb4f39f5a226598527115aa4fa6c105c8b8ad9f236a5909a948150db712bb1f35e4e16a2b7fc7e434530f93c6a6cd2aab40d628b1ded9891694578
 SHA512 
a45bcce13e7261f90feda51a131fa0c86e2d3c2711286a462072fb120ccbc85719c2bbecb441147a057accffb841ca82df0ba65e1abc0ece9dea8a97cfa31af5
 DIST zfs-2.1.11.tar.gz 35100716 BLAKE2B 
991ac2347bcd452812e247358e2c44a04a88e700d25878b5b95f86939e6114e1205e7afabfd2a1ea9220947876511374d7224aa587d3d66184838d705f71a89a
 SHA512 
335a543644d2dbba919213a28cc5922bf6a118fc19069db84562ce056449a2d6ca4ba827e54f304ab7d9be22260aa9b255134f1b12e2bc98890f757f35e48bd7
 DIST zfs-2.1.11.tar.gz.asc 836 BLAKE2B 
0b904d8e1de2dd08a377efc94e32862192d6b9ccb8628af058a71b3ea51f5e483e0cf527906cd222fe9b41b28ca0b30b0efa07d97c480e5546f6e2bed8cbcb01
 SHA512 
7329e62012ba64288345d8959611de82502ef1da4020e215462fbb2ed209413ec8638d211a31dd6e70be71c998f1da1d8a0d19e5df1f2778782ebb988c94aa41
 DIST zfs-2.1.12.tar.gz 35155013 BLAKE2B 
652780e6bf7b63f45909110726d53795fada034f6044c8393fa3980e30217ada6931e3c2bb57210719e3c78c16f973f69287b7e2b475601f4ce12d701d9d96ae
 SHA512 
f48493a21883e441cda705fb085353bed033f1620a1d0f93069c345c76cf2c0759a2e6f7a80c47c9398e9878abfe1d90d931fe5ceaf2588770a71491a434631e
 DIST zfs-2.1.12.tar.gz.asc 836 BLAKE2B 
9215e732981a82254115cd17ec3c9810d4e9e5d5f7bb848778848f911478fc2e4bdbfc563e9835a2e876c26d9e0e8755724a0995baf9ad24e9265123e10cfddf
 SHA512 
69c8b618947fd966eba0bba1c7326ddd463861f051a6cf1d06e23bd6d840fe7503f02adec2c3cbb203fa7b1cced51500f3689c224b653d13d227edd51b5a44f6
-DIST zfs-2.1.7.tar.gz 35092436 BLAKE2B 
9c85c3eb72f3bb39bc4fd44aaa80338ca197a4e8183436fee73cd56705abfdaecfaf1b6fbe8dd508ccce707c8259c7ab6e1733b60b17757f0a7ff92d4e52bbad
 SHA512 
6a31eb8fbee90ad1abcfedb9000991761aff7591b11362eb5ec6e0bb4b785a7004a251439409d7bd3f51fc995c859614da6313655337952f70bae07ac8ee0140
-DIST zfs-2.1.7.tar.gz.asc 836 BLAKE2B 
648fb818860a1cecc2ec42f23102e0466c038bfe48f5feca1ab58afb9cb439a0fe51cb89941f63a05c14d3b6f95c64dd3910c9a06b9cac14c467b963c65c2948
 SHA512 
4d4fef707bdfc37a82eb79aa0a21c71e30779bcf2ac54fe2df45a03e3302e2a45cb9f4e4ff0122b892b1e608a9f09e86d1334e0c7d9bf681780505f6e1439f9f
 DIST zfs-2.1.9.tar.gz 35106538 BLAKE2B 
d7553cc162687531b254089e29e2e15e2eb6b362cecd8e70c24bbb5dbffbde82036ad2d416f4caeceaa324bee8a2e59d9e3cd8a3bf55a2e3c0718c7af9562812
 SHA512 
a3c410abe911be7d3d66af8ad7023a810eb4ae3284001e544c3a34275eb17a4916a7c094936a2628a590007c007eea84673efa9f3201fd9f24c499fd5ed3ed75
 DIST zfs-2.1.9.tar.gz.asc 836 BLAKE2B 
1e76525eab338398dd6ff7539ea4e7d18847d0f40e9093d813ec93fce5fa4c16e09f91c0805ba01a29190f673d131f85442c13035166d6f2d007a7e42dc15486
 SHA512 
35e1213fcac0458e1243355beba021dfefef455df2b341fbc4b10047f9ed4747df84e319d10ffe4bbcd572fbf014019e0dec200eb4e7d3c116fb805369182cb0
 DIST zfs-2.2.0-rc1.tar.gz 33656024 BLAKE2B 
1157db51d2736905b787a2627e599d7ac527be281edc9a76da0f746ae39483df3b4b8b31e5af504b9b06cd99a3776cd16670a8774d0e68f50014b09971209437
 SHA512 
22285ea1b34d4dbed311e3855449cad51c6f6ddb29c906f106fa6f4816d8e478f073b29fbc4d9636bf783558e041b20d2f2c5c0c33f65153d3b21da6cd9b7689

diff --git a/sys-fs/zfs/files/2.1.5-dracut-mount.patch 
b/sys-fs/zfs/files/2.1.5-dracut-mount.patch
deleted file mode 100644
index 758f4b3a3e99..
--- a/sys-fs/zfs/files/2.1.5-dracut-mount.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-https://github.com/openzfs/zfs/commit/07f2793e869196fcbcd5057d9ada377674262fe3
-https://bugs.gentoo.org/857228
-
-From: Brian Behlendorf 
-Date: Wed, 29 Jun 2022 15:33:38 -0700
-Subject: [PATCH] dracut: fix typo in mount-zfs.sh.in
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Format the `zpool get` command correctly.  The -o option must
-be followed by "all" or the requested field name.
-
-Reviewed-by: 

[gentoo-commits] repo/gentoo:master commit in: sys-fs/zfs/, sys-fs/zfs/files/

2022-12-24 Thread Georgy Yakovlev
commit: 6abcc1c2237833c42306aa3091a5da76abfb3deb
Author: Georgy Yakovlev  gentoo  org>
AuthorDate: Sat Dec 24 06:42:45 2022 +
Commit: Georgy Yakovlev  gentoo  org>
CommitDate: Sun Dec 25 00:23:11 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6abcc1c2

sys-fs/zfs: revbump 2.1.7, add some systemd patches.

Signed-off-by: Georgy Yakovlev  gentoo.org>

 .../2.1.7-dracut-include-systemd-overrides.patch   |  44 +++
 .../files/2.1.7-systemd-zed-restart-always.patch   |  27 ++
 sys-fs/zfs/zfs-2.1.7-r1.ebuild | 333 +
 3 files changed, 404 insertions(+)

diff --git a/sys-fs/zfs/files/2.1.7-dracut-include-systemd-overrides.patch 
b/sys-fs/zfs/files/2.1.7-dracut-include-systemd-overrides.patch
new file mode 100644
index ..2a50dc658876
--- /dev/null
+++ b/sys-fs/zfs/files/2.1.7-dracut-include-systemd-overrides.patch
@@ -0,0 +1,44 @@
+From b10f73f78eb223dd799a87474c537a69113edee1 Mon Sep 17 00:00:00 2001
+From: Vince van Oosten 
+Date: Sun, 23 Oct 2022 10:55:46 +0200
+Subject: [PATCH] include systemd overrides to zfs-dracut module
+
+If a user that uses systemd and dracut wants to overide certain
+settings, they typically use `systemctl edit [unit]` or place a file in
+`/etc/systemd/system/[unit].d/override.conf` directly.
+
+The zfs-dracut module did not include those overrides however, so this
+did not have any effect at boot time.
+
+For zfs-import-scan.service and zfs-import-cache.service, overrides are
+now included in the dracut initramfs image.
+
+Reviewed-by: Brian Behlendorf 
+Signed-off-by: Vince van Oosten 
+Closes #14075
+Closes #14076
+---
+ contrib/dracut/90zfs/module-setup.sh.in | 10 ++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/contrib/dracut/90zfs/module-setup.sh.in 
b/contrib/dracut/90zfs/module-setup.sh.in
+index 81d7d2abe49..b16529de905 100755
+--- a/contrib/dracut/90zfs/module-setup.sh.in
 b/contrib/dracut/90zfs/module-setup.sh.in
+@@ -86,6 +86,16 @@ install() {
+   "zfs-import-cache.service"; do
+   inst_simple "${systemdsystemunitdir}/${_service}"
+   systemctl -q --root "${initdir}" add-wants 
zfs-import.target "${_service}"
++
++  # Add user-provided unit overrides
++  # - /etc/systemd/system/zfs-import-{scan,cache}.service
++  # - 
/etc/systemd/system/zfs-import-{scan,cache}.service.d/overrides.conf
++  # -H ensures they are marked host-only
++  # -o ensures there is no error upon absence of these 
files
++  inst_multiple -o -H \
++  "${systemdsystemconfdir}/${_service}" \
++  "${systemdsystemconfdir}/${_service}.d/"*.conf
++
+   done
+ 
+   for _service in \

diff --git a/sys-fs/zfs/files/2.1.7-systemd-zed-restart-always.patch 
b/sys-fs/zfs/files/2.1.7-systemd-zed-restart-always.patch
new file mode 100644
index ..2d4b92d5c66a
--- /dev/null
+++ b/sys-fs/zfs/files/2.1.7-systemd-zed-restart-always.patch
@@ -0,0 +1,27 @@
+From f505cd53fd9cb6e6efb1e23a9d77e38bba754695 Mon Sep 17 00:00:00 2001
+From: George Melikov 
+Date: Fri, 16 Dec 2022 01:11:02 +0300
+Subject: [PATCH] systemd: set restart=always for zfs-zed.service
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: George Melikov 
+Co-authored-by: Attila Fülöp 
+---
+ etc/systemd/system/zfs-zed.service.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/etc/systemd/system/zfs-zed.service.in 
b/etc/systemd/system/zfs-zed.service.in
+index 73a83e59e51..be2fc67348f 100644
+--- a/etc/systemd/system/zfs-zed.service.in
 b/etc/systemd/system/zfs-zed.service.in
+@@ -6,7 +6,7 @@ ConditionPathIsDirectory=/sys/module/zfs
+ [Service]
+ EnvironmentFile=-@initconfdir@/zfs
+ ExecStart=@sbindir@/zed -F
+-Restart=on-abort
++Restart=always
+ 
+ [Install]
+ Alias=zed.service

diff --git a/sys-fs/zfs/zfs-2.1.7-r1.ebuild b/sys-fs/zfs/zfs-2.1.7-r1.ebuild
new file mode 100644
index ..7bcc6ae4a771
--- /dev/null
+++ b/sys-fs/zfs/zfs-2.1.7-r1.ebuild
@@ -0,0 +1,333 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_OPTIONAL=1
+PYTHON_COMPAT=( python3_{8..10} )
+
+inherit autotools bash-completion-r1 dist-kernel-utils distutils-r1 
flag-o-matic linux-info pam systemd udev usr-ldscript
+
+DESCRIPTION="Userland utilities for ZFS Linux kernel module"
+HOMEPAGE="https://github.com/openzfs/zfs;
+
+if [[ ${PV} == "" ]]; then
+   inherit git-r3 linux-mod
+   EGIT_REPO_URI="https://github.com/openzfs/zfs.git;
+else
+   VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/openzfs.asc
+   inherit verify-sig
+
+   MY_P="${P/_rc/-rc}"
+   

[gentoo-commits] repo/gentoo:master commit in: sys-fs/zfs/, sys-fs/zfs/files/

2022-12-08 Thread Georgy Yakovlev
commit: 1cbfcd27de8a7bf209f791f5ef326c66743a6996
Author: Georgy Yakovlev  gentoo  org>
AuthorDate: Thu Dec  8 19:30:43 2022 +
Commit: Georgy Yakovlev  gentoo  org>
CommitDate: Thu Dec  8 19:47:32 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1cbfcd27

sys-fs/zfs: drop 2.1.5-r6

Signed-off-by: Georgy Yakovlev  gentoo.org>

 sys-fs/zfs/Manifest|   3 -
 .../2.1.5-dracut-zfs-bootfs-snapshot-fixes.patch   |  78 -
 sys-fs/zfs/zfs-2.1.5-r6.ebuild | 336 -
 3 files changed, 417 deletions(-)

diff --git a/sys-fs/zfs/Manifest b/sys-fs/zfs/Manifest
index b1f070f79fb9..5622cc6ec71f 100644
--- a/sys-fs/zfs/Manifest
+++ b/sys-fs/zfs/Manifest
@@ -1,6 +1,3 @@
-DIST zfs-2.1.5-patches.tar.xz 13324 BLAKE2B 
bfef8abd298cebd54491272b8c1deacace901d9a1acce67cb927bab6447eafd985352fd09f64336aa9d6611bab0e5c761d7973f0a65c408d77bb735a94c60253
 SHA512 
d2b009664f8eb4f2a8596693011fde578b6eae123c6169e5dfb70bd920c0f987f5177f7b1be008705a421574a8a9bc930f99823785c69e81573f18b0350cb9bd
-DIST zfs-2.1.5.tar.gz 34951632 BLAKE2B 
c6e3efd9c0cda91654767eaad0eaaa05cd9a5daf1cb0384c9c78b30062f5c29142ac37ab9dbdaf96c91456d11c317d782d3524ade293f03fda983e5992b79e49
 SHA512 
d9ccf1049cefa9167d25f71fbdca70092cd02368b60f09341e6489fb68dc5f89e87b026b0191f4d81181a8851449124d824a1d959d0e2fb29c8a3d624edc4f03
-DIST zfs-2.1.5.tar.gz.asc 836 BLAKE2B 
4a81c266967540850a2cc824e79555ca9d05b2e17e45fa2723893cbd85b55e3d7d791986d6667b7ee1530e7692c03818f15e8b6798393b54989f90801b775786
 SHA512 
224b0dcf4982c63a8eff0a39d054537e7d023f7c35e154e4d20490b8daf184c076bc8e4de7d2c5af4059f8a802b747e637aad4479cd8d1330cf5b26da2f19c94
 DIST zfs-2.1.6.tar.gz 34951282 BLAKE2B 
615fe7a2128af77c6c855ea52b6503a78f0c992ea845b02875ac19aa9dd155c5d4110b668da91c463f96a54767ab92e67e5303572337352484c055c0a0ff9e46
 SHA512 
75639e4cecb281fe73a6e6bd116693f6609ace9b358385450297d175087b10938c2f489a08c657cf0a64250a8db995cbd19abc808a8523cb4c5344b3f76668d6
 DIST zfs-2.1.6.tar.gz.asc 836 BLAKE2B 
d85a79f8824a92c4d0a9682646f79c14871ebe27764289dc87cd9b0a773b7295538780401e70c492a9e4e7097ff2b3e459f7e0a7fdce2e2a59d3f467c41d88b3
 SHA512 
a83fcc00a8b35f1a1f9b94097d453019333a5351a3d78656dbd9ef732655ee817ccc88068c5ba11b5ff4a285e02250aee4169cc1450025edf547a2329fca7e15
 DIST zfs-2.1.7.tar.gz 35092436 BLAKE2B 
9c85c3eb72f3bb39bc4fd44aaa80338ca197a4e8183436fee73cd56705abfdaecfaf1b6fbe8dd508ccce707c8259c7ab6e1733b60b17757f0a7ff92d4e52bbad
 SHA512 
6a31eb8fbee90ad1abcfedb9000991761aff7591b11362eb5ec6e0bb4b785a7004a251439409d7bd3f51fc995c859614da6313655337952f70bae07ac8ee0140

diff --git a/sys-fs/zfs/files/2.1.5-dracut-zfs-bootfs-snapshot-fixes.patch 
b/sys-fs/zfs/files/2.1.5-dracut-zfs-bootfs-snapshot-fixes.patch
deleted file mode 100644
index 05c44faf9d93..
--- a/sys-fs/zfs/files/2.1.5-dracut-zfs-bootfs-snapshot-fixes.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-From 2d434e8ae4139ce14a1b058839a144bf952e79ea Mon Sep 17 00:00:00 2001
-From: gregory-lee-bartholomew 
-Date: Wed, 29 Jun 2022 18:56:04 -0500
-Subject: [PATCH] contrib: dracut: zfs-{rollback,snapshot}-bootfs: explicit
- snapname fix
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Due to a missing semicolon on the ExecStart line, it wasn't possible
-to specify the snapshot name on the bootfs.{rollback,snapshot}
-kernel parameters if the boot dataset name was obtained from the
-root=zfs:... kernel parameter.
-
-Reviewed-by: Ahelenia Ziemiańska 
-Reviewed-by: Brian Behlendorf 
-Signed-off-by: Gregory Bartholomew 
-Closes #13585

- contrib/dracut/90zfs/zfs-rollback-bootfs.service.in | 2 +-
- contrib/dracut/90zfs/zfs-snapshot-bootfs.service.in | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/contrib/dracut/90zfs/zfs-rollback-bootfs.service.in 
b/contrib/dracut/90zfs/zfs-rollback-bootfs.service.in
-index b4f5707516c..a29cf3a3dd8 100644
 a/contrib/dracut/90zfs/zfs-rollback-bootfs.service.in
-+++ b/contrib/dracut/90zfs/zfs-rollback-bootfs.service.in
-@@ -8,5 +8,5 @@ ConditionKernelCommandLine=bootfs.rollback
- 
- [Service]
- Type=oneshot
--ExecStart=/bin/sh -c '. /lib/dracut-zfs-lib.sh; decode_root_args || exit; [ 
"$root" = "zfs:AUTO" ] && root="$BOOTFS" SNAPNAME="$(getarg bootfs.rollback)"; 
exec @sbindir@/zfs rollback -Rf "$root@${SNAPNAME:-%v}"'
-+ExecStart=/bin/sh -c '. /lib/dracut-zfs-lib.sh; decode_root_args || exit; [ 
"$root" = "zfs:AUTO" ] && root="$BOOTFS"; SNAPNAME="$(getarg bootfs.rollback)"; 
exec @sbindir@/zfs rollback -Rf "$root@${SNAPNAME:-%v}"'
- RemainAfterExit=yes
-diff --git a/contrib/dracut/90zfs/zfs-snapshot-bootfs.service.in 
b/contrib/dracut/90zfs/zfs-snapshot-bootfs.service.in
-index afdba2c9d19..befd163b653 100644
 a/contrib/dracut/90zfs/zfs-snapshot-bootfs.service.in
-+++ b/contrib/dracut/90zfs/zfs-snapshot-bootfs.service.in
-@@ -8,5 +8,5 @@ ConditionKernelCommandLine=bootfs.snapshot
- 
- [Service]
- Type=oneshot
--ExecStart=/bin/sh -c 

[gentoo-commits] repo/gentoo:master commit in: sys-fs/zfs/, sys-fs/zfs/files/

2022-10-03 Thread Sam James
commit: d16509499d6059f3d58b89952fdb056702325704
Author: Sam James  gentoo  org>
AuthorDate: Tue Oct  4 04:24:37 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Tue Oct  4 05:06:49 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d1650949

sys-fs/zfs: add 2.1.6

Signed-off-by: Sam James  gentoo.org>

 sys-fs/zfs/Manifest|   2 +
 sys-fs/zfs/files/2.1.6-fgrep.patch |  53 ++
 sys-fs/zfs/zfs-2.1.6.ebuild| 330 +
 3 files changed, 385 insertions(+)

diff --git a/sys-fs/zfs/Manifest b/sys-fs/zfs/Manifest
index 9e6e521d9fef..894b7751ea9b 100644
--- a/sys-fs/zfs/Manifest
+++ b/sys-fs/zfs/Manifest
@@ -1,3 +1,5 @@
 DIST zfs-2.1.5-patches.tar.xz 13324 BLAKE2B 
bfef8abd298cebd54491272b8c1deacace901d9a1acce67cb927bab6447eafd985352fd09f64336aa9d6611bab0e5c761d7973f0a65c408d77bb735a94c60253
 SHA512 
d2b009664f8eb4f2a8596693011fde578b6eae123c6169e5dfb70bd920c0f987f5177f7b1be008705a421574a8a9bc930f99823785c69e81573f18b0350cb9bd
 DIST zfs-2.1.5.tar.gz 34951632 BLAKE2B 
c6e3efd9c0cda91654767eaad0eaaa05cd9a5daf1cb0384c9c78b30062f5c29142ac37ab9dbdaf96c91456d11c317d782d3524ade293f03fda983e5992b79e49
 SHA512 
d9ccf1049cefa9167d25f71fbdca70092cd02368b60f09341e6489fb68dc5f89e87b026b0191f4d81181a8851449124d824a1d959d0e2fb29c8a3d624edc4f03
 DIST zfs-2.1.5.tar.gz.asc 836 BLAKE2B 
4a81c266967540850a2cc824e79555ca9d05b2e17e45fa2723893cbd85b55e3d7d791986d6667b7ee1530e7692c03818f15e8b6798393b54989f90801b775786
 SHA512 
224b0dcf4982c63a8eff0a39d054537e7d023f7c35e154e4d20490b8daf184c076bc8e4de7d2c5af4059f8a802b747e637aad4479cd8d1330cf5b26da2f19c94
+DIST zfs-2.1.6.tar.gz 34951282 BLAKE2B 
615fe7a2128af77c6c855ea52b6503a78f0c992ea845b02875ac19aa9dd155c5d4110b668da91c463f96a54767ab92e67e5303572337352484c055c0a0ff9e46
 SHA512 
75639e4cecb281fe73a6e6bd116693f6609ace9b358385450297d175087b10938c2f489a08c657cf0a64250a8db995cbd19abc808a8523cb4c5344b3f76668d6
+DIST zfs-2.1.6.tar.gz.asc 836 BLAKE2B 
d85a79f8824a92c4d0a9682646f79c14871ebe27764289dc87cd9b0a773b7295538780401e70c492a9e4e7097ff2b3e459f7e0a7fdce2e2a59d3f467c41d88b3
 SHA512 
a83fcc00a8b35f1a1f9b94097d453019333a5351a3d78656dbd9ef732655ee817ccc88068c5ba11b5ff4a285e02250aee4169cc1450025edf547a2329fca7e15

diff --git a/sys-fs/zfs/files/2.1.6-fgrep.patch 
b/sys-fs/zfs/files/2.1.6-fgrep.patch
new file mode 100644
index ..2e47c5bcc093
--- /dev/null
+++ b/sys-fs/zfs/files/2.1.6-fgrep.patch
@@ -0,0 +1,53 @@
+https://github.com/openzfs/zfs/commit/d30577c9dd811688f2609ad532b011b99bceb485
+
+From d30577c9dd811688f2609ad532b011b99bceb485 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=D0=BD=D0=B0=D0=B1?= 
+Date: Sat, 12 Mar 2022 00:26:46 +0100
+Subject: [PATCH] fgrep -> grep -F
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Reviewed-by: Brian Behlendorf 
+Reviewed-by: John Kennedy 
+Reviewed-by: Ryan Moeller 
+Signed-off-by: Ahelenia Ziemiańska 
+Closes #13259
+--- a/config/kernel.m4
 b/config/kernel.m4
+@@ -394,11 +394,11 @@ AC_DEFUN([ZFS_AC_KERNEL], [
+   utsrelease1=$kernelbuild/include/linux/version.h
+   utsrelease2=$kernelbuild/include/linux/utsrelease.h
+   utsrelease3=$kernelbuild/include/generated/utsrelease.h
+-  AS_IF([test -r $utsrelease1 && fgrep -q UTS_RELEASE $utsrelease1], [
++  AS_IF([test -r $utsrelease1 && grep -qF UTS_RELEASE $utsrelease1], [
+   utsrelease=$utsrelease1
+-  ], [test -r $utsrelease2 && fgrep -q UTS_RELEASE $utsrelease2], [
++  ], [test -r $utsrelease2 && grep -qF UTS_RELEASE $utsrelease2], [
+   utsrelease=$utsrelease2
+-  ], [test -r $utsrelease3 && fgrep -q UTS_RELEASE $utsrelease3], [
++  ], [test -r $utsrelease3 && grep -qF UTS_RELEASE $utsrelease3], [
+   utsrelease=$utsrelease3
+   ])
+ 
+--- a/config/zfs-build.m4
 b/config/zfs-build.m4
+@@ -173,7 +173,7 @@ AC_DEFUN([ZFS_AC_DEBUG_KMEM_TRACKING], [
+ ])
+ 
+ AC_DEFUN([ZFS_AC_DEBUG_INVARIANTS_DETECT_FREEBSD], [
+-  AS_IF([sysctl -n kern.conftxt | fgrep -qx $'options\tINVARIANTS'],
++  AS_IF([sysctl -n kern.conftxt | grep -Fqx $'options\tINVARIANTS'],
+   [enable_invariants="yes"],
+   [enable_invariants="no"])
+ ])
+--- a/tests/zfs-tests/tests/functional/cli_root/zpool_wait/zpool_wait.kshlib
 b/tests/zfs-tests/tests/functional/cli_root/zpool_wait/zpool_wait.kshlib
+@@ -120,5 +120,5 @@ function check_while_waiting
+ # Whether any vdev in the given pool is initializing
+ function is_vdev_initializing # pool
+ {
+-  zpool status -i "$1" | grep 'initialized, started' >/dev/null
++  zpool status -i "$1" | grep -q 'initialized, started'
+ }
+

diff --git a/sys-fs/zfs/zfs-2.1.6.ebuild b/sys-fs/zfs/zfs-2.1.6.ebuild
new file mode 100644
index ..554cb0d418dc
--- /dev/null
+++ b/sys-fs/zfs/zfs-2.1.6.ebuild
@@ -0,0 +1,330 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License 

[gentoo-commits] repo/gentoo:master commit in: sys-fs/zfs/, sys-fs/zfs/files/

2022-09-17 Thread Georgy Yakovlev
commit: 33344d7dd6b44bd93c17485d77d60c0e25ef71ee
Author: Georgy Yakovlev  gentoo  org>
AuthorDate: Sat Sep 17 22:10:37 2022 +
Commit: Georgy Yakovlev  gentoo  org>
CommitDate: Sat Sep 17 22:14:00 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=33344d7d

sys-fs/zfs: drop 2.0.7-r1

Closes: https://bugs.gentoo.org/850508
Signed-off-by: Georgy Yakovlev  gentoo.org>

 sys-fs/zfs/Manifest |   2 -
 sys-fs/zfs/files/2.0.7-scrub-timers.patch   |  99 -
 sys-fs/zfs/files/2.1.2-musl-tests.patch |  58 --
 sys-fs/zfs/files/2.1.2-openrc-vendor.patch  |  42 
 sys-fs/zfs/files/bash-completion-sudo.patch |  35 
 sys-fs/zfs/zfs-2.0.7-r1.ebuild  | 313 
 6 files changed, 549 deletions(-)

diff --git a/sys-fs/zfs/Manifest b/sys-fs/zfs/Manifest
index 7b982f51e740..e252f0fccc10 100644
--- a/sys-fs/zfs/Manifest
+++ b/sys-fs/zfs/Manifest
@@ -1,5 +1,3 @@
-DIST zfs-2.0.7.tar.gz 14550055 BLAKE2B 
80f7297f04a21cd8f3f2043d895b0325512ba0cea3bb9223561237754495c8233d29af5a9418a3c06a87510100240a45ef3d59c7ce776fffb5aafdcd18167c21
 SHA512 
1135abf74bf74685439018f7cd65fc52088f179d113bdd2e6481689bb0f4a016716a07d859107b74501fda00689e80b2488c7c2c53d5f058d6b659909ed85f6f
-DIST zfs-2.0.7.tar.gz.asc 836 BLAKE2B 
65e7df58c33ccadc4e0ca9dbc1e8c006abbec8442e2da50872a1ab0cbb841fc45152298e8d3b93ee4320ddae6416e3a856caf80d8efb21b19db53dfedbf00e38
 SHA512 
b901d8e92faa6cfe6010bd54de88c7d18057f434cb07f8a89672d6c446a0a97b23209ee8f02cfd3b2a8f431c68ec977e7dc9f95fe5d385dba0bb6d37338ba682
 DIST zfs-2.1.4.tar.gz 34896310 BLAKE2B 
be303f1181f604770536aa4aa61d5319ec408abbd04964cedadd15b3101a15deba6539bb5d833f4fed357f323d74f622d035305df699b213df41ae45bffdd200
 SHA512 
c7b57c43fc287b22905067ab022df4133d32e1a5dc335f7baf743b4ef88f64c2bf9d41318c2083230d077dd49e68f7d9e6172266e13d4b1eee29d359860f969e
 DIST zfs-2.1.4.tar.gz.asc 836 BLAKE2B 
b311730f72d534c87a782515f35a354bfbefba0513dc0cee5b0b497cf742590f13be6a49ff8a70d7d6503d0ba06b0266e7d290d718337add614812c3d1b0731a
 SHA512 
53880cd5369f468551bab685eb83739ed76aa286886fdd2cbad4270755fe809da730082a91bba61011f59594fac297ce05645ae32c2c73b4a9aa835f2991a1ee
 DIST zfs-2.1.5-patches.tar.xz 13324 BLAKE2B 
bfef8abd298cebd54491272b8c1deacace901d9a1acce67cb927bab6447eafd985352fd09f64336aa9d6611bab0e5c761d7973f0a65c408d77bb735a94c60253
 SHA512 
d2b009664f8eb4f2a8596693011fde578b6eae123c6169e5dfb70bd920c0f987f5177f7b1be008705a421574a8a9bc930f99823785c69e81573f18b0350cb9bd

diff --git a/sys-fs/zfs/files/2.0.7-scrub-timers.patch 
b/sys-fs/zfs/files/2.0.7-scrub-timers.patch
deleted file mode 100644
index 7c7bd1b874ea..
--- a/sys-fs/zfs/files/2.0.7-scrub-timers.patch
+++ /dev/null
@@ -1,99 +0,0 @@
-From 2c9844d159024d4c742d24639a218213fb53d537 Mon Sep 17 00:00:00 2001
-From: Georgy Yakovlev 
-Date: Sat, 22 May 2021 22:27:39 -0700
-Subject: [PATCH 1/2] systemd: add weekly and monthly scrub timers
-
-timers can be enabled as follows:
-
-systemctl enable zfs-scrub-weekly@rpool.timer --now
-systemctl enable zfs-scrub-monthly@datapool.timer --now
-
-Each timer will pull in zfs-scrub@${poolname}.service, which is not
-schedule-specific.
-
-Signed-off-by: Georgy Yakovlev 

- etc/systemd/system/.gitignore  |  1 +
- etc/systemd/system/Makefile.am |  5 -
- etc/systemd/system/zfs-scrub-mont...@.timer.in | 12 
- etc/systemd/system/zfs-scrub-wee...@.timer.in  | 12 
- etc/systemd/system/zfs-sc...@.service.in   | 14 ++
- 5 files changed, 43 insertions(+), 1 deletion(-)
- create mode 100644 etc/systemd/system/zfs-scrub-mont...@.timer.in
- create mode 100644 etc/systemd/system/zfs-scrub-wee...@.timer.in
- create mode 100644 etc/systemd/system/zfs-sc...@.service.in
-
-diff --git a/etc/systemd/system/Makefile.am b/etc/systemd/system/Makefile.am
-index c374a52ac..5e65e1db4 100644
 a/etc/systemd/system/Makefile.am
-+++ b/etc/systemd/system/Makefile.am
-@@ -12,7 +12,10 @@ systemdunit_DATA = \
-   zfs-volume-wait.service \
-   zfs-import.target \
-   zfs-volumes.target \
--  zfs.target
-+  zfs.target \
-+  zfs-scrub-monthly@.timer \
-+  zfs-scrub-weekly@.timer \
-+  zfs-scrub@.service
- 
- SUBSTFILES += $(systemdpreset_DATA) $(systemdunit_DATA)
- 
-diff --git a/etc/systemd/system/zfs-scrub-mont...@.timer.in 
b/etc/systemd/system/zfs-scrub-mont...@.timer.in
-new file mode 100644
-index 0..903068468
 /dev/null
-+++ b/etc/systemd/system/zfs-scrub-mont...@.timer.in
-@@ -0,0 +1,12 @@
-+[Unit]
-+Description=Monthly zpool scrub timer for %i
-+Documentation=man:zpool-scrub(8)
-+
-+[Timer]
-+OnCalendar=monthly
-+Persistent=true
-+RandomizedDelaySec=1h
-+Unit=zfs-scrub@%i.service
-+
-+[Install]
-+WantedBy=timers.target
-diff --git a/etc/systemd/system/zfs-scrub-wee...@.timer.in 
b/etc/systemd/system/zfs-scrub-wee...@.timer.in
-new file mode 100644
-index 0..ede699500
 /dev/null
-+++ 

[gentoo-commits] repo/gentoo:master commit in: sys-fs/zfs/, sys-fs/zfs/files/

2022-09-16 Thread Georgy Yakovlev
commit: 0cab28e0c7458d3ca75a0b08a23ff19e273e7432
Author: Georgy Yakovlev  gentoo  org>
AuthorDate: Fri Sep 16 23:08:21 2022 +
Commit: Georgy Yakovlev  gentoo  org>
CommitDate: Fri Sep 16 23:09:14 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0cab28e0

sys-fs/zfs: revbump 2.1.5-r5, add zfs-snapshot-bootfs fixes

Signed-off-by: Georgy Yakovlev  gentoo.org>

 .../2.1.5-dracut-zfs-bootfs-snapshot-fixes.patch   | 78 ++
 .../{zfs-2.1.5-r5.ebuild => zfs-2.1.5-r6.ebuild}   |  4 ++
 2 files changed, 82 insertions(+)

diff --git a/sys-fs/zfs/files/2.1.5-dracut-zfs-bootfs-snapshot-fixes.patch 
b/sys-fs/zfs/files/2.1.5-dracut-zfs-bootfs-snapshot-fixes.patch
new file mode 100644
index ..05c44faf9d93
--- /dev/null
+++ b/sys-fs/zfs/files/2.1.5-dracut-zfs-bootfs-snapshot-fixes.patch
@@ -0,0 +1,78 @@
+From 2d434e8ae4139ce14a1b058839a144bf952e79ea Mon Sep 17 00:00:00 2001
+From: gregory-lee-bartholomew 
+Date: Wed, 29 Jun 2022 18:56:04 -0500
+Subject: [PATCH] contrib: dracut: zfs-{rollback,snapshot}-bootfs: explicit
+ snapname fix
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Due to a missing semicolon on the ExecStart line, it wasn't possible
+to specify the snapshot name on the bootfs.{rollback,snapshot}
+kernel parameters if the boot dataset name was obtained from the
+root=zfs:... kernel parameter.
+
+Reviewed-by: Ahelenia Ziemiańska 
+Reviewed-by: Brian Behlendorf 
+Signed-off-by: Gregory Bartholomew 
+Closes #13585
+---
+ contrib/dracut/90zfs/zfs-rollback-bootfs.service.in | 2 +-
+ contrib/dracut/90zfs/zfs-snapshot-bootfs.service.in | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/contrib/dracut/90zfs/zfs-rollback-bootfs.service.in 
b/contrib/dracut/90zfs/zfs-rollback-bootfs.service.in
+index b4f5707516c..a29cf3a3dd8 100644
+--- a/contrib/dracut/90zfs/zfs-rollback-bootfs.service.in
 b/contrib/dracut/90zfs/zfs-rollback-bootfs.service.in
+@@ -8,5 +8,5 @@ ConditionKernelCommandLine=bootfs.rollback
+ 
+ [Service]
+ Type=oneshot
+-ExecStart=/bin/sh -c '. /lib/dracut-zfs-lib.sh; decode_root_args || exit; [ 
"$root" = "zfs:AUTO" ] && root="$BOOTFS" SNAPNAME="$(getarg bootfs.rollback)"; 
exec @sbindir@/zfs rollback -Rf "$root@${SNAPNAME:-%v}"'
++ExecStart=/bin/sh -c '. /lib/dracut-zfs-lib.sh; decode_root_args || exit; [ 
"$root" = "zfs:AUTO" ] && root="$BOOTFS"; SNAPNAME="$(getarg bootfs.rollback)"; 
exec @sbindir@/zfs rollback -Rf "$root@${SNAPNAME:-%v}"'
+ RemainAfterExit=yes
+diff --git a/contrib/dracut/90zfs/zfs-snapshot-bootfs.service.in 
b/contrib/dracut/90zfs/zfs-snapshot-bootfs.service.in
+index afdba2c9d19..befd163b653 100644
+--- a/contrib/dracut/90zfs/zfs-snapshot-bootfs.service.in
 b/contrib/dracut/90zfs/zfs-snapshot-bootfs.service.in
+@@ -8,5 +8,5 @@ ConditionKernelCommandLine=bootfs.snapshot
+ 
+ [Service]
+ Type=oneshot
+-ExecStart=/bin/sh -c '. /lib/dracut-zfs-lib.sh; decode_root_args || exit; [ 
"$root" = "zfs:AUTO" ] && root="$BOOTFS" SNAPNAME="$(getarg bootfs.snapshot)"; 
exec @sbindir@/zfs snapshot "$root@${SNAPNAME:-%v}"'
++ExecStart=/bin/sh -c '. /lib/dracut-zfs-lib.sh; decode_root_args || exit; [ 
"$root" = "zfs:AUTO" ] && root="$BOOTFS"; SNAPNAME="$(getarg bootfs.snapshot)"; 
exec @sbindir@/zfs snapshot "$root@${SNAPNAME:-%v}"'
+ RemainAfterExit=yes
+From d22dd77c4d4556373b995121412c4abac02bcf8a Mon Sep 17 00:00:00 2001
+From: gregory-lee-bartholomew 
+Date: Fri, 12 Aug 2022 16:28:15 -0500
+Subject: [PATCH] contrib: dracut: zfs-snapshot-bootfs: exit status fix
+
+When the zfs-snapshot-bootfs service attempts to create a snapshot
+that already exists, the exit status of the command is non-zero and
+the service reports failed to the systemd service manager. This is a
+common occurrence if bootfs.snapshot is left set on the kernel command
+line and it should not be considered a failure.
+
+This service was originally set to ignore this error by prefixing
+the command with - on the ExecStart line, but the leading - appears
+to have been dropped in #13359.
+
+Reviewed-by: Brian Behlendorf 
+Signed-off-by: Gregory Bartholomew 
+Closes #13769
+---
+ contrib/dracut/90zfs/zfs-snapshot-bootfs.service.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/contrib/dracut/90zfs/zfs-snapshot-bootfs.service.in 
b/contrib/dracut/90zfs/zfs-snapshot-bootfs.service.in
+index befd163b653..9e73d1a7872 100644
+--- a/contrib/dracut/90zfs/zfs-snapshot-bootfs.service.in
 b/contrib/dracut/90zfs/zfs-snapshot-bootfs.service.in
+@@ -8,5 +8,5 @@ ConditionKernelCommandLine=bootfs.snapshot
+ 
+ [Service]
+ Type=oneshot
+-ExecStart=/bin/sh -c '. /lib/dracut-zfs-lib.sh; decode_root_args || exit; [ 
"$root" = "zfs:AUTO" ] && root="$BOOTFS"; SNAPNAME="$(getarg bootfs.snapshot)"; 
exec @sbindir@/zfs snapshot "$root@${SNAPNAME:-%v}"'
++ExecStart=-/bin/sh -c '. /lib/dracut-zfs-lib.sh; decode_root_args || exit; [ 
"$root" = "zfs:AUTO" ] && root="$BOOTFS"; 

[gentoo-commits] repo/gentoo:master commit in: sys-fs/zfs/, sys-fs/zfs/files/

2022-07-01 Thread Sam James
commit: 25f80a2eafbe1eae88d053b507ee7200f31c42dc
Author: Sam James  gentoo  org>
AuthorDate: Fri Jul  1 07:33:01 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Fri Jul  1 07:34:38 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=25f80a2e

sys-fs/zfs: more Dracut fixes

- Backport the merged version of non-root fix (one we used should be fine,
but upstream went with another)

- Revert commit which breaks dist-kernel initramfs building (breaks
with USE=initramfs on gentoo-kernel b/c zfs isn't yet rebuilt when
gentoo-kernel's pkg_postinst builds dracut).

Bug: https://github.com/openzfs/zfs/issues/13595
Bug: https://bugs.gentoo.org/854333
Signed-off-by: Sam James  gentoo.org>

 sys-fs/zfs/files/2.1.5-dracut-zfs-missing.patch| 14 +
 sys-fs/zfs/files/2.1.5-r2-dracut-non-root.patch| 60 ++
 .../zfs/{zfs-.ebuild => zfs-2.1.5-r2.ebuild}   |  9 
 sys-fs/zfs/zfs-.ebuild |  4 ++
 4 files changed, 87 insertions(+)

diff --git a/sys-fs/zfs/files/2.1.5-dracut-zfs-missing.patch 
b/sys-fs/zfs/files/2.1.5-dracut-zfs-missing.patch
new file mode 100644
index ..077bcd55f6d5
--- /dev/null
+++ b/sys-fs/zfs/files/2.1.5-dracut-zfs-missing.patch
@@ -0,0 +1,14 @@
+https://github.com/openzfs/zfs/commit/ebbfc6cb853d2d2f3f0671362d5ff5588be39e9d
+https://github.com/openzfs/zfs/issues/13595
+--- b/contrib/dracut/90zfs/module-setup.sh.in
 a/contrib/dracut/90zfs/module-setup.sh.in
+@@ -19,7 +19,7 @@
+ }
+ 
+ installkernel() {
++  instmods zfs
+-  instmods -c zfs
+ }
+ 
+ install() {
+

diff --git a/sys-fs/zfs/files/2.1.5-r2-dracut-non-root.patch 
b/sys-fs/zfs/files/2.1.5-r2-dracut-non-root.patch
new file mode 100644
index ..a9c6130f5b00
--- /dev/null
+++ b/sys-fs/zfs/files/2.1.5-r2-dracut-non-root.patch
@@ -0,0 +1,60 @@
+https://github.com/openzfs/zfs/commit/eefe83eaa68f7cb4a49c580dd940d3688e42c849
+https://bugs.gentoo.org/854333
+
+From eefe83eaa68f7cb4a49c580dd940d3688e42c849 Mon Sep 17 00:00:00 2001
+From: Toyam Cox 
+Date: Thu, 30 Jun 2022 13:47:58 -0400
+Subject: [PATCH] dracut: fix boot on non-zfs-root systems
+
+Simply prevent overwriting root until it needs to be overwritten.
+
+Dracut could change this value before this module is called, but won't
+change the kernel command line.
+
+Reviewed-by: Andrew J. Hesford 
+Signed-off-by: Toyam Cox 
+Closes #13592
+---
+ contrib/dracut/90zfs/zfs-lib.sh.in | 10 +-
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/contrib/dracut/90zfs/zfs-lib.sh.in 
b/contrib/dracut/90zfs/zfs-lib.sh.in
+index e44673c2d75..3a43e514d6f 100755
+--- a/contrib/dracut/90zfs/zfs-lib.sh.in
 b/contrib/dracut/90zfs/zfs-lib.sh.in
+@@ -88,11 +88,11 @@ decode_root_args() {
+ return
+ fi
+ 
+-root=$(getarg root=)
++xroot=$(getarg root=)
+ rootfstype=$(getarg rootfstype=)
+ 
+ # shellcheck disable=SC2249
+-case "$root" in
++case "$xroot" in
+ ""|zfs|zfs:|zfs:AUTO)
+ root=zfs:AUTO
+ rootfstype=zfs
+@@ -100,7 +100,7 @@ decode_root_args() {
+ ;;
+ 
+ ZFS=*|zfs:*)
+-root="${root#zfs:}"
++root="${xroot#zfs:}"
+ root="${root#ZFS=}"
+ root=$(echo "$root" | tr '+' ' ')
+ rootfstype=zfs
+@@ -109,9 +109,9 @@ decode_root_args() {
+ esac
+ 
+ if [ "$rootfstype" = "zfs" ]; then
+-case "$root" in
++case "$xroot" in
+ "") root=zfs:AUTO ;;
+-*)  root=$(echo "$root" | tr '+' ' ') ;;
++*)  root=$(echo "$xroot" | tr '+' ' ') ;;
+ esac
+ return 0
+ fi
+

diff --git a/sys-fs/zfs/zfs-.ebuild b/sys-fs/zfs/zfs-2.1.5-r2.ebuild
similarity index 97%
copy from sys-fs/zfs/zfs-.ebuild
copy to sys-fs/zfs/zfs-2.1.5-r2.ebuild
index 6e0b78a9c125..37907ff20733 100644
--- a/sys-fs/zfs/zfs-.ebuild
+++ b/sys-fs/zfs/zfs-2.1.5-r2.ebuild
@@ -100,6 +100,15 @@ REQUIRED_USE="
 
 RESTRICT="test"
 
+PATCHES=(
+   # bug #855182
+   "${FILESDIR}"/${PV}-build-issues.patch
+   # bug #854333
+   "${FILESDIR}"/${PV}-r2-dracut-non-root.patch
+   #
+   "${FILESDIR}"/2.1.5-dracut-zfs-missing.patch
+)
+
 pkg_pretend() {
use rootfs || return 0
 

diff --git a/sys-fs/zfs/zfs-.ebuild b/sys-fs/zfs/zfs-.ebuild
index 6e0b78a9c125..b3a9d416fb6e 100644
--- a/sys-fs/zfs/zfs-.ebuild
+++ b/sys-fs/zfs/zfs-.ebuild
@@ -100,6 +100,10 @@ REQUIRED_USE="
 
 RESTRICT="test"
 
+PATCHES=(
+   "${FILESDIR}"/2.1.5-dracut-zfs-missing.patch
+)
+
 pkg_pretend() {
use rootfs || return 0
 



[gentoo-commits] repo/gentoo:master commit in: sys-fs/zfs/, sys-fs/zfs/files/

2022-06-07 Thread Georgy Yakovlev
commit: 66f46ece9b462f673a8ad1f7d94f02e10186e60f
Author: Georgy Yakovlev  gentoo  org>
AuthorDate: Tue Jun  7 18:54:49 2022 +
Commit: Georgy Yakovlev  gentoo  org>
CommitDate: Tue Jun  7 18:54:49 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=66f46ece

sys-fs/zfs: drop 2.1.2-r1

Signed-off-by: Georgy Yakovlev  gentoo.org>

 sys-fs/zfs/Manifest   |   2 -
 sys-fs/zfs/files/2.1.2-scrub-timers.patch | 147 ---
 sys-fs/zfs/zfs-2.1.2-r1.ebuild| 303 --
 3 files changed, 452 deletions(-)

diff --git a/sys-fs/zfs/Manifest b/sys-fs/zfs/Manifest
index fbb9a55c3dc1..e7fff2635157 100644
--- a/sys-fs/zfs/Manifest
+++ b/sys-fs/zfs/Manifest
@@ -1,6 +1,4 @@
 DIST zfs-2.0.7.tar.gz 14550055 BLAKE2B 
80f7297f04a21cd8f3f2043d895b0325512ba0cea3bb9223561237754495c8233d29af5a9418a3c06a87510100240a45ef3d59c7ce776fffb5aafdcd18167c21
 SHA512 
1135abf74bf74685439018f7cd65fc52088f179d113bdd2e6481689bb0f4a016716a07d859107b74501fda00689e80b2488c7c2c53d5f058d6b659909ed85f6f
 DIST zfs-2.0.7.tar.gz.asc 836 BLAKE2B 
65e7df58c33ccadc4e0ca9dbc1e8c006abbec8442e2da50872a1ab0cbb841fc45152298e8d3b93ee4320ddae6416e3a856caf80d8efb21b19db53dfedbf00e38
 SHA512 
b901d8e92faa6cfe6010bd54de88c7d18057f434cb07f8a89672d6c446a0a97b23209ee8f02cfd3b2a8f431c68ec977e7dc9f95fe5d385dba0bb6d37338ba682
-DIST zfs-2.1.2.tar.gz 34829045 BLAKE2B 
ab4e2d85200438373c7eeeaa5256a712dbfb2862b85de1fb7554ad0cc2b9f8e1255ab4564bca62f65a81a823adb8c112957e6e8771b8e5e6944c3731bc894584
 SHA512 
3e3932259da2a27f1c4cca8da62b909edc43bf51ab0229d2d5d0234d9a7eaa7b63b67c06a98cbe2d29ba1eb5cbcaab16e5062c2a2bc8e84cab770be10ebf2102
-DIST zfs-2.1.2.tar.gz.asc 836 BLAKE2B 
8f5666f5c3d7016a4d79191f42d0a220fe8c654a0d64e3da3b575644fe52c83dcb9f9ef49ba0553771a127bba44e2802f1d366a7a38f670e73612deef76755c3
 SHA512 
da6bfccd19a249a6891f5e1de6c4b332e98ce4f125f638c046b9cedac3fd79c56a99dd9a620105a40741e5f04b382f5d5996b56cbe576fb268b31e57e0fed6eb
 DIST zfs-2.1.4.tar.gz 34896310 BLAKE2B 
be303f1181f604770536aa4aa61d5319ec408abbd04964cedadd15b3101a15deba6539bb5d833f4fed357f323d74f622d035305df699b213df41ae45bffdd200
 SHA512 
c7b57c43fc287b22905067ab022df4133d32e1a5dc335f7baf743b4ef88f64c2bf9d41318c2083230d077dd49e68f7d9e6172266e13d4b1eee29d359860f969e
 DIST zfs-2.1.4.tar.gz.asc 836 BLAKE2B 
b311730f72d534c87a782515f35a354bfbefba0513dc0cee5b0b497cf742590f13be6a49ff8a70d7d6503d0ba06b0266e7d290d718337add614812c3d1b0731a
 SHA512 
53880cd5369f468551bab685eb83739ed76aa286886fdd2cbad4270755fe809da730082a91bba61011f59594fac297ce05645ae32c2c73b4a9aa835f2991a1ee

diff --git a/sys-fs/zfs/files/2.1.2-scrub-timers.patch 
b/sys-fs/zfs/files/2.1.2-scrub-timers.patch
deleted file mode 100644
index f1c5b5699f62..
--- a/sys-fs/zfs/files/2.1.2-scrub-timers.patch
+++ /dev/null
@@ -1,147 +0,0 @@
-From 2c9844d159024d4c742d24639a218213fb53d537 Mon Sep 17 00:00:00 2001
-From: Georgy Yakovlev 
-Date: Sat, 22 May 2021 22:27:39 -0700
-Subject: [PATCH 1/2] systemd: add weekly and monthly scrub timers
-
-timers can be enabled as follows:
-
-systemctl enable zfs-scrub-weekly@rpool.timer --now
-systemctl enable zfs-scrub-monthly@datapool.timer --now
-
-Each timer will pull in zfs-scrub@${poolname}.service, which is not
-schedule-specific.
-
-Signed-off-by: Georgy Yakovlev 

- etc/systemd/system/.gitignore  |  1 +
- etc/systemd/system/Makefile.am |  5 -
- etc/systemd/system/zfs-scrub-mont...@.timer.in | 12 
- etc/systemd/system/zfs-scrub-wee...@.timer.in  | 12 
- etc/systemd/system/zfs-sc...@.service.in   | 14 ++
- 5 files changed, 43 insertions(+), 1 deletion(-)
- create mode 100644 etc/systemd/system/zfs-scrub-mont...@.timer.in
- create mode 100644 etc/systemd/system/zfs-scrub-wee...@.timer.in
- create mode 100644 etc/systemd/system/zfs-sc...@.service.in
-
-diff --git a/etc/systemd/system/Makefile.am b/etc/systemd/system/Makefile.am
-index c374a52ac..5e65e1db4 100644
 a/etc/systemd/system/Makefile.am
-+++ b/etc/systemd/system/Makefile.am
-@@ -12,7 +12,10 @@ systemdunit_DATA = \
-   zfs-volume-wait.service \
-   zfs-import.target \
-   zfs-volumes.target \
--  zfs.target
-+  zfs.target \
-+  zfs-scrub-monthly@.timer \
-+  zfs-scrub-weekly@.timer \
-+  zfs-scrub@.service
- 
- SUBSTFILES += $(systemdpreset_DATA) $(systemdunit_DATA)
- 
-diff --git a/etc/systemd/system/zfs-scrub-mont...@.timer.in 
b/etc/systemd/system/zfs-scrub-mont...@.timer.in
-new file mode 100644
-index 0..903068468
 /dev/null
-+++ b/etc/systemd/system/zfs-scrub-mont...@.timer.in
-@@ -0,0 +1,12 @@
-+[Unit]
-+Description=Monthly zpool scrub timer for %i
-+Documentation=man:zpool-scrub(8)
-+
-+[Timer]
-+OnCalendar=monthly
-+Persistent=true
-+RandomizedDelaySec=1h
-+Unit=zfs-scrub@%i.service
-+
-+[Install]
-+WantedBy=timers.target
-diff --git a/etc/systemd/system/zfs-scrub-wee...@.timer.in 

[gentoo-commits] repo/gentoo:master commit in: sys-fs/zfs/, sys-fs/zfs/files/

2021-12-26 Thread Georgy Yakovlev
commit: 75a131e7d043e3e3ff0e15aa2038ebdf47997dc3
Author: Georgy Yakovlev  gentoo  org>
AuthorDate: Sun Dec 26 22:30:57 2021 +
Commit: Georgy Yakovlev  gentoo  org>
CommitDate: Sun Dec 26 22:35:03 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=75a131e7

sys-fs/zfs: drop 2.0.6-r1

Bug: https://bugs.gentoo.org/820278
Closes: https://bugs.gentoo.org/815817
Signed-off-by: Georgy Yakovlev  gentoo.org>

 sys-fs/zfs/Manifest   |   2 -
 sys-fs/zfs/files/2.0.4-scrub-timers.patch |  97 --
 sys-fs/zfs/zfs-2.0.6-r1.ebuild| 302 --
 3 files changed, 401 deletions(-)

diff --git a/sys-fs/zfs/Manifest b/sys-fs/zfs/Manifest
index 8c426ab5ccc7..e2556e93d2e6 100644
--- a/sys-fs/zfs/Manifest
+++ b/sys-fs/zfs/Manifest
@@ -1,6 +1,4 @@
 DIST zfs-0.8.6.tar.gz 9295260 BLAKE2B 
45424d710aaf75a05f766ae523ae157a24b5cbdcefe72a59e4cede81e42f7a92ae7f01150388437b78cd49f3d28b9664599f2a624516e6b3f1073497194a99f2
 SHA512 
626b172554f39a5c70f6ea5c599a92fae52534590d1b0273de2bbfc3676d29dff0eade8ca17e5f179a59870c12bc758fb53b7900f8a1fdbdef3a9161b93f9cce
-DIST zfs-2.0.6.tar.gz 13192941 BLAKE2B 
3a83303b016ec4259c286af8a9ceb281829d26508d411df91dd94193bca8c3155ef0ba63604e95f6add5f0c6cf6d100b0f567efc33b6c484c9ff811924da6ccd
 SHA512 
52a5576eed21868b2a3d63d05d3d8c35b5e59ee88c7ddab1dc070644539f9acd56bde43ba5e965ad951a6d50a014fb429a7977d2ab1a2bfcadd92ea78dd57bf8
-DIST zfs-2.0.6.tar.gz.asc 836 BLAKE2B 
065eba3361ef4234acc67df0236ab9a6737ba9fe5a706be98b55dd64d10360160ca787d8873f27451a2107225ae657dc4cab20a7c2a268cd2de64c8d82d0327a
 SHA512 
123569ecfcee22ac462160acf61b120144c774bc5c0d46a50d2b7312f7565da1a9d780e1a6207dba5834917c66d5b852763e4a3162378d5c9bb90b0dfde35c5c
 DIST zfs-2.0.7.tar.gz 14550055 BLAKE2B 
80f7297f04a21cd8f3f2043d895b0325512ba0cea3bb9223561237754495c8233d29af5a9418a3c06a87510100240a45ef3d59c7ce776fffb5aafdcd18167c21
 SHA512 
1135abf74bf74685439018f7cd65fc52088f179d113bdd2e6481689bb0f4a016716a07d859107b74501fda00689e80b2488c7c2c53d5f058d6b659909ed85f6f
 DIST zfs-2.0.7.tar.gz.asc 836 BLAKE2B 
65e7df58c33ccadc4e0ca9dbc1e8c006abbec8442e2da50872a1ab0cbb841fc45152298e8d3b93ee4320ddae6416e3a856caf80d8efb21b19db53dfedbf00e38
 SHA512 
b901d8e92faa6cfe6010bd54de88c7d18057f434cb07f8a89672d6c446a0a97b23209ee8f02cfd3b2a8f431c68ec977e7dc9f95fe5d385dba0bb6d37338ba682
 DIST zfs-2.1.2.tar.gz 34829045 BLAKE2B 
ab4e2d85200438373c7eeeaa5256a712dbfb2862b85de1fb7554ad0cc2b9f8e1255ab4564bca62f65a81a823adb8c112957e6e8771b8e5e6944c3731bc894584
 SHA512 
3e3932259da2a27f1c4cca8da62b909edc43bf51ab0229d2d5d0234d9a7eaa7b63b67c06a98cbe2d29ba1eb5cbcaab16e5062c2a2bc8e84cab770be10ebf2102

diff --git a/sys-fs/zfs/files/2.0.4-scrub-timers.patch 
b/sys-fs/zfs/files/2.0.4-scrub-timers.patch
deleted file mode 100644
index 6aae1e4de596..
--- a/sys-fs/zfs/files/2.0.4-scrub-timers.patch
+++ /dev/null
@@ -1,97 +0,0 @@
-From e23d7e03637e377591a480d87630b746cdaa377f Mon Sep 17 00:00:00 2001
-From: Georgy Yakovlev 
-Date: Sat, 22 May 2021 22:27:39 -0700
-Subject: [PATCH] systemd: add weekly and monthly scrub timers
-
-timers can be enabled as follows:
-
-systemctl enable zfs-scrub-weekly@rpool.timer --now
-systemctl enable zfs-scrub-monthly@datapool.timer --now
-
-Each timer will pull in zfs-scrub@${poolname}.service, which is not
-schedule-specific.
-
-Signed-off-by: Georgy Yakovlev 

- etc/systemd/system/Makefile.am |  5 -
- etc/systemd/system/zfs-scrub-mont...@.timer.in | 12 
- etc/systemd/system/zfs-scrub-wee...@.timer.in  | 12 
- etc/systemd/system/zfs-sc...@.service.in   | 12 
- 4 files changed, 40 insertions(+), 1 deletion(-)
- create mode 100644 etc/systemd/system/zfs-scrub-mont...@.timer.in
- create mode 100644 etc/systemd/system/zfs-scrub-wee...@.timer.in
- create mode 100644 etc/systemd/system/zfs-sc...@.service.in
-
-diff --git a/etc/systemd/system/Makefile.am b/etc/systemd/system/Makefile.am
-index c374a52ac..5e65e1db4 100644
 a/etc/systemd/system/Makefile.am
-+++ b/etc/systemd/system/Makefile.am
-@@ -12,7 +12,10 @@ systemdunit_DATA = \
-   zfs-volume-wait.service \
-   zfs-import.target \
-   zfs-volumes.target \
--  zfs.target
-+  zfs.target \
-+  zfs-scrub-monthly@.timer \
-+  zfs-scrub-weekly@.timer \
-+  zfs-scrub@.service
- 
- SUBSTFILES += $(systemdpreset_DATA) $(systemdunit_DATA)
- 
-diff --git a/etc/systemd/system/zfs-scrub-mont...@.timer.in 
b/etc/systemd/system/zfs-scrub-mont...@.timer.in
-new file mode 100644
-index 0..4c585f45f
 /dev/null
-+++ b/etc/systemd/system/zfs-scrub-mont...@.timer.in
-@@ -0,0 +1,12 @@
-+[Unit]
-+Description=Monthly zpool scrub timer for %i
-+Documentation=man:zpool-scrub(8)
-+
-+[Timer]
-+OnCalendar=monthly
-+AccuracySec=1h
-+Persistent=true
-+Unit=zfs-scrub@%i.service
-+
-+[Install]
-+WantedBy=timers.target
-diff --git a/etc/systemd/system/zfs-scrub-wee...@.timer.in 

[gentoo-commits] repo/gentoo:master commit in: sys-fs/zfs/, sys-fs/zfs/files/

2021-12-23 Thread Georgy Yakovlev
commit: 94a129e0e7930ec5537be5f4fc5c84cb0e7a48bd
Author: Georgy Yakovlev  gentoo  org>
AuthorDate: Thu Dec 23 22:08:39 2021 +
Commit: Georgy Yakovlev  gentoo  org>
CommitDate: Thu Dec 23 22:27:12 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=94a129e0

sys-fs/zfs: add 2.0.7

Signed-off-by: Georgy Yakovlev  gentoo.org>

 sys-fs/zfs/Manifest   |   2 +
 sys-fs/zfs/files/2.0.7-scrub-timers.patch |  99 ++
 sys-fs/zfs/zfs-2.0.7.ebuild   | 303 ++
 3 files changed, 404 insertions(+)

diff --git a/sys-fs/zfs/Manifest b/sys-fs/zfs/Manifest
index 1d9cb77a48f7..8c426ab5ccc7 100644
--- a/sys-fs/zfs/Manifest
+++ b/sys-fs/zfs/Manifest
@@ -1,5 +1,7 @@
 DIST zfs-0.8.6.tar.gz 9295260 BLAKE2B 
45424d710aaf75a05f766ae523ae157a24b5cbdcefe72a59e4cede81e42f7a92ae7f01150388437b78cd49f3d28b9664599f2a624516e6b3f1073497194a99f2
 SHA512 
626b172554f39a5c70f6ea5c599a92fae52534590d1b0273de2bbfc3676d29dff0eade8ca17e5f179a59870c12bc758fb53b7900f8a1fdbdef3a9161b93f9cce
 DIST zfs-2.0.6.tar.gz 13192941 BLAKE2B 
3a83303b016ec4259c286af8a9ceb281829d26508d411df91dd94193bca8c3155ef0ba63604e95f6add5f0c6cf6d100b0f567efc33b6c484c9ff811924da6ccd
 SHA512 
52a5576eed21868b2a3d63d05d3d8c35b5e59ee88c7ddab1dc070644539f9acd56bde43ba5e965ad951a6d50a014fb429a7977d2ab1a2bfcadd92ea78dd57bf8
 DIST zfs-2.0.6.tar.gz.asc 836 BLAKE2B 
065eba3361ef4234acc67df0236ab9a6737ba9fe5a706be98b55dd64d10360160ca787d8873f27451a2107225ae657dc4cab20a7c2a268cd2de64c8d82d0327a
 SHA512 
123569ecfcee22ac462160acf61b120144c774bc5c0d46a50d2b7312f7565da1a9d780e1a6207dba5834917c66d5b852763e4a3162378d5c9bb90b0dfde35c5c
+DIST zfs-2.0.7.tar.gz 14550055 BLAKE2B 
80f7297f04a21cd8f3f2043d895b0325512ba0cea3bb9223561237754495c8233d29af5a9418a3c06a87510100240a45ef3d59c7ce776fffb5aafdcd18167c21
 SHA512 
1135abf74bf74685439018f7cd65fc52088f179d113bdd2e6481689bb0f4a016716a07d859107b74501fda00689e80b2488c7c2c53d5f058d6b659909ed85f6f
+DIST zfs-2.0.7.tar.gz.asc 836 BLAKE2B 
65e7df58c33ccadc4e0ca9dbc1e8c006abbec8442e2da50872a1ab0cbb841fc45152298e8d3b93ee4320ddae6416e3a856caf80d8efb21b19db53dfedbf00e38
 SHA512 
b901d8e92faa6cfe6010bd54de88c7d18057f434cb07f8a89672d6c446a0a97b23209ee8f02cfd3b2a8f431c68ec977e7dc9f95fe5d385dba0bb6d37338ba682
 DIST zfs-2.1.2.tar.gz 34829045 BLAKE2B 
ab4e2d85200438373c7eeeaa5256a712dbfb2862b85de1fb7554ad0cc2b9f8e1255ab4564bca62f65a81a823adb8c112957e6e8771b8e5e6944c3731bc894584
 SHA512 
3e3932259da2a27f1c4cca8da62b909edc43bf51ab0229d2d5d0234d9a7eaa7b63b67c06a98cbe2d29ba1eb5cbcaab16e5062c2a2bc8e84cab770be10ebf2102
 DIST zfs-2.1.2.tar.gz.asc 836 BLAKE2B 
8f5666f5c3d7016a4d79191f42d0a220fe8c654a0d64e3da3b575644fe52c83dcb9f9ef49ba0553771a127bba44e2802f1d366a7a38f670e73612deef76755c3
 SHA512 
da6bfccd19a249a6891f5e1de6c4b332e98ce4f125f638c046b9cedac3fd79c56a99dd9a620105a40741e5f04b382f5d5996b56cbe576fb268b31e57e0fed6eb

diff --git a/sys-fs/zfs/files/2.0.7-scrub-timers.patch 
b/sys-fs/zfs/files/2.0.7-scrub-timers.patch
new file mode 100644
index ..7c7bd1b874ea
--- /dev/null
+++ b/sys-fs/zfs/files/2.0.7-scrub-timers.patch
@@ -0,0 +1,99 @@
+From 2c9844d159024d4c742d24639a218213fb53d537 Mon Sep 17 00:00:00 2001
+From: Georgy Yakovlev 
+Date: Sat, 22 May 2021 22:27:39 -0700
+Subject: [PATCH 1/2] systemd: add weekly and monthly scrub timers
+
+timers can be enabled as follows:
+
+systemctl enable zfs-scrub-weekly@rpool.timer --now
+systemctl enable zfs-scrub-monthly@datapool.timer --now
+
+Each timer will pull in zfs-scrub@${poolname}.service, which is not
+schedule-specific.
+
+Signed-off-by: Georgy Yakovlev 
+---
+ etc/systemd/system/.gitignore  |  1 +
+ etc/systemd/system/Makefile.am |  5 -
+ etc/systemd/system/zfs-scrub-mont...@.timer.in | 12 
+ etc/systemd/system/zfs-scrub-wee...@.timer.in  | 12 
+ etc/systemd/system/zfs-sc...@.service.in   | 14 ++
+ 5 files changed, 43 insertions(+), 1 deletion(-)
+ create mode 100644 etc/systemd/system/zfs-scrub-mont...@.timer.in
+ create mode 100644 etc/systemd/system/zfs-scrub-wee...@.timer.in
+ create mode 100644 etc/systemd/system/zfs-sc...@.service.in
+
+diff --git a/etc/systemd/system/Makefile.am b/etc/systemd/system/Makefile.am
+index c374a52ac..5e65e1db4 100644
+--- a/etc/systemd/system/Makefile.am
 b/etc/systemd/system/Makefile.am
+@@ -12,7 +12,10 @@ systemdunit_DATA = \
+   zfs-volume-wait.service \
+   zfs-import.target \
+   zfs-volumes.target \
+-  zfs.target
++  zfs.target \
++  zfs-scrub-monthly@.timer \
++  zfs-scrub-weekly@.timer \
++  zfs-scrub@.service
+ 
+ SUBSTFILES += $(systemdpreset_DATA) $(systemdunit_DATA)
+ 
+diff --git a/etc/systemd/system/zfs-scrub-mont...@.timer.in 
b/etc/systemd/system/zfs-scrub-mont...@.timer.in
+new file mode 100644
+index 0..903068468
+--- /dev/null
 b/etc/systemd/system/zfs-scrub-mont...@.timer.in
+@@ -0,0 +1,12 @@
++[Unit]
++Description=Monthly 

[gentoo-commits] repo/gentoo:master commit in: sys-fs/zfs/, sys-fs/zfs/files/

2021-12-15 Thread Georgy Yakovlev
commit: 52257c6d64aa3817575311016151e29ca46be0b9
Author: Georgy Yakovlev  gentoo  org>
AuthorDate: Thu Dec 16 02:29:05 2021 +
Commit: Georgy Yakovlev  gentoo  org>
CommitDate: Thu Dec 16 02:51:03 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=52257c6d

sys-fs/zfs: add 2.1.2

Bug: https://bugs.gentoo.org/815817
Closes: https://bugs.gentoo.org/820278
Signed-off-by: Georgy Yakovlev  gentoo.org>

 sys-fs/zfs/Manifest|   2 +
 sys-fs/zfs/files/2.1.2-openrc-vendor.patch |  42 
 sys-fs/zfs/files/2.1.2-scrub-timers.patch  | 147 ++
 sys-fs/zfs/zfs-2.1.2.ebuild| 303 +
 4 files changed, 494 insertions(+)

diff --git a/sys-fs/zfs/Manifest b/sys-fs/zfs/Manifest
index 2901db693d59..e5cc220e8b89 100644
--- a/sys-fs/zfs/Manifest
+++ b/sys-fs/zfs/Manifest
@@ -3,3 +3,5 @@ DIST zfs-2.0.6.tar.gz 13192941 BLAKE2B 
3a83303b016ec4259c286af8a9ceb281829d26508
 DIST zfs-2.0.6.tar.gz.asc 836 BLAKE2B 
065eba3361ef4234acc67df0236ab9a6737ba9fe5a706be98b55dd64d10360160ca787d8873f27451a2107225ae657dc4cab20a7c2a268cd2de64c8d82d0327a
 SHA512 
123569ecfcee22ac462160acf61b120144c774bc5c0d46a50d2b7312f7565da1a9d780e1a6207dba5834917c66d5b852763e4a3162378d5c9bb90b0dfde35c5c
 DIST zfs-2.1.1.tar.gz 34836374 BLAKE2B 
09ee6bd30e8266342bd975454086049c3fd9142e7dacfe52166575c20e3c92688f9b457d75b2a2068fc281e65f78e1d47450545504cdf8bc31e23663545d7800
 SHA512 
b69ce764a9f7438ec2c90f86be02abfd684c67cd38de876374e3e6f4b2f82a75d86fa70205def2ba454ad27e52ec8d955ebc4ba456e91d397129a54ea849c19c
 DIST zfs-2.1.1.tar.gz.asc 195 BLAKE2B 
d886e7dc74270228f98dfc5ca85bbbe897d5a87a5ae8bbfde28e2af1b36218227bc9f1b5902e97beebe160a298857d6e4673829d87cd8039332dc1858cfcffc0
 SHA512 
d76956b5c1bd547a319e70dd33d50beae39f65fca54532731426d2ef209385a556c51b3936051f75bc3800623c42da5b8d279c51f501a896f5fdfb7b4ed7fb94
+DIST zfs-2.1.2.tar.gz 34829045 BLAKE2B 
ab4e2d85200438373c7eeeaa5256a712dbfb2862b85de1fb7554ad0cc2b9f8e1255ab4564bca62f65a81a823adb8c112957e6e8771b8e5e6944c3731bc894584
 SHA512 
3e3932259da2a27f1c4cca8da62b909edc43bf51ab0229d2d5d0234d9a7eaa7b63b67c06a98cbe2d29ba1eb5cbcaab16e5062c2a2bc8e84cab770be10ebf2102
+DIST zfs-2.1.2.tar.gz.asc 836 BLAKE2B 
8f5666f5c3d7016a4d79191f42d0a220fe8c654a0d64e3da3b575644fe52c83dcb9f9ef49ba0553771a127bba44e2802f1d366a7a38f670e73612deef76755c3
 SHA512 
da6bfccd19a249a6891f5e1de6c4b332e98ce4f125f638c046b9cedac3fd79c56a99dd9a620105a40741e5f04b382f5d5996b56cbe576fb268b31e57e0fed6eb

diff --git a/sys-fs/zfs/files/2.1.2-openrc-vendor.patch 
b/sys-fs/zfs/files/2.1.2-openrc-vendor.patch
new file mode 100644
index ..abe222aa5b84
--- /dev/null
+++ b/sys-fs/zfs/files/2.1.2-openrc-vendor.patch
@@ -0,0 +1,42 @@
+From 6ef28c526ba7199a3740407d764b6505618ca8ba Mon Sep 17 00:00:00 2001
+From: Peter Levine 
+Date: Fri, 29 Oct 2021 18:34:37 -0400
+Subject: [PATCH] Set DEFAULT_INIT_SHELL to /sbin/openrc-run for Gentoo and
+ Alpine
+
+Gentoo and Alpine always set the rc init scripts' shebang to
+#!/sbin/openrc-run, whether or not openrc is installed.
+
+Reviewed-by: Brian Behlendorf 
+Signed-off-by: Peter Levine 
+Closes #12683
+Closes #12692
+---
+ config/zfs-build.m4 | 14 +-
+ 1 file changed, 5 insertions(+), 9 deletions(-)
+
+diff --git a/config/zfs-build.m4 b/config/zfs-build.m4
+index 27041c054c2..ec4a2026bf5 100644
+--- a/config/zfs-build.m4
 b/config/zfs-build.m4
+@@ -564,15 +564,11 @@ AC_DEFUN([ZFS_AC_DEFAULT_PACKAGE], [
+   *)  DEFAULT_INIT_SCRIPT=lsb;;
+   esac
+ 
+-  # On gentoo, it's possible that OpenRC isn't installed.  Check if
+-  # /sbin/openrc-run exists, and if not, fall back to generic defaults.
+-
+-  DEFAULT_INIT_SHELL="/bin/sh"
+-  AS_IF([test "$DEFAULT_INIT_SCRIPT" = "openrc"], [
+-  AS_IF([test -x "/sbin/openrc-run"],
+-  [DEFAULT_INIT_SHELL="/sbin/openrc-run"],
+-  [DEFAULT_INIT_SCRIPT=lsb])
+-  ])
++  case "$VENDOR" in
++  gentoo) DEFAULT_INIT_SHELL="/sbin/openrc-run";;
++  alpine) DEFAULT_INIT_SHELL="/sbin/openrc-run";;
++  *)  DEFAULT_INIT_SHELL="/bin/sh" ;;
++  esac
+ 
+   AC_MSG_RESULT([$DEFAULT_INIT_SCRIPT:$DEFAULT_INIT_SHELL])
+   AC_SUBST(DEFAULT_INIT_SCRIPT)

diff --git a/sys-fs/zfs/files/2.1.2-scrub-timers.patch 
b/sys-fs/zfs/files/2.1.2-scrub-timers.patch
new file mode 100644
index ..58d1c3b6968d
--- /dev/null
+++ b/sys-fs/zfs/files/2.1.2-scrub-timers.patch
@@ -0,0 +1,147 @@
+From 2c9844d159024d4c742d24639a218213fb53d537 Mon Sep 17 00:00:00 2001
+From: Georgy Yakovlev 
+Date: Sat, 22 May 2021 22:27:39 -0700
+Subject: [PATCH 1/2] systemd: add weekly and monthly scrub timers
+
+timers can be enabled as follows:
+
+systemctl enable zfs-scrub-weekly@rpool.timer --now
+systemctl enable zfs-scrub-monthly@datapool.timer --now
+
+Each timer will pull in zfs-scrub@${poolname}.service, which is not

[gentoo-commits] repo/gentoo:master commit in: sys-fs/zfs/, sys-fs/zfs/files/

2021-11-07 Thread Georgy Yakovlev
commit: 7c97da7804003db7be32a3c696f930caba24
Author: Georgy Yakovlev  gentoo  org>
AuthorDate: Sun Nov  7 23:01:06 2021 +
Commit: Georgy Yakovlev  gentoo  org>
CommitDate: Sun Nov  7 23:57:40 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7c97da78

sys-fs/zfs: revbump 2.1.1, add patch and dist-kernel version limit

We don't really need patch in userspace package, but
patch also installs tests for test-suite and what's why we include it.

also remove coreutils blocker

Bug: https://bugs.gentoo.org/815469
Signed-off-by: Georgy Yakovlev  gentoo.org>

 sys-fs/zfs/files/2.1.1-fix-lseek-mmap.patch | 594 
 sys-fs/zfs/zfs-2.1.1-r3.ebuild  | 298 ++
 2 files changed, 892 insertions(+)

diff --git a/sys-fs/zfs/files/2.1.1-fix-lseek-mmap.patch 
b/sys-fs/zfs/files/2.1.1-fix-lseek-mmap.patch
new file mode 100644
index 000..2c3a66a97bf
--- /dev/null
+++ b/sys-fs/zfs/files/2.1.1-fix-lseek-mmap.patch
@@ -0,0 +1,594 @@
+From de198f2d9507b6dcf3d0d8f037ba33940208733e Mon Sep 17 00:00:00 2001
+From: Brian Behlendorf 
+Date: Sun, 7 Nov 2021 13:27:44 -0800
+Subject: [PATCH] Fix lseek(SEEK_DATA/SEEK_HOLE) mmap consistency
+
+When using lseek(2) to report data/holes memory mapped regions of
+the file were ignored.  This could result in incorrect results.
+To handle this zfs_holey_common() was updated to asynchronously
+writeback any dirty mmap(2) regions prior to reporting holes.
+
+Additionally, while not strictly required, the dn_struct_rwlock is
+now held over the dirty check to prevent the dnode structure from
+changing.  This ensures that a clean dnode can't be dirtied before
+the data/hole is located.  The range lock is now also taken to
+ensure the call cannot race with zfs_write().
+
+Furthermore, the code was refactored to provide a dnode_is_dirty()
+helper function which checks the dnode for any dirty records to
+determine its dirtiness.
+
+Reviewed-by: Matthew Ahrens 
+Reviewed-by: Tony Hutter 
+Reviewed-by: Rich Ercolani 
+Signed-off-by: Brian Behlendorf 
+Issue #11900
+Closes #12724
+---
+ configure.ac  |   1 +
+ include/os/freebsd/spl/sys/vnode.h|  18 +++
+ include/os/freebsd/zfs/sys/zfs_znode_impl.h   |   3 +-
+ include/os/linux/zfs/sys/zfs_znode_impl.h |   1 +
+ include/sys/dnode.h   |   1 +
+ man/man4/zfs.4|   2 +-
+ module/zfs/dmu.c  |  53 ---
+ module/zfs/dnode.c|  20 +++
+ module/zfs/zfs_vnops.c|   9 +-
+ tests/runfiles/common.run |   2 +-
+ tests/zfs-tests/cmd/Makefile.am   |   1 +
+ tests/zfs-tests/cmd/mmap_seek/.gitignore  |   1 +
+ tests/zfs-tests/cmd/mmap_seek/Makefile.am |   6 +
+ tests/zfs-tests/cmd/mmap_seek/mmap_seek.c | 147 ++
+ tests/zfs-tests/include/commands.cfg  |   1 +
+ tests/zfs-tests/include/tunables.cfg  |   1 +
+ .../tests/functional/mmap/Makefile.am |   3 +-
+ .../functional/mmap/mmap_seek_001_pos.ksh |  67 
+ 18 files changed, 305 insertions(+), 32 deletions(-)
+ create mode 100644 tests/zfs-tests/cmd/mmap_seek/.gitignore
+ create mode 100644 tests/zfs-tests/cmd/mmap_seek/Makefile.am
+ create mode 100644 tests/zfs-tests/cmd/mmap_seek/mmap_seek.c
+ create mode 100755 tests/zfs-tests/tests/functional/mmap/mmap_seek_001_pos.ksh
+
+diff --git a/configure.ac b/configure.ac
+index 6f34b210d2b..ebc7b276a64 100644
+--- a/configure.ac
 b/configure.ac
+@@ -221,6 +221,7 @@ AC_CONFIG_FILES([
+   tests/zfs-tests/cmd/mktree/Makefile
+   tests/zfs-tests/cmd/mmap_exec/Makefile
+   tests/zfs-tests/cmd/mmap_libaio/Makefile
++  tests/zfs-tests/cmd/mmap_seek/Makefile
+   tests/zfs-tests/cmd/mmapwrite/Makefile
+   tests/zfs-tests/cmd/nvlist_to_lua/Makefile
+   tests/zfs-tests/cmd/randfree_file/Makefile
+diff --git a/include/os/freebsd/spl/sys/vnode.h 
b/include/os/freebsd/spl/sys/vnode.h
+index 3670712a045..3bc8a18eeb7 100644
+--- a/include/os/freebsd/spl/sys/vnode.h
 b/include/os/freebsd/spl/sys/vnode.h
+@@ -59,6 +59,8 @@ enum symfollow { NO_FOLLOW = NOFOLLOW };
+ #include 
+ #include 
+ #include 
++#include 
++#include 
+ 
+ typedef   struct vop_vector   vnodeops_t;
+ #define   VOP_FID VOP_VPTOFH
+@@ -83,6 +85,22 @@ vn_is_readonly(vnode_t *vp)
+ #define   vn_has_cached_data(vp)  \
+   ((vp)->v_object != NULL && \
+   (vp)->v_object->resident_page_count > 0)
++
++static __inline void
++vn_flush_cached_data(vnode_t *vp, boolean_t sync)
++{
++#if __FreeBSD_version > 1300054
++  if (vm_object_mightbedirty(vp->v_object)) {
++#else
++  if (vp->v_object->flags & OBJ_MIGHTBEDIRTY) {
++#endif
++  int flags = sync ? OBJPC_SYNC : 0;
++  zfs_vmobject_wlock(vp->v_object);
++  vm_object_page_clean(vp->v_object, 0, 0, flags);

[gentoo-commits] repo/gentoo:master commit in: sys-fs/zfs/, sys-fs/zfs/files/

2021-06-03 Thread Georgy Yakovlev
commit: 4826c2e6f797cfeab33aad2542d402916653fd91
Author: Georgy Yakovlev  gentoo  org>
AuthorDate: Fri Jun  4 02:12:24 2021 +
Commit: Georgy Yakovlev  gentoo  org>
CommitDate: Fri Jun  4 02:12:24 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4826c2e6

sys-fs/zfs: revbump 2.0.4, add scrub timers

to use with systemd
Pr: https://github.com/openzfs/zfs/pull/12193
Signed-off-by: Georgy Yakovlev  gentoo.org>

 sys-fs/zfs/files/2.0.4-scrub-timers.patch |  97 +
 sys-fs/zfs/zfs-2.0.4-r1.ebuild| 230 ++
 2 files changed, 327 insertions(+)

diff --git a/sys-fs/zfs/files/2.0.4-scrub-timers.patch 
b/sys-fs/zfs/files/2.0.4-scrub-timers.patch
new file mode 100644
index 000..6aae1e4de59
--- /dev/null
+++ b/sys-fs/zfs/files/2.0.4-scrub-timers.patch
@@ -0,0 +1,97 @@
+From e23d7e03637e377591a480d87630b746cdaa377f Mon Sep 17 00:00:00 2001
+From: Georgy Yakovlev 
+Date: Sat, 22 May 2021 22:27:39 -0700
+Subject: [PATCH] systemd: add weekly and monthly scrub timers
+
+timers can be enabled as follows:
+
+systemctl enable zfs-scrub-weekly@rpool.timer --now
+systemctl enable zfs-scrub-monthly@datapool.timer --now
+
+Each timer will pull in zfs-scrub@${poolname}.service, which is not
+schedule-specific.
+
+Signed-off-by: Georgy Yakovlev 
+---
+ etc/systemd/system/Makefile.am |  5 -
+ etc/systemd/system/zfs-scrub-mont...@.timer.in | 12 
+ etc/systemd/system/zfs-scrub-wee...@.timer.in  | 12 
+ etc/systemd/system/zfs-sc...@.service.in   | 12 
+ 4 files changed, 40 insertions(+), 1 deletion(-)
+ create mode 100644 etc/systemd/system/zfs-scrub-mont...@.timer.in
+ create mode 100644 etc/systemd/system/zfs-scrub-wee...@.timer.in
+ create mode 100644 etc/systemd/system/zfs-sc...@.service.in
+
+diff --git a/etc/systemd/system/Makefile.am b/etc/systemd/system/Makefile.am
+index c374a52ac..5e65e1db4 100644
+--- a/etc/systemd/system/Makefile.am
 b/etc/systemd/system/Makefile.am
+@@ -12,7 +12,10 @@ systemdunit_DATA = \
+   zfs-volume-wait.service \
+   zfs-import.target \
+   zfs-volumes.target \
+-  zfs.target
++  zfs.target \
++  zfs-scrub-monthly@.timer \
++  zfs-scrub-weekly@.timer \
++  zfs-scrub@.service
+ 
+ SUBSTFILES += $(systemdpreset_DATA) $(systemdunit_DATA)
+ 
+diff --git a/etc/systemd/system/zfs-scrub-mont...@.timer.in 
b/etc/systemd/system/zfs-scrub-mont...@.timer.in
+new file mode 100644
+index 0..4c585f45f
+--- /dev/null
 b/etc/systemd/system/zfs-scrub-mont...@.timer.in
+@@ -0,0 +1,12 @@
++[Unit]
++Description=Monthly zpool scrub timer for %i
++Documentation=man:zpool-scrub(8)
++
++[Timer]
++OnCalendar=monthly
++AccuracySec=1h
++Persistent=true
++Unit=zfs-scrub@%i.service
++
++[Install]
++WantedBy=timers.target
+diff --git a/etc/systemd/system/zfs-scrub-wee...@.timer.in 
b/etc/systemd/system/zfs-scrub-wee...@.timer.in
+new file mode 100644
+index 0..b2454be2c
+--- /dev/null
 b/etc/systemd/system/zfs-scrub-wee...@.timer.in
+@@ -0,0 +1,12 @@
++[Unit]
++Description=Weekly zpool scrub timer for %i
++Documentation=man:zpool-scrub(8)
++
++[Timer]
++OnCalendar=weekly
++AccuracySec=1h
++Persistent=true
++Unit=zfs-scrub@%i.service
++
++[Install]
++WantedBy=timers.target
+diff --git a/etc/systemd/system/zfs-sc...@.service.in 
b/etc/systemd/system/zfs-sc...@.service.in
+new file mode 100644
+index 0..720901165
+--- /dev/null
 b/etc/systemd/system/zfs-sc...@.service.in
+@@ -0,0 +1,12 @@
++[Unit]
++Description=zpool scrub on %i
++Documentation=man:zpool-scrub(8)
++Requires=zfs.target
++After=zfs.target
++ConditionPathIsDirectory=/sys/module/zfs
++
++[Service]
++Nice=19
++IOSchedulingClass=idle
++KillSignal=SIGINT
++ExecStart=@sbindir@/zpool scrub %i
+-- 
+2.31.1
+

diff --git a/sys-fs/zfs/zfs-2.0.4-r1.ebuild b/sys-fs/zfs/zfs-2.0.4-r1.ebuild
new file mode 100644
index 000..e22f834e451
--- /dev/null
+++ b/sys-fs/zfs/zfs-2.0.4-r1.ebuild
@@ -0,0 +1,230 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DISTUTILS_OPTIONAL=1
+DISTUTILS_USE_SETUPTOOLS=manual
+PYTHON_COMPAT=( python3_{7,8,9} )
+
+inherit autotools bash-completion-r1 distutils-r1 flag-o-matic linux-info pam 
systemd toolchain-funcs udev usr-ldscript
+
+DESCRIPTION="Userland utilities for ZFS Linux kernel module"
+HOMEPAGE="https://github.com/openzfs/zfs;
+
+if [[ ${PV} == "" ]] ; then
+   inherit git-r3 linux-mod
+   EGIT_REPO_URI="https://github.com/openzfs/zfs.git;
+else
+   MY_P="${P/_rc/-rc}"
+   
SRC_URI="https://github.com/openzfs/${PN}/releases/download/${MY_P}/${MY_P}.tar.gz;
+   KEYWORDS="~amd64 ~arm64 ~ppc64"
+   S="${WORKDIR}/${P%_rc?}"
+fi
+
+LICENSE="BSD-2 CDDL MIT"
+# just libzfs soname major for now.
+# possible candidates: libuutil, libzpool, libnvpair. Those do not provide 
stable abi, but are considered.
+SLOT="0/4"

[gentoo-commits] repo/gentoo:master commit in: sys-fs/zfs/, sys-fs/zfs/files/

2020-11-03 Thread Georgy Yakovlev
commit: acbeee5df18e31c9dafab27ff6afaf62ae64071c
Author: Georgy Yakovlev  gentoo  org>
AuthorDate: Tue Nov  3 19:57:35 2020 +
Commit: Georgy Yakovlev  gentoo  org>
CommitDate: Tue Nov  3 20:04:10 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=acbeee5d

sys-fs/zfs: drop 0.8.4

Package-Manager: Portage-3.0.9, Repoman-3.0.2
Signed-off-by: Georgy Yakovlev  gentoo.org>

 sys-fs/zfs/Manifest  |   1 -
 sys-fs/zfs/files/0.8.4-initconfdir.patch |  35 -
 sys-fs/zfs/zfs-0.8.4-r2.ebuild   | 223 ---
 3 files changed, 259 deletions(-)

diff --git a/sys-fs/zfs/Manifest b/sys-fs/zfs/Manifest
index 128c485727a..103e10fa8d8 100644
--- a/sys-fs/zfs/Manifest
+++ b/sys-fs/zfs/Manifest
@@ -1,3 +1,2 @@
-DIST zfs-0.8.4.tar.gz 9285838 BLAKE2B 
776bcd6dfab8825c07d315085e288b29bf543d6957325d5d566b7b78c04505dde9bd25eb6684cb4a1b6a657de8a4e1290d04d2b9079d26d6b834a70f1ec3b569
 SHA512 
9086dc6a6262dd93ca6ec43f1b4c2e5c804deba708c8a7460b8531aa4802b0bf8cac0917a1a00e6af2e96d4a21cd68b85e226bf571bd94041d0325c457106eb1
 DIST zfs-0.8.5.tar.gz 9196381 BLAKE2B 
8376f360369c4657ff1fc040fb2bba780bbd5d6a98d149d2fa4ba39478588e213dbf6db218c7bd970839f015a69ae00ac951b90afc1c26b34aadf666b2976cab
 SHA512 
3e6e70b76f7cc5b018adb78ce7c3009f88faf5b3da0a03170b03577cd84a2937b6056621c41fc819fd08bf59b28053caf8fec375cf375816a6786bb5646ed773
 DIST zfs-2.0.0-rc4.tar.gz 12861762 BLAKE2B 
638eb426955de38efbbb390cb02642298dd73caa5d9c9e28d8aea89bb40967c251bbbe66fbd38e08c922fb1c6fa935c959572abf237ea57ee7d9a5982693e275
 SHA512 
3972b92c7c0e92416fcde1fa01e7d1c20046de2e21d83a6694d0dc8753f13009b38f0f656202364da85b798886feffd06292b5fd5d23b0b3afc4f81fd86a540b

diff --git a/sys-fs/zfs/files/0.8.4-initconfdir.patch 
b/sys-fs/zfs/files/0.8.4-initconfdir.patch
deleted file mode 100644
index aac40896f39..000
--- a/sys-fs/zfs/files/0.8.4-initconfdir.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 5dbe98184278878746a5f548fead1d2ef1e98dbe Mon Sep 17 00:00:00 2001
-From: Georgy Yakovlev 
-Date: Tue, 26 May 2020 16:44:54 -0700
-Subject: [PATCH] 0.8.4 initconfdir
-
-fix for https://github.com/openzfs/zfs/issues/10375
-

- etc/zfs/Makefile.am | 1 +
- etc/zfs/Makefile.in | 9 +
- 2 files changed, 6 insertions(+), 4 deletions(-)
-
-diff --git a/etc/zfs/Makefile.am b/openzfs/etc/zfs/Makefile.am
-index 81567a4..5370f41 100644
 a/etc/zfs/Makefile.am
-+++ b/etc/zfs/Makefile.am
-@@ -1,4 +1,5 @@
- pkgsysconfdir = $(sysconfdir)/zfs
-+initconfdir = $(DEFAULT_INITCONF_DIR)
- 
- pkgsysconf_DATA = \
-   vdev_id.conf.alias.example \
-diff --git a/etc/zfs/Makefile.in b/etc/zfs/Makefile.in
-index fb02811..795d3b1 100644
-@@ -571,6 +571,7 @@ udevdir = @udevdir@
- udevruledir = @udevruledir@
- zfsexecdir = @zfsexecdir@
- pkgsysconfdir = $(sysconfdir)/zfs
-+initconfdir = $(DEFAULT_INITCONF_DIR)
- pkgsysconf_DATA = \
-   vdev_id.conf.alias.example \
-   vdev_id.conf.sas_direct.example \
--- 
-2.26.2
-

diff --git a/sys-fs/zfs/zfs-0.8.4-r2.ebuild b/sys-fs/zfs/zfs-0.8.4-r2.ebuild
deleted file mode 100644
index 3bcbb4af433..000
--- a/sys-fs/zfs/zfs-0.8.4-r2.ebuild
+++ /dev/null
@@ -1,223 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-DISTUTILS_OPTIONAL=1
-PYTHON_COMPAT=( python3_{6,7,8} )
-
-inherit autotools bash-completion-r1 flag-o-matic linux-info distutils-r1 
systemd toolchain-funcs udev usr-ldscript
-
-DESCRIPTION="Userland utilities for ZFS Linux kernel module"
-HOMEPAGE="https://github.com/openzfs/zfs;
-
-if [[ ${PV} == "" ]] ; then
-   inherit git-r3 linux-mod
-   EGIT_REPO_URI="https://github.com/openzfs/zfs.git;
-else
-   
SRC_URI="https://github.com/openzfs/${PN}/releases/download/${P}/${P}.tar.gz;
-   KEYWORDS="amd64 arm64 ppc64"
-fi
-
-LICENSE="BSD-2 CDDL MIT"
-SLOT="0"
-IUSE="custom-cflags debug kernel-builtin libressl minimal nls python +rootfs 
test-suite static-libs"
-
-DEPEND="
-   net-libs/libtirpc[static-libs?]
-   sys-apps/util-linux[static-libs?]
-   sys-libs/zlib[static-libs(+)?]
-   virtual/awk
-   virtual/libudev[static-libs(-)?]
-   libressl? ( dev-libs/libressl:0=[static-libs?] )
-   !libressl? ( dev-libs/openssl:0=[static-libs?] )
-   !minimal? ( ${PYTHON_DEPS} )
-   python? (
-   virtual/python-cffi[${PYTHON_USEDEP}]
-   )
-"
-
-BDEPEND="virtual/awk
-   virtual/pkgconfig
-   nls? ( sys-devel/gettext )
-   python? (
-   dev-python/setuptools[${PYTHON_USEDEP}]
-   )
-"
-
-RDEPEND="${DEPEND}
-   !kernel-builtin? ( ~sys-fs/zfs-kmod-${PV} )
-   !prefix? ( virtual/udev )
-   sys-fs/udev-init-scripts
-   rootfs? (
-   app-arch/cpio
-   app-misc/pax-utils
-   !"
-   eerror "Block devices --->"
-   eerror "[X] Loopback device 

[gentoo-commits] repo/gentoo:master commit in: sys-fs/zfs/, sys-fs/zfs/files/

2020-09-25 Thread Georgy Yakovlev
commit: c10c708ba999cd9aa08aae373d4103522ad7d358
Author: Georgy Yakovlev  gentoo  org>
AuthorDate: Fri Sep 25 20:24:26 2020 +
Commit: Georgy Yakovlev  gentoo  org>
CommitDate: Fri Sep 25 20:28:20 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c10c708b

sys-fs/zfs: add exports.d patch

Closes: https://bugs.gentoo.org/742503
Package-Manager: Portage-3.0.8, Repoman-3.0.1
Signed-off-by: Georgy Yakovlev  gentoo.org>

 .../files/2.0.0_rc2-exports-d-permissions.patch| 189 +
 ...fs-2.0.0_rc2.ebuild => zfs-2.0.0_rc2-r1.ebuild} |   5 +-
 2 files changed, 193 insertions(+), 1 deletion(-)

diff --git a/sys-fs/zfs/files/2.0.0_rc2-exports-d-permissions.patch 
b/sys-fs/zfs/files/2.0.0_rc2-exports-d-permissions.patch
new file mode 100644
index 000..4acaf465a7b
--- /dev/null
+++ b/sys-fs/zfs/files/2.0.0_rc2-exports-d-permissions.patch
@@ -0,0 +1,189 @@
+From fe413a4d901a243d98cfef16ea330f7114a104ea Mon Sep 17 00:00:00 2001
+From: George Wilson 
+Date: Tue, 15 Sep 2020 22:57:16 -0400
+Subject: [PATCH] zpool command complains about /etc/exports.d
+
+If the /etc/exports.d directory does not exist, then we should only
+create it when we're performing an action which already requires root
+privileges.
+
+This commit moves the directory creation to the enable/disable code
+path which ensures that we have the appropriate privileges.
+
+Signed-off-by: George Wilson 
+Closes #10785
+---
+ lib/libshare/os/freebsd/nfs.c | 36 +++---
+ lib/libshare/os/linux/nfs.c   | 71 ---
+ 2 files changed, 64 insertions(+), 43 deletions(-)
+
+diff --git a/lib/libshare/os/freebsd/nfs.c b/lib/libshare/os/freebsd/nfs.c
+index 65f3b11bf9b..5951b9eafa2 100644
+--- a/lib/libshare/os/freebsd/nfs.c
 b/lib/libshare/os/freebsd/nfs.c
+@@ -228,21 +228,33 @@ nfs_copy_entries(char *filename, const char *mountpoint)
+   int error = SA_OK;
+   char *line;
+ 
+-  /*
+-   * If the file doesn't exist then there is nothing more
+-   * we need to do.
+-   */
+   FILE *oldfp = fopen(ZFS_EXPORTS_FILE, "r");
+-  if (oldfp == NULL)
+-  return (SA_OK);
+-
+   FILE *newfp = fopen(filename, "w+");
++  if (newfp == NULL) {
++  fprintf(stderr, "failed to open %s file: %s", filename,
++  strerror(errno));
++  fclose(oldfp);
++  return (SA_SYSTEM_ERR);
++  }
+   fputs(FILE_HEADER, newfp);
+-  while ((line = zgetline(oldfp, mountpoint)) != NULL)
+-  fprintf(newfp, "%s\n", line);
+-  if (ferror(oldfp) != 0) {
+-  error = ferror(oldfp);
++
++  /*
++   * The ZFS_EXPORTS_FILE may not exist yet. If that's the
++   * case then just write out the new file.
++   */
++  if (oldfp != NULL) {
++  while ((line = zgetline(oldfp, mountpoint)) != NULL)
++  fprintf(newfp, "%s\n", line);
++  if (ferror(oldfp) != 0) {
++  error = ferror(oldfp);
++  }
++  if (fclose(oldfp) != 0) {
++  fprintf(stderr, "Unable to close file %s: %s\n",
++  filename, strerror(errno));
++  error = error != 0 ? error : SA_SYSTEM_ERR;
++  }
+   }
++
+   if (error == 0 && ferror(newfp) != 0) {
+   error = ferror(newfp);
+   }
+@@ -252,8 +264,6 @@ nfs_copy_entries(char *filename, const char *mountpoint)
+   filename, strerror(errno));
+   error = error != 0 ? error : SA_SYSTEM_ERR;
+   }
+-  fclose(oldfp);
+-
+   return (error);
+ }
+ 
+diff --git a/lib/libshare/os/linux/nfs.c b/lib/libshare/os/linux/nfs.c
+index a6a9b33d765..1efa321b7bc 100644
+--- a/lib/libshare/os/linux/nfs.c
 b/lib/libshare/os/linux/nfs.c
+@@ -393,6 +393,14 @@ static char *
+ nfs_init_tmpfile(void)
+ {
+   char *tmpfile = NULL;
++  struct stat sb;
++
++  if (stat(ZFS_EXPORTS_DIR, ) < 0 &&
++  mkdir(ZFS_EXPORTS_DIR, 0755) < 0) {
++  fprintf(stderr, "failed to create %s: %s\n",
++  ZFS_EXPORTS_DIR, strerror(errno));
++  return (NULL);
++  }
+ 
+   if (asprintf(, "%s%s", ZFS_EXPORTS_FILE, ".") == -1) {
+   fprintf(stderr, "Unable to allocate temporary file\n");
+@@ -481,36 +489,49 @@ nfs_copy_entries(char *filename, const char *mountpoint)
+   size_t buflen = 0;
+   int error = SA_OK;
+ 
+-  /*
+-   * If the file doesn't exist then there is nothing more
+-   * we need to do.
+-   */
+   FILE *oldfp = fopen(ZFS_EXPORTS_FILE, "r");
+-  if (oldfp == NULL)
+-  return (SA_OK);
+-
+   FILE *newfp = fopen(filename, "w+");
++  if (newfp == NULL) {
++  fprintf(stderr, "failed to open %s file: %s", filename,
++  strerror(errno));
++  fclose(oldfp);
++  return 

[gentoo-commits] repo/gentoo:master commit in: sys-fs/zfs/, sys-fs/zfs/files/

2020-05-26 Thread Georgy Yakovlev
commit: 20207419457c676f156e212bf03cf27982eea494
Author: Georgy Yakovlev  gentoo  org>
AuthorDate: Tue May 26 23:56:58 2020 +
Commit: Georgy Yakovlev  gentoo  org>
CommitDate: Tue May 26 23:57:11 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=20207419

sys-fs/zfs: revbump 0.8.4, fix not loading /etc/conf.d/zfs

Upstream issue: https://github.com/openzfs/zfs/issues/10375
Upstream issue: https://github.com/openzfs/zfs/issues/10341

Bug: https://bugs.gentoo.org/647688
Package-Manager: Portage-2.3.100, Repoman-2.3.22
Signed-off-by: Georgy Yakovlev  gentoo.org>

 sys-fs/zfs/files/0.8.4-initconfdir.patch   | 35 ++
 .../zfs/{zfs-0.8.4.ebuild => zfs-0.8.4-r1.ebuild}  |  5 +++-
 2 files changed, 39 insertions(+), 1 deletion(-)

diff --git a/sys-fs/zfs/files/0.8.4-initconfdir.patch 
b/sys-fs/zfs/files/0.8.4-initconfdir.patch
new file mode 100644
index 000..aac40896f39
--- /dev/null
+++ b/sys-fs/zfs/files/0.8.4-initconfdir.patch
@@ -0,0 +1,35 @@
+From 5dbe98184278878746a5f548fead1d2ef1e98dbe Mon Sep 17 00:00:00 2001
+From: Georgy Yakovlev 
+Date: Tue, 26 May 2020 16:44:54 -0700
+Subject: [PATCH] 0.8.4 initconfdir
+
+fix for https://github.com/openzfs/zfs/issues/10375
+
+---
+ etc/zfs/Makefile.am | 1 +
+ etc/zfs/Makefile.in | 9 +
+ 2 files changed, 6 insertions(+), 4 deletions(-)
+
+diff --git a/etc/zfs/Makefile.am b/openzfs/etc/zfs/Makefile.am
+index 81567a4..5370f41 100644
+--- a/etc/zfs/Makefile.am
 b/etc/zfs/Makefile.am
+@@ -1,4 +1,5 @@
+ pkgsysconfdir = $(sysconfdir)/zfs
++initconfdir = $(DEFAULT_INITCONF_DIR)
+ 
+ pkgsysconf_DATA = \
+   vdev_id.conf.alias.example \
+diff --git a/etc/zfs/Makefile.in b/etc/zfs/Makefile.in
+index fb02811..795d3b1 100644
+@@ -571,6 +571,7 @@ udevdir = @udevdir@
+ udevruledir = @udevruledir@
+ zfsexecdir = @zfsexecdir@
+ pkgsysconfdir = $(sysconfdir)/zfs
++initconfdir = $(DEFAULT_INITCONF_DIR)
+ pkgsysconf_DATA = \
+   vdev_id.conf.alias.example \
+   vdev_id.conf.sas_direct.example \
+-- 
+2.26.2
+

diff --git a/sys-fs/zfs/zfs-0.8.4.ebuild b/sys-fs/zfs/zfs-0.8.4-r1.ebuild
similarity index 98%
rename from sys-fs/zfs/zfs-0.8.4.ebuild
rename to sys-fs/zfs/zfs-0.8.4-r1.ebuild
index c7cc180b9ea..5f7c23109c0 100644
--- a/sys-fs/zfs/zfs-0.8.4.ebuild
+++ b/sys-fs/zfs/zfs-0.8.4-r1.ebuild
@@ -68,7 +68,10 @@ REQUIRED_USE="${PYTHON_REQUIRED_USE}"
 
 RESTRICT="test"
 
-PATCHES=( "${FILESDIR}/bash-completion-sudo.patch" )
+PATCHES=( 
+   "${FILESDIR}/bash-completion-sudo.patch"
+   "${FILESDIR}/${PV}-initconfdir.patch"
+)
 
 pkg_setup() {
if use kernel_linux && use test-suite; then



[gentoo-commits] repo/gentoo:master commit in: sys-fs/zfs/, sys-fs/zfs/files/

2019-11-26 Thread Georgy Yakovlev
commit: 8c0c0208fdee299ea64250ea933c2a108a587f98
Author: Georgy Yakovlev  gentoo  org>
AuthorDate: Tue Nov 26 19:54:20 2019 +
Commit: Georgy Yakovlev  gentoo  org>
CommitDate: Tue Nov 26 20:30:39 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8c0c0208

sys-fs/zfs: revbump 0.8.2, include updated udev timeout patch

Package-Manager: Portage-2.3.79, Repoman-2.3.18
Signed-off-by: Georgy Yakovlev  gentoo.org>

 .../files/0.8.2-ZPOOL_IMPORT_UDEV_TIMEOUT_MS.patch | 61 +++---
 .../{zfs-0.8.2-r1.ebuild => zfs-0.8.2-r2.ebuild}   |  0
 2 files changed, 43 insertions(+), 18 deletions(-)

diff --git a/sys-fs/zfs/files/0.8.2-ZPOOL_IMPORT_UDEV_TIMEOUT_MS.patch 
b/sys-fs/zfs/files/0.8.2-ZPOOL_IMPORT_UDEV_TIMEOUT_MS.patch
index 6c4054ddb66..be88f7bfee8 100644
--- a/sys-fs/zfs/files/0.8.2-ZPOOL_IMPORT_UDEV_TIMEOUT_MS.patch
+++ b/sys-fs/zfs/files/0.8.2-ZPOOL_IMPORT_UDEV_TIMEOUT_MS.patch
@@ -1,6 +1,6 @@
-From d7037d2a2fd57504070eba14634b8a7ea159de32 Mon Sep 17 00:00:00 2001
+From 803884217f9b9b5fb235d7c5e78a809d271f6387 Mon Sep 17 00:00:00 2001
 From: Richard Yao 
-Date: Thu, 1 Aug 2019 15:54:30 -0400
+Date: Wed, 9 Oct 2019 12:16:12 -0700
 Subject: [PATCH] Implement ZPOOL_IMPORT_UDEV_TIMEOUT_MS
 
 Since 0.7.0, zpool import would unconditionally block on udev for 30
@@ -15,38 +15,45 @@ have their own mechanisms for blocking until device nodes 
are ready
 zpool import to block on a non-existent udev until a timeout is reached
 inside of them.
 
-Rather than trying to intelligently determine whether udev is avaliable
+Rather than trying to intelligently determine whether udev is available
 on the system to avoid unnecessarily blocking in such environments, it
 seems best to just allow the environment to override the timeout.  I
 propose that we add an environment variable called
 ZPOOL_IMPORT_UDEV_TIMEOUT_MS. Setting it to 0 would restore the 0.6.x
-behavior that was more desireable in mdev based initramfs environments.
-This allows the system userland utilities to be reused when building
+behavior that was more desirable in mdev based initramfs environments.
+This allows the system user land utilities to be reused when building
 mdev-based initramfs archives.
 
+Reviewed-by: Igor Kozhukhov 
+Reviewed-by: Jorgen Lundman 
+Reviewed-by: Brian Behlendorf 
 Reviewed-by: Georgy Yakovlev 
 Signed-off-by: Richard Yao 
+Closes #9436
 ---
- lib/libzutil/zutil_import.c | 10 +-
- 1 file changed, 9 insertions(+), 1 deletion(-)
+ lib/libzutil/os/linux/zutil_import_os.c | 11 ++-
+ man/man8/zpool.8|  6 ++
+ 2 files changed, 16 insertions(+), 1 deletion(-)
 
-diff --git a/lib/libzutil/zutil_import.c b/lib/libzutil/zutil_import.c
-index e82744383dc..8c4d8c5cb5c 100644
 a/lib/libzutil/zutil_import.c
-+++ b/lib/libzutil/zutil_import.c
-@@ -58,6 +58,7 @@
- #endif
+diff --git a/lib/libzutil/os/linux/zutil_import_os.c 
b/lib/libzutil/os/linux/zutil_import_os.c
+index 811eae397c9..e51004edc68 100644
+--- a/lib/libzutil/os/linux/zutil_import_os.c
 b/lib/libzutil/os/linux/zutil_import_os.c
+@@ -53,6 +53,7 @@
+ #include 
  #include 
  #include 
 +#include 
  #include 
  #include 
  #include 
-@@ -1653,15 +1654,22 @@ zpool_open_func(void *arg)
+@@ -181,17 +182,25 @@ zpool_open_func(void *arg)
+   if (rn->rn_labelpaths) {
+   char *path = NULL;
char *devid = NULL;
++  char *env = NULL;
rdsk_node_t *slice;
avl_index_t where;
-+  char *env;
 +  int timeout;
int error;
  
@@ -54,9 +61,10 @@ index e82744383dc..8c4d8c5cb5c 100644
return;
  
 +  env = getenv("ZPOOL_IMPORT_UDEV_TIMEOUT_MS");
-+
-+  if ((env == NULL) || sscanf(env, "%d", ) != 1)
++  if ((env == NULL) || sscanf(env, "%d", ) != 1 ||
++  timeout < 0) {
 +  timeout = DISK_LABEL_WAIT;
++  }
 +
/*
 * Allow devlinks to stabilize so all paths are available.
@@ -65,4 +73,21 @@ index e82744383dc..8c4d8c5cb5c 100644
 +  zpool_label_disk_wait(rn->rn_name, timeout);
  
if (path != NULL) {
-   slice = zfs_alloc(hdl, sizeof (rdsk_node_t));
+   slice = zutil_alloc(hdl, sizeof (rdsk_node_t));
+diff --git a/man/man8/zpool.8 b/man/man8/zpool.8
+index 467d2411d40..df30b7ca05c 100644
+--- a/man/man8/zpool.8
 b/man/man8/zpool.8
+@@ -2813,6 +2813,12 @@ Similar to the
+ option in
+ .Nm zpool import .
+ .El
++.Bl -tag -width "ZPOOL_IMPORT_UDEV_TIMEOUT_MS"
++.It Ev ZPOOL_IMPORT_UDEV_TIMEOUT_MS
++The maximum time in milliseconds that
++.Nm zpool import
++will wait for an expected device to be available.
++.El
+ .Bl -tag -width "ZPOOL_VDEV_NAME_GUID"
+ .It Ev ZPOOL_VDEV_NAME_GUID
+ Cause

diff --git a/sys-fs/zfs/zfs-0.8.2-r1.ebuild b/sys-fs/zfs/zfs-0.8.2-r2.ebuild
similarity index 100%

[gentoo-commits] repo/gentoo:master commit in: sys-fs/zfs/, sys-fs/zfs/files/

2019-09-27 Thread Georgy Yakovlev
commit: c87de1ae3f3027a29c7d1db353c5faa17442a21b
Author: Georgy Yakovlev  gentoo  org>
AuthorDate: Fri Sep 27 18:28:37 2019 +
Commit: Georgy Yakovlev  gentoo  org>
CommitDate: Fri Sep 27 19:16:19 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c87de1ae

sys-fs/zfs: bump to 0.8.2

Package-Manager: Portage-2.3.76, Repoman-2.3.17
RepoMan-Options: --ignore-arches
Signed-off-by: Georgy Yakovlev  gentoo.org>

 sys-fs/zfs/Manifest|   1 +
 .../files/0.8.2-ZPOOL_IMPORT_UDEV_TIMEOUT_MS.patch |  68 +++
 sys-fs/zfs/zfs-0.8.2.ebuild| 223 +
 3 files changed, 292 insertions(+)

diff --git a/sys-fs/zfs/Manifest b/sys-fs/zfs/Manifest
index daccededfad..1c908ae93b7 100644
--- a/sys-fs/zfs/Manifest
+++ b/sys-fs/zfs/Manifest
@@ -1,2 +1,3 @@
 DIST zfs-0.7.13.tar.gz 6614047 BLAKE2B 
c59c46287715779eb04d69333b0a417fa9865eb0d61c642b043188c4c97d4eed369f76a48327326ed1d4dd608ff95d91d20d26c80ed0b120a8fcd5f83cea638f
 SHA512 
457d8f110b68c9656194cd3738b216d5d807d680e5cfc6ed1f3cf5ebde67860476387c6b862ba3ba7f972d8945075963e6c325543ab84468e3eff5dbce68476e
 DIST zfs-0.8.1.tar.gz 8668360 BLAKE2B 
f18268656381c20af6bd18421636a1c56633c7eafaf91b1308d15508d5f4bdcfa5dfbb4e09d0302ac3de9d6a4f69718fe9c3d083ed5b3ab2a32c6fb7a1db624b
 SHA512 
1fb3957f65dbe94edaffcedb5b2694390dc14e472c11f7e63184a9ea6a774e79a43d47a2d789b7ced233fc67c76583bf7d5c1bda0692bb07929673e2a57f4667
+DIST zfs-0.8.2.tar.gz 8738111 BLAKE2B 
5c15f6664ca70f0deeb5b9e32f2bcff68f9821529e5203ff18612ce88473fee9af369354c442f3db7882d301cf17c805c9635b05bfd3460833ed8e5ff8004dd0
 SHA512 
1424b1a030b814f812b5da422100669db5b8c3ccae14c2fdd62a5e0df28e7255247fe5ca99c95a14f08c92cc1574c22dd132093e4a1dd81e38c95b10cc5e2496

diff --git a/sys-fs/zfs/files/0.8.2-ZPOOL_IMPORT_UDEV_TIMEOUT_MS.patch 
b/sys-fs/zfs/files/0.8.2-ZPOOL_IMPORT_UDEV_TIMEOUT_MS.patch
new file mode 100644
index 000..6c4054ddb66
--- /dev/null
+++ b/sys-fs/zfs/files/0.8.2-ZPOOL_IMPORT_UDEV_TIMEOUT_MS.patch
@@ -0,0 +1,68 @@
+From d7037d2a2fd57504070eba14634b8a7ea159de32 Mon Sep 17 00:00:00 2001
+From: Richard Yao 
+Date: Thu, 1 Aug 2019 15:54:30 -0400
+Subject: [PATCH] Implement ZPOOL_IMPORT_UDEV_TIMEOUT_MS
+
+Since 0.7.0, zpool import would unconditionally block on udev for 30
+seconds. This introduced a regression in initramfs environments that
+lack udev (particularly mdev based environments), yet use a zfs userland
+tools intended for the system that had been built against udev. Gentoo's
+genkernel is the main example, although custom user initramfs
+environments would be similarly impacted unless special builds of the
+ZFS userland utilities were done for them.  Such environments already
+have their own mechanisms for blocking until device nodes are ready
+(such as genkernel's scandelay parameter), so it is unnecessary for
+zpool import to block on a non-existent udev until a timeout is reached
+inside of them.
+
+Rather than trying to intelligently determine whether udev is avaliable
+on the system to avoid unnecessarily blocking in such environments, it
+seems best to just allow the environment to override the timeout.  I
+propose that we add an environment variable called
+ZPOOL_IMPORT_UDEV_TIMEOUT_MS. Setting it to 0 would restore the 0.6.x
+behavior that was more desireable in mdev based initramfs environments.
+This allows the system userland utilities to be reused when building
+mdev-based initramfs archives.
+
+Reviewed-by: Georgy Yakovlev 
+Signed-off-by: Richard Yao 
+---
+ lib/libzutil/zutil_import.c | 10 +-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/lib/libzutil/zutil_import.c b/lib/libzutil/zutil_import.c
+index e82744383dc..8c4d8c5cb5c 100644
+--- a/lib/libzutil/zutil_import.c
 b/lib/libzutil/zutil_import.c
+@@ -58,6 +58,7 @@
+ #endif
+ #include 
+ #include 
++#include 
+ #include 
+ #include 
+ #include 
+@@ -1653,15 +1654,22 @@ zpool_open_func(void *arg)
+   char *devid = NULL;
+   rdsk_node_t *slice;
+   avl_index_t where;
++  char *env;
++  int timeout;
+   int error;
+ 
+   if (label_paths(rn->rn_hdl, rn->rn_config, , ))
+   return;
+ 
++  env = getenv("ZPOOL_IMPORT_UDEV_TIMEOUT_MS");
++
++  if ((env == NULL) || sscanf(env, "%d", ) != 1)
++  timeout = DISK_LABEL_WAIT;
++
+   /*
+* Allow devlinks to stabilize so all paths are available.
+*/
+-  zpool_label_disk_wait(rn->rn_name, DISK_LABEL_WAIT);
++  zpool_label_disk_wait(rn->rn_name, timeout);
+ 
+   if (path != NULL) {
+   slice = zfs_alloc(hdl, sizeof (rdsk_node_t));

diff --git a/sys-fs/zfs/zfs-0.8.2.ebuild b/sys-fs/zfs/zfs-0.8.2.ebuild
new file mode 100644
index 000..dd0ca35654d
--- /dev/null
+++ b/sys-fs/zfs/zfs-0.8.2.ebuild
@@ -0,0 +1,223 @@
+# 

[gentoo-commits] repo/gentoo:master commit in: sys-fs/zfs/, sys-fs/zfs/files/

2019-03-30 Thread Georgy Yakovlev
commit: b0c6076e0f64f1a8a798b1f7b2b74a180f7eb5e8
Author: Georgy Yakovlev  gentoo  org>
AuthorDate: Sat Mar 23 04:52:57 2019 +
Commit: Georgy Yakovlev  gentoo  org>
CommitDate: Sun Mar 31 03:53:42 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b0c6076e

sys-fs/zfs: rework live ebuild

major rework
bump eapi to 7
add multi-python pyzfs installation behind python useflag
use provided systemd unit, since upstream systemd handling changed
use upstream bash-completion (with local patch)
fix sed->zed typo in postinst code

Closes: https://bugs.gentoo.org/548856
Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Georgy Yakovlev  gentoo.org>

 sys-fs/zfs/files/bash-completion-sudo.patch |  35 ++
 sys-fs/zfs/zfs-.ebuild  | 185 
 2 files changed, 138 insertions(+), 82 deletions(-)

diff --git a/sys-fs/zfs/files/bash-completion-sudo.patch 
b/sys-fs/zfs/files/bash-completion-sudo.patch
new file mode 100644
index 000..8ae9d25d276
--- /dev/null
+++ b/sys-fs/zfs/files/bash-completion-sudo.patch
@@ -0,0 +1,35 @@
+From 3829d0b867f6aa4bde8798147dee74a86435d12c Mon Sep 17 00:00:00 2001
+From: Georgy Yakovlev 
+Date: Fri, 22 Mar 2019 22:04:40 -0700
+Subject: [PATCH] contrib/bash_completion.d/zfs: remove sudo reference
+
+---
+ contrib/bash_completion.d/zfs | 10 +-
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/contrib/bash_completion.d/zfs b/contrib/bash_completion.d/zfs
+index 914db43c..b1aded36 100644
+--- a/contrib/bash_completion.d/zfs
 b/contrib/bash_completion.d/zfs
+@@ -21,13 +21,13 @@
+ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ # OTHER DEALINGS IN THE SOFTWARE.
+ 
+-if [[ -w /dev/zfs ]]; then
++#if [[ -w /dev/zfs ]]; then
+ __ZFS_CMD="zfs"
+ __ZPOOL_CMD="zpool"
+-else
+-__ZFS_CMD="sudo zfs"
+-__ZPOOL_CMD="sudo zpool"
+-fi
++#else
++#__ZFS_CMD="sudo zfs"
++#__ZPOOL_CMD="sudo zpool"
++#fi
+ 
+ __zfs_get_commands()
+ {
+-- 
+2.21.0
+

diff --git a/sys-fs/zfs/zfs-.ebuild b/sys-fs/zfs/zfs-.ebuild
index 0d0c1cf5b26..bde2d9e06bc 100644
--- a/sys-fs/zfs/zfs-.ebuild
+++ b/sys-fs/zfs/zfs-.ebuild
@@ -1,43 +1,61 @@
-# Copyright 1999-2018 Gentoo Authors
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI="5"
-PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
+EAPI=7
 
-if [ ${PV} == "" ] ; then
-   inherit git-r3 linux-mod
-   AUTOTOOLS_AUTORECONF="1"
-   EGIT_REPO_URI="https://github.com/zfsonlinux/${PN}.git;
-else
-   
SRC_URI="https://github.com/zfsonlinux/${PN}/releases/download/${P}/${P}.tar.gz;
-   KEYWORDS="~amd64 ~arm ~ppc ~ppc64"
-fi
+DISTUTILS_OPTIONAL=1
+PYTHON_COMPAT=( python{2_7,3_{5,6,7}} )
 
-inherit autotools-utils bash-completion-r1 flag-o-matic linux-info python-r1 
systemd toolchain-funcs udev
+inherit bash-completion-r1 flag-o-matic linux-info linux-mod distutils-r1 
systemd toolchain-funcs udev
 
 DESCRIPTION="Userland utilities for ZFS Linux kernel module"
 HOMEPAGE="https://zfsonlinux.org/;
 
+if [[ ${PV} == "" ]] ; then
+   inherit autotools git-r3
+   EGIT_REPO_URI="https://github.com/zfsonlinux/zfs.git;
+else
+   
SRC_URI="https://github.com/zfsonlinux/${PN}/releases/download/${P}/${P}.tar.gz;
+   KEYWORDS="~amd64"
+fi
+
 LICENSE="BSD-2 CDDL MIT"
 SLOT="0"
-IUSE="custom-cflags debug kernel-builtin +rootfs test-suite static-libs"
-RESTRICT="test"
+IUSE="custom-cflags debug kernel-builtin python +rootfs test-suite static-libs"
 
 COMMON_DEPEND="
+   ${PYTHON_DEPS}
net-libs/libtirpc
sys-apps/util-linux[static-libs?]
sys-libs/zlib[static-libs(+)?]
virtual/awk
+   python? (
+   virtual/python-cffi[${PYTHON_USEDEP}]
+   )
 "
-DEPEND="${COMMON_DEPEND}
+
+BDEPEND="${COMMON_DEPEND}
virtual/pkgconfig
+   python? (
+   dev-python/setuptools[${PYTHON_USEDEP}]
+   )
 "
 
 RDEPEND="${COMMON_DEPEND}
!=sys-apps/grep-2.13*
-   !kernel-builtin? ( =sys-fs/zfs-kmod-${PV}* )
+   !kernel-builtin? ( ~sys-fs/zfs-kmod-${PV} )
!sys-fs/zfs-fuse
!prefix? ( virtual/udev )
+   sys-fs/udev-init-scripts
+   rootfs? (
+   app-arch/cpio
+   app-misc/pax-utils
+   !"
eerror "Block devices --->"
-   eerror "[ ] Loopback device 
support"
+   eerror "[X] Loopback device 
support"
fi
fi
fi
fi
-
 }
 
 src_prepare() {
+   default
+
+   [[ ${PV} == "" ]] && eautoreconf
+
# Update paths
sed -e "s|/sbin/lsmod|/bin/lsmod|" \
-e "s|/usr/bin/scsi-rescan|/usr/sbin/rescan-scsi-bus|" \
-e 

[gentoo-commits] repo/gentoo:master commit in: sys-fs/zfs/, sys-fs/zfs/files/

2018-02-14 Thread Matt Thode
commit: c756381a157ee8c3de2924685791d962eeb3d341
Author: Matthew Thode  gentoo  org>
AuthorDate: Wed Feb 14 20:38:27 2018 +
Commit: Matt Thode  gentoo  org>
CommitDate: Wed Feb 14 20:39:11 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c756381a

sys-fs/zfs: make modprobe optional for systemd unit files

Package-Manager: Portage-2.3.19, Repoman-2.3.6

 sys-fs/zfs/files/zfs.service.in |  2 +-
 sys-fs/zfs/zfs-.ebuild  | 10 --
 2 files changed, 1 insertion(+), 11 deletions(-)

diff --git a/sys-fs/zfs/files/zfs.service.in b/sys-fs/zfs/files/zfs.service.in
index c390a480708..ae2eff170a7 100644
--- a/sys-fs/zfs/files/zfs.service.in
+++ b/sys-fs/zfs/files/zfs.service.in
@@ -6,7 +6,7 @@ After=systemd-udev-settle.target local-fs.target
 [Service]
 Type=oneshot
 RemainAfterExit=yes
-ExecStartPre=/sbin/modprobe zfs
+ExecStartPre=-/sbin/modprobe zfs
 ExecStartPre=/usr/bin/test -c /dev/zfs
 ExecStart=/usr/libexec/zfs-init.sh
 ExecStop=@sbindir@/zfs umount -a

diff --git a/sys-fs/zfs/zfs-.ebuild b/sys-fs/zfs/zfs-.ebuild
index 7b8d2f94a45..5cfa93fa4c5 100644
--- a/sys-fs/zfs/zfs-.ebuild
+++ b/sys-fs/zfs/zfs-.ebuild
@@ -87,12 +87,6 @@ src_prepare() {
-e "s|/sbin/parted|/usr/sbin/parted|" \
-i scripts/common.sh.in
 
-   if use kernel-builtin
-   then
-   einfo "kernel-builtin enabled, removing module loading from"
-   einfo "systemd units."
-   sed -i -e '/modprobe\ zfs/d' etc/systemd/system/*.service.in || 
die
-   fi
autotools-utils_src_prepare
 }
 
@@ -120,10 +114,6 @@ src_configure() {
sed -e "s:@sbindir@:${EPREFIX}/sbin:g" \
-e "s:@sysconfdir@:${EPREFIX}/etc:g" \
> "${T}/zfs-init.sh" || die
-   if use kernel-builtin
-   then
-   sed -i -e '/modprobe\ zfs/d' "${T}/zfs.service" || die
-   fi
 }
 
 src_install() {