Page MenuHomeFreeBSD

Make check for loader features caseless
AcceptedPublic

Authored by lytboris_gmail.com on Tue, Jul 21, 4:30 PM.
Tags
None
Referenced Files
F164120981: D58381.diff
Tue, Jul 28, 10:32 PM
F164089667: D58381.id.diff
Tue, Jul 28, 3:16 PM
Unknown Object (File)
Tue, Jul 28, 2:59 PM
Unknown Object (File)
Mon, Jul 27, 7:48 PM
Unknown Object (File)
Mon, Jul 27, 7:04 PM
Unknown Object (File)
Mon, Jul 27, 9:49 AM
Unknown Object (File)
Mon, Jul 27, 5:12 AM
Unknown Object (File)
Sun, Jul 26, 12:32 PM
Subscribers

Details

Reviewers
manu
imp
vexeduxr
Summary

Trying to enable GZIP loader feature by adding LOADER_GZIP_SUPPORT=YES into src.conf while building a CI infrastructure would lead to disabling this feature as current makefile code checks for yes/no values in a case-sensitive manner.

This oatch makes these checks case-insensitive and adds some hints for future us.

Test Plan
  1. Put LOADER_GZIP_SUPPORT=YES into src.conf
  2. Check strings loader for zf_open in symbols list.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

LOADER_DISK_SUPPORT is also checked in stand/defs.mk, otherwise looks good to me.

Interestingly enough LOADER_TFTP_SUPPORT is documented with uppercase values in multiple places.

Updated diff, altered one check in stand/defs.mk

This revision is now accepted and ready to land.Wed, Jul 22, 4:40 PM

all the other build system things, like for MK_FOO are lower case only. I worry this would cause confusion...

In D58381#1339766, @imp wrote:

all the other build system things, like for MK_FOO are lower case only. I worry this would cause confusion...

We've got into trouble with unbootable servers twice becase of LOADER_GZIP_SUPPORT=YES :)
Not sure if LOADER_FEATURES_INCLUDE/LOADER_FEATURES_EXCLUDE approach with subsequent :M checks is any better.
Another options is to break the build in case someone uses wrong words (on instead of yes).

Which would you prefer?