b07b343
%global major                   23
b07b343
%global cppmajor                8
b07b343
b07b343
# Notes about rpmlint
b07b343
# - crypto-policy-non-compliance-gnutls-{1,2} fixed with patch
4826a50
#   libprelude-4.1.0-gnutls_priority_set_direct.patch
b07b343
b07b343
Name:           libprelude
4826a50
Version:        4.1.0
e7fb27d
Release:        2%{?dist}
b07b343
Summary:        Secure Connections between all Sensors and the Prelude Manager
b07b343
# Prelude is GPL-2.0+
b07b343
# libmissing is LGPL-2.1+
b07b343
License:        GPLv2+
b07b343
Group:          System Environment/Libraries
b07b343
URL:            https://www.prelude-siem.org/
7357bfc
Source0:        https://www.prelude-siem.org/pkg/src/%{version}/%{name}-%{version}.tar.gz
b07b343
# https://www.prelude-siem.org/issues/859
4826a50
Patch0:         libprelude-4.1.0-linking.patch
b07b343
# https://www.prelude-siem.org/issues/860
4826a50
Patch1:         libprelude-4.1.0-ruby_vendorarchdir.patch
b07b343
# https://www.prelude-siem.org/issues/862
4826a50
Patch2:         libprelude-4.1.0-gnutls_priority_set_direct.patch
b07b343
# https://www.prelude-siem.org/issues/863
4826a50
Patch3:         libprelude-4.1.0-fsf_address.patch
b07b343
# https://www.prelude-siem.org/issues/865
4826a50
Patch4:         libprelude-4.1.0-fix_timegm.patch
bb7bcec
# https://www.prelude-siem.org/issues/885
4826a50
Patch5:         libprelude-4.1.0-fix_pthread_atfork.patch
bb7bcec
# https://www.prelude-siem.org/issues/887
4826a50
Patch6:         libprelude-4.1.0-fix_prelude_tests_timer.patch
4f606d3
# https://www.prelude-siem.org/issues/911
4826a50
Patch7:         libprelude-4.1.0-fix_compatibility_gnutls_3_6.patch
4826a50
Patch8:         libprelude-4.1.0-fix_gnulib_error_with_fseeko.patch
b07b343
BuildRequires:  bison
b07b343
BuildRequires:  chrpath
b07b343
BuildRequires:  flex
b07b343
BuildRequires:  gtk-doc
7ce1b54
BuildRequires:  glib2-devel
b07b343
BuildRequires:  swig
b07b343
BuildRequires:  libgpg-error-devel
b07b343
BuildRequires:  libtool-ltdl-devel
b07b343
BuildRequires:  perl-devel
b07b343
BuildRequires:  perl-generators
b07b343
BuildRequires:  python2-devel
b07b343
BuildRequires:  python3-devel
b07b343
BuildRequires:  pkgconfig(gnutls)
b07b343
BuildRequires:  pkgconfig(lua) >= 5.2
b07b343
BuildRequires:  pkgconfig(ruby)
b07b343
BuildRequires:  pkgconfig(zlib)
b07b343
bb7bcec
%ifnarch s390 ppc64 ppc64le
b07b343
BuildRequires:  valgrind
b07b343
%endif
b07b343
b07b343
# Upstream do not use explicit version of gnulib, just checkout
4826a50
# and update files. In libprelude 4.1.0, the checkout has been done
4826a50
# on 2017-07-10
4826a50
Provides:       bundled(gnulib) = 20170710
b07b343
b07b343
%description
b07b343
Libprelude is a collection of generic functions providing communication
b07b343
between all Sensors, like IDS (Intrusion Detection System), and the Prelude
b07b343
Manager. It provides a convenient interface for sending and receiving IDMEF
b07b343
(Information and Event Message Exchange Format) alerts to Prelude Manager with
b07b343
transparent SSL, fail-over and replication support, asynchronous events and
b07b343
timer interfaces, an abstracted configuration API (hooking at the command-line,
b07b343
the configuration line, or wide configuration, available from the Manager), and
b07b343
a generic plugin API. It allows you to easily turn your favorite security
b07b343
program into a Prelude sensor.
b07b343
b07b343
%package devel
b07b343
Summary:        Libraries and headers for developing Prelude sensors
b07b343
Requires:       %{name}%{?_isa} = %{version}-%{release}
b07b343
Requires:       libtool-ltdl-devel
e7fb27d
Requires:       pkgconfig(gnutls)
b07b343
Provides:       prelude-devel = %{version}-%{release}
b07b343
b07b343
%description devel
b07b343
Libraries and headers you can use to develop Prelude sensors using the Prelude
b07b343
Library. Libprelude is a collection of generic functions providing
b07b343
communication between all Sensors, like IDS (Intrusion Detection System),
b07b343
and the Prelude Manager. It provides a convenient interface for sending and
b07b343
receiving IDMEF (Information and Event Message Exchange Format) alerts to
b07b343
Prelude Manager with transparent SSL, fail-over and replication support,
b07b343
asynchronous events and timer interfaces, an abstracted configuration API
b07b343
(hooking at the command-line, the configuration line, or wide configuration,
b07b343
available from the Manager), and a generic plugin API. It allows you to easily
b07b343
turn your favorite security program into a Prelude sensor.
b07b343
b07b343
%package -n prelude-tools
b07b343
Summary:        Command-line tools for %{name}
b07b343
Requires:       %{name}%{?_isa} = %{version}-%{release}
b07b343
b07b343
%description -n prelude-tools
b07b343
Provides a convenient interface for sending alerts to Prelude
b07b343
Manager.
b07b343
b07b343
%package -n python2-prelude
b07b343
Summary:        Python 2 bindings for prelude
b07b343
Requires:       %{name}%{?_isa} = %{version}-%{release}
b07b343
%{?python_provide:%python_provide python2-prelude}
b07b343
b07b343
%description -n python2-prelude
b07b343
Provides python 2 bindings for prelude.
b07b343
b07b343
%package -n python3-prelude
b07b343
Summary:        Python 3 bindings for prelude
b07b343
Requires:       %{name}%{?_isa} = %{version}-%{release}
b07b343
%{?python_provide:%python_provide python3-prelude}
b07b343
b07b343
%description -n python3-prelude
b07b343
Provides python 3 bindings for prelude.
b07b343
b07b343
%package -n perl-prelude
b07b343
Summary:        Perl bindings for prelude
b07b343
Requires:       %{name}%{?_isa} = %{version}-%{release}
b07b343
Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
b07b343
b07b343
%description -n perl-prelude
b07b343
Provides perl bindings for prelude.
b07b343
b07b343
%package -n ruby-prelude
b07b343
Summary:        Ruby bindings for prelude
b07b343
Requires:       %{name}%{?_isa} = %{version}-%{release}
b07b343
b07b343
%description -n ruby-prelude
b07b343
Provides ruby bindings for prelude.
b07b343
b07b343
%package -n lua-prelude
b07b343
Summary:        Lua bindings for prelude
b07b343
Requires:       %{name}%{?_isa} = %{version}-%{release}
b07b343
Requires:       lua
b07b343
b07b343
%description -n lua-prelude
b07b343
Provides Lua bindings for prelude generated by SWIG.
b07b343
b07b343
%package doc
b07b343
Summary:        Documentation for prelude
b07b343
BuildArch:      noarch
b07b343
b07b343
%description doc
b07b343
Provides documentation for prelude generated by gtk-doc.
b07b343
b07b343
%prep
b07b343
%autosetup -p1
b07b343
b07b343
%build
b07b343
%configure \
b07b343
    --without-included-ltdl \
b07b343
    --disable-static \
b07b343
    --enable-shared \
b07b343
    --with-swig \
b07b343
    --with-python2 \
b07b343
    --with-python3 \
b07b343
    --with-ruby \
b07b343
    --with-lua \
b07b343
    --with-perl-installdirs=vendor \
b07b343
    --without-included-regex \
b07b343
    --includedir=%{_includedir}/%{name} \
b07b343
    --enable-gtk-doc \
b07b343
    --with-html-dir=%{_docdir}/%{name}-devel
b07b343
sed -i -e 's! -shared ! -Wl,--as-needed\0!g' libtool
b07b343
%make_build
b07b343
b07b343
%install
b07b343
%make_install
b07b343
b07b343
chrpath -d %{buildroot}%{_libdir}/*.so.*
b07b343
b07b343
find %{buildroot} -name '*.la' -delete
b07b343
find %{buildroot} -name 'perllocal.pod' -delete
b07b343
find %{buildroot} -name '.packlist' -delete
b07b343
b07b343
%check
7357bfc
make check
b07b343
b07b343
%post -n %{name} -p /sbin/ldconfig
b07b343
%postun -n %{name} -p /sbin/ldconfig
b07b343
b07b343
%files
b07b343
%{_libdir}/%{name}.so.%{major}
b07b343
%{_libdir}/%{name}.so.%{major}.*
b07b343
%{_libdir}/%{name}cpp.so.%{cppmajor}
b07b343
%{_libdir}/%{name}cpp.so.%{cppmajor}.*
b07b343
%license COPYING LICENSE.README HACKING.README
b07b343
%doc AUTHORS README NEWS
b07b343
b07b343
%files devel
b07b343
%{_datadir}/%{name}
b07b343
%{_bindir}/%{name}-config
b07b343
%{_libdir}/%{name}.so
b07b343
%{_libdir}/%{name}cpp.so
b07b343
%{_libdir}/pkgconfig/%{name}.pc
b07b343
%{_includedir}/%{name}
b07b343
%{_datadir}/aclocal/%{name}.m4
b07b343
%{_mandir}/man1/%{name}-config.1.gz
b07b343
b07b343
%files -n prelude-tools
b07b343
# Force default attrs because libprelude force others
b07b343
%defattr(- , root, root, 755)
b07b343
%{_bindir}/prelude-adduser
b07b343
%{_bindir}/prelude-admin
b07b343
%{_mandir}/man1/prelude-admin.1.gz
b07b343
%dir %{_sysconfdir}/prelude
b07b343
%dir %{_sysconfdir}/prelude/default
b07b343
%dir %{_sysconfdir}/prelude/profile
b07b343
%config(noreplace) %{_sysconfdir}/prelude/default/client.conf
b07b343
%config(noreplace) %{_sysconfdir}/prelude/default/global.conf
b07b343
%config(noreplace) %{_sysconfdir}/prelude/default/idmef-client.conf
b07b343
%config(noreplace) %{_sysconfdir}/prelude/default/tls.conf
b07b343
%dir %{_var}/spool/prelude
b07b343
b07b343
%files -n python2-prelude
b07b343
%{python2_sitearch}/_prelude.*so
b07b343
%{python2_sitearch}/prelude-%{version}-py?.?.egg-info
b07b343
%{python2_sitearch}/prelude.{py,pyc,pyo}
b07b343
b07b343
%files -n python3-prelude
b07b343
%{python3_sitearch}/_prelude.*so
b07b343
%{python3_sitearch}/__pycache__/prelude.cpython-??.*pyc
b07b343
%{python3_sitearch}/prelude-%{version}-py?.?.egg-info
b07b343
%{python3_sitearch}/prelude.py
b07b343
b07b343
%files -n perl-prelude
b07b343
%{perl_vendorarch}/Prelude.pm
b07b343
%dir %{perl_vendorarch}/auto/Prelude
b07b343
# Force attrs because libprelude set it to 555
b07b343
%attr(755, root, root) %{perl_vendorarch}/auto/Prelude/Prelude.so
b07b343
b07b343
%files -n ruby-prelude
b07b343
%{ruby_vendorarchdir}/Prelude.so
b07b343
b07b343
%files -n lua-prelude
b07b343
%{_libdir}/lua/*/prelude.so
b07b343
b07b343
%files doc
b07b343
%{_docdir}/%{name}-devel
b07b343
%license COPYING LICENSE.README HACKING.README
b07b343
%doc AUTHORS ChangeLog README NEWS
b07b343
b07b343
%changelog
e7fb27d
* Sun Mar 11 2018 Thomas Andrejak <thomas.andrejak@gmail.com> - 4.1.0-2
e7fb27d
- Missing Require in libprelude-devel, see #1508816
e7fb27d
4826a50
* Sat Mar 10 2018 Thomas Andrejak <thomas.andrejak@gmail.com> - 4.1.0-1
4826a50
- Bump version 4.1.0
4826a50
68d2141
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.0-6
68d2141
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
68d2141
59f8be0
* Fri Jan 05 2018 Mamoru TASAKA <mtasaka@fedoraproject.org> - 4.0.0-5
59f8be0
- F-28: rebuild for ruby25
59f8be0
5160d91
* Wed Dec 06 2017 Rex Dieter <rdieter@fedoraproject.org> - 4.0.0-4
5160d91
- -devel: drop bogus Provides: libprelude%%{?_isa}-devel
5160d91
4f606d3
* Mon Oct 9 2017 Thomas Andrejak <thomas.andrejak@gmail.com> - 4.0.0-3
4f606d3
- Fix compatibility with GnuTLS 3.6
4f606d3
7ce1b54
* Wed Sep 27 2017 Thomas Andrejak <thomas.andrejak@gmail.com> - 4.0.0-2
7ce1b54
- Fix compatibility with gtk-doc-1.26
7ce1b54
7357bfc
* Sat Sep 16 2017 Thomas Andrejak <thomas.andrejak@gmail.com> - 4.0.0-1
7357bfc
- Bump version 4.0.0
7357bfc
362c6b2
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.0-34
362c6b2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
362c6b2
467b9e4
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.0-33
467b9e4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
467b9e4
7b6dddb
* Sun Jun 04 2017 Jitka Plesnikova <jplesnik@redhat.com> - 3.1.0-32
7b6dddb
- Perl 5.26 rebuild
7b6dddb
bb7bcec
* Thu Feb 02 2017 Thomas Andrejak <thomas.andrejak@gmail.com> - 3.1.0-30
76842a9
- Fix GnuTLS patch
76842a9
54914bf
* Sat Jan 14 2017 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.1.0-29
54914bf
- F-26: again rebuild for ruby24
54914bf
6f62b8e
* Thu Jan 12 2017 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.1.0-28
6f62b8e
- F-26: rebuild for ruby24
6f62b8e
05a1c27
* Thu Dec 22 2016 Miro Hrončok <mhroncok@redhat.com> - 3.1.0-27
05a1c27
- Rebuild for Python 3.6
05a1c27
b07b343
* Wed Oct 19 2016 Thomas Andrejak <thomas.andrejak@gmail.com> - 3.1.0-26
b07b343
- Bump version
b07b343
b07b343
* Sun Mar 10 2013 Steve Grubb <sgrubb@redhat.com> - 1:1.0.0-17
b07b343
- Rebuild with new gnutls
b07b343
b07b343
* Thu Sep 06 2012 Steve Grubb <sgrubb@redhat.com> - 1:1.0.0-16
b07b343
- Add provides bundled gnulib
b07b343
b07b343
* Wed Aug 08 2012 Petr Pisar <ppisar@redhat.com> - 1:1.0.0-15
b07b343
- Fix building with glibc-2.16.6 (bug #839602)
b07b343
b07b343
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.0.0-14
b07b343
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
b07b343
b07b343
* Thu Jun 07 2012 Petr Pisar <ppisar@redhat.com> - 1:1.0.0-13
b07b343
- Perl 5.16 rebuild
b07b343
b07b343
* Tue Mar 13 2012 Steve Grubb <sgrubb@redhat.com> - 1:1.0.0-12
b07b343
- Drop support for ruby
b07b343
b07b343
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.0.0-11
b07b343
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
b07b343
b07b343
* Tue Jul 19 2011 Marcela Mašláňová <mmaslano@redhat.com> - 1:1.0.0-10
b07b343
- Perl mass rebuild
b07b343
b07b343
* Fri Jun 24 2011 Steve Grubb <sgrubb@redhat.com> - 1:1.0.0-9
b07b343
- Fix gcc 4.6 C++ bug (#715983)
b07b343
b07b343
* Fri Jun 17 2011 Marcela Mašláňová <mmaslano@redhat.com> - 1:1.0.0-8
b07b343
- Perl mass rebuild
b07b343
b07b343
* Thu Jun 09 2011 Marcela Mašláňová <mmaslano@redhat.com> - 1:1.0.0-7
b07b343
- Perl 5.14 mass rebuild
b07b343
b07b343
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.0.0-6
b07b343
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
b07b343
b07b343
* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 1:1.0.0-5
b07b343
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
b07b343
b07b343
* Tue Jun 01 2010 Marcela Maslanova <mmaslano@redhat.com> - 1:1.0.0-4
b07b343
- Mass rebuild with perl-5.12.0
b07b343
b07b343
* Sun May 02 2010 Steve Grubb <sgrubb@redhat.com> - 1.0.0-3
b07b343
- Fix requires statements
b07b343
b07b343
* Fri Apr 30 2010 Steve Grubb <sgrubb@redhat.com> - 1.0.0-2
b07b343
- New upstream release
b07b343
b07b343
* Sat Jan 30 2010 Steve Grubb <sgrubb@redhat.com> - 1.0.0rc1-1
b07b343
- New upstream release