From d97cb83baee92e08516333b109e276dd2684f7a3 Mon Sep 17 00:00:00 2001 From: Lukas Slebodnik Date: Mar 06 2019 11:33:44 +0000 Subject: New upstream release 1.5.4 --- diff --git a/.gitignore b/.gitignore index 15839e8..4252a7c 100644 --- a/.gitignore +++ b/.gitignore @@ -41,3 +41,4 @@ /ldb-1.4.3.tar.gz /ldb-1.5.2.tar.gz /ldb-1.5.3.tar.gz +/ldb-1.5.4.tar.gz diff --git a/0001-Fix-detection-of-HAVE_LARGEFILE-with-python2.patch b/0001-Fix-detection-of-HAVE_LARGEFILE-with-python2.patch deleted file mode 100644 index bace4c2..0000000 --- a/0001-Fix-detection-of-HAVE_LARGEFILE-with-python2.patch +++ /dev/null @@ -1,75 +0,0 @@ -From 4b2829af05e4a1ebf2ba29d84cb43245e1577dd5 Mon Sep 17 00:00:00 2001 -From: Lukas Slebodnik -Date: Thu, 17 Jan 2019 21:03:15 +0100 -Subject: [PATCH] Fix detection of HAVE_LARGEFILE with python2 - -There is an assertion if "getconf LFS_CFLAGS" does not return empty string. - - File "/builddir/build/BUILD/talloc-2.1.15/third_party/waf/waflib/Scripting.py", line 158, in waf_entry_point - run_commands() - File "/builddir/build/BUILD/talloc-2.1.15/third_party/waf/waflib/Scripting.py", line 251, in run_commands - ctx = run_command(cmd_name) - File "/builddir/build/BUILD/talloc-2.1.15/third_party/waf/waflib/Scripting.py", line 235, in run_command - ctx.execute() - File "/builddir/build/BUILD/talloc-2.1.15/third_party/waf/waflib/Configure.py", line 159, in execute - super(ConfigurationContext, self).execute() - File "/builddir/build/BUILD/talloc-2.1.15/third_party/waf/waflib/Context.py", line 204, in execute - self.recurse([os.path.dirname(g_module.root_path)]) - File "/builddir/build/BUILD/talloc-2.1.15/third_party/waf/waflib/Context.py", line 286, in recurse - user_function(self) - File "/builddir/build/BUILD/talloc-2.1.15/wscript", line 37, in configure - conf.RECURSE('lib/replace') - File "./buildtools/wafsamba/samba_utils.py", line 33, in fun - return f(*k, **kw) - File "./buildtools/wafsamba/samba_utils.py", line 436, in RECURSE - return ctx.recurse(relpath) - File "/builddir/build/BUILD/talloc-2.1.15/third_party/waf/waflib/Context.py", line 286, in recurse - user_function(self) - File "/builddir/build/BUILD/talloc-2.1.15/third_party/waf/waflib/Utils.py", line 816, in wrap - ret = fun(*k) - File "/builddir/build/BUILD/talloc-2.1.15/lib/replace/wscript", line 30, in configure - conf.RECURSE('buildtools/wafsamba') - File "./buildtools/wafsamba/samba_utils.py", line 33, in fun - return f(*k, **kw) - File "./buildtools/wafsamba/samba_utils.py", line 436, in RECURSE - return ctx.recurse(relpath) - File "/builddir/build/BUILD/talloc-2.1.15/third_party/waf/waflib/Context.py", line 286, in recurse - user_function(self) - File "/builddir/build/BUILD/talloc-2.1.15/third_party/waf/waflib/Utils.py", line 816, in wrap - ret = fun(*k) - File "/builddir/build/BUILD/talloc-2.1.15/buildtools/wafsamba/wscript", line 481, in configure - if not conf.CHECK_LARGEFILE(): - File "./buildtools/wafsamba/samba_utils.py", line 33, in fun - return f(*k, **kw) - File "./buildtools/wafsamba/samba_conftests.py", line 100, in CHECK_LARGEFILE - conf.DEFINE(flag_split[0], '1') - File "./buildtools/wafsamba/samba_utils.py", line 33, in fun - return f(*k, **kw) - File "./buildtools/wafsamba/samba_autoconf.py", line 20, in DEFINE - conf.define(d, v, quote=quote) - File "./buildtools/wafsamba/samba_utils.py", line 33, in fun - return f(*k, **kw) - File "./buildtools/wafsamba/samba_waf18.py", line 89, in define - assert key and isinstance(key, str) -AssertionError - -Signed-off-by: Lukas Slebodnik ---- - buildtools/wafsamba/samba_conftests.py | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/buildtools/wafsamba/samba_conftests.py b/buildtools/wafsamba/samba_conftests.py -index c0b9ae4929649692c9870edf28e8e0aa94fca113..af3b82e25f1366b74f57659978e272a075588447 100644 ---- a/buildtools/wafsamba/samba_conftests.py -+++ b/buildtools/wafsamba/samba_conftests.py -@@ -86,6 +86,7 @@ def CHECK_LARGEFILE(conf, define='HAVE_LARGEFILE'): - '''see what we need for largefile support''' - getconf_cflags = conf.CHECK_COMMAND(['getconf', 'LFS_CFLAGS']); - if getconf_cflags is not False: -+ getconf_cflags = str(getconf_cflags) - if (conf.CHECK_CODE('return !(sizeof(off_t) >= 8)', - define='WORKING_GETCONF_LFS_CFLAGS', - execute=True, --- -2.20.1 - diff --git a/0003-ldb-Out-ouf-bound-read-in-ldb_wildcard_compare.patch b/0003-ldb-Out-ouf-bound-read-in-ldb_wildcard_compare.patch deleted file mode 100644 index 4af1791..0000000 --- a/0003-ldb-Out-ouf-bound-read-in-ldb_wildcard_compare.patch +++ /dev/null @@ -1,89 +0,0 @@ -From f8dbb92b4ea46f86ff2fc448eb8dd989cc1efa51 Mon Sep 17 00:00:00 2001 -From: Lukas Slebodnik -Date: Fri, 18 Jan 2019 01:15:18 +0100 -Subject: [PATCH] ldb: Out ouf bound read in ldb_wildcard_compare - -There is valgrind error in few tests tests/test-generic.sh - 91 echo "Test wildcard match" - 92 $VALGRIND ldbadd $LDBDIR/tests/test-wildcard.ldif || exit 1 - 93 $VALGRIND ldbsearch '(cn=test*multi)' || exit 1 - 95 $VALGRIND ldbsearch '(cn=*test_multi)' || exit 1 - 97 $VALGRIND ldbsearch '(cn=test*multi*test*multi)' || exit 1 - -e.g. - ==3098== Memcheck, a memory error detector - ==3098== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. - ==3098== Using Valgrind-3.14.0 and LibVEX; rerun with -h for copyright info - ==3098== Command: ./bin/ldbsearch (cn=test*multi) - ==3098== - ==3098== Invalid read of size 1 - ==3098== at 0x483CEE7: memchr (vg_replace_strmem.c:890) - ==3098== by 0x49A9073: memmem (in /usr/lib64/libc-2.28.9000.so) - ==3098== by 0x485DFE9: ldb_wildcard_compare (ldb_match.c:313) - ==3098== by 0x485DFE9: ldb_match_substring (ldb_match.c:360) - ==3098== by 0x485DFE9: ldb_match_message (ldb_match.c:572) - ==3098== by 0x558F8FA: search_func (ldb_kv_search.c:549) - ==3098== by 0x48C78CA: ??? (in /usr/lib64/libtdb.so.1.3.17) - ==3098== by 0x48C7A60: tdb_traverse_read (in /usr/lib64/libtdb.so.1.3.17) - ==3098== by 0x557B7C4: ltdb_traverse_fn (ldb_tdb.c:274) - ==3098== by 0x558FBFA: ldb_kv_search_full (ldb_kv_search.c:594) - ==3098== by 0x558FBFA: ldb_kv_search (ldb_kv_search.c:854) - ==3098== by 0x558E497: ldb_kv_callback (ldb_kv.c:1713) - ==3098== by 0x48FCD58: tevent_common_invoke_timer_handler (in /usr/lib64/libtevent.so.0.9.38) - ==3098== by 0x48FCEFD: tevent_common_loop_timer_delay (in /usr/lib64/libtevent.so.0.9.38) - ==3098== by 0x48FE14A: ??? (in /usr/lib64/libtevent.so.0.9.38) - ==3098== Address 0x4b4ab81 is 0 bytes after a block of size 129 alloc'd - ==3098== at 0x483880B: malloc (vg_replace_malloc.c:309) - ==3098== by 0x491048B: talloc_strndup (in /usr/lib64/libtalloc.so.2.1.15) - ==3098== by 0x48593CA: ldb_casefold_default (ldb_utf8.c:59) - ==3098== by 0x485F68D: ldb_handler_fold (attrib_handlers.c:64) - ==3098== by 0x485DB88: ldb_wildcard_compare (ldb_match.c:257) - ==3098== by 0x485DB88: ldb_match_substring (ldb_match.c:360) - ==3098== by 0x485DB88: ldb_match_message (ldb_match.c:572) - ==3098== by 0x558F8FA: search_func (ldb_kv_search.c:549) - ==3098== by 0x48C78CA: ??? (in /usr/lib64/libtdb.so.1.3.17) - ==3098== by 0x48C7A60: tdb_traverse_read (in /usr/lib64/libtdb.so.1.3.17) - ==3098== by 0x557B7C4: ltdb_traverse_fn (ldb_tdb.c:274) - ==3098== by 0x558FBFA: ldb_kv_search_full (ldb_kv_search.c:594) - ==3098== by 0x558FBFA: ldb_kv_search (ldb_kv_search.c:854) - ==3098== by 0x558E497: ldb_kv_callback (ldb_kv.c:1713) - ==3098== by 0x48FCD58: tevent_common_invoke_timer_handler (in /usr/lib64/libtevent.so.0.9.38) - ==3098== - # record 1 - dn: cn=test_multi_test_multi_test_multi,o=University of Michigan,c=TEST - cn: test_multi_test_multi_test_multi - description: test multi wildcards matching - objectclass: person - sn: multi_test - name: test_multi_test_multi_test_multi - distinguishedName: cn=test_multi_test_multi_test_multi,o=University of Michiga - n,c=TEST - - # returned 1 records - # 1 entries - # 0 referrals - -Signed-off-by: Lukas Slebodnik ---- - common/ldb_match.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/common/ldb_match.c b/common/ldb_match.c -index 25fe3f9c21b14c23696eecd700b2170b0c3b1981..8eeedfb12e0600cdec7431a10fde8bdf9dcb2bd8 100644 ---- a/common/ldb_match.c -+++ b/common/ldb_match.c -@@ -308,9 +308,10 @@ static int ldb_wildcard_compare(struct ldb_context *ldb, - if (p == NULL) goto mismatch; - if ( (! tree->u.substring.chunks[c + 1]) && (! tree->u.substring.end_with_wildcard) ) { - uint8_t *g; -+ uint8_t *end = val.data + val.length; - do { /* greedy */ - g = memmem(p + cnk.length, -- val.length - (p - val.data), -+ end - (p + cnk.length), - (const uint8_t *)cnk.data, - cnk.length); - if (g) p = g; --- -2.20.1 - diff --git a/0004-ldb-The-test-api.py-should-not-rely-on-order-of-entr.patch b/0004-ldb-The-test-api.py-should-not-rely-on-order-of-entr.patch deleted file mode 100644 index dd2aaae..0000000 --- a/0004-ldb-The-test-api.py-should-not-rely-on-order-of-entr.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 7a7a5ccf501f89c530970bde072509ed86d7bd89 Mon Sep 17 00:00:00 2001 -From: Lukas Slebodnik -Date: Tue, 22 Jan 2019 10:04:02 +0100 -Subject: [PATCH] ldb: The test api.py should not rely on order of entries in - dict - -Test failed on s390x but there is a simple reproducer for any -architecture. - -The built-in function repr returns the canonical string representation -of the object. We needn't care about order attributes in string -representation. Therefore test should pass for any order. - - for i in {1..30}; do - PYTHONHASHSEED=random \ - python2 -c 'import ldb; msg = ldb.Message(); msg.dn = ldb.Dn(ldb.Ldb(), "dc=foo29"); msg["dc"] = b"foo"; print(repr(msg)) ' - done - - ====================================================================== - FAIL: test_repr (__main__.LdbMsgTests) - ---------------------------------------------------------------------- - Traceback (most recent call last): - File "tests/python/api.py", line 2322, in test_repr - "Message({'dn': Dn('dc=foo29'), 'dc': MessageElement(['foo'])})") - AssertionError: "Message({'dc': MessageElement(['foo']), 'dn': Dn('dc=foo29')})" != "Message({'dn': Dn('dc=foo29'), 'dc': MessageElement(['foo'])})" - ---------------------------------------------------------------------- - Ran 1025 tests in 29.146s - FAILED (failures=1) - -Signed-off-by: Lukas Slebodnik -Reviewed-by: Douglas Bagnall -Reviewed-by: Andreas Schneider ---- - tests/python/api.py | 14 ++++++++------ - 1 file changed, 8 insertions(+), 6 deletions(-) - -diff --git a/tests/python/api.py b/lib/ldb/tests/python/api.py -index 1d9f33f8f73f3ed0e15722a47147f00ee86c3631..e8826b5af3b30cf761b55e36f119385b648c5664 100755 ---- a/tests/python/api.py -+++ b/tests/python/api.py -@@ -2317,12 +2317,14 @@ class LdbMsgTests(TestCase): - "Message({'dc': MessageElement([b'foo']), 'dn': Dn('dc=foo29')}).text", - ]) - else: -- self.assertEqual( -- repr(self.msg), -- "Message({'dn': Dn('dc=foo29'), 'dc': MessageElement(['foo'])})") -- self.assertEqual( -- repr(self.msg.text), -- "Message({'dn': Dn('dc=foo29'), 'dc': MessageElement(['foo'])}).text") -+ self.assertIn(repr(self.msg), [ -+ "Message({'dn': Dn('dc=foo29'), 'dc': MessageElement(['foo'])})", -+ "Message({'dc': MessageElement(['foo']), 'dn': Dn('dc=foo29')})", -+ ]) -+ self.assertIn(repr(self.msg.text), [ -+ "Message({'dn': Dn('dc=foo29'), 'dc': MessageElement(['foo'])}).text", -+ "Message({'dc': MessageElement(['foo']), 'dn': Dn('dc=foo29')}).text", -+ ]) - - def test_len(self): - self.assertEqual(0, len(self.msg)) --- -2.20.1 - diff --git a/libldb.spec b/libldb.spec index 8b47fba..92c6811 100644 --- a/libldb.spec +++ b/libldb.spec @@ -27,12 +27,12 @@ %global extra_python --extra-python=%{__python2} %endif -%global talloc_version 2.1.15 -%global tdb_version 1.3.17 -%global tevent_version 0.9.38 +%global talloc_version 2.1.16 +%global tdb_version 1.3.18 +%global tevent_version 0.9.39 Name: libldb -Version: 1.5.3 +Version: 1.5.4 Release: 1%{?dist} Summary: A schema-less, ldap like, API and database Requires: libtalloc%{?_isa} >= %{talloc_version} @@ -43,10 +43,7 @@ URL: http://ldb.samba.org/ Source: http://samba.org/ftp/ldb/ldb-%{version}.tar.gz # Patches -Patch0001: 0001-Fix-detection-of-HAVE_LARGEFILE-with-python2.patch -Patch0002: 0002-ldb-Run-at-least-some-tests-on-32-bit-machines.patch -Patch0003: 0003-ldb-Out-ouf-bound-read-in-ldb_wildcard_compare.patch -Patch0004: 0004-ldb-The-test-api.py-should-not-rely-on-order-of-entr.patch +Patch0001: 0002-ldb-Run-at-least-some-tests-on-32-bit-machines.patch BuildRequires: gcc BuildRequires: libtalloc-devel >= %{talloc_version} @@ -165,9 +162,6 @@ Development files for the Python bindings for the LDB library # workaround for https://bugzilla.redhat.com/show_bug.cgi?id=1217376 export python_LDFLAGS="" -# workaround for hardcoded PATH to waf -sed -e 's:\.\./\.\./buildtools:./buildtools:' -i Makefile - %{?export_waf_python} %configure --disable-rpath \ --disable-rpath-install \ @@ -270,6 +264,9 @@ rm -f $RPM_BUILD_ROOT/%{_mandir}/man3/_* %endif %changelog +* Wed Mar 06 2019 Lukas Slebodnik - 1.5.4-1 +- New upstream release 1.5.4 + * Thu Feb 14 2019 Lukas Slebodnik - 1.5.3-1 - New upstream release 1.5.3 diff --git a/sources b/sources index 9528bb1..3c0f625 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (ldb-1.5.3.tar.gz) = b25188606aae28a0ee5c95dddfb541cc6e500ef794d66601aa8cb061f51441433baab577311d0b39801d8b08808f66ad05066404293e78cb192523b681f1d145 +SHA512 (ldb-1.5.4.tar.gz) = fc323e4283671c14d6dd4feb7e9ca943a63a166688077dbf3591f9d957cf821f9e739869842e15ca1ec4fd3764123d5afc6f4954b1af437bd1ec54df58366a22