Blame SPECS/openslp.spec

c34b84
Name:			openslp
c34b84
Version:		2.0.0
82a710
Release:		7%{?dist}
c34b84
Epoch:			1
c34b84
Summary:		Open implementation of Service Location Protocol V2
c34b84
c34b84
Group:			System Environment/Libraries
c34b84
License:		BSD
c34b84
URL:			http://www.openslp.org
c34b84
Source0:		http://downloads.sourceforge.net/openslp/%{name}-%{version}.tar.gz
c34b84
# Source1,2: simple man pages (slightly modified help2man output)
c34b84
Source1:		slpd.8.gz
c34b84
Source2:		slptool.1.gz
c34b84
# Source3: service file
c34b84
Source3:		slpd.service
c34b84
BuildRoot:		%(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
c34b84
c34b84
# Patch0: creates script from upstream init script that sets multicast
c34b84
#     prior to the start of the service
c34b84
Patch0:			openslp-2.0.0-multicast-set.patch
fab3ca
# Patch1: fixes buffer overflow, rhbz#1181474
fab3ca
Patch1:			openslp-2.0.0-fortify-source-buffer-overflow.patch
82a710
# Patch2: fixes heap memory corruption in slpd/slpd_process.c, which allows
82a710
#   denial of service or potentially code execution,
82a710
#   backported form upstream, CVE-2017-17833
82a710
Patch2:  openslp-2.0.0-cve-2017-17833.patch
c34b84
c34b84
BuildRequires:		bison flex openssl-devel doxygen
c34b84
BuildRequires:		automake libtool
c34b84
BuildRequires:		systemd-units
c34b84
c34b84
%description
c34b84
Service Location Protocol is an IETF standards track protocol that
c34b84
provides a framework to allow networking applications to discover the
c34b84
existence, location, and configuration of networked services in
c34b84
enterprise networks.
c34b84
c34b84
OpenSLP is an open source implementation of the SLPv2 protocol as defined
c34b84
by RFC 2608 and RFC 2614.
c34b84
c34b84
%package server
c34b84
Summary:		OpenSLP server daemon
c34b84
Group:			System Environment/Daemons
c34b84
Requires:		%{name} = %{epoch}:%{version}-%{release}
c34b84
Requires:		/bin/netstat
c34b84
Requires(preun):	chkconfig, /sbin/service
c34b84
Requires(post):		chkconfig
c34b84
Requires(postun):	/sbin/service
c34b84
c34b84
%description server
c34b84
Service Location Protocol is an IETF standards track protocol that
c34b84
provides a framework that allows networking applications to discover
c34b84
the existence, location, and configuration of networked services in
c34b84
enterprise networks.
c34b84
c34b84
This package contains the SLP server. Every system, which provides any
c34b84
services that should be used via an SLP client must run this server and
c34b84
register the service.
c34b84
c34b84
%package devel
c34b84
Summary:		OpenSLP headers and libraries
c34b84
Group:			Development/Libraries
c34b84
Requires:		%{name} = %{epoch}:%{version}-%{release}
c34b84
c34b84
%description devel
c34b84
Service Location Protocol is an IETF standards track protocol that
c34b84
provides a framework that allows networking applications to discover
c34b84
the existence, location, and configuration of networked services in
c34b84
enterprise networks.
c34b84
c34b84
This package contains header and library files to compile applications
c34b84
with SLP support. It also contains developer documentation to develop
c34b84
such applications.
c34b84
c34b84
%prep
c34b84
%setup -q
fab3ca
%patch0 -p1 -b .multicast-set
fab3ca
%patch1 -p1 -b .fortify-source-buffer-overflow
82a710
%patch2 -p1 -b .cve-2017-17833
c34b84
c34b84
c34b84
%build
c34b84
export CFLAGS="-fPIC -fno-strict-aliasing -fPIE -DPIE $RPM_OPT_FLAGS"
c34b84
export LDFLAGS="-pie -Wl,-z,now"
c34b84
%configure \
c34b84
  --prefix=%{_prefix} \
c34b84
  --libdir=%{_libdir} \
c34b84
  --sysconfdir=%{_sysconfdir} \
c34b84
  --enable-async-api \
c34b84
  --disable-rpath \
c34b84
  --enable-slpv2-security \
c34b84
  --localstatedir=/var
c34b84
make %{?_smp_mflags}
c34b84
c34b84
c34b84
%install
c34b84
rm -rf $RPM_BUILD_ROOT
c34b84
make install DESTDIR=$RPM_BUILD_ROOT
c34b84
mkdir -p ${RPM_BUILD_ROOT}/%{_sysconfdir}/slp.reg.d
c34b84
# install script that sets multicast
c34b84
mkdir -p ${RPM_BUILD_ROOT}/usr/lib/%{name}-server
c34b84
install -m 0755 etc/slpd.all_init ${RPM_BUILD_ROOT}/usr/lib/%{name}-server/slp-multicast-set.sh
c34b84
# install service file
c34b84
mkdir -p ${RPM_BUILD_ROOT}/%{_unitdir}
c34b84
install -p -m 644 %{SOURCE3} ${RPM_BUILD_ROOT}/%{_unitdir}/slpd.service
c34b84
# install man page
c34b84
mkdir -p ${RPM_BUILD_ROOT}/%{_mandir}/man8/
c34b84
mkdir -p ${RPM_BUILD_ROOT}/%{_mandir}/man1/
c34b84
cp %SOURCE1 ${RPM_BUILD_ROOT}/%{_mandir}/man8/
c34b84
cp %SOURCE2 ${RPM_BUILD_ROOT}/%{_mandir}/man1/
c34b84
rm -f  $RPM_BUILD_ROOT%{_libdir}/lib*.a
c34b84
rm -f  $RPM_BUILD_ROOT%{_libdir}/lib*.la
c34b84
c34b84
c34b84
%clean
c34b84
rm -rf $RPM_BUILD_ROOT
c34b84
c34b84
c34b84
%post -p /sbin/ldconfig
c34b84
c34b84
%postun -p /sbin/ldconfig
c34b84
c34b84
%post server
c34b84
%systemd_post slpd.service
c34b84
c34b84
%postun server
c34b84
%systemd_postun_with_restart slpd.service
c34b84
c34b84
%preun server
c34b84
%systemd_preun slpd.service
c34b84
c34b84
c34b84
%files
c34b84
%defattr(-,root,root,-)
c34b84
%doc AUTHORS COPYING ChangeLog NEWS README
c34b84
%doc doc/doc/*
c34b84
%{_libdir}/libslp.so.*
c34b84
%{_bindir}/slptool
c34b84
%config(noreplace) %{_sysconfdir}/slp.conf
c34b84
%config(noreplace) %{_sysconfdir}/slp.spi
c34b84
%{_mandir}/man1/*
c34b84
c34b84
%files server
c34b84
%defattr(-,root,root,-)
c34b84
%dir /%{_sysconfdir}/slp.reg.d/
c34b84
%dir /usr/lib/%{name}-server
c34b84
/usr/lib/%{name}-server/slp-multicast-set.sh
c34b84
%{_sbindir}/slpd
c34b84
%config(noreplace) %{_sysconfdir}/slp.reg
c34b84
%{_unitdir}/slpd.service
c34b84
%{_mandir}/man8/*
c34b84
c34b84
%files devel
c34b84
%defattr(-,root,root,-)
c34b84
%{_includedir}/slp.h
c34b84
%{_libdir}/libslp.so
c34b84
c34b84
c34b84
%changelog
82a710
* Tue Jul 03 2018 Vitezslav Crhonek <vcrhonek@redhat.com> - 1:2.0.0-7
82a710
- Fix possible heap memory corruption, CVE-2017-17833
82a710
  Resolves: #1575698
82a710
fab3ca
* Tue Jun 28 2016 Vitezslav Crhonek <vcrhonek@redhat.com> - 1:2.0.0-6
fab3ca
- Fix buffer overflow termination of slpd with -D_FORTIFY_SOURCE=2
fab3ca
  Resolves: #1181474
fab3ca
e769b9
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 1:2.0.0-5
e769b9
- Mass rebuild 2014-01-24
e769b9
e769b9
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 1:2.0.0-4
e769b9
- Mass rebuild 2013-12-27
e769b9
c34b84
* Wed Oct 16 2013 Vitezslav Crhonek <vcrhonek@redhat.com> - 1:2.0.0-3
c34b84
- Fix full relro
c34b84
  Resolves: #881226
c34b84
c34b84
* Mon Jul 15 2013 Vitezslav Crhonek <vcrhonek@redhat.com> - 1:2.0.0-2
c34b84
- Fix -devel requires
c34b84
c34b84
* Tue Jun 25 2013 Vitezslav Crhonek <vcrhonek@redhat.com> - 1:2.0.0-1
c34b84
- Update to openslp-2.0.0
c34b84
- Add systemd support
c34b84
- Require /bin/netstat
c34b84
c34b84
* Wed May 15 2013 Vitezslav Crhonek <vcrhonek@redhat.com> - 2.0-0.3.beta2
c34b84
- Add man pages for slptool and slpd
c34b84
- Add CFLAGS and LDFLAGS for full relro
c34b84
c34b84
* Thu Jul 28 2011 Vitezslav Crhonek <vcrhonek@redhat.com> - 2.0-0.2.beta2
c34b84
- Build with -fno-strict-aliasing
c34b84
c34b84
* Wed Jul 20 2011 Vitezslav Crhonek <vcrhonek@redhat.com> - 2.0-0.1.beta2
c34b84
- Fix N-V-R
c34b84
c34b84
* Wed Jul 20 2011 Vitezslav Crhonek <vcrhonek@redhat.com> - 2.0.beta2-2
c34b84
- Build
c34b84
c34b84
* Tue Jul 19 2011 Vitezslav Crhonek <vcrhonek@redhat.com> - 2.0.beta2-1
c34b84
- Initial support