This is based on upstream b74150490be904801378b2712fe0d532e1700124
but adapted to ATF.
Reviewed by: jlduran@gmail.com, markj, vangyzen
Differential Revision: https://reviews.freebsd.org/D42129
(cherry picked from commit 8f75390c66bdcde95e1b383aecaa27b4adf88279)
Trimming of the line feed is no longer necessary after
d993c6b0db
Currently the tests:
- bcachefs2
- gpkg-1-zst
- multiple
are failing, but a fix will be committed upstream.
This also reverts c5e957ad4 "file: fix test case for gpkg by removing the extra \n."
MFC after: 3 days
(cherry picked from commit 0d3a87569f14b0e48826bbaab5e05f35669bcebf)
These do not use __FBSDID but instead use bare char arrays.
Reviewed by: imp, emaste
Differential Revision: https://reviews.freebsd.org/D41957
(cherry picked from commit eba230afba4932f02a1ca44efc797cf7499a5cb0)
Remove the $FreeBSD$ pattern added to the tests, as well as fixing the
mkimg_test.sh script to stop adding it when we rebase the tests.
Reviewed by: imp, emaste
Pull Request: https://github.com/freebsd/freebsd-src/pull/870
(cherry picked from commit 3b5c9845727a1b95098379f66223525e85e8a73f)
Recent changes to mkimg has changed the generated GPT images to be more
correct. Use make rebase to regenerate the baseline.
Sponsored by: Netflix
(cherry picked from commit d2abbfede5342b19f3e5994140cdb6622c95ef66)
vtoc8 support expired with sparc64 removal, so remove them all.
Sponsored by: Netflix
(cherry picked from commit 83bd5a833c3a14b74736e7b3fa0be66252a5a3dc)
UEFI v2.10 Section 5.3 documentes that the minimum reserved space after
the GPT header be at least 16kB. Enforce this minimum. Before, we'd only
set the number of entries to be the unpadded size. gpart's selective
enforcement of aspects of the GPT standard meant that these images would
work, but couldn't be changed (to add a partition or grow the size of a
partition). This ensures that gpart's overly picky standards don't cause
problems for people wishing to, for example, resize release images.
MFC after: 1 day (we want this in 14.0)
PR: 274312
Sponsored by: Netflix
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D42245
(cherry picked from commit 9b42d3e12ffc6896fcb4e60c1b239ddf60705831)
Commit 4722ceb7d5 switched the default serial rate to 115200 bps.
Follow suit in the freebsd-tips fortune example.
Reviewed by: bcr
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D41495
(cherry picked from commit aaff6a85ff1e506e38a8c4f94f1cb1065427e8c3)
This is an initial take on documenting vulnerability mitigations.
Connect mitigations(7) to the build
Also add some cross references.
Reviewed by: gbe (earlier)
Sponsored by: The FreeBSD Foundation
Co-authored-by: Olivier Certner <olce.freebsd@certner.fr>
Differential Revision: https://reviews.freebsd.org/D41794
(cherry picked from commit b6a61ac2d475fba9c45f7f407549a522f60dea18)
(cherry picked from commit 6e5dcc6113da649a79e5bc2c3ea9329bcd1d85d5)
(cherry picked from commit a2b289608d6b54b6e1ce85096560807e551bb5ac)
* Whenever possible, use strtonum() to parse numeric arguments.
* Improve usefulness and consistency of error messages.
* While here, fix some type and style issues.
Sponsored by: Klara, Inc.
Reviewed by: christos, kevans
Differential Revision: https://reviews.freebsd.org/D42010
(cherry picked from commit d7399551b02861b910b15c7b7a78a2835644aa45)
split: Improve GNU compatibility.
* Like GNU split, turn autoextend back on if given -a0.
* Add a test case that verifies that -a<non-zero> turns autoextend off.
* Add a test case that verifies that -a0 turns autoextend back on.
Sponsored by: Klara, Inc.
Reviewed by: christos, kevans
Differential Revision: https://reviews.freebsd.org/D42011
(cherry picked from commit d9d69a6f6fc1f8d80df9ce6493e8ab9388781615)
Reviewed by: des
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D41771
(cherry picked from commit ee12faa062c04a49bf6fe4e6867bad8606e2413f)
groff 1.23.0 changed the semantics of the -man parameter, and many
manual pages are not rendered. The -mandoc parameter brings back
the old behavior, as in groff 1.22.4 and earlier.
PR: 273565, 273245
Reviewed by: emaste, bapt
MFC after: 1 week for all supported branches (stable/12, 13, 14)
Differential Revision: https://reviews.freebsd.org/D41737
(cherry picked from commit 035f7c9a3653d91564a5513f1311aa3b6e14a17e)
Reviewed by: imp, manu
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D40144
(cherry picked from commit d5ef73a71f0e2fbc4dc9b907a6e59a15599c50b3)
These won't be added elsewhere, so add a little bit of room to make
these messages a little easier to read. The existing set is a mixed
bag, there are somewhere in the ballpark of 45, 46 printfs to stderr and
19 of those had newlines.
Reviewed by: yuripv
Sponsored by: Klara, Inc.
(cherry picked from commit 3141e51d2e38fa7b9e6d81477dfa860d087c514d)
It turns out that right parentheses do exist and are different than
left parentheses, so let's switch to that.
Sponsored by: Klara, Inc.
(cherry picked from commit 07bc20e4740d09f554c3787bb1940fc503300822)
This adds macros for checked addition, subtraction, and multiplication with semantics similar to the builtins gcc and clang have had for years.
Reviewed by: kib, emaste
Differential Revision: https://reviews.freebsd.org/D41734
(cherry picked from commit e6615b10347caf67f5bc12c9a8e30b8ddd9860ae)
include: Add tests for N2867.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D41735
(cherry picked from commit 4fbb9c43aa44d9145151bb5f77d302ba01fb7551)
less: We have <stdckdint.h> now.
Reviewed by: delphij
Differential Revision: https://reviews.freebsd.org/D41736
(cherry picked from commit cb8dd292c7ec53391dfa25847858dd7ef895f94e)
Approved by: re (gjb)
This adds test cases for c4f7198f47 and ac17fc816e.
MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D41755
(cherry picked from commit cbea5eddb1b6ae2a101beacf00bf165517f4f2b1)
split: Code cleanup.
MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D41756
(cherry picked from commit 851bf856d1a7ad5427ea9c22639ab6f6c4a3f503)
split: Fix linecount parsing.
The “undocumented kludge” which unfortunately can't be dropped for backward compatibility reasons was prone to segfaulting and would improperly allow a new linecount when one was already set. Fix these issues and add regression tests.
MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D41757
(cherry picked from commit 117c54a78ccd214c236806721f21da750e512d3e)
Approved by: re (gjb)
Add -j <jail> flag to netstat(1) to allow access to network information
from a jail.
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D41446
Summary:
This change moves /usr/bin/cpuset to /bin/cpuset so it is more readily
available on hosts where the /usr partition might not be mounted at the
time / has been mounted.
Remove some complexity from rc.subr(8) since /bin is assumed to always
be present if/when / is mounted.
MFC after: 2 weeks
MFC with: 0661f93892, 271d552379af
Test Plan:
- Test out rc.subr change.
- Confirm that the installation logic does what's needed.
Relnotes: yes (moving cpuset may impact strict file permissions/mode checking)
Reviewers: kevans
Subscribers: imp
Differential Revision: https://reviews.freebsd.org/D40057
OpenSSL's BN_zero API has had a void return value since 1.1.x: chase the
change to unbreak the build on OpenSSL 3.x with MK_GH_BC == no.
MFC after: 2 weeks
Reviewed by: emaste, kevans
Differential Revision: https://reviews.freebsd.org/D41410
Unzip from FreeBSD has been ported to libarchive.
Change usr.bin/unzip to use bsdunzip from libarchive.
Differential Revision: https://reviews.freebsd.org/D41239
PR: 272845 (exp-run)
MFC after: 1 month