Commit Graph

4576 Commits

Author SHA1 Message Date
Dimitry Andric
fe4fed2e4d Merge llvm, clang, lld, lldb, compiler-rt and libc++ trunk r321545,
update build glue and version numbers, add new intrinsics headers, and
update OptionalObsoleteFiles.inc.
2017-12-29 00:56:15 +00:00
Eitan Adler
9914452050 other: Fix several typos and minor errors
- duplicate words
- typos
- references to old versions of FreeBSD

Reviewed by:	imp, benno
2017-12-27 03:23:58 +00:00
Dimitry Andric
54b4b13c4a Merge ^/head r326936 through r327149. 2017-12-24 13:22:57 +00:00
Dimitry Andric
c9d5cb1774 Update OptionalObsoleteFiles.inc again. 2017-12-24 13:19:02 +00:00
Dimitry Andric
0c4684a8bc Update OptionalObsoleteFiles.inc for new headers and libraries under
/usr/lib/clang/6.0.0.
2017-12-24 12:46:28 +00:00
Dimitry Andric
9509d906c1 Add new llvm-objcopy utility, enabled when MK_CLANG_EXTRAS=yes. 2017-12-24 12:36:31 +00:00
Dimitry Andric
6252156da5 Vendor import of clang trunk r321414:
https://llvm.org/svn/llvm-project/cfe/trunk@321414
2017-12-24 01:00:23 +00:00
Dimitry Andric
d49fee24bb Update ObsoleteFiles.inc and OptionalObsoleteFiles.inc. 2017-12-20 20:29:15 +00:00
Warner Losh
22cf6021fc Support more images (but still no geli)
Print a qemu line to a shell script to ease testing each image
Start to support multiple architectures (still very green)
Create /etc/rc that echos success and halts the system for better
automation (also include halt)
Create /etc/fstab on a per-boot type to test loader's passing root
to kernel.

This lets me run a test, connect to it with telnet and get either a
timeout, or a report of success.

Sponsored by: Netflix
2017-12-19 00:18:17 +00:00
Dimitry Andric
461a67fa15 Vendor import of clang trunk r321017:
https://llvm.org/svn/llvm-project/cfe/trunk@321017
2017-12-18 20:11:37 +00:00
Warner Losh
328884aef7 Use -h -D in preference to -D so that the serial port gets the
interactive console rather than the video port. qemu has issues with X
on my mac at the moment and this is the easiest path forward.

Sponsored by: Netflix
2017-12-15 23:16:42 +00:00
Warner Losh
16457354e0 Be a little verbose and list the loader files we're putting on the
drive when making zfs roots as a sanity check for what's on there.
2017-12-15 23:16:37 +00:00
Warner Losh
9b544478b1 For now, make the gpart commands verbose so we know exactly what's
being installed.

Fix problem with gpt + zfs installing the wrong loader...

Sponsored by: Netflix
2017-12-15 23:16:27 +00:00
Warner Losh
502742f35a Add missing of=/dev/${dev}s${s} when installing zfsboot. 2017-12-15 06:44:11 +00:00
Warner Losh
082c6764e6 Script to generate minimal boot images for each of the 24 supported
boot images for x86. This will be enhanced to generate all the other
images (u-boot, powerpc CHRP, etc).

At the moment, it's only generating three of them. zfs+gpt+legacy
works with qemu:
	qemu-system-x86_64 --drive file=${file},format=raw -serial telnet::4444,server
but the ufs ones still have issues I'm tracking down.

These images are the boot blocks, /boot/loader, a kernel, maybe a
couple of modules, /sbin/init, /bin/sh, /libexec/ld-elf.so, libc.so,
libedit and libncursesw. This is just enough to get to single user. At
the moment, these come from the host system, but should come from
OBJTOP.

At the moment, this requires root to build since the zfs tools require
it (and GELI will too when we add support for that).

Sponsored by: Netflix
2017-12-15 06:34:27 +00:00
Warner Losh
cfc948287d Script that knows how to put boot blocks onto a device. Eventually,
this will be installed into /usr/sbin, but for now it's just used for
the boot loader regression script. It's still a bit green, and likely
will get edge cases wrong still. It's also x86 centric at the moment,
but will be enhanced shortly for u-boot, CHRP PowerPC and other
methods.

Sponsored by: Netflix
2017-12-15 06:34:11 +00:00
Conrad Meyer
b797f66c80 netmap pkt-gen tool: Fix memset(3) argument order
Submitted by:	Michael McConville <mmcco AT mykolab.com>
Sponsored by:	Dell EMC Isilon
2017-12-13 19:36:29 +00:00
Warner Losh
14382fcf29 Start adding commands that I know are good to build up residual
knowledge about qemu's quirks. Other qemu commands are possible, but
this is the quickest for testing.

Sponsored by: Netflix
2017-12-11 02:44:15 +00:00
Warner Losh
5b88c56a92 Add -I to just run the imaging part of nanobsd so you can test out
changes to the packaging part of nanobsd more easily, or experiment
with the image contents w/o regenerating a whole new image tree. This
can save minutes when you don't need to do the installworld /
installkernel, etc.

Sponsored by: Netflix
2017-12-11 02:44:10 +00:00
Warner Losh
36fe34c7c9 Fix the std-x86 layout to produce a bootable system. Due to
limitations in mkimg we're still not quite to where I'd like to be
(I'd like to put s3 first on the disk, then s1, but mkimg won't allow
that currently). However, the resulting image now boots with qemu using:

qemu-system-x86_64 -hdd $file -serial telnet::4444,server -nographic

We'll need tweaks to create a specialized /etc/rc.d/growfs that can
create a properly grown image for either the simple or ping-pong
cases, but that will be later. Switched to pure serial console (-h)
instead of video or serial (-P) since that fits this usecase better.

Sponsored by: Netflix
2017-12-11 02:43:56 +00:00
Warner Losh
cbde6ac324 Don't automatically create objdir here. We're just after the
TMPPATH. We'll make the paths later.

Sponsored by: Netflix
2017-12-08 21:59:50 +00:00
Warner Losh
7052e3fb73 Remove local here. It was a cut and paste error.
Sponsored by: Netflix
2017-12-08 21:59:42 +00:00
Warner Losh
ac20456c39 Build WITHOUT_FORTH too, at least for amd64 and i386
Sponsored by: Netflix
2017-12-08 19:57:21 +00:00
Warner Losh
1f99cce2b0 Just use the last line of the output from getting .OBJDIR. The
buildenv target prints other stuff too that needs to be ignored.

Sponsored by: Netflix
2017-12-04 16:38:20 +00:00
Warner Losh
02cfd60482 Remove the entire objdir tree to avoid picking up stale binaries from
prior builds. Move GELI to building first.

Sponsored by: Netflix
2017-12-04 01:14:17 +00:00
Dimitry Andric
d4419f6fa8 Upgrade our copies of clang, llvm, lldb and libc++ to r319231 from the
upstream release_50 branch.  This corresponds to 5.0.1 rc2.

MFC after:	2 weeks
2017-12-03 12:14:34 +00:00
Eitan Adler
efea29ab90 diag/httpd-error: remove
This is a script for a web server in a specific
configuration. Current web servers don't produce
similar log files and it isn't FreeBSD's
goal to produce a log file analyzer.
2017-12-02 17:10:13 +00:00
Dimitry Andric
b5ea630dfd Vendor import of clang release_50 branch r319231:
https://llvm.org/svn/llvm-project/cfe/branches/release_50@319231
2017-12-02 12:46:48 +00:00
Pedro F. Giffuni
64de3fdd58 SPDX: use the Beerware identifier. 2017-11-30 20:33:45 +00:00
Brad Davis
a812deb1f2 Fix handling -U. It does not take any arguments.
Approved by:	will
2017-11-27 02:28:40 +00:00
Pedro F. Giffuni
8a16b7a18f General further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 3-Clause license.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.
2017-11-20 19:49:47 +00:00
Pedro F. Giffuni
df57947f08 spdx: initial adoption of licensing ID tags.
The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.

Initially, only tag files that use BSD 4-Clause "Original" license.

RelNotes:	yes
Differential Revision:	https://reviews.freebsd.org/D13133
2017-11-18 14:26:50 +00:00
Hans Petter Selasky
ea4fe0b6a2 Improve the library dependencies helper script in src/tools.
Implement double pass of the relevant Makefiles. First make a list of
library names and directories and then scan for all the dependencies.
Spaces in directories in the source tree are not supported.

This avoids using hardcoded mappings between the library name
and the directory containing the library Makefile.

Add support for scanning contrib/ofed .

Bail out on any errors.

Sponsored by:	Mellanox Technologies
MFC after:	1 week
2017-11-16 15:26:39 +00:00
Warner Losh
ca987d4641 Move sys/boot to stand. Fix all references to new location
Sponsored by:	Netflix
2017-11-14 23:02:19 +00:00
Warner Losh
48f1a4921e Add two new tunables / sysctls to controll reboot after panic:
kern.poweroff_on_panic which, when enabled, instructs a system to
power off on a panic instead of a reboot.

kern.powercyle_on_panic which, when enabled, instructs a system to
power cycle, if possible, on a panic instead of a reboot.

Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D13042
2017-11-14 00:29:14 +00:00
Warner Losh
6a5a9a1976 Fix typo in filename.
Noticed by: Shawn Webb
2017-11-11 16:09:20 +00:00
Warner Losh
4728f534ff Move LOADER_{NO,}_GELI_SUPPORT to MK_LOADER_GELI
Transition to WITH/WITHOUT_LOADER_GELI to flag support or not of GELI
in the boot loaders. Add HAVE_GELI so components can flag they need
support (since it's too large to include everywhere). Add temporary
warnings for the old forms to ease transition.

Also, update test script to build without GELI on x86.

Sponsored by: Netflix
2017-11-10 23:54:48 +00:00
Warner Losh
a179cd9114 Replace LOADER_FIREWIRE_SUPPORT variable
Rename LOADER_FIREWIRE_SUPPORT to MK_LOADER_FIREWIRE. Only build
libfirewire when this is "yes". Add note to updating. Fix build script
to build this for x86 so the option doesn't decay. sparc64 supports
ZFS, so also build it MK_ZFS=no.

Sponsored by: Netflix
2017-11-10 23:54:41 +00:00
Bryan Drewery
5fead429eb Avoid referencing private lib names directly.
Sponsored by:	Dell EMC Isilon
2017-11-10 07:53:02 +00:00
Adrian Chadd
066b9ae54e [bsdbox] fix compilation due to library work. 2017-11-09 01:41:00 +00:00
Alexander Motin
898300ee11 s/NgSendMsgReply/NgSendReplyMsg/ in man to match the code.
Submitted by:	Dmitry Luhtionov <dmitryluhtionov@gmail.com>
MFC after:	2 weeks
2017-11-08 12:34:47 +00:00
Baptiste Daroussin
1278125629 Upgrade to Unicode 10.0.0 2017-11-03 13:42:04 +00:00
Baptiste Daroussin
15d06536f7 In preparation for update of cldr to version 32 and unicode to version 10
Add a character mapping for a missing character in ISO8859-2
2017-11-03 13:38:45 +00:00
Bryan Drewery
615a1e70b0 Enable AUTO_OBJ by default if the OBJDIR is writable, only for in-tree builds.
This can be disabled by putting WITHOUT_AUTO_OBJ=yes in /etc/src-env.conf, not
/etc/src.conf, or passing it in the environment.

The purpose of this rather than simply flipping the default of AUTO_OBJ to yes
is to avoid hassling users with auto.obj.mk failures if the wanted OBJDIR is
not writable. It will fallback to writing to the source directory like it does
today if MAKEOBJDIRPREFIX is not writable.

The act of enabling MK_AUTO_OBJ disables all 'make obj' treewalks since
previous work has made those not run if MK_AUTO_OBJ==yes in Makefile.inc1.

Relnotes:	yes
Reviewed by:	sjg
Discussed at:	https://lists.freebsd.org/pipermail/freebsd-arch/2016-May/017805.html
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D12841
2017-11-02 18:09:07 +00:00
Edward Tomasz Napierala
21330e2935 Remove artificial limit for -i.
Obtained from:	CheriBSD
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2017-11-02 12:16:50 +00:00
Edward Tomasz Napierala
91b060d04b Add benchmark for access(2).
Obtained from:	CheriBSD
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2017-11-02 12:16:11 +00:00
Edward Tomasz Napierala
e2828958cb Add bad_open benchmark, which measures failed opens by calling
open("", O_RDONLY);.

Obtained from:	CheriBSD
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2017-11-02 12:15:39 +00:00
Edward Tomasz Napierala
cf8ca06ad8 Add benchmark for getresuid(2) - three pointers, although only "output" ones,
and quite lightwait.

The purpose of this commit, and the previous one, is to be able to measure
overhead of pointer arguments - in case you're running a strange architecture
where pointers and integers are quite different things at the hardware level.

Obtained from:	CheriBSD
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2017-11-02 12:14:42 +00:00
Edward Tomasz Napierala
3f9bb5d3f2 Add select(2) benchmark. It takes four pointers; unfortunately it's
somewhat heavy.

Obtained from:	CheriBSD
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2017-11-02 12:13:02 +00:00
Edward Tomasz Napierala
8df1bd7956 Add getpriority(2) benchmark; it's a lightweight syscall which does pretty
much nothing - just like getuid(2) - but takes arguments.

Obtained from:	CheriBSD
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2017-11-02 12:12:18 +00:00
Edward Tomasz Napierala
3d21466535 Make syscall_timing(1) default to a temporary file when run without -p.
Obtained from:	CheriBSD
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2017-11-02 12:11:20 +00:00
Edward Tomasz Napierala
a250df51f7 Add fetchbench, a trivial HTTP benchmark based on fetch(1).
Obtained from:	CheriBSD
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2017-11-02 12:09:18 +00:00
Bryan Drewery
dfa099890c Add option UNIFIED_OBJDIR, on by default, which moves the default build OBJDIR.
This changes the build OBJDIR from the older style of /usr/obj/<srcdir> for
native builds, and /usr/obj/<target>.<target_arch>/<srcdir> for cross builds to
a new simpler format of /usr/obj/<srcdir>/<target>.<target_arch>.  This
new format is used regardless of cross or native build.  It allows
easier management of multiple source tree object directories.

The UNIFIED_OBJDIR option will be removed and its feature made permanent
for the 12.0 release.

Relnotes:	yes (don't note UNIFIED_OBJDIR option since it will be removed)
Prior work:	D3711 D874
Reviewed by:	gjb, sjg
Discussed at:	https://lists.freebsd.org/pipermail/freebsd-arch/2016-May/017805.html
Discussed with:	emaste
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D12840
2017-11-01 21:22:05 +00:00
Bryan Drewery
99980563da Use -j hw.ncpu for build/install.
MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
2017-10-31 19:26:07 +00:00
Bryan Drewery
177d707c0c makeman: Ensure MK_AUTO_OBJ is disabled in some lookups.
Sponsored by:	Dell EMC Isilon
2017-10-31 02:18:06 +00:00
Bryan Drewery
ea825d0274 DIRDEPS_BUILD: Update dependencies.
Sponsored by:	Dell EMC Isilon
2017-10-31 00:07:04 +00:00
Bryan Drewery
9a0c5c4c85 Fix native-xtools installion after r325082 and r325000 to be to /nxb-bin.
- r325082 split native-xtools-install out of native-xtools.
- r325000 incorrectly changed the installation path from /nxb-bin to /.

Discussed with:	imp at D12782
2017-10-30 18:54:27 +00:00
Warner Losh
36f1c58dc5 Fix parallel build issues and add MK_ZFS=no case
To ensure that I don't break the MK_ZFS=no case (currently working),
add that to the build, at least for i386 and amd64. Also, out of an
abundance of caution, clean single threaded, and then build in a
separate make. Otherwise, I hit a race where we build before objdir
has been created, which breaks at the moment.

Sponsored by: Netflix
2017-10-30 03:12:34 +00:00
Eitan Adler
a2aef24aa3 Update several more URLs
- Primarily http -> https
- Primarily FreeBSD project URLs
2017-10-29 08:17:03 +00:00
Bryan Drewery
e0dd694935 native-xtools: Override proper NXBDESTDIR.
The new native-xtools uses 'make toolchain' so overriding DESTDIR
as a make argument may interfere with WORLDTMP handling.
The target also does a 'mkdir -p ${NXBDESTDIR}/usr', so we should
be modifying that rather than DESTDIR.

Note this causes the native-xtools binaries to be installed in
NANO_WORLDDIR/usr NANO_WORLDDIR/bin rather than NANO_WORLDDIR/nxb-bin/usr
and NANO_WORLDDIR/nxb-bin/bin.  This was the case before this change
as well.

MFC after:	2 weeks
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D12782
2017-10-25 21:46:33 +00:00
Warner Losh
9bd6ac8da0 Do a chdir to SRCTOP/sys/boot before starting the run. This lets one
run this script from anywhere, but makes it only work on sys/boot.

Sponsored by: Netflix
2017-10-25 15:27:48 +00:00
Warner Losh
c02a64d8be Create a shell script to build sys/boot on all the architectures.
One could run this from any directory, but it's designed to do
regression testing on sys/boot (it only tests on a subset of
architectures since all of them would take a lot longer and not help).
This will also ensure that future commits to sys/boot compile
everywhere.

Sponsored by: Netflix
2017-10-22 22:52:23 +00:00
Brad Davis
1ff30c6af0 Teach beinstall to use and prefer svnlite, with a fallback to svn.
Approved by:	will
2017-10-18 15:48:26 +00:00
Baptiste Daroussin
578ec783ff Do not try to remove diff.7 optionaly has it is always removed
since GNU diff(1) has been replaced with BSD diff(1)
2017-10-11 14:41:11 +00:00
Ed Maste
00d78afd17 OptionalObsoleteFiles: remove diff from MK_GNU_DIFF=no block
diff (and man page) are not from GNU, as of r317209, and should not be
deleted if WITHOUT_GNU_DIFF is set. (WITHOUT_GNU_DIFF still controls
whether diff3 is built.)

Sponsored by:	The FreeBSD Foundation
2017-10-11 14:34:06 +00:00
Jeremie Le Hen
e415aa2846 Remove rcmds.
If they are still needed, you can find them in the net/bsdrcmds port.

This was proposed June, 20th and approved by various committers [1].
They have been marked as deprecated on CURRENT in r320644 [2] on July, 4th.
Both stable/11 and release/11.1 contain the deprecation notice (thanks to
allanjude@).

Note that ruptime(1)/rwho(1)/rwhod(8) were initially thought to be part of
rcmds but this was a mistake and those are therefore NOT removed.

[1] https://lists.freebsd.org/pipermail/freebsd-arch/2017-June/018239.html
[2] https://svnweb.freebsd.org/base?view=revision&revision=320644

Reviewed by:	bapt, brooks
Differential Revision:	https://reviews.freebsd.org/D12573
2017-10-06 08:43:14 +00:00
Gleb Smirnoff
119bdf3b3a Fix regression from r323855. The EXIT trap now isn't cleared, so upon
exit it tried to unmount already unmounted partition, resulting in failure.
2017-09-26 21:54:19 +00:00
Warner Losh
7d608e53e6 Fix packages with interactive post install scripts.
Tell pkg(8) we're running non-interactively so packages that with
interactive post install scripts don't hang.

Submitted by: Guido van Rooij
2017-09-24 14:22:36 +00:00
Warner Losh
07f2d905e6 Always create usr/local/etc -> /etc/local symlink
/usr/local/etc gets created and populated by packages. However, if no
packages are installed when setup_nanobsd is run, this symlink won't
get created, causing problems if packages are installed later (say on
first boot). Therefore, always create the symlink and etc/local. It
does no harm and may help.

Inspired by crochet issue #183 (consuingly says NanoBSD, means crochet)
Sponsored by: Netflix
2017-09-21 23:10:56 +00:00
Nick Hibma
657db16fce Remove an 'unused' function.
This function was only set in legacy.sh and only at the very end after
the disk image had been successfully created. The only difference will be
that the message 'Error encountered. Please check...' will not appear if
nanobsd.sh exits with an error after the disk image has been created.
2017-09-21 10:13:48 +00:00
Nick Hibma
7c1e70c8f9 Fix up style for consistency. 2017-09-21 09:27:44 +00:00
Nick Hibma
b391b675f7 Speling mistakes. 2017-09-21 09:22:41 +00:00
Ed Maste
4154e70ea8 Update OptionalObsoleteFiles.inc with NTP docs
The list of files for MK_NTP was incomplete.

PR:		218193
Submitted by:	brnrd
MFC after:	1 week
2017-09-15 00:54:37 +00:00
Gordon Tetlow
4572fb3faf Deorbit catman. The tradeoff of disk for performance has long since tipped
in favor of just rendering the manpage instead of relying on pre-formatted
catpages. Note, this does not impede the ability to use existing catpages,
it just removes the utility to generate them.

Reviewed by:	imp, allanjude
Approved by:	emaste (mentor)
Differential Revision:	https://reviews.freebsd.org/D12317
2017-09-13 16:35:16 +00:00
Nick Hibma
1f7000f77a Bugfix: Don't treat NANO_IMAGES as a direcotory.
This was probably accidentally broken in r295377 .

Submitted by:	Igor Serikov
MFC after:	2 weeks
2017-09-05 21:17:20 +00:00
Gleb Smirnoff
a4658c801e Add a test case for a connection on accept queue that is reset before
it is accepted.  In that case accept(2) shall return ECONNABORTED.
Accept filters provide help with easily replicating that case.
2017-08-24 20:52:02 +00:00
Dimitry Andric
15c5c77fa0 Vendor import of llvm release_50 branch r311219:
https://llvm.org/svn/llvm-project/llvm/branches/release_50@311219
2017-08-20 21:02:43 +00:00
Ed Maste
63cd05d97a remove debug files in delete-old* when WITHOUT_DEBUG_FILES
Reported by:	brd
Reviewed by:	bdrewery, brd
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D12044
2017-08-16 17:22:42 +00:00
Enji Cooper
38f8fddf05 Add limited sandbox capability to "make check"
== Rationale ==

r295380 introduced "make check" and consolidated means for running
test code in an attempt to simplify running tests. One could either
install files/libraries/programs and run "make check", or run "make check"
with an explicit CHECKDIR, e.g., `make check CHECKDIR=$(make -V.OBJDIR)``.

One criticism that was received is that "make check" should be run with
the intent of making dev->test->commit easier, which means that the target
audience's workflow should be developers. One developer pattern available
in other opensource projects is to run test code from a developer sandbox,
instead of installing to a system.

== Method ==

This approach is slightly different from the standard approach, in the sense
that it builds and installs into a deterministic directory under .OBJDIR (as I call it,
the "sandbox"), then runs "make check" against that. In the event the test
run is successful, the deterministic directory is removed to save space.

== Approach ==

bsd.lib.mk, bsd.prog.mk:

To support this functionality, a new variable `HAS_TESTS` is being added.

HAS_TESTS enables appropriate behavior with bsd.lib.mk and bsd.prog.mk, as
follows:
- Add "make check" as an available target from the directory.
- Pass down appropriate variables via ${TESTS_ENV}, i.e.,
  ${TESTS_LD_LIBRARY_PATH} and ${TESTS_PATH}.

One should add "HAS_TESTS" to directories containing tests in them, e.g. from
bin/sh/Makefile,

  HAS_TESTS=
  SUBDIR.${MK_TESTS}+= tests

HAS_TESTS doesn't automatically add the tests subdirectory for flexibility
reasons.

bsd.opts.mk, src.opts.mk:
- The knob ${MK_MAKE_CHECK_USE_SANDBOX} has been added, both to explicitly
  direct (internally) when to set a deterministic ${DESTDIR} and to also allow
  users to disable this behavior globally, i.e., via src.conf.
- MK_TESTS has been promoted from src.opts.mk to bsd.opts.mk to leverage
  syntactic sugar for having MK_TESTS be a dependency for
  MK_MAKE_CHECK_USE_SANDBOX, but to also ensure that src.opts.mk isn't required
  to use suite.test.mk (which is a dependency of bsd.test.mk).

suite.test.mk:
- beforecheck behavior (when MK_MAKE_CHECK_USE_SANDBOX is enabled) is modified
  from a no-op to:
-- Build.
-- Run "make hierarchy" on the sandbox dir.
-- Install the tests/files to the sandbox dir.
- aftercheck behavior (when MK_MAKE_CHECK_USE_SANDBOX is enabled) is modified
  from a no-op to:
-- Remove the sandbox dir.

Again, because the dependency order set in bsd.test.mk is
beforecheck -> check -> aftercheck, "make check" will not be run unless
"beforecheck" completes successfully, and "aftercheck" will not be run unless
"beforecheck" and "check" complete successfully.

== Caveats ==

- This target must either be run with MK_INSTALL_AS_USER or as root. Otherwise
  it will fail when running "make install" as the default user/group for many
  makefiles when calling INSTALL is root/wheel.
- This target must be run from a suitable top-level directory. For example,
  running tests from `tests/sys/fs/tmpfs` won't work, but `tests/sys/fs` will,
  because `tests/sys/fs/tmpfs` relies on files installed by `tests/sys/fs`.
- Running MK_INSTALL_AS_USER may introduce determinism issues. However, using
  it could identify deficiences in tests in terms of needing to be run as
  root, which are not properly articulated in the test requirements.
- The doesn't negate the need for running "make installworld" and
  "make checkworld", etc. Again, this just is intended to simplify the
  dev->test->commit workflow.

== Cleanup done ==
- CHECKDIR is removed; one can use "MK_MAKE_CHECK_USE_SANDBOX=no" to enable
  "legacy" (r295380) behavior.

MFC after:	2 months
Relnotes:	yes (CHECKDIR removed; "make check" behavior changed)
Requested by:	jhb
Reviewed by:	arch (silence), testing (silence)
Differential Revision:	D11905
2017-08-14 19:03:05 +00:00
Jeremie Le Hen
ac0ced90e0 rwho/ruptime/rwhod shouldn't be gated by RCMDS.
As peter@ points out in pr/220953:
"rwho, rwhod and ruptime are not part of the remote login suite (rsh, rlogin
etc).

They should *not* be in the rcmds package which is disabled by default.  We
rely on rwho/rwhod/ruptime in the freebsd.org cluster."

This commit is a re-commit of r322029 and r322031 with a better commit log, as
pointed out by ngie@.

This also includes the necesary changes to OptionalObsoleteFiles.inc, as
requested by jhb@.

PR:		220953
Reported by:	peter@, jhb@
Differential Revision:	https://reviews.freebsd.org/D11743
2017-08-08 20:17:07 +00:00
Andriy Gapon
5d1186a4ed zfsboottest: catch up with r316585 and provide ldi_get_size method
This method is required for querying file / disk sizes which is needed
at least for finding all copies of ZFS VDEV labels.

Reported by:	ngie
MFC after:	1 week
2017-08-01 11:09:18 +00:00
Enji Cooper
6755788d98 Fix up r321849
pager_output should return 0 if no more output needs to be paged; non-zero
otherwise.

MFC after:	1 week
MFC with:	r321849
Reported by:	avg
2017-08-01 06:51:03 +00:00
Enji Cooper
d125609b7a Makefile cleanup
- Standardize on SRCTOP instead of .CURDIR-relative paths
- Use LIBADD instead of a mix of specifying -lgeom via DPADD/LDADD/LDFLAGS.
  Specifying -lgeom via LDFLAGS is an especially unnecessary and odd
  pattern.

MFC after:	1 week
2017-08-01 05:34:04 +00:00
Enji Cooper
7e299eacab Fix the return type for pager_output(..) in bootparttest and zfsboottest
pager_output(..) has always returned int. For some reason (probably the
clang 5.0 update), this mismatch now results in an error with CC=clang.

MFC after:	1 week
2017-08-01 05:29:36 +00:00
Enji Cooper
d96899bad0 Chase r315408 with the fourth parameter being removed from disk_open(..)
This fixes one part of the build.
2017-08-01 05:26:45 +00:00
Enji Cooper
405873f16d Standardize on SRCTOP instead of .CURDIR-relative paths
MFC after:	3 days
2017-08-01 05:23:49 +00:00
Adrian Chadd
495842b117 [wlanwds] allow for a DWDS AP VAP to be not be the first VAP on a NIC.
The wlanwds code was just creating a clone VAP without specifying the MAC
address to use for said clone VAP.  This meant that if an interface
was cloned from an AP interface that wasn't the first created VAP
(which shares the same MAC as the parent physical interface by default)
then the cloned interface would have the wrong MAC and traffic wouldn't work.

Besides chip bugs (ha!) this isn't a requirement.

So, teach wlanwds to:

* look up the link layer address for a given interface (which really should
  be a library interface, and will likely quickly become one);
* use this when creating a cloned interface for a DWDS peer;
* (net80211 already has the infrastructure to do this, it just needed to be
  used);
* add some extra logging to see what MAC addresses, parent interfaces, etc
  are being created.

Whilst here, add a reminder that I should extend this to include monitoring
a specific VAP for DWDS updates rather than just the parent interface.

This is the first step in allowing for multiple DWDS hops, which is a
pre-requisite for adrian's house having wifi in the single upstairs room.

Tested:

* AR9380, DWDS AP + AP mode - with DWDS AP being the second VAP created
  with a different MAC address;
* AR9331 (Carambola2), AP + DWDS STA;
* passing traffic

TODO:

* fix 802.11s so this DWDS stuff is no longer required!
2017-07-31 17:33:57 +00:00
Dimitry Andric
104a02fb6c Vendor import of clang release_50 branch r309439:
https://llvm.org/svn/llvm-project/cfe/branches/release_50@309439
2017-07-29 21:28:13 +00:00
Warner Losh
df6c7936fa Allow _.disk.image to be specified.
Submitted by: ask at develooper dot com (reworked to new structure)
PR: 199191
Sponsored by: Netflix
MFC After: 3 days
2017-07-28 02:00:03 +00:00
Warner Losh
9c3163dca4 Ensure that ordinary files that happen to start with .git, .hg and
.cvs into the image.

This makes .gitignore files in the working tree appear in the final
tree...

PR: 192178
Submitted by: Jason Unovitch
Sponsored by: Netflix
MFC After: 3 days
2017-07-28 01:59:58 +00:00
Warner Losh
fca4113109 Properly expand shell glob characters in NANO_PACKAGE_LIST.
The defualt NANO_PACKAGE_LIST is *, which fails to work
properly. Expand glob characters and make sure that we install the
special pkg package first.

Sponsored by: Netflix
Submitted by: wout at canodus dot be
PR: 219405
MFC After: 3 days
2017-07-28 01:59:53 +00:00
Dimitry Andric
a884e64959 Vendor import of lldb trunk r308421:
https://llvm.org/svn/llvm-project/lldb/trunk@308421
2017-07-19 07:03:07 +00:00
Dimitry Andric
de51d67148 Vendor import of clang trunk r308421:
https://llvm.org/svn/llvm-project/cfe/trunk@308421
2017-07-19 07:02:30 +00:00
Dimitry Andric
93c91e39b2 Vendor import of llvm trunk r308421:
https://llvm.org/svn/llvm-project/llvm/trunk@308421
2017-07-19 07:02:10 +00:00
Dimitry Andric
d2043ca373 Merge ^/head r320573 through r320970. 2017-07-13 22:01:38 +00:00
Dimitry Andric
e75e363cb7 Vendor import of lldb trunk r307894:
https://llvm.org/svn/llvm-project/lldb/trunk@307894
2017-07-13 19:26:17 +00:00
Dimitry Andric
8746d127c0 Vendor import of clang trunk r307894:
https://llvm.org/svn/llvm-project/cfe/trunk@307894
2017-07-13 19:25:38 +00:00
Dimitry Andric
ca089b24d4 Vendor import of llvm trunk r307894:
https://llvm.org/svn/llvm-project/llvm/trunk@307894
2017-07-13 19:25:18 +00:00
Enji Cooper
92d1d8a571 Add WITH_RCMDS for parity with WITHOUT_RCMDS 2017-07-06 05:40:51 +00:00
Enji Cooper
c5cba06079 Formalize LEAPSECONDS and OLDTIMEZONES in share/zoneinfo/... as
`MK_ZONEINFO_LEAPSECONDS_SUPPORT == yes` and
`MK_ZONEINFO_OLD_TIMEZONES_SUPPORT == yes`.

Keep `LEAPSECONDS` and `OLDTIMEZONES` for backwards compatibility,
but print out a warning notifying users that they should use the new
variables, in an effort to migrate them to the variables. This is being
done mostly for automated build tools, etc, that might rely on these
variables being set. The variables will be removed in the future on
^/head, e.g., after ^/stable/12 is cut.

MFC after:      1 month
Relnotes:       yes
Reviewed by:	bdrewery
Differential Revision:	D11376
2017-07-06 04:19:33 +00:00
Dimitry Andric
1b306c26ad Vendor import of lldb trunk r306956:
https://llvm.org/svn/llvm-project/lldb/trunk@306956
2017-07-01 13:24:58 +00:00
Dimitry Andric
cf1b401909 Vendor import of clang trunk r306956:
https://llvm.org/svn/llvm-project/cfe/trunk@306956
2017-07-01 13:24:05 +00:00
Dimitry Andric
9df3605dea Vendor import of llvm trunk r306956:
https://llvm.org/svn/llvm-project/llvm/trunk@306956
2017-07-01 13:22:02 +00:00
Dimitry Andric
ef915aab0a Vendor import of clang trunk r306325:
https://llvm.org/svn/llvm-project/cfe/trunk@306325
2017-06-26 20:33:12 +00:00
Dimitry Andric
08bbd35a80 Vendor import of llvm trunk r306325:
https://llvm.org/svn/llvm-project/llvm/trunk@306325
2017-06-26 20:32:52 +00:00
Dimitry Andric
4198293b25 Merge ^/head r319801 through r320041. 2017-06-17 00:14:54 +00:00
Dimitry Andric
325377b573 Vendor import of clang trunk r305575:
https://llvm.org/svn/llvm-project/cfe/trunk@305575
2017-06-16 21:03:44 +00:00
Dimitry Andric
7c7aba6e5f Vendor import of llvm trunk r305575:
https://llvm.org/svn/llvm-project/llvm/trunk@305575
2017-06-16 21:03:24 +00:00
Konstantin Belousov
965ee74955 Update scescx test to print syscall number and arguments.
Sponsored by:	The FreeBSD Foundation
MFC after:	3 weeks
2017-06-12 21:16:37 +00:00
Konstantin Belousov
b275edf753 Decode recently added flags.
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2017-06-12 20:42:16 +00:00
Enji Cooper
22184bfa63 Improve handling with system state
- Always unlink $cmd after exit via END block.
- The tests don't function well if kern.geom.debugflags != 0. Save debugflags,
  then restore them at the end of the test.

MFC after:	1 month
Sponsored by:	Dell EMC Isilon
2017-06-10 20:56:31 +00:00
Dimitry Andric
951355860c Merge ^/head r319779 through r319800. 2017-06-10 20:23:49 +00:00
Enji Cooper
e15b2a7854 Don't explicitly get the class to PART in gctl_test_helper.c
This will allow the tool to be used with arbitrary geom(4) classes, like GEOM.

Specify class=PART explicitly in the tester to keep existing behavior.

MFC after:	1 month
Sponsored by:	Dell EMC Isilon
2017-06-10 19:48:45 +00:00
Dimitry Andric
db17bf38c5 Merge llvm, clang, lld, lldb, compiler-rt and libc++ r305145, and update
build glue.
2017-06-10 19:17:14 +00:00
Dimitry Andric
f1d04915a6 Vendor import of lldb trunk r305145:
https://llvm.org/svn/llvm-project/lldb/trunk@305145
2017-06-10 13:44:58 +00:00
Dimitry Andric
1b08b196ac Vendor import of clang trunk r305145:
https://llvm.org/svn/llvm-project/cfe/trunk@305145
2017-06-10 13:44:22 +00:00
Dimitry Andric
7ab83427af Vendor import of llvm trunk r305145:
https://llvm.org/svn/llvm-project/llvm/trunk@305145
2017-06-10 13:44:06 +00:00
Dimitry Andric
686fb94a00 Merge ^/head r319548 through r319778. 2017-06-10 13:22:49 +00:00
Gleb Smirnoff
62b2dd31af Make the test to leave one connection on the incomplete queue
before exiting.  This examines some race conditions in kernel.
2017-06-08 06:13:53 +00:00
Gleb Smirnoff
f7ff0c669e Improve this unit test: make sure that the accept filter actually works.
Before this test just checked scenario of setting and removing the accept
filter at different states of the socket.  Now it also checks that accept
filter works: we connect to the server, and then check that we can't accept,
then we send 1 byte of data and check again.
2017-06-08 05:12:11 +00:00
Baptiste Daroussin
57989d92a4 Remove some workaround for an option that does not exists anymore. 2017-06-07 23:42:37 +00:00
Baptiste Daroussin
174b3709c8 Finish removal of groff 2017-06-07 23:26:28 +00:00
Baptiste Daroussin
738919c039 Remove groff from base
All manpages in base are now compatible with mandoc(1), all roff documentation
will be relocated in the doc tree. man(1) can now use groff from the ports tree
if it needs.

Also remove checknr(1) and colcrt(1) which are only useful with groff.

Approved by:	(no objections on the mailing lists)
2017-06-07 23:00:34 +00:00
Bryan Drewery
f5e96ed673 vm.defer_swapspace_pageouts was removed in r308474.
Reported by:	pstef
2017-06-07 19:42:17 +00:00
Dimitry Andric
d288ef4c17 Vendor import of llvm trunk r304659:
https://llvm.org/svn/llvm-project/llvm/trunk@304659
2017-06-03 15:20:36 +00:00
Dimitry Andric
4224465e82 Merge ^/head r319251 through r319479. 2017-06-01 22:59:41 +00:00
Dimitry Andric
f9448bf33f Merge llvm, clang, lld, lldb, compiler-rt and libc++ r304460, and update
build glue.
2017-06-01 22:47:02 +00:00
John Baldwin
f1a35c16b3 Fix some new errors and a warning in cryptotest.
- Use a new 'char *key' to allocate storage for keys and assign the
  pointer to the session2_op 'const char *' members after the key is
  initialized.
- Mark the 'find' variable used in crfind() static so that crfind()
  doesn't return a pointer to stack garbage.

Reported by:	olivier (1)
MFC after:	2 weeks
Sponsored by:	Chelsio Communications
2017-06-01 21:07:32 +00:00
Dimitry Andric
aaf9a7aadf Vendor import of lldb trunk r304460:
https://llvm.org/svn/llvm-project/lldb/trunk@304460
2017-06-01 20:59:29 +00:00
Dimitry Andric
f382538d47 Vendor import of llvm trunk r304460:
https://llvm.org/svn/llvm-project/llvm/trunk@304460
2017-06-01 20:58:36 +00:00
Dimitry Andric
d96d268487 Merge ^/head r319165 through r319250. 2017-05-30 19:31:02 +00:00
Enji Cooper
714d5fbcef Use .Xr to reference libblacklist(3), blacklistctl(8), and blacklistd(8)
MFC after:	now
Sponsored by:	Dell EMC Isilon
2017-05-30 18:03:34 +00:00
Dimitry Andric
550ae89a71 Vendor import of clang trunk r304222:
https://llvm.org/svn/llvm-project/cfe/trunk@304222
2017-05-30 17:37:44 +00:00
Dimitry Andric
ee2f195dd3 Vendor import of llvm trunk r304222:
https://llvm.org/svn/llvm-project/llvm/trunk@304222
2017-05-30 17:37:31 +00:00
Dimitry Andric
a773cead9f Merge ^/head r318964 through r319164. 2017-05-29 22:25:33 +00:00
Dimitry Andric
b5aee35cc5 Vendor import of clang trunk r304149:
https://llvm.org/svn/llvm-project/cfe/trunk@304149
2017-05-29 16:25:46 +00:00
Dimitry Andric
ab44ce3d59 Vendor import of llvm trunk r304149:
https://llvm.org/svn/llvm-project/llvm/trunk@304149
2017-05-29 16:25:25 +00:00
Enji Cooper
73dcfb8ddc Use calloc instead of malloc + memset
MFC after:	3 days
Sponsored by:	Dell EMC Isilon
2017-05-27 23:57:09 +00:00
Dimitry Andric
d02c951f8e Merge ^/head r318658 through r318963. 2017-05-26 19:11:24 +00:00
Poul-Henning Kamp
fd8245d704 Try to keep up with the ports system Makefiles. 2017-05-25 21:59:19 +00:00
Baptiste Daroussin
cdc3795316 In preparation for the removal of the roff toolchain, disconnect the
roff documentation from the build.

Those documents will be added to the doc tree and distributed as PDF from
the documentation website. As they are valuable has history, but do not match
current FreeBSD

Further more, the ascii format we were using to distribute them is not really
accurate for such documents.

more details:
https://lists.freebsd.org/pipermail/freebsd-arch/2017-May/018211.html
2017-05-25 14:54:22 +00:00
Glen Barber
583b5f3561 Honor WITHOUT_TFTP for check-old* and delete-old* targets.
Submitted by:	philippe dot michel7 at sfr dot fr
PR:		217949
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2017-05-23 15:46:21 +00:00
Dimitry Andric
aa803409c3 Vendor import of clang trunk r303571:
https://llvm.org/svn/llvm-project/cfe/trunk@303571
2017-05-22 19:43:45 +00:00
Dimitry Andric
b5630dbadf Vendor import of llvm trunk r303571:
https://llvm.org/svn/llvm-project/llvm/trunk@303571
2017-05-22 19:43:28 +00:00
Dimitry Andric
27c240688c Merge ^/head r318560 through r318657. 2017-05-22 19:28:24 +00:00
Dimitry Andric
6930ca7463 Add libc++experimental.a for std::experimental support
This adds a separate library for supporting std::experimental features.
It is purposefully static, and must be explicitly linked into programs
using -lc++experimental.

PLEASE NOTE: there is NO WARRANTY as to any stability or continuing
existence of the features in the std::experimental parts of the C++
library!

Reviewed by:	ed
Differential Revision: https://reviews.freebsd.org/D10840
2017-05-21 17:07:12 +00:00
Dimitry Andric
7af96fb3af Vendor import of llvm trunk r303291:
https://llvm.org/svn/llvm-project/llvm/trunk@303291
2017-05-17 20:22:39 +00:00
Dimitry Andric
209be20560 Merge ^/head r317971 through r318379. 2017-05-16 19:54:47 +00:00
Dimitry Andric
b76161e41b Vendor import of lldb trunk r303197:
https://llvm.org/svn/llvm-project/lldb/trunk@303197
2017-05-16 19:47:58 +00:00
Dimitry Andric
2410013d93 Vendor import of clang trunk r303197:
https://llvm.org/svn/llvm-project/cfe/trunk@303197
2017-05-16 19:47:09 +00:00
Dimitry Andric
6b3f41ed88 Vendor import of llvm trunk r303197:
https://llvm.org/svn/llvm-project/llvm/trunk@303197
2017-05-16 19:46:52 +00:00
Ed Maste
0af1da97ee makeman: reword description, based on feedback from wblock 2017-05-15 18:02:13 +00:00
Enji Cooper
e5c4c8aa7f Handle the logfiles in newsyslog and syslogd conditionally, based on
src.conf(5) knobs

This will allow consumers of FreeBSD to use the unmodified configuration
files out of the box more than previously.

Both newsyslog.conf and syslog.conf:
- /var/log/lpd-errs (MK_LPR != no)
- /var/log/ppp.log (MK_PPP != no)
- /var/log/xferlog (MK_FTP != no)

newsyslog.conf:
- /var/log/amd.log (MK_AMD != no)
- /var/log/pflog (MK_PF != no)
- /var/log/sendmail.st (MK_SENDMAIL != no)

MFC after:      3 weeks
Sponsored by:   Dell EMC Isilon
2017-05-13 03:10:50 +00:00
Enji Cooper
2cb572a090 Unconditionally install udp(4) and udplite(4) again
I added this to the MK_USB != no block in error in r278202.

MFC after:	3 weeks
Sponsored by:	Dell EMC Isilon
2017-05-11 06:57:20 +00:00
Dimitry Andric
50f2b14e11 Update OptionalObsoleteFiles.inc for r318103. 2017-05-09 20:14:58 +00:00
Dimitry Andric
c46e6a5940 Vendor import of llvm trunk r302418:
https://llvm.org/svn/llvm-project/llvm/trunk@302418
2017-05-08 17:12:57 +00:00
Dimitry Andric
be27b31162 Merge ^/head r317503 through r317807. 2017-05-04 21:30:26 +00:00
Dimitry Andric
f0c0337bbf Vendor import of clang trunk r302069:
https://llvm.org/svn/llvm-project/cfe/trunk@302069
2017-05-03 20:26:23 +00:00
Dimitry Andric
148779df30 Vendor import of llvm trunk r302069:
https://llvm.org/svn/llvm-project/llvm/trunk@302069
2017-05-03 20:26:11 +00:00
Adrian Chadd
75a790cc57 [net80211] add another hard-learnt lesson about DWDS setup
wlanwds monitors the physical interface for DWDS requests from VAPs,
but the clone is created against the physical interface.  So, if you
have a secondary VAP setup (with a separate, non-physical-default MAC
address) which is configured for DWDS, the temporary DWDS VAPs created
will have the MAC of the parent physical interface and NOT the
actual cloned interface + MAC.

This .. stumped me for a few minutes.

Maybe I'll fix it.  Maybe I won't.  At least I now have DWDS+encryption
working at home.

Tested:

* yes, with DWDS 11n repeaters now working on freebsd.
2017-05-03 07:53:15 +00:00
Dimitry Andric
773dd0e6e6 Vendor import of lldb trunk r301939:
https://llvm.org/svn/llvm-project/lldb/trunk@301939
2017-05-02 18:31:19 +00:00
Dimitry Andric
570918821a Vendor import of clang trunk r301939:
https://llvm.org/svn/llvm-project/cfe/trunk@301939
2017-05-02 18:30:45 +00:00
Dimitry Andric
a303c417bb Vendor import of llvm trunk r301939:
https://llvm.org/svn/llvm-project/llvm/trunk@301939
2017-05-02 18:30:13 +00:00
Dimitry Andric
af3f36025b Merge ^/head r317281 through r317502. 2017-04-27 12:59:14 +00:00
Dimitry Andric
12f3ca4cdb Vendor import of llvm trunk r301441:
https://llvm.org/svn/llvm-project/llvm/trunk@301441
2017-04-26 19:45:00 +00:00
Dimitry Andric
5060b64b7d Vendor import of lldb trunk r301441:
https://llvm.org/svn/llvm-project/lldb/trunk@301441
2017-04-26 19:24:53 +00:00
Dimitry Andric
f0c55418e2 Vendor import of clang trunk r301441:
https://llvm.org/svn/llvm-project/cfe/trunk@301441
2017-04-26 19:24:09 +00:00
Gleb Smirnoff
36b6ce0784 Fix build of tools/tools/umastat.
PR:		218887
Submitted by:	Fabian Keil <fk fabiankeil.de>
Obtained from:	ElectroBSD
2017-04-26 17:58:10 +00:00
Adrian Chadd
9673a6bb13 [net80211] [wlanwds] allow logging to stderr as well as syslog.
By default this logs to syslog only, not stderr.  It makes it difficult
to debug exactly what's going on.  So allow '-e' to log to stderr so I
have a chance of actually debugging wlanwds /dynamic WDS (DWDS) issues.
2017-04-26 01:08:25 +00:00
Adrian Chadd
773404ba35 [net80211] document having to enable privacy on the dynamic plumbed VAPs. 2017-04-26 00:07:51 +00:00
Brooks Davis
b4e2ab78df Remove NATM configuration bits and assorted NATM and ATM remnants.
Reported by:	ak
Reviewed by:	ngie (first version)
Differential Revision:	https://reviews.freebsd.org/D10497
2017-04-25 21:59:34 +00:00
John Baldwin
73ad3fb536 Add a new GDB_LIBEXEC option to install gdb and kgdb to /usr/libexec.
When this option is enabled, only gdb and kgdb are installed to
/usr/libexec for use by crashinfo(8). Other bits of GDB such as
gdbserver and gdbtui are not installed. For this option to be
effective, GDB must be enabled.

Rework r317094 to re-enable GDB on all platforms but enable
GDB_LIBEXEC on platforms for which the GDB in ports is a superset of
functionality.

Reviewed by:	emaste, kib
Suggested by:	kib
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D10449
2017-04-25 18:08:56 +00:00
Glen Barber
b3ac6549ca Remove an incorrect MLINK for tree(3) introduced in r310728.
Reported by:	many
PR:		216476
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2017-04-25 18:07:48 +00:00
John Baldwin
12ea3078d0 Remove info files from optional old files.
Info files are now all removed unconditionally after the removal of
texinfo.

MFC after:	1 week
2017-04-25 17:46:44 +00:00
Enji Cooper
67b1f73f1e gctl_test.t: catch errors with the mdcfg directive
While here, add a note about certain testcases relying on `count=1024` in
the "create" portion.

MFC after:	5 weeks
Sponsored by:	Dell EMC Isilon
2017-04-23 02:30:06 +00:00
Enji Cooper
d1f57d5900 gctl_test.t: improve error reporting with mdcfg and mount directives
If the commands had failed previously, it would press on and result in a
series of cascading failures. Fail early and continue on to the next case
instead of executing additional commands after a previously failed series
of steps.

MFC after:      5 weeks
Sponsored by:   Dell EMC Isilon
2017-04-22 23:30:02 +00:00
Enji Cooper
9940eaaa17 gctl_test.t: more tweaks to try and update the code and get it functional (again?)
- Make the logfile for $out be built off the basename for $cmd, instead of $cmd.
  (r317292 broke this assumption).
- Rename $mntpt to $mntpt_prefix for clarity, as this variable is a prefix for
  mountpoints.
- Reindent the umount directive block while here to match the rest of the code.

MFC after:	5 weeks
Sponsored by:	Dell EMC Isilon
2017-04-22 23:27:40 +00:00
Enji Cooper
414bf3a177 Use verb=delete not verb=remove
The `remove` verb hasn't been present in geom_part*(4) for well
over a decade, if ever. I couldn't find any references to it in
^/stable/5 at least, which is around the timeframe that this test
was written.

MFC after:	5 weeks
Sponsored by:	Dell EMC Isilon
2017-04-22 23:06:53 +00:00
Enji Cooper
acca703a09 gctl_test.t: minor tweaks
- Declare $count with the `my` scope operator to permit `use strict`.
- Add `use strict`.
- Use `use warnings` instead of using `-w` in the shebang.
- Don't unlink $cmd when done (prevents unnecessary rebuilding).
- Improve the error message when running with insufficient permissions, e.g.,
  non-root.

MFC after:	5 weeks
Sponsored by:	Dell EMC Isilon
2017-04-22 22:40:39 +00:00
Enji Cooper
29924a1c12 gctl_test_helper: add diagnostic output for parse_retval(..)
This will help end-users better diagnose issues with the function.

MFC after:	5 weeks
Sponsored by:	Dell EMC Isilon
2017-04-22 22:34:45 +00:00
Enji Cooper
d55eb4ff7e The GPT class no longer exists; use the PART class instead
MFC after:	5 weeks
Sponsored by:	Dell EMC Isilon
2017-04-22 20:51:54 +00:00
Enji Cooper
cb7cf35ee9 Bump WARNS to 6 per previous commits which fixed warnings
MFC after:	5 weeks
Tested with:	clang (4.0), gcc (4.2.1, 6.3.0)
Sponsored by:	Dell EMC Isilon
2017-04-22 20:29:56 +00:00
Enji Cooper
e1915a5901 gctl_test_helper: apply polish
- Staticize variables to fix warnings.
- Sprinkle asserts around for calls that can fail
- Apply style(9) for main(..) definition.
- ANSIify usage(..) definition.

MFC after:	5 weeks
Sponsored by:	Dell EMC Isilon
2017-04-22 20:27:46 +00:00
Enji Cooper
b58910a05f gctl_test.t: use make to compile gctl_test_helper instead of calling cc directly
MFC after:	5 weeks
Sponsored by:	Dell EMC Isilon
2017-04-22 20:15:47 +00:00
Enji Cooper
e02a067a1a Rename gctl.t to gctl_test.t and test.c to gctl_test_helper.c
This is being done to reduce ambiguity and to make the tests more portable
in the future to other locations in the source tree.

MFC after:	5 weeks
Sponsored by:	Dell EMC Isilon
2017-04-22 20:06:11 +00:00
Enji Cooper
b87e84c58a Fix -Wimplicit-function-declaration compilation warning by moving libgeom.h
#include below the stdio.h #include.

gctl_dump(3) needs stdio.h, per reasoning noted in r317289.

MFC after:	5 weeks
PR:		218809
Submitted by:	Chang-Hsien Tsai <luke.tw@gmail.com>
Sponsored by:	Dell EMC Isilon
2017-04-22 20:00:52 +00:00
Dimitry Andric
d0338a294d Merge ^/head r317216 through r317280. 2017-04-22 11:30:07 +00:00
Ed Maste
e9e768f7e3 bsdgrep: disable GNU_GREP_COMPAT by default
The GNU extension bits in the base system are old, no longer faithful
to upstream, and surprising in some regards. Switch to documenting
WITH_GNU_GREP_COMPAT and default GNU_GREP_COMPAT to OFF in the name of
good behavior.

According to http://www.regular-expressions.info, GNU extensions:

-  Add missing quantifiers to BREs: \?, \+

-  Add branching to BREs: \|

-  Add backreferences (\1 through \9) to EREs

-  Add \w, \W, \s, and \S corresponding to :alnum:, [^[:alnum:]],
   :space:, and [^[:space:]] respectively

-  Add word boundaries and anchors:
   \b: word boundary
   \B: not word boundary
   \<: Strt of word
   \>: End of word
   \`: Start of subject string
    \': End of subject string

These extensions are still available in /usr/bin/grep by default today,
as it is still GNU grep.  As part of the bsdgrep migration plan these
extensions may be added to bsdgrep's regex support if necessary.

Submitted by:	Kyle Evans <kevans91 at ksu.edu>
Reviewed by:	cem
Differential Revision:	https://reviews.freebsd.org/D10114
2017-04-21 14:50:29 +00:00
Ed Maste
3f39ffc893 bsdgrep: add BSD_GREP_FASTMATCH knob for built-in fastmatch
Bugs have been found in the fastmatch implementation as used in bsdgrep.
Some have been fixed (r316495) while fixes for others are in review
(D10098).

In comparison with the fastmatch implementation, Kyle Evans found that:

- regex(3)'s performance with literal expressions offers a speed
  improvement over fastmatch

- regex(3)'s performance, both with simple BREs and EREs, seems to be
  comparable

The regex implementation was imported in r226035, and the commit message
reports:

    This is a temporary solution until the whole regex library is
    not replaced so that BSD grep development can continue and the
    backported code gets some review and testing. This change only
    improves scalability slightly, there is no big performance boost
    yet but several minor bugs have been found and fixed.

Introduce a WITH_/WITHOUT_BSD_GREP_FASTMATCH knob to support testing
of both approaches.

PR:		175314, 194823
Submitted by:	Kyle Evans <kevans91 at ksu.edu>
Reviewed by:	bdrewery (in part)
Differential Revision:	https://reviews.freebsd.org/D10282
2017-04-21 14:36:09 +00:00
Dimitry Andric
583e75cce4 Vendor import of clang trunk r300890:
https://llvm.org/svn/llvm-project/cfe/trunk@300890
2017-04-20 21:20:51 +00:00
Dimitry Andric
d99dafe2e4 Vendor import of llvm trunk r300890:
https://llvm.org/svn/llvm-project/llvm/trunk@300890
2017-04-20 21:19:10 +00:00
Dimitry Andric
554491ffbd Merge ^/head r316992 through r317215. 2017-04-20 21:04:21 +00:00
Baptiste Daroussin
50502545ce Readd Big5: some large databases setup are still requiring it.
Reported by:	"張君天(Chun-Tien Chang)" <tcs@kitty.2y.idv.tw>
2017-04-20 18:21:50 +00:00
Enji Cooper
863d0264b1 Clean up WITH*_PROFILE
- Clarify that profiled libraries are usable with gprof(8).
- Add WITH_PROFILE to complement WITHOUT_PROFILE and placate makeman.

MFC after:	7 weeks
Sponsored by:	Dell EMC Isilon
2017-04-20 03:36:09 +00:00
Enji Cooper
bcdf1a2d4e Add WITH_GROFF to complement WITHOUT_GROFF and placate complaints from makeman
MFC after:	7 weeks
Sponsored by:	Dell EMC Isilon
2017-04-20 03:32:30 +00:00
Enji Cooper
609b7b269d Add a knob, WITH*_RPCBIND_WARMSTART_SUPPORT, to allow the end-user to build
rpcbind(8) with/without warmstart support.

The knob defaults to off to preserve POLA for the feature.

See rpcbind(8) for more details about the warmstart feature.

MFC after:	7 weeks
Relnotes:	yes
Sponsored by:	Dell EMC Isilon
2017-04-19 20:45:46 +00:00
Enji Cooper
3cf7801299 Add WITH_CXX to complement WITHOUT_CXX and placate makeman's complaints
MFC after:	7 weeks
Sponsored by:	Dell EMC Isilon
2017-04-19 20:35:47 +00:00
Ed Maste
722a4cb445 Remove WITHOUT_GNU and WITHOUT_GNU_SUPPORT src.conf.knobs
These have no effect (and WITHOUT_GNU is documented as having no
effect). I intend to later introduce a WITHOUT_GPL knob to serve a
similar purpose as WITHOUT_GNU's previously documented intent, but with
a more accurate name. To avoid confusion over the transition though just
remove the existing, nonfunctional ones.
2017-04-19 18:59:38 +00:00
Ed Maste
9dc5d76e10 makeman: add a comment describing purpose and invocation
Reviewed by:	jhb, ngie
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D10389
2017-04-19 18:11:08 +00:00
Nick Hibma
85ee43171a A test was moved but without the definition of $d.
The test however always succeeds because 'test -d' always returns true.

Also some speling fixes.
2017-04-19 12:39:45 +00:00
Dimitry Andric
f849be8ae8 Add preliminary UPDATING and ObsoleteFiles.inc entries. Also add one
new intrinsics header.
2017-04-17 12:42:58 +00:00
Dimitry Andric
74a628f776 Vendor import of lldb trunk r300422:
https://llvm.org/svn/llvm-project/lldb/trunk@300422
2017-04-16 16:04:10 +00:00
Dimitry Andric
d2d3ebb819 Vendor import of lld trunk r300422:
https://llvm.org/svn/llvm-project/lld/trunk@300422
2017-04-16 16:03:39 +00:00
Dimitry Andric
7442d6faa2 Vendor import of clang trunk r300422:
https://llvm.org/svn/llvm-project/cfe/trunk@300422
2017-04-16 16:02:28 +00:00
Dimitry Andric
71d5a2540a Vendor import of llvm trunk r300422:
https://llvm.org/svn/llvm-project/llvm/trunk@300422
2017-04-16 16:01:22 +00:00
Enji Cooper
2f4a73322e Conditionally install /etc/pam.d/ftp* and /etc/pam.d/telnetd
/etc/pam.d/ftp* should be installed with MK_FTP != no and
/etc/pam.d/telnetd should be installed when MK_TELNET != no.

MFC after:	7 weeks
Sponsored by:	Dell EMC Isilon
2017-04-14 06:42:46 +00:00
Ed Maste
983e409609 makeman: don't copy $FreeBSD$ tags from source files into output
Copying the source VCS ID from WITH_/WITHOUT_* into the generated
src.conf.5 is not necessary, as it is generally possible to determine
the same information using the VCS to examine commit metadata. The
individual source files also match the name of the option recorded in
the generated file, so it is clear from where the content originated.

The copied IDs generate extraneous, non-content noise in the generated
src.conf.5 in some cases, including the first time the file is generated
on a stable branch. In addition, the source file $FreeBSD$ tags are not
expanded by git or other non-Subversion VCSs, which means that makeman
previously could not be used in a non-Subversion working tree.

I accept that there's some desire to keep these, but on balance believe
there is more benefit in removing them.

Reviewed by:	imp, ngie
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D7997
2017-04-11 17:01:20 +00:00
Ed Maste
ffe63c8bf0 Introduce LLD_BOOTSTRAP to control lld as bootstrap linker
Add WITH_LLD_BOOTSTRAP and WITHOUT_LLD_BOOTSTRAP knobs, similar to the
Clang bootstrap knobs.

Reviewed by:	dim
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D10249
2017-04-09 01:35:19 +00:00
Enji Cooper
cbc5a508d8 Remove the .Pa portion I added to the .An macro in AUTHORS section
That doesn't work (mandoc complains about the macro being empty).

That's what I get for being clever and not verifying before committing
things again *sigh*.

MFC after:	1 month
X-MFC with:	r315766
Partyhat to:	ngie
Sponsored by:	Dell EMC Isilon
2017-03-23 02:26:15 +00:00
Enji Cooper
fd4f2cd514 Note that tools/build/options/makeman automatically generated src.conf(5)
This (as a bonus) fixes mdoc warnings with src.conf(5) :)..

MFC after:	1 month
Sponsored by:	Dell EMC Isilon
2017-03-23 02:16:56 +00:00
Enji Cooper
092746782d Fix mdoc(7) warning: new sentences should start on new lines
MFC after:	1 week
X-MFC with:	r315764
Sponsored by:	Dell EMC Isilon
2017-03-23 02:13:59 +00:00
Enji Cooper
71dc9c7ad9 Add a WITHOUT_IPSEC_SUPPORT option description for src.conf(5)
This is a follow up commit to r313330.

MFC after:	1 week
Sponsored by:	Dell EMC Isilon
2017-03-23 02:01:25 +00:00
Enji Cooper
23de83ef36 Add a WITHOUT_RATELIMIT option description for src.conf(5)
This is a follow up commit for r312379

MFC after:	1 month
X-MFC with:	r312379
Sponsored by:	Dell EMC Isilon
2017-03-23 01:44:17 +00:00
Ian Lepore
83157972d6 Eliminate a "format string is not a string literal" warning. 2017-03-21 22:21:29 +00:00
Baptiste Daroussin
ababdab0ce Remove zh_TW.Big5 locale
After discussion with many Taiwanese, in IT or not. Big5 is not used anymore.
It is not able to represent lots of the characters used in the language.
2017-03-19 17:52:46 +00:00
Baptiste Daroussin
ad0b0cc237 Prepare the removal of the zh_TW.Big5 encoding 2017-03-19 17:48:41 +00:00
Baptiste Daroussin
ed2678e3c0 Garbage collect a map file that is not used anymore to generate locales 2017-03-19 17:46:08 +00:00
Enji Cooper
2aadc44a58 Redirect standard error from find /rescue to /dev/null
This mutes noise from find when /rescue doesn't exist.

MFC after:	1 week
Sponsored by:	Dell EMC Isilon
2017-03-14 06:52:54 +00:00
Enji Cooper
8368415056 Remove /rescue/zdb if MK_ZFS == no
Missed in r202452.

MFC after:	3 days
Sponsored by:	Dell EMC Isilon
2017-03-12 04:28:45 +00:00
Enji Cooper
4ab40004f0 Conditionally compile [additional] programs into rescue(8) if requested
Trivial oversight missed in r314240 cleanup because I enable these knobs on
my test machines.

MK_INET6_SUPPORT - rtsol
MK_NETCAT - nc

MFC after:	3 days
Sponsored by:	Dell EMC Isilon
2017-03-12 04:24:29 +00:00
Enji Cooper
a1437e83d3 Remove /rescue/iscsictl and /rescue/iscsid if MK_ISCSI == no
MFC after:	3 days
Sponsored by:	Dell EMC Isilon
2017-03-12 04:14:21 +00:00
Andriy Gapon
a55ebb7cd5 uma: eliminate uk_slabsize field
The field was not used beyond the initial keg setup stage anyway.

MFC after:	1 month (if ever)
2017-03-11 16:35:36 +00:00
Baptiste Daroussin
97ab006d51 Remove the WITHOUT_MANDOCDB option
mandoc database is activated since FreeBSD 11.0, let's remove the previous
database format for FreeBSD 12.0
2017-03-11 06:51:21 +00:00
Sean Bruno
a3afd05ce4 Use the buildworld includes and defaults when building pkt-gen. This will
mean that you need a world built to reliably build pkg-gen but this keeps
the build from failing when your source doesn't match your host running
version, e.g. building 12 on 11.

Submitted by:	Matt Macy <mmacy@nextbsd.org>
MFC after:	2 weeks
Sponsored by:	Limelight Networks
2017-03-08 17:29:40 +00:00
Navdeep Parhar
54912308c8 Add cxgbetool(8) to the base system.
Move cxgbetool from tools/tools to usr.sbin. Compile and install it on
platforms where cxgbe(4) is built by default.  Knobs (WITH_CXGBETOOL and
WITHOUT_CXGBETOOL) have been added so that the user can override the
default setting.

Reviewed by:	ngie@, gnn@, bdrewery@
MFC after:	1 month
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D9854
2017-03-03 03:11:58 +00:00
Simon J. Gerraty
baf4abfc39 Allow building mkimg as cross-tool
For linux the mmap offset must also be page aligned, and we
need to disable macros like __FBSDID()

Change the linux osdep_uuidgen() to use more portable gettimeofday().

Reviewed by: marcel
2017-03-03 01:56:55 +00:00
Dimitry Andric
348238dbd4 Merge ^/head r314420 through r314481. 2017-03-01 08:22:51 +00:00
Warner Losh
fbbd9655e5 Renumber copyright clause 4
Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.

Submitted by:	Jan Schaumann <jschauma@stevens.edu>
Pull Request:	https://github.com/freebsd/freebsd/pull/96
2017-02-28 23:42:47 +00:00
Dimitry Andric
365919ebc1 Vendor import of llvm release_40 branch r296509:
https://llvm.org/svn/llvm-project/llvm/branches/release_40@296509
2017-02-28 21:07:18 +00:00
Dimitry Andric
d630701f86 Merge ^/head r314178 through r314269. 2017-02-25 15:04:19 +00:00
Enji Cooper
edb4a773cb Fill MK_LIBTHR as far as lib/libthr is concerned
There are other areas of the tree that will need to be evaluated for sanity
if they're supposed to be conditionally compiled out of the build/install,
like libzpool

MFC after:	1 month
Relnotes:	yes (this might break someone's system if have the knob set)
Sponsored by:	Dell EMC Isilon
2017-02-25 03:44:51 +00:00
Enji Cooper
dc53eebd2c Remove MK_OBJC block
It is no longer represented via src.conf(5)

MFC after:	3 days
Sponsored by:	Dell EMC Isilon
2017-02-25 03:35:26 +00:00
Enji Cooper
31c3fb774a Remove MK_CRYPT stub
It doesn't directly control what gets installed today; it indirectly
pulls other knobs (like MK_KERBEROS, etc).

MFC after:	1 weeks
Sponsored by:	Dell EMC Isilon
2017-02-25 03:33:09 +00:00
Enji Cooper
f0e1405514 Fill in MK_RESCUE by finding paths in ${DESTDIR}/rescue and adding
them to OLD_FILES/OLD_DIRS, as necessary.

MFC after:	1 month
Sponsored by:	Dell EMC Isilon
2017-02-25 03:28:49 +00:00
Enji Cooper
5673173e11 Conditionally compile certain programs into rescue(8) if requested
MK_CCD - ccdconfig
MK_ROUTED - routed, rtquery

MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
2017-02-25 03:23:11 +00:00
Dimitry Andric
6ae9acde63 Merge ^/head r313896 through r314128. 2017-02-23 07:45:58 +00:00
Adrian Chadd
c2863c0a7e [wlanstats] We actually /do/ support per-STA stats! 2017-02-20 08:04:06 +00:00
Dimitry Andric
a3906ca572 Merge ^/head r313644 through r313895. 2017-02-17 20:19:38 +00:00
Sean Bruno
9264dd40b6 Update OLD_DIRS for various targets so that some of the branches of
directories are pruned when the appropriate knobs are turned.

Specifically, turning off bsdconfig, locales, examples, i18n, man,
ntp, syscons.  It may not seem like a lot, but it helps when trying
to keep an x86 image under 96MB for MFSRoot netbooting.

Reviewed by:	ngie
Differential Revision:	https://reviews.freebsd.org/D9558
2017-02-17 20:02:40 +00:00
Warner Losh
86d99b6884 Remove EISA bus support for add-in cards. Remove related kernel and
compile options. Remove doxygen pointers to now deleted files. Remove
EISA and VME as examples in bus_space.9.

Retained EISA mode code for IO PIC and MPTABLES because that's not
EISA bus, per se, and some people have abused EISA to mean "EISA-like
behavior as opposed to ISA" rather than using it for EISA add-in
cards.

Relnotes: yes
2017-02-16 21:57:35 +00:00
Warner Losh
5625fe9246 Remove Micro Channel Architecture support. Of the commonly available
machines, only a few 486 machines that used it, and those haven't had
enough memory to run FreeBSD for quite some time (often limited to
16MB).

Not to be confused with the Machine Check Architecture, which is still
very much alive and used (and untouched by this commit).

No Objection From: arch@
2017-02-15 23:04:25 +00:00
Gleb Smirnoff
b748360b8a Add a regression test for putting a socket on kqueue, and then doing
listen(2) on it (see r313043).  Based on Hartmut's code.
2017-02-14 21:56:01 +00:00
Dimitry Andric
1a36faad54 Merge ^/head r313301 through r313643. 2017-02-11 14:04:18 +00:00
Warner Losh
cc61bf6300 o Add mkimg to the cross tools, and use the TMPPATH as PATH to pick up
mkimg for building on systems like FreeBSD 11.0 that don't have my
  -a changes.
o Set NANO_ROOT and NANO_ALTROOT for std-* since their values don't
  change when we set NANO_SLICE*.

PR: 216829
PR: 216830
2017-02-06 06:15:38 +00:00
Dimitry Andric
f9edb08480 Merge ^/head r313055 through r313300. 2017-02-05 20:03:05 +00:00
Dimitry Andric
963c784e8c Vendor import of llvm release_40 branch r294123:
https://llvm.org/svn/llvm-project/llvm/branches/release_40@294123
2017-02-05 19:37:31 +00:00
Warner Losh
29740f4ce1 Back off using CPUTYPE for the moment. There's still some issues with
that.
2017-02-04 05:52:51 +00:00
Warren Block
4af17bf5c0 Re-enable an accidentally-disabled temp directory creation test.
Reported by:	bjk
Sponsored by:	iXsystems
2017-02-03 20:17:54 +00:00
Warren Block
13ca53104f Decromulate an extra "if".
Reported by:	rpokala
Sponsored by:	iXsystems
2017-02-03 19:21:28 +00:00
Warren Block
7a206c317d Clarify some option descriptions, add a line of text to makeman to
add the slightest hint of a shade of a clue of what it does.

Sponsored by:	iXsystems
2017-02-03 19:09:46 +00:00