Page MenuHomeFreeBSD

net/wifi-firmware-*: build framework and license hack cleanup
ClosedPublic

Authored by bz on Jul 25 2024, 12:09 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Oct 16, 6:29 PM
Unknown Object (File)
Mon, Oct 14, 7:43 PM
Unknown Object (File)
Mon, Oct 14, 5:04 PM
Unknown Object (File)
Fri, Oct 11, 11:48 AM
Unknown Object (File)
Wed, Oct 9, 7:35 PM
Unknown Object (File)
Wed, Oct 9, 11:14 AM
Unknown Object (File)
Mon, Oct 7, 1:48 AM
Unknown Object (File)
Fri, Oct 4, 6:10 PM
Subscribers

Details

Summary

Cleanup the extra layer of "flavour" that came into the build framework
when flavours were introduced at a time when it was not planned.
Make linters some more happy. [1]

Remove the special license hack to install additional files.
If DISABLE_LICENSES is set we still installed files making builds fail [2].
One would hope to always install the lincese files but simply disable
any checking by the framework.
Introduce a new way using LICENSE_COMB=multi to install the default
license file, the extra WHENCE and any possible extra firmware license
files. Technically this is an abuse of the system too but at least it
should work and not break non default options.

Based on: D45369 by jrm [1]
Reported by: pi [2]
Sponsored by: The FreeBSD Foundation

Test Plan

None yet; someone with a clean ports build setup should probably try this out.

Diff Detail

Repository
R11 FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bz requested review of this revision.Jul 25 2024, 12:09 PM
bz created this revision.
bz added inline comments.
net/wifi-firmware-kmod/Makefile.inc
44

Add extra firmware *license* files.

net/wifi-firmware-kmod/Makefile.inc
46

I did a quick test, and I got build failures.

https://pkg.ftfl.ca/build.html?mastername=15amd64-default&build=2024-08-01_13h38m25s

Removing this line fixed the build.

bz marked an inline comment as done.Aug 16 2024, 10:55 AM
bz added inline comments.
net/wifi-firmware-kmod/Makefile.inc
46

It seems that the :range of
FOO=
and
FOO= 1
both evaluate to 1. So if there is no license it still tries to add one if the variable is defined; if the variable was not defined at all there likely was an error.
Can you try the update which comes in a few minutes?

bz marked an inline comment as done.
bz edited the test plan for this revision. (Show Details)

Try to fix the ;range check in case the variable is not defined or defined
without value; in the latter case :range seems to still evaluate to 1.

FLAVORS=a b c d

DISTFILES_a_lic=        1 2 3
DISTFILES_b_lic=
DISTFILES_c_lic=        7

all:
.for FLAVOR in ${FLAVORS}
.if "${DISTFILES_${FLAVOR}_lic}"
        @echo "FLAVOR '${FLAVOR}' : " ${DISTFILES_${FLAVOR}_lic:range}

.for _n in ${DISTFILES_${FLAVOR}_lic:range}
        @echo "  ${_n}"
.endfor
.endif
.endfor
This revision is now accepted and ready to land.Aug 22 2024, 8:02 PM