aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile3
-rw-r--r--Makefile.inc1131
-rw-r--r--contrib/ntp/ntpd/ntp_control.c5
-rw-r--r--etc/devd/Makefile9
-rw-r--r--etc/mtree/BSD.var.dist8
-rw-r--r--etc/pam.d/Makefile8
-rw-r--r--etc/rc.d/Makefile32
-rw-r--r--gnu/usr.bin/binutils/Makefile.inc1
-rw-r--r--gnu/usr.bin/gdb/Makefile.inc2
-rw-r--r--gnu/usr.bin/groff/Makefile.inc1
-rw-r--r--lib/Makefile4
-rw-r--r--lib/libbsnmp/Makefile.inc1
-rw-r--r--lib/libpam/modules/pam_ssh/Makefile1
-rw-r--r--lib/libunbound/Makefile1
-rw-r--r--libexec/dma/Makefile.inc1
-rw-r--r--release/packages/acpi.ucl13
-rw-r--r--release/packages/at.ucl13
-rw-r--r--release/packages/bhyve.ucl15
-rw-r--r--release/packages/binutils.ucl13
-rw-r--r--release/packages/bsdinstall.ucl13
-rw-r--r--release/packages/bsnmp-development.ucl13
-rw-r--r--release/packages/bsnmp-lib32-development.ucl13
-rw-r--r--release/packages/bsnmp-lib32-profile.ucl13
-rw-r--r--release/packages/bsnmp-lib32.ucl13
-rw-r--r--release/packages/bsnmp-profile.ucl13
-rw-r--r--release/packages/bsnmp.ucl13
-rw-r--r--release/packages/clang.ucl13
-rw-r--r--release/packages/development.ucl13
-rw-r--r--release/packages/dma.ucl14
-rw-r--r--release/packages/docs.ucl13
-rw-r--r--release/packages/gdb.ucl13
-rw-r--r--release/packages/groff.ucl13
-rw-r--r--release/packages/kernel.ucl18
-rw-r--r--release/packages/kernel/post-install1
-rw-r--r--release/packages/lib32-development.ucl13
-rw-r--r--release/packages/lib32-profile.ucl13
-rw-r--r--release/packages/lib32.ucl13
-rw-r--r--release/packages/profile.ucl13
-rw-r--r--release/packages/runtime.ucl19
-rw-r--r--release/packages/ssh-development.ucl13
-rw-r--r--release/packages/ssh-lib32-development.ucl13
-rw-r--r--release/packages/ssh-lib32-profile.ucl13
-rw-r--r--release/packages/ssh-lib32.ucl13
-rw-r--r--release/packages/ssh-profile.ucl13
-rw-r--r--release/packages/ssh.ucl13
-rw-r--r--release/packages/svn.ucl13
-rw-r--r--release/packages/syscons.ucl13
-rw-r--r--release/packages/tests.ucl13
-rw-r--r--release/packages/unbound-development.ucl14
-rw-r--r--release/packages/unbound-lib32-development.ucl14
-rw-r--r--release/packages/unbound-lib32-profile.ucl14
-rw-r--r--release/packages/unbound-lib32.ucl14
-rw-r--r--release/packages/unbound-profile.ucl14
-rw-r--r--release/packages/unbound.ucl14
-rw-r--r--release/scripts/mtree-to-plist.awk66
-rw-r--r--secure/lib/libssh/Makefile1
-rw-r--r--secure/libexec/Makefile.inc1
-rw-r--r--secure/usr.bin/scp/Makefile1
-rw-r--r--secure/usr.bin/sftp/Makefile1
-rw-r--r--secure/usr.bin/ssh-add/Makefile1
-rw-r--r--secure/usr.bin/ssh-agent/Makefile1
-rw-r--r--secure/usr.bin/ssh-keygen/Makefile1
-rw-r--r--secure/usr.bin/ssh-keyscan/Makefile1
-rw-r--r--secure/usr.bin/ssh/Makefile1
-rw-r--r--secure/usr.sbin/sshd/Makefile1
-rw-r--r--share/examples/Makefile3
-rw-r--r--share/mk/bsd.doc.mk11
-rw-r--r--share/mk/bsd.files.mk14
-rw-r--r--share/mk/bsd.incs.mk13
-rw-r--r--share/mk/bsd.lib.mk43
-rw-r--r--share/mk/bsd.links.mk11
-rw-r--r--share/mk/bsd.man.mk7
-rw-r--r--share/mk/bsd.prog.mk15
-rw-r--r--share/mk/bsd.test.mk1
-rw-r--r--share/sendmail/Makefile1
-rw-r--r--share/syscons/Makefile.inc3
-rw-r--r--sys/conf/kmod.mk4
-rw-r--r--usr.bin/at/Makefile.inc1
-rw-r--r--usr.bin/clang/clang.prog.mk5
-rw-r--r--usr.bin/ssh-copy-id/Makefile1
-rw-r--r--usr.bin/svn/Makefile.inc2
-rw-r--r--usr.sbin/acpi/Makefile.inc2
-rw-r--r--usr.sbin/bhyve/Makefile1
-rw-r--r--usr.sbin/bhyvectl/Makefile1
-rw-r--r--usr.sbin/bhyveload/Makefile1
-rw-r--r--usr.sbin/bsdinstall/Makefile1
-rw-r--r--usr.sbin/bsdinstall/Makefile.inc1
-rw-r--r--usr.sbin/bsnmpd/Makefile.inc1
-rw-r--r--usr.sbin/bsnmpd/modules/Makefile.inc1
-rw-r--r--usr.sbin/bsnmpd/tools/Makefile.inc1
-rw-r--r--usr.sbin/unbound/Makefile.inc1
91 files changed, 896 insertions, 49 deletions
diff --git a/Makefile b/Makefile
index 836097b42389..3b895ae0ff09 100644
--- a/Makefile
+++ b/Makefile
@@ -125,7 +125,8 @@ TGTS= all all-man buildenv buildenvvars buildkernel buildworld \
_worldtmp _legacy _bootstrap-tools _cleanobj _obj \
_build-tools _cross-tools _includes _libraries _depend \
build32 builddtb distribute32 install32 xdev xdev-build xdev-install \
- xdev-links native-xtools installconfig \
+ xdev-links native-xtools create-kernel-packages stageworld \
+ create-world-packages packages installconfig
TGTS+= ${SUBDIR_TARGETS}
diff --git a/Makefile.inc1 b/Makefile.inc1
index a26df46ecafd..53ab447791d1 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -177,6 +177,21 @@ VERSION= FreeBSD ${REVISION}-${BRANCH:C/-p[0-9]+$//} ${TARGET_ARCH} ${SRCRELDATE
.export VERSION
.endif
+.if !defined(PKG_VERSION)
+REVISION!= ${MAKE} -C ${SRCDIR}/release -V REVISION
+BRANCH!= ${MAKE} -C ${SRCDIR}/release -V BRANCH
+SRCRELDATE!= awk '/^\#define[[:space:]]*__FreeBSD_version/ { print $$3 }' \
+ ${SRCDIR}/sys/sys/param.h
+.if ${BRANCH:MSTABLE*} || ${BRANCH:MCURRENT*}
+TIMENOW= %Y%m%d%H%M%S
+EXTRA_REVISION= .s${TIMENOW:gmtime}
+.endif
+.if ${BRANCH:M*-p*}
+EXTRA_REVISION= _${BRANCH:C/.*-p([0-9]+$)/\1/}
+.endif
+PKG_VERSION= ${REVISION}${EXTRA_REVISION}
+.endif
+
KNOWN_ARCHES?= aarch64/arm64 \
amd64 \
arm \
@@ -248,7 +263,7 @@ TMPPATH= ${STRICTTMPPATH}:${PATH}
# It may not be functional, e.g., due to new ABI
# when in the middle of installing over this system.
#
-.if make(distributeworld) || make(installworld)
+.if make(distributeworld) || make(installworld) || make(stageworld)
INSTALLTMP!= /usr/bin/mktemp -d -u -t install
.endif
@@ -534,6 +549,9 @@ IMAKE+= -DNO_ROOT METALOG=${METALOG}
INSTALLFLAGS+= -U -M ${METALOG} -D ${INSTALL_DDIR}
MTREEFLAGS+= -W
.endif
+.if defined(BUILD_PKGS)
+INSTALLFLAGS+= -h sha256
+.endif
.if defined(DB_FROM_SRC) || defined(NO_ROOT)
IMAKE_INSTALL= INSTALL="install ${INSTALLFLAGS}"
IMAKE_MTREE= MTREE_CMD="mtree ${MTREEFLAGS}"
@@ -922,7 +940,7 @@ DEBUG_DISTRIBUTIONS+= base ${EXTRA_DISTRIBUTIONS:S,doc,,:S,tests,,}
MTREE_MAGIC?= mtree 2.0
-distributeworld installworld: _installcheck_world
+distributeworld installworld stageworld: _installcheck_world
mkdir -p ${INSTALLTMP}
progs=$$(for prog in ${ITOOLS}; do \
if progpath=`which $$prog`; then \
@@ -1074,6 +1092,21 @@ reinstall: .MAKE .PHONY
${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 install32
.endif
+restage: .MAKE .PHONY
+ @echo "--------------------------------------------------------------"
+ @echo ">>> Making hierarchy"
+ @echo "--------------------------------------------------------------"
+ ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 \
+ LOCAL_MTREE=${LOCAL_MTREE:Q} hierarchy distribution
+ @echo
+ @echo "--------------------------------------------------------------"
+ @echo ">>> Installing everything"
+ @echo "--------------------------------------------------------------"
+ ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 install
+.if defined(LIB32TMP) && ${MK_LIB32} != "no"
+ ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 install32
+.endif
+
redistribute: .MAKE .PHONY
@echo "--------------------------------------------------------------"
@echo ">>> Distributing everything"
@@ -1309,6 +1342,100 @@ packagekernel:
.endif
.endif
+create-world-packages:
+ @rm -f ${DESTDIR}/*.plist 2>/dev/null || :
+ @cd ${DESTDIR} ; \
+ awk -f ${SRCDIR}/release/scripts/mtree-to-plist.awk \
+ ${DESTDIR}/METALOG
+ @for plist in ${DESTDIR}/*.plist; do \
+ plist=$${plist##*/} ; \
+ test -f ${SRCDIR}/release/packages/$${plist%.plist}.ucl || \
+ ( echo "Unkown package FreeBSD-$${plist%.plist}" ; false ) ; \
+ done
+ @cap_arg=`cd ${SRCDIR}/etc ; ${MAKE} -VCAP_MKDB_ENDIAN` ; \
+ pwd_arg=`cd ${SRCDIR}/etc ; ${MAKE} -VPWD_MKDB_ENDIAN` ; \
+ for plist in ${DESTDIR}/*.plist; do \
+ plist=$${plist##*/} ; \
+ pkgname=$${plist%.plist} ; \
+ sed -e "s/%VERSION%/${PKG_VERSION}/" \
+ -e "s/%PKGNAME%/$${pkgname}/" \
+ -e "s/%COMMENT%/Generic comment for $${pkgname}/" \
+ -e "s/%DESC%/Generic description for $${pkgname}/" \
+ -e "s/%CAP_MKDB_ENDIAN%/$${cap_arg}/g" \
+ -e "s/%PWD_MKDB_ENDIAN%/$${pwd_arg}/g" \
+ ${SRCDIR}/release/packages/$${pkgname}.ucl \
+ > ${DESTDIR}/$${pkgname}.ucl ; \
+ awk -F\" ' \
+ /^name/ { printf("===> Creating %s-", $$2); next } \
+ /^version/ { print $$2; next } \
+ ' ${DESTDIR}/$${pkgname}.ucl ; \
+ pkg -o ABI_FILE=${DESTDIR}/bin/sh \
+ create -M ${DESTDIR}/$${pkgname}.ucl \
+ -p ${DESTDIR}/$${pkgname}.plist \
+ -r ${DESTDIR} -o ${DESTDIR} ; \
+ done
+
+STAGEDIR= ${MAKEOBJDIRPREFIX}${.CURDIR}/stage
+
+packages:
+ @mkdir -p ${MAKEOBJDIRPREFIX}${.CURDIR}/stage
+ ${_+_}@cd ${.CURDIR}; \
+ ${MAKE} ${.MAKEFLAGS} buildworld ; \
+ ${MAKE} DESTDIR=${DESTDIR:U${STAGEDIR}} -DNO_ROOT -B stageworld ; \
+ ${MAKE} DESTDIR=${DESTDIR:U${STAGEDIR}} create-world-packages
+
+create-kernel-packages:
+.if !defined(NO_ROOT)
+ @echo "ERROR: create-kernel-packages can only be done with -DNO_ROOT"; \
+ false
+.endif
+ @cd ${DESTDIR}/${DISTDIR} ; \
+ awk -f ${SRCDIR}/release/scripts/mtree-to-plist.awk \
+ ${DESTDIR}/${DISTDIR}/kernel.meta
+.for flavor in release debug
+.if exists(${DESTDIR}/${DISTDIR}/${flavor}.plist)
+ @rm -rf ${DESTDIR}/${DISTDIR}/${flavor}-manifestdir
+ @cp -r ${SRCDIR}/release/packages/kernel \
+ ${DESTDIR}/${DISTDIR}/${flavor}-manifestdir
+ @cd ${DESTDIR}/${DISTDIR} ; \
+ sed -i '' -e "s/%VERSION%/${PKG_VERSION}/" \
+ -e "s/%PKGNAME%/kernel-${flavor}/" \
+ -e "s/%COMMENT%/FreeBSD ${KERNCONF} kernel ${flavor}/" \
+ -e "s/%DESC%/FreeBSD ${KERNCONF} kernel ${flavor}/" \
+ ${DESTDIR}/${DISTDIR}/${flavor}-manifestdir/+MANIFEST
+ @awk -F\" '/name/ { printf("===> Creating %s-", $$2) } /version/ {print $$2 }' \
+ ${DESTDIR}/${DISTDIR}/${flavor}-manifestdir/+MANIFEST
+ @pkg create -m ${DESTDIR}/${DISTDIR}/${flavor}-manifestdir \
+ -p ${DESTDIR}/${DISTDIR}/${flavor}.plist \
+ -r ${DESTDIR}/${DISTDIR}/kernel \
+ -o ${DESTDIR}
+.endif
+.endfor
+.for _kernel in ${BUILDKERNELS:S/${INSTALLKERNEL}//}
+ @cd ${DESTDIR}/${DISTDIR} ; \
+ awk -f ${SRCDIR}/release/scripts/mtree-to-plist.awk \
+ ${DESTDIR}/${DISTDIR}/kernel${_kernel}.meta
+.for flavor in release debug
+.if exists(${DESTDIR}/${DISTDIR}/${flavor}.plist)
+ @rm -rf ${DESTDIR}/${DISTDIR}/${flavor}-manifestdir
+ @cp -r ${SRCDIR}/release/packages/kernel \
+ ${DESTDIR}/${DISTDIR}/${flavor}-manifestdir
+ @cd ${DESTDIR}/${DISTDIR} ; \
+ sed -i '' -e "s/%VERSION%/${PKG_VERSION}/" \
+ -e "s/%PKGNAME%/kernel-${flavor}/" \
+ -e "s/%COMMENT%/FreeBSD ${KERNCONF} kernel ${flavor}/" \
+ -e "s/%DESC%/FreeBSD ${KERNCONF} kernel ${flavor}/" \
+ ${DESTDIR}/${DISTDIR}/${flavor}-manifestdir/+MANIFEST
+ @awk -F\" '/name/ { printf("===> Creating %s-", $$2) } /version/ {print $$2 }' \
+ ${DESTDIR}/${DISTDIR}/${flavor}-manifestdir/+MANIFEST
+ @pkg create -m ${DESTDIR}/${DISTDIR}/${flavor}-manifestdir \
+ -p ${DESTDIR}/${DISTDIR}/${flavor}.plist \
+ -r ${DESTDIR}/${DISTDIR}/kernel.${_kernel} \
+ -o ${DESTDIR}
+.endif
+.endfor
+.endfor
+
#
# doxygen
#
diff --git a/contrib/ntp/ntpd/ntp_control.c b/contrib/ntp/ntpd/ntp_control.c
index 77363117bda4..4e5b6451d1ab 100644
--- a/contrib/ntp/ntpd/ntp_control.c
+++ b/contrib/ntp/ntpd/ntp_control.c
@@ -3,6 +3,11 @@
* traps. Provides service to ntpq and others.
*/
+/*
+ * $FreeBSD: projects/release-pkg/contrib/ntp/ntpd/ntp_control.c 277386 2015-01-19 16:15:12Z gjb $
+ */
+
+#ifdef HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
diff --git a/etc/devd/Makefile b/etc/devd/Makefile
index a0909af08918..d031f1930a77 100644
--- a/etc/devd/Makefile
+++ b/etc/devd/Makefile
@@ -2,7 +2,7 @@
.include <src.opts.mk>
-FILES=
+FILEGROUPS= FILES
.if ${MACHINE} == "powerpc"
FILES+= apple.conf
@@ -10,7 +10,12 @@ FILES+= apple.conf
.if ${MACHINE} == "amd64" || ${MACHINE} == "i386"
.if ${MK_ACPI} != "no"
-FILES+= asus.conf
+FILESGROUPS+= ACPI
+ACPI= asus.conf
+ACPIPACKAGE= acpi
+ACPIDIR= /etc/devd
+ACPITAGS= config
+ACPIMODE= 644
.endif
.if ${MK_HYPERV} != "no"
FILES+= hyperv.conf
diff --git a/etc/mtree/BSD.var.dist b/etc/mtree/BSD.var.dist
index 3a5852905f32..46b8dcddb67c 100644
--- a/etc/mtree/BSD.var.dist
+++ b/etc/mtree/BSD.var.dist
@@ -9,9 +9,9 @@
..
at
/set uname=daemon
- jobs
+ jobs tags=package=at
..
- spool
+ spool tags=package=at
..
/set uname=root
..
@@ -99,8 +99,8 @@
vi.recover mode=01777
..
..
- unbound uname=unbound gname=unbound mode=0755
- conf.d uname=unbound gname=unbound mode=0755
+ unbound uname=unbound gname=unbound mode=0755 tags=package=unbound
+ conf.d uname=unbound gname=unbound mode=0755 tags=package=unbound
..
..
yp
diff --git a/etc/pam.d/Makefile b/etc/pam.d/Makefile
index ac7db6cafd2c..7e29dbe6a01e 100644
--- a/etc/pam.d/Makefile
+++ b/etc/pam.d/Makefile
@@ -4,6 +4,8 @@
NO_OBJ=
+FILESGROUPS= FILES
+
FILES= README \
cron \
ftpd \
@@ -17,7 +19,11 @@ FILES= README \
xdm
.if ${MK_AT} != "no"
-FILES+= atrun
+FILESGROUPS+= AT
+AT+= atrun
+ATPACKAGE+= at
+ATDIR= /etc/pam.d
+ATMODE= 644
.endif
FILESDIR= /etc/pam.d
diff --git a/etc/rc.d/Makefile b/etc/rc.d/Makefile
index 1e6e28ffbaa6..10fe26b12a1b 100644
--- a/etc/rc.d/Makefile
+++ b/etc/rc.d/Makefile
@@ -2,6 +2,8 @@
.include <src.opts.mk>
+FILESGROUPS= FILES
+
FILES= DAEMON \
FILESYSTEMS \
LOGIN \
@@ -109,7 +111,6 @@ FILES= DAEMON \
securelevel \
serial \
sppp \
- ${_sshd} \
statd \
static_arp \
static_ndp \
@@ -121,7 +122,6 @@ FILES= DAEMON \
tmp \
${_ubthidhci} \
ugidfw \
- ${_unbound} \
${_utx} \
var \
watchdogd \
@@ -139,7 +139,8 @@ FILES+= accounting
.endif
.if ${MK_ACPI} != "no"
-FILES+= power_profile
+FILESGROUPS+= ACPI
+ACPI= power_profile
.endif
.if ${MK_ACPI} != "no" || ${MK_APM} != "no"
@@ -173,7 +174,8 @@ FILES+= bootparams
.endif
.if ${MK_BSNMP} != "no"
-FILES+= bsnmpd
+FILESGROUPS+= BSNMP
+BSNMP+= bsnmpd
.endif
.if ${MK_CASPER} != "no"
@@ -244,7 +246,8 @@ FILES+= keyserv
.endif
.if ${MK_OPENSSH} != "no"
-_sshd= sshd
+FILESGROUPS+= SSH
+SSH= sshd
.endif
.if ${MK_PF} != "no"
@@ -268,7 +271,8 @@ FILES+= timed
.endif
.if ${MK_UNBOUND} != "no"
-_unbound= local_unbound
+FILESGROUPS+= UNBOUND
+UNBOUND+= local_unbound
.endif
.if ${MK_UTMPX} != "no"
@@ -287,4 +291,20 @@ FILES+= wpa_supplicant
FILESDIR= /etc/rc.d
FILESMODE= ${BINMODE}
+UNBOUNDDIR= /etc/rc.d
+UNBOUNDMODE= ${BINMODE}
+UNBOUNDPACKAGE= unbound
+
+ACPIDIR= /etc/rc.d
+ACPIMODE= ${BINMODE}
+ACPIPACKAGE= acpi
+
+SSHDIR= /etc/rc.d
+SSHMODE= ${BINMODE}
+SSHPACKAGE= ssh
+
+BSNMPDIR= /etc/rc.d
+BSNMPMODE= ${BINMODE}
+BSNMPPACKAGE= bsnmp
+
.include <bsd.prog.mk>
diff --git a/gnu/usr.bin/binutils/Makefile.inc b/gnu/usr.bin/binutils/Makefile.inc
index 1e2665f97d9b..aba3cc7fa5eb 100644
--- a/gnu/usr.bin/binutils/Makefile.inc
+++ b/gnu/usr.bin/binutils/Makefile.inc
@@ -1,5 +1,6 @@
# $FreeBSD$
WARNS?= 3
+PACKAGE= binutils
.include "../Makefile.inc"
diff --git a/gnu/usr.bin/gdb/Makefile.inc b/gnu/usr.bin/gdb/Makefile.inc
index 40ea69b99efd..a27051c3ca26 100644
--- a/gnu/usr.bin/gdb/Makefile.inc
+++ b/gnu/usr.bin/gdb/Makefile.inc
@@ -3,6 +3,8 @@
VERSION= "6.1.1 [FreeBSD]"
VENDOR= marcel
+PACKAGE= gdb
+
BMAKE_GDB= ${.CURDIR}/..
BMAKE_ROOT= ${BMAKE_GDB}/..
BMAKE_BU= ${BMAKE_ROOT}/binutils
diff --git a/gnu/usr.bin/groff/Makefile.inc b/gnu/usr.bin/groff/Makefile.inc
index 67b61a875687..24bcd9868796 100644
--- a/gnu/usr.bin/groff/Makefile.inc
+++ b/gnu/usr.bin/groff/Makefile.inc
@@ -2,6 +2,7 @@
BINDIR?= /usr/bin
SHELL= /bin/sh
+PACKAGE= groff
# Define `page' to be letter if your PostScript printer uses 8.5x11
# paper (USA) and define it to be A4, if it uses A4 paper (rest of the
diff --git a/lib/Makefile b/lib/Makefile
index 51532e76b0a3..ebf7a981db00 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -131,7 +131,7 @@ SUBDIR_DEPEND_libarchive= libz libbz2 libexpat liblzma libmd
SUBDIR_DEPEND_libatm= libmd
SUBDIR_DEPEND_libauditdm= libbsm
SUBDIR_DEPEND_libbsnmp= ${_libnetgraph}
-SUBDIR_DEPEND_libc++:= libcxxrt
+SUBDIR_DEPEND_libc++= libcxxrt
SUBDIR_DEPEND_libc= libcompiler_rt
SUBDIR_DEPEND_libcam= libsbuf
SUBDIR_DEPEND_libcapsicum= libnv
@@ -149,6 +149,8 @@ SUBDIR_DEPEND_libpjdlog= libutil
SUBDIR_DEPEND_libprocstat= libkvm libutil
SUBDIR_DEPEND_libradius= libmd
SUBDIR_DEPEND_libsmb= libkiconv
+SUBDIR_DEPEND_libstdc++:= msun
+SUBDIR_DEPEND_libtacplus= libmd
SUBDIR_DEPEND_libtacplus= libmd
SUBDIR_DEPEND_libulog= libmd
SUBDIR_DEPEND_libunbound= ${_libldns}
diff --git a/lib/libbsnmp/Makefile.inc b/lib/libbsnmp/Makefile.inc
index 82f48accf146..5c3fdade33e7 100644
--- a/lib/libbsnmp/Makefile.inc
+++ b/lib/libbsnmp/Makefile.inc
@@ -2,5 +2,6 @@
NO_WERROR=
INCSDIR= ${INCLUDEDIR}/bsnmp
+PACKAGE= bsnmp
.include "../Makefile.inc"
diff --git a/lib/libpam/modules/pam_ssh/Makefile b/lib/libpam/modules/pam_ssh/Makefile
index 21991dc9f1c7..8965018e32b2 100644
--- a/lib/libpam/modules/pam_ssh/Makefile
+++ b/lib/libpam/modules/pam_ssh/Makefile
@@ -6,6 +6,7 @@ SSHDIR= ${.CURDIR}/../../../../crypto/openssh
LIB= pam_ssh
MAN= pam_ssh.8
SRCS= pam_ssh.c
+PACKAGE= ssh
# required when linking with a dynamic libssh
SRCS+= roaming_dummy.c
diff --git a/lib/libunbound/Makefile b/lib/libunbound/Makefile
index 2e75c6863b69..ea94e6d4362d 100644
--- a/lib/libunbound/Makefile
+++ b/lib/libunbound/Makefile
@@ -9,6 +9,7 @@ UNBOUNDDIR= ${.CURDIR}/../../contrib/unbound
LIB= unbound
PRIVATELIB=
+PACKAGE= unbound
CFLAGS= -I${UNBOUNDDIR} -I${LDNSDIR} -I${.OBJDIR}
diff --git a/libexec/dma/Makefile.inc b/libexec/dma/Makefile.inc
index e9a0d0a1c614..4db4bf106b4f 100644
--- a/libexec/dma/Makefile.inc
+++ b/libexec/dma/Makefile.inc
@@ -11,3 +11,4 @@ CFLAGS= -I${DMA_SOURCES} \
-DDMA_ROOT_USER='"mailnull"' \
-DDMA_GROUP='"mail"'
BINGRP= mail
+PACKAGE= dma
diff --git a/release/packages/acpi.ucl b/release/packages/acpi.ucl
new file mode 100644
index 000000000000..432f223d3888
--- /dev/null
+++ b/release/packages/acpi.ucl
@@ -0,0 +1,13 @@
+name = "FreeBSD-%PKGNAME%"
+origin = "base"
+version = "%VERSION%"
+comment = "ACPI tools"
+categories = [ base ]
+maintainer = "re@FreeBSD.org"
+www = "https://www.FreeBSD.org"
+prefix = "/"
+licenselogic = "single"
+licenses = [ BSD2CLAUSE ]
+desc = <<EOD
+%DESC%
+EOD
diff --git a/release/packages/at.ucl b/release/packages/at.ucl
new file mode 100644
index 000000000000..7ff7ce54a8ec
--- /dev/null
+++ b/release/packages/at.ucl
@@ -0,0 +1,13 @@
+name = "FreeBSD-%PKGNAME%"
+origin = "base"
+version = "%VERSION%"
+comment = "at(1) and related utilities"
+categories = [ base ]
+maintainer = "re@FreeBSD.org"
+www = "https://www.FreeBSD.org"
+prefix = "/"
+licenselogic = "single"
+licenses = [ BSD2CLAUSE ]
+desc = <<EOD
+%DESC%
+EOD
diff --git a/release/packages/bhyve.ucl b/release/packages/bhyve.ucl
new file mode 100644
index 000000000000..821eefd2c31c
--- /dev/null
+++ b/release/packages/bhyve.ucl
@@ -0,0 +1,15 @@
+name = "FreeBSD-%PKGNAME%"
+origin = "base"
+version = "%VERSION%"
+comment = "The BSD Hypervisor"
+categories = [ base ]
+maintainer = "re@FreeBSD.org"
+www = "https://www.FreeBSD.org"
+prefix = "/"
+licenselogic = "single"
+licenses = [ BSD2CLAUSE ]
+desc = <<EOD
+bhyve, the "BSD hypervisor" is a hypervisor/virtual machine manager developed on
+FreeBSD and relies on modern CPU features such as Extended Page Tables (EPT) and
+VirtIO network and storage drivers
+EOD
diff --git a/release/packages/binutils.ucl b/release/packages/binutils.ucl
new file mode 100644
index 000000000000..fee0e5886e89
--- /dev/null
+++ b/release/packages/binutils.ucl
@@ -0,0 +1,13 @@
+name = "FreeBSD-%PKGNAME%"
+origin = "base"
+version = "%VERSION%"
+comment = "GNU binutils"
+categories = [ base ]
+maintainer = "re@FreeBSD.org"
+www = "https://www.FreeBSD.org"
+prefix = "/"
+licenselogic = "single"
+licenses = [ GPLv2 ]
+desc = <<EOD
+%DESC%
+EOD
diff --git a/release/packages/bsdinstall.ucl b/release/packages/bsdinstall.ucl
new file mode 100644
index 000000000000..8de28f108eff
--- /dev/null
+++ b/release/packages/bsdinstall.ucl
@@ -0,0 +1,13 @@
+name = "FreeBSD-%PKGNAME%"
+origin = "base"
+version = "%VERSION%"
+comment = "Installer"
+categories = [ base ]
+maintainer = "re@FreeBSD.org"
+www = "https://www.FreeBSD.org"
+prefix = "/"
+licenselogic = "single"
+licenses = [ BSD2CLAUSE ]
+desc = <<EOD
+%DESC%
+EOD
diff --git a/release/packages/bsnmp-development.ucl b/release/packages/bsnmp-development.ucl
new file mode 100644
index 000000000000..acfcd511bdef
--- /dev/null
+++ b/release/packages/bsnmp-development.ucl
@@ -0,0 +1,13 @@
+name = "FreeBSD-%PKGNAME%"
+origin = "base"
+version = "%VERSION%"
+comment = "SNMP development"
+categories = [ base ]
+maintainer = "re@FreeBSD.org"
+www = "https://www.FreeBSD.org"
+prefix = "/"
+licenselogic = "single"
+licenses = [ BSD2CLAUSE ]
+desc = <<EOD
+%DESC%
+EOD
diff --git a/release/packages/bsnmp-lib32-development.ucl b/release/packages/bsnmp-lib32-development.ucl
new file mode 100644
index 000000000000..b24242130bce
--- /dev/null
+++ b/release/packages/bsnmp-lib32-development.ucl
@@ -0,0 +1,13 @@
+name = "FreeBSD-%PKGNAME%"
+origin = "base"
+version = "%VERSION%"
+comment = "SNMP 32bits development"
+categories = [ base ]
+maintainer = "re@FreeBSD.org"
+www = "https://www.FreeBSD.org"
+prefix = "/"
+licenselogic = "single"
+licenses = [ BSD2CLAUSE ]
+desc = <<EOD
+%DESC%
+EOD
diff --git a/release/packages/bsnmp-lib32-profile.ucl b/release/packages/bsnmp-lib32-profile.ucl
new file mode 100644
index 000000000000..86e583bf2f83
--- /dev/null
+++ b/release/packages/bsnmp-lib32-profile.ucl
@@ -0,0 +1,13 @@
+name = "FreeBSD-%PKGNAME%"
+origin = "base"
+version = "%VERSION%"
+comment = "SNMP 32bits libraries (profiling)"
+categories = [ base ]
+maintainer = "re@FreeBSD.org"
+www = "https://www.FreeBSD.org"
+prefix = "/"
+licenselogic = "single"
+licenses = [ BSD2CLAUSE ]
+desc = <<EOD
+%DESC%
+EOD
diff --git a/release/packages/bsnmp-lib32.ucl b/release/packages/bsnmp-lib32.ucl
new file mode 100644
index 000000000000..9f40abd19298
--- /dev/null
+++ b/release/packages/bsnmp-lib32.ucl
@@ -0,0 +1,13 @@
+name = "FreeBSD-%PKGNAME%"
+origin = "base"
+version = "%VERSION%"
+comment = "SNMP 32bits libraries"
+categories = [ base ]
+maintainer = "re@FreeBSD.org"
+www = "https://www.FreeBSD.org"
+prefix = "/"
+licenselogic = "single"
+licenses = [ BSD2CLAUSE ]
+desc = <<EOD
+%DESC%
+EOD
diff --git a/release/packages/bsnmp-profile.ucl b/release/packages/bsnmp-profile.ucl
new file mode 100644
index 000000000000..b71d905f81e6
--- /dev/null
+++ b/release/packages/bsnmp-profile.ucl
@@ -0,0 +1,13 @@
+name = "FreeBSD-%PKGNAME%"
+origin = "base"
+version = "%VERSION%"
+comment = "SNMP libraries (profiling)"
+categories = [ base ]
+maintainer = "re@FreeBSD.org"
+www = "https://www.FreeBSD.org"
+prefix = "/"
+licenselogic = "single"
+licenses = [ BSD2CLAUSE ]
+desc = <<EOD
+%DESC%
+EOD
diff --git a/release/packages/bsnmp.ucl b/release/packages/bsnmp.ucl
new file mode 100644
index 000000000000..91bbf2035b2c
--- /dev/null
+++ b/release/packages/bsnmp.ucl
@@ -0,0 +1,13 @@
+name = "FreeBSD-%PKGNAME%"
+origin = "base"
+version = "%VERSION%"
+comment = "SNMP daemon and userland tools"
+categories = [ base ]
+maintainer = "re@FreeBSD.org"
+www = "https://www.FreeBSD.org"
+prefix = "/"
+licenselogic = "single"
+licenses = [ BSD2CLAUSE ]
+desc = <<EOD
+%DESC%
+EOD
diff --git a/release/packages/clang.ucl b/release/packages/clang.ucl
new file mode 100644
index 000000000000..a00d1917e837
--- /dev/null
+++ b/release/packages/clang.ucl
@@ -0,0 +1,13 @@
+name = "FreeBSD-%PKGNAME%"
+origin = "base"
+version = "%VERSION%"
+comment = "Clang compiler tools"
+categories = [ base ]
+maintainer = "re@FreeBSD.org"
+www = "https://www.FreeBSD.org"
+prefix = "/"
+licenselogic = "single"
+licenses = [ BSD2CLAUSE ]
+desc = <<EOD
+%DESC%
+EOD
diff --git a/release/packages/development.ucl b/release/packages/development.ucl
new file mode 100644
index 000000000000..c78cd7096fdd
--- /dev/null
+++ b/release/packages/development.ucl
@@ -0,0 +1,13 @@
+name = "FreeBSD-%PKGNAME%"
+origin = "base"
+version = "%VERSION%"
+comment = "%COMMENT%"
+categories = [ base ]
+maintainer = "re@FreeBSD.org"
+www = "https://www.FreeBSD.org"
+prefix = "/"
+licenselogic = "single"
+licenses = [ BSD2CLAUSE ]
+desc = <<EOD
+%DESC%
+EOD
diff --git a/release/packages/dma.ucl b/release/packages/dma.ucl
new file mode 100644
index 000000000000..c470e28d78f3
--- /dev/null
+++ b/release/packages/dma.ucl
@@ -0,0 +1,14 @@
+name = "FreeBSD-%PKGNAME%"
+origin = "base"
+version = "%VERSION%"
+comment = "DragonFly Mail Agent"
+categories = [ base ]
+maintainer = "re@FreeBSD.org"
+www = "https://www.FreeBSD.org"
+prefix = "/"
+licenselogic = "single"
+licenses = [ BSD2CLAUSE ]
+desc = <<EOD
+The DragonFly Mail Agent, a small Mail Transport Agent (MTA), designed for
+home and office use.
+EOD
diff --git a/release/packages/docs.ucl b/release/packages/docs.ucl
new file mode 100644
index 000000000000..c78cd7096fdd
--- /dev/null
+++ b/release/packages/docs.ucl
@@ -0,0 +1,13 @@
+name = "FreeBSD-%PKGNAME%"
+origin = "base"
+version = "%VERSION%"
+comment = "%COMMENT%"
+categories = [ base ]
+maintainer = "re@FreeBSD.org"
+www = "https://www.FreeBSD.org"
+prefix = "/"
+licenselogic = "single"
+licenses = [ BSD2CLAUSE ]
+desc = <<EOD
+%DESC%
+EOD
diff --git a/release/packages/gdb.ucl b/release/packages/gdb.ucl
new file mode 100644
index 000000000000..1116b52c3e1d
--- /dev/null
+++ b/release/packages/gdb.ucl
@@ -0,0 +1,13 @@
+name = "FreeBSD-%PKGNAME%"
+origin = "base"
+version = "%VERSION%"
+comment = "GNU gdb"
+categories = [ base ]
+maintainer = "re@FreeBSD.org"
+www = "https://www.FreeBSD.org"
+prefix = "/"
+licenselogic = "single"
+licenses = [ GPLv2 ]
+desc = <<EOD
+%DESC%
+EOD
diff --git a/release/packages/groff.ucl b/release/packages/groff.ucl
new file mode 100644
index 000000000000..f5baf1aa7120
--- /dev/null
+++ b/release/packages/groff.ucl
@@ -0,0 +1,13 @@
+name = "FreeBSD-%PKGNAME%"
+origin = "base"
+version = "%VERSION%"
+comment = "GNU groff"
+categories = [ base ]
+maintainer = "re@FreeBSD.org"
+www = "https://www.FreeBSD.org"
+prefix = "/"
+licenselogic = "single"
+licenses = [ GPLv2 ]
+desc = <<EOD
+%DESC%
+EOD
diff --git a/release/packages/kernel.ucl b/release/packages/kernel.ucl
new file mode 100644
index 000000000000..18ca8187b24e
--- /dev/null
+++ b/release/packages/kernel.ucl
@@ -0,0 +1,18 @@
+name = "FreeBSD-%PKGNAME%"
+origin = "base"
+version = "%VERSION%"
+comment = "%COMMENT%"
+categories = [ base ]
+maintainer = "re@FreeBSD.org"
+www = "https://www.FreeBSD.org"
+prefix = "/"
+licenselogic = "single"
+licenses = [ BSD2CLAUSE ]
+desc = <<EOD
+%DESC%
+EOD
+scripts: {
+ post-install = <<EOD
+ /usr/sbin/kldxref ${PKG_ROOTDIR}/boot/kernel
+EOD
+}
diff --git a/release/packages/kernel/post-install b/release/packages/kernel/post-install
new file mode 100644
index 000000000000..1938deb4b595
--- /dev/null
+++ b/release/packages/kernel/post-install
@@ -0,0 +1 @@
+/usr/sbin/kldxref /boot/kernel
diff --git a/release/packages/lib32-development.ucl b/release/packages/lib32-development.ucl
new file mode 100644
index 000000000000..eef856674c21
--- /dev/null
+++ b/release/packages/lib32-development.ucl
@@ -0,0 +1,13 @@
+name = "FreeBSD-%PKGNAME%"
+origin = "base"
+version = "%VERSION%"
+comment = "32bits libraries"
+categories = [ base ]
+maintainer = "re@FreeBSD.org"
+www = "https://www.FreeBSD.org"
+prefix = "/"
+licenselogic = "single"
+licenses = [ BSD2CLAUSE ]
+desc = <<EOD
+%DESC%
+EOD
diff --git a/release/packages/lib32-profile.ucl b/release/packages/lib32-profile.ucl
new file mode 100644
index 000000000000..eef856674c21
--- /dev/null
+++ b/release/packages/lib32-profile.ucl
@@ -0,0 +1,13 @@
+name = "FreeBSD-%PKGNAME%"
+origin = "base"
+version = "%VERSION%"
+comment = "32bits libraries"
+categories = [ base ]
+maintainer = "re@FreeBSD.org"
+www = "https://www.FreeBSD.org"
+prefix = "/"
+licenselogic = "single"
+licenses = [ BSD2CLAUSE ]
+desc = <<EOD
+%DESC%
+EOD
diff --git a/release/packages/lib32.ucl b/release/packages/lib32.ucl
new file mode 100644
index 000000000000..eef856674c21
--- /dev/null
+++ b/release/packages/lib32.ucl
@@ -0,0 +1,13 @@
+name = "FreeBSD-%PKGNAME%"
+origin = "base"
+version = "%VERSION%"
+comment = "32bits libraries"
+categories = [ base ]
+maintainer = "re@FreeBSD.org"
+www = "https://www.FreeBSD.org"
+prefix = "/"
+licenselogic = "single"
+licenses = [ BSD2CLAUSE ]
+desc = <<EOD
+%DESC%
+EOD
diff --git a/release/packages/profile.ucl b/release/packages/profile.ucl
new file mode 100644
index 000000000000..c78cd7096fdd
--- /dev/null
+++ b/release/packages/profile.ucl
@@ -0,0 +1,13 @@
+name = "FreeBSD-%PKGNAME%"
+origin = "base"
+version = "%VERSION%"
+comment = "%COMMENT%"
+categories = [ base ]
+maintainer = "re@FreeBSD.org"
+www = "https://www.FreeBSD.org"
+prefix = "/"
+licenselogic = "single"
+licenses = [ BSD2CLAUSE ]
+desc = <<EOD
+%DESC%
+EOD
diff --git a/release/packages/runtime.ucl b/release/packages/runtime.ucl
new file mode 100644
index 000000000000..30096c1c004e
--- /dev/null
+++ b/release/packages/runtime.ucl
@@ -0,0 +1,19 @@
+name = "FreeBSD-%PKGNAME%"
+origin = "base"
+version = "%VERSION%"
+comment = "%COMMENT%"
+categories = [ base ]
+maintainer = "re@FreeBSD.org"
+www = "https://www.FreeBSD.org"
+prefix = "/"
+licenselogic = "single"
+licenses = [ BSD2CLAUSE ]
+desc = <<EOD
+%DESC%
+EOD
+scripts: {
+ post-install = <<EOD
+ cap_mkdb %CAP_MKDB_ENDIAN% ${PKG_ROOTDIR}/etc/login.conf
+ pwd_mkdb %PWD_MKDB_ENDIAN% -i -p -d ${PKG_ROOTDIR}/etc ${PKG_ROOTDIR}/etc/master.passwd
+EOD
+}
diff --git a/release/packages/ssh-development.ucl b/release/packages/ssh-development.ucl
new file mode 100644
index 000000000000..d7c72eb0400a
--- /dev/null
+++ b/release/packages/ssh-development.ucl
@@ -0,0 +1,13 @@
+name = "FreeBSD-%PKGNAME%"
+origin = "base"
+version = "%VERSION%"
+comment = "Secure SHell"
+categories = [ base ]
+maintainer = "re@FreeBSD.org"
+www = "https://www.FreeBSD.org"
+prefix = "/"
+licenselogic = "single"
+licenses = [ ISCL ]
+desc = <<EOD
+%DESC%
+EOD
diff --git a/release/packages/ssh-lib32-development.ucl b/release/packages/ssh-lib32-development.ucl
new file mode 100644
index 000000000000..ffad90ec6c31
--- /dev/null
+++ b/release/packages/ssh-lib32-development.ucl
@@ -0,0 +1,13 @@
+name = "FreeBSD-%PKGNAME%"
+origin = "base"
+version = "%VERSION%"
+comment = "Secure SHell 32bits libraries"
+categories = [ base ]
+maintainer = "re@FreeBSD.org"
+www = "https://www.FreeBSD.org"
+prefix = "/"
+licenselogic = "single"
+licenses = [ ISCL ]
+desc = <<EOD
+%DESC%
+EOD
diff --git a/release/packages/ssh-lib32-profile.ucl b/release/packages/ssh-lib32-profile.ucl
new file mode 100644
index 000000000000..ffad90ec6c31
--- /dev/null
+++ b/release/packages/ssh-lib32-profile.ucl
@@ -0,0 +1,13 @@
+name = "FreeBSD-%PKGNAME%"
+origin = "base"
+version = "%VERSION%"
+comment = "Secure SHell 32bits libraries"
+categories = [ base ]
+maintainer = "re@FreeBSD.org"
+www = "https://www.FreeBSD.org"
+prefix = "/"
+licenselogic = "single"
+licenses = [ ISCL ]
+desc = <<EOD
+%DESC%
+EOD
diff --git a/release/packages/ssh-lib32.ucl b/release/packages/ssh-lib32.ucl
new file mode 100644
index 000000000000..ffad90ec6c31
--- /dev/null
+++ b/release/packages/ssh-lib32.ucl
@@ -0,0 +1,13 @@
+name = "FreeBSD-%PKGNAME%"
+origin = "base"
+version = "%VERSION%"
+comment = "Secure SHell 32bits libraries"
+categories = [ base ]
+maintainer = "re@FreeBSD.org"
+www = "https://www.FreeBSD.org"
+prefix = "/"
+licenselogic = "single"
+licenses = [ ISCL ]
+desc = <<EOD
+%DESC%
+EOD
diff --git a/release/packages/ssh-profile.ucl b/release/packages/ssh-profile.ucl
new file mode 100644
index 000000000000..d7c72eb0400a
--- /dev/null
+++ b/release/packages/ssh-profile.ucl
@@ -0,0 +1,13 @@
+name = "FreeBSD-%PKGNAME%"
+origin = "base"
+version = "%VERSION%"
+comment = "Secure SHell"
+categories = [ base ]
+maintainer = "re@FreeBSD.org"
+www = "https://www.FreeBSD.org"
+prefix = "/"
+licenselogic = "single"
+licenses = [ ISCL ]
+desc = <<EOD
+%DESC%
+EOD
diff --git a/release/packages/ssh.ucl b/release/packages/ssh.ucl
new file mode 100644
index 000000000000..d7c72eb0400a
--- /dev/null
+++ b/release/packages/ssh.ucl
@@ -0,0 +1,13 @@
+name = "FreeBSD-%PKGNAME%"
+origin = "base"
+version = "%VERSION%"
+comment = "Secure SHell"
+categories = [ base ]
+maintainer = "re@FreeBSD.org"
+www = "https://www.FreeBSD.org"
+prefix = "/"
+licenselogic = "single"
+licenses = [ ISCL ]
+desc = <<EOD
+%DESC%
+EOD
diff --git a/release/packages/svn.ucl b/release/packages/svn.ucl
new file mode 100644
index 000000000000..d3d8aad0df0a
--- /dev/null
+++ b/release/packages/svn.ucl
@@ -0,0 +1,13 @@
+name = "FreeBSD-%PKGNAME%"
+origin = "base"
+version = "%VERSION%"
+comment = "Version control system"
+categories = [ base ]
+maintainer = "re@FreeBSD.org"
+www = "https://www.FreeBSD.org"
+prefix = "/"
+licenselogic = "single"
+licenses = [ APACHE20 ]
+desc = <<EOD
+Lite version of the Subversion version control system
+EOD
diff --git a/release/packages/syscons.ucl b/release/packages/syscons.ucl
new file mode 100644
index 000000000000..ef483680383a
--- /dev/null
+++ b/release/packages/syscons.ucl
@@ -0,0 +1,13 @@
+name = "FreeBSD-%PKGNAME%"
+origin = "base"
+version = "%VERSION%"
+comment = "syscons(4) support files"
+categories = [ base ]
+maintainer = "re@FreeBSD.org"
+www = "https://www.FreeBSD.org"
+prefix = "/"
+licenselogic = "single"
+licenses = [ BSD2CLAUSE ]
+desc = <<EOD
+syscons(4) support files such as keyboard maps, fonts and screen output maps.
+EOD
diff --git a/release/packages/tests.ucl b/release/packages/tests.ucl
new file mode 100644
index 000000000000..c78cd7096fdd
--- /dev/null
+++ b/release/packages/tests.ucl
@@ -0,0 +1,13 @@
+name = "FreeBSD-%PKGNAME%"
+origin = "base"
+version = "%VERSION%"
+comment = "%COMMENT%"
+categories = [ base ]
+maintainer = "re@FreeBSD.org"
+www = "https://www.FreeBSD.org"
+prefix = "/"
+licenselogic = "single"
+licenses = [ BSD2CLAUSE ]
+desc = <<EOD
+%DESC%
+EOD
diff --git a/release/packages/unbound-development.ucl b/release/packages/unbound-development.ucl
new file mode 100644
index 000000000000..084683510dc4
--- /dev/null
+++ b/release/packages/unbound-development.ucl
@@ -0,0 +1,14 @@
+name = "FreeBSD-%PKGNAME%"
+origin = "base"
+version = "%VERSION%"
+comment = "Validating, recursive, and caching DNS resolver"
+categories = [ base ]
+maintainer = "re@FreeBSD.org"
+www = "https://www.FreeBSD.org"
+prefix = "/"
+licenselogic = "single"
+licenses = [ BSD4CLAUSE ]
+desc = <<EOD
+Unbound is a recursive-only caching DNS server which can perform DNSSEC
+validation of results
+EOD
diff --git a/release/packages/unbound-lib32-development.ucl b/release/packages/unbound-lib32-development.ucl
new file mode 100644
index 000000000000..084683510dc4
--- /dev/null
+++ b/release/packages/unbound-lib32-development.ucl
@@ -0,0 +1,14 @@
+name = "FreeBSD-%PKGNAME%"
+origin = "base"
+version = "%VERSION%"
+comment = "Validating, recursive, and caching DNS resolver"
+categories = [ base ]
+maintainer = "re@FreeBSD.org"
+www = "https://www.FreeBSD.org"
+prefix = "/"
+licenselogic = "single"
+licenses = [ BSD4CLAUSE ]
+desc = <<EOD
+Unbound is a recursive-only caching DNS server which can perform DNSSEC
+validation of results
+EOD
diff --git a/release/packages/unbound-lib32-profile.ucl b/release/packages/unbound-lib32-profile.ucl
new file mode 100644
index 000000000000..084683510dc4
--- /dev/null
+++ b/release/packages/unbound-lib32-profile.ucl
@@ -0,0 +1,14 @@
+name = "FreeBSD-%PKGNAME%"
+origin = "base"
+version = "%VERSION%"
+comment = "Validating, recursive, and caching DNS resolver"
+categories = [ base ]
+maintainer = "re@FreeBSD.org"
+www = "https://www.FreeBSD.org"
+prefix = "/"
+licenselogic = "single"
+licenses = [ BSD4CLAUSE ]
+desc = <<EOD
+Unbound is a recursive-only caching DNS server which can perform DNSSEC
+validation of results
+EOD
diff --git a/release/packages/unbound-lib32.ucl b/release/packages/unbound-lib32.ucl
new file mode 100644
index 000000000000..2b0170a21f82
--- /dev/null
+++ b/release/packages/unbound-lib32.ucl
@@ -0,0 +1,14 @@
+name = "FreeBSD-%PKGNAME%"
+origin = "base"
+version = "%VERSION%"
+comment = "Validating, recursive, and caching DNS resolver, 32bits libraries"
+categories = [ base ]
+maintainer = "re@FreeBSD.org"
+www = "https://www.FreeBSD.org"
+prefix = "/"
+licenselogic = "single"
+licenses = [ BSD4CLAUSE ]
+desc = <<EOD
+Unbound is a recursive-only caching DNS server which can perform DNSSEC
+validation of results
+EOD
diff --git a/release/packages/unbound-profile.ucl b/release/packages/unbound-profile.ucl
new file mode 100644
index 000000000000..084683510dc4
--- /dev/null
+++ b/release/packages/unbound-profile.ucl
@@ -0,0 +1,14 @@
+name = "FreeBSD-%PKGNAME%"
+origin = "base"
+version = "%VERSION%"
+comment = "Validating, recursive, and caching DNS resolver"
+categories = [ base ]
+maintainer = "re@FreeBSD.org"
+www = "https://www.FreeBSD.org"
+prefix = "/"
+licenselogic = "single"
+licenses = [ BSD4CLAUSE ]
+desc = <<EOD
+Unbound is a recursive-only caching DNS server which can perform DNSSEC
+validation of results
+EOD
diff --git a/release/packages/unbound.ucl b/release/packages/unbound.ucl
new file mode 100644
index 000000000000..084683510dc4
--- /dev/null
+++ b/release/packages/unbound.ucl
@@ -0,0 +1,14 @@
+name = "FreeBSD-%PKGNAME%"
+origin = "base"
+version = "%VERSION%"
+comment = "Validating, recursive, and caching DNS resolver"
+categories = [ base ]
+maintainer = "re@FreeBSD.org"
+www = "https://www.FreeBSD.org"
+prefix = "/"
+licenselogic = "single"
+licenses = [ BSD4CLAUSE ]
+desc = <<EOD
+Unbound is a recursive-only caching DNS server which can perform DNSSEC
+validation of results
+EOD
diff --git a/release/scripts/mtree-to-plist.awk b/release/scripts/mtree-to-plist.awk
new file mode 100644
index 000000000000..9aa172b79ddc
--- /dev/null
+++ b/release/scripts/mtree-to-plist.awk
@@ -0,0 +1,66 @@
+#!/usr/bin/awk
+/^[^#]/ {
+ gsub(/^\./,"", $1)
+ uname = gname = mode = flags = tags = type = ""
+ for (i=2; i<=NF; i++) {
+ if ($i ~ /^uname=/) {
+ uname=$i
+ gsub(/uname=/, "", uname)
+ } else if ($i ~ /^gname=/) {
+ gname=$i
+ gsub(/gname=/, "", gname)
+ } else if ($i ~ /^mode=/) {
+ mode=$i
+ gsub(/mode=/,"", mode)
+ } else if ($i ~ /^flags=/) {
+ flags=$i
+ gsub(/flags=/, "", flags)
+ } else if ($i ~ /^tags=/) {
+ tags=$i
+ gsub(/tags=/, "", tags)
+ } else if ($i ~ /^type=dir/) {
+ type="dir"
+ }
+ }
+ if (length(tags) == 0)
+ next
+ if (tags ~ /package=/) {
+ ext = pkgname = pkgend = ""
+ split(tags, a, ",");
+ for (i in a) {
+ if (a[i] ~ /^package=/) {
+ pkgname=a[i]
+ gsub(/package=/, "", pkgname)
+ } else if (a[i] == "config") {
+ type="config"
+ } else if (a[i] == "development" || a[i] == "profile") {
+ pkgend=a[i]
+ } else {
+ if (ext != "")
+ ext=ext"-"a[i]
+ else
+ ext=a[i]
+ }
+ }
+ if (ext != "") {
+ if (pkgname == "runtime") {
+ pkgname=ext
+ } else {
+ pkgname=pkgname"-"ext
+ }
+ }
+ if (pkgend != "") {
+ if (pkgname == "runtime") {
+ pkgname=pkgend
+ } else {
+ pkgname=pkgname"-"pkgend
+ }
+ }
+ } else {
+ print "No packages specified in line: $0" > 2
+ next
+ }
+ output=pkgname".plist"
+
+ print "@"type"("uname","gname","mode","flags") " $1 > output
+}
diff --git a/secure/lib/libssh/Makefile b/secure/lib/libssh/Makefile
index 139021b1e80c..d8b9afa9b39a 100644
--- a/secure/lib/libssh/Makefile
+++ b/secure/lib/libssh/Makefile
@@ -19,6 +19,7 @@ SRCS= authfd.c authfile.c bufaux.c bufbn.c buffer.c \
kexc25519.c kexc25519c.c poly1305.c chacha.c cipher-chachapoly.c \
ssh-ed25519.c digest-openssl.c hmac.c \
sc25519.c ge25519.c fe25519.c ed25519.c verify.c hash.c blocks.c
+PACKAGE= ssh
# gss-genr.c should be in $SRCS but causes linking problems, so it is
# compiled directly into sshd instead.
diff --git a/secure/libexec/Makefile.inc b/secure/libexec/Makefile.inc
index 6d620e245bff..084a71910243 100644
--- a/secure/libexec/Makefile.inc
+++ b/secure/libexec/Makefile.inc
@@ -1,5 +1,6 @@
# $FreeBSD$
BINDIR?= /usr/libexec
+PACKAGE= ssh
.include "../Makefile.inc"
diff --git a/secure/usr.bin/scp/Makefile b/secure/usr.bin/scp/Makefile
index 18cfbaf38f54..ca00921f5e62 100644
--- a/secure/usr.bin/scp/Makefile
+++ b/secure/usr.bin/scp/Makefile
@@ -4,6 +4,7 @@
PROG= scp
SRCS= scp.c
+PACKAGE= ssh
CFLAGS+=-I${SSHDIR} -include ssh_namespace.h
SRCS+= ssh_namespace.h
diff --git a/secure/usr.bin/sftp/Makefile b/secure/usr.bin/sftp/Makefile
index 9cea9fe3f08e..4b1f24ebd9ca 100644
--- a/secure/usr.bin/sftp/Makefile
+++ b/secure/usr.bin/sftp/Makefile
@@ -4,6 +4,7 @@
PROG= sftp
SRCS= sftp.c sftp-client.c sftp-common.c sftp-glob.c progressmeter.c
+PACKAGE= ssh
CFLAGS+=-I${SSHDIR} -include ssh_namespace.h
SRCS+= ssh_namespace.h
diff --git a/secure/usr.bin/ssh-add/Makefile b/secure/usr.bin/ssh-add/Makefile
index 2f5d76e0d79c..70feb8b00865 100644
--- a/secure/usr.bin/ssh-add/Makefile
+++ b/secure/usr.bin/ssh-add/Makefile
@@ -4,6 +4,7 @@
PROG= ssh-add
SRCS+= ssh-add.c
+PACKAGE= ssh
CFLAGS+=-I${SSHDIR} -include ssh_namespace.h
SRCS+= ssh_namespace.h
diff --git a/secure/usr.bin/ssh-agent/Makefile b/secure/usr.bin/ssh-agent/Makefile
index e79a02e1f6b5..1e77d96ff020 100644
--- a/secure/usr.bin/ssh-agent/Makefile
+++ b/secure/usr.bin/ssh-agent/Makefile
@@ -4,6 +4,7 @@
PROG= ssh-agent
SRCS= ssh-agent.c
+PACKAGE= ssh
CFLAGS+=-I${SSHDIR} -include ssh_namespace.h
SRCS+= ssh_namespace.h
diff --git a/secure/usr.bin/ssh-keygen/Makefile b/secure/usr.bin/ssh-keygen/Makefile
index c3d6b2fd6b61..5cd6e2f9cc90 100644
--- a/secure/usr.bin/ssh-keygen/Makefile
+++ b/secure/usr.bin/ssh-keygen/Makefile
@@ -4,6 +4,7 @@
PROG= ssh-keygen
SRCS= ssh-keygen.c
+PACKAGE= ssh
CFLAGS+=-I${SSHDIR} -include ssh_namespace.h
SRCS+= ssh_namespace.h
diff --git a/secure/usr.bin/ssh-keyscan/Makefile b/secure/usr.bin/ssh-keyscan/Makefile
index a2237a4fabf7..95b85e45b82e 100644
--- a/secure/usr.bin/ssh-keyscan/Makefile
+++ b/secure/usr.bin/ssh-keyscan/Makefile
@@ -4,6 +4,7 @@
PROG= ssh-keyscan
SRCS= ssh-keyscan.c roaming_dummy.c
+PACKAGE= ssh
CFLAGS+=-I${SSHDIR} -include ssh_namespace.h
SRCS+= ssh_namespace.h
diff --git a/secure/usr.bin/ssh/Makefile b/secure/usr.bin/ssh/Makefile
index cad6b30335b6..38eab11e3d6c 100644
--- a/secure/usr.bin/ssh/Makefile
+++ b/secure/usr.bin/ssh/Makefile
@@ -6,6 +6,7 @@ PROG= ssh
LINKS= ${BINDIR}/ssh ${BINDIR}/slogin
MAN= ssh.1 ssh_config.5
MLINKS= ssh.1 slogin.1
+PACKAGE= ssh
SRCS= ssh.c readconf.c clientloop.c sshtty.c \
sshconnect.c sshconnect1.c sshconnect2.c mux.c \
diff --git a/secure/usr.sbin/sshd/Makefile b/secure/usr.sbin/sshd/Makefile
index 2974f6b9c114..e647c1e8106d 100644
--- a/secure/usr.sbin/sshd/Makefile
+++ b/secure/usr.sbin/sshd/Makefile
@@ -18,6 +18,7 @@ SRCS= sshd.c auth-rhosts.c auth-passwd.c auth-rsa.c auth-rh-rsa.c \
roaming_common.c roaming_serv.c \
sandbox-null.c sandbox-rlimit.c sandbox-systrace.c sandbox-darwin.c \
sandbox-seccomp-filter.c sandbox-capsicum.c
+PACKAGE= ssh
# gss-genr.c really belongs in libssh; see src/secure/lib/libssh/Makefile
SRCS+= gss-genr.c
diff --git a/share/examples/Makefile b/share/examples/Makefile
index 2484aff89007..c71604e827b3 100644
--- a/share/examples/Makefile
+++ b/share/examples/Makefile
@@ -210,6 +210,7 @@ XFILES+= libusb20/Makefile \
.if ${MK_BHYVE} != "no"
LDIRS+= bhyve
XFILES+= bhyve/vmrun.sh
+PACKAGE_bhyve/vmrun.sh= bhyve
.endif
.endif
@@ -230,7 +231,7 @@ copies:
mtree -deU ${MTREE_FOLLOWS_SYMLINKS} \
-f ${.CURDIR}/../../etc/mtree/BSD.usr.dist -p ${DESTDIR}/usr
.for file in ${XFILES}
- ${INSTALL} -o ${SHAREOWN} -g ${SHAREGRP} -m ${SHAREMODE} \
+ ${INSTALL} -T package=${PACKAGE_${file}:Uruntime} -o ${SHAREOWN} -g ${SHAREGRP} -m ${SHAREMODE} \
${.CURDIR}/${file} ${DESTDIR}${BINDIR}/${file}
.endfor
diff --git a/share/mk/bsd.doc.mk b/share/mk/bsd.doc.mk
index e82d98bc4327..a4b9fc1e0554 100644
--- a/share/mk/bsd.doc.mk
+++ b/share/mk/bsd.doc.mk
@@ -81,6 +81,13 @@ TRFLAGS+= -I${.CURDIR}
TRFLAGS+= -t
.endif
+.if defined(NO_ROOT)
+.if !defined(TAGS) || ! ${TAGS:Mpackage=*}
+TAGS+= package=${PACKAGE:Uruntime}
+.endif
+TAG_ARGS= -T ${TAGS:[*]:S/ /,/g}
+.endif
+
DCOMPRESS_EXT?= ${COMPRESS_EXT}
DCOMPRESS_CMD?= ${COMPRESS_CMD}
.for _dev in ${PRINTERDEVICE:Mhtml}
@@ -135,11 +142,11 @@ CLEANFILES+= ${DOC}.ascii ${DOC}.ascii${DCOMPRESS_EXT} \
realinstall:
.if ${PRINTERDEVICE:Mhtml}
cd ${SRCDIR}; \
- ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
+ ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},docs} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
${DOC}*.html ${DESTDIR}${BINDIR}/${VOLUME}/
.endif
.for _dev in ${PRINTERDEVICE:Nhtml}
- ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
+ ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},docs} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
${DFILE.${_dev}} ${DESTDIR}${BINDIR}/${VOLUME}/
.endfor
diff --git a/share/mk/bsd.files.mk b/share/mk/bsd.files.mk
index 17a99d2681b2..448ac389c098 100644
--- a/share/mk/bsd.files.mk
+++ b/share/mk/bsd.files.mk
@@ -31,6 +31,14 @@ STAGE_SETS+= ${group}
.endif
STAGE_DIR.${group}= ${STAGE_OBJTOP}${${group}DIR}
+.if defined(NO_ROOT)
+.if !defined(${group}TAGS) || ! ${${group}TAGS:Mpackage=*}
+${group}TAGS+= package=${${group}PACKAGE:Uruntime}
+.endif
+${group}TAG_ARGS= -T ${${group}TAGS:[*]:S/ /,/g}
+.endif
+
+
_${group}FILES=
.for file in ${${group}}
.if defined(${group}OWN_${file:T}) || defined(${group}GRP_${file:T}) || \
@@ -55,7 +63,7 @@ stage_as.${file:T}: ${file}
installfiles-${group}: _${group}INS_${file:T}
_${group}INS_${file:T}: ${file}
- ${INSTALL} -o ${${group}OWN_${.ALLSRC:T}} \
+ ${INSTALL} ${${group}TAG_ARGS} -o ${${group}OWN_${.ALLSRC:T}} \
-g ${${group}GRP_${.ALLSRC:T}} -m ${${group}MODE_${.ALLSRC:T}} \
${.ALLSRC} \
${DESTDIR}${${group}DIR_${.ALLSRC:T}}/${${group}NAME_${.ALLSRC:T}}
@@ -69,11 +77,11 @@ stage_files.${group}: ${_${group}FILES}
installfiles-${group}: _${group}INS
_${group}INS: ${_${group}FILES}
.if defined(${group}NAME)
- ${INSTALL} -o ${${group}OWN} -g ${${group}GRP} \
+ ${INSTALL} ${${group}TAG_ARGS} -o ${${group}OWN} -g ${${group}GRP} \
-m ${${group}MODE} ${.ALLSRC} \
${DESTDIR}${${group}DIR}/${${group}NAME}
.else
- ${INSTALL} -o ${${group}OWN} -g ${${group}GRP} \
+ ${INSTALL} ${${group}TAG_ARGS} -o ${${group}OWN} -g ${${group}GRP} \
-m ${${group}MODE} ${.ALLSRC} ${DESTDIR}${${group}DIR}/
.endif
.endif
diff --git a/share/mk/bsd.incs.mk b/share/mk/bsd.incs.mk
index 8ea97ba14fc8..06d04ed67c15 100644
--- a/share/mk/bsd.incs.mk
+++ b/share/mk/bsd.incs.mk
@@ -8,6 +8,13 @@
INCSGROUPS?= INCS
+.if defined(NO_ROOT)
+.if !defined(TAGS) || ! ${TAGS:Mpackage=*}
+TAGS+= package=${PACKAGE:Uruntime}
+.endif
+TAG_ARGS= -T ${TAGS:[*]:S/ /,/g}
+.endif
+
.if !target(buildincludes)
.for group in ${INCSGROUPS}
buildincludes: ${${group}}
@@ -66,10 +73,10 @@ stage_includes: stage_files.${group}
installincludes: _${group}INS
_${group}INS: ${_${group}INCS}
.if defined(${group}NAME)
- ${INSTALL} -C -o ${${group}OWN} -g ${${group}GRP} -m ${${group}MODE} \
+ ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},development} -C -o ${${group}OWN} -g ${${group}GRP} -m ${${group}MODE} \
${.ALLSRC} ${DESTDIR}${${group}DIR}/${${group}NAME}
.else
- ${INSTALL} -C -o ${${group}OWN} -g ${${group}GRP} -m ${${group}MODE} \
+ ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},development} -C -o ${${group}OWN} -g ${${group}GRP} -m ${${group}MODE} \
${.ALLSRC} ${DESTDIR}${${group}DIR}/
.endif
.endif
@@ -81,7 +88,7 @@ _${group}INS: ${_${group}INCS}
installincludes:
.for s t in ${INCSLINKS}
@${ECHO} "$t -> $s" ; \
- ${INSTALL_SYMLINK} $s ${DESTDIR}$t
+ ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},development} $s ${DESTDIR}$t
.endfor
.endif
.endif # !target(installincludes)
diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk
index 2e1796fa7ff5..74b780b296d2 100644
--- a/share/mk/bsd.lib.mk
+++ b/share/mk/bsd.lib.mk
@@ -51,6 +51,17 @@ CTFFLAGS+= -g
STRIP?= -s
.endif
+.if ${SHLIBDIR:M*lib32*}
+TAGS+= lib32
+.endif
+
+.if defined(NO_ROOT)
+.if !defined(TAGS) || ! ${TAGS:Mpackage=*}
+TAGS+= package=${PACKAGE:Uruntime}
+.endif
+TAG_ARGS= -T ${TAGS:[*]:S/ /,/g}
+.endif
+
.if ${MK_DEBUG_FILES} != "no" && empty(DEBUG_FLAGS:M-g) && \
empty(DEBUG_FLAGS:M-gdwarf*)
SHARED_CFLAGS+= -g
@@ -251,7 +262,7 @@ ${SHLIB_NAME_FULL}: ${SOBJS}
@${ECHO} building shared library ${SHLIB_NAME}
@rm -f ${SHLIB_NAME} ${SHLIB_LINK}
.if defined(SHLIB_LINK) && !commands(${SHLIB_LINK:R}.ld)
- @${INSTALL_SYMLINK} ${SHLIB_NAME} ${SHLIB_LINK}
+ @${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},development} ${SHLIB_NAME} ${SHLIB_LINK}
.endif
${_LD:N${CCACHE_BIN}} ${LDFLAGS} ${SSP_CFLAGS} ${SOLINKOPTS} \
-o ${.TARGET} -Wl,-soname,${SONAME} \
@@ -344,28 +355,28 @@ realinstall: _libinstall
.ORDER: beforeinstall _libinstall
_libinstall:
.if defined(LIB) && !empty(LIB) && ${MK_INSTALLLIB} != "no"
- ${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
+ ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},development} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
${_INSTALLFLAGS} lib${LIB_PRIVATE}${LIB}.a ${DESTDIR}${_LIBDIR}/
.endif
.if ${MK_PROFILE} != "no" && defined(LIB) && !empty(LIB)
- ${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
+ ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},profile} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
${_INSTALLFLAGS} lib${LIB_PRIVATE}${LIB}_p.a ${DESTDIR}${_LIBDIR}/
.endif
.if defined(SHLIB_NAME)
- ${INSTALL} ${STRIP} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
+ ${INSTALL} ${TAG_ARGS} ${STRIP} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
${_INSTALLFLAGS} ${_SHLINSTALLFLAGS} \
${SHLIB_NAME} ${DESTDIR}${_SHLIBDIR}/
.if ${MK_DEBUG_FILES} != "no"
.if defined(DEBUGMKDIR)
- ${INSTALL} -T debug -d ${DESTDIR}${DEBUGFILEDIR}/
+ ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},debug} -d ${DESTDIR}${DEBUGFILEDIR}/
.endif
- ${INSTALL} -T debug -o ${LIBOWN} -g ${LIBGRP} -m ${DEBUGMODE} \
+ ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},debug} -o ${LIBOWN} -g ${LIBGRP} -m ${DEBUGMODE} \
${_INSTALLFLAGS} \
${SHLIB_NAME}.debug ${DESTDIR}${DEBUGFILEDIR}/
.endif
.if defined(SHLIB_LINK)
.if commands(${SHLIB_LINK:R}.ld)
- ${INSTALL} -S -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
+ ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},development} -S -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
${_INSTALLFLAGS} ${SHLIB_LINK:R}.ld \
${DESTDIR}${_LIBDIR}/${SHLIB_LINK}
.for _SHLIB_LINK_LINK in ${SHLIB_LDSCRIPT_LINKS}
@@ -373,10 +384,20 @@ _libinstall:
.endfor
.else
.if ${_SHLIBDIR} == ${_LIBDIR}
- ${INSTALL_SYMLINK} ${SHLIB_NAME} ${DESTDIR}${_LIBDIR}/${SHLIB_LINK}
+.if ${SHLIB_LINK:Mlib*}
+ ${INSTALL_RSYMLINK} ${TAG_ARGS:D${TAG_ARGS},development} ${SHLIB_NAME} ${DESTDIR}${_LIBDIR}/${SHLIB_LINK}
.else
- ${INSTALL_RSYMLINK} ${DESTDIR}${_SHLIBDIR}/${SHLIB_NAME} \
+ ${INSTALL_RSYMLINK} ${TAG_ARGS} ${DESTDIR}${_SHLIBDIR}/${SHLIB_NAME} \
${DESTDIR}${_LIBDIR}/${SHLIB_LINK}
+.endif
+.else
+.if ${SHLIB_LINK:Mlib*}
+ ${INSTALL_RSYMLINK} ${TAG_ARGS:D${TAG_ARGS},development} ${DESTDIR}${_SHLIBDIR}/${SHLIB_NAME} \
+ ${DESTDIR}${_LIBDIR}/${SHLIB_LINK}
+.else
+ ${INSTALL_RSYMLINK} ${TAG_ARGS} ${DESTDIR}${_SHLIBDIR}/${SHLIB_NAME} \
+ ${DESTDIR}${_LIBDIR}/${SHLIB_LINK}
+.endif
.if exists(${DESTDIR}${_LIBDIR}/${SHLIB_NAME})
-chflags noschg ${DESTDIR}${_LIBDIR}/${SHLIB_NAME}
rm -f ${DESTDIR}${_LIBDIR}/${SHLIB_NAME}
@@ -386,11 +407,11 @@ _libinstall:
.endif # SHLIB_LINK
.endif # SHIB_NAME
.if defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) && ${MK_TOOLCHAIN} != "no"
- ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
+ ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},development} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
${_INSTALLFLAGS} lib${LIB}_pic.a ${DESTDIR}${_LIBDIR}/
.endif
.if defined(WANT_LINT) && !defined(NO_LINT) && defined(LIB) && !empty(LIB)
- ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
+ ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},development} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
${_INSTALLFLAGS} ${LINTLIB} ${DESTDIR}${LINTLIBDIR}/
.endif
.endif # !defined(INTERNALLIB)
diff --git a/share/mk/bsd.links.mk b/share/mk/bsd.links.mk
index 4f8565c255f9..87b808f19cb0 100644
--- a/share/mk/bsd.links.mk
+++ b/share/mk/bsd.links.mk
@@ -4,14 +4,21 @@
.error bsd.links.mk cannot be included directly.
.endif
+.if defined(NO_ROOT)
+.if !defined(TAGS) || ! ${TAGS:Mpackage=*}
+TAGS+= package=${PACKAGE}
+.endif
+TAG_ARGS= -T ${TAGS:[*]:S/ /,/g}
+.endif
+
afterinstall: _installlinks
.ORDER: realinstall _installlinks
_installlinks:
.for s t in ${LINKS}
@${ECHO} "$t -> $s" ;\
- ${INSTALL_LINK} ${DESTDIR}$s ${DESTDIR}$t
+ ${INSTALL_LINK} ${TAG_ARGS} ${DESTDIR}$s ${DESTDIR}$t
.endfor
.for s t in ${SYMLINKS}
@${ECHO} "$t -> $s" ;\
- ${INSTALL_SYMLINK} $s ${DESTDIR}/$t
+ ${INSTALL_SYMLINK} ${TAG_ARGS} $s ${DESTDIR}/$t
.endfor
diff --git a/share/mk/bsd.man.mk b/share/mk/bsd.man.mk
index d0992b630dfb..0fee37725920 100644
--- a/share/mk/bsd.man.mk
+++ b/share/mk/bsd.man.mk
@@ -50,7 +50,7 @@
.error bsd.man.mk cannot be included directly.
.endif
-MINSTALL?= ${INSTALL} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE}
+MINSTALL?= ${INSTALL} ${TAG_ARGS} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE}
CATDIR= ${MANDIR:H:S/$/\/cat/}
CATEXT= .cat
@@ -62,6 +62,7 @@ MCOMPRESS_EXT?= ${COMPRESS_EXT}
SECTIONS= 1 2 3 4 5 6 7 8 9
.SUFFIXES: ${SECTIONS:S/^/./g}
+
# Backwards compatibility.
.if !defined(MAN)
.for __sect in ${SECTIONS}
@@ -222,7 +223,7 @@ _maninstall: ${MAN}
t=${DESTDIR}${MANDIR}${_dsect}${MANSUBDIR}/${_dname}; \
${ECHO} $${t}${ZEXT} -\> $${l}${ZEXT}; \
rm -f $${t} $${t}${MCOMPRESS_EXT}; \
- ${INSTALL_LINK} $${l}${ZEXT} $${t}${ZEXT}
+ ${INSTALL_LINK} ${TAG_ARGS} $${l}${ZEXT} $${t}${ZEXT}
.endfor
.if defined(MANBUILDCAT) && !empty(MANBUILDCAT)
.for _oname _osect _dname _dsect in ${MLINKS:C/\.([^.]*)$/.\1 \1/}
@@ -230,7 +231,7 @@ _maninstall: ${MAN}
t=${DESTDIR}${MANDIR}${_dsect}${MANSUBDIR}/${_dname}; \
${ECHO} $${t}${ZEXT} -\> $${l}${ZEXT}; \
rm -f $${t} $${t}${MCOMPRESS_EXT}; \
- ${INSTALL_LINK} $${l}${ZEXT} $${t}${ZEXT}
+ ${INSTALL_LINK} ${TAG_ARGS} $${l}${ZEXT} $${t}${ZEXT}
.endfor
.endif
.endif
diff --git a/share/mk/bsd.prog.mk b/share/mk/bsd.prog.mk
index c4c783fb0084..f08985691201 100644
--- a/share/mk/bsd.prog.mk
+++ b/share/mk/bsd.prog.mk
@@ -47,6 +47,13 @@ CTFFLAGS+= -g
STRIP?= -s
.endif
+.if defined(NO_ROOT)
+.if !defined(TAGS) || ! ${TAGS:Mpackage=*}
+TAGS+= package=${PACKAGE:Uruntime}
+.endif
+TAG_ARGS= -T ${TAGS:[*]:S/ /,/g}
+.endif
+
.if defined(NO_SHARED) && (${NO_SHARED} != "no" && ${NO_SHARED} != "NO")
LDFLAGS+= -static
.endif
@@ -205,13 +212,13 @@ realinstall: _proginstall
.ORDER: beforeinstall _proginstall
_proginstall:
.if defined(PROG)
- ${INSTALL} ${STRIP} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
+ ${INSTALL} ${TAG_ARGS} ${STRIP} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
${_INSTALLFLAGS} ${PROG} ${DESTDIR}${BINDIR}/${PROGNAME}
.if ${MK_DEBUG_FILES} != "no"
.if defined(DEBUGMKDIR)
- ${INSTALL} -T debug -d ${DESTDIR}${DEBUGFILEDIR}/
+ ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},debug} -d ${DESTDIR}${DEBUGFILEDIR}/
.endif
- ${INSTALL} -T debug -o ${BINOWN} -g ${BINGRP} -m ${DEBUGMODE} \
+ ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},debug} -o ${BINOWN} -g ${BINGRP} -m ${DEBUGMODE} \
${PROGNAME}.debug ${DESTDIR}${DEBUGFILEDIR}/${PROGNAME}.debug
.endif
.endif
@@ -243,7 +250,7 @@ SCRIPTSMODE_${script:T}?= ${SCRIPTSMODE}
STAGE_AS_${script:T}= ${SCRIPTSDIR_${script:T}}/${SCRIPTSNAME_${script:T}}
_scriptsinstall: _SCRIPTSINS_${script:T}
_SCRIPTSINS_${script:T}: ${script}
- ${INSTALL} -o ${SCRIPTSOWN_${.ALLSRC:T}} \
+ ${INSTALL} ${TAG_ARGS} -o ${SCRIPTSOWN_${.ALLSRC:T}} \
-g ${SCRIPTSGRP_${.ALLSRC:T}} -m ${SCRIPTSMODE_${.ALLSRC:T}} \
${.ALLSRC} \
${DESTDIR}${SCRIPTSDIR_${.ALLSRC:T}}/${SCRIPTSNAME_${.ALLSRC:T}}
diff --git a/share/mk/bsd.test.mk b/share/mk/bsd.test.mk
index 9c5961972086..b0d493945d15 100644
--- a/share/mk/bsd.test.mk
+++ b/share/mk/bsd.test.mk
@@ -15,6 +15,7 @@ LOCALBASE?= /usr/local
# Tests install directory
TESTSDIR?= ${TESTSBASE}/${RELDIR:H}
+PACKAGE= tests
# List of subdirectories containing tests into which to recurse. This has the
# same semantics as SUBDIR at build-time. However, the directories listed here
diff --git a/share/sendmail/Makefile b/share/sendmail/Makefile
index a548b63144e5..0e1a27dd3018 100644
--- a/share/sendmail/Makefile
+++ b/share/sendmail/Makefile
@@ -4,6 +4,7 @@
SENDMAIL_DIR=${.CURDIR}/../../contrib/sendmail
CFDIR= cf
+CFPACKAGE= sendmail
CFDIRS!= (cd ${SENDMAIL_DIR}; find -L ${CFDIR} \( \( -name CVS -o -name .svn \) -prune \) -o -type d -print)
CFFILES!= (cd ${SENDMAIL_DIR}; find -L ${CFDIR} \( \( -name CVS -o -name .svn \) -prune \) -o -type f -print)
diff --git a/share/syscons/Makefile.inc b/share/syscons/Makefile.inc
new file mode 100644
index 000000000000..59bf625149dd
--- /dev/null
+++ b/share/syscons/Makefile.inc
@@ -0,0 +1,3 @@
+# $FreeBSD$
+
+FILESPACKAGE= syscons
diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk
index 819a955fe692..a79fe967b4d8 100644
--- a/sys/conf/kmod.mk
+++ b/sys/conf/kmod.mk
@@ -302,10 +302,10 @@ KERN_DEBUGDIR?= ${DEBUGDIR}
realinstall: _kmodinstall
.ORDER: beforeinstall _kmodinstall
_kmodinstall:
- ${INSTALL} -o ${KMODOWN} -g ${KMODGRP} -m ${KMODMODE} \
+ ${INSTALL} -T release -o ${KMODOWN} -g ${KMODGRP} -m ${KMODMODE} \
${_INSTALLFLAGS} ${PROG} ${DESTDIR}${KMODDIR}/
.if defined(DEBUG_FLAGS) && !defined(INSTALL_NODEBUG) && ${MK_KERNEL_SYMBOLS} != "no"
- ${INSTALL} -o ${KMODOWN} -g ${KMODGRP} -m ${KMODMODE} \
+ ${INSTALL} -T debug -o ${KMODOWN} -g ${KMODGRP} -m ${KMODMODE} \
${_INSTALLFLAGS} ${PROG}.debug ${DESTDIR}${KERN_DEBUGDIR}${KMODDIR}/
.endif
diff --git a/usr.bin/at/Makefile.inc b/usr.bin/at/Makefile.inc
index 2dab559532f7..3bd437374fa6 100644
--- a/usr.bin/at/Makefile.inc
+++ b/usr.bin/at/Makefile.inc
@@ -10,6 +10,7 @@ DAEMON_UID=1
DEFAULT_BATCH_QUEUE=E
DEFAULT_AT_QUEUE=c
PERM_PATH=/var/at
+PACKAGE= at
CFLAGS += -DATJOB_DIR=\"$(ATJOB_DIR)/\" \
-DLFILE=\"$(ATJOB_DIR)/$(LOCKFILE)\" \
diff --git a/usr.bin/clang/clang.prog.mk b/usr.bin/clang/clang.prog.mk
index 912f678195cd..b0efe24a0c8a 100644
--- a/usr.bin/clang/clang.prog.mk
+++ b/usr.bin/clang/clang.prog.mk
@@ -9,7 +9,10 @@ DPADD+= ${.OBJDIR}/../../../lib/clang/lib${lib}/lib${lib}.a
LDADD+= ${.OBJDIR}/../../../lib/clang/lib${lib}/lib${lib}.a
.endfor
-LIBADD+= ncursesw pthread
+PACKAGE= clang
+
+DPADD+= ${LIBNCURSESW}
+LDADD+= -lncursesw
BINDIR?= /usr/bin
diff --git a/usr.bin/ssh-copy-id/Makefile b/usr.bin/ssh-copy-id/Makefile
index 033c435bbbfd..93f5ec4a62a9 100644
--- a/usr.bin/ssh-copy-id/Makefile
+++ b/usr.bin/ssh-copy-id/Makefile
@@ -2,5 +2,6 @@
SCRIPTS= ssh-copy-id.sh
MAN= ssh-copy-id.1
+PACKAGE= ssh
.include <bsd.prog.mk>
diff --git a/usr.bin/svn/Makefile.inc b/usr.bin/svn/Makefile.inc
index 330e201186bf..2621238318f3 100644
--- a/usr.bin/svn/Makefile.inc
+++ b/usr.bin/svn/Makefile.inc
@@ -8,6 +8,8 @@ SVNLITE?=
SVNLITE?= lite
.endif
+PACKAGE= svn
+
.if !defined(SVNDIR)
SVNDIR= ${.CURDIR}/../../../contrib/subversion/subversion
diff --git a/usr.sbin/acpi/Makefile.inc b/usr.sbin/acpi/Makefile.inc
index d6ce93b124d5..9692f0abbb4d 100644
--- a/usr.sbin/acpi/Makefile.inc
+++ b/usr.sbin/acpi/Makefile.inc
@@ -4,6 +4,8 @@
ACPICA_DIR= ${.CURDIR}/../../../sys/contrib/dev/acpica
CFLAGS+= -I${.CURDIR}/../../../sys
+PACKAGE= acpi
+
.if exists(${.CURDIR}/../../Makefile.inc)
.include "${.CURDIR}/../../Makefile.inc"
.endif
diff --git a/usr.sbin/bhyve/Makefile b/usr.sbin/bhyve/Makefile
index 0e1a85ed5a37..e1992a7aef5b 100644
--- a/usr.sbin/bhyve/Makefile
+++ b/usr.sbin/bhyve/Makefile
@@ -3,6 +3,7 @@
#
PROG= bhyve
+PACKAGE= bhyve
DEBUG_FLAGS= -g -O0
diff --git a/usr.sbin/bhyvectl/Makefile b/usr.sbin/bhyvectl/Makefile
index 4a33dee94676..c48ca6e67073 100644
--- a/usr.sbin/bhyvectl/Makefile
+++ b/usr.sbin/bhyvectl/Makefile
@@ -4,6 +4,7 @@
PROG= bhyvectl
SRCS= bhyvectl.c
+PACKAGE= bhyve
MAN=
diff --git a/usr.sbin/bhyveload/Makefile b/usr.sbin/bhyveload/Makefile
index fce0c1b663e5..5fa692d4e45c 100644
--- a/usr.sbin/bhyveload/Makefile
+++ b/usr.sbin/bhyveload/Makefile
@@ -3,6 +3,7 @@
PROG= bhyveload
SRCS= bhyveload.c
MAN= bhyveload.8
+PACKAGE= bhyve
LIBADD= vmmapi
diff --git a/usr.sbin/bsdinstall/Makefile b/usr.sbin/bsdinstall/Makefile
index 4e3b7ef326bf..88cb691d8dda 100644
--- a/usr.sbin/bsdinstall/Makefile
+++ b/usr.sbin/bsdinstall/Makefile
@@ -4,5 +4,6 @@ SUBDIR= distextract distfetch partedit scripts
SUBDIR_PARALLEL=
SCRIPTS= bsdinstall
MAN= bsdinstall.8
+PACKAGE= bsdinstall
.include <bsd.prog.mk>
diff --git a/usr.sbin/bsdinstall/Makefile.inc b/usr.sbin/bsdinstall/Makefile.inc
new file mode 100644
index 000000000000..dc4e35b73799
--- /dev/null
+++ b/usr.sbin/bsdinstall/Makefile.inc
@@ -0,0 +1 @@
+PACKAGE=bsdinstall
diff --git a/usr.sbin/bsnmpd/Makefile.inc b/usr.sbin/bsnmpd/Makefile.inc
index 265f86d1ed55..3718a5aaf44d 100644
--- a/usr.sbin/bsnmpd/Makefile.inc
+++ b/usr.sbin/bsnmpd/Makefile.inc
@@ -1,3 +1,4 @@
# $FreeBSD$
+PACKAGE= bsnmp
.include "../Makefile.inc"
diff --git a/usr.sbin/bsnmpd/modules/Makefile.inc b/usr.sbin/bsnmpd/modules/Makefile.inc
index 357b4416c35c..bf633958e82b 100644
--- a/usr.sbin/bsnmpd/modules/Makefile.inc
+++ b/usr.sbin/bsnmpd/modules/Makefile.inc
@@ -1,6 +1,7 @@
# $FreeBSD$
SHLIB_MAJOR= 6
+PACKAGE= bsnmp
MANFILTER= sed -e 's%@MODPATH@%${LIBDIR}/%g' \
-e 's%@DEFPATH@%${DEFSDIR}/%g' \
diff --git a/usr.sbin/bsnmpd/tools/Makefile.inc b/usr.sbin/bsnmpd/tools/Makefile.inc
index e08fe2692f3e..a0bf4a035149 100644
--- a/usr.sbin/bsnmpd/tools/Makefile.inc
+++ b/usr.sbin/bsnmpd/tools/Makefile.inc
@@ -2,6 +2,7 @@
# Author: Shteryana Shopova <syrinx@FreeBSD.org>
BINDIR?= /usr/bin
+PACKAGE= bsnmp
CFLAGS+= -I. -I${.CURDIR}
diff --git a/usr.sbin/unbound/Makefile.inc b/usr.sbin/unbound/Makefile.inc
index 425d7197851c..20cac57b1b79 100644
--- a/usr.sbin/unbound/Makefile.inc
+++ b/usr.sbin/unbound/Makefile.inc
@@ -1,5 +1,6 @@
# $FreeBSD$
NO_WERROR= true
+PACKAGE= unbound
.include "../Makefile.inc"