File dhcpdoctor.spec of Package dhcpdoctor
#
# spec file for package dhcpdoctor
#
# Copyright (c) 2023 Martin Hauke <mardnh@gmx.de>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define pythons python3
Name:           dhcpdoctor
Version:        1.0.0
Release:        0
Summary:        Tool for testing IPv4 and IPv6 DHCP services
License:        MIT
Group:          Productivity/Networking/Diagnostic
URL:            https://github.com/ArnesSI/dhcpdoctor
Source0:        https://github.com/ArnesSI/dhcpdoctor/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires:  fdupes
BuildRequires:  python-rpm-macros
BuildRequires:  python3-pip
BuildRequires:  python3-poetry
BuildRequires:  python3-pytest
Requires:       scapy >= 2.4
BuildArch:      noarch
%description
dhcpdoctor sends DHCP requests and checks if it gets an offer from DHCP server.
It supports BOOTP+DHCP for IPv4 and DHCPv6 for IPv6.
It can operate as a DHCP client by sending requests on the local network via
broadcast/multicast or as a DHCP client and relay in one tool by unicasting
requests to the specified IP address.
Program output and exit codes are Nagios/Icinga compatible. Response time
from DHCP server is measured and returned as performance data.
%prep
%setup -q
%build
%pyproject_wheel
%check
# tests need a vagrant environment
%install
%pyproject_install
%fdupes %{buildroot}%{python3_sitelib}
%files
%license LICENSE
%doc README.md
%doc dhcpdoctor.conf
%{_bindir}/dhcpdoctor
%{python3_sitelib}/dhcpdoctor*
%changelog