- Update to version 1.0.18
Changes:
* Remove support for building 802.3bt TLVs (broken).
Fixes:
* Fix memory leaks in EDP/FDP decoding when receiving some TLVs
twice.
* Do not set interface description continuously.
* Use a different Netlink socket for changes and queries.
OBS-URL: https://build.opensuse.org/request/show/1142088
OBS-URL: https://build.opensuse.org/package/show/network:utilities/lldpd?expand=0&rev=55
183 lines
5.6 KiB
RPMSpec
183 lines
5.6 KiB
RPMSpec
#
|
|
# spec file for package lldpd
|
|
#
|
|
# Copyright (c) 2024 SUSE LLC
|
|
#
|
|
# 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 lldpd_user lldpd
|
|
%define lldpd_group lldpd
|
|
%define lldpd_chroot %{_localstatedir}/run/lldpd
|
|
%define sover 4
|
|
%define libname liblldpctl%{sover}
|
|
#Compat macro for new _fillupdir macro introduced in Nov 2017
|
|
%if ! %{defined _fillupdir}
|
|
%define _fillupdir %{_localstatedir}/adm/fillup-templates
|
|
%endif
|
|
Name: lldpd
|
|
Version: 1.0.18
|
|
Release: 0
|
|
Summary: Implementation of IEEE 802.1ab (LLDP)
|
|
# We have some GPL linux headers in include/linux, they are used on
|
|
# platforms where glibc headers are not recent enough
|
|
License: GPL-2.0-or-later AND ISC
|
|
Group: System/Daemons
|
|
URL: https://vincentbernat.github.io/
|
|
Source0: https://media.luffy.cx/files/lldpd/%{name}-%{version}.tar.gz
|
|
Source1: lldpd.sysconfig
|
|
Source2: https://media.luffy.cx/files/lldpd/%{name}-%{version}.tar.gz.gpg#/%{name}-%{version}.tar.gz.asc
|
|
Source3: http://keyserver.ubuntu.com:11371/pks/lookup?op=get&search=0x95A42FE8353525F9#/%{name}.keyring
|
|
Patch0: harden_lldpd.service.patch
|
|
BuildRequires: net-snmp-devel
|
|
BuildRequires: openssl-devel
|
|
BuildRequires: pkgconfig
|
|
BuildRequires: readline-devel
|
|
BuildRequires: systemd-rpm-macros
|
|
BuildRequires: pkgconfig(libbsd)
|
|
BuildRequires: pkgconfig(libevent)
|
|
BuildRequires: pkgconfig(libxml-2.0)
|
|
Requires(pre): %fillup_prereq
|
|
Requires(pre): pwdutils
|
|
|
|
%description
|
|
This implementation provides LLDP sending and reception, supports VLAN
|
|
and includes an SNMP subagent that can interface to an SNMP agent
|
|
through AgentX protocol.
|
|
|
|
LLDP is an industry standard protocol designed to supplant proprietary
|
|
Link-Layer protocols such as Extreme EDP (Extreme Discovery Protocol)
|
|
and CDP (Cisco Discovery Protocol). The goal of LLDP is to provide an
|
|
inter-vendor compatible mechanism to deliver Link-Layer notifications
|
|
to adjacent network devices.
|
|
|
|
This daemon is also able to deal with CDP, FDP, SONMP and EDP
|
|
protocol. It also handles LLDP-MED extension.
|
|
|
|
%package -n %{libname}
|
|
Summary: Implementation of IEEE 802.1ab
|
|
License: MIT
|
|
Group: System/Libraries
|
|
|
|
%description -n %{libname}
|
|
This package provides the shared library for lldpd.
|
|
|
|
LLDP is an industry standard protocol designed to supplant proprietary
|
|
Link-Layer protocols such as Extreme EDP (Extreme Discovery Protocol)
|
|
and CDP (Cisco Discovery Protocol). The goal of LLDP is to provide an
|
|
inter-vendor compatible mechanism to deliver Link-Layer notifications
|
|
to adjacent network devices.
|
|
|
|
%package devel
|
|
Summary: Headers for the lldpd implementation
|
|
License: MIT
|
|
Group: Development/Languages/C and C++
|
|
Requires: %{libname} = %{version}-%{release}
|
|
|
|
%description devel
|
|
This package is required to develop alternate clients for lldpd.
|
|
|
|
LLDP is an industry standard protocol designed to supplant proprietary
|
|
Link-Layer protocols such as Extreme EDP (Extreme Discovery Protocol)
|
|
and CDP (Cisco Discovery Protocol). The goal of LLDP is to provide an
|
|
inter-vendor compatible mechanism to deliver Link-Layer notifications
|
|
to adjacent network devices.
|
|
|
|
%prep
|
|
%autosetup -p1
|
|
|
|
%build
|
|
%configure \
|
|
--with-snmp \
|
|
--with-xml \
|
|
--with-libbsd \
|
|
--enable-cdp \
|
|
--enable-edp \
|
|
--enable-sonmp \
|
|
--enable-fdp \
|
|
--enable-lldpmed \
|
|
--enable-dot1 \
|
|
--enable-dot3 \
|
|
--enable-custom \
|
|
--disable-oldies \
|
|
--with-privsep-user=%{lldpd_user} \
|
|
--with-privsep-group=%{lldpd_group} \
|
|
--with-privsep-chroot=%{lldpd_chroot} \
|
|
--with-systemdsystemunitdir=%{_unitdir} \
|
|
--with-sysusersdir=no \
|
|
--docdir=%{_docdir}/lldpd \
|
|
--enable-pie \
|
|
--disable-static
|
|
|
|
[ -f %{_includedir}/net-snmp/agent/struct.h ] || touch src/struct.h
|
|
%make_build
|
|
|
|
%install
|
|
%make_install
|
|
install -Dpm 0644 %{SOURCE1} %{buildroot}%{_fillupdir}/sysconfig.lldpd
|
|
install -dm0755 %{buildroot}/%{_sbindir}
|
|
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rclldpd
|
|
rm -f %{buildroot}%{_libdir}/liblldpctl.la
|
|
|
|
%pre
|
|
# Create lldpd user/group
|
|
getent group %{lldpd_group} >/dev/null || \
|
|
%{_sbindir}/groupadd -r %{lldpd_group}
|
|
getent passwd %{lldpd_user} >/dev/null || \
|
|
%{_sbindir}/useradd -g %{lldpd_group} -M -r -s /sbin/nologin \
|
|
-c "LLDP daemon" -d %{lldpd_chroot} %{lldpd_user}
|
|
|
|
%service_add_pre lldpd.service
|
|
|
|
%post -n %{libname} -p /sbin/ldconfig
|
|
%postun -n %{libname} -p /sbin/ldconfig
|
|
|
|
%post
|
|
%service_add_post lldpd.service
|
|
%fillup_only
|
|
|
|
%preun
|
|
%service_del_preun lldpd.service
|
|
|
|
%postun
|
|
%service_del_postun lldpd.service
|
|
|
|
%files
|
|
%dir %{_docdir}/lldpd
|
|
%doc %{_docdir}/lldpd/NEWS
|
|
%license %{_docdir}/lldpd/LICENSE
|
|
%doc %{_docdir}/lldpd/ChangeLog
|
|
%doc %{_docdir}/lldpd/README.md
|
|
%doc %{_docdir}/lldpd/CONTRIBUTE.md
|
|
%{_sbindir}/lldpd
|
|
%{_sbindir}/lldpctl
|
|
%{_sbindir}/lldpcli
|
|
%{_datadir}/zsh
|
|
%{_datadir}/bash-completion
|
|
%{_mandir}/man8/lldp*.8%{?ext_man}
|
|
%config %{_sysconfdir}/lldpd.d
|
|
%{_unitdir}/lldpd.service
|
|
%{_sbindir}/rclldpd
|
|
%{_fillupdir}/sysconfig.lldpd
|
|
|
|
%files -n %{libname}
|
|
%{_libdir}/liblldpctl.so.*
|
|
|
|
%files devel
|
|
%{_libdir}/liblldpctl.so
|
|
%{_libdir}/pkgconfig/lldpctl.pc
|
|
%{_includedir}/lldpctl.h
|
|
%{_includedir}/lldp-const.h
|
|
|
|
%changelog
|