71eee2
71eee2
Summary: Open implementation of Service Location Protocol V2
71eee2
Name:    openslp
71eee2
Version: 2.0.0
2f0cf7
Release: 20%{?dist}
71eee2
71eee2
License: BSD
71eee2
URL:     http://sourceforge.net/projects/openslp/
71eee2
Source0: http://downloads.sf.net/openslp/openslp-%{version}.tar.gz
71eee2
71eee2
# Source2,3: simple man pages (slightly modified help2man output)
71eee2
Source2: slpd.8.gz
71eee2
Source3: slptool.1.gz
71eee2
# Source3: service file
71eee2
Source4: slpd.service
71eee2
71eee2
# Patch1: creates script from upstream init script that sets multicast
71eee2
#     prior to the start of the service
71eee2
Patch1:  openslp-2.0.0-multicast-set.patch
71eee2
# Patch2: notify systemd of start-up completion
71eee2
Patch2:  openslp-2.0.0-notify-systemd-of-start-up.patch
71eee2
# Patch3: fixes posible null pointer dereference, bz#1337402, CVE-2016-4912
71eee2
Patch3:  openslp-2.0.0-null-pointer-deref.patch
71eee2
# Patch4: fixes FTBFS because of openssl-1.1
71eee2
Patch4:  openslp-2.0.0-openssl-1.1-fix.patch
71eee2
# Patch5: fixes possible overflow in SLPFoldWhiteSpace,
71eee2
#   backported from upstream, CVE-2016-7567
71eee2
Patch5:  openslp-2.0.0-cve-2016-7567.patch
71eee2
# Patch6: fixes heap memory corruption in slpd/slpd_process.c, which allows
71eee2
#   denial of service or potentially code execution,
71eee2
#   backported form upstream, CVE-2017-17833
71eee2
Patch6:  openslp-2.0.0-cve-2017-17833.patch
71eee2
71eee2
BuildRequires: automake libtool
71eee2
BuildRequires: bison
71eee2
BuildRequires: flex 
71eee2
BuildRequires: openssl-devel
71eee2
BuildRequires: systemd-units systemd-devel
71eee2
71eee2
%description
71eee2
Service Location Protocol is an IETF standards track protocol that
71eee2
provides a framework to allow networking applications to discover the
71eee2
existence, location, and configuration of networked services in
71eee2
enterprise networks.
71eee2
71eee2
OpenSLP is an open source implementation of the SLPv2 protocol as defined
71eee2
by RFC 2608 and RFC 2614.
71eee2
71eee2
%package devel
71eee2
Summary: OpenSLP headers and libraries
71eee2
Requires: %{name}%{?_isa} = %{version}-%{release}
71eee2
%description devel
71eee2
OpenSLP header files and libraries.
71eee2
71eee2
%package server
71eee2
Summary: OpenSLP server daemon
71eee2
Requires: %{name}%{?_isa} = %{version}-%{release}
71eee2
Requires(preun): chkconfig, /sbin/service
71eee2
Requires(post): chkconfig
71eee2
Requires(postun): /sbin/service
71eee2
Requires: iproute
71eee2
%description server
71eee2
OpenSLP server daemon to dynamically register services.
71eee2
71eee2
71eee2
%prep
71eee2
%setup -q
71eee2
71eee2
%patch1 -p1 -b .multicast-set
71eee2
%patch2 -p2 -b .systemd
71eee2
%patch3 -p1 -b .null-pointer-deref
71eee2
%patch4 -p1 -b .openssl-1.1-fix
71eee2
%patch5 -p1 -b .cve-2016-7567
71eee2
%patch6 -p1 -b .cve-2017-17833
71eee2
71eee2
# tarball goof (?), it wants to re-automake anyway, so let's do it right.
71eee2
#libtoolize --force
71eee2
#aclocal
71eee2
#autoconf
71eee2
#automake --add-missing
71eee2
autoreconf -f -i
71eee2
71eee2
# remove CVS leftovers...
71eee2
find . -name "CVS" | xargs rm -rf
71eee2
71eee2
71eee2
%build
71eee2
71eee2
# for x86_64
71eee2
export CFLAGS="-fPIC -fno-strict-aliasing -fPIE -DPIE $RPM_OPT_FLAGS"
71eee2
# for slpd
71eee2
export LDFLAGS="-pie -Wl,-z,now"
71eee2
71eee2
%configure \
71eee2
  --prefix=%{_prefix} \
71eee2
  --libdir=%{_libdir} \
71eee2
  --sysconfdir=%{_sysconfdir} \
71eee2
  --localstatedir=/var \
71eee2
  --disable-dependency-tracking \
71eee2
  --disable-static \
71eee2
  --enable-slpv2-security \
71eee2
  --disable-rpath \
71eee2
  --enable-async-api
71eee2
71eee2
make %{?_smp_mflags}
71eee2
71eee2
71eee2
%install
71eee2
rm -rf $RPM_BUILD_ROOT
71eee2
71eee2
make install DESTDIR=$RPM_BUILD_ROOT
71eee2
71eee2
mkdir -p ${RPM_BUILD_ROOT}/%{_sysconfdir}/slp.reg.d
71eee2
71eee2
# install script that sets multicast
71eee2
mkdir -p ${RPM_BUILD_ROOT}/usr/lib/%{name}-server
71eee2
install -m 0755 etc/slpd.all_init ${RPM_BUILD_ROOT}/usr/lib/%{name}-server/slp-multicast-set.sh
71eee2
71eee2
# install service file
71eee2
mkdir -p ${RPM_BUILD_ROOT}/%{_unitdir}
71eee2
install -p -m 644 %{SOURCE4} ${RPM_BUILD_ROOT}/%{_unitdir}/slpd.service
71eee2
71eee2
# install man page
71eee2
mkdir -p ${RPM_BUILD_ROOT}/%{_mandir}/man8/
71eee2
mkdir -p ${RPM_BUILD_ROOT}/%{_mandir}/man1/
71eee2
cp %SOURCE2 ${RPM_BUILD_ROOT}/%{_mandir}/man8/
71eee2
cp %SOURCE3 ${RPM_BUILD_ROOT}/%{_mandir}/man1/
71eee2
71eee2
# nuke unpackaged/unwanted files
71eee2
rm -rf $RPM_BUILD_ROOT/usr/doc
71eee2
rm -f  $RPM_BUILD_ROOT%{_libdir}/lib*.la
71eee2
71eee2
71eee2
%clean
71eee2
rm -rf $RPM_BUILD_ROOT
71eee2
71eee2
71eee2
%post -p /sbin/ldconfig
71eee2
71eee2
%postun -p /sbin/ldconfig
71eee2
71eee2
%post server
71eee2
%systemd_post slpd.service
71eee2
71eee2
%preun server
71eee2
%systemd_preun slpd.service
71eee2
71eee2
%postun server
71eee2
%systemd_postun_with_restart slpd.service
71eee2
71eee2
71eee2
%files
71eee2
%defattr(-,root,root)
71eee2
%doc AUTHORS COPYING FAQ NEWS README THANKS
71eee2
%config(noreplace) %{_sysconfdir}/slp.conf
265cc0
%config(noreplace) %{_sysconfdir}/slp.spi
71eee2
%{_bindir}/slptool
71eee2
%{_libdir}/libslp.so.1*
71eee2
%{_mandir}/man1/*
71eee2
71eee2
%files server
71eee2
%defattr(-,root,root)
71eee2
%doc doc/doc/html/IntroductionToSLP
71eee2
%doc doc/doc/html/UsersGuide
71eee2
%doc doc/doc/html/faq*
71eee2
%{_sbindir}/slpd
71eee2
%config(noreplace) %{_sysconfdir}/slp.reg
71eee2
%{_unitdir}/slpd.service
71eee2
%{_mandir}/man8/*
71eee2
/usr/lib/%{name}-server/slp-multicast-set.sh
71eee2
71eee2
%files devel
71eee2
%defattr(-,root,root)
71eee2
%doc doc/doc/html/ProgrammersGuide
71eee2
%doc doc/doc/rfc
71eee2
%{_includedir}/slp.h
71eee2
%{_libdir}/libslp.so
71eee2
71eee2
71eee2
%changelog
2f0cf7
* Thu Jul 21 2022 Vitezslav Crhonek <vcrhonek@redhat.com> - 2.0.0-20
2f0cf7
- Rebuild
2f0cf7
  Resolves: #2104692
2f0cf7
265cc0
* Tue Jun 15 2021 Vitezslav Crhonek <vcrhonek@redhat.com> - 2.0.0-19
265cc0
- Move slp.spi from -server to the main package
265cc0
  Resolves: #1965649
265cc0
71eee2
* Thu May 17 2018 Vitezslav Crhonek <vcrhonek@redhat.com> - 2.0.0-18
71eee2
- Fix heap memory corruption, CVE-2017-17833
71eee2
  Resolves: #1575697
71eee2
71eee2
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-17
71eee2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
71eee2
71eee2
* Wed Oct 04 2017 Vitezslav Crhonek <vcrhonek@redhat.com> - 2.0.0-16
71eee2
- Replace route with appropriate command from iproute
71eee2
  Related: #1496138
71eee2
71eee2
* Wed Oct 04 2017 Vitezslav Crhonek <vcrhonek@redhat.com> - 2.0.0-15
71eee2
- Removed dependency on net-tools
71eee2
  Resolves: #1496138
71eee2
- Removed init script, Group tag and macro from changelog in spec file
71eee2
- Slightly modified openssl-1.1 fix to be able build the package
71eee2
  with OpenSSL version lower than 1.1
71eee2
71eee2
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-14
71eee2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
71eee2
71eee2
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-13
71eee2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
71eee2
71eee2
* Tue Mar 14 2017 Vitezslav Crhonek <vcrhonek@redhat.com> - 2.0.0-12
71eee2
- Fix possible overflow in SLPFoldWhiteSpace, CVE-2016-7567
71eee2
  Resolves: #1379988
71eee2
71eee2
* Wed Feb 22 2017 Vitezslav Crhonek <vcrhonek@redhat.com> - 2.0.0-11
71eee2
- Fix FTBFS because of openssl-1.1
71eee2
  Resolves: #1424028
71eee2
71eee2
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-10
71eee2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
71eee2
71eee2
* Mon May 23 2016 Vitezslav Crhonek <vcrhonek@redhat.com> - 2.0.0-9
71eee2
- Fix null pointer dereference, CVE-2016-4912
71eee2
  Resolves: #1337402
71eee2
71eee2
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-8
71eee2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
71eee2
71eee2
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.0-7
71eee2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
71eee2
71eee2
* Wed Mar 11 2015 Adam Jackson <ajax@redhat.com> 2.0.0-6
71eee2
- Drop sysvinit script from F23+
71eee2
71eee2
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.0-5
71eee2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
71eee2
71eee2
* Mon Aug 04 2014 Vitezslav Crhonek <vcrhonek@redhat.com> - 2.0.0-4
71eee2
- Link to libsystemd.so instead of old libsystemd-daemon.so
71eee2
  Resolves: #1125103
71eee2
71eee2
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.0-3
71eee2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
71eee2
71eee2
* Mon Mar 17 2014 Vitezslav Crhonek <vcrhonek@redhat.com> - 2.0.0-2
71eee2
- Launch slpd as a 'notify' daemon with systemd, rather than forking
71eee2
  (patch by Stephen Gallagher)
71eee2
71eee2
* Tue Oct 01 2013 Vitezslav Crhonek <vcrhonek@redhat.com> - 2.0.0-1
71eee2
- Update to openslp-2.0.0
71eee2
- Fix bogus dates in %%changelog
71eee2
- Add systemd support
71eee2
- Add man pages for slptool and slpd
71eee2
- Add CFLAGS and LDFLAGS for full relro
71eee2
- Build with -fno-strict-aliasing
71eee2
71eee2
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.1-20
71eee2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
71eee2
71eee2
* Wed Jun 19 2013 Rex Dieter <rdieter@fedoraproject.org> 1.2.1-19
71eee2
- -server: Requires: +net-tools (for netstat, #975868)
71eee2
71eee2
* Wed Jan 30 2013 Rex Dieter <rdieter@fedoraproject.org> 1.2.1-18
71eee2
- update URL: tag (#905975)
71eee2
71eee2
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.1-17
71eee2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
71eee2
71eee2
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.1-16
71eee2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
71eee2
71eee2
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.1-15
71eee2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
71eee2
71eee2
* Wed Sep 16 2009 Rex Dieter <rdieter@fedoraproject.org> - 1.2.1-14
71eee2
- slpd crashes if slptool findsrvtypes is run, when message logging is on (#523609)
71eee2
71eee2
* Fri Aug 21 2009 Tomas Mraz <tmraz@redhat.com> - 1.2.1-13
71eee2
- rebuilt with new openssl
71eee2
71eee2
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.1-12
71eee2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
71eee2
71eee2
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.1-11
71eee2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
71eee2
71eee2
* Sat Jan 17 2009 Tomas Mraz <tmraz@redhat.com> - 1.2.1-10
71eee2
- rebuild with new openssl
71eee2
71eee2
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.2.1-9
71eee2
- Autorebuild for GCC 4.3
71eee2
71eee2
* Tue Dec 04 2007 Rex Dieter <rdieter[AT]fedoraproject.org> 1.2.1-8
71eee2
- respin for openssl
71eee2
71eee2
* Tue Aug 21 2007 Rex Dieter <rdieter[AT]fedoraproject.org> 1.2.1-7
71eee2
- respin (buildID)
71eee2
71eee2
* Tue Aug 29 2006 Rex Dieter <rexdieter[AT]users.sf.net> 1.2.1-6
71eee2
- fc6 respin
71eee2
71eee2
* Wed Aug 09 2006 Rex Dieter <rexdieter[AT]users.sf.net> 1.2.1-5
71eee2
- fc6 respin
71eee2
71eee2
* Wed Mar 1 2006 Rex Dieter <rexdieter[AT]users.sf.net> 
71eee2
- fc5: gcc/glibc respin
71eee2
71eee2
* Mon Dec 19 2005 Rex Dieter <rexdieter[AT]users.sf.net> 1.2.1-4
71eee2
- make %%postun safer
71eee2
71eee2
* Wed Nov 16 2005 Rex Dieter <rexdieter[AT]users.sf.net> 1.2.1-3
71eee2
- rebuild (for new openssl)
71eee2
- make %%postun safer
71eee2
71eee2
* Fri Oct 21 2005 Rex Dieter <rexdieter[AT]users.sf.net> 1.2.1-2
71eee2
- -fPIC (for x86_64)
71eee2
71eee2
* Fri Oct 21 2005 Rex Dieter <rexdieter[AT]users.sf.net> 1.2.1-1
71eee2
- 1.2.1
71eee2
- move most docs to -server
71eee2
- --enable-slpv2-security
71eee2
- --disable-dependency-tracking
71eee2
71eee2
* Sun May 22 2005 Jeremy Katz <katzj@redhat.com> - 1.2.0
71eee2
- rebuild on all arches
71eee2
71eee2
* Thu Apr  7 2005 Michael Schwendt <mschwendt[AT]users.sf.net>
71eee2
- rebuilt
71eee2
71eee2
* Mon Jul 19 2004 Rex Dieter <rexdieter at sf.net> 0:1.2.0-0.fdr.4
71eee2
- BR: flex
71eee2
71eee2
* Fri Jul 16 2004 Rex Dieter <rexdieter at sf.net> 0:1.2.0-0.fdr.3
71eee2
- BR: bison
71eee2
71eee2
* Thu Jul 15 2004 Rex Dieter <rexdieter at sf.net> 0:1.2.0-0.fdr.2
71eee2
- fix/add condrestart to init script
71eee2
71eee2
* Thu Jul 15 2004 Rex Dieter <rexdieter at sf.net> 0:1.2.0-0.fdr.1
71eee2
- 1.2.0
71eee2
- use -pie
71eee2
- don't use Requires(post,postun)
71eee2
71eee2
* Fri Oct 24 2003 Rex Dieter <rexdieter af sf.net> 0:1.0.11-0.fdr.7
71eee2
- fix for Fedora Core
71eee2
- fix description (main package does *not* include daemon and header files).
71eee2
71eee2
* Fri May 30 2003 Rex Dieter <rexdieter at sf.net> 0:1.0.11-0.fdr.6
71eee2
- -server: Requires(preun,postun): /sbin/service
71eee2
- add a few more %%doc files to base pkg.
71eee2
- initscript: add (real) 'reload' action.
71eee2
- initscript: use $prog instead of hardcoded slpd.
71eee2
71eee2
* Fri May 16 2003 Rex Dieter <rexdieter at sf.net> 0:1.0.11-0.fdr.5
71eee2
- -server: fix %%postun on uninstall
71eee2
71eee2
* Fri May 2 2003 Rex Dieter <rexdieter at sf.net> 0:1.0.11-0.fdr.4
71eee2
- *really* do %%config(noreplace) slp.conf
71eee2
71eee2
* Thu May 1 2003 Rex Dieter <rexdieter at sf.net> 0:1.0.11-0.fdr.3
71eee2
- capitalize Summary's.
71eee2
- %%config(noreplace) slp.conf
71eee2
71eee2
* Thu May 1 2003 Rex Dieter <rexdieter at sf.net> 0:1.0.11-0.fdr.2
71eee2
- docs: remove CVS files, include rfc, move ProgrammersGuide to -devel.
71eee2
- improve sub-pkg descriptions.
71eee2
- improve server %%preun,%%postun scripts: condrestart on upgrade,
71eee2
  suppress output of server shutdown,restarts.
71eee2
71eee2
* Thu May 1 2003 Rex Dieter <rexdieter at sf.net> 0:1.0.11-0.fdr.1
71eee2
- specfile cleanups for fedora packaging.
71eee2
71eee2
* Tue Apr 29 2003 Rex Dieter <rexdieter at sf.net> 0:1.0.11-0.fdr.0
71eee2
- 1.0.11 release.
71eee2
- fedorize things
71eee2
71eee2
* Mon Feb 03 2003 Rex Dieter <rexdieter at sf.net> 0:1.0.10-1.0
71eee2
- sanitize specfile
71eee2
- -devel,-server subpkgs.