Commit Graph

204737 Commits

Author SHA1 Message Date
Bryan Drewery
a378087d24 Always export VERSION to the environment to avoid looking it up again in
sub-makes.

Some of the world phases that used plain '${MAKE} -f Makefile.inc1' were not
passing this variable along which caused them to look it up again.  By
using bmake's .export we can remove it from all of the other environment
lines.

Add a comment about the usage for VERSION for ctfmerge.

Sponsored by:	EMC / Isilon Storage Division
2015-10-17 05:55:45 +00:00
Bryan Drewery
0ed70e428d Do as r289391 did for share/mk and make installing to a non-existent directory
an error.

Most of these do a 'mkdir -p' or 'install -d' before installing, but add
the trailing / here for consistency with the userland install.

MFC after:	2 weeks
X-MFC-With:	r289391
Sponsored by:	EMC / Isilon Storage Division
2015-10-17 05:49:07 +00:00
Enji Cooper
4fdc3d75b9 Integrate tools/test/posixshm and tools/regression/posixshm into the FreeBSD
test suite as tests/sys/posixshm

Some other highlights:
- Convert the testcases over to ATF
- Don't use hardcoded paths to /tmp (which violate the ATF/kyua samdbox); use
  mkstemp to generate temporary paths for non-SHM_ANON shm objects.

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2015-10-17 04:32:21 +00:00
Bryan Drewery
470c2b3af1 Export OSRELDATE so sub-makes don't look it up again.
We pass BOOTSTRAPPING=${OSRELDATE} to some of the sub-makes.  Rather than
chase every ${MAKE} invokation, just export it as bmake lets us.

Sponsored by:	EMC / Isilon Storage Division
2015-10-17 04:03:53 +00:00
Bryan Drewery
fb84a99e0f Rework the world subdir build targets to use the standard SUBDIR_PARALLEL mechanism.
Back in r30113, the 'par-*' targets were added to parallelize portions of
the build in a very similar fashion as the SUBDIR_PARALLEL feature used in
r263778.  Calling a target without 'par-' (for 'parallel') resulted in the
standard bsd.subdir.mk handling without parallelization.  Given we have
SUBDIR_PARALLEL now there is no reason to duplicate the handling here.

In build logs this will result in the ${dir}.${target}__D targets now showing
as the normal ${target}_subdir_${dir} targets.

I audited all of the uses of Makefile.inc1 and Makefile's targets that use
bsd.subdir.mk and found that all but 'all' and 'install' were fine to use
as always parallel.
  - For 'install' (from installworld -j) the ordering of lib/ and libexec/
    before the rest of the system (described in r289433), and etc/ being last
    (described in r289435), is all that matters.  So now a .WAIT is added in
    the proper places when invoking any 'install*' target.  A parallel
    installworld does work and took 46% of the time a non-parallel
    install would take on my system with -j15 to ZFS.
  - For 'all' I left the default handling for this to not run in parallel.  A
    'par-all' target is still used by the 'everything' stage of buildworld
    to continue building in parallel as it already has been.  This works
    because most of the dependencies are handled by the early bootstrap
    phases as well as 'libraries' and 'includes' phases.  This lets
    all of the SUBDIR build in parallel fine, such as bin/ and lib/.  This
    will not work if the user invokes 'all' though as we have dependencies
    spread all over the system with no way to depend between them (except
    for the dirdeps feature in the META_MODE build).  Calling 'make all'
    from the top-level is still useful at least when using SUBDIR_OVERRIDE.

MFC after:	2 weeks
Sponsored by:	EMC / Isilon Storage Division
2015-10-17 03:51:50 +00:00
Bryan Drewery
23ffbc1011 Fix adding manpages installed by LOCAL_DIRS to whatis file.
The ordering of 'etc' in the install has a long history dating back to the
first time it was realized it needed to be "last" in r4486.  That commit
still left it before LOCAL_DIRS though.  By having it before LOCAL_DIRS
any manpages they install were not being added to the whatis database in the
install image.  They would likely show up in the file after a periodic
rebuild of the file though.

Currently the whatis file is built by an 'afterinstall' hook in etc/Makefile
that calls share/man's 'makedb' target.

MFC after:	2 weeks
Sponsored by:	EMC / Isilon Storage Division
2015-10-16 23:53:37 +00:00
Bryan Drewery
c38230eb54 Remove lockf as an ITOOL.
It was added in r152006 to handle serializing access of info/dir when
installing INFO files.  We no longer support INFO files since r276551
though.

Sponsored by:	EMC / Isilon Storage Division
2015-10-16 22:41:31 +00:00
Bryan Drewery
7e81b832a3 Correct a bitrotted comment about installworld order requirements.
The case of make(1) using a new /bin/sh issue was fixed in r173219 when ITOOLS
was introduced.

There are still issues with mid-install errors leaving a system unusable that
are currently non-trivial to solve.  The safest ordering requires installing
rtld, libc and libthr (in that order) before anything else.  We don't do that
now though.  Much improvement is needed here still.

Discussed with:	kip and kan (rtld/library ordering)
MFC after:	1 week
Sponsored by:	EMC / Isilon Storage Division
2015-10-16 21:09:15 +00:00
Bryan Drewery
e07b2be5e9 Tweak the guard more to suggest 'all' if SUBDIR_OVERRIDE is specified. In that
case 'all' does make sense.

MFC after:	2 weeks
X-MFC-With:	r289411
Sponsored by:	EMC / Isilon Storage Division
2015-10-16 20:59:03 +00:00
Bryan Drewery
35511448cd Remove .MAKE from targets that do more than just run sub-makes, such as
calling rm or mtree.

MFC after:	1 week
Sponsored by:	EMC / Isilon Storage Division
2015-10-16 20:23:04 +00:00
Scott Long
acb570cf14 Revert an extra hunk that crept into the last commit.
Submitted by:	emax
Obtained from:	Netflix, Inc.
MFC after:	3 days
2015-10-16 20:18:12 +00:00
Scott Long
d0be3479d5 Remove _FreeBSD_version check for something that was only an issue with
9-CURRENT.

Obtained from:  Netlfix, Inc
MFC after:      3 days
2015-10-16 17:56:43 +00:00
Jung-uk Kim
a41dab8fc9 Add support for ARM EABI.
MFC after:	1 week
2015-10-16 17:50:36 +00:00
Ed Maste
59faa1e9fb newfs_msdos: prefer snprintf to sprintf
Obtained from:	NetBSD
Sponsored by:	The FreeBSD Foundation
2015-10-16 15:19:36 +00:00
Konstantin Belousov
d8f3dc7871 If falloc_caps() failed, cleanup needs to be performed. This is a bug
in r289026.

Sponsored by:	The FreeBSD Foundation
2015-10-16 14:55:39 +00:00
Alexander Motin
43f774f296 MFV r289310:
4185 add new cryptographic checksums to ZFS: SHA-512, Skein, Edon-R

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Saso Kiselkov <saso.kiselkov@nexenta.com>
Reviewed by: Richard Lowe <richlowe@richlowe.net>
Approved by: Garrett D'Amore <garrett@damore.org>
Author: Matthew Ahrens <mahrens@delphix.com>

illumos/illumos-gate@45818ee124

This is only a partial merge of respective ZFS infrastructure changes.
At this moment FreeBSD kernel has no those crypto algorithms, so the
parts of the code to enable them are commented out.  When they are
implemented, it will be trivial to plug them in.
2015-10-16 14:45:21 +00:00
Cy Schubert
6f422073d1 Add default leap-seconds file. This should help ntp networks get the
leap second date correct

Updates to the file can be obtained from ftp://time.nist.gov/pub/ or
ftp://tycho.usno.navy.mil/pub/ntp/.

Suggested by:	dwmalone
Reviewed by:	roberto, dwmalone, delphij
Approved by:	roberto
MFC after:	1 week
2015-10-16 14:04:16 +00:00
Dag-Erling Smørgrav
8819003234 Use fopen()'s newfangled "e" flag instead of explicit fcntl() calls.
PR:		199801
Submitted by:	Jukka Ukkonen <jau@iki.fi>
MFC after:	1 week
2015-10-16 12:53:22 +00:00
Dag-Erling Smørgrav
c3f9b93bd9 Fix two bugs in HTTPS tunnelling:
- If the proxy returns a non-200 result, set the error code accordingly
   so the caller / user gets a somewhat meaningful error message.
 - Consume and discard any HTTP response header following the result line.

PR:		194483
Tested by:	Fabian Keil <fk@fabiankeil.de>
MFC after:	1 week
2015-10-16 12:21:44 +00:00
Ed Schouten
aa40bd817c Use the right variable name.
MACHINE_CPUARCH expands to aarch64 for arm64, whereas MACHINE always
corresponds to the directory name under sys/ that contains the sources
for that architecture.
2015-10-16 10:26:15 +00:00
Alexander Motin
5873e5fcb2 Bump version and add notice about incompatibility introduced by resumable
send/receive support in ZFS.
2015-10-16 08:57:11 +00:00
Bryan Drewery
824f98d3fb Tweak the default target to not suggest 'all' since it really doesn't do
anything useful for most users.

MFC after:	2 weeks
Sponsored by:	EMC / Isilon Storage Division
2015-10-16 05:59:59 +00:00
Bryan Drewery
0cc887023b Avoid warning race with creating 'ldscripts' directory during build.
In r204548 the 'rm -f ldscripts' was added likely due to reading the
conditional as 'else it is a file'.  That seems unlikely though and
the more likely case is just that the directory hasn't been created yet.

Because this races with ,ssother scripts, use 'mkdir -p' which is a minimal
modification vs upstream to avoid the warning of 'File exists' if another
script creates it first.  This could replace the 'test -d' as well but
then it's more unneeded change to the upstream script.

Sponsored by:	EMC / Isilon Storage Division
2015-10-16 05:54:41 +00:00
Bryan Drewery
8d59661631 Add entries for moved test symbols for r289355 and r289330.
This list is likely not complete.

Sponsored by:	EMC / Isilon Storage Division
2015-10-16 05:13:21 +00:00
Bryan Drewery
29f297420d Similar to r289355, /usr/tests is within the base system so put the symbols
into /usr/lib/debug.

This covers some missing files:
  /usr/tests/libexec/rtld-elf/.debug
  /usr/tests/libexec/rtld-elf/.debug/libpythagoras.so.0.debug
  /usr/tests/lib/libc/tls/.debug
  /usr/tests/lib/libc/tls/.debug/libh_tls_dynamic.so.1.debug
  /usr/tests/lib/libc/tls/.debug/h_tls_dlopen.so.debug
  /usr/tests/lib/libthr/dlopen/.debug
  /usr/tests/lib/libthr/dlopen/.debug/h_pthread_dlopen.so.1.debug
  /usr/tests/lib/libxo/.debug
  /usr/tests/lib/libxo/.debug/libenc_test.so.debug

Sponsored by:	EMC / Isilon Storage Division
2015-10-16 05:06:43 +00:00
Bryan Drewery
651e270328 Fix delete-old and check-old-files not removing old debug symbols.
This was handled for libraries in r256842 but for some reason was missed
for files (bsd.prog.mk).

MFC after:	1 week
Sponsored by:	EMC / Isilon Storage Division
Relnotes:	yes
2015-10-16 04:07:27 +00:00
Warner Losh
476dfdc3bf Do not relocate extents to make them contiguous if the underlying drive can do
deletions. Ability to do deletions is a strong indication that this
optimization will not help performance. It will only generate extra write
traffic. These devices are typically flash based and have a limited number of
write cycles. In addition, making the file contiguous in LBA space doesn't
improve the access times from flash devices because they have no seek time.

Reviewed by: mckusick@
2015-10-16 03:06:02 +00:00
Navdeep Parhar
07d684f712 cxgbe(4): support for the kernel RSS option.
You need PCBGROUP and RSS in the kernel config to use this.

Relnotes:	Yes
Sponsored by:	Chelsio Communications
2015-10-16 01:19:55 +00:00
Hiroki Sato
b7a581eaa6 Fix a panic when destroying a lagg interface.
Differential Revision:	https://reviews.freebsd.org/D3883
2015-10-16 01:16:01 +00:00
Bryan Drewery
cada39d8dd Rename the /usr/share/doc/legal files to driver.LICENSE to work around
bug of installing 'realtek' and 'intel_iwn' as files rather then as
a 'LICENSE' file in their directories.

Also add obsolete entries for the older names and names that existed in head
for a period of time.

Suggested by:	jmg
X-MFC-With:	r289391
MFC after:	3 weeks
Sponsored by:	EMC / Isilon Storage Division
2015-10-16 00:38:05 +00:00
Bryan Drewery
2b51b1f96a Sort new entry intel_iwn.
Submitted by:	ngie
MFC after:	3 weeks
X-MFC-With:	r289391
Sponsored by:	EMC / Isilon Storage Division
2015-10-15 23:49:05 +00:00
Conrad Meyer
3952d9c9de NTB: MFV ab760a0c: Add split BAR support for Haswell
On the Haswell platform, a split BAR option to allow creation of 2 32bit
BARs (4 and 5) from the 64bit BAR 4. Adding support for this new option.

Authored by:	Dave Jiang
Obtained from:	Linux (Dual BSD/GPL driver)
Sponsored by:	EMC / Isilon Storage Division
2015-10-15 23:46:07 +00:00
Conrad Meyer
b8a291bdea NTB: Add variable number MW, DB CB support code
This is a follow-up to r289208: "Xeon Errata Workaround."

Add logic to support a variable number of memory windows and doorbell
callbacks.  This was added to the Linux driver in the "Xeon Errata
Workaround" commit, but I skipped it because it didn't look neccessary
at the time.  It is needed for future Haswell split-BAR support, so
bring it in now.

A new tunable was added for if_ntb, 'hw.ntb.max_num_clients'.  By
default, it is set to zero -- infer the number of clients from the
number of memory windows available from the hardware.  Any other
positive value can specify a different number of clients, limited by the
number of doorbell callbacks available (4 under MSI-X, or 15 (Xeon) or
34 (SoC) under legacy INTx).

Obtained from:	Linux (Dual BSD/GPL driver)
Sponsored by:	EMC / Isilon Storage Division
2015-10-15 23:45:43 +00:00
Bryan Drewery
b1f8f3166b Add missing /usr/share/doc/legal/realtek/ for share/doc/legal/realtek,
exposed by r289391.

MFC after:	3 weeks
X-MFC-With:	289391
Sponsored by:	EMC / Isilon Storage Division
2015-10-15 23:45:00 +00:00
Bryan Drewery
f8a5df9ef4 Add missing directory for /usr/share/doc/legal/intel_iwn/ used by
share/doc/legal/intel_iwn.  Exposed by r289391.

MFC after:	3 weeks
X-MFC-With:	289391
Sponsored by:	EMC / Isilon Storage Division
2015-10-15 23:41:47 +00:00
Bryan Drewery
aa92269e46 Add more SUBDIR_PARALLEL.
MFC after:	3 weeks
Sponsored by:	EMC / Isilon Storage Division
2015-10-15 22:55:08 +00:00
Bryan Drewery
61c20fc782 Make installing to a non-existent directory an error.
Before this, if a file was installed to DESTDIR/some/dir and that directory
was missing due to not having ran 'make distrib-dirs' yet, the file would
be installed as 'some/dir'.  For something like bsd.incs.mk with INCLUDEDIR
being a sub-directory of /usr/include, this could result in all of the headers
being installed to a file rather than getting a directory of them.

Now it will error that the file/directory does not exist rather than hide
the issue.

Another option being discussed is to implement GNU's install -D flag which
would auto create any missing directories.

This is a mitigation of the problem.  The proper order to the build is to
run 'make distrib-dirs' first, but that can be forgotten if building from
a sub-directory after updating the source code to the latest revision.

MFC after:	2 weeks
Sponsored by:	EMC / Isilon Storage Division
2015-10-15 22:49:56 +00:00
Bryan Drewery
7b9c2f1643 Fix buildworld with clean objdir after r289351.
Sponsored by:	EMC / Isilon Storage Division
2015-10-15 21:21:41 +00:00
Bryan Drewery
eb774fcd58 libstdc++ also snook in incorrectly in r267511, despite not being a real
subdir.

Sponsored by:	EMC / Isilon Storage Division
2015-10-15 20:49:20 +00:00
Bryan Drewery
d023e38f61 Remove unneeded libg++ reference that came in with r267511 based on a removed
comment.

Sponsored by:	EMC / Isilon Storage Division
2015-10-15 20:46:34 +00:00
Bryan Drewery
e0d253678e Fix another ++= parsed as '+=', missed in r289384.
Sponsored by:	EMC / Isilon Storage Division
2015-10-15 20:40:23 +00:00
Bryan Drewery
468a365ddd Let the SUBDIR_DEPEND*c++ variables actually work rather than being parsed
as a +=.  These were safe due to a .WAIT very early on.

Sponsored by:	EMC / Isilon Storage Division
2015-10-15 20:27:15 +00:00
Bryan Drewery
0331dd8c91 Remove empty directory c++filt leftover from r286332.
Sponsored by:	EMC / Isilon Storage Division
2015-10-15 19:51:34 +00:00
Bryan Drewery
71d9d150fa Remove directories disconnected since r169718.
MFC after:	1 week
Sponsored by:	EMC / Isilon Storage Division
2015-10-15 19:49:09 +00:00
Bryan Drewery
60e03c60c0 Mark sub-make targets as .MAKE and .PHONY to handle -n and always-build properly.
MFC after:	1 week
Sponsored by:	EMC / Isilon Storage Division
2015-10-15 19:13:53 +00:00
Konstantin Belousov
8748f58cde Revert r289302, invalid pages can be queued, e.g. by vfs_vmio_unwire().
Found by:	alc
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
2015-10-15 19:07:38 +00:00
Ed Maste
041b03daab newfs_msdos: move mkfs_msdos to separate file for later use in makefs
Sponsored by:	The FreeBSD Foundation
2015-10-15 19:00:33 +00:00
Bryan Drewery
8251c561bf Fix wrong use of .for; the iteration variable is not used in the loop.
MFC after:	1 week
Sponsored by:	EMC / Isilon Storage Division
2015-10-15 18:55:43 +00:00
Bryan Drewery
dcbf2188c1 Remove excess .else
MFC after:	1 week
Sponsored by:	EMC / Isilon Storage Division
2015-10-15 18:53:26 +00:00
Ed Schouten
632b5263c5 Properly set the return value for casueword to 0 upon success.
While trying to get multithreading working for CloudABI on aarch64, I
noticed that compare-and-exchange operations in kernelspace would always
fail. It turns out that we don't properly set the return value to 0 when
the compare and exchange succeeds.

Approved by:	andrew
Differential Revision:	https://reviews.freebsd.org/D3899
2015-10-15 17:50:28 +00:00