summaryrefslogtreecommitdiff
path: root/aports/hostapd
diff options
context:
space:
mode:
authorPÁLI Gábor János <pali.gabor@gmail.com>2022-12-30 14:47:25 +0100
committerPÁLI Gábor János <pali.gabor@gmail.com>2022-12-30 14:47:25 +0100
commit1c1b02874e1749d61b9b1680f744bf8470147416 (patch)
tree90578f8f7b73792dd41129b71bc73b0eefd81d32 /aports/hostapd
parent1b300a88b562f707ccd1b67229bd878930c9766c (diff)
downloadfreebsd-wifibox-alpine-1c1b02874e1749d61b9b1680f744bf8470147416.zip
Move to Linux 5.15.85 + Alpine 3.17.0.
Diffstat (limited to 'aports/hostapd')
-rw-r--r--aports/hostapd/0001-hostapd-Add-the-missing-CONFIG_SAE-option-to-the-def.patch30
-rw-r--r--aports/hostapd/APKBUILD67
-rw-r--r--aports/hostapd/hostapd.confd9
-rw-r--r--aports/hostapd/hostapd.initd52
4 files changed, 91 insertions, 67 deletions
diff --git a/aports/hostapd/0001-hostapd-Add-the-missing-CONFIG_SAE-option-to-the-def.patch b/aports/hostapd/0001-hostapd-Add-the-missing-CONFIG_SAE-option-to-the-def.patch
new file mode 100644
index 0000000..97d6e04
--- /dev/null
+++ b/aports/hostapd/0001-hostapd-Add-the-missing-CONFIG_SAE-option-to-the-def.patch
@@ -0,0 +1,30 @@
+From 6ff8bda992463a8c0dc34ee18820ca56cf9cccc0 Mon Sep 17 00:00:00 2001
+From: Yegor Yefremov <yegorslists@googlemail.com>
+Date: Wed, 30 Mar 2022 10:11:16 +0200
+Subject: [PATCH] hostapd: Add the missing CONFIG_SAE option to the defconfig
+
+CONFIG_SAE was added to wpa_supplicant's defconfig but wasn't
+added to the hostapd's defconfig file.
+
+Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
+---
+ hostapd/defconfig | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/hostapd/defconfig b/hostapd/defconfig
+index 6b50b6c59..611f96ffa 100644
+--- a/hostapd/defconfig
++++ b/hostapd/defconfig
+@@ -161,6 +161,9 @@ CONFIG_IPV6=y
+ # final IEEE 802.11ax version.
+ #CONFIG_IEEE80211AX=y
+
++# Simultaneous Authentication of Equals (SAE), WPA3-Personal
++#CONFIG_SAE=y
++
+ # Remove debugging code that is printing out debug messages to stdout.
+ # This can be used to reduce the size of the hostapd considerably if debugging
+ # code is not needed.
+--
+2.30.2
+
diff --git a/aports/hostapd/APKBUILD b/aports/hostapd/APKBUILD
index 12d4224..3e767b9 100644
--- a/aports/hostapd/APKBUILD
+++ b/aports/hostapd/APKBUILD
@@ -1,18 +1,20 @@
# Maintainer: Gabor Pali <pali.gabor@gmail.com>
pkgname=hostapd
pkgver=2.10
-pkgrel=1 # base: 1
+pkgrel=2 # base: 5
pkgdesc="daemon for wireless software access points"
url="https://w1.fi/hostapd/"
arch="all"
license="BSD-3-Clause"
-makedepends="openssl1.1-compat-dev libnl3-dev linux-headers"
+makedepends="openssl-dev>3 libnl3-dev linux-headers"
subpackages=
source="https://w1.fi/releases/hostapd-$pkgver.tar.gz
$pkgname.initd
$pkgname.confd
+ 0001-hostapd-Add-the-missing-CONFIG_SAE-option-to-the-def.patch
"
options="!check" #no testsuite
+patch_args="-p2"
builddir="$srcdir"/$pkgname-$pkgver/hostapd
# secfixes:
@@ -40,46 +42,51 @@ builddir="$srcdir"/$pkgname-$pkgver/hostapd
# - CVE-2017-13088
prepare() {
- cd "$builddir"
+ default_prepare
+
sed -i -e "s:/etc/hostapd:/etc/hostapd/hostapd:g" \
hostapd.conf
# toolchain setup
- sed \
- -e '/^#CONFIG_DRIVER_NL80211=y/s/^#//' \
- -e '/^#CONFIG_RADIUS_SERVER=y/s/^#//' \
- -e '/^#CONFIG_DRIVER_WIRED=y/s/^#//' \
- -e '/^#CONFIG_DRIVER_NONE=y/s/^#//' \
- -e '/^#CONFIG_IEEE80211N=y/s/^#//' \
- -e '/^#CONFIG_IEEE80211R=y/s/^#//' \
- -e '/^#CONFIG_IEEE80211AC=y/s/^#//' \
- -e '/^#CONFIG_IEEE80211AX=y/s/^#//' \
- -e '/^#CONFIG_FULL_DYNAMIC_VLAN=y/s/^#//' \
- -e '/^#CONFIG_LIBNL32=y/s/^#//' \
- -e '/^#CONFIG_ACS=y/s/^#//' \
- -e '/^#CONFIG_WEP=y/s/^#//' \
- defconfig >> .config
- echo "CC ?= ${CC:-gcc}" >> .config
- echo "CFLAGS += -I/usr/include/libnl3" >> .config
- echo "LIBS += -L/usr/lib" >> .config
+ {
+ sed \
+ -e '/^#CONFIG_DRIVER_NL80211=y/s/^#//' \
+ -e '/^#CONFIG_RADIUS_SERVER=y/s/^#//' \
+ -e '/^#CONFIG_DRIVER_WIRED=y/s/^#//' \
+ -e '/^#CONFIG_DRIVER_NONE=y/s/^#//' \
+ -e '/^#CONFIG_IEEE80211N=y/s/^#//' \
+ -e '/^#CONFIG_IEEE80211R=y/s/^#//' \
+ -e '/^#CONFIG_IEEE80211AC=y/s/^#//' \
+ -e '/^#CONFIG_IEEE80211AX=y/s/^#//' \
+ -e '/^#CONFIG_FULL_DYNAMIC_VLAN=y/s/^#//' \
+ -e '/^#CONFIG_LIBNL32=y/s/^#//' \
+ -e '/^#CONFIG_ACS=y/s/^#//' \
+ -e '/^#CONFIG_WEP=y/s/^#//' \
+ defconfig
+
+ echo "CC ?= ${CC:-gcc}"
+ echo "CFLAGS += -I/usr/include/libnl3"
+ echo "LIBS += -L/usr/lib"
+ } >> .config
}
build() {
- cd "$builddir"
+ export CFLAGS="$CFLAGS -flto=auto"
+
make
}
package() {
- cd "$builddir"
-
- install -Dm755 hostapd "$pkgdir"/usr/sbin/hostapd \
- && install -Dm755 "$srcdir"/hostapd.initd \
- "$pkgdir"/etc/init.d/hostapd \
- && install -Dm644 "$srcdir"/hostapd.confd \
- "$pkgdir"/etc/conf.d/hostapd
+ install -Dm755 hostapd \
+ -t "$pkgdir"/usr/sbin/
+ install -Dm755 "$srcdir"/hostapd.initd \
+ "$pkgdir"/etc/init.d/hostapd
+ install -Dm644 "$srcdir"/hostapd.confd \
+ "$pkgdir"/etc/conf.d/hostapd
}
sha512sums="
243baa82d621f859d2507d8d5beb0ebda15a75548a62451dc9bca42717dcc8607adac49b354919a41d8257d16d07ac7268203a79750db0cfb34b51f80ff1ce8f hostapd-2.10.tar.gz
-b54b7c6aa17e5cb86a9b354a516eb2dbefb544df18471339c61d82776de447011a2ac290bea1e6c8beae4b6cebefafb8174683ea42fb773e9e8fe6c679f33ba3 hostapd.initd
-0882263bbd7c0b05bf51f51d66e11a23a0b8ca7da2a3b8a30166d2c5f044c0c134e6bccb1d02c9e81819ca8fb0c0fb55c7121a08fe7233ccaa73ff8ab9a238fe hostapd.confd
+adeca34c6254ac6fccd84e6f08f8c394225e1b89e2c8771b46da5c85fe3fdabc568628530c39da3ab30b72e98891b07bbdb63f74217e79d6afb9796715d822f1 hostapd.initd
+95a80f5ceafd70da3d11207e591300d0e4f03d48724147cf3572420b177d50687524b715fe2001d826020e8b28959fa8c7b8334a5cbbfeec7c82d1db9a0b333a hostapd.confd
+7cde99c431f1cf746473ae53c3009735c2a718e7038c3bc1629fc45ca85a191d799e975960da96e3cf14a56389ba06eee78453a9dd457941d6af758b730cbd05 0001-hostapd-Add-the-missing-CONFIG_SAE-option-to-the-def.patch
"
diff --git a/aports/hostapd/hostapd.confd b/aports/hostapd/hostapd.confd
index 6038115..2260629 100644
--- a/aports/hostapd/hostapd.confd
+++ b/aports/hostapd/hostapd.confd
@@ -1,5 +1,4 @@
-# Space separated list of configuration files
-CONFIGS="/etc/hostapd/hostapd.conf"
-
-# Extra options to pass to hostapd, see hostapd(8)
-OPTIONS=""
+cfgfile="/etc/hostapd/hostapd.conf"
+command_args=""
+# Uncomment to run with process supervisor.
+# supervisor="supervise-daemon"
diff --git a/aports/hostapd/hostapd.initd b/aports/hostapd/hostapd.initd
index 7813fd1..a7b6033 100644
--- a/aports/hostapd/hostapd.initd
+++ b/aports/hostapd/hostapd.initd
@@ -1,46 +1,34 @@
#!/sbin/openrc-run
-# Copyright 1999-2006 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-wireless/hostapd/files/hostapd-0.6.9-init.d,v 1.2 2009/05/17 10:18:18 gurligebis Exp $
+
+name="hostapd"
+description="User space daemon for access point and authentication servers"
extra_started_commands="reload"
+# $CONFIGS and $OPTIONS are deprecated since Alpine v3.17.
+# NOTE: cfgfile can contain more than one file path in this case.
+: ${cfgfile:=${CONFIGS:-"/etc/hostapd/hostapd.conf"}}
+
+command="/usr/sbin/hostapd"
+command_args="${command_args:-$OPTIONS} $cfgfile"
+command_background="yes"
+pidfile="/run/$RC_SVCNAME.pid"
+
+required_files="$cfgfile"
+
depend() {
need net
after firewall
use logger
}
-checkconfig() {
- local file
-
- for file in ${CONFIGS}; do
- if [ ! -r "${file}" ]; then
- eerror "hostapd configuration file (${CONFIG}) not found"
- return 1
- fi
- done
-}
-
-start() {
- checkconfig || return 1
-
- ebegin "Starting ${SVCNAME}"
- start-stop-daemon --start --exec /usr/sbin/hostapd \
- -- -B ${OPTIONS} ${CONFIGS}
- eend $?
-}
-
-stop() {
- ebegin "Stopping ${SVCNAME}"
- start-stop-daemon --stop --exec /usr/sbin/hostapd
- eend $?
-}
-
reload() {
- checkconfig || return 1
+ ebegin "Reloading $name configuration"
- ebegin "Reloading ${SVCNAME} configuration"
- kill -HUP $(pidof /usr/sbin/hostapd) > /dev/null 2>&1
+ if [ "$supervisor" ]; then
+ $supervisor "$RC_SVCNAME" --signal HUP
+ else
+ start-stop-daemon --signal HUP --pidfile "$pidfile"
+ fi
eend $?
}