Add mstpd 0.2.0 RPM spec for Fedora
This commit is contained in:
103
mstpd.spec
Normal file
103
mstpd.spec
Normal file
@@ -0,0 +1,103 @@
|
||||
Name: mstpd
|
||||
Summary: STP/RSTP/PVST+/MSTP Spanning Tree Protocol Daemon
|
||||
URL: https://github.com/mstpd/mstpd
|
||||
Version: 0.2.0
|
||||
Release: 1%{?dist}
|
||||
|
||||
License: GPL-2.0-or-later
|
||||
Group: System Environment/Daemons
|
||||
|
||||
Source0: https://github.com/mstpd/mstpd/archive/%{version}/%{name}-%{version}.tar.gz
|
||||
|
||||
%{?systemd_requires}
|
||||
BuildRequires: gcc
|
||||
BuildRequires: make
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: systemd-rpm-macros
|
||||
Requires: bridge-utils
|
||||
Requires: iproute
|
||||
Requires: python3
|
||||
|
||||
%description
|
||||
This package provides a user-space daemon which replaces the STP handling that
|
||||
is built into the Linux kernel Ethernet bridge and adds support for RSTP and
|
||||
PVST+.
|
||||
|
||||
This daemon also supports participating in MSTP. However, due to the way the
|
||||
Linux kernel implements its FIBs, it is not currently possible to map MSTP
|
||||
topologies onto Linux bridges. Therefore, mstpd will not actually block ports
|
||||
on Linux bridges when MSTP is used.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
./autogen.sh
|
||||
%configure --with-systemdunitdir=%{_unitdir}
|
||||
%make_build
|
||||
|
||||
%install
|
||||
%make_install
|
||||
|
||||
mkdir -p %{buildroot}%{_prefix}/lib/NetworkManager/dispatcher.d
|
||||
install -m 755 -p utils/nm-dispatcher \
|
||||
%{buildroot}%{_prefix}/lib/NetworkManager/dispatcher.d/45-mstpd
|
||||
|
||||
sed -i -e 's|/etc/network/interfaces|%{_sysconfdir}/mstpd/bridges.conf|g' \
|
||||
%{buildroot}%{_libexecdir}/mstpctl-utils/ifquery \
|
||||
%{buildroot}%{_libexecdir}/mstpctl-utils/mstp_config_bridge
|
||||
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/mstpd
|
||||
cat <<'END' > %{buildroot}%{_sysconfdir}/mstpd/bridges.conf
|
||||
# Per-bridge MSTP configuration for mstpd.
|
||||
# See `man mstpctl-utils-interfaces` for documentation on the options.
|
||||
#
|
||||
# iface br0
|
||||
# mstpctl_ports eth0 eth1
|
||||
# mstpctl_stp on
|
||||
# mstpctl_forcevers rstp
|
||||
# mstpctl_maxwait auto
|
||||
# mstpctl_hello 2
|
||||
# mstpctl_maxage 20
|
||||
# mstpctl_fdelay 15
|
||||
# mstpctl_txholdcount 6
|
||||
# mstpctl_maxhops 20
|
||||
# mstpctl_treeprio 8
|
||||
END
|
||||
|
||||
%post
|
||||
%systemd_post %{name}.service
|
||||
|
||||
%preun
|
||||
%systemd_preun %{name}.service
|
||||
|
||||
%postun
|
||||
%systemd_postun_with_restart %{name}.service
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%{_sbindir}/mstpd
|
||||
%{_sbindir}/mstpctl
|
||||
%{_sbindir}/bridge-stp
|
||||
%{_sbindir}/mstp_restart
|
||||
%config(noreplace) %{_sysconfdir}/bridge-stp.conf
|
||||
%config(noreplace) %{_sysconfdir}/mstpd/bridges.conf
|
||||
%{_sysconfdir}/bash_completion.d/mstpctl
|
||||
%{_unitdir}/mstpd.service
|
||||
%{_prefix}/lib/NetworkManager/dispatcher.d/45-mstpd
|
||||
%{_libexecdir}/mstpctl-utils/mstpctl_restart_config
|
||||
%{_libexecdir}/mstpctl-utils/mstp_config_bridge
|
||||
%{_libexecdir}/mstpctl-utils/ifquery
|
||||
%{_libexecdir}/mstpctl-utils/ifupdown.sh
|
||||
%{_libexecdir}/mstpctl-utils/mstpctl-utils-functions.sh
|
||||
%doc %{_mandir}/man8/mstpctl.8.gz
|
||||
%doc %{_mandir}/man5/mstpctl-utils-interfaces.5.gz
|
||||
%doc %{_docdir}/mstpd/README.VLANs
|
||||
%doc %{_docdir}/mstpd/README
|
||||
%license %{_docdir}/mstpd/LICENSE
|
||||
|
||||
%changelog
|
||||
* Sat Apr 25 2026 Zoran Pericic <zpericic@netst.org> - 0.2.0-1
|
||||
- Initial package
|
||||
Reference in New Issue
Block a user