Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 1 | SUMMARY = "Client for Wi-Fi Protected Access (WPA)" |
| 2 | HOMEPAGE = "http://w1.fi/wpa_supplicant/" |
Andrew Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 3 | DESCRIPTION = "wpa_supplicant is a WPA Supplicant for Linux, BSD, Mac OS X, and Windows with support for WPA and WPA2 (IEEE 802.11i / RSN). Supplicant is the IEEE 802.1X/WPA component that is used in the client stations. It implements key negotiation with a WPA Authenticator and it controls the roaming and IEEE 802.11 authentication/association of the wlan driver." |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 4 | BUGTRACKER = "http://w1.fi/security/" |
| 5 | SECTION = "network" |
Brad Bishop | f3f93bb | 2019-10-16 14:33:32 -0400 | [diff] [blame] | 6 | LICENSE = "BSD-3-Clause" |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 7 | LIC_FILES_CHKSUM = "file://COPYING;md5=279b4f5abb9c153c285221855ddb78cc \ |
| 8 | file://README;beginline=1;endline=56;md5=e7d3dbb01f75f0b9799e192731d1e1ff \ |
| 9 | file://wpa_supplicant/wpa_supplicant.c;beginline=1;endline=12;md5=0a8b56d3543498b742b9c0e94cc2d18b" |
| 10 | DEPENDS = "dbus libnl" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 11 | RRECOMMENDS:${PN} = "wpa-supplicant-passphrase wpa-supplicant-cli" |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 12 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 13 | PACKAGECONFIG ??= "openssl" |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 14 | PACKAGECONFIG[gnutls] = ",,gnutls libgcrypt" |
| 15 | PACKAGECONFIG[openssl] = ",,openssl" |
| 16 | |
| 17 | inherit pkgconfig systemd |
| 18 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 19 | SYSTEMD_SERVICE:${PN} = "wpa_supplicant.service" |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 20 | SYSTEMD_AUTO_ENABLE = "disable" |
| 21 | |
| 22 | SRC_URI = "http://w1.fi/releases/wpa_supplicant-${PV}.tar.gz \ |
| 23 | file://defconfig \ |
| 24 | file://wpa-supplicant.sh \ |
| 25 | file://wpa_supplicant.conf \ |
| 26 | file://wpa_supplicant.conf-sane \ |
| 27 | file://99_wpa_supplicant \ |
| 28 | file://0001-replace-systemd-install-Alias-with-WantedBy.patch \ |
Andrew Geissler | 475cb72 | 2020-07-10 16:00:51 -0500 | [diff] [blame] | 29 | file://0001-AP-Silently-ignore-management-frame-from-unexpected-.patch \ |
| 30 | file://0001-WPS-UPnP-Do-not-allow-event-subscriptions-with-URLs-.patch \ |
| 31 | file://0002-WPS-UPnP-Fix-event-message-generation-using-a-long-U.patch \ |
| 32 | file://0003-WPS-UPnP-Handle-HTTP-initiation-failures-for-events-.patch \ |
Andrew Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 33 | file://CVE-2021-0326.patch \ |
Andrew Geissler | 95ac1b8 | 2021-03-31 14:34:31 -0500 | [diff] [blame] | 34 | file://CVE-2021-27803.patch \ |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 35 | file://CVE-2021-30004.patch \ |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 36 | " |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 37 | SRC_URI[md5sum] = "2d2958c782576dc9901092fbfecb4190" |
| 38 | SRC_URI[sha256sum] = "fcbdee7b4a64bea8177973299c8c824419c413ec2e3a95db63dd6a5dc3541f17" |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 39 | |
| 40 | CVE_PRODUCT = "wpa_supplicant" |
| 41 | |
| 42 | S = "${WORKDIR}/wpa_supplicant-${PV}" |
| 43 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 44 | PACKAGES:prepend = "wpa-supplicant-passphrase wpa-supplicant-cli " |
| 45 | FILES:wpa-supplicant-passphrase = "${bindir}/wpa_passphrase" |
| 46 | FILES:wpa-supplicant-cli = "${sbindir}/wpa_cli" |
| 47 | FILES:${PN} += "${datadir}/dbus-1/system-services/* ${systemd_system_unitdir}/*" |
| 48 | CONFFILES:${PN} += "${sysconfdir}/wpa_supplicant.conf" |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 49 | |
| 50 | do_configure () { |
| 51 | ${MAKE} -C wpa_supplicant clean |
| 52 | install -m 0755 ${WORKDIR}/defconfig wpa_supplicant/.config |
Andrew Geissler | 5a43b43 | 2020-06-13 10:46:56 -0500 | [diff] [blame] | 53 | |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 54 | if echo "${PACKAGECONFIG}" | grep -qw "openssl"; then |
| 55 | ssl=openssl |
| 56 | elif echo "${PACKAGECONFIG}" | grep -qw "gnutls"; then |
| 57 | ssl=gnutls |
| 58 | fi |
| 59 | if [ -n "$ssl" ]; then |
| 60 | sed -i "s/%ssl%/$ssl/" wpa_supplicant/.config |
| 61 | fi |
| 62 | |
| 63 | # For rebuild |
| 64 | rm -f wpa_supplicant/*.d wpa_supplicant/dbus/*.d |
| 65 | } |
| 66 | |
| 67 | export EXTRA_CFLAGS = "${CFLAGS}" |
| 68 | export BINDIR = "${sbindir}" |
| 69 | |
| 70 | do_compile () { |
| 71 | unset CFLAGS CPPFLAGS CXXFLAGS |
| 72 | sed -e "s:CFLAGS\ =.*:& \$(EXTRA_CFLAGS):g" -i ${S}/src/lib.rules |
| 73 | oe_runmake -C wpa_supplicant |
| 74 | } |
| 75 | |
| 76 | do_install () { |
| 77 | install -d ${D}${sbindir} |
| 78 | install -m 755 wpa_supplicant/wpa_supplicant ${D}${sbindir} |
| 79 | install -m 755 wpa_supplicant/wpa_cli ${D}${sbindir} |
| 80 | |
| 81 | install -d ${D}${bindir} |
| 82 | install -m 755 wpa_supplicant/wpa_passphrase ${D}${bindir} |
| 83 | |
| 84 | install -d ${D}${docdir}/wpa_supplicant |
| 85 | install -m 644 wpa_supplicant/README ${WORKDIR}/wpa_supplicant.conf ${D}${docdir}/wpa_supplicant |
| 86 | |
| 87 | install -d ${D}${sysconfdir} |
| 88 | install -m 600 ${WORKDIR}/wpa_supplicant.conf-sane ${D}${sysconfdir}/wpa_supplicant.conf |
| 89 | |
| 90 | install -d ${D}${sysconfdir}/network/if-pre-up.d/ |
| 91 | install -d ${D}${sysconfdir}/network/if-post-down.d/ |
| 92 | install -d ${D}${sysconfdir}/network/if-down.d/ |
| 93 | install -m 755 ${WORKDIR}/wpa-supplicant.sh ${D}${sysconfdir}/network/if-pre-up.d/wpa-supplicant |
| 94 | cd ${D}${sysconfdir}/network/ && \ |
| 95 | ln -sf ../if-pre-up.d/wpa-supplicant if-post-down.d/wpa-supplicant |
| 96 | |
| 97 | install -d ${D}/${sysconfdir}/dbus-1/system.d |
| 98 | install -m 644 ${S}/wpa_supplicant/dbus/dbus-wpa_supplicant.conf ${D}/${sysconfdir}/dbus-1/system.d |
| 99 | install -d ${D}/${datadir}/dbus-1/system-services |
| 100 | install -m 644 ${S}/wpa_supplicant/dbus/*.service ${D}/${datadir}/dbus-1/system-services |
| 101 | |
| 102 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame^] | 103 | install -d ${D}/${systemd_system_unitdir} |
| 104 | install -m 644 ${S}/wpa_supplicant/systemd/*.service ${D}/${systemd_system_unitdir} |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 105 | fi |
| 106 | |
| 107 | install -d ${D}/etc/default/volatiles |
| 108 | install -m 0644 ${WORKDIR}/99_wpa_supplicant ${D}/etc/default/volatiles |
| 109 | } |
| 110 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 111 | pkg_postinst:wpa-supplicant () { |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 112 | # If we're offline, we don't need to do this. |
| 113 | if [ "x$D" = "x" ]; then |
| 114 | killall -q -HUP dbus-daemon || true |
| 115 | fi |
| 116 | |
| 117 | } |