From b88716ab8bb1a91979e82bed8c465673b6798277 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Tue, 22 Feb 2022 20:49:52 +0100 Subject: [PATCH] CI tests: Workaround python-ldap missing support fro OpenLDAP 2.5+ --- tests/python-ldap.spec | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/python-ldap.spec b/tests/python-ldap.spec index 1647523..fef1bd4 100644 --- a/tests/python-ldap.spec +++ b/tests/python-ldap.spec @@ -5,6 +5,11 @@ License: Python Summary: An object-oriented API to access LDAP directory servers Source0: %{pypi_source} +# OpenLDAP 2.5+ is not yet supported by python-ldap +# https://github.com/python-ldap/python-ldap/issues/432 +# Fedora has this patch to make it build, but the tests will fail anyway +Patch0: https://src.fedoraproject.org/rpms/python-ldap/raw/a237d9b212bd1581e07f4f1a8f54c26a7190843c/f/python-ldap-always-use-ldap-library.patch + BuildRequires: python3-devel BuildRequires: pyproject-rpm-macros @@ -35,6 +40,12 @@ Summary: %{summary} %prep %autosetup +%if 0%{?fedora} >= 36 || 0%{?rhel} >= 10 +# Hack: We remove tests that are broken by OpenLDAP 2.5+ +# Don't do this in the regular Fedora package, please +rm Tests/t_ldapobject.py Tests/t_cext.py Tests/t_edit.py Tests/t_ldap_sasl.py Tests/t_ldap_syncrepl.py Tests/t_slapdobject.py Tests/t_bind.py Tests/t_ldap_options.py Tests/t_ldap_schema_subentry.py +%endif + %generate_buildrequires %pyproject_buildrequires -t