Commit Graph

16860 Commits

Author SHA1 Message Date
martin 0e85b4583d While we do not yet have any 64bit kernels, do not build
floppy or CD images for installation.
2021-05-25 11:55:40 +00:00
martin a8ecadd243 Provide support to build 32bit crunched ramdisks and use that for
macppc64. With help from rin.
2021-05-25 10:58:41 +00:00
christos 81aad16d1a PR/56207: Jan-Benedict Glaw: Handle error from find when removing CVS
directories on a git repo.
2021-05-24 22:40:44 +00:00
christos 42e0c9de41 refuse should exit(3). Noted by joerg@ 2021-05-24 21:34:06 +00:00
yamaguchi f0101d0e08 Add a new link-aggregation pseudo interface named lagg(4)
- FreeBSD's lagg(4) based implementation
 - MP-safe and MP-scalable
2021-05-17 04:07:41 +00:00
rillig 2999d7a951 lint: add more specific warning for bit-field of type plain 'int'
Previously, declaring a bit-field of type plain 'int' resulted in this
warning:

	warning: nonportable bit-field type 'int' [34]

This warning was too unspecific to be actionable, and until yesterday it
didn't even include the type.  In order to allow this warning to be
understood and properly fixed, describe the actual nonportability more
precisely:

	warning: bit-field of type plain 'int' has
	implementation-defined signedness [344]
2021-05-16 11:11:36 +00:00
rillig e966428344 tests/lint: add expected output for testing '&' in switch statement 2021-05-16 00:09:49 +00:00
rillig e0df50670a tests/lint: test bitwise mismatch in switch statement 2021-05-14 21:14:55 +00:00
simonb dfd617a3b0 Column alignment. 2021-05-10 14:27:47 +00:00
rin 2b8ef595e1 Add missing aiomixer.debug to fix debug build.
XXX
I *really* hope someone(TM) invent better replacement of
distrib/sets/lists...
2021-05-08 09:23:37 +00:00
nia 209f7af6d7 hook up aiomixer 2021-05-07 21:51:20 +00:00
simonb e85380d6f9 Add links for the other functions documented in arc4random(3). 2021-05-03 11:07:55 +00:00
rillig c29d5e341f tests/lint: add test for bit-field types in GCC mode 2021-05-02 21:22:09 +00:00
rillig ed02aca188 tests/lint: demonstrate missing support for __packed __aligned 2021-05-02 20:44:46 +00:00
rillig df210e12b5 tests/lint: add very basic tests for GCC __attribute__ 2021-04-30 23:49:36 +00:00
christos 587ca72b71 Add <x86/gdt.h> (we could gc now the <machine/gdt.h> files if we fix the
sources that use them.
2021-04-30 13:55:18 +00:00
christos c1a44e792d bump shlibs for bind-9.16.15 2021-04-29 17:27:54 +00:00
rin a43a5c3831 config_found_ia.9 and config_found_sm_loc.9 have been obsoleted.
Should fix build.
2021-04-28 02:15:03 +00:00
thorpej 314209004d Update autoconf(9) for recent autoconfiguration changes. 2021-04-28 00:49:22 +00:00
nia 5783e20041 add a man page for sun8icrypto(4) 2021-04-27 21:13:38 +00:00
nia 681c82ccfb ignore machine-dependent disklabel partitions 2021-04-27 19:52:06 +00:00
rillig 132c9f6004 tests/make: test the combination of -de with -j1
The test cases are the same as in opt-debug-errors.mk.  The output
differs in several details though.

Even though the option '-k' is given (which is the default for any tests
that don't override it in unit-tests/Makefile), there is no message
"(continuing)" anywhere.

The failed target is printed twice.  Once before the failed commands,
once after.  This redundancy is not necessary and may be removed in a
follow-up commit.

The printed commands are in their unexpanded form, which may or may not
be more helpful than the expanded and space-normalized form of compat
mode.  Either way, this is an unnecessary inconsistency between compat
mode and jobs mode.

In jobs mode, the message "make: stopped in $dir" is printed for each
failure, which is helpful since each of the jobs may have started in a
separate directory.
2021-04-27 16:20:06 +00:00
mrg 69931024b9 various updates for libX11. bump the shlib major, install new nls. 2021-04-27 06:50:26 +00:00
mrg 501142fe70 bump libdrm and libdrm_amdgpu shlib minor for new symbols. 2021-04-27 03:09:15 +00:00
pgoyette 044012ff69 The image, with all sorts of MK*DEBUG* turned on, has once again grown.
This time probably as a result of the move to gcc-10.

Bump size to accomodate.
2021-04-26 14:08:11 +00:00
christos 8c90f798cc handle mipsn64 2021-04-25 23:40:05 +00:00
christos 817c6be628 Choose the right compat sets for the platform:
mipsn64 -> o32 n32
mips64 -> o32 64
2021-04-25 22:30:29 +00:00
tsutsui 8ea52577e2 For netboot via DHCP, "next-server" in dhcpd.conf(5) is mandatory.
Pointed out by Anders Gustafsson on port-hp300@.
 https://mail-index.netbsd.org/port-hp300/2021/04/21/msg000201.html

Should be pulled up to netbsd-8 and netbsd-9.

XXX: kernel should use the dhcpd/bootp server address for nfsroot
     if the specified next-server (siaddr) is 0.0.0.0?
2021-04-24 15:38:10 +00:00
mrg 399f6b5a0b use GCC_NO_IMPLICIT_FALLTHRU 2021-04-24 04:50:47 +00:00
mrg 7bcf01e5b9 build cc1objplus. don't forget debug set this time. 2021-04-23 22:50:05 +00:00
rin f843c9618d Add lto-dump.debug. 2021-04-23 15:21:49 +00:00
mrg 8147e6c899 build new GCC 10 lto-dump(1) tool. 2021-04-23 01:56:14 +00:00
mrg 571b8d3cee sort. 2021-04-23 01:53:55 +00:00
rillig 66445508cf tests/lint: add test for typeof after statement
Found by christos@.
2021-04-22 22:43:26 +00:00
christos ad44f2cb8b bump libssh 2021-04-19 14:41:18 +00:00
rillig 34039a4026 tests/lint: add emit.ln to the release files 2021-04-18 23:02:16 +00:00
rillig 3f5e7494f3 lint: test emitting of symbol information in the .ln files
Even though the new test is quite large, it didn't find any bugs in the
code.  The only thing I'm unsure about is why static functions are
exported as well, since they are supposed to be local to the translation
unit.
2021-04-18 20:02:56 +00:00
rillig 80be8043c5 tests/lint: demonstrate assertion failure in initialization 2021-04-17 20:36:17 +00:00
msaitoh 882c1780be - Remove obsolete cltom(9) and mtocl(9).
- Add missing manual page's link of m_adj.
2021-04-16 07:45:41 +00:00
mrg 5375303359 restore gcc-8 subdirs and mark as obsolete. oops.
noted by pgoyette.
2021-04-16 01:14:38 +00:00
rillig b089333f2a tests/make: demonstrate handling of null bytes 2021-04-15 19:02:29 +00:00
rillig 6aa88d9625 lint: add test for newly added message about static array size 2021-04-14 18:27:11 +00:00
mrg e0746b3fa4 various updates for GCC 10 support. remove dead gcc7/8 support
and properly mark obsolete files in gcc9/gcc10.

testing on amd64 and shark for GCC 9, and many platforms for GCC 10,
(though not arm yet.)
2021-04-12 02:08:59 +00:00
rillig 80108d8526 tests/lint: demonstrate wrong lint warning about complex variables 2021-04-09 21:07:39 +00:00
rillig ee726345e6 lint: in code from included files, print stack trace
Previously, the standard NetBSD build generated several lint warnings in
lhash.h from OpenSSL, without providing any hint as to which file
actually included that header.  In cases like these, lint now interprets
the line number information in the preprocessor output from GCC to
reconstruct the exact include path to the file in question.

The program check-expect.lua had to be rewritten almost completely since
it assumed that all diagnostics would come from the main file.  In all
existing tests, this was true, but these tests did not cover all cases
that occurred in practice.  Now it records the complete location of the
diagnostic instead of just the line number.
2021-04-08 22:18:26 +00:00
martin e99a5cc8d0 Add usr/include/elfdefinitions.h and usr/include/sys/elfdefinitions.h 2021-04-08 13:04:01 +00:00
simonb a5cb771bc5 Revert the change to not build and install /usr/lib/dtrace/drti.o; this
is used by the ruby30-base package when compiled with the dtrace option
(enabled by default).

Problem found by ryoon@.
2021-04-07 09:57:02 +00:00
nia 95a019acde Update for pkgsrc README.html transition 2021-04-07 07:51:12 +00:00
christos 917f170ea8 bump libevent 2021-04-07 03:45:18 +00:00
rillig b5bd70af56 lint: warn about for wrong type cast in argument to ctype.h functions
The argument to most of the functions from <ctype.h> "shall either be
representable as an 'unsigned char' or shall equal the value of the
macro EOF".

When confronted with the infamous warning 'array subscript has type
char', there are enough programmers who don't know the background of
that warning and thus fix it in a wrong way.  Neither GCC nor Clang
explain its warning to target these programmers.

Both GCC and Clang warn about 'array subscript has type char', but they
ignore the other requirements of the <ctype.h> functions, even though
these are in the C standard library.

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94182
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95177
https://stackoverflow.com/a/60696378
2021-04-05 02:05:47 +00:00
rillig 8d51d37642 tests/make: split test for modifier ':@' into separate files
The file varmod-loop.mk has grown too large to be single-purpose, plus
it combined parse-time and run-time tests.  This has the downside that
as soon as a parse-time test results in an error, the run-time tests are
not run anymore.
2021-04-04 13:20:52 +00:00
rillig 1cb2fa84ac tests/lint: prevent typo from tree.c 1.264 from happening again 2021-04-02 17:25:04 +00:00
martin c3782d2faa named/filter-aaaa.so is unrelated to DYNAMICROOT 2021-04-02 10:06:26 +00:00
rin 791f2c453f Document DHT kernel for evbppc. 2021-04-02 07:09:11 +00:00
martin 18106545b0 Move the named filter-aaaa plugin to the shared list 2021-04-01 10:35:24 +00:00
riastradh 2c5643bbca New vax documentation, vax/covid(4) 2021-04-01 00:03:01 +00:00
christos 6c6c596627 new named plugin (simon@) 2021-03-31 04:38:30 +00:00
simonb 3747573718 Don't build or install /usr/lib/dtrace/drti.o - currently not used, may
be one day...
2021-03-29 01:57:09 +00:00
simonb 93b7e5524f Install <mips/frame.h>, now needed for dtrace. 2021-03-29 01:48:29 +00:00
rillig 034864b5d3 lint: remove wrong warning about wrong initializer type
The following code is valid:

	int valid = {{{ 3 }}};

C90 3.5.7 and C99 6.7.8 both say that the "initializer for a scalar
shall be a single expression, optionally enclosed in braces".  They
don't put any upper bound on the amount of braces, not even in the
"Translation limits" section.
2021-03-28 14:01:49 +00:00
pgoyette 4bf31dd43a The install-image has grown a bit recently, and at least amd64 has
outgrown the previous size specification when the system was built
with all of MKDEBUG, MKKDEBUG, and MKDEBUGLIB set to "yes" (and
also when in-tree X11 is included).

So, bump the size a bit.
2021-03-26 21:18:29 +00:00
nia bc4ec85324 Move pad module to MI debug set lists 2021-03-25 21:37:10 +00:00
nia aca4a8ff12 don't restrict pad module to i386 and amd64.
- module build tested on amiga, vax, i386, amd64, evbarm.
- build.sh release tested on i386.
- pad module functionality tested on aarch64.
2021-03-25 09:49:00 +00:00
rillig a0407258e3 tests/lint: test initialization using string literals
The errors in line 74 and 75 of the test are wrong.  Everything is fine
there.  The bug lies in init_array_using_string, try to see if you can
spot it, neither GCC 9.3.0 nor Clang 8.0.1 could.
2021-03-23 21:19:08 +00:00
christos 05c935db2f bump libunbound 2021-03-15 20:17:04 +00:00
rillig 63e8f1e660 tests/make: add test for short-circuit evaluation of modifiers 2021-03-14 11:49:37 +00:00
rillig 3530c7d28f tests/indent: add test templates for testing specific parser symbols
The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way.  These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
2021-03-12 00:13:06 +00:00
simonb b2de856f1a Add manpage links for asysctl(3) and asysctlbyname(3), already described
in sysctl(3).
2021-03-10 13:30:34 +00:00
simonb 996bea5137 Add printf_nostamp(9), kernel printf() without prepending a timestamp. 2021-03-10 13:27:51 +00:00
rillig c280f5e623 tests/indent: demonstrate strange alignment for global variables 2021-03-09 20:43:19 +00:00
christos baa2f24833 We don't need libwrap anymore; libhack replaces it. 2021-03-09 00:08:04 +00:00
christos 58e21b67a6 Add a stubbed version of libwrap (tcpwrappers) 2021-03-09 00:06:44 +00:00
rillig 6abe7eedca tests/indent: demonstrate wrong removed empty line before '//' 2021-03-08 22:13:05 +00:00
rillig 09aa491484 tests/indent: demonstrate another bug in nested blocks 2021-03-08 20:55:34 +00:00
rillig 548d705b04 tests/indent: add test for output line counting 2021-03-08 20:12:04 +00:00
rillig 7bd1775519 lint: in strict C mode, warn about initialization with '[a ... b]'
https://gcc.gnu.org/onlinedocs/gcc/Case-Ranges.html
2021-03-07 19:42:54 +00:00
nia 18c61bbc00 G12 2021-03-07 16:25:06 +00:00
rin e31cf72b5a Build Xorg server for evbppc with minimum wsfb(4) support for Explora. 2021-03-07 10:42:26 +00:00
dbj 787ef1221e distrib/amd64/cdroms: honor CDBOOTOPTIONS when installing EFI bootloader 2021-03-07 03:55:47 +00:00
rillig 1a656e3597 tests/indent: add templates for options tests
Given that indent "has even more switches than ls(1)", there are far too
few tests.  To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
2021-03-06 17:56:33 +00:00
christos d0f77c4d4c bump libssh 2021-03-05 18:08:21 +00:00
jakllsch 9c8ef71e39 and the html for rge(4)... 2021-03-01 21:01:39 +00:00
jakllsch dc78acc9bb install rge(4) manual 2021-03-01 18:01:05 +00:00
martin 6390772e1b Drop IEEE802.11 support from the ramdisk's ifconfig(8) 2021-03-01 16:50:01 +00:00
martin 7ea81546f1 Now that we use the "hacked" (non-widechar) curses, drop -lcurses 2021-03-01 16:49:07 +00:00
martin 5fe518b10d Drop wide char support to save space 2021-03-01 09:24:27 +00:00
rillig 523633c84d lint: fix null pointer dereference on parse error
Fixes PR bin/22119.
2021-02-28 22:12:16 +00:00
rillig 3594934372 lint: add test to demonstrate that PR bin/20264 has been fixed 2021-02-28 20:17:13 +00:00
nia 3908a1c070 add new evbarm device driver man pages 2021-02-26 11:05:33 +00:00
christos 9b5d8227e3 Add utmp man pages 2021-02-26 03:08:25 +00:00
rin e609961ea2 Oops, forgot to commit this. One more adjust for amiga/boot ver 3.1.
Shuold fix build.
2021-02-25 21:46:55 +00:00
christos bb0dab52f7 Add regcomp.c and regexec.c so that we get a version that does not use NLS
and brings in all the locale code.
2021-02-25 21:24:00 +00:00
rin 1ee4efdda5 Adjust for amiga/boot ver 3.1. 2021-02-25 03:42:59 +00:00
rillig 352df404f7 indent: add test demonstrating that indent cannot handle C99
indent cannot handle line-end comments.

The indent test suite requires each test file to have both a NetBSD and
a FreeBSD RCS ID.  If the FreeBSD RCS ID is missing, the test will
silently pass since in that case, an empty file is compared with an
empty file.  See the /start/,/end/ operator in t_indent.sh.
2021-02-21 21:26:26 +00:00
rillig 331de0363e lint: add another test for C99 initializers 2021-02-21 08:05:51 +00:00
christos 2543b856e3 Add missing compatx11file 2021-02-21 02:29:56 +00:00
christos 362817299c bump bind libraries 2021-02-19 17:06:26 +00:00
rillig 746e9c89cf lint: warn about mismatch in getopt handling 2021-02-19 12:28:56 +00:00
dbj e5062177fe Revert "distrib/amd64/cdroms: honor CDBOOTOPTIONS when installing EFI bootloader"
https://mail-index.netbsd.org/current-users/2021/02/17/msg040358.html
I think this change had unexpected side effects and needs further review
2021-02-17 08:49:54 +00:00
kre 6974a2b259 PR bin/55979
Add a sh ATF test to demonstrate a bug in the way that \0 characters
are dropped from scripts.   This test will eventually be extended to
test other potential sh script input related issues.

When initially committed, this test should fail.  It should succeed
when the fix for the PR is committed (soon).

Nb: this tests only the \0 related issues from the PR, the MSAN
detected uninitialised variable (struct field) can only be detected
by MSAN, as it has no visible impact on the operation of the shell
when running on any real (or even emulated) hardware.
(It will, however, also be fixed).
2021-02-16 09:46:24 +00:00
rillig 324a77845a distrib/sets/fmt-list: document how to sort by directory first
In lists/base/mi, the directory ./libdata/firmware contains several
subdirectories for which the entries do not look aligned right now, even
after normalizing the alignment.

This is because the indentation for a directory is not determined
globally for all directory entries from the complete file, but instead
for each group of items, after sorting, that have the same directory.
This results in several entries having only a single item per group,
such as ./libdata/firmware/nouveau, and this single item is obviously
consistently indented since all of its 1 lines are already indented to
the same depth.

One possible solution for this is to sort the entries in another order,
keeping all entries from a directory together.  This allows to quickly
see all entries from a certain directory, but on the other hand, when
adding a new directory plus some entries, the directory has to be listed
far away from its entries.  (This would be done automatically by
fmt-list though, which weakens this argument a bit.)

Another possible solution for this is to first determine the indentation
for all entries from each directory, no matter how far these entries are
apart, and then indent these entries to the common indentation.  This
may or may not help since there will still be single entries between
groups of differently indented entries.

Writing down the intuitive rules for how to align the entries properly
is a nontrivial task.  See pkglint/varalignblock, which is around 650
lines of code, plus around 4000 lines of test code.

No functional change.
2021-02-15 23:46:46 +00:00
rillig 8b7ecb733b distrib/sets/list-fmt: sort commented entries like regular entries
Seen in lists/modules/ad.aarch64, among others.  These lines are not
intended as comments but as regular entries that just happen to be
commented out.

This is the same as how pkglint treats commented variable assignments,
which take part in aligning blocks of variable assignments even though
they are syntactically comments.
2021-02-15 23:00:03 +00:00
christos e1d8873a1b new locale pages, sort 2021-02-15 14:38:06 +00:00
rillig fe211a10c7 make: add test for the variable modifier ':sh' 2021-02-14 20:16:17 +00:00
rillig ff6217c297 tests/libcurses: add test for addbytes 2021-02-13 06:29:45 +00:00
yamt 3bc7a17908 Make Raspberry PI 3 Model A+ use bwfm config for Model B+
* It works for me.

* It's what linux-firmware does.
  https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/commit/?id=923bfa68a1c97929652f029da699495f4ce43f14
2021-02-09 11:57:20 +00:00
martin f44c8ec769 Use the same naming scheme for install images as we use for the ISO images. 2021-02-08 19:11:41 +00:00
rillig 25d40489d1 libcurses: demonstrate bug in addch that doubles tab indentation
When adding "\t" via addch, win.curx advances by twice the spaces as
intended.  This bug was introduced somewhere between NetBSD 8.0 and 9.0.

Adding "\t" via addstr does not have this bug.

This bug causes the installation menu of sysinst to be have its menu
items indented by 16 characters instead of only 8.  This in turn
produces an ugly line break in the German translation.

The test framework for libcurses is not well integrated into ATF.
Whenever the expected output is longer than the actual output, or vice
versa, the test passes nevertheless.  This makes it necessary to
constantly look into atf-run.log to see whether the actual output is
indeed equal to the expected output, which is crucial, especially for
telling the difference between addstr and addnstr.

Reusing the .chk files for several tests is not a good idea either.  For
example, addstr and waddstr are supposed to produce the same result for
ASCII-only text, so it was tempting to use the same file.  But waddstr
seems to have a bug (maybe undefined behavior), at least waddstr returns
ERR in one case where it shouldn't.  This means that currently the
expected output (acknowledging the bug) must be different.

The "expected" test output in waddstr.chk looks completely broken, but
that's exactly what the test produces right now.
2021-02-07 01:53:54 +00:00
dbj 751da7ebca distrib/amd64/cdroms: honor CDBOOTOPTIONS when installing EFI bootloader 2021-02-06 16:02:43 +00:00
rillig 6a794143e8 make: add test for reading from make's stdin
Just out of curiosity whether that really works.  It does.
2021-02-01 20:31:41 +00:00
rillig 7773efc249 make(1): add test for combining the options -j, -n, -t
This is a preparation for refactoring the complicated condition in
JobStart.
2021-01-30 12:46:38 +00:00
rillig e15c45c68c make(1): demonstrate unnecessary creation of empty files in jobs mode 2021-01-29 22:38:17 +00:00
martin 9869002d85 Rename etc/rc.d/llvmlockdir to lvmlockdir - it has nothing to do with LLVM,
the name probably was a freudian slip of my fingers when I split that
fragment out of another rc.d script.
2021-01-26 13:31:19 +00:00
thorpej 62be88ee26 Add kmem_tmpbuf_alloc(), a utility function for allocating memory for
temporary use where allocation on the stack is desirable, but only up to
a certain size.  If the requested size fits within the specified stack
buffer, the stack buffer is returned.  Otherwise, memory is allocated with
kmem_alloc().  Add a corresponding kmem_tmpbuf_free() function that frees
the memory using kmem_free() if it is not the tempory stack buffer location.
2021-01-24 17:29:11 +00:00
thorpej fed9ff05fd Add a manual page for strlist(9). 2021-01-21 15:53:15 +00:00
pgoyette 97deb5ac32 Oooppss we need another size bump 2021-01-18 03:35:11 +00:00
rillig fb08819de8 lint: add more tests for system headers in strict bool mode 2021-01-17 23:00:41 +00:00
rillig a5778d2e53 lint: install custom stdbool.h, used for strict bool mode 2021-01-17 19:32:52 +00:00
rillig 93104a9b2f lint: remove custom stdbool.h for strict bool mode again
Adding it broke the official builds.
2021-01-16 22:18:14 +00:00
rillig 9f199e7ddf lint: in strict bool mode, integer constants do not have type bool
Previously, lint1 allowed integer constants such as 0 and 1 to be used
as bool constants.  This was only half-baked since after fixing all
error messages from that strict mode, there may still be integer
literals in the code that should be replaced with true or false.  This
would stop a migration from int to bool in the middle, leaving
inconsistent code around.

To find the remaining type inconsistencies, treat integers and bool as
completely incompatible, even for compile time constants.
2021-01-16 16:03:46 +00:00
pgoyette beede25931 Install image built with all of MKDEBUG, MKKDEBUG, and MKDEBUGLIB all
set to "yes" is a bit larger, so bump the image size accordingly.
2021-01-15 21:14:53 +00:00
rillig a738d648f3 lint: add tests for newly added messages for strict bool mode 2021-01-14 22:18:13 +00:00
pgoyette 22f3130d8a Update sets lists to accomodate KERNEL_DIR. When both KERNEL_DIR and
MKDEBUG are defined, we create an empty $DESTDIR/usr/libdata/debug/netbsd/
directory.

Should fix ``build.sh release'' issue reported in kern/55923

XXX Since nothing ever seems to populate this directory, perhaps we should
XXX simply prevent its creation?  If we do create it, should its creation
XXX perhaps be conditioned on MKKDEBUG rather than MKDEBUG?

XXX There is still another problem with ``build.sh install-image'' but I
XXX open a new PR for that.
2021-01-14 19:11:48 +00:00
pgoyette a62411020b /home/paul/XXX.txt 2021-01-14 19:07:03 +00:00
riastradh cba96d16f7 Various entropy integration improvements.
- New /etc/security check for entropy in daily security report.

- New /etc/rc.d/entropy script runs (after random_seed and rndctl) to
  check for entropy at boot -- in rc.conf, you can:

  . set `entropy=check' to halt multiuser boot and enter single-user
    mode if not enough entropy

  . set `entropy=wait' to make multiuser boot wait until enough entropy

  Default is to always boot without waiting -- and rely on other
  channels like security report to alert the operator if there's a
  problem.

- New man page entropy(7) discussing the higher-level concepts and
  system integration with cross-references.

- New paragraph in afterboot(8) about entropy citing entropy(7) for
  more details.

This change addresses many of the issues discussed in security/55659.
This is a first draft; happy to take improvements to the man pages and
scripted messages to improve clarity.

I considered changing motd to include an entropy warning with a
reference to the entropy(7) man page, but it's a little trickier:
- Not sure it's appropriate for all users to see at login rather than
  users who have power to affect the entropy estimate (maybe it is,
  just haven't decided).
- We only have a mechanism for changing once at boot; the message would
  remain until next boot even if an operator adds enough entropy.
- The mechanism isn't really conducive to making a message appear
  conditionally from boot to boot.
2021-01-10 23:24:25 +00:00
rillig 0ec7a3ab6a lint: add test for triggering assertion failures in lint1 2021-01-10 18:06:38 +00:00
rillig 76d2ead3e0 lint: add test for treating _Bool as non-scalar type
This strict mode is not yet implemented.  The plan is to use it for
usr.bin/make, to get rid of the many possible variants of defining the
Boolean type in make.h.  These variants did find some bugs, but not
reliably so.  Using static analysis seems more promising for this.

In an early stage of developing this test, lint1 crashed in the enum
definition in line 213, where the node for the '?:' had been NULL.  This
can happen in other situations as well, such as with syntax errors, but
these should be rare, as lint is usually only run if the compiler has
accepted the source code.  Still, there should not be any assertion
failures while running lint1.
2021-01-10 17:43:46 +00:00
rillig e107438c00 lint: demonstrate wrong handling of conversion to _Bool 2021-01-10 11:24:42 +00:00
uki 1c2777d6b9 Fix "build.sh syspkgs" build error 2021-01-09 02:40:44 +00:00
uki 4670c4d50e Rename man-util-* to comp-c-* 2021-01-08 09:41:24 +00:00
ryo 7c39e4802c add dts for odroid-N2 plus 2021-01-02 11:36:36 +00:00
rillig a0a15c1464 lint: add a test for each message produced by lint1
Having a test for each message ensures that upcoming refactorings don't
break the basic functionality.  Adding the tests will also discover
previously unknown bugs in lint.

The tests ensure that every lint message can actually be triggered, and
they demonstrate how to do so.  Having a separate file for each test
leaves enough space for documenting historical anecdotes, rationale or
edge cases, keeping them away from the source code.

The interesting details of this commit are in Makefile and
t_integration.sh.  All other files are just auto-generated.

When running the tests as part of ATF, they are packed together as a
single test case.  Conceptually, it would have been better to have each
test as a separate test case, but ATF quickly becomes very slow as soon
as a test program defines too many test cases, and 50 is already too
many.  The time complexity is O(n^2), not O(n) as one would expect.
It's the same problem as in tests/usr.bin/make, which has over 300 test
cases as well.
2021-01-02 10:22:42 +00:00
ryo 891e9034bd revert http://mail-index.netbsd.org/source-changes/2021/01/01/msg125648.html
FYI: http://mail-index.netbsd.org/source-changes-d/2021/01/01/msg013085.html
2021-01-02 08:38:55 +00:00
nat bfa1e92456 Update the debug set for testpat(6). 2021-01-02 03:41:06 +00:00
nat 268f30338f Add testpat(6) to the games set. 2021-01-02 03:24:01 +00:00
rillig 59e2f0df9e lint: demonstrate bug in handling of nested C9X struct initializers 2021-01-01 16:50:47 +00:00
ryo 34121d2a3c add dts for odroid-N2 plus.
meson-g12b-odroid-n2-plus.dts of linux is not optimized for the odroid-N2plus CPU clock.
and the dts for odroid-n2-plus in the hardkernel repository is  significantly changed,
so cannot be imported without modification. Therefore, a simple meson-g12b-odroid-n2-plus.dts
has been added based on "meson-g12b-odroid-n2.dts" with only the cpu_opp_table and
regulator table changed.
2021-01-01 07:41:46 +00:00
rillig e93292def1 lint: fix segmentation fault when checking returned enum types (211) 2021-01-01 01:07:07 +00:00
rillig ee607e0b85 lint: check that in "if (cond)", cond is scalar 2020-12-31 18:51:28 +00:00
rillig d81f96abfb make(1): add test for error handling and expansion in .for loops 2020-12-31 03:05:12 +00:00
rillig 4c09bc6956 make(1): add test for .endfor without corresponding .for 2020-12-30 14:50:08 +00:00
rillig f4b4e8b893 lint: add test for old style function arguments 2020-12-30 13:15:07 +00:00
martin 5662516c24 Add /var/db/obsolete/xdebug 2020-12-29 17:53:08 +00:00
martin 213b42bc0d Mark resize debug info as obsolete 2020-12-29 12:43:36 +00:00
rillig c182aecfbc make(1): add test that explains how variables are exported
Exporting the variables at the right time and with the correct values is
a subtle issue.  The current implementation carefully marks variables as
ready to be exported, then exports them and at the same time tries to
export as few variables as possible, to avoid memory leaks.  This test
describes and explains how all this works in detail.

This test also justifies that the call to Var_ReexportVars happens in
the make process itself, not in the child processes, no matter whether
these are created with vfork or (only theoretically) with plain fork.
This has changed in compat.c 1.217, job.c 1.390 and main.c 1.504 from
2020-12-27.
2020-12-29 01:45:06 +00:00
martin 6f4eaa13f9 Add resize 2020-12-28 14:28:54 +00:00
rillig b435f5a0e0 lint1: add forgotten tests 2020-12-28 12:47:39 +00:00
rillig b94ceb4d46 lint1: fix file list for recently added test output 2020-12-28 11:40:54 +00:00
reinoud ef6e52b452 Import Xterm's resize(1) for querying (x)terminal sizes in base for headless
clients
2020-12-27 21:13:17 +00:00
rillig 0134a24c0d make(1): add test for expansion errors in jobs mode
Since compat mode and jobs mode are implemented separately and vary in
lots of small details, each of them needs to be tested on its own.
2020-12-27 05:11:40 +00:00