From 2b53e8e6483c1664d2d671ba165bb291c879fcdc Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Oct 06 2021 11:52:15 +0000 Subject: import libldb-2.3.0-2.el8 --- diff --git a/.gitignore b/.gitignore index c6672af..f0907c5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ -SOURCES/ldb-2.2.0.tar.gz +SOURCES/fixed-guidindexpackv1.ldb +SOURCES/ldb-2.3.0.tar.gz SOURCES/ldb.keyring diff --git a/.libldb.metadata b/.libldb.metadata index b564ab1..6d4848d 100644 --- a/.libldb.metadata +++ b/.libldb.metadata @@ -1,2 +1,3 @@ -7c6d0827a20195636fcd84d713eea278d39064d4 SOURCES/ldb-2.2.0.tar.gz +c3b43fb6d944c7fb78dbfd2d696cbe18d2cb418a SOURCES/fixed-guidindexpackv1.ldb +71c12e1c5914172c450c992dae3b90c1f01b2419 SOURCES/ldb-2.3.0.tar.gz 8ac6d09878c4218fb8e365fcf5a877a621dd40f9 SOURCES/ldb.keyring diff --git a/SOURCES/1420.patch b/SOURCES/1420.patch deleted file mode 100644 index c2199ef..0000000 --- a/SOURCES/1420.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 0e4fd77c1e03fe6351d129f2161b0b3313f5fa3d Mon Sep 17 00:00:00 2001 -From: Mathieu Parent -Date: Thu, 25 Jun 2020 09:48:04 +0200 -Subject: [PATCH] Fix FTBFS / Increase the over-estimation for sparse files - -BUG: https://bugzilla.samba.org/show_bug.cgi?id=14418 -Signed-off-by: Mathieu Parent ---- - tests/ldb_kv_ops_test.c | 10 ++++++++-- - 1 file changed, 8 insertions(+), 2 deletions(-) - -diff --git a/lib/ldb/tests/ldb_kv_ops_test.c b/lib/ldb/tests/ldb_kv_ops_test.c -index 30adebf1952..9db2212895f 100644 ---- a/tests/ldb_kv_ops_test.c -+++ b/tests/ldb_kv_ops_test.c -@@ -1717,8 +1717,11 @@ static void test_get_size(void **state) - /* - * The tdb implementation of get_size over estimates for sparse files - * which is perfectly acceptable for it's intended use. -+ * mipsel, ia64: 9994 -+ * ppc64el, powerpc, ppc64: 13369 -+ * sparc64: 5046 - */ -- assert_in_range(size, 2500, 5000); -+ assert_in_range(size, 2500, 15000); - #endif - - /* -@@ -1746,8 +1749,11 @@ static void test_get_size(void **state) - /* - * The tdb implementation of get_size over estimates for sparse files - * which is perfectly acceptable for it's intended use. -+ * mipsel, ia64: 9994 -+ * ppc64el, powerpc, ppc64: 13369 -+ * sparc64: 5046 - */ -- assert_in_range(size, 2500, 5000); -+ assert_in_range(size, 2500, 15000); - #endif - talloc_free(tmp_ctx); - } --- -GitLab - diff --git a/SOURCES/ldb-2.2.0.tar.asc b/SOURCES/ldb-2.2.0.tar.asc deleted file mode 100644 index d8ff672..0000000 --- a/SOURCES/ldb-2.2.0.tar.asc +++ /dev/null @@ -1,11 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -iQFJBAABCgAzFiEEkUejOXGVGO6QEby1R5ORYRMIQCUFAl8HCQwVHHNhbWJhLWJ1 -Z3NAc2FtYmEub3JnAAoJEEeTkWETCEAlrwkH/A/MJM5E0Pyz6HNdctHSrA97FB6Q -JI1MnsyXerZXfDulcUFmyrNPp66gLGeNGG2X9eoxvWrZk3hPnYe9YPE6UiwCKxZu -1CSp2JuwaVB6EoUxUIuh63DFlF9Th/ZEhPsBrP3tQHvZyGpTDOQq3qhV7FLsrIwO -RstK5CJIqmgwy84oJmKanWLWfTqdp/HBvVsZw0/kZ0Kr+3DUcM9MaY7hifMpcSOV -8HTMgIpEoPbKkNOMj2lkDiYcx3tLWtdMYQdN31Cng3X9n5XmLX0GQlfCjfediSkT -vK2RGlIp/hlEXOSyIG2mJync+u4NCOv7r8EEcVhjHDYOflIvfOiwbITtWMg= -=/f7o ------END PGP SIGNATURE----- diff --git a/SOURCES/ldb-2.3.0-fix-tests-on-aarch64.patch b/SOURCES/ldb-2.3.0-fix-tests-on-aarch64.patch new file mode 100644 index 0000000..06b7497 --- /dev/null +++ b/SOURCES/ldb-2.3.0-fix-tests-on-aarch64.patch @@ -0,0 +1,39 @@ +From e90817629f1f7049cc0fe48f1003f5fb1103acc3 Mon Sep 17 00:00:00 2001 +From: Gary Lockyer +Date: Thu, 22 Apr 2021 10:03:53 +0200 +Subject: [PATCH 1/2] lib:ldb: Use a 1MiB lmdb so the test also passes on + aarch64 CentOS stream + +Signed-off-by: Gary Lockyer +Reviewed-by: Andreas Schneider +--- + lib/ldb/tests/ldb_lmdb_free_list_test.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/lib/ldb/tests/ldb_lmdb_free_list_test.c b/lib/ldb/tests/ldb_lmdb_free_list_test.c +index 9b295460730..c87620e7a87 100644 +--- a/tests/ldb_lmdb_free_list_test.c ++++ b/tests/ldb_lmdb_free_list_test.c +@@ -77,7 +77,7 @@ + #endif /* TEST_BE */ + + const int RECORD_SIZE = 6144; +-const int ITERATIONS = 3; ++const int ITERATIONS = 192; + + struct test_ctx { + struct tevent_context *ev; +@@ -155,9 +155,9 @@ static int setup(void **state) + "@IDX_DN_GUID: GUID\n" + "\n"; + /* +- * Use a 64KiB DB for this test ++ * Use a 1MiB DB for this test + */ +- const char *options[] = {"lmdb_env_size:65536", NULL}; ++ const char *options[] = {"lmdb_env_size:1048576", NULL}; + + noconn_setup((void **)&test_ctx); + +-- +2.31.1 diff --git a/SOURCES/ldb-2.3.0.tar.asc b/SOURCES/ldb-2.3.0.tar.asc new file mode 100644 index 0000000..c224ce5 --- /dev/null +++ b/SOURCES/ldb-2.3.0.tar.asc @@ -0,0 +1,11 @@ +-----BEGIN PGP SIGNATURE----- + +iQEzBAABCgAdFiEEkUejOXGVGO6QEby1R5ORYRMIQCUFAmBbDpgACgkQR5ORYRMI +QCVgZQf/WyIcMhD9EAzJzMOGjantl0hXloCjnyT/vBpchWYwviU73cu65H/po+AO +PgYMEvZfw8mLrMjSS+Dyr/76E+4MLjmnU02yISL4dJ+9EZ268xpMVELxHTYb9W+P +aql8R0fcODqyHmEr3xPV0br+rcqkM6Wqekp2OcwRDgmtl7EN9/nJOThZ4Un4mEL9 +0oJKPllWLfPEBfk5j+UXinPGARBKj3txl1IkNinoXh7LiQ4y7GrEg2BSpsQV8YLe +EDEBzK4fxPWLwbWWwAUSXgQNJ1GXwxZo6P2Fl9vKNDfxz8+2Xp24zyQBraWX7IqV +6+aRuYQSmrH6tKX9OZCmCKJtT2qcdQ== +=qIvP +-----END PGP SIGNATURE----- diff --git a/SPECS/libldb.spec b/SPECS/libldb.spec index a8e6fc3..a15bb82 100644 --- a/SPECS/libldb.spec +++ b/SPECS/libldb.spec @@ -1,8 +1,7 @@ %if ((0%{?fedora} || 0%{?rhel} > 7 || 0%{?epel} > 6)) # lmdb is not supported on 32 bit architectures -# also disabled on aarch64 for now, due to #1897082 -%ifarch s390x x86_64 +%ifarch aarch64 ppc64le s390x x86_64 %bcond_without lmdb %else %bcond_with lmdb @@ -25,8 +24,8 @@ %global tevent_version 0.10.2 Name: libldb -Version: 2.2.0 -Release: 1%{?dist} +Version: 2.3.0 +Release: 2%{?dist} Summary: A schema-less, ldap like, API and database Requires: libtalloc%{?_isa} >= %{talloc_version} Requires: libtdb%{?_isa} >= %{tdb_version} @@ -37,11 +36,14 @@ Source0: https://www.samba.org/ftp/ldb/ldb-%{version}.tar.gz Source1: https://www.samba.org/ftp/ldb/ldb-%{version}.tar.asc # gpg2 --no-default-keyring --keyring ./ldb.keyring --recv-keys 9147A339719518EE9011BCB54793916113084025 Source2: ldb.keyring +# binary diffs are not supported +# https://gitlab.com/samba-team/samba/-/merge_requests/1920 +Source3: fixed-guidindexpackv1.ldb # Patches Patch0001: 0001-PATCH-wafsamba-Fix-few-SyntaxWarnings-caused-by-regu.patch -# Fix FTBFS / Increase the over-estimation for sparse files -Patch0002: 1420.patch +# https://gitlab.com/samba-team/samba/-/merge_requests/1920 +Patch0002: ldb-2.3.0-fix-tests-on-aarch64.patch BuildRequires: gcc BuildRequires: libtalloc-devel >= %{talloc_version} @@ -64,12 +66,13 @@ BuildRequires: doxygen BuildRequires: openldap-devel BuildRequires: libcmocka-devel BuildRequires: gnupg2 +BuildRequires: make Provides: bundled(libreplace) +Obsoletes: python2-ldb < 2.0.5-1 +Obsoletes: python2-ldb-devel < 2.0.5-1 +Obsoletes: pyldb < 1.1.26-2 -Obsoletes: python2-ldb < %{version}-%{release} -Obsoletes: python2-ldb-devel < %{version}-%{release} -Obsoletes: python2-ldb-debuginfo < %{version}-%{release} %description An extensible library that implements an LDAP like API to access remote LDAP @@ -88,11 +91,20 @@ Requires: libldb%{?_isa} = %{version}-%{release} Requires: libtdb-devel%{?_isa} >= %{tdb_version} Requires: libtalloc-devel%{?_isa} >= %{talloc_version} Requires: libtevent-devel%{?_isa} >= %{tevent_version} -Requires: pkgconfig %description devel Header files needed to develop programs that link against the LDB library. +%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. + %if %{with python3} %package -n python3-ldb Summary: Python bindings for the LDB library @@ -107,7 +119,7 @@ Python bindings for the LDB library %package -n python3-ldb-devel Summary: Development files for the Python bindings for the LDB library Requires: python3-ldb%{?_isa} = %{version}-%{release} -Obsoletes: python-ldb-devel-common < %{version}-%{release} +Requires: python-ldb-devel-common%{?_isa} = %{version}-%{release} %{?python_provide:%python_provide python3-ldb-devel} @@ -117,11 +129,13 @@ Development files for the Python bindings for the LDB library %endif %prep +zcat %{SOURCE0} | gpgv2 --quiet --keyring %{SOURCE2} %{SOURCE1} - %autosetup -n ldb-%{version} -p1 -%build -zcat %{SOURCE0} | gpgv2 --quiet --keyring %{SOURCE2} %{SOURCE1} - +# binary diffs are not supported +cp -f %{SOURCE3} tests/guidindexpackv1.ldb +%build # workaround for https://bugzilla.redhat.com/show_bug.cgi?id=1217376 export python_LDFLAGS="" @@ -196,6 +210,10 @@ rm -f $RPM_BUILD_ROOT/%{_mandir}/man3/_* %{_mandir}/man3/ldb*.gz %{_mandir}/man3/ldif*.gz +%files -n python-ldb-devel-common +%{_includedir}/pyldb.h +%{_mandir}/man*/Py*.gz + %if %{with python3} %files -n python3-ldb %{python3_sitearch}/ldb.cpython-*.so @@ -206,14 +224,22 @@ rm -f $RPM_BUILD_ROOT/%{_mandir}/man3/_* %files -n python3-ldb-devel %{_libdir}/libpyldb-util.cpython-*.so %{_libdir}/pkgconfig/pyldb-util.cpython-*.pc -%{_includedir}/pyldb.h -%{_mandir}/man*/Py*.gz %ldconfig_scriptlets -n python3-ldb #endif with python %endif %changelog +* Tue May 25 2021 Andreas Schneider - 2.3.0-2 +- related: rhbz#1897082 - Fix libldb tests on ppc64le + +* Tue May 11 2021 Andreas Schneider - 2.3.0-1 +- resolves: rhbz#1945021 - Update to version 2.3.0 +- resolves: rhbz#1897082 - Fix libldb tests on aarch64 + +* Wed Mar 24 2021 Andreas Schneider - 2.2.0-2 +* resolves: rhbz#1941516 - Fixed CVE-2021-20277 + * Mon Nov 9 2020 Isaac Boukris - 2.2.0-1 - Resolves: rhbz#1878114 - Rebase libldb to the version required by Samba - Resolves: rhbz#1794349 - Build libldb with lmdb support