Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F136169345
D20394.id59391.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
78 KB
Referenced Files
None
Subscribers
None
D20394.id59391.diff
View Options
Index: Makefile
===================================================================
--- Makefile
+++ Makefile
@@ -40,6 +40,7 @@
SUBDIR += net-mgmt
SUBDIR += net-p2p
SUBDIR += news
+SUBDIR += os
SUBDIR += palm
SUBDIR += polish
SUBDIR += ports-mgmt
Index: Mk/Scripts/actual-package-depends.sh
===================================================================
--- Mk/Scripts/actual-package-depends.sh
+++ Mk/Scripts/actual-package-depends.sh
@@ -69,6 +69,66 @@
fi
}
+inject_base_dep() {
+ ORIGIN="${1}"
+ NAME=$(make -C ${PORTSDIR}/${ORIGIN} -V PKGBASE)
+ VERSION=$(make -C ${PORTSDIR}/${ORIGIN} -V PKGVERSION)
+ echo "\"${NAME}\": {origin: \"${ORIGIN}\", version: \"$VERSION\"}"
+}
+
for lookup; do
+ # Ugly, but currently we cannot install BASE packages into read-only poudriere base
+ # This allows us to still inject depends on os/* packages
+ case ${lookup} in
+ /COPYRIGHT)
+ inject_base_dep "os/userland-base"
+ continue
+ ;;
+ /bin/sh)
+ inject_base_dep "os/userland-bin"
+ continue
+ ;;
+ /boot/defaults/loader.conf)
+ inject_base_dep "os/userland-boot"
+ continue
+ ;;
+ /libexec/ld-elf.so.1)
+ inject_base_dep "os/userland-base-bootstrap"
+ continue
+ ;;
+ /etc/rc)
+ inject_base_dep "os/userland-conf"
+ continue
+ ;;
+ /usr/lib/debug/bin/sh.debug)
+ inject_base_dep "os/userland-debug"
+ continue
+ ;;
+ /usr/share/man/man1/sh.1.gz)
+ inject_base_dep "os/userland-docs"
+ continue
+ ;;
+ /usr/lib/libelf.so)
+ inject_base_dep "os/userland-lib"
+ continue
+ ;;
+ /usr/lib32/libc.so)
+ inject_base_dep "os/userland-lib32"
+ continue
+ ;;
+ /rescue/sh)
+ inject_base_dep "os/userland-rescue"
+ continue
+ ;;
+ /sbin/init)
+ inject_base_dep "os/userland-sbin"
+ continue
+ ;;
+ /usr/tests/README)
+ inject_base_dep "os/userland-tests"
+ continue
+ ;;
+ *) ;;
+ esac
${PKG_BIN} query "\"%n\": {origin: \"%o\", version: \"%v\"}" "$(find_dep ${lookup})" || :
done
Index: Mk/Scripts/create-manifest.sh
===================================================================
--- Mk/Scripts/create-manifest.sh
+++ Mk/Scripts/create-manifest.sh
@@ -7,14 +7,14 @@
. "${dp_SCRIPTSDIR}/functions.sh"
-validate_env dp_ACTUAL_PACKAGE_DEPENDS dp_CATEGORIES dp_COMMENT \
+validate_env dp_ABISTRING dp_ACTUAL_PACKAGE_DEPENDS dp_CATEGORIES dp_COMMENT \
dp_COMPLETE_OPTIONS_LIST dp_DEPRECATED dp_DESCR dp_EXPIRATION_DATE \
dp_GROUPS dp_LICENSE dp_LICENSE_COMB dp_MAINTAINER dp_METADIR \
dp_NO_ARCH dp_PKGBASE dp_PKGDEINSTALL dp_PKGINSTALL dp_PKGMESSAGES \
dp_PKGORIGIN dp_PKGPOSTDEINSTALL dp_PKGPOSTINSTALL dp_PKGPOSTUPGRADE \
dp_PKGPREDEINSTALL dp_PKGPREINSTALL dp_PKGPREUPGRADE dp_PKGUPGRADE \
dp_PKGVERSION dp_PKG_BIN dp_PKG_IGNORE_DEPENDS dp_PKG_NOTES \
- dp_PORT_OPTIONS dp_PREFIX dp_USERS dp_WWW
+ dp_PORT_OPTIONS dp_PREFIX dp_USERS dp_WWW dp_VITAL
[ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_CREATE_MANIFEST}" ] && set -x
@@ -57,8 +57,14 @@
[ -z "${dp_LICENSE}" ] || echo "licenses: [ ${dp_LICENSE} ]"
[ -z "${dp_USERS}" ] || echo "users: [ ${dp_USERS} ]"
[ -z "${dp_GROUPS}" ] || echo "groups: [ ${dp_GROUPS} ]"
-[ -n "${dp_NO_ARCH}" ] && echo "arch : $(${dp_PKG_BIN} config abi | tr '[:upper:]' '[:lower:]' | cut -d: -f1,2):*"
-[ -n "${dp_NO_ARCH}" ] && echo "abi : $(${dp_PKG_BIN} config abi | cut -d: -f1,2):*"
+if [ -n "${dp_NO_ARCH}" -a -z "${dp_ABISTRING}" ] ; then
+ echo "arch : $(${dp_PKG_BIN} config abi | tr '[:upper:]' '[:lower:]' | cut -d: -f1,2):*"
+ echo "abi : $(${dp_PKG_BIN} config abi | cut -d: -f1,2):*"
+elif [ -n "${dp_ABISTRING}" ] ; then
+ echo "arch : $(echo ${dp_ABISTRING} | tr '[:upper:]' '[:lower:]')"
+ echo "abi : $(echo ${dp_ABISTRING})"
+fi
+[ -n "${dp_VITAL}" ] && echo "vital: true"
# Then the key/values sections
echo "deps: { "
Index: Mk/bsd.commands.mk
===================================================================
--- Mk/bsd.commands.mk
+++ Mk/bsd.commands.mk
@@ -22,6 +22,7 @@
BZCAT?= /usr/bin/bzcat
BZIP2_CMD?= /usr/bin/bzip2
CAT?= /bin/cat
+CHFLAGS?= /bin/chflags
CHGRP?= /usr/bin/chgrp
CHMOD?= /bin/chmod
CHOWN?= /usr/sbin/chown
Index: Mk/bsd.port.mk
===================================================================
--- Mk/bsd.port.mk
+++ Mk/bsd.port.mk
@@ -2533,7 +2533,7 @@
deskutils devel docs dns editors elisp emulators enlightenment finance french ftp \
games geography german gnome gnustep graphics hamradio haskell hebrew hungarian \
ipv6 irc japanese java kde ${_KDE_CATEGORIES_SUPPORTED} kld korean lang linux lisp \
- mail mate math mbone misc multimedia net net-im net-mgmt net-p2p news \
+ mail mate math mbone misc multimedia net net-im net-mgmt net-p2p news os \
palm parallel pear perl5 plan9 polish portuguese ports-mgmt \
print python ruby rubygems russian \
scheme science security shells spanish sysutils \
@@ -4211,7 +4211,7 @@
for lib in ${LIB_DEPENDS:C/\:.*//}; do \
depfiles="$$depfiles `${SETENV} LIB_DIRS="${LIB_DIRS}" LOCALBASE="${LOCALBASE}" ${SH} ${SCRIPTSDIR}/find-lib.sh $${lib}`" ; \
done ; \
- ${SETENV} PKG_BIN="${PKG_BIN}" ${SH} ${SCRIPTSDIR}/actual-package-depends.sh $${depfiles} ${RUN_DEPENDS:C/(.*)\:.*/"\1"/}
+ ${SETENV} PKG_BIN="${PKG_BIN}" PORTSDIR="${PORTSDIR}" ${SH} ${SCRIPTSDIR}/actual-package-depends.sh $${depfiles} ${RUN_DEPENDS:C/(.*)\:.*/"\1"/}
PKG_NOTES_ENV?=
.for note in ${PKG_NOTES}
@@ -4221,6 +4221,7 @@
create-manifest:
@${SETENV} \
dp_SCRIPTSDIR='${SCRIPTSDIR}' \
+ dp_ABISTRING='${PKG_ABISTRING}' \
dp_ACTUAL_PACKAGE_DEPENDS='${ACTUAL-PACKAGE-DEPENDS}' \
dp_CATEGORIES='${CATEGORIES:u:S/$/,/}' \
dp_COMMENT=${COMMENT:Q} \
@@ -4254,6 +4255,7 @@
dp_PREFIX='${PREFIX}' \
dp_USERS='${USERS:u:S/$/,/}' \
dp_WWW='${WWW}' \
+ dp_VITAL='${PKGVITAL}' \
${PKG_NOTES_ENV} \
${SH} ${SCRIPTSDIR}/create-manifest.sh
Index: os/Makefile
===================================================================
--- /dev/null
+++ os/Makefile
@@ -0,0 +1,30 @@
+# $FreeBSD$
+#
+
+ COMMENT = Operating System Ports
+
+ SUBDIR += buildkernel
+ SUBDIR += buildkernel-debug
+ SUBDIR += buildworld
+ SUBDIR += kernel
+ SUBDIR += kernel-symbols
+ SUBDIR += kernel-debug
+ SUBDIR += kernel-debug-symbols
+ SUBDIR += src
+ SUBDIR += userland
+ SUBDIR += userland-base
+ SUBDIR += userland-base-bootstrap
+ SUBDIR += userland-bin
+ SUBDIR += userland-boot
+ SUBDIR += userland-conf
+ SUBDIR += userland-debug
+ SUBDIR += userland-devel
+ SUBDIR += userland-docs
+ SUBDIR += userland-lib
+ SUBDIR += userland-lib32
+ SUBDIR += userland-lib32-devel
+ SUBDIR += userland-rescue
+ SUBDIR += userland-sbin
+ SUBDIR += userland-tests
+
+.include <bsd.port.subdir.mk>
Index: os/Makefile.common
===================================================================
--- /dev/null
+++ os/Makefile.common
@@ -0,0 +1,26 @@
+BASEPKG_SRCDIR?= /usr/src
+NEWVERS= ${BASEPKG_SRCDIR}/sys/conf/newvers.sh
+BASEPKG_VERSION= ${BASEPKG_SRCDIR}/sys/conf/package-version
+
+.if exists(${BASEPKG_SRCDIR}/Makefile)
+SRCVERSION!= eval $$(egrep '^(REVISION)=' ${NEWVERS}) && echo $${REVISION}
+. if exists(${BASEPKG_VERSION})
+# We have a manually set version string, lets use it
+MANUALVER!= cat ${BASEPKG_VERSION}
+BASEPKG_PORTVERSION= ${SRCVERSION}.${MANUALVER}
+. else
+# Get the version from BASEPKG_SRCDIR dynamically
+SRCDATE!= stat -f %Sm -t "%Y%m%d%H%M%S" ${BASEPKG_SRCDIR}
+BASEPKG_PORTVERSION= ${SRCVERSION}.${SRCDATE}
+. endif
+.else
+IGNORE= Missing system sources in ${BASEPKG_SRCDIR}
+.endif
+
+.if defined(BASEPKG_ABISTRING)
+PKG_ABISTRING= ${BASEPKG_ABISTRING}
+.else
+ABIVERSION!= eval $$(egrep '^(REVISION)=' ${NEWVERS}) && echo $${REVISION} | cut -d '.' -f 1
+PKG_ABISTRING= FreeBSD:${ABIVERSION}:${ARCH}
+.endif
+
Index: os/buildkernel-debug/Makefile
===================================================================
--- /dev/null
+++ os/buildkernel-debug/Makefile
@@ -0,0 +1,84 @@
+# $FreeBSD$
+
+PORTNAME= buildkernel-debug
+PORTVERSION= ${BASEPKG_PORTVERSION}
+CATEGORIES= os
+PKGNAMEPREFIX= ${OS_PKGNAMEPREFIX}
+DISTFILES=
+EXTRACT_ONLY=
+
+MAINTAINER= kmoore@FreeBSD.org
+COMMENT= Buildkernel portition of os packages with debug enabled
+
+SRCDIR?=/usr/src
+.if !exists(${SRCDIR}/Makefile)
+BUILD_DEPENDS= ${SRCDIR}/Makefile:os/src
+.endif
+
+USES= os:flavors
+
+PREFIX=/
+WITHOUT_FBSD10_FIX= yes
+WRKSRC=${SRCDIR}
+PLIST_FILES+= ${OS_KERNDIST_DEBUG}
+LOCAL_SDIR?= /usr/local_source
+NEED_ROOT= yes
+.if exists(${LOCAL_SDIR}/${PORTNAME})
+WRKSRC= ${LOCAL_SDIR}/${PORTNAME}
+.endif
+
+# Set default debug config
+.if defined(${DEBUGKERNCONF})
+KERNCONF= ${DEBUGKERNCONF}
+.else
+KERNCONF= GENERIC
+.endif
+
+.if defined(_MAKE_JOBS_NUMBER)
+JOBFLAG= -j ${_MAKE_JOBS_NUMBER}
+.else
+JOBFLAG= -j ${_SMP_CPUS}
+.endif
+
+.if defined(__MAKE_CONF)
+MCONF= __MAKE_CONF=${__MAKE_CONF}
+.else
+MCONF=
+.endif
+
+.include "../buildworld/Makefile.options"
+.include "../buildworld/Makefile.options.desc"
+
+.include <bsd.port.pre.mk>
+
+.for var in ${OPTIONS_DEFINE}
+.if !${PORT_OPTIONS:M${var}}
+MFLAGS+= WITHOUT_${var}=YES
+.else
+MFLAGS+= WITH_${var}=YES
+.endif
+.endfor
+
+check-sanity:
+
+do-build:
+ cd ${WRKSRC} && ${SETENV} -i MAKEOBJDIRPREFIX=${WRKDIR} make ${JOBFLAG} ${MCONF} ${KERNEL_MAKE_FLAGS} \
+ KERNCONF=${KERNCONF} \
+ ${MFLAGS} \
+ buildkernel
+
+do-install:
+ @${MKDIR} ${STAGEDIR}kernel-debug
+ @${MKDIR} ${STAGEDIR}usr/dist
+ cd ${WRKSRC} && ${SETENV} -i MAKEOBJDIRPREFIX=${WRKDIR} make ${JOBFLAG} ${MCONF} ${KERNEL_MAKE_FLAGS} \
+ KERNCONF=${KERNCONF} \
+ ${MFLAGS} \
+ DESTDIR=${STAGEDIR}kernel-debug \
+ installkernel
+ ${MV} ${STAGEDIR}kernel-debug/boot/kernel ${STAGEDIR}kernel-debug/boot/kernel-debug
+ ${TAR} cvJf ${STAGEDIR}${OS_KERNDIST_DEBUG} -C ${STAGEDIR}kernel-debug .
+ ${CHFLAGS} -R noschg ${STAGEDIR}kernel-debug
+ ${RM} -rf ${STAGEDIR}kernel-debug
+
+.include "../Makefile.common"
+.include <bsd.port.post.mk>
Index: os/buildkernel-debug/pkg-descr
===================================================================
--- /dev/null
+++ os/buildkernel-debug/pkg-descr
@@ -0,0 +1,3 @@
+Debug Kernel build for ports
+
+WWW: https://github.com/trueos/trueos
Index: os/buildkernel/Makefile
===================================================================
--- /dev/null
+++ os/buildkernel/Makefile
@@ -0,0 +1,83 @@
+# $FreeBSD$
+
+PORTNAME= buildkernel
+PORTVERSION= ${BASEPKG_PORTVERSION}
+CATEGORIES= os
+PKGNAMEPREFIX= ${OS_PKGNAMEPREFIX}
+DISTFILES=
+EXTRACT_ONLY=
+
+MAINTAINER= kmoore@FreeBSD.org
+COMMENT= Buildkernel portition of os packages
+
+SRCDIR?=/usr/src
+.if !exists(${SRCDIR}/Makefile)
+BUILD_DEPENDS= ${SRCDIR}/Makefile:os/src
+.endif
+
+USES= os:flavors
+
+PREFIX=/
+WITHOUT_FBSD10_FIX= yes
+WRKSRC=${SRCDIR}
+PLIST_FILES+= ${OS_KERNDIST}
+LOCAL_SDIR?= /usr/local_source
+NEED_ROOT= yes
+.if exists(${LOCAL_SDIR}/${PORTNAME})
+WRKSRC= ${LOCAL_SDIR}/${PORTNAME}
+.endif
+
+# Set default non-debug config for HEAD / Other
+.if exists(${SRCDIR}/sys/${ARCH}/conf/GENERIC-NODEBUG)
+KERNCONF?= GENERIC-NODEBUG
+.else
+KERNCONF?= GENERIC
+.endif
+
+.if defined(_MAKE_JOBS_NUMBER)
+JOBFLAG= -j ${_MAKE_JOBS_NUMBER}
+.else
+JOBFLAG= -j ${_SMP_CPUS}
+.endif
+
+.if defined(__MAKE_CONF)
+MCONF= __MAKE_CONF=${__MAKE_CONF}
+.else
+MCONF=
+.endif
+
+.include "../buildworld/Makefile.options"
+.include "../buildworld/Makefile.options.desc"
+
+.include <bsd.port.pre.mk>
+
+.for var in ${OPTIONS_DEFINE}
+.if !${PORT_OPTIONS:M${var}}
+MFLAGS+= WITHOUT_${var}=YES
+.else
+MFLAGS+= WITH_${var}=YES
+.endif
+.endfor
+
+check-sanity:
+
+do-build:
+ cd ${WRKSRC} && ${SETENV} -i MAKEOBJDIRPREFIX=${WRKDIR} make ${JOBFLAG} ${MCONF} ${KERNEL_MAKE_FLAGS} \
+ KERNCONF=${KERNCONF} \
+ ${MFLAGS} \
+ buildkernel
+
+do-install:
+ @${MKDIR} ${STAGEDIR}kernel
+ @${MKDIR} ${STAGEDIR}usr/dist
+ cd ${WRKSRC} && ${SETENV} -i MAKEOBJDIRPREFIX=${WRKDIR} make ${JOBFLAG} ${MCONF} ${KERNEL_MAKE_FLAGS} \
+ KERNCONF=${KERNCONF} \
+ ${MFLAGS} \
+ DESTDIR=${STAGEDIR}kernel \
+ installkernel
+ ${TAR} cvJf ${STAGEDIR}${OS_KERNDIST} -C ${STAGEDIR}kernel .
+ ${CHFLAGS} -R noschg ${STAGEDIR}kernel
+ ${RM} -rf ${STAGEDIR}kernel
+
+.include "../Makefile.common"
+.include <bsd.port.post.mk>
Index: os/buildkernel/pkg-descr
===================================================================
--- /dev/null
+++ os/buildkernel/pkg-descr
@@ -0,0 +1,3 @@
+Kernel build for ports
+
+WWW: https://github.com/trueos/trueos
Index: os/buildworld/Makefile
===================================================================
--- /dev/null
+++ os/buildworld/Makefile
@@ -0,0 +1,96 @@
+# $FreeBSD$
+
+PORTNAME= buildworld
+PORTVERSION= ${BASEPKG_PORTVERSION}
+CATEGORIES= os
+PKGNAMEPREFIX= ${OS_PKGNAMEPREFIX}
+DISTFILES=
+EXTRACT_ONLY=
+
+MAINTAINER= kmoore@FreeBSD.org
+COMMENT= Port for the buildworld phase of OS
+
+BUILD_DEPENDS= ${SRCDIR}/Makefile:os/src
+
+USES= os:flavors
+
+PREFIX=/
+SRCDIR?= /usr/src
+WRKSRC=${SRCDIR}
+WITHOUT_FBSD10_FIX= yes
+LOCAL_SDIR?= /usr/local_source
+NEED_ROOT= yes
+.if exists(${LOCAL_SDIR}/${PORTNAME})
+WRKSRC= ${LOCAL_SDIR}/${PORTNAME}
+.endif
+
+.include "Makefile.options"
+.include "Makefile.options.desc"
+
+.include <bsd.port.pre.mk>
+
+.for var in ${OPTIONS_DEFINE}
+.if !${PORT_OPTIONS:M${var}}
+MFLAGS+= WITHOUT_${var}=YES
+.else
+MFLAGS+= WITH_${var}=YES
+.endif
+.endfor
+
+.if defined(_MAKE_JOBS_NUMBER)
+JOBFLAG= -j ${_MAKE_JOBS_NUMBER}
+.else
+JOBFLAG= -j ${_SMP_CPUS}
+.endif
+
+.if defined(__MAKE_CONF)
+MCONF= __MAKE_CONF=${__MAKE_CONF}
+.else
+MCONF=
+.endif
+
+PLIST_FILES+= ${OS_WORLDDIST}
+
+# This is broken right now
+#MFLAGS+= MAKEOBJDIRPREFIX=${WRKDIR}/obj
+
+check-sanity:
+
+do-build:
+ cd ${WRKSRC} && ${SETENV} -i MAKEOBJDIRPREFIX=${WRKDIR} make ${JOBFLAG} ${MCONF} ${WORLD_MAKE_FLAGS} \
+ ${MFLAGS} \
+ buildworld
+
+do-install:
+ @${MKDIR} ${STAGEDIR}world
+ @${MKDIR} ${STAGEDIR}usr/dist
+ cd ${WRKSRC} && ${SETENV} -i MAKEOBJDIRPREFIX=${WRKDIR} make ${JOBFLAG} ${MCONF} ${WORLD_MAKE_FLAGS} \
+ ${MFLAGS} \
+ DESTDIR=${STAGEDIR}world \
+ installworld
+ cd ${WRKSRC} && ${SETENV} -i MAKEOBJDIRPREFIX=${WRKDIR} make ${JOBFLAG} ${MCONF} ${WORLD_MAKE_FLAGS} \
+ ${MFLAGS} \
+ DESTDIR=${STAGEDIR}world \
+ distribution
+ if [ -e "${PORTSDIR}/local_source/trueos-manifest.json" ] ; then \
+ ${INSTALL_SCRIPT} ${FILESDIR}/trueos-manifest.json ${STAGEDIR}world/var/db/trueos-manifest.json ; \
+ elif [ -n "${TRUEOS_MANIFEST}" -a -e "${TRUEOS_MANIFEST}" ] ; then \
+ ${INSTALL_SCRIPT} ${TRUEOS_MANIFEST} ${STAGEDIR}world/var/db/trueos-manifest.json ; \
+ fi
+ ${TAR} cvJf ${STAGEDIR}${OS_WORLDDIST} -C ${STAGEDIR}world .
+ ${CHFLAGS} -R noschg ${STAGEDIR}world
+ ${RM} -rf ${STAGEDIR}world
+
+clean:
+ @if [ -d ${WRKDIR} ]; then \
+ if [ -w ${WRKDIR} ]; then \
+ ${ECHO_MSG} "===> Cleaning for ${PKGNAME}"; \
+ ${CHFLAGS} -R noschg ${WRKDIR} ; \
+ ${RM} -r ${WRKDIR}; \
+ else \
+ ${ECHO_MSG} "===> ${WRKDIR} not writable, skipping"; \
+ fi; \
+ fi
+
+.include "../Makefile.common"
+.include <bsd.port.post.mk>
Index: os/buildworld/Makefile.options
===================================================================
--- /dev/null
+++ os/buildworld/Makefile.options
@@ -0,0 +1,275 @@
+
+OPTIONS_DEFINE= ACCT \
+ ACPI \
+ AMD \
+ APM \
+ AT \
+ ASSERT_DEBUG \
+ ATM \
+ AUDIT \
+ AUTHPF \
+ AUTOFS \
+ BHYVE \
+ BINUTILS \
+ BINUTILS_BOOTSTRAP \
+ BLACKLIST \
+ BLUETOOTH \
+ BOOT \
+ BOOTPARAMD \
+ BOOTPD \
+ BSD_CPIO \
+ BSD_CRTBEGIN \
+ BSD_GREP \
+ BSDINSTALL \
+ BSNMP \
+ BZIP2 \
+ CALENDAR \
+ CAPSICUM \
+ CASPER \
+ CCD \
+ CDDL \
+ CPP \
+ CROSS_COMPILER \
+ CRYPT \
+ CUSE \
+ CXX \
+ CXGBETOOL \
+ DIALOG \
+ DICT \
+ DMAGENT \
+ DYNAMICROOT \
+ EE \
+ EFI \
+ ELFTOOLCHAIN_BOOTSTRAP \
+ EXAMPLES \
+ FDT \
+ FILE \
+ FINGER \
+ FLOPPY \
+ FMTREE \
+ FP_LIBC \
+ FREEBSD_UPDATE \
+ FTP \
+ GAMES \
+ GCOV \
+ GDB \
+ GNU_DIFF \
+ GNU_GREP \
+ GPIO \
+ HAST \
+ HTML \
+ HYPERV \
+ ICONV \
+ INET \
+ INET6 \
+ INETD \
+ IPFILTER \
+ IPFW \
+ ISCSI \
+ JAIL \
+ KDUMP \
+ KVM \
+ LDNS \
+ LDNS_UTILS \
+ LEGACY_CONSOLE \
+ LIB32 \
+ LIBPTHREAD \
+ LIBTHR \
+ LLVM_COV \
+ LOADER_EFI_SECUREBOOT \
+ LOADER_GELI \
+ LOADER_OFW \
+ LOADER_UBOOT \
+ LOCALES \
+ LOCATE \
+ LPR \
+ LS_COLORS \
+ LZMA_SUPPORT \
+ MAIL \
+ MAILWRAPPER \
+ MAKE \
+ META_MODE \
+ MLX5TOOL \
+ NDIS \
+ NETCAT \
+ NETGRAPH \
+ NLS_CATALOGS \
+ NS_CACHING \
+ NTP \
+ NVME \
+ OFED \
+ PC_SYSINSTALL \
+ PF \
+ PKGBOOTSTRAP \
+ PMC \
+ PORTSNAP \
+ PPP \
+ QUOTAS \
+ RADIUS_SUPPORT \
+ RBOOTD \
+ REPRODUCIBLE_BUILD \
+ RESCUE \
+ ROUTED \
+ SENDMAIL \
+ SERVICESDB \
+ SETUID_LOGIN \
+ SHAREDOCS \
+ SOURCELESS_HOST \
+ SOURCELESS_UCODE \
+ SVNLITE \
+ SYSCONS \
+ SYSTEM_COMPILER \
+ SYSTEM_LINKER \
+ TALK \
+ TCP_WRAPPERS \
+ TCSH \
+ TELNET \
+ TEXTPROC \
+ TFTP \
+ UNBOUND \
+ USB \
+ UTMPX \
+ VI \
+ VT \
+ WIRELESS \
+ WPA_SUPPLICANT_EAPOL \
+ ZFS \
+ LOADER_ZFS \
+ ZONEINFO
+
+OPTIONS_DEFAULT= ACCT \
+ ACPI \
+ AMD \
+ APM \
+ AT \
+ ATM \
+ AUDIT \
+ AUTHPF \
+ AUTOFS \
+ BHYVE \
+ BINUTILS \
+ BINUTILS_BOOTSTRAP \
+ BLACKLIST \
+ BLUETOOTH \
+ BOOT \
+ BOOTPARAMD \
+ BOOTPD \
+ BSD_CPIO \
+ BSD_CRTBEGIN \
+ BSD_GREP \
+ BSDINSTALL \
+ BSNMP \
+ BZIP2 \
+ CALENDAR \
+ CAPSICUM \
+ CASPER \
+ CCD \
+ CDDL \
+ CPP \
+ CROSS_COMPILER \
+ CRYPT \
+ CUSE \
+ CXX \
+ CXGBETOOL \
+ DIALOG \
+ DICT \
+ DMAGENT \
+ DYNAMICROOT \
+ EE \
+ EFI \
+ ELFTOOLCHAIN_BOOTSTRAP \
+ EXAMPLES \
+ FDT \
+ FILE \
+ FINGER \
+ FLOPPY \
+ FMTREE \
+ FP_LIBC \
+ FREEBSD_UPDATE \
+ FTP \
+ GAMES \
+ GCOV \
+ GDB \
+ GNU_DIFF \
+ GNU_GREP \
+ GPIO \
+ HAST \
+ HTML \
+ HYPERV \
+ ICONV \
+ INET \
+ INET6 \
+ INETD \
+ IPFILTER \
+ IPFW \
+ ISCSI \
+ JAIL \
+ KDUMP \
+ KVM \
+ LDNS \
+ LDNS_UTILS \
+ LEGACY_CONSOLE \
+ LIB32 \
+ LIBPTHREAD \
+ LIBTHR \
+ LLVM_COV \
+ LOADER_GELI \
+ LOADER_OFW \
+ LOADER_UBOOT \
+ LOCALES \
+ LOCATE \
+ LPR \
+ LS_COLORS \
+ LZMA_SUPPORT \
+ MAIL \
+ MAILWRAPPER \
+ MAKE \
+ MLX5TOOL \
+ NDIS \
+ NETCAT \
+ NETGRAPH \
+ NLS_CATALOGS \
+ NS_CACHING \
+ NTP \
+ NVME \
+ OFED \
+ PC_SYSINSTALL \
+ PF \
+ PKGBOOTSTRAP \
+ PMC \
+ PORTSNAP \
+ PPP \
+ QUOTAS \
+ RADIUS_SUPPORT \
+ RBOOTD \
+ REPRODUCIBLE_BUILD \
+ RESCUE \
+ ROUTED \
+ SENDMAIL \
+ SERVICESDB \
+ SETUID_LOGIN \
+ SHAREDOCS \
+ SOURCELESS_HOST \
+ SOURCELESS_UCODE \
+ SVNLITE \
+ SYSCONS \
+ SYSTEM_COMPILER \
+ SYSTEM_LINKER \
+ TALK \
+ TCP_WRAPPERS \
+ TCSH \
+ TELNET \
+ TEXTPROC \
+ TFTP \
+ UNBOUND \
+ USB \
+ UTMPX \
+ VI \
+ VT \
+ WIRELESS \
+ WPA_SUPPLICANT_EAPOL \
+ ZFS \
+ LOADER_ZFS \
+ ZONEINFO
+
+OPTIONS_SUB= yes
Index: os/buildworld/Makefile.options.desc
===================================================================
--- /dev/null
+++ os/buildworld/Makefile.options.desc
@@ -0,0 +1,139 @@
+# $FreeBSD$
+
+ACCT_DESC= Build process accounting tools such as "accton" and "sa"
+ACPI_DESC= Build "acpiconf", "acpidump", and related programs
+AMD_DESC= Build "amd" and related programs
+APM_DESC= Build "apm", "apmd", and related programs
+ASSERT_DEBUG_DESC= Compile with the "assert" debugging checks enabled
+AT_DESC= Build "at" and related utilities
+ATM_DESC= Build programs and libraries related to ATM networking.
+AUDIT_DESC= Build audit support into system programs
+AUTHPF_DESC= Build "authpf"
+AUTOFS_DESC= Build "autofs" related programs, libraries, and kernel modules
+BHYVE_DESC= Build "bhyve", associated utilities, and examples.
+BINUTILS_DESC= Build GNU "as", "objdump", and "ld.bfd". Required to build programs from source.
+BINUTILS_BOOTSTRAP_DESC= Build binutils as part of the bootstrap process.
+BLACKLIST_DESC= Build "blacklistd" and "blacklistctl"
+BLUETOOTH_DESC= Build Bluetooth related kernel modules, programs, and libraries.
+BOOT_DESC= Build the boot blocks and loader
+BOOTPARAMD_DESC= Build "bootparamd" utility.
+BOOTPD_DESC= Build "bootpd" utility.
+BSD_CPIO_DESC= Build the BSD licensed version of cpio based on "libarchive"
+BSD_CRTBEGIN_DESC= Build the BSD licensed "crtbegin.o" and "crtend.o"
+BSD_GREP_DESC= Build the BSD "grep" instead of the GNU "[ef]grep"
+BSDINSTALL_DESC= Build "bsdinstall", "sade", and related programs
+BSNMP_DESC= Build "bsnmpd" and related libraries and data files.
+BZIP2_DESC= Build contributed "bzip2" software as part of the base system
+CALENDAR_DESC= Build the "calendar" utility
+CAPSICUM_DESC= Build Capsicum support into system programs
+CASPER_DESC= Build Casper program and related libraries
+CCD_DESC= Build "geom_ccd" and related utilities
+CDDL_DESC= Build code licensed under Sun's CDDL
+CPP_DESC= Build "cpp" utility
+CROSS_COMPILER_DESC=
+CRYPT_DESC= Build crypto code
+CUSE_DESC= Build CUSE-related programs and libraries
+CXX_DESC= Build "c++" and related libraries. Includes "gperf" and "devd".
+CXGBETOOL_DESC= Build "cxgbetool"
+DIALOG_DESC= Build "dialog" and "dpv"
+DICT_DESC= Build Webster dictionary files
+DMAGENT_DESC= Build dma Mail Transport Agent
+DYNAMICROOT_DESC= Link "/bin" and "/sbin" dynamically
+EE_DESC= Build "edit", "ee", and related programs.
+EFI_DESC= Build "efivar"
+ELFTOOLCHAIN_BOOTSTRAP_DESC= Build ELF Tool Chain tools ("addr2line", "nm", "size", "strings", "strip") as part of the bootstrap process.
+EXAMPLES_DESC= Install example files in /usr/share/examples
+FDT_DESC= Build Flattened Device Tree support. Includes device tree compiler (dtc) and "libfdt"
+FILE_DESC= Build "file" and related programs
+FINGER_DESC= Build "finger" and "fingerd"
+FLOPPY_DESC= Build programs for operating floppy disk drivers
+FMTREE_DESC= Build /usr/sbin/fmtree
+FP_LIBC_DESC= Build "libc" with floating-point support
+FREEBSD_UPDATE_DESC= Build "freebsd-update"
+FTP_DESC= Build "ftp" and "ftpd"
+GAMES_DESC= Build games
+GCOV_DESC= Build "gcov" utility
+GDB_DESC= Build "gdb" utility
+GNU_DIFF_DESC= Build GNU "diff" and "diff3"
+GNU_GREP_DESC= Build GNU "grep"
+GPIO_DESC= Build "gpioctl" as part of the base system
+HAST_DESC= Build "hastd" and related utilities
+HTML_DESC= Build HTML documentation
+HYPERV_DESC= Build HyperV utilities
+ICONV_DESC= Build "iconv" as part of "libc"
+INET_DESC= Build programs and libraries related to IPv4 networking
+INET6_DESC= Build programs and libraries related to IPv6 networking
+INETD_DESC= Build "inetd" utility
+IPFILTER_DESC= Build the IP Filter utilities
+IPFW_DESC= Build the IPFW tools
+ISCSI_DESC= Build "iscsid" ad related utilities.
+JAIL_DESC= Build tools for the support of jails, such as "jail"
+KDUMP_DESC= Build "kdump" and "truss"
+KVM_DESC= Build "libkvm" as part of the base system
+LDNS_DESC= Build the LDNS library
+LDNS_UTILS_DESC= Build the LDNS utilities "drill" and "host"
+LEGACY_CONSOLE_DESC= Build legacy PC console support programs "kbdcontrol" and "vidcontrol"
+LIB32_DESC= Build the 32-bit library set and "ld-elf32.so.1" runtime linker
+LIBPTHREAD_DESC= Build the "libpthread" providing library, "libthr"
+LIBTHR_DESC= Build the "libthr" library (1:1 threading)
+LLVM_COV_DESC= Build the "llvm-cov" utility
+LOADER_EFI_SECUREBOOT= Build "loader" with support for verification from UEFI certificates
+LOADER_GELI_DESC= Include GELI crypto support in the boot chain binaries
+LOADER_OFW_DESC= Build openfirmware bootloader components
+LOADER_UBOOT_DESC= Build ubldr
+LOADER_ZFS_DESC= Build ZFS file system boot loader support.
+LOCALES_DESC= Build localization files such as "locale"
+LOCATE_DESC= Build "locate" and related programs
+LPR_DESC= Build "lpr" and related programs
+LS_COLORS_DESC= Build "ls" with support for colors to distinguish file types
+LZMA_SUPPORT_DESC= Build programs with optional "lzma" compression support
+MAIL_DESC= Build mail support (MUA/MTA)
+MAILWRAPPER_DESC= Build the "mailwrapper" MTA selector
+MAKE_DESC= Install "make" and related support files
+META_MODE_DESC= Incremental build mode
+MLX5TOOL_DESC= Build "mlx5tool"
+NDIS_DESC= Build programs and libraries related to NDIS emulation support
+NETCAT_DESC= Build the "nc" utility
+NETGRAPH_DESC= Build applications to support "netgraph" library functions
+NLS_CATALOGS_DESC= Build NLS catalog support for "csh"
+NS_CACHING_DESC= Enable name caching in the "nsswitch" subsystem, and build "nscd" utility.
+NTP_DESC= Build "ntpd" and related programs
+NVME_DESC= Build NVME related tools and kernel modules
+OFED_DESC= OpenFabrics Enterprise Distribution drivers such as Infiniband drivers
+PC_SYSINSTALL_DESC= Build "pc-sysinstall" and related programs
+PF_DESC= Build PF firewall package
+PKGBOOTSTRAP_DESC= Build "pkg" bootstrap tool
+PMC_DESC= Build "pmccontrol" and related programs.
+PORTSNAP_DESC= Build "portsnap" and related files
+PPP_DESC= Build "ppp" and related programs
+QUOTAS_DESC= Build "quota" and related programs
+RADIUS_SUPPORT_DESC= Build radius support into applications like "pad_radius" and "ppp"
+RBOOTD_DESC= Build "rbootd"
+REPRODUCIBLE_BUILD_DESC= Avoid placing build metadata (build time, user, host) in the kernel, boot loaders, and uname output.
+RESCUE_DESC= Build "rescue" utilities in /rescue
+ROUTED_DESC= Build "routed" utility
+SENDMAIL_DESC= Build "sendmail" and related programs
+SERVICESDB_DESC= Install "/var/db/services.db"
+SETUID_LOGIN_DESC= Allow "login" to be a set-user-ID root program
+SHAREDOCS_DESC= Build the BSD4.4 legacy documentaion
+SOURCELESS_HOST_DESC= Build kernel modules that include sourceless native code for host CPU
+SOURCELESS_UCODE_DESC= Build kernel modules that include sourceless microcode
+SVNLITE_DESC= Build "svnlite" and related programs
+SYSCONS_DESC= Build "syscons" support files such as keyboard maps, fonts, and screen output maps.
+SYSTEM_COMPILER_DESC= Try to skip building a cross-compiler during bootstrap phase of build.
+SYSTEM_LINKER_DESC= Try to skip building a cross-linker during the bootstrap phase of the build. Required LLD_BOOTSTRAP option.
+TALK_DESC= Build "talk" and "talkd" utilities
+TCP_WRAPPERS_DESC= Build "tcpd" and related utilities
+TCSH_DESC= Build /bin/csh (which is actually tcsh)
+TELNET_DESC= Build "telnet" and related programs
+TEXTPROC_DESC= Build programs used for text processing
+TFTP_DESC= Build "tftp" and "tftpd"
+UNBOUND_DESC= Build "unbound" and related programs
+USB_DESC= Build USB-related programs and libraries
+UTMPX_DESC= Build user accounting tools such as "last", "users", "who", "ac", "lastlogin", and "utx"
+VI_DESC= Build "vi", "view", "ex", and related programs
+VT_DESC= Build "vt" support files (fonts and keymaps)
+WIRELESS_DESC= Build programs used for 802.11 wireless networks such as "wpa_supplicant" and "hostapd".
+WPA_SUPPLICANT_EAPOL_DESC= Build "wpa_supplicant" with support for the EAP-[PEAP, TLS, LEAP, and TTLS] protocols.
+ZFS_DESC= Build base system ZFS
+ZONEINFO_DESC= Build the timezone database
Index: os/buildworld/pkg-descr
===================================================================
--- /dev/null
+++ os/buildworld/pkg-descr
@@ -0,0 +1,4 @@
+Creation of world.txz dist file for other
+package builds to assemble from.
+
+WWW: https://github.com/trueos/trueos
Index: os/kernel-debug-symbols/Makefile
===================================================================
--- /dev/null
+++ os/kernel-debug-symbols/Makefile
@@ -0,0 +1,41 @@
+# $FreeBSD$
+
+PORTNAME= kernel-debug-symbols
+PORTVERSION= ${BASEPKG_PORTVERSION}
+CATEGORIES= os
+PKGNAMEPREFIX= ${OS_PKGNAMEPREFIX}
+DISTFILES=
+EXTRACT_ONLY=
+
+MAINTAINER= kmoore@FreeBSD.org
+COMMENT= Port for the kernel debug symbol files
+
+BUILD_DEPENDS= ${OS_KERNDIST_DEBUG}:os/buildkernel-debug@${OS_FLAVOR}
+
+USES= os:flavors
+
+PREFIX=/
+NEED_ROOT= yes
+
+.include <bsd.port.pre.mk>
+
+do-build:
+ @${MKDIR} ${STAGEDIR}
+ ${ECHO_MSG} "==> Extracting ${OS_KERNDIST_DEBUG}..."
+ ${TAR} xpf ${OS_KERNDIST_DEBUG} -C ${STAGEDIR}
+ ${MV} ${STAGEDIR}usr/lib/debug/boot/kernel ${STAGEDIR}usr/lib/debug/boot/kernel-debug
+
+do-install:
+ ${ECHO_MSG} "==> Generating plist..."
+ (cd ${STAGEDIR}; ${FIND} ./usr/lib/debug/boot/kernel-debug \( -type f -o -type l \) \
+ | ${SED} -e 's,^\./,,g' \
+ | ${AWK} '{print length, $$0}' | ${SORT} -rn \
+ | ${AWK} '{print $$2 }' >> ${TMPPLIST})
+ (cd ${STAGEDIR}; ${FIND} ./usr/lib/debug/boot/kernel-debug \( -type d \) \
+ | ${SED} -e 's,^\./,,g' \
+ | ${AWK} '{print length, $$0}' | ${SORT} -rn \
+ | ${AWK} '{print $$2 }' \
+ | ${XARGS} -I '{}' echo "@dir {}" >> ${TMPPLIST})
+
+.include "../Makefile.common"
+.include <bsd.port.post.mk>
Index: os/kernel-debug-symbols/pkg-descr
===================================================================
--- /dev/null
+++ os/kernel-debug-symbols/pkg-descr
@@ -0,0 +1,3 @@
+Symbols for kernel built with debugging enabled
+
+WWW: https://github.com/trueos/trueos
Index: os/kernel-debug/Makefile
===================================================================
--- /dev/null
+++ os/kernel-debug/Makefile
@@ -0,0 +1,41 @@
+# $FreeBSD$
+
+PORTNAME= kernel-debug
+PORTVERSION= ${BASEPKG_PORTVERSION}
+CATEGORIES= os
+PKGNAMEPREFIX= ${OS_PKGNAMEPREFIX}
+DISTFILES=
+EXTRACT_ONLY=
+
+MAINTAINER= kmoore@FreeBSD.org
+COMMENT= Port for the kernel compiled with debugging enabled
+
+BUILD_DEPENDS= ${OS_KERNDIST_DEBUG}:os/buildkernel-debug@${OS_FLAVOR}
+
+USES= os:flavors
+
+PREFIX=/
+NEED_ROOT= yes
+
+.include <bsd.port.pre.mk>
+
+do-build:
+ @${MKDIR} ${STAGEDIR}
+ ${ECHO_MSG} "==> Extracting ${OS_KERNDIST_DEBUG}..."
+ ${TAR} xpf ${OS_KERNDIST_DEBUG} -C ${STAGEDIR}
+
+do-install:
+ ${ECHO_MSG} "==> Generating plist..."
+ @${MKDIR} ${STAGEDIR}
+ (cd ${STAGEDIR}; ${FIND} ./boot/kernel-debug \( -type f -o -type l \) \
+ | ${SED} -e 's,^\./,,g' \
+ | ${AWK} '{print length, $$0}' | ${SORT} -rn \
+ | ${AWK} '{print $$2 }' >> ${TMPPLIST})
+ (cd ${STAGEDIR}; ${FIND} ./boot/kernel-debug \( -type d \) \
+ | ${SED} -e 's,^\./,,g' \
+ | ${AWK} '{print length, $$0}' | ${SORT} -rn \
+ | ${AWK} '{print $$2 }' \
+ | ${XARGS} -I '{}' echo "@dir {}" >> ${TMPPLIST})
+
+.include "../Makefile.common"
+.include <bsd.port.post.mk>
Index: os/kernel-debug/pkg-descr
===================================================================
--- /dev/null
+++ os/kernel-debug/pkg-descr
@@ -0,0 +1,3 @@
+Kernel with witness enabled
+
+WWW: https://github.com/trueos/trueos
Index: os/kernel-symbols/Makefile
===================================================================
--- /dev/null
+++ os/kernel-symbols/Makefile
@@ -0,0 +1,42 @@
+# $FreeBSD$
+
+PORTNAME= kernel-symbols
+PORTVERSION= ${BASEPKG_PORTVERSION}
+CATEGORIES= os
+PKGNAMEPREFIX= ${OS_PKGNAMEPREFIX}
+DISTFILES=
+EXTRACT_ONLY=
+
+MAINTAINER= kmoore@FreeBSD.org
+COMMENT= Port for the OS kernel debugging symbols
+
+BUILD_DEPENDS= ${OS_KERNDIST}:os/buildkernel@${OS_FLAVOR}
+
+USES= os:flavors
+
+PREFIX=/
+NEED_ROOT= yes
+PKGVITAL= yes
+
+.include <bsd.port.pre.mk>
+
+do-build:
+ @${MKDIR} ${STAGEDIR}
+ ${ECHO_MSG} "==> Extracting ${OS_KERNDIST}..."
+ ${TAR} xpf ${OS_KERNDIST} -C ${STAGEDIR}
+
+do-install:
+ ${ECHO_MSG} "==> Generating plist..."
+ @${MKDIR} ${STAGEDIR}
+ (cd ${STAGEDIR}; ${FIND} ./usr/lib/debug/boot/kernel \( -type f -o -type l \) \
+ | ${SED} -e 's,^\./,,g' \
+ | ${AWK} '{print length, $$0}' | ${SORT} -rn \
+ | ${AWK} '{print $$2 }' >> ${TMPPLIST})
+ (cd ${STAGEDIR}; ${FIND} ./usr/lib/debug/boot/kernel \( -type d \) \
+ | ${SED} -e 's,^\./,,g' \
+ | ${AWK} '{print length, $$0}' | ${SORT} -rn \
+ | ${AWK} '{print $$2 }' \
+ | ${XARGS} -I '{}' echo "@dir {}" >> ${TMPPLIST})
+
+.include "../Makefile.common"
+.include <bsd.port.post.mk>
Index: os/kernel-symbols/pkg-descr
===================================================================
--- /dev/null
+++ os/kernel-symbols/pkg-descr
@@ -0,0 +1,3 @@
+Userland binaries and configs for OS
+
+WWW: https://github.com/trueos/trueos
Index: os/kernel/Makefile
===================================================================
--- /dev/null
+++ os/kernel/Makefile
@@ -0,0 +1,51 @@
+# $FreeBSD$
+
+PORTNAME= kernel
+PORTVERSION= ${BASEPKG_PORTVERSION}
+PORTEPOCH= 1
+CATEGORIES= os
+PKGNAMEPREFIX= ${OS_PKGNAMEPREFIX}
+DISTFILES=
+EXTRACT_ONLY=
+
+MAINTAINER= kmoore@FreeBSD.org
+COMMENT= Port for the OS kernel
+
+BUILD_DEPENDS= ${OS_KERNDIST}:os/buildkernel@${OS_FLAVOR}
+
+USES= os:flavors
+
+PREFIX=/
+NEED_ROOT= yes
+PKGVITAL= yes
+
+OPTIONS_DEFINE= DEBUG
+OPTIONS_DEFAULT=
+OPTIONS_SUB= yes
+
+.include <bsd.port.pre.mk>
+
+.if ${PORT_OPTIONS:MDEBUG}
+RUN_DEPENDS+= kernel-symbols=${BASEPKG_PORTVERSION}:os/kernel-symbols@${OS_FLAVOR}
+.endif
+
+do-build:
+ @${MKDIR} ${STAGEDIR}
+ ${ECHO_MSG} "==> Extracting ${OS_KERNDIST}..."
+ ${TAR} xpf ${OS_KERNDIST} -C ${STAGEDIR}
+
+do-install:
+ ${ECHO_MSG} "==> Generating plist..."
+ @${MKDIR} ${STAGEDIR}
+ (cd ${STAGEDIR}; ${FIND} ./boot/kernel \( -type f -o -type l \) \
+ | ${SED} -e 's,^\./,,g' \
+ | ${AWK} '{print length, $$0}' | ${SORT} -rn \
+ | ${AWK} '{print $$2 }' >> ${TMPPLIST})
+ (cd ${STAGEDIR}; ${FIND} ./boot/kernel \( -type d \) \
+ | ${SED} -e 's,^\./,,g' \
+ | ${AWK} '{print length, $$0}' | ${SORT} -rn \
+ | ${AWK} '{print $$2 }' \
+ | ${XARGS} -I '{}' echo "@dir {}" >> ${TMPPLIST})
+
+.include "../Makefile.common"
+.include <bsd.port.post.mk>
Index: os/kernel/pkg-descr
===================================================================
--- /dev/null
+++ os/kernel/pkg-descr
@@ -0,0 +1,3 @@
+Kernel compiled for base packages
+
+WWW: https://github.com/trueos/trueos
Index: os/src-head/Makefile
===================================================================
--- /dev/null
+++ os/src-head/Makefile
@@ -0,0 +1,40 @@
+# $FreeBSD$
+
+PORTNAME= src
+PORTVERSION= ${BASEPKG_PORTVERSION}
+CATEGORIES= os
+
+MAINTAINER= kmoore@FreeBSD.org
+COMMENT= Port for the OS base sources
+
+PREFIX=/
+SRCDIR?=/usr/src
+NO_BUILD= yes
+WITHOUT_FBSD10_FIX= yes
+WRKSRC= ${BASEPKG_SRCDIR}
+
+USE_GITHUB= yes
+GH_ACCOUNT= trueos
+GH_PROJECT= trueos
+GH_TAGNAME= e5c63c7
+
+
+.include <bsd.port.pre.mk>
+
+stage-qa: stage
+
+do-install:
+ ${MKDIR} ${STAGEDIR}${SRCDIR}
+ ${TAR} cf - -C ${WRKSRC} --exclude .git --exclude .svn . | ${TAR} xpf - -C ${STAGEDIR}${SRCDIR}
+ (cd ${STAGEDIR}; ${FIND} . \( -type f -o -type l \) \
+ | ${SED} -e 's,^\./,,g' \
+ | ${AWK} '{print length, $$0}' | ${SORT} -rn \
+ | ${AWK} '{print $$2 }' >> ${TMPPLIST})
+ (cd ${STAGEDIR}; ${FIND} .${SRCDIR} \( -type d \) \
+ | ${SED} -e 's,^\./,,g' \
+ | ${AWK} '{print length, $$0}' | ${SORT} -rn \
+ | ${AWK} '{print $$2 }' \
+ | ${XARGS} -I '{}' echo "@dir {}" >> ${TMPPLIST})
+
+.include "../Makefile.common"
+.include <bsd.port.post.mk>
Index: os/src-head/pkg-descr
===================================================================
--- /dev/null
+++ os/src-head/pkg-descr
@@ -0,0 +1,3 @@
+System Sources for TrueOS
+
+WWW: https://github.com/trueos/trueos
Index: os/src/Makefile
===================================================================
--- /dev/null
+++ os/src/Makefile
@@ -0,0 +1,42 @@
+# $FreeBSD$
+
+PORTNAME= src
+PORTVERSION= ${BASEPKG_PORTVERSION}
+CATEGORIES= os
+DISTFILES=
+EXTRACT_ONLY=
+
+MAINTAINER= kmoore@FreeBSD.org
+COMMENT= Port for the OS base sources
+
+PREFIX=/
+SRCDIR?=/usr/src
+NO_BUILD= yes
+WITHOUT_FBSD10_FIX= yes
+WRKSRC= ${BASEPKG_SRCDIR}
+
+.include <bsd.port.pre.mk>
+
+patch:
+ ${MKDIR} ${WRKDIR}
+
+checksum fetch extract:
+ ${ECHO_MSG} ${.TARGET} not needed because building direct
+
+stage-qa: stage
+
+do-install:
+ @${MKDIR} ${STAGEDIR}${SRCDIR}
+ ${TAR} cf - -C ${WRKSRC} --exclude .git --exclude .svn . | ${TAR} xpf - -C ${STAGEDIR}${SRCDIR}
+ (cd ${STAGEDIR}; ${FIND} . \( -type f -o -type l \) \
+ | ${SED} -e 's,^\./,,g' \
+ | ${AWK} '{print length, $$0}' | ${SORT} -rn \
+ | ${AWK} '{print $$2 }' >> ${TMPPLIST})
+ (cd ${STAGEDIR}; ${FIND} .${SRCDIR} \( -type d \) \
+ | ${SED} -e 's,^\./,,g' \
+ | ${AWK} '{print length, $$0}' | ${SORT} -rn \
+ | ${AWK} '{print $$2 }' \
+ | ${XARGS} -I '{}' echo "@dir {}" >> ${TMPPLIST})
+
+.include "../Makefile.common"
+.include <bsd.port.post.mk>
Index: os/src/pkg-descr
===================================================================
--- /dev/null
+++ os/src/pkg-descr
@@ -0,0 +1,3 @@
+System Sources for TrueOS
+
+WWW: https://github.com/trueos/trueos
Index: os/userland-base-bootstrap/Makefile
===================================================================
--- /dev/null
+++ os/userland-base-bootstrap/Makefile
@@ -0,0 +1,60 @@
+# $FreeBSD$
+
+PORTNAME= userland-base-bootstrap
+PORTVERSION= ${BASEPKG_PORTVERSION}
+PORTREVISION= 1
+CATEGORIES= os
+PKGNAMEPREFIX= ${OS_PKGNAMEPREFIX}
+DISTFILES=
+EXTRACT_ONLY=
+
+MAINTAINER= kmoore@FreeBSD.org
+COMMENT= Port for libelf, rtld and other critical early libraries
+
+BUILD_DEPENDS= ${OS_WORLDDIST}:os/buildworld@${OS_FLAVOR}
+
+USES= os:flavors
+
+PREFIX=/
+NEED_ROOT= yes
+PKGVITAL= yes
+
+.include <bsd.port.pre.mk>
+
+do-build:
+ @${MKDIR} ${STAGEDIR}
+ ${ECHO_MSG} "==> Extracting ${OS_WORLDDIST}..."
+ ${TAR} xpf ${OS_WORLDDIST} -C ${STAGEDIR}
+
+do-install:
+ ${ECHO_MSG} "==> Generating plist..."
+ (cd ${STAGEDIR}; ${FIND} ./libexec/ld-elf* ./lib/libc.* ./lib/libthr.* ./lib/libm.* \
+ ./usr/lib/libthr.* ./usr/lib/libm.* ./usr/lib/libc.* \
+ \( -type f -o -type l \) \
+ | ${SED} -e 's,^\./,,g' \
+ | ${AWK} '{print length, $$0}' | ${SORT} -rn \
+ | ${AWK} '{print $$2 }' \
+ | ${GREP} -v -e '\.a' \
+ >> ${TMPPLIST})
+ (cd ${STAGEDIR}; ${FIND} ./libexec ./lib ./usr/lib \( -type d \) \
+ | ${SED} -e 's,^\./,,g' \
+ | ${AWK} '{print length, $$0}' | ${SORT} -rn \
+ | ${AWK} '{print $$2 }' \
+ | ${GREP} -v -e '/' \
+ | ${XARGS} -I '{}' echo "@dir {}" \
+ | ${GREP} -v -w '@dir ' \
+ | ${CAT} >> ${TMPPLIST})
+
+clean:
+ if [ -d ${WRKDIR} ]; then \
+ if [ -w ${WRKDIR} ]; then \
+ ${ECHO_MSG} "===> Cleaning for ${PKGNAME}"; \
+ ${CHFLAGS} -R noschg ${WRKDIR} ; \
+ ${RM} -r ${WRKDIR}; \
+ else \
+ ${ECHO_MSG} "===> ${WRKDIR} not writable, skipping"; \
+ fi; \
+ fi
+
+.include "../Makefile.common"
+.include <bsd.port.post.mk>
Index: os/userland-base-bootstrap/pkg-descr
===================================================================
--- /dev/null
+++ os/userland-base-bootstrap/pkg-descr
@@ -0,0 +1,3 @@
+The BSD userland-bootstrap, critical libraries to be updated early
+
+WWW: https://github.com/trueos/trueos
Index: os/userland-base/Makefile
===================================================================
--- /dev/null
+++ os/userland-base/Makefile
@@ -0,0 +1,79 @@
+# $FreeBSD$
+
+PORTNAME= userland-base
+PORTVERSION= ${BASEPKG_PORTVERSION}
+PORTREVISION= 4
+CATEGORIES= os
+PKGNAMEPREFIX= ${OS_PKGNAMEPREFIX}
+DISTFILES=
+EXTRACT_ONLY=
+
+MAINTAINER= kmoore@FreeBSD.org
+COMMENT= Port for the OS userland binaries
+
+BUILD_DEPENDS= ${OS_WORLDDIST}:os/buildworld@${OS_FLAVOR} \
+ jq:textproc/jq
+RUN_DEPENDS= /libexec/ld-elf.so.1:os/userland-base-bootstrap@${OS_FLAVOR} \
+ /bin/sh:os/userland-bin@${OS_FLAVOR} \
+ /boot/defaults/loader.conf:os/userland-boot@${OS_FLAVOR} \
+ /etc/rc:os/userland-conf@${OS_FLAVOR} \
+ /usr/lib/libelf.so:os/userland-lib@${OS_FLAVOR} \
+ /rescue/sh:os/userland-rescue@${OS_FLAVOR} \
+ /sbin/init:os/userland-sbin@${OS_FLAVOR}
+
+USES= os:flavors
+
+PREFIX=/
+NEED_ROOT= yes
+PKGVITAL= yes
+
+.include <bsd.port.pre.mk>
+
+do-build:
+ @${MKDIR} ${STAGEDIR}
+ ${ECHO_MSG} "==> Extracting ${OS_WORLDDIST}..."
+ ${TAR} xpf ${OS_WORLDDIST} -C ${STAGEDIR}
+ ${INSTALL_SCRIPT} ${FILESDIR}/base-update.in ${STAGEDIR}/usr/sbin/base-update
+ ${INSTALL_SCRIPT} ${FILESDIR}/pkgbase.setup.in ${STAGEDIR}/etc/pkgbase.setup
+ if [ -e "${STAGEDIR}/var/db/trueos-manifest.json" ] ; then \
+ ${SH} ${FILESDIR}/mk-pkg-repo.sh ${STAGEDIR}/var/db/trueos-manifest.json ${STAGEDIR} ; \
+ fi
+ ${ECHO} "${_OSVERSION_MAJOR}-${PKGVERSION}" > ${STAGEDIR}/etc/base_version
+
+do-install:
+ ${ECHO_MSG} "==> Generating plist..."
+ ${ECHO} "usr/sbin/base-update" >> ${TMPPLIST}
+ ${ECHO} "etc/pkgbase.setup" >> ${TMPPLIST}
+ if [ -e "${STAGEDIR}/etc/pkg/Train.conf" ] ; then \
+ ${ECHO} "etc/pkg/Train.conf" >> ${TMPPLIST} ; \
+ fi
+ (cd ${STAGEDIR}; ${FIND} . \( -type f -o -type l \) \
+ | ${SED} -e 's,^\./,,g' \
+ | ${AWK} '{print length, $$0}' | ${SORT} -rn \
+ | ${AWK} '{print $$2 }' \
+ | ${GREP} -v -f ${FILESDIR}/exclude-list \
+ >> ${TMPPLIST})
+ (cd ${STAGEDIR}; ${FIND} ./ \( -type d \) \
+ | ${SED} -e 's,^\./,,g' \
+ | ${AWK} '{print length, $$0}' | ${SORT} -rn \
+ | ${AWK} '{print $$2 }' \
+ | ${GREP} -v -e '/' \
+ | ${GREP} -v -f ${FILESDIR}/exclude-list \
+ | ${XARGS} -I '{}' echo "@dir {}" \
+ | ${GREP} -v -w '@dir ' \
+ | ${CAT} >> ${TMPPLIST})
+ ${SH} ${FILESDIR}/scrubplist.sh ${FILESDIR}/configs ${TMPPLIST} ${STAGEDIR}
+
+clean:
+ if [ -d ${WRKDIR} ]; then \
+ if [ -w ${WRKDIR} ]; then \
+ ${ECHO_MSG} "===> Cleaning for ${PKGNAME}"; \
+ ${CHFLAGS} -R noschg ${WRKDIR} ; \
+ ${RM} -r ${WRKDIR}; \
+ else \
+ ${ECHO_MSG} "===> ${WRKDIR} not writable, skipping"; \
+ fi; \
+ fi
+
+.include "../Makefile.common"
+.include <bsd.port.post.mk>
Index: os/userland-base/files/base-update.in
===================================================================
--- /dev/null
+++ os/userland-base/files/base-update.in
@@ -0,0 +1,323 @@
+#!/bin/sh
+
+# Copyright 2019 Kris Moore
+# All rights reserved
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted providing that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+
+
+PKG="pkg-static"
+
+exit_err()
+{
+ echo "ERROR: $@" >&2
+ exit 1
+}
+
+get_userland_bootstrap_pkgs()
+{
+ # Get which world is in play
+ USERLANDPKGNAME=$(${PKG} query '%n' os/userland-base-bootstrap)
+ if [ -z "$USERLANDPKGNAME" ] ; then
+ exit_err "Could not determine userland-base-bootstrap package, is this using base packages?"
+ fi
+ echo $USERLANDPKGNAME
+}
+
+get_userland_pkgs()
+{
+ # Get which world is in play
+ USERLANDPKGNAME=$(${PKG} query '%n' os/userland)
+ if [ -z "$USERLANDPKGNAME" ] ; then
+ exit_err "Could not determine userland package, is this using base packages?"
+ fi
+ echo $USERLANDPKGNAME
+}
+
+do_userland_updates()
+{
+
+ check_userland_updates >/dev/null
+ case $? in
+ 0)
+ echo "Your system is up to date!"
+ return
+ ;;
+ 1)
+ ;;
+ *)
+ exit_err "Failed to check for userland updates"
+ ;;
+ esac
+
+ # Check and do upgrade to bootstrap pkg first
+ ${PKG} upgrade -y $(get_userland_bootstrap_pkgs)
+ if [ $? -ne 0 ] ; then
+ exit_err "Failed upgrading userland base bootstrap package"
+ fi
+
+ ${PKG} upgrade -y $(get_userland_pkgs)
+ if [ $? -ne 0 ] ; then
+ exit_err "Failed upgrading userland"
+ fi
+
+ echo "Userland update complete!"
+ exit 0
+
+}
+
+check_updates()
+{
+ ${PKG} upgrade -n $@
+ return $?
+}
+
+
+get_kernel_pkgs()
+{
+ # Get which kernel is booted
+ CURKERN=$(sysctl -n kern.bootfile)
+ if [ -z "$CURKERN" ] ; then
+ exit_err "Could not determine booted kernel via: kern.bootfile"
+ fi
+
+ KERNPKG=$(${PKG} which -q ${CURKERN})
+ if [ -z "$KERNPKG" ] ; then
+ exit_err "Could not determine kernel package, is this using base packages?"
+ fi
+
+ KERNPKGNAME=$(${PKG} query '%n' ${KERNPKG})
+ if [ -z "$KERNPKGNAME" ] ; then
+ exit_err "Could not determine kernel package, is this using base packages?"
+ fi
+
+ # Update kmod packages at same time
+ KERNKMODS=$(${PKG} query -g '%n' \*-kmod | tr -s '\n' ' ')
+
+ echo "$KERNPKGNAME $KERNKMODS"
+}
+
+check_userland_updates()
+{
+ check_updates $(get_userland_pkgs) $(get_userland_bootstrap_pkgs)
+ return $?
+}
+
+check_kernel_updates()
+{
+ check_updates $(get_kernel_pkgs)
+ return $?
+}
+
+do_kernel_updates()
+{
+ check_kernel_updates >/dev/null
+ case $? in
+ 0)
+ return
+ ;;
+ 1)
+ ;;
+ *)
+ exit_err "Failed to check for kernel updates"
+ ;;
+ esac
+
+ ${PKG} upgrade -y $(get_kernel_pkgs)
+ if [ $? -ne 0 ] ; then
+ exit_err "Failed updating kernel"
+ fi
+
+ echo "Kernel update complete!"
+ echo "Please reboot before running $0 again to continue the base update."
+ exit 0
+
+}
+
+check_skip_file()
+{
+ case $1 in
+ /etc/login.conf.db)
+ return 1
+ ;;
+ /etc/pwd.db)
+ return 1
+ ;;
+ /etc/spwd.db)
+ return 1
+ ;;
+ esac
+
+ return 0
+}
+
+# Look for pkgnew files and attempt to merge
+do_etcmerge()
+{
+
+ for nfile in $(find /etc | grep '\.pkgnew$' | tr '\n' ' ')
+ do
+ ofile=$(echo $nfile | sed 's|.pkgnew||g')
+
+ # Stale file from a previous merge conflict
+ if [ ! -e "${ofile}" ] ; then
+ echo "Removing stale ${nfile}"
+ rm "${nfile}"
+ continue
+ fi
+
+ # Skip some files always
+ check_skip_file "${ofile}"
+ if [ $? -ne 0 ] ; then
+ rm "${nfile}"
+ continue
+ fi
+
+ # Yes, sometimes we've seen this
+ if [ "$(sha256 -q $nfile)" = "$(sha256 -q $ofile)" ] ; then
+ echo "Moving identical ${nfile} -> ${ofile}"
+ cp "${nfile}" "${ofile}"
+ if [ $? -ne 0 ] ; then
+ echo "ERROR: Failed to copy $nfile -> $ofile"
+ fi
+ rm "${nfile}"
+ continue
+ fi
+
+ # Need to merge the files, lets instruct the user on howto
+ echo "The File: ${ofile}"
+ echo "Needs manual updating. Do you wish to:"
+ echo ""
+ echo "m) Merge"
+ echo "d) Delete the new file"
+ echo "s) Skip (Default)"
+ echo -e ">\c"
+ read response
+ case $response in
+ m)
+ merge_file "$ofile" "$nfile"
+ check_db_gen "$ofile"
+ ;;
+ d)
+ echo "Removing ${nfile}"
+ rm "${nfile}"
+ ;;
+ *)
+ continue
+ ;;
+ esac
+
+ done
+}
+
+check_db_gen()
+{
+ if [ "$1" = "/etc/login.conf" ] ; then
+ cap_mkdb /etc/login.conf
+ fi
+ if [ "$1" = "/etc/services" ] ; then
+ services_mkdb -q -o /var/db/services.db /etc/services
+ fi
+ if [ "$1" = "/etc/master.passwd" ] ; then
+ pwd_mkdb -p /etc/master.passwd
+ fi
+ if [ "$1" = "/etc/mail/aliases" ] ; then
+ newaliases
+ fi
+}
+
+merge_file()
+{
+ echo "Starting merge of $1"
+ echo "-----------------------"
+ echo "Old contents are on left, new contents on right."
+ echo "Enter 'l' select the left or 'r' to select the right side to merge"
+ echo "Use 'q' to quit"
+ cp -p ${2} ${1}.merged
+ sdiff -o "${1}.merged" --text --suppress-common-lines \
+ --width=80 "${1}" "${2}"
+ while :
+ do
+ echo "Editing finshed. Do you wish to:"
+ echo "v) View merged file"
+ echo "i) Install merged file"
+ echo "s) Skip (Default)"
+ echo -e ">\c"
+ read response
+ case $response in
+ v|V)
+ ${PAGER} ${1}.merged
+ ;;
+ i|I) cp "${1}.merged" "${1}"
+ rm "${1}.merged"
+ rm "${2}"
+ break
+ ;;
+ *) break
+ ;;
+ esac
+ done
+}
+
+update_pkg()
+{
+ ${PKG} upgrade -y ports-mgmt/pkg
+}
+
+usage()
+{
+ cat << EOF
+
+$0 - Keep your base packages up to date
+----------------------------------------------
+Arguments (Requires one)
+
+ check - Check if updates exist for kernel/userland
+
+ update - Perform updates to kernel/userland packages
+
+ merge - Merge updates to /etc files that did not automatically update
+EOF
+ exit 1
+}
+
+if [ -z "$1" ] ; then
+ usage
+fi
+
+case $1 in
+ check)
+ update_pkg
+ check_updates $(get_kernel_pkgs) $(get_userland_pkgs) $(get_userland_bootstrap_pkgs)
+ ;;
+ update)
+ update_pkg
+ do_kernel_updates
+ do_userland_updates
+ ;;
+ merge)
+ do_etcmerge
+ ;;
+ *)
+ usage
+ ;;
+esac
Index: os/userland-base/files/configs
===================================================================
--- /dev/null
+++ os/userland-base/files/configs
@@ -0,0 +1,158 @@
+etc/amd.map
+etc/auto_master
+etc/autofs/include_ldap
+etc/autofs/include_nis
+etc/autofs/include_nis_nullfs
+etc/autofs/special_automount
+etc/autofs/special_hosts
+etc/autofs/special_media
+etc/autofs/special_noauto
+etc/autofs/special_null
+etc/blacklistd.conf
+etc/bluetooth/hcsecd.conf
+etc/bluetooth/hosts
+etc/bluetooth/protocols
+etc/conf.d/bootmisc
+etc/conf.d/fsck
+etc/conf.d/ipfw
+etc/conf.d/ldconfig
+etc/conf.d/localmount
+etc/conf.d/moused
+etc/conf.d/netmount
+etc/conf.d/powerd
+etc/conf.d/rarpd
+etc/conf.d/savecore
+etc/conf.d/staticroute
+etc/conf.d/swap
+etc/conf.d/syscons
+etc/conf.d/tmpfiles
+etc/conf.d/urandom
+etc/cron.d/at
+etc/crontab
+etc/csh.cshrc
+etc/csh.login
+etc/csh.logout
+etc/ddb.conf
+etc/devd-openrc.conf
+etc/devd-openrc/asus.conf
+etc/devd-openrc/devmatch-openrc.conf
+etc/devd-openrc/hyperv.conf
+etc/devd-openrc/uath.conf
+etc/devd-openrc/ulpt.conf
+etc/devd-openrc/zfs.conf
+etc/devd.conf
+etc/devd/asus.conf
+etc/devd/devmatch.conf
+etc/devd/hyperv.conf
+etc/devd/uath.conf
+etc/devd/ulpt.conf
+etc/devfs.conf
+etc/dhclient.conf
+etc/dhcpcd.conf
+etc/disktab
+etc/dma/dma.conf
+etc/dumpdates
+etc/fbtab
+etc/freebsd-update.conf
+etc/ftpusers
+etc/gettytab
+etc/group
+etc/gss/mech
+etc/gss/qop
+etc/hosts
+etc/hosts.allow
+etc/hosts.equiv
+etc/hosts.lpd
+etc/inetd.conf
+etc/libalias.conf
+etc/libmap.conf
+etc/locate.rc
+etc/login.access
+etc/login.conf
+etc/login.conf.db
+etc/mac.conf
+etc/mail.rc
+etc/mail/access.sample
+etc/mail/aliases
+etc/mail/freebsd.cf
+etc/mail/freebsd.mc
+etc/mail/freebsd.submit.cf
+etc/mail/freebsd.submit.mc
+etc/mail/freefall.mc
+etc/mail/mailer.conf
+etc/mail/mailertable.sample
+etc/mail/README
+etc/mail/sendmail.cf
+etc/mail/submit.cf
+etc/mail/virtusertable.sample
+etc/master.passwd
+etc/motd
+etc/netconfig
+etc/netstart
+etc/network.subr
+etc/networks
+etc/newsyslog.conf
+etc/newsyslog.conf.d/amd.conf
+etc/newsyslog.conf.d/ftp.conf
+etc/newsyslog.conf.d/lpr.conf
+etc/newsyslog.conf.d/opensm.conf
+etc/newsyslog.conf.d/pf.conf
+etc/newsyslog.conf.d/ppp.conf
+etc/newsyslog.conf.d/sendmail.conf
+etc/nscd.conf
+etc/nsmb.conf
+etc/nsswitch.conf
+etc/ntp.conf
+etc/ntp/leap-seconds
+etc/opieaccess
+etc/pam.d/atrun
+etc/pam.d/cron
+etc/pam.d/ftp
+etc/pam.d/ftpd
+etc/pam.d/imap
+etc/pam.d/login
+etc/pam.d/other
+etc/pam.d/passwd
+etc/pam.d/pop3
+etc/pam.d/README
+etc/pam.d/sshd
+etc/pam.d/su
+etc/pam.d/system
+etc/pam.d/telnetd
+etc/pam.d/xdm
+etc/pccard_ether
+etc/pf.os
+etc/phones
+etc/pkg/Train.conf
+etc/portsnap.conf
+etc/ppp/ppp.conf
+etc/printcap
+etc/profile
+etc/protocols
+etc/rc.devd
+etc/rc.dynamicdiskless
+etc/rc.firewall
+etc/rc.resume
+etc/regdomain.xml
+etc/remote
+etc/rpc
+etc/security/audit_class
+etc/security/audit_control
+etc/security/audit_event
+etc/security/audit_user
+etc/security/audit_warn
+etc/services
+etc/shells
+etc/snmpd.config
+etc/ssh/moduli
+etc/ssh/ssh_config
+etc/ssh/sshd_config
+etc/ssl/openssl.cnf
+etc/sysctl.d/README
+etc/syslog.conf
+etc/syslog.d/ftp.conf
+etc/syslog.d/lpr.conf
+etc/syslog.d/ppp.conf
+etc/termcap.small
+etc/ttys
+usr/local/etc/pkg/repos/FreeBSD.conf
Index: os/userland-base/files/exclude-list
===================================================================
--- /dev/null
+++ os/userland-base/files/exclude-list
@@ -0,0 +1,17 @@
+^bin/
+^boot/
+^etc/
+^lib/
+^libexec/ld-elf.so.1
+^libexec/ld-elf32.so.1
+^usr/bin
+^usr/lib/
+^usr/lib32
+^usr/include
+^usr/sbin
+^usr/share/doc
+^usr/share/man
+^usr/tests
+^rescue/
+^sbin/
+^var/db/services.db
Index: os/userland-base/files/mk-pkg-repo.sh
===================================================================
--- /dev/null
+++ os/userland-base/files/mk-pkg-repo.sh
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+# TrueOS Build Manifest
+TM=${1}
+
+# Where to create repo
+STAGEDIR="${2}"
+
+REPONAME="TrueOS"
+if [ "$(jq -r '."pkg-repo-name" | length' ${TM})" != "0" ]; then
+ REPONAME=`jq -r '."pkg-repo-name"' ${TM}`
+fi
+TRAINNAME="TrueOS"
+if [ "$(jq -r '."pkg-train-name" | length' ${TM})" != "0" ]; then
+ TRAINNAME=`jq -r '."pkg-train-name"' ${TM}`
+fi
+# Do the first-time setup of package repo
+if [ ! -e "${STAGEDIR}/etc/pkg/Train.conf" ] ; then
+
+ # Disable the FreeBSD repo by default
+ if [ -e "${STAGEDIR}/etc/pkg/FreeBSD.conf" ] ; then
+ mkdir -p ${STAGEDIR}/usr/local/etc/pkg/repos || true
+ echo "FreeBSD: { enabled: no }" >${STAGEDIR}/usr/local/etc/pkg/repos/FreeBSD.conf
+ fi
+
+ # Do Setup for pkg repo
+ TM_PUBKEY="none"
+ if [ "$(jq -r '."pkg-repo"."pubKey" | length' ${TM})" != "0" ]; then
+ echo "Saving pkg ports repository public key"
+ jq -r '."pkg-repo"."pubKey" | join("\n")' ${TM} \
+ > ${STAGEDIR}/usr/share/keys/pkg/${REPONAME}.pub
+ TM_PUBKEY="/usr/share/keys/pkg/${REPONAME}.pub"
+ if [ "$(jq -r '."pkg-repo"."url" | length' ${TM})" != "0" ]; then
+ TM_PKGURL="$(jq -r '."pkg-repo"."url"' ${TM})"
+ cat >${STAGEDIR}/etc/pkg/Train.conf <<-EOF
+ ${REPONAME}: {
+ url: "${TM_PKGURL}",
+ signature_type: "pubkey",
+ pubkey: "${TM_PUBKEY}",
+ }
+ EOF
+ fi
+ else
+ if [ "$(jq -r '."pkg-repo"."url" | length' ${TM})" != "0" ]; then
+ TM_PKGURL="$(jq -r '."pkg-repo"."url"' ${TM})"
+ cat >${STAGEDIR}/etc/pkg/Train.conf <<-EOF
+ ${REPONAME}: {
+ url: "${TM_PKGURL}",
+ signature_type: "none",
+ }
+ EOF
+ fi
+ fi
+fi
Index: os/userland-base/files/pkgbase.setup.in
===================================================================
--- /dev/null
+++ os/userland-base/files/pkgbase.setup.in
@@ -0,0 +1,29 @@
+#!/bin/sh
+# License: 2CLAUSEBSD
+# Author: Kris Moore <kmoore@FreeBSD.org>
+#
+# Setup script called by userland package during
+# installation / upgrade
+
+PKG_ROOTDIR="$1"
+
+# Make sure /etc/fstab exists to silence warnings from openrc
+if [ ! -e "${PKG_ROOTDIR}/etc/fstab" ]; then
+ touch ${PKG_ROOTDIR}/etc/fstab
+fi
+
+# Update any missing dirs which need added now from mtree spec
+mtree -deU -f ${PKG_ROOTDIR}/etc/mtree/BSD.root.dist \
+ -p ${PKG_ROOTDIR} >/dev/null 2>/dev/null
+mtree -deU -f ${PKG_ROOTDIR}/etc/mtree/BSD.usr.dist \
+ -p ${PKG_ROOTDIR}/usr >/dev/null 2>/dev/null
+mtree -deU -f ${PKG_ROOTDIR}/etc/mtree/BSD.var.dist \
+ -p ${PKG_ROOTDIR}/var >/dev/null 2>/dev/null
+mtree -deU -f ${PKG_ROOTDIR}/etc/mtree/BSD.include.dist \
+ -p ${PKG_ROOTDIR}/usr/include >/dev/null 2>/dev/null
+if [ -e ${PKG_ROOTDIR}/etc/mtree/BSD.lib32.dist ] ; then
+ mtree -deU -f ${PKG_ROOTDIR}/etc/mtree/BSD.lib32.dist \
+ -p ${PKG_ROOTDIR}/usr >/dev/null 2>/dev/null
+fi
+
+exit 0
Index: os/userland-base/files/scrubplist.sh
===================================================================
--- /dev/null
+++ os/userland-base/files/scrubplist.sh
@@ -0,0 +1,51 @@
+#!/bin/sh
+CONFIGS="$1"
+PLIST="$2"
+STAGEDIR="$3"
+
+get_prop_line() {
+ # Use a single stat due to it being expensive
+ local SOUT=$(stat -f '%Sf %Su,%Sg,%OMp%OLp' ${STAGEDIR}/${1})
+ local flags=$(echo $SOUT | awk '{print $1}')
+ local prop=$(echo $SOUT | awk '{print $2}')
+
+ echo $flags | grep -q "schg"
+ if [ $? -eq 0 ] ; then
+ echo "${prop},schg"
+ else
+ echo "${prop}"
+ fi
+}
+
+if [ -e "${PLIST}.new" ] ; then
+ rm ${PLIST}.new
+fi
+touch ${PLIST}.new
+
+# Read through the temp plist and cleanup
+while read pline
+do
+
+ # Check for directory first
+ echo ${pline} | grep -q "^@dir"
+ if [ $? -eq 0 ] ; then
+ pdir=$(echo $pline | awk '{print $2}')
+ props=$(get_prop_line ${pdir})
+ echo "@dir(${props}) ${pdir}" >> ${PLIST}.new
+ continue
+ fi
+
+ props=$(get_prop_line $pline)
+
+ # Is this a config file?
+ grep -q -w "${pline}" ${CONFIGS} 2>/dev/null
+ if [ $? -eq 0 ] ; then
+ echo "@config(${props}) ${pline}" >> ${PLIST}.new
+ else
+ echo "@(${props}) ${pline}" >> ${PLIST}.new
+ fi
+
+
+done < ${PLIST}
+mv ${PLIST}.new ${PLIST}
+
Index: os/userland-base/pkg-descr
===================================================================
--- /dev/null
+++ os/userland-base/pkg-descr
@@ -0,0 +1,3 @@
+The BSD userland
+
+WWW: https://github.com/trueos/trueos
Index: os/userland-base/pkg-install
===================================================================
--- /dev/null
+++ os/userland-base/pkg-install
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+if [ -z "${PKG_ROOTDIR}" ] ; then
+ PKG_ROOTDIR=/
+fi
+
+if [ "$2" != "POST-INSTALL" ] ; then
+ exit 0
+fi
+
+cap_mkdb -l ${PKG_ROOTDIR}/etc/login.conf
+pwd_mkdb -i -p -d ${PKG_ROOTDIR}/etc ${PKG_ROOTDIR}/etc/master.passwd
+services_mkdb -l -q -o ${PKG_ROOTDIR}/var/db/services.db ${PKG_ROOTDIR}/etc/services
+chmod 1777 ${PKG_ROOTDIR}/tmp
+
+sh ${PKG_ROOTDIR}/etc/pkgbase.setup $PKG_ROOTDIR
Index: os/userland-bin/Makefile
===================================================================
--- /dev/null
+++ os/userland-bin/Makefile
@@ -0,0 +1,57 @@
+# $FreeBSD$
+
+PORTNAME= userland-bin
+PORTVERSION= ${BASEPKG_PORTVERSION}
+CATEGORIES= os
+PKGNAMEPREFIX= ${OS_PKGNAMEPREFIX}
+DISTFILES=
+EXTRACT_ONLY=
+
+MAINTAINER= kmoore@FreeBSD.org
+COMMENT= Userland bin executables
+
+BUILD_DEPENDS= ${OS_WORLDDIST}:os/buildworld@${OS_FLAVOR}
+
+USES= os:flavors
+
+PREFIX=/
+NEED_ROOT= yes
+
+.include <bsd.port.pre.mk>
+
+do-build:
+ @${MKDIR} ${STAGEDIR}
+ ${ECHO_MSG} "==> Extracting ${OS_WORLDDIST}..."
+ ${TAR} xpf ${OS_WORLDDIST} -C ${STAGEDIR}
+
+do-install:
+ ${ECHO_MSG} "==> Generating plist..."
+ (cd ${STAGEDIR}; ${FIND} ./bin ./usr/bin \( -type f -o -type l \) \
+ | ${SED} -e 's,^\./,,g' \
+ | ${AWK} '{print length, $$0}' | ${SORT} -rn \
+ | ${AWK} '{print $$2 }' \
+ | ${GREP} -v -e 'usr/bin/clang' -e 'usr/bin/cc' -e 'usr/bin/c++' \
+ -e 'usr/bin/ld' -e 'usr/bin/llvm' -e 'usr/bin/lldb' \
+ >> ${TMPPLIST})
+ (cd ${STAGEDIR}; ${FIND} ./bin ./usr/bin \( -type d \) \
+ | ${SED} -e 's,^\./,,g' \
+ | ${AWK} '{print length, $$0}' | ${SORT} -rn \
+ | ${AWK} '{print $$2 }' \
+ | ${GREP} -v -x '/' \
+ | ${XARGS} -I '{}' echo "@dir {}" \
+ | ${GREP} -v -x '@dir ' \
+ | ${CAT} >> ${TMPPLIST})
+
+clean:
+ if [ -d ${WRKDIR} ]; then \
+ if [ -w ${WRKDIR} ]; then \
+ ${ECHO_MSG} "===> Cleaning for ${PKGNAME}"; \
+ ${CHFLAGS} -R noschg ${WRKDIR} ; \
+ ${RM} -r ${WRKDIR}; \
+ else \
+ ${ECHO_MSG} "===> ${WRKDIR} not writable, skipping"; \
+ fi; \
+ fi
+
+.include "../Makefile.common"
+.include <bsd.port.post.mk>
Index: os/userland-bin/pkg-descr
===================================================================
--- /dev/null
+++ os/userland-bin/pkg-descr
@@ -0,0 +1,3 @@
+Userland binaries from /bin and /usr/bin
+
+WWW: https://github.com/trueos/trueos
Index: os/userland-boot/Makefile
===================================================================
--- /dev/null
+++ os/userland-boot/Makefile
@@ -0,0 +1,55 @@
+# $FreeBSD$
+
+PORTNAME= userland-boot
+PORTVERSION= ${BASEPKG_PORTVERSION}
+CATEGORIES= os
+PKGNAMEPREFIX= ${OS_PKGNAMEPREFIX}
+DISTFILES=
+EXTRACT_ONLY=
+
+MAINTAINER= kmoore@FreeBSD.org
+COMMENT= Userland boot files
+
+BUILD_DEPENDS= ${OS_WORLDDIST}:os/buildworld@${OS_FLAVOR}
+
+USES= os:flavors
+
+PREFIX=/
+NEED_ROOT= yes
+
+.include <bsd.port.pre.mk>
+
+do-build:
+ @${MKDIR} ${STAGEDIR}
+ ${ECHO_MSG} "==> Extracting ${OS_WORLDDIST}..."
+ ${TAR} xpf ${OS_WORLDDIST} -C ${STAGEDIR}
+
+do-install:
+ ${ECHO_MSG} "==> Generating plist..."
+ (cd ${STAGEDIR}; ${FIND} ./boot \( -type f -o -type l \) \
+ | ${SED} -e 's,^\./,,g' \
+ | ${AWK} '{print length, $$0}' | ${SORT} -rn \
+ | ${AWK} '{print $$2 }' \
+ >> ${TMPPLIST})
+ (cd ${STAGEDIR}; ${FIND} ./boot \( -type d \) \
+ | ${SED} -e 's,^\./,,g' \
+ | ${AWK} '{print length, $$0}' | ${SORT} -rn \
+ | ${AWK} '{print $$2 }' \
+ | ${GREP} -v -x '/' \
+ | ${XARGS} -I '{}' echo "@dir {}" \
+ | ${GREP} -v -x '@dir ' \
+ | ${CAT} >> ${TMPPLIST})
+
+clean:
+ if [ -d ${WRKDIR} ]; then \
+ if [ -w ${WRKDIR} ]; then \
+ ${ECHO_MSG} "===> Cleaning for ${PKGNAME}"; \
+ ${CHFLAGS} -R noschg ${WRKDIR} ; \
+ ${RM} -r ${WRKDIR}; \
+ else \
+ ${ECHO_MSG} "===> ${WRKDIR} not writable, skipping"; \
+ fi; \
+ fi
+
+.include "../Makefile.common"
+.include <bsd.port.post.mk>
Index: os/userland-boot/pkg-descr
===================================================================
--- /dev/null
+++ os/userland-boot/pkg-descr
@@ -0,0 +1,3 @@
+Userland debug support files
+
+WWW: https://github.com/trueos/trueos
Index: os/userland-conf/Makefile
===================================================================
--- /dev/null
+++ os/userland-conf/Makefile
@@ -0,0 +1,59 @@
+# $FreeBSD$
+
+PORTNAME= userland-conf
+PORTVERSION= ${BASEPKG_PORTVERSION}
+CATEGORIES= os
+PKGNAMEPREFIX= ${OS_PKGNAMEPREFIX}
+DISTFILES=
+EXTRACT_ONLY=
+
+MAINTAINER= kmoore@FreeBSD.org
+COMMENT= Userland conf files
+
+BUILD_DEPENDS= ${OS_WORLDDIST}:os/buildworld@${OS_FLAVOR}
+
+USES= os:flavors
+
+PREFIX=/
+NEED_ROOT= yes
+
+.include <bsd.port.pre.mk>
+
+do-build:
+ @${MKDIR} ${STAGEDIR}
+ ${ECHO_MSG} "==> Extracting ${OS_WORLDDIST}..."
+ ${TAR} xpf ${OS_WORLDDIST} -C ${STAGEDIR}
+
+do-install:
+ ${ECHO_MSG} "==> Generating plist..."
+ (cd ${STAGEDIR}; ${FIND} ./etc \( -type f -o -type l \) \
+ | ${SED} -e 's,^\./,,g' \
+ | ${AWK} '{print length, $$0}' | ${SORT} -rn \
+ | ${AWK} '{print $$2 }' \
+ | ${GREP} -v -e etc/login.conf.db -e etc/pwd.db -e etc/spwd.db \
+ >> ${TMPPLIST})
+ (cd ${STAGEDIR}; ${FIND} ./etc \( -type d \) \
+ | ${SED} -e 's,^\./,,g' \
+ | ${AWK} '{print length, $$0}' | ${SORT} -rn \
+ | ${AWK} '{print $$2 }' \
+ | ${GREP} -v -x '/' \
+ | ${XARGS} -I '{}' echo "@dir {}" \
+ | ${GREP} -v -x '@dir ' \
+ | ${CAT} >> ${TMPPLIST})
+ ${SH} ${PORTSDIR}/os/userland-base/files/scrubplist.sh \
+ ${PORTSDIR}/os/userland-base/files/configs \
+ ${TMPPLIST} ${STAGEDIR}
+
+clean:
+ if [ -d ${WRKDIR} ]; then \
+ if [ -w ${WRKDIR} ]; then \
+ ${ECHO_MSG} "===> Cleaning for ${PKGNAME}"; \
+ ${CHFLAGS} -R noschg ${WRKDIR} ; \
+ ${RM} -r ${WRKDIR}; \
+ else \
+ ${ECHO_MSG} "===> ${WRKDIR} not writable, skipping"; \
+ fi; \
+ fi
+
+.include "../Makefile.common"
+.include <bsd.port.post.mk>
Index: os/userland-conf/pkg-descr
===================================================================
--- /dev/null
+++ os/userland-conf/pkg-descr
@@ -0,0 +1,3 @@
+Userland configuration files
+
+WWW: https://github.com/trueos/trueos
Index: os/userland-debug/Makefile
===================================================================
--- /dev/null
+++ os/userland-debug/Makefile
@@ -0,0 +1,55 @@
+# $FreeBSD$
+
+PORTNAME= userland-debug
+PORTVERSION= ${BASEPKG_PORTVERSION}
+CATEGORIES= os
+PKGNAMEPREFIX= ${OS_PKGNAMEPREFIX}
+DISTFILES=
+EXTRACT_ONLY=
+
+MAINTAINER= kmoore@FreeBSD.org
+COMMENT= Userland debuging symbols
+
+BUILD_DEPENDS= ${OS_WORLDDIST}:os/buildworld@${OS_FLAVOR}
+
+USES= os:flavors
+
+PREFIX=/
+NEED_ROOT= yes
+
+.include <bsd.port.pre.mk>
+
+do-build:
+ @${MKDIR} ${STAGEDIR}
+ ${ECHO_MSG} "==> Extracting ${OS_WORLDDIST}..."
+ ${TAR} xpf ${OS_WORLDDIST} -C ${STAGEDIR}
+
+do-install:
+ ${ECHO_MSG} "==> Generating plist..."
+ (cd ${STAGEDIR}; ${FIND} ./usr/lib/debug \( -type f -o -type l \) \
+ | ${SED} -e 's,^\./,,g' \
+ | ${AWK} '{print length, $$0}' | ${SORT} -rn \
+ | ${AWK} '{print $$2 }' \
+ >> ${TMPPLIST})
+ (cd ${STAGEDIR}; ${FIND} ./usr/lib/debug \( -type d \) \
+ | ${SED} -e 's,^\./,,g' \
+ | ${AWK} '{print length, $$0}' | ${SORT} -rn \
+ | ${AWK} '{print $$2 }' \
+ | ${GREP} -v -x '/' \
+ | ${XARGS} -I '{}' echo "@dir {}" \
+ | ${GREP} -v -x '@dir ' \
+ | ${CAT} >> ${TMPPLIST})
+
+clean:
+ if [ -d ${WRKDIR} ]; then \
+ if [ -w ${WRKDIR} ]; then \
+ ${ECHO_MSG} "===> Cleaning for ${PKGNAME}"; \
+ ${CHFLAGS} -R noschg ${WRKDIR} ; \
+ ${RM} -r ${WRKDIR}; \
+ else \
+ ${ECHO_MSG} "===> ${WRKDIR} not writable, skipping"; \
+ fi; \
+ fi
+
+.include "../Makefile.common"
+.include <bsd.port.post.mk>
Index: os/userland-debug/pkg-descr
===================================================================
--- /dev/null
+++ os/userland-debug/pkg-descr
@@ -0,0 +1,3 @@
+Userland debug support files
+
+WWW: https://github.com/trueos/trueos
Index: os/userland-devel/Makefile
===================================================================
--- /dev/null
+++ os/userland-devel/Makefile
@@ -0,0 +1,67 @@
+# $FreeBSD$
+
+PORTNAME= userland-devel
+PORTVERSION= ${BASEPKG_PORTVERSION}
+CATEGORIES= os
+PKGNAMEPREFIX= ${OS_PKGNAMEPREFIX}
+DISTFILES=
+EXTRACT_ONLY=
+
+MAINTAINER= kmoore@FreeBSD.org
+COMMENT= Userland development tools and libraries
+
+BUILD_DEPENDS= ${OS_WORLDDIST}:os/buildworld@${OS_FLAVOR}
+
+USES= os:flavors
+
+PREFIX=/
+NEED_ROOT= yes
+
+.include <bsd.port.pre.mk>
+
+do-build:
+ @${MKDIR} ${STAGEDIR}
+ ${ECHO_MSG} "==> Extracting ${OS_WORLDDIST}..."
+ ${TAR} xpf ${OS_WORLDDIST} -C ${STAGEDIR}
+
+do-install:
+ ${ECHO_MSG} "==> Generating plist..."
+ (cd ${STAGEDIR}; ${FIND} ./usr/bin ./usr/include ./usr/lib \( -type f -o -type l \) \
+ | ${SED} -e 's,^\./,,g' \
+ | ${AWK} '{print length, $$0}' | ${SORT} -rn \
+ | ${AWK} '{print $$2 }' \
+ | ${GREP} -e 'usr/include' \
+ -e '\.a' \
+ -e 'usr/bin/lldb' \
+ -e 'usr/bin/llvm' \
+ -e 'usr/bin/ld' \
+ -e 'usr/bin/ld\.' \
+ -e 'usr/bin/c++' \
+ -e 'usr/bin/cc' \
+ -e 'usr/bin/clang' \
+ -e 'usr/lib/clang' \
+ | grep -v -e 'usr/lib/debug' \
+ >> ${TMPPLIST})
+ (cd ${STAGEDIR}; ${FIND} ./usr/include ./usr/lib \( -type d \) \
+ | ${SED} -e 's,^\./,,g' \
+ | ${AWK} '{print length, $$0}' | ${SORT} -rn \
+ | ${AWK} '{print $$2 }' \
+ | ${GREP} -v -x '/' \
+ | ${GREP} -v -e 'usr/lib/debug' \
+ | ${XARGS} -I '{}' echo "@dir {}" \
+ | ${GREP} -v -x '@dir ' \
+ | ${CAT} >> ${TMPPLIST})
+
+clean:
+ if [ -d ${WRKDIR} ]; then \
+ if [ -w ${WRKDIR} ]; then \
+ ${ECHO_MSG} "===> Cleaning for ${PKGNAME}"; \
+ ${CHFLAGS} -R noschg ${WRKDIR} ; \
+ ${RM} -r ${WRKDIR}; \
+ else \
+ ${ECHO_MSG} "===> ${WRKDIR} not writable, skipping"; \
+ fi; \
+ fi
+
+.include "../Makefile.common"
+.include <bsd.port.post.mk>
Index: os/userland-devel/pkg-descr
===================================================================
--- /dev/null
+++ os/userland-devel/pkg-descr
@@ -0,0 +1,3 @@
+Userland development tools, files and libraries
+
+WWW: https://github.com/trueos/trueos
Index: os/userland-docs/Makefile
===================================================================
--- /dev/null
+++ os/userland-docs/Makefile
@@ -0,0 +1,57 @@
+# $FreeBSD$
+
+PORTNAME= userland-docs
+PORTVERSION= ${BASEPKG_PORTVERSION}
+CATEGORIES= os
+PKGNAMEPREFIX= ${OS_PKGNAMEPREFIX}
+DISTFILES=
+EXTRACT_ONLY=
+
+MAINTAINER= kmoore@FreeBSD.org
+COMMENT= Docs for the BSD system
+
+BUILD_DEPENDS= ${OS_WORLDDIST}:os/buildworld@${OS_FLAVOR}
+
+USES= os:flavors
+PREFIX=/
+NEED_ROOT= yes
+
+.include <bsd.port.pre.mk>
+
+do-build:
+ @${MKDIR} ${STAGEDIR}
+ ${ECHO_MSG} "==> ${OS_WORLDDIST}..."
+ ${TAR} xpf ${OS_WORLDDIST} -C ${STAGEDIR}
+
+do-install:
+ ${ECHO_MSG} "==> Generating plist..."
+ (cd ${STAGEDIR}; ${FIND} ./usr/share/doc ./usr/share/man \( -type f -o -type l \) \
+ | ${SED} -e 's,^\./,,g' \
+ | ${AWK} '{print length, $$0}' | ${SORT} -rn \
+ | ${AWK} '{print $$2 }' \
+ >> ${TMPPLIST})
+ (cd ${STAGEDIR}; ${FIND} ./usr/share/doc ./usr/share/man \( -type d \) \
+ | ${SED} -e 's,^\./,,g' \
+ | ${AWK} '{print length, $$0}' | ${SORT} -rn \
+ | ${AWK} '{print $$2 }' \
+ | ${GREP} -v -x '/' \
+ | ${XARGS} -I '{}' echo "@dir {}" \
+ | ${GREP} -v -x '@dir ' \
+ | ${CAT} >> ${TMPPLIST})
+ ${SH} ${PORTSDIR}/os/userland-base/files/scrubplist.sh \
+ ${PORTSDIR}/os/userland-base/files/configs \
+ ${TMPPLIST} ${STAGEDIR}
+
+clean:
+ if [ -d ${WRKDIR} ]; then \
+ if [ -w ${WRKDIR} ]; then \
+ ${ECHO_MSG} "===> Cleaning for ${PKGNAME}"; \
+ ${CHFLAGS} -R noschg ${WRKDIR} ; \
+ ${RM} -r ${WRKDIR}; \
+ else \
+ ${ECHO_MSG} "===> ${WRKDIR} not writable, skipping"; \
+ fi; \
+ fi
+
+.include "../Makefile.common"
+.include <bsd.port.post.mk>
Index: os/userland-docs/pkg-descr
===================================================================
--- /dev/null
+++ os/userland-docs/pkg-descr
@@ -0,0 +1,3 @@
+The BSD userland
+
+WWW: https://github.com/trueos/trueos
Index: os/userland-lib/Makefile
===================================================================
--- /dev/null
+++ os/userland-lib/Makefile
@@ -0,0 +1,64 @@
+# $FreeBSD$
+
+PORTNAME= userland-lib
+PORTVERSION= ${BASEPKG_PORTVERSION}
+PORTREVISION= 1
+CATEGORIES= os
+PKGNAMEPREFIX= ${OS_PKGNAMEPREFIX}
+DISTFILES=
+EXTRACT_ONLY=
+
+MAINTAINER= kmoore@FreeBSD.org
+COMMENT= Userland library files
+
+BUILD_DEPENDS= ${OS_WORLDDIST}:os/buildworld@${OS_FLAVOR}
+
+USES= os:flavors
+
+PREFIX=/
+NEED_ROOT= yes
+
+.include <bsd.port.pre.mk>
+
+do-build:
+ @${MKDIR} ${STAGEDIR}
+ ${ECHO_MSG} "==> Extracting ${OS_WORLDDIST}..."
+ ${TAR} xpf ${OS_WORLDDIST} -C ${STAGEDIR}
+
+do-install:
+ ${ECHO_MSG} "==> Generating plist..."
+ (cd ${STAGEDIR}; ${FIND} ./lib ./usr/lib \( -type f -o -type l \) \
+ | ${SED} -e 's,^\./,,g' \
+ | ${AWK} '{print length, $$0}' | ${SORT} -rn \
+ | ${AWK} '{print $$2 }' \
+ | ${GREP} -v -e '\.a' \
+ | ${GREP} -v -e 'usr/lib/debug' \
+ | ${GREP} -v -e 'lib/libc\.so' \
+ | ${GREP} -v -e 'lib/libthr\.so' \
+ | ${GREP} -v -e 'lib/libm\.so' \
+ | ${GREP} -v -e 'usr/lib/clang' \
+ >> ${TMPPLIST})
+ (cd ${STAGEDIR}; ${FIND} ./lib ./usr/lib \( -type d \) \
+ | ${SED} -e 's,^\./,,g' \
+ | ${AWK} '{print length, $$0}' | ${SORT} -rn \
+ | ${AWK} '{print $$2 }' \
+ | ${GREP} -v -x '/' \
+ | ${GREP} -v -e 'usr/lib/debug' \
+ | ${GREP} -v -e 'usr/lib/clang' \
+ | ${XARGS} -I '{}' echo "@dir {}" \
+ | ${GREP} -v -x '@dir ' \
+ | ${CAT} >> ${TMPPLIST})
+
+clean:
+ if [ -d ${WRKDIR} ]; then \
+ if [ -w ${WRKDIR} ]; then \
+ ${ECHO_MSG} "===> Cleaning for ${PKGNAME}"; \
+ ${CHFLAGS} -R noschg ${WRKDIR} ; \
+ ${RM} -r ${WRKDIR}; \
+ else \
+ ${ECHO_MSG} "===> ${WRKDIR} not writable, skipping"; \
+ fi; \
+ fi
+
+.include "../Makefile.common"
+.include <bsd.port.post.mk>
Index: os/userland-lib/pkg-descr
===================================================================
--- /dev/null
+++ os/userland-lib/pkg-descr
@@ -0,0 +1,3 @@
+Userland libraries
+
+WWW: https://github.com/trueos/trueos
Index: os/userland-lib32/Makefile
===================================================================
--- /dev/null
+++ os/userland-lib32/Makefile
@@ -0,0 +1,59 @@
+# $FreeBSD$
+
+PORTNAME= userland-lib32
+PORTVERSION= ${BASEPKG_PORTVERSION}
+CATEGORIES= os
+PKGNAMEPREFIX= ${OS_PKGNAMEPREFIX}
+DISTFILES=
+EXTRACT_ONLY=
+
+MAINTAINER= kmoore@FreeBSD.org
+COMMENT= Userland lib32 support
+
+BUILD_DEPENDS= ${OS_WORLDDIST}:os/buildworld@${OS_FLAVOR}
+
+USES= os:flavors
+
+PREFIX=/
+NEED_ROOT= yes
+
+.include <bsd.port.pre.mk>
+
+do-build:
+ @${MKDIR} ${STAGEDIR}
+ ${ECHO_MSG} "==> ${OS_WORLDDIST}..."
+ ${TAR} xpf ${OS_WORLDDIST} -C ${STAGEDIR}
+
+do-install:
+ ${ECHO_MSG} "==> Generating plist..."
+ (cd ${STAGEDIR}; ${FIND} ./usr/lib32 \( -type f -o -type l \) \
+ | ${SED} -e 's,^\./,,g' \
+ | ${AWK} '{print length, $$0}' | ${SORT} -rn \
+ | ${AWK} '{print $$2 }' \
+ | ${GREP} -v -e '\.a' \
+ >> ${TMPPLIST})
+ (cd ${STAGEDIR}; ${FIND} ./usr/lib32 \( -type d \) \
+ | ${SED} -e 's,^\./,,g' \
+ | ${AWK} '{print length, $$0}' | ${SORT} -rn \
+ | ${AWK} '{print $$2 }' \
+ | ${GREP} -v -x '/' \
+ | ${XARGS} -I '{}' echo "@dir {}" \
+ | ${GREP} -v -x '@dir ' \
+ | ${CAT} >> ${TMPPLIST})
+ ${SH} ${PORTSDIR}/os/userland-base/files/scrubplist.sh \
+ ${PORTSDIR}/os/userland-base/files/configs \
+ ${TMPPLIST} ${STAGEDIR}
+
+clean:
+ if [ -d ${WRKDIR} ]; then \
+ if [ -w ${WRKDIR} ]; then \
+ ${ECHO_MSG} "===> Cleaning for ${PKGNAME}"; \
+ ${CHFLAGS} -R noschg ${WRKDIR} ; \
+ ${RM} -r ${WRKDIR}; \
+ else \
+ ${ECHO_MSG} "===> ${WRKDIR} not writable, skipping"; \
+ fi; \
+ fi
+
+.include "../Makefile.common"
+.include <bsd.port.post.mk>
Index: os/userland-lib32/pkg-descr
===================================================================
--- /dev/null
+++ os/userland-lib32/pkg-descr
@@ -0,0 +1,3 @@
+Userland 32bit support
+
+WWW: https://github.com/trueos/trueos
Index: os/userland-rescue/Makefile
===================================================================
--- /dev/null
+++ os/userland-rescue/Makefile
@@ -0,0 +1,55 @@
+# $FreeBSD$
+
+PORTNAME= userland-rescue
+PORTVERSION= ${BASEPKG_PORTVERSION}
+CATEGORIES= os
+PKGNAMEPREFIX= ${OS_PKGNAMEPREFIX}
+DISTFILES=
+EXTRACT_ONLY=
+
+MAINTAINER= kmoore@FreeBSD.org
+COMMENT= Userland rescue files
+
+BUILD_DEPENDS= ${OS_WORLDDIST}:os/buildworld@${OS_FLAVOR}
+
+USES= os:flavors
+
+PREFIX=/
+NEED_ROOT= yes
+
+.include <bsd.port.pre.mk>
+
+do-build:
+ @${MKDIR} ${STAGEDIR}
+ ${ECHO_MSG} "==> Extracting ${OS_WORLDDIST}..."
+ ${TAR} xpf ${OS_WORLDDIST} -C ${STAGEDIR}
+
+do-install:
+ ${ECHO_MSG} "==> Generating plist..."
+ (cd ${STAGEDIR}; ${FIND} ./rescue \( -type f -o -type l \) \
+ | ${SED} -e 's,^\./,,g' \
+ | ${AWK} '{print length, $$0}' | ${SORT} -rn \
+ | ${AWK} '{print $$2 }' \
+ >> ${TMPPLIST})
+ (cd ${STAGEDIR}; ${FIND} ./rescue \( -type d \) \
+ | ${SED} -e 's,^\./,,g' \
+ | ${AWK} '{print length, $$0}' | ${SORT} -rn \
+ | ${AWK} '{print $$2 }' \
+ | ${GREP} -v -x '/' \
+ | ${XARGS} -I '{}' echo "@dir {}" \
+ | ${GREP} -v -x '@dir ' \
+ | ${CAT} >> ${TMPPLIST})
+
+clean:
+ if [ -d ${WRKDIR} ]; then \
+ if [ -w ${WRKDIR} ]; then \
+ ${ECHO_MSG} "===> Cleaning for ${PKGNAME}"; \
+ ${CHFLAGS} -R noschg ${WRKDIR} ; \
+ ${RM} -r ${WRKDIR}; \
+ else \
+ ${ECHO_MSG} "===> ${WRKDIR} not writable, skipping"; \
+ fi; \
+ fi
+
+.include "../Makefile.common"
+.include <bsd.port.post.mk>
Index: os/userland-rescue/pkg-descr
===================================================================
--- /dev/null
+++ os/userland-rescue/pkg-descr
@@ -0,0 +1,3 @@
+Userland rescue binaries
+
+WWW: https://github.com/trueos/trueos
Index: os/userland-sbin/Makefile
===================================================================
--- /dev/null
+++ os/userland-sbin/Makefile
@@ -0,0 +1,55 @@
+# $FreeBSD$
+
+PORTNAME= userland-sbin
+PORTVERSION= ${BASEPKG_PORTVERSION}
+CATEGORIES= os
+PKGNAMEPREFIX= ${OS_PKGNAMEPREFIX}
+DISTFILES=
+EXTRACT_ONLY=
+
+MAINTAINER= kmoore@FreeBSD.org
+COMMENT= Userland sbin executables
+
+BUILD_DEPENDS= ${OS_WORLDDIST}:os/buildworld@${OS_FLAVOR}
+
+USES= os:flavors
+
+PREFIX=/
+NEED_ROOT= yes
+
+.include <bsd.port.pre.mk>
+
+do-build:
+ @${MKDIR} ${STAGEDIR}
+ ${ECHO_MSG} "==> Extracting ${OS_WORLDDIST}..."
+ ${TAR} xpf ${OS_WORLDDIST} -C ${STAGEDIR}
+
+do-install:
+ ${ECHO_MSG} "==> Generating plist..."
+ (cd ${STAGEDIR}; ${FIND} ./sbin ./usr/sbin \( -type f -o -type l \) \
+ | ${SED} -e 's,^\./,,g' \
+ | ${AWK} '{print length, $$0}' | ${SORT} -rn \
+ | ${AWK} '{print $$2 }' \
+ >> ${TMPPLIST})
+ (cd ${STAGEDIR}; ${FIND} ./sbin ./usr/sbin \( -type d \) \
+ | ${SED} -e 's,^\./,,g' \
+ | ${AWK} '{print length, $$0}' | ${SORT} -rn \
+ | ${AWK} '{print $$2 }' \
+ | ${GREP} -v -x '/' \
+ | ${XARGS} -I '{}' echo "@dir {}" \
+ | ${GREP} -v -x '@dir ' \
+ | ${CAT} >> ${TMPPLIST})
+
+clean:
+ if [ -d ${WRKDIR} ]; then \
+ if [ -w ${WRKDIR} ]; then \
+ ${ECHO_MSG} "===> Cleaning for ${PKGNAME}"; \
+ ${CHFLAGS} -R noschg ${WRKDIR} ; \
+ ${RM} -r ${WRKDIR}; \
+ else \
+ ${ECHO_MSG} "===> ${WRKDIR} not writable, skipping"; \
+ fi; \
+ fi
+
+.include "../Makefile.common"
+.include <bsd.port.post.mk>
Index: os/userland-sbin/pkg-descr
===================================================================
--- /dev/null
+++ os/userland-sbin/pkg-descr
@@ -0,0 +1,3 @@
+Userland binaries from /sbin and /usr/sbin
+
+WWW: https://github.com/trueos/trueos
Index: os/userland-tests/Makefile
===================================================================
--- /dev/null
+++ os/userland-tests/Makefile
@@ -0,0 +1,58 @@
+# $FreeBSD$
+
+PORTNAME= userland-tests
+PORTVERSION= ${BASEPKG_PORTVERSION}
+CATEGORIES= os
+PKGNAMEPREFIX= ${OS_PKGNAMEPREFIX}
+DISTFILES=
+EXTRACT_ONLY=
+
+MAINTAINER= kmoore@FreeBSD.org
+COMMENT= Userland tests
+
+BUILD_DEPENDS= ${OS_WORLDDIST}:os/buildworld@${OS_FLAVOR}
+
+USES= os:flavors
+
+PREFIX=/
+NEED_ROOT=yes
+
+.include <bsd.port.pre.mk>
+
+do-build:
+ @${MKDIR} ${STAGEDIR}
+ ${ECHO_MSG} "==> Extracting ${OS_WORLDDIST}..."
+ ${TAR} xpf ${OS_WORLDDIST} -C ${STAGEDIR}
+
+do-install:
+ ${ECHO_MSG} "==> Generating plist..."
+ (cd ${STAGEDIR}; ${FIND} ./usr/tests \( -type f -o -type l \) \
+ | ${SED} -e 's,^\./,,g' \
+ | ${AWK} '{print length, $$0}' | ${SORT} -rn \
+ | ${AWK} '{print $$2 }' \
+ >> ${TMPPLIST})
+ (cd ${STAGEDIR}; ${FIND} ./usr/tests \( -type d \) \
+ | ${SED} -e 's,^\./,,g' \
+ | ${AWK} '{print length, $$0}' | ${SORT} -rn \
+ | ${AWK} '{print $$2 }' \
+ | ${GREP} -v -x '/' \
+ | ${XARGS} -I '{}' echo "@dir {}" \
+ | ${GREP} -v -x '@dir ' \
+ | ${CAT} >> ${TMPPLIST})
+ ${SH} ${PORTSDIR}/os/userland-base/files/scrubplist.sh \
+ ${PORTSDIR}/os/userland-base/files/configs \
+ ${TMPPLIST} ${STAGEDIR}
+
+clean:
+ if [ -d ${WRKDIR} ]; then \
+ if [ -w ${WRKDIR} ]; then \
+ ${ECHO_MSG} "===> Cleaning for ${PKGNAME}"; \
+ ${CHFLAGS} -R noschg ${WRKDIR} ; \
+ ${RM} -r ${WRKDIR}; \
+ else \
+ ${ECHO_MSG} "===> ${WRKDIR} not writable, skipping"; \
+ fi; \
+ fi
+
+.include "../Makefile.common"
+.include <bsd.port.post.mk>
Index: os/userland-tests/pkg-descr
===================================================================
--- /dev/null
+++ os/userland-tests/pkg-descr
@@ -0,0 +1,3 @@
+Userland tests
+
+WWW: https://github.com/trueos/trueos
Index: os/userland/Makefile
===================================================================
--- /dev/null
+++ os/userland/Makefile
@@ -0,0 +1,49 @@
+# $FreeBSD$
+
+PORTNAME= userland
+PORTVERSION= ${BASEPKG_PORTVERSION}
+PORTEPOCH= 1
+CATEGORIES= os
+PKGNAMEPREFIX= ${OS_PKGNAMEPREFIX}
+
+MAINTAINER= kmoore@FreeBSD.org
+COMMENT= Metaport for the OS userland
+
+USES= metaport os:flavors
+
+OPTIONS_DEFINE= DEBUG DOCS LIB32 TESTS OPENZFS
+OPTIONS_DEFAULT= DOCS
+OPTIONS_SUB= yes
+DOCS_DESC= Include manpages and other documentation
+LIB32_DESC= Support for execution of i386 applications
+TESTS_DESC= Optional test framework scripts and tools
+OPENZFS_DESC= OpenZFS userland and kernel support
+
+RUN_DEPENDS+= /COPYRIGHT:os/userland-base@${OS_FLAVOR}
+
+.include <bsd.port.pre.mk>
+
+.if ${PORT_OPTIONS:MDEBUG}
+RUN_DEPENDS+= /usr/lib/debug/bin/sh.debug:os/userland-debug@${OS_FLAVOR}
+.endif
+
+.if ${PORT_OPTIONS:MDOCS}
+RUN_DEPENDS+= /usr/share/man/man1/sh.1.gz:os/userland-docs@${OS_FLAVOR}
+.endif
+
+.if ${PORT_OPTIONS:MLIB32}
+RUN_DEPENDS+= /usr/lib32/libc.so:os/userland-lib32@${OS_FLAVOR}
+.endif
+
+.if ${PORT_OPTIONS:MTESTS}
+RUN_DEPENDS+= /usr/tests/README:os/userland-tests@${OS_FLAVOR}
+.endif
+
+.if ${PORT_OPTIONS:MOPENZFS}
+WITH_OPENZFS= YES
+OPTIONS_SET+= OPENZFS
+RUN_DEPENDS+= ${LOCALBASE}/sbin/zpool:sysutils/openzfs
+.endif
+
+.include "../Makefile.common"
+.include <bsd.port.post.mk>
Index: os/userland/pkg-descr
===================================================================
--- /dev/null
+++ os/userland/pkg-descr
@@ -0,0 +1,3 @@
+The BSD userland metaport
+
+WWW: https://github.com/trueos/trueos
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 17, 9:40 AM (5 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25412289
Default Alt Text
D20394.id59391.diff (78 KB)
Attached To
Mode
D20394: Ports Tree Base Packages
Attached
Detach File
Event Timeline
Log In to Comment