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
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
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
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
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
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
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
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
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
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
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
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
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
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
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)
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Explicitly mention that it requires the arcanist port or package, and
edit some grammar and markup.
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D47060
Notable upstream pull request merges:
#9416 -multiple zio_compress: introduce max size threshold
#10018a10e552b9 Adding Direct IO Support
#15147e419a63bf xattr dataset prop: change defaults to sa
#154547e957fde7 send/recv: open up additional stream feature flags
#158100d77e738e Defer resilver only when progress is above a threshold
#159213cf2bfa57 Allocate zap_attribute_t from kmem instead of stack
#16483 -multiple dmu_objset: replace dnode_hash impl with cityhash4
#164858be2f4c3d zio_resume: log when unsuspending the pool
#1649188433e640 sys/types32.h: Remove struct timeval32 from libspl header
#16496f245541e2 zfs_file: implement zfs_file_deallocate for FreeBSD 14
#16511308f7c2f1 Fix an uninitialized data access
#1652929c9e6c32 Fix handling of DNS names with '-' in them for sharenfs
#16531ddf5f34f0 Avoid fault diagnosis if multiple vdevs have errors
#165396f50f8e16 zfs_log: add flex array fields to log record structs
#16546d40d40913 Evicting too many bytes from MFU metadata
#165513014dcb76 Reduce and handle EAGAIN errors on AIO label reads
#1655480645d658 FreeBSD: restore zfs_znode_update_vfs()
#16565832f66b21 FreeBSD: Sync taskq_cancel_id() returns with Linux
#1656748d1be254 Properly release key in spa_keystore_dsl_key_hold_dd()
#16569141368a4b Restrict raidz faulted vdev count
#16583c84a37ae9 lua: add flex array field to TString type
#1658486737c592 Avoid computing strlen() inside loops
#16587d34d4f97a snapdir: add 'disabled' value to make .zfs inaccessible
#16593224393a32 feature: large_microzap
#16597412105977 Temporarily disable Direct IO by default
#166054ebe674d9 ARC: Cache arc_c value during arc_evict()
Backported pull request merges:
#16613ab777f436 Return boolean_t in inline functions of
lib/libspl/include/sys/uio.h
#16616efeb60b86 FreeBSD: ignore some includes when not building kernel
#16635 ---TBD--- zdb: fix printf format in dump_zap()
Obtained from: OpenZFS
OpenZFS commit: b109925820
OpenZFS tag: 2.3.0-rc1
Add a threaded test for buf_ring.h used to help find issues with it on
architectures with a weak memory order.
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D46158
- Provide a sys/md4.h in the cross-build environment to fix bootstrap
of libmd.
- flua now exposes WTRAPPED which isn't incredibly common- make it
conditional, we probably won't be using it in any bootstrap context
any time soon.
Fixes: 442e0975ee ("Consolidate md4 implementations written in C")
Fixes: c2caf3b331 ("flua: posix: add more useful functions [...]")
and allow to revert it back to 48 with WITHOUT_JEMALLOC_LG_VADDR_WIDE build
option.
Reviewed by: andrew, emaste
Sponsored by: Advanced Micro Devices (AMD)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D46686
This handles copying in install-boot.sh and bsdinstall's bootconfig.
install-boot.sh:
make_esp_file now optionally takes extra arguments so it can copy
multiple files. This is used by the amd64 release scripts.
make_esp_device also takes an extra optional argument for efibootname.
This is currently unused, but it can be used in the future to do
something like:
make_esp_device loader.efi bootx64
make_esp_device loader_ia32.efi bootia32
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1098