2020-10-27 08:47:29 +00:00
|
|
|
%if ((0%{?fedora} || 0%{?rhel} > 7 || 0%{?epel} > 6))
|
|
|
|
|
2019-01-18 10:53:21 +00:00
|
|
|
# lmdb is not supported on 32 bit architectures
|
2021-05-20 13:46:08 +00:00
|
|
|
%ifarch aarch64 ppc64le s390x x86_64
|
2020-10-27 08:47:29 +00:00
|
|
|
%bcond_without lmdb
|
Disable lmdb support for ppc64le
New tests added in 2.1.3 fails on ppc64l4
It failed in ldb_connect
(gdb) l
2166 }
2167 ldb_module_set_private(ldb_kv->module, ldb_kv);
2168 talloc_steal(ldb_kv->module, ldb_kv);
2169
2170 if (ldb_kv_cache_load(ldb_kv->module) != 0) {
2171 ldb_asprintf_errstring(ldb, "Unable to load ltdb cache "
2172 "records for backend '%s'", name);
2173 talloc_free(ldb_kv->module);
2174 return LDB_ERR_OPERATIONS_ERROR;
2175 }
(gdb) bt
#0 ldb_kv_init_store (ldb_kv=0x10003f5e0, name=0x7ffff7064bc0 "ldb_mdb backend", ldb=0x10003f3b0, options=0x7fffffffdee8, _module=0x10003f3b0) at ../../ldb_key_value/ldb_kv.c:2171
#1 0x00007ffff7063f70 in lmdb_connect (ldb=0x10003f3b0, url=<optimized out>, flags=<optimized out>, options=0x7fffffffdee8, _module=0x10003f3b0) at ../../ldb_mdb/ldb_mdb.c:1141
#2 0x00007ffff7f1bc04 in ldb_module_connect_backend (ldb=0x10003f3b0, url=0x100038fd0 "mdb://lmdb_free_list_test.ldb", options=0x7fffffffdee8, backend_module=0x10003f3b0)
at ../../common/ldb_modules.c:217
#3 0x00007ffff7f451d0 in ldb_connect (ldb=0x10003f3b0, url=0x100038fd0 "mdb://lmdb_free_list_test.ldb", flags=<optimized out>, options=0x7fffffffdee8) at ../../common/ldb.c:269
#4 0x0000000100002c44 in setup (state=0x1000302b0) at ../../tests/ldb_lmdb_free_list_test.c:170
#5 0x00007ffff7e67da8 in cmocka_run_one_test_or_fixture () from /lib64/libcmocka.so.0
#6 0x00007ffff7e68490 in _cmocka_run_group_tests () from /lib64/libcmocka.so.0
#7 0x0000000100001478 in main (argc=<optimized out>, argv=<optimized out>) at ../../tests/ldb_lmdb_free_list_test.c:666
sh-5.0# ./bin/ldb_lmdb_free_list_test
[==========] Running 3 test(s).
[ RUN ] test_free_list_no_read_lock
Could not run test: 0x1 != 0
[ LINE ] --- ../../tests/ldb_lmdb_free_list_test.c:171: error: Failure!Test setup failed
[ ERROR ] test_free_list_no_read_lock
Failed to connect to 'mdb://lmdb_free_list_test.ldb' with backend 'mdb': Unable to load ltdb cache records for backend 'ldb_mdb backend'[ RUN ] test_free_list_read_lock
Could not run test: 0x1 != 0
[ LINE ] --- ../../tests/ldb_lmdb_free_list_test.c:171: error: Failure!Test setup failed
[ ERROR ] test_free_list_read_lock
Failed to connect to 'mdb://lmdb_free_list_test.ldb' with backend 'mdb': Unable to load ltdb cache records for backend 'ldb_mdb backend'[ RUN ] test_free_list_stale_reader
Could not run test: 0x1 != 0
[ LINE ] --- ../../tests/ldb_lmdb_free_list_test.c:171: error: Failure!Test setup failed
[ ERROR ] test_free_list_stale_reader
Failed to connect to 'mdb://lmdb_free_list_test.ldb' with backend 'mdb': Unable to load ltdb cache records for backend 'ldb_mdb backend'[==========] 3 test(s) run.
[ PASSED ] 0 test(s).
2020-05-22 08:37:32 +00:00
|
|
|
%else
|
2020-10-27 08:47:29 +00:00
|
|
|
%bcond_with lmdb
|
|
|
|
#endif arch
|
Disable lmdb support for ppc64le
New tests added in 2.1.3 fails on ppc64l4
It failed in ldb_connect
(gdb) l
2166 }
2167 ldb_module_set_private(ldb_kv->module, ldb_kv);
2168 talloc_steal(ldb_kv->module, ldb_kv);
2169
2170 if (ldb_kv_cache_load(ldb_kv->module) != 0) {
2171 ldb_asprintf_errstring(ldb, "Unable to load ltdb cache "
2172 "records for backend '%s'", name);
2173 talloc_free(ldb_kv->module);
2174 return LDB_ERR_OPERATIONS_ERROR;
2175 }
(gdb) bt
#0 ldb_kv_init_store (ldb_kv=0x10003f5e0, name=0x7ffff7064bc0 "ldb_mdb backend", ldb=0x10003f3b0, options=0x7fffffffdee8, _module=0x10003f3b0) at ../../ldb_key_value/ldb_kv.c:2171
#1 0x00007ffff7063f70 in lmdb_connect (ldb=0x10003f3b0, url=<optimized out>, flags=<optimized out>, options=0x7fffffffdee8, _module=0x10003f3b0) at ../../ldb_mdb/ldb_mdb.c:1141
#2 0x00007ffff7f1bc04 in ldb_module_connect_backend (ldb=0x10003f3b0, url=0x100038fd0 "mdb://lmdb_free_list_test.ldb", options=0x7fffffffdee8, backend_module=0x10003f3b0)
at ../../common/ldb_modules.c:217
#3 0x00007ffff7f451d0 in ldb_connect (ldb=0x10003f3b0, url=0x100038fd0 "mdb://lmdb_free_list_test.ldb", flags=<optimized out>, options=0x7fffffffdee8) at ../../common/ldb.c:269
#4 0x0000000100002c44 in setup (state=0x1000302b0) at ../../tests/ldb_lmdb_free_list_test.c:170
#5 0x00007ffff7e67da8 in cmocka_run_one_test_or_fixture () from /lib64/libcmocka.so.0
#6 0x00007ffff7e68490 in _cmocka_run_group_tests () from /lib64/libcmocka.so.0
#7 0x0000000100001478 in main (argc=<optimized out>, argv=<optimized out>) at ../../tests/ldb_lmdb_free_list_test.c:666
sh-5.0# ./bin/ldb_lmdb_free_list_test
[==========] Running 3 test(s).
[ RUN ] test_free_list_no_read_lock
Could not run test: 0x1 != 0
[ LINE ] --- ../../tests/ldb_lmdb_free_list_test.c:171: error: Failure!Test setup failed
[ ERROR ] test_free_list_no_read_lock
Failed to connect to 'mdb://lmdb_free_list_test.ldb' with backend 'mdb': Unable to load ltdb cache records for backend 'ldb_mdb backend'[ RUN ] test_free_list_read_lock
Could not run test: 0x1 != 0
[ LINE ] --- ../../tests/ldb_lmdb_free_list_test.c:171: error: Failure!Test setup failed
[ ERROR ] test_free_list_read_lock
Failed to connect to 'mdb://lmdb_free_list_test.ldb' with backend 'mdb': Unable to load ltdb cache records for backend 'ldb_mdb backend'[ RUN ] test_free_list_stale_reader
Could not run test: 0x1 != 0
[ LINE ] --- ../../tests/ldb_lmdb_free_list_test.c:171: error: Failure!Test setup failed
[ ERROR ] test_free_list_stale_reader
Failed to connect to 'mdb://lmdb_free_list_test.ldb' with backend 'mdb': Unable to load ltdb cache records for backend 'ldb_mdb backend'[==========] 3 test(s) run.
[ PASSED ] 0 test(s).
2020-05-22 08:37:32 +00:00
|
|
|
%endif
|
2020-10-27 08:47:29 +00:00
|
|
|
|
2019-01-18 10:53:21 +00:00
|
|
|
%else
|
2020-10-27 08:47:29 +00:00
|
|
|
%bcond_with lmdb
|
|
|
|
#endif fedora || rhel || epel
|
2019-01-18 10:53:21 +00:00
|
|
|
%endif
|
|
|
|
|
2017-11-30 08:57:24 +00:00
|
|
|
%if 0%{?fedora} || 0%{?rhel} > 7
|
2020-10-27 08:39:41 +00:00
|
|
|
%bcond_without python3
|
|
|
|
%else
|
|
|
|
%bcond_with python3
|
2019-01-17 22:34:19 +00:00
|
|
|
%endif
|
|
|
|
|
2024-01-30 10:47:22 +00:00
|
|
|
%global talloc_version 2.4.2
|
|
|
|
%global tdb_version 1.4.10
|
|
|
|
%global tevent_version 0.16.1
|
2011-01-11 22:01:00 +00:00
|
|
|
|
|
|
|
Name: libldb
|
2024-01-30 10:47:22 +00:00
|
|
|
Version: 2.9.0
|
2024-07-01 11:36:21 +00:00
|
|
|
Release: %autorelease
|
2011-01-11 22:01:00 +00:00
|
|
|
Summary: A schema-less, ldap like, API and database
|
2013-07-08 14:28:27 +00:00
|
|
|
Requires: libtalloc%{?_isa} >= %{talloc_version}
|
|
|
|
Requires: libtdb%{?_isa} >= %{tdb_version}
|
|
|
|
Requires: libtevent%{?_isa} >= %{tevent_version}
|
2023-02-23 14:50:35 +00:00
|
|
|
License: LGPL-3.0-or-later
|
2011-01-11 22:01:00 +00:00
|
|
|
URL: http://ldb.samba.org/
|
2020-07-02 11:40:05 +00:00
|
|
|
Source0: https://www.samba.org/ftp/ldb/ldb-%{version}.tar.gz
|
|
|
|
Source1: https://www.samba.org/ftp/ldb/ldb-%{version}.tar.asc
|
2020-01-22 16:18:44 +00:00
|
|
|
# gpg2 --no-default-keyring --keyring ./ldb.keyring --recv-keys 9147A339719518EE9011BCB54793916113084025
|
|
|
|
Source2: ldb.keyring
|
2011-01-11 22:01:00 +00:00
|
|
|
|
2019-01-17 22:41:53 +00:00
|
|
|
# Patches
|
|
|
|
|
2018-02-26 14:31:14 +00:00
|
|
|
BuildRequires: gcc
|
2011-01-11 22:01:00 +00:00
|
|
|
BuildRequires: libtalloc-devel >= %{talloc_version}
|
|
|
|
BuildRequires: libtdb-devel >= %{tdb_version}
|
|
|
|
BuildRequires: libtevent-devel >= %{tevent_version}
|
2020-10-27 08:47:29 +00:00
|
|
|
%if %{with lmdb}
|
2018-05-30 20:33:03 +00:00
|
|
|
BuildRequires: lmdb-devel >= 0.9.16
|
2019-01-18 10:53:21 +00:00
|
|
|
%endif
|
2011-01-11 22:01:00 +00:00
|
|
|
BuildRequires: popt-devel
|
|
|
|
BuildRequires: libxslt
|
|
|
|
BuildRequires: docbook-style-xsl
|
2020-10-27 08:39:41 +00:00
|
|
|
%if %{with python3}
|
2016-01-13 16:06:51 +00:00
|
|
|
BuildRequires: python3-devel
|
|
|
|
BuildRequires: python3-tdb
|
|
|
|
BuildRequires: python3-talloc-devel
|
|
|
|
BuildRequires: python3-tevent
|
2020-10-27 08:39:41 +00:00
|
|
|
#endif with python
|
2016-01-13 16:06:51 +00:00
|
|
|
%endif
|
2019-01-17 22:34:19 +00:00
|
|
|
BuildRequires: doxygen
|
|
|
|
BuildRequires: openldap-devel
|
|
|
|
BuildRequires: libcmocka-devel
|
2020-01-22 16:18:44 +00:00
|
|
|
BuildRequires: gnupg2
|
2021-01-05 02:07:51 +00:00
|
|
|
BuildRequires: make
|
2019-01-17 22:34:19 +00:00
|
|
|
|
|
|
|
Provides: bundled(libreplace)
|
2019-08-24 14:37:42 +00:00
|
|
|
Obsoletes: python2-ldb < 2.0.5-1
|
|
|
|
Obsoletes: python2-ldb-devel < 2.0.5-1
|
|
|
|
Obsoletes: pyldb < 1.1.26-2
|
|
|
|
|
2016-01-13 16:06:51 +00:00
|
|
|
|
2011-01-11 22:01:00 +00:00
|
|
|
%description
|
|
|
|
An extensible library that implements an LDAP like API to access remote LDAP
|
|
|
|
servers, or use local tdb databases.
|
|
|
|
|
2011-02-11 12:10:46 +00:00
|
|
|
%package -n ldb-tools
|
2011-01-11 22:01:00 +00:00
|
|
|
Summary: Tools to manage LDB files
|
2013-07-08 14:28:27 +00:00
|
|
|
Requires: libldb%{?_isa} = %{version}-%{release}
|
2011-01-11 22:01:00 +00:00
|
|
|
|
2011-02-11 12:10:46 +00:00
|
|
|
%description -n ldb-tools
|
2011-01-11 22:01:00 +00:00
|
|
|
Tools to manage LDB files
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
Summary: Developer tools for the LDB library
|
2013-07-08 14:28:27 +00:00
|
|
|
Requires: libldb%{?_isa} = %{version}-%{release}
|
|
|
|
Requires: libtdb-devel%{?_isa} >= %{tdb_version}
|
|
|
|
Requires: libtalloc-devel%{?_isa} >= %{talloc_version}
|
|
|
|
Requires: libtevent-devel%{?_isa} >= %{tevent_version}
|
2011-01-11 22:01:00 +00:00
|
|
|
|
|
|
|
%description devel
|
|
|
|
Header files needed to develop programs that link against the LDB library.
|
|
|
|
|
2016-01-13 16:06:51 +00:00
|
|
|
%package -n python-ldb-devel-common
|
|
|
|
Summary: Common development files for the Python bindings for the LDB library
|
|
|
|
|
|
|
|
Provides: pyldb-devel%{?_isa} = %{version}-%{release}
|
|
|
|
%{?python_provide:%python_provide python2-ldb-devel}
|
|
|
|
|
|
|
|
%description -n python-ldb-devel-common
|
|
|
|
Development files for the Python bindings for the LDB library.
|
|
|
|
This package includes files that aren't specific to a Python version.
|
|
|
|
|
2020-10-27 08:39:41 +00:00
|
|
|
%if %{with python3}
|
2016-01-13 16:06:51 +00:00
|
|
|
%package -n python3-ldb
|
|
|
|
Summary: Python bindings for the LDB library
|
|
|
|
Requires: libldb%{?_isa} = %{version}-%{release}
|
|
|
|
Requires: python3-tdb%{?_isa} >= %{tdb_version}
|
|
|
|
|
|
|
|
%{?python_provide:%python_provide python3-ldb}
|
|
|
|
|
|
|
|
%description -n python3-ldb
|
2011-01-11 22:01:00 +00:00
|
|
|
Python bindings for the LDB library
|
|
|
|
|
2016-01-13 16:06:51 +00:00
|
|
|
%package -n python3-ldb-devel
|
2011-01-11 22:01:00 +00:00
|
|
|
Summary: Development files for the Python bindings for the LDB library
|
2016-01-13 16:06:51 +00:00
|
|
|
Requires: python3-ldb%{?_isa} = %{version}-%{release}
|
|
|
|
Requires: python-ldb-devel-common%{?_isa} = %{version}-%{release}
|
|
|
|
|
|
|
|
%{?python_provide:%python_provide python3-ldb-devel}
|
2011-01-11 22:01:00 +00:00
|
|
|
|
2016-01-13 16:06:51 +00:00
|
|
|
%description -n python3-ldb-devel
|
2011-01-11 22:01:00 +00:00
|
|
|
Development files for the Python bindings for the LDB library
|
2020-10-27 08:39:41 +00:00
|
|
|
#endif with python
|
2016-01-13 16:06:51 +00:00
|
|
|
%endif
|
|
|
|
|
2011-01-11 22:01:00 +00:00
|
|
|
%prep
|
2021-05-20 13:19:44 +00:00
|
|
|
zcat %{SOURCE0} | gpgv2 --quiet --keyring %{SOURCE2} %{SOURCE1} -
|
2019-01-17 22:41:53 +00:00
|
|
|
%autosetup -n ldb-%{version} -p1
|
2011-12-07 12:45:06 +00:00
|
|
|
|
2021-05-20 13:19:44 +00:00
|
|
|
%build
|
2018-02-26 15:13:48 +00:00
|
|
|
# workaround for https://bugzilla.redhat.com/show_bug.cgi?id=1217376
|
|
|
|
export python_LDFLAGS=""
|
|
|
|
|
2011-02-11 14:50:05 +00:00
|
|
|
%configure --disable-rpath \
|
|
|
|
--disable-rpath-install \
|
2011-01-11 22:01:00 +00:00
|
|
|
--bundled-libraries=NONE \
|
2012-07-10 19:25:29 +00:00
|
|
|
--builtin-libraries=replace \
|
2011-01-11 22:01:00 +00:00
|
|
|
--with-modulesdir=%{_libdir}/ldb/modules \
|
2020-10-27 08:47:29 +00:00
|
|
|
%if %{without lmdb}
|
|
|
|
--without-ldb-lmdb \
|
|
|
|
%endif
|
2012-07-10 19:25:29 +00:00
|
|
|
--with-privatelibdir=%{_libdir}/ldb
|
2011-01-11 22:01:00 +00:00
|
|
|
|
2020-07-13 21:10:03 +00:00
|
|
|
%make_build
|
2011-11-21 14:37:52 +00:00
|
|
|
doxygen Doxyfile
|
2011-01-11 22:01:00 +00:00
|
|
|
|
2020-10-27 08:47:29 +00:00
|
|
|
%if %{with lmdb}
|
2017-07-04 09:40:01 +00:00
|
|
|
%check
|
2020-10-27 08:47:29 +00:00
|
|
|
make %{?_smp_mflags} check
|
|
|
|
#endif with lmdb
|
2019-08-26 10:44:59 +00:00
|
|
|
%endif
|
|
|
|
|
2011-01-11 22:01:00 +00:00
|
|
|
%install
|
2020-07-13 21:10:03 +00:00
|
|
|
%make_install
|
2011-01-11 22:01:00 +00:00
|
|
|
|
2011-11-21 14:37:52 +00:00
|
|
|
# Install API docs
|
|
|
|
cp -a apidocs/man/* $RPM_BUILD_ROOT/%{_mandir}
|
|
|
|
|
2019-01-18 11:09:13 +00:00
|
|
|
# bug: remove manpage named after full file path
|
|
|
|
# not needed with el8+ and fc28+
|
2012-07-10 19:25:29 +00:00
|
|
|
rm -f $RPM_BUILD_ROOT/%{_mandir}/man3/_*
|
|
|
|
|
2018-02-26 14:26:46 +00:00
|
|
|
%ldconfig_scriptlets
|
2011-01-11 22:01:00 +00:00
|
|
|
|
|
|
|
%files
|
|
|
|
%dir %{_libdir}/ldb
|
|
|
|
%{_libdir}/libldb.so.*
|
2018-05-30 20:33:03 +00:00
|
|
|
%{_libdir}/ldb/libldb-key-value.so
|
2019-01-17 22:12:05 +00:00
|
|
|
%{_libdir}/ldb/libldb-tdb-err-map.so
|
|
|
|
%{_libdir}/ldb/libldb-tdb-int.so
|
2020-10-27 08:47:29 +00:00
|
|
|
%if %{with lmdb}
|
2018-05-30 20:33:03 +00:00
|
|
|
%{_libdir}/ldb/libldb-mdb-int.so
|
2018-05-30 21:29:28 +00:00
|
|
|
%endif
|
2011-02-11 12:10:46 +00:00
|
|
|
%dir %{_libdir}/ldb/modules
|
|
|
|
%dir %{_libdir}/ldb/modules/ldb
|
2011-01-11 22:01:00 +00:00
|
|
|
%{_libdir}/ldb/modules/ldb/*.so
|
|
|
|
|
2011-02-11 12:10:46 +00:00
|
|
|
%files -n ldb-tools
|
2011-01-11 22:01:00 +00:00
|
|
|
%{_bindir}/ldbadd
|
|
|
|
%{_bindir}/ldbdel
|
|
|
|
%{_bindir}/ldbedit
|
|
|
|
%{_bindir}/ldbmodify
|
|
|
|
%{_bindir}/ldbrename
|
|
|
|
%{_bindir}/ldbsearch
|
2011-02-11 12:10:46 +00:00
|
|
|
%{_libdir}/ldb/libldb-cmdline.so
|
2011-01-11 22:01:00 +00:00
|
|
|
%{_mandir}/man1/ldbadd.1.*
|
|
|
|
%{_mandir}/man1/ldbdel.1.*
|
|
|
|
%{_mandir}/man1/ldbedit.1.*
|
|
|
|
%{_mandir}/man1/ldbmodify.1.*
|
|
|
|
%{_mandir}/man1/ldbrename.1.*
|
|
|
|
%{_mandir}/man1/ldbsearch.1.*
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
%{_includedir}/ldb_module.h
|
|
|
|
%{_includedir}/ldb_handlers.h
|
|
|
|
%{_includedir}/ldb_errors.h
|
2011-02-11 12:10:46 +00:00
|
|
|
%{_includedir}/ldb_version.h
|
2011-01-11 22:01:00 +00:00
|
|
|
%{_includedir}/ldb.h
|
|
|
|
%{_libdir}/libldb.so
|
|
|
|
|
|
|
|
%{_libdir}/pkgconfig/ldb.pc
|
2011-11-21 14:37:52 +00:00
|
|
|
%{_mandir}/man3/ldb*.gz
|
2012-05-22 14:36:45 +00:00
|
|
|
%{_mandir}/man3/ldif*.gz
|
2011-01-11 22:01:00 +00:00
|
|
|
|
2019-01-17 22:34:19 +00:00
|
|
|
%files -n python-ldb-devel-common
|
|
|
|
%{_includedir}/pyldb.h
|
|
|
|
%{_mandir}/man*/Py*.gz
|
|
|
|
|
2020-10-27 08:39:41 +00:00
|
|
|
%if %{with python3}
|
2016-01-13 16:06:51 +00:00
|
|
|
%files -n python3-ldb
|
|
|
|
%{python3_sitearch}/ldb.cpython-*.so
|
2019-08-24 14:50:44 +00:00
|
|
|
%{_libdir}/libpyldb-util.cpython-*.so.2*
|
2016-01-13 16:06:51 +00:00
|
|
|
%{python3_sitearch}/_ldb_text.py
|
|
|
|
%{python3_sitearch}/__pycache__/_ldb_text.cpython-*.py*
|
|
|
|
|
|
|
|
%files -n python3-ldb-devel
|
|
|
|
%{_libdir}/libpyldb-util.cpython-*.so
|
2017-07-06 08:15:20 +00:00
|
|
|
%{_libdir}/pkgconfig/pyldb-util.cpython-*.pc
|
2016-01-13 16:06:51 +00:00
|
|
|
|
2018-02-26 14:26:46 +00:00
|
|
|
%ldconfig_scriptlets -n python3-ldb
|
2020-10-27 08:39:41 +00:00
|
|
|
#endif with python
|
2016-01-13 16:06:51 +00:00
|
|
|
%endif
|
2011-01-11 22:01:00 +00:00
|
|
|
|
|
|
|
%changelog
|
2024-07-01 11:36:21 +00:00
|
|
|
%autochangelog
|