git: a4e5e0106ac7 - main - zfs: merge openzfs/zfs@229b9f4ed
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 08 Feb 2024 15:52:22 UTC
The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=a4e5e0106ac7145f56eb39a691e302cabb4635be commit a4e5e0106ac7145f56eb39a691e302cabb4635be Merge: 4594eb454891 229b9f4ed05e Author: Martin Matuska <mm@FreeBSD.org> AuthorDate: 2024-02-08 12:39:04 +0000 Commit: Martin Matuska <mm@FreeBSD.org> CommitDate: 2024-02-08 15:51:08 +0000 zfs: merge openzfs/zfs@229b9f4ed Notable upstream pull request merges: #15769 082338875 Add 'zpool status -e' flag to see unhealthy vdevs #15804 a0d3fe72b libzdb: Initial breakout of libzdb #15847 229b9f4ed LUA: Backport CVE-2020-24370's patch Obtained from: OpenZFS OpenZFS commit: 229b9f4ed05e6d14fb4d73fa04a71e99b01bb534 cddl/lib/Makefile | 1 + cddl/lib/libzdb/Makefile | 25 ++++ cddl/lib/libzdb/Makefile.depend | 14 ++ cddl/usr.sbin/zdb/Makefile | 2 +- rescue/rescue/Makefile | 2 +- share/mk/bsd.libnames.mk | 1 + share/mk/src.libnames.mk | 3 + sys/contrib/openzfs/cmd/zdb/Makefile.am | 1 + sys/contrib/openzfs/cmd/zdb/zdb.c | 108 +------------- sys/contrib/openzfs/cmd/zpool/zpool_main.c | 58 +++++++- sys/contrib/openzfs/config/kernel-blkdev.m4 | 34 ++++- sys/contrib/openzfs/include/Makefile.am | 1 + sys/contrib/openzfs/include/libzdb.h | 68 +++++++++ .../include/os/freebsd/zfs/sys/zfs_vfsops_os.h | 1 - .../include/os/linux/zfs/sys/zfs_vfsops_os.h | 2 - sys/contrib/openzfs/include/sys/zfs_vnops.h | 3 + sys/contrib/openzfs/lib/Makefile.am | 5 +- sys/contrib/openzfs/lib/libzdb/Makefile.am | 7 + sys/contrib/openzfs/lib/libzdb/libzdb.c | 102 +++++++++++++ sys/contrib/openzfs/man/man4/zfs.4 | 9 ++ sys/contrib/openzfs/man/man8/zpool-status.8 | 4 +- sys/contrib/openzfs/module/lua/ldebug.c | 7 +- .../openzfs/module/os/freebsd/zfs/zfs_vfsops.c | 4 - .../openzfs/module/os/linux/zfs/vdev_disk.c | 72 +++++++-- .../openzfs/module/os/linux/zfs/zfs_vnops_os.c | 5 - .../openzfs/module/os/linux/zfs/zpl_file_range.c | 48 +++--- sys/contrib/openzfs/module/zfs/zfs_vnops.c | 43 +++++- sys/contrib/openzfs/tests/runfiles/common.run | 5 +- .../openzfs/tests/test-runner/bin/zts-report.py.in | 2 + .../openzfs/tests/zfs-tests/include/tunables.cfg | 1 + .../openzfs/tests/zfs-tests/tests/Makefile.am | 2 + .../cli_root/zpool_status/zpool_status_002_pos.ksh | 4 +- .../cli_root/zpool_status/zpool_status_003_pos.ksh | 2 + .../cli_root/zpool_status/zpool_status_008_pos.ksh | 104 +++++++++++++ .../tests/functional/cp_files/cp_files_002_pos.ksh | 161 +++++++++++++++++++++ sys/modules/zfs/zfs_config.h | 4 +- sys/modules/zfs/zfs_gitrev.h | 2 +- 37 files changed, 736 insertions(+), 181 deletions(-) diff --cc cddl/lib/Makefile index 68250c8300b1,000000000000..e6a0763544f7 mode 100644,000000..100644 --- a/cddl/lib/Makefile +++ b/cddl/lib/Makefile @@@ -1,46 -1,0 +1,47 @@@ + +.include <src.opts.mk> + +.if ${MK_DTRACE} == yes || ${MK_ZFS} == yes +SUBDIR= libspl +.endif + +SUBDIR.${MK_DTRACE}+= \ + drti \ + libctf \ + libdtrace + +SUBDIR.${MK_TESTS}+= tests + +SUBDIR.${MK_ZFS}+= \ + libavl \ + libicp \ + libicp_rescue \ + libnvpair \ + libtpool \ + libumem \ + libuutil \ ++ libzdb \ + libzfs \ + libzfs_core \ + libzfsbootenv \ + libzpool \ + libzutil + +SUBDIR.${MK_ZFS}.${MK_OPENSSL} = pam_zfs_key + +SUBDIR_DEPEND_libavl= libspl +SUBDIR_DEPEND_libctf= libspl +SUBDIR_DEPEND_libdtrace= libctf +SUBDIR_DEPEND_libnvpair= libspl +SUBDIR_DEPEND_libtpool= libspl +SUBDIR_DEPEND_libuutil= libavl libspl +SUBDIR_DEPEND_libzfs_core= libnvpair libspl libzutil +SUBDIR_DEPEND_libzfs= libavl libnvpair libumem libuutil libzfs_core libzutil +SUBDIR_DEPEND_libzpool= libavl libnvpair libumem libicp +SUBDIR_DEPEND_libzutil= libavl libtpool +SUBDIR_DEPEND_libzfsbootenv= libzfs libnvpair +SUBDIR_DEPEND_pam_zfs_key= libnvpair libuutil libzfs libzfs_core + +SUBDIR_PARALLEL= + +.include <bsd.subdir.mk> diff --cc cddl/lib/libzdb/Makefile index 000000000000,000000000000..63248399b91c new file mode 100644 --- /dev/null +++ b/cddl/lib/libzdb/Makefile @@@ -1,0 -1,0 +1,25 @@@ ++.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libzdb ++.PATH: ${SRCTOP}/sys/contrib/openzfs/include ++ ++LIB= zdb ++PACKAGE= zfs ++ ++INCS = libzdb.h ++ ++SRCS = libzdb.c ++ ++WARNS?= 2 ++CSTD= c99 ++ ++CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include ++CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include ++CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd ++CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/zfs ++CFLAGS+= -I${SRCTOP}/sys ++CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include ++CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h ++CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libzutil ++CFLAGS+= -DHAVE_ISSETUGID -DIN_BASE ++CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h ++ ++.include <bsd.lib.mk> diff --cc cddl/lib/libzdb/Makefile.depend index 000000000000,000000000000..93249906da4f new file mode 100644 --- /dev/null +++ b/cddl/lib/libzdb/Makefile.depend @@@ -1,0 -1,0 +1,14 @@@ ++# Autogenerated - do NOT edit! ++ ++DIRDEPS = \ ++ include \ ++ lib/${CSU_DIR} \ ++ lib/libc \ ++ lib/libcompiler_rt \ ++ ++ ++.include <dirdeps.mk> ++ ++.if ${DEP_RELDIR} == ${_DEP_RELDIR} ++# local dependencies - needed for -jN in clean tree ++.endif diff --cc cddl/usr.sbin/zdb/Makefile index 744db789772c,000000000000..e41f4afce82f mode 100644,000000..100644 --- a/cddl/usr.sbin/zdb/Makefile +++ b/cddl/usr.sbin/zdb/Makefile @@@ -1,33 -1,0 +1,33 @@@ + +ZFSTOP= ${SRCTOP}/sys/contrib/openzfs + +.PATH: ${ZFSTOP}/cmd/zdb +.PATH: ${ZFSTOP}/man/man8 + +PACKAGE= zfs +PROG= zdb +MAN= zdb.8 +INCS= zdb.h +SRCS= zdb.c zdb_il.c + +WARNS?= 2 +CSTD= c99 + +CFLAGS+= \ + -DIN_BASE \ + -I${ZFSTOP}/include \ + -I${ZFSTOP}/lib/libspl/include \ + -I${ZFSTOP}/lib/libspl/include/os/freebsd \ + -I${ZFSTOP}/lib/libspl/include/os/freebsd/spl \ + -I${SRCTOP}/sys \ + -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h \ + -DHAVE_ISSETUGID + - LIBADD= nvpair umem uutil zfs spl avl zutil zpool crypto ++LIBADD= nvpair umem uutil zdb zfs spl avl zutil zpool crypto + +CFLAGS.gcc+= -fms-extensions +# Since there are many asserts in this program, it makes no sense to compile +# it without debugging. +CFLAGS+= -g -DDEBUG=1 -DZFS_DEBUG=1 + +.include <bsd.prog.mk> diff --cc rescue/rescue/Makefile index 7bf3299f4d48,000000000000..0a8d142ef83a mode 100644,000000..100644 --- a/rescue/rescue/Makefile +++ b/rescue/rescue/Makefile @@@ -1,269 -1,0 +1,269 @@@ + +.include <src.opts.mk> +.include <bsd.linker.mk> + +PACKAGE=rescue +MAN= +MK_SSP= no +# Static-PIE is not supported so we should not be linking against _pie.a libs. +# This is also needed to avoid linking against sanitizer-instrumented libraries +# since MK_ASAN/MK_UBSAN will instrument the .pieo object files. +MK_PIE= no +NO_SHARED= yes +CRUNCH_BUILDOPTS+= MK_PIE=no NO_SHARED=yes + +# lld >= 16 became more strict about multiply defined symbols. Since there are +# many of those in crunchgen'd programs, turn off the check. +.if ${LINKER_TYPE} == "lld" && ${LINKER_VERSION} >= 160000 +LDFLAGS+= -Wl,--allow-multiple-definition +.endif + +PROG= rescue +BINDIR?=/rescue + +# Shell scripts need #! line to be edited from /bin/sh to /rescue/sh +SCRIPTS= nextboot_FIXED +SCRIPTSNAME_nextboot_FIXED= nextboot +nextboot_FIXED: ../../sbin/reboot/nextboot.sh + sed '1s/\/bin\//\/rescue\//' ${.ALLSRC} > ${.TARGET} +CLEANFILES+= nextboot_FIXED + +SCRIPTS+= dhclient_FIXED +SCRIPTSNAME_dhclient_FIXED= dhclient-script +dhclient_FIXED: ../../sbin/dhclient/dhclient-script + sed '1s/\/bin\//\/rescue\//' ${.ALLSRC} > ${.TARGET} +CLEANFILES+= dhclient_FIXED + +# The help which used to be here is now in mk/bsd.crunchgen.mk + +# Define Makefile variable RESCUE +CRUNCH_BUILDOPTS+= -DRESCUE +# Define compile-time RESCUE symbol when compiling components +CRUNCH_BUILDOPTS+= CRUNCH_CFLAGS=-DRESCUE + +# An experiment that failed: try overriding bsd.lib.mk and bsd.prog.mk +# rather than incorporating rescue-specific logic into standard files. +#MAKEFLAGS= -m ${.CURDIR} ${.MAKEFLAGS} + +# Hackery: 'librescue' exists merely as a tool for appropriately +# recompiling specific library entries. We _know_ they're needed, and +# regular archive searching creates ugly library ordering problems. +# Easiest fix: tell the linker to include them into the executable +# first, so they are guaranteed to override the regular lib entries. +# Note that if 'librescue' hasn't been compiled, we'll just get the +# regular lib entries from libc and friends. +CRUNCH_LIBS+= ${.OBJDIR}/../librescue/*.o + +################################################################### +# Programs from stock /bin +# +# WARNING: Changing this list may require adjusting +# /usr/include/paths.h as well! You were warned! +# +CRUNCH_SRCDIRS+= bin +CRUNCH_PROGS_bin= cat chflags chio chmod cp date dd df echo \ + ed expr getfacl hostname kenv kill ln ls mkdir mv \ + pkill ps pwd realpath rm rmdir setfacl sh sleep stty \ + sync test +CRUNCH_LIBS+= -lcrypt -ledit -ljail -lkvm -lelf -ltermcapw -lutil -lxo +CRUNCH_BUILDTOOLS+= bin/sh + +# Additional options for specific programs +CRUNCH_ALIAS_test= [ +CRUNCH_ALIAS_sh= -sh +# The -sh alias shouldn't appear in /rescue as a hard link +CRUNCH_SUPPRESS_LINK_-sh= 1 +CRUNCH_ALIAS_ln= link +CRUNCH_ALIAS_rm= unlink +CRUNCH_ALIAS_ed= red +CRUNCH_ALIAS_pkill= pgrep + +.if ${MK_TCSH} != "no" +CRUNCH_PROGS_bin+= csh +CRUNCH_ALIAS_csh= -csh tcsh -tcsh +CRUNCH_BUILDTOOLS+= bin/csh +CRUNCH_SUPPRESS_LINK_-csh= 1 +CRUNCH_SUPPRESS_LINK_-tcsh= 1 +.endif + +################################################################### +# Programs from standard /sbin +# +# WARNING: Changing this list may require adjusting +# /usr/include/paths.h as well! You were warned! +# +# Note that mdmfs have their own private 'pathnames.h' +# headers in addition to the standard 'paths.h' header. +# +CRUNCH_SRCDIRS+= sbin +CRUNCH_PROGS_sbin= \ + camcontrol clri devfs dmesg dump \ + dumpfs dumpon fsck fsck_ffs fsck_msdosfs fsdb \ + fsirand gbde geom ifconfig init \ + kldconfig kldload kldstat kldunload ldconfig \ + md5 mdconfig mdmfs mknod mount mount_cd9660 \ + mount_msdosfs mount_nfs mount_nullfs \ + mount_udf mount_unionfs newfs \ + newfs_msdos nos-tun reboot \ + restore rcorder route savecore \ + shutdown swapon sysctl tunefs umount + +.if ${MK_CCD} != "no" +CRUNCH_PROGS_sbin+= ccdconfig +.endif + +.if ${MK_INET} != "no" || ${MK_INET6} != "no" +CRUNCH_PROGS_sbin+= ping +.endif + +.if ${MK_INET6_SUPPORT} != "no" +CRUNCH_ALIAS_ping= ping6 +CRUNCH_PROGS_sbin+= rtsol +.endif + +.if ${MK_IPFILTER} != "no" +CRUNCH_PROGS_sbin+= ipf +CRUNCH_LIBS_ipf+= ${LIBIPF} +.endif + +.if ${MK_ROUTED} != "no" +CRUNCH_PROGS_sbin+= routed rtquery +.endif + +.if ${MK_ZFS} != "no" +CRUNCH_PROGS_sbin+= bectl +CRUNCH_PROGS_sbin+= zfs +CRUNCH_PROGS_sbin+= zpool +CRUNCH_PROGS_usr.sbin+= zdb +.endif + +# crunchgen does not like C++ programs; this should be fixed someday +# CRUNCH_PROGS+= devd + +CRUNCH_LIBS+= -l80211 -lalias -lcam -lncursesw -ldevstat -lipsec -llzma +.if ${MK_ZFS} != "no" +CRUNCH_LIBS+= -lavl -lpthread -luutil -lumem -ltpool -lspl -lrt +CRUNCH_LIBS_zfs+= ${LIBBE} \ + ${LIBZPOOL} \ + ${LIBZFS} \ + ${LIBZUTIL} \ + ${LIBZFS_CORE} \ + ${LIBZFSBOOTENV} \ + ${LIBICP_RESCUE} \ + ${LIBNVPAIR} +CRUNCH_LIBS_bectl+= ${CRUNCH_LIBS_zfs} +CRUNCH_LIBS_zpool+= ${CRUNCH_LIBS_zfs} - CRUNCH_LIBS_zdb+= ${CRUNCH_LIBS_zfs} ++CRUNCH_LIBS_zdb+= ${CRUNCH_LIBS_zfs} ${LIBZDB} +.else +# liblzma needs pthread +CRUNCH_LIBS+= -lpthread +.endif +CRUNCH_LIBS+= -lgeom -lbsdxml -lkiconv +.if ${MK_OPENSSL} == "no" +CRUNCH_LIBS+= -lmd +.endif +CRUNCH_LIBS+= -lmt -lsbuf -lufs -lz + +.if ${MACHINE_CPUARCH} == "i386" +CRUNCH_PROGS_sbin+= bsdlabel fdisk +CRUNCH_ALIAS_bsdlabel= disklabel +#CRUNCH_PROGS+= mount_smbfs +#CRUNCH_LIBS+= -lsmb +.endif + +.if ${MACHINE_CPUARCH} == "amd64" +CRUNCH_PROGS_sbin+= bsdlabel fdisk +CRUNCH_ALIAS_bsdlabel= disklabel +.endif + +CRUNCH_SRCDIR_rtquery= ${SRCTOP}/sbin/routed/rtquery +CRUNCH_SRCDIR_ipf= ${SRCTOP}/sbin/ipf/ipf +.if ${MK_ZFS} != "no" +CRUNCH_SRCDIR_zfs= ${SRCTOP}/cddl/sbin/zfs +CRUNCH_SRCDIR_zpool= ${SRCTOP}/cddl/sbin/zpool +CRUNCH_SRCDIR_zdb= ${SRCTOP}/cddl/usr.sbin/zdb +.endif +CRUNCH_ALIAS_reboot= fastboot halt fasthalt +CRUNCH_ALIAS_restore= rrestore +CRUNCH_ALIAS_dump= rdump +CRUNCH_ALIAS_fsck_ffs= fsck_4.2bsd fsck_ufs +CRUNCH_ALIAS_geom= glabel gpart +CRUNCH_ALIAS_shutdown= poweroff + +# dhclient has historically been troublesome... +CRUNCH_PROGS_sbin+= dhclient + +################################################################## +# Programs from stock /usr/bin +# +CRUNCH_SRCDIRS+= usr.bin + +CRUNCH_PROGS_usr.bin= head mt sed tail tee + +CRUNCH_PROGS_usr.bin+= gzip +CRUNCH_ALIAS_gzip= gunzip gzcat zcat + +CRUNCH_PROGS_usr.bin+= bzip2 +CRUNCH_ALIAS_bzip2= bunzip2 bzcat +CRUNCH_LIBS+= -lbz2 + +CRUNCH_PROGS_usr.bin+= less +CRUNCH_ALIAS_less= more + +CRUNCH_PROGS_usr.bin+= xz +CRUNCH_ALIAS_xz= unxz lzma unlzma xzcat lzcat + +CRUNCH_PROGS_usr.bin+= zstd +CRUNCH_ALIAS_zstd= unzstd zstdcat zstdmt +CRUNCH_LIBS+= ${LDADD_zstd} + +CRUNCH_PROGS_usr.bin+= fetch +CRUNCH_LIBS+= -lfetch + +CRUNCH_PROGS_usr.bin+= tar +CRUNCH_LIBS+= -larchive +.if ${MK_OPENSSL} != "no" +CRUNCH_LIBS+= -lssl -lcrypto +.endif +CRUNCH_LIBS+= -lmd + +.if ${MK_NETCAT} != "no" +CRUNCH_PROGS_usr.bin+= nc +.endif + +.if ${MK_VI} != "no" +CRUNCH_PROGS_usr.bin+= vi +CRUNCH_ALIAS_vi= ex +.endif + +CRUNCH_PROGS_usr.bin+= id +CRUNCH_ALIAS_id= groups whoami + +################################################################## +# Programs from stock /usr/sbin +# +CRUNCH_SRCDIRS+= usr.sbin + +CRUNCH_PROGS_usr.sbin+= chroot + +CRUNCH_PROGS_usr.sbin+= chown +CRUNCH_ALIAS_chown= chgrp +################################################################## + +CRUNCH_LIBS+= ${OBJTOP}/lib/libifconfig/libifconfig.a +CRUNCH_BUILDOPTS+= CRUNCH_CFLAGS+=-I${OBJTOP}/lib/libifconfig + +CRUNCH_LIBS_ifconfig+= ${LIBNV} + +CRUNCH_LIBS+= -lm + +.if ${MK_ISCSI} != "no" +CRUNCH_PROGS_usr.bin+= iscsictl +CRUNCH_PROGS_usr.sbin+= iscsid + +CRUNCH_LIBS+= ${OBJTOP}/lib/libiscsiutil/libiscsiutil.a +CRUNCH_BUILDOPTS+= CRUNCH_CFLAGS+=-I${OBJTOP}/lib/libiscsiutil +.endif + +.include <bsd.crunchgen.mk> +.include <bsd.prog.mk> diff --cc share/mk/bsd.libnames.mk index db08a5ac718c,000000000000..414ae3164066 mode 100644,000000..100644 --- a/share/mk/bsd.libnames.mk +++ b/share/mk/bsd.libnames.mk @@@ -1,221 -1,0 +1,222 @@@ + +# The include file <bsd.libnames.mk> define library names. +# Other include files (e.g. bsd.prog.mk, bsd.lib.mk) include this +# file where necessary. + +.if !target(__<bsd.init.mk>__) +.error bsd.libnames.mk cannot be included directly. +.endif + +LIBDESTDIR?= ${SYSROOT:U${DESTDIR}} + +.sinclude <src.libnames.mk> + +# Src directory locations are also defined in src.libnames.mk. + +LIBCRT0?= ${LIBDESTDIR}${LIBDIR_BASE}/crt0.o + +LIB80211?= ${LIBDESTDIR}${LIBDIR_BASE}/lib80211.a +LIB9P?= ${LIBDESTDIR}${LIBDIR_BASE}/lib9p.a +LIBALIAS?= ${LIBDESTDIR}${LIBDIR_BASE}/libalias.a +LIBARCHIVE?= ${LIBDESTDIR}${LIBDIR_BASE}/libarchive.a +LIBASN1?= ${LIBDESTDIR}${LIBDIR_BASE}/libasn1.a +LIBATM?= ${LIBDESTDIR}${LIBDIR_BASE}/libatm.a +LIBAUDITD?= ${LIBDESTDIR}${LIBDIR_BASE}/libauditd.a +LIBAVL?= ${LIBDESTDIR}${LIBDIR_BASE}/libavl.a +LIBBE?= ${LIBDESTDIR}${LIBDIR_BASE}/libbe.a +LIBBEGEMOT?= ${LIBDESTDIR}${LIBDIR_BASE}/libbegemot.a +LIBBLACKLIST?= ${LIBDESTDIR}${LIBDIR_BASE}/libblacklist.a +LIBBLOCKSRUNTIME?= ${LIBDESTDIR}${LIBDIR_BASE}/libBlocksRuntime.a +LIBBLUETOOTH?= ${LIBDESTDIR}${LIBDIR_BASE}/libbluetooth.a +LIBBSDXML?= ${LIBDESTDIR}${LIBDIR_BASE}/libbsdxml.a +LIBBSM?= ${LIBDESTDIR}${LIBDIR_BASE}/libbsm.a +LIBBSNMP?= ${LIBDESTDIR}${LIBDIR_BASE}/libbsnmp.a +LIBBZ2?= ${LIBDESTDIR}${LIBDIR_BASE}/libbz2.a +LIBC?= ${LIBDESTDIR}${LIBDIR_BASE}/libc.a +LIBCALENDAR?= ${LIBDESTDIR}${LIBDIR_BASE}/libcalendar.a +LIBCAM?= ${LIBDESTDIR}${LIBDIR_BASE}/libcam.a +LIBCOMPAT?= ${LIBDESTDIR}${LIBDIR_BASE}/libcompat.a +LIBCOMPILER_RT?=${LIBDESTDIR}${LIBDIR_BASE}/libcompiler_rt.a +LIBCOM_ERR?= ${LIBDESTDIR}${LIBDIR_BASE}/libcom_err.a +LIBCPLUSPLUS?= ${LIBDESTDIR}${LIBDIR_BASE}/libc++.a +LIBCRYPT?= ${LIBDESTDIR}${LIBDIR_BASE}/libcrypt.a +LIBCRYPTO?= ${LIBDESTDIR}${LIBDIR_BASE}/libcrypto.a +LIBCTF?= ${LIBDESTDIR}${LIBDIR_BASE}/libctf.a +LIBCURSES?= ${LIBDESTDIR}${LIBDIR_BASE}/libcurses.a +LIBCUSE?= ${LIBDESTDIR}${LIBDIR_BASE}/libcuse.a +LIBCXGB4?= ${LIBDESTDIR}${LIBDIR_BASE}/libcxgb4.a +LIBCXXRT?= ${LIBDESTDIR}${LIBDIR_BASE}/libcxxrt.a +LIBC_PIC?= ${LIBDESTDIR}${LIBDIR_BASE}/libc_pic.a +LIBDEVCTL?= ${LIBDESTDIR}${LIBDIR_BASE}/libdevctl.a +LIBDEVDCTL?= ${LIBDESTDIR}${LIBDIR_BASE}/libdevdctl.a +LIBDEVINFO?= ${LIBDESTDIR}${LIBDIR_BASE}/libdevinfo.a +LIBDEVSTAT?= ${LIBDESTDIR}${LIBDIR_BASE}/libdevstat.a +LIBDIALOG?= ${LIBDESTDIR}${LIBDIR_BASE}/libdialog.a +LIBDL?= ${LIBDESTDIR}${LIBDIR_BASE}/libdl.a +LIBDNS?= ${LIBDESTDIR}${LIBDIR_BASE}/libdns.a +LIBDPV?= ${LIBDESTDIR}${LIBDIR_BASE}/libdpv.a +LIBDTRACE?= ${LIBDESTDIR}${LIBDIR_BASE}/libdtrace.a +LIBDWARF?= ${LIBDESTDIR}${LIBDIR_BASE}/libdwarf.a +LIBEDIT?= ${LIBDESTDIR}${LIBDIR_BASE}/libedit.a +LIBEFIVAR?= ${LIBDESTDIR}${LIBDIR_BASE}/libefivar.a +LIBELF?= ${LIBDESTDIR}${LIBDIR_BASE}/libelf.a +LIBEXECINFO?= ${LIBDESTDIR}${LIBDIR_BASE}/libexecinfo.a +LIBFETCH?= ${LIBDESTDIR}${LIBDIR_BASE}/libfetch.a +LIBFIGPAR?= ${LIBDESTDIR}${LIBDIR_BASE}/libfigpar.a +LIBFL?= "don't use LIBFL, use LIBL" +LIBFORMW?= ${LIBDESTDIR}${LIBDIR_BASE}/libformw.a +LIBG2C?= ${LIBDESTDIR}${LIBDIR_BASE}/libg2c.a +LIBGEOM?= ${LIBDESTDIR}${LIBDIR_BASE}/libgeom.a +LIBGPIO?= ${LIBDESTDIR}${LIBDIR_BASE}/libgpio.a +LIBGSSAPI?= ${LIBDESTDIR}${LIBDIR_BASE}/libgssapi.a +LIBGSSAPI_KRB5?= ${LIBDESTDIR}${LIBDIR_BASE}/libgssapi_krb5.a +LIBHDB?= ${LIBDESTDIR}${LIBDIR_BASE}/libhdb.a +LIBHEIMBASE?= ${LIBDESTDIR}${LIBDIR_BASE}/libheimbase.a +LIBHEIMNTLM?= ${LIBDESTDIR}${LIBDIR_BASE}/libheimntlm.a +LIBHEIMSQLITE?= ${LIBDESTDIR}${LIBDIR_BASE}/libheimsqlite.a +LIBHX509?= ${LIBDESTDIR}${LIBDIR_BASE}/libhx509.a +LIBIBCM?= ${LIBDESTDIR}${LIBDIR_BASE}/libibcm.a +LIBIBMAD?= ${LIBDESTDIR}${LIBDIR_BASE}/libibmad.a +LIBIBNETDISC?= ${LIBDESTDIR}${LIBDIR_BASE}/libibnetdisc.a +LIBIBUMAD?= ${LIBDESTDIR}${LIBDIR_BASE}/libibumad.a +LIBIBVERBS?= ${LIBDESTDIR}${LIBDIR_BASE}/libibverbs.a +LIBICP?= ${LIBDESTDIR}${LIBDIR_BASE}/libicp.a +LIBIPSEC?= ${LIBDESTDIR}${LIBDIR_BASE}/libipsec.a +LIBIPT?= ${LIBDESTDIR}${LIBDIR_BASE}/libipt.a +LIBIRDMA?= ${LIBDESTDIR}${LIBDIR_BASE}/libirdma.a +LIBISCSIUTIL?= ${LIBDESTDIR}${LIBDIR_BASE}/libiscsiutil.a +LIBJAIL?= ${LIBDESTDIR}${LIBDIR_BASE}/libjail.a +LIBKADM5CLNT?= ${LIBDESTDIR}${LIBDIR_BASE}/libkadm5clnt.a +LIBKADM5SRV?= ${LIBDESTDIR}${LIBDIR_BASE}/libkadm5srv.a +LIBKAFS5?= ${LIBDESTDIR}${LIBDIR_BASE}/libkafs5.a +LIBKDC?= ${LIBDESTDIR}${LIBDIR_BASE}/libkdc.a +LIBKEYCAP?= ${LIBDESTDIR}${LIBDIR_BASE}/libkeycap.a +LIBKICONV?= ${LIBDESTDIR}${LIBDIR_BASE}/libkiconv.a +LIBKRB5?= ${LIBDESTDIR}${LIBDIR_BASE}/libkrb5.a +LIBKVM?= ${LIBDESTDIR}${LIBDIR_BASE}/libkvm.a +LIBL?= ${LIBDESTDIR}${LIBDIR_BASE}/libl.a +LIBLN?= "don't use LIBLN, use LIBL" +LIBLZMA?= ${LIBDESTDIR}${LIBDIR_BASE}/liblzma.a +LIBM?= ${LIBDESTDIR}${LIBDIR_BASE}/libm.a +LIBMAGIC?= ${LIBDESTDIR}${LIBDIR_BASE}/libmagic.a +LIBMD?= ${LIBDESTDIR}${LIBDIR_BASE}/libmd.a +LIBMEMSTAT?= ${LIBDESTDIR}${LIBDIR_BASE}/libmemstat.a +LIBMENU?= ${LIBDESTDIR}${LIBDIR_BASE}/libmenu.a +LIBMILTER?= ${LIBDESTDIR}${LIBDIR_BASE}/libmilter.a +LIBMLX4?= ${LIBDESTDIR}${LIBDIR_BASE}/libmlx4.a +LIBMLX5?= ${LIBDESTDIR}${LIBDIR_BASE}/libmlx5.a +LIBMP?= ${LIBDESTDIR}${LIBDIR_BASE}/libmp.a +LIBMT?= ${LIBDESTDIR}${LIBDIR_BASE}/libmt.a +LIBNCURSES?= ${LIBDESTDIR}${LIBDIR_BASE}/libncurses.a +LIBNCURSESW?= ${LIBDESTDIR}${LIBDIR_BASE}/libncursesw.a +LIBNETGRAPH?= ${LIBDESTDIR}${LIBDIR_BASE}/libnetgraph.a +LIBNETMAP?= ${LIBDESTDIR}${LIBDIR_BASE}/libnetmap.a +LIBNGATM?= ${LIBDESTDIR}${LIBDIR_BASE}/libngatm.a +LIBNV?= ${LIBDESTDIR}${LIBDIR_BASE}/libnv.a +LIBNVPAIR?= ${LIBDESTDIR}${LIBDIR_BASE}/libnvpair.a +LIBOPENCSD?= ${LIBDESTDIR}${LIBDIR_BASE}/libopencsd.a +LIBOPENSM?= ${LIBDESTDIR}${LIBDIR_BASE}/libopensm.a +LIBOSMCOMP?= ${LIBDESTDIR}${LIBDIR_BASE}/libosmcomp.a +LIBOSMVENDOR?= ${LIBDESTDIR}${LIBDIR_BASE}/libosmvendor.a +LIBPAM?= ${LIBDESTDIR}${LIBDIR_BASE}/libpam.a +LIBPANEL?= ${LIBDESTDIR}${LIBDIR_BASE}/libpanel.a +LIBPANELW?= ${LIBDESTDIR}${LIBDIR_BASE}/libpanelw.a +LIBPCAP?= ${LIBDESTDIR}${LIBDIR_BASE}/libpcap.a +LIBPJDLOG?= ${LIBDESTDIR}${LIBDIR_BASE}/libpjdlog.a +LIBPMC?= ${LIBDESTDIR}${LIBDIR_BASE}/libpmc.a +LIBPROC?= ${LIBDESTDIR}${LIBDIR_BASE}/libproc.a +LIBPROCSTAT?= ${LIBDESTDIR}${LIBDIR_BASE}/libprocstat.a +LIBPTHREAD?= ${LIBDESTDIR}${LIBDIR_BASE}/libpthread.a +LIBRADIUS?= ${LIBDESTDIR}${LIBDIR_BASE}/libradius.a +LIBRDMACM?= ${LIBDESTDIR}${LIBDIR_BASE}/librdmacm.a +LIBREGEX?= ${LIBDESTDIR}${LIBDIR_BASE}/libregex.a +LIBROKEN?= ${LIBDESTDIR}${LIBDIR_BASE}/libroken.a +LIBRPCSEC_GSS?= ${LIBDESTDIR}${LIBDIR_BASE}/librpcsec_gss.a +LIBRPCSVC?= ${LIBDESTDIR}${LIBDIR_BASE}/librpcsvc.a +LIBRT?= ${LIBDESTDIR}${LIBDIR_BASE}/librt.a +LIBRTLD_DB?= ${LIBDESTDIR}${LIBDIR_BASE}/librtld_db.a +LIBSBUF?= ${LIBDESTDIR}${LIBDIR_BASE}/libsbuf.a +LIBSDP?= ${LIBDESTDIR}${LIBDIR_BASE}/libsdp.a +LIBSMB?= ${LIBDESTDIR}${LIBDIR_BASE}/libsmb.a +LIBSPL?= ${LIBDESTDIR}${LIBDIR_BASE}/libspl.a +LIBSSL?= ${LIBDESTDIR}${LIBDIR_BASE}/libssl.a +LIBSSP_NONSHARED?= ${LIBDESTDIR}${LIBDIR_BASE}/libssp_nonshared.a +LIBSTATS?= ${LIBDESTDIR}${LIBDIR_BASE}/libstats.a +LIBSTDTHREADS?= ${LIBDESTDIR}${LIBDIR_BASE}/libstdthreads.a +LIBSYSDECODE?= ${LIBDESTDIR}${LIBDIR_BASE}/libsysdecode.a +LIBTACPLUS?= ${LIBDESTDIR}${LIBDIR_BASE}/libtacplus.a +LIBTERMCAP?= ${LIBDESTDIR}${LIBDIR_BASE}/libtermcap.a +LIBTERMCAPW?= ${LIBDESTDIR}${LIBDIR_BASE}/libtermcapw.a +LIBTERMLIB?= "don't use LIBTERMLIB, use LIBTERMCAP" +LIBTINFOW= ${LIBDESTDIR}${LIBDIR_BASE}/libtinfow.a +LIBTPOOL?= ${LIBDESTDIR}${LIBDIR_BASE}/libtpool.a +LIBUFS?= ${LIBDESTDIR}${LIBDIR_BASE}/libufs.a +LIBUGIDFW?= ${LIBDESTDIR}${LIBDIR_BASE}/libugidfw.a +LIBULOG?= ${LIBDESTDIR}${LIBDIR_BASE}/libulog.a +LIBUMEM?= ${LIBDESTDIR}${LIBDIR_BASE}/libumem.a +LIBUSB?= ${LIBDESTDIR}${LIBDIR_BASE}/libusb.a +LIBUSBHID?= ${LIBDESTDIR}${LIBDIR_BASE}/libusbhid.a +LIBUTIL?= ${LIBDESTDIR}${LIBDIR_BASE}/libutil.a +LIBUUTIL?= ${LIBDESTDIR}${LIBDIR_BASE}/libuutil.a +LIBVGL?= ${LIBDESTDIR}${LIBDIR_BASE}/libvgl.a +LIBVMMAPI?= ${LIBDESTDIR}${LIBDIR_BASE}/libvmmapi.a +LIBWIND?= ${LIBDESTDIR}${LIBDIR_BASE}/libwind.a +LIBWRAP?= ${LIBDESTDIR}${LIBDIR_BASE}/libwrap.a +LIBXO?= ${LIBDESTDIR}${LIBDIR_BASE}/libxo.a +LIBXPG4?= ${LIBDESTDIR}${LIBDIR_BASE}/libxpg4.a +LIBY?= ${LIBDESTDIR}${LIBDIR_BASE}/liby.a +LIBYPCLNT?= ${LIBDESTDIR}${LIBDIR_BASE}/libypclnt.a +LIBZ?= ${LIBDESTDIR}${LIBDIR_BASE}/libz.a ++LIBZDB?= ${LIBDESTDIR}${LIBDIR_BASE}/libzdb.a +LIBZFS?= ${LIBDESTDIR}${LIBDIR_BASE}/libzfs.a +LIBZFS_CORE?= ${LIBDESTDIR}${LIBDIR_BASE}/libzfs_core.a +LIBZFSBOOTENV?= ${LIBDESTDIR}${LIBDIR_BASE}/libzfsbootenv.a +LIBZPOOL?= ${LIBDESTDIR}${LIBDIR_BASE}/libzpool.a +LIBZUTIL?= ${LIBDESTDIR}${LIBDIR_BASE}/libzutil.a + +# enforce the 2 -lpthread and -lc to always be the last in that exact order +.if defined(LDADD) +.if ${LDADD:M-lpthread} +LDADD:= ${LDADD:N-lpthread} -lpthread +.endif +.if ${LDADD:M-lc} +LDADD:= ${LDADD:N-lc} -lc +.endif +.endif + +# Only do this for src builds. +.if defined(SRCTOP) +.if defined(_LIBRARIES) && defined(LIB) && \ + ${_LIBRARIES:M${LIB}} != "" +.if !defined(LIB${LIB:tu}) +.error ${.CURDIR}: Missing value for LIB${LIB:tu} in ${_this:T}. Likely should be: LIB${LIB:tu}?= $${LIBDESTDIR}$${LIBDIR_BASE}/lib${LIB}.a +.endif +.endif + +# Derive LIB*SRCDIR from LIB*DIR +.for lib in ${_LIBRARIES} +LIB${lib:tu}SRCDIR?= ${SRCTOP}/${LIB${lib:tu}DIR:S,^${OBJTOP}/,,} +.endfor +.else + +# Out of tree builds + +# There are LIBADD defined in an out-of-tree build. Are they *all* +# in-tree libraries? If so convert them to LDADD to support +# partial checkouts. +.if !empty(LIBADD) +_convert_libadd= 1 +.for l in ${LIBADD} +.if empty(LIB${l:tu}) +_convert_libadd= 0 +.endif +.endfor +.if ${_convert_libadd} == 1 +.warning Converting out-of-tree build LIBADDs into LDADD. This is not fully supported. +.for l in ${LIBADD} +LDADD+= -l${l} +.endfor +.endif +.endif + +.endif # defined(SRCTOP) diff --cc share/mk/src.libnames.mk index 5a6932614b29,000000000000..658dd1c3d699 mode 100644,000000..100644 --- a/share/mk/src.libnames.mk +++ b/share/mk/src.libnames.mk @@@ -1,804 -1,0 +1,807 @@@ +# +# The include file <src.libnames.mk> define library names suitable +# for INTERNALLIB and PRIVATELIB definition + +.if !target(__<bsd.init.mk>__) +.error src.libnames.mk cannot be included directly. +.endif + +.if !target(__<src.libnames.mk>__) +__<src.libnames.mk>__: + +.include <src.opts.mk> + +_PRIVATELIBS= \ + atf_c \ + atf_cxx \ + auditd \ + bsddialog \ + bsdstat \ + cbor \ + devdctl \ + event1 \ + fido2 \ + gmock \ + gtest \ + gmock_main \ + gtest_main \ + heimipcc \ + heimipcs \ + ldns \ + sqlite3 \ + ssh \ + ucl \ + unbound \ + zstd + +# Let projects based on FreeBSD append to _PRIVATELIBS +# by maintaining their own LOCAL_PRIVATELIBS list. +_PRIVATELIBS+= ${LOCAL_PRIVATELIBS} + +_INTERNALLIBS= \ + amu \ + bsnmptools \ + c_nossp_pic \ + cron \ + elftc \ + fifolog \ + ifconfig \ + ipf \ + iscsiutil \ + lpr \ + lua \ + lutok \ + netbsd \ + ntp \ + ntpevent \ + openbsd \ + opts \ + parse \ + pe \ + pfctl \ + pmcstat \ + sl \ + sm \ + smdb \ + smutil \ + telnet \ + vers \ + wpaap \ + wpacommon \ + wpacrypto \ + wpadrivers \ + wpaeap_common \ + wpaeap_peer \ + wpaeap_server \ + wpaeapol_auth \ + wpaeapol_supp \ + wpal2_packet \ + wparadius \ + wparsn_supp \ + wpatls \ + wpautils \ + wpawps + +# Let projects based on FreeBSD append to _INTERNALLIBS +# by maintaining their own LOCAL_INTERNALLIBS list. +_INTERNALLIBS+= ${LOCAL_INTERNALLIBS} + +_LIBRARIES= \ + ${_PRIVATELIBS} \ + ${_INTERNALLIBS} \ + ${LOCAL_LIBRARIES} \ + 80211 \ + 9p \ + alias \ + archive \ + asn1 \ + avl \ + BlocksRuntime \ + be \ + begemot \ + bluetooth \ + bsdxml \ + bsm \ + bsnmp \ + bz2 \ + c \ + c_pic \ + calendar \ + cam \ + casper \ + cap_dns \ + cap_fileargs \ + cap_grp \ + cap_net \ + cap_netdb \ + cap_pwd \ + cap_sysctl \ + cap_syslog \ + com_err \ + compiler_rt \ + crypt \ + crypto \ + ctf \ + cuse \ + cxxrt \ + devctl \ + devdctl \ + devinfo \ + devstat \ + dialog \ + dl \ + dpv \ + dtrace \ + dwarf \ + edit \ + efivar \ + elf \ + execinfo \ + fetch \ + figpar \ + formw \ + geom \ + gpio \ + gssapi \ + gssapi_krb5 \ + hdb \ + heimbase \ + heimntlm \ + heimsqlite \ + hx509 \ + icp \ + ipsec \ + ipt \ + jail \ + kadm5clnt \ + kadm5srv \ + kafs5 \ + kdc \ + kiconv \ + krb5 \ + kvm \ + l \ + lzma \ + m \ + magic \ + md \ + memstat \ + mp \ + mt \ + ncursesw \ + netgraph \ + netmap \ + ngatm \ + nv \ + nvpair \ + opencsd \ + pam \ + panel \ + panelw \ + pcap \ + pcsclite \ + pjdlog \ + pmc \ + proc \ + procstat \ + pthread \ + radius \ + regex \ + roken \ + rpcsec_gss \ + rpcsvc \ + rt \ + rtld_db \ + sbuf \ + sdp \ + sm \ + smb \ + spl \ + ssl \ + ssp_nonshared \ + stats \ + stdthreads \ + supcplusplus \ + sys \ + sysdecode \ + tacplus \ + termcapw \ + tinfow \ + tpool \ + ufs \ + ugidfw \ + ulog \ + umem \ + usb \ + usbhid \ + util \ + uutil \ + vmmapi \ + wind \ + wrap \ + xo \ + y \ + ypclnt \ + z \ ++ zdb \ + zfs_core \ + zfs \ + zfsbootenv \ + zpool \ + zutil + +.if ${MK_BLACKLIST} != "no" +_LIBRARIES+= \ + blacklist \ + +.endif + +.if ${MK_OFED} != "no" +_LIBRARIES+= \ + cxgb4 \ + ibcm \ + ibmad \ + ibnetdisc \ + ibumad \ + ibverbs \ + irdma \ + mlx4 \ + mlx5 \ + rdmacm \ + osmcomp \ + opensm \ + osmvendor +.endif + +.if ${MK_BEARSSL} == "yes" +_LIBRARIES+= \ + bearssl \ + secureboot \ + +LIBBEARSSL?= ${LIBBEARSSLDIR}/libbearssl.a +LIBSECUREBOOT?= ${LIBSECUREBOOTDIR}/libsecureboot.a +.endif + +.if ${MK_VERIEXEC} == "yes" +_LIBRARIES+= veriexec + +LIBVERIEXEC?= ${LIBVERIEXECDIR}/libveriexec.a +.endif + +# Each library's LIBADD needs to be duplicated here for static linkage of +# 2nd+ order consumers. Auto-generating this would be better. +_DP_80211= sbuf bsdxml *** 1766 LINES SKIPPED ***