Bug 245099 - security/wpa_supplicant: Add DBUS option
Summary: security/wpa_supplicant: Add DBUS option
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Cy Schubert
Keywords: feature
Depends on:
Reported: 2020-03-27 11:56 UTC by Greg V
Modified: 2020-04-01 00:47 UTC (History)
0 users

See Also:
koobs: maintainer-feedback+

wpa-dbus.patch (2.19 KB, patch)
2020-03-27 11:56 UTC, Greg V
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Greg V 2020-03-27 11:56:03 UTC
Created attachment 212752 [details]

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 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 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 2020-03-30 02:13:55 UTC
We should probably enable everything then.
Comment 6 Cy Schubert freebsd_committer 2020-03-30 02:29:36 UTC

All other non-exclusive options are now default.
Comment 7 commit-hook freebsd_committer 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

  Add DBUS option.

  PR:		245099
  Submitted by:	greg at unrelenting.technology

Comment 8 commit-hook freebsd_committer 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

  All other non-exclusive options should be default.

  PR:		245099
  Reported by:	koobs

Comment 9 Cy Schubert freebsd_committer 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
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

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 2020-04-01 00:47:58 UTC
Needs USES= pkgconfig:build