ee47b4
%global _default_patch_fuzz 2
ee47b4
ee47b4
# https://fedoraproject.org/wiki/Packaging:Guidelines#Compiler_flags
ee47b4
%global _hardened_build 1
ee47b4
ee47b4
%global checkout 036e314
ee47b4
ee47b4
Name:               lldpad
ee47b4
Version:            1.0.1
449e93
Release:            19.git%{checkout}%{?dist}
ee47b4
Summary:            Intel LLDP Agent
ee47b4
Group:              System Environment/Daemons
ee47b4
License:            GPLv2
ee47b4
URL:                http://open-lldp.org/
ee47b4
Source0:            %{name}-%{version}.tar.gz
ee47b4
Patch1:		open-lldp-v1.0.1-1-VDP-vdp22_cmds-retrieve-vsi-paramenter-data.patch
ee47b4
Patch2:		open-lldp-v1.0.1-2-VDP-vdptool-first-version.patch
ee47b4
Patch3:		open-lldp-v1.0.1-3-VDP-vdptool-test-cases-Some-test-cases-to-test-the-n.patch
ee47b4
Patch4:		open-lldp-v1.0.1-4-VDP-Changes-to-make-the-interface-to-VDP22-in-lldpad.patch
ee47b4
Patch5:		open-lldp-v1.0.1-5-VDP-Support-for-get-tlv-in-vdptool-and-VDP22.patch
ee47b4
Patch6:		open-lldp-v1.0.1-6-VDP-Support-in-VDP22-for-correct-error-code-status-t.patch
ee47b4
Patch7:		open-lldp-v1.0.1-7-VDP-Support-for-OUI-infrastructure-in-VDP22.patch
ee47b4
Patch8:		open-lldp-v1.0.1-8-VDP-Support-for-OUI-infrastructure-in-vdptool.patch
ee47b4
Patch9:		open-lldp-v1.0.1-9-VDP-Support-for-OUI-infrastructure-in-vdp22.patch
ee47b4
Patch10:	open-lldp-v1.0.1-10-VDP-Support-for-OUI-infrastructure-in-vdp22.patch
ee47b4
Patch11:	open-lldp-v1.0.1-11-VDP-Support-for-Cisco-specific-OUI-extensions-to-VDP.patch
ee47b4
Patch12:	open-lldp-v1.0.1-12-VDP22-Fix-the-ack-timeout-handler-to-set-the-right-t.patch
ee47b4
Patch13:	open-lldp-v1.0.1-13-VDP-Changes-in-OUI-infra-for-get-tlv.patch
ee47b4
Patch14:	open-lldp-v1.0.1-14-VDP-Changes-in-Cisco-OUI-handlers-to-support-get-tlv.patch
ee47b4
Patch15:	open-lldp-v1.0.1-15-VDP-Add-vdptool-man-page-to-Makefile.patch
ee47b4
Patch16:	open-lldp-v1.0.1-16-VDP-Fixed-DBG-print-compile-errors-in-32-bit-systems.patch
ee47b4
Patch17:	open-lldp-v1.0.1-17-lldp-automake-fixes-for-dist-distcheck.patch
ee47b4
Patch18:	open-lldp-v1.0.1-18-enabled-test-tool-building-for-distcheck.patch
ee47b4
Patch19:	open-lldp-v1.0.1-19-nltest-build-error.patch
ee47b4
Patch20:	open-lldp-v1.0.1-20-lldp-automake-fix-drop-prefix-on-vdptool_LDADD.patch
ee47b4
Patch21:	open-lldp-v1.0.1-21-lldpad-Fix-DCBX-event-generation-from-lldpad.patch
ee47b4
Patch22:	open-lldp-v1.0.1-22-vdp-Fixed-the-memory-leak-for-modify-VSI-support-for.patch
ee47b4
Patch23:	open-lldp-v1.0.1-23-lldp-make-TTL-TLV-configurable.patch
ee47b4
Patch24:	open-lldp-v1.0.1-24-switch-from-sysv-to-posix-shared-memory-apis.patch
ee47b4
Patch25:	open-lldp-v1.0.1-25-l2_linux_packet-correctly-process-return-value-of-ge.patch
ee47b4
Patch26:	open-lldp-v1.0.1-26-lldpad-system-capability-incorrect-advertised-as-sta.patch
ee47b4
Patch27:	open-lldp-v1.0.1-27-fix-build-warnings.patch
c954eb
Patch28:	open-lldp-v1.0.1-28-fix-oid-display.patch
c954eb
Patch29:	open-lldp-v1.0.1-29-memleak-on-received-TLVs.patch
c954eb
Patch30:	open-lldp-v1.0.1-30-support-DSCP-selectors.patch
7fda0c
Patch31:	open-lldp-v1.0.1-31-Rebase-to-open-lldp-branch-1.1.0.patch
ee47b4
449e93
Patch32:	0001-vdp22-convert-command-parsing-to-null-term.patch
449e93
Patch33:	0002-macvtap-fix-error-condition.patch
449e93
Patch34:	0003-8021qaz-squelch-initialization-errors.patch
449e93
Patch35:	0004-8021Qaz-check-for-rx-block-validity.patch
449e93
Patch36:	0005-basman-use-return-address-when-pulling-address.patch
449e93
Patch37:	0006-agent-reset-frame-status-on-message-delete.patch
449e93
Patch38:	0007-Avoiding-null-pointer-dereference.patch
449e93
Patch39:	0008-Revert-Use-interface-index-instead-of-name-in-libcon.patch
449e93
ee47b4
BuildRequires:      automake autoconf libtool
449e93
BuildRequires:      flex
449e93
BuildRequires:      kernel-headers
449e93
BuildRequires:      libconfig-devel
ee47b4
BuildRequires:      libnl3-devel
ee47b4
BuildRequires:      readline-devel
ee47b4
BuildRequires:      systemd
ee47b4
Requires:           readline
449e93
Requires:           libconfig
449e93
Requires:           libnl3
449e93
ee47b4
ee47b4
Requires(post):     systemd
ee47b4
Requires(preun):    systemd
ee47b4
Requires(postun):   systemd
ee47b4
ee47b4
%description
ee47b4
This package contains the Linux user space daemon and configuration tool for
ee47b4
Intel LLDP Agent with Enhanced Ethernet support for the Data Center.
ee47b4
ee47b4
%package            devel
ee47b4
Summary:            Development files for %{name}
ee47b4
Group:              Development/Libraries
ee47b4
Requires:           %{name}%{?_isa} = %{version}-%{release}
ee47b4
Provides:           dcbd-devel = %{version}-%{release}
ee47b4
Obsoletes:          dcbd-devel < 0.9.26
ee47b4
ee47b4
%description devel
ee47b4
The %{name}-devel package contains header files for developing applications
ee47b4
that use %{name}.
ee47b4
ee47b4
%prep
ee47b4
%autosetup -p1
ee47b4
ee47b4
%build
ee47b4
./bootstrap.sh
ee47b4
CFLAGS=${CFLAGS:-%optflags -Wno-error}; export CFLAGS;
ee47b4
%configure --disable-static
ee47b4
# fix the hardened build flags
ee47b4
sed -i -e 's! \\\$compiler_flags !&\\\$CFLAGS \\\$LDFLAGS !' libtool
ee47b4
make %{?_smp_mflags}
ee47b4
ee47b4
%install
ee47b4
make install DESTDIR=%{buildroot}
ee47b4
mkdir -p %{buildroot}%{_sharedstatedir}/%{name}
ee47b4
rm -f %{buildroot}%{_libdir}/liblldp_clif.la
ee47b4
ee47b4
%post
ee47b4
/sbin/ldconfig
ee47b4
%systemd_post %{name}.service %{name}.socket
ee47b4
ee47b4
%preun
ee47b4
%systemd_preun %{name}.service %{name}.socket
ee47b4
ee47b4
%postun
ee47b4
/sbin/ldconfig
ee47b4
%systemd_postun_with_restart %{name}.service %{name}.socket
ee47b4
ee47b4
%files
ee47b4
%doc COPYING README ChangeLog
ee47b4
%{_sbindir}/*
ee47b4
%{_libdir}/liblldp_clif.so.*
ee47b4
%dir %{_sharedstatedir}/%{name}
ee47b4
%{_unitdir}/%{name}.service
ee47b4
%{_unitdir}/%{name}.socket
ee47b4
%{_sysconfdir}/bash_completion.d/*
ee47b4
%{_mandir}/man3/*
ee47b4
%{_mandir}/man8/*
ee47b4
ee47b4
%files devel
ee47b4
%{_includedir}/*
ee47b4
%{_libdir}/pkgconfig/*.pc
ee47b4
%{_libdir}/liblldp_clif.so
ee47b4
ee47b4
%changelog
449e93
* Fri Aug 26 2022 Aaron Conole <aconole@redhat.com> - 1.0.1-19.git036e314
449e93
- Update changelog (#1997064)
449e93
449e93
* Fri Aug 26 2022 Aaron Conole <aconole@redhat.com> - 1.0.1-18.git036e314
449e93
- Fix dependency specification (#1997064)
449e93
449e93
* Tue Jun 21 2022 Aaron Conole <aconole@redhat.com> - 1.0.1-17.git036e314
449e93
- Update to the latest branch-1.1, which includes config file fixes (#1997064)
449e93
7fda0c
* Wed Aug 04 2021 Aaron Conole <aconole@redhat.com> - 1.0.1-16.git036e314
7fda0c
- Update the changelog
7fda0c
7fda0c
* Wed Aug 04 2021 Aaron Conole <aconole@redhat.com> - 1.0.1-15.git036e314
7fda0c
- Fix the branch compatibility
7fda0c
7fda0c
* Wed Jun 09 2021 Aaron Conole <aconole@redhat.com> - 1.0.1-14.git036e314
7fda0c
- Update to branch-1.1 compatibility
7fda0c
- Fixes to avoid assert in the agent state machine
7fda0c
- Remove the memory constraint on the event socket buffer (#1554110)
7fda0c
c954eb
* Tue Aug 13 2019 Aaron Conole <aconole@redhat.com> - 1.0.1-13.git036e314
c954eb
- After gating yml updates
c954eb
c954eb
* Fri Jul 05 2019 Aaron Conole <aconole@redhat.com> - 1.0.1-12.git036e314
c954eb
- Add support for DSCP selectors in APP TLVs (#1704660)
c954eb
c954eb
* Fri Jul 05 2019 Aaron Conole <aconole@redhat.com> - 1.0.1-11.git036e314
c954eb
- Fix memleak on TLV reception (#1727326)
c954eb
c954eb
* Fri Jul 05 2019 Aaron Conole <aconole@redhat.com> - 1.0.1-10.git036e314
c954eb
- Fix the OID display (#1614933)
c954eb
ee47b4
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-9.git036e314
ee47b4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
ee47b4
ee47b4
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-8.git036e314
ee47b4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
ee47b4
ee47b4
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-7.git036e314
ee47b4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
ee47b4
ee47b4
* Sun Feb 12 2017 Chris Leech <cleech@redhat.com> - 1.0.1-6.git036e314
ee47b4
- disable -Werror from upstream to rebuild with newer compiler warnings
ee47b4
ee47b4
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-5.git036e314
ee47b4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
ee47b4
ee47b4
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-4.git036e314
ee47b4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
ee47b4
ee47b4
* Mon Feb 01 2016 Chris Leech <cleech@redhat.com> - 1.0.1-3.git986eb2e
ee47b4
- 1303439 package should not attempt to own /etc/bash_completion.d
ee47b4
- fix more build warning in rawhide
ee47b4
ee47b4
* Tue Nov 03 2015 Chris Leech <cleech@redhat.com> - 1.0.1-2.git986eb2e
ee47b4
- convert from sysv shm to posix, to allow selinux restorecon 
ee47b4
ee47b4
* Wed Jun 17 2015 Chris Leech <cleech@redhat.com> - 1.0.1-1.git986eb2e
ee47b4
- rebased to upstream v1.0.1-23-g986eb2e
ee47b4
ee47b4
* Thu Oct 23 2014 Chris Leech <cleech@redhat.com> - 0.9.46-8.git48a5f38
ee47b4
- sync to upstream v0.9.46-123-g48a5f38
ee47b4
ee47b4
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.46-7
ee47b4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
ee47b4
ee47b4
* Tue Jul 22 2014 Peter Robinson <pbrobinson@fedoraproject.org> 0.9.46-6
ee47b4
- Add upstream patch to build against libnl3
ee47b4
- Drop legacy dcbd packaging support, we've not shipped it since F-13
ee47b4
ee47b4
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.46-5
ee47b4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
ee47b4
ee47b4
* Tue Mar 11 2014 Petr Å abata <contyk@redhat.com> - 0.9.46-4
ee47b4
- Drop the explicit kernel runtime dependency
ee47b4
- Patch configure.ac to build in rawhide
ee47b4
ee47b4
* Wed Jul 31 2013 Petr Å abata <contyk@redhat.com> - 0.9.46-3
ee47b4
- Require 'systemd' instead of 'systemd-units'
ee47b4
ee47b4
* Tue Jul 02 2013 Petr Å abata <contyk@redhat.com> - 0.9.46-2
ee47b4
- Fix the hardened build flags
ee47b4
ee47b4
* Tue Jun 04 2013 Petr Å abata <contyk@redhat.com> - 0.9.46-1
ee47b4
- 0.9.46 bump
ee47b4
- 802.1Qaz fixes to enable support on not CEE DCBX-enabled hardware
ee47b4
- 802.1Qbg EVB module support
ee47b4
- lldpad now supports bonded interfaces
ee47b4
ee47b4
* Tue Mar 05 2013 Petr Å abata <contyk@redhat.com> - 0.9.45-5
ee47b4
- Fix build by patching the sizeof() call in lldp_8021qaz_cmds.c
ee47b4
ee47b4
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.45-4
ee47b4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
ee47b4
ee47b4
* Tue Aug 28 2012 Petr Å abata <contyk@redhat.com> - 0.9.45-3
ee47b4
- Migrate to systemd scriptlets (#850192)
ee47b4
ee47b4
* Thu Aug 23 2012 Petr Å abata <contyk@redhat.com> - 0.9.45-2
ee47b4
- Fix displaying of the Management Address TLV (327ef662)
ee47b4
ee47b4
* Wed Aug 15 2012 Petr Å abata <contyk@redhat.com> - 0.9.45-1
ee47b4
- 0.9.45 bump
ee47b4
- Provide bash-completion and the new clif library
ee47b4
ee47b4
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.44-2
ee47b4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
ee47b4
ee47b4
* Fri Jan 27 2012 Petr Å abata <contyk@redhat.com> - 0.9.44-1
ee47b4
- 0.9.44 bump, patches cleanup
ee47b4
- Correct dependencies a bit
ee47b4
- Require dlopen()'d readline
ee47b4
ee47b4
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.43-6
ee47b4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
ee47b4
ee47b4
* Thu Oct 06 2011 Petr Sabata <contyk@redhat.com> - 0.9.43-5
ee47b4
- Do not enable lldpad by default (#701999)
ee47b4
ee47b4
* Fri Sep 23 2011 Petr Sabata <contyk@redhat.com> - 0.9.43-4
ee47b4
- Enable hardened build
ee47b4
ee47b4
* Tue Sep 13 2011 Petr Sabata <contyk@redhat.com> - 0.9.43-3
ee47b4
- Mute systemd output (#737897)
ee47b4
ee47b4
* Tue Aug 30 2011 Petr Sabata <contyk@redhat.com> - 0.9.43-2
ee47b4
- Apply various upstream 0.9.43 bugfixes
ee47b4
- Include not yet accepted Jens Osterkamp's patch to fix bug #720080
ee47b4
- Whitespace cleanup, phew
ee47b4
ee47b4
* Thu Jul 07 2011 Petr Sabata <contyk@redhat.com> - 0.9.43-1
ee47b4
- 0.9.43 bump
ee47b4
- Drop the the clean exit patch and our unit file, both are now included upstream
ee47b4
ee47b4
* Tue Jun 21 2011 Petr Sabata <contyk@redhat.com> - 0.9.42-2
ee47b4
- Introduce systemd unit file, drop SysV support
ee47b4
- Call systemctl instead of service and chkconfig
ee47b4
- Enable the service only on new installation (post)
ee47b4
- Clean exit patch
ee47b4
ee47b4
* Mon Jun 13 2011 Petr Sabata <contyk@redhat.com> - 0.9.42-1
ee47b4
- 0.9.42 bump (massive patches cleanup)
ee47b4
- Remove obsolete defattr
ee47b4
- Remove COPYING and README from devel subpackage
ee47b4
ee47b4
* Wed May  4 2011 Petr Sabata <psabata@redhat.com> - 0.9.41-3
ee47b4
- Fix the frequent, power consuming lldpad wake-ups (rhbz#701943)
ee47b4
ee47b4
* Thu Apr 21 2011 Petr Sabata <psabata@redhat.com> - 0.9.41-2
ee47b4
- Bring in upstream 802.1Qbg bugfixes
ee47b4
ee47b4
* Thu Feb 10 2011 Petr Sabata <psabata@redhat.com> - 0.9.41-1
ee47b4
- 0.9.41 bump
ee47b4
- New BR: autotools, flex
ee47b4
- Buildroot garbage removed
ee47b4
- Devel post and preun scriptlets sanitized
ee47b4
ee47b4
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.38-2
ee47b4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
ee47b4
ee47b4
* Mon Jun 28 2010 Jan Zeleny <jzeleny@redhat.com> - 0.9.38-1
ee47b4
- rebased to 0.9.38 (various enhancements and bugfixes, see 
ee47b4
  lldpad-0.9.38-relnotes.txt on http://e1000.sf.net for complete list)
ee47b4
ee47b4
* Mon May 10 2010 Jan Zeleny <jzeleny@redhat.com> - 0.9.32-2
ee47b4
- rebuild to match new libconfig
ee47b4
ee47b4
* Mon Apr 12 2010 Jan Zeleny <jzeleny@redhat.com> - 0.9.32-1
ee47b4
- rebased to 0.9.32 (various enhancements and bugfixes, see 
ee47b4
  lldpad-0.9.32-relnotes.txt on http://e1000.sf.net for complete list)
ee47b4
ee47b4
* Thu Mar 25 2010 Jan Zeleny <jzeleny@redhat.com> - 0.9.29-2
ee47b4
- added Provides and Obsoletes tags to devel subpackage
ee47b4
ee47b4
* Mon Mar 15 2010 Jan Zeleny <jzeleny@redhat.com> - 0.9.29-1
ee47b4
- updated package to 0.9.29, improved compatibility with fcoe-utils
ee47b4
ee47b4
* Fri Feb 26 2010 Jan Zeleny <jzeleny@redhat.com> - 0.9.26-2
ee47b4
- updated spec file and LSB init script patch for re-review
ee47b4
  (#568641)
ee47b4
ee47b4
* Thu Feb 25 2010 Jan Zeleny <jzeleny@redhat.com> - 0.9.26-1
ee47b4
- rebased to 0.9.26
ee47b4
- package renamed to lldpad
ee47b4
- enahanced functionality (LLDP supported as well as DCBX)
ee47b4
ee47b4
* Fri Nov 13 2009 Jan Zeleny <jzeleny@redhat.com> - 0.9.19-2
ee47b4
- init script patch adding LSB compliance
ee47b4
ee47b4
* Thu Oct 08 2009 Jan Zeleny <jzeleny@redhat.com> - 0.9.19-1
ee47b4
- update to new upstream version
ee47b4
ee47b4
* Mon Oct 05 2009 Jan Zeleny <jzeleny@redhat.com> - 0.9.15-5
ee47b4
- replaced the last patch, which was not fully functional, with
ee47b4
  the new one
ee47b4
ee47b4
* Wed Sep 09 2009 Karsten Hopp <karsten@redhat.com> 0.9.15-4
ee47b4
- buildrequire libconfig-devel >= 1.3.2, it doesn't build with 1.3.1 due to
ee47b4
  the different config_lookup_string api
ee47b4
ee47b4
* Thu Aug 20 2009 Jan Zeleny <jzeleny@redhat.com> - 0.9.15-3
ee47b4
- update of config_lookup_string() function calls
ee47b4
ee47b4
* Thu Aug 20 2009 Jan Zeleny <jzeleny@redhat.com> - 0.9.15-2
ee47b4
- rebuild in order to match new libconfig
ee47b4
ee47b4
* Mon Aug 17 2009 Jan Zeleny <jzeleny@redhat.com> - 0.9.15-1
ee47b4
- rebase to 0.9.15
ee47b4
ee47b4
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.7-5
ee47b4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
ee47b4
ee47b4
* Fri Mar 20 2009 Jan Zeleny <jzeleny@redhat.com> - 0.9.7-4
ee47b4
- updated scriptlets in spec file to follow the rules
ee47b4
ee47b4
* Wed Mar 11 2009 Jan Zeleny <jzeleny@redhat.com> - 0.9.7-3
ee47b4
- added devel files again to support fcoe-utils package
ee47b4
- added kernel >= 2.6.29 to Requires, deleted dcbnl.h, since it is
ee47b4
  aviable in kernel 2.6.29-rc7
ee47b4
- changed config dir from /etc/sysconfig/dcbd to /etc/dcbd
ee47b4
- updated init script: added mandatory Short description tag,
ee47b4
  deleted default runlevels, which should start the script
ee47b4
ee47b4
* Tue Mar 10 2009 Jan Zeleny <jzeleny@redhat.com> - 0.9.7-2
ee47b4
- added patch to enable usage of libconfig shared in system
ee47b4
- removed devel part of package
ee47b4
ee47b4
* Mon Mar 2 2009 Chris Leech <christopher.leech@intel.com> - 0.9.7-1
ee47b4
- Updated to 0.9.7
ee47b4
- Added a private copy of dcbnl.h until kernel-headers includes it.
ee47b4
  Export patch is making it's way to the upstream kernel via net-2.6,
ee47b4
  expected in 2.6.29-rc7
ee47b4
ee47b4
* Thu Feb 26 2009 Chris Leech <christopher.leech@intel.com> - 0.9.5-1
ee47b4
- initial RPM packaging