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