iwd: initial release

This commit is contained in:
Juergen Daubert 2019-04-04 15:06:13 +02:00
parent cd8bace8b1
commit 6d68cd9969
5 changed files with 248 additions and 0 deletions

17
iwd/.footprint Normal file
View File

@ -0,0 +1,17 @@
drwxr-xr-x root/root etc/
drwx------ root/root etc/iwd/
drwxr-xr-x root/root etc/rc.d/
-rwxr-xr-x root/root etc/rc.d/iwd
drwxr-xr-x root/root usr/
drwxr-xr-x root/root usr/bin/
-rwxr-xr-x root/root usr/bin/iwctl
-rwxr-xr-x root/root usr/bin/iwmon
drwxr-xr-x root/root usr/sbin/
-rwxr-xr-x root/root usr/sbin/iwd
drwxr-xr-x root/root usr/share/
drwxr-xr-x root/root usr/share/dbus-1/
drwxr-xr-x root/root usr/share/dbus-1/system.d/
-rw-r--r-- root/root usr/share/dbus-1/system.d/iwd-dbus.conf
drwxr-xr-x root/root var/
drwxr-xr-x root/root var/lib/
drwx------ root/root var/lib/iwd/

7
iwd/.signature Normal file
View File

@ -0,0 +1,7 @@
untrusted comment: verify with /etc/ports/contrib.pub
RWSagIOpLGJF33oJOJGn+WCF0T/fMlgCcxwsJVywt35iOaH/3RPT6j96DELKJhPqL5kdv4oEvSIZeQC9eEhzoOwSQ/enmiYi+wo=
SHA256 (Pkgfile) = 47304d6c5b8b3498b888a9500c7e03f831e383eae60961c5be740a51eddf6788
SHA256 (.footprint) = c79639b76d59f1fb0815f15172c433a8374c82a6d2f5599cc82c9b8a301330b0
SHA256 (iwd-0.16.tar.xz) = 406f6c0bbd57647e18612026e58406f2f8e889d74dcdc8e3995866db23a81245
SHA256 (iwd) = f0eaab15666fed402e984ff12a923ce857a4985ab2e6e00c8da35fecb81c219e
SHA256 (include-config.patch) = c1094244c6018224b1437d842a1087d281f614c3fcd10be4f62c0fc5a40dcce6

31
iwd/Pkgfile Normal file
View File

@ -0,0 +1,31 @@
# Description: Wireless daemon for Linux
# URL: https://iwd.wiki.kernel.org/
# Maintainer: Juergen Daubert, jue at crux dot nu
name=iwd
version=0.16
release=1
source=(https://www.kernel.org/pub/linux/network/wireless/$name-$version.tar.xz
iwd
include-config.patch)
build() {
cd $name-$version
patch -p1 -i $SRC/include-config.patch
./configure --prefix=/usr \
--libexecdir=/usr/sbin \
--localstatedir=/var \
--sysconfdir=/etc \
--disable-systemd-service
make
make DESTDIR=$PKG install
install -d -m 0700 $PKG/var/lib/iwd
install -d -m 0700 $PKG/etc/iwd
# rc script
install -D -m 0755 $SRC/iwd $PKG/etc/rc.d/iwd
}

140
iwd/include-config.patch Normal file
View File

@ -0,0 +1,140 @@
From 23041a44dd6c3fcaa18e5cb3f63140e3cb76d6b8 Mon Sep 17 00:00:00 2001
From: Marcel Holtmann <marcel@holtmann.org>
Date: Thu, 4 Apr 2019 14:02:38 +0200
Subject: build: Add missing HAVE_CONFIG_H guards and include config.h
---
plugins/ofono.c | 4 ++++
plugins/sim_hardcoded.c | 5 +++++
src/eap-mschapv2.c | 4 ++++
src/nl80211util.c | 4 ++++
src/plugin.c | 4 ++++
src/sae.c | 4 ++++
src/simauth.c | 4 ++++
src/simutil.c | 4 ++++
8 files changed, 33 insertions(+)
diff --git a/plugins/ofono.c b/plugins/ofono.c
index 077045f..fc2561f 100644
--- a/plugins/ofono.c
+++ b/plugins/ofono.c
@@ -20,6 +20,10 @@
*
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <stdio.h>
#include <ctype.h>
#include <stdio.h>
diff --git a/plugins/sim_hardcoded.c b/plugins/sim_hardcoded.c
index b5ea6b0..6e87f34 100644
--- a/plugins/sim_hardcoded.c
+++ b/plugins/sim_hardcoded.c
@@ -19,6 +19,11 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <errno.h>
#include <ell/ell.h>
diff --git a/src/eap-mschapv2.c b/src/eap-mschapv2.c
index 78404e2..e1f4ab5 100644
--- a/src/eap-mschapv2.c
+++ b/src/eap-mschapv2.c
@@ -20,6 +20,10 @@
*
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <ctype.h>
#include <stdio.h>
#include <errno.h>
diff --git a/src/nl80211util.c b/src/nl80211util.c
index 0d690e8..a9c3914 100644
--- a/src/nl80211util.c
+++ b/src/nl80211util.c
@@ -20,6 +20,10 @@
*
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <linux/if_ether.h>
#include <ell/ell.h>
diff --git a/src/plugin.c b/src/plugin.c
index 2d96f65..a62fb03 100644
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -20,6 +20,10 @@
*
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <fnmatch.h>
#include <ell/ell.h>
diff --git a/src/sae.c b/src/sae.c
index 782a306..cab004b 100644
--- a/src/sae.c
+++ b/src/sae.c
@@ -20,6 +20,10 @@
*
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <ell/ell.h>
#include "src/util.h"
diff --git a/src/simauth.c b/src/simauth.c
index 5ed4dde..4244304 100644
--- a/src/simauth.c
+++ b/src/simauth.c
@@ -20,6 +20,10 @@
*
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <ctype.h>
#include <stdio.h>
#include <errno.h>
diff --git a/src/simutil.c b/src/simutil.c
index 8de0645..f0542c7 100644
--- a/src/simutil.c
+++ b/src/simutil.c
@@ -20,6 +20,10 @@
*
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <ctype.h>
#include <stdio.h>
#include <errno.h>
--
cgit 1.2-0.3.lf.el7

53
iwd/iwd Executable file
View File

@ -0,0 +1,53 @@
#!/bin/sh
#
# /etc/rc.d/iwd: start/stop wireless interface
#
SSD=/sbin/start-stop-daemon
PROG_DHCP=/sbin/dhcpcd
PROG_WIFI=/usr/sbin/iwd
PID_DHCP=/var/run/dhcpcd.pid
PID_WIFI=/var/run/iwd.pid
OPTS_DHCP=""
OPTS_WIFI=""
print_status() {
$SSD --status --pidfile $2
case $? in
0) echo "$1 is running with pid $(cat $2)" ;;
1) echo "$1 is not running but the pid file $2 exists" ;;
3) echo "$1 is not running" ;;
4) echo "Unable to determine the program status" ;;
esac
}
case $1 in
start)
$SSD --start -bmC --pidfile $PID_WIFI --exec $PROG_WIFI -- $OPTS_WIFI && \
$SSD --start --pidfile $PID_DHCP --exec $PROG_DHCP -- $OPTS_DHCP
RETVAL=$?
;;
stop)
( $SSD --stop --retry 10 --pidfile $PID_DHCP
$SSD --stop --remove-pidfile --retry 10 --pidfile $PID_WIFI )
RETVAL=$?
;;
restart)
$0 stop
$0 start
;;
status)
print_status $PROG_WIFI $PID_WIFI
print_status $PROG_DHCP $PID_DHCP
;;
*)
echo "Usage: $0 [start|stop|restart|status]"
;;
esac
exit $RETVAL
# End of file