git: a71ea7bea0d2 - main - pkgbase: Put zfs utilities and lib in their own package

From: Emmanuel Vadot <manu_at_FreeBSD.org>
Date: Wed, 26 Oct 2022 17:49:05 UTC
The branch main has been updated by manu:

URL: https://cgit.FreeBSD.org/src/commit/?id=a71ea7bea0d2a8ba86373377c3c1443acbeab5d2

commit a71ea7bea0d2a8ba86373377c3c1443acbeab5d2
Author:     Emmanuel Vadot <manu@FreeBSD.org>
AuthorDate: 2022-07-22 08:43:39 +0000
Commit:     Emmanuel Vadot <manu@FreeBSD.org>
CommitDate: 2022-10-26 17:46:30 +0000

    pkgbase: Put zfs utilities and lib in their own package
    
    It is useful to have zfs utilities and lib in a separate package as
    it allow users to create image that can support ZFS (i.e. not with
    WITHOUT_ZFS in src.conf set) without bloating the default image with
    all zfs tools (for example for jails).
    
    Differential Revision:  https://reviews.freebsd.org/D36225
---
 cddl/lib/libavl/Makefile                | 2 +-
 cddl/lib/libicp/Makefile                | 2 +-
 cddl/lib/libnvpair/Makefile             | 2 +-
 cddl/lib/libspl/Makefile                | 2 +-
 cddl/lib/libtpool/Makefile              | 2 +-
 cddl/lib/libumem/Makefile               | 2 +-
 cddl/lib/libuutil/Makefile              | 2 +-
 cddl/lib/libzfs/Makefile                | 2 +-
 cddl/lib/libzfs_core/Makefile           | 2 +-
 cddl/lib/libzfsbootenv/Makefile         | 2 +-
 cddl/lib/libzpool/Makefile              | 1 +
 cddl/lib/libzutil/Makefile              | 2 +-
 cddl/lib/pam_zfs_key/Makefile           | 2 +-
 cddl/sbin/zfs/Makefile                  | 2 +-
 cddl/sbin/zpool/Makefile                | 2 +-
 cddl/share/zfs/compatibility.d/Makefile | 2 ++
 cddl/usr.bin/zinject/Makefile           | 1 +
 cddl/usr.bin/zstream/Makefile           | 1 +
 cddl/usr.bin/ztest/Makefile             | 1 +
 cddl/usr.sbin/zdb/Makefile              | 1 +
 cddl/usr.sbin/zfsd/Makefile             | 1 +
 cddl/usr.sbin/zhack/Makefile            | 1 +
 lib/libbe/Makefile                      | 2 +-
 release/packages/Makefile.package       | 2 ++
 sbin/bectl/Makefile                     | 2 +-
 25 files changed, 27 insertions(+), 16 deletions(-)

diff --git a/cddl/lib/libavl/Makefile b/cddl/lib/libavl/Makefile
index b5e3b458f982..6a39e342bafc 100644
--- a/cddl/lib/libavl/Makefile
+++ b/cddl/lib/libavl/Makefile
@@ -2,7 +2,7 @@
 
 .PATH: ${SRCTOP}/sys/contrib/openzfs/module/avl
 
-PACKAGE=	runtime
+PACKAGE=	zfs
 LIB=	avl
 LIBADD=	spl
 SRCS=	avl.c
diff --git a/cddl/lib/libicp/Makefile b/cddl/lib/libicp/Makefile
index 58ebb292c946..4fc17916d1df 100644
--- a/cddl/lib/libicp/Makefile
+++ b/cddl/lib/libicp/Makefile
@@ -2,7 +2,7 @@
 
 .PATH: ${SRCTOP}/sys/contrib/openzfs/module/icp
 
-PACKAGE=	utilities
+PACKAGE=	zfs
 LIB=	icp
 LIBADD=
 
diff --git a/cddl/lib/libnvpair/Makefile b/cddl/lib/libnvpair/Makefile
index d436b9b1df27..8a7dd0093cf1 100644
--- a/cddl/lib/libnvpair/Makefile
+++ b/cddl/lib/libnvpair/Makefile
@@ -7,7 +7,7 @@
 LIB=	nvpair
 LIBADD=	spl
 
-PACKAGE=	runtime
+PACKAGE=	zfs
 # user
 INCS=	libnvpair.h
 SRCS=	libnvpair.c \
diff --git a/cddl/lib/libspl/Makefile b/cddl/lib/libspl/Makefile
index 6a918c59e27e..a06eef0b796c 100644
--- a/cddl/lib/libspl/Makefile
+++ b/cddl/lib/libspl/Makefile
@@ -8,7 +8,7 @@
 
 LIB=	spl
 LIBADD=
-PACKAGE=	runtime
+PACKAGE=	zfs
 
 SRCS = \
         assert.c \
diff --git a/cddl/lib/libtpool/Makefile b/cddl/lib/libtpool/Makefile
index 637385bc842e..d6a1d9fcfb7c 100644
--- a/cddl/lib/libtpool/Makefile
+++ b/cddl/lib/libtpool/Makefile
@@ -6,7 +6,7 @@
 
 LIB=	tpool
 LIBADD=	spl
-PACKAGE=	runtime
+PACKAGE=	zfs
 
 INCS=	thread_pool_impl.h
 SRCS=	thread_pool.c
diff --git a/cddl/lib/libumem/Makefile b/cddl/lib/libumem/Makefile
index ca8f5e665920..4e4ef2e69461 100644
--- a/cddl/lib/libumem/Makefile
+++ b/cddl/lib/libumem/Makefile
@@ -2,7 +2,7 @@
 
 .PATH: ${SRCTOP}/cddl/compat/opensolaris/lib/libumem
 
-PACKAGE=	runtime
+PACKAGE=	zfs
 LIB=	umem
 SRCS=	umem.c
 WARNS?=	3
diff --git a/cddl/lib/libuutil/Makefile b/cddl/lib/libuutil/Makefile
index fdbac6de2748..b67b88037246 100644
--- a/cddl/lib/libuutil/Makefile
+++ b/cddl/lib/libuutil/Makefile
@@ -2,7 +2,7 @@
 
 .PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libuutil
 
-PACKAGE=	runtime
+PACKAGE=	zfs
 LIB=	uutil
 SRCS=\
 	uu_alloc.c \
diff --git a/cddl/lib/libzfs/Makefile b/cddl/lib/libzfs/Makefile
index 63bfcb39d4d8..2551b9ebdd57 100644
--- a/cddl/lib/libzfs/Makefile
+++ b/cddl/lib/libzfs/Makefile
@@ -9,7 +9,7 @@
 .PATH: ${SRCTOP}/sys/contrib/openzfs/module/zstd
 .PATH: ${SRCTOP}/sys/contrib/openzfs/module/zstd/lib
 
-PACKAGE=	runtime
+PACKAGE=	zfs
 LIB=	zfs
 LIBADD= \
 	avl \
diff --git a/cddl/lib/libzfs_core/Makefile b/cddl/lib/libzfs_core/Makefile
index 5a7475f55428..f34494f1cc0a 100644
--- a/cddl/lib/libzfs_core/Makefile
+++ b/cddl/lib/libzfs_core/Makefile
@@ -8,7 +8,7 @@
 
 LIB=	zfs_core
 LIBADD=	nvpair spl zutil
-PACKAGE=	runtime
+PACKAGE=	zfs
 
 INCS=	libzfs_core.h
 SRCS=	libzfs_core.c \
diff --git a/cddl/lib/libzfsbootenv/Makefile b/cddl/lib/libzfsbootenv/Makefile
index be39af96124a..6c1643039514 100644
--- a/cddl/lib/libzfsbootenv/Makefile
+++ b/cddl/lib/libzfsbootenv/Makefile
@@ -3,7 +3,7 @@
 .PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libzfsbootenv
 .PATH: ${SRCTOP}/sys/contrib/openzfs/include
 
-PACKAGE=	runtime
+PACKAGE=	zfs
 LIB=		zfsbootenv
 SHLIB_MAJOR=	1
 
diff --git a/cddl/lib/libzpool/Makefile b/cddl/lib/libzpool/Makefile
index 13671752fe88..aeb2b4175a3b 100644
--- a/cddl/lib/libzpool/Makefile
+++ b/cddl/lib/libzpool/Makefile
@@ -32,6 +32,7 @@ ATOMIC_SRCS=	opensolaris_atomic.c
 PICFLAG=	-fPIC
 .endif
 
+PACKAGE=	zfs
 LIB=		zpool
 
 USER_C = \
diff --git a/cddl/lib/libzutil/Makefile b/cddl/lib/libzutil/Makefile
index 2e6b53658b22..3c3855898a77 100644
--- a/cddl/lib/libzutil/Makefile
+++ b/cddl/lib/libzutil/Makefile
@@ -6,7 +6,7 @@
 
 LIB=	zutil
 LIBADD=	avl geom m tpool
-PACKAGE=	runtime
+PACKAGE=	zfs
 
 INCS = zutil_import.h
 
diff --git a/cddl/lib/pam_zfs_key/Makefile b/cddl/lib/pam_zfs_key/Makefile
index cf43802090dd..c35a8a6bd615 100644
--- a/cddl/lib/pam_zfs_key/Makefile
+++ b/cddl/lib/pam_zfs_key/Makefile
@@ -1,7 +1,7 @@
 .PATH: ${SRCTOP}/sys/contrib/openzfs/contrib/pam_zfs_key
 .PATH: ${SRCTOP}/sys/contrib/openzfs/include
 
-PACKAGE=	utilities
+PACKAGE=	zfs
 LIB=		pam_zfs_key
 
 SHLIBDIR?=	/usr/lib
diff --git a/cddl/sbin/zfs/Makefile b/cddl/sbin/zfs/Makefile
index 6a6ef62e4fce..0babca17e98a 100644
--- a/cddl/sbin/zfs/Makefile
+++ b/cddl/sbin/zfs/Makefile
@@ -7,7 +7,7 @@ ZFSTOP=	${SRCTOP}/sys/contrib/openzfs
 .PATH: ${ZFSTOP}/man/man8
 .PATH: ${ZFSTOP}/module/os/freebsd/spl
 
-PACKAGE=	runtime
+PACKAGE=	zfs
 PROG=	zfs
 MAN= \
 	zfs.8 \
diff --git a/cddl/sbin/zpool/Makefile b/cddl/sbin/zpool/Makefile
index 4c2a8b94de19..7020439a4366 100644
--- a/cddl/sbin/zpool/Makefile
+++ b/cddl/sbin/zpool/Makefile
@@ -10,7 +10,7 @@ ZFSTOP=	${SRCTOP}/sys/contrib/openzfs
 .PATH: ${ZFSTOP}/cmd/zpool/os/freebsd
 
 
-PACKAGE=	runtime
+PACKAGE=	zfs
 PROG=	zpool
 MAN= \
 	spl.4 \
diff --git a/cddl/share/zfs/compatibility.d/Makefile b/cddl/share/zfs/compatibility.d/Makefile
index 255f4a3542b3..da180b10e733 100644
--- a/cddl/share/zfs/compatibility.d/Makefile
+++ b/cddl/share/zfs/compatibility.d/Makefile
@@ -4,6 +4,8 @@ ZFSTOP= ${SRCTOP}/sys/contrib/openzfs
 
 .PATH: ${ZFSTOP}/cmd/zpool/compatibility.d
 
+PACKAGE=	zfs
+
 FILES= \
 	compat-2018 \
 	compat-2019 \
diff --git a/cddl/usr.bin/zinject/Makefile b/cddl/usr.bin/zinject/Makefile
index fcc472c24214..1e25b38d4eea 100644
--- a/cddl/usr.bin/zinject/Makefile
+++ b/cddl/usr.bin/zinject/Makefile
@@ -5,6 +5,7 @@ ZFSTOP=	${SRCTOP}/sys/contrib/openzfs
 .PATH: ${ZFSTOP}/cmd/zinject
 .PATH: ${ZFSTOP}/man/man8
 
+PACKAGE=	zfs
 PROG=	zinject
 INCS=	zinject.h
 SRCS=	zinject.c translate.c
diff --git a/cddl/usr.bin/zstream/Makefile b/cddl/usr.bin/zstream/Makefile
index 6296390592b3..7ed79e8149bf 100644
--- a/cddl/usr.bin/zstream/Makefile
+++ b/cddl/usr.bin/zstream/Makefile
@@ -5,6 +5,7 @@ ZFSTOP=	${SRCTOP}/sys/contrib/openzfs
 .PATH: ${ZFSTOP}/cmd/zstream
 .PATH: ${ZFSTOP}/man/man8
 
+PACKAGE=	zfs
 PROG=	zstream
 MAN=	zstream.8
 MLINKS=	zstream.8 zstreamdump.8
diff --git a/cddl/usr.bin/ztest/Makefile b/cddl/usr.bin/ztest/Makefile
index 91118d13775d..3778cd1316d4 100644
--- a/cddl/usr.bin/ztest/Makefile
+++ b/cddl/usr.bin/ztest/Makefile
@@ -7,6 +7,7 @@ ZFSTOP=	${SRCTOP}/sys/contrib/openzfs
 .PATH: ${ZFSTOP}/cmd
 .PATH: ${ZFSTOP}/man/man1
 
+PACKAGE=	zfs
 PROG=	ztest
 MAN=	ztest.1
 
diff --git a/cddl/usr.sbin/zdb/Makefile b/cddl/usr.sbin/zdb/Makefile
index efd8c746128f..3be2dea0bb95 100644
--- a/cddl/usr.sbin/zdb/Makefile
+++ b/cddl/usr.sbin/zdb/Makefile
@@ -5,6 +5,7 @@ ZFSTOP=	${SRCTOP}/sys/contrib/openzfs
 .PATH: ${ZFSTOP}/cmd/zdb
 .PATH: ${ZFSTOP}/man/man8
 
+PACKAGE=	zfs
 PROG=	zdb
 MAN=	zdb.8
 INCS=	zdb.h
diff --git a/cddl/usr.sbin/zfsd/Makefile b/cddl/usr.sbin/zfsd/Makefile
index 88eb9220a8cc..e263a47cb422 100644
--- a/cddl/usr.sbin/zfsd/Makefile
+++ b/cddl/usr.sbin/zfsd/Makefile
@@ -4,6 +4,7 @@
 
 .include "Makefile.common"
 
+PACKAGE=	zfs
 PROG_CXX=	zfsd
 MAN=		zfsd.8
 
diff --git a/cddl/usr.sbin/zhack/Makefile b/cddl/usr.sbin/zhack/Makefile
index ffac0785d18d..faedd5bc7d2b 100644
--- a/cddl/usr.sbin/zhack/Makefile
+++ b/cddl/usr.sbin/zhack/Makefile
@@ -2,6 +2,7 @@
 
 .PATH: ${SRCTOP}/sys/contrib/openzfs/cmd
 
+PACKAGE=	zfs
 PROG=	zhack
 MAN=
 
diff --git a/lib/libbe/Makefile b/lib/libbe/Makefile
index 3c66ea9f1cf0..7c8247b80402 100644
--- a/lib/libbe/Makefile
+++ b/lib/libbe/Makefile
@@ -4,7 +4,7 @@ SHLIBDIR?=	/lib
 
 .include <src.opts.mk>
 
-PACKAGE=	runtime
+PACKAGE=	zfs
 LIB=		be
 SHLIB_MAJOR=	1
 SHLIB_MINOR=	0
diff --git a/release/packages/Makefile.package b/release/packages/Makefile.package
index ccaba970489c..dce9ae912786 100644
--- a/release/packages/Makefile.package
+++ b/release/packages/Makefile.package
@@ -148,3 +148,5 @@ wpa_COMMENT=		802.11 Supplicant
 wpa_DESC=		802.11 Supplicant
 yp_COMMENT=		Yellow Pages programs
 yp_DESC=		Yellow Pages programs
+zfs_COMMENT=		ZFS Libraries and Utilities
+zfs_DESC=		ZFS Libraries and Utilities
diff --git a/sbin/bectl/Makefile b/sbin/bectl/Makefile
index 46d43306b9ca..fe2e6087e243 100644
--- a/sbin/bectl/Makefile
+++ b/sbin/bectl/Makefile
@@ -2,7 +2,7 @@
 
 .include <src.opts.mk>
 
-PACKAGE=runtime
+PACKAGE=zfs
 PROG=	bectl
 MAN=	bectl.8