4c16553
%if ! (0%{?fedora} > 12 || 0%{?rhel} > 5)
4c16553
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
4c16553
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
4c16553
%endif
4c16553
b840001
%define talloc_version 2.0.8
44f9338
%define tdb_version 1.3.3
b840001
%define tevent_version 0.9.17
4c16553
4c16553
Name: libldb
Jakub Hrozek cc85b22
Version: 1.1.26
Jakub Hrozek 44da6f9
Release: 1%{?dist}
4c16553
Group: Development/Libraries
4c16553
Summary: A schema-less, ldap like, API and database
769332b
Requires: libtalloc%{?_isa} >= %{talloc_version}
769332b
Requires: libtdb%{?_isa} >= %{tdb_version}
769332b
Requires: libtevent%{?_isa} >= %{tevent_version}
4c16553
License: LGPLv3+
4c16553
URL: http://ldb.samba.org/
4c16553
Source: http://samba.org/ftp/ldb/ldb-%{version}.tar.gz
4c16553
4c16553
BuildRequires: libtalloc-devel >= %{talloc_version}
4c16553
BuildRequires: libtdb-devel >= %{tdb_version}
4c16553
BuildRequires: libtevent-devel >= %{tevent_version}
4c16553
%{?fedora:BuildRequires: popt-devel}
4c16553
%if 0%{?rhel} <= 5
4c16553
BuildRequires: popt
4c16553
%endif
4c16553
%if 0%{?rhel} >= 6
4c16553
BuildRequires: popt-devel
4c16553
%endif
4c16553
BuildRequires: autoconf
4c16553
BuildRequires: libxslt
4c16553
BuildRequires: docbook-style-xsl
4c16553
BuildRequires: python-devel
4c16553
BuildRequires: python-tdb
4c16553
BuildRequires: pytalloc-devel
e94d5d7
BuildRequires: python-tevent
a66f0fd
BuildRequires: doxygen
3062748
BuildRequires: openldap-devel
4c16553
f607e37
Provides: bundled(libreplace)
f607e37
4c16553
# Patches
e94d5d7
4c16553
%description
4c16553
An extensible library that implements an LDAP like API to access remote LDAP
4c16553
servers, or use local tdb databases.
4c16553
fd922ff
%package -n ldb-tools
4c16553
Group: Development/Libraries
4c16553
Summary: Tools to manage LDB files
769332b
Requires: libldb%{?_isa} = %{version}-%{release}
4c16553
fd922ff
%description -n ldb-tools
4c16553
Tools to manage LDB files
4c16553
4c16553
%package devel
4c16553
Group: Development/Libraries
4c16553
Summary: Developer tools for the LDB library
769332b
Requires: libldb%{?_isa} = %{version}-%{release}
769332b
Requires: libtdb-devel%{?_isa} >= %{tdb_version}
769332b
Requires: libtalloc-devel%{?_isa} >= %{talloc_version}
769332b
Requires: libtevent-devel%{?_isa} >= %{tevent_version}
4c16553
Requires: pkgconfig
4c16553
4c16553
%description devel
4c16553
Header files needed to develop programs that link against the LDB library.
4c16553
4c16553
%package -n pyldb
4c16553
Group: Development/Libraries
4c16553
Summary: Python bindings for the LDB library
769332b
Requires: libldb%{?_isa} = %{version}-%{release}
769332b
Requires: python-tdb%{?_isa} >= %{tdb_version}
4c16553
4c16553
%description -n pyldb
4c16553
Python bindings for the LDB library
4c16553
4c16553
%package -n pyldb-devel
4c16553
Group: Development/Libraries
4c16553
Summary: Development files for the Python bindings for the LDB library
769332b
Requires: pyldb%{?_isa} = %{version}-%{release}
4c16553
4c16553
%description -n pyldb-devel
4c16553
Development files for the Python bindings for the LDB library
4c16553
4c16553
%prep
4c16553
%setup -q -n ldb-%{version}
e94d5d7
4c16553
%build
f607e37
a414d69
%configure --disable-rpath \
a414d69
           --disable-rpath-install \
4c16553
           --bundled-libraries=NONE \
3c91061
           --builtin-libraries=replace \
4c16553
           --with-modulesdir=%{_libdir}/ldb/modules \
3c91061
           --with-privatelibdir=%{_libdir}/ldb
4c16553
38a3c0a
# Don't build with multiple processors
38a3c0a
# It breaks due to a threading issue in WAF
38a3c0a
make V=1
a66f0fd
doxygen Doxyfile
4c16553
4c16553
%install
4c16553
make install DESTDIR=%{buildroot}
4c16553
4c16553
rm -f %{buildroot}%{_libdir}/libldb.a
4c16553
4c16553
# Shared libraries need to be marked executable for
4c16553
# rpmbuild to strip them and include them in debuginfo
4c16553
find $RPM_BUILD_ROOT -name "*.so*" -exec chmod -c +x {} \;
4c16553
a66f0fd
# Install API docs
a66f0fd
cp -a apidocs/man/* $RPM_BUILD_ROOT/%{_mandir}
a66f0fd
e9fffdd
# LDB 1.1.8+ bug: remove manpage named after full
3c91061
# file path
3c91061
rm -f $RPM_BUILD_ROOT/%{_mandir}/man3/_*
3c91061
4c16553
%clean
4c16553
rm -rf %{buildroot}
4c16553
4c16553
%post -p /sbin/ldconfig
4c16553
4c16553
%postun -p /sbin/ldconfig
4c16553
4c16553
%files
4c16553
%defattr(-,root,root,-)
4c16553
%dir %{_libdir}/ldb
4c16553
%{_libdir}/libldb.so.*
fd922ff
%dir %{_libdir}/ldb/modules
fd922ff
%dir %{_libdir}/ldb/modules/ldb
4c16553
%{_libdir}/ldb/modules/ldb/*.so
4c16553
fd922ff
%files -n ldb-tools
4c16553
%defattr(-,root,root,-)
4c16553
%{_bindir}/ldbadd
4c16553
%{_bindir}/ldbdel
4c16553
%{_bindir}/ldbedit
4c16553
%{_bindir}/ldbmodify
4c16553
%{_bindir}/ldbrename
4c16553
%{_bindir}/ldbsearch
fd922ff
%{_libdir}/ldb/libldb-cmdline.so
4c16553
%{_mandir}/man1/ldbadd.1.*
4c16553
%{_mandir}/man1/ldbdel.1.*
4c16553
%{_mandir}/man1/ldbedit.1.*
4c16553
%{_mandir}/man1/ldbmodify.1.*
4c16553
%{_mandir}/man1/ldbrename.1.*
4c16553
%{_mandir}/man1/ldbsearch.1.*
4c16553
4c16553
%files devel
4c16553
%defattr(-,root,root,-)
4c16553
%{_includedir}/ldb_module.h
4c16553
%{_includedir}/ldb_handlers.h
4c16553
%{_includedir}/ldb_errors.h
fd922ff
%{_includedir}/ldb_version.h
4c16553
%{_includedir}/ldb.h
4c16553
%{_libdir}/libldb.so
4c16553
4c16553
%{_libdir}/pkgconfig/ldb.pc
a66f0fd
%{_mandir}/man3/ldb*.gz
38a3c0a
%{_mandir}/man3/ldif*.gz
4c16553
4c16553
%files -n pyldb
4c16553
%defattr(-,root,root,-)
4c16553
%{python_sitearch}/ldb.so
fd922ff
%{_libdir}/libpyldb-util.so.1*
Jakub Hrozek 55d6107
%{python_sitearch}/_ldb_text.py*
4c16553
4c16553
%files -n pyldb-devel
4c16553
%defattr(-,root,root,-)
4c16553
%{_includedir}/pyldb.h
4c16553
%{_libdir}/libpyldb-util.so
4c16553
%{_libdir}/pkgconfig/pyldb-util.pc
a66f0fd
%{_mandir}/man*/Py*.gz
4c16553
4c16553
%post -n pyldb -p /sbin/ldconfig
4c16553
%postun -n pyldb -p /sbin/ldconfig
4c16553
4c16553
%changelog
Jakub Hrozek cc85b22
* Mon Feb 22 2016 Jakub Hrozek <jhrozek@redhat.com> - 1.1.26-1
Jakub Hrozek cc85b22
- New upstream release 1.1.26
Jakub Hrozek cc85b22
Jakub Hrozek 54a2169
* Mon Jan  4 2016 Jakub Hrozek <jhrozek@redhat.com> - 1.1.25-1
Jakub Hrozek 54a2169
- New upstream release 1.1.25
Jakub Hrozek 54a2169
Jakub Hrozek 44da6f9
* Wed Dec 16 2015 Jakub Hrozek <jhrozek@redhat.com> - 1.1.24-1
Jakub Hrozek 44da6f9
- Resolves: rhbz#1292070 - CVE-2015-5330 libldb: samba: Remote memory read
Jakub Hrozek 44da6f9
                           in Samba LDAP server [fedora-all]
Jakub Hrozek 44da6f9
Jakub Hrozek 406e6c8
* Wed Dec 16 2015 Jakub Hrozek <jhrozek@redhat.com> - 1.1.21-2
Jakub Hrozek 406e6c8
- Fix CVE-2015-5330
Jakub Hrozek 406e6c8
Andreas Schneider 496b467
* Tue Aug 25 2015 Andreas Schneider <asn@redhat.com> - 1.1.21-1
Andreas Schneider 496b467
- New upstream release 1.1.20
Andreas Schneider 496b467
3c1a371
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.20-2
3c1a371
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
3c1a371
3c32ef6
* Wed Jan 28 2015 Jakub Hrozek <jhrozek@redhat.com> - 1.1.20-1
3c32ef6
- New upstream release 1.1.20
3c32ef6
f1de870
* Mon Jan  5 2015 Jakub Hrozek <jhrozek@redhat.com> - 1.1.19-1
f1de870
- New upstream release 1.1.19
f1de870
44f9338
* Fri Dec  5 2014 Jakub Hrozek <jhrozek@redhat.com> - 1.1.18-1
44f9338
- New upstream release 1.1.18
44f9338
635b6ab
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.17-4
635b6ab
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
635b6ab
18e5032
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.17-3
18e5032
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
18e5032
1b81fed
* Tue May 06 2014 Jakub Hrozek <jhrozek@redhat.com> - 1.1.17-2
1b81fed
- Fix the previous changelog entry
1b81fed
7549b50
* Tue May 06 2014 Jakub Hrozek <jhrozek@redhat.com> - 1.1.17-1
1b81fed
- New upstream release 1.1.17
7549b50
3062748
* Thu Jan 02 2014 Stephen Gallagher <sgallagh@redhat.com> - 1.1.16-4
3062748
- Enable building libldb's LDAP interface module
3062748
c22304e
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.16-3
c22304e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
c22304e
769332b
* Mon Jul 08 2013 Jakub Hrozek <jhrozek@redhat.com> - 1.1.16-2
769332b
- Make the Requires arch-specific
769332b
Andreas Schneider 6a1d425
* Tue Jul 02 2013 - Andreas Schneider <asn@redhat.com> - 1.1.16-1
Andreas Schneider 6a1d425
- New upstream release 1.1.16
Andreas Schneider 6a1d425
f69a559
* Wed Jun 05 2013 Jakub Hrozek <jhrozek@redhat.com> - 1.1.15-3
f69a559
- Relax pytdb requirement
f69a559
2843dc3
* Thu Feb 07 2013 Jakub Hrozek <jhrozek@redhat.com> - 1.1.15-2
2843dc3
- The 1.1.15 rebase obsoletes the patch from 1.1.14-2
2843dc3
a9494e7
* Thu Feb 07 2013 Jakub Hrozek <jhrozek@redhat.com> - 1.1.15-1
a9494e7
- New upstream release 1.1.15
a9494e7
f330d83
* Wed Jan 30 2013 Jakub Hrozek <jhrozek@redhat.com> - 1.1.14-2
f330d83
- Add patch by Stephen Gallagher to include manual pages for
f330d83
  ldb_connect() and several other functions.
f330d83
b840001
* Sat Dec 01 2012 Jakub Hrozek <jhrozek@redhat.com> - 1.1.14-1
b840001
- New upstream release 1.1.14
b840001
f8a0e9b
* Wed Oct 03 2012 Jakub Hrozek <jhrozek@redhat.com> - 1.1.13-1
f8a0e9b
- New upstream release 1.1.13
f8a0e9b
22dd948
* Mon Sep 03 2012 Jakub Hrozek <jhrozek@redhat.com> - 1.1.12-1
22dd948
- New upstream release 1.1.12
22dd948
3755d4b
* Tue Aug 28 2012 Jakub Hrozek <jhrozek@redhat.com> - 1.1.11-1
287bfa0
- New upstream release 1.1.11
3755d4b
dbf682b
* Mon Aug 10 2012 Jakub Hrozek <jhrozek@redhat.com> - 1.1.10-1
dbf682b
- New upstream release 1.1.10
dbf682b
e9fffdd
* Thu Aug 02 2012 Stephen Gallagher <sgallagh@redhat.com> - 1.1.9-1
e9fffdd
- New upstream release 1.1.9
e9fffdd
- Required for Samba 4 Beta 5
e9fffdd
- Ensure rename target does not exist before deleting old record
e9fffdd
- Add parameter to avoid NULL format string flagged by -Werror=format
e9fffdd
b92c441
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.8-2
b92c441
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
b92c441
3c91061
* Tue Jul 10 2012 Stephen Gallagher <sgallagh@redhat.com> - 1.1.8-1
3c91061
- New upstream release 1.1.8
3c91061
- Required for latest Samba 4 beta
3c91061
- Fixes for pyldb
3c91061
- Revert to using tdb1 by default
3c91061
- Drop support for tdb_compat
3c91061
- CCAN is no longer built as a static library
3c91061
38a3c0a
* Tue May 22 2012 Stephen Gallagher <sgallagh@redhat.com> - 1.1.6-1
38a3c0a
- New upstream release 1.1.6
38a3c0a
- Drop upstream patches
38a3c0a
- Required for upcoming Samba 4 beta
38a3c0a
- Explicitly build with tdb1 support
38a3c0a
fa3d9ab
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.4-2
fa3d9ab
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
fa3d9ab
38a3c0a
* Fri Dec 09 2011 Stephen Gallagher <sgallagh@redhat.com> - 1.1.4-1.1
38a3c0a
- Do not build with multiple CPUs
38a3c0a
e94d5d7
* Tue Dec 06 2011 Stephen Gallagher <sgallagh@redhat.com> - 1.1.4-1
e94d5d7
- New upstream release
e94d5d7
- Add ldb_module_error() routine
e94d5d7
- Fedora: work around unreliable configure check for pytevent
e94d5d7
- Drop patch to ignore --disable-silent-rules (included in tarball)
e94d5d7
408cd3a
* Thu Dec 01 2011 Stephen Gallagher <sgallagh@redhat.com> - 1.1.3-4
408cd3a
- Add patch to ignore --disable-silent-rules
408cd3a
f607e37
* Wed Nov 23 2011 Stephen Gallagher <sgallagh@redhat.com> - 1.1.3-3
f607e37
- Add explicit mention of the bundled libreplace
f607e37
- https://fedorahosted.org/fpc/ticket/120
f607e37
- Add explicit mention of bundled libtdb_compat and libccan
f607e37
- https://fedorahosted.org/fpc/ticket/119
f607e37
f607e37
* Mon Nov 21 2011 Stephen Gallagher <sgallagh@redhat.com> - 1.1.3-2
a66f0fd
- Build and install API documentation
f607e37
- Build tdb_compat and ccan statically. They have no upstream releases to
f607e37
  link against yet and their API is in flux. It is unsafe to make them
f607e37
  public and shared at this time.
a66f0fd
f607e37
* Wed Nov 09 2011 Stephen Gallagher <sgallagh@redhat.com> - 1.1.3-1
7d874e0
- New upstream release
7d874e0
- Required for building newer samba4 packages
7d874e0
de17f62
* Tue Aug  2 2011 Simo Sorce <ssorce@redhat.com> - 1.1.0-1
de17f62
- Update to 1.1.0
de17f62
  (dependency for samba4 alpha16 snapshot)
de17f62
ba7ae55
* Tue Feb 22 2011 Simo Sorce <ssorce@redhat.com> - 1.0.2-1
ba7ae55
- Update to 1.0.2
ba7ae55
  (dependency for samba4 alpha15 snapshot)
ba7ae55
a414d69
* Fri Feb 11 2011 Stephen Gallagher <sgallagh@redhat.com> - 1.0.0-2
a414d69
- Disable rpath
a414d69
fd922ff
* Fri Feb 11 2011 Stephen Gallagher <sgallagh@redhat.com> - 1.0.0-1
fd922ff
- New upstream release 1.0.0
fd922ff
- SOname bump to account for module loading changes
fd922ff
- Rename libldb-tools to ldb-tools to make upgrades easier
fd922ff
1ba86b5
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.22-9
1ba86b5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
1ba86b5
4c16553
* Fri Feb 04 2011 Stephen Gallagher <sgallagh@redhat.com> - 0.9.22-8
4c16553
- Fixes from package review
4c16553
- Change Requires: on tools subpackage to be the exact version/release
4c16553
- Remove unnecessary BuildRoot directive
4c16553
4c16553
* Mon Jan 17 2011 Stephen Gallagher <sgallagh@redhat.com> - 0.9.22-7
4c16553
- Update to 0.9.22 (first independent release of libldb upstream)
4c16553