From 1ee0e7b50309389197b321793a7b54d3665ae9d3 Mon Sep 17 00:00:00 2001 From: Javier Viguera Date: Tue, 19 Nov 2013 14:51:31 +0100 Subject: [PATCH] wpa_supplicant: convert recipe to bbappend wpa_supplicant v2.0 was not available in Danny so we needed the whole recipe, but it was updated in Dylan, so now we just need the bbappend. Signed-off-by: Javier Viguera --- .../packagegroup-dey-wireless.bb | 2 + .../wpa-supplicant/wpa-supplicant-2.0.inc | 56 -------------- .../wpa-supplicant/99_wpa_supplicant | 1 - ...pplicant.conf => wpa_supplicant.conf-sane} | 0 ...pplicant.conf => wpa_supplicant.conf-sane} | 0 ...pplicant.conf => wpa_supplicant.conf-sane} | 0 .../wpa-supplicant/wpa-supplicant.sh | 74 ------------------- .../wpa-supplicant/wpa-supplicant_2.0.bb | 6 -- .../wpa-supplicant_2.0.bbappend | 17 +++++ 9 files changed, 19 insertions(+), 137 deletions(-) delete mode 100644 meta-digi-dey/recipes-connectivity/wpa-supplicant/wpa-supplicant-2.0.inc delete mode 100644 meta-digi-dey/recipes-connectivity/wpa-supplicant/wpa-supplicant/99_wpa_supplicant rename meta-digi-dey/recipes-connectivity/wpa-supplicant/wpa-supplicant/ccardimx28js/{wpa_supplicant.conf => wpa_supplicant.conf-sane} (100%) rename meta-digi-dey/recipes-connectivity/wpa-supplicant/wpa-supplicant/ccimx51js/{wpa_supplicant.conf => wpa_supplicant.conf-sane} (100%) rename meta-digi-dey/recipes-connectivity/wpa-supplicant/wpa-supplicant/ccimx53js/{wpa_supplicant.conf => wpa_supplicant.conf-sane} (100%) delete mode 100644 meta-digi-dey/recipes-connectivity/wpa-supplicant/wpa-supplicant/wpa-supplicant.sh delete mode 100644 meta-digi-dey/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.0.bb create mode 100644 meta-digi-dey/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.0.bbappend diff --git a/meta-digi-dey/recipes-connectivity/packagegroups/packagegroup-dey-wireless.bb b/meta-digi-dey/recipes-connectivity/packagegroups/packagegroup-dey-wireless.bb index 7a117fcda..38c903698 100644 --- a/meta-digi-dey/recipes-connectivity/packagegroups/packagegroup-dey-wireless.bb +++ b/meta-digi-dey/recipes-connectivity/packagegroups/packagegroup-dey-wireless.bb @@ -18,6 +18,8 @@ RDEPENDS_${PN} = "\ crda \ wireless-tools \ wpa-supplicant \ + wpa-supplicant-cli \ + wpa-supplicant-passphrase \ ${WIRELESS_MODULE} \ " diff --git a/meta-digi-dey/recipes-connectivity/wpa-supplicant/wpa-supplicant-2.0.inc b/meta-digi-dey/recipes-connectivity/wpa-supplicant/wpa-supplicant-2.0.inc deleted file mode 100644 index 92f11001a..000000000 --- a/meta-digi-dey/recipes-connectivity/wpa-supplicant/wpa-supplicant-2.0.inc +++ /dev/null @@ -1,56 +0,0 @@ -# Copyright (C) 2013 Digi International. - -DESCRIPTION = "A Client for Wi-Fi Protected Access (WPA)." -HOMEPAGE = "http://hostap.epitest.fi/wpa_supplicant/" -BUGTRACKER = "http://hostap.epitest.fi/bugz/" -SECTION = "network" -LICENSE = "BSD" -LIC_FILES_CHKSUM = "file://../COPYING;md5=ab87f20cd7e8c0d0a6539b34d3791d0e \ - file://../README;md5=5cb758942d25f6f61fd4ac388fd446fa \ - file://wpa_supplicant.c;beginline=1;endline=12;md5=cba4fa09fa364da845ca546f21008909" - -DEPENDS = "libnl openssl" - -INC_PR = "r0" - -SRC_URI = "http://hostap.epitest.fi/releases/wpa_supplicant-${PV}.tar.gz \ - file://defconfig \ - file://wpa_supplicant.conf \ - file://wpa-supplicant.sh \ - file://99_wpa_supplicant" - -S = "${WORKDIR}/wpa_supplicant-${PV}/wpa_supplicant" - -do_configure () { - echo "CFLAGS +=\"-I${STAGING_INCDIR}/libnl3\"" >> ${WORKDIR}/defconfig - install -m 0644 ${WORKDIR}/defconfig .config -} - -export EXTRA_CFLAGS = "${CFLAGS}" -export BINDIR = "${sbindir}" - -do_compile () { - unset CFLAGS CPPFLAGS CXXFLAGS - oe_runmake -} - -do_install () { - install -d ${D}${sbindir} - install -m 0755 wpa_supplicant ${D}${sbindir} - install -m 0755 wpa_cli ${D}${sbindir} - - install -d ${D}${bindir} - install -m 0755 wpa_passphrase ${D}${bindir} - - install -d ${D}${sysconfdir} - install -m 0600 ${WORKDIR}/wpa_supplicant.conf ${D}${sysconfdir}/wpa_supplicant.conf - - install -d ${D}${sysconfdir}/network/if-pre-up.d/ - install -d ${D}${sysconfdir}/network/if-post-down.d/ - install -d ${D}${sysconfdir}/network/if-down.d/ - install -m 0755 ${WORKDIR}/wpa-supplicant.sh ${D}${sysconfdir}/network/if-pre-up.d/wpa-supplicant - cd ${D}${sysconfdir}/network/ && ln -sf ../if-pre-up.d/wpa-supplicant if-post-down.d/wpa-supplicant - - install -d ${D}/etc/default/volatiles - install -m 0644 ${WORKDIR}/99_wpa_supplicant ${D}/etc/default/volatiles -} diff --git a/meta-digi-dey/recipes-connectivity/wpa-supplicant/wpa-supplicant/99_wpa_supplicant b/meta-digi-dey/recipes-connectivity/wpa-supplicant/wpa-supplicant/99_wpa_supplicant deleted file mode 100644 index 6ff4dd882..000000000 --- a/meta-digi-dey/recipes-connectivity/wpa-supplicant/wpa-supplicant/99_wpa_supplicant +++ /dev/null @@ -1 +0,0 @@ -d root root 0700 /var/run/wpa_supplicant none diff --git a/meta-digi-dey/recipes-connectivity/wpa-supplicant/wpa-supplicant/ccardimx28js/wpa_supplicant.conf b/meta-digi-dey/recipes-connectivity/wpa-supplicant/wpa-supplicant/ccardimx28js/wpa_supplicant.conf-sane similarity index 100% rename from meta-digi-dey/recipes-connectivity/wpa-supplicant/wpa-supplicant/ccardimx28js/wpa_supplicant.conf rename to meta-digi-dey/recipes-connectivity/wpa-supplicant/wpa-supplicant/ccardimx28js/wpa_supplicant.conf-sane diff --git a/meta-digi-dey/recipes-connectivity/wpa-supplicant/wpa-supplicant/ccimx51js/wpa_supplicant.conf b/meta-digi-dey/recipes-connectivity/wpa-supplicant/wpa-supplicant/ccimx51js/wpa_supplicant.conf-sane similarity index 100% rename from meta-digi-dey/recipes-connectivity/wpa-supplicant/wpa-supplicant/ccimx51js/wpa_supplicant.conf rename to meta-digi-dey/recipes-connectivity/wpa-supplicant/wpa-supplicant/ccimx51js/wpa_supplicant.conf-sane diff --git a/meta-digi-dey/recipes-connectivity/wpa-supplicant/wpa-supplicant/ccimx53js/wpa_supplicant.conf b/meta-digi-dey/recipes-connectivity/wpa-supplicant/wpa-supplicant/ccimx53js/wpa_supplicant.conf-sane similarity index 100% rename from meta-digi-dey/recipes-connectivity/wpa-supplicant/wpa-supplicant/ccimx53js/wpa_supplicant.conf rename to meta-digi-dey/recipes-connectivity/wpa-supplicant/wpa-supplicant/ccimx53js/wpa_supplicant.conf-sane diff --git a/meta-digi-dey/recipes-connectivity/wpa-supplicant/wpa-supplicant/wpa-supplicant.sh b/meta-digi-dey/recipes-connectivity/wpa-supplicant/wpa-supplicant/wpa-supplicant.sh deleted file mode 100644 index a4ee17322..000000000 --- a/meta-digi-dey/recipes-connectivity/wpa-supplicant/wpa-supplicant/wpa-supplicant.sh +++ /dev/null @@ -1,74 +0,0 @@ -#!/bin/sh - - -WPA_SUP_BIN="/usr/sbin/wpa_supplicant" -WPA_SUP_PNAME="wpa_supplicant" -WPA_SUP_PIDFILE="/var/run/wpa_supplicant.$IFACE.pid" -WPA_SUP_OPTIONS="-B -P $WPA_SUP_PIDFILE -i $IFACE" - -VERBOSITY=0 - - -if [ -s "$IF_WPA_CONF" ]; then - WPA_SUP_CONF="-c $IF_WPA_CONF" -else - exit 0 -fi - -if [ ! -x "$WPA_SUP_BIN" ]; then - if [ "$VERBOSITY" = "1" ]; then - echo "$WPA_SUP_PNAME: binaries not executable or missing from $WPA_SUP_BIN" - fi - exit 1 -fi - -if [ "$MODE" = "start" ] ; then - # driver type of interface, defaults to wext when undefined - if [ -s "/etc/wpa_supplicant/driver.$IFACE" ]; then - IF_WPA_DRIVER=$(cat "/etc/wpa_supplicant/driver.$IFACE") - elif [ -z "$IF_WPA_DRIVER" ]; then - - if [ "$VERBOSITY" = "1" ]; then - echo "$WPA_SUP_PNAME: wpa-driver not provided, using \"wext\"" - fi - - IF_WPA_DRIVER="wext" - fi - - # if we have passed the criteria, start wpa_supplicant - if [ -n "$WPA_SUP_CONF" ]; then - if [ "$VERBOSITY" = "1" ]; then - echo "$WPA_SUP_PNAME: $WPA_SUP_BIN $WPA_SUP_OPTIONS $WPA_SUP_CONF -D $IF_WPA_DRIVER" - fi - start-stop-daemon --start --quiet \ - --name $WPA_SUP_PNAME --startas $WPA_SUP_BIN --pidfile $WPA_SUP_PIDFILE \ - -- $WPA_SUP_OPTIONS $WPA_SUP_CONF -D $IF_WPA_DRIVER - fi - - # if the interface socket exists, then wpa_supplicant was invoked successfully - if [ -S "$WPA_COMMON_CTRL_IFACE/$IFACE" ]; then - if [ "$VERBOSITY" = "1" ]; then - echo "$WPA_SUP_PNAME: ctrl_interface socket located at $WPA_COMMON_CTRL_IFACE/$IFACE" - fi - exit 0 - fi -elif [ "$MODE" = "stop" ]; then - if [ -f "$WPA_SUP_PIDFILE" ]; then - if [ "$VERBOSITY" = "1" ]; then - echo "$WPA_SUP_PNAME: terminating $WPA_SUP_PNAME daemon" - fi - - start-stop-daemon --stop --quiet \ - --name $WPA_SUP_PNAME --pidfile $WPA_SUP_PIDFILE - - if [ -S "$WPA_COMMON_CTRL_IFACE/$IFACE" ]; then - rm -f $WPA_COMMON_CTRL_IFACE/$IFACE - fi - - if [ -f "$WPA_SUP_PIDFILE" ]; then - rm -f $WPA_SUP_PIDFILE - fi - fi -fi - -exit 0 diff --git a/meta-digi-dey/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.0.bb b/meta-digi-dey/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.0.bb deleted file mode 100644 index 058d06178..000000000 --- a/meta-digi-dey/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.0.bb +++ /dev/null @@ -1,6 +0,0 @@ -require wpa-supplicant-2.0.inc - -PR = "${DISTRO}.${INC_PR}.0" - -SRC_URI[md5sum] = "3be2ebfdcced52e00eda0afe2889839d" -SRC_URI[sha256sum] = "2c115609fbb5223d51381084a5c944455a8afcda81d584173ff55ba233379e09" diff --git a/meta-digi-dey/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.0.bbappend b/meta-digi-dey/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.0.bbappend new file mode 100644 index 000000000..d9dfbed0b --- /dev/null +++ b/meta-digi-dey/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.0.bbappend @@ -0,0 +1,17 @@ +# Copyright (C) 2013 Digi International. + +PRINC := "${@int(PRINC) + 1}" +PR_append = "+${DISTRO}" + +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +# We use OPENSSL for TLS implementation +DEPENDS := "${@oe_filter_out('gnutls', DEPENDS, d)}" +DEPENDS += "openssl" + +SRC_URI += "file://defconfig" + +do_configure () { + install -m 0755 ${WORKDIR}/defconfig wpa_supplicant/.config + echo "CFLAGS +=\"-I${STAGING_INCDIR}/libnl3\"" >> wpa_supplicant/.config +}