Page MenuHomeFreeBSD

wpa: Restructure wpa build
ClosedPublic

Authored by cy on May 20 2021, 11:53 PM.
Tags
None
Referenced Files
F104987801: D30372.diff
Wed, Dec 11, 9:46 AM
Unknown Object (File)
Tue, Dec 10, 4:02 PM
Unknown Object (File)
Mon, Dec 9, 11:10 AM
Unknown Object (File)
Sun, Nov 17, 9:04 AM
Unknown Object (File)
Thu, Nov 14, 1:38 AM
Unknown Object (File)
Nov 10 2024, 4:33 PM
Unknown Object (File)
Oct 24 2024, 8:26 PM
Unknown Object (File)
Oct 24 2024, 8:25 PM
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 Skipped
Unit
Tests Skipped

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

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.