Bug 245809

Summary: security/wpa_supplicant: Add EAPOL_TEST option
Product: Ports & Packages Reporter: Craig Leres <leres>
Component: Individual Port(s)Assignee: Craig Leres <leres>
Status: Closed FIXED    
Severity: Affects Only Me CC: cy
Priority: --- Flags: cy: maintainer-feedback+
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
patch
koobs: maintainer-approval+
patch leres: maintainer-approval?

Description Craig Leres freebsd_committer 2020-04-22 02:00:13 UTC
We'd like to be able to use the eapol_test test program. Here's a patch to add an option for this.
Comment 1 Craig Leres freebsd_committer 2020-04-22 02:01:02 UTC
Created attachment 213663 [details]
patch
Comment 2 Cy Schubert freebsd_committer 2020-04-22 02:59:06 UTC
The other patches don't appear to be related to EAPOL_TEST. What are they for?
Comment 3 Cy Schubert freebsd_committer 2020-04-22 03:14:14 UTC
Maintainer approved. Fill your boots.
Comment 4 Kubilay Kocak freebsd_committer freebsd_triage 2020-04-22 03:15:24 UTC
Comment on attachment 213663 [details]
patch

^Triage: Set attachment maintainer-approval flag (to +) to signify maintainer approval.
Comment 5 Craig Leres freebsd_committer 2020-04-22 03:28:06 UTC
(In reply to Cy Schubert from comment #2)
I should have at least commented about the changes to files/*.

Apparently turning on the CONFIG_EAPOL_TEST .config option causes additional code to be compiled resulting in errors:

../src/utils/Packet32.c:131:14: error: passing 'int8_t *' (aka 'signed char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Werror,-Wpointer-sign]
        if (strncmp(iface, "\\Device\\NPF_", 12) == 0)
                    ^~~~~
[...]
../src/drivers/driver_ndis.c:508:22: error: format specifies type 'int' but the argument has type 'size_t' (aka 'unsigned long') [-Werror,-Wformat]
                           __func__, oid, len);
                                          ^~~
[etc.]

I just retest adding the patches one at a time and it looks like the changes to Packet32.c are not required.
Comment 6 Cy Schubert freebsd_committer 2020-04-22 03:35:34 UTC
Thanks. Commit it without the Packet32.c patch then.
Comment 7 commit-hook freebsd_committer 2020-04-22 03:38:40 UTC
A commit references this bug:

Author: leres
Date: Wed Apr 22 03:37:46 UTC 2020
New revision: 532442
URL: https://svnweb.freebsd.org/changeset/ports/532442

Log:
  security/wpa_supplicant: Add EAPOL_TEST option

  Add an option option to builds and installs the eapol_test program.
  Update/patch to solve new compilation errors that result with the
  option enabled.

  Note: Leaving the changes to Packet32.c out of the PR patch set as
  it is not needed.

  PR:		245809
  Approved by:	cy (maintainer)

Changes:
  head/security/wpa_supplicant/Makefile
  head/security/wpa_supplicant/files/ntddndis.h
  head/security/wpa_supplicant/files/patch-src_drivers_driver__ndis.c
  head/security/wpa_supplicant/pkg-plist
Comment 8 Craig Leres freebsd_committer 2020-04-22 17:15:20 UTC
Created attachment 213700 [details]
patch

Here's a quick patch to change the @comment logic for the new EAPOL_TEST option to use OPTIONS_SUB instead.

(I thought this feature would exist but didn't easily find it yesterday; today it occurred to me to search /usr/ports/Mk/* for @comment... and of course now that I know what it's named I see it in the porters handbook.)
Comment 9 Cy Schubert freebsd_committer 2020-04-22 17:55:26 UTC
Go for it.
Comment 10 commit-hook freebsd_committer 2020-04-22 19:55:32 UTC
A commit references this bug:

Author: leres
Date: Wed Apr 22 19:54:39 UTC 2020
New revision: 532510
URL: https://svnweb.freebsd.org/changeset/ports/532510

Log:
  security/wpa_supplicant: Simplify @comment logic by using OPTIONS_SUB

  PR:		245809
  Approved by:	cy (maintainer)

Changes:
  head/security/wpa_supplicant/Makefile
Comment 11 Craig Leres freebsd_committer 2020-05-23 23:29:41 UTC
This was wrapped up last month.
Comment 12 Cy Schubert freebsd_committer 2020-05-24 00:41:55 UTC
Indeed it was. Thanks for committing it.