Commit Graph

14562 Commits

Author SHA1 Message Date
Kyle Evans
cab7d341dc bsdgrep: switch to libregex for GNU_GREP_COMPAT
libregex is incomplete, but it's a bit less buggy than the in-base
libgnuregex and mostly OK.

While here, rename -DIWTH_GNU -> -DWITH_GNU_COMPAT; the option implies
that we're compatible with the GNU counterpart, not that we're including GNU
anything.
2020-08-04 02:47:24 +00:00
Stefan Eßer
f022d2cd17 Connect the tests provided with the new bc and dc
The tests compare the command output (including of error cases) with the
expected output and exit code.

Not all tests are executed, since some expect to have a known good bc and
dc binary installed and compare results of large amounts of generated data
being processed by both versions to test for regressions.
2020-08-03 20:26:04 +00:00
Stefan Eßer
2ead2969a0 Upgrade to version 3.1.4
This version omits the printing of a copyright header in interactive mode
and the dc command now exits after execution of the commands passed via -e
or -f instead of switching to interactive mode. To pass further commands
via STDIN when dc has been invoked with -e or -f, add "-f -" to the
parameter list.
2020-08-03 19:18:38 +00:00
Mateusz Piotrowski
ea27bce336 Document automatic handling of font height for BDF files
PR:		248395
Submitted by:	Dmitry Wagin <dmitry.wagin@ya.ru>
Reviewed by:	bcr, emaste, tsoome
Differential Revision:	https://reviews.freebsd.org/D25907
2020-08-02 16:41:36 +00:00
Kyle Evans
98369a6980 sed: fix hex_subst test after after r363679
r363679 is in-fact the future change referenced by the comment, helpfully
left and forgotten by kevans. Instead of just silently not matching, we
should now be erroring out with vigor.
2020-07-30 13:36:24 +00:00
Kyle Evans
ac05de1788 diff: fix side_by_side after r363679
It's currently unclear to me how this could have worked previously; \n here
is not a literal newline but actual '\' 'n', and was getting passed to the
underlying regex engine as such. regex(3) does not translate this to a
newline, and this became an error because we don't really allow escaping
of arbitrary ordinary characters anymore.

Run the pattern strings through printf to make sure we're dealing with real
newlines before passing them through to atf_check, which ultimately feeds
them directly to regcomp(3).

This fix is different than that will be needed for sed, in that this is the
proper way to inject newlines into search strings as long as regex(3)
won't combine \ + n as folks might expect.

Reported by:	Jenkins via lwhsu
MFC after:	1 week
2020-07-30 13:33:45 +00:00
Daniel Ebdrup Jensen
ee49c1d3e5 Add my entry to the calendar file
As part of onboarding, ensure that I'm listed in the FreeBSD calendar file,
while listening to Don't Take Away The Music by Tavares.

Reviewed by:	0mp, bcr
Approved by:	0mp (mentor), allanjude (mentor)
Differential Revision:	D25856
2020-07-29 11:19:57 +00:00
Fernando Apesteguía
bdfea496cf comm(1): Add EXAMPLES section
Add two very simple examples.

Approved by:	manpages (gbe@)
Differential Revision: https://reviews.freebsd.org/D25344
2020-07-27 16:51:23 +00:00
Fernando Apesteguía
c2895f1934 truncate(1): Add EXAMPLES section
Add four simple examples showing the use of -c, -r and -s

Approved by:	manpages (bcr@)
Differential Revision: https://reviews.freebsd.org/D25774
2020-07-27 15:25:04 +00:00
Ian Lepore
336ab722d2 Describe the value in the 're' column of vmstat(8) in terms of freebsd's vm
implementation.  The old description was left over from the 4.4 BSD Lite
import in 1994, and was a bit misleading (not all arches use simulated
reference bits, some implement reference tracking in hardware).
2020-07-26 18:33:29 +00:00
Ian Lepore
e9c003e51a Remove commented-out lines describing the old never-implemented -t option.
In 2018, r338094 removed the commented-out code for supporting the -t
command line option which had been present since the BSD 4.4 Lite import,
but was never implemented for freebsd.

This does the same for the man page.
2020-07-26 17:50:39 +00:00
Yuri Pankov
14fdf16371 sed: treat '[' as ordinary character in 'y' command
'y' does not handle bracket expressions, treat '[' as ordinary character
and do not apply bracket expression checks (GNU sed agrees).

PR:		247931
Reviewed by:	pfg, kevans
Tested by:	antoine (exp-run), Quentin L'Hours <lhoursquentin@gmail.com>
Differential Revision:	https://reviews.freebsd.org/D25640
2020-07-26 09:15:05 +00:00
Fernando Apesteguía
f8f51b49d8 netstat(1): Add EXAMPLES section
* Add small EXAMPLES section
* Fix warning reported by mandoc (./netstat.1:747:2: WARNING: skipping paragraph
  macro: Pp before Ss)

Approved by:	manpages (gbe)
Differential Revision: https://reviews.freebsd.org/D25212
2020-07-21 16:17:23 +00:00
Craig Leres
c4cbf1fbab Fix some regressions with the zgrep(1) wrapper.
- Handle whitespace with long flags that take arguments:

	echo 'foo bar' > test
	zgrep --regexp='foo bar' test

 - Do not hang reading from stdin with patterns in a file:

	echo foobar > test
	echo foo > pattern
	zgrep -f pattern test
	zgrep --file=pattern test

 - Handle any flags after -e:

	echo foobar > test
	zgrep -e foo --ignore-case < test

These two are still outstanding problems:

 - Does not handle flags that take an argument if there is no
   whitespace:

	zgrep -enfs /etc/rpc

 - When more than one -e pattern used matching should occur for all
   patterns (similar to multiple patterns supplied with -f file).
   Instead only the last pattern is used for matching:

	zgrep -e rex -e nfs /etc/rpc

   (This problem is masked in the unpatched version by the "any
   flags after -e" problem.)

Add tests for the above problems.

Update the mange and add references to gzip(1) and zstd(1) and also
document the remaining known problems.

PR:		247126
Approved by:	markj
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D25613
2020-07-20 23:57:53 +00:00
Simon J. Gerraty
e17f5b1d30 Oops missed Makefile.config 2020-07-19 23:54:00 +00:00
Allan Jude
4c0fab716a at(1): Markup environment variables with proper macros
Submitted by:	debdrup
Reported by:	0mp
Reviewed by:	imp
Sponsored by:	Klara Inc.
Differential Revision:	https://reviews.freebsd.org/D25721
2020-07-19 14:42:13 +00:00
Allan Jude
f4cf731d1a at(1): Fix location of at(1) crontab
With r318443, atrun was moved from /etc/crontab to /etc/cron.d/at,
but the man-page was unfortunately not updated to reflect this.

PR:		248048
Submitted by:	debdrup
Reported by:	yoitsmeremember+fbsd at gmail.com
Reviewed by:	Pau Amma <pauamma at gundo.com>
Sponsored by:	Klara Inc.
Differential Revision:	https://reviews.freebsd.org/D25709
2020-07-17 20:43:00 +00:00
Alex Richardson
0fd54da0b0 Allow install(1)'s create_tempfile() to work on Linux hosts
GLibc expects six 'X' characters in the mkstemp template argument and
will return EINVAL otherwise.

Reviewed By:	emaste, imp, mjg
Differential Revision: https://reviews.freebsd.org/D25662
2020-07-15 17:24:39 +00:00
Alex Richardson
00c61a3b43 Allow bootstrapping localdef on non-FreeBSD systems
The current localedef simply assumes that the locale headers on build system
are compatible with those on the target system which is not necessarily true.
It generally works on FreeBSD (as long as we don't change the locale headers),
but Linux and macOS provide completely different locale headers.

This change adds new bootstrap headers that namespace certain xlocale
structures defined or used by in the headers that localdef needs.
This is required since system headers *must* be able to include the "real"
locale headers for printf(), etc., but we also want to access the target
systems's internal locale structures.

Reviewed By: yuripv, brooks
Differential Revision: https://reviews.freebsd.org/D25229
2020-07-15 12:07:59 +00:00
Alex Richardson
2becc9efb5 Add missing newline and return in localedef error message
I hit those error messages when using a localedef built against headers
that don't match the target system (cross-building from a Linux host).
This problem will be fixed in the next commit.
2020-07-15 12:07:53 +00:00
Yuri Pankov
13858b8824 top: VIS_SAFE turned out to be unsafe
Unset VIS_SAFE flag as it turned out to be actually unsafe
for continuos top display as it's passing through sequences
resulting cursor movement (backspace, tab, carriage-return),
and explicitly set VIS_TAB for the same reason.

Reported by:	Mark Millard <marklmi@yahoo.com>, swills
Tested by:	Mark Millard <marklmi@yahoo.com>, swills
2020-07-14 22:43:40 +00:00
Jung-uk Kim
b53bb29fed MFV: r362513
Update byacc to 20200330.
2020-07-14 01:54:24 +00:00
Oleksandr Tymoshenko
e331252340 Fix invalid VHDX generation for image larger than 4Gb
- Part of BAT payload location was lost due to invalid
    BAT entry encoding type (32 bits instead of 64 bits)
- The sequence of PB/SB entries in BAT was broken due to
    off-by-one index check. It worked for smaller than
    4Gb because there were no SB entries in BAT.

MFC after:	1 day
2020-07-13 02:24:31 +00:00
Yuri Pankov
e4bfd2a675 sed/multi_test: print comment for current test, not next one
This is visible when e.g. 8.20 is failing:

not ok 96 8.20 # \ in y command

8.20's comment should be '[ as an s delimiter and its escapes'.
2020-07-13 01:32:37 +00:00
Eugene Grosbein
57f09d08c6 install(1): another correction after r363064
Make sure we call fsync(2) on strip result
in case of "safecopy" and "strip -o tempcopy -- src"
before renaming tempcopy to destination.

MFC after:	3 weeks
X-MFC-With:	r363064
2020-07-12 20:59:52 +00:00
Simon J. Gerraty
3841c28717 Update to bmake-20200710
Key changes include reduced noise at end of failed build log
and avoid evaluation of unnecessary terms in conditionals.
In META MODE; a target flagged .META is out-of-date if meta file
is missing

MFC after:      1 week
2020-07-12 01:11:48 +00:00
Michael Reifenberger
4b9ac8a0a6 Handle device removal and removal+add cases to fix infinity rate.
PR:		219829
Submitted by:	ota@j.email.ne.jp
Reported by:	rezo@live.cn
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D25226
2020-07-11 13:56:36 +00:00
Eugene Grosbein
a0b083fbda Fix the tests for install(1): add support for STRIPBIN's -o option.
Reported by:	lwhsu
MFC after:	1 week
2020-07-10 22:59:26 +00:00
Eugene Grosbein
cd88eaa5b4 install(1): addition to r363067
Also, make it not break if STRIPBIN points to strip version without -o support
and destination does not exist before installing.

Reported by:	lwhsu
MFC after:      1 month
X-MFC-With:     363064
2020-07-10 17:42:22 +00:00
Eugene Grosbein
8ce741ca77 install(1): correction after r363064
Make it not break if STRIPBIN points to strip version without -o support.
In that case, perform extra copy just like before r363064.

MFC after:	1 month
X-MFC-With:	363064
2020-07-10 00:45:34 +00:00
Eugene Grosbein
2d68fac9bd Optimize install(1) a bit.
Currently, "install -s -S" behaviour is inefficient for upgrade.
First it finds that destination file already exists and copies
source file to temporary file. Then it calls strip(1)
with name of temporary file as single agrument and our strip(1) creates
another temporary file in the /tmp (or TMPDIR) making another copy
that is finally copied to DESTDIR third time.

Meantime, strip(1) has an option "-o dst" to specify destination
so install(1) is allowed to skip initial copying from obj to DESTDIR.
This change makes it do so.

Take a look at https://reviews.freebsd.org/D25551 for details
and efficiency numbers (in short: upto 32% gained for installword).

MFC after:		1 month
Differential Revision:	https://reviews.freebsd.org/D25551
2020-07-10 00:24:42 +00:00
Mark Johnston
aa949e8ace whois: Handle referrals to rwhois servers.
PR:		243862
Submitted by:	ben@desync.com
Differential Revision:	https://reviews.freebsd.org/D25156
2020-07-09 17:27:14 +00:00
Simon J. Gerraty
9093286b6a Revert r363031 2020-07-09 03:46:07 +00:00
Simon J. Gerraty
2d147b4741 Update to bmake-20200704
Key changes include reduced noise at end of failed build log
and avoid evaluation of unnecessary terms in conditionals.

MFC after:	1 week
2020-07-08 21:20:12 +00:00
Greg Lehey
565a5f040f Be more precise about Percy Grainger's place of birth. 2020-07-08 01:47:20 +00:00
Fernando Apesteguía
2fe5e736c9 timeout(1): Add EXAMPLES section
Small EXAMPLES section showing the use of -s, -k and the different exit values

Approved by:	manpages (gbe)
Differential Revision:	https://reviews.freebsd.org/D25575
2020-07-07 17:02:23 +00:00
Fernando Apesteguía
50f54daf41 time(1): Add EXAMPLES section
Add EXAMPLES showing all five flags: -a, -h, -l, -o, -p

Approved by:	manpages (bcr)
2020-07-07 16:07:39 +00:00
Stefan Eßer
3aa99676b4 Update to version 3.1.1
This version fixes a regression with regard to tradtional behavior of the
non-standard FreeBSD option "-e". In the previous version "-e quit" caused
bc to exit before any computations had been performed, since all -e option
parameters were concatenated and parsed as a whole, with quit causing the
program to exit as soon as it was parsed. This version parses and executes
commands passed with -e one by one and only exits after all prior commands
have been executed.

This commit is not a SVN merge, since the vendor import had been performed
after the import to contrib. Instead the contents of contrib/bc has been
removed and the new version is copied over unchanged from vendor/bc/dist.
2020-07-07 07:51:09 +00:00
Pawel Biernacki
43ec732a2c truss: print more information about traced sysctls
MFC after:	2 weeks
Sponsored by:	Mysterious Code Ltd.
2020-07-05 19:53:54 +00:00
Ed Maste
957a8d7e74 bc: disable -flto on powerpc64
Previously bc segfaulted at start, on powerpc64.

PR:		247738
Submitted by:	luporl
Reported by:	pkubaj
MFC after:	1 week
2020-07-03 20:32:53 +00:00
Greg Lehey
22335c3c63 Use canonical description for Schlacht bei Königgrätz, add year. 2020-07-02 22:59:05 +00:00
Fernando Apesteguía
5dbd4b8e96 printf(1): Add EXAMPLES section
* Small addition with four simple examples
 * While here, remove three obsolete .Tn macros

Approved by:	manpages (gbe)
Differential Revision:	https://reviews.freebsd.org/D25462
2020-07-01 16:33:32 +00:00
Fernando Apesteguía
ac2adfb86d hexdump(1): Add EXAMPLES section
* Add examples showing the use of -f, -C, -s, -n
 * Rework the two already present examples that were *format* examples
 * Remove .Tn suggested by mandoc(1)
 * Remove reference to gdb(1) since it is not present in current

Approved by:	manpages (gbe)
Differential Revision:	https://reviews.freebsd.org/D25406
2020-06-29 15:15:14 +00:00
Dimitry Andric
874d8270d9 Fix llvm-strings.1 not installing, this was a copy/paste error.
MFC after:	3 weeks
2020-06-28 18:02:51 +00:00
Dimitry Andric
62cfcf62f6 Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
llvmorg-10.0.1-rc2-0-g77d76b71d7d.

Also add a few more llvm utilities under WITH_CLANG_EXTRAS:

* llvm-dwp, a utility for merging DWARF 5 Split DWARF .dwo files into
  .dwp (DWARF package files)
* llvm-size, a size(1) replacement
* llvm-strings, a strings(1) replacement

MFC after:	3 weeks
2020-06-28 07:43:43 +00:00
Konstantin Belousov
5211c24ddf top: do not try to use sysctl machdep.smp_active.
The sysctl was removed by r76078 in 2001.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2020-06-28 00:29:21 +00:00
Stefan Eßer
252884ae7e Import new 2-clause BSD licenced implementation of the bc and dc commands
These implementations of the bc and dc programs offer a number of advantages
compared to the current implementations in the FreeBSD base system:

- They do not depend on external large number functions (i.e. no dependency
  on OpenSSL or any other large number library)

- They implements all features found in GNU bc/dc (with the exception of
  the forking of sub-processes, which the author of this version considers
  as a security issue).

- They are significantly faster than the current code in base (more than
  2 orders of magnitude in some of my tests, e.g. for 12345^100000).

- They should be fully compatible with all features and the behavior of the
  current implementations in FreeBSD (not formally verified).

- They support POSIX message catalogs and come with localized messages in
  Chinese, Dutch, English, French, German, Japanese, Polish, Portugueze,
  and Russian.

- They offer very detailed man-pages that provide far more information than
  the current ones.

The upstream sources contain a large number of tests, which are not
imported with this commit. They could be integrated into our test
framework at a latter time.

Installation of this version is controlled by the option "MK_GH_BC=yes".
This option will be set to yes by default in 13-CURRENT, but will be off
by default in 12-STABLE.

Approved by:	imp
Obtained from:	https://git.yzena.com/gavin/bc
MFC after:	4 weeks
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D19982
2020-06-27 12:02:01 +00:00
Dimitry Andric
bd74205d6a Regenerate ReStructuredText based manpages for llvm-project tools:
* bugpoint.1
* clang.1
* llc.1
* lldb.1
* lli.1
* llvm-ar.1
* llvm-as.1
* llvm-bcanalyzer.1
* llvm-cov.1
* llvm-diff.1
* llvm-dis.1
* llvm-dwarfdump.1
* llvm-extract.1
* llvm-link.1
* llvm-mca.1
* llvm-nm.1
* llvm-pdbutil.1
* llvm-profdata.1
* llvm-symbolizer.1
* llvm-tblgen.1
* opt.1

Add newly generated manpages for:

* llvm-addr2line.1 (this is an alias of llvm-symbolizer)
* llvm-cxxfilt.1
* llvm-objcopy.1
* llvm-ranlib.1 (this is an alias of llvm-ar)

Note that llvm-objdump.1 is an exception, as upstream has both a plain
.1 file, and a .rst variant. These will have to be reconciled upstream
first.

MFC after:	3 days
2020-06-27 11:56:49 +00:00
Fernando Apesteguía
c842df4889 killall(1): Clarify -d, -s and -v options
-d and -v are not equivalent options. The former is more verbose than the
latter and the former does not actually send the signals while the latter does.
Let them have their own paragraphs.

From the point of view of the output, -v is equivalent to -s, so describe them
close to each other. The difference is that former actually sends the signals
and the latter doesn't.

PR:	247411
Approved by:	manpages(0mp)
Differential Revision:	https://reviews.freebsd.org/D25413
2020-06-27 11:28:11 +00:00
Fernando Apesteguía
fe5bc3e6af rev(1): Add EXAMPLES section
Very simple example.

Approved by:	imp, 0mp, manpages(bcr)
Differential Revision:	https://reviews.freebsd.org/D25468
2020-06-27 11:19:18 +00:00