|
|
495eee |
%if 0%{?el6}
|
|
|
495eee |
%bcond_with systemd
|
|
|
495eee |
%global rundir /var/run/
|
|
|
495eee |
%else
|
|
|
495eee |
%bcond_without systemd
|
|
|
495eee |
%global rundir /run/
|
|
|
495eee |
%endif
|
|
|
495eee |
|
|
|
495eee |
%global gh_owner vincentbernat
|
|
|
495eee |
|
|
|
495eee |
Name: lldpd
|
|
|
495eee |
Version: 1.0.4
|
|
|
495eee |
Release: 10%{?dist}
|
|
|
495eee |
Summary: ISC-licensed implementation of LLDP
|
|
|
495eee |
|
|
|
495eee |
License: ISC
|
|
|
495eee |
URL: https://%{gh_owner}.github.io/%{name}/
|
|
|
495eee |
# Upstream https://media.luffy.cx/files/lldpd/lldpd-%{version}.tar.gz
|
|
|
495eee |
Source0: lldpd-%{version}-free.tar.gz
|
|
|
495eee |
Source1: %{name}-fedora.service
|
|
|
495eee |
Source2: %{name}-tmpfiles
|
|
|
495eee |
Source3: %{name}-fedora.sysconfig
|
|
|
495eee |
Source4: %{name}-el6.init
|
|
|
495eee |
Source5: %{name}-el7.service
|
|
|
495eee |
|
|
|
495eee |
Source100: lldpd-cleanup.sh
|
|
|
495eee |
|
|
|
495eee |
BuildRequires: gcc
|
|
|
495eee |
BuildRequires: readline-devel
|
|
|
495eee |
BuildRequires: check-devel
|
|
|
495eee |
BuildRequires: net-snmp-devel
|
|
|
495eee |
BuildRequires: libxml2-devel
|
|
|
495eee |
# EL6 needs libevent2 as the package
|
|
|
495eee |
%if 0%{?el6}
|
|
|
495eee |
BuildRequires: libevent2-devel
|
|
|
495eee |
%else
|
|
|
495eee |
BuildRequires: libevent-devel
|
|
|
495eee |
%endif
|
|
|
495eee |
|
|
|
495eee |
%if 0%{?with_systemd}
|
|
|
495eee |
# For systemd stuff
|
|
|
495eee |
BuildRequires: systemd
|
|
|
495eee |
BuildRequires: make
|
|
|
495eee |
%{?systemd_requires}
|
|
|
495eee |
%else
|
|
|
495eee |
Requires(post): chkconfig
|
|
|
495eee |
Requires(preun): chkconfig
|
|
|
495eee |
# This is for /sbin/service
|
|
|
495eee |
Requires(preun): initscripts
|
|
|
495eee |
%endif
|
|
|
495eee |
|
|
|
495eee |
Requires(pre): shadow-utils
|
|
|
495eee |
|
|
|
495eee |
%description
|
|
|
495eee |
LLDP is an industry standard protocol designed to supplant proprietary
|
|
|
495eee |
Link-Layer protocols such as EDP or CDP. The goal of LLDP is to provide
|
|
|
495eee |
an inter-vendor compatible mechanism to deliver Link-Layer notifications
|
|
|
495eee |
to adjacent network devices.
|
|
|
495eee |
|
|
|
495eee |
%package devel
|
|
|
495eee |
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
495eee |
Summary: %{summary}
|
|
|
495eee |
|
|
|
495eee |
%description devel
|
|
|
495eee |
%{name} development libraries and headers
|
|
|
495eee |
|
|
|
495eee |
%prep
|
|
|
495eee |
%autosetup
|
|
|
495eee |
|
|
|
495eee |
|
|
|
495eee |
%build
|
|
|
495eee |
%configure --disable-static --with-snmp --disable-silent-rules \
|
|
|
495eee |
--with-privsep-user=%{name} --with-privsep-group=%{name} \
|
|
|
495eee |
--with-privsep-chroot=%{rundir}%{name}/chroot \
|
|
|
495eee |
--with-lldpd-ctl-socket=%{rundir}%{name}/%{name}.socket \
|
|
|
495eee |
%if 0%{?with_systemd}
|
|
|
495eee |
--with-systemdsystemunitdir=%{_unitdir} --with-sysusersdir=no
|
|
|
495eee |
%endif
|
|
|
495eee |
|
|
|
495eee |
make %{?_smp_mflags}
|
|
|
495eee |
|
|
|
495eee |
|
|
|
495eee |
%install
|
|
|
495eee |
%make_install
|
|
|
495eee |
|
|
|
495eee |
%if 0%{?with_systemd}
|
|
|
495eee |
%if 0%{?fedora} >= 26
|
|
|
495eee |
install -p -D -m644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service
|
|
|
495eee |
%else
|
|
|
495eee |
install -p -D -m644 %{SOURCE5} %{buildroot}%{_unitdir}/%{name}.service
|
|
|
495eee |
%endif
|
|
|
495eee |
install -p -D -m644 %{SOURCE2} %{buildroot}%{_tmpfilesdir}/%{name}.conf
|
|
|
495eee |
%else
|
|
|
495eee |
install -p -D -m755 %{SOURCE4} %{buildroot}%{_initddir}/%{name}
|
|
|
495eee |
%endif
|
|
|
495eee |
install -p -D -m644 %{SOURCE3} %{buildroot}/etc/sysconfig/%{name}
|
|
|
495eee |
|
|
|
495eee |
install -d -D -m 0755 %{buildroot}%{rundir}%{name}/chroot
|
|
|
495eee |
install -d -m 0755 %{buildroot}%{_sharedstatedir}/%{name}
|
|
|
495eee |
# remove the docs from buildroot
|
|
|
495eee |
rm -rf %{buildroot}/usr/share/doc/%{name}
|
|
|
495eee |
|
|
|
495eee |
|
|
|
495eee |
# don't include completion conf yet
|
|
|
495eee |
rm -f %{buildroot}/usr/share/bash-completion/completions/lldpcli
|
|
|
495eee |
rm -f %{buildroot}/usr/share/zsh/vendor-completions/_lldpcli
|
|
|
495eee |
rm -f %{buildroot}/usr/share/zsh/site-functions/_lldpcli
|
|
|
495eee |
|
|
|
495eee |
# remove static libtool archive
|
|
|
495eee |
rm -f %{buildroot}%{_libdir}/liblldpctl.la
|
|
|
495eee |
|
|
|
495eee |
%pre
|
|
|
495eee |
getent group %{name} >/dev/null || groupadd -r %{name}
|
|
|
495eee |
getent passwd %{name} >/dev/null || \
|
|
|
495eee |
useradd -r -g %{name} -d %{_sharedstatedir}/%{name} -s /sbin/nologin \
|
|
|
495eee |
-c "Used by the %{name} daemon" %{name}
|
|
|
495eee |
exit 0
|
|
|
495eee |
|
|
|
495eee |
%post
|
|
|
495eee |
/sbin/ldconfig
|
|
|
495eee |
%if 0%{?with_systemd}
|
|
|
495eee |
%systemd_post %{name}.service
|
|
|
495eee |
%else
|
|
|
495eee |
# This adds the proper /etc/rc*.d links for the script
|
|
|
495eee |
/sbin/chkconfig --add %{name}
|
|
|
495eee |
%endif
|
|
|
495eee |
|
|
|
495eee |
%preun
|
|
|
495eee |
%if 0%{?with_systemd}
|
|
|
495eee |
%systemd_preun %{name}.service
|
|
|
495eee |
%else
|
|
|
495eee |
if [ $1 -eq 0 ] ; then
|
|
|
495eee |
/sbin/service %{name} stop >/dev/null 2>&1
|
|
|
495eee |
/sbin/chkconfig --del %{name}
|
|
|
495eee |
fi
|
|
|
495eee |
%endif
|
|
|
495eee |
|
|
|
495eee |
%postun
|
|
|
495eee |
/sbin/ldconfig
|
|
|
495eee |
%if 0%{?with_systemd}
|
|
|
495eee |
%systemd_postun_with_restart %{name}.service
|
|
|
495eee |
%else
|
|
|
495eee |
if [ "$1" -ge "1" ] ; then
|
|
|
495eee |
/sbin/service %{name} condrestart >/dev/null 2>&1 || :
|
|
|
495eee |
fi
|
|
|
495eee |
%endif
|
|
|
495eee |
|
|
|
495eee |
%files
|
|
|
495eee |
%doc NEWS README.md
|
|
|
495eee |
%license LICENSE
|
|
|
495eee |
%{_sbindir}/lldpcli
|
|
|
495eee |
%{_sbindir}/lldpctl
|
|
|
495eee |
%{_sbindir}/%{name}
|
|
|
495eee |
%config %{_sysconfdir}/%{name}.d
|
|
|
495eee |
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
|
|
|
495eee |
%{_mandir}/man8/lldpcli.8*
|
|
|
495eee |
%{_mandir}/man8/lldpctl.8*
|
|
|
495eee |
%{_mandir}/man8/%{name}.8*
|
|
|
495eee |
%{_libdir}/liblldpctl.so.4
|
|
|
495eee |
%{_libdir}/liblldpctl.so.4.8.0
|
|
|
495eee |
%dir %{rundir}%{name}
|
|
|
495eee |
%dir %{rundir}%{name}/chroot
|
|
|
495eee |
%if 0%{?with_systemd}
|
|
|
495eee |
%{_unitdir}/%{name}.service
|
|
|
495eee |
%{_tmpfilesdir}/%{name}.conf
|
|
|
495eee |
%else
|
|
|
495eee |
%{_initddir}/%{name}
|
|
|
495eee |
%endif
|
|
|
495eee |
%dir %attr(-,lldpd,lldpd) %{_sharedstatedir}/%{name}
|
|
|
495eee |
|
|
|
495eee |
%files devel
|
|
|
495eee |
%{_includedir}/lldp-const.h
|
|
|
495eee |
%{_includedir}/lldpctl.h
|
|
|
495eee |
%{_libdir}/liblldpctl.so
|
|
|
495eee |
%{_libdir}/pkgconfig/lldpctl.pc
|
|
|
495eee |
|
|
|
495eee |
|
|
|
495eee |
%changelog
|
|
|
495eee |
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1.0.4-10
|
|
|
495eee |
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
|
|
495eee |
Related: rhbz#1991688
|
|
|
495eee |
|
|
|
495eee |
* Mon Jul 12 2021 Aaron Conole <aconole@redhat.com> - 1.0.4-9
|
|
|
495eee |
- Strip ASL components (#1982259)
|
|
|
495eee |
|
|
|
495eee |
* Tue Jun 22 2021 Mohan Boddu <mboddu@redhat.com> - 1.0.4-8
|
|
|
495eee |
- Rebuilt for RHEL 9 BETA for openssl 3.0
|
|
|
495eee |
Related: rhbz#1971065
|
|
|
495eee |
|
|
|
495eee |
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1.0.4-7
|
|
|
495eee |
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
|
|
495eee |
|
|
|
495eee |
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-6
|
|
|
495eee |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
|
495eee |
|
|
|
495eee |
* Tue Sep 29 20:35:23 CEST 2020 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.0.4-5
|
|
|
495eee |
- Rebuilt for libevent 2.1.12
|
|
|
495eee |
|
|
|
495eee |
* Wed Sep 02 2020 Josef Ridky <jridky@redhat.com> - 1.0.4-4
|
|
|
495eee |
- Rebuilt for new net-snmp release
|
|
|
495eee |
|
|
|
495eee |
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-3
|
|
|
495eee |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
|
495eee |
|
|
|
495eee |
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-2
|
|
|
495eee |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
|
495eee |
|
|
|
495eee |
* Tue Aug 13 2019 James Hogarth <james.hogarth@gmail.com> - 1.0.4-1
|
|
|
495eee |
- Updated to new upstream release 1.0.4
|
|
|
495eee |
|
|
|
495eee |
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-6
|
|
|
495eee |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
|
495eee |
|
|
|
495eee |
* Sun Feb 17 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.0.1-5
|
|
|
495eee |
- Rebuild for readline 8.0
|
|
|
495eee |
|
|
|
495eee |
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-4
|
|
|
495eee |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
|
495eee |
|
|
|
495eee |
* Tue Jul 24 2018 Adam Williamson <awilliam@redhat.com> - 1.0.1-3
|
|
|
495eee |
- Rebuild for new net-snmp
|
|
|
495eee |
|
|
|
495eee |
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-2
|
|
|
495eee |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
|
495eee |
|
|
|
495eee |
* Tue Apr 17 2018 James Hogarth <james.hogarth@gmail.com> - 1.0.1-1
|
|
|
495eee |
- Update to 1.0.1
|
|
|
495eee |
|
|
|
495eee |
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.8-2
|
|
|
495eee |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
|
495eee |
|
|
|
495eee |
* Mon Aug 21 2017 James Hogarth <james.hogarth@gmail.com> - 0.9.8-1
|
|
|
495eee |
- Update to 0.9.8
|
|
|
495eee |
|
|
|
495eee |
* Fri Aug 11 2017 Igor Gnatenko <ignatenko@redhat.com> - 0.9.7-10
|
|
|
495eee |
- Rebuilt after RPM update (№ 3)
|
|
|
495eee |
|
|
|
495eee |
* Thu Aug 10 2017 Igor Gnatenko <ignatenko@redhat.com> - 0.9.7-9
|
|
|
495eee |
- Rebuilt for RPM soname bump
|
|
|
495eee |
|
|
|
495eee |
* Thu Aug 10 2017 Igor Gnatenko <ignatenko@redhat.com> - 0.9.7-8
|
|
|
495eee |
- Rebuilt for RPM soname bump
|
|
|
495eee |
|
|
|
495eee |
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.7-7
|
|
|
495eee |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
|
|
495eee |
|
|
|
495eee |
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.7-6
|
|
|
495eee |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
|
|
495eee |
|
|
|
495eee |
* Thu Apr 06 2017 James Hogarth <james.hogarth@gmail.com> - 0.9.7-5
|
|
|
495eee |
- Older fedora needs the older syntax matching EPEL7
|
|
|
495eee |
|
|
|
495eee |
* Wed Apr 05 2017 James Hogarth <james.hogarth@gmail.com> - 0.9.7-4
|
|
|
495eee |
- EPEL7 systemd needs an older syntax
|
|
|
495eee |
|
|
|
495eee |
* Wed Apr 05 2017 James Hogarth <james.hogarth@gmail.com> - 0.9.7-3
|
|
|
495eee |
- Use the official release tarball rather than the github snapshot
|
|
|
495eee |
- Add EPEL6 conditionals
|
|
|
495eee |
|
|
|
495eee |
* Wed Apr 05 2017 James Hogarth <james.hogarth@gmail.com> - 0.9.7-2
|
|
|
495eee |
- Tweaks to spec requested in review
|
|
|
495eee |
|
|
|
495eee |
* Tue Apr 04 2017 James Hogarth <james.hogarth@gmail.com> - 0.9.7-1
|
|
|
495eee |
- Initial package
|