Commit graph

5772 commits

Author SHA1 Message Date
Edward Tomasz Napierala f7ae83075a Add "nobrowse" option. Previously automountd(8) always behaved as if
it was set, now it's conditional.

PR:		192862
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2014-08-23 12:00:45 +00:00
Dag-Erling Smørgrav 5407523fe5 Add support for /etc/rc.conf.d/<service> subdirectories. This is
particularly useful for services such as "network" (netif) where each
interface can now have its own separate configuration file.
Add /etc/rc.conf.d to the mtree file so it is always present.

MFC after:	3 days
2014-08-23 10:51:37 +00:00
Dag-Erling Smørgrav fe248ffb7f Setting rc_debug explicitly in /etc/defaults/rc.conf defeats its purpose.
MFC after:	3 days
2014-08-23 10:49:02 +00:00
Edward Tomasz Napierala 3914ddf8a7 Bring in the new automounter, similar to what's provided in most other
UNIX systems, eg. MacOS X and Solaris.  It uses Sun-compatible map format,
has proper kernel support, and LDAP integration.

There are still a few outstanding problems; they will be fixed shortly.

Reviewed by:	allanjude@, emaste@, kib@, wblock@ (earlier versions)
Phabric:	D523
MFC after:	2 weeks
Relnotes:	yes
Sponsored by:	The FreeBSD Foundation
2014-08-17 09:44:42 +00:00
Enji Cooper aecd25eea9 Make the USB and ZFS devd configuration files optional depending on the
values of MK_USB/MK_ZFS

Making zfs.conf optional resolves PR # 186971

PR: 186971
Phabric: D606
Approved by: jmmv (mentor)
Sponsored by: EMC / Isilon Storage Division
2014-08-15 21:35:31 +00:00
Alan Somers cdfa64aaeb Convert devd's client socket to type SOCK_SEQPACKET.
This change consists of two merges from projects/zfsd/head along with the
addition of an ATF test case for the new functionality.

sbin/devd/tests/Makefile
sbin/devd/tests/client_test.c
	Add ATF test cases for reading events from both devd socket types.

r266519:
sbin/devd/devd.8
sbin/devd/devd.cc
	Create a new socket, of type SOCK_SEQPACKET, for communicating with
	clients. SOCK_SEQPACKET sockets preserve record boundaries,
	simplying code in the client. The old SOCK_STREAM socket is retained
	for backwards-compatibility with existing clients.

r269993:
sbin/devd/devd.8
	Fix grammar bug.

CR:		https://reviews.freebsd.org/rS266519
MFC after:	5 days
Sponsored by:	Spectra Logic
2014-08-14 22:33:56 +00:00
Enji Cooper 284f2cf8f7 Add missing BSD.tests.dist entry for lib/libutil to unbreak installworld with
MK_TESTS == no

Phabric: D555
X-MFC with: r269904
Approved by: jmmv (mentor, implicit)
Pointyhat to: ngie
2014-08-13 05:15:28 +00:00
Enji Cooper b236bcf168 Integrate lib/libnv into the build/kyua
Rename all of the TAP test applications from <test> to <test>_test
to match the convention described in the TestSuite wiki page

Phabric: D538
Approved by: jmmv (mentor)
Sponsored by: EMC / Isilon Storage Division
2014-08-05 18:41:27 +00:00
Enji Cooper dfed135e5c Integrate lib/libmp into the build/kyua
- Remove the .t wrapper
- Fix -Wreturn-type warnings with clang

This change has been tested on amd64/i386

Phabric: D530
Reviewed by: jmmv
Approved by: jmmv (co-mentor)
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2014-08-04 22:10:07 +00:00
Peter Wemm 6ffcf5d515 Like with /usr/lib + /usr/lib/compat, add the optional /usr/lib32/compat
to the ldconfig32 default path.  /usr/lib32 is the 32 bit versions of
*current* libraries, while old versions should be able to be in
/usr/lib32/compat, like with /usr/lib/compat.  The separation is meant to
keep the compile time default search paths cleaner.
2014-08-01 19:32:20 +00:00
Baptiste Daroussin 124b3eceb7 Add the mtree entry for yacc tests 2014-07-17 22:26:24 +00:00
Bryan Drewery 3137e845c6 Fix indentation 2014-07-17 15:50:23 +00:00
Eitan Adler 40dd6f486b units(1): Add basic tests
Add some tests to help avoid breaking units
2014-07-17 07:12:12 +00:00
Marcel Moolenaar e7d939bda2 Remove ia64.
This includes:
o   All directories named *ia64*
o   All files named *ia64*
o   All ia64-specific code guarded by __ia64__
o   All ia64-specific makefile logic
o   Mention of ia64 in comments and documentation

This excludes:
o   Everything under contrib/
o   Everything under crypto/
o   sys/xen/interface
o   sys/sys/elf_common.h

Discussed at: BSDcan
2014-07-07 00:27:09 +00:00
Eitan Adler 4bfdbb0b56 chown: add a test
Add a test for the chown utility. This sets up chown(8) to be capable of being
tested.  As such, only add one test for now as an example.
2014-06-30 05:33:52 +00:00
Gavin Atkinson 2be4135815 Remove example cvsup config files.
MFC after:	1 week
2014-06-25 12:32:41 +00:00
Mark Johnston 98390b4568 Unbreak installation of the rtld tests.
X-MFC-With:	r267679
2014-06-24 21:12:08 +00:00
Hiroki Sato 39e04d7c8a Fix ifname normalization. ifconfig_IF_alias{es,N} did not work if ifname has
any of [.-/+].

Spotted by:	jhay
2014-06-24 04:37:36 +00:00
Jonathan Anderson 6b22f423cf Test RTLD's new LD_LIBRARY_PATH_FDS variable.
Test LD_LIBRARY_PATH_FDS by linking a binary that requires a shared
library that isn't in any of the usual search paths.  Ensure this fails
when we don't supply LD_LIBRARY_PATH_FDS or we pass invalid information
in it.  Ensure it works when we pass the correct directory in various
places in the variable.

Approved by:	rwatson (mentor)
MFC after:	3 weeks
Sponsored by:	DARPA/AFRL
2014-06-20 17:14:59 +00:00
Gavin Atkinson f2a1bc12bf Stop creating /etc/gnats 2014-06-20 11:46:42 +00:00
Hiroki Sato 4fd7abaa02 Fix address matching rule.
Reported by:	jase
2014-06-19 07:39:28 +00:00
Peter Grehan a438cd7efb Convert the potential console port over to using 3wire, for i386/amd64.
(This change was already in place for other arches via r262957)

Reviewed by:	nwhitehorn
MFC after:	1 week
2014-06-17 18:51:03 +00:00
Gavin Atkinson c67bc4dbda Remove send-pr, the supported interface to submit bugs is now via
https://bugs.freebsd.org/submit/

Removing send-pr also removes one more piece of non-BSD-licensed software.

Hat:		bugmeister
MFC after:	3 days
2014-06-14 20:36:32 +00:00
Julio Merino e8a34402f2 Put the test suite in its own tests.txz distribution file.
Force all the contents of /usr/tests to go into a separate distribution
file so that users of binary releases can easily choose to not install it.

To make this possible, we need two fixes:
- bsd.subdir.mk needs to properly honor NO_SUBDIR in all cases so that we
  do not recurse into 'tests' subdirectories when we needn't.  Otherwise,
  we end up with some Kyuafiles in base.txz.
- etc/Makefile needs to skip installing tests in its 'distribute' target
  so that a Kyuafile doesn't leak into base.txz.

Approved by:	gjb
2014-06-10 17:04:30 +00:00
Jilles Tjoelker fc96358cdd truncate: Detect integer overflow, fix relative sizes, add tests.
The change to expand_number (r204654) broke detection of too large sizes and
relative sizes ('+'/'-').

Also add some tests.

PR:		190735
Submitted by:	Kirk Russell
MFC after:	1 week
2014-06-09 10:39:55 +00:00
Julio Merino 8c7ec47a40 Move atf-sh from /usr/bin/ to /usr/libexec/
In r266650, we made libatf-c and libatf-c++ private libraries so that no
components outside of the source tree could unintendedly depend on them.

This change does the same for the "atf-sh library" by moving the atf-sh
interpreter from its public location in /usr/bin/ to the private location
in /usr/libexec/.  Our build system will ensure that our own test programs
use the right binary, but users won't be able to depend on atf-sh by
"mistake".

Committing this now to ride the UPDATING notice added with r267172 today.
2014-06-06 18:58:06 +00:00
Ed Maste 8febff7073 Install VT support files
They can be disabled by setting WITHOUT_VT_SUPPORT=yes in src.conf.

Sponsored by:	The FreeBSD Foundation
2014-06-05 18:53:56 +00:00
Luiz Otavio O Souza f74e8e4039 Adds the bsnmp module to export the temperature data from lm75 sensors on
the system.

Together with lm75(4) this module allows easy temperature monitoring over
SNMP, specially for embedded systems.

Manual page reviewed by:        brueffer (D128)
2014-06-01 03:14:03 +00:00
Ed Maste 38c431040a Add missing libexec/bsdconfig subdirectories 2014-05-30 19:45:21 +00:00
Nathan Whitehorn f2d7865517 Enable a login console on ttyu0 by default if it is a serial console. This
prevents surprising effects post-installation on serial-only x86 systems
(e.g. bhyve) where the kernel messages will appear, rc scripts will run,
and then there will be no login prompt and you will be locked out of the
system.

Thanks to Devin Teske and Peter Grehan for ideas and testing. With this
patch, it may also be possible to unify all or most of the machine-specific
ttys files.
2014-05-30 16:53:53 +00:00
Dag-Erling Smørgrav 9b17fa8f3c Create /var/unbound/conf.d for additional configuration files.
Ensure that it is used if present.

MFH:	3 weeks
2014-05-29 22:34:04 +00:00
Julio Merino 17a286a994 Change libatf-c and libatf-c++ to be private libraries.
We should not be leaking these interfaces to the outside world given
that it's much easier for third-party components to use the devel/atf
package from ports.

As a side-effect, we can also drop the ATF pkgconfig and aclocal files
from the base system.  Nothing in the base system needs these, and it
was quite ugly to have to get them installed only so that a few ports
could build.  The offending ports have been fixed to depend on
devel/atf explicitly.

Reviewed by:	bapt
2014-05-25 12:01:13 +00:00
Hans Petter Selasky 6fea75b4be Untabify.
Found by:	jmmv @
2014-05-24 20:31:55 +00:00
Alan Somers 6c96553e8a MFP4 zfsd-related changes
Convert libdevctl to use devd's new SEQPACKET socket.
	lib/libdevctl/consumer.cc
	lib/libdevctl/event_buffer.cc
	lib/libdevctl/event_buffer.h
	lib/libdevctl/reader.cc
	lib/libdevctl/reader.h
		Read from the new /var/run/devd.seqpacket.pipe instead of
		/var/run/devd.pipe.  Since it preserves record boundaries,
		we can eliminate all the repacketization code in
		EventBuffer::ExtractEvent as well as much supporting code
		from the Reader class.

	lib/libdevctl/consumer.cc
		Make the pipe nonblocking.  Previously, we avoided blocking
		by using the FIONREAD ioctl, but this is simpler.

	cddl/sbin/zfsd/case_file.cc
	cddl/sbin/zfsd/tests/zfsd_unittest.cc
	cddl/sbin/zfsd/vdev.cc
	cddl/sbin/zfsd/zfsd.cc
	cddl/sbin/zfsd/zfsd.h
	cddl/sbin/zfsd/zfsd_event.cc
		Update zfsd according to the libdevctl changes.  The only
		nontrivial change is to CaseFile::DeSerialize, which
		elimintes the use of IStreamReader.

	cddl/sbin/zfsd/case_file.cc
		For an unknown reason, sometimes the std::ios::failbit
		will get set on caseStream.  Instead of checking for
		!eof(), check for good().  That method checks the
		eofbit, errorbit, and failbit.

livdevctl cleanup (from gibbs)
	lib/libdevctl/event.cc:
	lib/libdevctl/event.h:
		Remove the event class's name from its Builder method.  It's
		perfectly clear that DevfsEvent::Builder() is the DevfsEvent
		class's Builder function.

	cddl/sbin/zfsd/zfsd.cc:
	cddl/sbin/zfsd/zfsd_event.cc:
	cddl/sbin/zfsd/zfsd_event.h:
		Conform to new libdevct Builder naming convention.

Fix autoreplace by physical path when a hotspare is present
	cddl/sbin/zfsd/case_file.cc
		Fix logic error in CaseFile::Replace regarding whether the
		replacement device is a spare or not.

Reviewed by:	gibbs
Sponsored by:	Spectra Logic
2014-05-23 23:13:34 +00:00
Hans Petter Selasky fa0f6e62c6 Initial import of character device in userspace support for FreeBSD.
The CUSE library is a wrapper for the devfs kernel functionality which
is exposed through /dev/cuse . In order to function the CUSE kernel
code must either be enabled in the kernel configuration file or loaded
separately as a module. Currently none of the committed items are
connected to the default builds, except for installing the needed
header files. The CUSE code will be connected to the default world and
kernel builds in a follow-up commit.

The CUSE module was written by Hans Petter Selasky, somewhat inspired
by similar functionality found in FUSE. The CUSE library can be used
for many purposes. Currently CUSE is used when running Linux kernel
drivers in user-space, which need to create a character device node to
communicate with its applications. CUSE has full support for almost
all devfs functionality found in the kernel:
 - kevents
 - read
 - write
 - ioctl
 - poll
 - open
 - close
 - mmap
 - private per file handle data

Requested by several people. Also see "multimedia/cuse4bsd-kmod" in
ports.
2014-05-23 08:46:28 +00:00
Gregory Neil Shapiro 8e0e5c51b7 Minor changes to force commit these files so new freebsd*.cf files are
built to use the new sendmail-8.14.9/cf tree.

MFC after:	3 days
2014-05-22 04:43:40 +00:00
Alan Somers 414fdaf09d IFC @266473 2014-05-21 20:30:52 +00:00
Eygene Ryabinkin 6306643dfa Fix warning messages after r252015
$alias used to hold alias number, but now it carries full variable name,
so messages were tuned to account for that.

Other fixes:
 - eliminate unneeded double spaces;
 - tell user where inet/inet6 keywords are expected to be.
Reviewed by:	hrs
MFC after:	1 week
2014-05-20 19:55:59 +00:00
Bryan Drewery b39df8fe2d - Include /etc/newsyslog.conf.d/* and /usr/local/etc/newsyslog.conf.d/* by
default for newsyslog(8).

  The /usr/local/etc/newsyslog.conf.d will give packages an opportunity to
  install a default configuration to handle their own log files.

MFC after:	2 weeks
Relnotes:	yes
2014-05-20 03:00:20 +00:00
Hiroki Sato 0f52e3eb91 Fix an issue in range specification handling when a "-foo" is specified in
ifconfig_IF_aliasN.
2014-05-16 18:44:23 +00:00
Hiroki Sato 999ff616fd Move configuration of IPv6 NDP flags to a point before handling ifconfig_IF.
This fixes a race that a non-IPv4 interface can get an EUI64 LLA even if it
has IFDISABLED nd6 flag at boot time.
2014-05-16 14:48:21 +00:00
Julio Merino 5ae59dec60 Move old fmake tests into bmake and hook them to the build.
This first step is mostly to prevent the code from rotting even further
and to ensure these do not get wiped when fmake's code is removed from
the tree.

These tests are currently being skipped because they detect the underlying
make is not fmake and thus disable themselves -- and the reason is that
some of the tests fail, possibly due to legitimate bugs.  Enabling them to
run against bmake will come separately.

Lastly, it would be ideal if these tests were fed upstream but they are
not ready for that yet.  In the interim, just put them under usr.bin/bmake/
while we sort things out.  The existence of a different unit-tests directory
within here makes me feel less guilty about this.

Change confirmed working with a clean amd64 build.
2014-05-14 18:43:13 +00:00
Dimitry Andric 85d60e68ac Upgrade our copy of llvm/clang to 3.4.1 release. This release contains
mostly fixes, for the following upstream bugs:

http://llvm.org/PR16365 http://llvm.org/PR17473 http://llvm.org/PR18000
http://llvm.org/PR18068 http://llvm.org/PR18102 http://llvm.org/PR18165
http://llvm.org/PR18260 http://llvm.org/PR18290 http://llvm.org/PR18316
http://llvm.org/PR18460 http://llvm.org/PR18473 http://llvm.org/PR18515
http://llvm.org/PR18526 http://llvm.org/PR18600 http://llvm.org/PR18762
http://llvm.org/PR18773 http://llvm.org/PR18860 http://llvm.org/PR18994
http://llvm.org/PR19007 http://llvm.org/PR19010 http://llvm.org/PR19033
http://llvm.org/PR19059 http://llvm.org/PR19144 http://llvm.org/PR19326

MFC after:	2 weeks
2014-05-12 18:45:56 +00:00
Adrian Chadd 08595c4c81 Bump the default C-state to Cmax, rather than the kernel default
of C1.

This may not stay through 11.0-RELEASE, but at least having it
on by default in -HEAD will expose (more) issues with broken hardware.

Note: I have no plans or desire to MFC this to stable/10.
2014-05-06 23:28:37 +00:00
Warner Losh c6063d0da8 Use src.opts.mk in preference to bsd.own.mk except where we need stuff
from the latter.
2014-05-06 04:22:01 +00:00
Alan Somers d4e612d08d Remove the ifconfig test added in rev 263445. After discussion with
melifaro, we agreed that ifconfig's behavior was not a bug.  The main
motivation for bin/187551 was to partially resolve kern/187549, but we
resolved kern/187549 in a different way instead.

ObsoleteFiles.inc
etc/mtree/BSD.tests.dist
sbin/ifconfig/tests/fibs_test.sh
sbin/ifconfig/tests/Makefile
sbin/ifconfig/Makefile
	Remove /usr/tests/sbin/ifconfig

PR:		bin/187551
MFC after:	3 days
Sponsored by:	Spectra Logic
2014-05-05 19:38:29 +00:00
Xin LI 97a065c889 Fix devfs rules not applied by default for jails.
Security:	FreeBSD-SA-14:07.devfs
Security:	CVE-2014-3001
2014-04-30 04:02:32 +00:00
Alan Somers 84e51a1b67 IFC @264767 2014-04-23 21:52:43 +00:00
Julio Merino 38f0b757fd Add placeholder Kyuafiles for various top-level hierarchies.
This change adds tests/ directories in the source tree to create various
subdirectories in /usr/tests/ and to install placeholder Kyuafiles for
them.

the relevant hierarchies are: cddl, etc, games, gnu and secure.

The reason for this is to simplify the addition of new test programs for
utilities or libraries under any of these directories.  Doing so on a
case by case basis is unnecessary and is quite an obscure process.
2014-04-21 21:39:25 +00:00
Maksim Yevmenkin 2ae4b3d100 when watchdogd is asked to exit nicely (via SIGTERM) it will
stop timer. since watchdogd rc.d script is marked as 'shutdown'
it will exit (on shutdown) and stop timer. if system happens to
hung after watchdogd exited, manual reset is required. when one
operates in "lights-out" type of environments and without
readily available "remote hands" it could create a problem.

this provides ability to override "stop signal" for watchdogd.
default behavior is preserved, i.e. watchdogd will still be killed
via SIGTERM and timer will be stopped. in order to activate new
feature, one needs to put

watchdogd_sig_stop="KILL"

into /etc/rc.conf and also make sure watchdogd timeout is set
to long enough value allowing system to come back online before
timeout fires.

Obtained from:	Netflix
MFC after:	1 week
2014-04-16 22:26:42 +00:00