From 020e1e071547f1acc368676e7f805892159c84cd Mon Sep 17 00:00:00 2001 From: Jonathan McDowell Date: Wed, 9 Feb 2022 19:37:15 +0000 Subject: [PATCH] Add initial Debian packaging Basic packaging for Debian, including a systemd unit file. --- debian/changelog | 5 +++++ debian/control | 22 ++++++++++++++++++++++ debian/copyright | 26 ++++++++++++++++++++++++++ debian/mqtt-arp.service | 20 ++++++++++++++++++++ debian/rules | 4 ++++ 5 files changed, 77 insertions(+) create mode 100644 debian/changelog create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/mqtt-arp.service create mode 100755 debian/rules diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..bd7e6bc --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +mqtt-arp (1) bullseye; urgency=low + + * Initial packaging + + -- Jonathan McDowell Wed, 09 Feb 2022 19:35:32 +0000 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..4f9d461 --- /dev/null +++ b/debian/control @@ -0,0 +1,22 @@ +Source: mqtt-arp +Section: net +Priority: optional +Maintainer: Jonathan McDowell +Build-Depends: debhelper-compat (= 13), + libmosquitto-dev +Standards-Version: 4.5.1 +Homepage: https://github.com/u1f35c/mqtt-arp +Rules-Requires-Root: no + +Package: mqtt-arp +Architecture: any +Multi-Arch: foreign +Depends: ${misc:Depends}, ${shlibs:Depends} +Description: Simple tool to watch for ARP presence and report using MQTT + mqtt-arp is an imaginatively named program that uses the Linux kernel netlink + interface to watch for details of hosts making ARP requests. It uses these + requests to determine if a device is present and report that information via + MQTT. + . + It can, for example, be used with Home Assistant to provide details of + detected wifi devices for use with presence decisions. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..480378f --- /dev/null +++ b/debian/copyright @@ -0,0 +1,26 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: mqtt-arp +Upstream-Contact: Jonathan McDowell +License: GPL-3+ + +License: GPL-3+ + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + . + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License + along with this program. If not, see . + . + On Debian systems, the full text of the GNU General Public + License version 3 can be found in the file + `/usr/share/common-licenses/GPL-3'. diff --git a/debian/mqtt-arp.service b/debian/mqtt-arp.service new file mode 100644 index 0000000..0040140 --- /dev/null +++ b/debian/mqtt-arp.service @@ -0,0 +1,20 @@ +[Unit] +Description=MQTT ARP watcher +After=network.target + +[Service] +Type=simple +ExecStart=/usr/sbin/mqtt-arp +Restart=on-failure +PrivateTmp=true +ProtectSystem=full +NoNewPrivileges=true +PrivateDevices=true +MemoryDenyWriteExecute=true +ProtectKernelModules=true +ProtectControlGroups=true +RestrictRealtime=true +RestrictNamespaces=true + +[Install] +WantedBy=multi-user.target diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..2d33f6a --- /dev/null +++ b/debian/rules @@ -0,0 +1,4 @@ +#!/usr/bin/make -f + +%: + dh $@ -- 2.39.2