Commit Graph

11926 Commits

Author SHA1 Message Date
junovitch
e0c87f092c - Add myself to the calendar.freebsd. (fix typo in r286160)
Approved by:	delphij (mentor)
Differential Revision:	https://reviews.FreeBSD.org/D3265
2015-08-01 17:48:35 +00:00
junovitch
7bb576a715 - Add myself to the committers-ports.dot and add my mentor relationship.
- Add myself to the calendar.freebsd.

Approved by:	delphij (mentor)
Differential Revision:	https://reviews.FreeBSD.org/D3265
2015-08-01 17:29:52 +00:00
jmg
fe67f23dc9 use : instead of true...
Change file file to file1 file2, partly for igor, and partly because
it's odd to pass the same file to a command twice..
2015-08-01 17:27:47 +00:00
pfg
f8fda3f34a Buffer overflow in wall(1).
Revert r286102 and apply a cleaner fix.
Tested for overflows by FORTIFY_SOURCE GSoC (with clang).

Suggested by:	bde
Reviewed by:	Oliver Pinter
Tested by:	Oliver Pinter
MFC after:	3 days
2015-08-01 01:29:55 +00:00
emaste
7f7ef40411 Use standard 'THE AUTHOR' license text
Approved by:	jmg
2015-07-31 16:45:42 +00:00
pfg
8597d814df Buffer overflow in wall(1).
This affected syslogd, wall and talkd.
Detected by FORTIFY_SOURCE GSoC (with clang).

Submitted by:	Oliver Pinter
Differential Revision:	https://reviews.freebsd.org/D3254
Reviewed by:	delphij, jmg
MFC after:	3 days
2015-07-31 01:12:31 +00:00
rodrigc
110b4521d0 Use correct number of arguments to semctl() for IPC_RMID.
PR:			118292
Submitted by:		araujo
Differential Revision:	D2669
2015-07-30 19:44:46 +00:00
rodrigc
419fdebf3d Get function prototypes for msg, shm, sem functions
from header files.

Differential Revision: D2669
2015-07-30 18:59:01 +00:00
rodrigc
dbb8ff8d3f Make some variables and functions static. 2015-07-30 18:08:08 +00:00
emaste
32e34ac2b5 Allow ELF Tool Chain elfcopy to be installed as objcopy
ELF Tool Chain elfcopy is nearly a drop-in replacement for GNU objcopy,
but does not currently support PE output which is needed for building
x86 UEFI bits.

Add a src.conf knob to allow installing it as objcopy and set it by
default for aarch64 only, where we don't have a native binutils.

Reviewed by:	bapt
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D2887
2015-07-29 18:45:38 +00:00
emaste
e700d1d058 ar: Fix deterministic mode default with options other than -q or -r
Reported by:	jhibbits
Reviewed by:	jhibbits
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D3237
2015-07-29 17:34:26 +00:00
emaste
25c00d1c25 ar: enable deterministic mode by default
Ar cannot handle UIDs with more than 6 digits, and storing the mtime,
uid, gid and mode provides little to negative value anyhow for ar's
uses. Turn on deterministic (-D) mode by default; it can be disabled by
the user with -U.

PR:		196929
Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D3190
2015-07-29 13:36:17 +00:00
araujo
03740b1f15 Compilers will complain the usage of obsolescent variable declarations.
Also it will fix the build problem with sparc64.

Submitted by:	ed@
2015-07-29 02:21:35 +00:00
delphij
33661d0781 Fix shell injection vulnerability in patch(1) and drop SCCS
support by replacing system() with execve().

Future revisions may remove the functionality completely.

Obtained from:	Bitrig
Security:	CVE-2015-1416
2015-07-28 19:58:36 +00:00
araujo
fafebceb9b Staticfy and constify some variables and clean up the code a bit to make it
more readable. No functional change.

Differential Revision:	D3166
Reviewed by:		kib
Sponsored by:		gandi.net
2015-07-28 02:32:40 +00:00
delphij
b19c7b1b4d Rewrite scan procedure with a FSM. This improves code readability by
making clear transits between different states, and avoids bug with
handling repeated $'s.

Reviewed by:	bapt
Differential Revision: https://reviews.freebsd.org/D3221
2015-07-27 19:21:23 +00:00
bapt
58df5d4a52 Replace GNU RCS ident with a BSD license ident
Rationale: ident(1) is useful out of RCS, lot of scripts are using ident(1) and
failing when base is built WITHOUT_RCS.

This version is:
- fully compatible with RCS 5.7 ident.
- fully compatible with RCS 5.9 ident.
- passes all ident test from GNU RCS 5.9 test suite

This version has support for: svn extension for the Keyword id (double colon and
# before last $)

Différences with GNU RCS ident:
- no long options as found in GNU RCS 5.9 (but not commented there).
- '-V' reports nothing but has been added for compatibility.

Differential Revision:	https://reviews.freebsd.org/D3200
Reviewed by:	pfg
2015-07-26 11:21:36 +00:00
pfg
759686c03c Bump GCC max-inline-insns-single in libiconv_modules and grep
This is required by our FORTIFY_SOURCE implementation as it
does more inlining. As a rule of thumb, FORTIFY_SOURCE doubles
the number  of inlines except that in grep inlining
blows up for some reason.
2015-07-26 00:11:04 +00:00
emaste
c58042ff07 ar: add -U (unique) option to disable -D (deterministic) mode
This is required in order for us to support deterministic mode by
default.  If multiple -D or -U options are specified on the command
line, the final one takes precedence.  GNU ar also uses -U for this.

An equivalent change will be applied to ELF Tool Chain's version of ar.

PR:		196929
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D3175
2015-07-24 17:46:43 +00:00
emaste
0d16c6f74f truss: follow pdfork()ed descendents with -f
PR:		201276
Reported by:	David Drysdale
Reviewed by:	oshogbo
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D2976
2015-07-24 16:57:13 +00:00
emaste
faf3fc6a75 Add RISC-V ELF machine type definition
EM_RISCV is now officially registered as e_machine 243.

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-07-24 16:52:21 +00:00
bapt
883b6dee61 inode should be different to actually mean mandocdb is in used
Sponsored by:	gandi.net
2015-07-24 09:20:02 +00:00
bapt
eaa94ad7a3 Fix man -k with mandocdb
If apropos(1) and whatis(1) are not hardlinks to man(1) that means the system is
using mandocdb, then man -k should spawn apropos(1) and/or whatis(1) directly

Reported by:	kevlo
Tested by:	kevlo
Sponsored by:	gandi.net
2015-07-24 09:10:03 +00:00
markj
e613eb38bc Fix counter reads on platforms where sizeof(uint64_t) != sizeof(uint64_t *).
In the kernel, structs such as tcpstat are manipulated as an array of
counter_u64_t (uint64_t *), but made visible to userland as an array of
uint64_t. kread_counters() was previously copying the counter array into
user space and sequentially overwriting each counter with its value. This
mostly affects IPsec counters, as other counters are exported via sysctl.

PR:		201700
Tested by:	Jason Unovitch
MFC after:	1 week
2015-07-21 23:57:38 +00:00
cem
fa03c1678b patch(1): Add -Vnone option to disable backup files
Differential Revision:	https://reviews.freebsd.org/D3146
Reviewed by:	pfg
Approved by:	markj (mentor)
MFC after:	1 week
Relnotes:	yes
Sponsored by:	EMC / Isilon Storage Division
2015-07-21 22:57:27 +00:00
ed
b875818639 Unbreak "last reboot".
According to the last(1) man page, the "reboot" pseudo-user should print
all system reboot entries. This got broken by the utmpx import, as
records are typed.

Re-add support for "last reboot" by specifically matching against
SHUTDOWN_TIME and BOOT_TIME records.

PR:		168844
Submitted by:	matthew@
MFC after:	1 month
2015-07-21 10:52:05 +00:00
markj
d3a143e13f Fix some libxo format string errors in the pfkey stats code.
PR:	201700
2015-07-20 02:38:51 +00:00
des
8e2e593b27 Move assignments around to avoid a false-positive uninitialized variable
warning which broke the sparc64 build.

PR:		201585
MFC after:	3 weeks
2015-07-17 08:37:13 +00:00
des
68a5fdd04b Add a -s option which adds a column listing the connection state if
applicable (currently only for TCP).

PR:		201585
MFC after:	3 weeks
2015-07-16 13:09:21 +00:00
bapt
f5525a768b Fix trimming spaces writing at index -1 if an empty string is passed
Submitted by:	Gennady Proskurin <gprspb@mail.ru>
2015-07-15 18:49:15 +00:00
jmg
9bde258984 fix error message... errx since errno may not be set (if we didn't
parse the full field), and err and errx add their own newline at the
end...

Sponsored by:	Netflix, Inc.
2015-07-15 06:14:04 +00:00
joel
a6005902ef mdoc: add missing .El 2015-07-14 19:43:10 +00:00
bapt
d2f1cdda38 Convert atoi(3) to stronum(3) which allows to arguments and report proper errors
to the users

Obtained from:	OpenBSD
2015-07-14 19:16:14 +00:00
markm
7a0fcb2ab4 Widen the host field so that a full IPv6 address will be seen. 2015-07-14 18:53:24 +00:00
brueffer
15e50c23e5 Don't claim c99 is a wrapper around gcc; it's a wrapper around the system cc.
PR:		201303
Submitted by:	Bruce Cran
MFC after:	1 week
2015-07-13 14:13:15 +00:00
adrian
41db4b88e0 Add an initial NUMA affinity/policy configuration for threads and processes.
This is based on work done by jeff@ and jhb@, as well as the numa.diff
patch that has been circulating when someone asks for first-touch NUMA
on -10 or -11.

* Introduce a simple set of VM policy and iterator types.
* tie the policy types into the vm_phys path for now, mirroring how
  the initial first-touch allocation work was enabled.
* add syscalls to control changing thread and process defaults.
* add a global NUMA VM domain policy.
* implement a simple cascade policy order - if a thread policy exists, use it;
  if a process policy exists, use it; use the default policy.
* processes inherit policies from their parent processes, threads inherit
  policies from their parent threads.
* add a simple tool (numactl) to query and modify default thread/process
  policities.
* add documentation for the new syscalls, for numa and for numactl.
* re-enable first touch NUMA again by default, as now policies can be
  set in a variety of methods.

This is only relevant for very specific workloads.

This doesn't pretend to be a final NUMA solution.

The previous defaults in -HEAD (with MAXMEMDOM set) can be achieved by
'sysctl vm.default_policy=rr'.

This is only relevant if MAXMEMDOM is set to something other than 1.
Ie, if you're using GENERIC or a modified kernel with non-NUMA, then
this is a glorified no-op for you.

Thank you to Norse Corp for giving me access to rather large
(for FreeBSD!) NUMA machines in order to develop and verify this.

Thank you to Dell for providing me with dual socket sandybridge
and westmere v3 hardware to do NUMA development with.

Thank you to Scott Long at Netflix for providing me with access
to the two-socket, four-domain haswell v3 hardware.

Thank you to Peter Holm for running the stress testing suite
against the NUMA branch during various stages of development!

Tested:

* MIPS (regression testing; non-NUMA)
* i386 (regression testing; non-NUMA GENERIC)
* amd64 (regression testing; non-NUMA GENERIC)
* westmere, 2 socket (thankyou norse!)
* sandy bridge, 2 socket (thankyou dell!)
* ivy bridge, 2 socket (thankyou norse!)
* westmere-EX, 4 socket / 1TB RAM (thankyou norse!)
* haswell, 2 socket (thankyou norse!)
* haswell v3, 2 socket (thankyou dell)
* haswell v3, 2x18 core (thankyou scott long / netflix!)

* Peter Holm ran a stress test suite on this work and found one
  issue, but has not been able to verify it (it doesn't look NUMA
  related, and he only saw it once over many testing runs.)

* I've tested bhyve instances running in fixed NUMA domains and cpusets;
  all seems to work correctly.

Verified:

* intel-pcm - pcm-numa.x and pcm-memory.x, whilst selecting different
  NUMA policies for processes under test.

Review:

This was reviewed through phabricator (https://reviews.freebsd.org/D2559)
as well as privately and via emails to freebsd-arch@.  The git history
with specific attributes is available at https://github.com/erikarn/freebsd/
in the NUMA branch (https://github.com/erikarn/freebsd/compare/local/adrian_numa_policy).

This has been reviewed by a number of people (stas, rpaulo, kib, ngie,
wblock) but not achieved a clear consensus.  My hope is that with further
exposure and testing more functionality can be implemented and evaluated.

Notes:

* The VM doesn't handle unbalanced domains very well, and if you have an overly
  unbalanced memory setup whilst under high memory pressure, VM page allocation
  may fail leading to a kernel panic.  This was a problem in the past, but it's
  much more easily triggered now with these tools.

* This work only controls the path through vm_phys; it doesn't yet strongly/predictably
  affect contigmalloc, KVA placement, UMA, etc.  So, driver placement of memory
  isn't really guaranteed in any way.  That's next on my plate.

Sponsored by:	Norse Corp, Inc.; Dell
2015-07-11 15:21:37 +00:00
hrs
61259e66f8 - Add IPv6 support in quota(1). While rpc.rquotad has supported PF_INET6
for a long time, quota(1) utility supported only PF_INET.

- Clean up confusing changes in f_mntfromname.

- Add an entry for rquotad with rpc/udp6 to inetd.conf.

PR:	194084
2015-07-07 20:15:09 +00:00
emaste
7259ef9e7d lldb: use .PATH to find man page instead of symlinking it
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2015-07-07 18:46:41 +00:00
gnn
ea302f3ee6 New AES modes for IPSec, user space components.
Update setkey and libipsec to understand aes-gcm-16 as an
encryption method.

A partial commit of the work in review D2936.

Submitted by:	eri
Reviewed by:	jmg
MFC after:	2 weeks
Sponsored by:	Rubicon Communications (Netgate)
2015-07-03 20:09:14 +00:00
oshogbo
55d9527633 Let the nv.h and dnv.h includes be only in sys directory.
Change consumers to include those files from sys.
Add duplicated files to ObsoleteFiles.

Approved by:	pjd (mentor)
2015-07-02 21:58:10 +00:00
brueffer
5d3547e496 Add the year to the VAX-11/780 announcement entry.
PR:		200961
Submitted by:	John Marshall
MFC after:	1 week
2015-07-02 12:08:05 +00:00
jhibbits
5fcd241a6c The LDFLAGS isn't needed, and breaks the build on powerpc64.
This hack is very fragile, and was broken on powerpc64 when metamode was
introduced.  Removing it survives a buildworld for all architectures, and
fixes the build on powerpc64.
2015-06-30 06:02:42 +00:00
emaste
56f61c7a15 speed up ar(1) on UFS file systems
Fault in the buffer prior to writing to workaround poor performance due
to interaction with kernel fs deadlock avoidance code. See the comment
prior to vn_io_fault_doio() in sys/kern/vfs_vnops.c for details of the
issue.

On my stable/10 desktop with a 16MB obj.o and "ar r out.a obj.o" I see
the following run times (seconds):

x ar.r284891
+ ar.patched
+----------------------------------------------------------------------+
|+                                                                     |
|+                                                                    x|
|+                                                                   xx|
|A                                                                   |A|
+----------------------------------------------------------------------+
    N         Min          Max        Median           Avg        Stddev
x   3       1.307        1.321         1.315     1.3143333  0.0070237692
+   3       0.020        0.023         0.022   0.021666667  0.0015275252
Difference at 95.0% confidence
        -1.29267 +/- 0.0115203
        -98.3515% +/- 0.876513%
        (Student's t, pooled s = 0.00508265)

Thanks to kib for diagnosing and explaining the issue and suggesting
the workaround.

Reviewed by:	eadler, kib
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D2933
2015-06-29 13:48:44 +00:00
jmmv
60e4da1015 Only initialize libedit when necessary
The code path to support units conversions from the command line
need not initialize neither libedit nor the history.  Therefore, only do
that when in interactive mode.

This hides the issue reported in PR bin/201167 whereby running commands
of the form 'echo "$(units ft in)"' would corrupt the terminal.  The real
issue causing the corruption most likely still remains somewhere.

PR:		bin/201167
Differential Revision:	D2935
Reviewed by:	eadler
2015-06-28 16:43:07 +00:00
marcel
60975209ae Add the ntfs alias and support it with the MBR and GPT schemes
as DOSPTYP_NTFS and GPT_ENT_TYPE_MS_BASIC_DATA (resp).
2015-06-27 03:28:04 +00:00
bapt
1a23485db6 short circuit install -l rs
When requesting install(1) to only make relative symlinks, by pass all the
done to actually compute the relative symlink if the path given in argument is
already a relative path
2015-06-26 23:55:02 +00:00
marcel
5137627841 Rebase after r284658:
1.  Change creator OS to "wi2k"
2.  Bump tool version to 2.0
2015-06-21 02:55:25 +00:00
marcel
dd8725551f Microsoft Azure expects the creator OS to be "Wi2k" and not "FBSD".
The image is not accepted for provisioning otherwise. Bump the
VHD creator tool version and the version of mkimg to signify our
success in provisioning.

Note that this also imapcts the dynamic VHD images.

Tested by: gjb@
2015-06-21 02:45:31 +00:00
marcel
c1f494dd74 Rebase the fixed VHD images after the rounding fix. 2015-06-21 01:55:01 +00:00
marcel
149795a98a Microsoft Azure demands that fixed VHD images are a whole number
of megabytes. This is on top of having the image rounded to the
matching geometry of the image size.
By rounding up to the next MB after rounding to the geometry, we
lost idempotency. Subsequent calls to resize the image will keep
increasing the image size.

Tested by: gjb@
2015-06-21 01:44:27 +00:00
marcel
162b419db0 Don't resize again prior to writing. Resizing may not be idempotent
and no scheme adjusts the size after the format resized the image
the first time.
2015-06-21 01:35:32 +00:00
hrs
00e1fe8fff - Add SOCK_SEQPACKET support in UNIX-domain socket.
- Display zoneid using % notation in an IPv6 address.
- Use nitems().
- Use sstos{in,in6,un} macros to simplify casts.
- style(9).
2015-06-20 08:59:50 +00:00
tuexen
7f71799261 Don't leak sockets.
Reported by:	Coverity
CID:		1306785

MFC after:	3 days
2015-06-19 19:36:29 +00:00
tuexen
fc90da5446 Fix a bug reported by coverity. Since AF_UNIX sockets don't
have multiple addresses, the problem didn't show up during testing.

Reported by:	Coverity
CID:		1306787
2015-06-18 13:45:07 +00:00
acm
4aa7580956 - Add acm@ entry 2015-06-17 02:43:20 +00:00
sjg
852129abd1 new depends 2015-06-16 23:37:19 +00:00
imp
ebcb5143a5 Remove old fmake. It wasn't built by default for some time. Users that
really need it can find it in the devel/fmake port or pkg install fmake.
Note: This commit is orthogonal to the question 'can we fmake buildworld'.

Differential Revision: https://reviews.freebsd.org/D2840
2015-06-16 20:58:33 +00:00
sjg
d49ccf4e10 Remove extra blank lines 2015-06-15 22:04:29 +00:00
bapt
9efdecaac9 Convert to LIBADD 2015-06-15 21:20:52 +00:00
sjg
3f58070b3a Pay attention to MK_ELFTOOLCHAIN_TOOLS so we build the desired tools. 2015-06-15 20:11:15 +00:00
rodrigc
0f8ae6e2c7 Add ioctl.c, linux_syscalls.c, linux32_syscalls.c to beforedepend target.
These files need to be generated before mkdep is run.
2015-06-15 06:48:43 +00:00
rodrigc
e822fdb383 Use cpp -I$includedir
"cpp -I$1" was expanding to "cpp -Iprint"
which was not the proper directory
of header files.
2015-06-15 06:44:22 +00:00
sjg
f29bbde822 NO_WARNS when building for host 2015-06-14 03:34:09 +00:00
sjg
5a458f85ac Need to provide -I for meta mode 2015-06-14 03:32:49 +00:00
sjg
4307cae51d Create proper targets for linux*syscalls.c 2015-06-14 03:30:39 +00:00
tuexen
970120bd68 When using -L the code skips a socket if the local or foreign
address is loopback. So it is shown if both are not loopback.
The man page says that it is shown if the local or foreign
address is not loopback. Change the man page to reflect the
code.

MFC after: 3 days
2015-06-13 20:15:44 +00:00
tuexen
999c2a5123 Add support for SCTP.
MFC after: 3 days
2015-06-13 20:11:02 +00:00
tuexen
71580aec19 Allow more than one local or remote address per socket. This is needed to
support SCTP (and MPTCP in the future). No functional change for existing
protocols.

MFC after: 3 days
2015-06-13 20:05:20 +00:00
tuexen
300f572dc3 Allow more than one socket entry for a file descriptor. This is needed
for supporting 1-to-many style SCTP sockets. For other sochets, there
is no functional change.

MFC after: 3 days
2015-06-13 20:01:54 +00:00
tuexen
199422d7cb Simplify printaddr(). No functional change.
MFC after: 3 days
2015-06-13 19:56:04 +00:00
sjg
008d7c831f Add META_MODE support.
Off by default, build behaves normally.
WITH_META_MODE we get auto objdir creation, the ability to
start build from anywhere in the tree.

Still need to add real targets under targets/ to build packages.

Differential Revision:       D2796
Reviewed by: brooks imp
2015-06-13 19:20:56 +00:00
sjg
750b155101 Misc fixes from projects/bmake
Differential Revision:       D2748
Reviewed by: brooks imp
2015-06-11 21:13:05 +00:00
marcel
aa01f50402 Update tests after sizing changes to the fixed VHD format. 2015-06-11 15:19:59 +00:00
marcel
d7cd5ce73a Handle the case in which ncyls is 0.
While here, update copyright.
2015-06-11 15:18:54 +00:00
marcel
7577833480 For the fixed VHD format, round the raw image size to the next
multiple of the cylinder size. This is what qemu-img seems to
be doing. Make sure to handle boundary cases where increasing
the image size by 1 cyclinder's worth would also result in a
change of geometry.
2015-06-11 14:30:31 +00:00
sjg
f9107fd070 Use INCLUDEDIR rather than hard coded /usr/include
Differential Revision:	D2748
Reviewed by:	brooks imp
2015-06-11 14:25:53 +00:00
sjg
cead8270d4 Remove NO_OBJ
For meta mode we will want objdirs.

Differential Revision:	D2748
Reviewed by:	brooks imp
2015-06-11 04:22:17 +00:00
sjg
d1ba9a9c79 Merge bmake-20150606
Only change to bmake is man page - document .OBJDIR target.
We also get latest dirdeps.mk and friends.
> Description of fields to fill in above:                     76 columns --|
> PR:                       If a GNATS PR is affected by the change.
> Differential Revision:    https://reviews.freebsd.org/D### (*full* phabric URL needed).
> Submitted by:             If someone else sent in the change.
> Reviewed by:              If someone else reviewed your modification.
> Approved by:              If you needed approval for this commit.
> Obtained from:            If the change is from a third party.
> MFC after:                N [day[s]|week[s]|month[s]].  Request a reminder email.
> MFH:                      Ports tree branch name.  Request approval for merge.
> Relnotes:                 Set to 'yes' for mention in release notes.
> Security:                 Vulnerability reference (one per line) or description.
> Sponsored by:             If the change was sponsored by an organization.
> Empty fields above will be automatically removed.

_M   contrib/bmake
M    contrib/bmake/ChangeLog
M    contrib/bmake/Makefile
M    contrib/bmake/bmake.1
M    contrib/bmake/bmake.cat1
M    contrib/bmake/make.1
M    contrib/bmake/mk/ChangeLog
M    contrib/bmake/mk/dirdeps.mk
M    contrib/bmake/mk/gendirdeps.mk
M    contrib/bmake/mk/install-mk
M    contrib/bmake/mk/meta.stage.mk
M    contrib/bmake/mk/meta.sys.mk
M    contrib/bmake/mk/mkopt.sh
M    contrib/bmake/targ.c
M    usr.bin/bmake/Makefile
2015-06-11 04:00:22 +00:00
brueffer
bf58779d77 Correct Hawaii's admission day.
PR:		192651
MFC after:	1 week
2015-06-11 00:12:33 +00:00
sjg
7d17ddfb84 Avoid bogus MLINKS when MK_LZMA_SUPPORT=yes and MK_BSD_GREP=no 2015-06-08 23:37:17 +00:00
sjg
75a137820d dirdeps.mk now sets DEP_RELDIR 2015-06-08 23:35:17 +00:00
marcel
3f1876f2b9 Move contrib/top/top.X to contrib/top/top.xs and move
contrib/top/top.local.H to contrib/top/top.local.hs.
This fixes a build breakage when src is on a case-
insensitive file system -- we never properly create
top.x nor top.local.h. Change the makefile accordingly.

MFC after:	3 days
2015-06-08 19:45:24 +00:00
bapt
cc55e3a9e2 Readd the warning level gcc 4.2 still complains 2015-06-06 19:43:41 +00:00
bapt
6720ff676c Add const to the copyright variable
Bump WARNS to level 2
2015-06-06 13:13:39 +00:00
bapt
c910801d6a Remove WARNS keylogin build fine with clang and gcc 2015-06-06 13:09:49 +00:00
bapt
c9f807f38c Bump WARNS level to 1 2015-06-06 13:08:48 +00:00
bapt
ba5722b48c Remove unused variable 2015-06-06 13:08:31 +00:00
bapt
ae79c86934 Make global variables static
Remove WARNS from Makefile
2015-06-06 12:43:05 +00:00
bapt
a1c5faa852 Bump level WARNINGS to 3 2015-06-06 12:41:25 +00:00
bapt
b1936bdf89 Make global variables static
Remove WARNS from Makefile
2015-06-06 12:39:00 +00:00
bapt
f16e9cfbf7 Remove WARNS vtfontcvt builds find with clang and gcc with maximum level warning 2015-06-06 12:34:59 +00:00
bapt
5dab546bef Fix history 2015-06-06 12:10:10 +00:00
bapt
3bd93a83e6 Fix HISTORY and add AUTHORS section
Obtained from:	OpenBSD (by schwarze@)
2015-06-06 12:08:10 +00:00
bapt
db6d602814 Fix history, add AUTHORS section
Obtained from:	OpenBSD (by schwarze@)
2015-06-06 12:04:38 +00:00
bapt
a0ca8453de Complete documenting the HISTORY
Obtained from:	OpenBSD (by schwarze@)
2015-06-06 12:01:35 +00:00
bapt
417267fa30 Fix history (appeared in 1BSD)
Obtained from:	OpenBSD (by schwarze@)
2015-06-06 11:58:19 +00:00
bapt
1cf859bce0 Complete documenting the HISTORY of what remains of the 1BSD heritage
Obtained from:	OpenBSD (by schwarze@)
2015-06-06 11:55:35 +00:00
bapt
a8f53ac426 Fix history: colrm(1) appeared in 1BSD not 3.0BSD
Add Author section

Obtained from:	OpenBSD (change by schwarze@)
2015-06-06 11:42:43 +00:00
bapt
1ae3a71a42 Fix some clang warnings:
Add missing headers
Add parenthesis when using the result of an assignment as a condition
2015-06-05 21:45:35 +00:00
bapt
d1d1b889d9 Fix typos 2015-06-05 21:35:20 +00:00
bapt
635343e5d6 Replace the gunzip(1) system by a minimalistic zlib based implementation.
This allows to not depend on gunzip(1) at bootstrap time, and is good enough to
wait for upstream real implementation using zlib.
2015-06-03 13:32:28 +00:00
bapt
d9be45055a Switch to mandoc's version of makewhatis(8), whatis(1), apropos(1) utilities.
This change among other things improve search capabilities over the manpages
allowing fine grain query.

A new build option WITHOUT_MANDOCDB has been added to keep the ancient version
of the database and the tools. The plan is to entirely remove this option before
11.0-RELEASE.

Differential Revision:	https://reviews.freebsd.org/D2603
2015-05-30 17:41:37 +00:00
jhb
6a0a0389e1 Trim spurious colon. 2015-05-27 19:49:33 +00:00
jhb
4a4be98eae Export a list of VM objects in the system via a sysctl. The list can be
examined via 'vmstat -o'.  It can be used to determine which files are
using physical pages of memory and how much each is using.

Differential Revision:	https://reviews.freebsd.org/D2277
Reviewed by:	alc, kib
MFC after:	2 weeks
Sponsored by:	Norse Corp, Inc. (forward porting to HEAD/10)
2015-05-27 18:11:05 +00:00
sjg
65145fa4c8 Merge sync of head 2015-05-27 01:19:58 +00:00
dchagin
f1806e4235 Teach kdump to understand both linux emulation.
Differential Revision:	https://reviews.freebsd.org/D1079
Reviewed by:	emaste
2015-05-24 16:22:03 +00:00
trasz
38f5a1dde7 Advertise ctlstat(8) a little better.
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2015-05-22 11:59:37 +00:00
imp
3beb8f5711 Remove stray DEBUG_FLAGS=-g that snuck in with r184761. 2015-05-21 14:36:14 +00:00
bapt
2426717d0f Remove demandoc(1) from the build 2015-05-21 13:02:43 +00:00
bapt
e18aff02df Drop libmandoc and incorporate it into the main mandoc Makefile
This simplifies maintainance of mandoc(1).
Note that the same direction was taken on OpenBSD
2015-05-21 12:51:56 +00:00
bapt
0a58693d99 * fix roff terminology in .Nd
* remove .Xr to self
* add AUTHORS section

Submitted by:	schwarze at OpenBSD
2015-05-21 08:28:48 +00:00
bapt
7da418e1a9 add an include on sys/types.h because we do explicitly use size_t
remove unused stdbool.h

Suggested by:	schwarze at OpenBSD
2015-05-21 08:26:24 +00:00
bapt
5c514e6097 Use the POSIX PATH_MAX macro from limits.h instead of non standard MAXPATHLEN
Submitted by:	schwarze at OpenBSD
2015-05-21 08:23:45 +00:00
bapt
9bbc11a324 sort headers 2015-05-21 08:20:42 +00:00
allanjude
2ad178c529 Create links to the libprocstat man pages for all of the libprocstat functions so they can be looked up by name
Add a cross refrence to libprocstat in the procstat.1 man page

Differential Revision:	https://reviews.freebsd.org/D2578
Suggested by:	jmg
Reviewed by:	brueffer
Approved by:	wblock (mentor)
MFC after:	1 week
Sponsored by:	ScaleEngine Inc.
2015-05-21 03:32:44 +00:00
bapt
af288ae5ce Synchronize with OpenBSD
Obtained from:	OpenBSD
2015-05-18 22:40:12 +00:00
jmg
cbf08eb25f Don't do things we aren't allowed to do in a signal handler... Defer
the work to the main thread...  This fixes a possible crash if SIGINFO
is delivered at the wrong time...

This still leaves getrusage broken for some reason, but I believe that
is a kernel issue and cannot be fixed here...
2015-05-18 19:18:42 +00:00
loos
d9cd8beca4 Properly align the header and the data columns for netstat -r with and
without the -W flag.
2015-05-18 18:03:47 +00:00
loos
a416f5f996 Adjust the string format to match the actual number of arguments.
This fix a segmentation fault on ARM when netstat -r is used together with
-W.

This issue was introduced in r279122.
2015-05-17 15:12:55 +00:00
eadler
40b5caa259 ssh-copy-id: Add missing line continuation
PR:		194301
Reported by:	pkubaj@riseup.net
Patch by:	Ross Kilgariff <rosskilgariff@gmail.com>
2015-05-16 06:15:49 +00:00
bapt
10d3fc4445 Allow MANWIDTH to work with mandoc(1)
Reported by:	bdrewery
2015-05-15 15:56:28 +00:00
emaste
b8b309799a vtfontcvt: Allow 6 digits in verbose output
Some fonts (e.g. GNU Unifont) have more than 100,000 (half-)glyphs.

Sponsored by:	The FreeBSD Foundation
2015-05-14 20:17:53 +00:00
emaste
01699072e4 Add ELF machine EM_IAMCU, 32-bit Intel MCU
It is e_machine 6, which was previously reserved for 486.
2015-05-14 18:29:05 +00:00
trasz
82bbee8b66 Build GENERIC with RACCT/RCTL support by default. Note that it still
needs to be enabled by adding "kern.racct.enable=1" to /boot/loader.conf.

Differential Revision:	https://reviews.freebsd.org/D2407
Reviewed by:	emaste@, wblock@
MFC after:	1 month
Relnotes:	yes
Sponsored by:	The FreeBSD Foundation
2015-05-14 14:03:55 +00:00
fanf
2f34b1414e whois: add an option to query the PeeringDB 2015-05-14 11:37:36 +00:00
fanf
468f92a106 Update whois(1) synopsis. 2015-05-14 11:33:31 +00:00
fanf
15fa2921aa Bump whois(1) date.
(Thanks to bz@ for the reminder!)
2015-05-14 11:25:18 +00:00
fanf
961e7533e1 whois: alphabetize whois server list 2015-05-14 10:33:51 +00:00
fanf
18c4720eef whois: do not clobber command-line flags when tweaking O_NONBLOCK
This can make whois fail to follow referrals when it should.
The bug was introduced in r281959.
2015-05-14 10:33:33 +00:00
fanf
8fd803db87 whois: try whois.nic.TLD if TLD.whois-servers.net does not exist
Based on an idea from OpenBSD.
2015-05-14 10:33:01 +00:00
fanf
da775e97f7 whois: check WHOIS_SERVER as well as RA_SERVER environment variables
WHOIS_SERVER is used by Debian's whois client.
2015-05-14 10:32:35 +00:00
fanf
426168849a whois: code cleanup
Remove deprecated options.

Use pedantically correct types.
2015-05-14 10:32:05 +00:00
fanf
1e9ac2722e whois: special case certain query suffixes
This extends the existing support for -NORID handles
to include -NICAT, -ARIN, and -RIPE handles.

The suffix machinery is also used to work around a problem with
lack of referrals from the Nominet server for .uk: names under
.ac.uk need to be queried directly at JANET's whois server.
2015-05-14 10:31:37 +00:00
fanf
9a041aa829 Clean up whois manual.
Document the RA_SERVER environment variable.

Remove the obsolete -R option, and discourage people from trying
to use the Network Solutions server.

Describe the default behaviour in the DESCRIPTION section,
not buried in the options.
2015-05-14 10:30:37 +00:00
sjg
bc53a56c01 Merge bmake-20150505 improve detection of malformed conditionals. 2015-05-10 22:03:59 +00:00
bapt
8bdd359838 For half and reverse line feeds, recognize both SUSv2-style escape-digit
and BSD-style escape-control-char sequences in the input stream.

Submitted by:	schwarze at OpenBSD
Discussed with:	schwarze at OpenBSD
Obtained from:	OpenBSD
2015-05-10 11:41:38 +00:00
bapt
326a669c75 Fix about ten integer overflows and underflows and a handful of logic
errors in line number handling.

Submitted by:	ingo at OpenBSD
Discussed with:	ingo at OpenBSD
Obtained from:	OpenBSD
2015-05-08 22:11:54 +00:00
bapt
22040d2a98 Reduce the size to 64 for the commands, 512 was way too large for the purpose
Noticed by:	julian
2015-05-07 21:30:29 +00:00
glebius
f9e194c452 Printing interface names:
o Restore historical behaviour of appending '*' if interface is down,
  and we have enough space to print it (usually we don't). [1]
o Do not truncate interface names when printing in encoded format.
o Report interface flags into encoded format.

PR:		199873 [1]
Sponsored by:	Nginx, Inc.
2015-05-06 16:43:44 +00:00
bapt
87da24f6db Enlarge the buffer for storing macros as some macros can be longer than 5 2015-05-05 09:54:47 +00:00
bapt
fcab16a373 Update the list of known roff commands (adding the mdoc package)
Obtained from:	NetBSD
2015-05-05 09:50:21 +00:00
bapt
dd5948751d Properly assign open and close brackets and checks memory
Obtained from:	NetBSD
2015-05-05 09:33:32 +00:00
bapt
8224924ecc Ensure we read existing values of the stk table
Obtained from:	NetBSD
2015-05-05 09:29:32 +00:00
bapt
a7c69e6c58 Use stdup(3) and check its return instead from homebrew version using strcpy(3)
and malloc(3)

Obtained from:	NetBSD
2015-05-05 09:26:32 +00:00
bapt
7517f3fab7 cosmetic fixes
Obtained from:	NetBSD
2015-05-05 09:24:29 +00:00
bapt
d9e656c586 Apply seom style(9) fixes from NetBSD
Obtained from:	NetBSD
2015-05-05 09:01:42 +00:00
bapt
41ce620053 Prevent useless use of strdup(3)
Obtained from:	NetBSD
2015-05-05 08:25:25 +00:00
bapt
de72406be4 Replace homebrewed NIL by NULL 2015-05-05 08:17:40 +00:00
bapt
c5d7e189d1 Use stdbool instead of homebrewed boolean 2015-05-05 08:15:10 +00:00
bapt
09ff591b15 Another function to ansify 2015-05-05 07:52:41 +00:00