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,42 @@ 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 + /bin/sh) + inject_base_dep "os/userland-base" + continue + ;; + /libexec/ld-elf.so.1) + inject_base_dep "os/userland-base-bootstrap" + 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/lib32/libc.a) + inject_base_dep "os/userland-lib32" + 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/Uses/kmod.mk =================================================================== --- Mk/Uses/kmod.mk +++ Mk/Uses/kmod.mk @@ -34,6 +34,11 @@ KMODDIR= /boot/modules .endif +# Track our kernel trigger meta-package, this ensures that kmods are updated +# at same time as os/kernel@${FLAVOR} to prevent possible boot issues +.include "../../os/Makefile.common" +RUN_DEPENDS+= kernel-kmod-sentinel=${BASEPKG_PORTVERSION}:os/kernel-kmod-sentinel + _DEBUG_KMOD_SH= \ ${ECHO_CMD} -n "\"@dir /%%KERN_DEBUGDIR%%/%%KMODDIR%%\"" ; \ skd=`${ECHO_CMD} ${KMODDIR} | ${SED} "s,/, ,g"` ; \ Index: Mk/Uses/os.mk =================================================================== --- /dev/null +++ Mk/Uses/os.mk @@ -0,0 +1,97 @@ +# $FreeBSD$ +# +# Support for OS ports. +# +# Feature: os +# Usage: USES=os +# Valid ARGS: (none), flavors, noflavors, generic, minimal, zol +# +# - flavors : Generates flavors for supported versions. +# - noflavors: Prevents generation of flavor. +# - generic : Default FreeBSD build options +# - minimal : Build a stripped down version of FreeBSD world +# - zol : Build without base ZFS and replace with sysutils/zol +# + +.if !defined(_INCLUDE_USES_OS_MK) + +OS_Include_MAINTAINER= kmoore@FreeBSD.org + +_INCLUDE_USES_OS_MK= yes + +_OS_VALID_ARGS= flavors generic noflavors zol + +_OS_UNKNOWN_ARGS= +.for arg in ${os_ARGS} +. if empty(_OS_VALID_ARGS:M${arg}) +_OS_UNKNOWN_ARGS+= ${arg} +. endif +.endfor +.if !empty(_OS_UNKNOWN_ARGS) +IGNORE= has unknown USES=os arguments: ${_OS_UNKNOWN_ARGS} +.endif + +. if ${os_ARGS:Mnoflavors} && ${os_ARGS:Mflavors} +os_ARGS:= ${os_ARGS:Nflavors} +. endif + +_ALL_OS_FLAVORS= generic minimal zol + +OS_DEFAULT_FLAVOR?= generic + +# Use the "default" os flavor as the first flavor, so that it +# gets to be the default. +_ALL_FLAVORS= ${OS_DEFAULT_FLAVOR} ${_ALL_OS_FLAVORS:N${OS_DEFAULT_FLAVOR}} + +# If we want flavors, fill in FLAVORS with the allowed flavors, if some +# cannot be used, or all of them if they all can. +# Then if there is no flavor set, use the first one as the default. +. if ${os_ARGS:Mflavors} +. if empty(FLAVORS) +FLAVORS:= ${_ALL_FLAVORS} +. endif +. if empty(FLAVOR) +FLAVOR= ${FLAVORS:[1]} +. endif +. endif + +# This variable is for dependencies lines, so you write: +# ${OS_PKGNAMEPREFIX}foo:os/userland-foo@${OS_FLAVOR} +OS_FLAVOR= ${FLAVOR} + +# Set a few PKGNAME(PRE|SUF)FIX to be used in ports. +OS_PKGNAMEPREFIX= os-${FLAVOR}- +OS_PKGNAMESUFFIX= -os-${FLAVOR} + +# Options for the ZOL flavor +. if ${FLAVOR} == "zol" +PORT_OPTIONS:= ${PORT_OPTIONS:NZFS} +. endif + +# Options for the minimal flavor +. if ${FLAVOR} == "minimal" +PORT_OPTIONS:= ${PORT_OPTIONS:NBSDINSTALL} +PORT_OPTIONS:= ${PORT_OPTIONS:NFTP} +PORT_OPTIONS:= ${PORT_OPTIONS:NGCOV} +PORT_OPTIONS:= ${PORT_OPTIONS:NGDB} +PORT_OPTIONS:= ${PORT_OPTIONS:NLPR} +PORT_OPTIONS:= ${PORT_OPTIONS:NMAIL} +PORT_OPTIONS:= ${PORT_OPTIONS:NNTP} +PORT_OPTIONS:= ${PORT_OPTIONS:NPC_SYSINSTALL} +PORT_OPTIONS:= ${PORT_OPTIONS:NPPP} +PORT_OPTIONS:= ${PORT_OPTIONS:NPORTSNAP} +PORT_OPTIONS:= ${PORT_OPTIONS:NSENDMAIL} +PORT_OPTIONS:= ${PORT_OPTIONS:NSVNLITE} +PORT_OPTIONS:= ${PORT_OPTIONS:NTELNET} +. endif + +. if ${FLAVOR} == "generic" +OS_KERNDIST= /usr/dist/kernel.txz +OS_KERNDIST_DEBUG= /usr/dist/kernel-debug.txz +OS_WORLDDIST= /usr/dist/world.txz +. else +OS_KERNDIST= /usr/dist/kernel-${FLAVOR}.txz +OS_KERNDIST_DEBUG= /usr/dist/kernel-${FLAVOR}-debug.txz +OS_WORLDDIST= /usr/dist/world-${FLAVOR}.txz +. endif +.endif Index: Mk/bsd.port.mk =================================================================== --- Mk/bsd.port.mk +++ Mk/bsd.port.mk @@ -2549,7 +2549,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 \ @@ -4227,7 +4227,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} @@ -4237,6 +4237,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} \ @@ -4270,6 +4271,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,23 @@ +# $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 += kernel-kmod-sentinel + SUBDIR += src + SUBDIR += userland + SUBDIR += userland-base + SUBDIR += userland-base-bootstrap + SUBDIR += userland-debug + SUBDIR += userland-docs + SUBDIR += userland-lib32 + SUBDIR += userland-tests + +.include Index: os/Makefile.common =================================================================== --- /dev/null +++ os/Makefile.common @@ -0,0 +1,15 @@ +BASEPKG_SRCDIR?= /usr/src +NEWVERS= ${BASEPKG_SRCDIR}/sys/conf/newvers.sh + +.if exists(${BASEPKG_SRCDIR}/Makefile) +# Get the version from BASEPKG_SRCDIR dynamically +SRCVERSION!= eval $$(egrep '^(REVISION)=' ${NEWVERS}) && echo $${REVISION} +SRCDATE!= stat -f %Sm -t "%Y%m%d%H%M%S" ${BASEPKG_SRCDIR} +BASEPKG_PORTVERSION= ${SRCVERSION}.${SRCDATE} +.else +IGNORE= Missing system sources in ${BASEPKG_SRCDIR} +.endif + +.if defined(BASEPKG_ABISTRING) +PKG_ABISTRING= ${BASEPKG_ABISTRING} +.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 + +.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 Index: os/buildkernel-debug/pkg-descr =================================================================== --- /dev/null +++ os/buildkernel-debug/pkg-descr @@ -0,0 +1,3 @@ +Debug Kernel build for ports + +WWW: https://www.freebsd.org 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 + +.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 Index: os/buildkernel/pkg-descr =================================================================== --- /dev/null +++ os/buildkernel/pkg-descr @@ -0,0 +1,3 @@ +Kernel build for ports + +WWW: https://www.freebsd.org Index: os/buildworld/Makefile =================================================================== --- /dev/null +++ os/buildworld/Makefile @@ -0,0 +1,91 @@ +# $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 + +.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 + 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 Index: os/buildworld/Makefile.options =================================================================== --- /dev/null +++ os/buildworld/Makefile.options @@ -0,0 +1,277 @@ + +NO_OPTIONS_SORT= yes + +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://www.freebsd.org 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 + +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 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://www.freebsd.org 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 + +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 Index: os/kernel-debug/pkg-descr =================================================================== --- /dev/null +++ os/kernel-debug/pkg-descr @@ -0,0 +1,3 @@ +Kernel with witness enabled + +WWW: https://www.freebsd.org Index: os/kernel-kmod-sentinel/Makefile =================================================================== --- /dev/null +++ os/kernel-kmod-sentinel/Makefile @@ -0,0 +1,14 @@ +# $FreeBSD$ + +PORTNAME= kernel-kmod-sentinel +PORTVERSION= ${BASEPKG_PORTVERSION} +CATEGORIES= os +PKGNAMEPREFIX= ${OS_PKGNAMEPREFIX} + +MAINTAINER= kmoore@FreeBSD.org +COMMENT= Metaport for ports kmod to ensure updates with kernel + +USES= metaport + +.include "../Makefile.common" +.include Index: os/kernel-kmod-sentinel/pkg-descr =================================================================== --- /dev/null +++ os/kernel-kmod-sentinel/pkg-descr @@ -0,0 +1,3 @@ +Sentinel port which keeps ports kmods in sync with kernel + +WWW: https://www.freebsd.org Index: os/kernel-symbols/Makefile =================================================================== --- /dev/null +++ os/kernel-symbols/Makefile @@ -0,0 +1,44 @@ +# $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 + +NO_OPTIONS_SORT= yes + +.include + +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 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://www.freebsd.org Index: os/kernel/Makefile =================================================================== --- /dev/null +++ os/kernel/Makefile @@ -0,0 +1,53 @@ +# $FreeBSD$ + +PORTNAME= kernel +PORTVERSION= ${BASEPKG_PORTVERSION} +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} +RUN_DEPENDS+= kernel-kmod-sentinel=${BASEPKG_PORTVERSION}:os/kernel-kmod-sentinel + +USES= os:flavors + +PREFIX=/ +NEED_ROOT= yes +PKGVITAL= yes + +NO_OPTIONS_SORT= yes + +OPTIONS_DEFINE= DEBUG +OPTIONS_DEFAULT= +OPTIONS_SUB= yes + +.include + +.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 Index: os/kernel/pkg-descr =================================================================== --- /dev/null +++ os/kernel/pkg-descr @@ -0,0 +1,3 @@ +Kernel compiled for base packages + +WWW: https://www.freebsd.org Index: os/src/Makefile =================================================================== --- /dev/null +++ os/src/Makefile @@ -0,0 +1,39 @@ +# $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 + +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 Index: os/src/pkg-descr =================================================================== --- /dev/null +++ os/src/pkg-descr @@ -0,0 +1,3 @@ +System Sources for TrueOS + +WWW: https://www.freebsd.org 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} +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 + +NO_OPTIONS_SORT= yes + +.include + +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 }' \ + >> ${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 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://www.freebsd.org Index: os/userland-base/Makefile =================================================================== --- /dev/null +++ os/userland-base/Makefile @@ -0,0 +1,83 @@ +# $FreeBSD$ + +PORTNAME= userland-base +PORTVERSION= ${BASEPKG_PORTVERSION} +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} \ + ${LOCALBASE}/bin/jq:textproc/jq +RUN_DEPENDS= /libexec/ld-elf.so.1:os/userland-base-bootstrap@${OS_FLAVOR} + +USES= os:flavors + +PREFIX=/ +NEED_ROOT= yes +PKGVITAL= yes + +NO_OPTIONS_SORT= yes + +.include + +do-build: + @${MKDIR} ${STAGEDIR} + @${ECHO_MSG} "==> Extracting ${OS_WORLDDIST}..." + @${TAR} xpf ${OS_WORLDDIST} \ + --exclude ./libexec/ld-elf.so.1 \ + --exclude ./libexec/ld-elf32.so.1 \ + --exclude ./lib/libc.* \ + --exclude ./lib/libthr.* \ + --exclude ./lib/libm.* \ + --exclude ./usr/lib/libc.so \ + --exclude ./usr/lib/libthr.so \ + --exclude ./usr/lib/libm.so \ + -C ${STAGEDIR} + ${INSTALL_SCRIPT} ${FILESDIR}/pkgbase.setup.in ${STAGEDIR}/etc/pkgbase.setup + @${ECHO} "${_OSVERSION_MAJOR}-${PKGVERSION}" > ${STAGEDIR}/etc/base_version + +do-install: + @${ECHO_MSG} "==> Generating plist..." + @(cd ${STAGEDIR}; ${FIND} . \( -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' \ + -e 'usr/lib/debug' \ + -e 'usr/tests' \ + -e 'usr/lib32' \ + -e 'usr/share/doc' \ + -e 'usr/share/man' \ + -e 'var/db/services.db' \ + >> ${TMPPLIST}) + @(cd ${STAGEDIR}; ${FIND} ./ \( -type d \) \ + | ${SED} -e 's,^\./,,g' \ + | ${AWK} '{print length, $$0}' | ${SORT} -rn \ + | ${AWK} '{print $$2 }' \ + | ${GREP} -v -e '/' \ + | ${GREP} -v -e 'usr/lib/debug' -e 'usr/tests' -e 'usr/lib32' -e 'usr/share/doc' -e 'usr/share/man' \ + | ${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 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/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 +# +# Setup script called by userland package during +# installation / upgrade + +PKG_ROOTDIR="$1" + +# Make sure /etc/fstab exists +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} +mtree -deU -f ${PKG_ROOTDIR}/etc/mtree/BSD.usr.dist \ + -p ${PKG_ROOTDIR}/usr +mtree -deU -f ${PKG_ROOTDIR}/etc/mtree/BSD.var.dist \ + -p ${PKG_ROOTDIR}/var +mtree -deU -f ${PKG_ROOTDIR}/etc/mtree/BSD.include.dist \ + -p ${PKG_ROOTDIR}/usr/include +if [ -e ${PKG_ROOTDIR}/etc/mtree/BSD.lib32.dist ] ; then + mtree -deU -f ${PKG_ROOTDIR}/etc/mtree/BSD.lib32.dist \ + -p ${PKG_ROOTDIR}/usr +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://www.freebsd.org 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-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 + +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 Index: os/userland-debug/pkg-descr =================================================================== --- /dev/null +++ os/userland-debug/pkg-descr @@ -0,0 +1,3 @@ +Userland debug support files + +WWW: https://www.freebsd.org 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 + +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 Index: os/userland-docs/pkg-descr =================================================================== --- /dev/null +++ os/userland-docs/pkg-descr @@ -0,0 +1,3 @@ +The BSD userland + +WWW: https://www.freebsd.org Index: os/userland-lib32/Makefile =================================================================== --- /dev/null +++ os/userland-lib32/Makefile @@ -0,0 +1,58 @@ +# $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 + +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 }' \ + >> ${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 Index: os/userland-lib32/pkg-descr =================================================================== --- /dev/null +++ os/userland-lib32/pkg-descr @@ -0,0 +1,3 @@ +Userland 32bit support + +WWW: https://www.freebsd.org 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 + +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 Index: os/userland-tests/pkg-descr =================================================================== --- /dev/null +++ os/userland-tests/pkg-descr @@ -0,0 +1,3 @@ +Userland tests + +WWW: https://www.freebsd.org Index: os/userland/Makefile =================================================================== --- /dev/null +++ os/userland/Makefile @@ -0,0 +1,48 @@ +# $FreeBSD$ + +PORTNAME= userland +PORTVERSION= ${BASEPKG_PORTVERSION} +CATEGORIES= os +PKGNAMEPREFIX= ${OS_PKGNAMEPREFIX} + +MAINTAINER= kmoore@FreeBSD.org +COMMENT= Metaport for the OS userland + +USES= metaport os:flavors + +NO_OPTIONS_SORT= yes + +OPTIONS_DEFINE= DEBUG DOCS LIB32 TESTS ZOL +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 +ZOL_DESC= ZFS on Linux userland and kernel support + +RUN_DEPENDS+= /bin/sh:os/userland-base@${OS_FLAVOR} + +.include + +.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.a:os/userland-lib32@${OS_FLAVOR} +.endif + +.if ${PORT_OPTIONS:MTESTS} +RUN_DEPENDS+= /usr/tests/README:os/userland-tests@${OS_FLAVOR} +.endif + +.if ${PORT_OPTIONS:MZOL} || ${FLAVOR} == "zol" +RUN_DEPENDS+= ${LOCALBASE}/sbin/zpool:sysutils/zol +.endif + +.include "../Makefile.common" +.include Index: os/userland/pkg-descr =================================================================== --- /dev/null +++ os/userland/pkg-descr @@ -0,0 +1,3 @@ +The BSD userland metaport + +WWW: https://www.freebsd.org