From: Matthieu Baerts <matttbe@kernel.org>
This patch adds --enable-wired when building iwd.
This will then build 'ead', including a man page, a systemd service, and
D-Bus config files to be able to enable this service via D-Bus.
All these new files are now part of a new 'ead' package.
Note that no SysV init file is provided here for ead as this is no
longer mandatory, and this tool is designed for Linux only.
Similar to iwd, a postinst script is there to make sure the 'netdev'
group has been created, as it is listed in the D-Bus policy file.
Closes: https://bugs.debian.org/956457
Reported-by: Lars Beckers <lars@extmind.de>
Signed-off-by: Matthieu Baerts <matttbe@kernel.org>
---
Notes:
- v2:
- add ead.postinst file and adduser dependency, see: bug#1098212
- rewrap description to avoid unneeded short lines
- add 'ead' in iwd's recommendation list: so if people are switching
from wpasupplicant to iwd, the functional differences will be
reduced. It is always possible to avoid installing 'ead' by using
--no-install-recommends.
---
debian/control | 19 +++++++++++++++++++
debian/ead.install | 5 +++++
debian/ead.postinst | 36 ++++++++++++++++++++++++++++++++++++
debian/rules | 2 +-
4 files changed, 61 insertions(+), 1 deletion(-)
create mode 100644 debian/ead.install
create mode 100644 debian/ead.postinst
diff --git a/debian/control b/debian/control
index 5a5a8856..d430b843 100644
--- a/debian/control
+++ b/debian/control
@@ -16,6 +16,24 @@ Vcs-Git: https://salsa.debian.org/debian/iwd.git
Vcs-Browser: https://salsa.debian.org/debian/iwd
Rules-Requires-Root: no
+Package: ead
+Architecture: linux-any
+Depends:
+ ${misc:Depends},
+ ${shlibs:Depends},
+ adduser,
+Recommends:
+ dbus | dbus-system-bus,
+Description: Ethernet authentication daemon for Linux
+ Ethernet authentication daemon (ead) is a minimalistic Ethernet
+ authentication daemon that uses modern Linux interfaces like
+ cfg80211 and nl80211 (netlink).
+ The daemon provides a D-Bus API.
+ .
+ Note that the package defaults to relying on dbus activation to start.
+ If you want to use ead standalone without any manager, then you'll
+ need to manually enable the system service.
+
Package: iwd
Architecture: linux-any
Depends:
@@ -25,6 +43,7 @@ Depends:
Recommends:
dbus | dbus-system-bus,
wireless-regdb,
+ ead,
Suggests:
network-manager-iwd,
Breaks:
diff --git a/debian/ead.install b/debian/ead.install
new file mode 100644
index 00000000..7db25269
--- /dev/null
+++ b/debian/ead.install
@@ -0,0 +1,5 @@
+usr/lib/systemd/system/ead.service
+usr/libexec/ead
+usr/share/dbus-1/system-services/net.connman.ead.service
+usr/share/dbus-1/system.d/ead-dbus.conf
+usr/share/man/man*/ead.*
diff --git a/debian/ead.postinst b/debian/ead.postinst
new file mode 100644
index 00000000..f2720bf7
--- /dev/null
+++ b/debian/ead.postinst
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+set -e
+
+# This script can be called in the following ways:
+#
+# After the package was installed:
+# <postinst> configure <old-version>
+#
+#
+# If prerm fails during upgrade or fails on failed upgrade:
+# <old-postinst> abort-upgrade <new-version>
+#
+# If prerm fails during deconfiguration of a package:
+# <postinst> abort-deconfigure in-favour <new-package> <version>
+# removing <old-package> <version>
+#
+# If prerm fails during replacement due to conflict:
+# <postinst> abort-remove in-favour <new-package> <version>
+
+case "$1" in
+ configure)
+ # Create netdev group used in the D-Bus policy. No error if it exists.
+ addgroup --quiet --system netdev
+ ;;
+
+ abort-upgrade|abort-deconfigure|abort-remove)
+ ;;
+
+ *)
+ echo "$0 called with unknown argument \`$1'" 1>&2
+ exit 1
+ ;;
+esac
+
+#DEBHELPER#
diff --git a/debian/rules b/debian/rules
index d5963549..fb2a4131 100755
--- a/debian/rules
+++ b/debian/rules
@@ -12,7 +12,7 @@ TESTS = $(basename $(wildcard unit/*.c))
TESTS_FLAKY = unit/test-wsc unit/test-eap-sim unit/test-dpp
override_dh_auto_configure:
- dh_auto_configure -- --enable-external-ell
+ dh_auto_configure -- --enable-external-ell --enable-wired
override_dh_auto_test:
make -j2 check VERBOSE=1 TESTS='$(filter-out $(TESTS_FLAKY),$(TESTS))'