aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/config
Commit message (Collapse)AuthorAgeFilesLines
* config.5: Bump .Dd to reflect latest updateOlivier Certner2025-06-161-1/+1
| | | | | | MFC with: 7d7b2d38463c ("config.5: Document CONF_CFLAGS under 'makeoptions'") Event: Kitchener-Waterloo Hackathon 202506 Sponsored by: The FreeBSD Foundation
* config.5: Document CONF_CFLAGS under 'makeoptions'Olivier Certner2025-06-131-0/+17
| | | | | | | | | | | | | | | | This variable serves to tweak CFLAGS from the kernel configuration file, easing some custom kernel builds. It was introduced by bde@ in 1999. The description has been kept simple on purpose. It does not completely reflect reality as the build infrastructure actually appends variables to CFLAGS after CONF_CFLAGS has been processed in a few cases. However, these cases do not collide with expected common uses of CONF_CFLAGS, so have not been mentioned. Reviewed by: markj (older version) MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50544
* packages: rename elftoolchain to toolchain, add more thingsLexi Winter2025-05-281-0/+1
| | | | | | | | | | | | | | Rename the existing "elftoolchain" package to "toolchain", and move everything which is gated by MK_TOOLCHAIN (e.g. lex, yacc, ...) to the toolchain package. This means we have one package called "toolchain" which contains all the development-related utilities which are not compilers or already part of some other package (e.g., llvm). Reviewed by: des, emaste Approved by: des (mentor) Differential Revision: https://reviews.freebsd.org/D50286
* Revert commit e89d737041d1 (config.5: Document CONF_CFLAGS under 'makeoptions').Olivier Certner2025-05-271-16/+0
| | | | Was committed inadvertently before review, and does not have the proper tags.
* config.5: Document CONF_CFLAGS under 'makeoptions'Olivier Certner2025-05-271-0/+16
| | | | | This variable serves to tweak CFLAGS from the kernel configuration file, easing some custom kernel builds. It was introduced by bde@ in 1999.
* config(5): Fix display of includeoptionsBryan Drewery2025-02-111-2/+2
|
* config: Remove a stray semicolonZhenlei Huang2024-10-241-1/+1
| | | | MFC after: 1 week
* config: Search include paths for files to be read (options, files)Stephen J. Kiernan2024-09-181-1/+13
| | | | | | | | This is useful for downstream consumers to add their own kernel config files in another directory other than the default ones. Obtained from: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D44538
* Allow additional "options" files to be specified in kernel configStephen J. Kiernan2024-09-187-4/+62
| | | | | | | | | | | | | | | The "includeoptions" directive can be used to specify an additional options file to be used. This is useful in conjunction with the "files" directive for build environments to be able to add custom files and options. Add "-v" flag to enable verbose mode. Added some additional error messages when in verbose mode. Obtained from: Juniper Networks, Inc. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D39540
* Remove residual blank line at start of MakefileWarner Losh2024-07-151-1/+0
| | | | | | | This is a residual of the $FreeBSD$ removal. MFC After: 3 days (though I'll just run the command on the branches) Sponsored by: Netflix
* config: Remove redundant codeWarner Losh2024-06-061-2/+0
| | | | | | | since errx is marked dead2, we don't need this. Noticed by: jrtc27 Sponsored by: Netflix
* Use correct function declaration for yyerrorDapeng Gao2024-06-031-2/+4
| | | | | | | | | According to the POSIX standard at https://pubs.opengroup.org/onlinepubs/9699919799/utilities/yacc.html `yyerror` should return `int`. Add unreachable since errx never returns. Reviewed by: imp, kib Differential Revision: https://reviews.freebsd.org/D45447
* usr.sbin: Automated cleanup of cdefs and other formattingWarner Losh2023-11-273-9/+0
| | | | | | | | | | | | | | | | Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row. Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/ Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/ Remove /\n+#if.*\n#endif.*\n+/ Remove /^#if.*\n#endif.*\n/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/ Sponsored by: Netflix
* Remove copyright strings ifdef'd outWarner Losh2023-11-271-9/+0
| | | | | | | | | | | We've ifdef'd out the copyright strings for some time now. Go ahead and remove the ifdefs. Plus whatever other detritis was left over from other recent removals. These copyright strings are present in the comments and are largely from CSRG's attempt at adding their copyright to every binary file (which modern interpretations of the license doesn't require). Sponsored by: Netflix
* usr.sbin: Remove ancient SCCS tags.Warner Losh2023-11-279-21/+0
| | | | | | | | Remove ancient SCCS tags from the tree, automated scripting, with two minor fixup to keep things compiling. All the common forms in the tree were removed with a perl script. Sponsored by: Netflix
* Purge more stray embedded $FreeBSD$ stringsJohn Baldwin2023-09-254-8/+0
| | | | | | | These do not use __FBSDID but instead use bare char arrays. Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D41957
* Remove $FreeBSD$: one-line nroff patternWarner Losh2023-08-161-1/+0
| | | | Remove /^\.\\"\s*\$FreeBSD\$$\n/
* Remove $FreeBSD$: two-line nroff patternWarner Losh2023-08-161-2/+0
| | | | Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
* Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-162-2/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* Remove $FreeBSD$: one-line .h patternWarner Losh2023-08-163-3/+0
| | | | Remove /^\s*\*+\s*\$FreeBSD\$.*$\n/
* Remove $FreeBSD$: two-line .h patternWarner Losh2023-08-162-6/+0
| | | | Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
* Update/fix Makefile.depend for userlandSimon J. Gerraty2023-04-191-3/+3
|
* config: drop reference to removed System_specKyle Evans2023-02-241-2/+0
| | | | | | | | | | Fixes the following warning: yacc: w - the symbol System_spec is undefined yacc: 3 rules never reduced Reported by: otis Fixes: 6a836ea741c7 ("config(8): Remove obsolete 'config' directive.")
* config: Include errno.h in mkmakefile.ccMark Johnston2023-02-241-0/+1
| | | | | | | | | Commit da8884202940 ("config: error out on malformed env/hint lines") added a reference to EINVAL. In some configurations the bootstrap tools build fails for lack of errno definitions. Fixes: da8884202940 ("config: error out on malformed env/hint lines") Reported by: syzbot+b1a5d112a737d9a2be9b@syzkaller.appspotmail.com
* config: address a number of Coverity issuesKyle Evans2023-02-163-9/+23
| | | | | | | | | | | | | | Highlights: - Various memory leaks - FILE* leaks - `tsize` in moveifchanged() is only needed if !changed, and `from_sb` is only valid if !changed. - Simplify trivially true expression - Sanity check elfdump size output (+ fix variable sizes) (des@) CID: 1471167, 1006391, 1505333, 1505275, 1505349, 1505306, 1505232 Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D38643
* config: error out on malformed env/hint linesKyle Evans2023-02-161-7/+18
| | | | | | | | | | | We need these to be assignments, error out if they're not. While we're here, tag errout as __printflike so that the compiler will sanity check the format string + args. CID: 1505293 Reviewed by: emaste, imp Differential Revision: https://reviews.freebsd.org/D38642
* config: push path() into moveifchanged()Kyle Evans2023-02-162-14/+25
| | | | | | | | | | | | Every caller path()s its arguments anyways, just simplify these and push path() into moveifchanged(). This fixes a number of memory leaks in the process since path() allocates memory, which we will now free(). While we're here, make sure we close from_fd/to_fd appropriately. CID: 1471040, 1471714, 1472045, 1006907, 1006908 Reviewed by: emaste, imp Differential Revision: https://reviews.freebsd.org/D38641
* config: fix some common issues with path() usageKyle Evans2023-02-162-2/+11
| | | | | | | | | | | | | | None of the callers check that the allocation in path() failed, so let's check in path() and abort instead of failing. Along those lines, none of the callers seem to acknowledge that the returned string needs to be free()d -- let's do that as well. There are a couple not addressed in this commit that will be addressed in a future commit by pushing the path() call down into moveifchanged() instead and freeing it properly there. CID: 1505271, 1505250, 1505279 Reviewed by: emaste, imp
* config: drop dependency on libsbufKyle Evans2023-02-095-107/+152
| | | | | | | | | | | | | Use an std::stringstream instead. get_word() and get_quoted_word() both return a buffer that's presumed to not need release, so solve this by returning a new special configword type that holds a string or eof/eol state. This cleans up caller checking for EOF/EOL to make it more explicit what they're doing, at least in the EOL cases which previously checked for NULL. Sponsored by: Klara, Inc. Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D38276
* config: drop dependency on libnvKyle Evans2023-02-082-35/+23
| | | | | | | | | | Compile mkmakefile.c as C++ instead and use an std::unordered_map to accomplish the same goal. Reviewed by: imp Sponsored by: Klara, Inc. Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D38275
* config: make changes to allow some parts to build as C++Kyle Evans2023-02-084-45/+52
| | | | | | | | | | | | | | | | | | | Highlights: - Avoid keywords (this, not) as variable names - Move yyparse into config.h with other declarations - All declarations in config.h are assumed guilty until proven innocent - Some const-correctness - Casting malloc/calloc returns Note that we're not building any C++ here yet, this will be introduced in other commits to replace some of the lib dependencies. Reducing the number of FreeBSD-specific dependencies we have reduces some friction for building our bootstrap tools independently in other environments. Reviewed by: imp Sponsored by: Klara, Inc. Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D38274
* config(5): drop mention of mipsMitchell Horne2022-10-171-3/+1
| | | | | Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D37019
* Indicate which port gdb.1 and kgdb.1 come from.Jens Schweikhardt2022-08-171-1/+1
|
* config(5): Update upper limit for maxusers on 64-bit systemsFelix Johnson2021-10-281-2/+4
| | | | | | | | | | The limit of 384 maxusers for auto configuration was only imposed on 32-bit systems. Document that maxusers scales above 384 based on memory for 64-bit systems. PR: 204938 MFC after: 3 days Reported by: David Höppner <0xffea@gmail.com>
* config(8): Remove obsolete 'config' directive.Warner Losh2021-06-173-22/+0
| | | | | | | | | The "config" line in config files has been obsolete since FreeBSD 4.x when we moved to having the boot loader pass in the root device. Remove it. MFC After: 1 week Sponsored by: Netflix
* config: style for '\0' and NULLWarner Losh2021-04-191-9/+9
| | | | | | | | | | Use NULL for pointers instead of '0' (though hey are the same thing in these cases). Ditto for using the zero character '\0' instead of a naked 0 (ditto). Reviewed by: markj@ Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D29847
* Revert "config(8): Correct the mentioned paper in the SEE ALSO section"Gordon Bergling2021-04-141-4/+3
| | | | | | | | config(8) was first imported from 4.4BSD. Reported by: rgrimes This reverts commit e6ab1e365c06559e964667d2f5a6de856fa28be6.
* config(8): Correct the mentioned paper in the SEE ALSO sectionGordon Bergling2021-04-131-3/+4
| | | | | | | | | | FreeBSD's version of the config(8) utility is based on 4.3BSD not 4.4BSD. So correct the mentioned paper in the SEE ALSO section. Reported by: imp Reviewed by: imp X-MFC-with: 2b59392cb0da804e825c63469beb1934ec4267db Differential Revision: https://reviews.freebsd.org/D29701
* config(8): Mention the authors of a paper in the SEE ALSO sectionGordon Bergling2021-04-091-1/+5
| | | | | Obtained from: OpenBSD MFC after: 1 week
* config(8): remove support for -pKonstantin Belousov2021-04-027-47/+1
| | | | | | | | | and other equivalent ways to request mcount-based profiling, like 'profile N' in kernel config. Reviewed by: jhb Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D29529
* config: Fix typo in comment.John Baldwin2021-02-011-1/+1
|
* config: Fix a few mandoc related errorsGordon Bergling2020-12-192-10/+11
| | | | | | | | | | - new sentence, new line - no blank before trailing delimiter MFC after: 1 week Notes: svn path=/head/; revision=368809
* Do not use macros in the argument to -widthMateusz Piotrowski2020-06-281-3/+3
| | | | | | | | | This patch improves the presentation of the FILES section dramatically. MFC after: 2 weeks Notes: svn path=/head/; revision=362742
* config: Add no-ctfconvert support.Bryan Drewery2020-04-283-4/+12
| | | | | | | | | | | | | | | | Bump CONFIGVERS to 600018 for this support. Some files may purposely have debug info disabled or are *source files* that attempt to run ctfconvert on them. Currently ctfconvert ignores these errors but I have a change to make the errors real so we can catch real problems like exceeding type limits. Sponsored by: Dell EMC Reviewed by: imp, cem, kevans Differential Revision: https://reviews.freebsd.org/D24535 Notes: svn path=/head/; revision=360443
* config(8): use sbuf to manage line buffersJason A. Harmening2020-04-121-42/+39
| | | | | | | | | | | PR: 245476 Reported by: kevans Reviewed by: imp, kevans MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D24373 Notes: svn path=/head/; revision=359815
* config(8): "fix" a couple of buffer overflowsKyle Evans2020-04-071-4/+24
| | | | | | | | | | | | | | | | | Recently added/changed lines in various kernel configs have caused some buffer overflows that went undetected. These were detected with a config built using -fno-common as these line buffers smashed one of our arrays, then further triaged with ASAN. Double the sizes; this is really not a great fix, but addresses the immediate need until someone rewrites config. While here, add some bounds checking so that we don't need to detect this by random bus errors or other weird failures. MFC after: 3 days Notes: svn path=/head/; revision=359689
* config(8): fixes for -fno-commonKyle Evans2020-03-282-9/+20
| | | | | | | | | | | | | Move this handful of definitions into main.c, properly declare these as extern in config.h. This fixes the config(8) build with -fno-common. Unexplained in my previous commit to gas, -fno-common will become the default in GCC10 and LLVM11, so it's worth addressing these in advance. MFC after: 3 days Notes: svn path=/head/; revision=359389
* Create ../compileWarner Losh2020-02-241-1/+10
| | | | | | | | | | | Give up the battle to keep extra files in $MACHINE/compile to keep the file in the tree. Instead, create CDIR (usually ../compile) if it doesn't exist when we're using a default build location (eg, not using -d). If it does, we do nothing. This only affects people that do old-school builds, but it's bit me a dozen times since last summer so time to fix the bug. Notes: svn path=/head/; revision=358291
* Bump CONFIGVERS to 600017.Warner Losh2020-02-231-1/+1
| | | | | | | | | This change reflects the ability to change machine_arch in a config file. This is useful for including one config in another and changing the machine_arch in the second one. Notes: svn path=/head/; revision=358266
* Relax machine directives a little.Warner Losh2020-02-232-3/+7
| | | | | | | | | Currently, you can have multiple machine directives if they are otherwise identical. Relax this so that only the machinename part is the same. This allows one to change the machine arch in a different config file you've included easily. Notes: svn path=/head/; revision=358265