Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] zfs: update to 2.0.0 [WIP]
@ 2020-11-30 23:33 ahesford
  2020-12-01  2:40 ` [PR PATCH] [Updated] " ahesford
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: ahesford @ 2020-11-30 23:33 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 424 bytes --]

There is a new pull request by ahesford against master on the void-packages repository

https://github.com/ahesford/void-packages zfs
https://github.com/void-linux/void-packages/pull/26848

zfs: update to 2.0.0 [WIP]
`pam_zfscrypt` fails to build, I'm digging around with `#include_next` directives and SPL headers. Help if you can.

A patch file from https://github.com/void-linux/void-packages/pull/26848.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-zfs-26848.patch --]
[-- Type: text/x-diff, Size: 5168 bytes --]

From 3d29c6d14f17c53bb759a4605887ddc74232a1dc Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Fri, 13 Nov 2020 21:53:09 -0500
Subject: [PATCH 1/2] zfs: update to 2.0.0.

---
 common/shlibs        | 11 ++++++-----
 srcpkgs/zfs-pam      |  1 +
 srcpkgs/zfs/template | 25 +++++++++++++++++--------
 3 files changed, 24 insertions(+), 13 deletions(-)
 create mode 120000 srcpkgs/zfs-pam

diff --git a/common/shlibs b/common/shlibs
index 186124d6b28..856c133c58b 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3912,11 +3912,12 @@ libtss2-tcti-device.so.0 tpm2-tss-2.3.1_1
 libtss2-rc.so.0 tpm2-tss-2.3.1_1
 libtss2-tcti-mssim.so.0 tpm2-tss-2.3.1_1
 libtss2-tctildr.so.0 tpm2-tss-2.3.1_1
-libzfs.so.2 zfs-0.8.2_1
-libnvpair.so.1 zfs-0.8.2_1
-libzfs_core.so.1 zfs-0.8.3_1
-libzpool.so.2 zfs-0.8.3_1
-libuutil.so.1 zfs-0.8.3_1
+libzfsbootenv.so.1 zfs-2.0.0_1
+libzfs.so.4 zfs-2.0.0_1
+libuutil.so.3 zfs-2.0.0_1
+libzpool.so.4 zfs-2.0.0_1
+libzfs_core.so.3 zfs-2.0.0_1
+libnvpair.so.3 zfs-2.0.0_1
 libgmio.so gmio-0.4.1_1
 libjsonnet.so.0 jsonnet-0.14.0_2
 libjsonnet++.so.0 jsonnet-0.14.0_2
diff --git a/srcpkgs/zfs-pam b/srcpkgs/zfs-pam
new file mode 120000
index 00000000000..eb97035e118
--- /dev/null
+++ b/srcpkgs/zfs-pam
@@ -0,0 +1 @@
+zfs
\ No newline at end of file
diff --git a/srcpkgs/zfs/template b/srcpkgs/zfs/template
index 0c8a5634e06..06269b9c783 100644
--- a/srcpkgs/zfs/template
+++ b/srcpkgs/zfs/template
@@ -1,27 +1,27 @@
 # Template file for 'zfs'
 pkgname=zfs
-version=0.8.5
+version=2.0.0
 revision=1
 build_style=gnu-configure
 configure_args="--with-config=user --with-mounthelperdir=/usr/bin
  --with-udevdir=/usr/lib/udev --with-udevruledir=/usr/lib/udev/rules.d
  --with-dracutdir=/usr/lib/dracut --with-tirpc"
 hostmakedepends="dracut libtool pkg-config python3 automake"
-makedepends="zlib-devel libuuid-devel libblkid-devel libtirpc-devel attr-devel"
+makedepends="pam-devel zlib-devel libuuid-devel libblkid-devel libtirpc-devel attr-devel"
+depends="dkms>=2.2.0.3_9 perl python3"
 conf_files="/etc/zfs/zed.d/zed.rc"
 short_desc="Z File System -- userland, pyzfs, and kernel modules (using DKMS)"
 maintainer="Toyam Cox <Vaelatern@voidlinux.org>"
 license="CDDL-1.0"
 homepage="https://zfsonlinux.org/"
-distfiles="https://github.com/zfsonlinux/zfs/releases/download/zfs-${version}/zfs-${version}.tar.gz"
-checksum=dbb41d6b9c606a34ac93f4c19069fd6806ceeacb558f834f8a70755dadb7cd3d
+distfiles="https://github.com/openzfs/zfs/releases/download/zfs-${version}/zfs-${version}.tar.gz"
+checksum=3403bf8e993f3c9d772f768142117df47bdbbb8e9bbf85a29c0e166f577f9311
 
 patch_args="-Np1"
 
 replaces="spl<=0.7.13_1" # Because SPL was merged into zfs in 0.8.0
 
 dkms_modules="zfs ${version}"
-depends="dkms>=2.2.0.3_9 perl python3 bash"
 
 post_patch() {
 	# When collecting a "clean" tree for DKMS, don't leave patches in place
@@ -35,9 +35,6 @@ pre_configure() {
 	export CFLAGS+=" -I${XBPS_CROSS_BASE}/usr/include/tirpc/"
 	autoreconf -fi
 
-	# configure relies on bashism to redirect stdout/stderr when building tests
-	vsed -e '1 s@^#!\s*/bin/sh$@#!/bin/bash@' -i  configure
-
 	tar czf ../clean.tar.gz .
 }
 
@@ -62,6 +59,9 @@ post_install() {
 	rm -rf ${DESTDIR}/etc/default
 	rm -f ${DESTDIR}/etc/zfs/zfs-functions
 
+	# Remove pam config framework file not used in Void
+	rm -f ${DESTDIR}/usr/share/pam-configs/zfs_key
+
 	# Contains ELF binaries. Remove it until upstream has a way to move this
 	# into /usr/libexec or similiar.
 	rm -rf ${DESTDIR}/usr/share/zfs/zfs-tests
@@ -78,6 +78,15 @@ zfs-devel_package() {
 	}
 }
 
+zfs-pam_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc="Z File System -- PAM integration"
+	pkg_install() {
+		vmove usr/lib/security/pam_zfs_key.so
+	}
+}
+
+
 do_clean() {
 	rm -f ../clean.tar.gz
 }

From 72f4f16549c37b192a156486da8e6ac5b713b33e Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Fri, 13 Nov 2020 21:53:46 -0500
Subject: [PATCH 2/2] pam_zfscrypt: revbump for zfs, change upstream repo

The origninal repo for pam_zfscrypt has disappeared from the Internet,
but Project Trident, the Void derivative that uses this module, now
maintains a fork.
---
 srcpkgs/pam_zfscrypt/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/pam_zfscrypt/template b/srcpkgs/pam_zfscrypt/template
index caf4617a439..a5730f10702 100644
--- a/srcpkgs/pam_zfscrypt/template
+++ b/srcpkgs/pam_zfscrypt/template
@@ -1,7 +1,7 @@
 # Template file for 'pam_zfscrypt'
 pkgname=pam_zfscrypt
 version=0.2.0
-revision=1
+revision=2
 wrksrc="zfscrypt-${version}"
 build_style=gnu-makefile
 make_use_env=yes
@@ -10,8 +10,8 @@ depends="pam"
 short_desc="Automatically decrypt and mount encrypted ZFS home directories"
 maintainer="Zach Dykstra <dykstra.zachary@gmail.com>"
 license="MIT"
-homepage="https://github.com/BenKerry/zfscrypt"
-distfiles="https://github.com/BenKerry/zfscrypt/archive/v${version}.tar.gz"
+homepage="https://github.com/project-trident/zfscrypt"
+distfiles="${homepage}/archive/v${version}.tar.gz"
 checksum=73244e7e97ab5a47a9ea4a24ac490f07bfe7c1eb0c920e03df202494ea61b650
 
 CFLAGS="-Iinclude"

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PR PATCH] [Updated] zfs: update to 2.0.0 [WIP]
  2020-11-30 23:33 [PR PATCH] zfs: update to 2.0.0 [WIP] ahesford
@ 2020-12-01  2:40 ` ahesford
  2020-12-01  2:46 ` zfs: update to 2.0.0 ahesford
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: ahesford @ 2020-12-01  2:40 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 429 bytes --]

There is an updated pull request by ahesford against master on the void-packages repository

https://github.com/ahesford/void-packages zfs
https://github.com/void-linux/void-packages/pull/26848

zfs: update to 2.0.0 [WIP]
`pam_zfscrypt` fails to build, I'm digging around with `#include_next` directives and SPL headers. Help if you can.

A patch file from https://github.com/void-linux/void-packages/pull/26848.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-zfs-26848.patch --]
[-- Type: text/x-diff, Size: 6539 bytes --]

From 21dba7c2030457d0d73e235b184c512edf44ee79 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Fri, 13 Nov 2020 21:53:09 -0500
Subject: [PATCH 1/2] zfs: update to 2.0.0.

Thanks to @zdykstra for looking into the built-in PAM module.
---
 common/shlibs        | 11 ++++++-----
 srcpkgs/zfs-pam      |  1 +
 srcpkgs/zfs/template | 33 +++++++++++++++++++++------------
 3 files changed, 28 insertions(+), 17 deletions(-)
 create mode 120000 srcpkgs/zfs-pam

diff --git a/common/shlibs b/common/shlibs
index 186124d6b28..856c133c58b 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3912,11 +3912,12 @@ libtss2-tcti-device.so.0 tpm2-tss-2.3.1_1
 libtss2-rc.so.0 tpm2-tss-2.3.1_1
 libtss2-tcti-mssim.so.0 tpm2-tss-2.3.1_1
 libtss2-tctildr.so.0 tpm2-tss-2.3.1_1
-libzfs.so.2 zfs-0.8.2_1
-libnvpair.so.1 zfs-0.8.2_1
-libzfs_core.so.1 zfs-0.8.3_1
-libzpool.so.2 zfs-0.8.3_1
-libuutil.so.1 zfs-0.8.3_1
+libzfsbootenv.so.1 zfs-2.0.0_1
+libzfs.so.4 zfs-2.0.0_1
+libuutil.so.3 zfs-2.0.0_1
+libzpool.so.4 zfs-2.0.0_1
+libzfs_core.so.3 zfs-2.0.0_1
+libnvpair.so.3 zfs-2.0.0_1
 libgmio.so gmio-0.4.1_1
 libjsonnet.so.0 jsonnet-0.14.0_2
 libjsonnet++.so.0 jsonnet-0.14.0_2
diff --git a/srcpkgs/zfs-pam b/srcpkgs/zfs-pam
new file mode 120000
index 00000000000..eb97035e118
--- /dev/null
+++ b/srcpkgs/zfs-pam
@@ -0,0 +1 @@
+zfs
\ No newline at end of file
diff --git a/srcpkgs/zfs/template b/srcpkgs/zfs/template
index 0c8a5634e06..1e9de9140a5 100644
--- a/srcpkgs/zfs/template
+++ b/srcpkgs/zfs/template
@@ -1,27 +1,27 @@
 # Template file for 'zfs'
 pkgname=zfs
-version=0.8.5
+version=2.0.0
 revision=1
 build_style=gnu-configure
 configure_args="--with-config=user --with-mounthelperdir=/usr/bin
  --with-udevdir=/usr/lib/udev --with-udevruledir=/usr/lib/udev/rules.d
  --with-dracutdir=/usr/lib/dracut --with-tirpc"
 hostmakedepends="dracut libtool pkg-config python3 automake"
-makedepends="zlib-devel libuuid-devel libblkid-devel libtirpc-devel attr-devel"
+makedepends="pam-devel zlib-devel libuuid-devel libblkid-devel libtirpc-devel attr-devel"
+depends="dkms>=2.2.0.3_9 perl python3"
 conf_files="/etc/zfs/zed.d/zed.rc"
 short_desc="Z File System -- userland, pyzfs, and kernel modules (using DKMS)"
 maintainer="Toyam Cox <Vaelatern@voidlinux.org>"
 license="CDDL-1.0"
-homepage="https://zfsonlinux.org/"
-distfiles="https://github.com/zfsonlinux/zfs/releases/download/zfs-${version}/zfs-${version}.tar.gz"
-checksum=dbb41d6b9c606a34ac93f4c19069fd6806ceeacb558f834f8a70755dadb7cd3d
+homepage="https://openzfs.github.io/openzfs-docs/"
+distfiles="https://github.com/openzfs/zfs/releases/download/zfs-${version}/zfs-${version}.tar.gz"
+checksum=3403bf8e993f3c9d772f768142117df47bdbbb8e9bbf85a29c0e166f577f9311
 
 patch_args="-Np1"
 
 replaces="spl<=0.7.13_1" # Because SPL was merged into zfs in 0.8.0
 
 dkms_modules="zfs ${version}"
-depends="dkms>=2.2.0.3_9 perl python3 bash"
 
 post_patch() {
 	# When collecting a "clean" tree for DKMS, don't leave patches in place
@@ -35,9 +35,6 @@ pre_configure() {
 	export CFLAGS+=" -I${XBPS_CROSS_BASE}/usr/include/tirpc/"
 	autoreconf -fi
 
-	# configure relies on bashism to redirect stdout/stderr when building tests
-	vsed -e '1 s@^#!\s*/bin/sh$@#!/bin/bash@' -i  configure
-
 	tar czf ../clean.tar.gz .
 }
 
@@ -51,9 +48,6 @@ post_install() {
 	vmkdir usr/src/${pkgname}-${version}
 	tar xf ../clean.tar.gz -C ${DESTDIR}/usr/src/${pkgname}-${version}
 	scripts/dkms.mkconf -v ${version} -f ${DESTDIR}/usr/src/${pkgname}-${version}/dkms.conf -n zfs
-	sed -i  -e 's/test "${PYTHON_VERSION:0:2}" = "3."/test "${PYTHON_VERSION##3.*}" = ""/' \
-		-e 's/test "${PYTHON_VERSION:0:2}" = "2."/test "${PYTHON_VERSION##2.*}" = ""/' \
-		${DESTDIR}/usr/src/${pkgname}-${version}/configure # This is necessary because of https://github.com/zfsonlinux/zfs/issues/8827
 
 	# Remove init and service control pieces not used in Void
 	rm -rf ${DESTDIR}/usr/lib/systemd
@@ -62,6 +56,12 @@ post_install() {
 	rm -rf ${DESTDIR}/etc/default
 	rm -f ${DESTDIR}/etc/zfs/zfs-functions
 
+	# Remove pam config framework file not used in Void
+	rm -f ${DESTDIR}/usr/share/pam-configs/zfs_key
+
+	# zfs-mount-generator is a systemd helper, no need for its man page
+	rm -f ${DESTDIR}/usr/share/man/man8/zfs-mount-generator.8
+
 	# Contains ELF binaries. Remove it until upstream has a way to move this
 	# into /usr/libexec or similiar.
 	rm -rf ${DESTDIR}/usr/share/zfs/zfs-tests
@@ -78,6 +78,15 @@ zfs-devel_package() {
 	}
 }
 
+zfs-pam_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc="Z File System -- PAM integration"
+	pkg_install() {
+		vmove usr/lib/security/pam_zfs_key.so
+	}
+}
+
+
 do_clean() {
 	rm -f ../clean.tar.gz
 }

From 11a13f280c4ca43fb5e2f92425a27c9bf24dfd8a Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Fri, 13 Nov 2020 21:53:46 -0500
Subject: [PATCH 2/2] pam_zfscrypt: revbump for zfs, change upstream repo

The origninal repo for pam_zfscrypt has disappeared from the Internet,
but Project Trident, the Void derivative that uses this module, now
maintains a fork.

Thanks to @ericonr for cracking the necessary CFLAGS to make this work.
---
 srcpkgs/pam_zfscrypt/template | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/pam_zfscrypt/template b/srcpkgs/pam_zfscrypt/template
index caf4617a439..ec272c357fe 100644
--- a/srcpkgs/pam_zfscrypt/template
+++ b/srcpkgs/pam_zfscrypt/template
@@ -1,24 +1,25 @@
 # Template file for 'pam_zfscrypt'
 pkgname=pam_zfscrypt
 version=0.2.0
-revision=1
+revision=2
 wrksrc="zfscrypt-${version}"
 build_style=gnu-makefile
-make_use_env=yes
 makedepends="pam-devel zfs-devel"
 depends="pam"
 short_desc="Automatically decrypt and mount encrypted ZFS home directories"
 maintainer="Zach Dykstra <dykstra.zachary@gmail.com>"
 license="MIT"
-homepage="https://github.com/BenKerry/zfscrypt"
-distfiles="https://github.com/BenKerry/zfscrypt/archive/v${version}.tar.gz"
+homepage="https://github.com/project-trident/zfscrypt"
+distfiles="${homepage}/archive/v${version}.tar.gz"
 checksum=73244e7e97ab5a47a9ea4a24ac490f07bfe7c1eb0c920e03df202494ea61b650
 
-CFLAGS="-Iinclude"
+CFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -Iinclude"
 
-pre_build() {
-	vsed -e "/ZFSINC :=/s,-isystem/usr/include,-I${XBPS_CROSS_BASE}/usr/include,g" \
-	  -i Makefile
+post_patch() {
+	if [ "${CROSS_BUILD}" ]; then
+		vsed -i Makefile \
+			-e "/ZFSINC :=/s,-isystem/usr/,-I${XBPS_CROSS_BASE}/usr/,g"
+	fi
 }
 
 do_install() {

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: zfs: update to 2.0.0
  2020-11-30 23:33 [PR PATCH] zfs: update to 2.0.0 [WIP] ahesford
  2020-12-01  2:40 ` [PR PATCH] [Updated] " ahesford
@ 2020-12-01  2:46 ` ahesford
  2020-12-01  4:44 ` zdykstra
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: ahesford @ 2020-12-01  2:46 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 516 bytes --]

New comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/26848#issuecomment-736181037

Comment:
@Vaelatern I believe this is now ready to go, thanks to @ericonr for helping me figure out the necessary cflags to get `pam_zfscrypt` to compile. Along with @zdykstra and @ericonr, I have been using the releaes candidates for awhile (including in [zbm-dev/zfsbootmenu](https://github.com/zbm-dev/zfsbootmenu)) and have suffered no ill effects, even after upgrading my pools.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: zfs: update to 2.0.0
  2020-11-30 23:33 [PR PATCH] zfs: update to 2.0.0 [WIP] ahesford
  2020-12-01  2:40 ` [PR PATCH] [Updated] " ahesford
  2020-12-01  2:46 ` zfs: update to 2.0.0 ahesford
@ 2020-12-01  4:44 ` zdykstra
  2020-12-01 21:16 ` Vaelatern
  2020-12-02  4:25 ` [PR PATCH] [Merged]: " Vaelatern
  4 siblings, 0 replies; 6+ messages in thread
From: zdykstra @ 2020-12-01  4:44 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 436 bytes --]

New comment by zdykstra on void-packages repository

https://github.com/void-linux/void-packages/pull/26848#issuecomment-736214018

Comment:
I've tested the `pam_zfscrypt` package under OpenZFS 2.0.0 locally, it works as expected. The configuration Project Trident (the primary/only? consumer) uses from https://github.com/project-trident/trident-installer/blob/master/src-sh/void-install-zfs.sh#L319 was replicated on my test laptop. 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: zfs: update to 2.0.0
  2020-11-30 23:33 [PR PATCH] zfs: update to 2.0.0 [WIP] ahesford
                   ` (2 preceding siblings ...)
  2020-12-01  4:44 ` zdykstra
@ 2020-12-01 21:16 ` Vaelatern
  2020-12-02  4:25 ` [PR PATCH] [Merged]: " Vaelatern
  4 siblings, 0 replies; 6+ messages in thread
From: Vaelatern @ 2020-12-01 21:16 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 297 bytes --]

New comment by Vaelatern on void-packages repository

https://github.com/void-linux/void-packages/pull/26848#issuecomment-736825687

Comment:
It's only been a day but it's also been stressed that this has been stress tested on other systems.

I'm going to test it on one of mine and then merge.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PR PATCH] [Merged]: zfs: update to 2.0.0
  2020-11-30 23:33 [PR PATCH] zfs: update to 2.0.0 [WIP] ahesford
                   ` (3 preceding siblings ...)
  2020-12-01 21:16 ` Vaelatern
@ 2020-12-02  4:25 ` Vaelatern
  4 siblings, 0 replies; 6+ messages in thread
From: Vaelatern @ 2020-12-02  4:25 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 269 bytes --]

There's a merged pull request on the void-packages repository

zfs: update to 2.0.0
https://github.com/void-linux/void-packages/pull/26848

Description:
`pam_zfscrypt` fails to build, I'm digging around with `#include_next` directives and SPL headers. Help if you can.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-12-02  4:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-30 23:33 [PR PATCH] zfs: update to 2.0.0 [WIP] ahesford
2020-12-01  2:40 ` [PR PATCH] [Updated] " ahesford
2020-12-01  2:46 ` zfs: update to 2.0.0 ahesford
2020-12-01  4:44 ` zdykstra
2020-12-01 21:16 ` Vaelatern
2020-12-02  4:25 ` [PR PATCH] [Merged]: " Vaelatern

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).