From: robertek <robertek@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] zfs: divide under subpackages
Date: Mon, 27 Feb 2023 15:38:01 +0100 [thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-42484@inbox.vuxu.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 2062 bytes --]
There is a new pull request by robertek against master on the void-packages repository
https://github.com/robertek/void-packages zfs
https://github.com/void-linux/void-packages/pull/42484
zfs: divide under subpackages
<!-- Uncomment relevant sections and delete options which are not applicable -->
The main intention of this PR is to separate the zfs tools from the kernel module. This change introduce several new subpackages for the `zfs` package.
Namely:
- zfs-tools
- zfs-dkms
- zfs-test
- zfs-zed
The original zfs package remain as a metapackage for the needed subpackages. This helps the transition (eg: for those having zfs installed, the system update will only introduce several new packages and will work as before). It is now possible to install purely the zfs-tools package if a non-distributed kernel is built with zfs.
I have outplaced the ztest to a new subpackage which is not as part of the zfs metapackage any more. Ztest is intended to be run only on testing systems.
I may provide additional information if needed. For example the contents of the packages, etc.
#### Testing the changes
- I tested the changes in this PR: **YES**
- Tested on native x86-64-glibc
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, (x86-64-glibc)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64 (cross)
- x86-64-musl
A patch file from https://github.com/void-linux/void-packages/pull/42484.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-zfs-42484.patch --]
[-- Type: text/x-diff, Size: 5656 bytes --]
From 0ba46483b4f4d89bb5d6e6ecded8b40a60a19056 Mon Sep 17 00:00:00 2001
From: Robert David <robert.david.public@gmail.com>
Date: Thu, 23 Feb 2023 19:35:42 +0100
Subject: [PATCH] zfs: divide under subpackages
---
srcpkgs/zfs-dkms | 1 +
srcpkgs/zfs-test | 1 +
srcpkgs/zfs-tools | 1 +
srcpkgs/zfs-zed | 1 +
srcpkgs/zfs/template | 93 ++++++++++++++++++++++++++++++++++++--------
5 files changed, 81 insertions(+), 16 deletions(-)
create mode 120000 srcpkgs/zfs-dkms
create mode 120000 srcpkgs/zfs-test
create mode 120000 srcpkgs/zfs-tools
create mode 120000 srcpkgs/zfs-zed
diff --git a/srcpkgs/zfs-dkms b/srcpkgs/zfs-dkms
new file mode 120000
index 000000000000..eb97035e1184
--- /dev/null
+++ b/srcpkgs/zfs-dkms
@@ -0,0 +1 @@
+zfs
\ No newline at end of file
diff --git a/srcpkgs/zfs-test b/srcpkgs/zfs-test
new file mode 120000
index 000000000000..eb97035e1184
--- /dev/null
+++ b/srcpkgs/zfs-test
@@ -0,0 +1 @@
+zfs
\ No newline at end of file
diff --git a/srcpkgs/zfs-tools b/srcpkgs/zfs-tools
new file mode 120000
index 000000000000..eb97035e1184
--- /dev/null
+++ b/srcpkgs/zfs-tools
@@ -0,0 +1 @@
+zfs
\ No newline at end of file
diff --git a/srcpkgs/zfs-zed b/srcpkgs/zfs-zed
new file mode 120000
index 000000000000..eb97035e1184
--- /dev/null
+++ b/srcpkgs/zfs-zed
@@ -0,0 +1 @@
+zfs
\ No newline at end of file
diff --git a/srcpkgs/zfs/template b/srcpkgs/zfs/template
index ae975caf9dd9..e1dda74134cb 100644
--- a/srcpkgs/zfs/template
+++ b/srcpkgs/zfs/template
@@ -1,27 +1,25 @@
# Template file for 'zfs'
pkgname=zfs
version=2.1.9
-revision=1
+revision=2
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="pam-devel zlib-devel libuuid-devel libblkid-devel libtirpc-devel attr-devel"
-depends="dkms>=2.2.0.3_9 perl python3 xbps-triggers>=0.121_1
- libzfs>=${version}_${revision}"
-conf_files="/etc/zfs/zed.d/zed.rc"
-short_desc="Z File System -- userland, pyzfs, and kernel modules (using DKMS)"
+makedepends="pam-devel zlib-devel libuuid-devel libblkid-devel libtirpc-devel attr-devel eudev-libudev-devel"
+short_desc="Z File System --"
maintainer="Toyam Cox <Vaelatern@voidlinux.org>"
license="CDDL-1.0"
homepage="https://openzfs.github.io/openzfs-docs/"
distfiles="https://github.com/openzfs/zfs/releases/download/zfs-${version}/zfs-${version}.tar.gz"
checksum=6b172cdf2eb54e17fcd68f900fab33c1430c5c59848fa46fab83614922fe50f6
-# dkms must be before initramfs-regenerate to build modules before images
-triggers="dkms initramfs-regenerate"
-dkms_modules="zfs ${version}"
-replaces="spl<=0.7.13_1" # Because SPL was merged into zfs in 0.8.0
+# the zfs-tools package needs to be done always the last!
+subpackages="libzfs zfs-devel zfs-dkms zfs-pam zfs-test zfs-zed zfs-tools"
+
+# SPL was merged into zfs in 0.8.0
+replaces="spl<=0.7.13_1"
if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
makedepends+=" libatomic-devel"
@@ -37,8 +35,6 @@ post_install() {
vlicense LICENSE
vlicense NOTICE
- vsv zed
-
make dist-gzip
vmkdir usr/src/
tar xf ${pkgname}-${version}.tar.gz -C ${DESTDIR}/usr/src/
@@ -61,16 +57,23 @@ post_install() {
rm -rf ${DESTDIR}/usr/share/zfs/zfs-tests
}
+zfs_package() {
+ short_desc+=" metapackage"
+ build_style=meta
+ depends="zfs-tools>=${version}_${revision} zfs-zed>=${version}_${revision}
+ libzfs>=${version}_${revision} zfs-dkms>=${version}_${revision}"
+}
+
libzfs_package() {
- short_desc="Z File System - libraries"
+ short_desc+=" libraries"
pkg_install() {
vmove "usr/lib/*.so.*"
}
}
zfs-devel_package() {
+ short_desc+=" development files"
depends="libzfs>=${version}_${revision}"
- short_desc="Z File System -- development files"
pkg_install() {
vmove usr/include
vmove "usr/lib/*.a"
@@ -79,14 +82,72 @@ zfs-devel_package() {
}
}
+zfs-dkms_package() {
+ short_desc+=" kernel module (dkms)"
+ depends="dkms>=2.2.0.3_9 xbps-triggers>=0.121_1"
+
+ # dkms must be before initramfs-regenerate to build modules before images
+ triggers="dkms initramfs-regenerate"
+ dkms_modules="zfs ${version}"
+
+ pkg_install() {
+ vmove usr/src
+ }
+}
+
zfs-pam_package() {
- depends="${sourcepkg}>=${version}_${revision}"
- short_desc="Z File System -- PAM integration"
+ short_desc+=" PAM integration"
+ depends="zfs-tools>=${version}_${revision}"
pkg_install() {
vmove usr/lib/security/pam_zfs_key.so
}
}
+zfs-test_package() {
+ short_desc+=" tests"
+ depends="zfs-tools>=${version}_${revision}"
+ pkg_install() {
+ vmove usr/bin/raidz_test
+ vmove usr/bin/ztest
+ vmove usr/share/man/man1/raidz_test.1
+ vmove usr/share/man/man1/test-runner.1
+ vmove usr/share/man/man1/ztest.1
+ vmove usr/share/zfs/runfiles
+ vmove usr/share/zfs/test-runner
+ vmove usr/share/zfs/zfs-tests.sh
+ vmove usr/share/zfs/zimport.sh
+ vmove usr/share/zfs/zloop.sh
+ }
+}
+
+zfs-tools_package() {
+ short_desc+=" userland, pyzfs"
+ depends="libzfs>=${version}_${revision} python3"
+
+ pkg_install() {
+ vmove etc/zfs
+ vmove etc/sudoers.d
+ vmove usr/bin
+ vmove usr/lib
+ vmove usr/libexec
+ vmove usr/share
+ }
+}
+
+zfs-zed_package() {
+ short_desc+=" ZED"
+ depends="zfs-tools>=${version}_${revision}"
+ conf_files="/etc/zfs/zed.d/zed.rc"
+ pkg_install() {
+ vsv zed
+
+ vmove etc/zfs/zed.d
+ vmove usr/bin/zed
+ vmove usr/libexec/zfs/zed.d
+ vmove usr/share/man/man8/zed.8
+ }
+}
+
# REMARKS:
# Did not split out pyzfs, because it's distributed with zfs, and no reason to
# send separately.
next reply other threads:[~2023-02-27 14:38 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-27 14:38 robertek [this message]
2023-02-28 13:04 ` [PR REVIEW] " ahesford
2023-02-28 13:04 ` ahesford
2023-02-28 13:04 ` ahesford
2023-02-28 13:48 ` robertek
2023-02-28 13:49 ` ahesford
2023-02-28 13:50 ` robertek
2023-02-28 13:52 ` robertek
2023-02-28 13:53 ` ahesford
2023-02-28 14:05 ` robertek
2023-02-28 14:28 ` ahesford
2023-02-28 16:43 ` [PR PATCH] [Closed]: " Vaelatern
2023-02-28 16:43 ` Vaelatern
2023-02-28 16:44 ` robertek
2023-02-28 16:45 ` robertek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-42484@inbox.vuxu.org \
--to=robertek@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).