Page MenuHomeFreeBSD

wpa: Restructure wpa build
ClosedPublic

Authored by cy on May 20 2021, 11:53 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mar 12 2024, 4:11 AM
Unknown Object (File)
Mar 8 2024, 5:01 AM
Unknown Object (File)
Mar 8 2024, 4:56 AM
Unknown Object (File)
Mar 8 2024, 4:48 AM
Unknown Object (File)
Jan 15 2024, 5:49 PM
Unknown Object (File)
Dec 19 2023, 1:48 PM
Unknown Object (File)
Dec 12 2023, 6:57 AM
Unknown Object (File)
Sep 21 2023, 3:47 AM
Subscribers

Details

Summary

The current WPA build assumes a flat namespace. However the latest sources
from w1.fi now have a duplicate config.c, in two separate subdirectories.
The flat namespace will overwrite config.o with the output from the most
recently modified config.c, of which there are two of them.

This commit resolves this problem by building each component in
wpa's src subdirectory tree into its own .a archive, just as the w1.fi
upstream build as used by the port does. The advantages of this approach
are:

  1. Duplicate source file names, i.e. config.c in the wpa_supplicant direcory and another config.c in src/utils in the next wpa will result in both compiles writing to the same .o file.
  1. This restructure simplifies maintanence. A develper needs only to add new files as identified by git status in the vendor branch to the appropriate Makefile within the usr.sbin/wpa tree. This also reduces time required to prepare a new import and should reduce error.
  1. The new wpa build structure more closely represents the build as performed by the upstream tarball.

This is in preparation for the next wpa update from w1.fi.

Test Plan

Currently running locally.

A prior tinderbox build has succeeded.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

cy requested review of this revision.May 20 2021, 11:53 PM

I have been running with this change on my access points at home and at my local hackerspace for a while. It seems to work fine.

This revision is now accepted and ready to land.May 30 2021, 2:58 AM
usr.sbin/wpa/Makefile.crypto
7–8

It occurs to me that I've not actually tried to build with MK_OPENSSL=no. I wonder if we shouldn't simplify maintenance considerably and basically make this depend on OpenSSL?

Building WITHOUT_OPENSSL doesn't make it far enough to test wpa build, libradius needs a little love:

make[6]: stopped in /home/cy/src/src/lib/libradius
/home/cy/src/src/lib/libradius/radlib.c:190:6: error: unused variable 'alen' [-W
error,-Wunused-variable]

int alen, len;
    ^

/home/cy/src/src/lib/libradius/radlib.c:287:6: error: unused variable 'alen' [-W
error,-Wunused-variable]

int alen, len;
    ^

2 errors generated.

Probably a todo for someone (or me) when time permits.

This revision was automatically updated to reflect the committed changes.