powerpc64: initial conversion of oea64 to rwlocks
Convert the oea64 mmu code to rwlocks.
Reviewed by: jhibbits
Differential Revision: https://reviews.freebsd.org/D54936
asmc: resource cleanup simplifications
This change makes `asmc_detach(..)` reentrant by setting freed resources
to known invalid values when done, and makes `asmc_attach(..)` call
`asmc_detach(..)` instead of attempting to the semi-equivalent way of
cleaning up the driver resources allocated in `asmc_detach(..)`.
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D55413
Retire GNU diff3
We added the option to build BSD diff3 in commit 2201f7c49f11 ("Build
BSD diff3 if GNU diff3 is disabled.") and made it the default in
4d5c434ed16e ("diff3: use bsd diff3 by default") after resolving
deficiencies relative to GNU diff3. Thus, we can now remove the GNU
diff3 build infrastructure and source.
Reviewed by: bapt, ziaee
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D46878
audio/rhythmbox: disable PYTHON option by default
pygobject 3.52+ uses girepository-2.0 which conflicts with libpeas-1.0
old gobject-introspection-1.0 headers at compile time.
Co-Authored-By: Claude Sonnet 4.6 <noreply at anthropic.com>
Eliminate datastore threadpool executor
This commit removes the datastore plugin threadpool executor
that was serializing all database reads / writes inside a single
thread. Instead it is replaced with per-thread SQL connection
objects with generation tracking (for noting when we need to
reopen the database due to config file upload). Reads are
MT-safe, writes are serialized behind a threading lock primarily
for the purposes of enterpise HA and cross-node database
consistency.
vacuum db before presenting for download
There have been some circumstances in the past in which users
were unable to upload db through the webui due to file size
limits. For various reasons, DB had expanded to tens of MiB
in size. Users were able to work around by vacuuming. Since
we're already prepping copy of DB for download, we should
create it as a vacuumed copy.
gpt(8): Improve "show" command to print a disk summary line
Before print the partition entries, print a disk summary line like:
"Disk /dev/da0: 50.0GB (104857600 512-byte sectors)".
In addition, add a blank line between disks.
Example new output:
```
$ sudo gpt show /dev/da0 ad0
Disk /dev/da0: 50.0GB (104857600 512-byte sectors)
start size index contents
0 1 - PMBR
1 1 - Pri GPT header
2 32 - Pri GPT table
34 2014 - Unused
2048 262144 0 GPT part - EFI System
264192 104591360 1 GPT part - DragonFly Label64
104855552 2015 - Unused
[14 lines not shown]
gpt(8): Print a warning message when gpt_write() fails
gpt_write() is used in many places and all of them don't handle the
writing failure, so update gpt_write() to print a warning message when
it fails.
gpt(8): Fix surrogate pair handling bug in utf16_to_utf8()
* The old code mishandled surrogate pairs and thus failed to recognize
valid UTF-16 characters and would replace them with 0xFFFD. Fix the
code to correctly handle the surrogate pairs.
* Fix an out-of-bound access in the old code when it tried to handle the
surrogate pairs. Check `s16idx < s16len` before accessing it with
`le16toh(s16[s16idx])`.
* Remove the `if (utfchar < 0x200000)` branch, because it's impossible
for `utfchar` exceeding 0x200000.
* Tweak the `while` loop conditional to clean up the code.
Credit: ChatGPT (https://chatgpt.com/)
gpt(8): Change utf8_to_utf16/utf16_to_utf8() to use 'char *'
Use 'char *' instead of 'uint8_t *' for NUL-terminated UTF-8 strings,
making it easier for callers.
Makefile.inc1: Allow safe installkernel with pkgbase
Commit 74a6bb524e5b added a check to install{world,kernel} to avoid
people accidentally running this on pkgbase systems and leaving their
system broken. This had two issues:
(1) The warning was not sufficiently scary, leading people to think
this was safe to do as long as they set DESTDIR=/.
(2) The installkernel check was too strict, and prevented installing
kernels that don't conflict with packaged kernels.
Fix (1) by rewording the warning to be scarier, and while here, add
two new variables (ALLOW_PKGBASE_INSTALL{WORLD,KERNEL}) which could
be set in /etc/make.conf for people who want to break their systems
by default.
Fix (2) by improving the installkernel check to see if the kernel(s)
we're actually installing are packaged. This means a new kernel can
[12 lines not shown]
Makefile.inc1: Fix INSTALLEXTRAKERNELS for one-kernel case
If BUILDKERNELS contains a single kernel, and NO_INSTALLEXTRAKERNELS=no,
then ${BUILDKERNELS:[2..-1]} returns the first kernel in the list and
that kernel ends up in both INSTALLKERNEL and INSTALLEXTRAKERNELS.
This breaks the package build because it means we generate that package
twice, once with an incorrect install path of /boot/kernel.NAME instead
of /boot/kernel.
Only set INSTALLEXTRAKERNELS if we're building at least two kernels.
Fixes: 2c0e9a76c1ce ("Makefile.inc1: Make NO_INSTALLKERNEL less of a hack")
Reviewed by: jrtc27
Sponsored by: https://www.patreon.com/bsdivy
Differential Revision: https://reviews.freebsd.org/D54539
(cherry picked from commit 0b298e314a8b47c1f2bf8a9ff86c050accbd744d)
Makefile.inc1: Make NO_INSTALLKERNEL less of a hack
Rather than adding a dummy entry which requires everyone to know to skip
it, introduce a new INSTALLEXTRAKERNELS which contains the set of
kernels to install as kernel.KERNCONF.
Reviewed by: ivy
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D54291
(cherry picked from commit 2c0e9a76c1cee8766245a0b5bdad73e995b790c6)
gpt(8): Fix bugs in utf8_to_utf16()
- The 'utfchar' was incorrectly reinitialized to zero on every loop
iteration and thus destroyed the decoding state of multi-byte UTF-8
sequences. Fix it.
- Fix the endianness by adding the missing htole16() calls.
Obtained-from: NetBSD
gpt(8): Improve utf8_to_utf16()
- No need to NUL-terminate the UTF-16 string when it needs truncation.
- Pad the remaining characters with zeros. (obtained from NetBSD)
gpt(8): Improve utf16_to_utf8()
- Let caller pass the buffer and thus avoid memory allocation.
- Handle the case that there is no NUL termination, i.e., the partition
name is exactly 36 characters, which is allowed by the specification.
Obtained-from: NetBSD