Author: kevans
Date: Sat Aug 11 23:50:09 2018
New Revision: 337663
URL: https://svnweb.freebsd.org/changeset/base/337663

Log:
  Merge libbe(3)/bectl(8) from projects/bectl into head
  
  bectl(8) is an administrative interface for working with ZFS boot
  environments, intended to provide a superset of the functionality provided
  by sysutils/beadm.
  
  libbe(3) is the back-end library that the required functionality has been
  pulled out into for later reuse.
  
  These were originally written for GSoC 2017 under the mentorship of
  allanjude@.
  
  bectl(8) has proven pretty stable in my testing, with the known bug
  documented in the man page.
  
  Relnotes:     yes

Added:
  head/cddl/lib/libbe/
     - copied from r337662, projects/bectl/cddl/lib/libbe/
  head/lib/libbe/
     - copied from r337662, projects/bectl/lib/libbe/
  head/sbin/bectl/
     - copied from r337662, projects/bectl/sbin/bectl/
Modified:
  head/Makefile.inc1
  head/cddl/lib/Makefile
  head/contrib/mdocml/lib.in
  head/sbin/Makefile
  head/share/mk/bsd.libnames.mk
  head/share/mk/src.libnames.mk
Directory Properties:
  head/   (props changed)
  head/cddl/   (props changed)
  head/contrib/mdocml/   (props changed)

Modified: head/Makefile.inc1
==============================================================================
--- head/Makefile.inc1  Sat Aug 11 22:45:39 2018        (r337662)
+++ head/Makefile.inc1  Sat Aug 11 23:50:09 2018        (r337663)
@@ -2524,7 +2524,7 @@ _prebuild_libs=   ${_kerberos5_lib_libasn1} \
                ${_cddl_lib_libumem} ${_cddl_lib_libnvpair} \
                ${_cddl_lib_libuutil} \
                ${_cddl_lib_libavl} \
-               ${_cddl_lib_libzfs_core} \
+               ${_cddl_lib_libzfs_core} ${_cddl_lib_libzfs} \
                ${_cddl_lib_libctf} \
                lib/libufs \
                lib/libutil lib/libpjdlog ${_lib_libypclnt} lib/libz lib/msun \
@@ -2597,7 +2597,15 @@ _cddl_lib_libavl= cddl/lib/libavl
 _cddl_lib_libuutil= cddl/lib/libuutil
 .if ${MK_ZFS} != "no"
 _cddl_lib_libzfs_core= cddl/lib/libzfs_core
+_cddl_lib_libzfs= cddl/lib/libzfs
+
 cddl/lib/libzfs_core__L: cddl/lib/libnvpair__L
+
+cddl/lib/libzfs__L: cddl/lib/libzfs_core__L lib/msun__L lib/libutil__L
+cddl/lib/libzfs__L: lib/libthr__L lib/libmd__L lib/libz__L cddl/lib/libumem__L
+cddl/lib/libzfs__L: cddl/lib/libuutil__L cddl/lib/libavl__L lib/libgeom__L
+
+cddl/lib/libbe__L: cddl/lib/libzfs__L
 .endif
 _cddl_lib_libctf= cddl/lib/libctf
 _cddl_lib= cddl/lib

Modified: head/cddl/lib/Makefile
==============================================================================
--- head/cddl/lib/Makefile      Sat Aug 11 22:45:39 2018        (r337662)
+++ head/cddl/lib/Makefile      Sat Aug 11 23:50:09 2018        (r337663)
@@ -4,6 +4,7 @@
 
 SUBDIR=        ${_drti} \
        libavl \
+       ${_libbe} \
        libctf \
        ${_libdtrace} \
        libnvpair \
@@ -16,6 +17,7 @@ SUBDIR=       ${_drti} \
 SUBDIR.${MK_TESTS}+= tests
 
 .if ${MK_ZFS} != "no"
+_libbe=                libbe
 _libzfs_core=  libzfs_core
 _libzfs=       libzfs
 .if ${MK_LIBTHR} != "no"
@@ -28,6 +30,7 @@ _drti=                drti
 _libdtrace=    libdtrace
 .endif
 
+SUBDIR_DEPEND_libbe=   libnvpair libzfs
 SUBDIR_DEPEND_libdtrace=       libctf
 SUBDIR_DEPEND_libzfs_core=     libnvpair
 SUBDIR_DEPEND_libzfs=  libavl libnvpair libumem libuutil libzfs_core

Modified: head/contrib/mdocml/lib.in
==============================================================================
--- head/contrib/mdocml/lib.in  Sat Aug 11 22:45:39 2018        (r337662)
+++ head/contrib/mdocml/lib.in  Sat Aug 11 23:50:09 2018        (r337663)
@@ -28,6 +28,7 @@ LINE("lib80211",      "802.11 Wireless Network Management L
 LINE("libarchive",     "Streaming Archive Library (libarchive, \\-larchive)")
 LINE("libarm",         "ARM Architecture Library (libarm, \\-larm)")
 LINE("libarm32",       "ARM32 Architecture Library (libarm32, \\-larm32)")
+LINE("libbe",          "Boot Environment Library (libbe, \\-lbe)")
 LINE("libbluetooth",   "Bluetooth Library (libbluetooth, \\-lbluetooth)")
 LINE("libbsm",         "Basic Security Module Library (libbsm, \\-lbsm)")
 LINE("libc",           "Standard C\\~Library (libc, \\-lc)")

Modified: head/sbin/Makefile
==============================================================================
--- head/sbin/Makefile  Sat Aug 11 22:45:39 2018        (r337662)
+++ head/sbin/Makefile  Sat Aug 11 23:50:09 2018        (r337663)
@@ -86,6 +86,7 @@ SUBDIR.${MK_PF}+=     pfctl
 SUBDIR.${MK_PF}+=      pflogd
 SUBDIR.${MK_QUOTAS}+=  quotacheck
 SUBDIR.${MK_ROUTED}+=  routed
+SUBDIR.${MK_ZFS}+=     bectl
 SUBDIR.${MK_ZFS}+=     zfsbootcfg
 
 SUBDIR.${MK_TESTS}+=   tests

Modified: head/share/mk/bsd.libnames.mk
==============================================================================
--- head/share/mk/bsd.libnames.mk       Sat Aug 11 22:45:39 2018        
(r337662)
+++ head/share/mk/bsd.libnames.mk       Sat Aug 11 23:50:09 2018        
(r337663)
@@ -23,6 +23,7 @@ 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
 LIBBLUETOOTH?= ${LIBDESTDIR}${LIBDIR_BASE}/libbluetooth.a

Modified: head/share/mk/src.libnames.mk
==============================================================================
--- head/share/mk/src.libnames.mk       Sat Aug 11 22:45:39 2018        
(r337662)
+++ head/share/mk/src.libnames.mk       Sat Aug 11 23:50:09 2018        
(r337663)
@@ -62,6 +62,7 @@ _LIBRARIES=   \
                asn1 \
                auditd \
                avl \
+               be \
                begemot \
                bluetooth \
                bsdxml \
@@ -335,6 +336,7 @@ _DP_zfs=    md pthread umem util uutil m nvpair avl bsdxm
                zfs_core
 _DP_zfs_core=  nvpair
 _DP_zpool=     md pthread z nvpair avl umem
+_DP_be=                zfs nvpair
 
 # OFED support
 .if ${MK_OFED} != "no"
@@ -472,6 +474,8 @@ LIBBSNMPTOOLS?=     ${LIBBSNMPTOOLSDIR}/libbsnmptools.a
 LIBAMUDIR=     ${OBJTOP}/usr.sbin/amd/libamu
 LIBAMU?=       ${LIBAMUDIR}/libamu.a
 
+LIBBE?=                ${LIBBEDIR}/libbe.a
+
 LIBPMCSTATDIR= ${OBJTOP}/lib/libpmcstat
 LIBPMCSTAT?=   ${LIBPMCSTATDIR}/libpmcstat.a
 
@@ -482,6 +486,7 @@ LIBC_NOSSP_PIC?=    ${LIBC_NOSSP_PICDIR}/libc_nossp_pic.a
 # not using a --sysroot or for meta mode bootstrapping when there is no
 # Makefile.depend.  These are sorted by directory.
 LIBAVLDIR=     ${OBJTOP}/cddl/lib/libavl
+LIBBEDIR=      ${OBJTOP}/cddl/lib/libbe
 LIBCTFDIR=     ${OBJTOP}/cddl/lib/libctf
 LIBDTRACEDIR=  ${OBJTOP}/cddl/lib/libdtrace
 LIBNVPAIRDIR=  ${OBJTOP}/cddl/lib/libnvpair
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to