Commit graph

304744 commits

Author SHA1 Message Date
Christos Margiolis
2bee4bb7f1 src.opts: Introduce MK_SOUND
PR:		291853
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Reviewed by:	zarychtam_plan-b.pwste.edu.pl, markj
Differential Revision:	https://reviews.freebsd.org/D54456

(cherry picked from commit f74f891581bc4df20431607de9b761107f6a0aa7)
(cherry picked from commit 37164224eefd11278b0203e1367e1d9d1454da3f)
(cherry picked from commit 241a43cf9da8933f500e7d0df7fff621fd52168c)
(cherry picked from commit cf34eb8264954a8fd1e92081bcf67719bddbc2aa)
(cherry picked from commit 466bad427d74e666e85445729b2e63b82e10d18f)
2026-01-21 18:06:42 +02:00
Christos Margiolis
47917383c6 sound: Replace MIN() with min()
We use min() in most places.

No functional change intended.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week

(cherry picked from commit eccd366b0a8ba7d902fcf0b1bec447926a75c36c)
2026-01-21 18:05:31 +02:00
Christos Margiolis
17ed747f1e sndctl(8): Add libxo support
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Reviewed by:	ziaee, mckusick
Differential Revision:	https://reviews.freebsd.org/D54032

(cherry picked from commit aa58af04dc88aabf9d2fade2c7d126031cb66f42)
2026-01-21 18:05:31 +02:00
Christos Margiolis
0d33cdd04d sound: Unlock around uiomove() in midi_{read,write}()
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D54130

(cherry picked from commit 6b69d6726a7d3455fb295abfcf9aedd48c580d4a)
2026-01-21 18:05:31 +02:00
Jose Luis Duran
9f90e5a3ce
libexecinfo: tests: Expect failure on aarch64
Add a guard that expects a failure of the test on aarch64.

Reviewed by:	emaste
Fixes:		df1ea58873 ("tests: Test libexecinfo backtrace call througth signal trampoline")
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D54675

(cherry picked from commit fef84fd8ae845e19cec0f6b9aac0e6451cca3d7a)
2026-01-21 01:50:39 +00:00
Jose Luis Duran
27bf077ab3
gdb: Add missing mtree debug entry
Reviewed by:	markj
Fixes:		ea675a43f09b ("libexec/kgdb: Add new modules and install them together with debug info")
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D54680

(cherry picked from commit 0d9fd06b03e06ae642fa54510473b15361034a54)
2026-01-21 01:50:01 +00:00
Alan Somers
1ad466ca83 netstat: fix a segfault with --libxo
Fix a segfault when printing the "protocol" field.  The field-format and
encoding-format were expecting different numbers of arguments.

Also, fix the width of the tcp-state field in encoded output.

PR:		292228
Fixes:		c2b08c13c20 netstat: add support for UDP-Lite endpoints
Sponsored by:	ConnectWise
Reviewed by:	tuexen, js, des
Differential Revision: https://reviews.freebsd.org/D54567

(cherry picked from commit 3b6615ec0332f901fcc9e9307f78717424f09c1e)
2026-01-20 15:31:30 -07:00
Alan Somers
b6533f67c3 fusefs: Fix further intermittency in the BadServer.ShortWrite test case
After being unmounted, the mockfs server would occasionally read from
/dev/fuse again, if the main function didn't exit fast enough, getting
an ENODEV error.  Handle that appropriately.

Reported by:	Siva Mahadevan <me@svmhdvn.name>
Fixes:		d86025c1d49c84c4dc8c3635c83c078ad56e5a53
Reviewed by:	Siva Mahadevan <me@svmhdvn.name>
Differential Revision: https://reviews.freebsd.org/D54331

(cherry picked from commit f51e9d0e0988df58c94db586ab5c8b5fd091c004)
2026-01-20 15:31:30 -07:00
Alan Somers
46a760e578 gpart: "gpart --libxo:JP list" duplicates attribute keys
Add leaf-list modifier to attrib as it's possible to have multiple
attributes on a gpart provider.

I purposely made it so that the normal output still says "attrib:" just
so we don't break any scripts people may be using to parse the output,
but the libxo output now says "attribute" just like `gpart show` will do
once https://reviews.freebsd.org/D53950 is merged.

PR:		291377
Reviewed by:	asomers
Sponsored by:	ConnectWise
Differential Revision: https://reviews.freebsd.org/D54080

(cherry picked from commit a0347b0f3a6088872c29eddb85154478d543dffb)
2026-01-20 15:31:29 -07:00
Kristof Provost
2c42d62fd3 pf: fix min-ttl and set-tos for nat64
If we have both af-to and min-ttl or set-tos on a single rule we didn't
apply the new ttl or tos.

That's because the scrub code still applied the change, but we
subsequently create a new header for the new address family. That's done
based on the ttl/tos saved in the struct pf_pdesc, which are the values
from the incoming packet, before the scrub modification(s).

Also update the struct pf_pdesc values when we update packets.

Reported by:	Marek Zarychta
Sponsored by:	Rubicon Communications, LLC ("Netgate")

(cherry picked from commit cdbc9b76ff4901816b5ebdca5d0b7e9947a015cb)
2026-01-20 20:08:31 +01:00
Ed Maste
9b91d49055 makeman.lua: Update for src.conf in the src tree
Copy the text change from the shell makeman to makeman.lua.

Fixes: dd8c666d8b78 ("src.sys.mk: Support src.conf in SRCTOP")
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit 2619d439fa860db734dbbf4b153c5ac9b15c7e49)
2026-01-20 11:50:09 -05:00
Jose Luis Duran
9fb909d320
tests: Increase timeout
Bump the timeout value, to avoid cutoff on emulated architectures on
ci.freebsd.org.

Reported by:	Jenkins
Reviewed by:	ngie
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D54550

(cherry picked from commit 47015e4546619151f9bff548a3758b72286d04ed)
(cherry picked from commit a551b0524953cbfa4f1035c6d968623e64f4436a)
(cherry picked from commit a4f0a60e05293f3f517324f3ebc41046a79a9feb)
2026-01-20 16:36:55 +00:00
Kristof Provost
3830c62b12
pf tests: give rules_counter:4G more time
Sponsored by:	Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 8217075f9ecb12fa9a4cf746541b9d3e1dc57e79)
2026-01-20 16:35:17 +00:00
Johan Söllvander
01ffd4516f netstat: Remove padding from cc and stack fields
Trim white space padding that gets added libxo fields cc and stack when
using -C and -c.

The padding is only visible if you're using multiple stacks or
congestion algorithms.

PR:             292262
Reviewed by:    asomers, tuexen
Approved by:    asomers (mentor)
Differential Revision:  https://reviews.freebsd.org/D54709

(cherry picked from commit faa31fc0e7acc1c53bba2b69a63e9ff55d24faf7)
2026-01-20 12:47:30 +01:00
Kyle Evans
6dabfd3efe lualoader: fix pruning of non-existent default kernel
Removing the kernel from the list of available kernels is sufficient to
avoid rendering it in the list, but we need more for booting to actually
work.  Notably, the 'kernel' loader.conf var was left intact to its
default value, so if one didn't use the kernel selector in the menu then
we'd try to boot the nonexistent 'kernel' instead of the new default
(first autodetected).

There's room to improve the error messages here, but for now let's just
make it actually work correctly.

PR:		292232
Fixes:	d04415c520 ("loader: lua: remove the default kernel [...]")
(cherry picked from commit e30086ab4c8778ea70a3b19e83546ce1b4a16492)
2026-01-19 22:04:46 -06:00
Rob Norris
bc859baeea bectl: log modifying functions to zpool history
Modeled directly after the method used by the zfs/zpool commands: flag
commands with a "please log me" flag, and when there, reconstruct the
command line. On success, call the library function to add it to the
log.

(Majority of the change by Rob; minor edits by kevans@)

Signed-off-by: Rob Norris <rob.norris@klarasystems.com>
Co-authored-by:	Kyle Evans <kevans@FreeBSD.org>
Sponsored by:	Modirum MDPay
Sponsored by:	Klara, Inc.
(cherry picked from commit 2a87929671e6e6919c18f2c25d60f2c73c3d18f4)
2026-01-19 22:04:40 -06:00
Kyle Evans
5b2a742104 makedev(9): drop an additional note about cdevpriv dtors
These were previously somewhat safe to call destroy_dev(9), but will now
also cause a deadlock in the same fashion that d_close doing so would
previously.  Amend the note to point it out, in case it's useful for
someone.

Reviewed by:	imp, kib, markj

(cherry picked from commit 90314c04f10f583c37c59ec51fd628e3deaf3622)
2026-01-19 22:04:33 -06:00
Kyle Evans
e760f45b59 libc: report _SC_NPROCESSORS_ONLN more accurately in cpu-limited jails
We don't support CPU hotplug, but we do support cpuset(8) restrictions
on jails (including prison0, which uses cpuset 1).  The process cannot
widen its cpuset beyond its root set, so it makes sense to instead
report the number of cpus enabled there rather than the total number
in the system.

This change is effectively a nop for the majority of systems and jails
in the wild, though it does reduce the performance of this query now
that we can't take advantage of AT_NCPUS being provided in the auxinfo.

The implementation here is notably different than Linux, which would not
take cgroups into account.  They do, however, take CPU hotplug into
account, so the possibility for it to diverge from (and be lower than)
the # configured count to reflect what the process can actually be
scheduled on doesn't really diverge in semantics.

Reviewed by:	kib

(cherry picked from commit d617806aac1469319970e3551656e9deabb98a35)
2026-01-19 22:04:28 -06:00
Kyle Evans
d15be6d470 libutil: defer setting the MAC label until after the login class
MAC policies, like mac_biba(4), may forbid changing the login class once
a label has been applied.  For setting up the initial login context,
this isn't really expected and in-fact may break some class-based
configuration.

Defer setting the MAC label until after the login class is set, and
remove the requirement that we have a pwd entry since the label is
pulled from the login class -- we only use pwd for syslog in this path.

Patch is largely by Kevin Barry, with some modifications and this commit
message by kevans@.

PR:		177698
Reviewed by:	des, olce
Co-authored-by:	Kevin Barry <ta0kira gmail com>

(cherry picked from commit 98edcbcce0a4650084bd86e704cfa38bf590250c)
2026-01-19 22:04:17 -06:00
Kyle Evans
b5b3bf57e9 libc: fix description issues in mac_text(3)/mac_free(3)
mac_text(3) as-written would seem to indicate that a `mac_t` should be
freed with free(3), but this isn't the case.  One can derive from
context from when the change was introduced and COMPATIBILITY that this
was intended to talk about *text in `mac_to_text`, so move the comment
there.

PR:		179832
Co-authored-by:	Priit Järv <priit cc ttu ee>

(cherry picked from commit 081218b7a2006e5b6783e51f66fd751871ac1272)
2026-01-19 22:04:08 -06:00
Michael Osipov
f51bc79200 sockstat: improve formataddr() according to style(9)
Reviewed by:	des
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D54412

(cherry picked from commit f89f7e58ba1d54c6a683e3cc899938895496c088)
2026-01-19 23:08:30 +01:00
Mark Johnston
d80f249cba grep/tests: Fix up the zgrep executable path in a newly added test
Fixes:	da5d94d29a5e ("Remove obsolete BUGS section from zgrep(1) man page, add test")
(cherry picked from commit 045112f148fa092c92ec53204708f638b226ff8f)
2026-01-19 09:46:42 -08:00
Craig Leres
6aca792f6f Remove obsolete BUGS section from zgrep(1) man page, add test
I forgot to check/update the man page with D54217. While here add
a test for multiple -e flags.

Reviewed by:	markj
Approved by:	markj
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D54632

(cherry picked from commit da5d94d29a5ec29817476c39ae2b2ad1666c3f06)
2026-01-19 09:46:37 -08:00
Jose Luis Duran
e2e7269461
Import latest mtree from NetBSD
Merge commit '7e59b238fcf32f3d365e78ddc702ca494e1ff68d'

This commit partially reverts the previous vendor import, given that the
"type" keyword has been historically mandatory and should not be removed
by "-R all".  This was clarified in the man page.

Reported by:	glebius
PR:		219467
MFC after:	1 week

(cherry picked from commit 4250d2ad991b7bb9915e4c6b6d93b17369747ff0)
2026-01-18 03:56:23 +00:00
William Carrel
2184a2d18a GCE: ARM64 Support: Add hw.pci.honor_msi_blacklist=0.
This is required for MSI support on GCE ARM64 instances which is
prerequisite to gve(4) not panicking at boot, and nvme(4) also has
a real sad time without interrupts. Tested on a variety of c4a VMs.

This is meant to be a temporary hack; long term fix would be to
check for the hypervisor and quirk gve(4) device with
PCI_QUIRK_ENABLE_MSI_VM.

PR:		kern/292081
MFC after:	1 week

(cherry picked from commit 9ae43352c89c776c8171f5881a984bc39acf5d6a)
2026-01-17 18:55:04 -08:00
Yichen Chai
2e93d2f39d net80211: fix arguments to IEEE80211_NOTE in ieee80211_fix_rate
Fix the arguments to the debug statement.

(slightly adjusted from the original submission by bz)

PR:		286448

(cherry picked from commit 75556c7e999e9095ce71558ae61f49c1ba61a192)
2026-01-17 07:51:24 +00:00
Bjoern A. Zeeb
c22f46da9d LinuxKPI: pci: fix pcie_get_speed_cap()
pcie_get_speed_cap() has a hard coded skip of 3 devices at the
beginning.  It is either called on a pdev or on a result from
pci_upstream_bridge().  In the latter case skipping another three
devices might get us to acpi0 or nexus, neither of which is a
PCI device still and pci_get_vendor() will panic() on that.

Sponsored by:	The FreeBSD Foundation (commit)
GHI:		https://github.com/freebsd/drm-kmod/issues/393
Differential Revision: https://reviews.freebsd.org/D53862

(cherry picked from commit fa24602ca6282d71c26079136a74b85824c0e63b)
2026-01-17 07:51:17 +00:00
Bjoern A. Zeeb
4a56313c73 iwlwifi/rtw89: improve module Makefile dependency on ACPI
In order to compile iwlwifi(4) and rtw89(4) on RISC-V [1] make the
currently manually tracked ACPI support option automatic based on
DEV_ACPI.
rtw89(4) is missing proper CONFIG_ACPI checks in the driver (or the
mandatory dependency on ACPI) even upstream it seems.  We just added
that check to the modules/Makefile until this is fixed.

[1] https://mail-archive.freebsd.org/cgi/getmsg.cgi?fetch=5947+0+archive/2026/freebsd-wireless/20260112.freebsd-wireless

Sponosred by:	The FreeBSD Foundation
Reviewed by:	emaste
Differential Revision: https://reviews.freebsd.org/D54694

(cherry picked from commit f5a77dc8f8df09a907c2a2bdf86802513b1ebb15)
2026-01-17 07:51:12 +00:00
Bjoern A. Zeeb
7990fa2a81 modules: factor out LinuxKPI based wireless drivers and add RISC-V
The LinuxKPI based wireless drivers are currently limited to amd64 and
arm64 (and until cleaned up i386).  Adding RISC-V now as we have a
report that iwlwifi(4) works on RISC-V [1]. Factor the LinuxKPI based
wireless drivers out into their own block.

Given RISC-V has no ACPI support yet (though we fixed #includes in
order to keep compiling the drivers without further modifications
where possible) we need to take care of rtw89 which fails to compile
without ACPI enabled.  A quick check at the Linux build files indicates
that the depenency is not correctly recorded there either.  Disable
compiling rtw89 without ACPI (on RISC-V) for the moment until this is
fixed.

[1] https://mail-archive.freebsd.org/cgi/getmsg.cgi?fetch=5947+0+archive/2026/freebsd-wireless/20260112.freebsd-wireless

Sponsored by:	The FreeBSD Foundation
Reviewed by:	emaste
Differential Revision: https://reviews.freebsd.org/D54693

(cherry picked from commit 4162a419a475089c8a3d2350de40c58b023e9288)
2026-01-17 07:51:08 +00:00
Bjoern A. Zeeb
d301aadc99 LinuxKPI: include acpi headers for RISC-V
In order to compile iwlwifi(4), which is reported to work on RISC-V,
include the ACPI headers to avoid adding further FreeBSD-specific #ifdefs
to the driver.  With this iwlwifi(4) just compiles on RISC-V (at least
if ACPI support is turned off in the module Makefile).

Sponsored by:	The FreeBSD Foundation
Reviewed by:	emaste
Differential Revision: https://reviews.freebsd.org/D54692

(cherry picked from commit c71f18998e0b107845f2b627861225bf6156cda6)
2026-01-17 07:51:03 +00:00
Bjoern A. Zeeb
24777428cb riscv: add (a dummy) acpica_machdep.h
We have reports that iwlwifi(4) works on RISC-V.  While we can turn off
full ACPI-specific files easily, intermittent code still relies on the
header files to be present.  In order to not need to completely #ifdef
everything out we want to include acpi.h from LinuxKPI and as a result
need this file.  With this the iwlwifi(4) code compiles just fine and
will do the right thing (given the functional ACPI parts are disabled/
unavailable).

Sponsored by:	The FreeBSD Foundation
Reviewed by:	mhorne, emaste
Differential Revision: https://reviews.freebsd.org/D54691

(cherry picked from commit 0fa7b3bee72e7cfedabe371c7082fbf44508ec05)
2026-01-17 07:50:57 +00:00
AZero13
cc057040ad device_delete_child should be destroying the child, not the dev
MFC After: 1 week
Reviewed by: imp, kib
Pull Request: https://github.com/freebsd/freebsd-src/pull/1934

(cherry picked from commit 930a1341d62ccc4be969c2261e3abaf0c0573a9f)
2026-01-16 07:32:12 -07:00
Brooks Davis
484edabb94 iflib: remove convoluted custom zeroing code
Replace a collection of aliasing violations and ifdefs with memset
(which now expands to __builtin_memset and should be quite reliably
inlined.)  The old code is hard to maintain as evidenced by the most
recent change to if_pkt_info_t updating the defines, but not the zeroing
code.

Reviewed by:	gallatin, erj
Effort:		CHERI upstreaming
Sponsored by:	Innovate UK
Fixes:		43d7ee540efe ("iflib: support for transmit side nic KTLS offload")
Differential Revision:	https://reviews.freebsd.org/D54605

(cherry picked from commit 31e7dc6b9a000b02353bfc41cbd897533287cda2)
2026-01-16 09:25:07 +00:00
Bjoern A. Zeeb
d141ee1595 LinuxKPI: 802.11: fix rx_nss with VHT
When fixing single-stream chipsets, like iwlwifi(4) AX101, we started
masking the announced with the hardware supported values.  This would
probably limit, e.g., rx_nss.  During these works we fixed a loop
checking from the highest nss=7 to lowest nss=0 (8..1) and would set
rx_nss if the stream was supported.  This left us with always setting
rx_nss on nss=0 to nss + 1 = 1.  Instead only update once when we hit
the first supported MCS value (highest number of supported streams).
Looking at the diff of the mentioned commit hash which gets fixed it
looks like even the old code was not correct either.

This only fixes the logic to calculate rx_nss.  This does not yet help
with modern drivers to actually update the value.  Code for this will
come in a later commit.

Sponsored by:	The FreeBSD Foundation
Fixes:		adb4901ac9ae

(cherry picked from commit 8494be1b5af7fe4f765532f802ac0a145e061d73)
2026-01-16 08:48:48 +00:00
Bjoern A. Zeeb
4d255abe99 LinuxKPI: 802.11: reset hdr after crypto in lkpi_80211_txq_tx_one()
When lkpi_80211_txq_tx_one() calls into the crypto offloading parts to
possibly make space in the headroom, the beginning of our frame moves.
We have to reset hdr after that call as otherwise later classifications
based on the hdr->frame_control will fail or cause wrong classificaiton
of packets.
This makes sure frames will either be directly sent using (*mo_tx)()
or use the correct tid for the correct queue.  This helps to get
rtwx8 packets flowing after BA was negotiated.

Sponsored by:	The FreeBSD Foundation
Fixes:		11db70b605

(cherry picked from commit f0395993e1ea83705e0da6623843e7d5d03f7269)
2026-01-16 08:48:48 +00:00
Bjoern A. Zeeb
6e2b55242d LinuxKPI: 802.11: assign sequence numbers to frames
While all native drivers were converted to call
ieee80211_output_seqno_assign() after changes to net80211 if needed,
LinuxKPI 802.11 was not fixed.  Add the missing call.
Given we are currently only supporting STA mode, we can provide
sequence numbers for all frames (mgmt/beacon would be a problem in
AP mode).

This greatly helps LinuxKPI based drivers other than iwlwifi(4).
If drivers do their own sequence numbers, they will overwrite what we
pre-set unless we would pass a txflag not to do so (beware the
consequences).

Sponsored by:	The FreeBSD Foundation
Fixes:		eabcd1773f, 785edcc2af5a

(cherry picked from commit 9cf85457b13bc7aa125388d63c82acf2b21e9e9e)
2026-01-16 08:48:48 +00:00
Bjoern A. Zeeb
6b9c0ac008 LinuxKPI: 802.11: add compat.linuxkpi.80211.IF.dump_stas_queues
Extend the normal compat.linuxkpi.80211.IF.dump_stas sysctl by
queue information.  This was helpful for debugging various issues,
like selecting the outbound queue, stopping queues for BAR and helped
finding multiple bugs.

Sponsored by:	The FreeBSD Foundation

(cherry picked from commit 32ea8209825af594cbfa1fc654d45eb9a6aab528)
2026-01-16 08:48:47 +00:00
Bjoern A. Zeeb
9755a80363 LinuxKPI: bitcount fix builds with gcc and older llvm
LLVM before 19 and gcc before 14 do not support __builtin_popcountg().
Use __const_bitcount<n> from sys/bitcount.h as a replacement in these
cases.  This should still allow drm-kmod to build where the size needs
to be known at compile-time.

Remove the conditional for gcc around the iwlwifi modules build,
which was collateral damage in all this.

Sponsored by:	The FreeBSD Foundation
Fixes:		7cbc4d8759, 5e0a4859f28a
Reviewed by:	brooks, emaste (without the sys/modules/Makefile change)
Differential Revision: https://reviews.freebsd.org/D54297

(cherry picked from commit 34892a8e30055000352d9612ad985be550c82bea)
2026-01-16 08:48:47 +00:00
Bjoern A. Zeeb
605389e40b sys/bitcount.h: add __const_bitcount<n>
Add a version of __const_bitcount<n> which can be used to get the
numbers at compile-time when __builtin_popcountg() is not available
(see sys/compat/linuxkpi/common/include/linux/bitops.h for LLVM before
19 and gcc before 14).

Obtained from:	https://reviews.freebsd.org/D50995#1174884 by obiwac
Sponsored by:	The FreeBSD Foundation
Reviewed by:	brooks, emaste
Differential Revision: https://reviews.freebsd.org/D54301

(cherry picked from commit 27aa23cee81088b0ffa974eec9f03c654c36438e)
2026-01-16 08:48:47 +00:00
Adrian Chadd
4b5b8d69b2 powerpc: fix release image building for Apple partitions
awk changed somewhere between 14 and 15 and it stopped accepting
a hexadecimal number as its input - it will always return 0.
This results in a very badly written apple boot block.

So just remove it; do the math in shell.

PR:		kern/292341
Differential Revision:	https://reviews.freebsd.org/D54639
Reviewed by:	imp
MFC after:	1 week

(cherry picked from commit 7afa03963c448a14b1735a10eaf84941b0b74862)
2026-01-15 22:26:30 -08:00
Martin Matuska
df4e99bb88 libarchive: merge from vendor branch
libarchive 3.8.5

Important bugfixes:
 #2809 bsdtar: fix regression from 3.8.4 zero-length pattern issue bugfix

Obtained from:	libarchive
Vendor commit:  dd897a78c662a2c7a003e7ec158cea7909557bee
MFC after:	1 week

(cherry picked from commit 4b047c3af3fec1607ba1cfe04e1d442a17fc1cf6)
2026-01-15 21:03:15 +01:00
Martin Matuska
b9bf082d1f libarchive: merge from vendor branch
libarchive 3.8.4

Important bugfixes:
     #2787 bsdtar: Fix zero-length pattern issue
     #2797 lib: Fix regression introduced in libarchive 3.8.2
                when walking enterable but unreadable directories

Obtained from:	libarchive
Vendor commit:	d114ceee6de08a7a60ff1209492ba38bf9436f79
MFC after:	1 week

(cherry picked from commit c1e033c33e8b290cd40f4069249c879efcbae6a6)
2026-01-15 21:03:15 +01:00
Martin Matuska
ca5d4e7f63 libarchive: merge from vendor branch
libarchive 3.8.3

Important bugfixes:
 #2753 lib: Create temporary files in the target directory
 #2768 lha: Fix for an out-of-bounds buffer overrun when using
       p[H_LEVEL_OFFSET]
 #2769 7-zip: Fix a buffer overrun when reading truncated 7zip headers
 #2771 lz4 and zstd: Support both lz4 and zstd data with leading
       skippable frames

Obtained from:	libarchive
Vendor commit:	1368b08875351df8aa268237b882c8f4ceb0882d
MFC after:	1 week

(cherry picked from commit 007679a138089676aadc9a712277f4004403b905)
2026-01-15 21:03:15 +01:00
Jose Luis Duran
5f53e656e9
makefs.8: Cleanup man page
Reviewed by:	ziaee
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D54538

(cherry picked from commit 12c51484188f88bcabc5b38ca8523fcde76830a6)
2026-01-15 19:39:10 +00:00
Jose Luis Duran
2bcc55600d
makefs: Fix typo 's/mirrorring/mirroring/'
MFC after:	1 week

(cherry picked from commit 73af599fb7be6806b553ac6f470d76711b74286c)
2026-01-15 19:38:55 +00:00
Jose Luis Duran
99d4a01be5
makefs: tests: Fix timestamp-related tests
Use a variable for mtree that includes the DEFAULT_MTREE_KEYWORDS, in
order to avoid missing the important "time" keyword or passing an
unimplemented "nlink" keyword.

Unskip the "failing" tests, and comment out the specific failing checks,
these will be addressed (or at least discussed) in a different revision.

For MS-DOS tests, use an even value timestamp, as precision is 2s.

For ZFS tests, use import_image instead of mount_image consistently.

Reviewed by:	bnovkov, markj
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D54429

(cherry picked from commit 93b15dbc1fbc3c33c9bd53091b28c3b629d0abe1)
2026-01-15 19:38:41 +00:00
Jose Luis Duran
b10369daed
makefs: tests: Fix -D flag test
As stated in the manual page:

-F is almost certainly not the option you are looking for.  To
create an image from a list of files in an mtree format manifest,
specify it as the last argument on the command line, not as the
argument to -F.

This change does exactly that.  Also bug #192839 has already been fixed.

Reviewed by:	ngie
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D54428

(cherry picked from commit 96efda9cd55689ef3fa067281d8b0a42a7122536)
2026-01-15 19:38:28 +00:00
Jose Luis Duran
c0b56dbb88
makefs: tests: Cleanup and remove default flags
Cleanup and remove default atf_check flags for clarity.  The following
two lines are equivalent:

    atf_check $cmd
    atf_check -s exit:0 -e empty -o empty $cmd

Update the links to the reference documents.

Remove the D_flag_cleanup function, as common_cleanup() for these
particular set of tests does two things:

1. Unmount the md(4) device.
2. Destroy the md(4) device.

Essentially, one should only call common_cleanup() if the test body
invokes mount_image().  This is not the case for D_flag_body().

No functional changes intended.

Reviewed by:	ngie
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D54427

(cherry picked from commit 0a6deb87c2802a47709c58d09b5f9122ed40c157)
2026-01-15 19:38:06 +00:00
Jose Luis Duran
463c0b8896
makefs: tests: Double the timeout of ZFS file_extend test
The test makefs_zfs_tests:file_extend is timing out on ci.freebsd.org.
Double the default timeout to allow it to finish.

Reported by:	Jenkins
Reviewed by:	asomers
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D54425

(cherry picked from commit 065f02174f76a49fbf537ee51ed8068d3d398b08)
2026-01-15 19:37:52 +00:00
Jose Luis Duran
f8b5a8a977
makefs: tests: Double the timeout of ZFS compression test
The test makefs_zfs_tests:compression is timing out on ci.freebsd.org.
Double the default timeout to allow it to finish.

While here, check if the file exists before cleaning up, otherwise, cat
may fail.

Reported by:	Jenkins
Reviewed by:	asomers
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D54424

(cherry picked from commit 9f28e92637e9a29124f407b74d7665a921865a53)
2026-01-15 19:37:38 +00:00