Commit graph

5853 commits

Author SHA1 Message Date
Jessica Clarke b9c5eab0f3 depend-cleanup.sh: Fix overzealous syscall.S cleanup on amd64
Just as we skip the cleanup for i386 due to still having a custom
syscall.S, we also need to do the same for lib32 on amd64, so filter it
out of ALL_libcompats here.

Fixes:	a650ec0e55 ("lib{c,sys}: fix incremental builds")
2024-09-10 18:54:45 +01:00
Jessica Clarke 1a55697719 depend-cleanup.sh: Fix overzealous syscall.S cleanup on non-amd64
Although there is no longer a syscall.S in the source tree, the
generated file is still called syscall.S, so the syscall\.S regex still
matches the .depend file. Previously it looked like:

    syscall.o \
      /path/to/src/lib/libc/MACHINE/sys/syscall.S \
      ...

or

    syscall.o \
      /path/to/src/lib/libsys/MACHINE/syscall.S \
      ...

Now it looks like:

    syscall.o: syscall.S \
      ...

Thus, match on the file having a directory specified, to distinguish it from
the generated case where it's adjacent in the OBJDIR. Note the .* is needed due
to the use of egrep -w.

Fixes:	3a4b04e82d ("depend-cleanup.sh: Simplify handling for stale syscall.S")
2024-09-10 18:54:45 +01:00
Jessica Clarke 0980d0a037 depend-cleanup.sh: Fix overzealous abd_os.c cleanup
A source file with the same name is still used to build an abd_os.o, it
just comes from a different directory. Thus we need to include part of
the path in the regex too. Technically zfs/abd_os\.c would suffice given
it's now in sys/contrib/openzfs/lib/libzpool/abd_os.c, but this seems
clearer and less likely to have future false-positives.

Fixes:	fd3d3240b0 ("depend-cleanup.sh: Add a rule to work around abd_os.c dependency changes")
2024-09-10 18:54:45 +01:00
Jessica Clarke cc30f4ae67 depend-cleanup.sh: Extend clean_dep to support a custom regex
This will avoid having to duplicate the loop every time the default
regex isn't good enough, and will be used by upcoming commits.
2024-09-10 18:54:44 +01:00
Jessica Clarke e546c3950a depend-cleanup.sh: Fix overzealous rescue.mk cleanup
grep -q -v means "are there any lines that don't match", not "are there
no lines that match", and since the file has lines other than ones with
nvme_util.o when up-to-date this triggers on every build.

Fixes:		26a09db3ad ("Fix incremental build with WITH_NVME newly enabled")
MFC after:	1 week
2024-09-10 17:33:06 +01:00
Jessica Clarke 7ce171bd42 depend-cleanup.sh: Fix pretend (-n) mode
Fixes:		26a09db3ad ("Fix incremental build with WITH_NVME newly enabled")
MFC after:	1 week
2024-09-10 17:14:37 +01:00
Mark Johnston fd3d3240b0 depend-cleanup.sh: Add a rule to work around abd_os.c dependency changes
Fixes incremental buildworld after the latest OpenZFS import.

Fixes:	e2df9bb441 ("zfs: merge openzfs/zfs@b10992582")
Sponsored by:	Klara, Inc.
2024-09-10 15:29:39 +00:00
Wolfram Schneider c77ca9a72c stale-symlink-buildworld.sh: improve documentation 2024-09-09 14:55:29 +00:00
Mark Johnston 24affded3d src.conf: Add a MK_ZFS_TESTS knob
The in-tree ZFS test suite is somewhat outdated and I see a number of
failures there.  I tend to think that we want to integrate the OpenZFS
test suite somehow, replacing the legacy one, though it's also possible
to run that as a separate test suite.

In any case, if one wants to run the OpenZFS test suite separately, it's
useful to be able to disable installation of the legacy ZFS test suite,
so let's provide a src.conf option to do that.

Reviewed by:	asomers
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D46476
2024-09-07 14:36:28 +00:00
Val Packett 7b9c9f8004 cross-build: fix fake_sysctl/tzsetup
The error was always returned, even after handling the sysctl, breaking
installworld under Linux.

Sponsored by:		https://www.patreon.com/valpackett

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1376
2024-09-06 12:34:32 -06:00
Peter Holm f6fd5af80a stress2: Do not wait forever for swap usage 2024-08-30 10:04:46 +02:00
Peter Holm c7c3f6351e stress2: Update comments and remove one test 2024-08-29 09:59:16 +02:00
Jessica Clarke 18aef07cfa beinstall: Pass -B to etcupdate
Since commit 246364454f ("etcupdate: Use new buildetc and installetc
targets when available"), beinstall has been much slower for the
etcupdate step, as it's been doing a kernel-toolchain (admittedly
without LLVM itself being built). Given beinstall requires an object
tree to already have been built and just installs it, we can pass -B to
beinstall to reuse that tree rather than build kernel-toolchain in
another one.

Reported by:	olivier
Tested by:	olivier
MFC after:	1 week
2024-08-28 23:36:56 +01:00
John Baldwin 0a5996443b src.conf.5: Fix spelling typo
Sponsored by:	AFRL, DARPA
2024-08-20 07:54:12 -04:00
Peter Holm c7bc30c24f stress2: Some tests use hw.ncpu to scale the load. Tests on a box with
a large number of CPUs show that this number needs to be capped
2024-08-17 08:37:34 +02:00
Peter Holm 41e03b46da stress2: Fix warning about unused variable. Remove debug "date" 2024-08-16 09:19:51 +02:00
Kyle Evans 6df36deb8b boot: update lua linter for recent module additions
For modules we expect to be there, we need to --globals them in to avoid
linter errors.  Maybe we should switch to a different model for these
to clean up our linter exceptions... 'meh'.

Reported by:	David Cross <david_crossfamilyweb_com>
2024-08-12 20:57:14 -05:00
Wolfram Schneider ccb0365643 stale symlinks: configurable obj dir prefix
Use $MAKEOBJDIRPREFIX if set, otherwise /usr/obj
2024-08-12 19:34:43 +00:00
Warner Losh bf4f27e85a options: Make it clearer some x86 / BIOS only things
Suggested by: jrtc27
Sponsored by: Netflix
2024-08-06 17:39:10 -06:00
Warner Losh 20d35d5817 loader: Add WITH/WITHOUT_LOADER_PXEBOOT build option
Make it possible to disable pxeboot. This loader will fail to build when
it's too large. When /boot/loader needs to be larger like that, this
options will disable a component whose build will fail. It is an explicit
option rather than implicit when things are too large to force the user to
make the explicit tradeoffs rather than wonder why they have a stale pxeboot
or other odd failure mode.

MFC After:		3 days
Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D46212
2024-08-06 17:22:36 -06:00
Warner Losh 7ee781e2bf loader: Document that WITH_BEARSSL may need other tweaks
/boot/loader is right up aginst the 500k limit we have to make sure
everything works in a wide variety of environments. However, adding
WITH_BEARSSL can push it over the edge since we are so close to the
limit with it enabled. One may also need to increase LOADERSIZE when
enabling it. It's often safe to go much higher, especially when you
don't plan on using pxeldr. Document this trade off here.

MFC After:		3 days
Sponsored by:		Netflix
Reviewed by:		sjg, markj
Differential Revision:	https://reviews.freebsd.org/D46211
2024-08-06 17:22:36 -06:00
John Baldwin 3a4b04e82d depend-cleanup.sh: Simplify handling for stale syscall.S
Remove the outer grep and depend on the greps in clean_dep instead.

Reviewed by:	brooks, imp
Obtained from:	CheriBSD
Sponsored by:	AFRL, DARPA
Differential Revision:	https://reviews.freebsd.org/D46103
2024-08-05 15:49:06 -04:00
Ed Maste 5c2bc3db20 Remove "All Rights Reserved" from FreeBSD Foundation copyrights
These ones were unambiguous cases where the Foundation was the only
listed copyright holder.

Sponsored by:	The FreeBSD Foundation
2024-07-30 12:16:36 -04:00
Ed Maste 4a06d14937 depend-cleanup: remove entries from 2020 and 2021
> These tests increase the build time (albeit by a small amount), so
> they should be removed once enough time has passed and it is extremely
> unlikely anyone would try a NO_CLEAN build against an object tree from
> before the related change.

The comment suggests a year is a reasonable period but we'll be somewhat
more conservative for now, in part so that we retain different examples
of special cases.

Reviewed by:	brooks, imp
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D46178
2024-07-29 14:57:32 -04:00
Ed Maste ba373fca78 Do not clean (in buildworld/buildkernel) by default
As discussed on the freebsd-arch mailing list[1].  For historical
reasons FreeBSD's buildworld and buildkernel targets started by cleaning
the object tree, for traditional (non-metamode) builds.

Cleaning is not necessary when dependencies are properly tracked, and we
have a somewhat kludgey script[2] to handle some known cases where deps
were mishandled by traditional builds.  Be consistent with the vast
majority of open source build systems by default, and do not clean at
the beginning of buildworld or buildkernel.

Users may set WITH_CLEAN in src.conf(5) to restore the previous
behaviour, or run `make cleanworld` and/or `make cleankernel` before
starting a build.

[1] https://lists.freebsd.org/archives/freebsd-arch/2024-July/000727.html
[2] tools/build/depend-cleanup.sh

Reviewed by:	jhb, imp
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D46172
2024-07-29 13:16:52 -04:00
Jose Luis Duran d55de30efd tools/build/make.py: Minor typo fix
If the object directory prefix does not exist, make.py previously exited
with a message indicating that the chosen prefix does not exit.

Reviewed by:	emaste
Pull request:	https://github.com/freebsd/freebsd-src/pull/1348
2024-07-27 23:04:24 -04:00
Bjoern A. Zeeb d1bdc2821f Deprecate contigfree(9) in favour of free(9)
As of 9e6544dd6e contigfree(9) is no longer
needed and should not be used anymore.  We leave a wrapper for 3rd party
code in at least 15.x but remove (almost) all other cases from the tree.

This leaves one use of contigfree(9) untouched; that was the original
trigger for 9e6544dd6e and is handled in D45813 (to be committed
seperately later).

Sponsored by:	The FreeBSD Foundation
Reviewed by:	markj, kib
Tested by:	pho (10h stress test run)
Differential Revision: https://reviews.freebsd.org/D46099
2024-07-26 10:45:01 +00:00
Warner Losh 18cf1e5023 cross-build: Define DEFFILEMODE and ALLPERMS if not defined
GLIBC defines these, but MUSL does not. FreeBSD's bootstrap code uses
these defines, so define them if they aren't yet defined.

Co-authored-by:		Val Packett <val@packett.cool>
Sponsored by:		Netflix
Pull Request:		https://github.com/freebsd/freebsd-src/pull/1066
Differential Revision:	https://reviews.freebsd.org/D45375
2024-07-24 20:47:26 -06:00
Warner Losh 744991d495 cross-build: progname.c is used only on linux, so no ifdefs needed
The logic in the makefile ensures this is only present on Linux, so no
ifdef is needed. I overlooked comments to the effect in the original
pull request somehow.

Fixes:			0e03402139
Suggested by:		arichards, jrtc27
Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D45374
2024-07-24 20:47:26 -06:00
Warner Losh 4a0b7955fd cross-build: Move fcntl.h workaround to Linux specific file
Move the cdefs.h inclusion to the Linux specific file. Either place will
work, but it makes more sense to do it in the Linux specific file since
it's a Linux specific workaround.

Fixes:			4300e05361
Suggested by:		arichards, jrtc27
Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D45373
2024-07-24 20:47:26 -06:00
Gordon Bergling 32a9b95a87 stress2: Fix a typo in namecache2.sh
- s/inconsistancy/inconsistency/

MFC after:	3 days
2024-07-21 11:00:58 +02:00
Peter Holm 00266393cc stress2: Fix tests after the new default for newfs(8) is "SU"
Some checks are pending
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-14, /usr/lib/llvm-14/bin, ubuntu-22.04, bmake libarchive-dev clang-14 lld-14, arm64, aarch64) (push) Waiting to run
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-14, /usr/lib/llvm-14/bin, ubuntu-22.04, bmake libarchive-dev clang-14 lld-14, amd64, amd64) (push) Waiting to run
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-13, /opt/homebrew/opt/llvm@13/bin, macos-latest, bmake libarchive llvm@13, arm64, aarch64) (push) Waiting to run
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-13, /opt/homebrew/opt/llvm@13/bin, macos-latest, bmake libarchive llvm@13, amd64, amd64) (push) Waiting to run
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-12, /usr/lib/llvm-12/bin, ubuntu-20.04, bmake libarchive-dev clang-12 lld-12, arm64, aarch64) (push) Waiting to run
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-12, /usr/lib/llvm-12/bin, ubuntu-20.04, bmake libarchive-dev clang-12 lld-12, amd64, amd64) (push) Waiting to run
2024-07-20 10:52:29 +02:00
Peter Holm 94e62a5f91 stress2: Exclude one more test 2024-07-19 09:55:39 +02:00
Jessica Clarke e21e8c9180 tools/build: Unbreak cross build by providing stub ssp/ssp.h
We build arc4random.c on non-FreeBSD, which now wants the header for
__ssp_real.

Fixes:	d0b7445904 ("include: ssp: fortify <stdlib.h>")
2024-07-17 13:11:25 +01:00
Peter Holm 9c73f38cd3 stress2: Add a new test scenario. Update the exclude list 2024-07-16 06:47:28 +02:00
Warner Losh e9ac41698b Remove residual blank line at start of Makefile
Some checks are pending
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-14, /usr/lib/llvm-14/bin, ubuntu-22.04, bmake libarchive-dev clang-14 lld-14, arm64, aarch64) (push) Waiting to run
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-14, /usr/lib/llvm-14/bin, ubuntu-22.04, bmake libarchive-dev clang-14 lld-14, amd64, amd64) (push) Waiting to run
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-13, /opt/homebrew/opt/llvm@13/bin, macos-latest, bmake libarchive llvm@13, arm64, aarch64) (push) Waiting to run
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-13, /opt/homebrew/opt/llvm@13/bin, macos-latest, bmake libarchive llvm@13, amd64, amd64) (push) Waiting to run
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-12, /usr/lib/llvm-12/bin, ubuntu-20.04, bmake libarchive-dev clang-12 lld-12, arm64, aarch64) (push) Waiting to run
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-12, /usr/lib/llvm-12/bin, ubuntu-20.04, bmake libarchive-dev clang-12 lld-12, amd64, amd64) (push) Waiting to run
This is a residual of the $FreeBSD$ removal.

MFC After: 3 days (though I'll just run the command on the branches)
Sponsored by: Netflix
2024-07-15 16:43:39 -06:00
Wolfram Schneider e880dd644f stale-symlink-buildworld.sh: a script to check for stale symlinks on a FreeBSD system
You can run the script before or after `make installworld'

You may also check your local ports with:

  env STALE_SYMLINK_BUILDWORLD_DIRS=/usr/local ./stale-symlink-buildworld.sh

PR: 276235
2024-07-07 12:59:20 +00:00
Peter Holm 12be19572a stress2: Add two test. Fix a typo while here 2024-07-04 09:14:45 +02:00
Peter Holm ad99f0062b stress2: Added a new unionfs test scenario 2024-07-04 09:13:39 +02:00
Alexander Ziaee 088cc7d221 man filesystems: fix more xrefs after move to s4
Fixes: 1a720cbec5
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1282
2024-06-27 18:32:05 -06:00
Andrew Turner 4f351c1ddc tools/boot/universe.sh: Remove armv6 from a comment
It is in the process of being removed.

Reviewed by:	manu, emaste
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D45642
2024-06-20 09:26:20 +00:00
Andrew Turner a67a0a6a20 nanobsd: Remove armv6 support
In preparation for removing armv6 remove it from nanobsd.

Reviewed by:	imp, emaste
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D45635
2024-06-20 09:26:06 +00:00
Peter Holm d26c565597 stress2: Revert change accidentally added in ff4a72c159 2024-06-15 08:33:14 +02:00
Andrew Turner bbdf32d94c nanobsd: Remove pre-armv6 support
Remove support for pre-armv6 from nanobsd. It was removed from FreeBSD
in 2020.

Reviewed by:	imp, emaste
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D45560
2024-06-12 11:49:13 +00:00
Peter Holm ff4a72c159 stress2: Replace random() with arc4random() 2024-06-11 15:52:34 +02:00
Peter Holm cb53f83d8a Revert "stress2: Replace rename() with arc4random()"
This reverts commit f65d0b18d9.

Misleading commit message
2024-06-11 15:51:21 +02:00
Peter Holm f65d0b18d9 stress2: Replace rename() with arc4random() 2024-06-11 09:38:13 +02:00
Ed Maste 0e34d09930 Add WITHOUT_LLVM_BINUTILS src.conf description
Before FreeBSD 15 I plan to switch to LLVM_BINUTILS by default.  Add the
src.conf description now, for the benefit of downstream branches and
testing/CI.

PR:		258872 [exp-run]
Sponsored by:	The FreeBSD Foundation
2024-06-10 11:50:32 -04:00
Ed Maste 87e5b17c14 prepare-commit-msg: add 50 column marker
A common convention suggests a 50 column commit subject line (the first
line of the commit message).  Add a 50 column marker to the commit
message template

Reviewed by:	lwhsu
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D45538
2024-06-10 10:48:32 -04:00
John Baldwin b0e7358bf8 cryptocheck: Don't treat OpenSSL errors as fatal
Abort the current test but keep running additional tests if OpenSSL
reports an error during a test.  This matches the behavior for other
tests such as an error from OCF.

Reviewed by:	markj
Sponsored by:	AFRL, DARPA
Differential Revision:	https://reviews.freebsd.org/D45279
2024-06-06 14:48:38 -07:00