Bug 245099

Summary: security/wpa_supplicant: Add DBUS option
Product: Ports & Packages Reporter: Val Packett <val>
Component: Individual Port(s)Assignee: Cy Schubert <cy>
Status: Closed FIXED    
Severity: Affects Only Me Keywords: feature
Priority: --- Flags: koobs: maintainer-feedback+
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
wpa-dbus.patch none

Description Val Packett 2020-03-27 11:56:03 UTC
Created attachment 212752 [details]
wpa-dbus.patch

Modern versions of wpa_supplicant expose a D-Bus interface in addition to the classic control socket protocol. Let's enable that.
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2020-03-27 12:03:33 UTC
Thanks for the report and feature addition Greg. 

Presumably this should also be enabled for default for package users?

If you could also switch the ${PORT_OPTIONS:MDBUS} block to use OPTION_LIB_DEPENDS (modern OPTIONS) syntax, unless the rest of the port uses the old, that'd be great.
Comment 2 Cy Schubert freebsd_committer freebsd_triage 2020-03-27 13:11:48 UTC
DBUS should not be default:

a) that requires a PORTREVISION bump.
b) Users who do not use dbus or have it installed must now by default install it.

I will remove the DBUS default to maintain the same footprint for binary packages. Unless it can be proved more people would want this than not. Otherwise we will risk another PR requesting its removal. Baby steps for now.
Comment 3 Cy Schubert freebsd_committer freebsd_triage 2020-03-27 13:35:23 UTC
(In reply to Kubilay Kocak from comment #1)
The port cannot use the new options framework because it sets options like this:

@${ECHO_CMD} CONFIG_OS=unix >> ${CFG}

It builds fine BTW.
Comment 4 Kubilay Kocak freebsd_committer freebsd_triage 2020-03-29 02:08:55 UTC
(In reply to Cy Schubert from comment #2)

Re (b) note that the defacto recommendation is basically that packages should enable most/expected functionality by default unless there's a compelling reason not too. [1]

This allows package users to obtain functionality out of the box without having to resort to mixing ports & packages, which is not a supported configuration, or switching entirely to ports, or needing a custom package setup (poudriere)

If the dependency addition re this option isn't substantial, and there's no explicit reason to exclude it (broken, experimental, causes issues elsewhere), then its likely more appropriate as a default.

[1] When software has extra dependencies that provide extra features, the base dependencies listed in *_DEPENDS should include the extra dependencies that would benefit most users. The base dependencies should never be a “minimal” dependency set. The goal is not to include every dependency possible. Only include those that will benefit most people. [2]
[2] https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/makefile-depend.html
Comment 5 Cy Schubert freebsd_committer freebsd_triage 2020-03-30 02:13:55 UTC
We should probably enable everything then.
Comment 6 Cy Schubert freebsd_committer freebsd_triage 2020-03-30 02:29:36 UTC
Committed.

All other non-exclusive options are now default.
Comment 7 commit-hook freebsd_committer freebsd_triage 2020-03-30 02:29:58 UTC
A commit references this bug:

Author: cy
Date: Mon Mar 30 02:29:04 UTC 2020
New revision: 529853
URL: https://svnweb.freebsd.org/changeset/ports/529853

Log:
  Add DBUS option.

  PR:		245099
  Submitted by:	greg at unrelenting.technology

Changes:
  head/security/wpa_supplicant/Makefile
Comment 8 commit-hook freebsd_committer freebsd_triage 2020-03-30 02:30:00 UTC
A commit references this bug:

Author: cy
Date: Mon Mar 30 02:29:10 UTC 2020
New revision: 529854
URL: https://svnweb.freebsd.org/changeset/ports/529854

Log:
  All other non-exclusive options should be default.

  PR:		245099
  Reported by:	koobs

Changes:
  head/security/wpa_supplicant/Makefile
Comment 9 Cy Schubert freebsd_committer freebsd_triage 2020-04-01 00:39:51 UTC
This patch fails to build under poudriere.

cc -c -o dbus/dbus_dict_helpers.o -O2 -pipe -Wno-misleading-indentation -Wno-tautological-overlap-compare  -I/usr/local/include -I/usr/include -fstack-protector-strong -fno-strict-aliasing   -I/wrkdirs/usr/ports/security/wpa_supplicant/
work/wpa_supplicant-2.9/src -I/wrkdirs/usr/ports/security/wpa_supplicant/work/wpa_supplicant-2.9/src/utils -DCONFIG_BACKEND_FILE -DCONFIG_IEEE80211W -DCONFIG_IEEE80211R -DCONFIG_HS20 -DCONFIG_INTERWORKING  -DCONFIG_DRIVER_NDIS  -DCONFIG
_DRIVER_WIRED -DCONFIG_DRIVER_BSD -DEAP_TLS -DEAP_PEAP -DEAP_TTLS -DEAP_MD5 -DEAP_MSCHAPv2 -DEAP_GTC -DEAP_OTP -DEAP_LEAP -DEAP_PSK -DEAP_FAST -DEAP_PAX -DEAP_SAKE -DEAP_GPSK -DEAP_GPSK_SHA256 -DEAP_PWD -DEAP_EKE -DCONFIG_WPS -DEAP_WSC
-DCONFIG_WPS_NFC -DCONFIG_WPS_OOB -DCONFIG_WPS_ER -DCONFIG_WPS_UPNP -DEAP_IKEV2 -DEAP_TNC -DIEEE8021X_EAPOL -DPKCS12_FUNCS -DCONFIG_SMARTCARD -DEAP_TLS_OPENSSL -DTLS_DEFAULT_CIPHERS=\""DEFAULT:!EXP:!LOW"\" -DCONFIG_DES -DCONFIG_SHA256 -
DALL_DH_GROUPS -DCONFIG_ECC -DCONFIG_CTRL_IFACE -DCONFIG_CTRL_IFACE_UNIX -DCONFIG_CTRL_IFACE_DBUS_NEW -DCONFIG_CTRL_IFACE_DBUS_INTRO  -DCONFIG_DEBUG_SYSLOG -DCONFIG_GAS -DCONFIG_OFFCHANNEL dbus/dbus_dict_helpers.c
dbus/dbus_dict_helpers.c:10:10: fatal error: 'dbus/dbus.h' file not found
#include <dbus/dbus.h>
         ^~~~~~~~~~~~~
1 error generated.
gmake[1]: *** [Makefile:1998: dbus/dbus_dict_helpers.o] Error 1
gmake[1]: *** Waiting for unfinished jobs....
gmake[1]: Leaving directory '/wrkdirs/usr/ports/security/wpa_supplicant/work/wpa_supplicant-2.9/wpa_supplicant'
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make: stopped in /usr/ports/security/wpa_supplicant
=>> Cleaning up wrkdir
===>  Cleaning for wpa_supplicant-2.9_2
build of security/wpa_supplicant | wpa_supplicant-2.9_2 ended at Tue Mar 31 13:10:16 PDT 2020
build time: 00:00:40
!!! build failure encountered !!!
Comment 10 Cy Schubert freebsd_committer freebsd_triage 2020-04-01 00:47:58 UTC
Needs USES= pkgconfig:build