1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-26 11:47:31 +00:00
Commit Graph

5916 Commits

Author SHA1 Message Date
Olivier Certner
b47f4718c0
MAC: mac.h: Separately test inclusion from userspace
Reviewed by:    jamie
Approved by:    markj (mentor)
MFC after:      5 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D46897
2024-12-16 15:42:26 +01:00
Warner Losh
1d69498623 depend-cleanup: Fix test arg
-e follows the symlink to see if the file exists. I tested on the wrong
tree, so it appeared to work for me. Change to -h which see if the link
is there or not. The file will never not be a link if present.

Fixes: 42ee30f19c
Noticed by: Herbert Skuhra
Sponsored by: Netflix
2024-12-14 13:56:10 -07:00
Warner Losh
42ee30f19c depend-cleanup.sh: Need to delete jemalloc.3 in objtree
With the jemalloc.3 move into the tree (it's a generated file that we
don't/can't generate as part of the build), we need to remove it from
the .OBJDIR or make gets confused about how to build it (honestly for
reasons unknown).

Sponsored by:		Netflix
2024-12-13 16:04:34 -07:00
John Baldwin
8f7835acc6 Remove SOC FPGA drivers
The drivers have been disconnected from the build since the removal of
the SOCFPGA kernel configs.

Reviewed by:	manu, imp, andrew
Sponsored by:	AFRL, DARPA
Differential Revision:	https://reviews.freebsd.org/D47885
2024-12-06 17:38:52 -05:00
Warner Losh
0207010f59 checkstyle9.pl: Better C++ filename matching
We have .cc, .hh, .cpp, and .hpp files in the tree. Update the regexp to
match.
Remove matching perl, python and non-preprocessed .s files from checking.

Sponsored by:		Netflix
2024-12-05 15:33:49 -07:00
Dag-Erling Smørgrav
00fce6284a Revert "stress2: Use tests as the default test user."
This reverts commit 3ee87f8a4d.
2024-12-04 17:13:05 +01:00
Dag-Erling Smørgrav
65d5e55e24 stress2: Fix expected output for tmpfs24.
MFC after:	1 week
Reviewed by:	pho
Differential Revision:	https://reviews.freebsd.org/D47876
2024-12-04 14:13:08 +01:00
Dag-Erling Smørgrav
3ee87f8a4d stress2: Use tests as the default test user.
This allows some tests to run without prior configuration; others will
have to be modified to use `su -m` since the tests account is locked.

Reviewed by:	allanjude
Differential Revision:	https://reviews.freebsd.org/D47875
2024-12-04 14:12:43 +01:00
Gleb Smirnoff
d6ed5ff4ac git-arc: fix diff2reviewers() with multiple reviewers
The select command of jq provides us with a multiline output.  Thus, the
${userids} is a newline separated list.  The recent change 9e84289f2c
explicitly said that we aren't going to translate newline to comma when
constructing JSON for the next command.  It also forces the ${userids} to
be printed as is, with shell's field splitting disabled.  So we end up
with invalid JSON, that is missing commas.

Fix this by enabling shell's field splitting by printing ${userids}
outside of double quotes.

Reviewed by:		jlduran, imp, emaste
Differential Revision:	https://reviews.freebsd.org/D47889
Fixes:			9e84289f2c
2024-12-03 18:38:41 -08:00
Robert Clausecker
4a0fc138e5 tools: add arc4random_uniform() bias test
This test program executed arc4random_uniform() repeatedly and
analyzes the distribution of return values, showing how similar
the parameters of the observed outcome are to the expected
parameters of an equidistribution.

This cannot be a unit test as it takes quite a while to run and
lots of memory (~3 GB) to execute.

Reviewed by:	cem
Approved by:	emaste
Differential Revision:	https://reviews.freebsd.org/D47659
2024-12-02 11:41:11 +01:00
Peter Holm
2e2699c48a stress2: Added new tmpfs test scenarios 2024-11-28 13:16:35 +01:00
Stefan Eßer
8ea6c11540 usr.bin/bc: remove OpenBSD derived bc and dc commands
In 2020, an improved implementation of the bc and dc commands
developed by Gavin D. Howard has been imported into FreeBSD.
It has replaced the OpenBSD-derived versions of these commands
in all currently supported FreeBSD releases.

The OpenBSD versions could still be built using the WITHOUT_GH_BC
option. There have been no reports of problems or unexpected
deviations from the OpenBSD version for some time, therefore
keeping the OpenBSD version is no longer required in FreeBSD.

This commit removes the option to build the OpenBSD version and
corresponding source files from -CURRENT. No MFC is planned, all
currently released FreeBSD versions should retain the build option.

The WITHOUT_GH_BC option is no longer accepted and will cause
make buildworld to fail.

Reviewed by:	des, emaste
Approved by:	des
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D46876
2024-11-24 22:38:23 +01:00
Igor Ostapenko
976ab1425d git-arc: Document how a reviewer group can be referenced
Reviewed by:	concussious.bugzilla_runbox.com, markj
Approved by:	markj (mentor)
Differential Revision:	https://reviews.freebsd.org/D47669
2024-11-21 10:36:50 +00:00
Jose Luis Duran
87e87fecb1
nanobsd: Remove dependency on bsdlabel
The bsdlabel utility is deprecated, gpart should be used instead:

  - Offset the first 16 sectors, just like bsdlabel did (used for
    metadata)
  - Use a freebsd-ufs partition type (regardless bsdlabel creating a
    '!0')

Reviewed by:	emaste, imp
Approved by:	emaste (mentor)
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D47653
2024-11-20 22:31:56 +00:00
Peter Holm
43778a593f stress2: Added zfs test scenarios 2024-11-18 10:46:28 +01:00
Peter Holm
55aa53fbf2 stress2: Added a zfs regression test scenario 2024-11-18 10:40:16 +01:00
Ed Maste
2c2f741363 mfc-candidates: Improve hash expansion
`git rev-parse` is the canonical way to turn a short hash (or other
commit-ish) into a full hash.

Sponsored by:	The FreeBSD Foundation
2024-11-16 09:56:07 -05:00
Jose Luis Duran
12cbad923d
nanobsd: Fix typos
Fix a number of typos in the code or comments.
Files under dhcpd, embedded, pcengines, and rescue were intentionally
omitted. These directories will be reviewed at a later date.

PR:		269884
Reviewed by:	imp, zlei
Approved by:	emaste (mentor)
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D47587
2024-11-16 07:11:16 +00:00
Jose Luis Duran
0f7b0db5dd
nanobsd: Fix cust_comconsole search patterns
The current patterns are outdated, and may produce "offifexists", after
e310437971 ("For video consoles, only launch a getty if the device
exists.").

Fix the expressions to:

1. Disable getty(8) on the virtual syscons(4) or vt(4) terminals
   (/dev/ttyv*).
2. Enable the use of the first serial port as the system console.

Reviewed by:	imp
Approved by:	emaste (mentor)
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D47586
2024-11-16 07:08:24 +00:00
Jose Luis Duran
4223c668e4
nanobsd: Use the real path for NANO_PACKAGE_DIR
As users may have the Pkg directory as a symbolic link to the NanoBSD
"package dump directory".  In commit 9af130ae8c, cust_pkgng() was
greatly improved, however as a side effect of using a nullfs mount, the
directories and files must not be symlinks.

Fix it by using NANO_PACKAGE_DIR realpath().

PR:		269884
Reviewed by:	imp
Approved by:	emaste (mentor)
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D47532
2024-11-16 07:06:14 +00:00
Jose Luis Duran
4db04f5e3a
nanobsd: Update fill_pkg.sh
fill_pkg.sh is a script that links a package and its dependencies from a
"package dump" directory (like /usr/ports/packages/All) to a specified
directory (NANO_PACKAGE_DIR), for cust_pkgng()[*].

Update the script by:

- Using `make package-name` instead of `make -V pkgname`
- Looking for package files with *.pkg instead of *.txz
- Adding a -c option that copies the files instead of linking them[*]

[*] After 9af130ae8c cust_pkgng() cannot be used with a directory
populated by fill_pkg.sh, because it uses a nullfs mount, which doesn't
follow symlinks, therefore the links inside NANO_PACKAGE_DIR will not
work.

PR:		269884
Reviewed by:	imp
Approved by:	emaste (mentor)
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D47531
2024-11-16 07:01:27 +00:00
Jose Luis Duran
e5579f98c0
nanobsd: Avoid read-only file system warnings
The default setting of some loader or rc variables generate warnings
because the file system is read-only:

Set the following options to avoid printing these warnings:

/boot/defaults/loader.conf:

- hostuuid_load="NO" to disable loading /etc/hostid early at boot time
- entropy_cache_load="NO" to disable loading cached entropy at boot time
- kern.random.initial_seeding.disable_bypass_warnings="1" to disable
  logging a warning if the 'bypass_before_seeding' knob is enabled
  (enabled by default) and a request is submitted prior to initial
  seeding

/etc/defaults/rc.conf:

- kldxref_enable="NO" to disable building linker.hints files with
  kldxref(8)
- entropy_boot_file="NO" to disable very early (used at early boot-time)
  entropy caching through reboots
- entropy_dir="NO" to disable caching entropy via cron

While here, move rc.conf options before sourcing vendor.conf, so they
can be overridden.

PR:		277601
Reviewed by:	imp
Approved by:	emaste (mentor)
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D47502
2024-11-16 06:55:57 +00:00
Jose Luis Duran
3c5d19a40d
nanobsd: Fix parallel make
The NANO_NCPU (number of CPUs) value gets ignored by the build script
when setting the NANO_PMAKE (parallel make) value.

Fix it by setting the NANO_PMAKE later in the process.

PR:		277269
Reviewed by:	imp, emaste
Approved by:	emaste (mentor)
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D47476
2024-11-16 06:55:25 +00:00
Jose Luis Duran
999f288a0e
nanobsd: Add missing options to usage()
-B suppress installs (both kernel and world)
-I build disk image from existing build/install
-W suppress installworld

PR:		277269
Reviewed by:	imp, emaste
Approved by:	emaste (mentor)
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D47475
2024-11-16 06:54:58 +00:00
Ed Maste
586c651f2b mfc_candidates: remove leftover message
When I first converted mfc-candidates to Lua I did not implement -X
(exclude file), and just emitted a message that -X wasn't implemented.
Support was implemented before I pushed the change but I forgot to
remove the message.

Fixes: 48f3fcabea ("mfc-candidates: Convert to Lua")
Sponsored by: The FreeBSD Foundation
2024-11-15 16:39:23 -05:00
Ed Maste
48f3fcabea mfc-candidates: Convert to Lua
d51c590023 added a Lua script to process the lists of candidate and
completed MFC commits to address sorting issues in the original shell
implementation.

Instead of having a mix of shell and Lua, just implement the entire
tool in Lua.  This is more maintainable and gives a reasonable
improvement in performace.

Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D47416
2024-11-15 15:09:53 -05:00
Kyle Evans
0f30aed105 localedata: update widths.txt after recent Hangul exceptions
Sponsored by:	Klara, Inc.
2024-11-13 16:12:42 -06:00
Kyle Evans
160c36eae4 localedata: add some exceptions to utf8proc widths
Hangul Jamo medial vowels and final consonants are reportedly combining
characters that won't take up any columns on their own and should be
reported as zero-width, so add an exception for these as well to reflect
how they work in practice.  This conforms to how other implementations
(e.g., glibc) treat these characters.

Reviewed by:	bapt (earlier version), jkim
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D47472
2024-11-13 16:12:42 -06:00
Ed Maste
3750ccefb8 Retire MK_PROFILE infrastructure
It was disabled by default in fe52b7f60e.  We planned to (but did not)
remove the option before FreeBSD 14.  Remove it now, for FreeBSD 15.

Relnotes:	Yes
Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D31558
2024-11-12 12:11:51 -05:00
Vladimir Kondratyev
5036d9652a rtlbtfw: Firmware loader for Realtek 87XX/88XX bluetooth USB adaptors
Firmware files are available in the comms/rtlbt-firmware port.

Sponsored by:	Future Crew LLC
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D46739
2024-11-07 02:30:29 +03:00
Mark Johnston
d14c38ceb8 sys: Avoid relying on pollution from refcount.h
Fix up headers which previously assumed that refcount.h includes
systm.h, and make them more self-contained.  Then, replace the systm.h
include in refcount with kassert.h.

Reviewed by:	imp, kib
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D47450
2024-11-05 18:22:20 +00:00
Jose Luis Duran
9e84289f2c
git-arc: Prefer echo over printf
Prefer echo over printf.  Prevent the newline character from being
translated by using 'blank' instead of 'space' in the re_format.

This change was reviewed in:

https://reviews.freebsd.org/D47289

Committed separately for clarity.

Suggested by:	des
Approved by:	emaste (mentor)
2024-11-05 02:10:16 +00:00
Jose Luis Duran
2377c19a8c
git-arc: Trap on every mktemp
Trap:

- EXIT (0)
- HUP  (1)
- INT  (2)
- QUIT (3)
- TRAP (5)
- USR1 (10)
- TERM (15)

every time mktemp is called to reduce the chances of leaving stray files
or directories with possible sensitive data inside.

We avoid using a template with mktemp, as some operating systems may use
unpredictable base paths by default (macOS).

Suggested by:	des
Reviewed by:	emaste, 0mp, des (earlier), markj
Approved by:	emaste (mentor)
Differential Revision:	https://reviews.freebsd.org/D47289
2024-11-05 02:10:16 +00:00
Jose Luis Duran
019981e00f
git-arc: Fix typo s/Truning/Turning/
While here standardize white space.
No functional change.

Approved by:	emaste (mentor)
2024-11-05 02:10:16 +00:00
Jose Luis Duran
aa90b92ac2
git-arc: Fix find_author() for external users
When an external user submits a review in Phabricator, the find_author()
subroutine may receive the author_name and author_addr as "null" from
the JSON API with git-arc patch.

This "null" string gets tested for length by "[ -n", and returning that
is greater than zero, in other words, the shell does not understand that
"null" means nothing in this case.

Fix it by adding a guard, that sets an empty string when the content is
"null".

While here, standardize the indentation style for find_author()

Reviewed by:	emaste, markj
Approved by:	emaste (mentor)
Differential Revision:	https://reviews.freebsd.org/D46789
2024-11-05 02:10:15 +00:00
Mark Johnston
a0069f16fe tools: Add a couple of utilities which were useful for testing SO_SPLICE
Sponsored by:	Klara, Inc.
Sponsored by:	Stormshield

Differential Revision:	https://reviews.freebsd.org/D47308
2024-11-01 14:02:40 +00:00
Pat Maddox
66a56e411c mfc-candidates: Support GitHub mirror naming conventions
GitHub repository mirrors are named freebsd-src and
freebsd-ports. Additionally, GitHub permits remote URLs with or
without the .git suffix.

Signed-off-by: Pat Maddox <pat@patmaddox.com>
Pull Request: https://github.com/freebsd/freebsd-src/pull/1483
2024-10-31 10:57:31 -04:00
Brooks Davis
50b5a37a12 src.conf.5: LOADER_BIOS_TEXTONLY default change
WITH_LOADER_BIOS_TEXTONLY is now the default so document
WITHOUT_LOADER_BIOS_TEXTONLY.

Fixes:		23dee252da loader: Change this BIOS tradeoff...
2024-10-30 19:35:57 +00:00
Mark Johnston
207ab5f4f1 rc.d/opensm: Only install when MK_OFED_EXTRA is set
opensm itself is only installed when MK_OFED_EXTRA is set, so it only
makes sense for the same to be true of the rc script.

PR:		257646
Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D47313
2024-10-29 13:01:00 +00:00
Wolfram Schneider
9d585fc395 absolute-symlink.sh: check for absolute symlinks on a FreeBSD system
The purpose of this script is to detect absolute symlinks on
a machine, e.g.:

    /etc/localtime -> /usr/share/zoneinfo/UTC

Some of these absolute symbolic links can be created intentionally,
but it is usually better to use relative symlinks.

You can run the script after `make installworld', or any other
make targets thats installs files.

You can also check your local ports with:

   env ABSOLUTE_SYMLINK_DIRS=/usr/local ./absolute-symlink.sh
2024-10-26 08:31:19 +00:00
Robert Clausecker
d8cd2d0833 depend-cleanup.sh: clean up after hash function removal from libcrypt
The hash function removal changed the mangled names of MD[45] and
SHA{256,512} hash function identifiers.  Clean these files to pick
up the symbol change.

Reported by:	bapt
Tested by:	brooks
Fixes:		cb5e41b160
2024-10-25 22:56:04 +02:00
Jose Luis Duran
3ab8697d9e git-arc: Do not echo unescaped literals to jq
Store the json blobs in temporary files instead of variables, and feed
them to jq for parsing.

When echoing "\n", the new line will become a literal new line, and
therefore, invalid json input:

```
jq: parse error: Invalid string: control characters from U+0000 through U+001F must be escaped ...
```

To reproduce:

    % git arc patch -c D12345

Reviewed by:	0mp, imp, markj
Approved by:	markj (mentor)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D46767
2024-10-25 15:23:02 +02:00
Jose Luis Duran
7d875598fc git-arc: Make patch with reviewers more portable
Avoid an ArcanistUsageException:

    Provide method parameters on stdin as a JSON blob.

Due to an invalid JSON input on strict POSIX-compliant shells (macOS):

    echo '{
            "constraints": {"phids": [-n,"PHID-USER-xxx",]}
          }'                          ^^^               ^

Change the non-portable "echo -n" to a printf.

Reviewed by:	0mp, imp, markj
Approved by:	markj (mentor)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D46781
2024-10-25 15:22:52 +02:00
Brooks Davis
8b2e7da708 llvm19: permit incremental builds from llvm18
Detect and delete out of date clang-tblgen produced output.  I found it
sufficent for compilation to delete only arm_*.inc files, but it seems
safer to regenerate all output and a few extra clang-tblgen runs pales
in comparison to the full build we're doing at this point.

Reviewed by:	dim, emaste
Differential Revision:	https://reviews.freebsd.org/D47270
2024-10-23 23:38:18 +01:00
Dimitry Andric
0fca6ea1d4 Merge llvm-project main llvmorg-19-init-18630-gf2ccf80136a0
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project main llvmorg-19-init-18630-gf2ccf80136a0, the
last commit before the upstream release/19.x branch was created.

PR:		280562
MFC after:	1 month
2024-10-23 20:26:01 +02:00
Kyle Evans
8306900075 cross-build: fix missing <sys/md4.h> the proper way
Add it to tools/build/Makefile with a short note of where it's needed,
rather than hamfistedly copying it into the tools/build hierarchy.

Reported by:	jrtc27
Reviewed by:	jrtc27
Fixes:	aad507854e ("Fix the cross-build after recent commits")
Differential Revision:	https://reviews.freebsd.org/D46854
2024-10-18 15:53:15 -05:00
Jessica Clarke
0bdf2535d4 tools/build/cross-build: Don't include sys/uio.h from linux limits.h
This creates a circular dependency for OpenZFS's libspl in sys/uio.h,
and it shouldn't be needed since the system limits.h already defines
IOV_MAX, so delete it, and unconditionally assert that to be the case.
Otherwise the re-include of libspl's sys/uio.h tries to use PAGESIZE
before it has been defined by OpenZFS's own sys/param.h.

Fixes:		7a7741af18 ("zfs: merge openzfs/zfs@b10992582")
MFC after:	1 week
2024-10-18 21:39:37 +01:00
Jessica Clarke
d41a40f484 depend-cleanup.sh: Clean up after riscv static binary IFUNC addition
reloc.c is conditionally included by libc_start1.c so existing builds
don't feature it in the .depend file and won't know they need to rebuild
libc_start1.c.

MFC after:	1 week
2024-10-18 19:15:30 +01:00
Graham Percival
6e1fc01180 manuals: Fix "unusual .Xr" warnings with a script
These were reported by `mandoc -T lint ...` as warnings:
- unusual Xr order
- unusual Xr punctuation

Fixes made by script in https://github.com/Tarsnap/freebsd-doc-scripts

Signed-off-by:	Graham Percival <gperciva@tarsnap.com>
Reviewed by:	mhorne, Alexander Ziaee <concussious.bugzilla@runbox.com>
Sponsored by:	Tarsnap Backup Inc.
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1464
2024-10-15 17:18:14 -03:00
Baptiste Daroussin
c5dee76368 unicode: revert to 15, more work is needed for 16 2024-10-14 17:59:39 +02:00