diff --git a/Makefile b/Makefile index cde0f2cdc592..a45706fe5108 100644 --- a/Makefile +++ b/Makefile @@ -125,7 +125,7 @@ TGTS= all all-man buildenv buildenvvars buildkernel buildworld \ obj objlink rerelease showconfig tags toolchain update \ _worldtmp _legacy _bootstrap-tools _cleanobj _obj \ _build-tools _cross-tools _includes _libraries \ - build32 distribute32 install32 build32 distribute32 install32 \ + build32 distribute32 install32 buildsoft distributesoft installsoft \ builddtb xdev xdev-build xdev-install \ xdev-links native-xtools stageworld stagekernel stage-packages \ create-world-packages create-kernel-packages create-packages \ @@ -408,7 +408,7 @@ MAKEFAIL=cat universe_prologue: upgrade_checks universe: universe_prologue -universe_prologue: +universe_prologue: .PHONY @echo "--------------------------------------------------------------" @echo ">>> make universe started on ${STARTTIME}" @echo "--------------------------------------------------------------" @@ -494,7 +494,7 @@ universe_kernconf_${TARGET}_${kernel}: .MAKE "check _.${TARGET}.${kernel} for details"| ${MAKEFAIL})) .endfor universe: universe_epilogue -universe_epilogue: +universe_epilogue: .PHONY @echo "--------------------------------------------------------------" @echo ">>> make universe completed on `LC_ALL=C date`" @echo " (started ${STARTTIME})" diff --git a/Makefile.inc1 b/Makefile.inc1 index 1ce13627a906..aadcc3623866 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -144,6 +144,15 @@ CLEANDIR= clean cleandepend CLEANDIR= cleandir .endif +.if ${MK_META_MODE} == "yes" +# If filemon is used then we can rely on the build being incremental-safe. +# The .meta files will also track the build command and rebuild should +# it change. +.if empty(.MAKE.MODE:Mnofilemon) +NO_CLEAN= t +.endif +.endif + LOCAL_TOOL_DIRS?= PACKAGEDIR?= ${DESTDIR}/${DISTDIR} @@ -316,6 +325,10 @@ CROSSENV+= MAKEOBJDIRPREFIX=${OBJTREE} \ MACHINE_ARCH=${TARGET_ARCH} \ MACHINE=${TARGET} \ CPUTYPE=${TARGET_CPUTYPE} +.if ${MK_META_MODE} != "no" +# Don't rebuild build-tools targets during normal build. +CROSSENV+= BUILD_TOOLS_META=.NOMETA_CMP +.endif .if ${MK_GROFF} != "no" CROSSENV+= GROFF_BIN_PATH=${WORLDTMP}/legacy/usr/bin \ GROFF_FONT_PATH=${WORLDTMP}/legacy/usr/share/groff_font \ @@ -327,6 +340,7 @@ CROSSENV+= ${TARGET_CFLAGS} # bootstrap-tools stage BMAKEENV= INSTALL="sh ${.CURDIR}/tools/install.sh" \ + TOOLS_PREFIX=${WORLDTMP} \ PATH=${BPATH}:${PATH} \ WORLDTMP=${WORLDTMP} \ MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}" @@ -672,12 +686,12 @@ WMAKE_TGTS+= build${libcompat} buildworld: buildworld_prologue ${WMAKE_TGTS} buildworld_epilogue .ORDER: buildworld_prologue ${WMAKE_TGTS} buildworld_epilogue -buildworld_prologue: +buildworld_prologue: .PHONY @echo "--------------------------------------------------------------" @echo ">>> World build started on `LC_ALL=C date`" @echo "--------------------------------------------------------------" -buildworld_epilogue: +buildworld_epilogue: .PHONY @echo @echo "--------------------------------------------------------------" @echo ">>> World build completed on `LC_ALL=C date`" @@ -1897,7 +1911,7 @@ _prebuild_libs= ${_kerberos5_lib_libasn1} \ lib/libkiconv lib/libkvm lib/liblzma lib/libmd lib/libnv \ ${_lib_casper} \ lib/ncurses/ncurses lib/ncurses/ncursesw \ - lib/libopie lib/libpam ${_lib_libthr} \ + lib/libopie lib/libpam/libpam ${_lib_libthr} \ ${_lib_libradius} lib/libsbuf lib/libtacplus \ lib/libgeom \ ${_cddl_lib_libumem} ${_cddl_lib_libnvpair} \ @@ -1909,6 +1923,7 @@ _prebuild_libs= ${_kerberos5_lib_libasn1} \ ${_secure_lib_libcrypto} ${_lib_libldns} \ ${_secure_lib_libssh} ${_secure_lib_libssl} \ gnu/lib/libdialog + .if ${MK_GNUCXX} != "no" _prebuild_libs+= gnu/lib/libstdc++ gnu/lib/libsupc++ gnu/lib/libstdc++__L: lib/msun__L @@ -2076,7 +2091,7 @@ ${_lib}__PL: .PHONY .MAKE .endif .endfor -.for _lib in ${_startup_libs} ${_prebuild_libs:Nlib/libpam} ${_generic_libs} +.for _lib in ${_startup_libs} ${_prebuild_libs} ${_generic_libs} ${_lib}__L: .PHONY .MAKE .if exists(${.CURDIR}/${_lib}) ${_+_}@${ECHODIR} "===> ${_lib} (obj,all,install)"; \ @@ -2087,18 +2102,6 @@ ${_lib}__L: .PHONY .MAKE .endif .endfor -# libpam is special: we need to build static PAM modules before -# static PAM library, and dynamic PAM library before dynamic PAM -# modules. -lib/libpam__L: .PHONY .MAKE - ${_+_}@${ECHODIR} "===> lib/libpam (obj,all,install)"; \ - cd ${.CURDIR}/lib/libpam; \ - ${MAKE} MK_TESTS=no DIRPRFX=lib/libpam/ obj; \ - ${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/} _prebuild_libs: ${_prebuild_libs:S/$/__L/} diff --git a/Makefile.libcompat b/Makefile.libcompat index 2c15a9bbd3cd..2cbaf2e0f196 100644 --- a/Makefile.libcompat +++ b/Makefile.libcompat @@ -88,8 +88,13 @@ LIBCOMPATWMAKEENV+= MAKEOBJDIRPREFIX=${LIBCOMPAT_OBJTREE} \ LIBDIR=/usr/lib${libcompat} \ SHLIBDIR=/usr/lib${libcompat} \ DTRACE="${LIB$COMPATDTRACE:U${DTRACE}}" +.if ${MK_META_MODE} != "no" +# Don't rebuild build-tools targets during normal build. +LIBCOMPATWMAKEENV+= BUILD_TOOLS_META=.NOMETA_CMP +.endif LIBCOMPATWMAKEFLAGS+= CC="${XCC} ${LIBCOMPATCFLAGS}" \ CXX="${XCXX} ${LIBCOMPATCFLAGS} ${LIBCOMPATCXXFLAGS}" \ + CPP="${XCPP} ${LIBCOMPATCFLAGS}" \ DESTDIR=${LIBCOMPATTMP} \ -DNO_CPU_CFLAGS \ MK_CTF=no \ diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 5f29f4b3048c..d1cfd7f34c9e 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -1732,7 +1732,6 @@ OLD_FILES+=usr/share/man/man4/lindev.4.gz # 20140425 OLD_FILES+=usr/lib/libssp_p.a OLD_FILES+=usr/lib/libstand_p.a -OLD_FILES+=usr/lib32/libc_pic.a OLD_FILES+=usr/lib32/libssp_p.a OLD_FILES+=usr/lib32/libstand_p.a # 20140314: AppleTalk diff --git a/UPDATING b/UPDATING index 2e4c37bb08d0..dcff31551e0d 100644 --- a/UPDATING +++ b/UPDATING @@ -31,6 +31,33 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11.x IS SLOW: disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20160414: + The CAM I/O scheduler has been committed to the kernel. There should be + no user visible impact. This does enable NCQ Trim on ada SSDs. While the + list of known rogues that claim support for this but actually corrupt + data is believed to be complete, be on the lookout for data + corruption. The known rogue list is believed to be complete: + + o Crucial MX100, M550 drives with MU01 firmware. + o Micron M510 and M550 drives with MU01 firmware. + o Micron M500 prior to MU07 firmware + o Samsung 830, 840, and 850 all firmwares + o FCCT M500 all firmwares + + Crucial has firmware http://www.crucial.com/usa/en/support-ssd-firmware + with working NCQ TRIM. For Micron branded drives, see your sales rep for + updated firmware. Black listed drives will work correctly because these + drives work correctly so long as no NCQ TRIMs are sent to them. Given + this list is the same as found in Linux, it's believed there are no + other rogues in the market place. All other models from the above + vendors work. + + To be safe, if you are at all concerned, you can quirk each of your + drives to prevent NCQ from being sent by setting: + kern.cam.ada.X.quirks="0x2" + in loader.conf. If the drive requires the 4k sector quirk, set the + quirks entry to 0x3. + 20160330: The FAST_DEPEND build option has been removed and its functionality is now the one true way. The old mkdep(1) style of 'make depend' has diff --git a/bin/csh/Makefile b/bin/csh/Makefile index aa3b83becd16..6e3c32d40745 100644 --- a/bin/csh/Makefile +++ b/bin/csh/Makefile @@ -110,7 +110,7 @@ csh.1: tcsh.man build-tools: gethost -gethost: gethost.c sh.err.h tc.const.h sh.h +gethost: gethost.c sh.err.h tc.const.h sh.h ${BUILD_TOOLS_META} @rm -f ${.TARGET} ${CC} -o gethost ${LDFLAGS} ${CFLAGS:C/-DHAVE_ICONV//} \ ${TCSHDIR}/gethost.c diff --git a/bin/sh/Makefile b/bin/sh/Makefile index 419ff7915bf6..d3422b43beff 100644 --- a/bin/sh/Makefile +++ b/bin/sh/Makefile @@ -45,10 +45,10 @@ builtins.c builtins.h: mkbuiltins builtins.def # XXX this is just to stop the default .c rule being used, so that the # intermediate object has a fixed name. # XXX we have a default .c rule, but no default .o rule. -.o: +mknodes.o mksyntax.o: ${BUILD_TOOLS_META} ${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET} -mknodes: mknodes.o -mksyntax: mksyntax.o +mknodes: mknodes.o ${BUILD_TOOLS_META} +mksyntax: mksyntax.o ${BUILD_TOOLS_META} .ORDER: nodes.c nodes.h nodes.c nodes.h: mknodes nodetypes nodes.c.pat diff --git a/bin/sh/parser.c b/bin/sh/parser.c index 3f9732cbbff3..e72a6f1c7e2e 100644 --- a/bin/sh/parser.c +++ b/bin/sh/parser.c @@ -1616,7 +1616,6 @@ parsesub: { int flags; char *p; static const char types[] = "}-+?="; - int bracketed_name = 0; /* used to handle ${[0-9]*} variables */ int linno; int length; int c1; @@ -1640,7 +1639,6 @@ parsesub: { subtype = VSNORMAL; flags = 0; if (c == '{') { - bracketed_name = 1; c = pgetc_linecont(); subtype = 0; } @@ -1665,7 +1663,7 @@ parsesub: { flags |= VSLINENO; } } else if (is_digit(c)) { - if (bracketed_name) { + if (subtype != VSNORMAL) { do { STPUTC(c, out); c = pgetc_linecont(); diff --git a/cddl/lib/libdtrace/tcp.d b/cddl/lib/libdtrace/tcp.d index ec7350336d5a..9b27076d8096 100644 --- a/cddl/lib/libdtrace/tcp.d +++ b/cddl/lib/libdtrace/tcp.d @@ -108,16 +108,16 @@ typedef struct tcpsinfo { uint32_t tcps_snxt; /* next sequence # to send */ uint32_t tcps_rack; /* sequence # we have acked */ uint32_t tcps_rnxt; /* next sequence # expected */ - uint32_t tcps_swnd; /* send window size */ + u_long tcps_swnd; /* send window size */ int32_t tcps_snd_ws; /* send window scaling */ uint32_t tcps_swl1; /* window update seg seq number */ uint32_t tcps_swl2; /* window update seg ack number */ uint32_t tcps_rup; /* receive urgent pointer */ uint32_t tcps_radv; /* advertised window */ - uint32_t tcps_rwnd; /* receive window size */ + u_long tcps_rwnd; /* receive window size */ int32_t tcps_rcv_ws; /* receive window scaling */ - uint32_t tcps_cwnd; /* congestion window */ - uint32_t tcps_cwnd_ssthresh; /* threshold for congestion avoidance */ + u_long tcps_cwnd; /* congestion window */ + u_long tcps_cwnd_ssthresh; /* threshold for congestion avoidance */ uint32_t tcps_srecover; /* for use in NewReno Fast Recovery */ uint32_t tcps_sack_fack; /* SACK sequence # we have acked */ uint32_t tcps_sack_snxt; /* next SACK seq # for retransmission */ diff --git a/contrib/elftoolchain/elfcopy/sections.c b/contrib/elftoolchain/elfcopy/sections.c index 5848eab7d3f7..143413847851 100644 --- a/contrib/elftoolchain/elfcopy/sections.c +++ b/contrib/elftoolchain/elfcopy/sections.c @@ -343,7 +343,7 @@ create_scn(struct elfcopy *ecp) GElf_Shdr ish; size_t indx; uint64_t oldndx, newndx; - int elferr, sec_flags; + int elferr, sec_flags, reorder; /* * Insert a pseudo section that contains the ELF header @@ -367,6 +367,7 @@ create_scn(struct elfcopy *ecp) errx(EXIT_FAILURE, "elf_getshstrndx failed: %s", elf_errmsg(-1)); + reorder = 0; is = NULL; while ((is = elf_nextscn(ecp->ein, is)) != NULL) { if (gelf_getshdr(is, &ish) == NULL) @@ -482,8 +483,20 @@ create_scn(struct elfcopy *ecp) /* create section header based on input object. */ if (strcmp(name, ".symtab") != 0 && strcmp(name, ".strtab") != 0 && - strcmp(name, ".shstrtab") != 0) + strcmp(name, ".shstrtab") != 0) { copy_shdr(ecp, s, NULL, 0, sec_flags); + /* + * elfcopy puts .symtab, .strtab and .shstrtab + * sections in the end of the output object. + * If the input objects have more sections + * after any of these 3 sections, the section + * table will be reordered. section symbols + * should be regenerated for relocations. + */ + if (reorder) + ecp->flags &= ~SYMTAB_INTACT; + } else + reorder = 1; if (strcmp(name, ".symtab") == 0) { ecp->flags |= SYMTAB_EXIST; diff --git a/contrib/ipfilter/bpf_filter.c b/contrib/ipfilter/bpf_filter.c index d75570e29267..bd465761a34e 100644 --- a/contrib/ipfilter/bpf_filter.c +++ b/contrib/ipfilter/bpf_filter.c @@ -132,7 +132,7 @@ m_xword(m, k, err) return EXTRACT_LONG(cp); } m0 = m->m_next; - if (m0 == 0 || M_LEN(m0) + len - k < 4) + if (m0 == NULL || M_LEN(m0) + len - k < 4) goto bad; *err = 0; np = MTOD(m0, u_char *); @@ -168,7 +168,7 @@ m_xhalf(m, k, err) return EXTRACT_SHORT(cp); } m0 = m->m_next; - if (m0 == 0) + if (m0 == NULL) goto bad; *err = 0; return (cp[0] << 8) | MTOD(m0, u_char *)[0]; @@ -205,7 +205,7 @@ bpf_filter(pc, p, wirelen, buflen) } else m = NULL; - if (pc == 0) + if (pc == NULL) /* * No filter means accept all. */ diff --git a/contrib/ipfilter/mli_ipl.c b/contrib/ipfilter/mli_ipl.c index 2a0024cb459b..ccedf768e7a7 100644 --- a/contrib/ipfilter/mli_ipl.c +++ b/contrib/ipfilter/mli_ipl.c @@ -64,9 +64,9 @@ ipfrwlock_t ipf_global, ipf_mutex, ipf_ipidfrag, ipf_frcache, ipf_tokens; int (*ipf_checkp) __P((struct ip *, int, void *, int, mb_t **)); #ifdef IPFILTER_LKM -static int *ipff_addr = 0; +static int *ipff_addr; static int ipff_value; -static __psunsigned_t *ipfk_addr = 0; +static __psunsigned_t *ipfk_addr; static __psunsigned_t ipfk_code[4]; #endif static void nifattach(); @@ -85,7 +85,7 @@ typedef struct nif { int nf_unit; } nif_t; -static nif_t *nif_head = 0; +static nif_t *nif_head; static int nif_interfaces = 0; extern int in_interfaces; #if IRIX >= 60500 diff --git a/contrib/libpcap/pcap-snf.c b/contrib/libpcap/pcap-snf.c index ee6ffa4dcc6e..b8025ba8ba89 100644 --- a/contrib/libpcap/pcap-snf.c +++ b/contrib/libpcap/pcap-snf.c @@ -57,10 +57,11 @@ snf_pcap_stats(pcap_t *p, struct pcap_stat *ps) static void snf_platform_cleanup(pcap_t *p) { - struct pcap_snf *ps = p->priv; + struct pcap_snf *ps; if (p == NULL) return; + ps = p->priv; snf_ring_close(ps->snf_ring); snf_close(ps->snf_handle); diff --git a/contrib/libxo/Makefile.am b/contrib/libxo/Makefile.am index e050bc46f339..cb71d522bb51 100644 --- a/contrib/libxo/Makefile.am +++ b/contrib/libxo/Makefile.am @@ -77,6 +77,7 @@ GH_PAGES_PACKAGE_DIR = ${GH_PAGES_DIR}/${GH_PACKAGING_DIR} packages: @-[ -d ${GH_PAGES_DIR} ] && set -x \ && echo "Updating packages on gh-pages ..." \ + && mkdir -p ${GH_PAGES_DIR}/${GH_PACKAGING_DIR} \ && SHA1="`openssl sha1 ${PACKAGE_FILE} | awk '{print $$2}'`" \ && SHA256="`openssl sha256 ${PACKAGE_FILE} | awk '{print $$2}'`" \ && SIZE="`ls -l ${PACKAGE_FILE} | awk '{print $$5}'`" \ diff --git a/contrib/libxo/configure.ac b/contrib/libxo/configure.ac index e7bc61dfc127..d1db4386ce4b 100644 --- a/contrib/libxo/configure.ac +++ b/contrib/libxo/configure.ac @@ -12,7 +12,7 @@ # AC_PREREQ(2.2) -AC_INIT([libxo], [0.4.6], [phil@juniper.net]) +AC_INIT([libxo], [0.6.1], [phil@juniper.net]) AM_INIT_AUTOMAKE([-Wall -Werror foreign -Wno-portability]) # Support silent build rules. Requires at least automake-1.11. @@ -74,6 +74,7 @@ AC_CHECK_HEADERS([ctype.h errno.h stdio.h stdlib.h]) AC_CHECK_HEADERS([string.h sys/param.h unistd.h ]) AC_CHECK_HEADERS([sys/sysctl.h]) AC_CHECK_HEADERS([threads.h]) +AC_CHECK_HEADERS([monitor.h]) dnl humanize_number(3) is a great function, but it's not standard. dnl Note Macosx has the function in libutil.a but doesn't ship the @@ -148,10 +149,18 @@ fi AC_SUBST(GETTEXT_CFLAGS) AC_SUBST(GETTEXT_LIBS) -GETTEXT_BINDIR=${GETTEXT_PREFIX}/bin -AC_SUBST(GETTEXT_BINDIR) GETTEXT_LIBDIR=${GETTEXT_PREFIX}/lib AC_SUBST(GETTEXT_LIBDIR) +if test -x ${GETTEXT_PREFIX}/bin/msgfmt ; then + GETTEXT_BINDIR=${GETTEXT_PREFIX}/bin +elif test -x ${GETTEXT_PREFIX}/local/bin/msgfmt ; then + GETTEXT_BINDIR=${GETTEXT_PREFIX}/local/bin +else + AC_MSG_NOTICE("could not find msgfmt tool") + # Use a (bad) fall back value + GETTEXT_BINDIR=${GETTEXT_PREFIX}/bin +fi +AC_SUBST(GETTEXT_BINDIR) AM_CONDITIONAL([HAVE_GETTEXT], [test "$HAVE_GETTEXT" = "yes"]) @@ -287,6 +296,18 @@ if test "${LIBXO_WCWIDTH}" != "no"; then AC_DEFINE([LIBXO_WCWIDTH], [1], [Enable local wcwidth implementation]) fi +AC_MSG_CHECKING([retain hash bucket size]) +AC_ARG_WITH(retain-size, + [ --with-retain-size=[DIR] Specify retain hash bucket size (in bits)], + [XO_RETAIN_SIZE=$withval], + [XO_RETAIN_SIZE=default] +) + +AC_MSG_RESULT([$XO_RETAIN_SIZE]) +if test "${XO_RETAIN_SIZE}" != "default"; then + AC_DEFINE_UNQUOTED([XO_RETAIN_SIZE], ${XO_RETAIN_SIZE}, [Retain hash bucket size]) +fi + AC_CHECK_LIB([m], [lrint]) AM_CONDITIONAL([HAVE_LIBM], [test "$HAVE_LIBM" != "no"]) @@ -347,12 +368,15 @@ XO_SRCDIR=${srcdir} XO_LIBDIR=${libdir} XO_BINDIR=${bindir} XO_INCLUDEDIR=${includedir} +XO_CFLAGS="${CFLAGS}" +AC_SUBST(XO_LIBS) AC_SUBST(XO_SRCDIR) AC_SUBST(XO_LIBDIR) AC_SUBST(XO_BINDIR) AC_SUBST(XO_INCLUDEDIR) AC_SUBST(XO_LIBEXT) +AC_SUBST(XO_CFLAGS) AC_ARG_WITH(encoder-dir, [ --with-encoder-dir=[DIR] Specify location of encoder libraries], @@ -449,4 +473,5 @@ AC_MSG_NOTICE([summary of build options: isthreaded: ${HAVE_ISTHREADED:-no} thread-local: ${THREAD_LOCAL:-no} local wcwidth: ${LIBXO_WCWIDTH:-no} + retain size: ${XO_RETAIN_SIZE:-no} ]) diff --git a/contrib/libxo/doc/libxo-manual.html b/contrib/libxo/doc/libxo-manual.html index bc4463d363b9..4db374b394f5 100644 --- a/contrib/libxo/doc/libxo-manual.html +++ b/contrib/libxo/doc/libxo-manual.html @@ -515,7 +515,7 @@ li.indline1 { } @top-right { - content: "August 2015"; + content: "April 2016"; } @top-center { @@ -22009,7 +22009,7 @@ jQuery(function ($) { -August 24, 2015 +April 15, 2016

libxo: The Easy Way to Generate text, XML, JSON, and HTML output
libxo-manual

@@ -22130,46 +22130,54 @@ jQuery(function ($) { Field Modifiers @@ -22208,42 +22216,38 @@ jQuery(function ($) {
  • 2.2.11   
    +Retaining Parsed Format Information +
  • +
  • +
    2.2.12   
    Example
  • 2.3   
    -Command-line Arguments -
  • -
  • -
    2.4   
    Representing Hierarchy
  • -
    2.5   
    -Handles -
  • -
  • -
    2.6   
    -UTF-8 +
    2.4   
    +Command-line Arguments
  • @@ -22252,7 +22256,7 @@ jQuery(function ($) { The libxo API