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