IFC @264767

This commit is contained in:
Alan Somers 2014-04-23 21:52:43 +00:00
commit 84e51a1b67
14413 changed files with 873811 additions and 633719 deletions

View File

@ -4,7 +4,7 @@
The compilation of software known as FreeBSD is distributed under the
following terms:
Copyright (c) 1992-2013 The FreeBSD Project. All rights reserved.
Copyright (c) 1992-2014 The FreeBSD Project. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions

View File

@ -77,12 +77,11 @@ ntp roberto Pre-commit review requested.
inetd dwmalone Recommends pre-commit review.
contrib/smbfs bp Open for in-tree committs. In case of functional
changes pre-commit review requested.
contrib/pf mlaier Pre-commit review requested.
contrib/pf glebius Pre-commit review recommended.
binutils obrien Insists on BU blocked from unapproved commits
file obrien Insists to keep file blocked from other's unapproved
commits
contrib/bzip2 obrien Pre-commit review required.
lukemftpd obrien Pre-commit review required.
geom_concat pjd Pre-commit review preferred.
geom_eli pjd Pre-commit review preferred.
geom_gate pjd Pre-commit review preferred.
@ -99,7 +98,6 @@ nfs alfred Will be happy to review code, but not mandatory.
rpc.lockd alfred Will be happy to review code, but not mandatory.
truss alfred Will be happy to review code, but not mandatory.
rpc alfred Pre-commit review requested.
pkg_install portmgr Pre-commit review or approval from portmgr@ requested.
linux emul emulation Please discuss changes here.
bs{diff,patch} cperciva Pre-commit review requested.
portsnap cperciva Pre-commit review requested.
@ -131,3 +129,7 @@ sh(1) jilles Pre-commit review requested. This also applies
nvme(4) jimharris Pre-commit review requested.
nvd(4) jimharris Pre-commit review requested.
nvmecontrol(8) jimharris Pre-commit review requested.
release/release.sh gjb Pre-commit review and regression tests
requested.
nanobsd imp Pre-commit review requested for coordination.
vmm(4) neel,grehan Pre-commit review requested.

View File

@ -32,6 +32,10 @@
# targets - Print a list of supported TARGET/TARGET_ARCH pairs
# for world and kernel targets.
# toolchains - Build a toolchain for all world and kernel targets.
# xdev - xdev-build + xdev-install for the architecture
# specified with XDEV and XDEV_ARCH.
# xdev-build - Build cross-development tools.
# xdev-install - Install cross-development tools.
#
# "quick" way to test all kernel builds:
# _jflag=`sysctl -n hw.ncpu`
@ -164,21 +168,7 @@ _MAKE= PATH=${PATH} ${SUB_MAKE} -f Makefile.inc1 TARGET=${_TARGET} TARGET_ARCH=$
_TARGET_ARCH= ${TARGET:S/pc98/i386/}
.elif !defined(TARGET) && defined(TARGET_ARCH) && \
${TARGET_ARCH} != ${MACHINE_ARCH}
_TARGET= ${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb)?/arm/}
.endif
# Legacy names, for another transition period mips:mips(n32|64)?eb -> mips:mips\1
.if defined(TARGET) && defined(TARGET_ARCH) && \
${TARGET} == "mips" && ${TARGET_ARCH:Mmips*eb}
_TARGET_ARCH= ${TARGET_ARCH:C/eb$//}
.warning "TARGET_ARCH of ${TARGET_ARCH} is deprecated in favor of ${_TARGET_ARCH}"
.endif
.if defined(TARGET) && ${TARGET} == "mips" && defined(TARGET_BIG_ENDIAN)
.warning "TARGET_BIG_ENDIAN is no longer necessary for MIPS. Big-endian is not the default."
.endif
# arm with TARGET_BIG_ENDIAN -> armeb
.if defined(TARGET_ARCH) && ${TARGET_ARCH} == "arm" && defined(TARGET_BIG_ENDIAN)
.warning "TARGET_ARCH of arm with TARGET_BIG_ENDIAN is deprecated. use armeb"
_TARGET_ARCH=armeb
_TARGET= ${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb|hf)?/arm/}
.endif
.if defined(TARGET) && !defined(_TARGET)
_TARGET=${TARGET}
@ -339,9 +329,9 @@ MMAKEENV= MAKEOBJDIRPREFIX=${MYMAKE:H} \
DESTDIR= \
INSTALL="sh ${.CURDIR}/tools/install.sh"
MMAKE= ${MMAKEENV} ${MAKE} \
-D_UPGRADING \
-DNOMAN -DNO_MAN -DNOSHARED -DNO_SHARED \
-DNO_CPU_CFLAGS -DNO_WERROR DESTDIR= PROGNAME=${MYMAKE:T}
-D_UPGRADING -DNO_MAN -DNO_SHARED \
-DNO_CPU_CFLAGS -DNO_WERROR \
DESTDIR= MK_TESTS=no PROGNAME=${MYMAKE:T}
make bmake: .PHONY
@echo
@ -374,7 +364,7 @@ kernel-toolchains:
#
.if make(universe) || make(universe_kernels) || make(tinderbox) || make(targets)
TARGETS?=amd64 arm i386 ia64 mips pc98 powerpc sparc64
TARGET_ARCHES_arm?= arm armeb armv6
TARGET_ARCHES_arm?= arm armeb armv6 armv6hf
TARGET_ARCHES_mips?= mipsel mips mips64el mips64 mipsn32
TARGET_ARCHES_powerpc?= powerpc powerpc64
TARGET_ARCHES_pc98?= i386

View File

@ -58,6 +58,7 @@
# use that new version. And the new (dynamically-linked) /bin/sh
# will expect to find appropriate libraries in /lib and /libexec.
#
SRCDIR?= ${.CURDIR}
.if defined(SUBDIR_OVERRIDE)
SUBDIR= ${SUBDIR_OVERRIDE}
.else
@ -84,6 +85,9 @@ SUBDIR+=secure
SUBDIR+=share
.endif
SUBDIR+=sys usr.bin usr.sbin
.if ${MK_TESTS} != "no"
SUBDIR+= tests
.endif
.if ${MK_OFED} != "no"
SUBDIR+=contrib/ofed
.endif
@ -128,11 +132,14 @@ OSRELDATE= 0
.endif
.if !defined(VERSION)
VERSION!= uname -srp
VERSION+= ${OSRELDATE}
REVISION!= ${MAKE} -C ${SRCDIR}/release -V REVISION
BRANCH!= ${MAKE} -C ${SRCDIR}/release -V BRANCH
SRCRELDATE!= awk '/^\#define[[:space:]]*__FreeBSD_version/ { print $$3 }' \
${SRCDIR}/sys/sys/param.h
VERSION= FreeBSD ${REVISION}-${BRANCH:C/-p[0-9]+$//} ${TARGET_ARCH} ${SRCRELDATE}
.endif
KNOWN_ARCHES?= amd64 arm armeb/arm armv6/arm i386 i386/pc98 ia64 mips mipsel/mips mips64el/mips mips64/mips mipsn32el/mips mipsn32/mips powerpc powerpc64/powerpc sparc64
KNOWN_ARCHES?= amd64 arm armeb/arm armv6/arm armv6hf/arm i386 i386/pc98 ia64 mips mipsel/mips mips64el/mips mips64/mips mipsn32el/mips mipsn32/mips powerpc powerpc64/powerpc sparc64
.if ${TARGET} == ${TARGET_ARCH}
_t= ${TARGET}
.else
@ -224,22 +231,24 @@ CROSSENV+= GROFF_BIN_PATH=${WORLDTMP}/legacy/usr/bin \
GROFF_FONT_PATH=${WORLDTMP}/legacy/usr/share/groff_font \
GROFF_TMAC_PATH=${WORLDTMP}/legacy/usr/share/tmac
.endif
.if defined(TARGET_CFLAGS)
CROSSENV+= ${TARGET_CFLAGS}
.endif
# bootstrap-tools stage
BMAKEENV= INSTALL="sh ${.CURDIR}/tools/install.sh" \
PATH=${BPATH}:${PATH} \
WORLDTMP=${WORLDTMP} \
VERSION="${VERSION}" \
MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}" \
COMPILER_TYPE=${COMPILER_TYPE}
MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}"
BMAKE= MAKEOBJDIRPREFIX=${WORLDTMP} \
${BMAKEENV} ${MAKE} ${WORLD_FLAGS} -f Makefile.inc1 \
DESTDIR= \
BOOTSTRAPPING=${OSRELDATE} \
SSP_CFLAGS= \
-DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT -DWITHOUT_MAN \
MK_HTML=no MK_INFO=no NO_LINT=yes MK_MAN=no \
-DNO_PIC -DNO_PROFILE -DNO_SHARED \
-DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF -DEARLY_BUILD
-DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF -DEARLY_BUILD MK_TESTS=no
# build-tools stage
TMAKE= MAKEOBJDIRPREFIX=${OBJTREE} \
@ -249,12 +258,26 @@ TMAKE= MAKEOBJDIRPREFIX=${OBJTREE} \
BOOTSTRAPPING=${OSRELDATE} \
SSP_CFLAGS= \
-DNO_LINT \
-DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF -DEARLY_BUILD
-DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF -DEARLY_BUILD MK_TESTS=no
# cross-tools stage
XMAKE= TOOLS_PREFIX=${WORLDTMP} ${BMAKE} \
TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
-DWITHOUT_GDB
MK_GDB=no MK_TESTS=no
# kernel-tools stage
KTMAKEENV= INSTALL="sh ${.CURDIR}/tools/install.sh" \
PATH=${BPATH}:${PATH} \
WORLDTMP=${WORLDTMP} \
VERSION="${VERSION}"
KTMAKE= TOOLS_PREFIX=${WORLDTMP} MAKEOBJDIRPREFIX=${WORLDTMP} \
${KTMAKEENV} ${MAKE} ${WORLD_FLAGS} -f Makefile.inc1 \
DESTDIR= \
BOOTSTRAPPING=${OSRELDATE} \
SSP_CFLAGS= \
MK_HTML=no MK_INFO=no -DNO_LINT MK_MAN=no \
-DNO_PIC -DNO_PROFILE -DNO_SHARED \
-DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF -DEARLY_BUILD
# world stage
WMAKEENV= ${CROSSENV} \
@ -299,17 +322,6 @@ WMAKEENV+= CC="${XCC} ${XFLAGS}" CXX="${XCXX} ${XFLAGS}" \
AS="${XAS}" AR="${XAR}" LD="${XLD}" NM=${XNM} \
OBJDUMP=${XOBJDUMP} RANLIB=${XRANLIB} STRINGS=${XSTRINGS}
.if ${XCC:T:Mgcc} == "gcc"
WMAKE_COMPILER_TYPE= gcc
.elif ${XCC:T:Mclang} == "clang"
WMAKE_COMPILER_TYPE= clang
.elif ${MK_CLANG_IS_CC} == "no"
WMAKE_COMPILER_TYPE= gcc
.else
WMAKE_COMPILER_TYPE= clang
.endif
IMAKE_COMPILER_TYPE= COMPILER_TYPE=${WMAKE_COMPILER_TYPE}
.if ${XCC:M/*}
XFLAGS= --sysroot=${WORLDTMP}
.if defined(CROSS_BINUTILS_PREFIX)
@ -322,19 +334,18 @@ XFLAGS+= -B${CROSS_BINUTILS_PREFIX}
.else
XFLAGS+= -B${WORLDTMP}/usr/bin
.endif
.if ${TARGET_ARCH} != ${MACHINE_ARCH} && ${WMAKE_COMPILER_TYPE} == "clang"
.if (${TARGET_ARCH} == "arm" || ${TARGET_ARCH} == "armv6") && \
${MK_ARM_EABI} != "no"
.if ${TARGET} == "arm" && ${MK_ARM_EABI} != "no"
.if ${TARGET_ARCH:M*eb*} == ""
TARGET_ABI= gnueabi
.else
TARGET_ABI= unknown
.elif ${TARGET_ARCH} == "armv6hf"
TARGET_ABI= gnueabihf
.endif
TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/}-${TARGET_ABI}-freebsd10.0
.endif
TARGET_ABI?= unknown
TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/}-${TARGET_ABI}-freebsd11.0
XFLAGS+= -target ${TARGET_TRIPLE}
.endif
.endif
WMAKEENV+= COMPILER_TYPE=${WMAKE_COMPILER_TYPE}
WMAKE= ${WMAKEENV} ${MAKE} ${WORLD_FLAGS} -f Makefile.inc1 DESTDIR=${WORLDTMP}
.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64"
@ -382,27 +393,26 @@ LIB32WMAKEENV+= MAKEOBJDIRPREFIX=${OBJTREE}/lib32 \
PATH=${TMPPATH} \
LIBDIR=/usr/lib32 \
SHLIBDIR=/usr/lib32 \
LIBPRIVATEDIR=/usr/lib32/private \
COMPILER_TYPE=${WMAKE_COMPILER_TYPE}
LIB32WMAKEFLAGS+= \
CC="${XCC} ${LIB32FLAGS}" \
LIBPRIVATEDIR=/usr/lib32/private
LIB32WMAKEFLAGS+= CC="${XCC} ${LIB32FLAGS}" \
CXX="${XCXX} ${LIB32FLAGS}" \
DESTDIR=${LIB32TMP} \
-DCOMPAT_32BIT \
-DLIBRARIES_ONLY \
-DNO_CPU_CFLAGS \
-DNO_CTF \
-DNO_LINT
-DNO_LINT \
MK_TESTS=no
LIB32WMAKE= ${LIB32WMAKEENV} ${MAKE} ${LIB32WMAKEFLAGS} \
-DWITHOUT_MAN -DWITHOUT_INFO -DWITHOUT_HTML
MK_MAN=no MK_INFO=no MK_HTML=no
LIB32IMAKE= ${LIB32WMAKE:NINSTALL=*:NDESTDIR=*:N_LDSCRIPTROOT=*} -DNO_INCS \
${IMAKE_INSTALL}
.endif
IMAKEENV= ${CROSSENV:N_LDSCRIPTROOT=*}
IMAKE= ${IMAKEENV} ${MAKE} -f Makefile.inc1 \
${IMAKE_INSTALL} ${IMAKE_MTREE} ${IMAKE_COMPILER_TYPE}
${IMAKE_INSTALL} ${IMAKE_MTREE}
.if empty(.MAKEFLAGS:M-n)
IMAKEENV+= PATH=${STRICTTMPPATH}:${INSTALLTMP} \
LD_LIBRARY_PATH=${INSTALLTMP} \
@ -425,7 +435,7 @@ MTREEFLAGS+= -W
.endif
.if defined(DB_FROM_SRC) || defined(NO_ROOT)
IMAKE_INSTALL= INSTALL="install ${INSTALLFLAGS}"
IMAKE_MTREE= MTREE_CMD="nmtree ${MTREEFLAGS}"
IMAKE_MTREE= MTREE_CMD="mtree ${MTREEFLAGS}"
.endif
# kernel stage
@ -485,6 +495,10 @@ _worldtmp:
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.debug.dist \
-p ${WORLDTMP}/usr/lib >/dev/null
.endif
.if ${MK_TESTS} != "no"
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.tests.dist \
-p ${WORLDTMP}/usr >/dev/null
.endif
.for _mtree in ${LOCAL_MTREE}
mtree -deU -f ${.CURDIR}/${_mtree} -p ${WORLDTMP} > /dev/null
.endfor
@ -529,6 +543,7 @@ _cross-tools:
@echo ">>> stage 3: cross tools"
@echo "--------------------------------------------------------------"
${_+_}cd ${.CURDIR}; ${XMAKE} cross-tools
${_+_}cd ${.CURDIR}; ${XMAKE} kernel-tools
_includes:
@echo
@echo "--------------------------------------------------------------"
@ -541,8 +556,8 @@ _libraries:
@echo ">>> stage 4.2: building libraries"
@echo "--------------------------------------------------------------"
${_+_}cd ${.CURDIR}; \
${WMAKE} -DNO_FSCHG -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT \
-DWITHOUT_MAN -DNO_PROFILE libraries
${WMAKE} -DNO_FSCHG MK_HTML=no MK_INFO=no -DNO_LINT MK_MAN=no \
-DNO_PROFILE MK_TESTS=no libraries
_depend:
@echo
@echo "--------------------------------------------------------------"
@ -737,14 +752,10 @@ _install-info= install-info
_zoneinfo= zic tzsetup
.endif
.if exists(/usr/sbin/nmtree)
_nmtree_itools= nmtree
.endif
ITOOLS= [ awk cap_mkdb cat chflags chmod chown \
date echo egrep find grep id install ${_install-info} \
ln lockf make mkdir mtree ${_nmtree_itools} mv pwd_mkdb \
rm sed sh sysctl test true uname wc ${_zoneinfo}
ln lockf make mkdir mtree mv pwd_mkdb \
rm sed services_mkdb sh sysctl test true uname wc ${_zoneinfo}
#
# distributeworld
@ -806,11 +817,11 @@ distributeworld installworld: _installcheck_world
-p ${DESTDIR}/${DISTDIR}/${dist}/usr/lib >/dev/null
.endif
.if defined(NO_ROOT)
${IMAKEENV} nmtree -C -f ${.CURDIR}/etc/mtree/BSD.root.dist | \
${IMAKEENV} mtree -C -f ${.CURDIR}/etc/mtree/BSD.root.dist | \
sed -e 's#^\./#./${dist}/#' >> ${METALOG}
${IMAKEENV} nmtree -C -f ${.CURDIR}/etc/mtree/BSD.usr.dist | \
${IMAKEENV} mtree -C -f ${.CURDIR}/etc/mtree/BSD.usr.dist | \
sed -e 's#^\./#./${dist}/usr/#' >> ${METALOG}
${IMAKEENV} nmtree -C -f ${.CURDIR}/etc/mtree/BSD.include.dist | \
${IMAKEENV} mtree -C -f ${.CURDIR}/etc/mtree/BSD.include.dist | \
sed -e 's#^\./#./${dist}/usr/include/#' >> ${METALOG}
.endif
.endfor
@ -963,6 +974,8 @@ INSTALLKERNEL= ${_kernel}
.endif
.endfor
buildkernel ${WMAKE_TGTS} ${.ALLTARGETS:M_*}: .MAKE
#
# buildkernel
#
@ -988,7 +1001,7 @@ buildkernel:
cd ${KRNLCONFDIR}; \
PATH=${TMPPATH} \
config ${CONFIGARGS} -d ${KRNLOBJDIR}/${_kernel} \
${KERNCONFDIR}/${_kernel}
-I ${KERNCONFDIR} ${KERNCONFDIR}/${_kernel}
.endif
.if !defined(NO_CLEAN) && !defined(NO_KERNELCLEAN)
@echo
@ -1008,20 +1021,7 @@ buildkernel:
@echo "--------------------------------------------------------------"
@echo ">>> stage 2.3: build tools"
@echo "--------------------------------------------------------------"
cd ${KRNLOBJDIR}/${_kernel}; \
PATH=${BPATH}:${PATH} \
MAKESRCPATH=${KERNSRCDIR}/dev/aic7xxx/aicasm \
${MAKE} SSP_CFLAGS= -DNO_CPU_CFLAGS -DNO_CTF -DEARLY_BUILD \
-f ${KERNSRCDIR}/dev/aic7xxx/aicasm/Makefile
# XXX - Gratuitously builds aicasm in the ``makeoptions NO_MODULES'' case.
.if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && exists(${KERNSRCDIR}/modules)
.for target in obj depend all
cd ${KERNSRCDIR}/modules/aic7xxx/aicasm; \
PATH=${BPATH}:${PATH} \
MAKEOBJDIRPREFIX=${KRNLOBJDIR}/${_kernel}/modules \
${MAKE} SSP_CFLAGS= -DNO_CPU_CFLAGS -DNO_CTF -DEARLY_BUILD ${target}
.endfor
.endif
${_+_}cd ${.CURDIR}; ${KTMAKE} kernel-tools
.if !defined(NO_KERNELDEPEND)
@echo
@echo "--------------------------------------------------------------"
@ -1159,8 +1159,8 @@ update:
# legacy: Build compatibility shims for the next three targets
#
legacy:
.if ${BOOTSTRAPPING} < 700055 && ${BOOTSTRAPPING} != 0
@echo "ERROR: Source upgrades from versions prior to 7.0 not supported."; \
.if ${BOOTSTRAPPING} < 800107 && ${BOOTSTRAPPING} != 0
@echo "ERROR: Source upgrades from versions prior to 8.0 not supported."; \
false
.endif
.for _tool in tools/build
@ -1188,14 +1188,6 @@ _gperf= gnu/usr.bin/gperf
_groff= gnu/usr.bin/groff
.endif
.if ${BOOTSTRAPPING} < 800022
_ar= usr.bin/ar
.endif
.if ${BOOTSTRAPPING} < 800013
_mklocale= usr.bin/mklocale
.endif
.if ${BOOTSTRAPPING} < 900002
_sed= usr.bin/sed
.endif
@ -1234,7 +1226,9 @@ _awk= usr.bin/awk
_gensnmptree= usr.sbin/bsnmpd/gensnmptree
.endif
.if ${MK_CLANG} != "no"
# We need to build tlbgen when we're building clang either as
# the bootstrap compiler, or as the part of the normal build.
.if ${MK_CLANG_BOOTSTRAP} != "no" || ${MK_CLANG} != "no"
_clang_tblgen= \
lib/clang/libllvmsupport \
lib/clang/libllvmtablegen \
@ -1251,7 +1245,7 @@ _dtrace_tools= cddl/usr.bin/sgsmsg cddl/lib/libctf lib/libelf \
lib/libdwarf cddl/usr.bin/ctfconvert cddl/usr.bin/ctfmerge
.endif
# Default to building the BSDL DTC, but build the GPL one if users explicitly
# Default to building the GPL DTC, but build the BSDL one if users explicitly
# request it.
_dtc= usr.bin/dtc
.if ${MK_GPL_DTC} != "no"
@ -1279,13 +1273,11 @@ bootstrap-tools: .MAKE
${_strfile} \
${_gperf} \
${_groff} \
${_ar} \
${_dtc} \
${_awk} \
${_cat} \
usr.bin/lorder \
usr.bin/makewhatis \
${_mklocale} \
usr.bin/rpcgen \
${_sed} \
${_yacc} \
@ -1308,10 +1300,6 @@ bootstrap-tools: .MAKE
#
# build-tools: Build special purpose build tools
#
.if defined(MODULES_WITH_WORLD) && exists(${KERNSRCDIR}/modules)
_aicasm= sys/modules/aic7xxx/aicasm
.endif
.if !defined(NO_SHARE)
_share= share/syscons/scrnmaps
.endif
@ -1333,7 +1321,6 @@ build-tools: .MAKE
lib/ncurses/ncurses \
lib/ncurses/ncursesw \
${_share} \
${_aicasm} \
usr.bin/awk \
lib/libmagic \
usr.bin/mkesdb_static \
@ -1353,10 +1340,21 @@ build-tools: .MAKE
${MAKE} DIRPRFX=${_tool}/ all
.endfor
#
# kernel-tools: Build kernel-building tools
#
kernel-tools: .MAKE
mkdir -p ${MAKEOBJDIRPREFIX}/usr
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \
-p ${MAKEOBJDIRPREFIX}/usr >/dev/null
#
# cross-tools: Build cross-building tools
#
.if ${TARGET_ARCH} != ${MACHINE_ARCH} || ${BOOTSTRAPPING} < 800035
.if !defined(TARGET_ARCH) && defined(XDEV_ARCH)
TARGET_ARCH= ${XDEV_ARCH}
.endif
.if ${TARGET_ARCH} != ${MACHINE_ARCH}
.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "i386"
_btxld= usr.sbin/btxld
.endif
@ -1370,19 +1368,19 @@ _kgzip= usr.sbin/kgzip
.endif
.endif
.if ${XAS:M/*} == "" && ${MK_BINUTILS} != "no"
# If we're given an XAS, don't build binutils.
.if ${XAS:M/*} == "" && ${MK_BINUTILS_BOOTSTRAP} != "no"
_binutils= gnu/usr.bin/binutils
.endif
# If an full path to an external cross compiler is given, don't build
# a cross compiler.
.if ${XCC:M/*} == "" && ${MK_CROSS_COMPILER} != "no"
.if ${MK_CLANG} != "no" && (${MK_CLANG_IS_CC} != "no" || ${CC:T:Mclang} == "clang")
.if ${MK_CLANG_BOOTSTRAP} != "no"
_clang= usr.bin/clang
_clang_libs= lib/clang
.endif
.if ${MK_GCC} != "no" && (${MK_CLANG_IS_CC} == "no" || ${TARGET} == "pc98")
.if ${MK_GCC_BOOTSTRAP} != "no"
_cc= gnu/usr.bin/cc
.endif
.endif
@ -1446,11 +1444,13 @@ _startup_libs+= lib/csu/${MACHINE_CPUARCH}
_startup_libs+= gnu/lib/libgcc
_startup_libs+= lib/libcompiler_rt
_startup_libs+= lib/libc
_startup_libs+= lib/libc_nonshared
.if ${MK_LIBCPLUSPLUS} != "no"
_startup_libs+= lib/libcxxrt
.endif
gnu/lib/libgcc__L: lib/libc__L
gnu/lib/libgcc__L: lib/libc_nonshared__L
.if ${MK_LIBCPLUSPLUS} != "no"
lib/libcxxrt__L: gnu/lib/libgcc__L
.endif
@ -1464,22 +1464,31 @@ _prebuild_libs= ${_kerberos5_lib_libasn1} \
${_kerberos5_lib_libhx509} ${_kerberos5_lib_libkrb5} \
${_kerberos5_lib_libroken} \
${_kerberos5_lib_libwind} \
${_lib_atf_libatf_c} \
${_lib_atf} \
lib/libbz2 ${_libcom_err} lib/libcrypt \
lib/libelf lib/libexpat \
${_lib_libgssapi} ${_lib_libipx} \
lib/libkiconv lib/libkvm lib/liblzma lib/libmd \
${_lib_libgssapi} \
lib/libkiconv lib/libkvm lib/liblzma lib/libmd lib/libnv \
${_lib_libcapsicum} \
lib/ncurses/ncurses lib/ncurses/ncursesw \
lib/libopie lib/libpam ${_lib_libthr} \
lib/libradius lib/libsbuf lib/libtacplus \
${_cddl_lib_libumem} ${_cddl_lib_libnvpair} \
${_cddl_lib_libzfs_core} \
lib/libutil ${_lib_libypclnt} lib/libz lib/msun \
lib/libutil lib/libpjdlog ${_lib_libypclnt} lib/libz lib/msun \
${_secure_lib_libcrypto} ${_lib_libldns} \
${_secure_lib_libssh} ${_secure_lib_libssl}
.if ${MK_GNUCXX} != "no" && ${MK_CXX} != "no"
_prebuild_libs+= gnu/lib/libstdc++ gnu/lib/libsupc++
.endif
.if ${MK_ATF} != "no"
_lib_atf_libatf_c= lib/atf/libatf-c
.if defined(WITH_ATF) || ${MK_TESTS} != "no"
.if !defined(WITH_ATF)
# Ensure that the ATF libraries will be built during make libraries, even
# though they will have WITHOUT_TESTS
MAKE+= -DWITH_ATF
.endif
_lib_atf= lib/atf
.endif
.if ${MK_LIBTHR} != "no"
@ -1490,6 +1499,13 @@ _lib_libthr= lib/libthr
_ofed_lib= contrib/ofed/usr.lib/
.endif
.if ${MK_CASPER} != "no"
_lib_libcapsicum=lib/libcapsicum
.endif
lib/libcapsicum__L: lib/libnv__L
lib/libpjdlog__L: lib/libutil__L
_generic_libs= ${_cddl_lib} gnu/lib ${_kerberos5_lib} lib ${_secure_lib} usr.bin/lex/lib ${_ofed_lib}
.for _DIR in ${LOCAL_LIB_DIRS}
.if exists(${.CURDIR}/${_DIR}/Makefile)
@ -1556,10 +1572,6 @@ kerberos5/lib/libheimsqlite__L: lib/libthr__L
_lib_libgssapi= lib/libgssapi
.endif
.if ${MK_IPX} != "no"
_lib_libipx= lib/libipx
.endif
.if ${MK_KERBEROS} != "no"
_kerberos5_lib= kerberos5/lib
_kerberos5_lib_libasn1= kerberos5/lib/libasn1
@ -1588,10 +1600,12 @@ ${_lib}__PL: .PHONY .MAKE
.if exists(${.CURDIR}/${_lib})
${_+_}@${ECHODIR} "===> ${_lib} (obj,depend,all,install)"; \
cd ${.CURDIR}/${_lib} && \
${MAKE} DIRPRFX=${_lib}/ obj && \
${MAKE} DIRPRFX=${_lib}/ depend && \
${MAKE} -DNO_PROFILE -DNO_PIC DIRPRFX=${_lib}/ all && \
${MAKE} -DNO_PROFILE -DNO_PIC DIRPRFX=${_lib}/ install
${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ obj && \
${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ depend && \
${MAKE} MK_TESTS=no -DNO_PROFILE -DNO_PIC \
DIRPRFX=${_lib}/ all && \
${MAKE} MK_TESTS=no -DNO_PROFILE -DNO_PIC \
DIRPRFX=${_lib}/ install
.endif
.endfor
@ -1600,10 +1614,10 @@ ${_lib}__L: .PHONY .MAKE
.if exists(${.CURDIR}/${_lib})
${_+_}@${ECHODIR} "===> ${_lib} (obj,depend,all,install)"; \
cd ${.CURDIR}/${_lib} && \
${MAKE} DIRPRFX=${_lib}/ obj && \
${MAKE} DIRPRFX=${_lib}/ depend && \
${MAKE} DIRPRFX=${_lib}/ all && \
${MAKE} DIRPRFX=${_lib}/ install
${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ obj && \
${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ depend && \
${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ all && \
${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ install
.endif
.endfor
@ -1613,10 +1627,12 @@ ${_lib}__L: .PHONY .MAKE
lib/libpam__L: .PHONY .MAKE
${_+_}@${ECHODIR} "===> lib/libpam (obj,depend,all,install)"; \
cd ${.CURDIR}/lib/libpam && \
${MAKE} DIRPRFX=lib/libpam/ obj && \
${MAKE} DIRPRFX=lib/libpam/ depend && \
${MAKE} DIRPRFX=lib/libpam/ -D_NO_LIBPAM_SO_YET all && \
${MAKE} DIRPRFX=lib/libpam/ -D_NO_LIBPAM_SO_YET install
${MAKE} MK_TESTS=no DIRPRFX=lib/libpam/ obj && \
${MAKE} MK_TESTS=no DIRPRFX=lib/libpam/ depend && \
${MAKE} MK_TESTS=no DIRPRFX=lib/libpam/ \
-D_NO_LIBPAM_SO_YET all && \
${MAKE} MK_TESTS=no DIRPRFX=lib/libpam/ \
-D_NO_LIBPAM_SO_YET install
_prereq_libs: ${_prereq_libs:S/$/__PL/}
_startup_libs: ${_startup_libs:S/$/__L/}
@ -1672,6 +1688,7 @@ delete-old-files:
# argument list will get too long. Using .for/.endfor make "loops" will make
# the Makefile parser segfault.
@exec 3<&0; \
cd ${.CURDIR}; \
${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \
-V OLD_FILES -V "OLD_FILES:Musr/share/*.gz:R" | xargs -n1 | \
while read file; do \
@ -1694,7 +1711,8 @@ delete-old-files:
check-old-files:
@echo ">>> Checking for old files"
@${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \
@cd ${.CURDIR}; \
${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \
-V OLD_FILES -V "OLD_FILES:Musr/share/*.gz:R" | xargs -n1 | \
while read file; do \
if [ -f "${DESTDIR}/$${file}" -o -L "${DESTDIR}/$${file}" ]; then \
@ -1715,6 +1733,7 @@ delete-old-libs:
@echo ">>> Removing old libraries"
@echo "${OLD_LIBS_MESSAGE}" | fmt
@exec 3<&0; \
cd ${.CURDIR}; \
${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \
-V OLD_LIBS | xargs -n1 | \
while read file; do \
@ -1722,22 +1741,36 @@ delete-old-libs:
chflags noschg "${DESTDIR}/$${file}" 2>/dev/null || true; \
rm ${RM_I} "${DESTDIR}/$${file}" <&3; \
fi; \
for ext in debug symbols; do \
if ! [ -e "${DESTDIR}/$${file}" ] && [ -f \
"${DESTDIR}${DEBUGDIR}/$${file}.$${ext}" ]; then \
rm ${RM_I} "${DESTDIR}${DEBUGDIR}/$${file}.$${ext}" \
<&3; \
fi; \
done; \
done
@echo ">>> Old libraries removed"
check-old-libs:
@echo ">>> Checking for old libraries"
@${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \
@cd ${.CURDIR}; \
${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \
-V OLD_LIBS | xargs -n1 | \
while read file; do \
if [ -f "${DESTDIR}/$${file}" -o -L "${DESTDIR}/$${file}" ]; then \
echo "${DESTDIR}/$${file}"; \
fi; \
for ext in debug symbols; do \
if [ -f "${DESTDIR}${DEBUGDIR}/$${file}.$${ext}" ]; then \
echo "${DESTDIR}${DEBUGDIR}/$${file}.$${ext}"; \
fi; \
done; \
done
delete-old-dirs:
@echo ">>> Removing old directories"
@${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \
@cd ${.CURDIR}; \
${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \
-V OLD_DIRS | xargs -n1 | sort -r | \
while read dir; do \
if [ -d "${DESTDIR}/$${dir}" ]; then \
@ -1750,7 +1783,8 @@ delete-old-dirs:
check-old-dirs:
@echo ">>> Checking for old directories"
@${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \
@cd ${.CURDIR}; \
${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \
-V OLD_DIRS | xargs -n1 | \
while read dir; do \
if [ -d "${DESTDIR}/$${dir}" ]; then \
@ -1799,7 +1833,7 @@ builddtb:
echo "ERROR: FDT_DTS_FILE must be specified!"; \
exit 1; \
fi; \
if [ ! -f ${.CURDIR}/sys/boot/fdt/dts/${FDT_DTS_FILE} ]; then \
if [ ! -f ${.CURDIR}/sys/boot/fdt/dts/${MACHINE}/${FDT_DTS_FILE} ]; then \
echo "ERROR: Specified DTS file (${FDT_DTS_FILE}) does not \
exist!"; \
exit 1; \
@ -1809,9 +1843,9 @@ builddtb:
directory"; \
fi
@PATH=${TMPPATH} \
dtc -O dtb -o \
${DTBOUTPUTPATH}/`echo ${FDT_DTS_FILE} | cut -d. -f1`.dtb -b 0 \
-p 1024 ${.CURDIR}/sys/boot/fdt/dts/${FDT_DTS_FILE}
${.CURDIR}/sys/tools/fdt/make_dtb.sh ${.CURDIR}/sys \
${FDT_DTS_FILE} \
${DTBOUTPUTPATH}/`basename ${FDT_DTS_FILE} .dts`
###############
@ -1823,28 +1857,34 @@ XDEV_CPUTYPE?=${CPUTYPE}
XDEV_CPUTYPE?=${TARGET_CPUTYPE}
.endif
NOFUN=-DNO_FSCHG -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT \
-DWITHOUT_MAN -DWITHOUT_NLS -DNO_PROFILE \
-DWITHOUT_KERBEROS -DWITHOUT_RESCUE -DNO_WARNS \
NOFUN=-DNO_FSCHG MK_HTML=no MK_INFO=no -DNO_LINT \
MK_MAN=no MK_NLS=no -DNO_PROFILE \
MK_KERBEROS=no MK_RESCUE=no MK_TESTS=no -DNO_WARNS \
TARGET=${XDEV} TARGET_ARCH=${XDEV_ARCH} \
CPUTYPE=${XDEV_CPUTYPE}
XDDIR=${XDEV_ARCH}-freebsd
XDTP=/usr/${XDDIR}
XDTP?=/usr/${XDDIR}
.if ${XDTP:N/*}
.error XDTP variable should be an absolute path
.endif
CDBENV=MAKEOBJDIRPREFIX=${MAKEOBJDIRPREFIX}/${XDDIR} \
INSTALL="sh ${.CURDIR}/tools/install.sh"
CDENV= ${CDBENV} \
_SHLIBDIRPREFIX=${XDDESTDIR} \
TOOLS_PREFIX=${XDDESTDIR}
TOOLS_PREFIX=${XDTP}
CD2CFLAGS=-isystem ${XDDESTDIR}/usr/include -L${XDDESTDIR}/usr/lib \
-B${XDDESTDIR}/usr/lib
CD2ENV=${CDENV} CC="${CC} ${CD2CFLAGS}" \
--sysroot=${XDDESTDIR}/ -B${XDDESTDIR}/usr/libexec \
-B${XDDESTDIR}/usr/bin -B${XDDESTDIR}/usr/lib
CD2ENV=${CDENV} CC="${CC} ${CD2CFLAGS}" CXX="${CXX} ${CD2CFLAGS}" \
CPP="${CPP} ${CD2CFLAGS}" \
MACHINE=${XDEV} MACHINE_ARCH=${XDEV_ARCH}
CDTMP= ${MAKEOBJDIRPREFIX}/${XDDIR}/${.CURDIR}/tmp
CDMAKE=${CDENV} PATH=${CDTMP}/usr/bin:${PATH} ${MAKE} ${NOFUN}
CD2MAKE=${CD2ENV} PATH=${CDTMP}/usr/bin:${XDTP}/usr/bin:${PATH} ${MAKE} ${NOFUN}
XDDESTDIR=${DESTDIR}${XDTP}
CD2MAKE=${CD2ENV} PATH=${CDTMP}/usr/bin:${XDDESTDIR}/usr/bin:${PATH} ${MAKE} ${NOFUN}
XDDESTDIR=${DESTDIR}/${XDTP}
.if !defined(OSREL)
OSREL!= uname -r | sed -e 's/[-(].*//'
.endif
@ -1877,11 +1917,11 @@ _xb-build-tools:
_xb-cross-tools:
.for _tool in \
gnu/usr.bin/binutils \
gnu/usr.bin/cc \
${_binutils} \
usr.bin/ar \
${_clang_libs} \
${_clang}
${_clang} \
${_cc}
${_+_}@${ECHODIR} "===> xdev ${_tool} (obj,depend,all)"; \
cd ${.CURDIR}/${_tool} && \
${CDMAKE} DIRPRFX=${_tool}/ obj && \
@ -1905,10 +1945,11 @@ xdev-install: xdev-build _xi-mtree _xi-cross-tools _xi-includes _xi-libraries _x
_xi-cross-tools:
@echo "_xi-cross-tools"
.for _tool in \
gnu/usr.bin/binutils \
gnu/usr.bin/cc \
${_binutils} \
usr.bin/ar \
${_clang}
${_clang_libs} \
${_clang} \
${_cc}
${_+_}@${ECHODIR} "===> xdev ${_tool} (install)"; \
cd ${.CURDIR}/${_tool}; \
${CDMAKE} DIRPRFX=${_tool}/ install DESTDIR=${XDDESTDIR}
@ -1924,6 +1965,7 @@ _xi-libraries:
_xi-links:
${_+_}cd ${XDDESTDIR}/usr/bin; \
mkdir -p ../../../../usr/bin; \
for i in *; do \
ln -sf ../../${XDTP}/usr/bin/$$i \
../../../../usr/bin/${XDDIR}-$$i; \
@ -1934,5 +1976,3 @@ _xi-links:
xdev xdev-build xdev-install:
@echo "*** Error: Both XDEV and XDEV_ARCH must be defined for \"${.TARGET}\" target"
.endif
buildkernel ${WMAKE_TGTS} ${.ALLTARGETS:M_*}: .MAKE

View File

@ -38,14 +38,201 @@
# xargs -n1 | sort | uniq -d;
# done
# 20140314: AppleTalk
OLD_DIRS+=usr/include/netatalk
OLD_FILES+=usr/include/netatalk/aarp.h
OLD_FILES+=usr/include/netatalk/at.h
OLD_FILES+=usr/include/netatalk/at_extern.h
OLD_FILES+=usr/include/netatalk/at_var.h
OLD_FILES+=usr/include/netatalk/ddp.h
OLD_FILES+=usr/include/netatalk/ddp_pcb.h
OLD_FILES+=usr/include/netatalk/ddp_var.h
OLD_FILES+=usr/include/netatalk/endian.h
OLD_FILES+=usr/include/netatalk/phase2.h
# 20140314: Remove IPX/SPX
OLD_LIBS+=lib/libipx.so.5
OLD_FILES+=usr/include/netipx/ipx.h
OLD_FILES+=usr/include/netipx/ipx_if.h
OLD_FILES+=usr/include/netipx/ipx_pcb.h
OLD_FILES+=usr/include/netipx/ipx_var.h
OLD_FILES+=usr/include/netipx/spx.h
OLD_FILES+=usr/include/netipx/spx_debug.h
OLD_FILES+=usr/include/netipx/spx_timer.h
OLD_FILES+=usr/include/netipx/spx_var.h
OLD_DIRS+=usr/include/netipx
OLD_FILES+=usr/lib/libipx.a
OLD_FILES+=usr/lib/libipx.so
OLD_FILES+=usr/lib/libipx_p.a
OLD_FILES+=usr/lib32/libipx.a
OLD_FILES+=usr/lib32/libipx.so
OLD_LIBS+=usr/lib32/libipx.so.5
OLD_FILES+=usr/lib32/libipx_p.a
OLD_FILES+=usr/sbin/IPXrouted
OLD_FILES+=usr/share/man/man3/ipx.3.gz
OLD_FILES+=usr/share/man/man3/ipx_addr.3.gz
OLD_FILES+=usr/share/man/man3/ipx_ntoa.3.gz
OLD_FILES+=usr/share/man/man4/ef.4.gz
OLD_FILES+=usr/share/man/man4/if_ef.4.gz
OLD_FILES+=usr/share/man/man8/IPXrouted.8.gz
# 20140314: bsdconfig usermgmt rewrite
OLD_FILES+=usr/libexec/bsdconfig/070.usermgmt/userinput
# 20140307: bsdconfig groupmgmt rewrite
OLD_FILES+=usr/libexec/bsdconfig/070.usermgmt/groupinput
# 20140223: Remove libyaml
OLD_FILES+=usr/lib/private/libyaml.a
OLD_FILES+=usr/lib/private/libyaml.so
OLD_FILES+=usr/lib/private/libyaml.so.1
OLD_FILES+=usr/lib/private/libyaml_p.a
# 20140216: new clang import which bumps version from 3.3 to 3.4.
OLD_FILES+=usr/bin/llvm-prof
OLD_FILES+=usr/bin/llvm-ranlib
OLD_FILES+=usr/include/clang/3.3/__wmmintrin_aes.h
OLD_FILES+=usr/include/clang/3.3/__wmmintrin_pclmul.h
OLD_FILES+=usr/include/clang/3.3/altivec.h
OLD_FILES+=usr/include/clang/3.3/ammintrin.h
OLD_FILES+=usr/include/clang/3.3/avx2intrin.h
OLD_FILES+=usr/include/clang/3.3/avxintrin.h
OLD_FILES+=usr/include/clang/3.3/bmi2intrin.h
OLD_FILES+=usr/include/clang/3.3/bmiintrin.h
OLD_FILES+=usr/include/clang/3.3/cpuid.h
OLD_FILES+=usr/include/clang/3.3/emmintrin.h
OLD_FILES+=usr/include/clang/3.3/f16cintrin.h
OLD_FILES+=usr/include/clang/3.3/fma4intrin.h
OLD_FILES+=usr/include/clang/3.3/fmaintrin.h
OLD_FILES+=usr/include/clang/3.3/immintrin.h
OLD_FILES+=usr/include/clang/3.3/lzcntintrin.h
OLD_FILES+=usr/include/clang/3.3/mm3dnow.h
OLD_FILES+=usr/include/clang/3.3/mm_malloc.h
OLD_FILES+=usr/include/clang/3.3/mmintrin.h
OLD_FILES+=usr/include/clang/3.3/module.map
OLD_FILES+=usr/include/clang/3.3/nmmintrin.h
OLD_FILES+=usr/include/clang/3.3/pmmintrin.h
OLD_FILES+=usr/include/clang/3.3/popcntintrin.h
OLD_FILES+=usr/include/clang/3.3/prfchwintrin.h
OLD_FILES+=usr/include/clang/3.3/rdseedintrin.h
OLD_FILES+=usr/include/clang/3.3/rtmintrin.h
OLD_FILES+=usr/include/clang/3.3/smmintrin.h
OLD_FILES+=usr/include/clang/3.3/tmmintrin.h
OLD_FILES+=usr/include/clang/3.3/wmmintrin.h
OLD_FILES+=usr/include/clang/3.3/x86intrin.h
OLD_FILES+=usr/include/clang/3.3/xmmintrin.h
OLD_FILES+=usr/include/clang/3.3/xopintrin.h
OLD_FILES+=usr/share/man/man1/llvm-prof.1.gz
OLD_FILES+=usr/share/man/man1/llvm-ranlib.1.gz
OLD_DIRS+=usr/include/clang/3.3
# 20140216: nve(4) removed
OLD_FILES+=usr/share/man/man4/if_nve.4.gz
OLD_FILES+=usr/share/man/man4/nve.4.gz
# 20140205: Open Firmware device moved
OLD_FILES+=usr/include/dev/ofw/ofw_nexus.h
# 20140128: libelf and libdwarf import
OLD_LIBS+=usr/lib/libelf.so.1
OLD_LIBS+=usr/lib32/libelf.so.1
OLD_LIBS+=usr/lib/libdwarf.so.3
OLD_LIBS+=usr/lib32/libdwarf.so.3
# 20140123: apicvar header moved to x86
OLD_FILES+=usr/include/machine/apicvar.h
# 20131215: libcam version bumped
OLD_LIBS+=lib/libcam.so.6 usr/lib32/libcam.so.6
# 20131202: libcapsicum and libcasper moved to /lib/
OLD_LIBS+=usr/lib/libcapsicum.so.0
OLD_LIBS+=usr/lib/libcasper.so.0
# 20131109: extattr(2) mlinks fixed
OLD_FILES+=usr/share/man/man2/extattr_delete_list.2.gz
OLD_FILES+=usr/share/man/man2/extattr_get_list.2.gz
# 20131107: example files removed
OLD_FILES+=usr/share/examples/libusb20/aux.c
OLD_FILES+=usr/share/examples/libusb20/aux.h
# 20131105: tzdata 2013h import
OLD_FILES+=usr/share/zoneinfo/America/Shiprock
OLD_FILES+=usr/share/zoneinfo/Antarctica/South_Pole
# 20131103: WITH_LIBICONV_COMPAT removal
OLD_FILES+=usr/include/_libiconv_compat.h
OLD_FILES+=usr/lib/libiconv.a
OLD_FILES+=usr/lib/libiconv.so
OLD_FILES+=usr/lib/libiconv.so.3
OLD_FILES+=usr/lib/libiconv_p.a
OLD_FILES+=usr/lib32/libiconv.a
OLD_FILES+=usr/lib32/libiconv.so
OLD_FILES+=usr/lib32/libiconv.so.3
OLD_FILES+=usr/lib32/libiconv_p.a
# 20131103: removal of utxrm(8), use 'utx rm' instead.
OLD_FILES+=usr/sbin/utxrm
OLD_FILES+=usr/share/man/man8/utxrm.8.gz
# 20131031: pkg_install has been removed
OLD_FILES+=etc/periodic/daily/220.backup-pkgdb
OLD_FILES+=etc/periodic/daily/490.status-pkg-changes
OLD_FILES+=etc/periodic/security/460.chkportsum
OLD_FILES+=etc/periodic/weekly/400.status-pkg
OLD_FILES+=usr/sbin/pkg_add
OLD_FILES+=usr/sbin/pkg_create
OLD_FILES+=usr/sbin/pkg_delete
OLD_FILES+=usr/sbin/pkg_info
OLD_FILES+=usr/sbin/pkg_updating
OLD_FILES+=usr/sbin/pkg_version
OLD_FILES+=usr/share/man/man1/pkg_add.1.gz
OLD_FILES+=usr/share/man/man1/pkg_create.1.gz
OLD_FILES+=usr/share/man/man1/pkg_delete.1.gz
OLD_FILES+=usr/share/man/man1/pkg_info.1.gz
OLD_FILES+=usr/share/man/man1/pkg_updating.1.gz
OLD_FILES+=usr/share/man/man1/pkg_version.1.gz
# 20131030: /etc/keys moved to /usr/share/keys
OLD_DIRS+=etc/keys
OLD_DIRS+=etc/keys/pkg
OLD_DIRS+=etc/keys/pkg/revoked
OLD_DIRS+=etc/keys/pkg/trusted
OLD_FILES+=etc/keys/pkg/trusted/pkg.freebsd.org.2013102301
# 20131028: ng_fec(4) removed
OLD_FILES+=usr/include/netgraph/ng_fec.h
OLD_FILES+=usr/share/man/man4/ng_fec.4.gz
# 20131027: header moved
OLD_FILES+=usr/include/net/pf_mtag.h
# 20131023: remove never used iscsi directory
OLD_DIRS+=usr/share/examples/iscsi
# 20131021: isf(4) removed
OLD_FILES+=usr/sbin/isfctl
OLD_FILES+=usr/share/man/man4/isf.4.gz
OLD_FILES+=usr/share/man/man8/isfctl.8.gz
# 20131014: libbsdyml becomes private
OLD_FILES+=usr/lib/libbsdyml.a
OLD_FILES+=usr/lib/libbsdyml.so
OLD_LIBS+=usr/lib/libbsdyml.so.0
OLD_FILES+=usr/lib/libbsdyml_p.a
OLD_FILES+=usr/lib32/libbsdyml.a
OLD_FILES+=usr/lib32/libbsdyml.so
OLD_LIBS+=usr/lib32/libbsdyml.so.0
OLD_FILES+=usr/lib32/libbsdyml_p.a
OLD_FILES+=usr/share/man/man3/libbsdyml.3.gz
OLD_FILES+=usr/include/bsdyml.h
# 20131013: Removal of the ATF tools
OLD_FILES+=etc/atf/FreeBSD.conf
OLD_FILES+=etc/atf/atf-run.hooks
OLD_FILES+=etc/atf/common.conf
OLD_FILES+=usr/bin/atf-config
OLD_FILES+=usr/bin/atf-report
OLD_FILES+=usr/bin/atf-run
OLD_FILES+=usr/bin/atf-version
OLD_FILES+=usr/share/atf/atf-run.hooks
OLD_FILES+=usr/share/examples/atf/atf-run.hooks
OLD_FILES+=usr/share/examples/atf/tests-results.css
OLD_FILES+=usr/share/man/man1/atf-config.1.gz
OLD_FILES+=usr/share/man/man1/atf-report.1.gz
OLD_FILES+=usr/share/man/man1/atf-run.1.gz
OLD_FILES+=usr/share/man/man1/atf-version.1.gz
OLD_FILES+=usr/share/man/man5/atf-formats.5.gz
OLD_FILES+=usr/share/man/man7/atf.7.gz
OLD_FILES+=usr/share/xml/atf/tests-results.dtd
OLD_FILES+=usr/share/xsl/atf/tests-results.xsl
# 20131009: freebsd-version moved from /libexec to /bin
OLD_FILES+=/libexec/freebsd-version
OLD_FILES+=libexec/freebsd-version
# 20131001: ar and ranlib from binutils not used
OLD_FILES+=usr/bin/gnu-ar
OLD_FILES+=usr/bin/gnu-ranlib
OLD_FILES+=usr/share/man/man1/gnu-ar.1.gz
OLD_FILES+=usr/share/man/man1/gnu-ranlib.1.gz
# 20130930: BIND removed from base
OLD_FILES+=etc/mtree/BIND.chroot.dist
OLD_FILES+=etc/namedb
OLD_FILES+=etc/periodic/daily/470.status-named
OLD_FILES+=usr/bin/dig
@ -67,7 +254,7 @@ OLD_FILES+=usr/include/lwres/result.h
OLD_FILES+=usr/include/lwres/version.h
OLD_FILES+=usr/lib/liblwres.a
OLD_FILES+=usr/lib/liblwres.so
OLD_LIBS+=usr/lib/liblwres.so.50
OLD_LIBS+=usr/lib/liblwres.so.90
OLD_FILES+=usr/lib/liblwres_p.a
OLD_FILES+=usr/sbin/arpaname
OLD_FILES+=usr/sbin/ddns-confgen
@ -77,6 +264,7 @@ OLD_FILES+=usr/sbin/dnssec-keygen
OLD_FILES+=usr/sbin/dnssec-revoke
OLD_FILES+=usr/sbin/dnssec-settime
OLD_FILES+=usr/sbin/dnssec-signzone
OLD_FILES+=usr/sbin/dnssec-verify
OLD_FILES+=usr/sbin/genrandom
OLD_FILES+=usr/sbin/isc-hmac-fixup
OLD_FILES+=usr/sbin/lwresd
@ -240,6 +428,7 @@ OLD_FILES+=usr/share/man/man8/dnssec-keygen.8.gz
OLD_FILES+=usr/share/man/man8/dnssec-revoke.8.gz
OLD_FILES+=usr/share/man/man8/dnssec-settime.8.gz
OLD_FILES+=usr/share/man/man8/dnssec-signzone.8.gz
OLD_FILES+=usr/share/man/man8/dnssec-verify.8.gz
OLD_FILES+=usr/share/man/man8/genrandom.8.gz
OLD_FILES+=usr/share/man/man8/isc-hmac-fixup.8.gz
OLD_FILES+=usr/share/man/man8/lwresd.8.gz
@ -274,6 +463,8 @@ OLD_DIRS+=var/named/var/run
OLD_DIRS+=var/named/var/run/named
OLD_DIRS+=var/named/var/stats
OLD_DIRS+=var/run/named
# 20130923: example moved
OLD_FILES+=usr/share/examples/bsdconfig/browse_packages.sh
# 20130908: libssh becomes private
OLD_FILES+=usr/lib/libssh.a
OLD_FILES+=usr/lib/libssh.so
@ -2457,6 +2648,7 @@ OLD_FILES+=usr/sbin/zfs
OLD_FILES+=usr/sbin/zpool
# 20070423: rc.bluetooth (examples) removed
OLD_FILES+=usr/share/examples/netgraph/bluetooth/rc.bluetooth
OLD_DIRS+=usr/share/examples/netgraph/bluetooth
# 20070421: worm.4 removed
OLD_FILES+=usr/share/man/man4/worm.4.gz
# 20070417: trunk(4) renamed to lagg(4)
@ -6093,6 +6285,13 @@ OLD_LIBS+=usr/lib/libkse.so.1
OLD_LIBS+=usr/lib/liblwres.so.3
OLD_LIBS+=usr/lib/pam_ftp.so.2
# 20131013: Removal of the ATF tools
OLD_DIRS+=etc/atf
OLD_DIRS+=usr/share/examples/atf
OLD_DIRS+=usr/share/xml/atf
OLD_DIRS+=usr/share/xml
OLD_DIRS+=usr/share/xsl/atf
OLD_DIRS+=usr/share/xsl
# 20040925: bind9 import
OLD_DIRS+=usr/share/doc/bind/html
OLD_DIRS+=usr/share/doc/bind/misc

124
UPDATING
View File

@ -16,8 +16,8 @@ from older versions of FreeBSD, try WITHOUT_CLANG to bootstrap to the tip of
head, and then rebuild without this option. The bootstrap process from
older version of current is a bit fragile.
NOTE TO PEOPLE WHO THINK THAT FreeBSD 10.x IS SLOW:
FreeBSD 10.x has many debugging features turned on, in both the kernel
NOTE TO PEOPLE WHO THINK THAT FreeBSD 11.x IS SLOW:
FreeBSD 11.x has many debugging features turned on, in both the kernel
and userland. These features attempt to detect incorrect use of
system primitives, and encourage loud failure through extra sanity
checking and fail stop semantics. They also substantially impact
@ -31,6 +31,109 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10.x IS SLOW:
disable the most expensive debugging functionality run
"ln -s 'abort:false,junk:false' /etc/malloc.conf".)
20140418:
The YES_HESIOD knob has been removed. It has been obsolete for
a decade. Please move to using WITH_HESIOD instead or your builds
will silently lack HESIOD.
20140405:
The uart(4) driver has been changed with respect to its handling
of the low-level console. Previously the uart(4) driver prevented
any process from changing the baudrate or the CLOCAL and HUPCL
control flags. By removing the restrictions, operators can make
changes to the serial console port without having to reboot.
However, when getty(8) is started on the serial device that is
associated with the low-level console, a misconfigured terminal
line in /etc/ttys will now have a real impact.
Before upgrading the kernel, make sure that /etc/ttys has the
serial console device configured as 3wire without baudrate to
preserve the previous behaviour. E.g:
ttyu0 "/usr/libexec/getty 3wire" vt100 on secure
20140306:
Support for libwrap (TCP wrappers) in rpcbind was disabled by default
to improve performance. To re-enable it, if needed, run rpcbind
with command line option -W.
20140226:
Switched back to the GPL dtc compiler due to updates in the upstream
dts files not being supported by the BSDL dtc compiler. You will need
to rebuild your kernel toolchain to pick up the new compiler. Core dumps
may result while building dtb files during a kernel build if you fail
to do so. Set WITHOUT_GPL_DTC if you require the BSDL compiler.
20140216:
Clang and llvm have been upgraded to 3.4 release.
20140216:
The nve(4) driver has been removed. Please use the nfe(4) driver
for NVIDIA nForce MCP Ethernet adapters instead.
20140212:
An ABI incompatibility crept into the libc++ 3.4 import in r261283.
This could cause certain C++ applications using shared libraries built
against the previous version of libc++ to crash. The incompatibility
has now been fixed, but any C++ applications or shared libraries built
between r261283 and r261801 should be recompiled.
20140204:
OpenSSH will now ignore errors caused by kernel lacking of Capsicum
capability mode support. Please note that enabling the feature in
kernel is still highly recommended.
20140131:
OpenSSH is now built with sandbox support, and will use sandbox as
the default privilege separation method. This requires Capsicum
capability mode support in kernel.
20140128:
The libelf and libdwarf libraries have been updated to newer
versions from upstream. Shared library version numbers for
these two libraries were bumped. Any ports or binaries
requiring these two libraries should be recompiled.
__FreeBSD_version is bumped to 1100006.
20140110:
If a Makefile in a tests/ directory was auto-generating a Kyuafile
instead of providing an explicit one, this would prevent such
Makefile from providing its own Kyuafile in the future during
NO_CLEAN builds. This has been fixed in the Makefiles but manual
intervention is needed to clean an objdir if you use NO_CLEAN:
# find /usr/obj -name Kyuafile | xargs rm -f
20131213:
The behavior of gss_pseudo_random() for the krb5 mechanism
has changed, for applications requesting a longer random string
than produced by the underlying enctype's pseudo-random() function.
In particular, the random string produced from a session key of
enctype aes256-cts-hmac-sha1-96 or aes256-cts-hmac-sha1-96 will
be different at the 17th octet and later, after this change.
The counter used in the PRF+ construction is now encoded as a
big-endian integer in accordance with RFC 4402.
__FreeBSD_version is bumped to 1100004.
20131108:
The WITHOUT_ATF build knob has been removed and its functionality
has been subsumed into the more generic WITHOUT_TESTS. If you were
using the former to disable the build of the ATF libraries, you
should change your settings to use the latter.
20131025:
The default version of mtree is nmtree which is obtained from
NetBSD. The output is generally the same, but may vary
slightly. If you found you need identical output adding
"-F freebsd9" to the command line should do the trick. For the
time being, the old mtree is available as fmtree.
20131014:
libbsdyml has been renamed to libyaml and moved to /usr/lib/private.
This will break ports-mgmt/pkg. Rebuild the port, or upgrade to pkg
1.1.4_8 and verify bsdyml not linked in, before running "make
delete-old-libs":
# make -C /usr/ports/ports-mgmt/pkg build deinstall install clean
or
# pkg install pkg; ldd /usr/local/sbin/pkg | grep bsdyml
20131010:
The rc.d/jail script has been updated to support jail(8)
configuration file. The "jail_<jname>_*" rc.conf(5) variables
@ -54,7 +157,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10.x IS SLOW:
BIND has been removed from the base system. If all you need
is a local resolver, simply enable and start the local_unbound
service instead. Otherwise, several versions of BIND are
available in the ports tree.
available in the ports tree. The dns/bind99 port is one example.
With this change, nslookup(1) and dig(1) are no longer in the base
system. Users should instead use host(1) and drill(1) which are
in the base system. Alternatively, nslookup and dig can
be obtained by installing the dns/bind-tools port.
20130916:
With the addition of unbound(8), a new unbound user is now
@ -1886,9 +1994,9 @@ COMMON ITEMS:
make kernel KERNCONF=YOUR_KERNEL_HERE
[1]
<reboot in single user> [3]
mergemaster -p [5]
mergemaster -Fp [5]
make installworld
mergemaster -i [4]
mergemaster -Fi [4]
make delete-old [6]
<reboot>
@ -1905,7 +2013,7 @@ COMMON ITEMS:
make buildkernel KERNCONF=YOUR_KERNEL_HERE
<maybe newfs current's root partition>
<mount current's root partition on directory ${CURRENT_ROOT}>
make installworld DESTDIR=${CURRENT_ROOT}
make installworld DESTDIR=${CURRENT_ROOT} -DDB_FROM_SRC
make distribution DESTDIR=${CURRENT_ROOT} # if newfs'd
make installkernel KERNCONF=YOUR_KERNEL_HERE DESTDIR=${CURRENT_ROOT}
cp /etc/fstab ${CURRENT_ROOT}/etc/fstab # if newfs'd
@ -1923,9 +2031,9 @@ COMMON ITEMS:
make kernel KERNCONF=YOUR_KERNEL_HERE [8]
[1]
<reboot in single user> [3]
mergemaster -p [5]
mergemaster -Fp [5]
make installworld
mergemaster -i [4]
mergemaster -Fi [4]
make delete-old [6]
<reboot>

View File

@ -52,8 +52,14 @@ SUBDIR+= rmail
SUBDIR+= csh
.endif
.if ${MK_TESTS} != "no"
SUBDIR+= tests
.endif
.include <bsd.arch.inc.mk>
SUBDIR:= ${SUBDIR:O}
SUBDIR_PARALLEL=
.include <bsd.subdir.mk>

View File

@ -316,6 +316,7 @@ udom_open(const char *path, int flags)
sou.sun_family = AF_UNIX;
if ((len = strlcpy(sou.sun_path, path,
sizeof(sou.sun_path))) >= sizeof(sou.sun_path)) {
close(fd);
errno = ENAMETOOLONG;
return (-1);
}

View File

@ -1,7 +1,13 @@
# @(#)Makefile 8.1 (Berkeley) 5/31/93
# $FreeBSD$
.include <bsd.own.mk>
PROG= date
SRCS= date.c netdate.c vary.c
.if ${MK_TESTS} != "no"
SUBDIR+= tests
.endif
.include <bsd.prog.mk>

9
bin/date/tests/Makefile Normal file
View File

@ -0,0 +1,9 @@
# $FreeBSD$
.include <bsd.own.mk>
TESTSDIR= ${TESTSBASE}/bin/date
TAP_TESTS_SH= legacy_test
.include <bsd.test.mk>

View File

@ -66,6 +66,7 @@ static void f_obs(char *);
static void f_of(char *);
static void f_seek(char *);
static void f_skip(char *);
static void f_status(char *);
static uintmax_t get_num(const char *);
static off_t get_off_t(const char *);
@ -88,6 +89,7 @@ static const struct arg {
{ "oseek", f_seek, C_SEEK, C_SEEK },
{ "seek", f_seek, C_SEEK, C_SEEK },
{ "skip", f_skip, C_SKIP, C_SKIP },
{ "status", f_status, C_STATUS,C_STATUS },
};
static char *oper;
@ -292,6 +294,18 @@ f_skip(char *arg)
in.offset = get_off_t(arg);
}
static void
f_status(char *arg)
{
if (strcmp(arg, "none") == 0)
ddflags |= C_NOINFO;
else if (strcmp(arg, "noxfer") == 0)
ddflags |= C_NOXFER;
else
errx(1, "unknown status %s", arg);
}
static const struct conv {
const char *name;
u_int set, noset;

View File

@ -32,7 +32,7 @@
.\" @(#)dd.1 8.2 (Berkeley) 1/13/94
.\" $FreeBSD$
.\"
.Dd October 1, 2013
.Dd April 2, 2014
.Dt DD 1
.Os
.Sh NAME
@ -156,6 +156,17 @@ Otherwise, input data is read and discarded.
For pipes, the correct number of bytes is read.
For all other devices, the correct number of blocks is read without
distinguishing between a partial or complete block being read.
.It Cm status Ns = Ns Ar value
Where
.Cm value
is one of the symbols from the following list.
.Bl -tag -width ".Cm noxfer"
.It Cm noxfer
Do not print the transfer statistics as the last line of status output.
.It Cm none
Do not print the status output.
Error messages are shown; informational messages are not.
.El
.It Cm conv Ns = Ns Ar value Ns Op , Ns Ar value ...
Where
.Cm value
@ -410,7 +421,9 @@ utility is expected to be a superset of the
standard.
The
.Cm files
operand and the
and
.Cm status
operands and the
.Cm ascii ,
.Cm ebcdic ,
.Cm ibm ,

View File

@ -68,32 +68,35 @@ typedef struct {
} STAT;
/* Flags (in ddflags). */
#define C_ASCII 0x00001
#define C_BLOCK 0x00002
#define C_BS 0x00004
#define C_CBS 0x00008
#define C_COUNT 0x00010
#define C_EBCDIC 0x00020
#define C_FILES 0x00040
#define C_IBS 0x00080
#define C_IF 0x00100
#define C_LCASE 0x00200
#define C_NOERROR 0x00400
#define C_NOTRUNC 0x00800
#define C_OBS 0x01000
#define C_OF 0x02000
#define C_OSYNC 0x04000
#define C_PAREVEN 0x08000
#define C_PARNONE 0x100000
#define C_PARODD 0x200000
#define C_PARSET 0x400000
#define C_SEEK 0x800000
#define C_SKIP 0x1000000
#define C_SPARSE 0x2000000
#define C_SWAB 0x4000000
#define C_SYNC 0x8000000
#define C_UCASE 0x10000000
#define C_UNBLOCK 0x20000000
#define C_FILL 0x40000000
#define C_ASCII 0x00000001
#define C_BLOCK 0x00000002
#define C_BS 0x00000004
#define C_CBS 0x00000008
#define C_COUNT 0x00000010
#define C_EBCDIC 0x00000020
#define C_FILES 0x00000040
#define C_IBS 0x00000080
#define C_IF 0x00000100
#define C_LCASE 0x00000200
#define C_NOERROR 0x00000400
#define C_NOTRUNC 0x00000800
#define C_OBS 0x00001000
#define C_OF 0x00002000
#define C_OSYNC 0x00004000
#define C_PAREVEN 0x00008000
#define C_PARNONE 0x00010000
#define C_PARODD 0x00020000
#define C_PARSET 0x00040000
#define C_SEEK 0x00080000
#define C_SKIP 0x00100000
#define C_SPARSE 0x00200000
#define C_SWAB 0x00400000
#define C_SYNC 0x00800000
#define C_UCASE 0x01000000
#define C_UNBLOCK 0x02000000
#define C_FILL 0x04000000
#define C_STATUS 0x08000000
#define C_NOXFER 0x10000000
#define C_NOINFO 0x20000000
#define C_PARITY (C_PAREVEN | C_PARODD | C_PARNONE | C_PARSET)

View File

@ -59,6 +59,9 @@ summary(void)
struct timeval tv;
double secs;
if (ddflags & C_NOINFO)
return;
(void)gettimeofday(&tv, NULL);
secs = tv.tv_sec + tv.tv_usec * 1e-6 - st.start;
if (secs < 1e-6)
@ -72,9 +75,11 @@ summary(void)
if (st.trunc)
(void)fprintf(stderr, "%ju truncated %s\n",
st.trunc, (st.trunc == 1) ? "block" : "blocks");
(void)fprintf(stderr,
"%ju bytes transferred in %.6f secs (%.0f bytes/sec)\n",
st.bytes, secs, st.bytes / secs);
if (!(ddflags & C_NOXFER)) {
(void)fprintf(stderr,
"%ju bytes transferred in %.6f secs (%.0f bytes/sec)\n",
st.bytes, secs, st.bytes / secs);
}
need_summary = 0;
}

View File

@ -29,7 +29,7 @@
.\" @(#)df.1 8.3 (Berkeley) 5/8/95
.\" $FreeBSD$
.\"
.Dd January 24, 2013
.Dd January 16, 2014
.Dt DF 1
.Os
.Sh NAME
@ -83,13 +83,13 @@ Use 1073741824 byte (1 Gibibyte) blocks rather than the default.
This overrides any
.Ev BLOCKSIZE
specification from the environment.
.It Fl H
.It Fl h
.Dq Human-readable
output.
Use unit suffixes: Byte, Kibibyte, Mebibyte, Gibibyte, Tebibyte and
Pebibyte (based on powers of 1024) in order to reduce the number of
digits to four or fewer.
.It Fl h
.It Fl H
.Dq Human-readable
output.
Use unit suffixes: Byte, Kilobyte, Megabyte,
@ -198,7 +198,7 @@ If the value is outside, it will be set to the appropriate limit.
.Xr mount 8 ,
.Xr pstat 8 ,
.Xr quot 8 ,
.Xr swapinfo 8 .
.Xr swapinfo 8
.Sh STANDARDS
With the exception of most options,
the

View File

@ -81,7 +81,7 @@ userland_version() {
# Print a usage string and exit.
#
usage() {
echo "usage: $progname [-ku]\n" >&2
echo "usage: $progname [-ku]" >&2
exit 1
}

View File

@ -67,7 +67,7 @@ static void usage(void);
int
main(int argc, char *argv[])
{
int errors, numsig, pid;
int errors, numsig, pid, ret;
char *ep;
if (argc < 2)
@ -134,15 +134,16 @@ main(int argc, char *argv[])
for (errors = 0; argc; argc--, argv++) {
#ifdef SHELL
if (**argv == '%')
pid = getjobpgrp(*argv);
ret = killjob(*argv, numsig);
else
#endif
{
pid = strtol(*argv, &ep, 10);
if (!**argv || *ep)
errx(2, "illegal process id: %s", *argv);
ret = kill(pid, numsig);
}
if (kill(pid, numsig) == -1) {
if (ret == -1) {
warn("%s", *argv);
errors = 1;
}

View File

@ -32,7 +32,7 @@
.\" @(#)ls.1 8.7 (Berkeley) 7/29/94
.\" $FreeBSD$
.\"
.Dd March 15, 2013
.Dd April 4, 2014
.Dt LS 1
.Os
.Sh NAME
@ -87,6 +87,8 @@ and current locale settings) in file names as
where
.Va xxx
is the numeric value of the character in octal.
This option is not defined in
.St -p1003.1-2001 .
.It Fl C
Force multi-column output; this is the default when output is to a terminal.
.It Fl D Ar format
@ -104,6 +106,8 @@ different number of columns in the output.
This option overrides the
.Fl T
option.
This option is not defined in
.St -p1003.1-2001 .
.It Fl F
Display a slash
.Pq Ql /
@ -132,6 +136,8 @@ in the environment.
(See below.)
This functionality can be compiled out by removing the definition of
.Ev COLORLS .
This option is not defined in
.St -p1003.1-2001 .
.It Fl H
Symbolic links on the command line are followed.
This option is assumed if
@ -144,6 +150,8 @@ options are specified.
Prevent
.Fl A
from being automatically set for the super-user.
This option is not defined in
.St -p1003.1-2001 .
.It Fl L
If argument is a symbolic link, list the file or directory the link references
rather than the link itself.
@ -171,13 +179,21 @@ month, day, hour, minute, second, and year.
The
.Fl D
option gives even more control over the output format.
This option is not defined in
.St -p1003.1-2001 .
.It Fl U
Use time when file was created for sorting or printing.
This option is not defined in
.St -p1003.1-2001 .
.It Fl W
Display whiteouts when scanning directories.
This option is not defined in
.St -p1003.1-2001 .
.It Fl Z
Display each file's MAC label; see
.Xr maclabel 7 .
This option is not defined in
.St -p1003.1-2001 .
.It Fl a
Include directory entries whose names begin with a
dot
@ -188,25 +204,48 @@ As
but use
.Tn C
escape codes whenever possible.
This option is not defined in
.St -p1003.1-2001 .
.It Fl c
Use time when file status was last changed for sorting or printing.
.It Fl d
Directories are listed as plain files (not searched recursively).
.It Fl f
Output is not sorted.
This option turns on
.Fl a .
It also negates the effect of the
.Fl r ,
.Fl S
and
.Fl t
options.
As allowed by
.St -p1003.1-2001 ,
this option has no effect on the
.Fl d ,
.Fl l ,
.Fl R
and
.Fl s
options.
.It Fl g
This option is deprecated and is only available for compatibility
with
.Bx 4.3 ;
it was used to display the group name in the long
This option has no effect.
It is only available for compatibility with
.Bx 4.3 ,
where it was used to display the group name in the long
.Pq Fl l
format output.
This option is incompatible with
.St -p1003.1-2001 .
.It Fl h
When used with the
.Fl l
option, use unit suffixes: Byte, Kilobyte, Megabyte, Gigabyte, Terabyte
and Petabyte in order to reduce the number of digits to four or fewer
using base 2 for sizes.
This option is not defined in
.St -p1003.1-2001 .
.It Fl i
For each file, print the file's file serial number (inode number).
.It Fl k
@ -232,6 +271,8 @@ output.
Include the file flags in a long
.Pq Fl l
output.
This option is incompatible with
.St -p1003.1-2001 .
See
.Xr chflags 1
for a list of file flags and their meanings.
@ -291,6 +332,8 @@ or printing
Force raw printing of non-printable characters.
This is the default
when output is not to a terminal.
This option is not defined in
.St -p1003.1-2001 .
.It Fl x
The same as
.Fl C ,
@ -305,6 +348,8 @@ This has the same effect as setting
See the description of the
.Fl t
option for more details.
This option is not defined in
.St -p1003.1-2001 .
.It Fl 1
(The numeric digit
.Dq one . )
@ -321,6 +366,8 @@ non-monetary separator returned by
typically a comma or period.
If no locale is set, or the locale does not have a non-monetary separator, this
option has no effect.
This option is not defined in
.St -p1003.1-2001 .
.El
.Pp
The
@ -760,13 +807,19 @@ specification.
.Xr getfmac 8
.Sh STANDARDS
With the exception of options
.Fl I , g , n
.Fl g , n
and
.Fl o ,
the
.Nm
utility conforms to
.St -p1003.1-2001 .
The options
.Fl B , D , G , I , T , U , W , Z , b , h , w , y
and
.Fl ,
are compatible extensions not defined in
.St -p1003.1-2001 .
.Pp
The ACL support is compatible with
.Tn IEEE

View File

@ -226,6 +226,9 @@ main(int argc, char *argv[])
f_accesstime = 0;
f_statustime = 0;
break;
case 'f':
f_nosort = 1;
/* FALLTHROUGH */
case 'a':
fts_options |= FTS_SEEDOT;
/* FALLTHROUGH */
@ -300,9 +303,6 @@ main(int argc, char *argv[])
f_listdir = 1;
f_recursive = 0;
break;
case 'f':
f_nosort = 1;
break;
case 'g': /* Compatibility with 4.3BSD. */
break;
case 'h':

View File

@ -1,6 +1,12 @@
# @(#)Makefile 8.2 (Berkeley) 4/2/94
# $FreeBSD$
.include <bsd.own.mk>
PROG= mv
.if ${MK_TESTS} != "no"
SUBDIR+= tests
.endif
.include <bsd.prog.mk>

9
bin/mv/tests/Makefile Normal file
View File

@ -0,0 +1,9 @@
# $FreeBSD$
.include <bsd.own.mk>
TESTSDIR= ${TESTSBASE}/bin/mv
TAP_TESTS_SH= legacy_test
.include <bsd.test.mk>

View File

@ -1,6 +1,8 @@
# @(#)Makefile 8.1 (Berkeley) 5/31/93
# $FreeBSD$
.include <bsd.own.mk>
# To install on versions prior to BSD 4.4 the following may have to be
# defined with CFLAGS +=
#
@ -30,4 +32,8 @@ SRCS= ar_io.c ar_subs.c buf_subs.c cache.c cpio.c file_subs.c ftree.c \
gen_subs.c getoldopt.c options.c pat_rep.c pax.c sel_subs.c \
tables.c tar.c tty_subs.c
.if ${MK_TESTS} != "no"
SUBDIR+= tests
.endif
.include <bsd.prog.mk>

View File

@ -1385,6 +1385,7 @@ opt_add(const char *str)
free(lstr);
return(-1);
}
lstr = NULL; /* parts of string going onto the OPLIST */
*pt++ = '\0';
opt->name = frpt;
opt->value = pt;
@ -1400,6 +1401,7 @@ opt_add(const char *str)
optail->fow = opt;
optail = opt;
}
free(lstr);
return(0);
}

View File

@ -33,7 +33,7 @@
.\" @(#)pax.1 8.4 (Berkeley) 4/18/94
.\" $FreeBSD$
.\"
.Dd August 29, 2010
.Dd December 21, 2013
.Dt PAX 1
.Os
.Sh NAME
@ -587,6 +587,16 @@ precedence.
For example, if
.Dl Fl p Ar eme
is specified, file modification times are still preserved.
.Pp
File flags set by
.Xr chflags 1
are not understood by
.Nm ,
however
.Xr tar 1
and
.Xr dump 1
will preserve these.
.It Fl s Ar replstr
Modify the file or archive member names specified by the
.Ar pattern
@ -1195,3 +1205,11 @@ at the University of California, San Diego
The
.Nm
utility does not recognize multibyte characters.
.Pp
File flags set by
.Xr chflags 1
are not preserved by
.Nm .
The BUGS section of
.Xr chflags 1
has a list of utilities that are unaware of flags.

9
bin/pax/tests/Makefile Normal file
View File

@ -0,0 +1,9 @@
# $FreeBSD$
.include <bsd.own.mk>
TESTSDIR= ${TESTSBASE}/bin/pax
TAP_TESTS_PERL= legacy_test
.include <bsd.test.mk>

View File

@ -0,0 +1,89 @@
# $FreeBSD$
use strict;
use warnings;
use Test::More tests => 6;
use File::Path qw(rmtree mkpath);
use Cwd;
my $n = 0;
sub create_file {
my $fn = shift;
$n++;
(my $dir = $fn) =~ s,/[^/]+$,,;
mkpath $dir;
open my $fd, ">", $fn or die "$fn: $!";
print $fd "file $n\n";
}
ustar_pathnames: { SKIP: {
# Prove that pax breaks up ustar pathnames properly
my $top = getcwd . "/ustar-pathnames-1";
skip "Current path is too long", 6 if length $top > 92;
rmtree $top;
my $subdir = "x" . "x" x (92 - length $top);
my $work94 = "$top/$subdir";
mkpath $work94; # $work is 94 characters long
my $x49 = "x" x 49;
my $x50 = "x" x 50;
my $x60 = "x" x 60;
my $x95 = "x" x 95;
my @paths = (
"$work94/x099", # 99 chars
"$work94/xx100", # 100 chars
"$work94/xxx101", # 101 chars
"$work94/$x49/${x50}x199", # 199 chars
"$work94/$x49/${x50}xx200", # 200 chars
"$work94/$x49/${x50}xxx201", # 201 chars
"$work94/$x60/${x95}254", # 254 chars
"$work94/$x60/${x95}x255", # 255 chars
);
my @l = map { length } @paths;
my $n = 0;
create_file $_ for @paths;
system "pax -wf ustar.ok $work94";
ok($? == 0, "Wrote 'ustar.ok' containing files with lengths @l");
(my $orig = $top) =~ s,1$,2,;
rmtree $orig;
rename $top, $orig;
system "pax -rf ustar.ok";
ok($? == 0, "Restored 'ustar.ok' containing files with lengths @l");
system "diff -ru $orig $top";
ok($? == 0, "Restored files are identical");
rmtree $top;
rename $orig, $top;
# 256 chars (with components < 100 chars) should not work
push @paths, "$work94/x$x60/${x95}x256"; # 256 chars
push @l, length $paths[-1];
create_file $paths[-1];
system "pax -wf ustar.fail1 $work94";
ok($?, "Failed to write 'ustar.fail1' containing files with lengths @l");
# Components with 100 chars shouldn't work
unlink $paths[-1];
$paths[-1] = "$work94/${x95}xc100"; # 100 char filename
$l[-1] = length $paths[-1];
create_file $paths[-1];
system "pax -wf ustar.fail2 $work94";
ok($?, "Failed to write 'ustar.fail2' with a 100 char filename");
unlink $paths[-1];
$paths[-1] = "$work94/${x95}xc100/x"; # 100 char component
$l[-1] = length $paths[-1];
create_file $paths[-1];
system "pax -wf ustar.fail3 $work94";
ok($?, "Failed to write 'ustar.fail3' with a 100 char component");
}}

View File

@ -1,6 +1,8 @@
# $NetBSD: Makefile,v 1.1 2002/03/01 11:21:58 ad Exp $
# $FreeBSD$
.include <bsd.own.mk>
PROG= pkill
DPADD= ${LIBKVM}
@ -17,4 +19,8 @@ MLINKS= pkill.1 pgrep.1
SYMLINKS= ${BINDIR}/pkill /usr/bin/pkill
SYMLINKS+= ${BINDIR}/pgrep /usr/bin/pgrep
.if ${MK_TESTS} != "no"
SUBDIR+= tests
.endif
.include <bsd.prog.mk>

View File

@ -318,7 +318,10 @@ main(int argc, char **argv)
* Use KERN_PROC_PROC instead of KERN_PROC_ALL, since we
* just want processes and not individual kernel threads.
*/
plist = kvm_getprocs(kd, KERN_PROC_PROC, 0, &nproc);
if (pidfromfile >= 0)
plist = kvm_getprocs(kd, KERN_PROC_PID, pidfromfile, &nproc);
else
plist = kvm_getprocs(kd, KERN_PROC_PROC, 0, &nproc);
if (plist == NULL) {
errx(STATUS_ERROR, "Cannot get process list (%s)",
kvm_geterr(kd));

38
bin/pkill/tests/Makefile Normal file
View File

@ -0,0 +1,38 @@
# $FreeBSD$
.include <bsd.own.mk>
TESTSDIR= ${TESTSBASE}/bin/pkill
TAP_TESTS_SH= pgrep-F_test
TAP_TESTS_SH+= pgrep-LF_test
TAP_TESTS_SH+= pgrep-P_test
TAP_TESTS_SH+= pgrep-U_test
TAP_TESTS_SH+= pgrep-_g_test
TAP_TESTS_SH+= pgrep-_s_test
TAP_TESTS_SH+= pgrep-g_test
TAP_TESTS_SH+= pgrep-i_test
TAP_TESTS_SH+= pgrep-j_test
TEST_METADATA.pgrep-j_test+= required_user="root"
TAP_TESTS_SH+= pgrep-l_test
TAP_TESTS_SH+= pgrep-n_test
TAP_TESTS_SH+= pgrep-o_test
TAP_TESTS_SH+= pgrep-q_test
TAP_TESTS_SH+= pgrep-s_test
TAP_TESTS_SH+= pgrep-t_test
TAP_TESTS_SH+= pgrep-v_test
TAP_TESTS_SH+= pgrep-x_test
TAP_TESTS_SH+= pkill-F_test
TAP_TESTS_SH+= pkill-LF_test
TAP_TESTS_SH+= pkill-P_test
TAP_TESTS_SH+= pkill-U_test
TAP_TESTS_SH+= pkill-_g_test
TAP_TESTS_SH+= pkill-g_test
TAP_TESTS_SH+= pkill-i_test
TAP_TESTS_SH+= pkill-j_test
TEST_METADATA.pkill-j_test+= required_user="root"
TAP_TESTS_SH+= pkill-s_test
TAP_TESTS_SH+= pkill-t_test
TAP_TESTS_SH+= pkill-x_test
.include <bsd.test.mk>

View File

@ -0,0 +1,24 @@
#!/bin/sh
# $FreeBSD$
base=`basename $0`
echo "1..1"
name="pgrep -F <pidfile>"
pidfile=$(pwd)/pidfile.txt
sleep=$(pwd)/sleep.txt
ln -sf /bin/sleep $sleep
$sleep 5 &
sleep 0.3
chpid=$!
echo $chpid > $pidfile
pid=`pgrep -f -F $pidfile $sleep`
if [ "$pid" = "$chpid" ]; then
echo "ok - $name"
else
echo "not ok - $name"
fi
kill "$chpid"
rm -f $pidfile
rm -f $sleep

View File

@ -0,0 +1,41 @@
#!/bin/sh
# $FreeBSD$
base=`basename $0`
echo "1..2"
name="pgrep -LF <pidfile>"
pidfile=$(pwd)/pidfile.txt
sleep=$(pwd)/sleep.txt
ln -sf /bin/sleep $sleep
daemon -p $pidfile $sleep 5
sleep 0.3
chpid=`cat $pidfile`
pid=`pgrep -f -L -F $pidfile $sleep`
if [ "$pid" = "$chpid" ]; then
echo "ok 1 - $name"
else
echo "not ok 1 - $name"
fi
kill "$chpid"
# Be sure we cannot find process which pidfile is not locked.
$sleep 5 &
sleep 0.3
chpid=$!
echo $chpid > $pidfile
pgrep -f -L -F $pidfile $sleep 2>/dev/null
ec=$?
case $ec in
0)
echo "not ok 2 - $name"
;;
*)
echo "ok 2 - $name"
;;
esac
kill "$chpid"
rm -f $pidfile
rm -f $sleep

View File

@ -0,0 +1,22 @@
#!/bin/sh
# $FreeBSD$
base=`basename $0`
echo "1..1"
name="pgrep -P <ppid>"
ppid=$$
sleep=$(pwd)/sleep.txt
ln -sf /bin/sleep $sleep
$sleep 5 &
sleep 0.3
chpid=$!
pid=`pgrep -f -P $ppid $sleep`
if [ "$pid" = "$chpid" ]; then
echo "ok - $name"
else
echo "not ok - $name"
fi
kill $chpid
rm -f $sleep

View File

@ -0,0 +1,38 @@
#!/bin/sh
# $FreeBSD$
base=`basename $0`
echo "1..2"
name="pgrep -U <uid>"
ruid=`id -ur`
sleep=$(pwd)/sleep.txt
ln -sf /bin/sleep $sleep
$sleep 5 &
sleep 0.3
chpid=$!
pid=`pgrep -f -U $ruid $sleep`
if [ "$pid" = "$chpid" ]; then
echo "ok 1 - $name"
else
echo "not ok 1 - $name"
fi
kill $chpid
rm -f $sleep
name="pgrep -U <user>"
ruid=`id -urn`
sleep=$(pwd)/sleep.txt
ln -sf /bin/sleep $sleep
$sleep 5 &
sleep 0.3
chpid=$!
pid=`pgrep -f -U $ruid $sleep`
if [ "$pid" = "$chpid" ]; then
echo "ok 2 - $name"
else
echo "not ok 2 - $name"
fi
kill $chpid
rm -f $sleep

View File

@ -0,0 +1,38 @@
#!/bin/sh
# $FreeBSD$
base=`basename $0`
echo "1..2"
name="pgrep -G <gid>"
rgid=`id -gr`
sleep=$(pwd)/sleep.txt
ln -sf /bin/sleep $sleep
$sleep 5 &
sleep 0.3
chpid=$!
pid=`pgrep -f -G $rgid $sleep`
if [ "$pid" = "$chpid" ]; then
echo "ok 1 - $name"
else
echo "not ok 1 - $name"
fi
kill $chpid
rm -f $sleep
name="pgrep -G <group>"
rgid=`id -grn`
sleep=$(pwd)/sleep.txt
ln -sf /bin/sleep $sleep
$sleep 5 &
sleep 0.3
chpid=$!
pid=`pgrep -f -G $rgid $sleep`
if [ "$pid" = "$chpid" ]; then
echo "ok 2 - $name"
else
echo "not ok 2 - $name"
fi
kill $chpid
rm -f $sleep

View File

@ -0,0 +1,22 @@
#!/bin/sh
# $FreeBSD$
base=`basename $0`
echo "1..2"
exp_pid="$(ps ax | grep '\[idle\]' | awk '{print $1}')"
name="pgrep -S"
pid=`pgrep -Sx idle`
if [ "$pid" = "$exp_pid" ]; then
echo "ok 1 - $name"
else
echo "not ok 1 - $name"
fi
pid=`pgrep -x idle`
if [ "$pid" != "$exp_pid" ]; then
echo "ok 2 - $name"
else
echo "not ok 2 - $name"
fi

View File

@ -0,0 +1,37 @@
#!/bin/sh
# $FreeBSD$
base=`basename $0`
echo "1..2"
name="pgrep -g <pgrp>"
pgrp=`ps -o tpgid -p $$ | tail -1`
sleep=$(pwd)/sleep.txt
ln -sf /bin/sleep $sleep
$sleep 5 &
sleep 0.3
chpid=$!
pid=`pgrep -f -g $pgrp $sleep`
if [ "$pid" = "$chpid" ]; then
echo "ok 1 - $name"
else
echo "not ok 1 - $name"
fi
kill $chpid
rm -f $sleep
name="pgrep -g 0"
sleep=$(pwd)/sleep.txt
ln -sf /bin/sleep $sleep
$sleep 5 &
sleep 0.3
chpid=$!
pid=`pgrep -f -g 0 $sleep`
if [ "$pid" = "$chpid" ]; then
echo "ok 2 - $name"
else
echo "not ok 2 - $name"
fi
kill $chpid
rm -f $sleep

View File

@ -0,0 +1,24 @@
#!/bin/sh
# $FreeBSD$
base=`basename $0`
echo "1..1"
name="pgrep -i"
sleep=$(pwd)/sleep.txt
usleep="${sleep}XXX"
touch $usleep
lsleep="${sleep}xxx"
ln -sf /bin/sleep $usleep
$usleep 5 &
sleep 0.3
chpid=$!
pid=`pgrep -f -i $lsleep`
if [ "$pid" = "$chpid" ]; then
echo "ok - $name"
else
echo "not ok - $name"
fi
kill $chpid
rm -f $sleep $usleep

View File

@ -0,0 +1,75 @@
#!/bin/sh
# $FreeBSD$
base=`basename $0`
echo "1..3"
name="pgrep -j <jid>"
if [ `id -u` -eq 0 ]; then
sleep=$(pwd)/sleep.txt
ln -sf /bin/sleep $sleep
jail / $base-1 127.0.0.1 $sleep 5 &
chpid=$!
jail / $base-2 127.0.0.1 $sleep 5 &
chpid2=$!
$sleep 5 &
chpid3=$!
sleep 0.5
jid=`jls | awk "/127\\.0\\.0\\.1.*${base}-1/ {print \$1}"`
pid=`pgrep -f -j $jid $sleep`
if [ "$pid" = "$chpid" ]; then
echo "ok 1 - $name"
else
echo "not ok 1 - $name"
fi
kill $chpid $chpid2 $chpid3
rm -f $sleep
else
echo "ok 1 - $name # skip Test needs uid 0."
fi
name="pgrep -j any"
if [ `id -u` -eq 0 ]; then
sleep=$(pwd)/sleep.txt
ln -sf /bin/sleep $sleep
jail / $base-1 127.0.0.1 $sleep 5 &
chpid=$!
jail / $base-2 127.0.0.1 $sleep 5 &
chpid2=$!
$sleep 5 &
chpid3=$!
sleep 0.5
pids=`pgrep -f -j any $sleep | sort`
refpids=`{ echo $chpid; echo $chpid2; } | sort`
if [ "$pids" = "$refpids" ]; then
echo "ok 2 - $name"
else
echo "not ok 2 - $name"
fi
kill $chpid $chpid2 $chpid3
rm -f $sleep
else
echo "ok 2 - $name # skip Test needs uid 0."
fi
name="pgrep -j none"
if [ `id -u` -eq 0 ]; then
sleep=$(pwd)/sleep.txt
ln -sf /bin/sleep $sleep
$sleep 5 &
chpid=$!
jail / $base 127.0.0.1 $sleep 5 &
chpid2=$!
sleep 0.5
pid=`pgrep -f -j none $sleep`
if [ "$pid" = "$chpid" ]; then
echo "ok 3 - $name"
else
echo "not ok 3 - $name"
fi
kill $chpid $chpid2
rm -f $sleep
else
echo "ok 3 - $name # skip Test needs uid 0."
fi

View File

@ -0,0 +1,20 @@
#!/bin/sh
# $FreeBSD$
base=`basename $0`
echo "1..1"
name="pgrep -l"
sleep=$(pwd)/sleep.txt
ln -sf /bin/sleep $sleep
$sleep 5 &
sleep 0.3
pid=$!
if [ "$pid $sleep 5" = "`pgrep -f -l $sleep`" ]; then
echo "ok - $name"
else
echo "not ok - $name"
fi
kill $pid
rm -f $sleep

View File

@ -0,0 +1,24 @@
#!/bin/sh
# $FreeBSD$
base=`basename $0`
echo "1..1"
name="pgrep -n"
sleep=$(pwd)/sleep.txt
ln -sf /bin/sleep $sleep
$sleep 5 &
oldpid=$!
$sleep 5 &
sleep 0.3
newpid=$!
pid=`pgrep -f -n $sleep`
if [ "$pid" = "$newpid" ]; then
echo "ok - $name"
else
echo "not ok - $name"
fi
kill $oldpid
kill $newpid
rm -f $sleep

View File

@ -0,0 +1,24 @@
#!/bin/sh
# $FreeBSD$
base=`basename $0`
echo "1..1"
name="pgrep -o"
sleep=$(pwd)/sleep.txt
ln -sf /bin/sleep $sleep
$sleep 5 &
oldpid=$!
$sleep 5 &
sleep 0.3
newpid=$!
pid=`pgrep -f -o $sleep`
if [ "$pid" = "$oldpid" ]; then
echo "ok - $name"
else
echo "not ok - $name"
fi
kill $oldpid
kill $newpid
rm -f $sleep

View File

@ -0,0 +1,38 @@
#!/bin/sh
# $FreeBSD$
base=`basename $0`
echo "1..4"
name="pgrep -q"
sleep0=$(pwd)/sleep0.txt
sleep1=$(pwd)/sleep1.txt
ln -sf /bin/sleep $sleep0
$sleep0 5 &
sleep 0.3
pid=$!
out="`pgrep -q -f $sleep0 2>&1`"
if [ $? -eq 0 ]; then
echo "ok 1 - $name"
else
echo "not ok 1 - $name"
fi
if [ -z "${out}" ]; then
echo "ok 2 - $name"
else
echo "not ok 2 - $name"
fi
out="`pgrep -q -f $sleep1 2>&1`"
if [ $? -ne 0 ]; then
echo "ok 3 - $name"
else
echo "not ok 3 - $name"
fi
if [ -z "${out}" ]; then
echo "ok 4 - $name"
else
echo "not ok 4 - $name"
fi
kill $pid
rm -f $sleep0 $sleep1

View File

@ -0,0 +1,37 @@
#!/bin/sh
# $FreeBSD$
base=`basename $0`
echo "1..2"
name="pgrep -s <sid>"
sid=`ps -o tsid -p $$ | tail -1`
sleep=$(pwd)/sleep.txt
ln -sf /bin/sleep $sleep
$sleep 5 &
sleep 0.3
chpid=$!
pid=`pgrep -f -s $sid $sleep`
if [ "$pid" = "$chpid" ]; then
echo "ok 1 - $name"
else
echo "not ok 1 - $name"
fi
kill $chpid
rm -f $sleep
name="pgrep -s 0"
sleep=$(pwd)/sleep.txt
ln -sf /bin/sleep $sleep
$sleep 5 &
sleep 0.3
chpid=$!
pid=`pgrep -f -s 0 $sleep`
if [ "$pid" = "$chpid" ]; then
echo "ok 2 - $name"
else
echo "not ok 2 - $name"
fi
kill $chpid
rm -f $sleep

View File

@ -0,0 +1,37 @@
#!/bin/sh
# $FreeBSD$
base=`basename $0`
echo "1..2"
name="pgrep -t <tty>"
tty=`ps -x -o tty -p $$ | tail -1`
if [ "$tty" = "??" -o "$tty" = "-" ]; then
tty="-"
ttyshort="-"
else
case $tty in
pts/*) ttyshort=`echo $tty | cut -c 5-` ;;
*) ttyshort=`echo $tty | cut -c 4-` ;;
esac
fi
sleep=$(pwd)/sleep.txt
ln -sf /bin/sleep $sleep
$sleep 5 &
sleep 0.3
chpid=$!
pid=`pgrep -f -t $tty $sleep`
if [ "$pid" = "$chpid" ]; then
echo "ok 1 - $name"
else
echo "not ok 1 - $name"
fi
pid=`pgrep -f -t $ttyshort $sleep`
if [ "$pid" = "$chpid" ]; then
echo "ok 2 - $name"
else
echo "not ok 2 - $name"
fi
kill $chpid
rm -f $sleep

View File

@ -0,0 +1,25 @@
#!/bin/sh
# $FreeBSD$
base=`basename $0`
echo "1..2"
name="pgrep -v"
sleep=$(pwd)/sleep.txt
ln -sf /bin/sleep $sleep
$sleep 5 &
sleep 0.3
pid=$!
if [ -z "`pgrep -f -v $sleep | egrep '^'"$pid"'$'`" ]; then
echo "ok 1 - $name"
else
echo "not ok 1 - $name"
fi
if [ ! -z "`pgrep -f -v -x x | egrep '^'"$pid"'$'`" ]; then
echo "ok 2 - $name"
else
echo "not ok 2 - $name"
fi
kill $pid
rm -f $sleep

View File

@ -0,0 +1,36 @@
#!/bin/sh
# $FreeBSD$
base=`basename $0`
echo "1..4"
name="pgrep -x"
sleep=$(pwd)/sleep.txt
ln -sf /bin/sleep $sleep
$sleep 5 &
sleep 0.3
pid=$!
if [ ! -z "`pgrep -x sleep | egrep '^'"$pid"'$'`" ]; then
echo "ok 1 - $name"
else
echo "not ok 1 - $name"
fi
if [ -z "`pgrep -x slee | egrep '^'"$pid"'$'`" ]; then
echo "ok 2 - $name"
else
echo "not ok 2 - $name"
fi
name="pgrep -x -f"
if [ ! -z "`pgrep -x -f ''"$sleep"' 5' | egrep '^'"$pid"'$'`" ]; then
echo "ok 3 - $name"
else
echo "not ok 3 - $name"
fi
if [ -z "`pgrep -x -f ''"$sleep"' ' | egrep '^'"$pid"'$'`" ]; then
echo "ok 4 - $name"
else
echo "not ok 4 - $name"
fi
kill $pid
rm -f $sleep

View File

@ -0,0 +1,27 @@
#!/bin/sh
# $FreeBSD$
base=`basename $0`
echo "1..1"
name="pkill -F <pidfile>"
pidfile=$(pwd)/pidfile.txt
sleep=$(pwd)/sleep.txt
ln -sf /bin/sleep $sleep
$sleep 5 &
sleep 0.3
echo $! > $pidfile
pkill -f -F $pidfile $sleep
ec=$?
case $ec in
0)
echo "ok - $name"
;;
*)
echo "not ok - $name"
;;
esac
rm -f $pidfile
rm -f $sleep

View File

@ -0,0 +1,43 @@
#!/bin/sh
# $FreeBSD$
base=`basename $0`
echo "1..2"
name="pkill -LF <pidfile>"
pidfile=$(pwd)/pidfile.txt
sleep=$(pwd)/sleep.txt
ln -sf /bin/sleep $sleep
daemon -p $pidfile $sleep 5
sleep 0.3
pkill -f -L -F $pidfile $sleep
ec=$?
case $ec in
0)
echo "ok 1 - $name"
;;
*)
echo "not ok 1 - $name"
;;
esac
# Be sure we cannot kill process which pidfile is not locked.
$sleep 5 &
sleep 0.3
chpid=$!
echo $chpid > $pidfile
pkill -f -L -F $pidfile $sleep 2>/dev/null
ec=$?
case $ec in
0)
echo "not ok 2 - $name"
;;
*)
echo "ok 2 - $name"
;;
esac
kill "$chpid"
rm -f $pidfile
rm -f $sleep

View File

@ -0,0 +1,25 @@
#!/bin/sh
# $FreeBSD$
base=`basename $0`
echo "1..1"
name="pkill -P <ppid>"
ppid=$$
sleep=$(pwd)/sleep.txt
ln -sf /bin/sleep $sleep
$sleep 5 &
sleep 0.3
pkill -f -P $ppid $sleep
ec=$?
case $ec in
0)
echo "ok - $name"
;;
*)
echo "not ok - $name"
;;
esac
rm -f $sleep

View File

@ -0,0 +1,42 @@
#!/bin/sh
# $FreeBSD$
base=`basename $0`
echo "1..2"
name="pkill -U <uid>"
ruid=`id -ur`
sleep=$(pwd)/sleep.txt
ln -sf /bin/sleep $sleep
$sleep 5 &
sleep 0.3
pkill -f -U $ruid $sleep
ec=$?
case $ec in
0)
echo "ok 1 - $name"
;;
*)
echo "not ok 1 - $name"
;;
esac
rm -f $sleep
name="pkill -U <user>"
ruid=`id -urn`
sleep=$(pwd)/sleep.txt
ln -sf /bin/sleep $sleep
$sleep 5 &
sleep 0.3
pkill -f -U $ruid $sleep
ec=$?
case $ec in
0)
echo "ok 2 - $name"
;;
*)
echo "not ok 2 - $name"
;;
esac
rm -f $sleep

View File

@ -0,0 +1,42 @@
#!/bin/sh
# $FreeBSD$
base=`basename $0`
echo "1..2"
name="pkill -G <gid>"
rgid=`id -gr`
sleep=$(pwd)/sleep.txt
ln -sf /bin/sleep $sleep
$sleep 5 &
sleep 0.3
pkill -f -G $rgid $sleep
ec=$?
case $ec in
0)
echo "ok 1 - $name"
;;
*)
echo "not ok 1 - $name"
;;
esac
rm -f $sleep
name="pkill -G <group>"
rgid=`id -grn`
sleep=$(pwd)/sleep.txt
ln -sf /bin/sleep $sleep
$sleep 5 &
sleep 0.3
pkill -f -G $rgid $sleep
ec=$?
case $ec in
0)
echo "ok 2 - $name"
;;
*)
echo "not ok 2 - $name"
;;
esac
rm -f $sleep

View File

@ -0,0 +1,41 @@
#!/bin/sh
# $FreeBSD$
base=`basename $0`
echo "1..2"
name="pkill -g <pgrp>"
pgrp=`ps -o tpgid -p $$ | tail -1`
sleep=$(pwd)/sleep.txt
ln -sf /bin/sleep $sleep
$sleep 5 &
sleep 0.3
pkill -f -g $pgrp $sleep
ec=$?
case $ec in
0)
echo "ok 1 - $name"
;;
*)
echo "not ok 1 - $name"
;;
esac
rm -f $sleep
name="pkill -g 0"
sleep=$(pwd)/sleep.txt
ln -sf /bin/sleep $sleep
$sleep 5 &
sleep 0.3
pkill -f -g 0 $sleep
ec=$?
case $ec in
0)
echo "ok 2 - $name"
;;
*)
echo "not ok 2 - $name"
;;
esac
rm -f $sleep

View File

@ -0,0 +1,26 @@
#!/bin/sh
# $FreeBSD$
base=`basename $0`
echo "1..1"
name="pkill -i"
sleep=$(pwd)/sleep.txt
usleep="${sleep}XXX"
touch $usleep
lsleep="${sleep}xxx"
ln -sf /bin/sleep $usleep
$usleep 5 &
sleep 0.3
pkill -f -i $lsleep
ec=$?
case $ec in
0)
echo "ok - $name"
;;
*)
echo "not ok - $name"
;;
esac
rm -f $sleep $usleep

View File

@ -0,0 +1,71 @@
#!/bin/sh
# $FreeBSD$
base=`basename $0`
echo "1..3"
name="pkill -j <jid>"
if [ `id -u` -eq 0 ]; then
sleep=$(pwd)/sleep.txt
ln -sf /bin/sleep $sleep
jail / $base-1 127.0.0.1 $sleep 5 &
chpid=$!
jail / $base-2 127.0.0.1 $sleep 5 &
chpid2=$!
$sleep 5 &
chpid3=$!
sleep 0.5
jid=`jls | awk "/127\\.0\\.0\\.1.*${base}-1/ {print \$1}"`
if pkill -f -j $jid $sleep && sleep 0.5 &&
! kill $chpid && kill $chpid2 $chpid3; then
echo "ok 1 - $name"
else
echo "not ok 1 - $name"
fi 2>/dev/null
rm -f $sleep
else
echo "ok 1 - $name # skip Test needs uid 0."
fi
name="pkill -j any"
if [ `id -u` -eq 0 ]; then
sleep=$(pwd)/sleep.txt
ln -sf /bin/sleep $sleep
jail / $base-1 127.0.0.1 $sleep 5 &
chpid=$!
jail / $base-2 127.0.0.1 $sleep 5 &
chpid2=$!
$sleep 5 &
chpid3=$!
sleep 0.5
if pkill -f -j any $sleep && sleep 0.5 &&
! kill $chpid && ! kill $chpid2 && kill $chpid3; then
echo "ok 2 - $name"
else
echo "not ok 2 - $name"
fi 2>/dev/null
rm -f $sleep
else
echo "ok 2 - $name # skip Test needs uid 0."
fi
name="pkill -j none"
if [ `id -u` -eq 0 ]; then
sleep=$(pwd)/sleep.txt
ln -sf /bin/sleep $sleep
$sleep 5 &
chpid=$!
jail / $base 127.0.0.1 $sleep 5 &
chpid2=$!
sleep 0.5
if pkill -f -j none $sleep && sleep 0.5 &&
! kill $chpid && kill $chpid2; then
echo "ok 3 - $name"
else
echo "not ok 3 - $name"
fi 2>/dev/null
rm -f $sleep
else
echo "ok 3 - $name # skip Test needs uid 0."
fi

View File

@ -0,0 +1,41 @@
#!/bin/sh
# $FreeBSD$
base=`basename $0`
echo "1..2"
name="pkill -s <sid>"
sid=`ps -o tsid -p $$ | tail -1`
sleep=$(pwd)/sleep.txt
ln -sf /bin/sleep $sleep
$sleep 5 &
sleep 0.3
pkill -f -s $sid $sleep
ec=$?
case $ec in
0)
echo "ok 1 - $name"
;;
*)
echo "not ok 1 - $name"
;;
esac
rm -f $sleep
name="pkill -s 0"
sleep=$(pwd)/sleep.txt
ln -sf /bin/sleep $sleep
$sleep 5 &
sleep 0.3
pkill -f -s 0 $sleep
ec=$?
case $ec in
0)
echo "ok 2 - $name"
;;
*)
echo "not ok 2 - $name"
;;
esac
rm -f $sleep

View File

@ -0,0 +1,45 @@
#!/bin/sh
# $FreeBSD$
base=`basename $0`
echo "1..2"
name="pkill -t <tty>"
tty=`ps -x -o tty -p $$ | tail -1`
if [ "$tty" = "??" -o "$tty" = "-" ]; then
tty="-"
ttyshort="-"
else
case $tty in
pts/*) ttyshort=`echo $tty | cut -c 5-` ;;
*) ttyshort=`echo $tty | cut -c 4-` ;;
esac
fi
sleep=$(pwd)/sleep.txt
ln -sf /bin/sleep $sleep
$sleep 5 &
sleep 0.3
pkill -f -t $tty $sleep
ec=$?
case $ec in
0)
echo "ok 1 - $name"
;;
*)
echo "not ok 1 - $name"
;;
esac
$sleep 5 &
sleep 0.3
pkill -f -t $ttyshort $sleep
ec=$?
case $ec in
0)
echo "ok 2 - $name"
;;
*)
echo "not ok 2 - $name"
;;
esac
rm -f $sleep

View File

@ -0,0 +1,44 @@
#!/bin/sh
# $FreeBSD$
base=`basename $0`
echo "1..4"
name="pkill -x"
sleep=$(pwd)/sleep.txt
ln -sf /bin/sleep $sleep
$sleep 5 &
sleep 0.3
pkill -x slee -P $$
if [ $? -ne 0 ]; then
echo "ok 1 - $name"
else
echo "not ok 1 - $name"
fi
pkill -x sleep -P $$
if [ $? -eq 0 ]; then
echo "ok 2 - $name"
else
echo "not ok 2 - $name"
fi
rm -f $sleep
name="pkill -x -f"
sleep=$(pwd)/sleep.txt
ln -sf /bin/sleep $sleep
$sleep 5 &
sleep 0.3
pkill -x -f "$sleep " -P $$
if [ $? -ne 0 ]; then
echo "ok 3 - $name"
else
echo "not ok 3 - $name"
fi
pkill -x -f "$sleep 5" -P $$
if [ $? -eq 0 ]; then
echo "ok 4 - $name"
else
echo "not ok 4 - $name"
fi
rm -f $sleep

View File

@ -797,8 +797,6 @@ char *
emulname(KINFO *k, VARENT *ve __unused)
{
if (k->ki_p->ki_emul == NULL)
return (NULL);
return (strdup(k->ki_p->ki_emul));
}
@ -827,7 +825,6 @@ out:
char *
loginclass(KINFO *k, VARENT *ve __unused)
{
char *s;
/*
* Don't display login class for system processes;
@ -837,8 +834,5 @@ loginclass(KINFO *k, VARENT *ve __unused)
if (k->ki_p->ki_flag & P_SYSTEM) {
return (strdup("-"));
}
s = k->ki_p->ki_loginclass;
if (s == NULL)
return (NULL);
return (strdup(s));
return (strdup(k->ki_p->ki_loginclass));
}

View File

@ -29,7 +29,7 @@
.\" @(#)ps.1 8.3 (Berkeley) 4/18/94
.\" $FreeBSD$
.\"
.Dd March 15, 2013
.Dd December 27, 2013
.Dt PS 1
.Os
.Sh NAME
@ -416,8 +416,9 @@ The process has reduced CPU scheduling priority (see
.It Li s
The process is a session leader.
.It Li V
The process is suspended during a
.Xr vfork 2 .
The process' parent is suspended during a
.Xr vfork 2 ,
waiting for the process to exec or exit.
.It Li W
The process is swapped out.
.It Li X

View File

@ -1,6 +1,8 @@
# @(#)Makefile 8.4 (Berkeley) 5/5/95
# $FreeBSD$
.include <bsd.own.mk>
PROG= sh
INSTALLFLAGS= -S
SHSRCS= alias.c arith_yacc.c arith_yylex.c cd.c echo.c error.c eval.c \
@ -59,7 +61,8 @@ syntax.c syntax.h: mksyntax
token.h: mktokens
sh ${.CURDIR}/mktokens
regress:
cd ${.CURDIR}/../../tools/regression/bin/sh && ${MAKE} SH=${.OBJDIR}/sh
.if ${MK_TESTS} != "no"
SUBDIR+= tests
.endif
.include <bsd.prog.mk>

View File

@ -68,18 +68,7 @@ setalias(const char *name, const char *val)
if (equal(name, ap->name)) {
INTOFF;
ckfree(ap->val);
/* See HACK below. */
#ifdef notyet
ap->val = savestr(val);
#else
{
size_t len = strlen(val);
ap->val = ckmalloc(len + 2);
memcpy(ap->val, val, len);
ap->val[len] = ' ';
ap->val[len+1] = '\0';
}
#endif
INTON;
return;
}
@ -88,34 +77,7 @@ setalias(const char *name, const char *val)
INTOFF;
ap = ckmalloc(sizeof (struct alias));
ap->name = savestr(name);
/*
* XXX - HACK: in order that the parser will not finish reading the
* alias value off the input before processing the next alias, we
* dummy up an extra space at the end of the alias. This is a crock
* and should be re-thought. The idea (if you feel inclined to help)
* is to avoid alias recursions. The mechanism used is: when
* expanding an alias, the value of the alias is pushed back on the
* input as a string and a pointer to the alias is stored with the
* string. The alias is marked as being in use. When the input
* routine finishes reading the string, it marks the alias not
* in use. The problem is synchronization with the parser. Since
* it reads ahead, the alias is marked not in use before the
* resulting token(s) is next checked for further alias sub. The
* H A C K is that we add a little fluff after the alias value
* so that the string will not be exhausted. This is a good
* idea ------- ***NOT***
*/
#ifdef notyet
ap->val = savestr(val);
#else /* hack */
{
size_t len = strlen(val);
ap->val = ckmalloc(len + 2);
memcpy(ap->val, val, len);
ap->val[len] = ' '; /* fluff */
ap->val[len+1] = '\0';
}
#endif
ap->flag = 0;
ap->next = *app;
*app = ap;
@ -207,14 +169,8 @@ comparealiases(const void *p1, const void *p2)
static void
printalias(const struct alias *a)
{
char *p;
out1fmt("%s=", a->name);
/* Don't print the space added above. */
p = a->val + strlen(a->val) - 1;
*p = '\0';
out1qstr(a->val);
*p = ' ';
out1c('\n');
}
@ -224,6 +180,7 @@ printaliases(void)
int i, j;
struct alias **sorted, *ap;
INTOFF;
sorted = ckmalloc(aliases * sizeof(*sorted));
j = 0;
for (i = 0; i < ATABSIZE; i++)
@ -231,9 +188,13 @@ printaliases(void)
if (*ap->name != '\0')
sorted[j++] = ap;
qsort(sorted, aliases, sizeof(*sorted), comparealiases);
for (i = 0; i < aliases; i++)
for (i = 0; i < aliases; i++) {
printalias(sorted[i]);
if (int_pending())
break;
}
ckfree(sorted);
INTON;
}
int

View File

@ -74,6 +74,6 @@
pointer stalloc(int);
void error(const char *, ...) __printf0like(1, 2);
pid_t getjobpgrp(char *);
int killjob(const char *, int);
extern char *commandname;

View File

@ -182,6 +182,7 @@ cdlogical(char *dest)
struct stat statb;
int first;
int badstat;
size_t len;
/*
* Check each component of the path. If we find a symlink or
@ -189,8 +190,9 @@ cdlogical(char *dest)
* next time we get the value of the current directory.
*/
badstat = 0;
cdcomppath = stalloc(strlen(dest) + 1);
scopy(dest, cdcomppath);
len = strlen(dest);
cdcomppath = stalloc(len + 1);
memcpy(cdcomppath, dest, len + 1);
STARTSTACKSTR(p);
if (*dest == '/') {
STPUTC('/', p);
@ -275,6 +277,7 @@ findcwd(char *dir)
{
char *new;
char *p;
size_t len;
/*
* If our argument is NULL, we don't know the current directory
@ -283,8 +286,9 @@ findcwd(char *dir)
*/
if (dir == NULL || curdir == NULL)
return getpwd2();
cdcomppath = stalloc(strlen(dir) + 1);
scopy(dir, cdcomppath);
len = strlen(dir);
cdcomppath = stalloc(len + 1);
memcpy(cdcomppath, dir, len + 1);
STARTSTACKSTR(new);
if (*dir != '/') {
STPUTS(curdir, new);

View File

@ -750,6 +750,45 @@ isdeclarationcmd(struct narg *arg)
(have_command || !isfunc("local"))));
}
static void
xtracecommand(struct arglist *varlist, struct arglist *arglist)
{
struct strlist *sp;
char sep = 0;
const char *p, *ps4;
ps4 = expandstr(ps4val());
out2str(ps4 != NULL ? ps4 : ps4val());
for (sp = varlist->list ; sp ; sp = sp->next) {
if (sep != 0)
out2c(' ');
p = strchr(sp->text, '=');
if (p != NULL) {
p++;
outbin(sp->text, p - sp->text, out2);
out2qstr(p);
} else
out2qstr(sp->text);
sep = ' ';
}
for (sp = arglist->list ; sp ; sp = sp->next) {
if (sep != 0)
out2c(' ');
/* Disambiguate command looking like assignment. */
if (sp == arglist->list &&
strchr(sp->text, '=') != NULL &&
strchr(sp->text, '\'') == NULL) {
out2c('\'');
out2str(sp->text);
out2c('\'');
} else
out2qstr(sp->text);
sep = ' ';
}
out2c('\n');
flushout(&errout);
}
/*
* Check if a builtin can safely be executed in the same process,
* even though it should be in a subshell (command substitution).
@ -847,40 +886,8 @@ evalcommand(union node *cmd, int flags, struct backcmd *backcmd)
argv -= argc;
/* Print the command if xflag is set. */
if (xflag) {
char sep = 0;
const char *p, *ps4;
ps4 = expandstr(ps4val());
out2str(ps4 != NULL ? ps4 : ps4val());
for (sp = varlist.list ; sp ; sp = sp->next) {
if (sep != 0)
out2c(' ');
p = strchr(sp->text, '=');
if (p != NULL) {
p++;
outbin(sp->text, p - sp->text, out2);
out2qstr(p);
} else
out2qstr(sp->text);
sep = ' ';
}
for (sp = arglist.list ; sp ; sp = sp->next) {
if (sep != 0)
out2c(' ');
/* Disambiguate command looking like assignment. */
if (sp == arglist.list &&
strchr(sp->text, '=') != NULL &&
strchr(sp->text, '\'') == NULL) {
out2c('\'');
out2str(sp->text);
out2c('\'');
} else
out2qstr(sp->text);
sep = ' ';
}
out2c('\n');
flushout(&errout);
}
if (xflag)
xtracecommand(&varlist, &arglist);
/* Now locate the command. */
if (argc == 0) {

View File

@ -187,14 +187,15 @@ padvance(const char **path, const char *name)
{
const char *p, *start;
char *q;
size_t len;
size_t len, namelen;
if (*path == NULL)
return NULL;
start = *path;
for (p = start; *p && *p != ':' && *p != '%'; p++)
; /* nothing */
len = p - start + strlen(name) + 2; /* "2" is for '/' and '\0' */
namelen = strlen(name);
len = p - start + namelen + 2; /* "2" is for '/' and '\0' */
STARTSTACKSTR(q);
CHECKSTRSPACE(len, q);
if (p != start) {
@ -202,7 +203,7 @@ padvance(const char **path, const char *name)
q += p - start;
*q++ = '/';
}
strcpy(q, name);
memcpy(q, name, namelen + 1);
pathopt = NULL;
if (*p == '%') {
pathopt = ++p;
@ -527,6 +528,7 @@ cmdlookup(const char *name, int add)
const char *p;
struct tblentry *cmdp;
struct tblentry **pp;
size_t len;
p = name;
hashval = *p << 4;
@ -541,11 +543,11 @@ cmdlookup(const char *name, int add)
}
if (add && cmdp == NULL) {
INTOFF;
cmdp = *pp = ckmalloc(sizeof (struct tblentry)
+ strlen(name) + 1);
len = strlen(name);
cmdp = *pp = ckmalloc(sizeof (struct tblentry) + len + 1);
cmdp->next = NULL;
cmdp->cmdtype = CMDUNKNOWN;
strcpy(cmdp->cmdname, name);
memcpy(cmdp->cmdname, name, len + 1);
INTON;
}
lastcmdentry = pp;
@ -610,6 +612,7 @@ defun(const char *name, union node *func)
/*
* Delete a function if it exists.
* Called with interrupts off.
*/
int
@ -672,9 +675,11 @@ typecmd_impl(int argc, char **argv, int cmd, const char *path)
/* Then look at the aliases */
if ((ap = lookupalias(argv[i], 1)) != NULL) {
if (cmd == TYPECMD_SMALLV)
out1fmt("alias %s='%s'\n", argv[i], ap->val);
else
if (cmd == TYPECMD_SMALLV) {
out1fmt("alias %s=", argv[i]);
out1qstr(ap->val);
outcslow('\n', out1);
} else
out1fmt("%s is an alias for %s\n", argv[i],
ap->val);
continue;

View File

@ -98,13 +98,14 @@ static struct ifsregion ifsfirst; /* first struct in list of ifs regions */
static struct ifsregion *ifslastp; /* last struct in list */
static struct arglist exparg; /* holds expanded arg list */
static void argstr(char *, int);
static char *argstr(char *, int);
static char *exptilde(char *, int);
static char *expari(char *);
static void expbackq(union node *, int, int);
static int subevalvar(char *, char *, int, int, int, int, int);
static char *evalvar(char *, int);
static int varisset(char *, int);
static void varvalue(char *, int, int, int);
static int varisset(const char *, int);
static void varvalue(const char *, int, int, int);
static void recordregion(int, int, int);
static void removerecordregions(int);
static void ifsbreakup(char *, struct arglist *);
@ -206,13 +207,13 @@ expandarg(union node *arg, struct arglist *arglist, int flag)
/*
* Perform parameter expansion, command substitution and arithmetic
* expansion, and tilde expansion if requested via EXP_TILDE/EXP_VARTILDE.
* Processing ends at a CTLENDVAR character as well as '\0'.
* Processing ends at a CTLENDVAR or CTLENDARI character as well as '\0'.
* This is used to expand word in ${var+word} etc.
* If EXP_FULL, EXP_CASE or EXP_REDIR are set, keep and/or generate CTLESC
* characters to allow for further processing.
* If EXP_FULL is set, also preserve CTLQUOTEMARK characters.
*/
static void
static char *
argstr(char *p, int flag)
{
char c;
@ -230,8 +231,10 @@ argstr(char *p, int flag)
CHECKSTRSPACE(2, expdest);
switch (c = *p++) {
case '\0':
return (p - 1);
case CTLENDVAR:
goto breakloop;
case CTLENDARI:
return (p);
case CTLQUOTEMARK:
lit_quoted = 1;
/* "$@" syntax adherence hack */
@ -261,8 +264,8 @@ argstr(char *p, int flag)
expbackq(argbackq->n, c & CTLQUOTE, flag);
argbackq = argbackq->next;
break;
case CTLENDARI:
expari(flag);
case CTLARI:
p = expari(p);
break;
case ':':
case '=':
@ -288,7 +291,6 @@ argstr(char *p, int flag)
expdest - stackblock(), 0);
}
}
breakloop:;
}
/*
@ -387,59 +389,40 @@ removerecordregions(int endoff)
}
/*
* Expand arithmetic expression. Backup to start of expression,
* evaluate, place result in (backed up) result, adjust string position.
* Expand arithmetic expression.
* Note that flag is not required as digits never require CTLESC characters.
*/
void
expari(int flag)
static char *
expari(char *p)
{
char *p, *q, *start;
char *q, *start;
arith_t result;
int begoff;
int quotes = flag & (EXP_FULL | EXP_CASE | EXP_REDIR);
int quoted;
int adj;
/*
* This routine is slightly over-complicated for
* efficiency. First we make sure there is
* enough space for the result, which may be bigger
* than the expression. Next we
* scan backwards looking for the start of arithmetic. If the
* next previous character is a CTLESC character, then we
* have to rescan starting from the beginning since CTLESC
* characters have to be processed left to right.
*/
CHECKSTRSPACE(DIGITS(result) - 2, expdest);
USTPUTC('\0', expdest);
start = stackblock();
p = expdest - 2;
while (p >= start && *p != CTLARI)
--p;
if (p < start || *p != CTLARI)
error("missing CTLARI (shouldn't happen)");
if (p > start && *(p - 1) == CTLESC)
for (p = start; *p != CTLARI; p++)
if (*p == CTLESC)
p++;
if (p[1] == '"')
quoted=1;
else
quoted=0;
begoff = p - start;
quoted = *p++ == '"';
begoff = expdest - stackblock();
p = argstr(p, 0);
removerecordregions(begoff);
if (quotes)
rmescapes(p+2);
STPUTC('\0', expdest);
start = stackblock() + begoff;
q = grabstackstr(expdest);
result = arith(p+2);
result = arith(start);
ungrabstackstr(q, expdest);
fmtstr(p, DIGITS(result), ARITH_FORMAT_STR, result);
while (*p++)
;
if (quoted == 0)
recordregion(begoff, p - 1 - start, 0);
result = expdest - p + 1;
STADJUST(-result, expdest);
start = stackblock() + begoff;
adj = start - expdest;
STADJUST(adj, expdest);
CHECKSTRSPACE((int)(DIGITS(result) + 1), expdest);
fmtstr(expdest, DIGITS(result), ARITH_FORMAT_STR, result);
adj = strlen(expdest);
STADJUST(adj, expdest);
if (!quoted)
recordregion(begoff, expdest - stackblock(), 0);
return p;
}
@ -650,7 +633,7 @@ evalvar(char *p, int flag)
int subtype;
int varflags;
char *var;
char *val;
const char *val;
int patloc;
int c;
int set;
@ -671,10 +654,8 @@ evalvar(char *p, int flag)
again: /* jump here after setting a variable with ${var=text} */
if (varflags & VSLINENO) {
set = 1;
special = 0;
val = var;
p[-1] = '\0'; /* temporarily overwrite '=' to have \0
terminated string */
special = 1;
val = NULL;
} else if (special) {
set = varisset(var, varflags & VSNUL);
val = NULL;
@ -703,7 +684,10 @@ again: /* jump here after setting a variable with ${var=text} */
if (set && subtype != VSPLUS) {
/* insert the value of the variable */
if (special) {
varvalue(var, varflags & VSQUOTE, subtype, flag);
if (varflags & VSLINENO)
STPUTBIN(var, p - var - 1, expdest);
else
varvalue(var, varflags & VSQUOTE, subtype, flag);
if (subtype == VSLENGTH) {
varlenb = expdest - stackblock() - startloc;
varlen = varlenb;
@ -815,7 +799,6 @@ record:
default:
abort();
}
p[-1] = '='; /* recover overwritten '=' */
if (subtype != VSNORMAL) { /* skip to end of alternative */
int nesting = 1;
@ -844,7 +827,7 @@ record:
*/
static int
varisset(char *name, int nulok)
varisset(const char *name, int nulok)
{
if (*name == '!')
@ -893,7 +876,7 @@ strtodest(const char *p, int flag, int subtype, int quoted)
*/
static void
varvalue(char *name, int quoted, int subtype, int flag)
varvalue(const char *name, int quoted, int subtype, int flag)
{
int num;
char *p;
@ -973,6 +956,7 @@ recordregion(int start, int end, int inquotes)
{
struct ifsregion *ifsp;
INTOFF;
if (ifslastp == NULL) {
ifsp = &ifsfirst;
} else {
@ -980,6 +964,7 @@ recordregion(int start, int end, int inquotes)
&& ifslastp->inquotes == inquotes) {
/* extend previous area */
ifslastp->endoff = end;
INTON;
return;
}
ifsp = (struct ifsregion *)ckmalloc(sizeof (struct ifsregion));
@ -990,6 +975,7 @@ recordregion(int start, int end, int inquotes)
ifslastp->begoff = start;
ifslastp->endoff = end;
ifslastp->inquotes = inquotes;
INTON;
}
@ -1307,9 +1293,11 @@ addfname(char *name)
{
char *p;
struct strlist *sp;
size_t len;
p = stalloc(strlen(name) + 1);
scopy(name, p);
len = strlen(name);
p = stalloc(len + 1);
memcpy(p, name, len + 1);
sp = (struct strlist *)stalloc(sizeof *sp);
sp->text = p;
*exparg.lastp = sp;

View File

@ -58,6 +58,5 @@ struct arglist {
union node;
void expandarg(union node *, struct arglist *, int);
void expari(int);
void rmescapes(char *);
int casematch(union node *, const char *);

View File

@ -162,20 +162,16 @@ preadfd(void)
int nr;
parsenextc = parsefile->buf;
#ifndef NO_HISTORY
if (el != NULL && gotwinch) {
gotwinch = 0;
el_resize(el);
}
#endif
retry:
#ifndef NO_HISTORY
if (parsefile->fd == 0 && el) {
static const char *rl_cp;
static int el_len;
if (rl_cp == NULL)
if (rl_cp == NULL) {
el_resize(el);
rl_cp = el_gets(el, &el_len);
}
if (rl_cp == NULL)
nr = el_len == 0 ? 0 : -1;
else {
@ -228,10 +224,16 @@ preadbuffer(void)
{
char *p, *q;
int more;
int something;
char savec;
if (parsefile->strpush) {
while (parsefile->strpush) {
/*
* Add a space to the end of an alias to ensure that the
* alias remains in use while parsing its last word.
* This avoids alias recursions.
*/
if (parsenleft == -1 && parsefile->strpush->ap != NULL)
return ' ';
popstring();
if (--parsenleft >= 0)
return (*parsenextc++);
@ -252,24 +254,18 @@ again:
q = p = parsefile->buf + (parsenextc - parsefile->buf);
/* delete nul characters */
something = 0;
for (more = 1; more;) {
switch (*p) {
case '\0':
p++; /* Skip nul */
goto check;
case '\t':
case ' ':
break;
case '\n':
parsenleft = q - parsenextc;
more = 0; /* Stop processing here */
break;
default:
something = 1;
break;
}
@ -288,7 +284,8 @@ check:
*q = '\0';
#ifndef NO_HISTORY
if (parsefile->fd == 0 && hist && something) {
if (parsefile->fd == 0 && hist &&
parsenextc[strspn(parsenextc, " \t\n")] != '\0') {
HistEvent he;
INTOFF;
history(hist, &he, whichprompt == 1 ? H_ENTER : H_ADD,
@ -370,12 +367,16 @@ popstring(void)
struct strpush *sp = parsefile->strpush;
INTOFF;
if (sp->ap) {
if (parsenextc != sp->ap->val &&
(parsenextc[-1] == ' ' || parsenextc[-1] == '\t'))
forcealias();
sp->ap->flag &= ~ALIASINUSE;
}
parsenextc = sp->prevstring;
parsenleft = sp->prevnleft;
parselleft = sp->prevlleft;
/*out2fmt_flush("*** calling popstring: restoring to '%s'\n", parsenextc);*/
if (sp->ap)
sp->ap->flag &= ~ALIASINUSE;
parsefile->strpush = sp->prev;
if (sp != &(parsefile->basestrpush))
ckfree(sp);

View File

@ -95,9 +95,9 @@ static void restartjob(struct job *);
#endif
static void freejob(struct job *);
static int waitcmdloop(struct job *);
static struct job *getjob_nonotfound(char *);
static struct job *getjob(char *);
pid_t getjobpgrp(char *);
static struct job *getjob_nonotfound(const char *);
static struct job *getjob(const char *);
pid_t killjob(const char *, int);
static pid_t dowait(int, struct job *);
static void checkzombies(void);
static void cmdtxt(union node *);
@ -558,7 +558,7 @@ jobidcmd(int argc __unused, char **argv __unused)
*/
static struct job *
getjob_nonotfound(char *name)
getjob_nonotfound(const char *name)
{
int jobno;
struct job *found, *jp;
@ -628,7 +628,7 @@ currentjob: if ((jp = getcurjob(NULL)) == NULL)
static struct job *
getjob(char *name)
getjob(const char *name)
{
struct job *jp;
@ -639,13 +639,26 @@ getjob(char *name)
}
pid_t
getjobpgrp(char *name)
int
killjob(const char *name, int sig)
{
struct job *jp;
int i, ret;
jp = getjob(name);
return -jp->ps[0].pid;
if (jp->state == JOBDONE)
return 0;
if (jp->jobctl)
return kill(-jp->ps[0].pid, sig);
ret = -1;
errno = ESRCH;
for (i = 0; i < jp->nprocs; i++)
if (jp->ps[i].status == -1 || WIFSTOPPED(jp->ps[i].status)) {
if (kill(jp->ps[i].pid, sig) == 0)
ret = 0;
} else
ret = 0;
return ret;
}
/*
@ -978,7 +991,6 @@ int
waitforjob(struct job *jp, int *origstatus)
{
#if JOBS
pid_t mypgrp = getpgrp();
int propagate_int = jp->jobctl && jp->foreground;
#endif
int status;
@ -992,7 +1004,7 @@ waitforjob(struct job *jp, int *origstatus)
dotrap();
#if JOBS
if (jp->jobctl) {
if (tcsetpgrp(ttyfd, mypgrp) < 0)
if (tcsetpgrp(ttyfd, rootpid) < 0)
error("tcsetpgrp failed, errno=%d\n", errno);
}
if (jp->state == JOBSTOPPED)
@ -1109,7 +1121,8 @@ dowait(int mode, struct job *job)
for (sp = jp->ps ; sp < jp->ps + jp->nprocs ; sp++) {
if (sp->pid == -1)
continue;
if (sp->pid == pid) {
if (sp->pid == pid && (sp->status == -1 ||
WIFSTOPPED(sp->status))) {
TRACE(("Changing status of proc %d from 0x%x to 0x%x\n",
(int)pid, sp->status,
status));

View File

@ -98,9 +98,11 @@ char *
savestr(const char *s)
{
char *p;
size_t len;
p = ckmalloc(strlen(s) + 1);
scopy(s, p);
len = strlen(s);
p = ckmalloc(len + 1);
memcpy(p, s, len + 1);
return p;
}

View File

@ -404,6 +404,9 @@ static const struct limits limits[] = {
#endif
#ifdef RLIMIT_NPTS
{ "pseudo-terminals", (char *)0, RLIMIT_NPTS, 1, 'p' },
#endif
#ifdef RLIMIT_KQUEUES
{ "kqueues", (char *)0, RLIMIT_KQUEUES, 1, 'k' },
#endif
{ (char *) 0, (char *)0, 0, 0, '\0' }
};
@ -421,7 +424,7 @@ ulimitcmd(int argc __unused, char **argv __unused)
struct rlimit limit;
what = 'f';
while ((optc = nextopt("HSatfdsmcnuvlbpw")) != '\0')
while ((optc = nextopt("HSatfdsmcnuvlbpwk")) != '\0')
switch (optc) {
case 'H':
how = HARD;

View File

@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$");
* String functions.
*
* equal(s1, s2) Return true if strings are equal.
* scopy(from, to) Copy a string.
* number(s) Convert a string of digits to an integer.
* is_number(s) Return true if s is a string of digits.
*/
@ -60,10 +59,6 @@ char nullstr[1]; /* zero length string */
* equal - #defined in mystring.h
*/
/*
* scopy - #defined in mystring.h
*/
/*
* prefix -- see if pfx is a prefix of string.

View File

@ -40,4 +40,3 @@ int number(const char *);
int is_number(const char *);
#define equal(s1, s2) (strcmp(s1, s2) == 0)
#define scopy(s1, s2) ((void)strcpy(s2, s1))

View File

@ -118,16 +118,16 @@ NFROMTO nfile # fd<> fname
NAPPEND nfile # fd>> fname
NCLOBBER nfile # fd>| fname
type int
next nodeptr # next redirection in list
fd int # file descriptor being redirected
next nodeptr # next redirection in list
fname nodeptr # file name, in a NARG node
expfname temp char *expfname # actual file name
NTOFD ndup # fd<&dupfd
NFROMFD ndup # fd>&dupfd
type int
next nodeptr # next redirection in list
fd int # file descriptor being redirected
next nodeptr # next redirection in list
dupfd int # file descriptor to duplicate
vname nodeptr # file name if fd>&$var
@ -135,8 +135,8 @@ NFROMFD ndup # fd>&dupfd
NHERE nhere # fd<<\!
NXHERE nhere # fd<<!
type int
next nodeptr # next redirection in list
fd int # file descriptor being redirected
next nodeptr # next redirection in list
doc nodeptr # input to command (NARG node)
expdoc temp char *expdoc # actual document (for NXHERE)

View File

@ -682,6 +682,12 @@ makebinary(int type, union node *n1, union node *n2)
return (n);
}
void
forcealias(void)
{
checkkwd |= CHKALIAS;
}
void
fixredir(union node *n, const char *text, int err)
{

View File

@ -76,6 +76,7 @@ extern const char *const parsekwd[];
union node *parsecmd(int);
void forcealias(void);
void fixredir(union node *, const char *, int);
int goodname(const char *);
int isassignment(const char *);

View File

@ -69,6 +69,7 @@ __FBSDID("$FreeBSD$");
struct redirtab {
struct redirtab *next;
int renamed[10];
int fd0_redirected;
};
@ -91,6 +92,13 @@ static int openhere(union node *);
* undone by calling popredir. If the REDIR_BACKQ flag is set, then the
* standard output, and the standard error if it becomes a duplicate of
* stdout, is saved in memory.
*
* We suppress interrupts so that we won't leave open file
* descriptors around. Because the signal handler remains
* installed and we do not use system call restart, interrupts
* will still abort blocking opens such as fifos (they will fail
* with EINTR). There is, however, a race condition if an interrupt
* arrives after INTOFF and before open blocks.
*/
void
@ -102,6 +110,7 @@ redirect(union node *redir, int flags)
int fd;
char memory[10]; /* file descriptors to write to memory */
INTOFF;
for (i = 10 ; --i >= 0 ; )
memory[i] = 0;
memory[1] = flags & REDIR_BACKQ;
@ -109,11 +118,14 @@ redirect(union node *redir, int flags)
sv = ckmalloc(sizeof (struct redirtab));
for (i = 0 ; i < 10 ; i++)
sv->renamed[i] = EMPTY;
sv->fd0_redirected = fd0_redirected;
sv->next = redirlist;
redirlist = sv;
}
for (n = redir ; n ; n = n->nfile.next) {
fd = n->nfile.fd;
if (fd == 0)
fd0_redirected = 1;
if ((n->nfile.type == NTOFD || n->nfile.type == NFROMFD) &&
n->ndup.dupfd == fd)
continue; /* redirect from/to same file descriptor */
@ -134,14 +146,15 @@ redirect(union node *redir, int flags)
sv->renamed[fd] = i;
INTON;
}
if (fd == 0)
fd0_redirected++;
openredirect(n, memory);
INTON;
INTOFF;
}
if (memory[1])
out1 = &memout;
if (memory[2])
out2 = &memout;
INTON;
}
@ -150,19 +163,10 @@ openredirect(union node *redir, char memory[10])
{
struct stat sb;
int fd = redir->nfile.fd;
char *fname;
const char *fname;
int f;
int e;
/*
* We suppress interrupts so that we won't leave open file
* descriptors around. Because the signal handler remains
* installed and we do not use system call restart, interrupts
* will still abort blocking opens such as fifos (they will fail
* with EINTR). There is, however, a race condition if an interrupt
* arrives after INTOFF and before open blocks.
*/
INTOFF;
memory[fd] = 0;
switch (redir->nfile.type) {
case NFROM:
@ -235,7 +239,6 @@ movefd:
default:
abort();
}
INTON;
}
@ -248,7 +251,7 @@ movefd:
static int
openhere(union node *redir)
{
char *p;
const char *p;
int pip[2];
size_t len = 0;
int flags;
@ -303,8 +306,6 @@ popredir(void)
for (i = 0 ; i < 10 ; i++) {
if (rp->renamed[i] != EMPTY) {
if (i == 0)
fd0_redirected--;
if (rp->renamed[i] >= 0) {
dup2(rp->renamed[i], i);
close(rp->renamed[i]);
@ -314,6 +315,7 @@ popredir(void)
}
}
INTOFF;
fd0_redirected = rp->fd0_redirected;
redirlist = rp->next;
ckfree(rp);
INTON;

View File

@ -32,7 +32,7 @@
.\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95
.\" $FreeBSD$
.\"
.Dd June 14, 2013
.Dd January 26, 2014
.Dt SH 1
.Os
.Sh NAME
@ -40,14 +40,14 @@
.Nd command interpreter (shell)
.Sh SYNOPSIS
.Nm
.Op Fl /+abCEefIimnPpTuVvx
.Op Fl /+abCEefhIimnPpTuVvx
.Op Fl /+o Ar longname
.Oo
.Ar script
.Op Ar arg ...
.Oc
.Nm
.Op Fl /+abCEefIimnPpTuVvx
.Op Fl /+abCEefhIimnPpTuVvx
.Op Fl /+o Ar longname
.Fl c Ar string
.Oo
@ -55,7 +55,7 @@
.Op Ar arg ...
.Oc
.Nm
.Op Fl /+abCEefIimnPpTuVvx
.Op Fl /+abCEefhIimnPpTuVvx
.Op Fl /+o Ar longname
.Fl s
.Op Ar arg ...
@ -235,10 +235,16 @@ or
.Dq Li ||
operator; or if the command is a pipeline preceded by the
.Ic !\&
operator.
keyword.
If a shell function is executed and its exit status is explicitly
tested, all commands of the function are considered to be tested as
well.
.Pp
It is recommended to check for failures explicitly
instead of relying on
.Fl e
because it tends to behave in unexpected ways,
particularly in larger scripts.
.It Fl f Li noglob
Disable pathname expansion.
.It Fl h Li trackall
@ -527,6 +533,20 @@ would become
.Pp
.Dl "ls -F foobar"
.Pp
Aliases are also recognized after an alias
whose value ends with a space or tab.
For example, if there is also an alias called
.Dq Li nohup
with the value
.Dq Li "nohup " ,
then the input
.Pp
.Dl "nohup lf foobar"
.Pp
would become
.Pp
.Dl "nohup ls -F foobar"
.Pp
Aliases provide a convenient way for naive users to
create shorthands for commands without having to learn how
to create functions with arguments.
@ -2551,7 +2571,7 @@ and not found.
For aliases the alias expansion is printed;
for commands and tracked aliases
the complete pathname of the command is printed.
.It Ic ulimit Oo Fl HSabcdflmnpstuvw Oc Op Ar limit
.It Ic ulimit Oo Fl HSabcdfklmnpstuvw Oc Op Ar limit
Set or display resource limits (see
.Xr getrlimit 2 ) .
If
@ -2598,6 +2618,11 @@ The maximal size of core dump files, in 512-byte blocks.
The maximal size of the data segment of a process, in kilobytes.
.It Fl f Ar filesize
The maximal size of a file, in 512-byte blocks.
.It Fl k Ar kqueues
The maximal number of kqueues
(see
.Xr kqueue 2 )
for this user ID.
.It Fl l Ar lockedmem
The maximal size of memory that can be locked by a process, in
kilobytes.

View File

@ -390,11 +390,11 @@ opentrace(void)
else
p = "/tmp";
}
scopy(p, s);
strcpy(s, p);
strcat(s, "/trace");
}
#else
scopy("./trace", s);
strcpy(s, "./trace");
#endif /* not_this_way */
if ((tracefile = fopen(s, "a")) == NULL) {
fprintf(stderr, "Can't open %s: %s\n", s, strerror(errno));

18
bin/sh/tests/Makefile Normal file
View File

@ -0,0 +1,18 @@
# $FreeBSD$
.include <bsd.own.mk>
TESTSDIR= ${TESTSBASE}/bin/sh
TAP_TESTS_SH= legacy_test
TAP_TESTS_SH_SED_legacy_test= -e 's,__SH__,/bin/sh,g'
# Some tests in here are silently not run when the tests are executed as
# root. Explicitly tell Kyua to drop privileges.
#
# TODO(jmmv): Kyua needs to do this by default, not only when explicitly
# requested. See https://code.google.com/p/kyua/issues/detail?id=6
TEST_METADATA.legacy_test+= required_user="unprivileged"
SUBDIR+= builtins errors execution expansion parameters parser set-e
.include <bsd.test.mk>

View File

@ -0,0 +1,149 @@
# $FreeBSD$
.include <bsd.own.mk>
FILESDIR= ${TESTSBASE}/bin/sh/builtins
KYUAFILE= no
FILES= alias.0 alias.0.stdout
FILES+= alias.1 alias.1.stderr
FILES+= alias3.0 alias3.0.stdout
FILES+= alias4.0
FILES+= break1.0
FILES+= break2.0 break2.0.stdout
FILES+= break3.0
FILES+= break4.4
FILES+= break5.4
FILES+= builtin1.0
FILES+= case1.0
FILES+= case2.0
FILES+= case3.0
FILES+= case4.0
FILES+= case5.0
FILES+= case6.0
FILES+= case7.0
FILES+= case8.0
FILES+= case9.0
FILES+= case10.0
FILES+= case11.0
FILES+= case12.0
FILES+= case13.0
FILES+= case14.0
FILES+= case15.0
FILES+= case16.0
FILES+= case17.0
FILES+= case18.0
FILES+= case19.0
FILES+= cd1.0
FILES+= cd2.0
FILES+= cd3.0
FILES+= cd4.0
FILES+= cd5.0
FILES+= cd6.0
FILES+= cd7.0
FILES+= cd8.0
FILES+= command1.0
FILES+= command2.0
FILES+= command3.0
FILES+= command3.0.stdout
FILES+= command4.0
FILES+= command5.0
FILES+= command5.0.stdout
FILES+= command6.0
FILES+= command6.0.stdout
FILES+= command7.0
FILES+= command8.0
FILES+= command9.0
FILES+= command10.0
FILES+= command11.0
FILES+= command12.0
FILES+= dot1.0
FILES+= dot2.0
FILES+= dot3.0
FILES+= dot4.0
FILES+= eval1.0
FILES+= eval2.0
FILES+= eval3.0
FILES+= eval4.0
FILES+= eval5.0
FILES+= eval6.0
FILES+= exec1.0
FILES+= exec2.0
FILES+= exit1.0
FILES+= exit2.8
FILES+= exit3.0
FILES+= export1.0
FILES+= fc1.0
FILES+= fc2.0
FILES+= for1.0
FILES+= for2.0
FILES+= for3.0
FILES+= getopts1.0 getopts1.0.stdout
FILES+= getopts2.0 getopts2.0.stdout
FILES+= hash1.0 hash1.0.stdout
FILES+= hash2.0 hash2.0.stdout
FILES+= hash3.0 hash3.0.stdout
FILES+= hash4.0
FILES+= jobid1.0
FILES+= jobid2.0
FILES+= kill1.0 kill2.0
FILES+= lineno.0 lineno.0.stdout
FILES+= lineno2.0
FILES+= local1.0
FILES+= local2.0
FILES+= local3.0
FILES+= local4.0
FILES+= locale1.0
FILES+= printf1.0
FILES+= printf2.0
FILES+= printf3.0
FILES+= printf4.0
FILES+= read1.0 read1.0.stdout
FILES+= read2.0
FILES+= read3.0 read3.0.stdout
FILES+= read4.0 read4.0.stdout
FILES+= read5.0
FILES+= read6.0
FILES+= read7.0
FILES+= return1.0
FILES+= return2.1
FILES+= return3.1
FILES+= return4.0
FILES+= return5.0
FILES+= return6.4
FILES+= return7.4
FILES+= return8.0
FILES+= set1.0
FILES+= set2.0
FILES+= trap1.0
FILES+= trap10.0
FILES+= trap11.0
FILES+= trap12.0
FILES+= trap13.0
FILES+= trap14.0
FILES+= trap2.0
FILES+= trap3.0
FILES+= trap4.0
FILES+= trap5.0
FILES+= trap6.0
FILES+= trap7.0
FILES+= trap8.0
FILES+= trap9.0
FILES+= type1.0 type1.0.stderr
FILES+= type2.0
FILES+= type3.0
FILES+= unalias.0
FILES+= var-assign.0
FILES+= var-assign2.0
FILES+= wait1.0
FILES+= wait2.0
FILES+= wait3.0
FILES+= wait4.0
FILES+= wait5.0
FILES+= wait6.0
FILES+= wait7.0
FILES+= wait8.0
FILES+= wait9.127
FILES+= wait10.0
.include <bsd.test.mk>

Some files were not shown because too many files have changed in this diff Show More