Commit graph

2896 commits

Author SHA1 Message Date
Dag-Erling Smørgrav b4af3bcb1a Additional BIND files.
Submitted by:	bdrewery
Approved by:	re (blanket)
2013-09-25 20:06:01 +00:00
Dag-Erling Smørgrav 70aeafb4fc Flip the switch: disable BIND and enable LDNS_UTILS.
Approved by:	re (blanket)
2013-09-24 14:33:31 +00:00
Dag-Erling Smørgrav 49cede74ee Add a setup script for unbound(8) called local-unbound-setup. It
generates a configuration suitable for running unbound as a caching
forwarding resolver, and configures resolvconf(8) to update unbound's
list of forwarders in addition to /etc/resolv.conf.  The initial list
is taken from the existing resolv.conf, which is rewritten to point to
localhost.  Alternatively, a list of forwarders can be provided on the
command line.

To assist this script, add an rc.subr command called "enabled" which
does nothing except return 0 if the service is enabled and 1 if it is
not, without going through the usual checks.  We should consider doing
the same for "status", which is currently pointless.

Add an rc script for unbound, called local_unbound.  If there is no
configuration file, the rc script runs local-unbound-setup to generate
one.

Note that these scripts place the unbound configuration files in
/var/unbound rather than /etc/unbound.  This is necessary so that
unbound can reload its configuration while chrooted.  We should
probably provide symlinks in /etc.

Approved by:	re (blanket)
2013-09-23 04:36:51 +00:00
Dag-Erling Smørgrav 7b07722f6c Remove drill(1) if MK_LDNS_UTILS is false.
Remove host(1) if both MK_BIND and MK_LDNS_UTILS are false.

Approved by:	re (blanket)
2013-09-22 20:32:28 +00:00
Ed Maste e8f1392d95 Add LLDB bmake infrastructure
This connects LLDB to the build, but it is disabled by default.  Add
WITH_LLDB= to src.conf to build it.

Note that LLDB requires a C++11 compiler so is disabled on platforms
using GCC.

Approved by:	re (gjb)
Sponsored by:	DARPA, AFRL
2013-09-20 01:52:02 +00:00
Poul-Henning Kamp dcc756789c Don't attempt to build ports with missing dependencies.
Approved by:	re (gjb)
2013-09-17 15:19:26 +00:00
Dag-Erling Smørgrav 8f8790cdf4 Build and install the Unbound caching DNS resolver daemon.
Approved by:	re (blanket)
2013-09-15 14:51:23 +00:00
Dag-Erling Smørgrav 7b57a909be Tweak wording.
Approved by:	re (blanket)
2013-09-15 13:11:13 +00:00
Dag-Erling Smørgrav 9a0ec541e2 Complete the OPENSSH and LDNS sections.
Approved by:	re (blanket)
2013-09-15 13:07:30 +00:00
Ed Schouten 9f00530da6 Properly remove c++filt.
The c++filt binary is only installed if ${MK_GCC} == yes && ${MK_CXX} ==
yes. This means that it should be removed if ${MK_GCC} == no ||
${MK_CXX} == no. In its current form, it actually uses a conjunction
instead of a disjunction.

As there is already a separate block for ${MK_CXX} == no listing
c++filt, simply remove the conditional entirely.

Approved by:	re (gjb)
2013-09-14 22:09:10 +00:00
Edward Tomasz Napierala 009ea47eb2 Bring in the new iSCSI target and initiator.
Reviewed by:	ken (parts)
Approved by:	re (delphij)
Sponsored by:	FreeBSD Foundation
2013-09-14 15:29:06 +00:00
Hiren Panchasara 9a01d0a5b4 We are exceeding default limit (256) of bracket nesting and clang does not like
it. We should probably fix the code but appeasing clang with this fix for now.
gcc does not have such limit.

Reviewed by:	jmg
Approved by:	re (hrs), sbruno (mentor, implicit)
2013-09-12 02:31:32 +00:00
Dag-Erling Smørgrav 0d410def34 Clean up the Kerberos build by turning libheimipcc and libheimipcs into
private shared libraries, instead of hacked-together archives of PIC
objects.  This makes it possible to build a static libkrb5 that works.

Reviewed by:	stas
Approved by:	re (gjb)
2013-09-10 18:40:43 +00:00
Dag-Erling Smørgrav be460ad56d Make this more deterministic by sorting the libraries before processing
them and ensuring that we always use the samme collation rules.

Approved by:	re (gjb)
2013-09-10 18:34:38 +00:00
Ed Maste 50185946a4 Add a sendfile regression test for transmit length > file size.
This test identified the issue fixed in FreeBSD-SA-13:11.sendfile.

Sponsored by:	The FreeBSD Foundation
Approved by:	re (glebius)
2013-09-10 13:51:19 +00:00
Antoine Brodin 655f887f92 Adjust optional obsolete files with new MK_GNUCXX 2013-09-07 19:04:28 +00:00
Antoine Brodin 3d8a28c36d Do not try to remove directories that are part of BSD.include.dist 2013-09-07 11:02:38 +00:00
Gleb Smirnoff 8031489c7a Add more leftovers from gcc. 2013-09-07 09:45:43 +00:00
Niclas Zeising 1ff238b888 Add WITH_GCC alongside WITHOUT_GCC.
Remove the comment from WITHOUT_GCC about this not working without an
alternate toolchain, we have clang now.
2013-09-06 20:49:48 +00:00
David Chisnall a5bfe4486c Don't delete c++filt when doing a make delete-old if GCC is not built but
C++ is.
2013-09-06 20:46:07 +00:00
David Chisnall 52b42bace1 On platforms where clang is the default compiler, don't build gcc or libstdc++.
To enable them, set WITH_GCC and WITH_GNUCXX in src.conf.
Make clang default to using libc++ on FreeBSD 10.
Bumped __FreeBSD_version for the change.

GCC is still enabled on PC98, because the PC98 bootloader requires GCC to build
(or, at least, hard-codes the use of gcc into its build).

Thanks to everyone who helped make the ports tree ready for this (and bapt
for coordinating them all).  Also to imp for reviewing this and working on the
forward-porting of the changes in our gcc so that we're getting to a much
better place with regard to external toolchains.

Sorry to all of the people who helped who I forgot to mention by name.

Reviewed by:	bapt, imp, dim, ...
2013-09-06 20:08:03 +00:00
Jilles Tjoelker ef70de180c libc/stdio: Allow fopen/freopen modes in any order (except initial r/w/a).
Austin Group issue #411 requires 'e' to be accepted before and after 'x',
and encourages accepting the characters in any order, except the initial
'r', 'w' or 'a'.

Given that glibc accepts the characters after r/w/a in any order and that
diagnosing this problem may be hard, change our libc to behave that way as
well.
2013-09-06 13:47:16 +00:00
Jilles Tjoelker 366f0c9f45 libc/stdio: Run mkostemp test using prove. 2013-09-06 12:59:48 +00:00
Jilles Tjoelker e32a0090d8 libc/stdio: Provide proper TAP output for fmemopen/open_[w]memstream.
A *.t file should provide Test Anything Protocol output so that it can be
run using the Perl "prove" tool.
2013-09-06 12:56:49 +00:00
Jilles Tjoelker 2935c4cc5e sh: Make return return from the closest function or dot script.
Formerly, return always returned from a function if it was called from a
function, even if there was a closer dot script. This was for compatibility
with the Bourne shell which only allowed returning from functions.

Other modern shells and POSIX return from the function or the dot script,
whichever is closest.

Git 1.8.4's rebase --continue depends on the POSIX behaviour.

Reported by:	Christoph Mallon, avg
2013-09-04 22:10:16 +00:00
Ian Lepore dbcdf3225a Fix a compiler warning about signed vs unsigned compare. 2013-09-01 14:06:57 +00:00
Jilles Tjoelker 65519ccb4d sh: Recognize "--" as end of options in type builtin.
This implementation makes minimal changes: command names starting with "-"
(other than "--") can still be queried normally.
2013-08-30 12:09:59 +00:00
Andreas Tobler e9fb2ea069 Remove GNU_PATCH leftover. 2013-08-29 11:40:45 +00:00
Pedro F. Giffuni 4b97b38825 Drop build option switch for the older GNU patch.
As promised, drop the option to make the older GNU patch
the default.

GNU patch is still being built but something drastic may
happen to it to it before Release.
2013-08-29 00:38:24 +00:00
Devin Teske a5aa00fbae Formally remove WITH_BSDCONFIG build option and re-generate src.conf.5
NOTE: Should have been inline with revisions 252862 and 254958.
2013-08-27 16:30:50 +00:00
Antoine Brodin e434cacb66 Add more obsolete files. 2013-08-26 17:21:40 +00:00
Antoine Brodin 8f4c73b41f Document WITHOUT_ICONV, WITH_LIBICONV_COMPAT and WITH_USB_GADGET_EXAMPLES 2013-08-26 17:15:56 +00:00
Jilles Tjoelker ffeed88842 Fix fcntl F_GETFL F_SETFL for files opened execute-only (O_EXEC).
The FFLAGS and OFLAGS now work correctly also for files opened with O_EXEC.
Except possibly fuse, the other users pass values without O_EXEC set. fuse
appears to assume O_EXEC is handled correctly.

Although F_SETFL may not be commonly used for execute-only file descriptors,
F_GETFL may be useful to find the access mode.
2013-08-25 21:52:04 +00:00
Jean-Sébastien Pédron 0adf4921fb drm/radeon: Import the Radeon KMS driver
This driver is based on Linux 3.8 and a previous effort by kan@.

More informations about this project can be found on the FreeBSD wiki:
    https://wiki.freebsd.org/AMD_GPU

The driver is split into:

  sys/dev/drm2:
    The driver sources.

  sys/modules/drm2/radeonkmw:
    The driver main kernel module's Makefile.

  sys/modules/drm2/radeonkmsfw:
    All firmware kernel module Makefiles. There's one directory and one
    Makefile for each firmware.

  sys/contrib/dev/drm2/radeonkmsfw:
    All firmware binary sources.

  tools/tools/drm/radeon
    Tools to update firmwares or regenerate some headers.

Merging the driver to FreeBSD 9.x may be possible but not a priority for
now.

Help from:	kib@, kan@
Tested by:	avg@, kwm@, ray@,
		Alexander Yerenkow <yerenkow@gmail.com>,
		Anders Bolt-Evensen <andersbo87@me.com>,
		Denis Djubajlo <stdedjub@googlemail.com>,
		J.R. Oldroyd <fbsd@opal.com>,
		Mikaël Urankar <mikael.urankar@gmail.com>,
		Pierre-Emmanuel Pédron <pepcitron@gmail.com>,
		Sam Fourman Jr. <sfourman@gmail.com>,
		Wade <wade-is-great@live.com>,
		(probably other I forgot...)
HW donations:	kyzh, Yakaz
2013-08-25 19:37:15 +00:00
Jean-Sébastien Pédron a435cf5cd5 drm: Update drm_pciids.h based on Linux 3.8
This header can be easily updated using the new "gen-drm_pciids" script,
available in tools/tools/drm. The script uses the Linux' drm_pciids.h
header for new IDs, the FreeBSD's one because we add the name of the
device to each IDs, and the PCI IDs database (misc/pciids port) to fill
this name automatically for new IDS.

To call the script:
  tools/tools/drm/gen-drm_pciids					\
    /path/to/linux/drm_pciids.h						\
    /path/to/freebsd/drm_pciids.h					\
    /path/to/pciids/pci.ids
2013-08-25 12:20:57 +00:00
Jilles Tjoelker 71828da5ff sh: Recognize "--" as end of options in alias builtin.
Aliases starting with "-" (which are non-POSIX) will need to be preceded by
an alias not starting with "-" or the newly added "--".
2013-08-25 11:42:53 +00:00
Jilles Tjoelker 3cfb11c41a sh: Disallow empty simple commands.
As per POSIX, a simple command must have at least one redirection,
assignment word or command word.

These occured in rare cases such as  eval "f()" .

The extension of allowing no commands inside { }, if, while, for, etc.
remains.
2013-08-25 10:57:48 +00:00
Jilles Tjoelker 7e6e930d1e sh: Reject ++ and -- in arithmetic.
POSIX does not require ++ and -- in arithmetic. It is probably more useful
to reject them than to treat ++x and --x as x silently.

Note that the behaviour of increment and decrement can be obtained via
(x+=1), ((x+=1)-1), (x-=1) and ((x-=1)+1).

PR:		bin/176444
2013-08-24 20:06:00 +00:00
Konstantin Belousov 7291e2a320 Add simple test for the read/write/lseek on posix shm filedescriptor.
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
2013-08-21 17:47:11 +00:00
Bjoern A. Zeeb 89ee862616 Catch up with various changes to if_data and make this compile again
on HEAD.  Seems to be one of the the only tools giving us access to
ifi_baudrate and ifi_baudrate_pf values.

MFC after:	3 days
2013-08-20 14:37:06 +00:00
Jilles Tjoelker f0ef49bbf4 sh: Recognize "--" as end of options in bg/fg/jobid builtins. 2013-08-16 13:56:43 +00:00
Jilles Tjoelker 4fe1afd789 sh: Add test for the non-standard jobid builtin. 2013-08-16 13:48:11 +00:00
Jilles Tjoelker fcaac274c0 Add tests for dup3(). 2013-08-16 13:16:55 +00:00
Jilles Tjoelker 056fd329b9 sh: Recognize "--" as end of options in local builtin. 2013-08-14 21:59:48 +00:00
Jilles Tjoelker adc2e8dfb4 sh: Allow a lone redirection before '|', ';;' or ';&'.
Example: </dev/null | :

PR:		181240
MFC after:	1 week
2013-08-14 19:34:13 +00:00
Peter Wemm 0ff204bbd1 The iconv in libc did two things - implement the standard APIs, the GNU
extensions and also tried to be link time compatible with ports libiconv.
This splits that functionality and enables the parts that shouldn't
interfere with the port by default.

WITH_ICONV (now on by default) - adds iconv.h, iconv_open(3) etc.
WITH_LIBICONV_COMPAT (off by default) adds the libiconv_open etc API, linker
symbols and even a stub libiconv.so.3 that are good enough to be able
to 'pkg delete -f libiconv' on a running system and reasonably expect it
to work.

I have tortured many machines over the last few days to try and reduce
the possibilities of foot-shooting as much as I can.  I've successfully
recompiled to enable and disable the libiconv_compat modes, ports that use
libiconv alongside system iconv etc.  If you don't enable the
WITH_LIBICONV_COMPAT switch, they don't share symbol space.

This is an extension of behavior on other system.  iconv(3) is a standard
libc interface and libiconv port expects to be able to run alongside it on
systems that have it.

Bumped osreldate.
2013-08-13 07:15:01 +00:00
Hans Petter Selasky f7b25aedae Fix some signed comparison compile warnings. 2013-08-12 09:15:33 +00:00
Jilles Tjoelker 88dae73d36 fnmatch(): Add test for r254091 (pattern with single backslash).
This test cannot be converted to an sh(1) test because the syntax would be
invalid.

PR:		181129
MFC after:	1 week
2013-08-11 21:54:20 +00:00
Hans Petter Selasky 8030839bd2 Initial commit of my USB test code which can exercise connected USB
devices and the FreeBSD USB stack itself. This program can be used to
test compliance against well established usb.org standards, also
called chapter-9 tests. The host platform can act as either USB device
or USB host depending on the available hardware. The basic USB
communication happens through FreeBSD's own libusb v2, and some
sysctls are also used to invoke specific error conditions. This test
program can be used to verify correct operation of external USB
harddisks under heavy load and various other conditions. The software
is driven via a simple command line interface. Main supported USB host
classes are "USB mass storage" and "USB modems".
2013-08-09 20:08:42 +00:00
Jilles Tjoelker 65ba8dff5f Add mkostemp() and mkostemps().
These are like mkstemp() and mkstemps() but allow passing open(2) flags like
O_CLOEXEC.
2013-08-09 17:24:23 +00:00