aboutsummaryrefslogtreecommitdiff
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
...
* stress2: Do not try to open a fifoPeter Holm2025-10-041-2/+4
|
* stress2: Add syzkaller reproducersPeter Holm2025-10-044-1/+1461
|
* flua: support our flua modules in the bootstrap fluaKyle Evans2025-10-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This version builds every module into the flua binary itself, since all of the bootstrap tools are built -DNO_SHARED. As a result, we also cannot dlsym(), so we can't really discover the names of our newly builtin modules. Instead, just build out a linker set with all of our luaopen_*() functions to register everything up-front. Building in all of the modules isn't strictly necessary, but it means that we have an example of how to add a bootstrap module everywhere you go and one doesn't need to consider whether bootstrap flua can use a module when writing scripts. On my build machine, the consequence on our binary size is an increase from around 1.6M -> 1.9M, which isn't really that bad. .lua modules can install into their usual path below $WORLDTMP/legacy and we'll pick them up automagically by way of the ctor that sets up LUA_PATH early on. This re-lands bootstrap module support with a more sensible subset, and after having verified that it cross-builds fine on macOS and Linux -- we cannot do libfreebsd on !FreeBSD because it's more system header dependant. We also need to bootstrap libmd to bring in libhash, and libucl + libyaml. Reviewed by: bapt, emaste (both previous version) Differential Revision: https://reviews.freebsd.org/D51890
* Revert "flua: support our flua modules in the bootstrap flua"Kyle Evans2025-10-041-1/+0
| | | | | | | This reverts commit 1953a12ee2cde1afacb3e3f7612d89695c96e04f, because it cannot work at all on macOS without more work, at a minimum. We use linker sets for module discovery, but we don't have a version of this that works for mach-o at the moment.
* flua: support our flua modules in the bootstrap fluaKyle Evans2025-10-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | This version builds every module into the flua binary itself, since all of the bootstrap tools are built -DNO_SHARED. As a result, we also cannot dlsym(), so we can't really discover the names of our newly builtin modules. Instead, just build out a linker set with all of our luaopen_*() functions to register everything up-front. Building in all of the modules isn't strictly necessary, but it means that we have an example of how to add a bootstrap module everywhere you go and one doesn't need to consider whether bootstrap flua can use a module when writing scripts. On my build machine, the consequence on our binary size is an increase from around 1.6M -> 1.9M, which isn't really that bad. .lua modules can install into their usual path below $WORLDTMP/legacy and we'll pick them up automagically by way of the ctor that sets up LUA_PATH early on. Reviewed by: bapt, emaste Differential Revision: https://reviews.freebsd.org/D51890
* mfc-candidates: Improve branch detection and repository handlingJoseph Mingrone2025-10-021-4/+11
| | | | | | | | | | - Use git to detect the latest stable branch rather than hardcoding it. - Handle the case where the script is run outside a src or ports repository. - Fix a pattern to match .git instead of *git. Reviewed by: andrew, releng (emaste) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52681
* wlanstat(8): Follow-ups after moving to /usr/sbin and renamingLi-Wen Hsu2025-09-302-2/+1
| | | | | | | | | | - Update related comments - Remove from tools/tools/net80211 Reviewed by: imp, adrian MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52726
* Remove ftpd(8)Lexi Winter2025-09-294-16/+5
| | | | | | | | | | | | | | | | | | | | | This was previously deprecated and is slated for removal in 15.0. Users who still need ftpd(8) can install the ftp/freebsd-ftpd port. Retain the ftp(d) PAM services since other FTP daemons use them. Update /etc/inetd.conf to point to /usr/local. Add ftpd to ObsoleteFiles, but do not list configuration files since users may want to preserve these to use with the freebsd-ftpd port. There is still some language in the manual referring to ftpd(8) which is relevant to the port, which has been retained but updated to reference the port. MFC after: 3 days Relnotes: yes Reviewed by: cperciva Differential Revision: https://reviews.freebsd.org/D52739
* OptionalObsoleteFiles.inc: Add more ATF librariesMark Johnston2025-09-271-0/+4
| | | | | | | PR: 289653 Reported by: Trond Endrestøl <Trond.Endrestol@ximalas.info> MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D52676
* kerneldocs: Update latex packageMinsoo Choo2025-09-251-2/+2
| | | | | | | MFC after: 3 days Reviewed by: ziaee Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me> Closes: https://github.com/freebsd/freebsd-src/pull/1853
* nanobsd: Fix regressions from last cleanupWarner Losh2025-09-241-6/+6
| | | | | | | | | | c99bb5747f5e changed ( ) grouping into { }, but in these cases we chdir and depended on the subshell not changing it for the caller. Restore the old behavior. It seems to work w/o this change, true, but the old code was intentionally like this. Fixes: c99bb5747f5e Sponsored by: Netflix
* stress2: Limit disk usage to avoid a disk full messagePeter Holm2025-09-211-3/+3
|
* stress2: Do not follow symbolic linksPeter Holm2025-09-212-2/+2
|
* nanobsd: minor formatting cleanupEnji Cooper2025-09-184-132/+130
| | | | | | | | | | | | | | | | | | | | | | | | | - Reformat function definitions POSIX states that compound commands, i.e., ones that use `(..)` or `{ .. } `, are permissible as function definitions, however, many shell syntax validators do not acknowledge the former format. Switch to the latter format so more naive editors, like the vim syntax highlighter, better parse the syntax of the file. Moreover, replacing `(..)` with `{..}` replaces several subshells with their non-subshell equivalents. Given that `set -e` is used liberally and `exit` is not used in the calling code when `set -e` is not enforced, there is no net loss by making this change. - Clean trailing whitespace. - Reindent some related comments to match the indentation of the previous line. - Add shebangs to the tops of files to help syntax colorizers and file identifiers understand that the files are in shell syntax. MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D52596
* stress2: Fix removal of supplementary groupsOlivier Certner2025-09-1720-20/+20
| | | | | | | | | | To this end, call setgroups(0, NULL) instead of passing the effective GID. This stance is fully compatible with older versions of FreeBSD. Fixes: 9da2fe96ff2e ("kern: fix setgroups(2) and getgroups(2) to match other platforms") MFC after: 5 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52290
* tools/regression/priv: Don't call setgroups() with the effective GIDOlivier Certner2025-09-171-4/+2
| | | | | | | | | | | The 'setgroups(0, NULL);' stance works the same on all versions of FreeBSD, getting rid of all supplementary groups. The replaced code would force the effective GID to also be a supplementary group. Fixes: 9da2fe96ff2e ("kern: fix setgroups(2) and getgroups(2) to match other platforms") MFC after: 5 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52289
* stress2: Added two new fdescfs test scenariosPeter Holm2025-09-162-0/+95
|
* stress2: Fix how the reproducer is run. Lingering threads seen beforePeter Holm2025-09-161-18/+8
|
* boot/universe.sh: toggle LOADER_BIOS_TEXTONLYAhmad Khalifa2025-09-151-2/+2
| | | | | | | Build without LOADER_BIOS_TEXTONLY since it is now the default. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D52559
* ip6: add SO_BINTIME supportJonathan T. Looney2025-09-151-5/+3
| | | | | | | | | | | | | This adds support for obtaining timestamps from IPv6 packets using the SO_BINTIME socket option, bringing it in parity with IPv4 behavior. Enable testing the SO_BINTIME option in the relevant (manual) regression test. PR: 289423 Reviewed by: markj MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D52504
* stress2: Do not exit the test program without clearing the trace flagsPeter Holm2025-09-151-4/+4
| | | | Discussed with: kib
* stress2: Fix cleanup of temporary filesPeter Holm2025-09-1415-25/+26
|
* nanobsd: Fix the p flagJose Luis Duran2025-09-131-1/+2
| | | | | | | | | | Fix the "p" flag in the manual page. While here, add the flag to the usage instructions. Reviewed by: imp Approved by: emaste (mentor) Fixes: 90593b1bdb80 ("nanobsd: Expose do_image_prep on command line") Differential Revision: https://reviews.freebsd.org/D52508
* tools: Drop cryptotestDag-Erling Smørgrav2025-09-123-693/+1
| | | | | | | | | This has been supplanted by cryptocheck and has bitrotted to the point where it no longer builds. PR: 289325 Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D52399
* src.sys.mk: Support src.conf in SRCTOPDag-Erling Smørgrav2025-09-101-2/+5
| | | | | | | | | If SRCCONF is not defined and src.conf exists at the top level of the source tree, use that instead of /etc/src.conf. MFC after: 3 days Reviewed by: kevans, imp Differential Revision: https://reviews.freebsd.org/D52470
* nanobsd: Expose do_image_prep on command lineWarner Losh2025-09-091-2/+10
| | | | | | | | | | | | | | do_image_prep will skip the customizations and other image prep that's the same each time. It was just set before for -I. Expose it now with -p which doesn't have the other side effects. Also, fix a bug where early customization was run in this case. We don't want that run multiple times when building an image from an existing tree or when skipping image prep (there's no reason to make it a separate hook). Also change example small media from Compact Flash to SD Card (though maybe it should be microSD card, eMMC or similar, but that's getting too verbose). Sponsored by: Netflix
* nanobsd: Alphebetize -IWarner Losh2025-09-091-9/+9
| | | | | | Put -I in its proper place alphabetically Sponsored by: Netflix
* Add description for WITH_PTHREADS_ASSERTIONSColin Percival2025-09-051-0/+1
| | | | | | | | This option is turned on by default in -CURRENT but will be turned off in 15-STABLE; this description will land in the src.conf(5) man page in that branch. MFC after: 1 minute
* moused: Fix movement of moused/moused to moused/moused/mousedWarner Losh2025-09-051-0/+6
| | | | | | | So aef807876c30 moved moused down a level, so make depend broke. This fixes it. Sponsored by: Netflix
* moused(8): Add support for evdev protocolVladimir Kondratyev2025-09-041-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The new daemon have following properties as compared with previous incarnation: - evdev protocol support for mices and touchpads. Additionally to relative PS/2 and USB devices it enables console support for I2C/USB touchpads and bluetooth mices. - Other aged protocols like COM, raw PS/2 and X10 are dropped with only exception of sysmouse. For those who still use them there is an utility called msconvd(8). - single daemon per system where hotplug is processed via devd socket. Per device mode still supported too. - Configuration and quirks files in libinput-compatible format. Actually, the new moused config parser is taken from libinput. The moused(8) can work in 2 modes: 1. Evdev support mode. It enables all previously mentioned devices. It is enabled by deault. 2. Sysmouse support mode. All should work as before. No new devices supported. To enable it add following lines to /etc/rc.conf: moused_port="/dev/psm0" moused_nondefault_enable="YES" One may add hw.usb.usbhid.enable=0 to /boot/loader.conf to enable ums(4) driver which supports sysmouse protocol. Differential Revision: https://reviews.freebsd.org/D52164
* pseudofs: return errors from pfs_create_*()Kyle Evans2025-09-041-0/+35
| | | | | | | | | | | | | | | | | | In D52038, we kind of guess at the reason that pfs_create_dir() failed, which isn't great: it could be EEXISTS, or it could even be ENOMEM. Change the pfs_create_*() interfaces to return an error and use a double pointer to return the new node as requested. Outside of the changes in sys/fs/pseudofs, this diff is the result of running the added coccinelle script against in-tree pseudofs and fixing all of the style(9) violations that spatch added. We set *opn to NULL in the failure cases to avoid breaking callers that did actually error-check their results, since the cocci patch does not attempt to handle that in any way. Reviewed by: des (previous version), kib Differential Revision: https://reviews.freebsd.org/D52157
* ObsoleteFiles.inc: Treat usr/lib/libwind.so.11 as a libraryJohn Baldwin2025-08-281-1/+1
| | | | | | Reviewed by: ivy Fixes: 721c98dd89cc ("OptionalObsoleteFiles: Update Kerberos entries") Differential Revision: https://reviews.freebsd.org/D52208
* sysbuild: Copy /etc/localtime as symlinkJessica Clarke2025-08-271-1/+1
| | | | | | | Without -P (or -R, which defaults to enabling -P) symlinks are dereferenced and so the target file is copied, not the symlink itself. Fixes: 5e16809c953f ("tzsetup: symlink /etc/localtime instead of copying")
* OptionalObsoleteFiles: Update Kerberos entriesLexi Winter2025-08-201-3320/+186
| | | | | | | | | | | | | Consolidate the various lists of Kerberos files into three sets: common files, files only installed by MIT Kerberos, and files only installed by Heimdal. This avoids having to list the same files in multiple places and makes the logic a lot easier to maintain. The new file lists were created by comparing the actual result of make installworld with the various options enabled or disabled. Reviewed by: des, cy Differential Revision: https://reviews.freebsd.org/D51874
* Remove MK_GSSAPILexi Winter2025-08-203-4/+3
| | | | | | | | | | | | | | | For MIT Kerberos, MK_GSSAPI has no meaning: GSSAPI is a required part of Kerberos and is always built if MK_KERBEROS is enabled. Backport this behaviour to Heimdal so it works the same way. While here, change Heimdal's libcom_err and compile_et to be selected by MK_KERBEROS, not MK_KERBEROS_SUPPORT, since these are part of Kerberos and third-party users might need it even if Kerberos support is disabled in the base system. This means MK_KERBEROS_SUPPORT installs the same files with both MIT and Heimdal. Reviewed by: cy Differential Revision: https://reviews.freebsd.org/D51859
* depend-cleanup: Add a clean_obj functionDag-Erling Smørgrav2025-08-201-19/+45
| | | | | | | | | | | | | | | The clean_dep function is primarily intended for when a source file is renamed. The 20241025 entry for libcrypt was not related to a rename and resulted in libcrypt getting cleaned out and rebuilt every time. Add a clean_obj function which does what the 20241025 entry needs: delete an object file if it matches a particular regex. This also changes every occurrence of `rm -f` to `rm -fv` so we can more easily tell what gets cleaned up. Fixes: d8cd2d0833e0 ("depend-cleanup.sh: clean up after hash function removal from libcrypt") Reviewed by: jhb, emaste Differential Revision: https://reviews.freebsd.org/D52012
* build: Switch CLEAN back off by default, againKyle Evans2025-08-201-0/+4
| | | | | | | | | | | | | | | | | | | | | Now that we have the notion of a build epoch, we have sufficient tooling to handle changes that might need a larger hammer to unbreak the build. Future changes may extend our cleanup to avoid scenarios like with the MITKRB5 knob where flipping it will still require a cleanup, but on the whole most users aren't regularly flipping breaking knobs enough for this to cause the same level of problems. Those users are advised to do a CLEAN build when they flip it until we start recording build options and doing another clean for important knob switches (see D52011). When knobs of that sort are newly introduced or switch defaults, we can explicitly record an epoch for them in the interim until option-switching is detected and handled properly. This reverts commit 6dab48b9de6c1bff61b0ce78029c1e3cba20895a. Reviewed by: jrtc27, markj Differential Revision: https://reviews.freebsd.org/D51923
* usbtest: fix usbtest compilation error by an unused variableShengYi Hung2025-08-191-4/+0
| | | | | | Approved by: lwhsu (mentor), markj (mentor) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D51867
* build: remove certctl requirement for host OpenSSL libs on macOSKyle Evans2025-08-191-0/+1
| | | | | | | | | | | | | | | | | | Some platforms, like macOS, do not expose headers for the system's libcrypto for public consumption. libcrypto is relatively heavy and needs to know, e.g., the host system's endianness, so we scope the build down to macOS where OpenSSL headers are known to not be present and we can be reasonably certain that most of the systems today that would be cross-building are little endian. We still don't bother if building WITHOUT_OPENSSL since the end result is expected to be used by OpenSSL, but perhaps we could revisit that independently in case one, e.g., brings their own implementation. Reported by: jrtc27 Reviewed by: jrtc27, ngie Fixes: c340ef28fd38 ("certctl: Reimplement in C") Differential Revision: https://reviews.freebsd.org/D51935
* Remove inotify example code when MK_EXAMPLES == noEnji Cooper2025-08-191-0/+3
| | | | | | | | | | This change adds the needed entries to OLD_DIRS and OLD_FILES to ensure that the paths are properly cleaned up when `make delete-old` is run and MK_EXAMPLES == no. MFC after: 2 months Fixes: 1d8664d69041 ("examples: Add a demo program for inotify") Differential Revision: https://reviews.freebsd.org/D51934
* test/netfibs: Fix a typo in a source code commentGordon Bergling2025-08-171-1/+1
| | | | | | - s/aguments/arguments/ MFC after: 3 days
* Revert "Remove Secure RPC DES authentication"Lexi Winter2025-08-151-0/+2
| | | | | | This reverts commit 7ac276298b72982189ac1a5b17461936dc00163e. Requested by: kib
* build: introduce the notion of a build epochKyle Evans2025-08-151-2/+83
| | | | | | | | | | | | | | | | | Idea and file format shamelessly stolen from CheriBSD, but reimplemented in terms of the standard FreeBSD build system. We'll use this in some events that call for a deeper cleansing, typically reserved for situations where the dependencies are too complicated to unwind. This notably does not preclude us from doing separate cleansing of world for specific src.conf(5) knob changes that would require a rebuild. In the FreeBSD version, we either stamp the OBJTOP we're cleaning (bootstrap or the full OBJDIR) with the current epoch and bail out for unstamped objdirs, or we compare and either `rm -rf` or `cleandir` as necessary. Reviewed by: brooks, des Differential Revision: https://reviews.freebsd.org/D51848
* depend-cleanup: Handle tcopy moving from C to C++John Baldwin2025-08-141-0/+3
|
* Modify nanobsd/defaults.sh to reduce buildsize, buildtime andMichael Reifenberger2025-08-131-2/+7
| | | | | | | | | | | | | | | | increase imgsize to fit. Not building debug symbols and tests reduces _.w/ from 1465 to 503 MB. Increasing the mediasize to 6000000 let the image be built. Otherwise I get: ... 00:33:58 ## build code slice 00:33:58 ### log: /usr/obj/nanobsd.full/_.cs /usr/obj/nanobsd.full/_.mnt: write failed, filesystem is full Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D49885
* Remove Secure RPC DES authenticationLexi Winter2025-08-101-2/+0
| | | | | | | | | | | | | | | | | | | Following the earlier removal of keyserv, none of this functionality works since it requires keyserv. Remove the relevant symbols from libc's Symbol.map. Leave compatibility symbols for existing applications, but since the functions don't work without keyserv, stub them out to return an error. Remove some private symbols that were only used by keyserv; these don't get compatibility symbols. Remove the documentation for the old functions. Remove rpc.ypupdated since it requires DES authentication. Reviewed by: manu, des, emaste Differential Revision: https://reviews.freebsd.org/D50442
* bsd.mkopt.mk: Prepare a list of all build optionsDag-Erling Smørgrav2025-08-081-2/+2
| | | | | | | | | | | | | | | | | | | | After processing all the build options, iterate over the complete list minus CLEAN, MAN and TESTS, and prepare two variables: * SRC_OPT_DEFS is a list of -D and -U directives, suitable for passing to cpp or unifdef, where each option is either defined or undefined depending on whether it is set or unset. This list also includes -D__${MACHINE_ARCH}__. * SRC_OPT_LIST is a list of build options suitable for passing to make itself (or sticking in /etc/src.conf). This list also includes TARGET=${MACHINE} and TARGET_ARCH=${MACHINE_ARCH}. Note that this list is cumulative, so it includes both options defined in bsd.opts.mk and options defined in src.opts.mk. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D51827
* nvmfd: Move out of the base install and into tools/tools/nvmfJohn Baldwin2025-08-0810-0/+2287
| | | | | | | | This is still useful as an example use of the APIs in libnvmf similar to nvmfdd, but this functionality is now provided in the base system by ctld. Sponsored by: Chelsio Communications
* build: Switch CLEAN back on by defaultDag-Erling Smørgrav2025-08-081-1/+0
| | | | | | | | | | | | | | There have been too many issues with non-META_MODE incremental builds recently, and it is clear that most users, even developers, were not aware that the default had been switched. This will be revisited once more work has been done to help prevent future breakage. This reverts commit ba373fca78a114768244d6a8c27983da870c1169. Reviewed by: markj, jhb Differential Revision: https://reviews.freebsd.org/D51828
* gssd: Be consistent about Makefile conditionalsLexi Winter2025-08-081-2/+6
| | | | | | | | | gssd itself is only built when both MK_GSSAPI and MK_KERBEROS_SUPPORT are enabled, but the init script and OptionalObsoleteFiles entries only checked MK_GSSAPI. Check both variables everywhere. Reviewed by: des Differential Revision: https://reviews.freebsd.org/D51812