From patchwork Wed Sep 19 10:11:41 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Neumann X-Patchwork-Id: 184965 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id 6AF4A2C007C for ; Wed, 19 Sep 2012 20:12:41 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 71B0B8CBC9; Wed, 19 Sep 2012 10:12:39 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Qxq4+0IYV7Sj; Wed, 19 Sep 2012 10:12:27 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id E50E38CD6F; Wed, 19 Sep 2012 10:12:09 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id E13948F74B for ; Wed, 19 Sep 2012 10:12:07 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 48D5F8CEA8 for ; Wed, 19 Sep 2012 10:12:06 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ivCAq2AwJMYx for ; Wed, 19 Sep 2012 10:11:58 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.zonque.de (svenfoo.org [82.94.215.22]) by whitealder.osuosl.org (Postfix) with ESMTPS id 777C28CE97 for ; Wed, 19 Sep 2012 10:11:58 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.zonque.de (Postfix) with ESMTP id EC58EC021D; Wed, 19 Sep 2012 12:11:54 +0200 (CEST) Received: from mail.zonque.de ([127.0.0.1]) by localhost (rambrand.bugwerft.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5UZXkRMFPhhV; Wed, 19 Sep 2012 12:11:54 +0200 (CEST) Received: from localhost.localdomain (pd907dbf4.dip0.t-ipconnect.de [217.7.219.244]) (using TLSv1.1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.zonque.de (Postfix) with ESMTPSA id 5EB4AC0097; Wed, 19 Sep 2012 12:11:54 +0200 (CEST) From: Sven Neumann To: buildroot@busybox.net Date: Wed, 19 Sep 2012 12:11:41 +0200 Message-Id: <1348049503-1469-2-git-send-email-s.neumann@raumfeld.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1348049503-1469-1-git-send-email-s.neumann@raumfeld.com> References: <5058EFD8.4010809@mind.be> <1348049503-1469-1-git-send-email-s.neumann@raumfeld.com> Subject: [Buildroot] [PATCH 1/3] wpa-supplicant: add options to enable the new DBus interface X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net Allow to configure the DBus interfaces that the wpa_supplicant binary should support (old or new or both). Also allow to enable introspection support on the new DBus interface. Signed-off-by: Sven Neumann --- package/wpa_supplicant/Config.in | 19 ++++++++++++++ package/wpa_supplicant/wpa_supplicant.mk | 42 ++++++++++++++++++++++++++---- 2 files changed, 56 insertions(+), 5 deletions(-) diff --git a/package/wpa_supplicant/Config.in b/package/wpa_supplicant/Config.in index d7cefe3..95d9620 100644 --- a/package/wpa_supplicant/Config.in +++ b/package/wpa_supplicant/Config.in @@ -30,6 +30,25 @@ config BR2_PACKAGE_WPA_SUPPLICANT_AP_SUPPORT (optionally, with WPS); this links in parts of hostapd functionality into wpa_supplicant. +config BR2_PACKAGE_WPA_SUPPLICANT_DBUS_OLD + bool "Enable support for old DBus control interface" + depends on BR2_PACKAGE_DBUS + help + Enable support for old DBus control interface + (fi.epitest.hostap.WPASupplicant). + +config BR2_PACKAGE_WPA_SUPPLICANT_DBUS_NEW + bool "Enable support for new DBus control interface" + depends on BR2_PACKAGE_DBUS + help + Enable support for new DBus control interface (fi.w1.wpa_supplicant1). + +config BR2_PACKAGE_WPA_SUPPLICANT_DBUS_INTROSPECTION + bool "Introspection support" + depends on BR2_PACKAGE_WPA_SUPPLICANT_DBUS_NEW + help + Add introspection support for new DBus control interface. + config BR2_PACKAGE_WPA_SUPPLICANT_WPS bool "Enable support for WPS" help diff --git a/package/wpa_supplicant/wpa_supplicant.mk b/package/wpa_supplicant/wpa_supplicant.mk index d8c916b..207eec1 100644 --- a/package/wpa_supplicant/wpa_supplicant.mk +++ b/package/wpa_supplicant/wpa_supplicant.mk @@ -10,7 +10,8 @@ WPA_SUPPLICANT_LICENSE = GPLv2/BSD-3c WPA_SUPPLICANT_LICENSE_FILES = README WPA_SUPPLICANT_CONFIG = $(WPA_SUPPLICANT_DIR)/wpa_supplicant/.config WPA_SUPPLICANT_SUBDIR = wpa_supplicant -WPA_SUPPLICANT_DBUS_SERVICE = fi.epitest.hostap.WPASupplicant +WPA_SUPPLICANT_DBUS_OLD_SERVICE = fi.epitest.hostap.WPASupplicant +WPA_SUPPLICANT_DBUS_NEW_SERVICE = fi.w1.wpa_supplicant1 WPA_SUPPLICANT_CFLAGS = $(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/libnl3/ WPA_SUPPLICANT_LDFLAGS = $(TARGET_LDFLAGS) @@ -84,9 +85,41 @@ ifeq ($(BR2_PACKAGE_DBUS),y) WPA_SUPPLICANT_MAKE_ENV = \ PKG_CONFIG_SYSROOT_DIR="$(STAGING_DIR)" \ PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" -define WPA_SUPPLICANT_DBUS_CONFIG + +ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_DBUS_OLD),y) +define WPA_SUPPLICANT_DBUS_OLD_CONFIG $(SED) 's/\(#\)\(CONFIG_CTRL_IFACE_DBUS=\)/\2/' $(WPA_SUPPLICANT_CONFIG) endef +define WPA_SUPPLICANT_INSTALL_DBUS_OLD + $(INSTALL) -D \ + $(@D)/wpa_supplicant/dbus/$(WPA_SUPPLICANT_DBUS_OLD_SERVICE).service \ + $(TARGET_DIR)/usr/share/dbus-1/system-services/$(WPA_SUPPLICANT_DBUS_OLD_SERVICE).service +endef +endif + +ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_DBUS_NEW),y) +define WPA_SUPPLICANT_DBUS_NEW_CONFIG + $(SED) 's/\(#\)\(CONFIG_CTRL_IFACE_DBUS_NEW=\)/\2/' $(WPA_SUPPLICANT_CONFIG) +endef +define WPA_SUPPLICANT_INSTALL_DBUS_NEW + $(INSTALL) -D \ + $(@D)/wpa_supplicant/dbus/$(WPA_SUPPLICANT_DBUS_NEW_SERVICE).service \ + $(TARGET_DIR)/usr/share/dbus-1/system-services/$(WPA_SUPPLICANT_DBUS_NEW_SERVICE).service +endef +endif + +ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_DBUS_INTROSPECTION),y) +define WPA_SUPPLICANT_DBUS_INTROSPECTION_CONFIG + $(SED) 's/\(#\)\(CONFIG_CTRL_IFACE_DBUS_INTRO=\)/\2/' $(WPA_SUPPLICANT_CONFIG) +endef +endif + +define WPA_SUPPLICANT_DBUS_CONFIG + $(WPA_SUPPLICANT_DBUS_OLD_CONFIG) + $(WPA_SUPPLICANT_DBUS_NEW_CONFIG) + $(WPA_SUPPLICANT_DBUS_INTROSPECTION_CONFIG) +endef + endif define WPA_SUPPLICANT_CONFIGURE_CMDS @@ -131,9 +164,8 @@ define WPA_SUPPLICANT_INSTALL_DBUS $(INSTALL) -D \ $(@D)/wpa_supplicant/dbus/dbus-wpa_supplicant.conf \ $(TARGET_DIR)/etc/dbus-1/system.d/wpa_supplicant.conf - $(INSTALL) -D \ - $(@D)/wpa_supplicant/dbus/$(WPA_SUPPLICANT_DBUS_SERVICE).service \ - $(TARGET_DIR)/usr/share/dbus-1/system-services/$(WPA_SUPPLICANT_DBUS_SERVICE).service + $(WPA_SUPPLICANT_INSTALL_DBUS_OLD) + $(WPA_SUPPLICANT_INSTALL_DBUS_NEW) endef endif