diff --git a/.gitignore b/.gitignore index 76adf18..15839e8 100644 --- a/.gitignore +++ b/.gitignore @@ -40,3 +40,4 @@ /ldb-1.4.2.tar.gz /ldb-1.4.3.tar.gz /ldb-1.5.2.tar.gz +/ldb-1.5.3.tar.gz 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 new file mode 100644 index 0000000..dd2aaae --- /dev/null +++ b/0004-ldb-The-test-api.py-should-not-rely-on-order-of-entr.patch @@ -0,0 +1,64 @@ +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/0004-ldb-Use-deterministic-order-of-dict-for-tests.patch b/0004-ldb-Use-deterministic-order-of-dict-for-tests.patch deleted file mode 100644 index 976bd6f..0000000 --- a/0004-ldb-Use-deterministic-order-of-dict-for-tests.patch +++ /dev/null @@ -1,43 +0,0 @@ -From b34b0f3459523a93da37e881bc2bb59e5274cff8 Mon Sep 17 00:00:00 2001 -From: Lukas Slebodnik -Date: Fri, 18 Jan 2019 19:55:02 +0100 -Subject: [PATCH] ldb: Use deterministic order of dict for tests - -Test failed on s390x but there is a simple reproducer for any -architecture - - 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) ---- - wscript | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/wscript b/wscript -index 851344733645f51186d0b568f2741ac888a52660..02307956ccca7fdec16ba9e3aafc9b56c3a9a3e0 100644 ---- a/wscript -+++ b/wscript -@@ -559,7 +559,7 @@ def test(ctx): - if env.HAVE_LMDB: - pyret = samba_utils.RUN_PYTHON_TESTS( - ['tests/python/api.py', 'tests/python/index.py'], -- extra_env={'SELFTEST_PREFIX': test_prefix}) -+ extra_env={'SELFTEST_PREFIX': test_prefix, 'PYTHONHASHSEED': '0'}) - else: - pyret = 0 - print("Python testsuite returned %d" % pyret) --- -2.20.1 - diff --git a/libldb.spec b/libldb.spec index 647014f..8b47fba 100644 --- a/libldb.spec +++ b/libldb.spec @@ -32,8 +32,8 @@ %global tevent_version 0.9.38 Name: libldb -Version: 1.5.2 -Release: 2%{?dist} +Version: 1.5.3 +Release: 1%{?dist} Summary: A schema-less, ldap like, API and database Requires: libtalloc%{?_isa} >= %{talloc_version} Requires: libtdb%{?_isa} >= %{tdb_version} @@ -46,7 +46,7 @@ Source: http://samba.org/ftp/ldb/ldb-%{version}.tar.gz 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-Use-deterministic-order-of-dict-for-tests.patch +Patch0004: 0004-ldb-The-test-api.py-should-not-rely-on-order-of-entr.patch BuildRequires: gcc BuildRequires: libtalloc-devel >= %{talloc_version} @@ -270,6 +270,9 @@ rm -f $RPM_BUILD_ROOT/%{_mandir}/man3/_* %endif %changelog +* Thu Feb 14 2019 Lukas Slebodnik - 1.5.3-1 +- New upstream release 1.5.3 + * Fri Feb 01 2019 Fedora Release Engineering - 1.5.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild diff --git a/sources b/sources index fcd50f4..9528bb1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (ldb-1.5.2.tar.gz) = 5dda5935437a82356cb84593f5be0d22289a87da7460b24dbc0673e01614f0cc40859328c3a5da858f3f2dd173f2b214743ec709555bbfef09342045b37f3a6c +SHA512 (ldb-1.5.3.tar.gz) = b25188606aae28a0ee5c95dddfb541cc6e500ef794d66601aa8cb061f51441433baab577311d0b39801d8b08808f66ad05066404293e78cb192523b681f1d145