aboutsummaryrefslogtreecommitdiff
path: root/contrib
Commit message (Collapse)AuthorAgeFilesLines
* awk: Merge one true awk 20250804 bsd-feature branchHEADmainWarner Losh7 hours3-2/+12
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge in the latest one true awk to pick up two small bug fixes: Aug 04, 2025 Fix incorrect divisor in rand() - it was returning even random numbers only. Thanks to Ozan Yigit. Fix a syntax issue with /= that caused constants to turn into variables [eg. 42 /= 7]. Thanks to Arnold Robbins. Note: vendor/one-true-awk/4d5b3604b34b_1 was the merge tag. Sponsored by: Netflix
* | kyua: Improve required_kmods metadataIgor Ostapenko2 days15-53/+201
| | | | | | | | | | | | | | | | | | | | | | | | | | - Make it platform agnostic - Separate FreeBSD related code - Fix tests - Make it report all non-loaded modules instead of the first occurrence only - Update kyuafile.5 man page Reviewed by: ngie MFC after: 2 weeks Pull Request: https://github.com/freebsd/kyua/pull/270
* | jemalloc: Merge from jemalloc 5.3.0 vendor branchWarner Losh3 days210-12097/+47171
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This brings in a merge from jemalloc 5.3.0. It's almost fully scripted, except: Three conflicts resolved by hand: include/jemalloc/internal/test_hooks.h Use the new name src/extent.c Use the new code src/jemalloc.c Use the new code since je_realloc has moved The script is recorded in FREEBSD-upgrade. The old script did svn commands that were basically a rebase of our changes. This update has a series of diff reduction changes before this. Note: I'd planned on fixing the above three conflicts with commits, but ran out of time when I did this work in January. I got discouraged when jemalloc was EOL'd and didn't pick this back up. I did the above by hand to get this into FreeBSD 15.0 This work is a repeat of the work by Minsoo Choo who did all these changes and created a pull request. Given the importance of jemalloc, I audited these changes by redoing them in this series of commits (and with the script that was checked in). I did this to confince myself and anybody else in doubt that there was no supply chain attack. The diffs between this series of commits and Minsoo's work are minor (though the version skew makes adds some noise). Interested parties can independent audit each step, I hope. I've listed Minsoo as a co-author since without his pull request to test again, this wouldn't have been possible. Thanks to brooks@ for help with getting the jemalloc 3 ABI compat symbols right. Co-authored-by: Minsoo Choo <minsoochoo0122@proton.me> Pull Request: https://github.com/freebsd/freebsd-src/pull/1337 Sponsored by: Netflix
* | jemalloc: Only replace _pthread_mutex_init_calloc_cb in private namespaceWarner Losh3 days1-0/+2
| | | | | | | | | | | | | | | | | | | | When we're not doing the private namespace remap, we don't need to do this pragma. This is needed for the bootstrapping path when we import a new version of jemalloc. No functional change. Sponsored by: Netflix
* | jemalloc: Add JEMALLOC_PRIVATE_NAMESPACE for the libc namespaceWarner Losh3 days2-0/+4
| | | | | | | | | | | | | | | | | | | | | | Gate the namespace dance on this define. This allows us to bootstrap new versions of jemalloc more easily. One of the steps of import is building to find what symbols need to be private. When we do that, we don't want to do this dance. No functional change. Sponsored by: Netflix
* | jemalloc: Add FreeBSD's updates to jemalloc_preamble.h.inWarner Losh3 days1-7/+4
| | | | | | | | | | | | | | | | | | jemalloc_preample.h is generated, and FreeBSD has made some changes which we update using configure, etc on version updates. No functional change. Sponsored by: Netflix
* | jemalloc: Update jemalloc.xml.in per FreeBSD-diffsWarner Losh3 days1-1/+26
| | | | | | | | | | | | | | | | Add the xml source to the FreeBSD changes to the jemalloc.3. No functional change. Sponsored by: Netflix
* | jemalloc: Unthin contrib/jemallocWarner Losh3 days44-0/+19652
| | | | | | | | | | | | | | | | | | | | | | | | Add back more of the release for jemalloc for easier imports that can be audited for stray changes simply. However, trim out tests and msvc project files since they are easy and account for over half the size of the distro. No functional change. Sponsored by: Netflix
* | mandoc: Vendor import of upstream at 2025-07-27Alexander Ziaee3 days33-754/+1365
| | | | | | | | | | | | | | | | | | | | | | | | | | Groff Compat Edition -- Interesting changes: + italics in section/subsection headers are now also bold, like groff + display "LOCAL" in response to invalid section numbers, like groff + tbl(7) rendering has been tweaked to be more like groff + scaling has been improved to better render poorly generated manuals + display "UNTITLED" in response to invalid man(7) titles, like groff + improve mandocd error handling of broken pipes + manual footers now always show NAME(SECTION) on the right, like groff MFC after: 3 days
* | Merge bmake-20250804Simon J. Gerraty13 days13-21/+121
| | | | | | | | | | | | Fixes bug in meta mode output capture. Merge commit '787302bde4d89279180303b753eb73b9bc6820b9'
* | pf: convert DIOCRDELADDRS to netlinkKristof Provost13 days1-1/+1
| | | | | | | | Sponsored by: Rubicon Communications, LLC ("Netgate")
* | pf: convert DIOCRADDADDRS to netlinkKristof Provost13 days1-1/+1
| | | | | | | | | | | | | | Add up to 64 addresses at once. We are limited by the netlink socket buffer, so we can only add a limited number at once. Sponsored by: Rubicon Communications, LLC ("Netgate")
* | libucl: Add a ucl::Ucl::forced_string_value methodJohn Baldwin2025-08-041-0/+5
| | | | | | | | | | | | | | This is a wrapper around ucl_object_tostring_forced. Sponsored by: Chelsio Communications Pull Request: https://github.com/freebsd/freebsd-src/pull/1794
* | libutil++: New library containing C++ utility classes for use in baseJohn Baldwin2025-08-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - freebsd::FILE_up is a wrapper class for std::unique_ptr<> for FILE objects which uses a custom deleter that calls fclose(). - freebsd::malloc_up<T> is a wrapper class for std::unique_ptr<> which uses a custom deleter that calls free(). It is useful for pointers allocated by malloc() such as strdup(). - The freebsd::stringf() functions return a std::string constructed using a printf format string. The current implementation of freebsd::stringf() uses fwopen() where the write function appends to a std::string. Sponsored by: Chelsio Communications Pull Request: https://github.com/freebsd/freebsd-src/pull/1794
* | kyua: Stop using readdir_r()Dag-Erling Smørgrav2025-08-011-12/+6
| | | | | | | | | | | | | | | | | | It cannot be used safely, and Kyua doesn't even pretend to try. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: igoro Differential Revision: https://reviews.freebsd.org/D51680
* | pam_krb5: fix the GCC buildLexi Winter2025-08-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | GCC doesn't recognise -Wno-error=incompatible-pointer-types-discards-qualifiers. Remove it and just fix the error instead: our pam_message does not have a const msg member. Reviewed by: cy, emaste Differential Revision: https://reviews.freebsd.org/D51575
* | bsnmp: fix undefined behaviourLexi Winter2025-08-011-1/+3
| | | | | | | | | | | | | | | | Modifying and using a variable without an intervening sequence point is undefined behaviour, which causes an error in the GCC build. Reviewed by: harti, emaste Differential Revision: https://reviews.freebsd.org/D51576
* | Add 'contrib/libsamplerate/' from commit ↵Christos Margiolis2025-08-0110-0/+368023
| | | | | | | | | | | | | | | | | | | | | | | | | | '69a539a327ef8d78260056c5394363569b5751ef' Initial import. Needed by upcoming patches which port virtual_oss to base. Sponsored by: The FreeBSD Foundation git-subtree-dir: contrib/libsamplerate git-subtree-mainline: e9dd9f95f82f6244a6eafd073531dcf6b6a3953d git-subtree-split: 69a539a327ef8d78260056c5394363569b5751ef
* | libbsnmp: make snmp_parse_server() more robust when lacking infoGleb Smirnoff2025-07-251-98/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Per documentation snmp_parse_server() has all 4 components optional. We want inputs like "udp::", "udp6::", "stream::" work with local default sockets and even degenerate case of "" shall end with defaults instead of a failure. While here make the parser more robust. Make all parser helpers to behave the same way: on successful return they are responsible to update both start & end of matched substring and return next characater to parse. This eliminates special handling of IPv6 and port parser that used to need to skip a character, and thus eliminates unchecked step forward in snmp_parse_server() itself. Additionally: - use strchr(3) instead of own cycle - INET_ADDRSTRLEN includes space for NUL character - INET6_ADDRSTRLEN includes both the scope and NUL character - prefer sizeof() comparison instead of preprocessor define repetitive use Reviewed by: harti Differential Revision: https://reviews.freebsd.org/D51072
* | libbsnmp: make binding of client UNIX socket optional and configurableGleb Smirnoff2025-07-253-36/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this change snmp_open(3) would always bind(2) client socket to a random "/tmp/snmpXXXXXXXXXXXXXX" name. However, this binding is not required for SOCK_STREAM transport. Also, any attempt to specify a different name would fail, as open_client_local() would blindly rewrite the name to the default. Make this binding optional. If application had initialized snmp_client.local_path, then try to bind to the specified pathname, otherwise perform the random name binding only if we are in the SOCK_DGRAM mode. While here change snmp_client.local_path size to SUNPATHLEN, so that any legitimate local socket name can be used. This requires library version bump. Note that this code has been broken by 81e0e7b9e36d for three years, thus it is known not to be widely used. Reviewed by: harti Differential Revision: https://reviews.freebsd.org/D51070
* | bsnmpd: fix unix/stream socket operationGleb Smirnoff2025-07-251-21/+2
| | | | | | | | | | | | | | | | | | | | | | With new send method, that gives us directly port_input pointer, we know the correct file descriptor right away, no matter are we in SOCK_DGRAM or in SOCK_STREAM mode. Previously, the function tried to search for the socket, and that was totally wrong. With several simultaneous connections this end up with sending a reply to incorrect socket. Reviewed by: harti Differential Revision: https://reviews.freebsd.org/D51361
* | bsnmpd: merge send and send2 methods for transportsGleb Smirnoff2025-07-254-26/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Shall be no functional change for normal SNMP sends, e.g. replies and traps. NB: for the inet_send() called from snmp_send_port() we now actually use supplied address, but we could do a better job at finding matching socket. However, it could be that snmp_send_port() is not used by any external module, and in that case it is easier to just deprecate it as poorly fitting design of the server. This will be checked with exp-run. Reviewed by: harti Differential Revision: https://reviews.freebsd.org/D51360
* | bsnmpd: deprecate legacy UDP transport trans_udp.cGleb Smirnoff2025-07-253-450/+0
| | | | | | | | | | | | | | | | | | | | | | | | Since 04d1781439aa we have a more generic trans_inet.c, that supports IPv6 and can be extended further. The default config file we ship was switched to the new transport since 12.1-RELEASE, so for most people deprecation would go unnoticed. Others [who never run etcupdate(8)] would need to merge a couple lines into their snmpd.config. This will be reflected in RELNOTES file. Reviewed by: harti Differential Revision: https://reviews.freebsd.org/D51359
* | bsnmpd: use C99 initializers for transport definitionsGleb Smirnoff2025-07-253-27/+24
| | | | | | | | | | | | | | No functional change, just makes reading easier. Reviewed by: harti Differential Revision: https://reviews.freebsd.org/D51358
* | Merge commit 8ac140f39084 from llvm git (by Younan Zhang):Dimitry Andric2025-07-213-20/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [Clang][NFCI] Cleanup the fix for default function argument substitution (#104911) (This is one step towards tweaking `getTemplateInstantiationArgs()` as discussed in https://github.com/llvm/llvm-project/pull/102922) We don't always substitute into default arguments while transforming a function parameter. In that case, we would preserve the uninstantiated expression until after, e.g. building up a CXXDefaultArgExpr and instantiate the expression there. For member function instantiation, this algorithm used to cause a problem in that the default argument of an out-of-line member function specialization couldn't get properly instantiated. This is because, in `getTemplateInstantiationArgs()`, we would give up visiting a function's declaration context if the function is a specialization of a member template. For example, ```cpp template <class T> struct S { template <class U> void f(T = sizeof(T)); }; template <> template <class U> void S<int>::f(int) {} ``` The default argument `sizeof(U)` that lexically appears inside the declaration would be copied to the function declaration in the class template specialization `S<int>`, as well as to the function's out-of-line definition. We use template arguments collected from the out-of-line function definition when substituting into the default arguments. We would therefore give up the traversal after the function, resulting in a single-level template argument of the `f` itself. However the default argument here could still reference the template parameters of the primary template, hence the error. In fact, this is similar to constraint checking in some respects: we actually want the "whole" template arguments relative to the primary template, not those relative to the function definition. So this patch adds another flag to indicate `getTemplateInstantiationArgs()` for that. This patch also consolidates the tests for default arguments and removes some unnecessary tests. This fixes a crash or assertion failure while building tests for the devel/hpx port. PR: 288352 MFC after: 3 days
* | MFV: less v679.Xin LI2025-07-209-13/+26
|\ \ | | | | | | | | | MFC after: 2 weeks
* | | Merge bmake-20250707Simon J. Gerraty2025-07-19146-810/+1295
| | | | | | | | | | | | Merge commit '3d772e596c1acf76f555c1f51fd8d834e56b0c35'
* | | tzcode: Add an explicit "the timezone file has changed" caseMark Johnston2025-07-181-0/+2
| | | | | | | | | | | | | | | | | | | | | This is required for the WITHOUT_DETECT_TZ_CHANGES case, since there the value being tested is a numeric literal. Fixes: d63ffdd1ef63 ("tzcode: Fix time zone change detection.")
* | | libc: Test time zone change detection.Dag-Erling Smørgrav2025-07-181-13/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | While here, clean the detection code up a bit. Sponsored by: Klara, Inc. Sponsored by: NetApp, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D51343
* | | tzcode: Fix time zone change detection.Dag-Erling Smørgrav2025-07-181-9/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prior to the 2022g import, tzloadbody() returned -1 on error. Now it returns an errno code. When I updated the time zone change detection logic to match, I improperly returned errno in all cases, which means that if the time zone file has not changed since we last loaded it, tzloadbody() returns a random errno value instead of 0. Fixes: bc42155199b5 MFC after: 1 week Sponsored by: Klara, Inc. Sponsored by: NetApp, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D51405
* | | libbegemot: improve tracing printsGleb Smirnoff2025-07-171-10/+12
| | | | | | | | | | | | | | | | | | | | | Add newlines. Use __func__ instead of hardcoded name (fixes one case). While here, wrap lines according to style(9). Differential Revision: https://reviews.freebsd.org/D51357
* | | bsnmpd: in debugging mode (-d) use default library print/error functionsGleb Smirnoff2025-07-171-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | We want to see debugging on stderr in non-daemon mode, otherwise this mode has little value. Reviewed by: harti Differential Revision: https://reviews.freebsd.org/D51356
* | | bsnmpd: use MSG_NOSIGNAL when doing send(2) on a local socketGleb Smirnoff2025-07-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Otherwise in unix/stream mode a disconnected client will crash the server. Reviewed by: harti Differential Revision: https://reviews.freebsd.org/D51355
* | | libbsnmp: define SNMP_DEFAULT_LOCAL that matches default server configGleb Smirnoff2025-07-173-9/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The default /etc/snmpd.config we install for decades has: begemotSnmpdLocalPortStatus."/var/run/snmpd.sock" = 1 begemotSnmpdLocalPortType."/var/run/snmpd.sock" = 4 However, libbsnmp internally used DEFAULT_LOCAL set to "/var/run/snmp.sock" (note missing "d") to fill server pathname in case if API user didn't provide one. This results with default server config never working with an application that uses default initializer. The libbsnmptools has a workaround for that, it defines internally SNMP_DEFAULT_LOCAL that matches /etc/snmpd.config. Bring this all to an order: - Make a public define SNMP_DEFAULT_LOCAL in libbsnmp. - Point it to what /etc/snmpd.config has in. - Remove workaround from libbsnmptools. Reviewed by: harti Differential Revision: https://reviews.freebsd.org/D51071
* | | libbsnmp: fix local client socket creationGleb Smirnoff2025-07-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert "bsnmp: Use mkstemp when creating clients local socket" The use of mktemp() was intentional here. We don't want a regular file to be created. If created, it guarantees that following bind(2) would always fail with EADDRINUSE and thus open_client_local() always fails. This reverts commit 81e0e7b9e36d6a25b3af6482811318e085537d2f. Reviewed by: rew, harti Differential Revision: https://reviews.freebsd.org/D51031
* | | libelf: Fix the NAME sections of two manual pages.Joseph Koshy2025-07-162-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | This change allows mandoc(1) to find these manual pages for all the relevant function names. Submitted by: Ingo Schwarze Obtained from: elftoolchain/r4192
* | | kyua: Try harder to delete directories.Dag-Erling Smørgrav2025-07-092-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When recursing into a directory to delete it, start by chmod'ing it to 0700. This fixes an issue where kyua is able to run, but not debug, a test case that creates unwriteable directories, because when debugging it tries (and fails) to delete the directory after the test completes. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: igoro Differential Revision: https://reviews.freebsd.org/D51229
* | | sqlite3: Vendor import of sqlite3 3.50.2Cy Schubert2025-07-0762-68409/+56377
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Release notes at https://www.sqlite.org/releaselog/3_50_2.html. Obtained from: https://www.sqlite.org/2025/sqlite-autoconf-3500200.tar.gz MFC after: 1 month Merge commit '89922daaa168292633b1a7a523bcd0559487c6ad'
* | | | Merge bmake-20250618Simon J. Gerraty2025-06-2890-1158/+1853
| | | |
* | | | mandoc: Bump version string to 1.14.6s20250613Alexander Ziaee2025-06-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The mandoc compiler is still at version 1.14.6, but we have imported several snapshots since the version was bumped. Append a snapshot date string to the version to reflect this. Requested by: wosch Discussed with: bapt
* | | | lyaml: vendor import lua bindings for libyamlBaptiste Daroussin2025-06-2631-0/+7317
| | | |
* | | | libyaml: import libyaml vendor version 0.2.5Baptiste Daroussin2025-06-2661-0/+18589
| | | | | | | | | | | | | | | | | | | | The yaml parser used in nuageinit is too incomplete, import libyaml in order to be able to use as a complete parser for nuageinit.
* | | | wg: ipc: add allowed-ip flags support for FreeBSDKyle Evans2025-06-261-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For $reasons, we can't rely on flags in wireguard-tools for the kernel side of WireGuard. Provide a mapping function that uses flags from the kernel that we're building against and fail the operation if we made it to the end without turning some wg(8) flag off. Signed-off-by: Kyle Evans <kevans@FreeBSD.org> Reviewed by: ivy (previous version), Jason A. Donenfeld, jhb Differential Revision: https://reviews.freebsd.org/D50450
* | | | mandoc: Vendor import of upstream at 2025-06-13Alexander Ziaee2025-06-254-63/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Interesting changes: + Lb is now part of SNYOPSIS, the LIBRARY section is deprecated + Ft now takes multiple args, and no longer should be quoted + Fix a segfaut on malformed Tg markup
* | | | contrib/llvm-project: re-add clang/tools/clang-scan-depsDimitry Andric2025-06-253-2/+1098
| | | | | | | | | | | | | | | | | | | | | | | | This is in preparation for adding it as an optional tool in base. MFC after: 1 week
* | | | contrib/llvm-project: fix clang crash compiling modulesLexi Winter2025-06-257-18/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | clang++ may crash when compiling certain C++20 modules. Backport the fix from LLVM upstream. This fixes LLVM bug 102684: https://github.com/llvm/llvm-project/issues/102684. PR: 287803 MFC after: 3 days Obtained from: https://github.com/llvm/llvm-project/pull/102855 Reviewed by: kevans, dim Approved by: kevans (mentor) Differential Revision: https://reviews.freebsd.org/D51041
* | | | bsddialog: in textbox mode differentiate between Exit and Extra buttonsMaksim Yevmenkin2025-06-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If run --extra-button --textbox dialog will have two buttons, but either of them would return 0 exit status. We definitely want the Extra to report its value. Reviewed by: jlduran, asiciliano Differential Revision: https://reviews.freebsd.org/D48668
* | | | snmp_mibII: gc fetching of kern.clockrateGleb Smirnoff2025-06-172-19/+0
| | | | | | | | | | | | | | | | No longer used since df4b9fa460ab.
* | | | snmp_mibII: use sysctl(3) to read min/max TCP retransmission timeoutsGleb Smirnoff2025-06-171-7/+26
| | | | | | | | | | | | | | | | | | | | Reviewed by: tuexen Differential Revision: https://reviews.freebsd.org/D50892
* | | | libarchive/test: fix build when memcpy() is a macroKyle Evans2025-06-171-34/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After importing the latest libarchive into FreeBSD, Shawn Webb @ HardenedBSD noted that the test build is broken when FORTIFY_SOURCE=2 while building the base system. Braced initializer lists are a special case that need some extra fun parentheses when we're dealing with the preprocessor. While it's not a particularly common setup, the extra parentheses don't really hurt readability all that much so it's worth fixing for wider compatibility. This corresponds to libarchive PR #2660 Reported by: Shawn Webb (HardenedBSD)